index.mjs 6.5 MB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953495449554956495749584959496049614962496349644965496649674968496949704971497249734974497549764977497849794980498149824983498449854986498749884989499049914992499349944995499649974998499950005001500250035004500550065007500850095010501150125013501450155016501750185019502050215022502350245025502650275028502950305031503250335034503550365037503850395040504150425043504450455046504750485049505050515052505350545055505650575058505950605061506250635064506550665067506850695070507150725073507450755076507750785079508050815082508350845085508650875088508950905091509250935094509550965097509850995100510151025103510451055106510751085109511051115112511351145115511651175118511951205121512251235124512551265127512851295130513151325133513451355136513751385139514051415142514351445145514651475148514951505151515251535154515551565157515851595160516151625163516451655166516751685169517051715172517351745175517651775178517951805181518251835184518551865187518851895190519151925193519451955196519751985199520052015202520352045205520652075208520952105211521252135214521552165217521852195220522152225223522452255226522752285229523052315232523352345235523652375238523952405241524252435244524552465247524852495250525152525253525452555256525752585259526052615262526352645265526652675268526952705271527252735274527552765277527852795280528152825283528452855286528752885289529052915292529352945295529652975298529953005301530253035304530553065307530853095310531153125313531453155316531753185319532053215322532353245325532653275328532953305331533253335334533553365337533853395340534153425343534453455346534753485349535053515352535353545355535653575358535953605361536253635364536553665367536853695370537153725373537453755376537753785379538053815382538353845385538653875388538953905391539253935394539553965397539853995400540154025403540454055406540754085409541054115412541354145415541654175418541954205421542254235424542554265427542854295430543154325433543454355436543754385439544054415442544354445445544654475448544954505451545254535454545554565457545854595460546154625463546454655466546754685469547054715472547354745475547654775478547954805481548254835484548554865487548854895490549154925493549454955496549754985499550055015502550355045505550655075508550955105511551255135514551555165517551855195520552155225523552455255526552755285529553055315532553355345535553655375538553955405541554255435544554555465547554855495550555155525553555455555556555755585559556055615562556355645565556655675568556955705571557255735574557555765577557855795580558155825583558455855586558755885589559055915592559355945595559655975598559956005601560256035604560556065607560856095610561156125613561456155616561756185619562056215622562356245625562656275628562956305631563256335634563556365637563856395640564156425643564456455646564756485649565056515652565356545655565656575658565956605661566256635664566556665667566856695670567156725673567456755676567756785679568056815682568356845685568656875688568956905691569256935694569556965697569856995700570157025703570457055706570757085709571057115712571357145715571657175718571957205721572257235724572557265727572857295730573157325733573457355736573757385739574057415742574357445745574657475748574957505751575257535754575557565757575857595760576157625763576457655766576757685769577057715772577357745775577657775778577957805781578257835784578557865787578857895790579157925793579457955796579757985799580058015802580358045805580658075808580958105811581258135814581558165817581858195820582158225823582458255826582758285829583058315832583358345835583658375838583958405841584258435844584558465847584858495850585158525853585458555856585758585859586058615862586358645865586658675868586958705871587258735874587558765877587858795880588158825883588458855886588758885889589058915892589358945895589658975898589959005901590259035904590559065907590859095910591159125913591459155916591759185919592059215922592359245925592659275928592959305931593259335934593559365937593859395940594159425943594459455946594759485949595059515952595359545955595659575958595959605961596259635964596559665967596859695970597159725973597459755976597759785979598059815982598359845985598659875988598959905991599259935994599559965997599859996000600160026003600460056006600760086009601060116012601360146015601660176018601960206021602260236024602560266027602860296030603160326033603460356036603760386039604060416042604360446045604660476048604960506051605260536054605560566057605860596060606160626063606460656066606760686069607060716072607360746075607660776078607960806081608260836084608560866087608860896090609160926093609460956096609760986099610061016102610361046105610661076108610961106111611261136114611561166117611861196120612161226123612461256126612761286129613061316132613361346135613661376138613961406141614261436144614561466147614861496150615161526153615461556156615761586159616061616162616361646165616661676168616961706171617261736174617561766177617861796180618161826183618461856186618761886189619061916192619361946195619661976198619962006201620262036204620562066207620862096210621162126213621462156216621762186219622062216222622362246225622662276228622962306231623262336234623562366237623862396240624162426243624462456246624762486249625062516252625362546255625662576258625962606261626262636264626562666267626862696270627162726273627462756276627762786279628062816282628362846285628662876288628962906291629262936294629562966297629862996300630163026303630463056306630763086309631063116312631363146315631663176318631963206321632263236324632563266327632863296330633163326333633463356336633763386339634063416342634363446345634663476348634963506351635263536354635563566357635863596360636163626363636463656366636763686369637063716372637363746375637663776378637963806381638263836384638563866387638863896390639163926393639463956396639763986399640064016402640364046405640664076408640964106411641264136414641564166417641864196420642164226423642464256426642764286429643064316432643364346435643664376438643964406441644264436444644564466447644864496450645164526453645464556456645764586459646064616462646364646465646664676468646964706471647264736474647564766477647864796480648164826483648464856486648764886489649064916492649364946495649664976498649965006501650265036504650565066507650865096510651165126513651465156516651765186519652065216522652365246525652665276528652965306531653265336534653565366537653865396540654165426543654465456546654765486549655065516552655365546555655665576558655965606561656265636564656565666567656865696570657165726573657465756576657765786579658065816582658365846585658665876588658965906591659265936594659565966597659865996600660166026603660466056606660766086609661066116612661366146615661666176618661966206621662266236624662566266627662866296630663166326633663466356636663766386639664066416642664366446645664666476648664966506651665266536654665566566657665866596660666166626663666466656666666766686669667066716672667366746675667666776678667966806681668266836684668566866687668866896690669166926693669466956696669766986699670067016702670367046705670667076708670967106711671267136714671567166717671867196720672167226723672467256726672767286729673067316732673367346735673667376738673967406741674267436744674567466747674867496750675167526753675467556756675767586759676067616762676367646765676667676768676967706771677267736774677567766777677867796780678167826783678467856786678767886789679067916792679367946795679667976798679968006801680268036804680568066807680868096810681168126813681468156816681768186819682068216822682368246825682668276828682968306831683268336834683568366837683868396840684168426843684468456846684768486849685068516852685368546855685668576858685968606861686268636864686568666867686868696870687168726873687468756876687768786879688068816882688368846885688668876888688968906891689268936894689568966897689868996900690169026903690469056906690769086909691069116912691369146915691669176918691969206921692269236924692569266927692869296930693169326933693469356936693769386939694069416942694369446945694669476948694969506951695269536954695569566957695869596960696169626963696469656966696769686969697069716972697369746975697669776978697969806981698269836984698569866987698869896990699169926993699469956996699769986999700070017002700370047005700670077008700970107011701270137014701570167017701870197020702170227023702470257026702770287029703070317032703370347035703670377038703970407041704270437044704570467047704870497050705170527053705470557056705770587059706070617062706370647065706670677068706970707071707270737074707570767077707870797080708170827083708470857086708770887089709070917092709370947095709670977098709971007101710271037104710571067107710871097110711171127113711471157116711771187119712071217122712371247125712671277128712971307131713271337134713571367137713871397140714171427143714471457146714771487149715071517152715371547155715671577158715971607161716271637164716571667167716871697170717171727173717471757176717771787179718071817182718371847185718671877188718971907191719271937194719571967197719871997200720172027203720472057206720772087209721072117212721372147215721672177218721972207221722272237224722572267227722872297230723172327233723472357236723772387239724072417242724372447245724672477248724972507251725272537254725572567257725872597260726172627263726472657266726772687269727072717272727372747275727672777278727972807281728272837284728572867287728872897290729172927293729472957296729772987299730073017302730373047305730673077308730973107311731273137314731573167317731873197320732173227323732473257326732773287329733073317332733373347335733673377338733973407341734273437344734573467347734873497350735173527353735473557356735773587359736073617362736373647365736673677368736973707371737273737374737573767377737873797380738173827383738473857386738773887389739073917392739373947395739673977398739974007401740274037404740574067407740874097410741174127413741474157416741774187419742074217422742374247425742674277428742974307431743274337434743574367437743874397440744174427443744474457446744774487449745074517452745374547455745674577458745974607461746274637464746574667467746874697470747174727473747474757476747774787479748074817482748374847485748674877488748974907491749274937494749574967497749874997500750175027503750475057506750775087509751075117512751375147515751675177518751975207521752275237524752575267527752875297530753175327533753475357536753775387539754075417542754375447545754675477548754975507551755275537554755575567557755875597560756175627563756475657566756775687569757075717572757375747575757675777578757975807581758275837584758575867587758875897590759175927593759475957596759775987599760076017602760376047605760676077608760976107611761276137614761576167617761876197620762176227623762476257626762776287629763076317632763376347635763676377638763976407641764276437644764576467647764876497650765176527653765476557656765776587659766076617662766376647665766676677668766976707671767276737674767576767677767876797680768176827683768476857686768776887689769076917692769376947695769676977698769977007701770277037704770577067707770877097710771177127713771477157716771777187719772077217722772377247725772677277728772977307731773277337734773577367737773877397740774177427743774477457746774777487749775077517752775377547755775677577758775977607761776277637764776577667767776877697770777177727773777477757776777777787779778077817782778377847785778677877788778977907791779277937794779577967797779877997800780178027803780478057806780778087809781078117812781378147815781678177818781978207821782278237824782578267827782878297830783178327833783478357836783778387839784078417842784378447845784678477848784978507851785278537854785578567857785878597860786178627863786478657866786778687869787078717872787378747875787678777878787978807881788278837884788578867887788878897890789178927893789478957896789778987899790079017902790379047905790679077908790979107911791279137914791579167917791879197920792179227923792479257926792779287929793079317932793379347935793679377938793979407941794279437944794579467947794879497950795179527953795479557956795779587959796079617962796379647965796679677968796979707971797279737974797579767977797879797980798179827983798479857986798779887989799079917992799379947995799679977998799980008001800280038004800580068007800880098010801180128013801480158016801780188019802080218022802380248025802680278028802980308031803280338034803580368037803880398040804180428043804480458046804780488049805080518052805380548055805680578058805980608061806280638064806580668067806880698070807180728073807480758076807780788079808080818082808380848085808680878088808980908091809280938094809580968097809880998100810181028103810481058106810781088109811081118112811381148115811681178118811981208121812281238124812581268127812881298130813181328133813481358136813781388139814081418142814381448145814681478148814981508151815281538154815581568157815881598160816181628163816481658166816781688169817081718172817381748175817681778178817981808181818281838184818581868187818881898190819181928193819481958196819781988199820082018202820382048205820682078208820982108211821282138214821582168217821882198220822182228223822482258226822782288229823082318232823382348235823682378238823982408241824282438244824582468247824882498250825182528253825482558256825782588259826082618262826382648265826682678268826982708271827282738274827582768277827882798280828182828283828482858286828782888289829082918292829382948295829682978298829983008301830283038304830583068307830883098310831183128313831483158316831783188319832083218322832383248325832683278328832983308331833283338334833583368337833883398340834183428343834483458346834783488349835083518352835383548355835683578358835983608361836283638364836583668367836883698370837183728373837483758376837783788379838083818382838383848385838683878388838983908391839283938394839583968397839883998400840184028403840484058406840784088409841084118412841384148415841684178418841984208421842284238424842584268427842884298430843184328433843484358436843784388439844084418442844384448445844684478448844984508451845284538454845584568457845884598460846184628463846484658466846784688469847084718472847384748475847684778478847984808481848284838484848584868487848884898490849184928493849484958496849784988499850085018502850385048505850685078508850985108511851285138514851585168517851885198520852185228523852485258526852785288529853085318532853385348535853685378538853985408541854285438544854585468547854885498550855185528553855485558556855785588559856085618562856385648565856685678568856985708571857285738574857585768577857885798580858185828583858485858586858785888589859085918592859385948595859685978598859986008601860286038604860586068607860886098610861186128613861486158616861786188619862086218622862386248625862686278628862986308631863286338634863586368637863886398640864186428643864486458646864786488649865086518652865386548655865686578658865986608661866286638664866586668667866886698670867186728673867486758676867786788679868086818682868386848685868686878688868986908691869286938694869586968697869886998700870187028703870487058706870787088709871087118712871387148715871687178718871987208721872287238724872587268727872887298730873187328733873487358736873787388739874087418742874387448745874687478748874987508751875287538754875587568757875887598760876187628763876487658766876787688769877087718772877387748775877687778778877987808781878287838784878587868787878887898790879187928793879487958796879787988799880088018802880388048805880688078808880988108811881288138814881588168817881888198820882188228823882488258826882788288829883088318832883388348835883688378838883988408841884288438844884588468847884888498850885188528853885488558856885788588859886088618862886388648865886688678868886988708871887288738874887588768877887888798880888188828883888488858886888788888889889088918892889388948895889688978898889989008901890289038904890589068907890889098910891189128913891489158916891789188919892089218922892389248925892689278928892989308931893289338934893589368937893889398940894189428943894489458946894789488949895089518952895389548955895689578958895989608961896289638964896589668967896889698970897189728973897489758976897789788979898089818982898389848985898689878988898989908991899289938994899589968997899889999000900190029003900490059006900790089009901090119012901390149015901690179018901990209021902290239024902590269027902890299030903190329033903490359036903790389039904090419042904390449045904690479048904990509051905290539054905590569057905890599060906190629063906490659066906790689069907090719072907390749075907690779078907990809081908290839084908590869087908890899090909190929093909490959096909790989099910091019102910391049105910691079108910991109111911291139114911591169117911891199120912191229123912491259126912791289129913091319132913391349135913691379138913991409141914291439144914591469147914891499150915191529153915491559156915791589159916091619162916391649165916691679168916991709171917291739174917591769177917891799180918191829183918491859186918791889189919091919192919391949195919691979198919992009201920292039204920592069207920892099210921192129213921492159216921792189219922092219222922392249225922692279228922992309231923292339234923592369237923892399240924192429243924492459246924792489249925092519252925392549255925692579258925992609261926292639264926592669267926892699270927192729273927492759276927792789279928092819282928392849285928692879288928992909291929292939294929592969297929892999300930193029303930493059306930793089309931093119312931393149315931693179318931993209321932293239324932593269327932893299330933193329333933493359336933793389339934093419342934393449345934693479348934993509351935293539354935593569357935893599360936193629363936493659366936793689369937093719372937393749375937693779378937993809381938293839384938593869387938893899390939193929393939493959396939793989399940094019402940394049405940694079408940994109411941294139414941594169417941894199420942194229423942494259426942794289429943094319432943394349435943694379438943994409441944294439444944594469447944894499450945194529453945494559456945794589459946094619462946394649465946694679468946994709471947294739474947594769477947894799480948194829483948494859486948794889489949094919492949394949495949694979498949995009501950295039504950595069507950895099510951195129513951495159516951795189519952095219522952395249525952695279528952995309531953295339534953595369537953895399540954195429543954495459546954795489549955095519552955395549555955695579558955995609561956295639564956595669567956895699570957195729573957495759576957795789579958095819582958395849585958695879588958995909591959295939594959595969597959895999600960196029603960496059606960796089609961096119612961396149615961696179618961996209621962296239624962596269627962896299630963196329633963496359636963796389639964096419642964396449645964696479648964996509651965296539654965596569657965896599660966196629663966496659666966796689669967096719672967396749675967696779678967996809681968296839684968596869687968896899690969196929693969496959696969796989699970097019702970397049705970697079708970997109711971297139714971597169717971897199720972197229723972497259726972797289729973097319732973397349735973697379738973997409741974297439744974597469747974897499750975197529753975497559756975797589759976097619762976397649765976697679768976997709771977297739774977597769777977897799780978197829783978497859786978797889789979097919792979397949795979697979798979998009801980298039804980598069807980898099810981198129813981498159816981798189819982098219822982398249825982698279828982998309831983298339834983598369837983898399840984198429843984498459846984798489849985098519852985398549855985698579858985998609861986298639864986598669867986898699870987198729873987498759876987798789879988098819882988398849885988698879888988998909891989298939894989598969897989898999900990199029903990499059906990799089909991099119912991399149915991699179918991999209921992299239924992599269927992899299930993199329933993499359936993799389939994099419942994399449945994699479948994999509951995299539954995599569957995899599960996199629963996499659966996799689969997099719972997399749975997699779978997999809981998299839984998599869987998899899990999199929993999499959996999799989999100001000110002100031000410005100061000710008100091001010011100121001310014100151001610017100181001910020100211002210023100241002510026100271002810029100301003110032100331003410035100361003710038100391004010041100421004310044100451004610047100481004910050100511005210053100541005510056100571005810059100601006110062100631006410065100661006710068100691007010071100721007310074100751007610077100781007910080100811008210083100841008510086100871008810089100901009110092100931009410095100961009710098100991010010101101021010310104101051010610107101081010910110101111011210113101141011510116101171011810119101201012110122101231012410125101261012710128101291013010131101321013310134101351013610137101381013910140101411014210143101441014510146101471014810149101501015110152101531015410155101561015710158101591016010161101621016310164101651016610167101681016910170101711017210173101741017510176101771017810179101801018110182101831018410185101861018710188101891019010191101921019310194101951019610197101981019910200102011020210203102041020510206102071020810209102101021110212102131021410215102161021710218102191022010221102221022310224102251022610227102281022910230102311023210233102341023510236102371023810239102401024110242102431024410245102461024710248102491025010251102521025310254102551025610257102581025910260102611026210263102641026510266102671026810269102701027110272102731027410275102761027710278102791028010281102821028310284102851028610287102881028910290102911029210293102941029510296102971029810299103001030110302103031030410305103061030710308103091031010311103121031310314103151031610317103181031910320103211032210323103241032510326103271032810329103301033110332103331033410335103361033710338103391034010341103421034310344103451034610347103481034910350103511035210353103541035510356103571035810359103601036110362103631036410365103661036710368103691037010371103721037310374103751037610377103781037910380103811038210383103841038510386103871038810389103901039110392103931039410395103961039710398103991040010401104021040310404104051040610407104081040910410104111041210413104141041510416104171041810419104201042110422104231042410425104261042710428104291043010431104321043310434104351043610437104381043910440104411044210443104441044510446104471044810449104501045110452104531045410455104561045710458104591046010461104621046310464104651046610467104681046910470104711047210473104741047510476104771047810479104801048110482104831048410485104861048710488104891049010491104921049310494104951049610497104981049910500105011050210503105041050510506105071050810509105101051110512105131051410515105161051710518105191052010521105221052310524105251052610527105281052910530105311053210533105341053510536105371053810539105401054110542105431054410545105461054710548105491055010551105521055310554105551055610557105581055910560105611056210563105641056510566105671056810569105701057110572105731057410575105761057710578105791058010581105821058310584105851058610587105881058910590105911059210593105941059510596105971059810599106001060110602106031060410605106061060710608106091061010611106121061310614106151061610617106181061910620106211062210623106241062510626106271062810629106301063110632106331063410635106361063710638106391064010641106421064310644106451064610647106481064910650106511065210653106541065510656106571065810659106601066110662106631066410665106661066710668106691067010671106721067310674106751067610677106781067910680106811068210683106841068510686106871068810689106901069110692106931069410695106961069710698106991070010701107021070310704107051070610707107081070910710107111071210713107141071510716107171071810719107201072110722107231072410725107261072710728107291073010731107321073310734107351073610737107381073910740107411074210743107441074510746107471074810749107501075110752107531075410755107561075710758107591076010761107621076310764107651076610767107681076910770107711077210773107741077510776107771077810779107801078110782107831078410785107861078710788107891079010791107921079310794107951079610797107981079910800108011080210803108041080510806108071080810809108101081110812108131081410815108161081710818108191082010821108221082310824108251082610827108281082910830108311083210833108341083510836108371083810839108401084110842108431084410845108461084710848108491085010851108521085310854108551085610857108581085910860108611086210863108641086510866108671086810869108701087110872108731087410875108761087710878108791088010881108821088310884108851088610887108881088910890108911089210893108941089510896108971089810899109001090110902109031090410905109061090710908109091091010911109121091310914109151091610917109181091910920109211092210923109241092510926109271092810929109301093110932109331093410935109361093710938109391094010941109421094310944109451094610947109481094910950109511095210953109541095510956109571095810959109601096110962109631096410965109661096710968109691097010971109721097310974109751097610977109781097910980109811098210983109841098510986109871098810989109901099110992109931099410995109961099710998109991100011001110021100311004110051100611007110081100911010110111101211013110141101511016110171101811019110201102111022110231102411025110261102711028110291103011031110321103311034110351103611037110381103911040110411104211043110441104511046110471104811049110501105111052110531105411055110561105711058110591106011061110621106311064110651106611067110681106911070110711107211073110741107511076110771107811079110801108111082110831108411085110861108711088110891109011091110921109311094110951109611097110981109911100111011110211103111041110511106111071110811109111101111111112111131111411115111161111711118111191112011121111221112311124111251112611127111281112911130111311113211133111341113511136111371113811139111401114111142111431114411145111461114711148111491115011151111521115311154111551115611157111581115911160111611116211163111641116511166111671116811169111701117111172111731117411175111761117711178111791118011181111821118311184111851118611187111881118911190111911119211193111941119511196111971119811199112001120111202112031120411205112061120711208112091121011211112121121311214112151121611217112181121911220112211122211223112241122511226112271122811229112301123111232112331123411235112361123711238112391124011241112421124311244112451124611247112481124911250112511125211253112541125511256112571125811259112601126111262112631126411265112661126711268112691127011271112721127311274112751127611277112781127911280112811128211283112841128511286112871128811289112901129111292112931129411295112961129711298112991130011301113021130311304113051130611307113081130911310113111131211313113141131511316113171131811319113201132111322113231132411325113261132711328113291133011331113321133311334113351133611337113381133911340113411134211343113441134511346113471134811349113501135111352113531135411355113561135711358113591136011361113621136311364113651136611367113681136911370113711137211373113741137511376113771137811379113801138111382113831138411385113861138711388113891139011391113921139311394113951139611397113981139911400114011140211403114041140511406114071140811409114101141111412114131141411415114161141711418114191142011421114221142311424114251142611427114281142911430114311143211433114341143511436114371143811439114401144111442114431144411445114461144711448114491145011451114521145311454114551145611457114581145911460114611146211463114641146511466114671146811469114701147111472114731147411475114761147711478114791148011481114821148311484114851148611487114881148911490114911149211493114941149511496114971149811499115001150111502115031150411505115061150711508115091151011511115121151311514115151151611517115181151911520115211152211523115241152511526115271152811529115301153111532115331153411535115361153711538115391154011541115421154311544115451154611547115481154911550115511155211553115541155511556115571155811559115601156111562115631156411565115661156711568115691157011571115721157311574115751157611577115781157911580115811158211583115841158511586115871158811589115901159111592115931159411595115961159711598115991160011601116021160311604116051160611607116081160911610116111161211613116141161511616116171161811619116201162111622116231162411625116261162711628116291163011631116321163311634116351163611637116381163911640116411164211643116441164511646116471164811649116501165111652116531165411655116561165711658116591166011661116621166311664116651166611667116681166911670116711167211673116741167511676116771167811679116801168111682116831168411685116861168711688116891169011691116921169311694116951169611697116981169911700117011170211703117041170511706117071170811709117101171111712117131171411715117161171711718117191172011721117221172311724117251172611727117281172911730117311173211733117341173511736117371173811739117401174111742117431174411745117461174711748117491175011751117521175311754117551175611757117581175911760117611176211763117641176511766117671176811769117701177111772117731177411775117761177711778117791178011781117821178311784117851178611787117881178911790117911179211793117941179511796117971179811799118001180111802118031180411805118061180711808118091181011811118121181311814118151181611817118181181911820118211182211823118241182511826118271182811829118301183111832118331183411835118361183711838118391184011841118421184311844118451184611847118481184911850118511185211853118541185511856118571185811859118601186111862118631186411865118661186711868118691187011871118721187311874118751187611877118781187911880118811188211883118841188511886118871188811889118901189111892118931189411895118961189711898118991190011901119021190311904119051190611907119081190911910119111191211913119141191511916119171191811919119201192111922119231192411925119261192711928119291193011931119321193311934119351193611937119381193911940119411194211943119441194511946119471194811949119501195111952119531195411955119561195711958119591196011961119621196311964119651196611967119681196911970119711197211973119741197511976119771197811979119801198111982119831198411985119861198711988119891199011991119921199311994119951199611997119981199912000120011200212003120041200512006120071200812009120101201112012120131201412015120161201712018120191202012021120221202312024120251202612027120281202912030120311203212033120341203512036120371203812039120401204112042120431204412045120461204712048120491205012051120521205312054120551205612057120581205912060120611206212063120641206512066120671206812069120701207112072120731207412075120761207712078120791208012081120821208312084120851208612087120881208912090120911209212093120941209512096120971209812099121001210112102121031210412105121061210712108121091211012111121121211312114121151211612117121181211912120121211212212123121241212512126121271212812129121301213112132121331213412135121361213712138121391214012141121421214312144121451214612147121481214912150121511215212153121541215512156121571215812159121601216112162121631216412165121661216712168121691217012171121721217312174121751217612177121781217912180121811218212183121841218512186121871218812189121901219112192121931219412195121961219712198121991220012201122021220312204122051220612207122081220912210122111221212213122141221512216122171221812219122201222112222122231222412225122261222712228122291223012231122321223312234122351223612237122381223912240122411224212243122441224512246122471224812249122501225112252122531225412255122561225712258122591226012261122621226312264122651226612267122681226912270122711227212273122741227512276122771227812279122801228112282122831228412285122861228712288122891229012291122921229312294122951229612297122981229912300123011230212303123041230512306123071230812309123101231112312123131231412315123161231712318123191232012321123221232312324123251232612327123281232912330123311233212333123341233512336123371233812339123401234112342123431234412345123461234712348123491235012351123521235312354123551235612357123581235912360123611236212363123641236512366123671236812369123701237112372123731237412375123761237712378123791238012381123821238312384123851238612387123881238912390123911239212393123941239512396123971239812399124001240112402124031240412405124061240712408124091241012411124121241312414124151241612417124181241912420124211242212423124241242512426124271242812429124301243112432124331243412435124361243712438124391244012441124421244312444124451244612447124481244912450124511245212453124541245512456124571245812459124601246112462124631246412465124661246712468124691247012471124721247312474124751247612477124781247912480124811248212483124841248512486124871248812489124901249112492124931249412495124961249712498124991250012501125021250312504125051250612507125081250912510125111251212513125141251512516125171251812519125201252112522125231252412525125261252712528125291253012531125321253312534125351253612537125381253912540125411254212543125441254512546125471254812549125501255112552125531255412555125561255712558125591256012561125621256312564125651256612567125681256912570125711257212573125741257512576125771257812579125801258112582125831258412585125861258712588125891259012591125921259312594125951259612597125981259912600126011260212603126041260512606126071260812609126101261112612126131261412615126161261712618126191262012621126221262312624126251262612627126281262912630126311263212633126341263512636126371263812639126401264112642126431264412645126461264712648126491265012651126521265312654126551265612657126581265912660126611266212663126641266512666126671266812669126701267112672126731267412675126761267712678126791268012681126821268312684126851268612687126881268912690126911269212693126941269512696126971269812699127001270112702127031270412705127061270712708127091271012711127121271312714127151271612717127181271912720127211272212723127241272512726127271272812729127301273112732127331273412735127361273712738127391274012741127421274312744127451274612747127481274912750127511275212753127541275512756127571275812759127601276112762127631276412765127661276712768127691277012771127721277312774127751277612777127781277912780127811278212783127841278512786127871278812789127901279112792127931279412795127961279712798127991280012801128021280312804128051280612807128081280912810128111281212813128141281512816128171281812819128201282112822128231282412825128261282712828128291283012831128321283312834128351283612837128381283912840128411284212843128441284512846128471284812849128501285112852128531285412855128561285712858128591286012861128621286312864128651286612867128681286912870128711287212873128741287512876128771287812879128801288112882128831288412885128861288712888128891289012891128921289312894128951289612897128981289912900129011290212903129041290512906129071290812909129101291112912129131291412915129161291712918129191292012921129221292312924129251292612927129281292912930129311293212933129341293512936129371293812939129401294112942129431294412945129461294712948129491295012951129521295312954129551295612957129581295912960129611296212963129641296512966129671296812969129701297112972129731297412975129761297712978129791298012981129821298312984129851298612987129881298912990129911299212993129941299512996129971299812999130001300113002130031300413005130061300713008130091301013011130121301313014130151301613017130181301913020130211302213023130241302513026130271302813029130301303113032130331303413035130361303713038130391304013041130421304313044130451304613047130481304913050130511305213053130541305513056130571305813059130601306113062130631306413065130661306713068130691307013071130721307313074130751307613077130781307913080130811308213083130841308513086130871308813089130901309113092130931309413095130961309713098130991310013101131021310313104131051310613107131081310913110131111311213113131141311513116131171311813119131201312113122131231312413125131261312713128131291313013131131321313313134131351313613137131381313913140131411314213143131441314513146131471314813149131501315113152131531315413155131561315713158131591316013161131621316313164131651316613167131681316913170131711317213173131741317513176131771317813179131801318113182131831318413185131861318713188131891319013191131921319313194131951319613197131981319913200132011320213203132041320513206132071320813209132101321113212132131321413215132161321713218132191322013221132221322313224132251322613227132281322913230132311323213233132341323513236132371323813239132401324113242132431324413245132461324713248132491325013251132521325313254132551325613257132581325913260132611326213263132641326513266132671326813269132701327113272132731327413275132761327713278132791328013281132821328313284132851328613287132881328913290132911329213293132941329513296132971329813299133001330113302133031330413305133061330713308133091331013311133121331313314133151331613317133181331913320133211332213323133241332513326133271332813329133301333113332133331333413335133361333713338133391334013341133421334313344133451334613347133481334913350133511335213353133541335513356133571335813359133601336113362133631336413365133661336713368133691337013371133721337313374133751337613377133781337913380133811338213383133841338513386133871338813389133901339113392133931339413395133961339713398133991340013401134021340313404134051340613407134081340913410134111341213413134141341513416134171341813419134201342113422134231342413425134261342713428134291343013431134321343313434134351343613437134381343913440134411344213443134441344513446134471344813449134501345113452134531345413455134561345713458134591346013461134621346313464134651346613467134681346913470134711347213473134741347513476134771347813479134801348113482134831348413485134861348713488134891349013491134921349313494134951349613497134981349913500135011350213503135041350513506135071350813509135101351113512135131351413515135161351713518135191352013521135221352313524135251352613527135281352913530135311353213533135341353513536135371353813539135401354113542135431354413545135461354713548135491355013551135521355313554135551355613557135581355913560135611356213563135641356513566135671356813569135701357113572135731357413575135761357713578135791358013581135821358313584135851358613587135881358913590135911359213593135941359513596135971359813599136001360113602136031360413605136061360713608136091361013611136121361313614136151361613617136181361913620136211362213623136241362513626136271362813629136301363113632136331363413635136361363713638136391364013641136421364313644136451364613647136481364913650136511365213653136541365513656136571365813659136601366113662136631366413665136661366713668136691367013671136721367313674136751367613677136781367913680136811368213683136841368513686136871368813689136901369113692136931369413695136961369713698136991370013701137021370313704137051370613707137081370913710137111371213713137141371513716137171371813719137201372113722137231372413725137261372713728137291373013731137321373313734137351373613737137381373913740137411374213743137441374513746137471374813749137501375113752137531375413755137561375713758137591376013761137621376313764137651376613767137681376913770137711377213773137741377513776137771377813779137801378113782137831378413785137861378713788137891379013791137921379313794137951379613797137981379913800138011380213803138041380513806138071380813809138101381113812138131381413815138161381713818138191382013821138221382313824138251382613827138281382913830138311383213833138341383513836138371383813839138401384113842138431384413845138461384713848138491385013851138521385313854138551385613857138581385913860138611386213863138641386513866138671386813869138701387113872138731387413875138761387713878138791388013881138821388313884138851388613887138881388913890138911389213893138941389513896138971389813899139001390113902139031390413905139061390713908139091391013911139121391313914139151391613917139181391913920139211392213923139241392513926139271392813929139301393113932139331393413935139361393713938139391394013941139421394313944139451394613947139481394913950139511395213953139541395513956139571395813959139601396113962139631396413965139661396713968139691397013971139721397313974139751397613977139781397913980139811398213983139841398513986139871398813989139901399113992139931399413995139961399713998139991400014001140021400314004140051400614007140081400914010140111401214013140141401514016140171401814019140201402114022140231402414025140261402714028140291403014031140321403314034140351403614037140381403914040140411404214043140441404514046140471404814049140501405114052140531405414055140561405714058140591406014061140621406314064140651406614067140681406914070140711407214073140741407514076140771407814079140801408114082140831408414085140861408714088140891409014091140921409314094140951409614097140981409914100141011410214103141041410514106141071410814109141101411114112141131411414115141161411714118141191412014121141221412314124141251412614127141281412914130141311413214133141341413514136141371413814139141401414114142141431414414145141461414714148141491415014151141521415314154141551415614157141581415914160141611416214163141641416514166141671416814169141701417114172141731417414175141761417714178141791418014181141821418314184141851418614187141881418914190141911419214193141941419514196141971419814199142001420114202142031420414205142061420714208142091421014211142121421314214142151421614217142181421914220142211422214223142241422514226142271422814229142301423114232142331423414235142361423714238142391424014241142421424314244142451424614247142481424914250142511425214253142541425514256142571425814259142601426114262142631426414265142661426714268142691427014271142721427314274142751427614277142781427914280142811428214283142841428514286142871428814289142901429114292142931429414295142961429714298142991430014301143021430314304143051430614307143081430914310143111431214313143141431514316143171431814319143201432114322143231432414325143261432714328143291433014331143321433314334143351433614337143381433914340143411434214343143441434514346143471434814349143501435114352143531435414355143561435714358143591436014361143621436314364143651436614367143681436914370143711437214373143741437514376143771437814379143801438114382143831438414385143861438714388143891439014391143921439314394143951439614397143981439914400144011440214403144041440514406144071440814409144101441114412144131441414415144161441714418144191442014421144221442314424144251442614427144281442914430144311443214433144341443514436144371443814439144401444114442144431444414445144461444714448144491445014451144521445314454144551445614457144581445914460144611446214463144641446514466144671446814469144701447114472144731447414475144761447714478144791448014481144821448314484144851448614487144881448914490144911449214493144941449514496144971449814499145001450114502145031450414505145061450714508145091451014511145121451314514145151451614517145181451914520145211452214523145241452514526145271452814529145301453114532145331453414535145361453714538145391454014541145421454314544145451454614547145481454914550145511455214553145541455514556145571455814559145601456114562145631456414565145661456714568145691457014571145721457314574145751457614577145781457914580145811458214583145841458514586145871458814589145901459114592145931459414595145961459714598145991460014601146021460314604146051460614607146081460914610146111461214613146141461514616146171461814619146201462114622146231462414625146261462714628146291463014631146321463314634146351463614637146381463914640146411464214643146441464514646146471464814649146501465114652146531465414655146561465714658146591466014661146621466314664146651466614667146681466914670146711467214673146741467514676146771467814679146801468114682146831468414685146861468714688146891469014691146921469314694146951469614697146981469914700147011470214703147041470514706147071470814709147101471114712147131471414715147161471714718147191472014721147221472314724147251472614727147281472914730147311473214733147341473514736147371473814739147401474114742147431474414745147461474714748147491475014751147521475314754147551475614757147581475914760147611476214763147641476514766147671476814769147701477114772147731477414775147761477714778147791478014781147821478314784147851478614787147881478914790147911479214793147941479514796147971479814799148001480114802148031480414805148061480714808148091481014811148121481314814148151481614817148181481914820148211482214823148241482514826148271482814829148301483114832148331483414835148361483714838148391484014841148421484314844148451484614847148481484914850148511485214853148541485514856148571485814859148601486114862148631486414865148661486714868148691487014871148721487314874148751487614877148781487914880148811488214883148841488514886148871488814889148901489114892148931489414895148961489714898148991490014901149021490314904149051490614907149081490914910149111491214913149141491514916149171491814919149201492114922149231492414925149261492714928149291493014931149321493314934149351493614937149381493914940149411494214943149441494514946149471494814949149501495114952149531495414955149561495714958149591496014961149621496314964149651496614967149681496914970149711497214973149741497514976149771497814979149801498114982149831498414985149861498714988149891499014991149921499314994149951499614997149981499915000150011500215003150041500515006150071500815009150101501115012150131501415015150161501715018150191502015021150221502315024150251502615027150281502915030150311503215033150341503515036150371503815039150401504115042150431504415045150461504715048150491505015051150521505315054150551505615057150581505915060150611506215063150641506515066150671506815069150701507115072150731507415075150761507715078150791508015081150821508315084150851508615087150881508915090150911509215093150941509515096150971509815099151001510115102151031510415105151061510715108151091511015111151121511315114151151511615117151181511915120151211512215123151241512515126151271512815129151301513115132151331513415135151361513715138151391514015141151421514315144151451514615147151481514915150151511515215153151541515515156151571515815159151601516115162151631516415165151661516715168151691517015171151721517315174151751517615177151781517915180151811518215183151841518515186151871518815189151901519115192151931519415195151961519715198151991520015201152021520315204152051520615207152081520915210152111521215213152141521515216152171521815219152201522115222152231522415225152261522715228152291523015231152321523315234152351523615237152381523915240152411524215243152441524515246152471524815249152501525115252152531525415255152561525715258152591526015261152621526315264152651526615267152681526915270152711527215273152741527515276152771527815279152801528115282152831528415285152861528715288152891529015291152921529315294152951529615297152981529915300153011530215303153041530515306153071530815309153101531115312153131531415315153161531715318153191532015321153221532315324153251532615327153281532915330153311533215333153341533515336153371533815339153401534115342153431534415345153461534715348153491535015351153521535315354153551535615357153581535915360153611536215363153641536515366153671536815369153701537115372153731537415375153761537715378153791538015381153821538315384153851538615387153881538915390153911539215393153941539515396153971539815399154001540115402154031540415405154061540715408154091541015411154121541315414154151541615417154181541915420154211542215423154241542515426154271542815429154301543115432154331543415435154361543715438154391544015441154421544315444154451544615447154481544915450154511545215453154541545515456154571545815459154601546115462154631546415465154661546715468154691547015471154721547315474154751547615477154781547915480154811548215483154841548515486154871548815489154901549115492154931549415495154961549715498154991550015501155021550315504155051550615507155081550915510155111551215513155141551515516155171551815519155201552115522155231552415525155261552715528155291553015531155321553315534155351553615537155381553915540155411554215543155441554515546155471554815549155501555115552155531555415555155561555715558155591556015561155621556315564155651556615567155681556915570155711557215573155741557515576155771557815579155801558115582155831558415585155861558715588155891559015591155921559315594155951559615597155981559915600156011560215603156041560515606156071560815609156101561115612156131561415615156161561715618156191562015621156221562315624156251562615627156281562915630156311563215633156341563515636156371563815639156401564115642156431564415645156461564715648156491565015651156521565315654156551565615657156581565915660156611566215663156641566515666156671566815669156701567115672156731567415675156761567715678156791568015681156821568315684156851568615687156881568915690156911569215693156941569515696156971569815699157001570115702157031570415705157061570715708157091571015711157121571315714157151571615717157181571915720157211572215723157241572515726157271572815729157301573115732157331573415735157361573715738157391574015741157421574315744157451574615747157481574915750157511575215753157541575515756157571575815759157601576115762157631576415765157661576715768157691577015771157721577315774157751577615777157781577915780157811578215783157841578515786157871578815789157901579115792157931579415795157961579715798157991580015801158021580315804158051580615807158081580915810158111581215813158141581515816158171581815819158201582115822158231582415825158261582715828158291583015831158321583315834158351583615837158381583915840158411584215843158441584515846158471584815849158501585115852158531585415855158561585715858158591586015861158621586315864158651586615867158681586915870158711587215873158741587515876158771587815879158801588115882158831588415885158861588715888158891589015891158921589315894158951589615897158981589915900159011590215903159041590515906159071590815909159101591115912159131591415915159161591715918159191592015921159221592315924159251592615927159281592915930159311593215933159341593515936159371593815939159401594115942159431594415945159461594715948159491595015951159521595315954159551595615957159581595915960159611596215963159641596515966159671596815969159701597115972159731597415975159761597715978159791598015981159821598315984159851598615987159881598915990159911599215993159941599515996159971599815999160001600116002160031600416005160061600716008160091601016011160121601316014160151601616017160181601916020160211602216023160241602516026160271602816029160301603116032160331603416035160361603716038160391604016041160421604316044160451604616047160481604916050160511605216053160541605516056160571605816059160601606116062160631606416065160661606716068160691607016071160721607316074160751607616077160781607916080160811608216083160841608516086160871608816089160901609116092160931609416095160961609716098160991610016101161021610316104161051610616107161081610916110161111611216113161141611516116161171611816119161201612116122161231612416125161261612716128161291613016131161321613316134161351613616137161381613916140161411614216143161441614516146161471614816149161501615116152161531615416155161561615716158161591616016161161621616316164161651616616167161681616916170161711617216173161741617516176161771617816179161801618116182161831618416185161861618716188161891619016191161921619316194161951619616197161981619916200162011620216203162041620516206162071620816209162101621116212162131621416215162161621716218162191622016221162221622316224162251622616227162281622916230162311623216233162341623516236162371623816239162401624116242162431624416245162461624716248162491625016251162521625316254162551625616257162581625916260162611626216263162641626516266162671626816269162701627116272162731627416275162761627716278162791628016281162821628316284162851628616287162881628916290162911629216293162941629516296162971629816299163001630116302163031630416305163061630716308163091631016311163121631316314163151631616317163181631916320163211632216323163241632516326163271632816329163301633116332163331633416335163361633716338163391634016341163421634316344163451634616347163481634916350163511635216353163541635516356163571635816359163601636116362163631636416365163661636716368163691637016371163721637316374163751637616377163781637916380163811638216383163841638516386163871638816389163901639116392163931639416395163961639716398163991640016401164021640316404164051640616407164081640916410164111641216413164141641516416164171641816419164201642116422164231642416425164261642716428164291643016431164321643316434164351643616437164381643916440164411644216443164441644516446164471644816449164501645116452164531645416455164561645716458164591646016461164621646316464164651646616467164681646916470164711647216473164741647516476164771647816479164801648116482164831648416485164861648716488164891649016491164921649316494164951649616497164981649916500165011650216503165041650516506165071650816509165101651116512165131651416515165161651716518165191652016521165221652316524165251652616527165281652916530165311653216533165341653516536165371653816539165401654116542165431654416545165461654716548165491655016551165521655316554165551655616557165581655916560165611656216563165641656516566165671656816569165701657116572165731657416575165761657716578165791658016581165821658316584165851658616587165881658916590165911659216593165941659516596165971659816599166001660116602166031660416605166061660716608166091661016611166121661316614166151661616617166181661916620166211662216623166241662516626166271662816629166301663116632166331663416635166361663716638166391664016641166421664316644166451664616647166481664916650166511665216653166541665516656166571665816659166601666116662166631666416665166661666716668166691667016671166721667316674166751667616677166781667916680166811668216683166841668516686166871668816689166901669116692166931669416695166961669716698166991670016701167021670316704167051670616707167081670916710167111671216713167141671516716167171671816719167201672116722167231672416725167261672716728167291673016731167321673316734167351673616737167381673916740167411674216743167441674516746167471674816749167501675116752167531675416755167561675716758167591676016761167621676316764167651676616767167681676916770167711677216773167741677516776167771677816779167801678116782167831678416785167861678716788167891679016791167921679316794167951679616797167981679916800168011680216803168041680516806168071680816809168101681116812168131681416815168161681716818168191682016821168221682316824168251682616827168281682916830168311683216833168341683516836168371683816839168401684116842168431684416845168461684716848168491685016851168521685316854168551685616857168581685916860168611686216863168641686516866168671686816869168701687116872168731687416875168761687716878168791688016881168821688316884168851688616887168881688916890168911689216893168941689516896168971689816899169001690116902169031690416905169061690716908169091691016911169121691316914169151691616917169181691916920169211692216923169241692516926169271692816929169301693116932169331693416935169361693716938169391694016941169421694316944169451694616947169481694916950169511695216953169541695516956169571695816959169601696116962169631696416965169661696716968169691697016971169721697316974169751697616977169781697916980169811698216983169841698516986169871698816989169901699116992169931699416995169961699716998169991700017001170021700317004170051700617007170081700917010170111701217013170141701517016170171701817019170201702117022170231702417025170261702717028170291703017031170321703317034170351703617037170381703917040170411704217043170441704517046170471704817049170501705117052170531705417055170561705717058170591706017061170621706317064170651706617067170681706917070170711707217073170741707517076170771707817079170801708117082170831708417085170861708717088170891709017091170921709317094170951709617097170981709917100171011710217103171041710517106171071710817109171101711117112171131711417115171161711717118171191712017121171221712317124171251712617127171281712917130171311713217133171341713517136171371713817139171401714117142171431714417145171461714717148171491715017151171521715317154171551715617157171581715917160171611716217163171641716517166171671716817169171701717117172171731717417175171761717717178171791718017181171821718317184171851718617187171881718917190171911719217193171941719517196171971719817199172001720117202172031720417205172061720717208172091721017211172121721317214172151721617217172181721917220172211722217223172241722517226172271722817229172301723117232172331723417235172361723717238172391724017241172421724317244172451724617247172481724917250172511725217253172541725517256172571725817259172601726117262172631726417265172661726717268172691727017271172721727317274172751727617277172781727917280172811728217283172841728517286172871728817289172901729117292172931729417295172961729717298172991730017301173021730317304173051730617307173081730917310173111731217313173141731517316173171731817319173201732117322173231732417325173261732717328173291733017331173321733317334173351733617337173381733917340173411734217343173441734517346173471734817349173501735117352173531735417355173561735717358173591736017361173621736317364173651736617367173681736917370173711737217373173741737517376173771737817379173801738117382173831738417385173861738717388173891739017391173921739317394173951739617397173981739917400174011740217403174041740517406174071740817409174101741117412174131741417415174161741717418174191742017421174221742317424174251742617427174281742917430174311743217433174341743517436174371743817439174401744117442174431744417445174461744717448174491745017451174521745317454174551745617457174581745917460174611746217463174641746517466174671746817469174701747117472174731747417475174761747717478174791748017481174821748317484174851748617487174881748917490174911749217493174941749517496174971749817499175001750117502175031750417505175061750717508175091751017511175121751317514175151751617517175181751917520175211752217523175241752517526175271752817529175301753117532175331753417535175361753717538175391754017541175421754317544175451754617547175481754917550175511755217553175541755517556175571755817559175601756117562175631756417565175661756717568175691757017571175721757317574175751757617577175781757917580175811758217583175841758517586175871758817589175901759117592175931759417595175961759717598175991760017601176021760317604176051760617607176081760917610176111761217613176141761517616176171761817619176201762117622176231762417625176261762717628176291763017631176321763317634176351763617637176381763917640176411764217643176441764517646176471764817649176501765117652176531765417655176561765717658176591766017661176621766317664176651766617667176681766917670176711767217673176741767517676176771767817679176801768117682176831768417685176861768717688176891769017691176921769317694176951769617697176981769917700177011770217703177041770517706177071770817709177101771117712177131771417715177161771717718177191772017721177221772317724177251772617727177281772917730177311773217733177341773517736177371773817739177401774117742177431774417745177461774717748177491775017751177521775317754177551775617757177581775917760177611776217763177641776517766177671776817769177701777117772177731777417775177761777717778177791778017781177821778317784177851778617787177881778917790177911779217793177941779517796177971779817799178001780117802178031780417805178061780717808178091781017811178121781317814178151781617817178181781917820178211782217823178241782517826178271782817829178301783117832178331783417835178361783717838178391784017841178421784317844178451784617847178481784917850178511785217853178541785517856178571785817859178601786117862178631786417865178661786717868178691787017871178721787317874178751787617877178781787917880178811788217883178841788517886178871788817889178901789117892178931789417895178961789717898178991790017901179021790317904179051790617907179081790917910179111791217913179141791517916179171791817919179201792117922179231792417925179261792717928179291793017931179321793317934179351793617937179381793917940179411794217943179441794517946179471794817949179501795117952179531795417955179561795717958179591796017961179621796317964179651796617967179681796917970179711797217973179741797517976179771797817979179801798117982179831798417985179861798717988179891799017991179921799317994179951799617997179981799918000180011800218003180041800518006180071800818009180101801118012180131801418015180161801718018180191802018021180221802318024180251802618027180281802918030180311803218033180341803518036180371803818039180401804118042180431804418045180461804718048180491805018051180521805318054180551805618057180581805918060180611806218063180641806518066180671806818069180701807118072180731807418075180761807718078180791808018081180821808318084180851808618087180881808918090180911809218093180941809518096180971809818099181001810118102181031810418105181061810718108181091811018111181121811318114181151811618117181181811918120181211812218123181241812518126181271812818129181301813118132181331813418135181361813718138181391814018141181421814318144181451814618147181481814918150181511815218153181541815518156181571815818159181601816118162181631816418165181661816718168181691817018171181721817318174181751817618177181781817918180181811818218183181841818518186181871818818189181901819118192181931819418195181961819718198181991820018201182021820318204182051820618207182081820918210182111821218213182141821518216182171821818219182201822118222182231822418225182261822718228182291823018231182321823318234182351823618237182381823918240182411824218243182441824518246182471824818249182501825118252182531825418255182561825718258182591826018261182621826318264182651826618267182681826918270182711827218273182741827518276182771827818279182801828118282182831828418285182861828718288182891829018291182921829318294182951829618297182981829918300183011830218303183041830518306183071830818309183101831118312183131831418315183161831718318183191832018321183221832318324183251832618327183281832918330183311833218333183341833518336183371833818339183401834118342183431834418345183461834718348183491835018351183521835318354183551835618357183581835918360183611836218363183641836518366183671836818369183701837118372183731837418375183761837718378183791838018381183821838318384183851838618387183881838918390183911839218393183941839518396183971839818399184001840118402184031840418405184061840718408184091841018411184121841318414184151841618417184181841918420184211842218423184241842518426184271842818429184301843118432184331843418435184361843718438184391844018441184421844318444184451844618447184481844918450184511845218453184541845518456184571845818459184601846118462184631846418465184661846718468184691847018471184721847318474184751847618477184781847918480184811848218483184841848518486184871848818489184901849118492184931849418495184961849718498184991850018501185021850318504185051850618507185081850918510185111851218513185141851518516185171851818519185201852118522185231852418525185261852718528185291853018531185321853318534185351853618537185381853918540185411854218543185441854518546185471854818549185501855118552185531855418555185561855718558185591856018561185621856318564185651856618567185681856918570185711857218573185741857518576185771857818579185801858118582185831858418585185861858718588185891859018591185921859318594185951859618597185981859918600186011860218603186041860518606186071860818609186101861118612186131861418615186161861718618186191862018621186221862318624186251862618627186281862918630186311863218633186341863518636186371863818639186401864118642186431864418645186461864718648186491865018651186521865318654186551865618657186581865918660186611866218663186641866518666186671866818669186701867118672186731867418675186761867718678186791868018681186821868318684186851868618687186881868918690186911869218693186941869518696186971869818699187001870118702187031870418705187061870718708187091871018711187121871318714187151871618717187181871918720187211872218723187241872518726187271872818729187301873118732187331873418735187361873718738187391874018741187421874318744187451874618747187481874918750187511875218753187541875518756187571875818759187601876118762187631876418765187661876718768187691877018771187721877318774187751877618777187781877918780187811878218783187841878518786187871878818789187901879118792187931879418795187961879718798187991880018801188021880318804188051880618807188081880918810188111881218813188141881518816188171881818819188201882118822188231882418825188261882718828188291883018831188321883318834188351883618837188381883918840188411884218843188441884518846188471884818849188501885118852188531885418855188561885718858188591886018861188621886318864188651886618867188681886918870188711887218873188741887518876188771887818879188801888118882188831888418885188861888718888188891889018891188921889318894188951889618897188981889918900189011890218903189041890518906189071890818909189101891118912189131891418915189161891718918189191892018921189221892318924189251892618927189281892918930189311893218933189341893518936189371893818939189401894118942189431894418945189461894718948189491895018951189521895318954189551895618957189581895918960189611896218963189641896518966189671896818969189701897118972189731897418975189761897718978189791898018981189821898318984189851898618987189881898918990189911899218993189941899518996189971899818999190001900119002190031900419005190061900719008190091901019011190121901319014190151901619017190181901919020190211902219023190241902519026190271902819029190301903119032190331903419035190361903719038190391904019041190421904319044190451904619047190481904919050190511905219053190541905519056190571905819059190601906119062190631906419065190661906719068190691907019071190721907319074190751907619077190781907919080190811908219083190841908519086190871908819089190901909119092190931909419095190961909719098190991910019101191021910319104191051910619107191081910919110191111911219113191141911519116191171911819119191201912119122191231912419125191261912719128191291913019131191321913319134191351913619137191381913919140191411914219143191441914519146191471914819149191501915119152191531915419155191561915719158191591916019161191621916319164191651916619167191681916919170191711917219173191741917519176191771917819179191801918119182191831918419185191861918719188191891919019191191921919319194191951919619197191981919919200192011920219203192041920519206192071920819209192101921119212192131921419215192161921719218192191922019221192221922319224192251922619227192281922919230192311923219233192341923519236192371923819239192401924119242192431924419245192461924719248192491925019251192521925319254192551925619257192581925919260192611926219263192641926519266192671926819269192701927119272192731927419275192761927719278192791928019281192821928319284192851928619287192881928919290192911929219293192941929519296192971929819299193001930119302193031930419305193061930719308193091931019311193121931319314193151931619317193181931919320193211932219323193241932519326193271932819329193301933119332193331933419335193361933719338193391934019341193421934319344193451934619347193481934919350193511935219353193541935519356193571935819359193601936119362193631936419365193661936719368193691937019371193721937319374193751937619377193781937919380193811938219383193841938519386193871938819389193901939119392193931939419395193961939719398193991940019401194021940319404194051940619407194081940919410194111941219413194141941519416194171941819419194201942119422194231942419425194261942719428194291943019431194321943319434194351943619437194381943919440194411944219443194441944519446194471944819449194501945119452194531945419455194561945719458194591946019461194621946319464194651946619467194681946919470194711947219473194741947519476194771947819479194801948119482194831948419485194861948719488194891949019491194921949319494194951949619497194981949919500195011950219503195041950519506195071950819509195101951119512195131951419515195161951719518195191952019521195221952319524195251952619527195281952919530195311953219533195341953519536195371953819539195401954119542195431954419545195461954719548195491955019551195521955319554195551955619557195581955919560195611956219563195641956519566195671956819569195701957119572195731957419575195761957719578195791958019581195821958319584195851958619587195881958919590195911959219593195941959519596195971959819599196001960119602196031960419605196061960719608196091961019611196121961319614196151961619617196181961919620196211962219623196241962519626196271962819629196301963119632196331963419635196361963719638196391964019641196421964319644196451964619647196481964919650196511965219653196541965519656196571965819659196601966119662196631966419665196661966719668196691967019671196721967319674196751967619677196781967919680196811968219683196841968519686196871968819689196901969119692196931969419695196961969719698196991970019701197021970319704197051970619707197081970919710197111971219713197141971519716197171971819719197201972119722197231972419725197261972719728197291973019731197321973319734197351973619737197381973919740197411974219743197441974519746197471974819749197501975119752197531975419755197561975719758197591976019761197621976319764197651976619767197681976919770197711977219773197741977519776197771977819779197801978119782197831978419785197861978719788197891979019791197921979319794197951979619797197981979919800198011980219803198041980519806198071980819809198101981119812198131981419815198161981719818198191982019821198221982319824198251982619827198281982919830198311983219833198341983519836198371983819839198401984119842198431984419845198461984719848198491985019851198521985319854198551985619857198581985919860198611986219863198641986519866198671986819869198701987119872198731987419875198761987719878198791988019881198821988319884198851988619887198881988919890198911989219893198941989519896198971989819899199001990119902199031990419905199061990719908199091991019911199121991319914199151991619917199181991919920199211992219923199241992519926199271992819929199301993119932199331993419935199361993719938199391994019941199421994319944199451994619947199481994919950199511995219953199541995519956199571995819959199601996119962199631996419965199661996719968199691997019971199721997319974199751997619977199781997919980199811998219983199841998519986199871998819989199901999119992199931999419995199961999719998199992000020001200022000320004200052000620007200082000920010200112001220013200142001520016200172001820019200202002120022200232002420025200262002720028200292003020031200322003320034200352003620037200382003920040200412004220043200442004520046200472004820049200502005120052200532005420055200562005720058200592006020061200622006320064200652006620067200682006920070200712007220073200742007520076200772007820079200802008120082200832008420085200862008720088200892009020091200922009320094200952009620097200982009920100201012010220103201042010520106201072010820109201102011120112201132011420115201162011720118201192012020121201222012320124201252012620127201282012920130201312013220133201342013520136201372013820139201402014120142201432014420145201462014720148201492015020151201522015320154201552015620157201582015920160201612016220163201642016520166201672016820169201702017120172201732017420175201762017720178201792018020181201822018320184201852018620187201882018920190201912019220193201942019520196201972019820199202002020120202202032020420205202062020720208202092021020211202122021320214202152021620217202182021920220202212022220223202242022520226202272022820229202302023120232202332023420235202362023720238202392024020241202422024320244202452024620247202482024920250202512025220253202542025520256202572025820259202602026120262202632026420265202662026720268202692027020271202722027320274202752027620277202782027920280202812028220283202842028520286202872028820289202902029120292202932029420295202962029720298202992030020301203022030320304203052030620307203082030920310203112031220313203142031520316203172031820319203202032120322203232032420325203262032720328203292033020331203322033320334203352033620337203382033920340203412034220343203442034520346203472034820349203502035120352203532035420355203562035720358203592036020361203622036320364203652036620367203682036920370203712037220373203742037520376203772037820379203802038120382203832038420385203862038720388203892039020391203922039320394203952039620397203982039920400204012040220403204042040520406204072040820409204102041120412204132041420415204162041720418204192042020421204222042320424204252042620427204282042920430204312043220433204342043520436204372043820439204402044120442204432044420445204462044720448204492045020451204522045320454204552045620457204582045920460204612046220463204642046520466204672046820469204702047120472204732047420475204762047720478204792048020481204822048320484204852048620487204882048920490204912049220493204942049520496204972049820499205002050120502205032050420505205062050720508205092051020511205122051320514205152051620517205182051920520205212052220523205242052520526205272052820529205302053120532205332053420535205362053720538205392054020541205422054320544205452054620547205482054920550205512055220553205542055520556205572055820559205602056120562205632056420565205662056720568205692057020571205722057320574205752057620577205782057920580205812058220583205842058520586205872058820589205902059120592205932059420595205962059720598205992060020601206022060320604206052060620607206082060920610206112061220613206142061520616206172061820619206202062120622206232062420625206262062720628206292063020631206322063320634206352063620637206382063920640206412064220643206442064520646206472064820649206502065120652206532065420655206562065720658206592066020661206622066320664206652066620667206682066920670206712067220673206742067520676206772067820679206802068120682206832068420685206862068720688206892069020691206922069320694206952069620697206982069920700207012070220703207042070520706207072070820709207102071120712207132071420715207162071720718207192072020721207222072320724207252072620727207282072920730207312073220733207342073520736207372073820739207402074120742207432074420745207462074720748207492075020751207522075320754207552075620757207582075920760207612076220763207642076520766207672076820769207702077120772207732077420775207762077720778207792078020781207822078320784207852078620787207882078920790207912079220793207942079520796207972079820799208002080120802208032080420805208062080720808208092081020811208122081320814208152081620817208182081920820208212082220823208242082520826208272082820829208302083120832208332083420835208362083720838208392084020841208422084320844208452084620847208482084920850208512085220853208542085520856208572085820859208602086120862208632086420865208662086720868208692087020871208722087320874208752087620877208782087920880208812088220883208842088520886208872088820889208902089120892208932089420895208962089720898208992090020901209022090320904209052090620907209082090920910209112091220913209142091520916209172091820919209202092120922209232092420925209262092720928209292093020931209322093320934209352093620937209382093920940209412094220943209442094520946209472094820949209502095120952209532095420955209562095720958209592096020961209622096320964209652096620967209682096920970209712097220973209742097520976209772097820979209802098120982209832098420985209862098720988209892099020991209922099320994209952099620997209982099921000210012100221003210042100521006210072100821009210102101121012210132101421015210162101721018210192102021021210222102321024210252102621027210282102921030210312103221033210342103521036210372103821039210402104121042210432104421045210462104721048210492105021051210522105321054210552105621057210582105921060210612106221063210642106521066210672106821069210702107121072210732107421075210762107721078210792108021081210822108321084210852108621087210882108921090210912109221093210942109521096210972109821099211002110121102211032110421105211062110721108211092111021111211122111321114211152111621117211182111921120211212112221123211242112521126211272112821129211302113121132211332113421135211362113721138211392114021141211422114321144211452114621147211482114921150211512115221153211542115521156211572115821159211602116121162211632116421165211662116721168211692117021171211722117321174211752117621177211782117921180211812118221183211842118521186211872118821189211902119121192211932119421195211962119721198211992120021201212022120321204212052120621207212082120921210212112121221213212142121521216212172121821219212202122121222212232122421225212262122721228212292123021231212322123321234212352123621237212382123921240212412124221243212442124521246212472124821249212502125121252212532125421255212562125721258212592126021261212622126321264212652126621267212682126921270212712127221273212742127521276212772127821279212802128121282212832128421285212862128721288212892129021291212922129321294212952129621297212982129921300213012130221303213042130521306213072130821309213102131121312213132131421315213162131721318213192132021321213222132321324213252132621327213282132921330213312133221333213342133521336213372133821339213402134121342213432134421345213462134721348213492135021351213522135321354213552135621357213582135921360213612136221363213642136521366213672136821369213702137121372213732137421375213762137721378213792138021381213822138321384213852138621387213882138921390213912139221393213942139521396213972139821399214002140121402214032140421405214062140721408214092141021411214122141321414214152141621417214182141921420214212142221423214242142521426214272142821429214302143121432214332143421435214362143721438214392144021441214422144321444214452144621447214482144921450214512145221453214542145521456214572145821459214602146121462214632146421465214662146721468214692147021471214722147321474214752147621477214782147921480214812148221483214842148521486214872148821489214902149121492214932149421495214962149721498214992150021501215022150321504215052150621507215082150921510215112151221513215142151521516215172151821519215202152121522215232152421525215262152721528215292153021531215322153321534215352153621537215382153921540215412154221543215442154521546215472154821549215502155121552215532155421555215562155721558215592156021561215622156321564215652156621567215682156921570215712157221573215742157521576215772157821579215802158121582215832158421585215862158721588215892159021591215922159321594215952159621597215982159921600216012160221603216042160521606216072160821609216102161121612216132161421615216162161721618216192162021621216222162321624216252162621627216282162921630216312163221633216342163521636216372163821639216402164121642216432164421645216462164721648216492165021651216522165321654216552165621657216582165921660216612166221663216642166521666216672166821669216702167121672216732167421675216762167721678216792168021681216822168321684216852168621687216882168921690216912169221693216942169521696216972169821699217002170121702217032170421705217062170721708217092171021711217122171321714217152171621717217182171921720217212172221723217242172521726217272172821729217302173121732217332173421735217362173721738217392174021741217422174321744217452174621747217482174921750217512175221753217542175521756217572175821759217602176121762217632176421765217662176721768217692177021771217722177321774217752177621777217782177921780217812178221783217842178521786217872178821789217902179121792217932179421795217962179721798217992180021801218022180321804218052180621807218082180921810218112181221813218142181521816218172181821819218202182121822218232182421825218262182721828218292183021831218322183321834218352183621837218382183921840218412184221843218442184521846218472184821849218502185121852218532185421855218562185721858218592186021861218622186321864218652186621867218682186921870218712187221873218742187521876218772187821879218802188121882218832188421885218862188721888218892189021891218922189321894218952189621897218982189921900219012190221903219042190521906219072190821909219102191121912219132191421915219162191721918219192192021921219222192321924219252192621927219282192921930219312193221933219342193521936219372193821939219402194121942219432194421945219462194721948219492195021951219522195321954219552195621957219582195921960219612196221963219642196521966219672196821969219702197121972219732197421975219762197721978219792198021981219822198321984219852198621987219882198921990219912199221993219942199521996219972199821999220002200122002220032200422005220062200722008220092201022011220122201322014220152201622017220182201922020220212202222023220242202522026220272202822029220302203122032220332203422035220362203722038220392204022041220422204322044220452204622047220482204922050220512205222053220542205522056220572205822059220602206122062220632206422065220662206722068220692207022071220722207322074220752207622077220782207922080220812208222083220842208522086220872208822089220902209122092220932209422095220962209722098220992210022101221022210322104221052210622107221082210922110221112211222113221142211522116221172211822119221202212122122221232212422125221262212722128221292213022131221322213322134221352213622137221382213922140221412214222143221442214522146221472214822149221502215122152221532215422155221562215722158221592216022161221622216322164221652216622167221682216922170221712217222173221742217522176221772217822179221802218122182221832218422185221862218722188221892219022191221922219322194221952219622197221982219922200222012220222203222042220522206222072220822209222102221122212222132221422215222162221722218222192222022221222222222322224222252222622227222282222922230222312223222233222342223522236222372223822239222402224122242222432224422245222462224722248222492225022251222522225322254222552225622257222582225922260222612226222263222642226522266222672226822269222702227122272222732227422275222762227722278222792228022281222822228322284222852228622287222882228922290222912229222293222942229522296222972229822299223002230122302223032230422305223062230722308223092231022311223122231322314223152231622317223182231922320223212232222323223242232522326223272232822329223302233122332223332233422335223362233722338223392234022341223422234322344223452234622347223482234922350223512235222353223542235522356223572235822359223602236122362223632236422365223662236722368223692237022371223722237322374223752237622377223782237922380223812238222383223842238522386223872238822389223902239122392223932239422395223962239722398223992240022401224022240322404224052240622407224082240922410224112241222413224142241522416224172241822419224202242122422224232242422425224262242722428224292243022431224322243322434224352243622437224382243922440224412244222443224442244522446224472244822449224502245122452224532245422455224562245722458224592246022461224622246322464224652246622467224682246922470224712247222473224742247522476224772247822479224802248122482224832248422485224862248722488224892249022491224922249322494224952249622497224982249922500225012250222503225042250522506225072250822509225102251122512225132251422515225162251722518225192252022521225222252322524225252252622527225282252922530225312253222533225342253522536225372253822539225402254122542225432254422545225462254722548225492255022551225522255322554225552255622557225582255922560225612256222563225642256522566225672256822569225702257122572225732257422575225762257722578225792258022581225822258322584225852258622587225882258922590225912259222593225942259522596225972259822599226002260122602226032260422605226062260722608226092261022611226122261322614226152261622617226182261922620226212262222623226242262522626226272262822629226302263122632226332263422635226362263722638226392264022641226422264322644226452264622647226482264922650226512265222653226542265522656226572265822659226602266122662226632266422665226662266722668226692267022671226722267322674226752267622677226782267922680226812268222683226842268522686226872268822689226902269122692226932269422695226962269722698226992270022701227022270322704227052270622707227082270922710227112271222713227142271522716227172271822719227202272122722227232272422725227262272722728227292273022731227322273322734227352273622737227382273922740227412274222743227442274522746227472274822749227502275122752227532275422755227562275722758227592276022761227622276322764227652276622767227682276922770227712277222773227742277522776227772277822779227802278122782227832278422785227862278722788227892279022791227922279322794227952279622797227982279922800228012280222803228042280522806228072280822809228102281122812228132281422815228162281722818228192282022821228222282322824228252282622827228282282922830228312283222833228342283522836228372283822839228402284122842228432284422845228462284722848228492285022851228522285322854228552285622857228582285922860228612286222863228642286522866228672286822869228702287122872228732287422875228762287722878228792288022881228822288322884228852288622887228882288922890228912289222893228942289522896228972289822899229002290122902229032290422905229062290722908229092291022911229122291322914229152291622917229182291922920229212292222923229242292522926229272292822929229302293122932229332293422935229362293722938229392294022941229422294322944229452294622947229482294922950229512295222953229542295522956229572295822959229602296122962229632296422965229662296722968229692297022971229722297322974229752297622977229782297922980229812298222983229842298522986229872298822989229902299122992229932299422995229962299722998229992300023001230022300323004230052300623007230082300923010230112301223013230142301523016230172301823019230202302123022230232302423025230262302723028230292303023031230322303323034230352303623037230382303923040230412304223043230442304523046230472304823049230502305123052230532305423055230562305723058230592306023061230622306323064230652306623067230682306923070230712307223073230742307523076230772307823079230802308123082230832308423085230862308723088230892309023091230922309323094230952309623097230982309923100231012310223103231042310523106231072310823109231102311123112231132311423115231162311723118231192312023121231222312323124231252312623127231282312923130231312313223133231342313523136231372313823139231402314123142231432314423145231462314723148231492315023151231522315323154231552315623157231582315923160231612316223163231642316523166231672316823169231702317123172231732317423175231762317723178231792318023181231822318323184231852318623187231882318923190231912319223193231942319523196231972319823199232002320123202232032320423205232062320723208232092321023211232122321323214232152321623217232182321923220232212322223223232242322523226232272322823229232302323123232232332323423235232362323723238232392324023241232422324323244232452324623247232482324923250232512325223253232542325523256232572325823259232602326123262232632326423265232662326723268232692327023271232722327323274232752327623277232782327923280232812328223283232842328523286232872328823289232902329123292232932329423295232962329723298232992330023301233022330323304233052330623307233082330923310233112331223313233142331523316233172331823319233202332123322233232332423325233262332723328233292333023331233322333323334233352333623337233382333923340233412334223343233442334523346233472334823349233502335123352233532335423355233562335723358233592336023361233622336323364233652336623367233682336923370233712337223373233742337523376233772337823379233802338123382233832338423385233862338723388233892339023391233922339323394233952339623397233982339923400234012340223403234042340523406234072340823409234102341123412234132341423415234162341723418234192342023421234222342323424234252342623427234282342923430234312343223433234342343523436234372343823439234402344123442234432344423445234462344723448234492345023451234522345323454234552345623457234582345923460234612346223463234642346523466234672346823469234702347123472234732347423475234762347723478234792348023481234822348323484234852348623487234882348923490234912349223493234942349523496234972349823499235002350123502235032350423505235062350723508235092351023511235122351323514235152351623517235182351923520235212352223523235242352523526235272352823529235302353123532235332353423535235362353723538235392354023541235422354323544235452354623547235482354923550235512355223553235542355523556235572355823559235602356123562235632356423565235662356723568235692357023571235722357323574235752357623577235782357923580235812358223583235842358523586235872358823589235902359123592235932359423595235962359723598235992360023601236022360323604236052360623607236082360923610236112361223613236142361523616236172361823619236202362123622236232362423625236262362723628236292363023631236322363323634236352363623637236382363923640236412364223643236442364523646236472364823649236502365123652236532365423655236562365723658236592366023661236622366323664236652366623667236682366923670236712367223673236742367523676236772367823679236802368123682236832368423685236862368723688236892369023691236922369323694236952369623697236982369923700237012370223703237042370523706237072370823709237102371123712237132371423715237162371723718237192372023721237222372323724237252372623727237282372923730237312373223733237342373523736237372373823739237402374123742237432374423745237462374723748237492375023751237522375323754237552375623757237582375923760237612376223763237642376523766237672376823769237702377123772237732377423775237762377723778237792378023781237822378323784237852378623787237882378923790237912379223793237942379523796237972379823799238002380123802238032380423805238062380723808238092381023811238122381323814238152381623817238182381923820238212382223823238242382523826238272382823829238302383123832238332383423835238362383723838238392384023841238422384323844238452384623847238482384923850238512385223853238542385523856238572385823859238602386123862238632386423865238662386723868238692387023871238722387323874238752387623877238782387923880238812388223883238842388523886238872388823889238902389123892238932389423895238962389723898238992390023901239022390323904239052390623907239082390923910239112391223913239142391523916239172391823919239202392123922239232392423925239262392723928239292393023931239322393323934239352393623937239382393923940239412394223943239442394523946239472394823949239502395123952239532395423955239562395723958239592396023961239622396323964239652396623967239682396923970239712397223973239742397523976239772397823979239802398123982239832398423985239862398723988239892399023991239922399323994239952399623997239982399924000240012400224003240042400524006240072400824009240102401124012240132401424015240162401724018240192402024021240222402324024240252402624027240282402924030240312403224033240342403524036240372403824039240402404124042240432404424045240462404724048240492405024051240522405324054240552405624057240582405924060240612406224063240642406524066240672406824069240702407124072240732407424075240762407724078240792408024081240822408324084240852408624087240882408924090240912409224093240942409524096240972409824099241002410124102241032410424105241062410724108241092411024111241122411324114241152411624117241182411924120241212412224123241242412524126241272412824129241302413124132241332413424135241362413724138241392414024141241422414324144241452414624147241482414924150241512415224153241542415524156241572415824159241602416124162241632416424165241662416724168241692417024171241722417324174241752417624177241782417924180241812418224183241842418524186241872418824189241902419124192241932419424195241962419724198241992420024201242022420324204242052420624207242082420924210242112421224213242142421524216242172421824219242202422124222242232422424225242262422724228242292423024231242322423324234242352423624237242382423924240242412424224243242442424524246242472424824249242502425124252242532425424255242562425724258242592426024261242622426324264242652426624267242682426924270242712427224273242742427524276242772427824279242802428124282242832428424285242862428724288242892429024291242922429324294242952429624297242982429924300243012430224303243042430524306243072430824309243102431124312243132431424315243162431724318243192432024321243222432324324243252432624327243282432924330243312433224333243342433524336243372433824339243402434124342243432434424345243462434724348243492435024351243522435324354243552435624357243582435924360243612436224363243642436524366243672436824369243702437124372243732437424375243762437724378243792438024381243822438324384243852438624387243882438924390243912439224393243942439524396243972439824399244002440124402244032440424405244062440724408244092441024411244122441324414244152441624417244182441924420244212442224423244242442524426244272442824429244302443124432244332443424435244362443724438244392444024441244422444324444244452444624447244482444924450244512445224453244542445524456244572445824459244602446124462244632446424465244662446724468244692447024471244722447324474244752447624477244782447924480244812448224483244842448524486244872448824489244902449124492244932449424495244962449724498244992450024501245022450324504245052450624507245082450924510245112451224513245142451524516245172451824519245202452124522245232452424525245262452724528245292453024531245322453324534245352453624537245382453924540245412454224543245442454524546245472454824549245502455124552245532455424555245562455724558245592456024561245622456324564245652456624567245682456924570245712457224573245742457524576245772457824579245802458124582245832458424585245862458724588245892459024591245922459324594245952459624597245982459924600246012460224603246042460524606246072460824609246102461124612246132461424615246162461724618246192462024621246222462324624246252462624627246282462924630246312463224633246342463524636246372463824639246402464124642246432464424645246462464724648246492465024651246522465324654246552465624657246582465924660246612466224663246642466524666246672466824669246702467124672246732467424675246762467724678246792468024681246822468324684246852468624687246882468924690246912469224693246942469524696246972469824699247002470124702247032470424705247062470724708247092471024711247122471324714247152471624717247182471924720247212472224723247242472524726247272472824729247302473124732247332473424735247362473724738247392474024741247422474324744247452474624747247482474924750247512475224753247542475524756247572475824759247602476124762247632476424765247662476724768247692477024771247722477324774247752477624777247782477924780247812478224783247842478524786247872478824789247902479124792247932479424795247962479724798247992480024801248022480324804248052480624807248082480924810248112481224813248142481524816248172481824819248202482124822248232482424825248262482724828248292483024831248322483324834248352483624837248382483924840248412484224843248442484524846248472484824849248502485124852248532485424855248562485724858248592486024861248622486324864248652486624867248682486924870248712487224873248742487524876248772487824879248802488124882248832488424885248862488724888248892489024891248922489324894248952489624897248982489924900249012490224903249042490524906249072490824909249102491124912249132491424915249162491724918249192492024921249222492324924249252492624927249282492924930249312493224933249342493524936249372493824939249402494124942249432494424945249462494724948249492495024951249522495324954249552495624957249582495924960249612496224963249642496524966249672496824969249702497124972249732497424975249762497724978249792498024981249822498324984249852498624987249882498924990249912499224993249942499524996249972499824999250002500125002250032500425005250062500725008250092501025011250122501325014250152501625017250182501925020250212502225023250242502525026250272502825029250302503125032250332503425035250362503725038250392504025041250422504325044250452504625047250482504925050250512505225053250542505525056250572505825059250602506125062250632506425065250662506725068250692507025071250722507325074250752507625077250782507925080250812508225083250842508525086250872508825089250902509125092250932509425095250962509725098250992510025101251022510325104251052510625107251082510925110251112511225113251142511525116251172511825119251202512125122251232512425125251262512725128251292513025131251322513325134251352513625137251382513925140251412514225143251442514525146251472514825149251502515125152251532515425155251562515725158251592516025161251622516325164251652516625167251682516925170251712517225173251742517525176251772517825179251802518125182251832518425185251862518725188251892519025191251922519325194251952519625197251982519925200252012520225203252042520525206252072520825209252102521125212252132521425215252162521725218252192522025221252222522325224252252522625227252282522925230252312523225233252342523525236252372523825239252402524125242252432524425245252462524725248252492525025251252522525325254252552525625257252582525925260252612526225263252642526525266252672526825269252702527125272252732527425275252762527725278252792528025281252822528325284252852528625287252882528925290252912529225293252942529525296252972529825299253002530125302253032530425305253062530725308253092531025311253122531325314253152531625317253182531925320253212532225323253242532525326253272532825329253302533125332253332533425335253362533725338253392534025341253422534325344253452534625347253482534925350253512535225353253542535525356253572535825359253602536125362253632536425365253662536725368253692537025371253722537325374253752537625377253782537925380253812538225383253842538525386253872538825389253902539125392253932539425395253962539725398253992540025401254022540325404254052540625407254082540925410254112541225413254142541525416254172541825419254202542125422254232542425425254262542725428254292543025431254322543325434254352543625437254382543925440254412544225443254442544525446254472544825449254502545125452254532545425455254562545725458254592546025461254622546325464254652546625467254682546925470254712547225473254742547525476254772547825479254802548125482254832548425485254862548725488254892549025491254922549325494254952549625497254982549925500255012550225503255042550525506255072550825509255102551125512255132551425515255162551725518255192552025521255222552325524255252552625527255282552925530255312553225533255342553525536255372553825539255402554125542255432554425545255462554725548255492555025551255522555325554255552555625557255582555925560255612556225563255642556525566255672556825569255702557125572255732557425575255762557725578255792558025581255822558325584255852558625587255882558925590255912559225593255942559525596255972559825599256002560125602256032560425605256062560725608256092561025611256122561325614256152561625617256182561925620256212562225623256242562525626256272562825629256302563125632256332563425635256362563725638256392564025641256422564325644256452564625647256482564925650256512565225653256542565525656256572565825659256602566125662256632566425665256662566725668256692567025671256722567325674256752567625677256782567925680256812568225683256842568525686256872568825689256902569125692256932569425695256962569725698256992570025701257022570325704257052570625707257082570925710257112571225713257142571525716257172571825719257202572125722257232572425725257262572725728257292573025731257322573325734257352573625737257382573925740257412574225743257442574525746257472574825749257502575125752257532575425755257562575725758257592576025761257622576325764257652576625767257682576925770257712577225773257742577525776257772577825779257802578125782257832578425785257862578725788257892579025791257922579325794257952579625797257982579925800258012580225803258042580525806258072580825809258102581125812258132581425815258162581725818258192582025821258222582325824258252582625827258282582925830258312583225833258342583525836258372583825839258402584125842258432584425845258462584725848258492585025851258522585325854258552585625857258582585925860258612586225863258642586525866258672586825869258702587125872258732587425875258762587725878258792588025881258822588325884258852588625887258882588925890258912589225893258942589525896258972589825899259002590125902259032590425905259062590725908259092591025911259122591325914259152591625917259182591925920259212592225923259242592525926259272592825929259302593125932259332593425935259362593725938259392594025941259422594325944259452594625947259482594925950259512595225953259542595525956259572595825959259602596125962259632596425965259662596725968259692597025971259722597325974259752597625977259782597925980259812598225983259842598525986259872598825989259902599125992259932599425995259962599725998259992600026001260022600326004260052600626007260082600926010260112601226013260142601526016260172601826019260202602126022260232602426025260262602726028260292603026031260322603326034260352603626037260382603926040260412604226043260442604526046260472604826049260502605126052260532605426055260562605726058260592606026061260622606326064260652606626067260682606926070260712607226073260742607526076260772607826079260802608126082260832608426085260862608726088260892609026091260922609326094260952609626097260982609926100261012610226103261042610526106261072610826109261102611126112261132611426115261162611726118261192612026121261222612326124261252612626127261282612926130261312613226133261342613526136261372613826139261402614126142261432614426145261462614726148261492615026151261522615326154261552615626157261582615926160261612616226163261642616526166261672616826169261702617126172261732617426175261762617726178261792618026181261822618326184261852618626187261882618926190261912619226193261942619526196261972619826199262002620126202262032620426205262062620726208262092621026211262122621326214262152621626217262182621926220262212622226223262242622526226262272622826229262302623126232262332623426235262362623726238262392624026241262422624326244262452624626247262482624926250262512625226253262542625526256262572625826259262602626126262262632626426265262662626726268262692627026271262722627326274262752627626277262782627926280262812628226283262842628526286262872628826289262902629126292262932629426295262962629726298262992630026301263022630326304263052630626307263082630926310263112631226313263142631526316263172631826319263202632126322263232632426325263262632726328263292633026331263322633326334263352633626337263382633926340263412634226343263442634526346263472634826349263502635126352263532635426355263562635726358263592636026361263622636326364263652636626367263682636926370263712637226373263742637526376263772637826379263802638126382263832638426385263862638726388263892639026391263922639326394263952639626397263982639926400264012640226403264042640526406264072640826409264102641126412264132641426415264162641726418264192642026421264222642326424264252642626427264282642926430264312643226433264342643526436264372643826439264402644126442264432644426445264462644726448264492645026451264522645326454264552645626457264582645926460264612646226463264642646526466264672646826469264702647126472264732647426475264762647726478264792648026481264822648326484264852648626487264882648926490264912649226493264942649526496264972649826499265002650126502265032650426505265062650726508265092651026511265122651326514265152651626517265182651926520265212652226523265242652526526265272652826529265302653126532265332653426535265362653726538265392654026541265422654326544265452654626547265482654926550265512655226553265542655526556265572655826559265602656126562265632656426565265662656726568265692657026571265722657326574265752657626577265782657926580265812658226583265842658526586265872658826589265902659126592265932659426595265962659726598265992660026601266022660326604266052660626607266082660926610266112661226613266142661526616266172661826619266202662126622266232662426625266262662726628266292663026631266322663326634266352663626637266382663926640266412664226643266442664526646266472664826649266502665126652266532665426655266562665726658266592666026661266622666326664266652666626667266682666926670266712667226673266742667526676266772667826679266802668126682266832668426685266862668726688266892669026691266922669326694266952669626697266982669926700267012670226703267042670526706267072670826709267102671126712267132671426715267162671726718267192672026721267222672326724267252672626727267282672926730267312673226733267342673526736267372673826739267402674126742267432674426745267462674726748267492675026751267522675326754267552675626757267582675926760267612676226763267642676526766267672676826769267702677126772267732677426775267762677726778267792678026781267822678326784267852678626787267882678926790267912679226793267942679526796267972679826799268002680126802268032680426805268062680726808268092681026811268122681326814268152681626817268182681926820268212682226823268242682526826268272682826829268302683126832268332683426835268362683726838268392684026841268422684326844268452684626847268482684926850268512685226853268542685526856268572685826859268602686126862268632686426865268662686726868268692687026871268722687326874268752687626877268782687926880268812688226883268842688526886268872688826889268902689126892268932689426895268962689726898268992690026901269022690326904269052690626907269082690926910269112691226913269142691526916269172691826919269202692126922269232692426925269262692726928269292693026931269322693326934269352693626937269382693926940269412694226943269442694526946269472694826949269502695126952269532695426955269562695726958269592696026961269622696326964269652696626967269682696926970269712697226973269742697526976269772697826979269802698126982269832698426985269862698726988269892699026991269922699326994269952699626997269982699927000270012700227003270042700527006270072700827009270102701127012270132701427015270162701727018270192702027021270222702327024270252702627027270282702927030270312703227033270342703527036270372703827039270402704127042270432704427045270462704727048270492705027051270522705327054270552705627057270582705927060270612706227063270642706527066270672706827069270702707127072270732707427075270762707727078270792708027081270822708327084270852708627087270882708927090270912709227093270942709527096270972709827099271002710127102271032710427105271062710727108271092711027111271122711327114271152711627117271182711927120271212712227123271242712527126271272712827129271302713127132271332713427135271362713727138271392714027141271422714327144271452714627147271482714927150271512715227153271542715527156271572715827159271602716127162271632716427165271662716727168271692717027171271722717327174271752717627177271782717927180271812718227183271842718527186271872718827189271902719127192271932719427195271962719727198271992720027201272022720327204272052720627207272082720927210272112721227213272142721527216272172721827219272202722127222272232722427225272262722727228272292723027231272322723327234272352723627237272382723927240272412724227243272442724527246272472724827249272502725127252272532725427255272562725727258272592726027261272622726327264272652726627267272682726927270272712727227273272742727527276272772727827279272802728127282272832728427285272862728727288272892729027291272922729327294272952729627297272982729927300273012730227303273042730527306273072730827309273102731127312273132731427315273162731727318273192732027321273222732327324273252732627327273282732927330273312733227333273342733527336273372733827339273402734127342273432734427345273462734727348273492735027351273522735327354273552735627357273582735927360273612736227363273642736527366273672736827369273702737127372273732737427375273762737727378273792738027381273822738327384273852738627387273882738927390273912739227393273942739527396273972739827399274002740127402274032740427405274062740727408274092741027411274122741327414274152741627417274182741927420274212742227423274242742527426274272742827429274302743127432274332743427435274362743727438274392744027441274422744327444274452744627447274482744927450274512745227453274542745527456274572745827459274602746127462274632746427465274662746727468274692747027471274722747327474274752747627477274782747927480274812748227483274842748527486274872748827489274902749127492274932749427495274962749727498274992750027501275022750327504275052750627507275082750927510275112751227513275142751527516275172751827519275202752127522275232752427525275262752727528275292753027531275322753327534275352753627537275382753927540275412754227543275442754527546275472754827549275502755127552275532755427555275562755727558275592756027561275622756327564275652756627567275682756927570275712757227573275742757527576275772757827579275802758127582275832758427585275862758727588275892759027591275922759327594275952759627597275982759927600276012760227603276042760527606276072760827609276102761127612276132761427615276162761727618276192762027621276222762327624276252762627627276282762927630276312763227633276342763527636276372763827639276402764127642276432764427645276462764727648276492765027651276522765327654276552765627657276582765927660276612766227663276642766527666276672766827669276702767127672276732767427675276762767727678276792768027681276822768327684276852768627687276882768927690276912769227693276942769527696276972769827699277002770127702277032770427705277062770727708277092771027711277122771327714277152771627717277182771927720277212772227723277242772527726277272772827729277302773127732277332773427735277362773727738277392774027741277422774327744277452774627747277482774927750277512775227753277542775527756277572775827759277602776127762277632776427765277662776727768277692777027771277722777327774277752777627777277782777927780277812778227783277842778527786277872778827789277902779127792277932779427795277962779727798277992780027801278022780327804278052780627807278082780927810278112781227813278142781527816278172781827819278202782127822278232782427825278262782727828278292783027831278322783327834278352783627837278382783927840278412784227843278442784527846278472784827849278502785127852278532785427855278562785727858278592786027861278622786327864278652786627867278682786927870278712787227873278742787527876278772787827879278802788127882278832788427885278862788727888278892789027891278922789327894278952789627897278982789927900279012790227903279042790527906279072790827909279102791127912279132791427915279162791727918279192792027921279222792327924279252792627927279282792927930279312793227933279342793527936279372793827939279402794127942279432794427945279462794727948279492795027951279522795327954279552795627957279582795927960279612796227963279642796527966279672796827969279702797127972279732797427975279762797727978279792798027981279822798327984279852798627987279882798927990279912799227993279942799527996279972799827999280002800128002280032800428005280062800728008280092801028011280122801328014280152801628017280182801928020280212802228023280242802528026280272802828029280302803128032280332803428035280362803728038280392804028041280422804328044280452804628047280482804928050280512805228053280542805528056280572805828059280602806128062280632806428065280662806728068280692807028071280722807328074280752807628077280782807928080280812808228083280842808528086280872808828089280902809128092280932809428095280962809728098280992810028101281022810328104281052810628107281082810928110281112811228113281142811528116281172811828119281202812128122281232812428125281262812728128281292813028131281322813328134281352813628137281382813928140281412814228143281442814528146281472814828149281502815128152281532815428155281562815728158281592816028161281622816328164281652816628167281682816928170281712817228173281742817528176281772817828179281802818128182281832818428185281862818728188281892819028191281922819328194281952819628197281982819928200282012820228203282042820528206282072820828209282102821128212282132821428215282162821728218282192822028221282222822328224282252822628227282282822928230282312823228233282342823528236282372823828239282402824128242282432824428245282462824728248282492825028251282522825328254282552825628257282582825928260282612826228263282642826528266282672826828269282702827128272282732827428275282762827728278282792828028281282822828328284282852828628287282882828928290282912829228293282942829528296282972829828299283002830128302283032830428305283062830728308283092831028311283122831328314283152831628317283182831928320283212832228323283242832528326283272832828329283302833128332283332833428335283362833728338283392834028341283422834328344283452834628347283482834928350283512835228353283542835528356283572835828359283602836128362283632836428365283662836728368283692837028371283722837328374283752837628377283782837928380283812838228383283842838528386283872838828389283902839128392283932839428395283962839728398283992840028401284022840328404284052840628407284082840928410284112841228413284142841528416284172841828419284202842128422284232842428425284262842728428284292843028431284322843328434284352843628437284382843928440284412844228443284442844528446284472844828449284502845128452284532845428455284562845728458284592846028461284622846328464284652846628467284682846928470284712847228473284742847528476284772847828479284802848128482284832848428485284862848728488284892849028491284922849328494284952849628497284982849928500285012850228503285042850528506285072850828509285102851128512285132851428515285162851728518285192852028521285222852328524285252852628527285282852928530285312853228533285342853528536285372853828539285402854128542285432854428545285462854728548285492855028551285522855328554285552855628557285582855928560285612856228563285642856528566285672856828569285702857128572285732857428575285762857728578285792858028581285822858328584285852858628587285882858928590285912859228593285942859528596285972859828599286002860128602286032860428605286062860728608286092861028611286122861328614286152861628617286182861928620286212862228623286242862528626286272862828629286302863128632286332863428635286362863728638286392864028641286422864328644286452864628647286482864928650286512865228653286542865528656286572865828659286602866128662286632866428665286662866728668286692867028671286722867328674286752867628677286782867928680286812868228683286842868528686286872868828689286902869128692286932869428695286962869728698286992870028701287022870328704287052870628707287082870928710287112871228713287142871528716287172871828719287202872128722287232872428725287262872728728287292873028731287322873328734287352873628737287382873928740287412874228743287442874528746287472874828749287502875128752287532875428755287562875728758287592876028761287622876328764287652876628767287682876928770287712877228773287742877528776287772877828779287802878128782287832878428785287862878728788287892879028791287922879328794287952879628797287982879928800288012880228803288042880528806288072880828809288102881128812288132881428815288162881728818288192882028821288222882328824288252882628827288282882928830288312883228833288342883528836288372883828839288402884128842288432884428845288462884728848288492885028851288522885328854288552885628857288582885928860288612886228863288642886528866288672886828869288702887128872288732887428875288762887728878288792888028881288822888328884288852888628887288882888928890288912889228893288942889528896288972889828899289002890128902289032890428905289062890728908289092891028911289122891328914289152891628917289182891928920289212892228923289242892528926289272892828929289302893128932289332893428935289362893728938289392894028941289422894328944289452894628947289482894928950289512895228953289542895528956289572895828959289602896128962289632896428965289662896728968289692897028971289722897328974289752897628977289782897928980289812898228983289842898528986289872898828989289902899128992289932899428995289962899728998289992900029001290022900329004290052900629007290082900929010290112901229013290142901529016290172901829019290202902129022290232902429025290262902729028290292903029031290322903329034290352903629037290382903929040290412904229043290442904529046290472904829049290502905129052290532905429055290562905729058290592906029061290622906329064290652906629067290682906929070290712907229073290742907529076290772907829079290802908129082290832908429085290862908729088290892909029091290922909329094290952909629097290982909929100291012910229103291042910529106291072910829109291102911129112291132911429115291162911729118291192912029121291222912329124291252912629127291282912929130291312913229133291342913529136291372913829139291402914129142291432914429145291462914729148291492915029151291522915329154291552915629157291582915929160291612916229163291642916529166291672916829169291702917129172291732917429175291762917729178291792918029181291822918329184291852918629187291882918929190291912919229193291942919529196291972919829199292002920129202292032920429205292062920729208292092921029211292122921329214292152921629217292182921929220292212922229223292242922529226292272922829229292302923129232292332923429235292362923729238292392924029241292422924329244292452924629247292482924929250292512925229253292542925529256292572925829259292602926129262292632926429265292662926729268292692927029271292722927329274292752927629277292782927929280292812928229283292842928529286292872928829289292902929129292292932929429295292962929729298292992930029301293022930329304293052930629307293082930929310293112931229313293142931529316293172931829319293202932129322293232932429325293262932729328293292933029331293322933329334293352933629337293382933929340293412934229343293442934529346293472934829349293502935129352293532935429355293562935729358293592936029361293622936329364293652936629367293682936929370293712937229373293742937529376293772937829379293802938129382293832938429385293862938729388293892939029391293922939329394293952939629397293982939929400294012940229403294042940529406294072940829409294102941129412294132941429415294162941729418294192942029421294222942329424294252942629427294282942929430294312943229433294342943529436294372943829439294402944129442294432944429445294462944729448294492945029451294522945329454294552945629457294582945929460294612946229463294642946529466294672946829469294702947129472294732947429475294762947729478294792948029481294822948329484294852948629487294882948929490294912949229493294942949529496294972949829499295002950129502295032950429505295062950729508295092951029511295122951329514295152951629517295182951929520295212952229523295242952529526295272952829529295302953129532295332953429535295362953729538295392954029541295422954329544295452954629547295482954929550295512955229553295542955529556295572955829559295602956129562295632956429565295662956729568295692957029571295722957329574295752957629577295782957929580295812958229583295842958529586295872958829589295902959129592295932959429595295962959729598295992960029601296022960329604296052960629607296082960929610296112961229613296142961529616296172961829619296202962129622296232962429625296262962729628296292963029631296322963329634296352963629637296382963929640296412964229643296442964529646296472964829649296502965129652296532965429655296562965729658296592966029661296622966329664296652966629667296682966929670296712967229673296742967529676296772967829679296802968129682296832968429685296862968729688296892969029691296922969329694296952969629697296982969929700297012970229703297042970529706297072970829709297102971129712297132971429715297162971729718297192972029721297222972329724297252972629727297282972929730297312973229733297342973529736297372973829739297402974129742297432974429745297462974729748297492975029751297522975329754297552975629757297582975929760297612976229763297642976529766297672976829769297702977129772297732977429775297762977729778297792978029781297822978329784297852978629787297882978929790297912979229793297942979529796297972979829799298002980129802298032980429805298062980729808298092981029811298122981329814298152981629817298182981929820298212982229823298242982529826298272982829829298302983129832298332983429835298362983729838298392984029841298422984329844298452984629847298482984929850298512985229853298542985529856298572985829859298602986129862298632986429865298662986729868298692987029871298722987329874298752987629877298782987929880298812988229883298842988529886298872988829889298902989129892298932989429895298962989729898298992990029901299022990329904299052990629907299082990929910299112991229913299142991529916299172991829919299202992129922299232992429925299262992729928299292993029931299322993329934299352993629937299382993929940299412994229943299442994529946299472994829949299502995129952299532995429955299562995729958299592996029961299622996329964299652996629967299682996929970299712997229973299742997529976299772997829979299802998129982299832998429985299862998729988299892999029991299922999329994299952999629997299982999930000300013000230003300043000530006300073000830009300103001130012300133001430015300163001730018300193002030021300223002330024300253002630027300283002930030300313003230033300343003530036300373003830039300403004130042300433004430045300463004730048300493005030051300523005330054300553005630057300583005930060300613006230063300643006530066300673006830069300703007130072300733007430075300763007730078300793008030081300823008330084300853008630087300883008930090300913009230093300943009530096300973009830099301003010130102301033010430105301063010730108301093011030111301123011330114301153011630117301183011930120301213012230123301243012530126301273012830129301303013130132301333013430135301363013730138301393014030141301423014330144301453014630147301483014930150301513015230153301543015530156301573015830159301603016130162301633016430165301663016730168301693017030171301723017330174301753017630177301783017930180301813018230183301843018530186301873018830189301903019130192301933019430195301963019730198301993020030201302023020330204302053020630207302083020930210302113021230213302143021530216302173021830219302203022130222302233022430225302263022730228302293023030231302323023330234302353023630237302383023930240302413024230243302443024530246302473024830249302503025130252302533025430255302563025730258302593026030261302623026330264302653026630267302683026930270302713027230273302743027530276302773027830279302803028130282302833028430285302863028730288302893029030291302923029330294302953029630297302983029930300303013030230303303043030530306303073030830309303103031130312303133031430315303163031730318303193032030321303223032330324303253032630327303283032930330303313033230333303343033530336303373033830339303403034130342303433034430345303463034730348303493035030351303523035330354303553035630357303583035930360303613036230363303643036530366303673036830369303703037130372303733037430375303763037730378303793038030381303823038330384303853038630387303883038930390303913039230393303943039530396303973039830399304003040130402304033040430405304063040730408304093041030411304123041330414304153041630417304183041930420304213042230423304243042530426304273042830429304303043130432304333043430435304363043730438304393044030441304423044330444304453044630447304483044930450304513045230453304543045530456304573045830459304603046130462304633046430465304663046730468304693047030471304723047330474304753047630477304783047930480304813048230483304843048530486304873048830489304903049130492304933049430495304963049730498304993050030501305023050330504305053050630507305083050930510305113051230513305143051530516305173051830519305203052130522305233052430525305263052730528305293053030531305323053330534305353053630537305383053930540305413054230543305443054530546305473054830549305503055130552305533055430555305563055730558305593056030561305623056330564305653056630567305683056930570305713057230573305743057530576305773057830579305803058130582305833058430585305863058730588305893059030591305923059330594305953059630597305983059930600306013060230603306043060530606306073060830609306103061130612306133061430615306163061730618306193062030621306223062330624306253062630627306283062930630306313063230633306343063530636306373063830639306403064130642306433064430645306463064730648306493065030651306523065330654306553065630657306583065930660306613066230663306643066530666306673066830669306703067130672306733067430675306763067730678306793068030681306823068330684306853068630687306883068930690306913069230693306943069530696306973069830699307003070130702307033070430705307063070730708307093071030711307123071330714307153071630717307183071930720307213072230723307243072530726307273072830729307303073130732307333073430735307363073730738307393074030741307423074330744307453074630747307483074930750307513075230753307543075530756307573075830759307603076130762307633076430765307663076730768307693077030771307723077330774307753077630777307783077930780307813078230783307843078530786307873078830789307903079130792307933079430795307963079730798307993080030801308023080330804308053080630807308083080930810308113081230813308143081530816308173081830819308203082130822308233082430825308263082730828308293083030831308323083330834308353083630837308383083930840308413084230843308443084530846308473084830849308503085130852308533085430855308563085730858308593086030861308623086330864308653086630867308683086930870308713087230873308743087530876308773087830879308803088130882308833088430885308863088730888308893089030891308923089330894308953089630897308983089930900309013090230903309043090530906309073090830909309103091130912309133091430915309163091730918309193092030921309223092330924309253092630927309283092930930309313093230933309343093530936309373093830939309403094130942309433094430945309463094730948309493095030951309523095330954309553095630957309583095930960309613096230963309643096530966309673096830969309703097130972309733097430975309763097730978309793098030981309823098330984309853098630987309883098930990309913099230993309943099530996309973099830999310003100131002310033100431005310063100731008310093101031011310123101331014310153101631017310183101931020310213102231023310243102531026310273102831029310303103131032310333103431035310363103731038310393104031041310423104331044310453104631047310483104931050310513105231053310543105531056310573105831059310603106131062310633106431065310663106731068310693107031071310723107331074310753107631077310783107931080310813108231083310843108531086310873108831089310903109131092310933109431095310963109731098310993110031101311023110331104311053110631107311083110931110311113111231113311143111531116311173111831119311203112131122311233112431125311263112731128311293113031131311323113331134311353113631137311383113931140311413114231143311443114531146311473114831149311503115131152311533115431155311563115731158311593116031161311623116331164311653116631167311683116931170311713117231173311743117531176311773117831179311803118131182311833118431185311863118731188311893119031191311923119331194311953119631197311983119931200312013120231203312043120531206312073120831209312103121131212312133121431215312163121731218312193122031221312223122331224312253122631227312283122931230312313123231233312343123531236312373123831239312403124131242312433124431245312463124731248312493125031251312523125331254312553125631257312583125931260312613126231263312643126531266312673126831269312703127131272312733127431275312763127731278312793128031281312823128331284312853128631287312883128931290312913129231293312943129531296312973129831299313003130131302313033130431305313063130731308313093131031311313123131331314313153131631317313183131931320313213132231323313243132531326313273132831329313303133131332313333133431335313363133731338313393134031341313423134331344313453134631347313483134931350313513135231353313543135531356313573135831359313603136131362313633136431365313663136731368313693137031371313723137331374313753137631377313783137931380313813138231383313843138531386313873138831389313903139131392313933139431395313963139731398313993140031401314023140331404314053140631407314083140931410314113141231413314143141531416314173141831419314203142131422314233142431425314263142731428314293143031431314323143331434314353143631437314383143931440314413144231443314443144531446314473144831449314503145131452314533145431455314563145731458314593146031461314623146331464314653146631467314683146931470314713147231473314743147531476314773147831479314803148131482314833148431485314863148731488314893149031491314923149331494314953149631497314983149931500315013150231503315043150531506315073150831509315103151131512315133151431515315163151731518315193152031521315223152331524315253152631527315283152931530315313153231533315343153531536315373153831539315403154131542315433154431545315463154731548315493155031551315523155331554315553155631557315583155931560315613156231563315643156531566315673156831569315703157131572315733157431575315763157731578315793158031581315823158331584315853158631587315883158931590315913159231593315943159531596315973159831599316003160131602316033160431605316063160731608316093161031611316123161331614316153161631617316183161931620316213162231623316243162531626316273162831629316303163131632316333163431635316363163731638316393164031641316423164331644316453164631647316483164931650316513165231653316543165531656316573165831659316603166131662316633166431665316663166731668316693167031671316723167331674316753167631677316783167931680316813168231683316843168531686316873168831689316903169131692316933169431695316963169731698316993170031701317023170331704317053170631707317083170931710317113171231713317143171531716317173171831719317203172131722317233172431725317263172731728317293173031731317323173331734317353173631737317383173931740317413174231743317443174531746317473174831749317503175131752317533175431755317563175731758317593176031761317623176331764317653176631767317683176931770317713177231773317743177531776317773177831779317803178131782317833178431785317863178731788317893179031791317923179331794317953179631797317983179931800318013180231803318043180531806318073180831809318103181131812318133181431815318163181731818318193182031821318223182331824318253182631827318283182931830318313183231833318343183531836318373183831839318403184131842318433184431845318463184731848318493185031851318523185331854318553185631857318583185931860318613186231863318643186531866318673186831869318703187131872318733187431875318763187731878318793188031881318823188331884318853188631887318883188931890318913189231893318943189531896318973189831899319003190131902319033190431905319063190731908319093191031911319123191331914319153191631917319183191931920319213192231923319243192531926319273192831929319303193131932319333193431935319363193731938319393194031941319423194331944319453194631947319483194931950319513195231953319543195531956319573195831959319603196131962319633196431965319663196731968319693197031971319723197331974319753197631977319783197931980319813198231983319843198531986319873198831989319903199131992319933199431995319963199731998319993200032001320023200332004320053200632007320083200932010320113201232013320143201532016320173201832019320203202132022320233202432025320263202732028320293203032031320323203332034320353203632037320383203932040320413204232043320443204532046320473204832049320503205132052320533205432055320563205732058320593206032061320623206332064320653206632067320683206932070320713207232073320743207532076320773207832079320803208132082320833208432085320863208732088320893209032091320923209332094320953209632097320983209932100321013210232103321043210532106321073210832109321103211132112321133211432115321163211732118321193212032121321223212332124321253212632127321283212932130321313213232133321343213532136321373213832139321403214132142321433214432145321463214732148321493215032151321523215332154321553215632157321583215932160321613216232163321643216532166321673216832169321703217132172321733217432175321763217732178321793218032181321823218332184321853218632187321883218932190321913219232193321943219532196321973219832199322003220132202322033220432205322063220732208322093221032211322123221332214322153221632217322183221932220322213222232223322243222532226322273222832229322303223132232322333223432235322363223732238322393224032241322423224332244322453224632247322483224932250322513225232253322543225532256322573225832259322603226132262322633226432265322663226732268322693227032271322723227332274322753227632277322783227932280322813228232283322843228532286322873228832289322903229132292322933229432295322963229732298322993230032301323023230332304323053230632307323083230932310323113231232313323143231532316323173231832319323203232132322323233232432325323263232732328323293233032331323323233332334323353233632337323383233932340323413234232343323443234532346323473234832349323503235132352323533235432355323563235732358323593236032361323623236332364323653236632367323683236932370323713237232373323743237532376323773237832379323803238132382323833238432385323863238732388323893239032391323923239332394323953239632397323983239932400324013240232403324043240532406324073240832409324103241132412324133241432415324163241732418324193242032421324223242332424324253242632427324283242932430324313243232433324343243532436324373243832439324403244132442324433244432445324463244732448324493245032451324523245332454324553245632457324583245932460324613246232463324643246532466324673246832469324703247132472324733247432475324763247732478324793248032481324823248332484324853248632487324883248932490324913249232493324943249532496324973249832499325003250132502325033250432505325063250732508325093251032511325123251332514325153251632517325183251932520325213252232523325243252532526325273252832529325303253132532325333253432535325363253732538325393254032541325423254332544325453254632547325483254932550325513255232553325543255532556325573255832559325603256132562325633256432565325663256732568325693257032571325723257332574325753257632577325783257932580325813258232583325843258532586325873258832589325903259132592325933259432595325963259732598325993260032601326023260332604326053260632607326083260932610326113261232613326143261532616326173261832619326203262132622326233262432625326263262732628326293263032631326323263332634326353263632637326383263932640326413264232643326443264532646326473264832649326503265132652326533265432655326563265732658326593266032661326623266332664326653266632667326683266932670326713267232673326743267532676326773267832679326803268132682326833268432685326863268732688326893269032691326923269332694326953269632697326983269932700327013270232703327043270532706327073270832709327103271132712327133271432715327163271732718327193272032721327223272332724327253272632727327283272932730327313273232733327343273532736327373273832739327403274132742327433274432745327463274732748327493275032751327523275332754327553275632757327583275932760327613276232763327643276532766327673276832769327703277132772327733277432775327763277732778327793278032781327823278332784327853278632787327883278932790327913279232793327943279532796327973279832799328003280132802328033280432805328063280732808328093281032811328123281332814328153281632817328183281932820328213282232823328243282532826328273282832829328303283132832328333283432835328363283732838328393284032841328423284332844328453284632847328483284932850328513285232853328543285532856328573285832859328603286132862328633286432865328663286732868328693287032871328723287332874328753287632877328783287932880328813288232883328843288532886328873288832889328903289132892328933289432895328963289732898328993290032901329023290332904329053290632907329083290932910329113291232913329143291532916329173291832919329203292132922329233292432925329263292732928329293293032931329323293332934329353293632937329383293932940329413294232943329443294532946329473294832949329503295132952329533295432955329563295732958329593296032961329623296332964329653296632967329683296932970329713297232973329743297532976329773297832979329803298132982329833298432985329863298732988329893299032991329923299332994329953299632997329983299933000330013300233003330043300533006330073300833009330103301133012330133301433015330163301733018330193302033021330223302333024330253302633027330283302933030330313303233033330343303533036330373303833039330403304133042330433304433045330463304733048330493305033051330523305333054330553305633057330583305933060330613306233063330643306533066330673306833069330703307133072330733307433075330763307733078330793308033081330823308333084330853308633087330883308933090330913309233093330943309533096330973309833099331003310133102331033310433105331063310733108331093311033111331123311333114331153311633117331183311933120331213312233123331243312533126331273312833129331303313133132331333313433135331363313733138331393314033141331423314333144331453314633147331483314933150331513315233153331543315533156331573315833159331603316133162331633316433165331663316733168331693317033171331723317333174331753317633177331783317933180331813318233183331843318533186331873318833189331903319133192331933319433195331963319733198331993320033201332023320333204332053320633207332083320933210332113321233213332143321533216332173321833219332203322133222332233322433225332263322733228332293323033231332323323333234332353323633237332383323933240332413324233243332443324533246332473324833249332503325133252332533325433255332563325733258332593326033261332623326333264332653326633267332683326933270332713327233273332743327533276332773327833279332803328133282332833328433285332863328733288332893329033291332923329333294332953329633297332983329933300333013330233303333043330533306333073330833309333103331133312333133331433315333163331733318333193332033321333223332333324333253332633327333283332933330333313333233333333343333533336333373333833339333403334133342333433334433345333463334733348333493335033351333523335333354333553335633357333583335933360333613336233363333643336533366333673336833369333703337133372333733337433375333763337733378333793338033381333823338333384333853338633387333883338933390333913339233393333943339533396333973339833399334003340133402334033340433405334063340733408334093341033411334123341333414334153341633417334183341933420334213342233423334243342533426334273342833429334303343133432334333343433435334363343733438334393344033441334423344333444334453344633447334483344933450334513345233453334543345533456334573345833459334603346133462334633346433465334663346733468334693347033471334723347333474334753347633477334783347933480334813348233483334843348533486334873348833489334903349133492334933349433495334963349733498334993350033501335023350333504335053350633507335083350933510335113351233513335143351533516335173351833519335203352133522335233352433525335263352733528335293353033531335323353333534335353353633537335383353933540335413354233543335443354533546335473354833549335503355133552335533355433555335563355733558335593356033561335623356333564335653356633567335683356933570335713357233573335743357533576335773357833579335803358133582335833358433585335863358733588335893359033591335923359333594335953359633597335983359933600336013360233603336043360533606336073360833609336103361133612336133361433615336163361733618336193362033621336223362333624336253362633627336283362933630336313363233633336343363533636336373363833639336403364133642336433364433645336463364733648336493365033651336523365333654336553365633657336583365933660336613366233663336643366533666336673366833669336703367133672336733367433675336763367733678336793368033681336823368333684336853368633687336883368933690336913369233693336943369533696336973369833699337003370133702337033370433705337063370733708337093371033711337123371333714337153371633717337183371933720337213372233723337243372533726337273372833729337303373133732337333373433735337363373733738337393374033741337423374333744337453374633747337483374933750337513375233753337543375533756337573375833759337603376133762337633376433765337663376733768337693377033771337723377333774337753377633777337783377933780337813378233783337843378533786337873378833789337903379133792337933379433795337963379733798337993380033801338023380333804338053380633807338083380933810338113381233813338143381533816338173381833819338203382133822338233382433825338263382733828338293383033831338323383333834338353383633837338383383933840338413384233843338443384533846338473384833849338503385133852338533385433855338563385733858338593386033861338623386333864338653386633867338683386933870338713387233873338743387533876338773387833879338803388133882338833388433885338863388733888338893389033891338923389333894338953389633897338983389933900339013390233903339043390533906339073390833909339103391133912339133391433915339163391733918339193392033921339223392333924339253392633927339283392933930339313393233933339343393533936339373393833939339403394133942339433394433945339463394733948339493395033951339523395333954339553395633957339583395933960339613396233963339643396533966339673396833969339703397133972339733397433975339763397733978339793398033981339823398333984339853398633987339883398933990339913399233993339943399533996339973399833999340003400134002340033400434005340063400734008340093401034011340123401334014340153401634017340183401934020340213402234023340243402534026340273402834029340303403134032340333403434035340363403734038340393404034041340423404334044340453404634047340483404934050340513405234053340543405534056340573405834059340603406134062340633406434065340663406734068340693407034071340723407334074340753407634077340783407934080340813408234083340843408534086340873408834089340903409134092340933409434095340963409734098340993410034101341023410334104341053410634107341083410934110341113411234113341143411534116341173411834119341203412134122341233412434125341263412734128341293413034131341323413334134341353413634137341383413934140341413414234143341443414534146341473414834149341503415134152341533415434155341563415734158341593416034161341623416334164341653416634167341683416934170341713417234173341743417534176341773417834179341803418134182341833418434185341863418734188341893419034191341923419334194341953419634197341983419934200342013420234203342043420534206342073420834209342103421134212342133421434215342163421734218342193422034221342223422334224342253422634227342283422934230342313423234233342343423534236342373423834239342403424134242342433424434245342463424734248342493425034251342523425334254342553425634257342583425934260342613426234263342643426534266342673426834269342703427134272342733427434275342763427734278342793428034281342823428334284342853428634287342883428934290342913429234293342943429534296342973429834299343003430134302343033430434305343063430734308343093431034311343123431334314343153431634317343183431934320343213432234323343243432534326343273432834329343303433134332343333433434335343363433734338343393434034341343423434334344343453434634347343483434934350343513435234353343543435534356343573435834359343603436134362343633436434365343663436734368343693437034371343723437334374343753437634377343783437934380343813438234383343843438534386343873438834389343903439134392343933439434395343963439734398343993440034401344023440334404344053440634407344083440934410344113441234413344143441534416344173441834419344203442134422344233442434425344263442734428344293443034431344323443334434344353443634437344383443934440344413444234443344443444534446344473444834449344503445134452344533445434455344563445734458344593446034461344623446334464344653446634467344683446934470344713447234473344743447534476344773447834479344803448134482344833448434485344863448734488344893449034491344923449334494344953449634497344983449934500345013450234503345043450534506345073450834509345103451134512345133451434515345163451734518345193452034521345223452334524345253452634527345283452934530345313453234533345343453534536345373453834539345403454134542345433454434545345463454734548345493455034551345523455334554345553455634557345583455934560345613456234563345643456534566345673456834569345703457134572345733457434575345763457734578345793458034581345823458334584345853458634587345883458934590345913459234593345943459534596345973459834599346003460134602346033460434605346063460734608346093461034611346123461334614346153461634617346183461934620346213462234623346243462534626346273462834629346303463134632346333463434635346363463734638346393464034641346423464334644346453464634647346483464934650346513465234653346543465534656346573465834659346603466134662346633466434665346663466734668346693467034671346723467334674346753467634677346783467934680346813468234683346843468534686346873468834689346903469134692346933469434695346963469734698346993470034701347023470334704347053470634707347083470934710347113471234713347143471534716347173471834719347203472134722347233472434725347263472734728347293473034731347323473334734347353473634737347383473934740347413474234743347443474534746347473474834749347503475134752347533475434755347563475734758347593476034761347623476334764347653476634767347683476934770347713477234773347743477534776347773477834779347803478134782347833478434785347863478734788347893479034791347923479334794347953479634797347983479934800348013480234803348043480534806348073480834809348103481134812348133481434815348163481734818348193482034821348223482334824348253482634827348283482934830348313483234833348343483534836348373483834839348403484134842348433484434845348463484734848348493485034851348523485334854348553485634857348583485934860348613486234863348643486534866348673486834869348703487134872348733487434875348763487734878348793488034881348823488334884348853488634887348883488934890348913489234893348943489534896348973489834899349003490134902349033490434905349063490734908349093491034911349123491334914349153491634917349183491934920349213492234923349243492534926349273492834929349303493134932349333493434935349363493734938349393494034941349423494334944349453494634947349483494934950349513495234953349543495534956349573495834959349603496134962349633496434965349663496734968349693497034971349723497334974349753497634977349783497934980349813498234983349843498534986349873498834989349903499134992349933499434995349963499734998349993500035001350023500335004350053500635007350083500935010350113501235013350143501535016350173501835019350203502135022350233502435025350263502735028350293503035031350323503335034350353503635037350383503935040350413504235043350443504535046350473504835049350503505135052350533505435055350563505735058350593506035061350623506335064350653506635067350683506935070350713507235073350743507535076350773507835079350803508135082350833508435085350863508735088350893509035091350923509335094350953509635097350983509935100351013510235103351043510535106351073510835109351103511135112351133511435115351163511735118351193512035121351223512335124351253512635127351283512935130351313513235133351343513535136351373513835139351403514135142351433514435145351463514735148351493515035151351523515335154351553515635157351583515935160351613516235163351643516535166351673516835169351703517135172351733517435175351763517735178351793518035181351823518335184351853518635187351883518935190351913519235193351943519535196351973519835199352003520135202352033520435205352063520735208352093521035211352123521335214352153521635217352183521935220352213522235223352243522535226352273522835229352303523135232352333523435235352363523735238352393524035241352423524335244352453524635247352483524935250352513525235253352543525535256352573525835259352603526135262352633526435265352663526735268352693527035271352723527335274352753527635277352783527935280352813528235283352843528535286352873528835289352903529135292352933529435295352963529735298352993530035301353023530335304353053530635307353083530935310353113531235313353143531535316353173531835319353203532135322353233532435325353263532735328353293533035331353323533335334353353533635337353383533935340353413534235343353443534535346353473534835349353503535135352353533535435355353563535735358353593536035361353623536335364353653536635367353683536935370353713537235373353743537535376353773537835379353803538135382353833538435385353863538735388353893539035391353923539335394353953539635397353983539935400354013540235403354043540535406354073540835409354103541135412354133541435415354163541735418354193542035421354223542335424354253542635427354283542935430354313543235433354343543535436354373543835439354403544135442354433544435445354463544735448354493545035451354523545335454354553545635457354583545935460354613546235463354643546535466354673546835469354703547135472354733547435475354763547735478354793548035481354823548335484354853548635487354883548935490354913549235493354943549535496354973549835499355003550135502355033550435505355063550735508355093551035511355123551335514355153551635517355183551935520355213552235523355243552535526355273552835529355303553135532355333553435535355363553735538355393554035541355423554335544355453554635547355483554935550355513555235553355543555535556355573555835559355603556135562355633556435565355663556735568355693557035571355723557335574355753557635577355783557935580355813558235583355843558535586355873558835589355903559135592355933559435595355963559735598355993560035601356023560335604356053560635607356083560935610356113561235613356143561535616356173561835619356203562135622356233562435625356263562735628356293563035631356323563335634356353563635637356383563935640356413564235643356443564535646356473564835649356503565135652356533565435655356563565735658356593566035661356623566335664356653566635667356683566935670356713567235673356743567535676356773567835679356803568135682356833568435685356863568735688356893569035691356923569335694356953569635697356983569935700357013570235703357043570535706357073570835709357103571135712357133571435715357163571735718357193572035721357223572335724357253572635727357283572935730357313573235733357343573535736357373573835739357403574135742357433574435745357463574735748357493575035751357523575335754357553575635757357583575935760357613576235763357643576535766357673576835769357703577135772357733577435775357763577735778357793578035781357823578335784357853578635787357883578935790357913579235793357943579535796357973579835799358003580135802358033580435805358063580735808358093581035811358123581335814358153581635817358183581935820358213582235823358243582535826358273582835829358303583135832358333583435835358363583735838358393584035841358423584335844358453584635847358483584935850358513585235853358543585535856358573585835859358603586135862358633586435865358663586735868358693587035871358723587335874358753587635877358783587935880358813588235883358843588535886358873588835889358903589135892358933589435895358963589735898358993590035901359023590335904359053590635907359083590935910359113591235913359143591535916359173591835919359203592135922359233592435925359263592735928359293593035931359323593335934359353593635937359383593935940359413594235943359443594535946359473594835949359503595135952359533595435955359563595735958359593596035961359623596335964359653596635967359683596935970359713597235973359743597535976359773597835979359803598135982359833598435985359863598735988359893599035991359923599335994359953599635997359983599936000360013600236003360043600536006360073600836009360103601136012360133601436015360163601736018360193602036021360223602336024360253602636027360283602936030360313603236033360343603536036360373603836039360403604136042360433604436045360463604736048360493605036051360523605336054360553605636057360583605936060360613606236063360643606536066360673606836069360703607136072360733607436075360763607736078360793608036081360823608336084360853608636087360883608936090360913609236093360943609536096360973609836099361003610136102361033610436105361063610736108361093611036111361123611336114361153611636117361183611936120361213612236123361243612536126361273612836129361303613136132361333613436135361363613736138361393614036141361423614336144361453614636147361483614936150361513615236153361543615536156361573615836159361603616136162361633616436165361663616736168361693617036171361723617336174361753617636177361783617936180361813618236183361843618536186361873618836189361903619136192361933619436195361963619736198361993620036201362023620336204362053620636207362083620936210362113621236213362143621536216362173621836219362203622136222362233622436225362263622736228362293623036231362323623336234362353623636237362383623936240362413624236243362443624536246362473624836249362503625136252362533625436255362563625736258362593626036261362623626336264362653626636267362683626936270362713627236273362743627536276362773627836279362803628136282362833628436285362863628736288362893629036291362923629336294362953629636297362983629936300363013630236303363043630536306363073630836309363103631136312363133631436315363163631736318363193632036321363223632336324363253632636327363283632936330363313633236333363343633536336363373633836339363403634136342363433634436345363463634736348363493635036351363523635336354363553635636357363583635936360363613636236363363643636536366363673636836369363703637136372363733637436375363763637736378363793638036381363823638336384363853638636387363883638936390363913639236393363943639536396363973639836399364003640136402364033640436405364063640736408364093641036411364123641336414364153641636417364183641936420364213642236423364243642536426364273642836429364303643136432364333643436435364363643736438364393644036441364423644336444364453644636447364483644936450364513645236453364543645536456364573645836459364603646136462364633646436465364663646736468364693647036471364723647336474364753647636477364783647936480364813648236483364843648536486364873648836489364903649136492364933649436495364963649736498364993650036501365023650336504365053650636507365083650936510365113651236513365143651536516365173651836519365203652136522365233652436525365263652736528365293653036531365323653336534365353653636537365383653936540365413654236543365443654536546365473654836549365503655136552365533655436555365563655736558365593656036561365623656336564365653656636567365683656936570365713657236573365743657536576365773657836579365803658136582365833658436585365863658736588365893659036591365923659336594365953659636597365983659936600366013660236603366043660536606366073660836609366103661136612366133661436615366163661736618366193662036621366223662336624366253662636627366283662936630366313663236633366343663536636366373663836639366403664136642366433664436645366463664736648366493665036651366523665336654366553665636657366583665936660366613666236663366643666536666366673666836669366703667136672366733667436675366763667736678366793668036681366823668336684366853668636687366883668936690366913669236693366943669536696366973669836699367003670136702367033670436705367063670736708367093671036711367123671336714367153671636717367183671936720367213672236723367243672536726367273672836729367303673136732367333673436735367363673736738367393674036741367423674336744367453674636747367483674936750367513675236753367543675536756367573675836759367603676136762367633676436765367663676736768367693677036771367723677336774367753677636777367783677936780367813678236783367843678536786367873678836789367903679136792367933679436795367963679736798367993680036801368023680336804368053680636807368083680936810368113681236813368143681536816368173681836819368203682136822368233682436825368263682736828368293683036831368323683336834368353683636837368383683936840368413684236843368443684536846368473684836849368503685136852368533685436855368563685736858368593686036861368623686336864368653686636867368683686936870368713687236873368743687536876368773687836879368803688136882368833688436885368863688736888368893689036891368923689336894368953689636897368983689936900369013690236903369043690536906369073690836909369103691136912369133691436915369163691736918369193692036921369223692336924369253692636927369283692936930369313693236933369343693536936369373693836939369403694136942369433694436945369463694736948369493695036951369523695336954369553695636957369583695936960369613696236963369643696536966369673696836969369703697136972369733697436975369763697736978369793698036981369823698336984369853698636987369883698936990369913699236993369943699536996369973699836999370003700137002370033700437005370063700737008370093701037011370123701337014370153701637017370183701937020370213702237023370243702537026370273702837029370303703137032370333703437035370363703737038370393704037041370423704337044370453704637047370483704937050370513705237053370543705537056370573705837059370603706137062370633706437065370663706737068370693707037071370723707337074370753707637077370783707937080370813708237083370843708537086370873708837089370903709137092370933709437095370963709737098370993710037101371023710337104371053710637107371083710937110371113711237113371143711537116371173711837119371203712137122371233712437125371263712737128371293713037131371323713337134371353713637137371383713937140371413714237143371443714537146371473714837149371503715137152371533715437155371563715737158371593716037161371623716337164371653716637167371683716937170371713717237173371743717537176371773717837179371803718137182371833718437185371863718737188371893719037191371923719337194371953719637197371983719937200372013720237203372043720537206372073720837209372103721137212372133721437215372163721737218372193722037221372223722337224372253722637227372283722937230372313723237233372343723537236372373723837239372403724137242372433724437245372463724737248372493725037251372523725337254372553725637257372583725937260372613726237263372643726537266372673726837269372703727137272372733727437275372763727737278372793728037281372823728337284372853728637287372883728937290372913729237293372943729537296372973729837299373003730137302373033730437305373063730737308373093731037311373123731337314373153731637317373183731937320373213732237323373243732537326373273732837329373303733137332373333733437335373363733737338373393734037341373423734337344373453734637347373483734937350373513735237353373543735537356373573735837359373603736137362373633736437365373663736737368373693737037371373723737337374373753737637377373783737937380373813738237383373843738537386373873738837389373903739137392373933739437395373963739737398373993740037401374023740337404374053740637407374083740937410374113741237413374143741537416374173741837419374203742137422374233742437425374263742737428374293743037431374323743337434374353743637437374383743937440374413744237443374443744537446374473744837449374503745137452374533745437455374563745737458374593746037461374623746337464374653746637467374683746937470374713747237473374743747537476374773747837479374803748137482374833748437485374863748737488374893749037491374923749337494374953749637497374983749937500375013750237503375043750537506375073750837509375103751137512375133751437515375163751737518375193752037521375223752337524375253752637527375283752937530375313753237533375343753537536375373753837539375403754137542375433754437545375463754737548375493755037551375523755337554375553755637557375583755937560375613756237563375643756537566375673756837569375703757137572375733757437575375763757737578375793758037581375823758337584375853758637587375883758937590375913759237593375943759537596375973759837599376003760137602376033760437605376063760737608376093761037611376123761337614376153761637617376183761937620376213762237623376243762537626376273762837629376303763137632376333763437635376363763737638376393764037641376423764337644376453764637647376483764937650376513765237653376543765537656376573765837659376603766137662376633766437665376663766737668376693767037671376723767337674376753767637677376783767937680376813768237683376843768537686376873768837689376903769137692376933769437695376963769737698376993770037701377023770337704377053770637707377083770937710377113771237713377143771537716377173771837719377203772137722377233772437725377263772737728377293773037731377323773337734377353773637737377383773937740377413774237743377443774537746377473774837749377503775137752377533775437755377563775737758377593776037761377623776337764377653776637767377683776937770377713777237773377743777537776377773777837779377803778137782377833778437785377863778737788377893779037791377923779337794377953779637797377983779937800378013780237803378043780537806378073780837809378103781137812378133781437815378163781737818378193782037821378223782337824378253782637827378283782937830378313783237833378343783537836378373783837839378403784137842378433784437845378463784737848378493785037851378523785337854378553785637857378583785937860378613786237863378643786537866378673786837869378703787137872378733787437875378763787737878378793788037881378823788337884378853788637887378883788937890378913789237893378943789537896378973789837899379003790137902379033790437905379063790737908379093791037911379123791337914379153791637917379183791937920379213792237923379243792537926379273792837929379303793137932379333793437935379363793737938379393794037941379423794337944379453794637947379483794937950379513795237953379543795537956379573795837959379603796137962379633796437965379663796737968379693797037971379723797337974379753797637977379783797937980379813798237983379843798537986379873798837989379903799137992379933799437995379963799737998379993800038001380023800338004380053800638007380083800938010380113801238013380143801538016380173801838019380203802138022380233802438025380263802738028380293803038031380323803338034380353803638037380383803938040380413804238043380443804538046380473804838049380503805138052380533805438055380563805738058380593806038061380623806338064380653806638067380683806938070380713807238073380743807538076380773807838079380803808138082380833808438085380863808738088380893809038091380923809338094380953809638097380983809938100381013810238103381043810538106381073810838109381103811138112381133811438115381163811738118381193812038121381223812338124381253812638127381283812938130381313813238133381343813538136381373813838139381403814138142381433814438145381463814738148381493815038151381523815338154381553815638157381583815938160381613816238163381643816538166381673816838169381703817138172381733817438175381763817738178381793818038181381823818338184381853818638187381883818938190381913819238193381943819538196381973819838199382003820138202382033820438205382063820738208382093821038211382123821338214382153821638217382183821938220382213822238223382243822538226382273822838229382303823138232382333823438235382363823738238382393824038241382423824338244382453824638247382483824938250382513825238253382543825538256382573825838259382603826138262382633826438265382663826738268382693827038271382723827338274382753827638277382783827938280382813828238283382843828538286382873828838289382903829138292382933829438295382963829738298382993830038301383023830338304383053830638307383083830938310383113831238313383143831538316383173831838319383203832138322383233832438325383263832738328383293833038331383323833338334383353833638337383383833938340383413834238343383443834538346383473834838349383503835138352383533835438355383563835738358383593836038361383623836338364383653836638367383683836938370383713837238373383743837538376383773837838379383803838138382383833838438385383863838738388383893839038391383923839338394383953839638397383983839938400384013840238403384043840538406384073840838409384103841138412384133841438415384163841738418384193842038421384223842338424384253842638427384283842938430384313843238433384343843538436384373843838439384403844138442384433844438445384463844738448384493845038451384523845338454384553845638457384583845938460384613846238463384643846538466384673846838469384703847138472384733847438475384763847738478384793848038481384823848338484384853848638487384883848938490384913849238493384943849538496384973849838499385003850138502385033850438505385063850738508385093851038511385123851338514385153851638517385183851938520385213852238523385243852538526385273852838529385303853138532385333853438535385363853738538385393854038541385423854338544385453854638547385483854938550385513855238553385543855538556385573855838559385603856138562385633856438565385663856738568385693857038571385723857338574385753857638577385783857938580385813858238583385843858538586385873858838589385903859138592385933859438595385963859738598385993860038601386023860338604386053860638607386083860938610386113861238613386143861538616386173861838619386203862138622386233862438625386263862738628386293863038631386323863338634386353863638637386383863938640386413864238643386443864538646386473864838649386503865138652386533865438655386563865738658386593866038661386623866338664386653866638667386683866938670386713867238673386743867538676386773867838679386803868138682386833868438685386863868738688386893869038691386923869338694386953869638697386983869938700387013870238703387043870538706387073870838709387103871138712387133871438715387163871738718387193872038721387223872338724387253872638727387283872938730387313873238733387343873538736387373873838739387403874138742387433874438745387463874738748387493875038751387523875338754387553875638757387583875938760387613876238763387643876538766387673876838769387703877138772387733877438775387763877738778387793878038781387823878338784387853878638787387883878938790387913879238793387943879538796387973879838799388003880138802388033880438805388063880738808388093881038811388123881338814388153881638817388183881938820388213882238823388243882538826388273882838829388303883138832388333883438835388363883738838388393884038841388423884338844388453884638847388483884938850388513885238853388543885538856388573885838859388603886138862388633886438865388663886738868388693887038871388723887338874388753887638877388783887938880388813888238883388843888538886388873888838889388903889138892388933889438895388963889738898388993890038901389023890338904389053890638907389083890938910389113891238913389143891538916389173891838919389203892138922389233892438925389263892738928389293893038931389323893338934389353893638937389383893938940389413894238943389443894538946389473894838949389503895138952389533895438955389563895738958389593896038961389623896338964389653896638967389683896938970389713897238973389743897538976389773897838979389803898138982389833898438985389863898738988389893899038991389923899338994389953899638997389983899939000390013900239003390043900539006390073900839009390103901139012390133901439015390163901739018390193902039021390223902339024390253902639027390283902939030390313903239033390343903539036390373903839039390403904139042390433904439045390463904739048390493905039051390523905339054390553905639057390583905939060390613906239063390643906539066390673906839069390703907139072390733907439075390763907739078390793908039081390823908339084390853908639087390883908939090390913909239093390943909539096390973909839099391003910139102391033910439105391063910739108391093911039111391123911339114391153911639117391183911939120391213912239123391243912539126391273912839129391303913139132391333913439135391363913739138391393914039141391423914339144391453914639147391483914939150391513915239153391543915539156391573915839159391603916139162391633916439165391663916739168391693917039171391723917339174391753917639177391783917939180391813918239183391843918539186391873918839189391903919139192391933919439195391963919739198391993920039201392023920339204392053920639207392083920939210392113921239213392143921539216392173921839219392203922139222392233922439225392263922739228392293923039231392323923339234392353923639237392383923939240392413924239243392443924539246392473924839249392503925139252392533925439255392563925739258392593926039261392623926339264392653926639267392683926939270392713927239273392743927539276392773927839279392803928139282392833928439285392863928739288392893929039291392923929339294392953929639297392983929939300393013930239303393043930539306393073930839309393103931139312393133931439315393163931739318393193932039321393223932339324393253932639327393283932939330393313933239333393343933539336393373933839339393403934139342393433934439345393463934739348393493935039351393523935339354393553935639357393583935939360393613936239363393643936539366393673936839369393703937139372393733937439375393763937739378393793938039381393823938339384393853938639387393883938939390393913939239393393943939539396393973939839399394003940139402394033940439405394063940739408394093941039411394123941339414394153941639417394183941939420394213942239423394243942539426394273942839429394303943139432394333943439435394363943739438394393944039441394423944339444394453944639447394483944939450394513945239453394543945539456394573945839459394603946139462394633946439465394663946739468394693947039471394723947339474394753947639477394783947939480394813948239483394843948539486394873948839489394903949139492394933949439495394963949739498394993950039501395023950339504395053950639507395083950939510395113951239513395143951539516395173951839519395203952139522395233952439525395263952739528395293953039531395323953339534395353953639537395383953939540395413954239543395443954539546395473954839549395503955139552395533955439555395563955739558395593956039561395623956339564395653956639567395683956939570395713957239573395743957539576395773957839579395803958139582395833958439585395863958739588395893959039591395923959339594395953959639597395983959939600396013960239603396043960539606396073960839609396103961139612396133961439615396163961739618396193962039621396223962339624396253962639627396283962939630396313963239633396343963539636396373963839639396403964139642396433964439645396463964739648396493965039651396523965339654396553965639657396583965939660396613966239663396643966539666396673966839669396703967139672396733967439675396763967739678396793968039681396823968339684396853968639687396883968939690396913969239693396943969539696396973969839699397003970139702397033970439705397063970739708397093971039711397123971339714397153971639717397183971939720397213972239723397243972539726397273972839729397303973139732397333973439735397363973739738397393974039741397423974339744397453974639747397483974939750397513975239753397543975539756397573975839759397603976139762397633976439765397663976739768397693977039771397723977339774397753977639777397783977939780397813978239783397843978539786397873978839789397903979139792397933979439795397963979739798397993980039801398023980339804398053980639807398083980939810398113981239813398143981539816398173981839819398203982139822398233982439825398263982739828398293983039831398323983339834398353983639837398383983939840398413984239843398443984539846398473984839849398503985139852398533985439855398563985739858398593986039861398623986339864398653986639867398683986939870398713987239873398743987539876398773987839879398803988139882398833988439885398863988739888398893989039891398923989339894398953989639897398983989939900399013990239903399043990539906399073990839909399103991139912399133991439915399163991739918399193992039921399223992339924399253992639927399283992939930399313993239933399343993539936399373993839939399403994139942399433994439945399463994739948399493995039951399523995339954399553995639957399583995939960399613996239963399643996539966399673996839969399703997139972399733997439975399763997739978399793998039981399823998339984399853998639987399883998939990399913999239993399943999539996399973999839999400004000140002400034000440005400064000740008400094001040011400124001340014400154001640017400184001940020400214002240023400244002540026400274002840029400304003140032400334003440035400364003740038400394004040041400424004340044400454004640047400484004940050400514005240053400544005540056400574005840059400604006140062400634006440065400664006740068400694007040071400724007340074400754007640077400784007940080400814008240083400844008540086400874008840089400904009140092400934009440095400964009740098400994010040101401024010340104401054010640107401084010940110401114011240113401144011540116401174011840119401204012140122401234012440125401264012740128401294013040131401324013340134401354013640137401384013940140401414014240143401444014540146401474014840149401504015140152401534015440155401564015740158401594016040161401624016340164401654016640167401684016940170401714017240173401744017540176401774017840179401804018140182401834018440185401864018740188401894019040191401924019340194401954019640197401984019940200402014020240203402044020540206402074020840209402104021140212402134021440215402164021740218402194022040221402224022340224402254022640227402284022940230402314023240233402344023540236402374023840239402404024140242402434024440245402464024740248402494025040251402524025340254402554025640257402584025940260402614026240263402644026540266402674026840269402704027140272402734027440275402764027740278402794028040281402824028340284402854028640287402884028940290402914029240293402944029540296402974029840299403004030140302403034030440305403064030740308403094031040311403124031340314403154031640317403184031940320403214032240323403244032540326403274032840329403304033140332403334033440335403364033740338403394034040341403424034340344403454034640347403484034940350403514035240353403544035540356403574035840359403604036140362403634036440365403664036740368403694037040371403724037340374403754037640377403784037940380403814038240383403844038540386403874038840389403904039140392403934039440395403964039740398403994040040401404024040340404404054040640407404084040940410404114041240413404144041540416404174041840419404204042140422404234042440425404264042740428404294043040431404324043340434404354043640437404384043940440404414044240443404444044540446404474044840449404504045140452404534045440455404564045740458404594046040461404624046340464404654046640467404684046940470404714047240473404744047540476404774047840479404804048140482404834048440485404864048740488404894049040491404924049340494404954049640497404984049940500405014050240503405044050540506405074050840509405104051140512405134051440515405164051740518405194052040521405224052340524405254052640527405284052940530405314053240533405344053540536405374053840539405404054140542405434054440545405464054740548405494055040551405524055340554405554055640557405584055940560405614056240563405644056540566405674056840569405704057140572405734057440575405764057740578405794058040581405824058340584405854058640587405884058940590405914059240593405944059540596405974059840599406004060140602406034060440605406064060740608406094061040611406124061340614406154061640617406184061940620406214062240623406244062540626406274062840629406304063140632406334063440635406364063740638406394064040641406424064340644406454064640647406484064940650406514065240653406544065540656406574065840659406604066140662406634066440665406664066740668406694067040671406724067340674406754067640677406784067940680406814068240683406844068540686406874068840689406904069140692406934069440695406964069740698406994070040701407024070340704407054070640707407084070940710407114071240713407144071540716407174071840719407204072140722407234072440725407264072740728407294073040731407324073340734407354073640737407384073940740407414074240743407444074540746407474074840749407504075140752407534075440755407564075740758407594076040761407624076340764407654076640767407684076940770407714077240773407744077540776407774077840779407804078140782407834078440785407864078740788407894079040791407924079340794407954079640797407984079940800408014080240803408044080540806408074080840809408104081140812408134081440815408164081740818408194082040821408224082340824408254082640827408284082940830408314083240833408344083540836408374083840839408404084140842408434084440845408464084740848408494085040851408524085340854408554085640857408584085940860408614086240863408644086540866408674086840869408704087140872408734087440875408764087740878408794088040881408824088340884408854088640887408884088940890408914089240893408944089540896408974089840899409004090140902409034090440905409064090740908409094091040911409124091340914409154091640917409184091940920409214092240923409244092540926409274092840929409304093140932409334093440935409364093740938409394094040941409424094340944409454094640947409484094940950409514095240953409544095540956409574095840959409604096140962409634096440965409664096740968409694097040971409724097340974409754097640977409784097940980409814098240983409844098540986409874098840989409904099140992409934099440995409964099740998409994100041001410024100341004410054100641007410084100941010410114101241013410144101541016410174101841019410204102141022410234102441025410264102741028410294103041031410324103341034410354103641037410384103941040410414104241043410444104541046410474104841049410504105141052410534105441055410564105741058410594106041061410624106341064410654106641067410684106941070410714107241073410744107541076410774107841079410804108141082410834108441085410864108741088410894109041091410924109341094410954109641097410984109941100411014110241103411044110541106411074110841109411104111141112411134111441115411164111741118411194112041121411224112341124411254112641127411284112941130411314113241133411344113541136411374113841139411404114141142411434114441145411464114741148411494115041151411524115341154411554115641157411584115941160411614116241163411644116541166411674116841169411704117141172411734117441175411764117741178411794118041181411824118341184411854118641187411884118941190411914119241193411944119541196411974119841199412004120141202412034120441205412064120741208412094121041211412124121341214412154121641217412184121941220412214122241223412244122541226412274122841229412304123141232412334123441235412364123741238412394124041241412424124341244412454124641247412484124941250412514125241253412544125541256412574125841259412604126141262412634126441265412664126741268412694127041271412724127341274412754127641277412784127941280412814128241283412844128541286412874128841289412904129141292412934129441295412964129741298412994130041301413024130341304413054130641307413084130941310413114131241313413144131541316413174131841319413204132141322413234132441325413264132741328413294133041331413324133341334413354133641337413384133941340413414134241343413444134541346413474134841349413504135141352413534135441355413564135741358413594136041361413624136341364413654136641367413684136941370413714137241373413744137541376413774137841379413804138141382413834138441385413864138741388413894139041391413924139341394413954139641397413984139941400414014140241403414044140541406414074140841409414104141141412414134141441415414164141741418414194142041421414224142341424414254142641427414284142941430414314143241433414344143541436414374143841439414404144141442414434144441445414464144741448414494145041451414524145341454414554145641457414584145941460414614146241463414644146541466414674146841469414704147141472414734147441475414764147741478414794148041481414824148341484414854148641487414884148941490414914149241493414944149541496414974149841499415004150141502415034150441505415064150741508415094151041511415124151341514415154151641517415184151941520415214152241523415244152541526415274152841529415304153141532415334153441535415364153741538415394154041541415424154341544415454154641547415484154941550415514155241553415544155541556415574155841559415604156141562415634156441565415664156741568415694157041571415724157341574415754157641577415784157941580415814158241583415844158541586415874158841589415904159141592415934159441595415964159741598415994160041601416024160341604416054160641607416084160941610416114161241613416144161541616416174161841619416204162141622416234162441625416264162741628416294163041631416324163341634416354163641637416384163941640416414164241643416444164541646416474164841649416504165141652416534165441655416564165741658416594166041661416624166341664416654166641667416684166941670416714167241673416744167541676416774167841679416804168141682416834168441685416864168741688416894169041691416924169341694416954169641697416984169941700417014170241703417044170541706417074170841709417104171141712417134171441715417164171741718417194172041721417224172341724417254172641727417284172941730417314173241733417344173541736417374173841739417404174141742417434174441745417464174741748417494175041751417524175341754417554175641757417584175941760417614176241763417644176541766417674176841769417704177141772417734177441775417764177741778417794178041781417824178341784417854178641787417884178941790417914179241793417944179541796417974179841799418004180141802418034180441805418064180741808418094181041811418124181341814418154181641817418184181941820418214182241823418244182541826418274182841829418304183141832418334183441835418364183741838418394184041841418424184341844418454184641847418484184941850418514185241853418544185541856418574185841859418604186141862418634186441865418664186741868418694187041871418724187341874418754187641877418784187941880418814188241883418844188541886418874188841889418904189141892418934189441895418964189741898418994190041901419024190341904419054190641907419084190941910419114191241913419144191541916419174191841919419204192141922419234192441925419264192741928419294193041931419324193341934419354193641937419384193941940419414194241943419444194541946419474194841949419504195141952419534195441955419564195741958419594196041961419624196341964419654196641967419684196941970419714197241973419744197541976419774197841979419804198141982419834198441985419864198741988419894199041991419924199341994419954199641997419984199942000420014200242003420044200542006420074200842009420104201142012420134201442015420164201742018420194202042021420224202342024420254202642027420284202942030420314203242033420344203542036420374203842039420404204142042420434204442045420464204742048420494205042051420524205342054420554205642057420584205942060420614206242063420644206542066420674206842069420704207142072420734207442075420764207742078420794208042081420824208342084420854208642087420884208942090420914209242093420944209542096420974209842099421004210142102421034210442105421064210742108421094211042111421124211342114421154211642117421184211942120421214212242123421244212542126421274212842129421304213142132421334213442135421364213742138421394214042141421424214342144421454214642147421484214942150421514215242153421544215542156421574215842159421604216142162421634216442165421664216742168421694217042171421724217342174421754217642177421784217942180421814218242183421844218542186421874218842189421904219142192421934219442195421964219742198421994220042201422024220342204422054220642207422084220942210422114221242213422144221542216422174221842219422204222142222422234222442225422264222742228422294223042231422324223342234422354223642237422384223942240422414224242243422444224542246422474224842249422504225142252422534225442255422564225742258422594226042261422624226342264422654226642267422684226942270422714227242273422744227542276422774227842279422804228142282422834228442285422864228742288422894229042291422924229342294422954229642297422984229942300423014230242303423044230542306423074230842309423104231142312423134231442315423164231742318423194232042321423224232342324423254232642327423284232942330423314233242333423344233542336423374233842339423404234142342423434234442345423464234742348423494235042351423524235342354423554235642357423584235942360423614236242363423644236542366423674236842369423704237142372423734237442375423764237742378423794238042381423824238342384423854238642387423884238942390423914239242393423944239542396423974239842399424004240142402424034240442405424064240742408424094241042411424124241342414424154241642417424184241942420424214242242423424244242542426424274242842429424304243142432424334243442435424364243742438424394244042441424424244342444424454244642447424484244942450424514245242453424544245542456424574245842459424604246142462424634246442465424664246742468424694247042471424724247342474424754247642477424784247942480424814248242483424844248542486424874248842489424904249142492424934249442495424964249742498424994250042501425024250342504425054250642507425084250942510425114251242513425144251542516425174251842519425204252142522425234252442525425264252742528425294253042531425324253342534425354253642537425384253942540425414254242543425444254542546425474254842549425504255142552425534255442555425564255742558425594256042561425624256342564425654256642567425684256942570425714257242573425744257542576425774257842579425804258142582425834258442585425864258742588425894259042591425924259342594425954259642597425984259942600426014260242603426044260542606426074260842609426104261142612426134261442615426164261742618426194262042621426224262342624426254262642627426284262942630426314263242633426344263542636426374263842639426404264142642426434264442645426464264742648426494265042651426524265342654426554265642657426584265942660426614266242663426644266542666426674266842669426704267142672426734267442675426764267742678426794268042681426824268342684426854268642687426884268942690426914269242693426944269542696426974269842699427004270142702427034270442705427064270742708427094271042711427124271342714427154271642717427184271942720427214272242723427244272542726427274272842729427304273142732427334273442735427364273742738427394274042741427424274342744427454274642747427484274942750427514275242753427544275542756427574275842759427604276142762427634276442765427664276742768427694277042771427724277342774427754277642777427784277942780427814278242783427844278542786427874278842789427904279142792427934279442795427964279742798427994280042801428024280342804428054280642807428084280942810428114281242813428144281542816428174281842819428204282142822428234282442825428264282742828428294283042831428324283342834428354283642837428384283942840428414284242843428444284542846428474284842849428504285142852428534285442855428564285742858428594286042861428624286342864428654286642867428684286942870428714287242873428744287542876428774287842879428804288142882428834288442885428864288742888428894289042891428924289342894428954289642897428984289942900429014290242903429044290542906429074290842909429104291142912429134291442915429164291742918429194292042921429224292342924429254292642927429284292942930429314293242933429344293542936429374293842939429404294142942429434294442945429464294742948429494295042951429524295342954429554295642957429584295942960429614296242963429644296542966429674296842969429704297142972429734297442975429764297742978429794298042981429824298342984429854298642987429884298942990429914299242993429944299542996429974299842999430004300143002430034300443005430064300743008430094301043011430124301343014430154301643017430184301943020430214302243023430244302543026430274302843029430304303143032430334303443035430364303743038430394304043041430424304343044430454304643047430484304943050430514305243053430544305543056430574305843059430604306143062430634306443065430664306743068430694307043071430724307343074430754307643077430784307943080430814308243083430844308543086430874308843089430904309143092430934309443095430964309743098430994310043101431024310343104431054310643107431084310943110431114311243113431144311543116431174311843119431204312143122431234312443125431264312743128431294313043131431324313343134431354313643137431384313943140431414314243143431444314543146431474314843149431504315143152431534315443155431564315743158431594316043161431624316343164431654316643167431684316943170431714317243173431744317543176431774317843179431804318143182431834318443185431864318743188431894319043191431924319343194431954319643197431984319943200432014320243203432044320543206432074320843209432104321143212432134321443215432164321743218432194322043221432224322343224432254322643227432284322943230432314323243233432344323543236432374323843239432404324143242432434324443245432464324743248432494325043251432524325343254432554325643257432584325943260432614326243263432644326543266432674326843269432704327143272432734327443275432764327743278432794328043281432824328343284432854328643287432884328943290432914329243293432944329543296432974329843299433004330143302433034330443305433064330743308433094331043311433124331343314433154331643317433184331943320433214332243323433244332543326433274332843329433304333143332433334333443335433364333743338433394334043341433424334343344433454334643347433484334943350433514335243353433544335543356433574335843359433604336143362433634336443365433664336743368433694337043371433724337343374433754337643377433784337943380433814338243383433844338543386433874338843389433904339143392433934339443395433964339743398433994340043401434024340343404434054340643407434084340943410434114341243413434144341543416434174341843419434204342143422434234342443425434264342743428434294343043431434324343343434434354343643437434384343943440434414344243443434444344543446434474344843449434504345143452434534345443455434564345743458434594346043461434624346343464434654346643467434684346943470434714347243473434744347543476434774347843479434804348143482434834348443485434864348743488434894349043491434924349343494434954349643497434984349943500435014350243503435044350543506435074350843509435104351143512435134351443515435164351743518435194352043521435224352343524435254352643527435284352943530435314353243533435344353543536435374353843539435404354143542435434354443545435464354743548435494355043551435524355343554435554355643557435584355943560435614356243563435644356543566435674356843569435704357143572435734357443575435764357743578435794358043581435824358343584435854358643587435884358943590435914359243593435944359543596435974359843599436004360143602436034360443605436064360743608436094361043611436124361343614436154361643617436184361943620436214362243623436244362543626436274362843629436304363143632436334363443635436364363743638436394364043641436424364343644436454364643647436484364943650436514365243653436544365543656436574365843659436604366143662436634366443665436664366743668436694367043671436724367343674436754367643677436784367943680436814368243683436844368543686436874368843689436904369143692436934369443695436964369743698436994370043701437024370343704437054370643707437084370943710437114371243713437144371543716437174371843719437204372143722437234372443725437264372743728437294373043731437324373343734437354373643737437384373943740437414374243743437444374543746437474374843749437504375143752437534375443755437564375743758437594376043761437624376343764437654376643767437684376943770437714377243773437744377543776437774377843779437804378143782437834378443785437864378743788437894379043791437924379343794437954379643797437984379943800438014380243803438044380543806438074380843809438104381143812438134381443815438164381743818438194382043821438224382343824438254382643827438284382943830438314383243833438344383543836438374383843839438404384143842438434384443845438464384743848438494385043851438524385343854438554385643857438584385943860438614386243863438644386543866438674386843869438704387143872438734387443875438764387743878438794388043881438824388343884438854388643887438884388943890438914389243893438944389543896438974389843899439004390143902439034390443905439064390743908439094391043911439124391343914439154391643917439184391943920439214392243923439244392543926439274392843929439304393143932439334393443935439364393743938439394394043941439424394343944439454394643947439484394943950439514395243953439544395543956439574395843959439604396143962439634396443965439664396743968439694397043971439724397343974439754397643977439784397943980439814398243983439844398543986439874398843989439904399143992439934399443995439964399743998439994400044001440024400344004440054400644007440084400944010440114401244013440144401544016440174401844019440204402144022440234402444025440264402744028440294403044031440324403344034440354403644037440384403944040440414404244043440444404544046440474404844049440504405144052440534405444055440564405744058440594406044061440624406344064440654406644067440684406944070440714407244073440744407544076440774407844079440804408144082440834408444085440864408744088440894409044091440924409344094440954409644097440984409944100441014410244103441044410544106441074410844109441104411144112441134411444115441164411744118441194412044121441224412344124441254412644127441284412944130441314413244133441344413544136441374413844139441404414144142441434414444145441464414744148441494415044151441524415344154441554415644157441584415944160441614416244163441644416544166441674416844169441704417144172441734417444175441764417744178441794418044181441824418344184441854418644187441884418944190441914419244193441944419544196441974419844199442004420144202442034420444205442064420744208442094421044211442124421344214442154421644217442184421944220442214422244223442244422544226442274422844229442304423144232442334423444235442364423744238442394424044241442424424344244442454424644247442484424944250442514425244253442544425544256442574425844259442604426144262442634426444265442664426744268442694427044271442724427344274442754427644277442784427944280442814428244283442844428544286442874428844289442904429144292442934429444295442964429744298442994430044301443024430344304443054430644307443084430944310443114431244313443144431544316443174431844319443204432144322443234432444325443264432744328443294433044331443324433344334443354433644337443384433944340443414434244343443444434544346443474434844349443504435144352443534435444355443564435744358443594436044361443624436344364443654436644367443684436944370443714437244373443744437544376443774437844379443804438144382443834438444385443864438744388443894439044391443924439344394443954439644397443984439944400444014440244403444044440544406444074440844409444104441144412444134441444415444164441744418444194442044421444224442344424444254442644427444284442944430444314443244433444344443544436444374443844439444404444144442444434444444445444464444744448444494445044451444524445344454444554445644457444584445944460444614446244463444644446544466444674446844469444704447144472444734447444475444764447744478444794448044481444824448344484444854448644487444884448944490444914449244493444944449544496444974449844499445004450144502445034450444505445064450744508445094451044511445124451344514445154451644517445184451944520445214452244523445244452544526445274452844529445304453144532445334453444535445364453744538445394454044541445424454344544445454454644547445484454944550445514455244553445544455544556445574455844559445604456144562445634456444565445664456744568445694457044571445724457344574445754457644577445784457944580445814458244583445844458544586445874458844589445904459144592445934459444595445964459744598445994460044601446024460344604446054460644607446084460944610446114461244613446144461544616446174461844619446204462144622446234462444625446264462744628446294463044631446324463344634446354463644637446384463944640446414464244643446444464544646446474464844649446504465144652446534465444655446564465744658446594466044661446624466344664446654466644667446684466944670446714467244673446744467544676446774467844679446804468144682446834468444685446864468744688446894469044691446924469344694446954469644697446984469944700447014470244703447044470544706447074470844709447104471144712447134471444715447164471744718447194472044721447224472344724447254472644727447284472944730447314473244733447344473544736447374473844739447404474144742447434474444745447464474744748447494475044751447524475344754447554475644757447584475944760447614476244763447644476544766447674476844769447704477144772447734477444775447764477744778447794478044781447824478344784447854478644787447884478944790447914479244793447944479544796447974479844799448004480144802448034480444805448064480744808448094481044811448124481344814448154481644817448184481944820448214482244823448244482544826448274482844829448304483144832448334483444835448364483744838448394484044841448424484344844448454484644847448484484944850448514485244853448544485544856448574485844859448604486144862448634486444865448664486744868448694487044871448724487344874448754487644877448784487944880448814488244883448844488544886448874488844889448904489144892448934489444895448964489744898448994490044901449024490344904449054490644907449084490944910449114491244913449144491544916449174491844919449204492144922449234492444925449264492744928449294493044931449324493344934449354493644937449384493944940449414494244943449444494544946449474494844949449504495144952449534495444955449564495744958449594496044961449624496344964449654496644967449684496944970449714497244973449744497544976449774497844979449804498144982449834498444985449864498744988449894499044991449924499344994449954499644997449984499945000450014500245003450044500545006450074500845009450104501145012450134501445015450164501745018450194502045021450224502345024450254502645027450284502945030450314503245033450344503545036450374503845039450404504145042450434504445045450464504745048450494505045051450524505345054450554505645057450584505945060450614506245063450644506545066450674506845069450704507145072450734507445075450764507745078450794508045081450824508345084450854508645087450884508945090450914509245093450944509545096450974509845099451004510145102451034510445105451064510745108451094511045111451124511345114451154511645117451184511945120451214512245123451244512545126451274512845129451304513145132451334513445135451364513745138451394514045141451424514345144451454514645147451484514945150451514515245153451544515545156451574515845159451604516145162451634516445165451664516745168451694517045171451724517345174451754517645177451784517945180451814518245183451844518545186451874518845189451904519145192451934519445195451964519745198451994520045201452024520345204452054520645207452084520945210452114521245213452144521545216452174521845219452204522145222452234522445225452264522745228452294523045231452324523345234452354523645237452384523945240452414524245243452444524545246452474524845249452504525145252452534525445255452564525745258452594526045261452624526345264452654526645267452684526945270452714527245273452744527545276452774527845279452804528145282452834528445285452864528745288452894529045291452924529345294452954529645297452984529945300453014530245303453044530545306453074530845309453104531145312453134531445315453164531745318453194532045321453224532345324453254532645327453284532945330453314533245333453344533545336453374533845339453404534145342453434534445345453464534745348453494535045351453524535345354453554535645357453584535945360453614536245363453644536545366453674536845369453704537145372453734537445375453764537745378453794538045381453824538345384453854538645387453884538945390453914539245393453944539545396453974539845399454004540145402454034540445405454064540745408454094541045411454124541345414454154541645417454184541945420454214542245423454244542545426454274542845429454304543145432454334543445435454364543745438454394544045441454424544345444454454544645447454484544945450454514545245453454544545545456454574545845459454604546145462454634546445465454664546745468454694547045471454724547345474454754547645477454784547945480454814548245483454844548545486454874548845489454904549145492454934549445495454964549745498454994550045501455024550345504455054550645507455084550945510455114551245513455144551545516455174551845519455204552145522455234552445525455264552745528455294553045531455324553345534455354553645537455384553945540455414554245543455444554545546455474554845549455504555145552455534555445555455564555745558455594556045561455624556345564455654556645567455684556945570455714557245573455744557545576455774557845579455804558145582455834558445585455864558745588455894559045591455924559345594455954559645597455984559945600456014560245603456044560545606456074560845609456104561145612456134561445615456164561745618456194562045621456224562345624456254562645627456284562945630456314563245633456344563545636456374563845639456404564145642456434564445645456464564745648456494565045651456524565345654456554565645657456584565945660456614566245663456644566545666456674566845669456704567145672456734567445675456764567745678456794568045681456824568345684456854568645687456884568945690456914569245693456944569545696456974569845699457004570145702457034570445705457064570745708457094571045711457124571345714457154571645717457184571945720457214572245723457244572545726457274572845729457304573145732457334573445735457364573745738457394574045741457424574345744457454574645747457484574945750457514575245753457544575545756457574575845759457604576145762457634576445765457664576745768457694577045771457724577345774457754577645777457784577945780457814578245783457844578545786457874578845789457904579145792457934579445795457964579745798457994580045801458024580345804458054580645807458084580945810458114581245813458144581545816458174581845819458204582145822458234582445825458264582745828458294583045831458324583345834458354583645837458384583945840458414584245843458444584545846458474584845849458504585145852458534585445855458564585745858458594586045861458624586345864458654586645867458684586945870458714587245873458744587545876458774587845879458804588145882458834588445885458864588745888458894589045891458924589345894458954589645897458984589945900459014590245903459044590545906459074590845909459104591145912459134591445915459164591745918459194592045921459224592345924459254592645927459284592945930459314593245933459344593545936459374593845939459404594145942459434594445945459464594745948459494595045951459524595345954459554595645957459584595945960459614596245963459644596545966459674596845969459704597145972459734597445975459764597745978459794598045981459824598345984459854598645987459884598945990459914599245993459944599545996459974599845999460004600146002460034600446005460064600746008460094601046011460124601346014460154601646017460184601946020460214602246023460244602546026460274602846029460304603146032460334603446035460364603746038460394604046041460424604346044460454604646047460484604946050460514605246053460544605546056460574605846059460604606146062460634606446065460664606746068460694607046071460724607346074460754607646077460784607946080460814608246083460844608546086460874608846089460904609146092460934609446095460964609746098460994610046101461024610346104461054610646107461084610946110461114611246113461144611546116461174611846119461204612146122461234612446125461264612746128461294613046131461324613346134461354613646137461384613946140461414614246143461444614546146461474614846149461504615146152461534615446155461564615746158461594616046161461624616346164461654616646167461684616946170461714617246173461744617546176461774617846179461804618146182461834618446185461864618746188461894619046191461924619346194461954619646197461984619946200462014620246203462044620546206462074620846209462104621146212462134621446215462164621746218462194622046221462224622346224462254622646227462284622946230462314623246233462344623546236462374623846239462404624146242462434624446245462464624746248462494625046251462524625346254462554625646257462584625946260462614626246263462644626546266462674626846269462704627146272462734627446275462764627746278462794628046281462824628346284462854628646287462884628946290462914629246293462944629546296462974629846299463004630146302463034630446305463064630746308463094631046311463124631346314463154631646317463184631946320463214632246323463244632546326463274632846329463304633146332463334633446335463364633746338463394634046341463424634346344463454634646347463484634946350463514635246353463544635546356463574635846359463604636146362463634636446365463664636746368463694637046371463724637346374463754637646377463784637946380463814638246383463844638546386463874638846389463904639146392463934639446395463964639746398463994640046401464024640346404464054640646407464084640946410464114641246413464144641546416464174641846419464204642146422464234642446425464264642746428464294643046431464324643346434464354643646437464384643946440464414644246443464444644546446464474644846449464504645146452464534645446455464564645746458464594646046461464624646346464464654646646467464684646946470464714647246473464744647546476464774647846479464804648146482464834648446485464864648746488464894649046491464924649346494464954649646497464984649946500465014650246503465044650546506465074650846509465104651146512465134651446515465164651746518465194652046521465224652346524465254652646527465284652946530465314653246533465344653546536465374653846539465404654146542465434654446545465464654746548465494655046551465524655346554465554655646557465584655946560465614656246563465644656546566465674656846569465704657146572465734657446575465764657746578465794658046581465824658346584465854658646587465884658946590465914659246593465944659546596465974659846599466004660146602466034660446605466064660746608466094661046611466124661346614466154661646617466184661946620466214662246623466244662546626466274662846629466304663146632466334663446635466364663746638466394664046641466424664346644466454664646647466484664946650466514665246653466544665546656466574665846659466604666146662466634666446665466664666746668466694667046671466724667346674466754667646677466784667946680466814668246683466844668546686466874668846689466904669146692466934669446695466964669746698466994670046701467024670346704467054670646707467084670946710467114671246713467144671546716467174671846719467204672146722467234672446725467264672746728467294673046731467324673346734467354673646737467384673946740467414674246743467444674546746467474674846749467504675146752467534675446755467564675746758467594676046761467624676346764467654676646767467684676946770467714677246773467744677546776467774677846779467804678146782467834678446785467864678746788467894679046791467924679346794467954679646797467984679946800468014680246803468044680546806468074680846809468104681146812468134681446815468164681746818468194682046821468224682346824468254682646827468284682946830468314683246833468344683546836468374683846839468404684146842468434684446845468464684746848468494685046851468524685346854468554685646857468584685946860468614686246863468644686546866468674686846869468704687146872468734687446875468764687746878468794688046881468824688346884468854688646887468884688946890468914689246893468944689546896468974689846899469004690146902469034690446905469064690746908469094691046911469124691346914469154691646917469184691946920469214692246923469244692546926469274692846929469304693146932469334693446935469364693746938469394694046941469424694346944469454694646947469484694946950469514695246953469544695546956469574695846959469604696146962469634696446965469664696746968469694697046971469724697346974469754697646977469784697946980469814698246983469844698546986469874698846989469904699146992469934699446995469964699746998469994700047001470024700347004470054700647007470084700947010470114701247013470144701547016470174701847019470204702147022470234702447025470264702747028470294703047031470324703347034470354703647037470384703947040470414704247043470444704547046470474704847049470504705147052470534705447055470564705747058470594706047061470624706347064470654706647067470684706947070470714707247073470744707547076470774707847079470804708147082470834708447085470864708747088470894709047091470924709347094470954709647097470984709947100471014710247103471044710547106471074710847109471104711147112471134711447115471164711747118471194712047121471224712347124471254712647127471284712947130471314713247133471344713547136471374713847139471404714147142471434714447145471464714747148471494715047151471524715347154471554715647157471584715947160471614716247163471644716547166471674716847169471704717147172471734717447175471764717747178471794718047181471824718347184471854718647187471884718947190471914719247193471944719547196471974719847199472004720147202472034720447205472064720747208472094721047211472124721347214472154721647217472184721947220472214722247223472244722547226472274722847229472304723147232472334723447235472364723747238472394724047241472424724347244472454724647247472484724947250472514725247253472544725547256472574725847259472604726147262472634726447265472664726747268472694727047271472724727347274472754727647277472784727947280472814728247283472844728547286472874728847289472904729147292472934729447295472964729747298472994730047301473024730347304473054730647307473084730947310473114731247313473144731547316473174731847319473204732147322473234732447325473264732747328473294733047331473324733347334473354733647337473384733947340473414734247343473444734547346473474734847349473504735147352473534735447355473564735747358473594736047361473624736347364473654736647367473684736947370473714737247373473744737547376473774737847379473804738147382473834738447385473864738747388473894739047391473924739347394473954739647397473984739947400474014740247403474044740547406474074740847409474104741147412474134741447415474164741747418474194742047421474224742347424474254742647427474284742947430474314743247433474344743547436474374743847439474404744147442474434744447445474464744747448474494745047451474524745347454474554745647457474584745947460474614746247463474644746547466474674746847469474704747147472474734747447475474764747747478474794748047481474824748347484474854748647487474884748947490474914749247493474944749547496474974749847499475004750147502475034750447505475064750747508475094751047511475124751347514475154751647517475184751947520475214752247523475244752547526475274752847529475304753147532475334753447535475364753747538475394754047541475424754347544475454754647547475484754947550475514755247553475544755547556475574755847559475604756147562475634756447565475664756747568475694757047571475724757347574475754757647577475784757947580475814758247583475844758547586475874758847589475904759147592475934759447595475964759747598475994760047601476024760347604476054760647607476084760947610476114761247613476144761547616476174761847619476204762147622476234762447625476264762747628476294763047631476324763347634476354763647637476384763947640476414764247643476444764547646476474764847649476504765147652476534765447655476564765747658476594766047661476624766347664476654766647667476684766947670476714767247673476744767547676476774767847679476804768147682476834768447685476864768747688476894769047691476924769347694476954769647697476984769947700477014770247703477044770547706477074770847709477104771147712477134771447715477164771747718477194772047721477224772347724477254772647727477284772947730477314773247733477344773547736477374773847739477404774147742477434774447745477464774747748477494775047751477524775347754477554775647757477584775947760477614776247763477644776547766477674776847769477704777147772477734777447775477764777747778477794778047781477824778347784477854778647787477884778947790477914779247793477944779547796477974779847799478004780147802478034780447805478064780747808478094781047811478124781347814478154781647817478184781947820478214782247823478244782547826478274782847829478304783147832478334783447835478364783747838478394784047841478424784347844478454784647847478484784947850478514785247853478544785547856478574785847859478604786147862478634786447865478664786747868478694787047871478724787347874478754787647877478784787947880478814788247883478844788547886478874788847889478904789147892478934789447895478964789747898478994790047901479024790347904479054790647907479084790947910479114791247913479144791547916479174791847919479204792147922479234792447925479264792747928479294793047931479324793347934479354793647937479384793947940479414794247943479444794547946479474794847949479504795147952479534795447955479564795747958479594796047961479624796347964479654796647967479684796947970479714797247973479744797547976479774797847979479804798147982479834798447985479864798747988479894799047991479924799347994479954799647997479984799948000480014800248003480044800548006480074800848009480104801148012480134801448015480164801748018480194802048021480224802348024480254802648027480284802948030480314803248033480344803548036480374803848039480404804148042480434804448045480464804748048480494805048051480524805348054480554805648057480584805948060480614806248063480644806548066480674806848069480704807148072480734807448075480764807748078480794808048081480824808348084480854808648087480884808948090480914809248093480944809548096480974809848099481004810148102481034810448105481064810748108481094811048111481124811348114481154811648117481184811948120481214812248123481244812548126481274812848129481304813148132481334813448135481364813748138481394814048141481424814348144481454814648147481484814948150481514815248153481544815548156481574815848159481604816148162481634816448165481664816748168481694817048171481724817348174481754817648177481784817948180481814818248183481844818548186481874818848189481904819148192481934819448195481964819748198481994820048201482024820348204482054820648207482084820948210482114821248213482144821548216482174821848219482204822148222482234822448225482264822748228482294823048231482324823348234482354823648237482384823948240482414824248243482444824548246482474824848249482504825148252482534825448255482564825748258482594826048261482624826348264482654826648267482684826948270482714827248273482744827548276482774827848279482804828148282482834828448285482864828748288482894829048291482924829348294482954829648297482984829948300483014830248303483044830548306483074830848309483104831148312483134831448315483164831748318483194832048321483224832348324483254832648327483284832948330483314833248333483344833548336483374833848339483404834148342483434834448345483464834748348483494835048351483524835348354483554835648357483584835948360483614836248363483644836548366483674836848369483704837148372483734837448375483764837748378483794838048381483824838348384483854838648387483884838948390483914839248393483944839548396483974839848399484004840148402484034840448405484064840748408484094841048411484124841348414484154841648417484184841948420484214842248423484244842548426484274842848429484304843148432484334843448435484364843748438484394844048441484424844348444484454844648447484484844948450484514845248453484544845548456484574845848459484604846148462484634846448465484664846748468484694847048471484724847348474484754847648477484784847948480484814848248483484844848548486484874848848489484904849148492484934849448495484964849748498484994850048501485024850348504485054850648507485084850948510485114851248513485144851548516485174851848519485204852148522485234852448525485264852748528485294853048531485324853348534485354853648537485384853948540485414854248543485444854548546485474854848549485504855148552485534855448555485564855748558485594856048561485624856348564485654856648567485684856948570485714857248573485744857548576485774857848579485804858148582485834858448585485864858748588485894859048591485924859348594485954859648597485984859948600486014860248603486044860548606486074860848609486104861148612486134861448615486164861748618486194862048621486224862348624486254862648627486284862948630486314863248633486344863548636486374863848639486404864148642486434864448645486464864748648486494865048651486524865348654486554865648657486584865948660486614866248663486644866548666486674866848669486704867148672486734867448675486764867748678486794868048681486824868348684486854868648687486884868948690486914869248693486944869548696486974869848699487004870148702487034870448705487064870748708487094871048711487124871348714487154871648717487184871948720487214872248723487244872548726487274872848729487304873148732487334873448735487364873748738487394874048741487424874348744487454874648747487484874948750487514875248753487544875548756487574875848759487604876148762487634876448765487664876748768487694877048771487724877348774487754877648777487784877948780487814878248783487844878548786487874878848789487904879148792487934879448795487964879748798487994880048801488024880348804488054880648807488084880948810488114881248813488144881548816488174881848819488204882148822488234882448825488264882748828488294883048831488324883348834488354883648837488384883948840488414884248843488444884548846488474884848849488504885148852488534885448855488564885748858488594886048861488624886348864488654886648867488684886948870488714887248873488744887548876488774887848879488804888148882488834888448885488864888748888488894889048891488924889348894488954889648897488984889948900489014890248903489044890548906489074890848909489104891148912489134891448915489164891748918489194892048921489224892348924489254892648927489284892948930489314893248933489344893548936489374893848939489404894148942489434894448945489464894748948489494895048951489524895348954489554895648957489584895948960489614896248963489644896548966489674896848969489704897148972489734897448975489764897748978489794898048981489824898348984489854898648987489884898948990489914899248993489944899548996489974899848999490004900149002490034900449005490064900749008490094901049011490124901349014490154901649017490184901949020490214902249023490244902549026490274902849029490304903149032490334903449035490364903749038490394904049041490424904349044490454904649047490484904949050490514905249053490544905549056490574905849059490604906149062490634906449065490664906749068490694907049071490724907349074490754907649077490784907949080490814908249083490844908549086490874908849089490904909149092490934909449095490964909749098490994910049101491024910349104491054910649107491084910949110491114911249113491144911549116491174911849119491204912149122491234912449125491264912749128491294913049131491324913349134491354913649137491384913949140491414914249143491444914549146491474914849149491504915149152491534915449155491564915749158491594916049161491624916349164491654916649167491684916949170491714917249173491744917549176491774917849179491804918149182491834918449185491864918749188491894919049191491924919349194491954919649197491984919949200492014920249203492044920549206492074920849209492104921149212492134921449215492164921749218492194922049221492224922349224492254922649227492284922949230492314923249233492344923549236492374923849239492404924149242492434924449245492464924749248492494925049251492524925349254492554925649257492584925949260492614926249263492644926549266492674926849269492704927149272492734927449275492764927749278492794928049281492824928349284492854928649287492884928949290492914929249293492944929549296492974929849299493004930149302493034930449305493064930749308493094931049311493124931349314493154931649317493184931949320493214932249323493244932549326493274932849329493304933149332493334933449335493364933749338493394934049341493424934349344493454934649347493484934949350493514935249353493544935549356493574935849359493604936149362493634936449365493664936749368493694937049371493724937349374493754937649377493784937949380493814938249383493844938549386493874938849389493904939149392493934939449395493964939749398493994940049401494024940349404494054940649407494084940949410494114941249413494144941549416494174941849419494204942149422494234942449425494264942749428494294943049431494324943349434494354943649437494384943949440494414944249443494444944549446494474944849449494504945149452494534945449455494564945749458494594946049461494624946349464494654946649467494684946949470494714947249473494744947549476494774947849479494804948149482494834948449485494864948749488494894949049491494924949349494494954949649497494984949949500495014950249503495044950549506495074950849509495104951149512495134951449515495164951749518495194952049521495224952349524495254952649527495284952949530495314953249533495344953549536495374953849539495404954149542495434954449545495464954749548495494955049551495524955349554495554955649557495584955949560495614956249563495644956549566495674956849569495704957149572495734957449575495764957749578495794958049581495824958349584495854958649587495884958949590495914959249593495944959549596495974959849599496004960149602496034960449605496064960749608496094961049611496124961349614496154961649617496184961949620496214962249623496244962549626496274962849629496304963149632496334963449635496364963749638496394964049641496424964349644496454964649647496484964949650496514965249653496544965549656496574965849659496604966149662496634966449665496664966749668496694967049671496724967349674496754967649677496784967949680496814968249683496844968549686496874968849689496904969149692496934969449695496964969749698496994970049701497024970349704497054970649707497084970949710497114971249713497144971549716497174971849719497204972149722497234972449725497264972749728497294973049731497324973349734497354973649737497384973949740497414974249743497444974549746497474974849749497504975149752497534975449755497564975749758497594976049761497624976349764497654976649767497684976949770497714977249773497744977549776497774977849779497804978149782497834978449785497864978749788497894979049791497924979349794497954979649797497984979949800498014980249803498044980549806498074980849809498104981149812498134981449815498164981749818498194982049821498224982349824498254982649827498284982949830498314983249833498344983549836498374983849839498404984149842498434984449845498464984749848498494985049851498524985349854498554985649857498584985949860498614986249863498644986549866498674986849869498704987149872498734987449875498764987749878498794988049881498824988349884498854988649887498884988949890498914989249893498944989549896498974989849899499004990149902499034990449905499064990749908499094991049911499124991349914499154991649917499184991949920499214992249923499244992549926499274992849929499304993149932499334993449935499364993749938499394994049941499424994349944499454994649947499484994949950499514995249953499544995549956499574995849959499604996149962499634996449965499664996749968499694997049971499724997349974499754997649977499784997949980499814998249983499844998549986499874998849989499904999149992499934999449995499964999749998499995000050001500025000350004500055000650007500085000950010500115001250013500145001550016500175001850019500205002150022500235002450025500265002750028500295003050031500325003350034500355003650037500385003950040500415004250043500445004550046500475004850049500505005150052500535005450055500565005750058500595006050061500625006350064500655006650067500685006950070500715007250073500745007550076500775007850079500805008150082500835008450085500865008750088500895009050091500925009350094500955009650097500985009950100501015010250103501045010550106501075010850109501105011150112501135011450115501165011750118501195012050121501225012350124501255012650127501285012950130501315013250133501345013550136501375013850139501405014150142501435014450145501465014750148501495015050151501525015350154501555015650157501585015950160501615016250163501645016550166501675016850169501705017150172501735017450175501765017750178501795018050181501825018350184501855018650187501885018950190501915019250193501945019550196501975019850199502005020150202502035020450205502065020750208502095021050211502125021350214502155021650217502185021950220502215022250223502245022550226502275022850229502305023150232502335023450235502365023750238502395024050241502425024350244502455024650247502485024950250502515025250253502545025550256502575025850259502605026150262502635026450265502665026750268502695027050271502725027350274502755027650277502785027950280502815028250283502845028550286502875028850289502905029150292502935029450295502965029750298502995030050301503025030350304503055030650307503085030950310503115031250313503145031550316503175031850319503205032150322503235032450325503265032750328503295033050331503325033350334503355033650337503385033950340503415034250343503445034550346503475034850349503505035150352503535035450355503565035750358503595036050361503625036350364503655036650367503685036950370503715037250373503745037550376503775037850379503805038150382503835038450385503865038750388503895039050391503925039350394503955039650397503985039950400504015040250403504045040550406504075040850409504105041150412504135041450415504165041750418504195042050421504225042350424504255042650427504285042950430504315043250433504345043550436504375043850439504405044150442504435044450445504465044750448504495045050451504525045350454504555045650457504585045950460504615046250463504645046550466504675046850469504705047150472504735047450475504765047750478504795048050481504825048350484504855048650487504885048950490504915049250493504945049550496504975049850499505005050150502505035050450505505065050750508505095051050511505125051350514505155051650517505185051950520505215052250523505245052550526505275052850529505305053150532505335053450535505365053750538505395054050541505425054350544505455054650547505485054950550505515055250553505545055550556505575055850559505605056150562505635056450565505665056750568505695057050571505725057350574505755057650577505785057950580505815058250583505845058550586505875058850589505905059150592505935059450595505965059750598505995060050601506025060350604506055060650607506085060950610506115061250613506145061550616506175061850619506205062150622506235062450625506265062750628506295063050631506325063350634506355063650637506385063950640506415064250643506445064550646506475064850649506505065150652506535065450655506565065750658506595066050661506625066350664506655066650667506685066950670506715067250673506745067550676506775067850679506805068150682506835068450685506865068750688506895069050691506925069350694506955069650697506985069950700507015070250703507045070550706507075070850709507105071150712507135071450715507165071750718507195072050721507225072350724507255072650727507285072950730507315073250733507345073550736507375073850739507405074150742507435074450745507465074750748507495075050751507525075350754507555075650757507585075950760507615076250763507645076550766507675076850769507705077150772507735077450775507765077750778507795078050781507825078350784507855078650787507885078950790507915079250793507945079550796507975079850799508005080150802508035080450805508065080750808508095081050811508125081350814508155081650817508185081950820508215082250823508245082550826508275082850829508305083150832508335083450835508365083750838508395084050841508425084350844508455084650847508485084950850508515085250853508545085550856508575085850859508605086150862508635086450865508665086750868508695087050871508725087350874508755087650877508785087950880508815088250883508845088550886508875088850889508905089150892508935089450895508965089750898508995090050901509025090350904509055090650907509085090950910509115091250913509145091550916509175091850919509205092150922509235092450925509265092750928509295093050931509325093350934509355093650937509385093950940509415094250943509445094550946509475094850949509505095150952509535095450955509565095750958509595096050961509625096350964509655096650967509685096950970509715097250973509745097550976509775097850979509805098150982509835098450985509865098750988509895099050991509925099350994509955099650997509985099951000510015100251003510045100551006510075100851009510105101151012510135101451015510165101751018510195102051021510225102351024510255102651027510285102951030510315103251033510345103551036510375103851039510405104151042510435104451045510465104751048510495105051051510525105351054510555105651057510585105951060510615106251063510645106551066510675106851069510705107151072510735107451075510765107751078510795108051081510825108351084510855108651087510885108951090510915109251093510945109551096510975109851099511005110151102511035110451105511065110751108511095111051111511125111351114511155111651117511185111951120511215112251123511245112551126511275112851129511305113151132511335113451135511365113751138511395114051141511425114351144511455114651147511485114951150511515115251153511545115551156511575115851159511605116151162511635116451165511665116751168511695117051171511725117351174511755117651177511785117951180511815118251183511845118551186511875118851189511905119151192511935119451195511965119751198511995120051201512025120351204512055120651207512085120951210512115121251213512145121551216512175121851219512205122151222512235122451225512265122751228512295123051231512325123351234512355123651237512385123951240512415124251243512445124551246512475124851249512505125151252512535125451255512565125751258512595126051261512625126351264512655126651267512685126951270512715127251273512745127551276512775127851279512805128151282512835128451285512865128751288512895129051291512925129351294512955129651297512985129951300513015130251303513045130551306513075130851309513105131151312513135131451315513165131751318513195132051321513225132351324513255132651327513285132951330513315133251333513345133551336513375133851339513405134151342513435134451345513465134751348513495135051351513525135351354513555135651357513585135951360513615136251363513645136551366513675136851369513705137151372513735137451375513765137751378513795138051381513825138351384513855138651387513885138951390513915139251393513945139551396513975139851399514005140151402514035140451405514065140751408514095141051411514125141351414514155141651417514185141951420514215142251423514245142551426514275142851429514305143151432514335143451435514365143751438514395144051441514425144351444514455144651447514485144951450514515145251453514545145551456514575145851459514605146151462514635146451465514665146751468514695147051471514725147351474514755147651477514785147951480514815148251483514845148551486514875148851489514905149151492514935149451495514965149751498514995150051501515025150351504515055150651507515085150951510515115151251513515145151551516515175151851519515205152151522515235152451525515265152751528515295153051531515325153351534515355153651537515385153951540515415154251543515445154551546515475154851549515505155151552515535155451555515565155751558515595156051561515625156351564515655156651567515685156951570515715157251573515745157551576515775157851579515805158151582515835158451585515865158751588515895159051591515925159351594515955159651597515985159951600516015160251603516045160551606516075160851609516105161151612516135161451615516165161751618516195162051621516225162351624516255162651627516285162951630516315163251633516345163551636516375163851639516405164151642516435164451645516465164751648516495165051651516525165351654516555165651657516585165951660516615166251663516645166551666516675166851669516705167151672516735167451675516765167751678516795168051681516825168351684516855168651687516885168951690516915169251693516945169551696516975169851699517005170151702517035170451705517065170751708517095171051711517125171351714517155171651717517185171951720517215172251723517245172551726517275172851729517305173151732517335173451735517365173751738517395174051741517425174351744517455174651747517485174951750517515175251753517545175551756517575175851759517605176151762517635176451765517665176751768517695177051771517725177351774517755177651777517785177951780517815178251783517845178551786517875178851789517905179151792517935179451795517965179751798517995180051801518025180351804518055180651807518085180951810518115181251813518145181551816518175181851819518205182151822518235182451825518265182751828518295183051831518325183351834518355183651837518385183951840518415184251843518445184551846518475184851849518505185151852518535185451855518565185751858518595186051861518625186351864518655186651867518685186951870518715187251873518745187551876518775187851879518805188151882518835188451885518865188751888518895189051891518925189351894518955189651897518985189951900519015190251903519045190551906519075190851909519105191151912519135191451915519165191751918519195192051921519225192351924519255192651927519285192951930519315193251933519345193551936519375193851939519405194151942519435194451945519465194751948519495195051951519525195351954519555195651957519585195951960519615196251963519645196551966519675196851969519705197151972519735197451975519765197751978519795198051981519825198351984519855198651987519885198951990519915199251993519945199551996519975199851999520005200152002520035200452005520065200752008520095201052011520125201352014520155201652017520185201952020520215202252023520245202552026520275202852029520305203152032520335203452035520365203752038520395204052041520425204352044520455204652047520485204952050520515205252053520545205552056520575205852059520605206152062520635206452065520665206752068520695207052071520725207352074520755207652077520785207952080520815208252083520845208552086520875208852089520905209152092520935209452095520965209752098520995210052101521025210352104521055210652107521085210952110521115211252113521145211552116521175211852119521205212152122521235212452125521265212752128521295213052131521325213352134521355213652137521385213952140521415214252143521445214552146521475214852149521505215152152521535215452155521565215752158521595216052161521625216352164521655216652167521685216952170521715217252173521745217552176521775217852179521805218152182521835218452185521865218752188521895219052191521925219352194521955219652197521985219952200522015220252203522045220552206522075220852209522105221152212522135221452215522165221752218522195222052221522225222352224522255222652227522285222952230522315223252233522345223552236522375223852239522405224152242522435224452245522465224752248522495225052251522525225352254522555225652257522585225952260522615226252263522645226552266522675226852269522705227152272522735227452275522765227752278522795228052281522825228352284522855228652287522885228952290522915229252293522945229552296522975229852299523005230152302523035230452305523065230752308523095231052311523125231352314523155231652317523185231952320523215232252323523245232552326523275232852329523305233152332523335233452335523365233752338523395234052341523425234352344523455234652347523485234952350523515235252353523545235552356523575235852359523605236152362523635236452365523665236752368523695237052371523725237352374523755237652377523785237952380523815238252383523845238552386523875238852389523905239152392523935239452395523965239752398523995240052401524025240352404524055240652407524085240952410524115241252413524145241552416524175241852419524205242152422524235242452425524265242752428524295243052431524325243352434524355243652437524385243952440524415244252443524445244552446524475244852449524505245152452524535245452455524565245752458524595246052461524625246352464524655246652467524685246952470524715247252473524745247552476524775247852479524805248152482524835248452485524865248752488524895249052491524925249352494524955249652497524985249952500525015250252503525045250552506525075250852509525105251152512525135251452515525165251752518525195252052521525225252352524525255252652527525285252952530525315253252533525345253552536525375253852539525405254152542525435254452545525465254752548525495255052551525525255352554525555255652557525585255952560525615256252563525645256552566525675256852569525705257152572525735257452575525765257752578525795258052581525825258352584525855258652587525885258952590525915259252593525945259552596525975259852599526005260152602526035260452605526065260752608526095261052611526125261352614526155261652617526185261952620526215262252623526245262552626526275262852629526305263152632526335263452635526365263752638526395264052641526425264352644526455264652647526485264952650526515265252653526545265552656526575265852659526605266152662526635266452665526665266752668526695267052671526725267352674526755267652677526785267952680526815268252683526845268552686526875268852689526905269152692526935269452695526965269752698526995270052701527025270352704527055270652707527085270952710527115271252713527145271552716527175271852719527205272152722527235272452725527265272752728527295273052731527325273352734527355273652737527385273952740527415274252743527445274552746527475274852749527505275152752527535275452755527565275752758527595276052761527625276352764527655276652767527685276952770527715277252773527745277552776527775277852779527805278152782527835278452785527865278752788527895279052791527925279352794527955279652797527985279952800528015280252803528045280552806528075280852809528105281152812528135281452815528165281752818528195282052821528225282352824528255282652827528285282952830528315283252833528345283552836528375283852839528405284152842528435284452845528465284752848528495285052851528525285352854528555285652857528585285952860528615286252863528645286552866528675286852869528705287152872528735287452875528765287752878528795288052881528825288352884528855288652887528885288952890528915289252893528945289552896528975289852899529005290152902529035290452905529065290752908529095291052911529125291352914529155291652917529185291952920529215292252923529245292552926529275292852929529305293152932529335293452935529365293752938529395294052941529425294352944529455294652947529485294952950529515295252953529545295552956529575295852959529605296152962529635296452965529665296752968529695297052971529725297352974529755297652977529785297952980529815298252983529845298552986529875298852989529905299152992529935299452995529965299752998529995300053001530025300353004530055300653007530085300953010530115301253013530145301553016530175301853019530205302153022530235302453025530265302753028530295303053031530325303353034530355303653037530385303953040530415304253043530445304553046530475304853049530505305153052530535305453055530565305753058530595306053061530625306353064530655306653067530685306953070530715307253073530745307553076530775307853079530805308153082530835308453085530865308753088530895309053091530925309353094530955309653097530985309953100531015310253103531045310553106531075310853109531105311153112531135311453115531165311753118531195312053121531225312353124531255312653127531285312953130531315313253133531345313553136531375313853139531405314153142531435314453145531465314753148531495315053151531525315353154531555315653157531585315953160531615316253163531645316553166531675316853169531705317153172531735317453175531765317753178531795318053181531825318353184531855318653187531885318953190531915319253193531945319553196531975319853199532005320153202532035320453205532065320753208532095321053211532125321353214532155321653217532185321953220532215322253223532245322553226532275322853229532305323153232532335323453235532365323753238532395324053241532425324353244532455324653247532485324953250532515325253253532545325553256532575325853259532605326153262532635326453265532665326753268532695327053271532725327353274532755327653277532785327953280532815328253283532845328553286532875328853289532905329153292532935329453295532965329753298532995330053301533025330353304533055330653307533085330953310533115331253313533145331553316533175331853319533205332153322533235332453325533265332753328533295333053331533325333353334533355333653337533385333953340533415334253343533445334553346533475334853349533505335153352533535335453355533565335753358533595336053361533625336353364533655336653367533685336953370533715337253373533745337553376533775337853379533805338153382533835338453385533865338753388533895339053391533925339353394533955339653397533985339953400534015340253403534045340553406534075340853409534105341153412534135341453415534165341753418534195342053421534225342353424534255342653427534285342953430534315343253433534345343553436534375343853439534405344153442534435344453445534465344753448534495345053451534525345353454534555345653457534585345953460534615346253463534645346553466534675346853469534705347153472534735347453475534765347753478534795348053481534825348353484534855348653487534885348953490534915349253493534945349553496534975349853499535005350153502535035350453505535065350753508535095351053511535125351353514535155351653517535185351953520535215352253523535245352553526535275352853529535305353153532535335353453535535365353753538535395354053541535425354353544535455354653547535485354953550535515355253553535545355553556535575355853559535605356153562535635356453565535665356753568535695357053571535725357353574535755357653577535785357953580535815358253583535845358553586535875358853589535905359153592535935359453595535965359753598535995360053601536025360353604536055360653607536085360953610536115361253613536145361553616536175361853619536205362153622536235362453625536265362753628536295363053631536325363353634536355363653637536385363953640536415364253643536445364553646536475364853649536505365153652536535365453655536565365753658536595366053661536625366353664536655366653667536685366953670536715367253673536745367553676536775367853679536805368153682536835368453685536865368753688536895369053691536925369353694536955369653697536985369953700537015370253703537045370553706537075370853709537105371153712537135371453715537165371753718537195372053721537225372353724537255372653727537285372953730537315373253733537345373553736537375373853739537405374153742537435374453745537465374753748537495375053751537525375353754537555375653757537585375953760537615376253763537645376553766537675376853769537705377153772537735377453775537765377753778537795378053781537825378353784537855378653787537885378953790537915379253793537945379553796537975379853799538005380153802538035380453805538065380753808538095381053811538125381353814538155381653817538185381953820538215382253823538245382553826538275382853829538305383153832538335383453835538365383753838538395384053841538425384353844538455384653847538485384953850538515385253853538545385553856538575385853859538605386153862538635386453865538665386753868538695387053871538725387353874538755387653877538785387953880538815388253883538845388553886538875388853889538905389153892538935389453895538965389753898538995390053901539025390353904539055390653907539085390953910539115391253913539145391553916539175391853919539205392153922539235392453925539265392753928539295393053931539325393353934539355393653937539385393953940539415394253943539445394553946539475394853949539505395153952539535395453955539565395753958539595396053961539625396353964539655396653967539685396953970539715397253973539745397553976539775397853979539805398153982539835398453985539865398753988539895399053991539925399353994539955399653997539985399954000540015400254003540045400554006540075400854009540105401154012540135401454015540165401754018540195402054021540225402354024540255402654027540285402954030540315403254033540345403554036540375403854039540405404154042540435404454045540465404754048540495405054051540525405354054540555405654057540585405954060540615406254063540645406554066540675406854069540705407154072540735407454075540765407754078540795408054081540825408354084540855408654087540885408954090540915409254093540945409554096540975409854099541005410154102541035410454105541065410754108541095411054111541125411354114541155411654117541185411954120541215412254123541245412554126541275412854129541305413154132541335413454135541365413754138541395414054141541425414354144541455414654147541485414954150541515415254153541545415554156541575415854159541605416154162541635416454165541665416754168541695417054171541725417354174541755417654177541785417954180541815418254183541845418554186541875418854189541905419154192541935419454195541965419754198541995420054201542025420354204542055420654207542085420954210542115421254213542145421554216542175421854219542205422154222542235422454225542265422754228542295423054231542325423354234542355423654237542385423954240542415424254243542445424554246542475424854249542505425154252542535425454255542565425754258542595426054261542625426354264542655426654267542685426954270542715427254273542745427554276542775427854279542805428154282542835428454285542865428754288542895429054291542925429354294542955429654297542985429954300543015430254303543045430554306543075430854309543105431154312543135431454315543165431754318543195432054321543225432354324543255432654327543285432954330543315433254333543345433554336543375433854339543405434154342543435434454345543465434754348543495435054351543525435354354543555435654357543585435954360543615436254363543645436554366543675436854369543705437154372543735437454375543765437754378543795438054381543825438354384543855438654387543885438954390543915439254393543945439554396543975439854399544005440154402544035440454405544065440754408544095441054411544125441354414544155441654417544185441954420544215442254423544245442554426544275442854429544305443154432544335443454435544365443754438544395444054441544425444354444544455444654447544485444954450544515445254453544545445554456544575445854459544605446154462544635446454465544665446754468544695447054471544725447354474544755447654477544785447954480544815448254483544845448554486544875448854489544905449154492544935449454495544965449754498544995450054501545025450354504545055450654507545085450954510545115451254513545145451554516545175451854519545205452154522545235452454525545265452754528545295453054531545325453354534545355453654537545385453954540545415454254543545445454554546545475454854549545505455154552545535455454555545565455754558545595456054561545625456354564545655456654567545685456954570545715457254573545745457554576545775457854579545805458154582545835458454585545865458754588545895459054591545925459354594545955459654597545985459954600546015460254603546045460554606546075460854609546105461154612546135461454615546165461754618546195462054621546225462354624546255462654627546285462954630546315463254633546345463554636546375463854639546405464154642546435464454645546465464754648546495465054651546525465354654546555465654657546585465954660546615466254663546645466554666546675466854669546705467154672546735467454675546765467754678546795468054681546825468354684546855468654687546885468954690546915469254693546945469554696546975469854699547005470154702547035470454705547065470754708547095471054711547125471354714547155471654717547185471954720547215472254723547245472554726547275472854729547305473154732547335473454735547365473754738547395474054741547425474354744547455474654747547485474954750547515475254753547545475554756547575475854759547605476154762547635476454765547665476754768547695477054771547725477354774547755477654777547785477954780547815478254783547845478554786547875478854789547905479154792547935479454795547965479754798547995480054801548025480354804548055480654807548085480954810548115481254813548145481554816548175481854819548205482154822548235482454825548265482754828548295483054831548325483354834548355483654837548385483954840548415484254843548445484554846548475484854849548505485154852548535485454855548565485754858548595486054861548625486354864548655486654867548685486954870548715487254873548745487554876548775487854879548805488154882548835488454885548865488754888548895489054891548925489354894548955489654897548985489954900549015490254903549045490554906549075490854909549105491154912549135491454915549165491754918549195492054921549225492354924549255492654927549285492954930549315493254933549345493554936549375493854939549405494154942549435494454945549465494754948549495495054951549525495354954549555495654957549585495954960549615496254963549645496554966549675496854969549705497154972549735497454975549765497754978549795498054981549825498354984549855498654987549885498954990549915499254993549945499554996549975499854999550005500155002550035500455005550065500755008550095501055011550125501355014550155501655017550185501955020550215502255023550245502555026550275502855029550305503155032550335503455035550365503755038550395504055041550425504355044550455504655047550485504955050550515505255053550545505555056550575505855059550605506155062550635506455065550665506755068550695507055071550725507355074550755507655077550785507955080550815508255083550845508555086550875508855089550905509155092550935509455095550965509755098550995510055101551025510355104551055510655107551085510955110551115511255113551145511555116551175511855119551205512155122551235512455125551265512755128551295513055131551325513355134551355513655137551385513955140551415514255143551445514555146551475514855149551505515155152551535515455155551565515755158551595516055161551625516355164551655516655167551685516955170551715517255173551745517555176551775517855179551805518155182551835518455185551865518755188551895519055191551925519355194551955519655197551985519955200552015520255203552045520555206552075520855209552105521155212552135521455215552165521755218552195522055221552225522355224552255522655227552285522955230552315523255233552345523555236552375523855239552405524155242552435524455245552465524755248552495525055251552525525355254552555525655257552585525955260552615526255263552645526555266552675526855269552705527155272552735527455275552765527755278552795528055281552825528355284552855528655287552885528955290552915529255293552945529555296552975529855299553005530155302553035530455305553065530755308553095531055311553125531355314553155531655317553185531955320553215532255323553245532555326553275532855329553305533155332553335533455335553365533755338553395534055341553425534355344553455534655347553485534955350553515535255353553545535555356553575535855359553605536155362553635536455365553665536755368553695537055371553725537355374553755537655377553785537955380553815538255383553845538555386553875538855389553905539155392553935539455395553965539755398553995540055401554025540355404554055540655407554085540955410554115541255413554145541555416554175541855419554205542155422554235542455425554265542755428554295543055431554325543355434554355543655437554385543955440554415544255443554445544555446554475544855449554505545155452554535545455455554565545755458554595546055461554625546355464554655546655467554685546955470554715547255473554745547555476554775547855479554805548155482554835548455485554865548755488554895549055491554925549355494554955549655497554985549955500555015550255503555045550555506555075550855509555105551155512555135551455515555165551755518555195552055521555225552355524555255552655527555285552955530555315553255533555345553555536555375553855539555405554155542555435554455545555465554755548555495555055551555525555355554555555555655557555585555955560555615556255563555645556555566555675556855569555705557155572555735557455575555765557755578555795558055581555825558355584555855558655587555885558955590555915559255593555945559555596555975559855599556005560155602556035560455605556065560755608556095561055611556125561355614556155561655617556185561955620556215562255623556245562555626556275562855629556305563155632556335563455635556365563755638556395564055641556425564355644556455564655647556485564955650556515565255653556545565555656556575565855659556605566155662556635566455665556665566755668556695567055671556725567355674556755567655677556785567955680556815568255683556845568555686556875568855689556905569155692556935569455695556965569755698556995570055701557025570355704557055570655707557085570955710557115571255713557145571555716557175571855719557205572155722557235572455725557265572755728557295573055731557325573355734557355573655737557385573955740557415574255743557445574555746557475574855749557505575155752557535575455755557565575755758557595576055761557625576355764557655576655767557685576955770557715577255773557745577555776557775577855779557805578155782557835578455785557865578755788557895579055791557925579355794557955579655797557985579955800558015580255803558045580555806558075580855809558105581155812558135581455815558165581755818558195582055821558225582355824558255582655827558285582955830558315583255833558345583555836558375583855839558405584155842558435584455845558465584755848558495585055851558525585355854558555585655857558585585955860558615586255863558645586555866558675586855869558705587155872558735587455875558765587755878558795588055881558825588355884558855588655887558885588955890558915589255893558945589555896558975589855899559005590155902559035590455905559065590755908559095591055911559125591355914559155591655917559185591955920559215592255923559245592555926559275592855929559305593155932559335593455935559365593755938559395594055941559425594355944559455594655947559485594955950559515595255953559545595555956559575595855959559605596155962559635596455965559665596755968559695597055971559725597355974559755597655977559785597955980559815598255983559845598555986559875598855989559905599155992559935599455995559965599755998559995600056001560025600356004560055600656007560085600956010560115601256013560145601556016560175601856019560205602156022560235602456025560265602756028560295603056031560325603356034560355603656037560385603956040560415604256043560445604556046560475604856049560505605156052560535605456055560565605756058560595606056061560625606356064560655606656067560685606956070560715607256073560745607556076560775607856079560805608156082560835608456085560865608756088560895609056091560925609356094560955609656097560985609956100561015610256103561045610556106561075610856109561105611156112561135611456115561165611756118561195612056121561225612356124561255612656127561285612956130561315613256133561345613556136561375613856139561405614156142561435614456145561465614756148561495615056151561525615356154561555615656157561585615956160561615616256163561645616556166561675616856169561705617156172561735617456175561765617756178561795618056181561825618356184561855618656187561885618956190561915619256193561945619556196561975619856199562005620156202562035620456205562065620756208562095621056211562125621356214562155621656217562185621956220562215622256223562245622556226562275622856229562305623156232562335623456235562365623756238562395624056241562425624356244562455624656247562485624956250562515625256253562545625556256562575625856259562605626156262562635626456265562665626756268562695627056271562725627356274562755627656277562785627956280562815628256283562845628556286562875628856289562905629156292562935629456295562965629756298562995630056301563025630356304563055630656307563085630956310563115631256313563145631556316563175631856319563205632156322563235632456325563265632756328563295633056331563325633356334563355633656337563385633956340563415634256343563445634556346563475634856349563505635156352563535635456355563565635756358563595636056361563625636356364563655636656367563685636956370563715637256373563745637556376563775637856379563805638156382563835638456385563865638756388563895639056391563925639356394563955639656397563985639956400564015640256403564045640556406564075640856409564105641156412564135641456415564165641756418564195642056421564225642356424564255642656427564285642956430564315643256433564345643556436564375643856439564405644156442564435644456445564465644756448564495645056451564525645356454564555645656457564585645956460564615646256463564645646556466564675646856469564705647156472564735647456475564765647756478564795648056481564825648356484564855648656487564885648956490564915649256493564945649556496564975649856499565005650156502565035650456505565065650756508565095651056511565125651356514565155651656517565185651956520565215652256523565245652556526565275652856529565305653156532565335653456535565365653756538565395654056541565425654356544565455654656547565485654956550565515655256553565545655556556565575655856559565605656156562565635656456565565665656756568565695657056571565725657356574565755657656577565785657956580565815658256583565845658556586565875658856589565905659156592565935659456595565965659756598565995660056601566025660356604566055660656607566085660956610566115661256613566145661556616566175661856619566205662156622566235662456625566265662756628566295663056631566325663356634566355663656637566385663956640566415664256643566445664556646566475664856649566505665156652566535665456655566565665756658566595666056661566625666356664566655666656667566685666956670566715667256673566745667556676566775667856679566805668156682566835668456685566865668756688566895669056691566925669356694566955669656697566985669956700567015670256703567045670556706567075670856709567105671156712567135671456715567165671756718567195672056721567225672356724567255672656727567285672956730567315673256733567345673556736567375673856739567405674156742567435674456745567465674756748567495675056751567525675356754567555675656757567585675956760567615676256763567645676556766567675676856769567705677156772567735677456775567765677756778567795678056781567825678356784567855678656787567885678956790567915679256793567945679556796567975679856799568005680156802568035680456805568065680756808568095681056811568125681356814568155681656817568185681956820568215682256823568245682556826568275682856829568305683156832568335683456835568365683756838568395684056841568425684356844568455684656847568485684956850568515685256853568545685556856568575685856859568605686156862568635686456865568665686756868568695687056871568725687356874568755687656877568785687956880568815688256883568845688556886568875688856889568905689156892568935689456895568965689756898568995690056901569025690356904569055690656907569085690956910569115691256913569145691556916569175691856919569205692156922569235692456925569265692756928569295693056931569325693356934569355693656937569385693956940569415694256943569445694556946569475694856949569505695156952569535695456955569565695756958569595696056961569625696356964569655696656967569685696956970569715697256973569745697556976569775697856979569805698156982569835698456985569865698756988569895699056991569925699356994569955699656997569985699957000570015700257003570045700557006570075700857009570105701157012570135701457015570165701757018570195702057021570225702357024570255702657027570285702957030570315703257033570345703557036570375703857039570405704157042570435704457045570465704757048570495705057051570525705357054570555705657057570585705957060570615706257063570645706557066570675706857069570705707157072570735707457075570765707757078570795708057081570825708357084570855708657087570885708957090570915709257093570945709557096570975709857099571005710157102571035710457105571065710757108571095711057111571125711357114571155711657117571185711957120571215712257123571245712557126571275712857129571305713157132571335713457135571365713757138571395714057141571425714357144571455714657147571485714957150571515715257153571545715557156571575715857159571605716157162571635716457165571665716757168571695717057171571725717357174571755717657177571785717957180571815718257183571845718557186571875718857189571905719157192571935719457195571965719757198571995720057201572025720357204572055720657207572085720957210572115721257213572145721557216572175721857219572205722157222572235722457225572265722757228572295723057231572325723357234572355723657237572385723957240572415724257243572445724557246572475724857249572505725157252572535725457255572565725757258572595726057261572625726357264572655726657267572685726957270572715727257273572745727557276572775727857279572805728157282572835728457285572865728757288572895729057291572925729357294572955729657297572985729957300573015730257303573045730557306573075730857309573105731157312573135731457315573165731757318573195732057321573225732357324573255732657327573285732957330573315733257333573345733557336573375733857339573405734157342573435734457345573465734757348573495735057351573525735357354573555735657357573585735957360573615736257363573645736557366573675736857369573705737157372573735737457375573765737757378573795738057381573825738357384573855738657387573885738957390573915739257393573945739557396573975739857399574005740157402574035740457405574065740757408574095741057411574125741357414574155741657417574185741957420574215742257423574245742557426574275742857429574305743157432574335743457435574365743757438574395744057441574425744357444574455744657447574485744957450574515745257453574545745557456574575745857459574605746157462574635746457465574665746757468574695747057471574725747357474574755747657477574785747957480574815748257483574845748557486574875748857489574905749157492574935749457495574965749757498574995750057501575025750357504575055750657507575085750957510575115751257513575145751557516575175751857519575205752157522575235752457525575265752757528575295753057531575325753357534575355753657537575385753957540575415754257543575445754557546575475754857549575505755157552575535755457555575565755757558575595756057561575625756357564575655756657567575685756957570575715757257573575745757557576575775757857579575805758157582575835758457585575865758757588575895759057591575925759357594575955759657597575985759957600576015760257603576045760557606576075760857609576105761157612576135761457615576165761757618576195762057621576225762357624576255762657627576285762957630576315763257633576345763557636576375763857639576405764157642576435764457645576465764757648576495765057651576525765357654576555765657657576585765957660576615766257663576645766557666576675766857669576705767157672576735767457675576765767757678576795768057681576825768357684576855768657687576885768957690576915769257693576945769557696576975769857699577005770157702577035770457705577065770757708577095771057711577125771357714577155771657717577185771957720577215772257723577245772557726577275772857729577305773157732577335773457735577365773757738577395774057741577425774357744577455774657747577485774957750577515775257753577545775557756577575775857759577605776157762577635776457765577665776757768577695777057771577725777357774577755777657777577785777957780577815778257783577845778557786577875778857789577905779157792577935779457795577965779757798577995780057801578025780357804578055780657807578085780957810578115781257813578145781557816578175781857819578205782157822578235782457825578265782757828578295783057831578325783357834578355783657837578385783957840578415784257843578445784557846578475784857849578505785157852578535785457855578565785757858578595786057861578625786357864578655786657867578685786957870578715787257873578745787557876578775787857879578805788157882578835788457885578865788757888578895789057891578925789357894578955789657897578985789957900579015790257903579045790557906579075790857909579105791157912579135791457915579165791757918579195792057921579225792357924579255792657927579285792957930579315793257933579345793557936579375793857939579405794157942579435794457945579465794757948579495795057951579525795357954579555795657957579585795957960579615796257963579645796557966579675796857969579705797157972579735797457975579765797757978579795798057981579825798357984579855798657987579885798957990579915799257993579945799557996579975799857999580005800158002580035800458005580065800758008580095801058011580125801358014580155801658017580185801958020580215802258023580245802558026580275802858029580305803158032580335803458035580365803758038580395804058041580425804358044580455804658047580485804958050580515805258053580545805558056580575805858059580605806158062580635806458065580665806758068580695807058071580725807358074580755807658077580785807958080580815808258083580845808558086580875808858089580905809158092580935809458095580965809758098580995810058101581025810358104581055810658107581085810958110581115811258113581145811558116581175811858119581205812158122581235812458125581265812758128581295813058131581325813358134581355813658137581385813958140581415814258143581445814558146581475814858149581505815158152581535815458155581565815758158581595816058161581625816358164581655816658167581685816958170581715817258173581745817558176581775817858179581805818158182581835818458185581865818758188581895819058191581925819358194581955819658197581985819958200582015820258203582045820558206582075820858209582105821158212582135821458215582165821758218582195822058221582225822358224582255822658227582285822958230582315823258233582345823558236582375823858239582405824158242582435824458245582465824758248582495825058251582525825358254582555825658257582585825958260582615826258263582645826558266582675826858269582705827158272582735827458275582765827758278582795828058281582825828358284582855828658287582885828958290582915829258293582945829558296582975829858299583005830158302583035830458305583065830758308583095831058311583125831358314583155831658317583185831958320583215832258323583245832558326583275832858329583305833158332583335833458335583365833758338583395834058341583425834358344583455834658347583485834958350583515835258353583545835558356583575835858359583605836158362583635836458365583665836758368583695837058371583725837358374583755837658377583785837958380583815838258383583845838558386583875838858389583905839158392583935839458395583965839758398583995840058401584025840358404584055840658407584085840958410584115841258413584145841558416584175841858419584205842158422584235842458425584265842758428584295843058431584325843358434584355843658437584385843958440584415844258443584445844558446584475844858449584505845158452584535845458455584565845758458584595846058461584625846358464584655846658467584685846958470584715847258473584745847558476584775847858479584805848158482584835848458485584865848758488584895849058491584925849358494584955849658497584985849958500585015850258503585045850558506585075850858509585105851158512585135851458515585165851758518585195852058521585225852358524585255852658527585285852958530585315853258533585345853558536585375853858539585405854158542585435854458545585465854758548585495855058551585525855358554585555855658557585585855958560585615856258563585645856558566585675856858569585705857158572585735857458575585765857758578585795858058581585825858358584585855858658587585885858958590585915859258593585945859558596585975859858599586005860158602586035860458605586065860758608586095861058611586125861358614586155861658617586185861958620586215862258623586245862558626586275862858629586305863158632586335863458635586365863758638586395864058641586425864358644586455864658647586485864958650586515865258653586545865558656586575865858659586605866158662586635866458665586665866758668586695867058671586725867358674586755867658677586785867958680586815868258683586845868558686586875868858689586905869158692586935869458695586965869758698586995870058701587025870358704587055870658707587085870958710587115871258713587145871558716587175871858719587205872158722587235872458725587265872758728587295873058731587325873358734587355873658737587385873958740587415874258743587445874558746587475874858749587505875158752587535875458755587565875758758587595876058761587625876358764587655876658767587685876958770587715877258773587745877558776587775877858779587805878158782587835878458785587865878758788587895879058791587925879358794587955879658797587985879958800588015880258803588045880558806588075880858809588105881158812588135881458815588165881758818588195882058821588225882358824588255882658827588285882958830588315883258833588345883558836588375883858839588405884158842588435884458845588465884758848588495885058851588525885358854588555885658857588585885958860588615886258863588645886558866588675886858869588705887158872588735887458875588765887758878588795888058881588825888358884588855888658887588885888958890588915889258893588945889558896588975889858899589005890158902589035890458905589065890758908589095891058911589125891358914589155891658917589185891958920589215892258923589245892558926589275892858929589305893158932589335893458935589365893758938589395894058941589425894358944589455894658947589485894958950589515895258953589545895558956589575895858959589605896158962589635896458965589665896758968589695897058971589725897358974589755897658977589785897958980589815898258983589845898558986589875898858989589905899158992589935899458995589965899758998589995900059001590025900359004590055900659007590085900959010590115901259013590145901559016590175901859019590205902159022590235902459025590265902759028590295903059031590325903359034590355903659037590385903959040590415904259043590445904559046590475904859049590505905159052590535905459055590565905759058590595906059061590625906359064590655906659067590685906959070590715907259073590745907559076590775907859079590805908159082590835908459085590865908759088590895909059091590925909359094590955909659097590985909959100591015910259103591045910559106591075910859109591105911159112591135911459115591165911759118591195912059121591225912359124591255912659127591285912959130591315913259133591345913559136591375913859139591405914159142591435914459145591465914759148591495915059151591525915359154591555915659157591585915959160591615916259163591645916559166591675916859169591705917159172591735917459175591765917759178591795918059181591825918359184591855918659187591885918959190591915919259193591945919559196591975919859199592005920159202592035920459205592065920759208592095921059211592125921359214592155921659217592185921959220592215922259223592245922559226592275922859229592305923159232592335923459235592365923759238592395924059241592425924359244592455924659247592485924959250592515925259253592545925559256592575925859259592605926159262592635926459265592665926759268592695927059271592725927359274592755927659277592785927959280592815928259283592845928559286592875928859289592905929159292592935929459295592965929759298592995930059301593025930359304593055930659307593085930959310593115931259313593145931559316593175931859319593205932159322593235932459325593265932759328593295933059331593325933359334593355933659337593385933959340593415934259343593445934559346593475934859349593505935159352593535935459355593565935759358593595936059361593625936359364593655936659367593685936959370593715937259373593745937559376593775937859379593805938159382593835938459385593865938759388593895939059391593925939359394593955939659397593985939959400594015940259403594045940559406594075940859409594105941159412594135941459415594165941759418594195942059421594225942359424594255942659427594285942959430594315943259433594345943559436594375943859439594405944159442594435944459445594465944759448594495945059451594525945359454594555945659457594585945959460594615946259463594645946559466594675946859469594705947159472594735947459475594765947759478594795948059481594825948359484594855948659487594885948959490594915949259493594945949559496594975949859499595005950159502595035950459505595065950759508595095951059511595125951359514595155951659517595185951959520595215952259523595245952559526595275952859529595305953159532595335953459535595365953759538595395954059541595425954359544595455954659547595485954959550595515955259553595545955559556595575955859559595605956159562595635956459565595665956759568595695957059571595725957359574595755957659577595785957959580595815958259583595845958559586595875958859589595905959159592595935959459595595965959759598595995960059601596025960359604596055960659607596085960959610596115961259613596145961559616596175961859619596205962159622596235962459625596265962759628596295963059631596325963359634596355963659637596385963959640596415964259643596445964559646596475964859649596505965159652596535965459655596565965759658596595966059661596625966359664596655966659667596685966959670596715967259673596745967559676596775967859679596805968159682596835968459685596865968759688596895969059691596925969359694596955969659697596985969959700597015970259703597045970559706597075970859709597105971159712597135971459715597165971759718597195972059721597225972359724597255972659727597285972959730597315973259733597345973559736597375973859739597405974159742597435974459745597465974759748597495975059751597525975359754597555975659757597585975959760597615976259763597645976559766597675976859769597705977159772597735977459775597765977759778597795978059781597825978359784597855978659787597885978959790597915979259793597945979559796597975979859799598005980159802598035980459805598065980759808598095981059811598125981359814598155981659817598185981959820598215982259823598245982559826598275982859829598305983159832598335983459835598365983759838598395984059841598425984359844598455984659847598485984959850598515985259853598545985559856598575985859859598605986159862598635986459865598665986759868598695987059871598725987359874598755987659877598785987959880598815988259883598845988559886598875988859889598905989159892598935989459895598965989759898598995990059901599025990359904599055990659907599085990959910599115991259913599145991559916599175991859919599205992159922599235992459925599265992759928599295993059931599325993359934599355993659937599385993959940599415994259943599445994559946599475994859949599505995159952599535995459955599565995759958599595996059961599625996359964599655996659967599685996959970599715997259973599745997559976599775997859979599805998159982599835998459985599865998759988599895999059991599925999359994599955999659997599985999960000600016000260003600046000560006600076000860009600106001160012600136001460015600166001760018600196002060021600226002360024600256002660027600286002960030600316003260033600346003560036600376003860039600406004160042600436004460045600466004760048600496005060051600526005360054600556005660057600586005960060600616006260063600646006560066600676006860069600706007160072600736007460075600766007760078600796008060081600826008360084600856008660087600886008960090600916009260093600946009560096600976009860099601006010160102601036010460105601066010760108601096011060111601126011360114601156011660117601186011960120601216012260123601246012560126601276012860129601306013160132601336013460135601366013760138601396014060141601426014360144601456014660147601486014960150601516015260153601546015560156601576015860159601606016160162601636016460165601666016760168601696017060171601726017360174601756017660177601786017960180601816018260183601846018560186601876018860189601906019160192601936019460195601966019760198601996020060201602026020360204602056020660207602086020960210602116021260213602146021560216602176021860219602206022160222602236022460225602266022760228602296023060231602326023360234602356023660237602386023960240602416024260243602446024560246602476024860249602506025160252602536025460255602566025760258602596026060261602626026360264602656026660267602686026960270602716027260273602746027560276602776027860279602806028160282602836028460285602866028760288602896029060291602926029360294602956029660297602986029960300603016030260303603046030560306603076030860309603106031160312603136031460315603166031760318603196032060321603226032360324603256032660327603286032960330603316033260333603346033560336603376033860339603406034160342603436034460345603466034760348603496035060351603526035360354603556035660357603586035960360603616036260363603646036560366603676036860369603706037160372603736037460375603766037760378603796038060381603826038360384603856038660387603886038960390603916039260393603946039560396603976039860399604006040160402604036040460405604066040760408604096041060411604126041360414604156041660417604186041960420604216042260423604246042560426604276042860429604306043160432604336043460435604366043760438604396044060441604426044360444604456044660447604486044960450604516045260453604546045560456604576045860459604606046160462604636046460465604666046760468604696047060471604726047360474604756047660477604786047960480604816048260483604846048560486604876048860489604906049160492604936049460495604966049760498604996050060501605026050360504605056050660507605086050960510605116051260513605146051560516605176051860519605206052160522605236052460525605266052760528605296053060531605326053360534605356053660537605386053960540605416054260543605446054560546605476054860549605506055160552605536055460555605566055760558605596056060561605626056360564605656056660567605686056960570605716057260573605746057560576605776057860579605806058160582605836058460585605866058760588605896059060591605926059360594605956059660597605986059960600606016060260603606046060560606606076060860609606106061160612606136061460615606166061760618606196062060621606226062360624606256062660627606286062960630606316063260633606346063560636606376063860639606406064160642606436064460645606466064760648606496065060651606526065360654606556065660657606586065960660606616066260663606646066560666606676066860669606706067160672606736067460675606766067760678606796068060681606826068360684606856068660687606886068960690606916069260693606946069560696606976069860699607006070160702607036070460705607066070760708607096071060711607126071360714607156071660717607186071960720607216072260723607246072560726607276072860729607306073160732607336073460735607366073760738607396074060741607426074360744607456074660747607486074960750607516075260753607546075560756607576075860759607606076160762607636076460765607666076760768607696077060771607726077360774607756077660777607786077960780607816078260783607846078560786607876078860789607906079160792607936079460795607966079760798607996080060801608026080360804608056080660807608086080960810608116081260813608146081560816608176081860819608206082160822608236082460825608266082760828608296083060831608326083360834608356083660837608386083960840608416084260843608446084560846608476084860849608506085160852608536085460855608566085760858608596086060861608626086360864608656086660867608686086960870608716087260873608746087560876608776087860879608806088160882608836088460885608866088760888608896089060891608926089360894608956089660897608986089960900609016090260903609046090560906609076090860909609106091160912609136091460915609166091760918609196092060921609226092360924609256092660927609286092960930609316093260933609346093560936609376093860939609406094160942609436094460945609466094760948609496095060951609526095360954609556095660957609586095960960609616096260963609646096560966609676096860969609706097160972609736097460975609766097760978609796098060981609826098360984609856098660987609886098960990609916099260993609946099560996609976099860999610006100161002610036100461005610066100761008610096101061011610126101361014610156101661017610186101961020610216102261023610246102561026610276102861029610306103161032610336103461035610366103761038610396104061041610426104361044610456104661047610486104961050610516105261053610546105561056610576105861059610606106161062610636106461065610666106761068610696107061071610726107361074610756107661077610786107961080610816108261083610846108561086610876108861089610906109161092610936109461095610966109761098610996110061101611026110361104611056110661107611086110961110611116111261113611146111561116611176111861119611206112161122611236112461125611266112761128611296113061131611326113361134611356113661137611386113961140611416114261143611446114561146611476114861149611506115161152611536115461155611566115761158611596116061161611626116361164611656116661167611686116961170611716117261173611746117561176611776117861179611806118161182611836118461185611866118761188611896119061191611926119361194611956119661197611986119961200612016120261203612046120561206612076120861209612106121161212612136121461215612166121761218612196122061221612226122361224612256122661227612286122961230612316123261233612346123561236612376123861239612406124161242612436124461245612466124761248612496125061251612526125361254612556125661257612586125961260612616126261263612646126561266612676126861269612706127161272612736127461275612766127761278612796128061281612826128361284612856128661287612886128961290612916129261293612946129561296612976129861299613006130161302613036130461305613066130761308613096131061311613126131361314613156131661317613186131961320613216132261323613246132561326613276132861329613306133161332613336133461335613366133761338613396134061341613426134361344613456134661347613486134961350613516135261353613546135561356613576135861359613606136161362613636136461365613666136761368613696137061371613726137361374613756137661377613786137961380613816138261383613846138561386613876138861389613906139161392613936139461395613966139761398613996140061401614026140361404614056140661407614086140961410614116141261413614146141561416614176141861419614206142161422614236142461425614266142761428614296143061431614326143361434614356143661437614386143961440614416144261443614446144561446614476144861449614506145161452614536145461455614566145761458614596146061461614626146361464614656146661467614686146961470614716147261473614746147561476614776147861479614806148161482614836148461485614866148761488614896149061491614926149361494614956149661497614986149961500615016150261503615046150561506615076150861509615106151161512615136151461515615166151761518615196152061521615226152361524615256152661527615286152961530615316153261533615346153561536615376153861539615406154161542615436154461545615466154761548615496155061551615526155361554615556155661557615586155961560615616156261563615646156561566615676156861569615706157161572615736157461575615766157761578615796158061581615826158361584615856158661587615886158961590615916159261593615946159561596615976159861599616006160161602616036160461605616066160761608616096161061611616126161361614616156161661617616186161961620616216162261623616246162561626616276162861629616306163161632616336163461635616366163761638616396164061641616426164361644616456164661647616486164961650616516165261653616546165561656616576165861659616606166161662616636166461665616666166761668616696167061671616726167361674616756167661677616786167961680616816168261683616846168561686616876168861689616906169161692616936169461695616966169761698616996170061701617026170361704617056170661707617086170961710617116171261713617146171561716617176171861719617206172161722617236172461725617266172761728617296173061731617326173361734617356173661737617386173961740617416174261743617446174561746617476174861749617506175161752617536175461755617566175761758617596176061761617626176361764617656176661767617686176961770617716177261773617746177561776617776177861779617806178161782617836178461785617866178761788617896179061791617926179361794617956179661797617986179961800618016180261803618046180561806618076180861809618106181161812618136181461815618166181761818618196182061821618226182361824618256182661827618286182961830618316183261833618346183561836618376183861839618406184161842618436184461845618466184761848618496185061851618526185361854618556185661857618586185961860618616186261863618646186561866618676186861869618706187161872618736187461875618766187761878618796188061881618826188361884618856188661887618886188961890618916189261893618946189561896618976189861899619006190161902619036190461905619066190761908619096191061911619126191361914619156191661917619186191961920619216192261923619246192561926619276192861929619306193161932619336193461935619366193761938619396194061941619426194361944619456194661947619486194961950619516195261953619546195561956619576195861959619606196161962619636196461965619666196761968619696197061971619726197361974619756197661977619786197961980619816198261983619846198561986619876198861989619906199161992619936199461995619966199761998619996200062001620026200362004620056200662007620086200962010620116201262013620146201562016620176201862019620206202162022620236202462025620266202762028620296203062031620326203362034620356203662037620386203962040620416204262043620446204562046620476204862049620506205162052620536205462055620566205762058620596206062061620626206362064620656206662067620686206962070620716207262073620746207562076620776207862079620806208162082620836208462085620866208762088620896209062091620926209362094620956209662097620986209962100621016210262103621046210562106621076210862109621106211162112621136211462115621166211762118621196212062121621226212362124621256212662127621286212962130621316213262133621346213562136621376213862139621406214162142621436214462145621466214762148621496215062151621526215362154621556215662157621586215962160621616216262163621646216562166621676216862169621706217162172621736217462175621766217762178621796218062181621826218362184621856218662187621886218962190621916219262193621946219562196621976219862199622006220162202622036220462205622066220762208622096221062211622126221362214622156221662217622186221962220622216222262223622246222562226622276222862229622306223162232622336223462235622366223762238622396224062241622426224362244622456224662247622486224962250622516225262253622546225562256622576225862259622606226162262622636226462265622666226762268622696227062271622726227362274622756227662277622786227962280622816228262283622846228562286622876228862289622906229162292622936229462295622966229762298622996230062301623026230362304623056230662307623086230962310623116231262313623146231562316623176231862319623206232162322623236232462325623266232762328623296233062331623326233362334623356233662337623386233962340623416234262343623446234562346623476234862349623506235162352623536235462355623566235762358623596236062361623626236362364623656236662367623686236962370623716237262373623746237562376623776237862379623806238162382623836238462385623866238762388623896239062391623926239362394623956239662397623986239962400624016240262403624046240562406624076240862409624106241162412624136241462415624166241762418624196242062421624226242362424624256242662427624286242962430624316243262433624346243562436624376243862439624406244162442624436244462445624466244762448624496245062451624526245362454624556245662457624586245962460624616246262463624646246562466624676246862469624706247162472624736247462475624766247762478624796248062481624826248362484624856248662487624886248962490624916249262493624946249562496624976249862499625006250162502625036250462505625066250762508625096251062511625126251362514625156251662517625186251962520625216252262523625246252562526625276252862529625306253162532625336253462535625366253762538625396254062541625426254362544625456254662547625486254962550625516255262553625546255562556625576255862559625606256162562625636256462565625666256762568625696257062571625726257362574625756257662577625786257962580625816258262583625846258562586625876258862589625906259162592625936259462595625966259762598625996260062601626026260362604626056260662607626086260962610626116261262613626146261562616626176261862619626206262162622626236262462625626266262762628626296263062631626326263362634626356263662637626386263962640626416264262643626446264562646626476264862649626506265162652626536265462655626566265762658626596266062661626626266362664626656266662667626686266962670626716267262673626746267562676626776267862679626806268162682626836268462685626866268762688626896269062691626926269362694626956269662697626986269962700627016270262703627046270562706627076270862709627106271162712627136271462715627166271762718627196272062721627226272362724627256272662727627286272962730627316273262733627346273562736627376273862739627406274162742627436274462745627466274762748627496275062751627526275362754627556275662757627586275962760627616276262763627646276562766627676276862769627706277162772627736277462775627766277762778627796278062781627826278362784627856278662787627886278962790627916279262793627946279562796627976279862799628006280162802628036280462805628066280762808628096281062811628126281362814628156281662817628186281962820628216282262823628246282562826628276282862829628306283162832628336283462835628366283762838628396284062841628426284362844628456284662847628486284962850628516285262853628546285562856628576285862859628606286162862628636286462865628666286762868628696287062871628726287362874628756287662877628786287962880628816288262883628846288562886628876288862889628906289162892628936289462895628966289762898628996290062901629026290362904629056290662907629086290962910629116291262913629146291562916629176291862919629206292162922629236292462925629266292762928629296293062931629326293362934629356293662937629386293962940629416294262943629446294562946629476294862949629506295162952629536295462955629566295762958629596296062961629626296362964629656296662967629686296962970629716297262973629746297562976629776297862979629806298162982629836298462985629866298762988629896299062991629926299362994629956299662997629986299963000630016300263003630046300563006630076300863009630106301163012630136301463015630166301763018630196302063021630226302363024630256302663027630286302963030630316303263033630346303563036630376303863039630406304163042630436304463045630466304763048630496305063051630526305363054630556305663057630586305963060630616306263063630646306563066630676306863069630706307163072630736307463075630766307763078630796308063081630826308363084630856308663087630886308963090630916309263093630946309563096630976309863099631006310163102631036310463105631066310763108631096311063111631126311363114631156311663117631186311963120631216312263123631246312563126631276312863129631306313163132631336313463135631366313763138631396314063141631426314363144631456314663147631486314963150631516315263153631546315563156631576315863159631606316163162631636316463165631666316763168631696317063171631726317363174631756317663177631786317963180631816318263183631846318563186631876318863189631906319163192631936319463195631966319763198631996320063201632026320363204632056320663207632086320963210632116321263213632146321563216632176321863219632206322163222632236322463225632266322763228632296323063231632326323363234632356323663237632386323963240632416324263243632446324563246632476324863249632506325163252632536325463255632566325763258632596326063261632626326363264632656326663267632686326963270632716327263273632746327563276632776327863279632806328163282632836328463285632866328763288632896329063291632926329363294632956329663297632986329963300633016330263303633046330563306633076330863309633106331163312633136331463315633166331763318633196332063321633226332363324633256332663327633286332963330633316333263333633346333563336633376333863339633406334163342633436334463345633466334763348633496335063351633526335363354633556335663357633586335963360633616336263363633646336563366633676336863369633706337163372633736337463375633766337763378633796338063381633826338363384633856338663387633886338963390633916339263393633946339563396633976339863399634006340163402634036340463405634066340763408634096341063411634126341363414634156341663417634186341963420634216342263423634246342563426634276342863429634306343163432634336343463435634366343763438634396344063441634426344363444634456344663447634486344963450634516345263453634546345563456634576345863459634606346163462634636346463465634666346763468634696347063471634726347363474634756347663477634786347963480634816348263483634846348563486634876348863489634906349163492634936349463495634966349763498634996350063501635026350363504635056350663507635086350963510635116351263513635146351563516635176351863519635206352163522635236352463525635266352763528635296353063531635326353363534635356353663537635386353963540635416354263543635446354563546635476354863549635506355163552635536355463555635566355763558635596356063561635626356363564635656356663567635686356963570635716357263573635746357563576635776357863579635806358163582635836358463585635866358763588635896359063591635926359363594635956359663597635986359963600636016360263603636046360563606636076360863609636106361163612636136361463615636166361763618636196362063621636226362363624636256362663627636286362963630636316363263633636346363563636636376363863639636406364163642636436364463645636466364763648636496365063651636526365363654636556365663657636586365963660636616366263663636646366563666636676366863669636706367163672636736367463675636766367763678636796368063681636826368363684636856368663687636886368963690636916369263693636946369563696636976369863699637006370163702637036370463705637066370763708637096371063711637126371363714637156371663717637186371963720637216372263723637246372563726637276372863729637306373163732637336373463735637366373763738637396374063741637426374363744637456374663747637486374963750637516375263753637546375563756637576375863759637606376163762637636376463765637666376763768637696377063771637726377363774637756377663777637786377963780637816378263783637846378563786637876378863789637906379163792637936379463795637966379763798637996380063801638026380363804638056380663807638086380963810638116381263813638146381563816638176381863819638206382163822638236382463825638266382763828638296383063831638326383363834638356383663837638386383963840638416384263843638446384563846638476384863849638506385163852638536385463855638566385763858638596386063861638626386363864638656386663867638686386963870638716387263873638746387563876638776387863879638806388163882638836388463885638866388763888638896389063891638926389363894638956389663897638986389963900639016390263903639046390563906639076390863909639106391163912639136391463915639166391763918639196392063921639226392363924639256392663927639286392963930639316393263933639346393563936639376393863939639406394163942639436394463945639466394763948639496395063951639526395363954639556395663957639586395963960639616396263963639646396563966639676396863969639706397163972639736397463975639766397763978639796398063981639826398363984639856398663987639886398963990639916399263993639946399563996639976399863999640006400164002640036400464005640066400764008640096401064011640126401364014640156401664017640186401964020640216402264023640246402564026640276402864029640306403164032640336403464035640366403764038640396404064041640426404364044640456404664047640486404964050640516405264053640546405564056640576405864059640606406164062640636406464065640666406764068640696407064071640726407364074640756407664077640786407964080640816408264083640846408564086640876408864089640906409164092640936409464095640966409764098640996410064101641026410364104641056410664107641086410964110641116411264113641146411564116641176411864119641206412164122641236412464125641266412764128641296413064131641326413364134641356413664137641386413964140641416414264143641446414564146641476414864149641506415164152641536415464155641566415764158641596416064161641626416364164641656416664167641686416964170641716417264173641746417564176641776417864179641806418164182641836418464185641866418764188641896419064191641926419364194641956419664197641986419964200642016420264203642046420564206642076420864209642106421164212642136421464215642166421764218642196422064221642226422364224642256422664227642286422964230642316423264233642346423564236642376423864239642406424164242642436424464245642466424764248642496425064251642526425364254642556425664257642586425964260642616426264263642646426564266642676426864269642706427164272642736427464275642766427764278642796428064281642826428364284642856428664287642886428964290642916429264293642946429564296642976429864299643006430164302643036430464305643066430764308643096431064311643126431364314643156431664317643186431964320643216432264323643246432564326643276432864329643306433164332643336433464335643366433764338643396434064341643426434364344643456434664347643486434964350643516435264353643546435564356643576435864359643606436164362643636436464365643666436764368643696437064371643726437364374643756437664377643786437964380643816438264383643846438564386643876438864389643906439164392643936439464395643966439764398643996440064401644026440364404644056440664407644086440964410644116441264413644146441564416644176441864419644206442164422644236442464425644266442764428644296443064431644326443364434644356443664437644386443964440644416444264443644446444564446644476444864449644506445164452644536445464455644566445764458644596446064461644626446364464644656446664467644686446964470644716447264473644746447564476644776447864479644806448164482644836448464485644866448764488644896449064491644926449364494644956449664497644986449964500645016450264503645046450564506645076450864509645106451164512645136451464515645166451764518645196452064521645226452364524645256452664527645286452964530645316453264533645346453564536645376453864539645406454164542645436454464545645466454764548645496455064551645526455364554645556455664557645586455964560645616456264563645646456564566645676456864569645706457164572645736457464575645766457764578645796458064581645826458364584645856458664587645886458964590645916459264593645946459564596645976459864599646006460164602646036460464605646066460764608646096461064611646126461364614646156461664617646186461964620646216462264623646246462564626646276462864629646306463164632646336463464635646366463764638646396464064641646426464364644646456464664647646486464964650646516465264653646546465564656646576465864659646606466164662646636466464665646666466764668646696467064671646726467364674646756467664677646786467964680646816468264683646846468564686646876468864689646906469164692646936469464695646966469764698646996470064701647026470364704647056470664707647086470964710647116471264713647146471564716647176471864719647206472164722647236472464725647266472764728647296473064731647326473364734647356473664737647386473964740647416474264743647446474564746647476474864749647506475164752647536475464755647566475764758647596476064761647626476364764647656476664767647686476964770647716477264773647746477564776647776477864779647806478164782647836478464785647866478764788647896479064791647926479364794647956479664797647986479964800648016480264803648046480564806648076480864809648106481164812648136481464815648166481764818648196482064821648226482364824648256482664827648286482964830648316483264833648346483564836648376483864839648406484164842648436484464845648466484764848648496485064851648526485364854648556485664857648586485964860648616486264863648646486564866648676486864869648706487164872648736487464875648766487764878648796488064881648826488364884648856488664887648886488964890648916489264893648946489564896648976489864899649006490164902649036490464905649066490764908649096491064911649126491364914649156491664917649186491964920649216492264923649246492564926649276492864929649306493164932649336493464935649366493764938649396494064941649426494364944649456494664947649486494964950649516495264953649546495564956649576495864959649606496164962649636496464965649666496764968649696497064971649726497364974649756497664977649786497964980649816498264983649846498564986649876498864989649906499164992649936499464995649966499764998649996500065001650026500365004650056500665007650086500965010650116501265013650146501565016650176501865019650206502165022650236502465025650266502765028650296503065031650326503365034650356503665037650386503965040650416504265043650446504565046650476504865049650506505165052650536505465055650566505765058650596506065061650626506365064650656506665067650686506965070650716507265073650746507565076650776507865079650806508165082650836508465085650866508765088650896509065091650926509365094650956509665097650986509965100651016510265103651046510565106651076510865109651106511165112651136511465115651166511765118651196512065121651226512365124651256512665127651286512965130651316513265133651346513565136651376513865139651406514165142651436514465145651466514765148651496515065151651526515365154651556515665157651586515965160651616516265163651646516565166651676516865169651706517165172651736517465175651766517765178651796518065181651826518365184651856518665187651886518965190651916519265193651946519565196651976519865199652006520165202652036520465205652066520765208652096521065211652126521365214652156521665217652186521965220652216522265223652246522565226652276522865229652306523165232652336523465235652366523765238652396524065241652426524365244652456524665247652486524965250652516525265253652546525565256652576525865259652606526165262652636526465265652666526765268652696527065271652726527365274652756527665277652786527965280652816528265283652846528565286652876528865289652906529165292652936529465295652966529765298652996530065301653026530365304653056530665307653086530965310653116531265313653146531565316653176531865319653206532165322653236532465325653266532765328653296533065331653326533365334653356533665337653386533965340653416534265343653446534565346653476534865349653506535165352653536535465355653566535765358653596536065361653626536365364653656536665367653686536965370653716537265373653746537565376653776537865379653806538165382653836538465385653866538765388653896539065391653926539365394653956539665397653986539965400654016540265403654046540565406654076540865409654106541165412654136541465415654166541765418654196542065421654226542365424654256542665427654286542965430654316543265433654346543565436654376543865439654406544165442654436544465445654466544765448654496545065451654526545365454654556545665457654586545965460654616546265463654646546565466654676546865469654706547165472654736547465475654766547765478654796548065481654826548365484654856548665487654886548965490654916549265493654946549565496654976549865499655006550165502655036550465505655066550765508655096551065511655126551365514655156551665517655186551965520655216552265523655246552565526655276552865529655306553165532655336553465535655366553765538655396554065541655426554365544655456554665547655486554965550655516555265553655546555565556655576555865559655606556165562655636556465565655666556765568655696557065571655726557365574655756557665577655786557965580655816558265583655846558565586655876558865589655906559165592655936559465595655966559765598655996560065601656026560365604656056560665607656086560965610656116561265613656146561565616656176561865619656206562165622656236562465625656266562765628656296563065631656326563365634656356563665637656386563965640656416564265643656446564565646656476564865649656506565165652656536565465655656566565765658656596566065661656626566365664656656566665667656686566965670656716567265673656746567565676656776567865679656806568165682656836568465685656866568765688656896569065691656926569365694656956569665697656986569965700657016570265703657046570565706657076570865709657106571165712657136571465715657166571765718657196572065721657226572365724657256572665727657286572965730657316573265733657346573565736657376573865739657406574165742657436574465745657466574765748657496575065751657526575365754657556575665757657586575965760657616576265763657646576565766657676576865769657706577165772657736577465775657766577765778657796578065781657826578365784657856578665787657886578965790657916579265793657946579565796657976579865799658006580165802658036580465805658066580765808658096581065811658126581365814658156581665817658186581965820658216582265823658246582565826658276582865829658306583165832658336583465835658366583765838658396584065841658426584365844658456584665847658486584965850658516585265853658546585565856658576585865859658606586165862658636586465865658666586765868658696587065871658726587365874658756587665877658786587965880658816588265883658846588565886658876588865889658906589165892658936589465895658966589765898658996590065901659026590365904659056590665907659086590965910659116591265913659146591565916659176591865919659206592165922659236592465925659266592765928659296593065931659326593365934659356593665937659386593965940659416594265943659446594565946659476594865949659506595165952659536595465955659566595765958659596596065961659626596365964659656596665967659686596965970659716597265973659746597565976659776597865979659806598165982659836598465985659866598765988659896599065991659926599365994659956599665997659986599966000660016600266003660046600566006660076600866009660106601166012660136601466015660166601766018660196602066021660226602366024660256602666027660286602966030660316603266033660346603566036660376603866039660406604166042660436604466045660466604766048660496605066051660526605366054660556605666057660586605966060660616606266063660646606566066660676606866069660706607166072660736607466075660766607766078660796608066081660826608366084660856608666087660886608966090660916609266093660946609566096660976609866099661006610166102661036610466105661066610766108661096611066111661126611366114661156611666117661186611966120661216612266123661246612566126661276612866129661306613166132661336613466135661366613766138661396614066141661426614366144661456614666147661486614966150661516615266153661546615566156661576615866159661606616166162661636616466165661666616766168661696617066171661726617366174661756617666177661786617966180661816618266183661846618566186661876618866189661906619166192661936619466195661966619766198661996620066201662026620366204662056620666207662086620966210662116621266213662146621566216662176621866219662206622166222662236622466225662266622766228662296623066231662326623366234662356623666237662386623966240662416624266243662446624566246662476624866249662506625166252662536625466255662566625766258662596626066261662626626366264662656626666267662686626966270662716627266273662746627566276662776627866279662806628166282662836628466285662866628766288662896629066291662926629366294662956629666297662986629966300663016630266303663046630566306663076630866309663106631166312663136631466315663166631766318663196632066321663226632366324663256632666327663286632966330663316633266333663346633566336663376633866339663406634166342663436634466345663466634766348663496635066351663526635366354663556635666357663586635966360663616636266363663646636566366663676636866369663706637166372663736637466375663766637766378663796638066381663826638366384663856638666387663886638966390663916639266393663946639566396663976639866399664006640166402664036640466405664066640766408664096641066411664126641366414664156641666417664186641966420664216642266423664246642566426664276642866429664306643166432664336643466435664366643766438664396644066441664426644366444664456644666447664486644966450664516645266453664546645566456664576645866459664606646166462664636646466465664666646766468664696647066471664726647366474664756647666477664786647966480664816648266483664846648566486664876648866489664906649166492664936649466495664966649766498664996650066501665026650366504665056650666507665086650966510665116651266513665146651566516665176651866519665206652166522665236652466525665266652766528665296653066531665326653366534665356653666537665386653966540665416654266543665446654566546665476654866549665506655166552665536655466555665566655766558665596656066561665626656366564665656656666567665686656966570665716657266573665746657566576665776657866579665806658166582665836658466585665866658766588665896659066591665926659366594665956659666597665986659966600666016660266603666046660566606666076660866609666106661166612666136661466615666166661766618666196662066621666226662366624666256662666627666286662966630666316663266633666346663566636666376663866639666406664166642666436664466645666466664766648666496665066651666526665366654666556665666657666586665966660666616666266663666646666566666666676666866669666706667166672666736667466675666766667766678666796668066681666826668366684666856668666687666886668966690666916669266693666946669566696666976669866699667006670166702667036670466705667066670766708667096671066711667126671366714667156671666717667186671966720667216672266723667246672566726667276672866729667306673166732667336673466735667366673766738667396674066741667426674366744667456674666747667486674966750667516675266753667546675566756667576675866759667606676166762667636676466765667666676766768667696677066771667726677366774667756677666777667786677966780667816678266783667846678566786667876678866789667906679166792667936679466795667966679766798667996680066801668026680366804668056680666807668086680966810668116681266813668146681566816668176681866819668206682166822668236682466825668266682766828668296683066831668326683366834668356683666837668386683966840668416684266843668446684566846668476684866849668506685166852668536685466855668566685766858668596686066861668626686366864668656686666867668686686966870668716687266873668746687566876668776687866879668806688166882668836688466885668866688766888668896689066891668926689366894668956689666897668986689966900669016690266903669046690566906669076690866909669106691166912669136691466915669166691766918669196692066921669226692366924669256692666927669286692966930669316693266933669346693566936669376693866939669406694166942669436694466945669466694766948669496695066951669526695366954669556695666957669586695966960669616696266963669646696566966669676696866969669706697166972669736697466975669766697766978669796698066981669826698366984669856698666987669886698966990669916699266993669946699566996669976699866999670006700167002670036700467005670066700767008670096701067011670126701367014670156701667017670186701967020670216702267023670246702567026670276702867029670306703167032670336703467035670366703767038670396704067041670426704367044670456704667047670486704967050670516705267053670546705567056670576705867059670606706167062670636706467065670666706767068670696707067071670726707367074670756707667077670786707967080670816708267083670846708567086670876708867089670906709167092670936709467095670966709767098670996710067101671026710367104671056710667107671086710967110671116711267113671146711567116671176711867119671206712167122671236712467125671266712767128671296713067131671326713367134671356713667137671386713967140671416714267143671446714567146671476714867149671506715167152671536715467155671566715767158671596716067161671626716367164671656716667167671686716967170671716717267173671746717567176671776717867179671806718167182671836718467185671866718767188671896719067191671926719367194671956719667197671986719967200672016720267203672046720567206672076720867209672106721167212672136721467215672166721767218672196722067221672226722367224672256722667227672286722967230672316723267233672346723567236672376723867239672406724167242672436724467245672466724767248672496725067251672526725367254672556725667257672586725967260672616726267263672646726567266672676726867269672706727167272672736727467275672766727767278672796728067281672826728367284672856728667287672886728967290672916729267293672946729567296672976729867299673006730167302673036730467305673066730767308673096731067311673126731367314673156731667317673186731967320673216732267323673246732567326673276732867329673306733167332673336733467335673366733767338673396734067341673426734367344673456734667347673486734967350673516735267353673546735567356673576735867359673606736167362673636736467365673666736767368673696737067371673726737367374673756737667377673786737967380673816738267383673846738567386673876738867389673906739167392673936739467395673966739767398673996740067401674026740367404674056740667407674086740967410674116741267413674146741567416674176741867419674206742167422674236742467425674266742767428674296743067431674326743367434674356743667437674386743967440674416744267443674446744567446674476744867449674506745167452674536745467455674566745767458674596746067461674626746367464674656746667467674686746967470674716747267473674746747567476674776747867479674806748167482674836748467485674866748767488674896749067491674926749367494674956749667497674986749967500675016750267503675046750567506675076750867509675106751167512675136751467515675166751767518675196752067521675226752367524675256752667527675286752967530675316753267533675346753567536675376753867539675406754167542675436754467545675466754767548675496755067551675526755367554675556755667557675586755967560675616756267563675646756567566675676756867569675706757167572675736757467575675766757767578675796758067581675826758367584675856758667587675886758967590675916759267593675946759567596675976759867599676006760167602676036760467605676066760767608676096761067611676126761367614676156761667617676186761967620676216762267623676246762567626676276762867629676306763167632676336763467635676366763767638676396764067641676426764367644676456764667647676486764967650676516765267653676546765567656676576765867659676606766167662676636766467665676666766767668676696767067671676726767367674676756767667677676786767967680676816768267683676846768567686676876768867689676906769167692676936769467695676966769767698676996770067701677026770367704677056770667707677086770967710677116771267713677146771567716677176771867719677206772167722677236772467725677266772767728677296773067731677326773367734677356773667737677386773967740677416774267743677446774567746677476774867749677506775167752677536775467755677566775767758677596776067761677626776367764677656776667767677686776967770677716777267773677746777567776677776777867779677806778167782677836778467785677866778767788677896779067791677926779367794677956779667797677986779967800678016780267803678046780567806678076780867809678106781167812678136781467815678166781767818678196782067821678226782367824678256782667827678286782967830678316783267833678346783567836678376783867839678406784167842678436784467845678466784767848678496785067851678526785367854678556785667857678586785967860678616786267863678646786567866678676786867869678706787167872678736787467875678766787767878678796788067881678826788367884678856788667887678886788967890678916789267893678946789567896678976789867899679006790167902679036790467905679066790767908679096791067911679126791367914679156791667917679186791967920679216792267923679246792567926679276792867929679306793167932679336793467935679366793767938679396794067941679426794367944679456794667947679486794967950679516795267953679546795567956679576795867959679606796167962679636796467965679666796767968679696797067971679726797367974679756797667977679786797967980679816798267983679846798567986679876798867989679906799167992679936799467995679966799767998679996800068001680026800368004680056800668007680086800968010680116801268013680146801568016680176801868019680206802168022680236802468025680266802768028680296803068031680326803368034680356803668037680386803968040680416804268043680446804568046680476804868049680506805168052680536805468055680566805768058680596806068061680626806368064680656806668067680686806968070680716807268073680746807568076680776807868079680806808168082680836808468085680866808768088680896809068091680926809368094680956809668097680986809968100681016810268103681046810568106681076810868109681106811168112681136811468115681166811768118681196812068121681226812368124681256812668127681286812968130681316813268133681346813568136681376813868139681406814168142681436814468145681466814768148681496815068151681526815368154681556815668157681586815968160681616816268163681646816568166681676816868169681706817168172681736817468175681766817768178681796818068181681826818368184681856818668187681886818968190681916819268193681946819568196681976819868199682006820168202682036820468205682066820768208682096821068211682126821368214682156821668217682186821968220682216822268223682246822568226682276822868229682306823168232682336823468235682366823768238682396824068241682426824368244682456824668247682486824968250682516825268253682546825568256682576825868259682606826168262682636826468265682666826768268682696827068271682726827368274682756827668277682786827968280682816828268283682846828568286682876828868289682906829168292682936829468295682966829768298682996830068301683026830368304683056830668307683086830968310683116831268313683146831568316683176831868319683206832168322683236832468325683266832768328683296833068331683326833368334683356833668337683386833968340683416834268343683446834568346683476834868349683506835168352683536835468355683566835768358683596836068361683626836368364683656836668367683686836968370683716837268373683746837568376683776837868379683806838168382683836838468385683866838768388683896839068391683926839368394683956839668397683986839968400684016840268403684046840568406684076840868409684106841168412684136841468415684166841768418684196842068421684226842368424684256842668427684286842968430684316843268433684346843568436684376843868439684406844168442684436844468445684466844768448684496845068451684526845368454684556845668457684586845968460684616846268463684646846568466684676846868469684706847168472684736847468475684766847768478684796848068481684826848368484684856848668487684886848968490684916849268493684946849568496684976849868499685006850168502685036850468505685066850768508685096851068511685126851368514685156851668517685186851968520685216852268523685246852568526685276852868529685306853168532685336853468535685366853768538685396854068541685426854368544685456854668547685486854968550685516855268553685546855568556685576855868559685606856168562685636856468565685666856768568685696857068571685726857368574685756857668577685786857968580685816858268583685846858568586685876858868589685906859168592685936859468595685966859768598685996860068601686026860368604686056860668607686086860968610686116861268613686146861568616686176861868619686206862168622686236862468625686266862768628686296863068631686326863368634686356863668637686386863968640686416864268643686446864568646686476864868649686506865168652686536865468655686566865768658686596866068661686626866368664686656866668667686686866968670686716867268673686746867568676686776867868679686806868168682686836868468685686866868768688686896869068691686926869368694686956869668697686986869968700687016870268703687046870568706687076870868709687106871168712687136871468715687166871768718687196872068721687226872368724687256872668727687286872968730687316873268733687346873568736687376873868739687406874168742687436874468745687466874768748687496875068751687526875368754687556875668757687586875968760687616876268763687646876568766687676876868769687706877168772687736877468775687766877768778687796878068781687826878368784687856878668787687886878968790687916879268793687946879568796687976879868799688006880168802688036880468805688066880768808688096881068811688126881368814688156881668817688186881968820688216882268823688246882568826688276882868829688306883168832688336883468835688366883768838688396884068841688426884368844688456884668847688486884968850688516885268853688546885568856688576885868859688606886168862688636886468865688666886768868688696887068871688726887368874688756887668877688786887968880688816888268883688846888568886688876888868889688906889168892688936889468895688966889768898688996890068901689026890368904689056890668907689086890968910689116891268913689146891568916689176891868919689206892168922689236892468925689266892768928689296893068931689326893368934689356893668937689386893968940689416894268943689446894568946689476894868949689506895168952689536895468955689566895768958689596896068961689626896368964689656896668967689686896968970689716897268973689746897568976689776897868979689806898168982689836898468985689866898768988689896899068991689926899368994689956899668997689986899969000690016900269003690046900569006690076900869009690106901169012690136901469015690166901769018690196902069021690226902369024690256902669027690286902969030690316903269033690346903569036690376903869039690406904169042690436904469045690466904769048690496905069051690526905369054690556905669057690586905969060690616906269063690646906569066690676906869069690706907169072690736907469075690766907769078690796908069081690826908369084690856908669087690886908969090690916909269093690946909569096690976909869099691006910169102691036910469105691066910769108691096911069111691126911369114691156911669117691186911969120691216912269123691246912569126691276912869129691306913169132691336913469135691366913769138691396914069141691426914369144691456914669147691486914969150691516915269153691546915569156691576915869159691606916169162691636916469165691666916769168691696917069171691726917369174691756917669177691786917969180691816918269183691846918569186691876918869189691906919169192691936919469195691966919769198691996920069201692026920369204692056920669207692086920969210692116921269213692146921569216692176921869219692206922169222692236922469225692266922769228692296923069231692326923369234692356923669237692386923969240692416924269243692446924569246692476924869249692506925169252692536925469255692566925769258692596926069261692626926369264692656926669267692686926969270692716927269273692746927569276692776927869279692806928169282692836928469285692866928769288692896929069291692926929369294692956929669297692986929969300693016930269303693046930569306693076930869309693106931169312693136931469315693166931769318693196932069321693226932369324693256932669327693286932969330693316933269333693346933569336693376933869339693406934169342693436934469345693466934769348693496935069351693526935369354693556935669357693586935969360693616936269363693646936569366693676936869369693706937169372693736937469375693766937769378693796938069381693826938369384693856938669387693886938969390693916939269393693946939569396693976939869399694006940169402694036940469405694066940769408694096941069411694126941369414694156941669417694186941969420694216942269423694246942569426694276942869429694306943169432694336943469435694366943769438694396944069441694426944369444694456944669447694486944969450694516945269453694546945569456694576945869459694606946169462694636946469465694666946769468694696947069471694726947369474694756947669477694786947969480694816948269483694846948569486694876948869489694906949169492694936949469495694966949769498694996950069501695026950369504695056950669507695086950969510695116951269513695146951569516695176951869519695206952169522695236952469525695266952769528695296953069531695326953369534695356953669537695386953969540695416954269543695446954569546695476954869549695506955169552695536955469555695566955769558695596956069561695626956369564695656956669567695686956969570695716957269573695746957569576695776957869579695806958169582695836958469585695866958769588695896959069591695926959369594695956959669597695986959969600696016960269603696046960569606696076960869609696106961169612696136961469615696166961769618696196962069621696226962369624696256962669627696286962969630696316963269633696346963569636696376963869639696406964169642696436964469645696466964769648696496965069651696526965369654696556965669657696586965969660696616966269663696646966569666696676966869669696706967169672696736967469675696766967769678696796968069681696826968369684696856968669687696886968969690696916969269693696946969569696696976969869699697006970169702697036970469705697066970769708697096971069711697126971369714697156971669717697186971969720697216972269723697246972569726697276972869729697306973169732697336973469735697366973769738697396974069741697426974369744697456974669747697486974969750697516975269753697546975569756697576975869759697606976169762697636976469765697666976769768697696977069771697726977369774697756977669777697786977969780697816978269783697846978569786697876978869789697906979169792697936979469795697966979769798697996980069801698026980369804698056980669807698086980969810698116981269813698146981569816698176981869819698206982169822698236982469825698266982769828698296983069831698326983369834698356983669837698386983969840698416984269843698446984569846698476984869849698506985169852698536985469855698566985769858698596986069861698626986369864698656986669867698686986969870698716987269873698746987569876698776987869879698806988169882698836988469885698866988769888698896989069891698926989369894698956989669897698986989969900699016990269903699046990569906699076990869909699106991169912699136991469915699166991769918699196992069921699226992369924699256992669927699286992969930699316993269933699346993569936699376993869939699406994169942699436994469945699466994769948699496995069951699526995369954699556995669957699586995969960699616996269963699646996569966699676996869969699706997169972699736997469975699766997769978699796998069981699826998369984699856998669987699886998969990699916999269993699946999569996699976999869999700007000170002700037000470005700067000770008700097001070011700127001370014700157001670017700187001970020700217002270023700247002570026700277002870029700307003170032700337003470035700367003770038700397004070041700427004370044700457004670047700487004970050700517005270053700547005570056700577005870059700607006170062700637006470065700667006770068700697007070071700727007370074700757007670077700787007970080700817008270083700847008570086700877008870089700907009170092700937009470095700967009770098700997010070101701027010370104701057010670107701087010970110701117011270113701147011570116701177011870119701207012170122701237012470125701267012770128701297013070131701327013370134701357013670137701387013970140701417014270143701447014570146701477014870149701507015170152701537015470155701567015770158701597016070161701627016370164701657016670167701687016970170701717017270173701747017570176701777017870179701807018170182701837018470185701867018770188701897019070191701927019370194701957019670197701987019970200702017020270203702047020570206702077020870209702107021170212702137021470215702167021770218702197022070221702227022370224702257022670227702287022970230702317023270233702347023570236702377023870239702407024170242702437024470245702467024770248702497025070251702527025370254702557025670257702587025970260702617026270263702647026570266702677026870269702707027170272702737027470275702767027770278702797028070281702827028370284702857028670287702887028970290702917029270293702947029570296702977029870299703007030170302703037030470305703067030770308703097031070311703127031370314703157031670317703187031970320703217032270323703247032570326703277032870329703307033170332703337033470335703367033770338703397034070341703427034370344703457034670347703487034970350703517035270353703547035570356703577035870359703607036170362703637036470365703667036770368703697037070371703727037370374703757037670377703787037970380703817038270383703847038570386703877038870389703907039170392703937039470395703967039770398703997040070401704027040370404704057040670407704087040970410704117041270413704147041570416704177041870419704207042170422704237042470425704267042770428704297043070431704327043370434704357043670437704387043970440704417044270443704447044570446704477044870449704507045170452704537045470455704567045770458704597046070461704627046370464704657046670467704687046970470704717047270473704747047570476704777047870479704807048170482704837048470485704867048770488704897049070491704927049370494704957049670497704987049970500705017050270503705047050570506705077050870509705107051170512705137051470515705167051770518705197052070521705227052370524705257052670527705287052970530705317053270533705347053570536705377053870539705407054170542705437054470545705467054770548705497055070551705527055370554705557055670557705587055970560705617056270563705647056570566705677056870569705707057170572705737057470575705767057770578705797058070581705827058370584705857058670587705887058970590705917059270593705947059570596705977059870599706007060170602706037060470605706067060770608706097061070611706127061370614706157061670617706187061970620706217062270623706247062570626706277062870629706307063170632706337063470635706367063770638706397064070641706427064370644706457064670647706487064970650706517065270653706547065570656706577065870659706607066170662706637066470665706667066770668706697067070671706727067370674706757067670677706787067970680706817068270683706847068570686706877068870689706907069170692706937069470695706967069770698706997070070701707027070370704707057070670707707087070970710707117071270713707147071570716707177071870719707207072170722707237072470725707267072770728707297073070731707327073370734707357073670737707387073970740707417074270743707447074570746707477074870749707507075170752707537075470755707567075770758707597076070761707627076370764707657076670767707687076970770707717077270773707747077570776707777077870779707807078170782707837078470785707867078770788707897079070791707927079370794707957079670797707987079970800708017080270803708047080570806708077080870809708107081170812708137081470815708167081770818708197082070821708227082370824708257082670827708287082970830708317083270833708347083570836708377083870839708407084170842708437084470845708467084770848708497085070851708527085370854708557085670857708587085970860708617086270863708647086570866708677086870869708707087170872708737087470875708767087770878708797088070881708827088370884708857088670887708887088970890708917089270893708947089570896708977089870899709007090170902709037090470905709067090770908709097091070911709127091370914709157091670917709187091970920709217092270923709247092570926709277092870929709307093170932709337093470935709367093770938709397094070941709427094370944709457094670947709487094970950709517095270953709547095570956709577095870959709607096170962709637096470965709667096770968709697097070971709727097370974709757097670977709787097970980709817098270983709847098570986709877098870989709907099170992709937099470995709967099770998709997100071001710027100371004710057100671007710087100971010710117101271013710147101571016710177101871019710207102171022710237102471025710267102771028710297103071031710327103371034710357103671037710387103971040710417104271043710447104571046710477104871049710507105171052710537105471055710567105771058710597106071061710627106371064710657106671067710687106971070710717107271073710747107571076710777107871079710807108171082710837108471085710867108771088710897109071091710927109371094710957109671097710987109971100711017110271103711047110571106711077110871109711107111171112711137111471115711167111771118711197112071121711227112371124711257112671127711287112971130711317113271133711347113571136711377113871139711407114171142711437114471145711467114771148711497115071151711527115371154711557115671157711587115971160711617116271163711647116571166711677116871169711707117171172711737117471175711767117771178711797118071181711827118371184711857118671187711887118971190711917119271193711947119571196711977119871199712007120171202712037120471205712067120771208712097121071211712127121371214712157121671217712187121971220712217122271223712247122571226712277122871229712307123171232712337123471235712367123771238712397124071241712427124371244712457124671247712487124971250712517125271253712547125571256712577125871259712607126171262712637126471265712667126771268712697127071271712727127371274712757127671277712787127971280712817128271283712847128571286712877128871289712907129171292712937129471295712967129771298712997130071301713027130371304713057130671307713087130971310713117131271313713147131571316713177131871319713207132171322713237132471325713267132771328713297133071331713327133371334713357133671337713387133971340713417134271343713447134571346713477134871349713507135171352713537135471355713567135771358713597136071361713627136371364713657136671367713687136971370713717137271373713747137571376713777137871379713807138171382713837138471385713867138771388713897139071391713927139371394713957139671397713987139971400714017140271403714047140571406714077140871409714107141171412714137141471415714167141771418714197142071421714227142371424714257142671427714287142971430714317143271433714347143571436714377143871439714407144171442714437144471445714467144771448714497145071451714527145371454714557145671457714587145971460714617146271463714647146571466714677146871469714707147171472714737147471475714767147771478714797148071481714827148371484714857148671487714887148971490714917149271493714947149571496714977149871499715007150171502715037150471505715067150771508715097151071511715127151371514715157151671517715187151971520715217152271523715247152571526715277152871529715307153171532715337153471535715367153771538715397154071541715427154371544715457154671547715487154971550715517155271553715547155571556715577155871559715607156171562715637156471565715667156771568715697157071571715727157371574715757157671577715787157971580715817158271583715847158571586715877158871589715907159171592715937159471595715967159771598715997160071601716027160371604716057160671607716087160971610716117161271613716147161571616716177161871619716207162171622716237162471625716267162771628716297163071631716327163371634716357163671637716387163971640716417164271643716447164571646716477164871649716507165171652716537165471655716567165771658716597166071661716627166371664716657166671667716687166971670716717167271673716747167571676716777167871679716807168171682716837168471685716867168771688716897169071691716927169371694716957169671697716987169971700717017170271703717047170571706717077170871709717107171171712717137171471715717167171771718717197172071721717227172371724717257172671727717287172971730717317173271733717347173571736717377173871739717407174171742717437174471745717467174771748717497175071751717527175371754717557175671757717587175971760717617176271763717647176571766717677176871769717707177171772717737177471775717767177771778717797178071781717827178371784717857178671787717887178971790717917179271793717947179571796717977179871799718007180171802718037180471805718067180771808718097181071811718127181371814718157181671817718187181971820718217182271823718247182571826718277182871829718307183171832718337183471835718367183771838718397184071841718427184371844718457184671847718487184971850718517185271853718547185571856718577185871859718607186171862718637186471865718667186771868718697187071871718727187371874718757187671877718787187971880718817188271883718847188571886718877188871889718907189171892718937189471895718967189771898718997190071901719027190371904719057190671907719087190971910719117191271913719147191571916719177191871919719207192171922719237192471925719267192771928719297193071931719327193371934719357193671937719387193971940719417194271943719447194571946719477194871949719507195171952719537195471955719567195771958719597196071961719627196371964719657196671967719687196971970719717197271973719747197571976719777197871979719807198171982719837198471985719867198771988719897199071991719927199371994719957199671997719987199972000720017200272003720047200572006720077200872009720107201172012720137201472015720167201772018720197202072021720227202372024720257202672027720287202972030720317203272033720347203572036720377203872039720407204172042720437204472045720467204772048720497205072051720527205372054720557205672057720587205972060720617206272063720647206572066720677206872069720707207172072720737207472075720767207772078720797208072081720827208372084720857208672087720887208972090720917209272093720947209572096720977209872099721007210172102721037210472105721067210772108721097211072111721127211372114721157211672117721187211972120721217212272123721247212572126721277212872129721307213172132721337213472135721367213772138721397214072141721427214372144721457214672147721487214972150721517215272153721547215572156721577215872159721607216172162721637216472165721667216772168721697217072171721727217372174721757217672177721787217972180721817218272183721847218572186721877218872189721907219172192721937219472195721967219772198721997220072201722027220372204722057220672207722087220972210722117221272213722147221572216722177221872219722207222172222722237222472225722267222772228722297223072231722327223372234722357223672237722387223972240722417224272243722447224572246722477224872249722507225172252722537225472255722567225772258722597226072261722627226372264722657226672267722687226972270722717227272273722747227572276722777227872279722807228172282722837228472285722867228772288722897229072291722927229372294722957229672297722987229972300723017230272303723047230572306723077230872309723107231172312723137231472315723167231772318723197232072321723227232372324723257232672327723287232972330723317233272333723347233572336723377233872339723407234172342723437234472345723467234772348723497235072351723527235372354723557235672357723587235972360723617236272363723647236572366723677236872369723707237172372723737237472375723767237772378723797238072381723827238372384723857238672387723887238972390723917239272393723947239572396723977239872399724007240172402724037240472405724067240772408724097241072411724127241372414724157241672417724187241972420724217242272423724247242572426724277242872429724307243172432724337243472435724367243772438724397244072441724427244372444724457244672447724487244972450724517245272453724547245572456724577245872459724607246172462724637246472465724667246772468724697247072471724727247372474724757247672477724787247972480724817248272483724847248572486724877248872489724907249172492724937249472495724967249772498724997250072501725027250372504725057250672507725087250972510725117251272513725147251572516725177251872519725207252172522725237252472525725267252772528725297253072531725327253372534725357253672537725387253972540725417254272543725447254572546725477254872549725507255172552725537255472555725567255772558725597256072561725627256372564725657256672567725687256972570725717257272573725747257572576725777257872579725807258172582725837258472585725867258772588725897259072591725927259372594725957259672597725987259972600726017260272603726047260572606726077260872609726107261172612726137261472615726167261772618726197262072621726227262372624726257262672627726287262972630726317263272633726347263572636726377263872639726407264172642726437264472645726467264772648726497265072651726527265372654726557265672657726587265972660726617266272663726647266572666726677266872669726707267172672726737267472675726767267772678726797268072681726827268372684726857268672687726887268972690726917269272693726947269572696726977269872699727007270172702727037270472705727067270772708727097271072711727127271372714727157271672717727187271972720727217272272723727247272572726727277272872729727307273172732727337273472735727367273772738727397274072741727427274372744727457274672747727487274972750727517275272753727547275572756727577275872759727607276172762727637276472765727667276772768727697277072771727727277372774727757277672777727787277972780727817278272783727847278572786727877278872789727907279172792727937279472795727967279772798727997280072801728027280372804728057280672807728087280972810728117281272813728147281572816728177281872819728207282172822728237282472825728267282772828728297283072831728327283372834728357283672837728387283972840728417284272843728447284572846728477284872849728507285172852728537285472855728567285772858728597286072861728627286372864728657286672867728687286972870728717287272873728747287572876728777287872879728807288172882728837288472885728867288772888728897289072891728927289372894728957289672897728987289972900729017290272903729047290572906729077290872909729107291172912729137291472915729167291772918729197292072921729227292372924729257292672927729287292972930729317293272933729347293572936729377293872939729407294172942729437294472945729467294772948729497295072951729527295372954729557295672957729587295972960729617296272963729647296572966729677296872969729707297172972729737297472975729767297772978729797298072981729827298372984729857298672987729887298972990729917299272993729947299572996729977299872999730007300173002730037300473005730067300773008730097301073011730127301373014730157301673017730187301973020730217302273023730247302573026730277302873029730307303173032730337303473035730367303773038730397304073041730427304373044730457304673047730487304973050730517305273053730547305573056730577305873059730607306173062730637306473065730667306773068730697307073071730727307373074730757307673077730787307973080730817308273083730847308573086730877308873089730907309173092730937309473095730967309773098730997310073101731027310373104731057310673107731087310973110731117311273113731147311573116731177311873119731207312173122731237312473125731267312773128731297313073131731327313373134731357313673137731387313973140731417314273143731447314573146731477314873149731507315173152731537315473155731567315773158731597316073161731627316373164731657316673167731687316973170731717317273173731747317573176731777317873179731807318173182731837318473185731867318773188731897319073191731927319373194731957319673197731987319973200732017320273203732047320573206732077320873209732107321173212732137321473215732167321773218732197322073221732227322373224732257322673227732287322973230732317323273233732347323573236732377323873239732407324173242732437324473245732467324773248732497325073251732527325373254732557325673257732587325973260732617326273263732647326573266732677326873269732707327173272732737327473275732767327773278732797328073281732827328373284732857328673287732887328973290732917329273293732947329573296732977329873299733007330173302733037330473305733067330773308733097331073311733127331373314733157331673317733187331973320733217332273323733247332573326733277332873329733307333173332733337333473335733367333773338733397334073341733427334373344733457334673347733487334973350733517335273353733547335573356733577335873359733607336173362733637336473365733667336773368733697337073371733727337373374733757337673377733787337973380733817338273383733847338573386733877338873389733907339173392733937339473395733967339773398733997340073401734027340373404734057340673407734087340973410734117341273413734147341573416734177341873419734207342173422734237342473425734267342773428734297343073431734327343373434734357343673437734387343973440734417344273443734447344573446734477344873449734507345173452734537345473455734567345773458734597346073461734627346373464734657346673467734687346973470734717347273473734747347573476734777347873479734807348173482734837348473485734867348773488734897349073491734927349373494734957349673497734987349973500735017350273503735047350573506735077350873509735107351173512735137351473515735167351773518735197352073521735227352373524735257352673527735287352973530735317353273533735347353573536735377353873539735407354173542735437354473545735467354773548735497355073551735527355373554735557355673557735587355973560735617356273563735647356573566735677356873569735707357173572735737357473575735767357773578735797358073581735827358373584735857358673587735887358973590735917359273593735947359573596735977359873599736007360173602736037360473605736067360773608736097361073611736127361373614736157361673617736187361973620736217362273623736247362573626736277362873629736307363173632736337363473635736367363773638736397364073641736427364373644736457364673647736487364973650736517365273653736547365573656736577365873659736607366173662736637366473665736667366773668736697367073671736727367373674736757367673677736787367973680736817368273683736847368573686736877368873689736907369173692736937369473695736967369773698736997370073701737027370373704737057370673707737087370973710737117371273713737147371573716737177371873719737207372173722737237372473725737267372773728737297373073731737327373373734737357373673737737387373973740737417374273743737447374573746737477374873749737507375173752737537375473755737567375773758737597376073761737627376373764737657376673767737687376973770737717377273773737747377573776737777377873779737807378173782737837378473785737867378773788737897379073791737927379373794737957379673797737987379973800738017380273803738047380573806738077380873809738107381173812738137381473815738167381773818738197382073821738227382373824738257382673827738287382973830738317383273833738347383573836738377383873839738407384173842738437384473845738467384773848738497385073851738527385373854738557385673857738587385973860738617386273863738647386573866738677386873869738707387173872738737387473875738767387773878738797388073881738827388373884738857388673887738887388973890738917389273893738947389573896738977389873899739007390173902739037390473905739067390773908739097391073911739127391373914739157391673917739187391973920739217392273923739247392573926739277392873929739307393173932739337393473935739367393773938739397394073941739427394373944739457394673947739487394973950739517395273953739547395573956739577395873959739607396173962739637396473965739667396773968739697397073971739727397373974739757397673977739787397973980739817398273983739847398573986739877398873989739907399173992739937399473995739967399773998739997400074001740027400374004740057400674007740087400974010740117401274013740147401574016740177401874019740207402174022740237402474025740267402774028740297403074031740327403374034740357403674037740387403974040740417404274043740447404574046740477404874049740507405174052740537405474055740567405774058740597406074061740627406374064740657406674067740687406974070740717407274073740747407574076740777407874079740807408174082740837408474085740867408774088740897409074091740927409374094740957409674097740987409974100741017410274103741047410574106741077410874109741107411174112741137411474115741167411774118741197412074121741227412374124741257412674127741287412974130741317413274133741347413574136741377413874139741407414174142741437414474145741467414774148741497415074151741527415374154741557415674157741587415974160741617416274163741647416574166741677416874169741707417174172741737417474175741767417774178741797418074181741827418374184741857418674187741887418974190741917419274193741947419574196741977419874199742007420174202742037420474205742067420774208742097421074211742127421374214742157421674217742187421974220742217422274223742247422574226742277422874229742307423174232742337423474235742367423774238742397424074241742427424374244742457424674247742487424974250742517425274253742547425574256742577425874259742607426174262742637426474265742667426774268742697427074271742727427374274742757427674277742787427974280742817428274283742847428574286742877428874289742907429174292742937429474295742967429774298742997430074301743027430374304743057430674307743087430974310743117431274313743147431574316743177431874319743207432174322743237432474325743267432774328743297433074331743327433374334743357433674337743387433974340743417434274343743447434574346743477434874349743507435174352743537435474355743567435774358743597436074361743627436374364743657436674367743687436974370743717437274373743747437574376743777437874379743807438174382743837438474385743867438774388743897439074391743927439374394743957439674397743987439974400744017440274403744047440574406744077440874409744107441174412744137441474415744167441774418744197442074421744227442374424744257442674427744287442974430744317443274433744347443574436744377443874439744407444174442744437444474445744467444774448744497445074451744527445374454744557445674457744587445974460744617446274463744647446574466744677446874469744707447174472744737447474475744767447774478744797448074481744827448374484744857448674487744887448974490744917449274493744947449574496744977449874499745007450174502745037450474505745067450774508745097451074511745127451374514745157451674517745187451974520745217452274523745247452574526745277452874529745307453174532745337453474535745367453774538745397454074541745427454374544745457454674547745487454974550745517455274553745547455574556745577455874559745607456174562745637456474565745667456774568745697457074571745727457374574745757457674577745787457974580745817458274583745847458574586745877458874589745907459174592745937459474595745967459774598745997460074601746027460374604746057460674607746087460974610746117461274613746147461574616746177461874619746207462174622746237462474625746267462774628746297463074631746327463374634746357463674637746387463974640746417464274643746447464574646746477464874649746507465174652746537465474655746567465774658746597466074661746627466374664746657466674667746687466974670746717467274673746747467574676746777467874679746807468174682746837468474685746867468774688746897469074691746927469374694746957469674697746987469974700747017470274703747047470574706747077470874709747107471174712747137471474715747167471774718747197472074721747227472374724747257472674727747287472974730747317473274733747347473574736747377473874739747407474174742747437474474745747467474774748747497475074751747527475374754747557475674757747587475974760747617476274763747647476574766747677476874769747707477174772747737477474775747767477774778747797478074781747827478374784747857478674787747887478974790747917479274793747947479574796747977479874799748007480174802748037480474805748067480774808748097481074811748127481374814748157481674817748187481974820748217482274823748247482574826748277482874829748307483174832748337483474835748367483774838748397484074841748427484374844748457484674847748487484974850748517485274853748547485574856748577485874859748607486174862748637486474865748667486774868748697487074871748727487374874748757487674877748787487974880748817488274883748847488574886748877488874889748907489174892748937489474895748967489774898748997490074901749027490374904749057490674907749087490974910749117491274913749147491574916749177491874919749207492174922749237492474925749267492774928749297493074931749327493374934749357493674937749387493974940749417494274943749447494574946749477494874949749507495174952749537495474955749567495774958749597496074961749627496374964749657496674967749687496974970749717497274973749747497574976749777497874979749807498174982749837498474985749867498774988749897499074991749927499374994749957499674997749987499975000750017500275003750047500575006750077500875009750107501175012750137501475015750167501775018750197502075021750227502375024750257502675027750287502975030750317503275033750347503575036750377503875039750407504175042750437504475045750467504775048750497505075051750527505375054750557505675057750587505975060750617506275063750647506575066750677506875069750707507175072750737507475075750767507775078750797508075081750827508375084750857508675087750887508975090750917509275093750947509575096750977509875099751007510175102751037510475105751067510775108751097511075111751127511375114751157511675117751187511975120751217512275123751247512575126751277512875129751307513175132751337513475135751367513775138751397514075141751427514375144751457514675147751487514975150751517515275153751547515575156751577515875159751607516175162751637516475165751667516775168751697517075171751727517375174751757517675177751787517975180751817518275183751847518575186751877518875189751907519175192751937519475195751967519775198751997520075201752027520375204752057520675207752087520975210752117521275213752147521575216752177521875219752207522175222752237522475225752267522775228752297523075231752327523375234752357523675237752387523975240752417524275243752447524575246752477524875249752507525175252752537525475255752567525775258752597526075261752627526375264752657526675267752687526975270752717527275273752747527575276752777527875279752807528175282752837528475285752867528775288752897529075291752927529375294752957529675297752987529975300753017530275303753047530575306753077530875309753107531175312753137531475315753167531775318753197532075321753227532375324753257532675327753287532975330753317533275333753347533575336753377533875339753407534175342753437534475345753467534775348753497535075351753527535375354753557535675357753587535975360753617536275363753647536575366753677536875369753707537175372753737537475375753767537775378753797538075381753827538375384753857538675387753887538975390753917539275393753947539575396753977539875399754007540175402754037540475405754067540775408754097541075411754127541375414754157541675417754187541975420754217542275423754247542575426754277542875429754307543175432754337543475435754367543775438754397544075441754427544375444754457544675447754487544975450754517545275453754547545575456754577545875459754607546175462754637546475465754667546775468754697547075471754727547375474754757547675477754787547975480754817548275483754847548575486754877548875489754907549175492754937549475495754967549775498754997550075501755027550375504755057550675507755087550975510755117551275513755147551575516755177551875519755207552175522755237552475525755267552775528755297553075531755327553375534755357553675537755387553975540755417554275543755447554575546755477554875549755507555175552755537555475555755567555775558755597556075561755627556375564755657556675567755687556975570755717557275573755747557575576755777557875579755807558175582755837558475585755867558775588755897559075591755927559375594755957559675597755987559975600756017560275603756047560575606756077560875609756107561175612756137561475615756167561775618756197562075621756227562375624756257562675627756287562975630756317563275633756347563575636756377563875639756407564175642756437564475645756467564775648756497565075651756527565375654756557565675657756587565975660756617566275663756647566575666756677566875669756707567175672756737567475675756767567775678756797568075681756827568375684756857568675687756887568975690756917569275693756947569575696756977569875699757007570175702757037570475705757067570775708757097571075711757127571375714757157571675717757187571975720757217572275723757247572575726757277572875729757307573175732757337573475735757367573775738757397574075741757427574375744757457574675747757487574975750757517575275753757547575575756757577575875759757607576175762757637576475765757667576775768757697577075771757727577375774757757577675777757787577975780757817578275783757847578575786757877578875789757907579175792757937579475795757967579775798757997580075801758027580375804758057580675807758087580975810758117581275813758147581575816758177581875819758207582175822758237582475825758267582775828758297583075831758327583375834758357583675837758387583975840758417584275843758447584575846758477584875849758507585175852758537585475855758567585775858758597586075861758627586375864758657586675867758687586975870758717587275873758747587575876758777587875879758807588175882758837588475885758867588775888758897589075891758927589375894758957589675897758987589975900759017590275903759047590575906759077590875909759107591175912759137591475915759167591775918759197592075921759227592375924759257592675927759287592975930759317593275933759347593575936759377593875939759407594175942759437594475945759467594775948759497595075951759527595375954759557595675957759587595975960759617596275963759647596575966759677596875969759707597175972759737597475975759767597775978759797598075981759827598375984759857598675987759887598975990759917599275993759947599575996759977599875999760007600176002760037600476005760067600776008760097601076011760127601376014760157601676017760187601976020760217602276023760247602576026760277602876029760307603176032760337603476035760367603776038760397604076041760427604376044760457604676047760487604976050760517605276053760547605576056760577605876059760607606176062760637606476065760667606776068760697607076071760727607376074760757607676077760787607976080760817608276083760847608576086760877608876089760907609176092760937609476095760967609776098760997610076101761027610376104761057610676107761087610976110761117611276113761147611576116761177611876119761207612176122761237612476125761267612776128761297613076131761327613376134761357613676137761387613976140761417614276143761447614576146761477614876149761507615176152761537615476155761567615776158761597616076161761627616376164761657616676167761687616976170761717617276173761747617576176761777617876179761807618176182761837618476185761867618776188761897619076191761927619376194761957619676197761987619976200762017620276203762047620576206762077620876209762107621176212762137621476215762167621776218762197622076221762227622376224762257622676227762287622976230762317623276233762347623576236762377623876239762407624176242762437624476245762467624776248762497625076251762527625376254762557625676257762587625976260762617626276263762647626576266762677626876269762707627176272762737627476275762767627776278762797628076281762827628376284762857628676287762887628976290762917629276293762947629576296762977629876299763007630176302763037630476305763067630776308763097631076311763127631376314763157631676317763187631976320763217632276323763247632576326763277632876329763307633176332763337633476335763367633776338763397634076341763427634376344763457634676347763487634976350763517635276353763547635576356763577635876359763607636176362763637636476365763667636776368763697637076371763727637376374763757637676377763787637976380763817638276383763847638576386763877638876389763907639176392763937639476395763967639776398763997640076401764027640376404764057640676407764087640976410764117641276413764147641576416764177641876419764207642176422764237642476425764267642776428764297643076431764327643376434764357643676437764387643976440764417644276443764447644576446764477644876449764507645176452764537645476455764567645776458764597646076461764627646376464764657646676467764687646976470764717647276473764747647576476764777647876479764807648176482764837648476485764867648776488764897649076491764927649376494764957649676497764987649976500765017650276503765047650576506765077650876509765107651176512765137651476515765167651776518765197652076521765227652376524765257652676527765287652976530765317653276533765347653576536765377653876539765407654176542765437654476545765467654776548765497655076551765527655376554765557655676557765587655976560765617656276563765647656576566765677656876569765707657176572765737657476575765767657776578765797658076581765827658376584765857658676587765887658976590765917659276593765947659576596765977659876599766007660176602766037660476605766067660776608766097661076611766127661376614766157661676617766187661976620766217662276623766247662576626766277662876629766307663176632766337663476635766367663776638766397664076641766427664376644766457664676647766487664976650766517665276653766547665576656766577665876659766607666176662766637666476665766667666776668766697667076671766727667376674766757667676677766787667976680766817668276683766847668576686766877668876689766907669176692766937669476695766967669776698766997670076701767027670376704767057670676707767087670976710767117671276713767147671576716767177671876719767207672176722767237672476725767267672776728767297673076731767327673376734767357673676737767387673976740767417674276743767447674576746767477674876749767507675176752767537675476755767567675776758767597676076761767627676376764767657676676767767687676976770767717677276773767747677576776767777677876779767807678176782767837678476785767867678776788767897679076791767927679376794767957679676797767987679976800768017680276803768047680576806768077680876809768107681176812768137681476815768167681776818768197682076821768227682376824768257682676827768287682976830768317683276833768347683576836768377683876839768407684176842768437684476845768467684776848768497685076851768527685376854768557685676857768587685976860768617686276863768647686576866768677686876869768707687176872768737687476875768767687776878768797688076881768827688376884768857688676887768887688976890768917689276893768947689576896768977689876899769007690176902769037690476905769067690776908769097691076911769127691376914769157691676917769187691976920769217692276923769247692576926769277692876929769307693176932769337693476935769367693776938769397694076941769427694376944769457694676947769487694976950769517695276953769547695576956769577695876959769607696176962769637696476965769667696776968769697697076971769727697376974769757697676977769787697976980769817698276983769847698576986769877698876989769907699176992769937699476995769967699776998769997700077001770027700377004770057700677007770087700977010770117701277013770147701577016770177701877019770207702177022770237702477025770267702777028770297703077031770327703377034770357703677037770387703977040770417704277043770447704577046770477704877049770507705177052770537705477055770567705777058770597706077061770627706377064770657706677067770687706977070770717707277073770747707577076770777707877079770807708177082770837708477085770867708777088770897709077091770927709377094770957709677097770987709977100771017710277103771047710577106771077710877109771107711177112771137711477115771167711777118771197712077121771227712377124771257712677127771287712977130771317713277133771347713577136771377713877139771407714177142771437714477145771467714777148771497715077151771527715377154771557715677157771587715977160771617716277163771647716577166771677716877169771707717177172771737717477175771767717777178771797718077181771827718377184771857718677187771887718977190771917719277193771947719577196771977719877199772007720177202772037720477205772067720777208772097721077211772127721377214772157721677217772187721977220772217722277223772247722577226772277722877229772307723177232772337723477235772367723777238772397724077241772427724377244772457724677247772487724977250772517725277253772547725577256772577725877259772607726177262772637726477265772667726777268772697727077271772727727377274772757727677277772787727977280772817728277283772847728577286772877728877289772907729177292772937729477295772967729777298772997730077301773027730377304773057730677307773087730977310773117731277313773147731577316773177731877319773207732177322773237732477325773267732777328773297733077331773327733377334773357733677337773387733977340773417734277343773447734577346773477734877349773507735177352773537735477355773567735777358773597736077361773627736377364773657736677367773687736977370773717737277373773747737577376773777737877379773807738177382773837738477385773867738777388773897739077391773927739377394773957739677397773987739977400774017740277403774047740577406774077740877409774107741177412774137741477415774167741777418774197742077421774227742377424774257742677427774287742977430774317743277433774347743577436774377743877439774407744177442774437744477445774467744777448774497745077451774527745377454774557745677457774587745977460774617746277463774647746577466774677746877469774707747177472774737747477475774767747777478774797748077481774827748377484774857748677487774887748977490774917749277493774947749577496774977749877499775007750177502775037750477505775067750777508775097751077511775127751377514775157751677517775187751977520775217752277523775247752577526775277752877529775307753177532775337753477535775367753777538775397754077541775427754377544775457754677547775487754977550775517755277553775547755577556775577755877559775607756177562775637756477565775667756777568775697757077571775727757377574775757757677577775787757977580775817758277583775847758577586775877758877589775907759177592775937759477595775967759777598775997760077601776027760377604776057760677607776087760977610776117761277613776147761577616776177761877619776207762177622776237762477625776267762777628776297763077631776327763377634776357763677637776387763977640776417764277643776447764577646776477764877649776507765177652776537765477655776567765777658776597766077661776627766377664776657766677667776687766977670776717767277673776747767577676776777767877679776807768177682776837768477685776867768777688776897769077691776927769377694776957769677697776987769977700777017770277703777047770577706777077770877709777107771177712777137771477715777167771777718777197772077721777227772377724777257772677727777287772977730777317773277733777347773577736777377773877739777407774177742777437774477745777467774777748777497775077751777527775377754777557775677757777587775977760777617776277763777647776577766777677776877769777707777177772777737777477775777767777777778777797778077781777827778377784777857778677787777887778977790777917779277793777947779577796777977779877799778007780177802778037780477805778067780777808778097781077811778127781377814778157781677817778187781977820778217782277823778247782577826778277782877829778307783177832778337783477835778367783777838778397784077841778427784377844778457784677847778487784977850778517785277853778547785577856778577785877859778607786177862778637786477865778667786777868778697787077871778727787377874778757787677877778787787977880778817788277883778847788577886778877788877889778907789177892778937789477895778967789777898778997790077901779027790377904779057790677907779087790977910779117791277913779147791577916779177791877919779207792177922779237792477925779267792777928779297793077931779327793377934779357793677937779387793977940779417794277943779447794577946779477794877949779507795177952779537795477955779567795777958779597796077961779627796377964779657796677967779687796977970779717797277973779747797577976779777797877979779807798177982779837798477985779867798777988779897799077991779927799377994779957799677997779987799978000780017800278003780047800578006780077800878009780107801178012780137801478015780167801778018780197802078021780227802378024780257802678027780287802978030780317803278033780347803578036780377803878039780407804178042780437804478045780467804778048780497805078051780527805378054780557805678057780587805978060780617806278063780647806578066780677806878069780707807178072780737807478075780767807778078780797808078081780827808378084780857808678087780887808978090780917809278093780947809578096780977809878099781007810178102781037810478105781067810778108781097811078111781127811378114781157811678117781187811978120781217812278123781247812578126781277812878129781307813178132781337813478135781367813778138781397814078141781427814378144781457814678147781487814978150781517815278153781547815578156781577815878159781607816178162781637816478165781667816778168781697817078171781727817378174781757817678177781787817978180781817818278183781847818578186781877818878189781907819178192781937819478195781967819778198781997820078201782027820378204782057820678207782087820978210782117821278213782147821578216782177821878219782207822178222782237822478225782267822778228782297823078231782327823378234782357823678237782387823978240782417824278243782447824578246782477824878249782507825178252782537825478255782567825778258782597826078261782627826378264782657826678267782687826978270782717827278273782747827578276782777827878279782807828178282782837828478285782867828778288782897829078291782927829378294782957829678297782987829978300783017830278303783047830578306783077830878309783107831178312783137831478315783167831778318783197832078321783227832378324783257832678327783287832978330783317833278333783347833578336783377833878339783407834178342783437834478345783467834778348783497835078351783527835378354783557835678357783587835978360783617836278363783647836578366783677836878369783707837178372783737837478375783767837778378783797838078381783827838378384783857838678387783887838978390783917839278393783947839578396783977839878399784007840178402784037840478405784067840778408784097841078411784127841378414784157841678417784187841978420784217842278423784247842578426784277842878429784307843178432784337843478435784367843778438784397844078441784427844378444784457844678447784487844978450784517845278453784547845578456784577845878459784607846178462784637846478465784667846778468784697847078471784727847378474784757847678477784787847978480784817848278483784847848578486784877848878489784907849178492784937849478495784967849778498784997850078501785027850378504785057850678507785087850978510785117851278513785147851578516785177851878519785207852178522785237852478525785267852778528785297853078531785327853378534785357853678537785387853978540785417854278543785447854578546785477854878549785507855178552785537855478555785567855778558785597856078561785627856378564785657856678567785687856978570785717857278573785747857578576785777857878579785807858178582785837858478585785867858778588785897859078591785927859378594785957859678597785987859978600786017860278603786047860578606786077860878609786107861178612786137861478615786167861778618786197862078621786227862378624786257862678627786287862978630786317863278633786347863578636786377863878639786407864178642786437864478645786467864778648786497865078651786527865378654786557865678657786587865978660786617866278663786647866578666786677866878669786707867178672786737867478675786767867778678786797868078681786827868378684786857868678687786887868978690786917869278693786947869578696786977869878699787007870178702787037870478705787067870778708787097871078711787127871378714787157871678717787187871978720787217872278723787247872578726787277872878729787307873178732787337873478735787367873778738787397874078741787427874378744787457874678747787487874978750787517875278753787547875578756787577875878759787607876178762787637876478765787667876778768787697877078771787727877378774787757877678777787787877978780787817878278783787847878578786787877878878789787907879178792787937879478795787967879778798787997880078801788027880378804788057880678807788087880978810788117881278813788147881578816788177881878819788207882178822788237882478825788267882778828788297883078831788327883378834788357883678837788387883978840788417884278843788447884578846788477884878849788507885178852788537885478855788567885778858788597886078861788627886378864788657886678867788687886978870788717887278873788747887578876788777887878879788807888178882788837888478885788867888778888788897889078891788927889378894788957889678897788987889978900789017890278903789047890578906789077890878909789107891178912789137891478915789167891778918789197892078921789227892378924789257892678927789287892978930789317893278933789347893578936789377893878939789407894178942789437894478945789467894778948789497895078951789527895378954789557895678957789587895978960789617896278963789647896578966789677896878969789707897178972789737897478975789767897778978789797898078981789827898378984789857898678987789887898978990789917899278993789947899578996789977899878999790007900179002790037900479005790067900779008790097901079011790127901379014790157901679017790187901979020790217902279023790247902579026790277902879029790307903179032790337903479035790367903779038790397904079041790427904379044790457904679047790487904979050790517905279053790547905579056790577905879059790607906179062790637906479065790667906779068790697907079071790727907379074790757907679077790787907979080790817908279083790847908579086790877908879089790907909179092790937909479095790967909779098790997910079101791027910379104791057910679107791087910979110791117911279113791147911579116791177911879119791207912179122791237912479125791267912779128791297913079131791327913379134791357913679137791387913979140791417914279143791447914579146791477914879149791507915179152791537915479155791567915779158791597916079161791627916379164791657916679167791687916979170791717917279173791747917579176791777917879179791807918179182791837918479185791867918779188791897919079191791927919379194791957919679197791987919979200792017920279203792047920579206792077920879209792107921179212792137921479215792167921779218792197922079221792227922379224792257922679227792287922979230792317923279233792347923579236792377923879239792407924179242792437924479245792467924779248792497925079251792527925379254792557925679257792587925979260792617926279263792647926579266792677926879269792707927179272792737927479275792767927779278792797928079281792827928379284792857928679287792887928979290792917929279293792947929579296792977929879299793007930179302793037930479305793067930779308793097931079311793127931379314793157931679317793187931979320793217932279323793247932579326793277932879329793307933179332793337933479335793367933779338793397934079341793427934379344793457934679347793487934979350793517935279353793547935579356793577935879359793607936179362793637936479365793667936779368793697937079371793727937379374793757937679377793787937979380793817938279383793847938579386793877938879389793907939179392793937939479395793967939779398793997940079401794027940379404794057940679407794087940979410794117941279413794147941579416794177941879419794207942179422794237942479425794267942779428794297943079431794327943379434794357943679437794387943979440794417944279443794447944579446794477944879449794507945179452794537945479455794567945779458794597946079461794627946379464794657946679467794687946979470794717947279473794747947579476794777947879479794807948179482794837948479485794867948779488794897949079491794927949379494794957949679497794987949979500795017950279503795047950579506795077950879509795107951179512795137951479515795167951779518795197952079521795227952379524795257952679527795287952979530795317953279533795347953579536795377953879539795407954179542795437954479545795467954779548795497955079551795527955379554795557955679557795587955979560795617956279563795647956579566795677956879569795707957179572795737957479575795767957779578795797958079581795827958379584795857958679587795887958979590795917959279593795947959579596795977959879599796007960179602796037960479605796067960779608796097961079611796127961379614796157961679617796187961979620796217962279623796247962579626796277962879629796307963179632796337963479635796367963779638796397964079641796427964379644796457964679647796487964979650796517965279653796547965579656796577965879659796607966179662796637966479665796667966779668796697967079671796727967379674796757967679677796787967979680796817968279683796847968579686796877968879689796907969179692796937969479695796967969779698796997970079701797027970379704797057970679707797087970979710797117971279713797147971579716797177971879719797207972179722797237972479725797267972779728797297973079731797327973379734797357973679737797387973979740797417974279743797447974579746797477974879749797507975179752797537975479755797567975779758797597976079761797627976379764797657976679767797687976979770797717977279773797747977579776797777977879779797807978179782797837978479785797867978779788797897979079791797927979379794797957979679797797987979979800798017980279803798047980579806798077980879809798107981179812798137981479815798167981779818798197982079821798227982379824798257982679827798287982979830798317983279833798347983579836798377983879839798407984179842798437984479845798467984779848798497985079851798527985379854798557985679857798587985979860798617986279863798647986579866798677986879869798707987179872798737987479875798767987779878798797988079881798827988379884798857988679887798887988979890798917989279893798947989579896798977989879899799007990179902799037990479905799067990779908799097991079911799127991379914799157991679917799187991979920799217992279923799247992579926799277992879929799307993179932799337993479935799367993779938799397994079941799427994379944799457994679947799487994979950799517995279953799547995579956799577995879959799607996179962799637996479965799667996779968799697997079971799727997379974799757997679977799787997979980799817998279983799847998579986799877998879989799907999179992799937999479995799967999779998799998000080001800028000380004800058000680007800088000980010800118001280013800148001580016800178001880019800208002180022800238002480025800268002780028800298003080031800328003380034800358003680037800388003980040800418004280043800448004580046800478004880049800508005180052800538005480055800568005780058800598006080061800628006380064800658006680067800688006980070800718007280073800748007580076800778007880079800808008180082800838008480085800868008780088800898009080091800928009380094800958009680097800988009980100801018010280103801048010580106801078010880109801108011180112801138011480115801168011780118801198012080121801228012380124801258012680127801288012980130801318013280133801348013580136801378013880139801408014180142801438014480145801468014780148801498015080151801528015380154801558015680157801588015980160801618016280163801648016580166801678016880169801708017180172801738017480175801768017780178801798018080181801828018380184801858018680187801888018980190801918019280193801948019580196801978019880199802008020180202802038020480205802068020780208802098021080211802128021380214802158021680217802188021980220802218022280223802248022580226802278022880229802308023180232802338023480235802368023780238802398024080241802428024380244802458024680247802488024980250802518025280253802548025580256802578025880259802608026180262802638026480265802668026780268802698027080271802728027380274802758027680277802788027980280802818028280283802848028580286802878028880289802908029180292802938029480295802968029780298802998030080301803028030380304803058030680307803088030980310803118031280313803148031580316803178031880319803208032180322803238032480325803268032780328803298033080331803328033380334803358033680337803388033980340803418034280343803448034580346803478034880349803508035180352803538035480355803568035780358803598036080361803628036380364803658036680367803688036980370803718037280373803748037580376803778037880379803808038180382803838038480385803868038780388803898039080391803928039380394803958039680397803988039980400804018040280403804048040580406804078040880409804108041180412804138041480415804168041780418804198042080421804228042380424804258042680427804288042980430804318043280433804348043580436804378043880439804408044180442804438044480445804468044780448804498045080451804528045380454804558045680457804588045980460804618046280463804648046580466804678046880469804708047180472804738047480475804768047780478804798048080481804828048380484804858048680487804888048980490804918049280493804948049580496804978049880499805008050180502805038050480505805068050780508805098051080511805128051380514805158051680517805188051980520805218052280523805248052580526805278052880529805308053180532805338053480535805368053780538805398054080541805428054380544805458054680547805488054980550805518055280553805548055580556805578055880559805608056180562805638056480565805668056780568805698057080571805728057380574805758057680577805788057980580805818058280583805848058580586805878058880589805908059180592805938059480595805968059780598805998060080601806028060380604806058060680607806088060980610806118061280613806148061580616806178061880619806208062180622806238062480625806268062780628806298063080631806328063380634806358063680637806388063980640806418064280643806448064580646806478064880649806508065180652806538065480655806568065780658806598066080661806628066380664806658066680667806688066980670806718067280673806748067580676806778067880679806808068180682806838068480685806868068780688806898069080691806928069380694806958069680697806988069980700807018070280703807048070580706807078070880709807108071180712807138071480715807168071780718807198072080721807228072380724807258072680727807288072980730807318073280733807348073580736807378073880739807408074180742807438074480745807468074780748807498075080751807528075380754807558075680757807588075980760807618076280763807648076580766807678076880769807708077180772807738077480775807768077780778807798078080781807828078380784807858078680787807888078980790807918079280793807948079580796807978079880799808008080180802808038080480805808068080780808808098081080811808128081380814808158081680817808188081980820808218082280823808248082580826808278082880829808308083180832808338083480835808368083780838808398084080841808428084380844808458084680847808488084980850808518085280853808548085580856808578085880859808608086180862808638086480865808668086780868808698087080871808728087380874808758087680877808788087980880808818088280883808848088580886808878088880889808908089180892808938089480895808968089780898808998090080901809028090380904809058090680907809088090980910809118091280913809148091580916809178091880919809208092180922809238092480925809268092780928809298093080931809328093380934809358093680937809388093980940809418094280943809448094580946809478094880949809508095180952809538095480955809568095780958809598096080961809628096380964809658096680967809688096980970809718097280973809748097580976809778097880979809808098180982809838098480985809868098780988809898099080991809928099380994809958099680997809988099981000810018100281003810048100581006810078100881009810108101181012810138101481015810168101781018810198102081021810228102381024810258102681027810288102981030810318103281033810348103581036810378103881039810408104181042810438104481045810468104781048810498105081051810528105381054810558105681057810588105981060810618106281063810648106581066810678106881069810708107181072810738107481075810768107781078810798108081081810828108381084810858108681087810888108981090810918109281093810948109581096810978109881099811008110181102811038110481105811068110781108811098111081111811128111381114811158111681117811188111981120811218112281123811248112581126811278112881129811308113181132811338113481135811368113781138811398114081141811428114381144811458114681147811488114981150811518115281153811548115581156811578115881159811608116181162811638116481165811668116781168811698117081171811728117381174811758117681177811788117981180811818118281183811848118581186811878118881189811908119181192811938119481195811968119781198811998120081201812028120381204812058120681207812088120981210812118121281213812148121581216812178121881219812208122181222812238122481225812268122781228812298123081231812328123381234812358123681237812388123981240812418124281243812448124581246812478124881249812508125181252812538125481255812568125781258812598126081261812628126381264812658126681267812688126981270812718127281273812748127581276812778127881279812808128181282812838128481285812868128781288812898129081291812928129381294812958129681297812988129981300813018130281303813048130581306813078130881309813108131181312813138131481315813168131781318813198132081321813228132381324813258132681327813288132981330813318133281333813348133581336813378133881339813408134181342813438134481345813468134781348813498135081351813528135381354813558135681357813588135981360813618136281363813648136581366813678136881369813708137181372813738137481375813768137781378813798138081381813828138381384813858138681387813888138981390813918139281393813948139581396813978139881399814008140181402814038140481405814068140781408814098141081411814128141381414814158141681417814188141981420814218142281423814248142581426814278142881429814308143181432814338143481435814368143781438814398144081441814428144381444814458144681447814488144981450814518145281453814548145581456814578145881459814608146181462814638146481465814668146781468814698147081471814728147381474814758147681477814788147981480814818148281483814848148581486814878148881489814908149181492814938149481495814968149781498814998150081501815028150381504815058150681507815088150981510815118151281513815148151581516815178151881519815208152181522815238152481525815268152781528815298153081531815328153381534815358153681537815388153981540815418154281543815448154581546815478154881549815508155181552815538155481555815568155781558815598156081561815628156381564815658156681567815688156981570815718157281573815748157581576815778157881579815808158181582815838158481585815868158781588815898159081591815928159381594815958159681597815988159981600816018160281603816048160581606816078160881609816108161181612816138161481615816168161781618816198162081621816228162381624816258162681627816288162981630816318163281633816348163581636816378163881639816408164181642816438164481645816468164781648816498165081651816528165381654816558165681657816588165981660816618166281663816648166581666816678166881669816708167181672816738167481675816768167781678816798168081681816828168381684816858168681687816888168981690816918169281693816948169581696816978169881699817008170181702817038170481705817068170781708817098171081711817128171381714817158171681717817188171981720817218172281723817248172581726817278172881729817308173181732817338173481735817368173781738817398174081741817428174381744817458174681747817488174981750817518175281753817548175581756817578175881759817608176181762817638176481765817668176781768817698177081771817728177381774817758177681777817788177981780817818178281783817848178581786817878178881789817908179181792817938179481795817968179781798817998180081801818028180381804818058180681807818088180981810818118181281813818148181581816818178181881819818208182181822818238182481825818268182781828818298183081831818328183381834818358183681837818388183981840818418184281843818448184581846818478184881849818508185181852818538185481855818568185781858818598186081861818628186381864818658186681867818688186981870818718187281873818748187581876818778187881879818808188181882818838188481885818868188781888818898189081891818928189381894818958189681897818988189981900819018190281903819048190581906819078190881909819108191181912819138191481915819168191781918819198192081921819228192381924819258192681927819288192981930819318193281933819348193581936819378193881939819408194181942819438194481945819468194781948819498195081951819528195381954819558195681957819588195981960819618196281963819648196581966819678196881969819708197181972819738197481975819768197781978819798198081981819828198381984819858198681987819888198981990819918199281993819948199581996819978199881999820008200182002820038200482005820068200782008820098201082011820128201382014820158201682017820188201982020820218202282023820248202582026820278202882029820308203182032820338203482035820368203782038820398204082041820428204382044820458204682047820488204982050820518205282053820548205582056820578205882059820608206182062820638206482065820668206782068820698207082071820728207382074820758207682077820788207982080820818208282083820848208582086820878208882089820908209182092820938209482095820968209782098820998210082101821028210382104821058210682107821088210982110821118211282113821148211582116821178211882119821208212182122821238212482125821268212782128821298213082131821328213382134821358213682137821388213982140821418214282143821448214582146821478214882149821508215182152821538215482155821568215782158821598216082161821628216382164821658216682167821688216982170821718217282173821748217582176821778217882179821808218182182821838218482185821868218782188821898219082191821928219382194821958219682197821988219982200822018220282203822048220582206822078220882209822108221182212822138221482215822168221782218822198222082221822228222382224822258222682227822288222982230822318223282233822348223582236822378223882239822408224182242822438224482245822468224782248822498225082251822528225382254822558225682257822588225982260822618226282263822648226582266822678226882269822708227182272822738227482275822768227782278822798228082281822828228382284822858228682287822888228982290822918229282293822948229582296822978229882299823008230182302823038230482305823068230782308823098231082311823128231382314823158231682317823188231982320823218232282323823248232582326823278232882329823308233182332823338233482335823368233782338823398234082341823428234382344823458234682347823488234982350823518235282353823548235582356823578235882359823608236182362823638236482365823668236782368823698237082371823728237382374823758237682377823788237982380823818238282383823848238582386823878238882389823908239182392823938239482395823968239782398823998240082401824028240382404824058240682407824088240982410824118241282413824148241582416824178241882419824208242182422824238242482425824268242782428824298243082431824328243382434824358243682437824388243982440824418244282443824448244582446824478244882449824508245182452824538245482455824568245782458824598246082461824628246382464824658246682467824688246982470824718247282473824748247582476824778247882479824808248182482824838248482485824868248782488824898249082491824928249382494824958249682497824988249982500825018250282503825048250582506825078250882509825108251182512825138251482515825168251782518825198252082521825228252382524825258252682527825288252982530825318253282533825348253582536825378253882539825408254182542825438254482545825468254782548825498255082551825528255382554825558255682557825588255982560825618256282563825648256582566825678256882569825708257182572825738257482575825768257782578825798258082581825828258382584825858258682587825888258982590825918259282593825948259582596825978259882599826008260182602826038260482605826068260782608826098261082611826128261382614826158261682617826188261982620826218262282623826248262582626826278262882629826308263182632826338263482635826368263782638826398264082641826428264382644826458264682647826488264982650826518265282653826548265582656826578265882659826608266182662826638266482665826668266782668826698267082671826728267382674826758267682677826788267982680826818268282683826848268582686826878268882689826908269182692826938269482695826968269782698826998270082701827028270382704827058270682707827088270982710827118271282713827148271582716827178271882719827208272182722827238272482725827268272782728827298273082731827328273382734827358273682737827388273982740827418274282743827448274582746827478274882749827508275182752827538275482755827568275782758827598276082761827628276382764827658276682767827688276982770827718277282773827748277582776827778277882779827808278182782827838278482785827868278782788827898279082791827928279382794827958279682797827988279982800828018280282803828048280582806828078280882809828108281182812828138281482815828168281782818828198282082821828228282382824828258282682827828288282982830828318283282833828348283582836828378283882839828408284182842828438284482845828468284782848828498285082851828528285382854828558285682857828588285982860828618286282863828648286582866828678286882869828708287182872828738287482875828768287782878828798288082881828828288382884828858288682887828888288982890828918289282893828948289582896828978289882899829008290182902829038290482905829068290782908829098291082911829128291382914829158291682917829188291982920829218292282923829248292582926829278292882929829308293182932829338293482935829368293782938829398294082941829428294382944829458294682947829488294982950829518295282953829548295582956829578295882959829608296182962829638296482965829668296782968829698297082971829728297382974829758297682977829788297982980829818298282983829848298582986829878298882989829908299182992829938299482995829968299782998829998300083001830028300383004830058300683007830088300983010830118301283013830148301583016830178301883019830208302183022830238302483025830268302783028830298303083031830328303383034830358303683037830388303983040830418304283043830448304583046830478304883049830508305183052830538305483055830568305783058830598306083061830628306383064830658306683067830688306983070830718307283073830748307583076830778307883079830808308183082830838308483085830868308783088830898309083091830928309383094830958309683097830988309983100831018310283103831048310583106831078310883109831108311183112831138311483115831168311783118831198312083121831228312383124831258312683127831288312983130831318313283133831348313583136831378313883139831408314183142831438314483145831468314783148831498315083151831528315383154831558315683157831588315983160831618316283163831648316583166831678316883169831708317183172831738317483175831768317783178831798318083181831828318383184831858318683187831888318983190831918319283193831948319583196831978319883199832008320183202832038320483205832068320783208832098321083211832128321383214832158321683217832188321983220832218322283223832248322583226832278322883229832308323183232832338323483235832368323783238832398324083241832428324383244832458324683247832488324983250832518325283253832548325583256832578325883259832608326183262832638326483265832668326783268832698327083271832728327383274832758327683277832788327983280832818328283283832848328583286832878328883289832908329183292832938329483295832968329783298832998330083301833028330383304833058330683307833088330983310833118331283313833148331583316833178331883319833208332183322833238332483325833268332783328833298333083331833328333383334833358333683337833388333983340833418334283343833448334583346833478334883349833508335183352833538335483355833568335783358833598336083361833628336383364833658336683367833688336983370833718337283373833748337583376833778337883379833808338183382833838338483385833868338783388833898339083391833928339383394833958339683397833988339983400834018340283403834048340583406834078340883409834108341183412834138341483415834168341783418834198342083421834228342383424834258342683427834288342983430834318343283433834348343583436834378343883439834408344183442834438344483445834468344783448834498345083451834528345383454834558345683457834588345983460834618346283463834648346583466834678346883469834708347183472834738347483475834768347783478834798348083481834828348383484834858348683487834888348983490834918349283493834948349583496834978349883499835008350183502835038350483505835068350783508835098351083511835128351383514835158351683517835188351983520835218352283523835248352583526835278352883529835308353183532835338353483535835368353783538835398354083541835428354383544835458354683547835488354983550835518355283553835548355583556835578355883559835608356183562835638356483565835668356783568835698357083571835728357383574835758357683577835788357983580835818358283583835848358583586835878358883589835908359183592835938359483595835968359783598835998360083601836028360383604836058360683607836088360983610836118361283613836148361583616836178361883619836208362183622836238362483625836268362783628836298363083631836328363383634836358363683637836388363983640836418364283643836448364583646836478364883649836508365183652836538365483655836568365783658836598366083661836628366383664836658366683667836688366983670836718367283673836748367583676836778367883679836808368183682836838368483685836868368783688836898369083691836928369383694836958369683697836988369983700837018370283703837048370583706837078370883709837108371183712837138371483715837168371783718837198372083721837228372383724837258372683727837288372983730837318373283733837348373583736837378373883739837408374183742837438374483745837468374783748837498375083751837528375383754837558375683757837588375983760837618376283763837648376583766837678376883769837708377183772837738377483775837768377783778837798378083781837828378383784837858378683787837888378983790837918379283793837948379583796837978379883799838008380183802838038380483805838068380783808838098381083811838128381383814838158381683817838188381983820838218382283823838248382583826838278382883829838308383183832838338383483835838368383783838838398384083841838428384383844838458384683847838488384983850838518385283853838548385583856838578385883859838608386183862838638386483865838668386783868838698387083871838728387383874838758387683877838788387983880838818388283883838848388583886838878388883889838908389183892838938389483895838968389783898838998390083901839028390383904839058390683907839088390983910839118391283913839148391583916839178391883919839208392183922839238392483925839268392783928839298393083931839328393383934839358393683937839388393983940839418394283943839448394583946839478394883949839508395183952839538395483955839568395783958839598396083961839628396383964839658396683967839688396983970839718397283973839748397583976839778397883979839808398183982839838398483985839868398783988839898399083991839928399383994839958399683997839988399984000840018400284003840048400584006840078400884009840108401184012840138401484015840168401784018840198402084021840228402384024840258402684027840288402984030840318403284033840348403584036840378403884039840408404184042840438404484045840468404784048840498405084051840528405384054840558405684057840588405984060840618406284063840648406584066840678406884069840708407184072840738407484075840768407784078840798408084081840828408384084840858408684087840888408984090840918409284093840948409584096840978409884099841008410184102841038410484105841068410784108841098411084111841128411384114841158411684117841188411984120841218412284123841248412584126841278412884129841308413184132841338413484135841368413784138841398414084141841428414384144841458414684147841488414984150841518415284153841548415584156841578415884159841608416184162841638416484165841668416784168841698417084171841728417384174841758417684177841788417984180841818418284183841848418584186841878418884189841908419184192841938419484195841968419784198841998420084201842028420384204842058420684207842088420984210842118421284213842148421584216842178421884219842208422184222842238422484225842268422784228842298423084231842328423384234842358423684237842388423984240842418424284243842448424584246842478424884249842508425184252842538425484255842568425784258842598426084261842628426384264842658426684267842688426984270842718427284273842748427584276842778427884279842808428184282842838428484285842868428784288842898429084291842928429384294842958429684297842988429984300843018430284303843048430584306843078430884309843108431184312843138431484315843168431784318843198432084321843228432384324843258432684327843288432984330843318433284333843348433584336843378433884339843408434184342843438434484345843468434784348843498435084351843528435384354843558435684357843588435984360843618436284363843648436584366843678436884369843708437184372843738437484375843768437784378843798438084381843828438384384843858438684387843888438984390843918439284393843948439584396843978439884399844008440184402844038440484405844068440784408844098441084411844128441384414844158441684417844188441984420844218442284423844248442584426844278442884429844308443184432844338443484435844368443784438844398444084441844428444384444844458444684447844488444984450844518445284453844548445584456844578445884459844608446184462844638446484465844668446784468844698447084471844728447384474844758447684477844788447984480844818448284483844848448584486844878448884489844908449184492844938449484495844968449784498844998450084501845028450384504845058450684507845088450984510845118451284513845148451584516845178451884519845208452184522845238452484525845268452784528845298453084531845328453384534845358453684537845388453984540845418454284543845448454584546845478454884549845508455184552845538455484555845568455784558845598456084561845628456384564845658456684567845688456984570845718457284573845748457584576845778457884579845808458184582845838458484585845868458784588845898459084591845928459384594845958459684597845988459984600846018460284603846048460584606846078460884609846108461184612846138461484615846168461784618846198462084621846228462384624846258462684627846288462984630846318463284633846348463584636846378463884639846408464184642846438464484645846468464784648846498465084651846528465384654846558465684657846588465984660846618466284663846648466584666846678466884669846708467184672846738467484675846768467784678846798468084681846828468384684846858468684687846888468984690846918469284693846948469584696846978469884699847008470184702847038470484705847068470784708847098471084711847128471384714847158471684717847188471984720847218472284723847248472584726847278472884729847308473184732847338473484735847368473784738847398474084741847428474384744847458474684747847488474984750847518475284753847548475584756847578475884759847608476184762847638476484765847668476784768847698477084771847728477384774847758477684777847788477984780847818478284783847848478584786847878478884789847908479184792847938479484795847968479784798847998480084801848028480384804848058480684807848088480984810848118481284813848148481584816848178481884819848208482184822848238482484825848268482784828848298483084831848328483384834848358483684837848388483984840848418484284843848448484584846848478484884849848508485184852848538485484855848568485784858848598486084861848628486384864848658486684867848688486984870848718487284873848748487584876848778487884879848808488184882848838488484885848868488784888848898489084891848928489384894848958489684897848988489984900849018490284903849048490584906849078490884909849108491184912849138491484915849168491784918849198492084921849228492384924849258492684927849288492984930849318493284933849348493584936849378493884939849408494184942849438494484945849468494784948849498495084951849528495384954849558495684957849588495984960849618496284963849648496584966849678496884969849708497184972849738497484975849768497784978849798498084981849828498384984849858498684987849888498984990849918499284993849948499584996849978499884999850008500185002850038500485005850068500785008850098501085011850128501385014850158501685017850188501985020850218502285023850248502585026850278502885029850308503185032850338503485035850368503785038850398504085041850428504385044850458504685047850488504985050850518505285053850548505585056850578505885059850608506185062850638506485065850668506785068850698507085071850728507385074850758507685077850788507985080850818508285083850848508585086850878508885089850908509185092850938509485095850968509785098850998510085101851028510385104851058510685107851088510985110851118511285113851148511585116851178511885119851208512185122851238512485125851268512785128851298513085131851328513385134851358513685137851388513985140851418514285143851448514585146851478514885149851508515185152851538515485155851568515785158851598516085161851628516385164851658516685167851688516985170851718517285173851748517585176851778517885179851808518185182851838518485185851868518785188851898519085191851928519385194851958519685197851988519985200852018520285203852048520585206852078520885209852108521185212852138521485215852168521785218852198522085221852228522385224852258522685227852288522985230852318523285233852348523585236852378523885239852408524185242852438524485245852468524785248852498525085251852528525385254852558525685257852588525985260852618526285263852648526585266852678526885269852708527185272852738527485275852768527785278852798528085281852828528385284852858528685287852888528985290852918529285293852948529585296852978529885299853008530185302853038530485305853068530785308853098531085311853128531385314853158531685317853188531985320853218532285323853248532585326853278532885329853308533185332853338533485335853368533785338853398534085341853428534385344853458534685347853488534985350853518535285353853548535585356853578535885359853608536185362853638536485365853668536785368853698537085371853728537385374853758537685377853788537985380853818538285383853848538585386853878538885389853908539185392853938539485395853968539785398853998540085401854028540385404854058540685407854088540985410854118541285413854148541585416854178541885419854208542185422854238542485425854268542785428854298543085431854328543385434854358543685437854388543985440854418544285443854448544585446854478544885449854508545185452854538545485455854568545785458854598546085461854628546385464854658546685467854688546985470854718547285473854748547585476854778547885479854808548185482854838548485485854868548785488854898549085491854928549385494854958549685497854988549985500855018550285503855048550585506855078550885509855108551185512855138551485515855168551785518855198552085521855228552385524855258552685527855288552985530855318553285533855348553585536855378553885539855408554185542855438554485545855468554785548855498555085551855528555385554855558555685557855588555985560855618556285563855648556585566855678556885569855708557185572855738557485575855768557785578855798558085581855828558385584855858558685587855888558985590855918559285593855948559585596855978559885599856008560185602856038560485605856068560785608856098561085611856128561385614856158561685617856188561985620856218562285623856248562585626856278562885629856308563185632856338563485635856368563785638856398564085641856428564385644856458564685647856488564985650856518565285653856548565585656856578565885659856608566185662856638566485665856668566785668856698567085671856728567385674856758567685677856788567985680856818568285683856848568585686856878568885689856908569185692856938569485695856968569785698856998570085701857028570385704857058570685707857088570985710857118571285713857148571585716857178571885719857208572185722857238572485725857268572785728857298573085731857328573385734857358573685737857388573985740857418574285743857448574585746857478574885749857508575185752857538575485755857568575785758857598576085761857628576385764857658576685767857688576985770857718577285773857748577585776857778577885779857808578185782857838578485785857868578785788857898579085791857928579385794857958579685797857988579985800858018580285803858048580585806858078580885809858108581185812858138581485815858168581785818858198582085821858228582385824858258582685827858288582985830858318583285833858348583585836858378583885839858408584185842858438584485845858468584785848858498585085851858528585385854858558585685857858588585985860858618586285863858648586585866858678586885869858708587185872858738587485875858768587785878858798588085881858828588385884858858588685887858888588985890858918589285893858948589585896858978589885899859008590185902859038590485905859068590785908859098591085911859128591385914859158591685917859188591985920859218592285923859248592585926859278592885929859308593185932859338593485935859368593785938859398594085941859428594385944859458594685947859488594985950859518595285953859548595585956859578595885959859608596185962859638596485965859668596785968859698597085971859728597385974859758597685977859788597985980859818598285983859848598585986859878598885989859908599185992859938599485995859968599785998859998600086001860028600386004860058600686007860088600986010860118601286013860148601586016860178601886019860208602186022860238602486025860268602786028860298603086031860328603386034860358603686037860388603986040860418604286043860448604586046860478604886049860508605186052860538605486055860568605786058860598606086061860628606386064860658606686067860688606986070860718607286073860748607586076860778607886079860808608186082860838608486085860868608786088860898609086091860928609386094860958609686097860988609986100861018610286103861048610586106861078610886109861108611186112861138611486115861168611786118861198612086121861228612386124861258612686127861288612986130861318613286133861348613586136861378613886139861408614186142861438614486145861468614786148861498615086151861528615386154861558615686157861588615986160861618616286163861648616586166861678616886169861708617186172861738617486175861768617786178861798618086181861828618386184861858618686187861888618986190861918619286193861948619586196861978619886199862008620186202862038620486205862068620786208862098621086211862128621386214862158621686217862188621986220862218622286223862248622586226862278622886229862308623186232862338623486235862368623786238862398624086241862428624386244862458624686247862488624986250862518625286253862548625586256862578625886259862608626186262862638626486265862668626786268862698627086271862728627386274862758627686277862788627986280862818628286283862848628586286862878628886289862908629186292862938629486295862968629786298862998630086301863028630386304863058630686307863088630986310863118631286313863148631586316863178631886319863208632186322863238632486325863268632786328863298633086331863328633386334863358633686337863388633986340863418634286343863448634586346863478634886349863508635186352863538635486355863568635786358863598636086361863628636386364863658636686367863688636986370863718637286373863748637586376863778637886379863808638186382863838638486385863868638786388863898639086391863928639386394863958639686397863988639986400864018640286403864048640586406864078640886409864108641186412864138641486415864168641786418864198642086421864228642386424864258642686427864288642986430864318643286433864348643586436864378643886439864408644186442864438644486445864468644786448864498645086451864528645386454864558645686457864588645986460864618646286463864648646586466864678646886469864708647186472864738647486475864768647786478864798648086481864828648386484864858648686487864888648986490864918649286493864948649586496864978649886499865008650186502865038650486505865068650786508865098651086511865128651386514865158651686517865188651986520865218652286523865248652586526865278652886529865308653186532865338653486535865368653786538865398654086541865428654386544865458654686547865488654986550865518655286553865548655586556865578655886559865608656186562865638656486565865668656786568865698657086571865728657386574865758657686577865788657986580865818658286583865848658586586865878658886589865908659186592865938659486595865968659786598865998660086601866028660386604866058660686607866088660986610866118661286613866148661586616866178661886619866208662186622866238662486625866268662786628866298663086631866328663386634866358663686637866388663986640866418664286643866448664586646866478664886649866508665186652866538665486655866568665786658866598666086661866628666386664866658666686667866688666986670866718667286673866748667586676866778667886679866808668186682866838668486685866868668786688866898669086691866928669386694866958669686697866988669986700867018670286703867048670586706867078670886709867108671186712867138671486715867168671786718867198672086721867228672386724867258672686727867288672986730867318673286733867348673586736867378673886739867408674186742867438674486745867468674786748867498675086751867528675386754867558675686757867588675986760867618676286763867648676586766867678676886769867708677186772867738677486775867768677786778867798678086781867828678386784867858678686787867888678986790867918679286793867948679586796867978679886799868008680186802868038680486805868068680786808868098681086811868128681386814868158681686817868188681986820868218682286823868248682586826868278682886829868308683186832868338683486835868368683786838868398684086841868428684386844868458684686847868488684986850868518685286853868548685586856868578685886859868608686186862868638686486865868668686786868868698687086871868728687386874868758687686877868788687986880868818688286883868848688586886868878688886889868908689186892868938689486895868968689786898868998690086901869028690386904869058690686907869088690986910869118691286913869148691586916869178691886919869208692186922869238692486925869268692786928869298693086931869328693386934869358693686937869388693986940869418694286943869448694586946869478694886949869508695186952869538695486955869568695786958869598696086961869628696386964869658696686967869688696986970869718697286973869748697586976869778697886979869808698186982869838698486985869868698786988869898699086991869928699386994869958699686997869988699987000870018700287003870048700587006870078700887009870108701187012870138701487015870168701787018870198702087021870228702387024870258702687027870288702987030870318703287033870348703587036870378703887039870408704187042870438704487045870468704787048870498705087051870528705387054870558705687057870588705987060870618706287063870648706587066870678706887069870708707187072870738707487075870768707787078870798708087081870828708387084870858708687087870888708987090870918709287093870948709587096870978709887099871008710187102871038710487105871068710787108871098711087111871128711387114871158711687117871188711987120871218712287123871248712587126871278712887129871308713187132871338713487135871368713787138871398714087141871428714387144871458714687147871488714987150871518715287153871548715587156871578715887159871608716187162871638716487165871668716787168871698717087171871728717387174871758717687177871788717987180871818718287183871848718587186871878718887189871908719187192871938719487195871968719787198871998720087201872028720387204872058720687207872088720987210872118721287213872148721587216872178721887219872208722187222872238722487225872268722787228872298723087231872328723387234872358723687237872388723987240872418724287243872448724587246872478724887249872508725187252872538725487255872568725787258872598726087261872628726387264872658726687267872688726987270872718727287273872748727587276872778727887279872808728187282872838728487285872868728787288872898729087291872928729387294872958729687297872988729987300873018730287303873048730587306873078730887309873108731187312873138731487315873168731787318873198732087321873228732387324873258732687327873288732987330873318733287333873348733587336873378733887339873408734187342873438734487345873468734787348873498735087351873528735387354873558735687357873588735987360873618736287363873648736587366873678736887369873708737187372873738737487375873768737787378873798738087381873828738387384873858738687387873888738987390873918739287393873948739587396873978739887399874008740187402874038740487405874068740787408874098741087411874128741387414874158741687417874188741987420874218742287423874248742587426874278742887429874308743187432874338743487435874368743787438874398744087441874428744387444874458744687447874488744987450874518745287453874548745587456874578745887459874608746187462874638746487465874668746787468874698747087471874728747387474874758747687477874788747987480874818748287483874848748587486874878748887489874908749187492874938749487495874968749787498874998750087501875028750387504875058750687507875088750987510875118751287513875148751587516875178751887519875208752187522875238752487525875268752787528875298753087531875328753387534875358753687537875388753987540875418754287543875448754587546875478754887549875508755187552875538755487555875568755787558875598756087561875628756387564875658756687567875688756987570875718757287573875748757587576875778757887579875808758187582875838758487585875868758787588875898759087591875928759387594875958759687597875988759987600876018760287603876048760587606876078760887609876108761187612876138761487615876168761787618876198762087621876228762387624876258762687627876288762987630876318763287633876348763587636876378763887639876408764187642876438764487645876468764787648876498765087651876528765387654876558765687657876588765987660876618766287663876648766587666876678766887669876708767187672876738767487675876768767787678876798768087681876828768387684876858768687687876888768987690876918769287693876948769587696876978769887699877008770187702877038770487705877068770787708877098771087711877128771387714877158771687717877188771987720877218772287723877248772587726877278772887729877308773187732877338773487735877368773787738877398774087741877428774387744877458774687747877488774987750877518775287753877548775587756877578775887759877608776187762877638776487765877668776787768877698777087771877728777387774877758777687777877788777987780877818778287783877848778587786877878778887789877908779187792877938779487795877968779787798877998780087801878028780387804878058780687807878088780987810878118781287813878148781587816878178781887819878208782187822878238782487825878268782787828878298783087831878328783387834878358783687837878388783987840878418784287843878448784587846878478784887849878508785187852878538785487855878568785787858878598786087861878628786387864878658786687867878688786987870878718787287873878748787587876878778787887879878808788187882878838788487885878868788787888878898789087891878928789387894878958789687897878988789987900879018790287903879048790587906879078790887909879108791187912879138791487915879168791787918879198792087921879228792387924879258792687927879288792987930879318793287933879348793587936879378793887939879408794187942879438794487945879468794787948879498795087951879528795387954879558795687957879588795987960879618796287963879648796587966879678796887969879708797187972879738797487975879768797787978879798798087981879828798387984879858798687987879888798987990879918799287993879948799587996879978799887999880008800188002880038800488005880068800788008880098801088011880128801388014880158801688017880188801988020880218802288023880248802588026880278802888029880308803188032880338803488035880368803788038880398804088041880428804388044880458804688047880488804988050880518805288053880548805588056880578805888059880608806188062880638806488065880668806788068880698807088071880728807388074880758807688077880788807988080880818808288083880848808588086880878808888089880908809188092880938809488095880968809788098880998810088101881028810388104881058810688107881088810988110881118811288113881148811588116881178811888119881208812188122881238812488125881268812788128881298813088131881328813388134881358813688137881388813988140881418814288143881448814588146881478814888149881508815188152881538815488155881568815788158881598816088161881628816388164881658816688167881688816988170881718817288173881748817588176881778817888179881808818188182881838818488185881868818788188881898819088191881928819388194881958819688197881988819988200882018820288203882048820588206882078820888209882108821188212882138821488215882168821788218882198822088221882228822388224882258822688227882288822988230882318823288233882348823588236882378823888239882408824188242882438824488245882468824788248882498825088251882528825388254882558825688257882588825988260882618826288263882648826588266882678826888269882708827188272882738827488275882768827788278882798828088281882828828388284882858828688287882888828988290882918829288293882948829588296882978829888299883008830188302883038830488305883068830788308883098831088311883128831388314883158831688317883188831988320883218832288323883248832588326883278832888329883308833188332883338833488335883368833788338883398834088341883428834388344883458834688347883488834988350883518835288353883548835588356883578835888359883608836188362883638836488365883668836788368883698837088371883728837388374883758837688377883788837988380883818838288383883848838588386883878838888389883908839188392883938839488395883968839788398883998840088401884028840388404884058840688407884088840988410884118841288413884148841588416884178841888419884208842188422884238842488425884268842788428884298843088431884328843388434884358843688437884388843988440884418844288443884448844588446884478844888449884508845188452884538845488455884568845788458884598846088461884628846388464884658846688467884688846988470884718847288473884748847588476884778847888479884808848188482884838848488485884868848788488884898849088491884928849388494884958849688497884988849988500885018850288503885048850588506885078850888509885108851188512885138851488515885168851788518885198852088521885228852388524885258852688527885288852988530885318853288533885348853588536885378853888539885408854188542885438854488545885468854788548885498855088551885528855388554885558855688557885588855988560885618856288563885648856588566885678856888569885708857188572885738857488575885768857788578885798858088581885828858388584885858858688587885888858988590885918859288593885948859588596885978859888599886008860188602886038860488605886068860788608886098861088611886128861388614886158861688617886188861988620886218862288623886248862588626886278862888629886308863188632886338863488635886368863788638886398864088641886428864388644886458864688647886488864988650886518865288653886548865588656886578865888659886608866188662886638866488665886668866788668886698867088671886728867388674886758867688677886788867988680886818868288683886848868588686886878868888689886908869188692886938869488695886968869788698886998870088701887028870388704887058870688707887088870988710887118871288713887148871588716887178871888719887208872188722887238872488725887268872788728887298873088731887328873388734887358873688737887388873988740887418874288743887448874588746887478874888749887508875188752887538875488755887568875788758887598876088761887628876388764887658876688767887688876988770887718877288773887748877588776887778877888779887808878188782887838878488785887868878788788887898879088791887928879388794887958879688797887988879988800888018880288803888048880588806888078880888809888108881188812888138881488815888168881788818888198882088821888228882388824888258882688827888288882988830888318883288833888348883588836888378883888839888408884188842888438884488845888468884788848888498885088851888528885388854888558885688857888588885988860888618886288863888648886588866888678886888869888708887188872888738887488875888768887788878888798888088881888828888388884888858888688887888888888988890888918889288893888948889588896888978889888899889008890188902889038890488905889068890788908889098891088911889128891388914889158891688917889188891988920889218892288923889248892588926889278892888929889308893188932889338893488935889368893788938889398894088941889428894388944889458894688947889488894988950889518895288953889548895588956889578895888959889608896188962889638896488965889668896788968889698897088971889728897388974889758897688977889788897988980889818898288983889848898588986889878898888989889908899188992889938899488995889968899788998889998900089001890028900389004890058900689007890088900989010890118901289013890148901589016890178901889019890208902189022890238902489025890268902789028890298903089031890328903389034890358903689037890388903989040890418904289043890448904589046890478904889049890508905189052890538905489055890568905789058890598906089061890628906389064890658906689067890688906989070890718907289073890748907589076890778907889079890808908189082890838908489085890868908789088890898909089091890928909389094890958909689097890988909989100891018910289103891048910589106891078910889109891108911189112891138911489115891168911789118891198912089121891228912389124891258912689127891288912989130891318913289133891348913589136891378913889139891408914189142891438914489145891468914789148891498915089151891528915389154891558915689157891588915989160891618916289163891648916589166891678916889169891708917189172891738917489175891768917789178891798918089181891828918389184891858918689187891888918989190891918919289193891948919589196891978919889199892008920189202892038920489205892068920789208892098921089211892128921389214892158921689217892188921989220892218922289223892248922589226892278922889229892308923189232892338923489235892368923789238892398924089241892428924389244892458924689247892488924989250892518925289253892548925589256892578925889259892608926189262892638926489265892668926789268892698927089271892728927389274892758927689277892788927989280892818928289283892848928589286892878928889289892908929189292892938929489295892968929789298892998930089301893028930389304893058930689307893088930989310893118931289313893148931589316893178931889319893208932189322893238932489325893268932789328893298933089331893328933389334893358933689337893388933989340893418934289343893448934589346893478934889349893508935189352893538935489355893568935789358893598936089361893628936389364893658936689367893688936989370893718937289373893748937589376893778937889379893808938189382893838938489385893868938789388893898939089391893928939389394893958939689397893988939989400894018940289403894048940589406894078940889409894108941189412894138941489415894168941789418894198942089421894228942389424894258942689427894288942989430894318943289433894348943589436894378943889439894408944189442894438944489445894468944789448894498945089451894528945389454894558945689457894588945989460894618946289463894648946589466894678946889469894708947189472894738947489475894768947789478894798948089481894828948389484894858948689487894888948989490894918949289493894948949589496894978949889499895008950189502895038950489505895068950789508895098951089511895128951389514895158951689517895188951989520895218952289523895248952589526895278952889529895308953189532895338953489535895368953789538895398954089541895428954389544895458954689547895488954989550895518955289553895548955589556895578955889559895608956189562895638956489565895668956789568895698957089571895728957389574895758957689577895788957989580895818958289583895848958589586895878958889589895908959189592895938959489595895968959789598895998960089601896028960389604896058960689607896088960989610896118961289613896148961589616896178961889619896208962189622896238962489625896268962789628896298963089631896328963389634896358963689637896388963989640896418964289643896448964589646896478964889649896508965189652896538965489655896568965789658896598966089661896628966389664896658966689667896688966989670896718967289673896748967589676896778967889679896808968189682896838968489685896868968789688896898969089691896928969389694896958969689697896988969989700897018970289703897048970589706897078970889709897108971189712897138971489715897168971789718897198972089721897228972389724897258972689727897288972989730897318973289733897348973589736897378973889739897408974189742897438974489745897468974789748897498975089751897528975389754897558975689757897588975989760897618976289763897648976589766897678976889769897708977189772897738977489775897768977789778897798978089781897828978389784897858978689787897888978989790897918979289793897948979589796897978979889799898008980189802898038980489805898068980789808898098981089811898128981389814898158981689817898188981989820898218982289823898248982589826898278982889829898308983189832898338983489835898368983789838898398984089841898428984389844898458984689847898488984989850898518985289853898548985589856898578985889859898608986189862898638986489865898668986789868898698987089871898728987389874898758987689877898788987989880898818988289883898848988589886898878988889889898908989189892898938989489895898968989789898898998990089901899028990389904899058990689907899088990989910899118991289913899148991589916899178991889919899208992189922899238992489925899268992789928899298993089931899328993389934899358993689937899388993989940899418994289943899448994589946899478994889949899508995189952899538995489955899568995789958899598996089961899628996389964899658996689967899688996989970899718997289973899748997589976899778997889979899808998189982899838998489985899868998789988899898999089991899928999389994899958999689997899988999990000900019000290003900049000590006900079000890009900109001190012900139001490015900169001790018900199002090021900229002390024900259002690027900289002990030900319003290033900349003590036900379003890039900409004190042900439004490045900469004790048900499005090051900529005390054900559005690057900589005990060900619006290063900649006590066900679006890069900709007190072900739007490075900769007790078900799008090081900829008390084900859008690087900889008990090900919009290093900949009590096900979009890099901009010190102901039010490105901069010790108901099011090111901129011390114901159011690117901189011990120901219012290123901249012590126901279012890129901309013190132901339013490135901369013790138901399014090141901429014390144901459014690147901489014990150901519015290153901549015590156901579015890159901609016190162901639016490165901669016790168901699017090171901729017390174901759017690177901789017990180901819018290183901849018590186901879018890189901909019190192901939019490195901969019790198901999020090201902029020390204902059020690207902089020990210902119021290213902149021590216902179021890219902209022190222902239022490225902269022790228902299023090231902329023390234902359023690237902389023990240902419024290243902449024590246902479024890249902509025190252902539025490255902569025790258902599026090261902629026390264902659026690267902689026990270902719027290273902749027590276902779027890279902809028190282902839028490285902869028790288902899029090291902929029390294902959029690297902989029990300903019030290303903049030590306903079030890309903109031190312903139031490315903169031790318903199032090321903229032390324903259032690327903289032990330903319033290333903349033590336903379033890339903409034190342903439034490345903469034790348903499035090351903529035390354903559035690357903589035990360903619036290363903649036590366903679036890369903709037190372903739037490375903769037790378903799038090381903829038390384903859038690387903889038990390903919039290393903949039590396903979039890399904009040190402904039040490405904069040790408904099041090411904129041390414904159041690417904189041990420904219042290423904249042590426904279042890429904309043190432904339043490435904369043790438904399044090441904429044390444904459044690447904489044990450904519045290453904549045590456904579045890459904609046190462904639046490465904669046790468904699047090471904729047390474904759047690477904789047990480904819048290483904849048590486904879048890489904909049190492904939049490495904969049790498904999050090501905029050390504905059050690507905089050990510905119051290513905149051590516905179051890519905209052190522905239052490525905269052790528905299053090531905329053390534905359053690537905389053990540905419054290543905449054590546905479054890549905509055190552905539055490555905569055790558905599056090561905629056390564905659056690567905689056990570905719057290573905749057590576905779057890579905809058190582905839058490585905869058790588905899059090591905929059390594905959059690597905989059990600906019060290603906049060590606906079060890609906109061190612906139061490615906169061790618906199062090621906229062390624906259062690627906289062990630906319063290633906349063590636906379063890639906409064190642906439064490645906469064790648906499065090651906529065390654906559065690657906589065990660906619066290663906649066590666906679066890669906709067190672906739067490675906769067790678906799068090681906829068390684906859068690687906889068990690906919069290693906949069590696906979069890699907009070190702907039070490705907069070790708907099071090711907129071390714907159071690717907189071990720907219072290723907249072590726907279072890729907309073190732907339073490735907369073790738907399074090741907429074390744907459074690747907489074990750907519075290753907549075590756907579075890759907609076190762907639076490765907669076790768907699077090771907729077390774907759077690777907789077990780907819078290783907849078590786907879078890789907909079190792907939079490795907969079790798907999080090801908029080390804908059080690807908089080990810908119081290813908149081590816908179081890819908209082190822908239082490825908269082790828908299083090831908329083390834908359083690837908389083990840908419084290843908449084590846908479084890849908509085190852908539085490855908569085790858908599086090861908629086390864908659086690867908689086990870908719087290873908749087590876908779087890879908809088190882908839088490885908869088790888908899089090891908929089390894908959089690897908989089990900909019090290903909049090590906909079090890909909109091190912909139091490915909169091790918909199092090921909229092390924909259092690927909289092990930909319093290933909349093590936909379093890939909409094190942909439094490945909469094790948909499095090951909529095390954909559095690957909589095990960909619096290963909649096590966909679096890969909709097190972909739097490975909769097790978909799098090981909829098390984909859098690987909889098990990909919099290993909949099590996909979099890999910009100191002910039100491005910069100791008910099101091011910129101391014910159101691017910189101991020910219102291023910249102591026910279102891029910309103191032910339103491035910369103791038910399104091041910429104391044910459104691047910489104991050910519105291053910549105591056910579105891059910609106191062910639106491065910669106791068910699107091071910729107391074910759107691077910789107991080910819108291083910849108591086910879108891089910909109191092910939109491095910969109791098910999110091101911029110391104911059110691107911089110991110911119111291113911149111591116911179111891119911209112191122911239112491125911269112791128911299113091131911329113391134911359113691137911389113991140911419114291143911449114591146911479114891149911509115191152911539115491155911569115791158911599116091161911629116391164911659116691167911689116991170911719117291173911749117591176911779117891179911809118191182911839118491185911869118791188911899119091191911929119391194911959119691197911989119991200912019120291203912049120591206912079120891209912109121191212912139121491215912169121791218912199122091221912229122391224912259122691227912289122991230912319123291233912349123591236912379123891239912409124191242912439124491245912469124791248912499125091251912529125391254912559125691257912589125991260912619126291263912649126591266912679126891269912709127191272912739127491275912769127791278912799128091281912829128391284912859128691287912889128991290912919129291293912949129591296912979129891299913009130191302913039130491305913069130791308913099131091311913129131391314913159131691317913189131991320913219132291323913249132591326913279132891329913309133191332913339133491335913369133791338913399134091341913429134391344913459134691347913489134991350913519135291353913549135591356913579135891359913609136191362913639136491365913669136791368913699137091371913729137391374913759137691377913789137991380913819138291383913849138591386913879138891389913909139191392913939139491395913969139791398913999140091401914029140391404914059140691407914089140991410914119141291413914149141591416914179141891419914209142191422914239142491425914269142791428914299143091431914329143391434914359143691437914389143991440914419144291443914449144591446914479144891449914509145191452914539145491455914569145791458914599146091461914629146391464914659146691467914689146991470914719147291473914749147591476914779147891479914809148191482914839148491485914869148791488914899149091491914929149391494914959149691497914989149991500915019150291503915049150591506915079150891509915109151191512915139151491515915169151791518915199152091521915229152391524915259152691527915289152991530915319153291533915349153591536915379153891539915409154191542915439154491545915469154791548915499155091551915529155391554915559155691557915589155991560915619156291563915649156591566915679156891569915709157191572915739157491575915769157791578915799158091581915829158391584915859158691587915889158991590915919159291593915949159591596915979159891599916009160191602916039160491605916069160791608916099161091611916129161391614916159161691617916189161991620916219162291623916249162591626916279162891629916309163191632916339163491635916369163791638916399164091641916429164391644916459164691647916489164991650916519165291653916549165591656916579165891659916609166191662916639166491665916669166791668916699167091671916729167391674916759167691677916789167991680916819168291683916849168591686916879168891689916909169191692916939169491695916969169791698916999170091701917029170391704917059170691707917089170991710917119171291713917149171591716917179171891719917209172191722917239172491725917269172791728917299173091731917329173391734917359173691737917389173991740917419174291743917449174591746917479174891749917509175191752917539175491755917569175791758917599176091761917629176391764917659176691767917689176991770917719177291773917749177591776917779177891779917809178191782917839178491785917869178791788917899179091791917929179391794917959179691797917989179991800918019180291803918049180591806918079180891809918109181191812918139181491815918169181791818918199182091821918229182391824918259182691827918289182991830918319183291833918349183591836918379183891839918409184191842918439184491845918469184791848918499185091851918529185391854918559185691857918589185991860918619186291863918649186591866918679186891869918709187191872918739187491875918769187791878918799188091881918829188391884918859188691887918889188991890918919189291893918949189591896918979189891899919009190191902919039190491905919069190791908919099191091911919129191391914919159191691917919189191991920919219192291923919249192591926919279192891929919309193191932919339193491935919369193791938919399194091941919429194391944919459194691947919489194991950919519195291953919549195591956919579195891959919609196191962919639196491965919669196791968919699197091971919729197391974919759197691977919789197991980919819198291983919849198591986919879198891989919909199191992919939199491995919969199791998919999200092001920029200392004920059200692007920089200992010920119201292013920149201592016920179201892019920209202192022920239202492025920269202792028920299203092031920329203392034920359203692037920389203992040920419204292043920449204592046920479204892049920509205192052920539205492055920569205792058920599206092061920629206392064920659206692067920689206992070920719207292073920749207592076920779207892079920809208192082920839208492085920869208792088920899209092091920929209392094920959209692097920989209992100921019210292103921049210592106921079210892109921109211192112921139211492115921169211792118921199212092121921229212392124921259212692127921289212992130921319213292133921349213592136921379213892139921409214192142921439214492145921469214792148921499215092151921529215392154921559215692157921589215992160921619216292163921649216592166921679216892169921709217192172921739217492175921769217792178921799218092181921829218392184921859218692187921889218992190921919219292193921949219592196921979219892199922009220192202922039220492205922069220792208922099221092211922129221392214922159221692217922189221992220922219222292223922249222592226922279222892229922309223192232922339223492235922369223792238922399224092241922429224392244922459224692247922489224992250922519225292253922549225592256922579225892259922609226192262922639226492265922669226792268922699227092271922729227392274922759227692277922789227992280922819228292283922849228592286922879228892289922909229192292922939229492295922969229792298922999230092301923029230392304923059230692307923089230992310923119231292313923149231592316923179231892319923209232192322923239232492325923269232792328923299233092331923329233392334923359233692337923389233992340923419234292343923449234592346923479234892349923509235192352923539235492355923569235792358923599236092361923629236392364923659236692367923689236992370923719237292373923749237592376923779237892379923809238192382923839238492385923869238792388923899239092391923929239392394923959239692397923989239992400924019240292403924049240592406924079240892409924109241192412924139241492415924169241792418924199242092421924229242392424924259242692427924289242992430924319243292433924349243592436924379243892439924409244192442924439244492445924469244792448924499245092451924529245392454924559245692457924589245992460924619246292463924649246592466924679246892469924709247192472924739247492475924769247792478924799248092481924829248392484924859248692487924889248992490924919249292493924949249592496924979249892499925009250192502925039250492505925069250792508925099251092511925129251392514925159251692517925189251992520925219252292523925249252592526925279252892529925309253192532925339253492535925369253792538925399254092541925429254392544925459254692547925489254992550925519255292553925549255592556925579255892559925609256192562925639256492565925669256792568925699257092571925729257392574925759257692577925789257992580925819258292583925849258592586925879258892589925909259192592925939259492595925969259792598925999260092601926029260392604926059260692607926089260992610926119261292613926149261592616926179261892619926209262192622926239262492625926269262792628926299263092631926329263392634926359263692637926389263992640926419264292643926449264592646926479264892649926509265192652926539265492655926569265792658926599266092661926629266392664926659266692667926689266992670926719267292673926749267592676926779267892679926809268192682926839268492685926869268792688926899269092691926929269392694926959269692697926989269992700927019270292703927049270592706927079270892709927109271192712927139271492715927169271792718927199272092721927229272392724927259272692727927289272992730927319273292733927349273592736927379273892739927409274192742927439274492745927469274792748927499275092751927529275392754927559275692757927589275992760927619276292763927649276592766927679276892769927709277192772927739277492775927769277792778927799278092781927829278392784927859278692787927889278992790927919279292793927949279592796927979279892799928009280192802928039280492805928069280792808928099281092811928129281392814928159281692817928189281992820928219282292823928249282592826928279282892829928309283192832928339283492835928369283792838928399284092841928429284392844928459284692847928489284992850928519285292853928549285592856928579285892859928609286192862928639286492865928669286792868928699287092871928729287392874928759287692877928789287992880928819288292883928849288592886928879288892889928909289192892928939289492895928969289792898928999290092901929029290392904929059290692907929089290992910929119291292913929149291592916929179291892919929209292192922929239292492925929269292792928929299293092931929329293392934929359293692937929389293992940929419294292943929449294592946929479294892949929509295192952929539295492955929569295792958929599296092961929629296392964929659296692967929689296992970929719297292973929749297592976929779297892979929809298192982929839298492985929869298792988929899299092991929929299392994929959299692997929989299993000930019300293003930049300593006930079300893009930109301193012930139301493015930169301793018930199302093021930229302393024930259302693027930289302993030930319303293033930349303593036930379303893039930409304193042930439304493045930469304793048930499305093051930529305393054930559305693057930589305993060930619306293063930649306593066930679306893069930709307193072930739307493075930769307793078930799308093081930829308393084930859308693087930889308993090930919309293093930949309593096930979309893099931009310193102931039310493105931069310793108931099311093111931129311393114931159311693117931189311993120931219312293123931249312593126931279312893129931309313193132931339313493135931369313793138931399314093141931429314393144931459314693147931489314993150931519315293153931549315593156931579315893159931609316193162931639316493165931669316793168931699317093171931729317393174931759317693177931789317993180931819318293183931849318593186931879318893189931909319193192931939319493195931969319793198931999320093201932029320393204932059320693207932089320993210932119321293213932149321593216932179321893219932209322193222932239322493225932269322793228932299323093231932329323393234932359323693237932389323993240932419324293243932449324593246932479324893249932509325193252932539325493255932569325793258932599326093261932629326393264932659326693267932689326993270932719327293273932749327593276932779327893279932809328193282932839328493285932869328793288932899329093291932929329393294932959329693297932989329993300933019330293303933049330593306933079330893309933109331193312933139331493315933169331793318933199332093321933229332393324933259332693327933289332993330933319333293333933349333593336933379333893339933409334193342933439334493345933469334793348933499335093351933529335393354933559335693357933589335993360933619336293363933649336593366933679336893369933709337193372933739337493375933769337793378933799338093381933829338393384933859338693387933889338993390933919339293393933949339593396933979339893399934009340193402934039340493405934069340793408934099341093411934129341393414934159341693417934189341993420934219342293423934249342593426934279342893429934309343193432934339343493435934369343793438934399344093441934429344393444934459344693447934489344993450934519345293453934549345593456934579345893459934609346193462934639346493465934669346793468934699347093471934729347393474934759347693477934789347993480934819348293483934849348593486934879348893489934909349193492934939349493495934969349793498934999350093501935029350393504935059350693507935089350993510935119351293513935149351593516935179351893519935209352193522935239352493525935269352793528935299353093531935329353393534935359353693537935389353993540935419354293543935449354593546935479354893549935509355193552935539355493555935569355793558935599356093561935629356393564935659356693567935689356993570935719357293573935749357593576935779357893579935809358193582935839358493585935869358793588935899359093591935929359393594935959359693597935989359993600936019360293603936049360593606936079360893609936109361193612936139361493615936169361793618936199362093621936229362393624936259362693627936289362993630936319363293633936349363593636936379363893639936409364193642936439364493645936469364793648936499365093651936529365393654936559365693657936589365993660936619366293663936649366593666936679366893669936709367193672936739367493675936769367793678936799368093681936829368393684936859368693687936889368993690936919369293693936949369593696936979369893699937009370193702937039370493705937069370793708937099371093711937129371393714937159371693717937189371993720937219372293723937249372593726937279372893729937309373193732937339373493735937369373793738937399374093741937429374393744937459374693747937489374993750937519375293753937549375593756937579375893759937609376193762937639376493765937669376793768937699377093771937729377393774937759377693777937789377993780937819378293783937849378593786937879378893789937909379193792937939379493795937969379793798937999380093801938029380393804938059380693807938089380993810938119381293813938149381593816938179381893819938209382193822938239382493825938269382793828938299383093831938329383393834938359383693837938389383993840938419384293843938449384593846938479384893849938509385193852938539385493855938569385793858938599386093861938629386393864938659386693867938689386993870938719387293873938749387593876938779387893879938809388193882938839388493885938869388793888938899389093891938929389393894938959389693897938989389993900939019390293903939049390593906939079390893909939109391193912939139391493915939169391793918939199392093921939229392393924939259392693927939289392993930939319393293933939349393593936939379393893939939409394193942939439394493945939469394793948939499395093951939529395393954939559395693957939589395993960939619396293963939649396593966939679396893969939709397193972939739397493975939769397793978939799398093981939829398393984939859398693987939889398993990939919399293993939949399593996939979399893999940009400194002940039400494005940069400794008940099401094011940129401394014940159401694017940189401994020940219402294023940249402594026940279402894029940309403194032940339403494035940369403794038940399404094041940429404394044940459404694047940489404994050940519405294053940549405594056940579405894059940609406194062940639406494065940669406794068940699407094071940729407394074940759407694077940789407994080940819408294083940849408594086940879408894089940909409194092940939409494095940969409794098940999410094101941029410394104941059410694107941089410994110941119411294113941149411594116941179411894119941209412194122941239412494125941269412794128941299413094131941329413394134941359413694137941389413994140941419414294143941449414594146941479414894149941509415194152941539415494155941569415794158941599416094161941629416394164941659416694167941689416994170941719417294173941749417594176941779417894179941809418194182941839418494185941869418794188941899419094191941929419394194941959419694197941989419994200942019420294203942049420594206942079420894209942109421194212942139421494215942169421794218942199422094221942229422394224942259422694227942289422994230942319423294233942349423594236942379423894239942409424194242942439424494245942469424794248942499425094251942529425394254942559425694257942589425994260942619426294263942649426594266942679426894269942709427194272942739427494275942769427794278942799428094281942829428394284942859428694287942889428994290942919429294293942949429594296942979429894299943009430194302943039430494305943069430794308943099431094311943129431394314943159431694317943189431994320943219432294323943249432594326943279432894329943309433194332943339433494335943369433794338943399434094341943429434394344943459434694347943489434994350943519435294353943549435594356943579435894359943609436194362943639436494365943669436794368943699437094371943729437394374943759437694377943789437994380943819438294383943849438594386943879438894389943909439194392943939439494395943969439794398943999440094401944029440394404944059440694407944089440994410944119441294413944149441594416944179441894419944209442194422944239442494425944269442794428944299443094431944329443394434944359443694437944389443994440944419444294443944449444594446944479444894449944509445194452944539445494455944569445794458944599446094461944629446394464944659446694467944689446994470944719447294473944749447594476944779447894479944809448194482944839448494485944869448794488944899449094491944929449394494944959449694497944989449994500945019450294503945049450594506945079450894509945109451194512945139451494515945169451794518945199452094521945229452394524945259452694527945289452994530945319453294533945349453594536945379453894539945409454194542945439454494545945469454794548945499455094551945529455394554945559455694557945589455994560945619456294563945649456594566945679456894569945709457194572945739457494575945769457794578945799458094581945829458394584945859458694587945889458994590945919459294593945949459594596945979459894599946009460194602946039460494605946069460794608946099461094611946129461394614946159461694617946189461994620946219462294623946249462594626946279462894629946309463194632946339463494635946369463794638946399464094641946429464394644946459464694647946489464994650946519465294653946549465594656946579465894659946609466194662946639466494665946669466794668946699467094671946729467394674946759467694677946789467994680946819468294683946849468594686946879468894689946909469194692946939469494695946969469794698946999470094701947029470394704947059470694707947089470994710947119471294713947149471594716947179471894719947209472194722947239472494725947269472794728947299473094731947329473394734947359473694737947389473994740947419474294743947449474594746947479474894749947509475194752947539475494755947569475794758947599476094761947629476394764947659476694767947689476994770947719477294773947749477594776947779477894779947809478194782947839478494785947869478794788947899479094791947929479394794947959479694797947989479994800948019480294803948049480594806948079480894809948109481194812948139481494815948169481794818948199482094821948229482394824948259482694827948289482994830948319483294833948349483594836948379483894839948409484194842948439484494845948469484794848948499485094851948529485394854948559485694857948589485994860948619486294863948649486594866948679486894869948709487194872948739487494875948769487794878948799488094881948829488394884948859488694887948889488994890948919489294893948949489594896948979489894899949009490194902949039490494905949069490794908949099491094911949129491394914949159491694917949189491994920949219492294923949249492594926949279492894929949309493194932949339493494935949369493794938949399494094941949429494394944949459494694947949489494994950949519495294953949549495594956949579495894959949609496194962949639496494965949669496794968949699497094971949729497394974949759497694977949789497994980949819498294983949849498594986949879498894989949909499194992949939499494995949969499794998949999500095001950029500395004950059500695007950089500995010950119501295013950149501595016950179501895019950209502195022950239502495025950269502795028950299503095031950329503395034950359503695037950389503995040950419504295043950449504595046950479504895049950509505195052950539505495055950569505795058950599506095061950629506395064950659506695067950689506995070950719507295073950749507595076950779507895079950809508195082950839508495085950869508795088950899509095091950929509395094950959509695097950989509995100951019510295103951049510595106951079510895109951109511195112951139511495115951169511795118951199512095121951229512395124951259512695127951289512995130951319513295133951349513595136951379513895139951409514195142951439514495145951469514795148951499515095151951529515395154951559515695157951589515995160951619516295163951649516595166951679516895169951709517195172951739517495175951769517795178951799518095181951829518395184951859518695187951889518995190951919519295193951949519595196951979519895199952009520195202952039520495205952069520795208952099521095211952129521395214952159521695217952189521995220952219522295223952249522595226952279522895229952309523195232952339523495235952369523795238952399524095241952429524395244952459524695247952489524995250952519525295253952549525595256952579525895259952609526195262952639526495265952669526795268952699527095271952729527395274952759527695277952789527995280952819528295283952849528595286952879528895289952909529195292952939529495295952969529795298952999530095301953029530395304953059530695307953089530995310953119531295313953149531595316953179531895319953209532195322953239532495325953269532795328953299533095331953329533395334953359533695337953389533995340953419534295343953449534595346953479534895349953509535195352953539535495355953569535795358953599536095361953629536395364953659536695367953689536995370953719537295373953749537595376953779537895379953809538195382953839538495385953869538795388953899539095391953929539395394953959539695397953989539995400954019540295403954049540595406954079540895409954109541195412954139541495415954169541795418954199542095421954229542395424954259542695427954289542995430954319543295433954349543595436954379543895439954409544195442954439544495445954469544795448954499545095451954529545395454954559545695457954589545995460954619546295463954649546595466954679546895469954709547195472954739547495475954769547795478954799548095481954829548395484954859548695487954889548995490954919549295493954949549595496954979549895499955009550195502955039550495505955069550795508955099551095511955129551395514955159551695517955189551995520955219552295523955249552595526955279552895529955309553195532955339553495535955369553795538955399554095541955429554395544955459554695547955489554995550955519555295553955549555595556955579555895559955609556195562955639556495565955669556795568955699557095571955729557395574955759557695577955789557995580955819558295583955849558595586955879558895589955909559195592955939559495595955969559795598955999560095601956029560395604956059560695607956089560995610956119561295613956149561595616956179561895619956209562195622956239562495625956269562795628956299563095631956329563395634956359563695637956389563995640956419564295643956449564595646956479564895649956509565195652956539565495655956569565795658956599566095661956629566395664956659566695667956689566995670956719567295673956749567595676956779567895679956809568195682956839568495685956869568795688956899569095691956929569395694956959569695697956989569995700957019570295703957049570595706957079570895709957109571195712957139571495715957169571795718957199572095721957229572395724957259572695727957289572995730957319573295733957349573595736957379573895739957409574195742957439574495745957469574795748957499575095751957529575395754957559575695757957589575995760957619576295763957649576595766957679576895769957709577195772957739577495775957769577795778957799578095781957829578395784957859578695787957889578995790957919579295793957949579595796957979579895799958009580195802958039580495805958069580795808958099581095811958129581395814958159581695817958189581995820958219582295823958249582595826958279582895829958309583195832958339583495835958369583795838958399584095841958429584395844958459584695847958489584995850958519585295853958549585595856958579585895859958609586195862958639586495865958669586795868958699587095871958729587395874958759587695877958789587995880958819588295883958849588595886958879588895889958909589195892958939589495895958969589795898958999590095901959029590395904959059590695907959089590995910959119591295913959149591595916959179591895919959209592195922959239592495925959269592795928959299593095931959329593395934959359593695937959389593995940959419594295943959449594595946959479594895949959509595195952959539595495955959569595795958959599596095961959629596395964959659596695967959689596995970959719597295973959749597595976959779597895979959809598195982959839598495985959869598795988959899599095991959929599395994959959599695997959989599996000960019600296003960049600596006960079600896009960109601196012960139601496015960169601796018960199602096021960229602396024960259602696027960289602996030960319603296033960349603596036960379603896039960409604196042960439604496045960469604796048960499605096051960529605396054960559605696057960589605996060960619606296063960649606596066960679606896069960709607196072960739607496075960769607796078960799608096081960829608396084960859608696087960889608996090960919609296093960949609596096960979609896099961009610196102961039610496105961069610796108961099611096111961129611396114961159611696117961189611996120961219612296123961249612596126961279612896129961309613196132961339613496135961369613796138961399614096141961429614396144961459614696147961489614996150961519615296153961549615596156961579615896159961609616196162961639616496165961669616796168961699617096171961729617396174961759617696177961789617996180961819618296183961849618596186961879618896189961909619196192961939619496195961969619796198961999620096201962029620396204962059620696207962089620996210962119621296213962149621596216962179621896219962209622196222962239622496225962269622796228962299623096231962329623396234962359623696237962389623996240962419624296243962449624596246962479624896249962509625196252962539625496255962569625796258962599626096261962629626396264962659626696267962689626996270962719627296273962749627596276962779627896279962809628196282962839628496285962869628796288962899629096291962929629396294962959629696297962989629996300963019630296303963049630596306963079630896309963109631196312963139631496315963169631796318963199632096321963229632396324963259632696327963289632996330963319633296333963349633596336963379633896339963409634196342963439634496345963469634796348963499635096351963529635396354963559635696357963589635996360963619636296363963649636596366963679636896369963709637196372963739637496375963769637796378963799638096381963829638396384963859638696387963889638996390963919639296393963949639596396963979639896399964009640196402964039640496405964069640796408964099641096411964129641396414964159641696417964189641996420964219642296423964249642596426964279642896429964309643196432964339643496435964369643796438964399644096441964429644396444964459644696447964489644996450964519645296453964549645596456964579645896459964609646196462964639646496465964669646796468964699647096471964729647396474964759647696477964789647996480964819648296483964849648596486964879648896489964909649196492964939649496495964969649796498964999650096501965029650396504965059650696507965089650996510965119651296513965149651596516965179651896519965209652196522965239652496525965269652796528965299653096531965329653396534965359653696537965389653996540965419654296543965449654596546965479654896549965509655196552965539655496555965569655796558965599656096561965629656396564965659656696567965689656996570965719657296573965749657596576965779657896579965809658196582965839658496585965869658796588965899659096591965929659396594965959659696597965989659996600966019660296603966049660596606966079660896609966109661196612966139661496615966169661796618966199662096621966229662396624966259662696627966289662996630966319663296633966349663596636966379663896639966409664196642966439664496645966469664796648966499665096651966529665396654966559665696657966589665996660966619666296663966649666596666966679666896669966709667196672966739667496675966769667796678966799668096681966829668396684966859668696687966889668996690966919669296693966949669596696966979669896699967009670196702967039670496705967069670796708967099671096711967129671396714967159671696717967189671996720967219672296723967249672596726967279672896729967309673196732967339673496735967369673796738967399674096741967429674396744967459674696747967489674996750967519675296753967549675596756967579675896759967609676196762967639676496765967669676796768967699677096771967729677396774967759677696777967789677996780967819678296783967849678596786967879678896789967909679196792967939679496795967969679796798967999680096801968029680396804968059680696807968089680996810968119681296813968149681596816968179681896819968209682196822968239682496825968269682796828968299683096831968329683396834968359683696837968389683996840968419684296843968449684596846968479684896849968509685196852968539685496855968569685796858968599686096861968629686396864968659686696867968689686996870968719687296873968749687596876968779687896879968809688196882968839688496885968869688796888968899689096891968929689396894968959689696897968989689996900969019690296903969049690596906969079690896909969109691196912969139691496915969169691796918969199692096921969229692396924969259692696927969289692996930969319693296933969349693596936969379693896939969409694196942969439694496945969469694796948969499695096951969529695396954969559695696957969589695996960969619696296963969649696596966969679696896969969709697196972969739697496975969769697796978969799698096981969829698396984969859698696987969889698996990969919699296993969949699596996969979699896999970009700197002970039700497005970069700797008970099701097011970129701397014970159701697017970189701997020970219702297023970249702597026970279702897029970309703197032970339703497035970369703797038970399704097041970429704397044970459704697047970489704997050970519705297053970549705597056970579705897059970609706197062970639706497065970669706797068970699707097071970729707397074970759707697077970789707997080970819708297083970849708597086970879708897089970909709197092970939709497095970969709797098970999710097101971029710397104971059710697107971089710997110971119711297113971149711597116971179711897119971209712197122971239712497125971269712797128971299713097131971329713397134971359713697137971389713997140971419714297143971449714597146971479714897149971509715197152971539715497155971569715797158971599716097161971629716397164971659716697167971689716997170971719717297173971749717597176971779717897179971809718197182971839718497185971869718797188971899719097191971929719397194971959719697197971989719997200972019720297203972049720597206972079720897209972109721197212972139721497215972169721797218972199722097221972229722397224972259722697227972289722997230972319723297233972349723597236972379723897239972409724197242972439724497245972469724797248972499725097251972529725397254972559725697257972589725997260972619726297263972649726597266972679726897269972709727197272972739727497275972769727797278972799728097281972829728397284972859728697287972889728997290972919729297293972949729597296972979729897299973009730197302973039730497305973069730797308973099731097311973129731397314973159731697317973189731997320973219732297323973249732597326973279732897329973309733197332973339733497335973369733797338973399734097341973429734397344973459734697347973489734997350973519735297353973549735597356973579735897359973609736197362973639736497365973669736797368973699737097371973729737397374973759737697377973789737997380973819738297383973849738597386973879738897389973909739197392973939739497395973969739797398973999740097401974029740397404974059740697407974089740997410974119741297413974149741597416974179741897419974209742197422974239742497425974269742797428974299743097431974329743397434974359743697437974389743997440974419744297443974449744597446974479744897449974509745197452974539745497455974569745797458974599746097461974629746397464974659746697467974689746997470974719747297473974749747597476974779747897479974809748197482974839748497485974869748797488974899749097491974929749397494974959749697497974989749997500975019750297503975049750597506975079750897509975109751197512975139751497515975169751797518975199752097521975229752397524975259752697527975289752997530975319753297533975349753597536975379753897539975409754197542975439754497545975469754797548975499755097551975529755397554975559755697557975589755997560975619756297563975649756597566975679756897569975709757197572975739757497575975769757797578975799758097581975829758397584975859758697587975889758997590975919759297593975949759597596975979759897599976009760197602976039760497605976069760797608976099761097611976129761397614976159761697617976189761997620976219762297623976249762597626976279762897629976309763197632976339763497635976369763797638976399764097641976429764397644976459764697647976489764997650976519765297653976549765597656976579765897659976609766197662976639766497665976669766797668976699767097671976729767397674976759767697677976789767997680976819768297683976849768597686976879768897689976909769197692976939769497695976969769797698976999770097701977029770397704977059770697707977089770997710977119771297713977149771597716977179771897719977209772197722977239772497725977269772797728977299773097731977329773397734977359773697737977389773997740977419774297743977449774597746977479774897749977509775197752977539775497755977569775797758977599776097761977629776397764977659776697767977689776997770977719777297773977749777597776977779777897779977809778197782977839778497785977869778797788977899779097791977929779397794977959779697797977989779997800978019780297803978049780597806978079780897809978109781197812978139781497815978169781797818978199782097821978229782397824978259782697827978289782997830978319783297833978349783597836978379783897839978409784197842978439784497845978469784797848978499785097851978529785397854978559785697857978589785997860978619786297863978649786597866978679786897869978709787197872978739787497875978769787797878978799788097881978829788397884978859788697887978889788997890978919789297893978949789597896978979789897899979009790197902979039790497905979069790797908979099791097911979129791397914979159791697917979189791997920979219792297923979249792597926979279792897929979309793197932979339793497935979369793797938979399794097941979429794397944979459794697947979489794997950979519795297953979549795597956979579795897959979609796197962979639796497965979669796797968979699797097971979729797397974979759797697977979789797997980979819798297983979849798597986979879798897989979909799197992979939799497995979969799797998979999800098001980029800398004980059800698007980089800998010980119801298013980149801598016980179801898019980209802198022980239802498025980269802798028980299803098031980329803398034980359803698037980389803998040980419804298043980449804598046980479804898049980509805198052980539805498055980569805798058980599806098061980629806398064980659806698067980689806998070980719807298073980749807598076980779807898079980809808198082980839808498085980869808798088980899809098091980929809398094980959809698097980989809998100981019810298103981049810598106981079810898109981109811198112981139811498115981169811798118981199812098121981229812398124981259812698127981289812998130981319813298133981349813598136981379813898139981409814198142981439814498145981469814798148981499815098151981529815398154981559815698157981589815998160981619816298163981649816598166981679816898169981709817198172981739817498175981769817798178981799818098181981829818398184981859818698187981889818998190981919819298193981949819598196981979819898199982009820198202982039820498205982069820798208982099821098211982129821398214982159821698217982189821998220982219822298223982249822598226982279822898229982309823198232982339823498235982369823798238982399824098241982429824398244982459824698247982489824998250982519825298253982549825598256982579825898259982609826198262982639826498265982669826798268982699827098271982729827398274982759827698277982789827998280982819828298283982849828598286982879828898289982909829198292982939829498295982969829798298982999830098301983029830398304983059830698307983089830998310983119831298313983149831598316983179831898319983209832198322983239832498325983269832798328983299833098331983329833398334983359833698337983389833998340983419834298343983449834598346983479834898349983509835198352983539835498355983569835798358983599836098361983629836398364983659836698367983689836998370983719837298373983749837598376983779837898379983809838198382983839838498385983869838798388983899839098391983929839398394983959839698397983989839998400984019840298403984049840598406984079840898409984109841198412984139841498415984169841798418984199842098421984229842398424984259842698427984289842998430984319843298433984349843598436984379843898439984409844198442984439844498445984469844798448984499845098451984529845398454984559845698457984589845998460984619846298463984649846598466984679846898469984709847198472984739847498475984769847798478984799848098481984829848398484984859848698487984889848998490984919849298493984949849598496984979849898499985009850198502985039850498505985069850798508985099851098511985129851398514985159851698517985189851998520985219852298523985249852598526985279852898529985309853198532985339853498535985369853798538985399854098541985429854398544985459854698547985489854998550985519855298553985549855598556985579855898559985609856198562985639856498565985669856798568985699857098571985729857398574985759857698577985789857998580985819858298583985849858598586985879858898589985909859198592985939859498595985969859798598985999860098601986029860398604986059860698607986089860998610986119861298613986149861598616986179861898619986209862198622986239862498625986269862798628986299863098631986329863398634986359863698637986389863998640986419864298643986449864598646986479864898649986509865198652986539865498655986569865798658986599866098661986629866398664986659866698667986689866998670986719867298673986749867598676986779867898679986809868198682986839868498685986869868798688986899869098691986929869398694986959869698697986989869998700987019870298703987049870598706987079870898709987109871198712987139871498715987169871798718987199872098721987229872398724987259872698727987289872998730987319873298733987349873598736987379873898739987409874198742987439874498745987469874798748987499875098751987529875398754987559875698757987589875998760987619876298763987649876598766987679876898769987709877198772987739877498775987769877798778987799878098781987829878398784987859878698787987889878998790987919879298793987949879598796987979879898799988009880198802988039880498805988069880798808988099881098811988129881398814988159881698817988189881998820988219882298823988249882598826988279882898829988309883198832988339883498835988369883798838988399884098841988429884398844988459884698847988489884998850988519885298853988549885598856988579885898859988609886198862988639886498865988669886798868988699887098871988729887398874988759887698877988789887998880988819888298883988849888598886988879888898889988909889198892988939889498895988969889798898988999890098901989029890398904989059890698907989089890998910989119891298913989149891598916989179891898919989209892198922989239892498925989269892798928989299893098931989329893398934989359893698937989389893998940989419894298943989449894598946989479894898949989509895198952989539895498955989569895798958989599896098961989629896398964989659896698967989689896998970989719897298973989749897598976989779897898979989809898198982989839898498985989869898798988989899899098991989929899398994989959899698997989989899999000990019900299003990049900599006990079900899009990109901199012990139901499015990169901799018990199902099021990229902399024990259902699027990289902999030990319903299033990349903599036990379903899039990409904199042990439904499045990469904799048990499905099051990529905399054990559905699057990589905999060990619906299063990649906599066990679906899069990709907199072990739907499075990769907799078990799908099081990829908399084990859908699087990889908999090990919909299093990949909599096990979909899099991009910199102991039910499105991069910799108991099911099111991129911399114991159911699117991189911999120991219912299123991249912599126991279912899129991309913199132991339913499135991369913799138991399914099141991429914399144991459914699147991489914999150991519915299153991549915599156991579915899159991609916199162991639916499165991669916799168991699917099171991729917399174991759917699177991789917999180991819918299183991849918599186991879918899189991909919199192991939919499195991969919799198991999920099201992029920399204992059920699207992089920999210992119921299213992149921599216992179921899219992209922199222992239922499225992269922799228992299923099231992329923399234992359923699237992389923999240992419924299243992449924599246992479924899249992509925199252992539925499255992569925799258992599926099261992629926399264992659926699267992689926999270992719927299273992749927599276992779927899279992809928199282992839928499285992869928799288992899929099291992929929399294992959929699297992989929999300993019930299303993049930599306993079930899309993109931199312993139931499315993169931799318993199932099321993229932399324993259932699327993289932999330993319933299333993349933599336993379933899339993409934199342993439934499345993469934799348993499935099351993529935399354993559935699357993589935999360993619936299363993649936599366993679936899369993709937199372993739937499375993769937799378993799938099381993829938399384993859938699387993889938999390993919939299393993949939599396993979939899399994009940199402994039940499405994069940799408994099941099411994129941399414994159941699417994189941999420994219942299423994249942599426994279942899429994309943199432994339943499435994369943799438994399944099441994429944399444994459944699447994489944999450994519945299453994549945599456994579945899459994609946199462994639946499465994669946799468994699947099471994729947399474994759947699477994789947999480994819948299483994849948599486994879948899489994909949199492994939949499495994969949799498994999950099501995029950399504995059950699507995089950999510995119951299513995149951599516995179951899519995209952199522995239952499525995269952799528995299953099531995329953399534995359953699537995389953999540995419954299543995449954599546995479954899549995509955199552995539955499555995569955799558995599956099561995629956399564995659956699567995689956999570995719957299573995749957599576995779957899579995809958199582995839958499585995869958799588995899959099591995929959399594995959959699597995989959999600996019960299603996049960599606996079960899609996109961199612996139961499615996169961799618996199962099621996229962399624996259962699627996289962999630996319963299633996349963599636996379963899639996409964199642996439964499645996469964799648996499965099651996529965399654996559965699657996589965999660996619966299663996649966599666996679966899669996709967199672996739967499675996769967799678996799968099681996829968399684996859968699687996889968999690996919969299693996949969599696996979969899699997009970199702997039970499705997069970799708997099971099711997129971399714997159971699717997189971999720997219972299723997249972599726997279972899729997309973199732997339973499735997369973799738997399974099741997429974399744997459974699747997489974999750997519975299753997549975599756997579975899759997609976199762997639976499765997669976799768997699977099771997729977399774997759977699777997789977999780997819978299783997849978599786997879978899789997909979199792997939979499795997969979799798997999980099801998029980399804998059980699807998089980999810998119981299813998149981599816998179981899819998209982199822998239982499825998269982799828998299983099831998329983399834998359983699837998389983999840998419984299843998449984599846998479984899849998509985199852998539985499855998569985799858998599986099861998629986399864998659986699867998689986999870998719987299873998749987599876998779987899879998809988199882998839988499885998869988799888998899989099891998929989399894998959989699897998989989999900999019990299903999049990599906999079990899909999109991199912999139991499915999169991799918999199992099921999229992399924999259992699927999289992999930999319993299933999349993599936999379993899939999409994199942999439994499945999469994799948999499995099951999529995399954999559995699957999589995999960999619996299963999649996599966999679996899969999709997199972999739997499975999769997799978999799998099981999829998399984999859998699987999889998999990999919999299993999949999599996999979999899999100000100001100002100003100004100005100006100007100008100009100010100011100012100013100014100015100016100017100018100019100020100021100022100023100024100025100026100027100028100029100030100031100032100033100034100035100036100037100038100039100040100041100042100043100044100045100046100047100048100049100050100051100052100053100054100055100056100057100058100059100060100061100062100063100064100065100066100067100068100069100070100071100072100073100074100075100076100077100078100079100080100081100082100083100084100085100086100087100088100089100090100091100092100093100094100095100096100097100098100099100100100101100102100103100104100105100106100107100108100109100110100111100112100113100114100115100116100117100118100119100120100121100122100123100124100125100126100127100128100129100130100131100132100133100134100135100136100137100138100139100140100141100142100143100144100145100146100147100148100149100150100151100152100153100154100155100156100157100158100159100160100161100162100163100164100165100166100167100168100169100170100171100172100173100174100175100176100177100178100179100180100181100182100183100184100185100186100187100188100189100190100191100192100193100194100195100196100197100198100199100200100201100202100203100204100205100206100207100208100209100210100211100212100213100214100215100216100217100218100219100220100221100222100223100224100225100226100227100228100229100230100231100232100233100234100235100236100237100238100239100240100241100242100243100244100245100246100247100248100249100250100251100252100253100254100255100256100257100258100259100260100261100262100263100264100265100266100267100268100269100270100271100272100273100274100275100276100277100278100279100280100281100282100283100284100285100286100287100288100289100290100291100292100293100294100295100296100297100298100299100300100301100302100303100304100305100306100307100308100309100310100311100312100313100314100315100316100317100318100319100320100321100322100323100324100325100326100327100328100329100330100331100332100333100334100335100336100337100338100339100340100341100342100343100344100345100346100347100348100349100350100351100352100353100354100355100356100357100358100359100360100361100362100363100364100365100366100367100368100369100370100371100372100373100374100375100376100377100378100379100380100381100382100383100384100385100386100387100388100389100390100391100392100393100394100395100396100397100398100399100400100401100402100403100404100405100406100407100408100409100410100411100412100413100414100415100416100417100418100419100420100421100422100423100424100425100426100427100428100429100430100431100432100433100434100435100436100437100438100439100440100441100442100443100444100445100446100447100448100449100450100451100452100453100454100455100456100457100458100459100460100461100462100463100464100465100466100467100468100469100470100471100472100473100474100475100476100477100478100479100480100481100482100483100484100485100486100487100488100489100490100491100492100493100494100495100496100497100498100499100500100501100502100503100504100505100506100507100508100509100510100511100512100513100514100515100516100517100518100519100520100521100522100523100524100525100526100527100528100529100530100531100532100533100534100535100536100537100538100539100540100541100542100543100544100545100546100547100548100549100550100551100552100553100554100555100556100557100558100559100560100561100562100563100564100565100566100567100568100569100570100571100572100573100574100575100576100577100578100579100580100581100582100583100584100585100586100587100588100589100590100591100592100593100594100595100596100597100598100599100600100601100602100603100604100605100606100607100608100609100610100611100612100613100614100615100616100617100618100619100620100621100622100623100624100625100626100627100628100629100630100631100632100633100634100635100636100637100638100639100640100641100642100643100644100645100646100647100648100649100650100651100652100653100654100655100656100657100658100659100660100661100662100663100664100665100666100667100668100669100670100671100672100673100674100675100676100677100678100679100680100681100682100683100684100685100686100687100688100689100690100691100692100693100694100695100696100697100698100699100700100701100702100703100704100705100706100707100708100709100710100711100712100713100714100715100716100717100718100719100720100721100722100723100724100725100726100727100728100729100730100731100732100733100734100735100736100737100738100739100740100741100742100743100744100745100746100747100748100749100750100751100752100753100754100755100756100757100758100759100760100761100762100763100764100765100766100767100768100769100770100771100772100773100774100775100776100777100778100779100780100781100782100783100784100785100786100787100788100789100790100791100792100793100794100795100796100797100798100799100800100801100802100803100804100805100806100807100808100809100810100811100812100813100814100815100816100817100818100819100820100821100822100823100824100825100826100827100828100829100830100831100832100833100834100835100836100837100838100839100840100841100842100843100844100845100846100847100848100849100850100851100852100853100854100855100856100857100858100859100860100861100862100863100864100865100866100867100868100869100870100871100872100873100874100875100876100877100878100879100880100881100882100883100884100885100886100887100888100889100890100891100892100893100894100895100896100897100898100899100900100901100902100903100904100905100906100907100908100909100910100911100912100913100914100915100916100917100918100919100920100921100922100923100924100925100926100927100928100929100930100931100932100933100934100935100936100937100938100939100940100941100942100943100944100945100946100947100948100949100950100951100952100953100954100955100956100957100958100959100960100961100962100963100964100965100966100967100968100969100970100971100972100973100974100975100976100977100978100979100980100981100982100983100984100985100986100987100988100989100990100991100992100993100994100995100996100997100998100999101000101001101002101003101004101005101006101007101008101009101010101011101012101013101014101015101016101017101018101019101020101021101022101023101024101025101026101027101028101029101030101031101032101033101034101035101036101037101038101039101040101041101042101043101044101045101046101047101048101049101050101051101052101053101054101055101056101057101058101059101060101061101062101063101064101065101066101067101068101069101070101071101072101073101074101075101076101077101078101079101080101081101082101083101084101085101086101087101088101089101090101091101092101093101094101095101096101097101098101099101100101101101102101103101104101105101106101107101108101109101110101111101112101113101114101115101116101117101118101119101120101121101122101123101124101125101126101127101128101129101130101131101132101133101134101135101136101137101138101139101140101141101142101143101144101145101146101147101148101149101150101151101152101153101154101155101156101157101158101159101160101161101162101163101164101165101166101167101168101169101170101171101172101173101174101175101176101177101178101179101180101181101182101183101184101185101186101187101188101189101190101191101192101193101194101195101196101197101198101199101200101201101202101203101204101205101206101207101208101209101210101211101212101213101214101215101216101217101218101219101220101221101222101223101224101225101226101227101228101229101230101231101232101233101234101235101236101237101238101239101240101241101242101243101244101245101246101247101248101249101250101251101252101253101254101255101256101257101258101259101260101261101262101263101264101265101266101267101268101269101270101271101272101273101274101275101276101277101278101279101280101281101282101283101284101285101286101287101288101289101290101291101292101293101294101295101296101297101298101299101300101301101302101303101304101305101306101307101308101309101310101311101312101313101314101315101316101317101318101319101320101321101322101323101324101325101326101327101328101329101330101331101332101333101334101335101336101337101338101339101340101341101342101343101344101345101346101347101348101349101350101351101352101353101354101355101356101357101358101359101360101361101362101363101364101365101366101367101368101369101370101371101372101373101374101375101376101377101378101379101380101381101382101383101384101385101386101387101388101389101390101391101392101393101394101395101396101397101398101399101400101401101402101403101404101405101406101407101408101409101410101411101412101413101414101415101416101417101418101419101420101421101422101423101424101425101426101427101428101429101430101431101432101433101434101435101436101437101438101439101440101441101442101443101444101445101446101447101448101449101450101451101452101453101454101455101456101457101458101459101460101461101462101463101464101465101466101467101468101469101470101471101472101473101474101475101476101477101478101479101480101481101482101483101484101485101486101487101488101489101490101491101492101493101494101495101496101497101498101499101500101501101502101503101504101505101506101507101508101509101510101511101512101513101514101515101516101517101518101519101520101521101522101523101524101525101526101527101528101529101530101531101532101533101534101535101536101537101538101539101540101541101542101543101544101545101546101547101548101549101550101551101552101553101554101555101556101557101558101559101560101561101562101563101564101565101566101567101568101569101570101571101572101573101574101575101576101577101578101579101580101581101582101583101584101585101586101587101588101589101590101591101592101593101594101595101596101597101598101599101600101601101602101603101604101605101606101607101608101609101610101611101612101613101614101615101616101617101618101619101620101621101622101623101624101625101626101627101628101629101630101631101632101633101634101635101636101637101638101639101640101641101642101643101644101645101646101647101648101649101650101651101652101653101654101655101656101657101658101659101660101661101662101663101664101665101666101667101668101669101670101671101672101673101674101675101676101677101678101679101680101681101682101683101684101685101686101687101688101689101690101691101692101693101694101695101696101697101698101699101700101701101702101703101704101705101706101707101708101709101710101711101712101713101714101715101716101717101718101719101720101721101722101723101724101725101726101727101728101729101730101731101732101733101734101735101736101737101738101739101740101741101742101743101744101745101746101747101748101749101750101751101752101753101754101755101756101757101758101759101760101761101762101763101764101765101766101767101768101769101770101771101772101773101774101775101776101777101778101779101780101781101782101783101784101785101786101787101788101789101790101791101792101793101794101795101796101797101798101799101800101801101802101803101804101805101806101807101808101809101810101811101812101813101814101815101816101817101818101819101820101821101822101823101824101825101826101827101828101829101830101831101832101833101834101835101836101837101838101839101840101841101842101843101844101845101846101847101848101849101850101851101852101853101854101855101856101857101858101859101860101861101862101863101864101865101866101867101868101869101870101871101872101873101874101875101876101877101878101879101880101881101882101883101884101885101886101887101888101889101890101891101892101893101894101895101896101897101898101899101900101901101902101903101904101905101906101907101908101909101910101911101912101913101914101915101916101917101918101919101920101921101922101923101924101925101926101927101928101929101930101931101932101933101934101935101936101937101938101939101940101941101942101943101944101945101946101947101948101949101950101951101952101953101954101955101956101957101958101959101960101961101962101963101964101965101966101967101968101969101970101971101972101973101974101975101976101977101978101979101980101981101982101983101984101985101986101987101988101989101990101991101992101993101994101995101996101997101998101999102000102001102002102003102004102005102006102007102008102009102010102011102012102013102014102015102016102017102018102019102020102021102022102023102024102025102026102027102028102029102030102031102032102033102034102035102036102037102038102039102040102041102042102043102044102045102046102047102048102049102050102051102052102053102054102055102056102057102058102059102060102061102062102063102064102065102066102067102068102069102070102071102072102073102074102075102076102077102078102079102080102081102082102083102084102085102086102087102088102089102090102091102092102093102094102095102096102097102098102099102100102101102102102103102104102105102106102107102108102109102110102111102112102113102114102115102116102117102118102119102120102121102122102123102124102125102126102127102128102129102130102131102132102133102134102135102136102137102138102139102140102141102142102143102144102145102146102147102148102149102150102151102152102153102154102155102156102157102158102159102160102161102162102163102164102165102166102167102168102169102170102171102172102173102174102175102176102177102178102179102180102181102182102183102184102185102186102187102188102189102190102191102192102193102194102195102196102197102198102199102200102201102202102203102204102205102206102207102208102209102210102211102212102213102214102215102216102217102218102219102220102221102222102223102224102225102226102227102228102229102230102231102232102233102234102235102236102237102238102239102240102241102242102243102244102245102246102247102248102249102250102251102252102253102254102255102256102257102258102259102260102261102262102263102264102265102266102267102268102269102270102271102272102273102274102275102276102277102278102279102280102281102282102283102284102285102286102287102288102289102290102291102292102293102294102295102296102297102298102299102300102301102302102303102304102305102306102307102308102309102310102311102312102313102314102315102316102317102318102319102320102321102322102323102324102325102326102327102328102329102330102331102332102333102334102335102336102337102338102339102340102341102342102343102344102345102346102347102348102349102350102351102352102353102354102355102356102357102358102359102360102361102362102363102364102365102366102367102368102369102370102371102372102373102374102375102376102377102378102379102380102381102382102383102384102385102386102387102388102389102390102391102392102393102394102395102396102397102398102399102400102401102402102403102404102405102406102407102408102409102410102411102412102413102414102415102416102417102418102419102420102421102422102423102424102425102426102427102428102429102430102431102432102433102434102435102436102437102438102439102440102441102442102443102444102445102446102447102448102449102450102451102452102453102454102455102456102457102458102459102460102461102462102463102464102465102466102467102468102469102470102471102472102473102474102475102476102477102478102479102480102481102482102483102484102485102486102487102488102489102490102491102492102493102494102495102496102497102498102499102500102501102502102503102504102505102506102507102508102509102510102511102512102513102514102515102516102517102518102519102520102521102522102523102524102525102526102527102528102529102530102531102532102533102534102535102536102537102538102539102540102541102542102543102544102545102546102547102548102549102550102551102552102553102554102555102556102557102558102559102560102561102562102563102564102565102566102567102568102569102570102571102572102573102574102575102576102577102578102579102580102581102582102583102584102585102586102587102588102589102590102591102592102593102594102595102596102597102598102599102600102601102602102603102604102605102606102607102608102609102610102611102612102613102614102615102616102617102618102619102620102621102622102623102624102625102626102627102628102629102630102631102632102633102634102635102636102637102638102639102640102641102642102643102644102645102646102647102648102649102650102651102652102653102654102655102656102657102658102659102660102661102662102663102664102665102666102667102668102669102670102671102672102673102674102675102676102677102678102679102680102681102682102683102684102685102686102687102688102689102690102691102692102693102694102695102696102697102698102699102700102701102702102703102704102705102706102707102708102709102710102711102712102713102714102715102716102717102718102719102720102721102722102723102724102725102726102727102728102729102730102731102732102733102734102735102736102737102738102739102740102741102742102743102744102745102746102747102748102749102750102751102752102753102754102755102756102757102758102759102760102761102762102763102764102765102766102767102768102769102770102771102772102773102774102775102776102777102778102779102780102781102782102783102784102785102786102787102788102789102790102791102792102793102794102795102796102797102798102799102800102801102802102803102804102805102806102807102808102809102810102811102812102813102814102815102816102817102818102819102820102821102822102823102824102825102826102827102828102829102830102831102832102833102834102835102836102837102838102839102840102841102842102843102844102845102846102847102848102849102850102851102852102853102854102855102856102857102858102859102860102861102862102863102864102865102866102867102868102869102870102871102872102873102874102875102876102877102878102879102880102881102882102883102884102885102886102887102888102889102890102891102892102893102894102895102896102897102898102899102900102901102902102903102904102905102906102907102908102909102910102911102912102913102914102915102916102917102918102919102920102921102922102923102924102925102926102927102928102929102930102931102932102933102934102935102936102937102938102939102940102941102942102943102944102945102946102947102948102949102950102951102952102953102954102955102956102957102958102959102960102961102962102963102964102965102966102967102968102969102970102971102972102973102974102975102976102977102978102979102980102981102982102983102984102985102986102987102988102989102990102991102992102993102994102995102996102997102998102999103000103001103002103003103004103005103006103007103008103009103010103011103012103013103014103015103016103017103018103019103020103021103022103023103024103025103026103027103028103029103030103031103032103033103034103035103036103037103038103039103040103041103042103043103044103045103046103047103048103049103050103051103052103053103054103055103056103057103058103059103060103061103062103063103064103065103066103067103068103069103070103071103072103073103074103075103076103077103078103079103080103081103082103083103084103085103086103087103088103089103090103091103092103093103094103095103096103097103098103099103100103101103102103103103104103105103106103107103108103109103110103111103112103113103114103115103116103117103118103119103120103121103122103123103124103125103126103127103128103129103130103131103132103133103134103135103136103137103138103139103140103141103142103143103144103145103146103147103148103149103150103151103152103153103154103155103156103157103158103159103160103161103162103163103164103165103166103167103168103169103170103171103172103173103174103175103176103177103178103179103180103181103182103183103184103185103186103187103188103189103190103191103192103193103194103195103196103197103198103199103200103201103202103203103204103205103206103207103208103209103210103211103212103213103214103215103216103217103218103219103220103221103222103223103224103225103226103227103228103229103230103231103232103233103234103235103236103237103238103239103240103241103242103243103244103245103246103247103248103249103250103251103252103253103254103255103256103257103258103259103260103261103262103263103264103265103266103267103268103269103270103271103272103273103274103275103276103277103278103279103280103281103282103283103284103285103286103287103288103289103290103291103292103293103294103295103296103297103298103299103300103301103302103303103304103305103306103307103308103309103310103311103312103313103314103315103316103317103318103319103320103321103322103323103324103325103326103327103328103329103330103331103332103333103334103335103336103337103338103339103340103341103342103343103344103345103346103347103348103349103350103351103352103353103354103355103356103357103358103359103360103361103362103363103364103365103366103367103368103369103370103371103372103373103374103375103376103377103378103379103380103381103382103383103384103385103386103387103388103389103390103391103392103393103394103395103396103397103398103399103400103401103402103403103404103405103406103407103408103409103410103411103412103413103414103415103416103417103418103419103420103421103422103423103424103425103426103427103428103429103430103431103432103433103434103435103436103437103438103439103440103441103442103443103444103445103446103447103448103449103450103451103452103453103454103455103456103457103458103459103460103461103462103463103464103465103466103467103468103469103470103471103472103473103474103475103476103477103478103479103480103481103482103483103484103485103486103487103488103489103490103491103492103493103494103495103496103497103498103499103500103501103502103503103504103505103506103507103508103509103510103511103512103513103514103515103516103517103518103519103520103521103522103523103524103525103526103527103528103529103530103531103532103533103534103535103536103537103538103539103540103541103542103543103544103545103546103547103548103549103550103551103552103553103554103555103556103557103558103559103560103561103562103563103564103565103566103567103568103569103570103571103572103573103574103575103576103577103578103579103580103581103582103583103584103585103586103587103588103589103590103591103592103593103594103595103596103597103598103599103600103601103602103603103604103605103606103607103608103609103610103611103612103613103614103615103616103617103618103619103620103621103622103623103624103625103626103627103628103629103630103631103632103633103634103635103636103637103638103639103640103641103642103643103644103645103646103647103648103649103650103651103652103653103654103655103656103657103658103659103660103661103662103663103664103665103666103667103668103669103670103671103672103673103674103675103676103677103678103679103680103681103682103683103684103685103686103687103688103689103690103691103692103693103694103695103696103697103698103699103700103701103702103703103704103705103706103707103708103709103710103711103712103713103714103715103716103717103718103719103720103721103722103723103724103725103726103727103728103729103730103731103732103733103734103735103736103737103738103739103740103741103742103743103744103745103746103747103748103749103750103751103752103753103754103755103756103757103758103759103760103761103762103763103764103765103766103767103768103769103770103771103772103773103774103775103776103777103778103779103780103781103782103783103784103785103786103787103788103789103790103791103792103793103794103795103796103797103798103799103800103801103802103803103804103805103806103807103808103809103810103811103812103813103814103815103816103817103818103819103820103821103822103823103824103825103826103827103828103829103830103831103832103833103834103835103836103837103838103839103840103841103842103843103844103845103846103847103848103849103850103851103852103853103854103855103856103857103858103859103860103861103862103863103864103865103866103867103868103869103870103871103872103873103874103875103876103877103878103879103880103881103882103883103884103885103886103887103888103889103890103891103892103893103894103895103896103897103898103899103900103901103902103903103904103905103906103907103908103909103910103911103912103913103914103915103916103917103918103919103920103921103922103923103924103925103926103927103928103929103930103931103932103933103934103935103936103937103938103939103940103941103942103943103944103945103946103947103948103949103950103951103952103953103954103955103956103957103958103959103960103961103962103963103964103965103966103967103968103969103970103971103972103973103974103975103976103977103978103979103980103981103982103983103984103985103986103987103988103989103990103991103992103993103994103995103996103997103998103999104000104001104002104003104004104005104006104007104008104009104010104011104012104013104014104015104016104017104018104019104020104021104022104023104024104025104026104027104028104029104030104031104032104033104034104035104036104037104038104039104040104041104042104043104044104045104046104047104048104049104050104051104052104053104054104055104056104057104058104059104060104061104062104063104064104065104066104067104068104069104070104071104072104073104074104075104076104077104078104079104080104081104082104083104084104085104086104087104088104089104090104091104092104093104094104095104096104097104098104099104100104101104102104103104104104105104106104107104108104109104110104111104112104113104114104115104116104117104118104119104120104121104122104123104124104125104126104127104128104129104130104131104132104133104134104135104136104137104138104139104140104141104142104143104144104145104146104147104148104149104150104151104152104153104154104155104156104157104158104159104160104161104162104163104164104165104166104167104168104169104170104171104172104173104174104175104176104177104178104179104180104181104182104183104184104185104186104187104188104189104190104191104192104193104194104195104196104197104198104199104200104201104202104203104204104205104206104207104208104209104210104211104212104213104214104215104216104217104218104219104220104221104222104223104224104225104226104227104228104229104230104231104232104233104234104235104236104237104238104239104240104241104242104243104244104245104246104247104248104249104250104251104252104253104254104255104256104257104258104259104260104261104262104263104264104265104266104267104268104269104270104271104272104273104274104275104276104277104278104279104280104281104282104283104284104285104286104287104288104289104290104291104292104293104294104295104296104297104298104299104300104301104302104303104304104305104306104307104308104309104310104311104312104313104314104315104316104317104318104319104320104321104322104323104324104325104326104327104328104329104330104331104332104333104334104335104336104337104338104339104340104341104342104343104344104345104346104347104348104349104350104351104352104353104354104355104356104357104358104359104360104361104362104363104364104365104366104367104368104369104370104371104372104373104374104375104376104377104378104379104380104381104382104383104384104385104386104387104388104389104390104391104392104393104394104395104396104397104398104399104400104401104402104403104404104405104406104407104408104409104410104411104412104413104414104415104416104417104418104419104420104421104422104423104424104425104426104427104428104429104430104431104432104433104434104435104436104437104438104439104440104441104442104443104444104445104446104447104448104449104450104451104452104453104454104455104456104457104458104459104460104461104462104463104464104465104466104467104468104469104470104471104472104473104474104475104476104477104478104479104480104481104482104483104484104485104486104487104488104489104490104491104492104493104494104495104496104497104498104499104500104501104502104503104504104505104506104507104508104509104510104511104512104513104514104515104516104517104518104519104520104521104522104523104524104525104526104527104528104529104530104531104532104533104534104535104536104537104538104539104540104541104542104543104544104545104546104547104548104549104550104551104552104553104554104555104556104557104558104559104560104561104562104563104564104565104566104567104568104569104570104571104572104573104574104575104576104577104578104579104580104581104582104583104584104585104586104587104588104589104590104591104592104593104594104595104596104597104598104599104600104601104602104603104604104605104606104607104608104609104610104611104612104613104614104615104616104617104618104619104620104621104622104623104624104625104626104627104628104629104630104631104632104633104634104635104636104637104638104639104640104641104642104643104644104645104646104647104648104649104650104651104652104653104654104655104656104657104658104659104660104661104662104663104664104665104666104667104668104669104670104671104672104673104674104675104676104677104678104679104680104681104682104683104684104685104686104687104688104689104690104691104692104693104694104695104696104697104698104699104700104701104702104703104704104705104706104707104708104709104710104711104712104713104714104715104716104717104718104719104720104721104722104723104724104725104726104727104728104729104730104731104732104733104734104735104736104737104738104739104740104741104742104743104744104745104746104747104748104749104750104751104752104753104754104755104756104757104758104759104760104761104762104763104764104765104766104767104768104769104770104771104772104773104774104775104776104777104778104779104780104781104782104783104784104785104786104787104788104789104790104791104792104793104794104795104796104797104798104799104800104801104802104803104804104805104806104807104808104809104810104811104812104813104814104815104816104817104818104819104820104821104822104823104824104825104826104827104828104829104830104831104832104833104834104835104836104837104838104839104840104841104842104843104844104845104846104847104848104849104850104851104852104853104854104855104856104857104858104859104860104861104862104863104864104865104866104867104868104869104870104871104872104873104874104875104876104877104878104879104880104881104882104883104884104885104886104887104888104889104890104891104892104893104894104895104896104897104898104899104900104901104902104903104904104905104906104907104908104909104910104911104912104913104914104915104916104917104918104919104920104921104922104923104924104925104926104927104928104929104930104931104932104933104934104935104936104937104938104939104940104941104942104943104944104945104946104947104948104949104950104951104952104953104954104955104956104957104958104959104960104961104962104963104964104965104966104967104968104969104970104971104972104973104974104975104976104977104978104979104980104981104982104983104984104985104986104987104988104989104990104991104992104993104994104995104996104997104998104999105000105001105002105003105004105005105006105007105008105009105010105011105012105013105014105015105016105017105018105019105020105021105022105023105024105025105026105027105028105029105030105031105032105033105034105035105036105037105038105039105040105041105042105043105044105045105046105047105048105049105050105051105052105053105054105055105056105057105058105059105060105061105062105063105064105065105066105067105068105069105070105071105072105073105074105075105076105077105078105079105080105081105082105083105084105085105086105087105088105089105090105091105092105093105094105095105096105097105098105099105100105101105102105103105104105105105106105107105108105109105110105111105112105113105114105115105116105117105118105119105120105121105122105123105124105125105126105127105128105129105130105131105132105133105134105135105136105137105138105139105140105141105142105143105144105145105146105147105148105149105150105151105152105153105154105155105156105157105158105159105160105161105162105163105164105165105166105167105168105169105170105171105172105173105174105175105176105177105178105179105180105181105182105183105184105185105186105187105188105189105190105191105192105193105194105195105196105197105198105199105200105201105202105203105204105205105206105207105208105209105210105211105212105213105214105215105216105217105218105219105220105221105222105223105224105225105226105227105228105229105230105231105232105233105234105235105236105237105238105239105240105241105242105243105244105245105246105247105248105249105250105251105252105253105254105255105256105257105258105259105260105261105262105263105264105265105266105267105268105269105270105271105272105273105274105275105276105277105278105279105280105281105282105283105284105285105286105287105288105289105290105291105292105293105294105295105296105297105298105299105300105301105302105303105304105305105306105307105308105309105310105311105312105313105314105315105316105317105318105319105320105321105322105323105324105325105326105327105328105329105330105331105332105333105334105335105336105337105338105339105340105341105342105343105344105345105346105347105348105349105350105351105352105353105354105355105356105357105358105359105360105361105362105363105364105365105366105367105368105369105370105371105372105373105374105375105376105377105378105379105380105381105382105383105384105385105386105387105388105389105390105391105392105393105394105395105396105397105398105399105400105401105402105403105404105405105406105407105408105409105410105411105412105413105414105415105416105417105418105419105420105421105422105423105424105425105426105427105428105429105430105431105432105433105434105435105436105437105438105439105440105441105442105443105444105445105446105447105448105449105450105451105452105453105454105455105456105457105458105459105460105461105462105463105464105465105466105467105468105469105470105471105472105473105474105475105476105477105478105479105480105481105482105483105484105485105486105487105488105489105490105491105492105493105494105495105496105497105498105499105500105501105502105503105504105505105506105507105508105509105510105511105512105513105514105515105516105517105518105519105520105521105522105523105524105525105526105527105528105529105530105531105532105533105534105535105536105537105538105539105540105541105542105543105544105545105546105547105548105549105550105551105552105553105554105555105556105557105558105559105560105561105562105563105564105565105566105567105568105569105570105571105572105573105574105575105576105577105578105579105580105581105582105583105584105585105586105587105588105589105590105591105592105593105594105595105596105597105598105599105600105601105602105603105604105605105606105607105608105609105610105611105612105613105614105615105616105617105618105619105620105621105622105623105624105625105626105627105628105629105630105631105632105633105634105635105636105637105638105639105640105641105642105643105644105645105646105647105648105649105650105651105652105653105654105655105656105657105658105659105660105661105662105663105664105665105666105667105668105669105670105671105672105673105674105675105676105677105678105679105680105681105682105683105684105685105686105687105688105689105690105691105692105693105694105695105696105697105698105699105700105701105702105703105704105705105706105707105708105709105710105711105712105713105714105715105716105717105718105719105720105721105722105723105724105725105726105727105728105729105730105731105732105733105734105735105736105737105738105739105740105741105742105743105744105745105746105747105748105749105750105751105752105753105754105755105756105757105758105759105760105761105762105763105764105765105766105767105768105769105770105771105772105773105774105775105776105777105778105779105780105781105782105783105784105785105786105787105788105789105790105791105792105793105794105795105796105797105798105799105800105801105802105803105804105805105806105807105808105809105810105811105812105813105814105815105816105817105818105819105820105821105822105823105824105825105826105827105828105829105830105831105832105833105834105835105836105837105838105839105840105841105842105843105844105845105846105847105848105849105850105851105852105853105854105855105856105857105858105859105860105861105862105863105864105865105866105867105868105869105870105871105872105873105874105875105876105877105878105879105880105881105882105883105884105885105886105887105888105889105890105891105892105893105894105895105896105897105898105899105900105901105902105903105904105905105906105907105908105909105910105911105912105913105914105915105916105917105918105919105920105921105922105923105924105925105926105927105928105929105930105931105932105933105934105935105936105937105938105939105940105941105942105943105944105945105946105947105948105949105950105951105952105953105954105955105956105957105958105959105960105961105962105963105964105965105966105967105968105969105970105971105972105973105974105975105976105977105978105979105980105981105982105983105984105985105986105987105988105989105990105991105992105993105994105995105996105997105998105999106000106001106002106003106004106005106006106007106008106009106010106011106012106013106014106015106016106017106018106019106020106021106022106023106024106025106026106027106028106029106030106031106032106033106034106035106036106037106038106039106040106041106042106043106044106045106046106047106048106049106050106051106052106053106054106055106056106057106058106059106060106061106062106063106064106065106066106067106068106069106070106071106072106073106074106075106076106077106078106079106080106081106082106083106084106085106086106087106088106089106090106091106092106093106094106095106096106097106098106099106100106101106102106103106104106105106106106107106108106109106110106111106112106113106114106115106116106117106118106119106120106121106122106123106124106125106126106127106128106129106130106131106132106133106134106135106136106137106138106139106140106141106142106143106144106145106146106147106148106149106150106151106152106153106154106155106156106157106158106159106160106161106162106163106164106165106166106167106168106169106170106171106172106173106174106175106176106177106178106179106180106181106182106183106184106185106186106187106188106189106190106191106192106193106194106195106196106197106198106199106200106201106202106203106204106205106206106207106208106209106210106211106212106213106214106215106216106217106218106219106220106221106222106223106224106225106226106227106228106229106230106231106232106233106234106235106236106237106238106239106240106241106242106243106244106245106246106247106248106249106250106251106252106253106254106255106256106257106258106259106260106261106262106263106264106265106266106267106268106269106270106271106272106273106274106275106276106277106278106279106280106281106282106283106284106285106286106287106288106289106290106291106292106293106294106295106296106297106298106299106300106301106302106303106304106305106306106307106308106309106310106311106312106313106314106315106316106317106318106319106320106321106322106323106324106325106326106327106328106329106330106331106332106333106334106335106336106337106338106339106340106341106342106343106344106345106346106347106348106349106350106351106352106353106354106355106356106357106358106359106360106361106362106363106364106365106366106367106368106369106370106371106372106373106374106375106376106377106378106379106380106381106382106383106384106385106386106387106388106389106390106391106392106393106394106395106396106397106398106399106400106401106402106403106404106405106406106407106408106409106410106411106412106413106414106415106416106417106418106419106420106421106422106423106424106425106426106427106428106429106430106431106432106433106434106435106436106437106438106439106440106441106442106443106444106445106446106447106448106449106450106451106452106453106454106455106456106457106458106459106460106461106462106463106464106465106466106467106468106469106470106471106472106473106474106475106476106477106478106479106480106481106482106483106484106485106486106487106488106489106490106491106492106493106494106495106496106497106498106499106500106501106502106503106504106505106506106507106508106509106510106511106512106513106514106515106516106517106518106519106520106521106522106523106524106525106526106527106528106529106530106531106532106533106534106535106536106537106538106539106540106541106542106543106544106545106546106547106548106549106550106551106552106553106554106555106556106557106558106559106560106561106562106563106564106565106566106567106568106569106570106571106572106573106574106575106576106577106578106579106580106581106582106583106584106585106586106587106588106589106590106591106592106593106594106595106596106597106598106599106600106601106602106603106604106605106606106607106608106609106610106611106612106613106614106615106616106617106618106619106620106621106622106623106624106625106626106627106628106629106630106631106632106633106634106635106636106637106638106639106640106641106642106643106644106645106646106647106648106649106650106651106652106653106654106655106656106657106658106659106660106661106662106663106664106665106666106667106668106669106670106671106672106673106674106675106676106677106678106679106680106681106682106683106684106685106686106687106688106689106690106691106692106693106694106695106696106697106698106699106700106701106702106703106704106705106706106707106708106709106710106711106712106713106714106715106716106717106718106719106720106721106722106723106724106725106726106727106728106729106730106731106732106733106734106735106736106737106738106739106740106741106742106743106744106745106746106747106748106749106750106751106752106753106754106755106756106757106758106759106760106761106762106763106764106765106766106767106768106769106770106771106772106773106774106775106776106777106778106779106780106781106782106783106784106785106786106787106788106789106790106791106792106793106794106795106796106797106798106799106800106801106802106803106804106805106806106807106808106809106810106811106812106813106814106815106816106817106818106819106820106821106822106823106824106825106826106827106828106829106830106831106832106833106834106835106836106837106838106839106840106841106842106843106844106845106846106847106848106849106850106851106852106853106854106855106856106857106858106859106860106861106862106863106864106865106866106867106868106869106870106871106872106873106874106875106876106877106878106879106880106881106882106883106884106885106886106887106888106889106890106891106892106893106894106895106896106897106898106899106900106901106902106903106904106905106906106907106908106909106910106911106912106913106914106915106916106917106918106919106920106921106922106923106924106925106926106927106928106929106930106931106932106933106934106935106936106937106938106939106940106941106942106943106944106945106946106947106948106949106950106951106952106953106954106955106956106957106958106959106960106961106962106963106964106965106966106967106968106969106970106971106972106973106974106975106976106977106978106979106980106981106982106983106984106985106986106987106988106989106990106991106992106993106994106995106996106997106998106999107000107001107002107003107004107005107006107007107008107009107010107011107012107013107014107015107016107017107018107019107020107021107022107023107024107025107026107027107028107029107030107031107032107033107034107035107036107037107038107039107040107041107042107043107044107045107046107047107048107049107050107051107052107053107054107055107056107057107058107059107060107061107062107063107064107065107066107067107068107069107070107071107072107073107074107075107076107077107078107079107080107081107082107083107084107085107086107087107088107089107090107091107092107093107094107095107096107097107098107099107100107101107102107103107104107105107106107107107108107109107110107111107112107113107114107115107116107117107118107119107120107121107122107123107124107125107126107127107128107129107130107131107132107133107134107135107136107137107138107139107140107141107142107143107144107145107146107147107148107149107150107151107152107153107154107155107156107157107158107159107160107161107162107163107164107165107166107167107168107169107170107171107172107173107174107175107176107177107178107179107180107181107182107183107184107185107186107187107188107189107190107191107192107193107194107195107196107197107198107199107200107201107202107203107204107205107206107207107208107209107210107211107212107213107214107215107216107217107218107219107220107221107222107223107224107225107226107227107228107229107230107231107232107233107234107235107236107237107238107239107240107241107242107243107244107245107246107247107248107249107250107251107252107253107254107255107256107257107258107259107260107261107262107263107264107265107266107267107268107269107270107271107272107273107274107275107276107277107278107279107280107281107282107283107284107285107286107287107288107289107290107291107292107293107294107295107296107297107298107299107300107301107302107303107304107305107306107307107308107309107310107311107312107313107314107315107316107317107318107319107320107321107322107323107324107325107326107327107328107329107330107331107332107333107334107335107336107337107338107339107340107341107342107343107344107345107346107347107348107349107350107351107352107353107354107355107356107357107358107359107360107361107362107363107364107365107366107367107368107369107370107371107372107373107374107375107376107377107378107379107380107381107382107383107384107385107386107387107388107389107390107391107392107393107394107395107396107397107398107399107400107401107402107403107404107405107406107407107408107409107410107411107412107413107414107415107416107417107418107419107420107421107422107423107424107425107426107427107428107429107430107431107432107433107434107435107436107437107438107439107440107441107442107443107444107445107446107447107448107449107450107451107452107453107454107455107456107457107458107459107460107461107462107463107464107465107466107467107468107469107470107471107472107473107474107475107476107477107478107479107480107481107482107483107484107485107486107487107488107489107490107491107492107493107494107495107496107497107498107499107500107501107502107503107504107505107506107507107508107509107510107511107512107513107514107515107516107517107518107519107520107521107522107523107524107525107526107527107528107529107530107531107532107533107534107535107536107537107538107539107540107541107542107543107544107545107546107547107548107549107550107551107552107553107554107555107556107557107558107559107560107561107562107563107564107565107566107567107568107569107570107571107572107573107574107575107576107577107578107579107580107581107582107583107584107585107586107587107588107589107590107591107592107593107594107595107596107597107598107599107600107601107602107603107604107605107606107607107608107609107610107611107612107613107614107615107616107617107618107619107620107621107622107623107624107625107626107627107628107629107630107631107632107633107634107635107636107637107638107639107640107641107642107643107644107645107646107647107648107649107650107651107652107653107654107655107656107657107658107659107660107661107662107663107664107665107666107667107668107669107670107671107672107673107674107675107676107677107678107679107680107681107682107683107684107685107686107687107688107689107690107691107692107693107694107695107696107697107698107699107700107701107702107703107704107705107706107707107708107709107710107711107712107713107714107715107716107717107718107719107720107721107722107723107724107725107726107727107728107729107730107731107732107733107734107735107736107737107738107739107740107741107742107743107744107745107746107747107748107749107750107751107752107753107754107755107756107757107758107759107760107761107762107763107764107765107766107767107768107769107770107771107772107773107774107775107776107777107778107779107780107781107782107783107784107785107786107787107788107789107790107791107792107793107794107795107796107797107798107799107800107801107802107803107804107805107806107807107808107809107810107811107812107813107814107815107816107817107818107819107820107821107822107823107824107825107826107827107828107829107830107831107832107833107834107835107836107837107838107839107840107841107842107843107844107845107846107847107848107849107850107851107852107853107854107855107856107857107858107859107860107861107862107863107864107865107866107867107868107869107870107871107872107873107874107875107876107877107878107879107880107881107882107883107884107885107886107887107888107889107890107891107892107893107894107895107896107897107898107899107900107901107902107903107904107905107906107907107908107909107910107911107912107913107914107915107916107917107918107919107920107921107922107923107924107925107926107927107928107929107930107931107932107933107934107935107936107937107938107939107940107941107942107943107944107945107946107947107948107949107950107951107952107953107954107955107956107957107958107959107960107961107962107963107964107965107966107967107968107969107970107971107972107973107974107975107976107977107978107979107980107981107982107983107984107985107986107987107988107989107990107991107992107993107994107995107996107997107998107999108000108001108002108003108004108005108006108007108008108009108010108011108012108013108014108015108016108017108018108019108020108021108022108023108024108025108026108027108028108029108030108031108032108033108034108035108036108037108038108039108040108041108042108043108044108045108046108047108048108049108050108051108052108053108054108055108056108057108058108059108060108061108062108063108064108065108066108067108068108069108070108071108072108073108074108075108076108077108078108079108080108081108082108083108084108085108086108087108088108089108090108091108092108093108094108095108096108097108098108099108100108101108102108103108104108105108106108107108108108109108110108111108112108113108114108115108116108117108118108119108120108121108122108123108124108125108126108127108128108129108130108131108132108133108134108135108136108137108138108139108140108141108142108143108144108145108146108147108148108149108150108151108152108153108154108155108156108157108158108159108160108161108162108163108164108165108166108167108168108169108170108171108172108173108174108175108176108177108178108179108180108181108182108183108184108185108186108187108188108189108190108191108192108193108194108195108196108197108198108199108200108201108202108203108204108205108206108207108208108209108210108211108212108213108214108215108216108217108218108219108220108221108222108223108224108225108226108227108228108229108230108231108232108233108234108235108236108237108238108239108240108241108242108243108244108245108246108247108248108249108250108251108252108253108254108255108256108257108258108259108260108261108262108263108264108265108266108267108268108269108270108271108272108273108274108275108276108277108278108279108280108281108282108283108284108285108286108287108288108289108290108291108292108293108294108295108296108297108298108299108300108301108302108303108304108305108306108307108308108309108310108311108312108313108314108315108316108317108318108319108320108321108322108323108324108325108326108327108328108329108330108331108332108333108334108335108336108337108338108339108340108341108342108343108344108345108346108347108348108349108350108351108352108353108354108355108356108357108358108359108360108361108362108363108364108365108366108367108368108369108370108371108372108373108374108375108376108377108378108379108380108381108382108383108384108385108386108387108388108389108390108391108392108393108394108395108396108397108398108399108400108401108402108403108404108405108406108407108408108409108410108411108412108413108414108415108416108417108418108419108420108421108422108423108424108425108426108427108428108429108430108431108432108433108434108435108436108437108438108439108440108441108442108443108444108445108446108447108448108449108450108451108452108453108454108455108456108457108458108459108460108461108462108463108464108465108466108467108468108469108470108471108472108473108474108475108476108477108478108479108480108481108482108483108484108485108486108487108488108489108490108491108492108493108494108495108496108497108498108499108500108501108502108503108504108505108506108507108508108509108510108511108512108513108514108515108516108517108518108519108520108521108522108523108524108525108526108527108528108529108530108531108532108533108534108535108536108537108538108539108540108541108542108543108544108545108546108547108548108549108550108551108552108553108554108555108556108557108558108559108560108561108562108563108564108565108566108567108568108569108570108571108572108573108574108575108576108577108578108579108580108581108582108583108584108585108586108587108588108589108590108591108592108593108594108595108596108597108598108599108600108601108602108603108604108605108606108607108608108609108610108611108612108613108614108615108616108617108618108619108620108621108622108623108624108625108626108627108628108629108630108631108632108633108634108635108636108637108638108639108640108641108642108643108644108645108646108647108648108649108650108651108652108653108654108655108656108657108658108659108660108661108662108663108664108665108666108667108668108669108670108671108672108673108674108675108676108677108678108679108680108681108682108683108684108685108686108687108688108689108690108691108692108693108694108695108696108697108698108699108700108701108702108703108704108705108706108707108708108709108710108711108712108713108714108715108716108717108718108719108720108721108722108723108724108725108726108727108728108729108730108731108732108733108734108735108736108737108738108739108740108741108742108743108744108745108746108747108748108749108750108751108752108753108754108755108756108757108758108759108760108761108762108763108764108765108766108767108768108769108770108771108772108773108774108775108776108777108778108779108780108781108782108783108784108785108786108787108788108789108790108791108792108793108794108795108796108797108798108799108800108801108802108803108804108805108806108807108808108809108810108811108812108813108814108815108816108817108818108819108820108821108822108823108824108825108826108827108828108829108830108831108832108833108834108835108836108837108838108839108840108841108842108843108844108845108846108847108848108849108850108851108852108853108854108855108856108857108858108859108860108861108862108863108864108865108866108867108868108869108870108871108872108873108874108875108876108877108878108879108880108881108882108883108884108885108886108887108888108889108890108891108892108893108894108895108896108897108898108899108900108901108902108903108904108905108906108907108908108909108910108911108912108913108914108915108916108917108918108919108920108921108922108923108924108925108926108927108928108929108930108931108932108933108934108935108936108937108938108939108940108941108942108943108944108945108946108947108948108949108950108951108952108953108954108955108956108957108958108959108960108961108962108963108964108965108966108967108968108969108970108971108972108973108974108975108976108977108978108979108980108981108982108983108984108985108986108987108988108989108990108991108992108993108994108995108996108997108998108999109000109001109002109003109004109005109006109007109008109009109010109011109012109013109014109015109016109017109018109019109020109021109022109023109024109025109026109027109028109029109030109031109032109033109034109035109036109037109038109039109040109041109042109043109044109045109046109047109048109049109050109051109052109053109054109055109056109057109058109059109060109061109062109063109064109065109066109067109068109069109070109071109072109073109074109075109076109077109078109079109080109081109082109083109084109085109086109087109088109089109090109091109092109093109094109095109096109097109098109099109100109101109102109103109104109105109106109107109108109109109110109111109112109113109114109115109116109117109118109119109120109121109122109123109124109125109126109127109128109129109130109131109132109133109134109135109136109137109138109139109140109141109142109143109144109145109146109147109148109149109150109151109152109153109154109155109156109157109158109159109160109161109162109163109164109165109166109167109168109169109170109171109172109173109174109175109176109177109178109179109180109181109182109183109184109185109186109187109188109189109190109191109192109193109194109195109196109197109198109199109200109201109202109203109204109205109206109207109208109209109210109211109212109213109214109215109216109217109218109219109220109221109222109223109224109225109226109227109228109229109230109231109232109233109234109235109236109237109238109239109240109241109242109243109244109245109246109247109248109249109250109251109252109253109254109255109256109257109258109259109260109261109262109263109264109265109266109267109268109269109270109271109272109273109274109275109276109277109278109279109280109281109282109283109284109285109286109287109288109289109290109291109292109293109294109295109296109297109298109299109300109301109302109303109304109305109306109307109308109309109310109311109312109313109314109315109316109317109318109319109320109321109322109323109324109325109326109327109328109329109330109331109332109333109334109335109336109337109338109339109340109341109342109343109344109345109346109347109348109349109350109351109352109353109354109355109356109357109358109359109360109361109362109363109364109365109366109367109368109369109370109371109372109373109374109375109376109377109378109379109380109381109382109383109384109385109386109387109388109389109390109391109392109393109394109395109396109397109398109399109400109401109402109403109404109405109406109407109408109409109410109411109412109413109414109415109416109417109418109419109420109421109422109423109424109425109426109427109428109429109430109431109432109433109434109435109436109437109438109439109440109441109442109443109444109445109446109447109448109449109450109451109452109453109454109455109456109457109458109459109460109461109462109463109464109465109466109467109468109469109470109471109472109473109474109475109476109477109478109479109480109481109482109483109484109485109486109487109488109489109490109491109492109493109494109495109496109497109498109499109500109501109502109503109504109505109506109507109508109509109510109511109512109513109514109515109516109517109518109519109520109521109522109523109524109525109526109527109528109529109530109531109532109533109534109535109536109537109538109539109540109541109542109543109544109545109546109547109548109549109550109551109552109553109554109555109556109557109558109559109560109561109562109563109564109565109566109567109568109569109570109571109572109573109574109575109576109577109578109579109580109581109582109583109584109585109586109587109588109589109590109591109592109593109594109595109596109597109598109599109600109601109602109603109604109605109606109607109608109609109610109611109612109613109614109615109616109617109618109619109620109621109622109623109624109625109626109627109628109629109630109631109632109633109634109635109636109637109638109639109640109641109642109643109644109645109646109647109648109649109650109651109652109653109654109655109656109657109658109659109660109661109662109663109664109665109666109667109668109669109670109671109672109673109674109675109676109677109678109679109680109681109682109683109684109685109686109687109688109689109690109691109692109693109694109695109696109697109698109699109700109701109702109703109704109705109706109707109708109709109710109711109712109713109714109715109716109717109718109719109720109721109722109723109724109725109726109727109728109729109730109731109732109733109734109735109736109737109738109739109740109741109742109743109744109745109746109747109748109749109750109751109752109753109754109755109756109757109758109759109760109761109762109763109764109765109766109767109768109769109770109771109772109773109774109775109776109777109778109779109780109781109782109783109784109785109786109787109788109789109790109791109792109793109794109795109796109797109798109799109800109801109802109803109804109805109806109807109808109809109810109811109812109813109814109815109816109817109818109819109820109821109822109823109824109825109826109827109828109829109830109831109832109833109834109835109836109837109838109839109840109841109842109843109844109845109846109847109848109849109850109851109852109853109854109855109856109857109858109859109860109861109862109863109864109865109866109867109868109869109870109871109872109873109874109875109876109877109878109879109880109881109882109883109884109885109886109887109888109889109890109891109892109893109894109895109896109897109898109899109900109901109902109903109904109905109906109907109908109909109910109911109912109913109914109915109916109917109918109919109920109921109922109923109924109925109926109927109928109929109930109931109932109933109934109935109936109937109938109939109940109941109942109943109944109945109946109947109948109949109950109951109952109953109954109955109956109957109958109959109960109961109962109963109964109965109966109967109968109969109970109971109972109973109974109975109976109977109978109979109980109981109982109983109984109985109986109987109988109989109990109991109992109993109994109995109996109997109998109999110000110001110002110003110004110005110006110007110008110009110010110011110012110013110014110015110016110017110018110019110020110021110022110023110024110025110026110027110028110029110030110031110032110033110034110035110036110037110038110039110040110041110042110043110044110045110046110047110048110049110050110051110052110053110054110055110056110057110058110059110060110061110062110063110064110065110066110067110068110069110070110071110072110073110074110075110076110077110078110079110080110081110082110083110084110085110086110087110088110089110090110091110092110093110094110095110096110097110098110099110100110101110102110103110104110105110106110107110108110109110110110111110112110113110114110115110116110117110118110119110120110121110122110123110124110125110126110127110128110129110130110131110132110133110134110135110136110137110138110139110140110141110142110143110144110145110146110147110148110149110150110151110152110153110154110155110156110157110158110159110160110161110162110163110164110165110166110167110168110169110170110171110172110173110174110175110176110177110178110179110180110181110182110183110184110185110186110187110188110189110190110191110192110193110194110195110196110197110198110199110200110201110202110203110204110205110206110207110208110209110210110211110212110213110214110215110216110217110218110219110220110221110222110223110224110225110226110227110228110229110230110231110232110233110234110235110236110237110238110239110240110241110242110243110244110245110246110247110248110249110250110251110252110253110254110255110256110257110258110259110260110261110262110263110264110265110266110267110268110269110270110271110272110273110274110275110276110277110278110279110280110281110282110283110284110285110286110287110288110289110290110291110292110293110294110295110296110297110298110299110300110301110302110303110304110305110306110307110308110309110310110311110312110313110314110315110316110317110318110319110320110321110322110323110324110325110326110327110328110329110330110331110332110333110334110335110336110337110338110339110340110341110342110343110344110345110346110347110348110349110350110351110352110353110354110355110356110357110358110359110360110361110362110363110364110365110366110367110368110369110370110371110372110373110374110375110376110377110378110379110380110381110382110383110384110385110386110387110388110389110390110391110392110393110394110395110396110397110398110399110400110401110402110403110404110405110406110407110408110409110410110411110412110413110414110415110416110417110418110419110420110421110422110423110424110425110426110427110428110429110430110431110432110433110434110435110436110437110438110439110440110441110442110443110444110445110446110447110448110449110450110451110452110453110454110455110456110457110458110459110460110461110462110463110464110465110466110467110468110469110470110471110472110473110474110475110476110477110478110479110480110481110482110483110484110485110486110487110488110489110490110491110492110493110494110495110496110497110498110499110500110501110502110503110504110505110506110507110508110509110510110511110512110513110514110515110516110517110518110519110520110521110522110523110524110525110526110527110528110529110530110531110532110533110534110535110536110537110538110539110540110541110542110543110544110545110546110547110548110549110550110551110552110553110554110555110556110557110558110559110560110561110562110563110564110565110566110567110568110569110570110571110572110573110574110575110576110577110578110579110580110581110582110583110584110585110586110587110588110589110590110591110592110593110594110595110596110597110598110599110600110601110602110603110604110605110606110607110608110609110610110611110612110613110614110615110616110617110618110619110620110621110622110623110624110625110626110627110628110629110630110631110632110633110634110635110636110637110638110639110640110641110642110643110644110645110646110647110648110649110650110651110652110653110654110655110656110657110658110659110660110661110662110663110664110665110666110667110668110669110670110671110672110673110674110675110676110677110678110679110680110681110682110683110684110685110686110687110688110689110690110691110692110693110694110695110696110697110698110699110700110701110702110703110704110705110706110707110708110709110710110711110712110713110714110715110716110717110718110719110720110721110722110723110724110725110726110727110728110729110730110731110732110733110734110735110736110737110738110739110740110741110742110743110744110745110746110747110748110749110750110751110752110753110754110755110756110757110758110759110760110761110762110763110764110765110766110767110768110769110770110771110772110773110774110775110776110777110778110779110780110781110782110783110784110785110786110787110788110789110790110791110792110793110794110795110796110797110798110799110800110801110802110803110804110805110806110807110808110809110810110811110812110813110814110815110816110817110818110819110820110821110822110823110824110825110826110827110828110829110830110831110832110833110834110835110836110837110838110839110840110841110842110843110844110845110846110847110848110849110850110851110852110853110854110855110856110857110858110859110860110861110862110863110864110865110866110867110868110869110870110871110872110873110874110875110876110877110878110879110880110881110882110883110884110885110886110887110888110889110890110891110892110893110894110895110896110897110898110899110900110901110902110903110904110905110906110907110908110909110910110911110912110913110914110915110916110917110918110919110920110921110922110923110924110925110926110927110928110929110930110931110932110933110934110935110936110937110938110939110940110941110942110943110944110945110946110947110948110949110950110951110952110953110954110955110956110957110958110959110960110961110962110963110964110965110966110967110968110969110970110971110972110973110974110975110976110977110978110979110980110981110982110983110984110985110986110987110988110989110990110991110992110993110994110995110996110997110998110999111000111001111002111003111004111005111006111007111008111009111010111011111012111013111014111015111016111017111018111019111020111021111022111023111024111025111026111027111028111029111030111031111032111033111034111035111036111037111038111039111040111041111042111043111044111045111046111047111048111049111050111051111052111053111054111055111056111057111058111059111060111061111062111063111064111065111066111067111068111069111070111071111072111073111074111075111076111077111078111079111080111081111082111083111084111085111086111087111088111089111090111091111092111093111094111095111096111097111098111099111100111101111102111103111104111105111106111107111108111109111110111111111112111113111114111115111116111117111118111119111120111121111122111123111124111125111126111127111128111129111130111131111132111133111134111135111136111137111138111139111140111141111142111143111144111145111146111147111148111149111150111151111152111153111154111155111156111157111158111159111160111161111162111163111164111165111166111167111168111169111170111171111172111173111174111175111176111177111178111179111180111181111182111183111184111185111186111187111188111189111190111191111192111193111194111195111196111197111198111199111200111201111202111203111204111205111206111207111208111209111210111211111212111213111214111215111216111217111218111219111220111221111222111223111224111225111226111227111228111229111230111231111232111233111234111235111236111237111238111239111240111241111242111243111244111245111246111247111248111249111250111251111252111253111254111255111256111257111258111259111260111261111262111263111264111265111266111267111268111269111270111271111272111273111274111275111276111277111278111279111280111281111282111283111284111285111286111287111288111289111290111291111292111293111294111295111296111297111298111299111300111301111302111303111304111305111306111307111308111309111310111311111312111313111314111315111316111317111318111319111320111321111322111323111324111325111326111327111328111329111330111331111332111333111334111335111336111337111338111339111340111341111342111343111344111345111346111347111348111349111350111351111352111353111354111355111356111357111358111359111360111361111362111363111364111365111366111367111368111369111370111371111372111373111374111375111376111377111378111379111380111381111382111383111384111385111386111387111388111389111390111391111392111393111394111395111396111397111398111399111400111401111402111403111404111405111406111407111408111409111410111411111412111413111414111415111416111417111418111419111420111421111422111423111424111425111426111427111428111429111430111431111432111433111434111435111436111437111438111439111440111441111442111443111444111445111446111447111448111449111450111451111452111453111454111455111456111457111458111459111460111461111462111463111464111465111466111467111468111469111470111471111472111473111474111475111476111477111478111479111480111481111482111483111484111485111486111487111488111489111490111491111492111493111494111495111496111497111498111499111500111501111502111503111504111505111506111507111508111509111510111511111512111513111514111515111516111517111518111519111520111521111522111523111524111525111526111527111528111529111530111531111532111533111534111535111536111537111538111539111540111541111542111543111544111545111546111547111548111549111550111551111552111553111554111555111556111557111558111559111560111561111562111563111564111565111566111567111568111569111570111571111572111573111574111575111576111577111578111579111580111581111582111583111584111585111586111587111588111589111590111591111592111593111594111595111596111597111598111599111600111601111602111603111604111605111606111607111608111609111610111611111612111613111614111615111616111617111618111619111620111621111622111623111624111625111626111627111628111629111630111631111632111633111634111635111636111637111638111639111640111641111642111643111644111645111646111647111648111649111650111651111652111653111654111655111656111657111658111659111660111661111662111663111664111665111666111667111668111669111670111671111672111673111674111675111676111677111678111679111680111681111682111683111684111685111686111687111688111689111690111691111692111693111694111695111696111697111698111699111700111701111702111703111704111705111706111707111708111709111710111711111712111713111714111715111716111717111718111719111720111721111722111723111724111725111726111727111728111729111730111731111732111733111734111735111736111737111738111739111740111741111742111743111744111745111746111747111748111749111750111751111752111753111754111755111756111757111758111759111760111761111762111763111764111765111766111767111768111769111770111771111772111773111774111775111776111777111778111779111780111781111782111783111784111785111786111787111788111789111790111791111792111793111794111795111796111797111798111799111800111801111802111803111804111805111806111807111808111809111810111811111812111813111814111815111816111817111818111819111820111821111822111823111824111825111826111827111828111829111830111831111832111833111834111835111836111837111838111839111840111841111842111843111844111845111846111847111848111849111850111851111852111853111854111855111856111857111858111859111860111861111862111863111864111865111866111867111868111869111870111871111872111873111874111875111876111877111878111879111880111881111882111883111884111885111886111887111888111889111890111891111892111893111894111895111896111897111898111899111900111901111902111903111904111905111906111907111908111909111910111911111912111913111914111915111916111917111918111919111920111921111922111923111924111925111926111927111928111929111930111931111932111933111934111935111936111937111938111939111940111941111942111943111944111945111946111947111948111949111950111951111952111953111954111955111956111957111958111959111960111961111962111963111964111965111966111967111968111969111970111971111972111973111974111975111976111977111978111979111980111981111982111983111984111985111986111987111988111989111990111991111992111993111994111995111996111997111998111999112000112001112002112003112004112005112006112007112008112009112010112011112012112013112014112015112016112017112018112019112020112021112022112023112024112025112026112027112028112029112030112031112032112033112034112035112036112037112038112039112040112041112042112043112044112045112046112047112048112049112050112051112052112053112054112055112056112057112058112059112060112061112062112063112064112065112066112067112068112069112070112071112072112073112074112075112076112077112078112079112080112081112082112083112084112085112086112087112088112089112090112091112092112093112094112095112096112097112098112099112100112101112102112103112104112105112106112107112108112109112110112111112112112113112114112115112116112117112118112119112120112121112122112123112124112125112126112127112128112129112130112131112132112133112134112135112136112137112138112139112140112141112142112143112144112145112146112147112148112149112150112151112152112153112154112155112156112157112158112159112160112161112162112163112164112165112166112167112168112169112170112171112172112173112174112175112176112177112178112179112180112181112182112183112184112185112186112187112188112189112190112191112192112193112194112195112196112197112198112199112200112201112202112203112204112205112206112207112208112209112210112211112212112213112214112215112216112217112218112219112220112221112222112223112224112225112226112227112228112229112230112231112232112233112234112235112236112237112238112239112240112241112242112243112244112245112246112247112248112249112250112251112252112253112254112255112256112257112258112259112260112261112262112263112264112265112266112267112268112269112270112271112272112273112274112275112276112277112278112279112280112281112282112283112284112285112286112287112288112289112290112291112292112293112294112295112296112297112298112299112300112301112302112303112304112305112306112307112308112309112310112311112312112313112314112315112316112317112318112319112320112321112322112323112324112325112326112327112328112329112330112331112332112333112334112335112336112337112338112339112340112341112342112343112344112345112346112347112348112349112350112351112352112353112354112355112356112357112358112359112360112361112362112363112364112365112366112367112368112369112370112371112372112373112374112375112376112377112378112379112380112381112382112383112384112385112386112387112388112389112390112391112392112393112394112395112396112397112398112399112400112401112402112403112404112405112406112407112408112409112410112411112412112413112414112415112416112417112418112419112420112421112422112423112424112425112426112427112428112429112430112431112432112433112434112435112436112437112438112439112440112441112442112443112444112445112446112447112448112449112450112451112452112453112454112455112456112457112458112459112460112461112462112463112464112465112466112467112468112469112470112471112472112473112474112475112476112477112478112479112480112481112482112483112484112485112486112487112488112489112490112491112492112493112494112495112496112497112498112499112500112501112502112503112504112505112506112507112508112509112510112511112512112513112514112515112516112517112518112519112520112521112522112523112524112525112526112527112528112529112530112531112532112533112534112535112536112537112538112539112540112541112542112543112544112545112546112547112548112549112550112551112552112553112554112555112556112557112558112559112560112561112562112563112564112565112566112567112568112569112570112571112572112573112574112575112576112577112578112579112580112581112582112583112584112585112586112587112588112589112590112591112592112593112594112595112596112597112598112599112600112601112602112603112604112605112606112607112608112609112610112611112612112613112614112615112616112617112618112619112620112621112622112623112624112625112626112627112628112629112630112631112632112633112634112635112636112637112638112639112640112641112642112643112644112645112646112647112648112649112650112651112652112653112654112655112656112657112658112659112660112661112662112663112664112665112666112667112668112669112670112671112672112673112674112675112676112677112678112679112680112681112682112683112684112685112686112687112688112689112690112691112692112693112694112695112696112697112698112699112700112701112702112703112704112705112706112707112708112709112710112711112712112713112714112715112716112717112718112719112720112721112722112723112724112725112726112727112728112729112730112731112732112733112734112735112736112737112738112739112740112741112742112743112744112745112746112747112748112749112750112751112752112753112754112755112756112757112758112759112760112761112762112763112764112765112766112767112768112769112770112771112772112773112774112775112776112777112778112779112780112781112782112783112784112785112786112787112788112789112790112791112792112793112794112795112796112797112798112799112800112801112802112803112804112805112806112807112808112809112810112811112812112813112814112815112816112817112818112819112820112821112822112823112824112825112826112827112828112829112830112831112832112833112834112835112836112837112838112839112840112841112842112843112844112845112846112847112848112849112850112851112852112853112854112855112856112857112858112859112860112861112862112863112864112865112866112867112868112869112870112871112872112873112874112875112876112877112878112879112880112881112882112883112884112885112886112887112888112889112890112891112892112893112894112895112896112897112898112899112900112901112902112903112904112905112906112907112908112909112910112911112912112913112914112915112916112917112918112919112920112921112922112923112924112925112926112927112928112929112930112931112932112933112934112935112936112937112938112939112940112941112942112943112944112945112946112947112948112949112950112951112952112953112954112955112956112957112958112959112960112961112962112963112964112965112966112967112968112969112970112971112972112973112974112975112976112977112978112979112980112981112982112983112984112985112986112987112988112989112990112991112992112993112994112995112996112997112998112999113000113001113002113003113004113005113006113007113008113009113010113011113012113013113014113015113016113017113018113019113020113021113022113023113024113025113026113027113028113029113030113031113032113033113034113035113036113037113038113039113040113041113042113043113044113045113046113047113048113049113050113051113052113053113054113055113056113057113058113059113060113061113062113063113064113065113066113067113068113069113070113071113072113073113074113075113076113077113078113079113080113081113082113083113084113085113086113087113088113089113090113091113092113093113094113095113096113097113098113099113100113101113102113103113104113105113106113107113108113109113110113111113112113113113114113115113116113117113118113119113120113121113122113123113124113125113126113127113128113129113130113131113132113133113134113135113136113137113138113139113140113141113142113143113144113145113146113147113148113149113150113151113152113153113154113155113156113157113158113159113160113161113162113163113164113165113166113167113168113169113170113171113172113173113174113175113176113177113178113179113180113181113182113183113184113185113186113187113188113189113190113191113192113193113194113195113196113197113198113199113200113201113202113203113204113205113206113207113208113209113210113211113212113213113214113215113216113217113218113219113220113221113222113223113224113225113226113227113228113229113230113231113232113233113234113235113236113237113238113239113240113241113242113243113244113245113246113247113248113249113250113251113252113253113254113255113256113257113258113259113260113261113262113263113264113265113266113267113268113269113270113271113272113273113274113275113276113277113278113279113280113281113282113283113284113285113286113287113288113289113290113291113292113293113294113295113296113297113298113299113300113301113302113303113304113305113306113307113308113309113310113311113312113313113314113315113316113317113318113319113320113321113322113323113324113325113326113327113328113329113330113331113332113333113334113335113336113337113338113339113340113341113342113343113344113345113346113347113348113349113350113351113352113353113354113355113356113357113358113359113360113361113362113363113364113365113366113367113368113369113370113371113372113373113374113375113376113377113378113379113380113381113382113383113384113385113386113387113388113389113390113391113392113393113394113395113396113397113398113399113400113401113402113403113404113405113406113407113408113409113410113411113412113413113414113415113416113417113418113419113420113421113422113423113424113425113426113427113428113429113430113431113432113433113434113435113436113437113438113439113440113441113442113443113444113445113446113447113448113449113450113451113452113453113454113455113456113457113458113459113460113461113462113463113464113465113466113467113468113469113470113471113472113473113474113475113476113477113478113479113480113481113482113483113484113485113486113487113488113489113490113491113492113493113494113495113496113497113498113499113500113501113502113503113504113505113506113507113508113509113510113511113512113513113514113515113516113517113518113519113520113521113522113523113524113525113526113527113528113529113530113531113532113533113534113535113536113537113538113539113540113541113542113543113544113545113546113547113548113549113550113551113552113553113554113555113556113557113558113559113560113561113562113563113564113565113566113567113568113569113570113571113572113573113574113575113576113577113578113579113580113581113582113583113584113585113586113587113588113589113590113591113592113593113594113595113596113597113598113599113600113601113602113603113604113605113606113607113608113609113610113611113612113613113614113615113616113617113618113619113620113621113622113623113624113625113626113627113628113629113630113631113632113633113634113635113636113637113638113639113640113641113642113643113644113645113646113647113648113649113650113651113652113653113654113655113656113657113658113659113660113661113662113663113664113665113666113667113668113669113670113671113672113673113674113675113676113677113678113679113680113681113682113683113684113685113686113687113688113689113690113691113692113693113694113695113696113697113698113699113700113701113702113703113704113705113706113707113708113709113710113711113712113713113714113715113716113717113718113719113720113721113722113723113724113725113726113727113728113729113730113731113732113733113734113735113736113737113738113739113740113741113742113743113744113745113746113747113748113749113750113751113752113753113754113755113756113757113758113759113760113761113762113763113764113765113766113767113768113769113770113771113772113773113774113775113776113777113778113779113780113781113782113783113784113785113786113787113788113789113790113791113792113793113794113795113796113797113798113799113800113801113802113803113804113805113806113807113808113809113810113811113812113813113814113815113816113817113818113819113820113821113822113823113824113825113826113827113828113829113830113831113832113833113834113835113836113837113838113839113840113841113842113843113844113845113846113847113848113849113850113851113852113853113854113855113856113857113858113859113860113861113862113863113864113865113866113867113868113869113870113871113872113873113874113875113876113877113878113879113880113881113882113883113884113885113886113887113888113889113890113891113892113893113894113895113896113897113898113899113900113901113902113903113904113905113906113907113908113909113910113911113912113913113914113915113916113917113918113919113920113921113922113923113924113925113926113927113928113929113930113931113932113933113934113935113936113937113938113939113940113941113942113943113944113945113946113947113948113949113950113951113952113953113954113955113956113957113958113959113960113961113962113963113964113965113966113967113968113969113970113971113972113973113974113975113976113977113978113979113980113981113982113983113984113985113986113987113988113989113990113991113992113993113994113995113996113997113998113999114000114001114002114003114004114005114006114007114008114009114010114011114012114013114014114015114016114017114018114019114020114021114022114023114024114025114026114027114028114029114030114031114032114033114034114035114036114037114038114039114040114041114042114043114044114045114046114047114048114049114050114051114052114053114054114055114056114057114058114059114060114061114062114063114064114065114066114067114068114069114070114071114072114073114074114075114076114077114078114079114080114081114082114083114084114085114086114087114088114089114090114091114092114093114094114095114096114097114098114099114100114101114102114103114104114105114106114107114108114109114110114111114112114113114114114115114116114117114118114119114120114121114122114123114124114125114126114127114128114129114130114131114132114133114134114135114136114137114138114139114140114141114142114143114144114145114146114147114148114149114150114151114152114153114154114155114156114157114158114159114160114161114162114163114164114165114166114167114168114169114170114171114172114173114174114175114176114177114178114179114180114181114182114183114184114185114186114187114188114189114190114191114192114193114194114195114196114197114198114199114200114201114202114203114204114205114206114207114208114209114210114211114212114213114214114215114216114217114218114219114220114221114222114223114224114225114226114227114228114229114230114231114232114233114234114235114236114237114238114239114240114241114242114243114244114245114246114247114248114249114250114251114252114253114254114255114256114257114258114259114260114261114262114263114264114265114266114267114268114269114270114271114272114273114274114275114276114277114278114279114280114281114282114283114284114285114286114287114288114289114290114291114292114293114294114295114296114297114298114299114300114301114302114303114304114305114306114307114308114309114310114311114312114313114314114315114316114317114318114319114320114321114322114323114324114325114326114327114328114329114330114331114332114333114334114335114336114337114338114339114340114341114342114343114344114345114346114347114348114349114350114351114352114353114354114355114356114357114358114359114360114361114362114363114364114365114366114367114368114369114370114371114372114373114374114375114376114377114378114379114380114381114382114383114384114385114386114387114388114389114390114391114392114393114394114395114396114397114398114399114400114401114402114403114404114405114406114407114408114409114410114411114412114413114414114415114416114417114418114419114420114421114422114423114424114425114426114427114428114429114430114431114432114433114434114435114436114437114438114439114440114441114442114443114444114445114446114447114448114449114450114451114452114453114454114455114456114457114458114459114460114461114462114463114464114465114466114467114468114469114470114471114472114473114474114475114476114477114478114479114480114481114482114483114484114485114486114487114488114489114490114491114492114493114494114495114496114497114498114499114500114501114502114503114504114505114506114507114508114509114510114511114512114513114514114515114516114517114518114519114520114521114522114523114524114525114526114527114528114529114530114531114532114533114534114535114536114537114538114539114540114541114542114543114544114545114546114547114548114549114550114551114552114553114554114555114556114557114558114559114560114561114562114563114564114565114566114567114568114569114570114571114572114573114574114575114576114577114578114579114580114581114582114583114584114585114586114587114588114589114590114591114592114593114594114595114596114597114598114599114600114601114602114603114604114605114606114607114608114609114610114611114612114613114614114615114616114617114618114619114620114621114622114623114624114625114626114627114628114629114630114631114632114633114634114635114636114637114638114639114640114641114642114643114644114645114646114647114648114649114650114651114652114653114654114655114656114657114658114659114660114661114662114663114664114665114666114667114668114669114670114671114672114673114674114675114676114677114678114679114680114681114682114683114684114685114686114687114688114689114690114691114692114693114694114695114696114697114698114699114700114701114702114703114704114705114706114707114708114709114710114711114712114713114714114715114716114717114718114719114720114721114722114723114724114725114726114727114728114729114730114731114732114733114734114735114736114737114738114739114740114741114742114743114744114745114746114747114748114749114750114751114752114753114754114755114756114757114758114759114760114761114762114763114764114765114766114767114768114769114770114771114772114773114774114775114776114777114778114779114780114781114782114783114784114785114786114787114788114789114790114791114792114793114794114795114796114797114798114799114800114801114802114803114804114805114806114807114808114809114810114811114812114813114814114815114816114817114818114819114820114821114822114823114824114825114826114827114828114829114830114831114832114833114834114835114836114837114838114839114840114841114842114843114844114845114846114847114848114849114850114851114852114853114854114855114856114857114858114859114860114861114862114863114864114865114866114867114868114869114870114871114872114873114874114875114876114877114878114879114880114881114882114883114884114885114886114887114888114889114890114891114892114893114894114895114896114897114898114899114900114901114902114903114904114905114906114907114908114909114910114911114912114913114914114915114916114917114918114919114920114921114922114923114924114925114926114927114928114929114930114931114932114933114934114935114936114937114938114939114940114941114942114943114944114945114946114947114948114949114950114951114952114953114954114955114956114957114958114959114960114961114962114963114964114965114966114967114968114969114970114971114972114973114974114975114976114977114978114979114980114981114982114983114984114985114986114987114988114989114990114991114992114993114994114995114996114997114998114999115000115001115002115003115004115005115006115007115008115009115010115011115012115013115014115015115016115017115018115019115020115021115022115023115024115025115026115027115028115029115030115031115032115033115034115035115036115037115038115039115040115041115042115043115044115045115046115047115048115049115050115051115052115053115054115055115056115057115058115059115060115061115062115063115064115065115066115067115068115069115070115071115072115073115074115075115076115077115078115079115080115081115082115083115084115085115086115087115088115089115090115091115092115093115094115095115096115097115098115099115100115101115102115103115104115105115106115107115108115109115110115111115112115113115114115115115116115117115118115119115120115121115122115123115124115125115126115127115128115129115130115131115132115133115134115135115136115137115138115139115140115141115142115143115144115145115146115147115148115149115150115151115152115153115154115155115156115157115158115159115160115161115162115163115164115165115166115167115168115169115170115171115172115173115174115175115176115177115178115179115180115181115182115183115184115185115186115187115188115189115190115191115192115193115194115195115196115197115198115199115200115201115202115203115204115205115206115207115208115209115210115211115212115213115214115215115216115217115218115219115220115221115222115223115224115225115226115227115228115229115230115231115232115233115234115235115236115237115238115239115240115241115242115243115244115245115246115247115248115249115250115251115252115253115254115255115256115257115258115259115260115261115262115263115264115265115266115267115268115269115270115271115272115273115274115275115276115277115278115279115280115281115282115283115284115285115286115287115288115289115290115291115292115293115294115295115296115297115298115299115300115301115302115303115304115305115306115307115308115309115310115311115312115313115314115315115316115317115318115319115320115321115322115323115324115325115326115327115328115329115330115331115332115333115334115335115336115337115338115339115340115341115342115343115344115345115346115347115348115349115350115351115352115353115354115355115356115357115358115359115360115361115362115363115364115365115366115367115368115369115370115371115372115373115374115375115376115377115378115379115380115381115382115383115384115385115386115387115388115389115390115391115392115393115394115395115396115397115398115399115400115401115402115403115404115405115406115407115408115409115410115411115412115413115414115415115416115417115418115419115420115421115422115423115424115425115426115427115428115429115430115431115432115433115434115435115436115437115438115439115440115441115442115443115444115445115446115447115448115449115450115451115452115453115454115455115456115457115458115459115460115461115462115463115464115465115466115467115468115469115470115471115472115473115474115475115476115477115478115479115480115481115482115483115484115485115486115487115488115489115490115491115492115493115494115495115496115497115498115499115500115501115502115503115504115505115506115507115508115509115510115511115512115513115514115515115516115517115518115519115520115521115522115523115524115525115526115527115528115529115530115531115532115533115534115535115536115537115538115539115540115541115542115543115544115545115546115547115548115549115550115551115552115553115554115555115556115557115558115559115560115561115562115563115564115565115566115567115568115569115570115571115572115573115574115575115576115577115578115579115580115581115582115583115584115585115586115587115588115589115590115591115592115593115594115595115596115597115598115599115600115601115602115603115604115605115606115607115608115609115610115611115612115613115614115615115616115617115618115619115620115621115622115623115624115625115626115627115628115629115630115631115632115633115634115635115636115637115638115639115640115641115642115643115644115645115646115647115648115649115650115651115652115653115654115655115656115657115658115659115660115661115662115663115664115665115666115667115668115669115670115671115672115673115674115675115676115677115678115679115680115681115682115683115684115685115686115687115688115689115690115691115692115693115694115695115696115697115698115699115700115701115702115703115704115705115706115707115708115709115710115711115712115713115714115715115716115717115718115719115720115721115722115723115724115725115726115727115728115729115730115731115732115733115734115735115736115737115738115739115740115741115742115743115744115745115746115747115748115749115750115751115752115753115754115755115756115757115758115759115760115761115762115763115764115765115766115767115768115769115770115771115772115773115774115775115776115777115778115779115780115781115782115783115784115785115786115787115788115789115790115791115792115793115794115795115796115797115798115799115800115801115802115803115804115805115806115807115808115809115810115811115812115813115814115815115816115817115818115819115820115821115822115823115824115825115826115827115828115829115830115831115832115833115834115835115836115837115838115839115840115841115842115843115844115845115846115847115848115849115850115851115852115853115854115855115856115857115858115859115860115861115862115863115864115865115866115867115868115869115870115871115872115873115874115875115876115877115878115879115880115881115882115883115884115885115886115887115888115889115890115891115892115893115894115895115896115897115898115899115900115901115902115903115904115905115906115907115908115909115910115911115912115913115914115915115916115917115918115919115920115921115922115923115924115925115926115927115928115929115930115931115932115933115934115935115936115937115938115939115940115941115942115943115944115945115946115947115948115949115950115951115952115953115954115955115956115957115958115959115960115961115962115963115964115965115966115967115968115969115970115971115972115973115974115975115976115977115978115979115980115981115982115983115984115985115986115987115988115989115990115991115992115993115994115995115996115997115998115999116000116001116002116003116004116005116006116007116008116009116010116011116012116013116014116015116016116017116018116019116020116021116022116023116024116025116026116027116028116029116030116031116032116033116034116035116036116037116038116039116040116041116042116043116044116045116046116047116048116049116050116051116052116053116054116055116056116057116058116059116060116061116062116063116064116065116066116067116068116069116070116071116072116073116074116075116076116077116078116079116080116081116082116083116084116085116086116087116088116089116090116091116092116093116094116095116096116097116098116099116100116101116102116103116104116105116106116107116108116109116110116111116112116113116114116115116116116117116118116119116120116121116122116123116124116125116126116127116128116129116130116131116132116133116134116135116136116137116138116139116140116141116142116143116144116145116146116147116148116149116150116151116152116153116154116155116156116157116158116159116160116161116162116163116164116165116166116167116168116169116170116171116172116173116174116175116176116177116178116179116180116181116182116183116184116185116186116187116188116189116190116191116192116193116194116195116196116197116198116199116200116201116202116203116204116205116206116207116208116209116210116211116212116213116214116215116216116217116218116219116220116221116222116223116224116225116226116227116228116229116230116231116232116233116234116235116236116237116238116239116240116241116242116243116244116245116246116247116248116249116250116251116252116253116254116255116256116257116258116259116260116261116262116263116264116265116266116267116268116269116270116271116272116273116274116275116276116277116278116279116280116281116282116283116284116285116286116287116288116289116290116291116292116293116294116295116296116297116298116299116300116301116302116303116304116305116306116307116308116309116310116311116312116313116314116315116316116317116318116319116320116321116322116323116324116325116326116327116328116329116330116331116332116333116334116335116336116337116338116339116340116341116342116343116344116345116346116347116348116349116350116351116352116353116354116355116356116357116358116359116360116361116362116363116364116365116366116367116368116369116370116371116372116373116374116375116376116377116378116379116380116381116382116383116384116385116386116387116388116389116390116391116392116393116394116395116396116397116398116399116400116401116402116403116404116405116406116407116408116409116410116411116412116413116414116415116416116417116418116419116420116421116422116423116424116425116426116427116428116429116430116431116432116433116434116435116436116437116438116439116440116441116442116443116444116445116446116447116448116449116450116451116452116453116454116455116456116457116458116459116460116461116462116463116464116465116466116467116468116469116470116471116472116473116474116475116476116477116478116479116480116481116482116483116484116485116486116487116488116489116490116491116492116493116494116495116496116497116498116499116500116501116502116503116504116505116506116507116508116509116510116511116512116513116514116515116516116517116518116519116520116521116522116523116524116525116526116527116528116529116530116531116532116533116534116535116536116537116538116539116540116541116542116543116544116545116546116547116548116549116550116551116552116553116554116555116556116557116558116559116560116561116562116563116564116565116566116567116568116569116570116571116572116573116574116575116576116577116578116579116580116581116582116583116584116585116586116587116588116589116590116591116592116593116594116595116596116597116598116599116600116601116602116603116604116605116606116607116608116609116610116611116612116613116614116615116616116617116618116619116620116621116622116623116624116625116626116627116628116629116630116631116632116633116634116635116636116637116638116639116640116641116642116643116644116645116646116647116648116649116650116651116652116653116654116655116656116657116658116659116660116661116662116663116664116665116666116667116668116669116670116671116672116673116674116675116676116677116678116679116680116681116682116683116684116685116686116687116688116689116690116691116692116693116694116695116696116697116698116699116700116701116702116703116704116705116706116707116708116709116710116711116712116713116714116715116716116717116718116719116720116721116722116723116724116725116726116727116728116729116730116731116732116733116734116735116736116737116738116739116740116741116742116743116744116745116746116747116748116749116750116751116752116753116754116755116756116757116758116759116760116761116762116763116764116765116766116767116768116769116770116771116772116773116774116775116776116777116778116779116780116781116782116783116784116785116786116787116788116789116790116791116792116793116794116795116796116797116798116799116800116801116802116803116804116805116806116807116808116809116810116811116812116813116814116815116816116817116818116819116820116821116822116823116824116825116826116827116828116829116830116831116832116833116834116835116836116837116838116839116840116841116842116843116844116845116846116847116848116849116850116851116852116853116854116855116856116857116858116859116860116861116862116863116864116865116866116867116868116869116870116871116872116873116874116875116876116877116878116879116880116881116882116883116884116885116886116887116888116889116890116891116892116893116894116895116896116897116898116899116900116901116902116903116904116905116906116907116908116909116910116911116912116913116914116915116916116917116918116919116920116921116922116923116924116925116926116927116928116929116930116931116932116933116934116935116936116937116938116939116940116941116942116943116944116945116946116947116948116949116950116951116952116953116954116955116956116957116958116959116960116961116962116963116964116965116966116967116968116969116970116971116972116973116974116975116976116977116978116979116980116981116982116983116984116985116986116987116988116989116990116991116992116993116994116995116996116997116998116999117000117001117002117003117004117005117006117007117008117009117010117011117012117013117014117015117016117017117018117019117020117021117022117023117024117025117026117027117028117029117030117031117032117033117034117035117036117037117038117039117040117041117042117043117044117045117046117047117048117049117050117051117052117053117054117055117056117057117058117059117060117061117062117063117064117065117066117067117068117069117070117071117072117073117074117075117076117077117078117079117080117081117082117083117084117085117086117087117088117089117090117091117092117093117094117095117096117097117098117099117100117101117102117103117104117105117106117107117108117109117110117111117112117113117114117115117116117117117118117119117120117121117122117123117124117125117126117127117128117129117130117131117132117133117134117135117136117137117138117139117140117141117142117143117144117145117146117147117148117149117150117151117152117153117154117155117156117157117158117159117160117161117162117163117164117165117166117167117168117169117170117171117172117173117174117175117176117177117178117179117180117181117182117183117184117185117186117187117188117189117190117191117192117193117194117195117196117197117198117199117200117201117202117203117204117205117206117207117208117209117210117211117212117213117214117215117216117217117218117219117220117221117222117223117224117225117226117227117228117229117230117231117232117233117234117235117236117237117238117239117240117241117242117243117244117245117246117247117248117249117250117251117252117253117254117255117256117257117258117259117260117261117262117263117264117265117266117267117268117269117270117271117272117273117274117275117276117277117278117279117280117281117282117283117284117285117286117287117288117289117290117291117292117293117294117295117296117297117298117299117300117301117302117303117304117305117306117307117308117309117310117311117312117313117314117315117316117317117318117319117320117321117322117323117324117325117326117327117328117329117330117331117332117333117334117335117336117337117338117339117340117341117342117343117344117345117346117347117348117349117350117351117352117353117354117355117356117357117358117359117360117361117362117363117364117365117366117367117368117369117370117371117372117373117374117375117376117377117378117379117380117381117382117383117384117385117386117387117388117389117390117391117392117393117394117395117396117397117398117399117400117401117402117403117404117405117406117407117408117409117410117411117412117413117414117415117416117417117418117419117420117421117422117423117424117425117426117427117428117429117430117431117432117433117434117435117436117437117438117439117440117441117442117443117444117445117446117447117448117449117450117451117452117453117454117455117456117457117458117459117460117461117462117463117464117465117466117467117468117469117470117471117472117473117474117475117476117477117478117479117480117481117482117483117484117485117486117487117488117489117490117491117492117493117494117495117496117497117498117499117500117501117502117503117504117505117506117507117508117509117510117511117512117513117514117515117516117517117518117519117520117521117522117523117524117525117526117527117528117529117530117531117532117533117534117535117536117537117538117539117540117541117542117543117544117545117546117547117548117549117550117551117552117553117554117555117556117557117558117559117560117561117562117563117564117565117566117567117568117569117570117571117572117573117574117575117576117577117578117579117580117581117582117583117584117585117586117587117588117589117590117591117592117593117594117595117596117597117598117599117600117601117602117603117604117605117606117607117608117609117610117611117612117613117614117615117616117617117618117619117620117621117622117623117624117625117626117627117628117629117630117631117632117633117634117635117636117637117638117639117640117641117642117643117644117645117646117647117648117649117650117651117652117653117654117655117656117657117658117659117660117661117662117663117664117665117666117667117668117669117670117671117672117673117674117675117676117677117678117679117680117681117682117683117684117685117686117687117688117689117690117691117692117693117694117695117696117697117698117699117700117701117702117703117704117705117706117707117708117709117710117711117712117713117714117715117716117717117718117719117720117721117722117723117724117725117726117727117728117729117730117731117732117733117734117735117736117737117738117739117740117741117742117743117744117745117746117747117748117749117750117751117752117753117754117755117756117757117758117759117760117761117762117763117764117765117766117767117768117769117770117771117772117773117774117775117776117777117778117779117780117781117782117783117784117785117786117787117788117789117790117791117792117793117794117795117796117797117798117799117800117801117802117803117804117805117806117807117808117809117810117811117812117813117814117815117816117817117818117819117820117821117822117823117824117825117826117827117828117829117830117831117832117833117834117835117836117837117838117839117840117841117842117843117844117845117846117847117848117849117850117851117852117853117854117855117856117857117858117859117860117861117862117863117864117865117866117867117868117869117870117871117872117873117874117875117876117877117878117879117880117881117882117883117884117885117886117887117888117889117890117891117892117893117894117895117896117897117898117899117900117901117902117903117904117905117906117907117908117909117910117911117912117913117914117915117916117917117918117919117920117921117922117923117924117925117926117927117928117929117930117931117932117933117934117935117936117937117938117939117940117941117942117943117944117945117946117947117948117949117950117951117952117953117954117955117956117957117958117959117960117961117962117963117964117965117966117967117968117969117970117971117972117973117974117975117976117977117978117979117980117981117982117983117984117985117986117987117988117989117990117991117992117993117994117995117996117997117998117999118000118001118002118003118004118005118006118007118008118009118010118011118012118013118014118015118016118017118018118019118020118021118022118023118024118025118026118027118028118029118030118031118032118033118034118035118036118037118038118039118040118041118042118043118044118045118046118047118048118049118050118051118052118053118054118055118056118057118058118059118060118061118062118063118064118065118066118067118068118069118070118071118072118073118074118075118076118077118078118079118080118081118082118083118084118085118086118087118088118089118090118091118092118093118094118095118096118097118098118099118100118101118102118103118104118105118106118107118108118109118110118111118112118113118114118115118116118117118118118119118120118121118122118123118124118125118126118127118128118129118130118131118132118133118134118135118136118137118138118139118140118141118142118143118144118145118146118147118148118149118150118151118152118153118154118155118156118157118158118159118160118161118162118163118164118165118166118167118168118169118170118171118172118173118174118175118176118177118178118179118180118181118182118183118184118185118186118187118188118189118190118191118192118193118194118195118196118197118198118199118200118201118202118203118204118205118206118207118208118209118210118211118212118213118214118215118216118217118218118219118220118221118222118223118224118225118226118227118228118229118230118231118232118233118234118235118236118237118238118239118240118241118242118243118244118245118246118247118248118249118250118251118252118253118254118255118256118257118258118259118260118261118262118263118264118265118266118267118268118269118270118271118272118273118274118275118276118277118278118279118280118281118282118283118284118285118286118287118288118289118290118291118292118293118294118295118296118297118298118299118300118301118302118303118304118305118306118307118308118309118310118311118312118313118314118315118316118317118318118319118320118321118322118323118324118325118326118327118328118329118330118331118332118333118334118335118336118337118338118339118340118341118342118343118344118345118346118347118348118349118350118351118352118353118354118355118356118357118358118359118360118361118362118363118364118365118366118367118368118369118370118371118372118373118374118375118376118377118378118379118380118381118382118383118384118385118386118387118388118389118390118391118392118393118394118395118396118397118398118399118400118401118402118403118404118405118406118407118408118409118410118411118412118413118414118415118416118417118418118419118420118421118422118423118424118425118426118427118428118429118430118431118432118433118434118435118436118437118438118439118440118441118442118443118444118445118446118447118448118449118450118451118452118453118454118455118456118457118458118459118460118461118462118463118464118465118466118467118468118469118470118471118472118473118474118475118476118477118478118479118480118481118482118483118484118485118486118487118488118489118490118491118492118493118494118495118496118497118498118499118500118501118502118503118504118505118506118507118508118509118510118511118512118513118514118515118516118517118518118519118520118521118522118523118524118525118526118527118528118529118530118531118532118533118534118535118536118537118538118539118540118541118542118543118544118545118546118547118548118549118550118551118552118553118554118555118556118557118558118559118560118561118562118563118564118565118566118567118568118569118570118571118572118573118574118575118576118577118578118579118580118581118582118583118584118585118586118587118588118589118590118591118592118593118594118595118596118597118598118599118600118601118602118603118604118605118606118607118608118609118610118611118612118613118614118615118616118617118618118619118620118621118622118623118624118625118626118627118628118629118630118631118632118633118634118635118636118637118638118639118640118641118642118643118644118645118646118647118648118649118650118651118652118653118654118655118656118657118658118659118660118661118662118663118664118665118666118667118668118669118670118671118672118673118674118675118676118677118678118679118680118681118682118683118684118685118686118687118688118689118690118691118692118693118694118695118696118697118698118699118700118701118702118703118704118705118706118707118708118709118710118711118712118713118714118715118716118717118718118719118720118721118722118723118724118725118726118727118728118729118730118731118732118733118734118735118736118737118738118739118740118741118742118743118744118745118746118747118748118749118750118751118752118753118754118755118756118757118758118759118760118761118762118763118764118765118766118767118768118769118770118771118772118773118774118775118776118777118778118779118780118781118782118783118784118785118786118787118788118789118790118791118792118793118794118795118796118797118798118799118800118801118802118803118804118805118806118807118808118809118810118811118812118813118814118815118816118817118818118819118820118821118822118823118824118825118826118827118828118829118830118831118832118833118834118835118836118837118838118839118840118841118842118843118844118845118846118847118848118849118850118851118852118853118854118855118856118857118858118859118860118861118862118863118864118865118866118867118868118869118870118871118872118873118874118875118876118877118878118879118880118881118882118883118884118885118886118887118888118889118890118891118892118893118894118895118896118897118898118899118900118901118902118903118904118905118906118907118908118909118910118911118912118913118914118915118916118917118918118919118920118921118922118923118924118925118926118927118928118929118930118931118932118933118934118935118936118937118938118939118940118941118942118943118944118945118946118947118948118949118950118951118952118953118954118955118956118957118958118959118960118961118962118963118964118965118966118967118968118969118970118971118972118973118974118975118976118977118978118979118980118981118982118983118984118985118986118987118988118989118990118991118992118993118994118995118996118997118998118999119000119001119002119003119004119005119006119007119008119009119010119011119012119013119014119015119016119017119018119019119020119021119022119023119024119025119026119027119028119029119030119031119032119033119034119035119036119037119038119039119040119041119042119043119044119045119046119047119048119049119050119051119052119053119054119055119056119057119058119059119060119061119062119063119064119065119066119067119068119069119070119071119072119073119074119075119076119077119078119079119080119081119082119083119084119085119086119087119088119089119090119091119092119093119094119095119096119097119098119099119100119101119102119103119104119105119106119107119108119109119110119111119112119113119114119115119116119117119118119119119120119121119122119123119124119125119126119127119128119129119130119131119132119133119134119135119136119137119138119139119140119141119142119143119144119145119146119147119148119149119150119151119152119153119154119155119156119157119158119159119160119161119162119163119164119165119166119167119168119169119170119171119172119173119174119175119176119177119178119179119180119181119182119183119184119185119186119187119188119189119190119191119192119193119194119195119196119197119198119199119200119201119202119203119204119205119206119207119208119209119210119211119212119213119214119215119216119217119218119219119220119221119222119223119224119225119226119227119228119229119230119231119232119233119234119235119236119237119238119239119240119241119242119243119244119245119246119247119248119249119250119251119252119253119254119255119256119257119258119259119260119261119262119263119264119265119266119267119268119269119270119271119272119273119274119275119276119277119278119279119280119281119282119283119284119285119286119287119288119289119290119291119292119293119294119295119296119297119298119299119300119301119302119303119304119305119306119307119308119309119310119311119312119313119314119315119316119317119318119319119320119321119322119323119324119325119326119327119328119329119330119331119332119333119334119335119336119337119338119339119340119341119342119343119344119345119346119347119348119349119350119351119352119353119354119355119356119357119358119359119360119361119362119363119364119365119366119367119368119369119370119371119372119373119374119375119376119377119378119379119380119381119382119383119384119385119386119387119388119389119390119391119392119393119394119395119396119397119398119399119400119401119402119403119404119405119406119407119408119409119410119411119412119413119414119415119416119417119418119419119420119421119422119423119424119425119426119427119428119429119430119431119432119433119434119435119436119437119438119439119440119441119442119443119444119445119446119447119448119449119450119451119452119453119454119455119456119457119458119459119460119461119462119463119464119465119466119467119468119469119470119471119472119473119474119475119476119477119478119479119480119481119482119483119484119485119486119487119488119489119490119491119492119493119494119495119496119497119498119499119500119501119502119503119504119505119506119507119508119509119510119511119512119513119514119515119516119517119518119519119520119521119522119523119524119525119526119527119528119529119530119531119532119533119534119535119536119537119538119539119540119541119542119543119544119545119546119547119548119549119550119551119552119553119554119555119556119557119558119559119560119561119562119563119564119565119566119567119568119569119570119571119572119573119574119575119576119577119578119579119580119581119582119583119584119585119586119587119588119589119590119591119592119593119594119595119596119597119598119599119600119601119602119603119604119605119606119607119608119609119610119611119612119613119614119615119616119617119618119619119620119621119622119623119624119625119626119627119628119629119630119631119632119633119634119635119636119637119638119639119640119641119642119643119644119645119646119647119648119649119650119651119652119653119654119655119656119657119658119659119660119661119662119663119664119665119666119667119668119669119670119671119672119673119674119675119676119677119678119679119680119681119682119683119684119685119686119687119688119689119690119691119692119693119694119695119696119697119698119699119700119701119702119703119704119705119706119707119708119709119710119711119712119713119714119715119716119717119718119719119720119721119722119723119724119725119726119727119728119729119730119731119732119733119734119735119736119737119738119739119740119741119742119743119744119745119746119747119748119749119750119751119752119753119754119755119756119757119758119759119760119761119762119763119764119765119766119767119768119769119770119771119772119773119774119775119776119777119778119779119780119781119782119783119784119785119786119787119788119789119790119791119792119793119794119795119796119797119798119799119800119801119802119803119804119805119806119807119808119809119810119811119812119813119814119815119816119817119818119819119820119821119822119823119824119825119826119827119828119829119830119831119832119833119834119835119836119837119838119839119840119841119842119843119844119845119846119847119848119849119850119851119852119853119854119855119856119857119858119859119860119861119862119863119864119865119866119867119868119869119870119871119872119873119874119875119876119877119878119879119880119881119882119883119884119885119886119887119888119889119890119891119892119893119894119895119896119897119898119899119900119901119902119903119904119905119906119907119908119909119910119911119912119913119914119915119916119917119918119919119920119921119922119923119924119925119926119927119928119929119930119931119932119933119934119935119936119937119938119939119940119941119942119943119944119945119946119947119948119949119950119951119952119953119954119955119956119957119958119959119960119961119962119963119964119965119966119967119968119969119970119971119972119973119974119975119976119977119978119979119980119981119982119983119984119985119986119987119988119989119990119991119992119993119994119995119996119997119998119999120000120001120002120003120004120005120006120007120008120009120010120011120012120013120014120015120016120017120018120019120020120021120022120023120024120025120026120027120028120029120030120031120032120033120034120035120036120037120038120039120040120041120042120043120044120045120046120047120048120049120050120051120052120053120054120055120056120057120058120059120060120061120062120063120064120065120066120067120068120069120070120071120072120073120074120075120076120077120078120079120080120081120082120083120084120085120086120087120088120089120090120091120092120093120094120095120096120097120098120099120100120101120102120103120104120105120106120107120108120109120110120111120112120113120114120115120116120117120118120119120120120121120122120123120124120125120126120127120128120129120130120131120132120133120134120135120136120137120138120139120140120141120142120143120144120145120146120147120148120149120150120151120152120153120154120155120156120157120158120159120160120161120162120163120164120165120166120167120168120169120170120171120172120173120174120175120176120177120178120179120180120181120182120183120184120185120186120187120188120189120190120191120192120193120194120195120196120197120198120199120200120201120202120203120204120205120206120207120208120209120210120211120212120213120214120215120216120217120218120219120220120221120222120223120224120225120226120227120228120229120230120231120232120233120234120235120236120237120238120239120240120241120242120243120244120245120246120247120248120249120250120251120252120253120254120255120256120257120258120259120260120261120262120263120264120265120266120267120268120269120270120271120272120273120274120275120276120277120278120279120280120281120282120283120284120285120286120287120288120289120290120291120292120293120294120295120296120297120298120299120300120301120302120303120304120305120306120307120308120309120310120311120312120313120314120315120316120317120318120319120320120321120322120323120324120325120326120327120328120329120330120331120332120333120334120335120336120337120338120339120340120341120342120343120344120345120346120347120348120349120350120351120352120353120354120355120356120357120358120359120360120361120362120363120364120365120366120367120368120369120370120371120372120373120374120375120376120377120378120379120380120381120382120383120384120385120386120387120388120389120390120391120392120393120394120395120396120397120398120399120400120401120402120403120404120405120406120407120408120409120410120411120412120413120414120415120416120417120418120419120420120421120422120423120424120425120426120427120428120429120430120431120432120433120434120435120436120437120438120439120440120441120442120443120444120445120446120447120448120449120450120451120452120453120454120455120456120457120458120459120460120461120462120463120464120465120466120467120468120469120470120471120472120473120474120475120476120477120478120479120480120481120482120483120484120485120486120487120488120489120490120491120492120493120494120495120496120497120498120499120500120501120502120503120504120505120506120507120508120509120510120511120512120513120514120515120516120517120518120519120520120521120522120523120524120525120526120527120528120529120530120531120532120533120534120535120536120537120538120539120540120541120542120543120544120545120546120547120548120549120550120551120552120553120554120555120556120557120558120559120560120561120562120563120564120565120566120567120568120569120570120571120572120573120574120575120576120577120578120579120580120581120582120583120584120585120586120587120588120589120590120591120592120593120594120595120596120597120598120599120600120601120602120603120604120605120606120607120608120609120610120611120612120613120614120615120616120617120618120619120620120621120622120623120624120625120626120627120628120629120630120631120632120633120634120635120636120637120638120639120640120641120642120643120644120645120646120647120648120649120650120651120652120653120654120655120656120657120658120659120660120661120662120663120664120665120666120667120668120669120670120671120672120673120674120675120676120677120678120679120680120681120682120683120684120685120686120687120688120689120690120691120692120693120694120695120696120697120698120699120700120701120702120703120704120705120706120707120708120709120710120711120712120713120714120715120716120717120718120719120720120721120722120723120724120725120726120727120728120729120730120731120732120733120734120735120736120737120738120739120740120741120742120743120744120745120746120747120748120749120750120751120752120753120754120755120756120757120758120759120760120761120762120763120764120765120766120767120768120769120770120771120772120773120774120775120776120777120778120779120780120781120782120783120784120785120786120787120788120789120790120791120792120793120794120795120796120797120798120799120800120801120802120803120804120805120806120807120808120809120810120811120812120813120814120815120816120817120818120819120820120821120822120823120824120825120826120827120828120829120830120831120832120833120834120835120836120837120838120839120840120841120842120843120844120845120846120847120848120849120850120851120852120853120854120855120856120857120858120859120860120861120862120863120864120865120866120867120868120869120870120871120872120873120874120875120876120877120878120879120880120881120882120883120884120885120886120887120888120889120890120891120892120893120894120895120896120897120898120899120900120901120902120903120904120905120906120907120908120909120910120911120912120913120914120915120916120917120918120919120920120921120922120923120924120925120926120927120928120929120930120931120932120933120934120935120936120937120938120939120940120941120942120943120944120945120946120947120948120949120950120951120952120953120954120955120956120957120958120959120960120961120962120963120964120965120966120967120968120969120970120971120972120973120974120975120976120977120978120979120980120981120982120983120984120985120986120987120988120989120990120991120992120993120994120995120996120997120998120999121000121001121002121003121004121005121006121007121008121009121010121011121012121013121014121015121016121017121018121019121020121021121022121023121024121025121026121027121028121029121030121031121032121033121034121035121036121037121038121039121040121041121042121043121044121045121046121047121048121049121050121051121052121053121054121055121056121057121058121059121060121061121062121063121064121065121066121067121068121069121070121071121072121073121074121075121076121077121078121079121080121081121082121083121084121085121086121087121088121089121090121091121092121093121094121095121096121097121098121099121100121101121102121103121104121105121106121107121108121109121110121111121112121113121114121115121116121117121118121119121120121121121122121123121124121125121126121127121128121129121130121131121132121133121134121135121136121137121138121139121140121141121142121143121144121145121146121147121148121149121150121151121152121153121154121155121156121157121158121159121160121161121162121163121164121165121166121167121168121169121170121171121172121173121174121175121176121177121178121179121180121181121182121183121184121185121186121187121188121189121190121191121192121193121194121195121196121197121198121199121200121201121202121203121204121205121206121207121208121209121210121211121212121213121214121215121216121217121218121219121220121221121222121223121224121225121226121227121228121229121230121231121232121233121234121235121236121237121238121239121240121241121242121243121244121245121246121247121248121249121250121251121252121253121254121255121256121257121258121259121260121261121262121263121264121265121266121267121268121269121270121271121272121273121274121275121276121277121278121279121280121281121282121283121284121285121286121287121288121289121290121291121292121293121294121295121296121297121298121299121300121301121302121303121304121305121306121307121308121309121310121311121312121313121314121315121316121317121318121319121320121321121322121323121324121325121326121327121328121329121330121331121332121333121334121335121336121337121338121339121340121341121342121343121344121345121346121347121348121349121350121351121352121353121354121355121356121357121358121359121360121361121362121363121364121365121366121367121368121369121370121371121372121373121374121375121376121377121378121379121380121381121382121383121384121385121386121387121388121389121390121391121392121393121394121395121396121397121398121399121400121401121402121403121404121405121406121407121408121409121410121411121412121413121414121415121416121417121418121419121420121421121422121423121424121425121426121427121428121429121430121431121432121433121434121435121436121437121438121439121440121441121442121443121444121445121446121447121448121449121450121451121452121453121454121455121456121457121458121459121460121461121462121463121464121465121466121467121468121469121470121471121472121473121474121475121476121477121478121479121480121481121482121483121484121485121486121487121488121489121490121491121492121493121494121495121496121497121498121499121500121501121502121503121504121505121506121507121508121509121510121511121512121513121514121515121516121517121518121519121520121521121522121523121524121525121526121527121528121529121530121531121532121533121534121535121536121537121538121539121540121541121542121543121544121545121546121547121548121549121550121551121552121553121554121555121556121557121558121559121560121561121562121563121564121565121566121567121568121569121570121571121572121573121574121575121576121577121578121579121580121581121582121583121584121585121586121587121588121589121590121591121592121593121594121595121596121597121598121599121600121601121602121603121604121605121606121607121608121609121610121611121612121613121614121615121616121617121618121619121620121621121622121623121624121625121626121627121628121629121630121631121632121633121634121635121636121637121638121639121640121641121642121643121644121645121646121647121648121649121650121651121652121653121654121655121656121657121658121659121660121661121662121663121664121665121666121667121668121669121670121671121672121673121674121675121676121677121678121679121680121681121682121683121684121685121686121687121688121689121690121691121692121693121694121695121696121697121698121699121700121701121702121703121704121705121706121707121708121709121710121711121712121713121714121715121716121717121718121719121720121721121722121723121724121725121726121727121728121729121730121731121732121733121734121735121736121737121738121739121740121741121742121743121744121745121746121747121748121749121750121751121752121753121754121755121756121757121758121759121760121761121762121763121764121765121766121767121768121769121770121771121772121773121774121775121776121777121778121779121780121781121782121783121784121785121786121787121788121789121790121791121792121793121794121795121796121797121798121799121800121801121802121803121804121805121806121807121808121809121810121811121812121813121814121815121816121817121818121819121820121821121822121823121824121825121826121827121828121829121830121831121832121833121834121835121836121837121838121839121840121841121842121843121844121845121846121847121848121849121850121851121852121853121854121855121856121857121858121859121860121861121862121863121864121865121866121867121868121869121870121871121872121873121874121875121876121877121878121879121880121881121882121883121884121885121886121887121888121889121890121891121892121893121894121895121896121897121898121899121900121901121902121903121904121905121906121907121908121909121910121911121912121913121914121915121916121917121918121919121920121921121922121923121924121925121926121927121928121929121930121931121932121933121934121935121936121937121938121939121940121941121942121943121944121945121946121947121948121949121950121951121952121953121954121955121956121957121958121959121960121961121962121963121964121965121966121967121968121969121970121971121972121973121974121975121976121977121978121979121980121981121982121983121984121985121986121987121988121989121990121991121992121993121994121995121996121997121998121999122000122001122002122003122004122005122006122007122008122009122010122011122012122013122014122015122016122017122018122019122020122021122022122023122024122025122026122027122028122029122030122031122032122033122034122035122036122037122038122039122040122041122042122043122044122045122046122047122048122049122050122051122052122053122054122055122056122057122058122059122060122061122062122063122064122065122066122067122068122069122070122071122072122073122074122075122076122077122078122079122080122081122082122083122084122085122086122087122088122089122090122091122092122093122094122095122096122097122098122099122100122101122102122103122104122105122106122107122108122109122110122111122112122113122114122115122116122117122118122119122120122121122122122123122124122125122126122127122128122129122130122131122132122133122134122135122136122137122138122139122140122141122142122143122144122145122146122147122148122149122150122151122152122153122154122155122156122157122158122159122160122161122162122163122164122165122166122167122168122169122170122171122172122173122174122175122176122177122178122179122180122181122182122183122184122185122186122187122188122189122190122191122192122193122194122195122196122197122198122199122200122201122202122203122204122205122206122207122208122209122210122211122212122213122214122215122216122217122218122219122220122221122222122223122224122225122226122227122228122229122230122231122232122233122234122235122236122237122238122239122240122241122242122243122244122245122246122247122248122249122250122251122252122253122254122255122256122257122258122259122260122261122262122263122264122265122266122267122268122269122270122271122272122273122274122275122276122277122278122279122280122281122282122283122284122285122286122287122288122289122290122291122292122293122294122295122296122297122298122299122300122301122302122303122304122305122306122307122308122309122310122311122312122313122314122315122316122317122318122319122320122321122322122323122324122325122326122327122328122329122330122331122332122333122334122335122336122337122338122339122340122341122342122343122344122345122346122347122348122349122350122351122352122353122354122355122356122357122358122359122360122361122362122363122364122365122366122367122368122369122370122371122372122373122374122375122376122377122378122379122380122381122382122383122384122385122386122387122388122389122390122391122392122393122394122395122396122397122398122399122400122401122402122403122404122405122406122407122408122409122410122411122412122413122414122415122416122417122418122419122420122421122422122423122424122425122426122427122428122429122430122431122432122433122434122435122436122437122438122439122440122441122442122443122444122445122446122447122448122449122450122451122452122453122454122455122456122457122458122459122460122461122462122463122464122465122466122467122468122469122470122471122472122473122474122475122476122477122478122479122480122481122482122483122484122485122486122487122488122489122490122491122492122493122494122495122496122497122498122499122500122501122502122503122504122505122506122507122508122509122510122511122512122513122514122515122516122517122518122519122520122521122522122523122524122525122526122527122528122529122530122531122532122533122534122535122536122537122538122539122540122541122542122543122544122545122546122547122548122549122550122551122552122553122554122555122556122557122558122559122560122561122562122563122564122565122566122567122568122569122570122571122572122573122574122575122576122577122578122579122580122581122582122583122584122585122586122587122588122589122590122591122592122593122594122595122596122597122598122599122600122601122602122603122604122605122606122607122608122609122610122611122612122613122614122615122616122617122618122619122620122621122622122623122624122625122626122627122628122629122630122631122632122633122634122635122636122637122638122639122640122641122642122643122644122645122646122647122648122649122650122651122652122653122654122655122656122657122658122659122660122661122662122663122664122665122666122667122668122669122670122671122672122673122674122675122676122677122678122679122680122681122682122683122684122685122686122687122688122689122690122691122692122693122694122695122696122697122698122699122700122701122702122703122704122705122706122707122708122709122710122711122712122713122714122715122716122717122718122719122720122721122722122723122724122725122726122727122728122729122730122731122732122733122734122735122736122737122738122739122740122741122742122743122744122745122746122747122748122749122750122751122752122753122754122755122756122757122758122759122760122761122762122763122764122765122766122767122768122769122770122771122772122773122774122775122776122777122778122779122780122781122782122783122784122785122786122787122788122789122790122791122792122793122794122795122796122797122798122799122800122801122802122803122804122805122806122807122808122809122810122811122812122813122814122815122816122817122818122819122820122821122822122823122824122825122826122827122828122829122830122831122832122833122834122835122836122837122838122839122840122841122842122843122844122845122846122847122848122849122850122851122852122853122854122855122856122857122858122859122860122861122862122863122864122865122866122867122868122869122870122871122872122873122874122875122876122877122878122879122880122881122882122883122884122885122886122887122888122889122890122891122892122893122894122895122896122897122898122899122900122901122902122903122904122905122906122907122908122909122910122911122912122913122914122915122916122917122918122919122920122921122922122923122924122925122926122927122928122929122930122931122932122933122934122935122936122937122938122939122940122941122942122943122944122945122946122947122948122949122950122951122952122953122954122955122956122957122958122959122960122961122962122963122964122965122966122967122968122969122970122971122972122973122974122975122976122977122978122979122980122981122982122983122984122985122986122987122988122989122990122991122992122993122994122995122996122997122998122999123000123001123002123003123004123005123006123007123008123009123010123011123012123013123014123015123016123017123018123019123020123021123022123023123024123025123026123027123028123029123030123031123032123033123034123035123036123037123038123039123040123041123042123043123044123045123046123047123048123049123050123051123052123053123054123055123056123057123058123059123060123061123062123063123064123065123066123067123068123069123070123071123072123073123074123075123076123077123078123079123080123081123082123083123084123085123086123087123088123089123090123091123092123093123094123095123096123097123098123099123100123101123102123103123104123105123106123107123108123109123110123111123112123113123114123115123116123117123118123119123120123121123122123123123124123125123126123127123128123129123130123131123132123133123134123135123136123137123138123139123140123141123142123143123144123145123146123147123148123149123150123151123152123153123154123155123156123157123158123159123160123161123162123163123164123165123166123167123168123169123170123171123172123173123174123175123176123177123178123179123180123181123182123183123184123185123186123187123188123189123190123191123192123193123194123195123196123197123198123199123200123201123202123203123204123205123206123207123208123209123210123211123212123213123214123215123216123217123218123219123220123221123222123223123224123225123226123227123228123229123230123231123232123233123234123235123236123237123238123239123240123241123242123243123244123245123246123247123248123249123250123251123252123253123254123255123256123257123258123259123260123261123262123263123264123265123266123267123268123269123270123271123272123273123274123275123276123277123278123279123280123281123282123283123284123285123286123287123288123289123290123291123292123293123294123295123296123297123298123299123300123301123302123303123304123305123306123307123308123309123310123311123312123313123314123315123316123317123318123319123320123321123322123323123324123325123326123327123328123329123330123331123332123333123334123335123336123337123338123339123340123341123342123343123344123345123346123347123348123349123350123351123352123353123354123355123356123357123358123359123360123361123362123363123364123365123366123367123368123369123370123371123372123373123374123375123376123377123378123379123380123381123382123383123384123385123386123387123388123389123390123391123392123393123394123395123396123397123398123399123400123401123402123403123404123405123406123407123408123409123410123411123412123413123414123415123416123417123418123419123420123421123422123423123424123425123426123427123428123429123430123431123432123433123434123435123436123437123438123439123440123441123442123443123444123445123446123447123448123449123450123451123452123453123454123455123456123457123458123459123460123461123462123463123464123465123466123467123468123469123470123471123472123473123474123475123476123477123478123479123480123481123482123483123484123485123486123487123488123489123490123491123492123493123494123495123496123497123498123499123500123501123502123503123504123505123506123507123508123509123510123511123512123513123514123515123516123517123518123519123520123521123522123523123524123525123526123527123528123529123530123531123532123533123534123535123536123537123538123539123540123541123542123543123544123545123546123547123548123549123550123551123552123553123554123555123556123557123558123559123560123561123562123563123564123565123566123567123568123569123570123571123572123573123574123575123576123577123578123579123580123581123582123583123584123585123586123587123588123589123590123591123592123593123594123595123596123597123598123599123600123601123602123603123604123605123606123607123608123609123610123611123612123613123614123615123616123617123618123619123620123621123622123623123624123625123626123627123628123629123630123631123632123633123634123635123636123637123638123639123640123641123642123643123644123645123646123647123648123649123650123651123652123653123654123655123656123657123658123659123660123661123662123663123664123665123666123667123668123669123670123671123672123673123674123675123676123677123678123679123680123681123682123683123684123685123686123687123688123689123690123691123692123693123694123695123696123697123698123699123700123701123702123703123704123705123706123707123708123709123710123711123712123713123714123715123716123717123718123719123720123721123722123723123724123725123726123727123728123729123730123731123732123733123734123735123736123737123738123739123740123741123742123743123744123745123746123747123748123749123750123751123752123753123754123755123756123757123758123759123760123761123762123763123764123765123766123767123768123769123770123771123772123773123774123775123776123777123778123779123780123781123782123783123784123785123786123787123788123789123790123791123792123793123794123795123796123797123798123799123800123801123802123803123804123805123806123807123808123809123810123811123812123813123814123815123816123817123818123819123820123821123822123823123824123825123826123827123828123829123830123831123832123833123834123835123836123837123838123839123840123841123842123843123844123845123846123847123848123849123850123851123852123853123854123855123856123857123858123859123860123861123862123863123864123865123866123867123868123869123870123871123872123873123874123875123876123877123878123879123880123881123882123883123884123885123886123887123888123889123890123891123892123893123894123895123896123897123898123899123900123901123902123903123904123905123906123907123908123909123910123911123912123913123914123915123916123917123918123919123920123921123922123923123924123925123926123927123928123929123930123931123932123933123934123935123936123937123938123939123940123941123942123943123944123945123946123947123948123949123950123951123952123953123954123955123956123957123958123959123960123961123962123963123964123965123966123967123968123969123970123971123972123973123974123975123976123977123978123979123980123981123982123983123984123985123986123987123988123989123990123991123992123993123994123995123996123997123998123999124000124001124002124003124004124005124006124007124008124009124010124011124012124013124014124015124016124017124018124019124020124021124022124023124024124025124026124027124028124029124030124031124032124033124034124035124036124037124038124039124040124041124042124043124044124045124046124047124048124049124050124051124052124053124054124055124056124057124058124059124060124061124062124063124064124065124066124067124068124069124070124071124072124073124074124075124076124077124078124079124080124081124082124083124084124085124086124087124088124089124090124091124092124093124094124095124096124097124098124099124100124101124102124103124104124105124106124107124108124109124110124111124112124113124114124115124116124117124118124119124120124121124122124123124124124125124126124127124128124129124130124131124132124133124134124135124136124137124138124139124140124141124142124143124144124145124146124147124148124149124150124151124152124153124154124155124156124157124158124159124160124161124162124163124164124165124166124167124168124169124170124171124172124173124174124175124176124177124178124179124180124181124182124183124184124185124186124187124188124189124190124191124192124193124194124195124196124197124198124199124200124201124202124203124204124205124206124207124208124209124210124211124212124213124214124215124216124217124218124219124220124221124222124223124224124225124226124227124228124229124230124231124232124233124234124235124236124237124238124239124240124241124242124243124244124245124246124247124248124249124250124251124252124253124254124255124256124257124258124259124260124261124262124263124264124265124266124267124268124269124270124271124272124273124274124275124276124277124278124279124280124281124282124283124284124285124286124287124288124289124290124291124292124293124294124295124296124297124298124299124300124301124302124303124304124305124306124307124308124309124310124311124312124313124314124315124316124317124318124319124320124321124322124323124324124325124326124327124328124329124330124331124332124333124334124335124336124337124338124339124340124341124342124343124344124345124346124347124348124349124350124351124352124353124354124355124356124357124358124359124360124361124362124363124364124365124366124367124368124369124370124371124372124373124374124375124376124377124378124379124380124381124382124383124384124385124386124387124388124389124390124391124392124393124394124395124396124397124398124399124400124401124402124403124404124405124406124407124408124409124410124411124412124413124414124415124416124417124418124419124420124421124422124423124424124425124426124427124428124429124430124431124432124433124434124435124436124437124438124439124440124441124442124443124444124445124446124447124448124449124450124451124452124453124454124455124456124457124458124459124460124461124462124463124464124465124466124467124468124469124470124471124472124473124474124475124476124477124478124479124480124481124482124483124484124485124486124487124488124489124490124491124492124493124494124495124496124497124498124499124500124501124502124503124504124505124506124507124508124509124510124511124512124513124514124515124516124517124518124519124520124521124522124523124524124525124526124527124528124529124530124531124532124533124534124535124536124537124538124539124540124541124542124543124544124545124546124547124548124549124550124551124552124553124554124555124556124557124558124559124560124561124562124563124564124565124566124567124568124569124570124571124572124573124574124575124576124577124578124579124580124581124582124583124584124585124586124587124588124589124590124591124592124593124594124595124596124597124598124599124600124601124602124603124604124605124606124607124608124609124610124611124612124613124614124615124616124617124618124619124620124621124622124623124624124625124626124627124628124629124630124631124632124633124634124635124636124637124638124639124640124641124642124643124644124645124646124647124648124649124650124651124652124653124654124655124656124657124658124659124660124661124662124663124664124665124666124667124668124669124670124671124672124673124674124675124676124677124678124679124680124681124682124683124684124685124686124687124688124689124690124691124692124693124694124695124696124697124698124699124700124701124702124703124704124705124706124707124708124709124710124711124712124713124714124715124716124717124718124719124720124721124722124723124724124725124726124727124728124729124730124731124732124733124734124735124736124737124738124739124740124741124742124743124744124745124746124747124748124749124750124751124752124753124754124755124756124757124758124759124760124761124762124763124764124765124766124767124768124769124770124771124772124773124774124775124776124777124778124779124780124781124782124783124784124785124786124787124788124789124790124791124792124793124794124795124796124797124798124799124800124801124802124803124804124805124806124807124808124809124810124811124812124813124814124815124816124817124818124819124820124821124822124823124824124825124826124827124828124829124830124831124832124833124834124835124836124837124838124839124840124841124842124843124844124845124846124847124848124849124850124851124852124853124854124855124856124857124858124859124860124861124862124863124864124865124866124867124868124869124870124871124872124873124874124875124876124877124878124879124880124881124882124883124884124885124886124887124888124889124890124891124892124893124894124895124896124897124898124899124900124901124902124903124904124905124906124907124908124909124910124911124912124913124914124915124916124917124918124919124920124921124922124923124924124925124926124927124928124929124930124931124932124933124934124935124936124937124938124939124940124941124942124943124944124945124946124947124948124949124950124951124952124953124954124955124956124957124958124959124960124961124962124963124964124965124966124967124968124969124970124971124972124973124974124975124976124977124978124979124980124981124982124983124984124985124986124987124988124989124990124991124992124993124994124995124996124997124998124999125000125001125002125003125004125005125006125007125008125009125010125011125012125013125014125015125016125017125018125019125020125021125022125023125024125025125026125027125028125029125030125031125032125033125034125035125036125037125038125039125040125041125042125043125044125045125046125047125048125049125050125051125052125053125054125055125056125057125058125059125060125061125062125063125064125065125066125067125068125069125070125071125072125073125074125075125076125077125078125079125080125081125082125083125084125085125086125087125088125089125090125091125092125093125094125095125096125097125098125099125100125101125102125103125104125105125106125107125108125109125110125111125112125113125114125115125116125117125118125119125120125121125122125123125124125125125126125127125128125129125130125131125132125133125134125135125136125137125138125139125140125141125142125143125144125145125146125147125148125149125150125151125152125153125154125155125156125157125158125159125160125161125162125163125164125165125166125167125168125169125170125171125172125173125174125175125176125177125178125179125180125181125182125183125184125185125186125187125188125189125190125191125192125193125194125195125196125197125198125199125200125201125202125203125204125205125206125207125208125209125210125211125212125213125214125215125216125217125218125219125220125221125222125223125224125225125226125227125228125229125230125231125232125233125234125235125236125237125238125239125240125241125242125243125244125245125246125247125248125249125250125251125252125253125254125255125256125257125258125259125260125261125262125263125264125265125266125267125268125269125270125271125272125273125274125275125276125277125278125279125280125281125282125283125284125285125286125287125288125289125290125291125292125293125294125295125296125297125298125299125300125301125302125303125304125305125306125307125308125309125310125311125312125313125314125315125316125317125318125319125320125321125322125323125324125325125326125327125328125329125330125331125332125333125334125335125336125337125338125339125340125341125342125343125344125345125346125347125348125349125350125351125352125353125354125355125356125357125358125359125360125361125362125363125364125365125366125367125368125369125370125371125372125373125374125375125376125377125378125379125380125381125382125383125384125385125386125387125388125389125390125391125392125393125394125395125396125397125398125399125400125401125402125403125404125405125406125407125408125409125410125411125412125413125414125415125416125417125418125419125420125421125422125423125424125425125426125427125428125429125430125431125432125433125434125435125436125437125438125439125440125441125442125443125444125445125446125447125448125449125450125451125452125453125454125455125456125457125458125459125460125461125462125463125464125465125466125467125468125469125470125471125472125473125474125475125476125477125478125479125480125481125482125483125484125485125486125487125488125489125490125491125492125493125494125495125496125497125498125499125500125501125502125503125504125505125506125507125508125509125510125511125512125513125514125515125516125517125518125519125520125521125522125523125524125525125526125527125528125529125530125531125532125533125534125535125536125537125538125539125540125541125542125543125544125545125546125547125548125549125550125551125552125553125554125555125556125557125558125559125560125561125562125563125564125565125566125567125568125569125570125571125572125573125574125575125576125577125578125579125580125581125582125583125584125585125586125587125588125589125590125591125592125593125594125595125596125597125598125599125600125601125602125603125604125605125606125607125608125609125610125611125612125613125614125615125616125617125618125619125620125621125622125623125624125625125626125627125628125629125630125631125632125633125634125635125636125637125638125639125640125641125642125643125644125645125646125647125648125649125650125651125652125653125654125655125656125657125658125659125660125661125662125663125664125665125666125667125668125669125670125671125672125673125674125675125676125677125678125679125680125681125682125683125684125685125686125687125688125689125690125691125692125693125694125695125696125697125698125699125700125701125702125703125704125705125706125707125708125709125710125711125712125713125714125715125716125717125718125719125720125721125722125723125724125725125726125727125728125729125730125731125732125733125734125735125736125737125738125739125740125741125742125743125744125745125746125747125748125749125750125751125752125753125754125755125756125757125758125759125760125761125762125763125764125765125766125767125768125769125770125771125772125773125774125775125776125777125778125779125780125781125782125783125784125785125786125787125788125789125790125791125792125793125794125795125796125797125798125799125800125801125802125803125804125805125806125807125808125809125810125811125812125813125814125815125816125817125818125819125820125821125822125823125824125825125826125827125828125829125830125831125832125833125834125835125836125837125838125839125840125841125842125843125844125845125846125847125848125849125850125851125852125853125854125855125856125857125858125859125860125861125862125863125864125865125866125867125868125869125870125871125872125873125874125875125876125877125878125879125880125881125882125883125884125885125886125887125888125889125890125891125892125893125894125895125896125897125898125899125900125901125902125903125904125905125906125907125908125909125910125911125912125913125914125915125916125917125918125919125920125921125922125923125924125925125926125927125928125929125930125931125932125933125934125935125936125937125938125939125940125941125942125943125944125945125946125947125948125949125950125951125952125953125954125955125956125957125958125959125960125961125962125963125964125965125966125967125968125969125970125971125972125973125974125975125976125977125978125979125980125981125982125983125984125985125986125987125988125989125990125991125992125993125994125995125996125997125998125999126000126001126002126003126004126005126006126007126008126009126010126011126012126013126014126015126016126017126018126019126020126021126022126023126024126025126026126027126028126029126030126031126032126033126034126035126036126037126038126039126040126041126042126043126044126045126046126047126048126049126050126051126052126053126054126055126056126057126058126059126060126061126062126063126064126065126066126067126068126069126070126071126072126073126074126075126076126077126078126079126080126081126082126083126084126085126086126087126088126089126090126091126092126093126094126095126096126097126098126099126100126101126102126103126104126105126106126107126108126109126110126111126112126113126114126115126116126117126118126119126120126121126122126123126124126125126126126127126128126129126130126131126132126133126134126135126136126137126138126139126140126141126142126143126144126145126146126147126148126149126150126151126152126153126154126155126156126157126158126159126160126161126162126163126164126165126166126167126168126169126170126171126172126173126174126175126176126177126178126179126180126181126182126183126184126185126186126187126188126189126190126191126192126193126194126195126196126197126198126199126200126201126202126203126204126205126206126207126208126209126210126211126212126213126214126215126216126217126218126219126220126221126222126223126224126225126226126227126228126229126230126231126232126233126234126235126236126237126238126239126240126241126242126243126244126245126246126247126248126249126250126251126252126253126254126255126256126257126258126259126260126261126262126263126264126265126266126267126268126269126270126271126272126273126274126275126276126277126278126279126280126281126282126283126284126285126286126287126288126289126290126291126292126293126294126295126296126297126298126299126300126301126302126303126304126305126306126307126308126309126310126311126312126313126314126315126316126317126318126319126320126321126322126323126324126325126326126327126328126329126330126331126332126333126334126335126336126337126338126339126340126341126342126343126344126345126346126347126348126349126350126351126352126353126354126355126356126357126358126359126360126361126362126363126364126365126366126367126368126369126370126371126372126373126374126375126376126377126378126379126380126381126382126383126384126385126386126387126388126389126390126391126392126393126394126395126396126397126398126399126400126401126402126403126404126405126406126407126408126409126410126411126412126413126414126415126416126417126418126419126420126421126422126423126424126425126426126427126428126429126430126431126432126433126434126435126436126437126438126439126440126441126442126443126444126445126446126447126448126449126450126451126452126453126454126455126456126457126458126459126460126461126462126463126464126465126466126467126468126469126470126471126472126473126474126475126476126477126478126479126480126481126482126483126484126485126486126487126488126489126490126491126492126493126494126495126496126497126498126499126500126501126502126503126504126505126506126507126508126509126510126511126512126513126514126515126516126517126518126519126520126521126522126523126524126525126526126527126528126529126530126531126532126533126534126535126536126537126538126539126540126541126542126543126544126545126546126547126548126549126550126551126552126553126554126555126556126557126558126559126560126561126562126563126564126565126566126567126568126569126570126571126572126573126574126575126576126577126578126579126580126581126582126583126584126585126586126587126588126589126590126591126592126593126594126595126596126597126598126599126600126601126602126603126604126605126606126607126608126609126610126611126612126613126614126615126616126617126618126619126620126621126622126623126624126625126626126627126628126629126630126631126632126633126634126635126636126637126638126639126640126641126642126643126644126645126646126647126648126649126650126651126652126653126654126655126656126657126658126659126660126661126662126663126664126665126666126667126668126669126670126671126672126673126674126675126676126677126678126679126680126681126682126683126684126685126686126687126688126689126690126691126692126693126694126695126696126697126698126699126700126701126702126703126704126705126706126707126708126709126710126711126712126713126714126715126716126717126718126719126720126721126722126723126724126725126726126727126728126729126730126731126732126733126734126735126736126737126738126739126740126741126742126743126744126745126746126747126748126749126750126751126752126753126754126755126756126757126758126759126760126761126762126763126764126765126766126767126768126769126770126771126772126773126774126775126776126777126778126779126780126781126782126783126784126785126786126787126788126789126790126791126792126793126794126795126796126797126798126799126800126801126802126803126804126805126806126807126808126809126810126811126812126813126814126815126816126817126818126819126820126821126822126823126824126825126826126827126828126829126830126831126832126833126834126835126836126837126838126839126840126841126842126843126844126845126846126847126848126849126850126851126852126853126854126855126856126857126858126859126860126861126862126863126864126865126866126867126868126869126870126871126872126873126874126875126876126877126878126879126880126881126882126883126884126885126886126887126888126889126890126891126892126893126894126895126896126897126898126899126900126901126902126903126904126905126906126907126908126909126910126911126912126913126914126915126916126917126918126919126920126921126922126923126924126925126926126927126928126929126930126931126932126933126934126935126936126937126938126939126940126941126942126943126944126945126946126947126948126949126950126951126952126953126954126955126956126957126958126959126960126961126962126963126964126965126966126967126968126969126970126971126972126973126974126975126976126977126978126979126980126981126982126983126984126985126986126987126988126989126990126991126992126993126994126995126996126997126998126999127000127001127002127003127004127005127006127007127008127009127010127011127012127013127014127015127016127017127018127019127020127021127022127023127024127025127026127027127028127029127030127031127032127033127034127035127036127037127038127039127040127041127042127043127044127045127046127047127048127049127050127051127052127053127054127055127056127057127058127059127060127061127062127063127064127065127066127067127068127069127070127071127072127073127074127075127076127077127078127079127080127081127082127083127084127085127086127087127088127089127090127091127092127093127094127095127096127097127098127099127100127101127102127103127104127105127106127107127108127109127110127111127112127113127114127115127116127117127118127119127120127121127122127123127124127125127126127127127128127129127130127131127132127133127134127135127136127137127138127139127140127141127142127143127144127145127146127147127148127149127150127151127152127153127154127155127156127157127158127159127160127161127162127163127164127165127166127167127168127169127170127171127172127173127174127175127176127177127178127179127180127181127182127183127184127185127186127187127188127189127190127191127192127193127194127195127196127197127198127199127200127201127202127203127204127205127206127207127208127209127210127211127212127213127214127215127216127217127218127219127220127221127222127223127224127225127226127227127228127229127230127231127232127233127234127235127236127237127238127239127240127241127242127243127244127245127246127247127248127249127250127251127252127253127254127255127256127257127258127259127260127261127262127263127264127265127266127267127268127269127270127271127272127273127274127275127276127277127278127279127280127281127282127283127284127285127286127287127288127289127290127291127292127293127294127295127296127297127298127299127300127301127302127303127304127305127306127307127308127309127310127311127312127313127314127315127316127317127318127319127320127321127322127323127324127325127326127327127328127329127330127331127332127333127334127335127336127337127338127339127340127341127342127343127344127345127346127347127348127349127350127351127352127353127354127355127356127357127358127359127360127361127362127363127364127365127366127367127368127369127370127371127372127373127374127375127376127377127378127379127380127381127382127383127384127385127386127387127388127389127390127391127392127393127394127395127396127397127398127399127400127401127402127403127404127405127406127407127408127409127410127411127412127413127414127415127416127417127418127419127420127421127422127423127424127425127426127427127428127429127430127431127432127433127434127435127436127437127438127439127440127441127442127443127444127445127446127447127448127449127450127451127452127453127454127455127456127457127458127459127460127461127462127463127464127465127466127467127468127469127470127471127472127473127474127475127476127477127478127479127480127481127482127483127484127485127486127487127488127489127490127491127492127493127494127495127496127497127498127499127500127501127502127503127504127505127506127507127508127509127510127511127512127513127514127515127516127517127518127519127520127521127522127523127524127525127526127527127528127529127530127531127532127533127534127535127536127537127538127539127540127541127542127543127544127545127546127547127548127549127550127551127552127553127554127555127556127557127558127559127560127561127562127563127564127565127566127567127568127569127570127571127572127573127574127575127576127577127578127579127580127581127582127583127584127585127586127587127588127589127590127591127592127593127594127595127596127597127598127599127600127601127602127603127604127605127606127607127608127609127610127611127612127613127614127615127616127617127618127619127620127621127622127623127624127625127626127627127628127629127630127631127632127633127634127635127636127637127638127639127640127641127642127643127644127645127646127647127648127649127650127651127652127653127654127655127656127657127658127659127660127661127662127663127664127665127666127667127668127669127670127671127672127673127674127675127676127677127678127679127680127681127682127683127684127685127686127687127688127689127690127691127692127693127694127695127696127697127698127699127700127701127702127703127704127705127706127707127708127709127710127711127712127713127714127715127716127717127718127719127720127721127722127723127724127725127726127727127728127729127730127731127732127733127734127735127736127737127738127739127740127741127742127743127744127745127746127747127748127749127750127751127752127753127754127755127756127757127758127759127760127761127762127763127764127765127766127767127768127769127770127771127772127773127774127775127776127777127778127779127780127781127782127783127784127785127786127787127788127789127790127791127792127793127794127795127796127797127798127799127800127801127802127803127804127805127806127807127808127809127810127811127812127813127814127815127816127817127818127819127820127821127822127823127824127825127826127827127828127829127830127831127832127833127834127835127836127837127838127839127840127841127842127843127844127845127846127847127848127849127850127851127852127853127854127855127856127857127858127859127860127861127862127863127864127865127866127867127868127869127870127871127872127873127874127875127876127877127878127879127880127881127882127883127884127885127886127887127888127889127890127891127892127893127894127895127896127897127898127899127900127901127902127903127904127905127906127907127908127909127910127911127912127913127914127915127916127917127918127919127920127921127922127923127924127925127926127927127928127929127930127931127932127933127934127935127936127937127938127939127940127941127942127943127944127945127946127947127948127949127950127951127952127953127954127955127956127957127958127959127960127961127962127963127964127965127966127967127968127969127970127971127972127973127974127975127976127977127978127979127980127981127982127983127984127985127986127987127988127989127990127991127992127993127994127995127996127997127998127999128000128001128002128003128004128005128006128007128008128009128010128011128012128013128014128015128016128017128018128019128020128021128022128023128024128025128026128027128028128029128030128031128032128033128034128035128036128037128038128039128040128041128042128043128044128045128046128047128048128049128050128051128052128053128054128055128056128057128058128059128060128061128062128063128064128065128066128067128068128069128070128071128072128073128074128075128076128077128078128079128080128081128082128083128084128085128086128087128088128089128090128091128092128093128094128095128096128097128098128099128100128101128102128103128104128105128106128107128108128109128110128111128112128113128114128115128116128117128118128119128120128121128122128123128124128125128126128127128128128129128130128131128132128133128134128135128136128137128138128139128140128141128142128143128144128145128146128147128148128149128150128151128152128153128154128155128156128157128158128159128160128161128162128163128164128165128166128167128168128169128170128171128172128173128174128175128176128177128178128179128180128181128182128183128184128185128186128187128188128189128190128191128192128193128194128195128196128197128198128199128200128201128202128203128204128205128206128207128208128209128210128211128212128213128214128215128216128217128218128219128220128221128222128223128224128225128226128227128228128229128230128231128232128233128234128235128236128237128238128239128240128241128242128243128244128245128246128247128248128249128250128251128252128253128254128255128256128257128258128259128260128261128262128263128264128265128266128267128268128269128270128271128272128273128274128275128276128277128278128279128280128281128282128283128284128285128286128287128288128289128290128291128292128293128294128295128296128297128298128299128300128301128302128303128304128305128306128307128308128309128310128311128312128313128314128315128316128317128318128319128320128321128322128323128324128325128326128327128328128329128330128331128332128333128334128335128336128337128338128339128340128341128342128343128344128345128346128347128348128349128350128351128352128353128354128355128356128357128358128359128360128361128362128363128364128365128366128367128368128369128370128371128372128373128374128375128376128377128378128379128380128381128382128383128384128385128386128387128388128389128390128391128392128393128394128395128396128397128398128399128400128401128402128403128404128405128406128407128408128409128410128411128412128413128414128415128416128417128418128419128420128421128422128423128424128425128426128427128428128429128430128431128432128433128434128435128436128437128438128439128440128441128442128443128444128445128446128447128448128449128450128451128452128453128454128455128456128457128458128459128460128461128462128463128464128465128466128467128468128469128470128471128472128473128474128475128476128477128478128479128480128481128482128483128484128485128486128487128488128489128490128491128492128493128494128495128496128497128498128499128500128501128502128503128504128505128506128507128508128509128510128511128512128513128514128515128516128517128518128519128520128521128522128523128524128525128526128527128528128529128530128531128532128533128534128535128536128537128538128539128540128541128542128543128544128545128546128547128548128549128550128551128552128553128554128555128556128557128558128559128560128561128562128563128564128565128566128567128568128569128570128571128572128573128574128575128576128577128578128579128580128581128582128583128584128585128586128587128588128589128590128591128592128593128594128595128596128597128598128599128600128601128602128603128604128605128606128607128608128609128610128611128612128613128614128615128616128617128618128619128620128621128622128623128624128625128626128627128628128629128630128631128632128633128634128635128636128637128638128639128640128641128642128643128644128645128646128647128648128649128650128651128652128653128654128655128656128657128658128659128660128661128662128663128664128665128666128667128668128669128670128671128672128673128674128675128676128677128678128679128680128681128682128683128684128685128686128687128688128689128690128691128692128693128694128695128696128697128698128699128700128701128702128703128704128705128706128707128708128709128710128711128712128713128714128715128716128717128718128719128720128721128722128723128724128725128726128727128728128729128730128731128732128733128734128735128736128737128738128739128740128741128742128743128744128745128746128747128748128749128750128751128752128753128754128755128756128757128758128759128760128761128762128763128764128765128766128767128768128769128770128771128772128773128774128775128776128777128778128779128780128781128782128783128784128785128786128787128788128789128790128791128792128793128794128795128796128797128798128799128800128801128802128803128804128805128806128807128808128809128810128811128812128813128814128815128816128817128818128819128820128821128822128823128824128825128826128827128828128829128830128831128832128833128834128835128836128837128838128839128840128841128842128843128844128845128846128847128848128849128850128851128852128853128854128855128856128857128858128859128860128861128862128863128864128865128866128867128868128869128870128871128872128873128874128875128876128877128878128879128880128881128882128883128884128885128886128887128888128889128890128891128892128893128894128895128896128897128898128899128900128901128902128903128904128905128906128907128908128909128910128911128912128913128914128915128916128917128918128919128920128921128922128923128924128925128926128927128928128929128930128931128932128933128934128935128936128937128938128939128940128941128942128943128944128945128946128947128948128949128950128951128952128953128954128955128956128957128958128959128960128961128962128963128964128965128966128967128968128969128970128971128972128973128974128975128976128977128978128979128980128981128982128983128984128985128986128987128988128989128990128991128992128993128994128995128996128997128998128999129000129001129002129003129004129005129006129007129008129009129010129011129012129013129014129015129016129017129018129019129020129021129022129023129024129025129026129027129028129029129030129031129032129033129034129035129036129037129038129039129040129041129042129043129044129045129046129047129048129049129050129051129052129053129054129055129056129057129058129059129060129061129062129063129064129065129066129067129068129069129070129071129072129073129074129075129076129077129078129079129080129081129082129083129084129085129086129087129088129089129090129091129092129093129094129095129096129097129098129099129100129101129102129103129104129105129106129107129108129109129110129111129112129113129114129115129116129117129118129119129120129121129122129123129124129125129126129127129128129129129130129131129132129133129134129135129136129137129138129139129140129141129142129143129144129145129146129147129148129149129150129151129152129153129154129155129156129157129158129159129160129161129162129163129164129165129166129167129168129169129170129171129172129173129174129175129176129177129178129179129180129181129182129183129184129185129186129187129188129189129190129191129192129193129194129195129196129197129198129199129200129201129202129203129204129205129206129207129208129209129210129211129212129213129214129215129216129217129218129219129220129221129222129223129224129225129226129227129228129229129230129231129232129233129234129235129236129237129238129239129240129241129242129243129244129245129246129247129248129249129250129251129252129253129254129255129256129257129258129259129260129261129262129263129264129265129266129267129268129269129270129271129272129273129274129275129276129277129278129279129280129281129282129283129284129285129286129287129288129289129290129291129292129293129294129295129296129297129298129299129300129301129302129303129304129305129306129307129308129309129310129311129312129313129314129315129316129317129318129319129320129321129322129323129324129325129326129327129328129329129330129331129332129333129334129335129336129337129338129339129340129341129342129343129344129345129346129347129348129349129350129351129352129353129354129355129356129357129358129359129360129361129362129363129364129365129366129367129368129369129370129371129372129373129374129375129376129377129378129379129380129381129382129383129384129385129386129387129388129389129390129391129392129393129394129395129396129397129398129399129400129401129402129403129404129405129406129407129408129409129410129411129412129413129414129415129416129417129418129419129420129421129422129423129424129425129426129427129428129429129430129431129432129433129434129435129436129437129438129439129440129441129442129443129444129445129446129447129448129449129450129451129452129453129454129455129456129457129458129459129460129461129462129463129464129465129466129467129468129469129470129471129472129473129474129475129476129477129478129479129480129481129482129483129484129485129486129487129488129489129490129491129492129493129494129495129496129497129498129499129500129501129502129503129504129505129506129507129508129509129510129511129512129513129514129515129516129517129518129519129520129521129522129523129524129525129526129527129528129529129530129531129532129533129534129535129536129537129538129539129540129541129542129543129544129545129546129547129548129549129550129551129552129553129554129555129556129557129558129559129560129561129562129563129564129565129566129567129568129569129570129571129572129573129574129575129576129577129578129579129580129581129582129583129584129585129586129587129588129589129590129591129592129593129594129595129596129597129598129599129600129601129602129603129604129605129606129607129608129609129610129611129612129613129614129615129616129617129618129619129620129621129622129623129624129625129626129627129628129629129630129631129632129633129634129635129636129637129638129639129640129641129642129643129644129645129646129647129648129649129650129651129652129653129654129655129656129657129658129659129660129661129662129663129664129665129666129667129668129669129670129671129672129673129674129675129676129677129678129679129680129681129682129683129684129685129686129687129688129689129690129691129692129693129694129695129696129697129698129699129700129701129702129703129704129705129706129707129708129709129710129711129712129713129714129715129716129717129718129719129720129721129722129723129724129725129726129727129728129729129730129731129732129733129734129735129736129737129738129739129740129741129742129743129744129745129746129747129748129749129750129751129752129753129754129755129756129757129758129759129760129761129762129763129764129765129766129767129768129769129770129771129772129773129774129775129776129777129778129779129780129781129782129783129784129785129786129787129788129789129790129791129792129793129794129795129796129797129798129799129800129801129802129803129804129805129806129807129808129809129810129811129812129813129814129815129816129817129818129819129820129821129822129823129824129825129826129827129828129829129830129831129832129833129834129835129836129837129838129839129840129841129842129843129844129845129846129847129848129849129850129851129852129853129854129855129856129857129858129859129860129861129862129863129864129865129866129867129868129869129870129871129872129873129874129875129876129877129878129879129880129881129882129883129884129885129886129887129888129889129890129891129892129893129894129895129896129897129898129899129900129901129902129903129904129905129906129907129908129909129910129911129912129913129914129915129916129917129918129919129920129921129922129923129924129925129926129927129928129929129930129931129932129933129934129935129936129937129938129939129940129941129942129943129944129945129946129947129948129949129950129951129952129953129954129955129956129957129958129959129960129961129962129963129964129965129966129967129968129969129970129971129972129973129974129975129976129977129978129979129980129981129982129983129984129985129986129987129988129989129990129991129992129993129994129995129996129997129998129999130000130001130002130003130004130005130006130007130008130009130010130011130012130013130014130015130016130017130018130019130020130021130022130023130024130025130026130027130028130029130030130031130032130033130034130035130036130037130038130039130040130041130042130043130044130045130046130047130048130049130050130051130052130053130054130055130056130057130058130059130060130061130062130063130064130065130066130067130068130069130070130071130072130073130074130075130076130077130078130079130080130081130082130083130084130085130086130087130088130089130090130091130092130093130094130095130096130097130098130099130100130101130102130103130104130105130106130107130108130109130110130111130112130113130114130115130116130117130118130119130120130121130122130123130124130125130126130127130128130129130130130131130132130133130134130135130136130137130138130139130140130141130142130143130144130145130146130147130148130149130150130151130152130153130154130155130156130157130158130159130160130161130162130163130164130165130166130167130168130169130170130171130172130173130174130175130176130177130178130179130180130181130182130183130184130185130186130187130188130189130190130191130192130193130194130195130196130197130198130199130200130201130202130203130204130205130206130207130208130209130210130211130212130213130214130215130216130217130218130219130220130221130222130223130224130225130226130227130228130229130230130231130232130233130234130235130236130237130238130239130240130241130242130243130244130245130246130247130248130249130250130251130252130253130254130255130256130257130258130259130260130261130262130263130264130265130266130267130268130269130270130271130272130273130274130275130276130277130278130279130280130281130282130283130284130285130286130287130288130289130290130291130292130293130294130295130296130297130298130299130300130301130302130303130304130305130306130307130308130309130310130311130312130313130314130315130316130317130318130319130320130321130322130323130324130325130326130327130328130329130330130331130332130333130334130335130336130337130338130339130340130341130342130343130344130345130346130347130348130349130350130351130352130353130354130355130356130357130358130359130360130361130362130363130364130365130366130367130368130369130370130371130372130373130374130375130376130377130378130379130380130381130382130383130384130385130386130387130388130389130390130391130392130393130394130395130396130397130398130399130400130401130402130403130404130405130406130407130408130409130410130411130412130413130414130415130416130417130418130419130420130421130422130423130424130425130426130427130428130429130430130431130432130433130434130435130436130437130438130439130440130441130442130443130444130445130446130447130448130449130450130451130452130453130454130455130456130457130458130459130460130461130462130463130464130465130466130467130468130469130470130471130472130473130474130475130476130477130478130479130480130481130482130483130484130485130486130487130488130489130490130491130492130493130494130495130496130497130498130499130500130501130502130503130504130505130506130507130508130509130510130511130512130513130514130515130516130517130518130519130520130521130522130523130524130525130526130527130528130529130530130531130532130533130534130535130536130537130538130539130540130541130542130543130544130545130546130547130548130549130550130551130552130553130554130555130556130557130558130559130560130561130562130563130564130565130566130567130568130569130570130571130572130573130574130575130576130577130578130579130580130581130582130583130584130585130586130587130588130589130590130591130592130593130594130595130596130597130598130599130600130601130602130603130604130605130606130607130608130609130610130611130612130613130614130615130616130617130618130619130620130621130622130623130624130625130626130627130628130629130630130631130632130633130634130635130636130637130638130639130640130641130642130643130644130645130646130647130648130649130650130651130652130653130654130655130656130657130658130659130660130661130662130663130664130665130666130667130668130669130670130671130672130673130674130675130676130677130678130679130680130681130682130683130684130685130686130687130688130689130690130691130692130693130694130695130696130697130698130699130700130701130702130703130704130705130706130707130708130709130710130711130712130713130714130715130716130717130718130719130720130721130722130723130724130725130726130727130728130729130730130731130732130733130734130735130736130737130738130739130740130741130742130743130744130745130746130747130748130749130750130751130752130753130754130755130756130757130758130759130760130761130762130763130764130765130766130767130768130769130770130771130772130773130774130775130776130777130778130779130780130781130782130783130784130785130786130787130788130789130790130791130792130793130794130795130796130797130798130799130800130801130802130803130804130805130806130807130808130809130810130811130812130813130814130815130816130817130818130819130820130821130822130823130824130825130826130827130828130829130830130831130832130833130834130835130836130837130838130839130840130841130842130843130844130845130846130847130848130849130850130851130852130853130854130855130856130857130858130859130860130861130862130863130864130865130866130867130868130869130870130871130872130873130874130875130876130877130878130879130880130881130882130883130884130885130886130887130888130889130890130891130892130893130894130895130896130897130898130899130900130901130902130903130904130905130906130907130908130909130910130911130912130913130914130915130916130917130918130919130920130921130922130923130924130925130926130927130928130929130930130931130932130933130934130935130936130937130938130939130940130941130942130943130944130945130946130947130948130949130950130951130952130953130954130955130956130957130958130959130960130961130962130963130964130965130966130967130968130969130970130971130972130973130974130975130976130977130978130979130980130981130982130983130984130985130986130987130988130989130990130991130992130993130994130995130996130997130998130999131000131001131002131003131004131005131006131007131008131009131010131011131012131013131014131015131016131017131018131019131020131021131022131023131024131025131026131027131028131029131030131031131032131033131034131035131036131037131038131039131040131041131042131043131044131045131046131047131048131049131050131051131052131053131054131055131056131057131058131059131060131061131062131063131064131065131066131067131068131069131070131071131072131073131074131075131076131077131078131079131080131081131082131083131084131085131086131087131088131089131090131091131092131093131094131095131096131097131098131099131100131101131102131103131104131105131106131107131108131109131110131111131112131113131114131115131116131117131118131119131120131121131122131123131124131125131126131127131128131129131130131131131132131133131134131135131136131137131138131139131140131141131142131143131144131145131146131147131148131149131150131151131152131153131154131155131156131157131158131159131160131161131162131163131164131165131166131167131168131169131170131171131172131173131174131175131176131177131178131179131180131181131182131183131184131185131186131187131188131189131190131191131192131193131194131195131196131197131198131199131200131201131202131203131204131205131206131207131208131209131210131211131212131213131214131215131216131217131218131219131220131221131222131223131224131225131226131227131228131229131230131231131232131233131234131235131236131237131238131239131240131241131242131243131244131245131246131247131248131249131250131251131252131253131254131255131256131257131258131259131260131261131262131263131264131265131266131267131268131269131270131271131272131273131274131275131276131277131278131279131280131281131282131283131284131285131286131287131288131289131290131291131292131293131294131295131296131297131298131299131300131301131302131303131304131305131306131307131308131309131310131311131312131313131314131315131316131317131318131319131320131321131322131323131324131325131326131327131328131329131330131331131332131333131334131335131336131337131338131339131340131341131342131343131344131345131346131347131348131349131350131351131352131353131354131355131356131357131358131359131360131361131362131363131364131365131366131367131368131369131370131371131372131373131374131375131376131377131378131379131380131381131382131383131384131385131386131387131388131389131390131391131392131393131394131395131396131397131398131399131400131401131402131403131404131405131406131407131408131409131410131411131412131413131414131415131416131417131418131419131420131421131422131423131424131425131426131427131428131429131430131431131432131433131434131435131436131437131438131439131440131441131442131443131444131445131446131447131448131449131450131451131452131453131454131455131456131457131458131459131460131461131462131463131464131465131466131467131468131469131470131471131472131473131474131475131476131477131478131479131480131481131482131483131484131485131486131487131488131489131490131491131492131493131494131495131496131497131498131499131500131501131502131503131504131505131506131507131508131509131510131511131512131513131514131515131516131517131518131519131520131521131522131523131524131525131526131527131528131529131530131531131532131533131534131535131536131537131538131539131540131541131542131543131544131545131546131547131548131549131550131551131552131553131554131555131556131557131558131559131560131561131562131563131564131565131566131567131568131569131570131571131572131573131574131575131576131577131578131579131580131581131582131583131584131585131586131587131588131589131590131591131592131593131594131595131596131597131598131599131600131601131602131603131604131605131606131607131608131609131610131611131612131613131614131615131616131617131618131619131620131621131622131623131624131625131626131627131628131629131630131631131632131633131634131635131636131637131638131639131640131641131642131643131644131645131646131647131648131649131650131651131652131653131654131655131656131657131658131659131660131661131662131663131664131665131666131667131668131669131670131671131672131673131674131675131676131677131678131679131680131681131682131683131684131685131686131687131688131689131690131691131692131693131694131695131696131697131698131699131700131701131702131703131704131705131706131707131708131709131710131711131712131713131714131715131716131717131718131719131720131721131722131723131724131725131726131727131728131729131730131731131732131733131734131735131736131737131738131739131740131741131742131743131744131745131746131747131748131749131750131751131752131753131754131755131756131757131758131759131760131761131762131763131764131765131766131767131768131769131770131771131772131773131774131775131776131777131778131779131780131781131782131783131784131785131786131787131788131789131790131791131792131793131794131795131796131797131798131799131800131801131802131803131804131805131806131807131808131809131810131811131812131813131814131815131816131817131818131819131820131821131822131823131824131825131826131827131828131829131830131831131832131833131834131835131836131837131838131839131840131841131842131843131844131845131846131847131848131849131850131851131852131853131854131855131856131857131858131859131860131861131862131863131864131865131866131867131868131869131870131871131872131873131874131875131876131877131878131879131880131881131882131883131884131885131886131887131888131889131890131891131892131893131894131895131896131897131898131899131900131901131902131903131904131905131906131907131908131909131910131911131912131913131914131915131916131917131918131919131920131921131922131923131924131925131926131927131928131929131930131931131932131933131934131935131936131937131938131939131940131941131942131943131944131945131946131947131948131949131950131951131952131953131954131955131956131957131958131959131960131961131962131963131964131965131966131967131968131969131970131971131972131973131974131975131976131977131978131979131980131981131982131983131984131985131986131987131988131989131990131991131992131993131994131995131996131997131998131999132000132001132002132003132004132005132006132007132008132009132010132011132012132013132014132015132016132017132018132019132020132021132022132023132024132025132026132027132028132029132030132031132032132033132034132035132036132037132038132039132040132041132042132043132044132045132046132047132048132049132050132051132052132053132054132055132056132057132058132059132060132061132062132063132064132065132066132067132068132069132070132071132072132073132074132075132076132077132078132079132080132081132082132083132084132085132086132087132088132089132090132091132092132093132094132095132096132097132098132099132100132101132102132103132104132105132106132107132108132109132110132111132112132113132114132115132116132117132118132119132120132121132122132123132124132125132126132127132128132129132130132131132132132133132134132135132136132137132138132139132140132141132142132143132144132145132146132147132148132149132150132151132152132153132154132155132156132157132158132159132160132161132162132163132164132165132166132167132168132169132170132171132172132173132174132175132176132177132178132179132180132181132182132183132184132185132186132187132188132189132190132191132192132193132194132195132196132197132198132199132200132201132202132203132204132205132206132207132208132209132210132211132212132213132214132215132216132217132218132219132220132221132222132223132224132225132226132227132228132229132230132231132232132233132234132235132236132237132238132239132240132241132242132243132244132245132246132247132248132249132250132251132252132253132254132255132256132257132258132259132260132261132262132263132264132265132266132267132268132269132270132271132272132273132274132275132276132277132278132279132280132281132282132283132284132285132286132287132288132289132290132291132292132293132294132295132296132297132298132299132300132301132302132303132304132305132306132307132308132309132310132311132312132313132314132315132316132317132318132319132320132321132322132323132324132325132326132327132328132329132330132331132332132333132334132335132336132337132338132339132340132341132342132343132344132345132346132347132348132349132350132351132352132353132354132355132356132357132358132359132360132361132362132363132364132365132366132367132368132369132370132371132372132373132374132375132376132377132378132379132380132381132382132383132384132385132386132387132388132389132390132391132392132393132394132395132396132397132398132399132400132401132402132403132404132405132406132407132408132409132410132411132412132413132414132415132416132417132418132419132420132421132422132423132424132425132426132427132428132429132430132431132432132433132434132435132436132437132438132439132440132441132442132443132444132445132446132447132448132449132450132451132452132453132454132455132456132457132458132459132460132461132462132463132464132465132466132467132468132469132470132471132472132473132474132475132476132477132478132479132480132481132482132483132484132485132486132487132488132489132490132491132492132493132494132495132496132497132498132499132500132501132502132503132504132505132506132507132508132509132510132511132512132513132514132515132516132517132518132519132520132521132522132523132524132525132526132527132528132529132530132531132532132533132534132535132536132537132538132539132540132541132542132543132544132545132546132547132548132549132550132551132552132553132554132555132556132557132558132559132560132561132562132563132564132565132566132567132568132569132570132571132572132573132574132575132576132577132578132579132580132581132582132583132584132585132586132587132588132589132590132591132592132593132594132595132596132597132598132599132600132601132602132603132604132605132606132607132608132609132610132611132612132613132614132615132616132617132618132619132620132621132622132623132624132625132626132627132628132629132630132631132632132633132634132635132636132637132638132639132640132641132642132643132644132645132646132647132648132649132650132651132652132653132654132655132656132657132658132659132660132661132662132663132664132665132666132667132668132669132670132671132672132673132674132675132676132677132678132679132680132681132682132683132684132685132686132687132688132689132690132691132692132693132694132695132696132697132698132699132700132701132702132703132704132705132706132707132708132709132710132711132712132713132714132715132716132717132718132719132720132721132722132723132724132725132726132727132728132729132730132731132732132733132734132735132736132737132738132739132740132741132742132743132744132745132746132747132748132749132750132751132752132753132754132755132756132757132758132759132760132761132762132763132764132765132766132767132768132769132770132771132772132773132774132775132776132777132778132779132780132781132782132783132784132785132786132787132788132789132790132791132792132793132794132795132796132797132798132799132800132801132802132803132804132805132806132807132808132809132810132811132812132813132814132815132816132817132818132819132820132821132822132823132824132825132826132827132828132829132830132831132832132833132834132835132836132837132838132839132840132841132842132843132844132845132846132847132848132849132850132851132852132853132854132855132856132857132858132859132860132861132862132863132864132865132866132867132868132869132870132871132872132873132874132875132876132877132878132879132880132881132882132883132884132885132886132887132888132889132890132891132892132893132894132895132896132897132898132899132900132901132902132903132904132905132906132907132908132909132910132911132912132913132914132915132916132917132918132919132920132921132922132923132924132925132926132927132928132929132930132931132932132933132934132935132936132937132938132939132940132941132942132943132944132945132946132947132948132949132950132951132952132953132954132955132956132957132958132959132960132961132962132963132964132965132966132967132968132969132970132971132972132973132974132975132976132977132978132979132980132981132982132983132984132985132986132987132988132989132990132991132992132993132994132995132996132997132998132999133000133001133002133003133004133005133006133007133008133009133010133011133012133013133014133015133016133017133018133019133020133021133022133023133024133025133026133027133028133029133030133031133032133033133034133035133036133037133038133039133040133041133042133043133044133045133046133047133048133049133050133051133052133053133054133055133056133057133058133059133060133061133062133063133064133065133066133067133068133069133070133071133072133073133074133075133076133077133078133079133080133081133082133083133084133085133086133087133088133089133090133091133092133093133094133095133096133097133098133099133100133101133102133103133104133105133106133107133108133109133110133111133112133113133114133115133116133117133118133119133120133121133122133123133124133125133126133127133128133129133130133131133132133133133134133135133136133137133138133139133140133141133142133143133144133145133146133147133148133149133150133151133152133153133154133155133156133157133158133159133160133161133162133163133164133165133166133167133168133169133170133171133172133173133174133175133176133177133178133179133180133181133182133183133184133185133186133187133188133189133190133191133192133193133194133195133196133197133198133199133200133201133202133203133204133205133206133207133208133209133210133211133212133213133214133215133216133217133218133219133220133221133222133223133224133225133226133227133228133229133230133231133232133233133234133235133236133237133238133239133240133241133242133243133244133245133246133247133248133249133250133251133252133253133254133255133256133257133258133259133260133261133262133263133264133265133266133267133268133269133270133271133272133273133274133275133276133277133278133279133280133281133282133283133284133285133286133287133288133289133290133291133292133293133294133295133296133297133298133299133300133301133302133303133304133305133306133307133308133309133310133311133312133313133314133315133316133317133318133319133320133321133322133323133324133325133326133327133328133329133330133331133332133333133334133335133336133337133338133339133340133341133342133343133344133345133346133347133348133349133350133351133352133353133354133355133356133357133358133359133360133361133362133363133364133365133366133367133368133369133370133371133372133373133374133375133376133377133378133379133380133381133382133383133384133385133386133387133388133389133390133391133392133393133394133395133396133397133398133399133400133401133402133403133404133405133406133407133408133409133410133411133412133413133414133415133416133417133418133419133420133421133422133423133424133425133426133427133428133429133430133431133432133433133434133435133436133437133438133439133440133441133442133443133444133445133446133447133448133449133450133451133452133453133454133455133456133457133458133459133460133461133462133463133464133465133466133467133468133469133470133471133472133473133474133475133476133477133478133479133480133481133482133483133484133485133486133487133488133489133490133491133492133493133494133495133496133497133498133499133500133501133502133503133504133505133506133507133508133509133510133511133512133513133514133515133516133517133518133519133520133521133522133523133524133525133526133527133528133529133530133531133532133533133534133535133536133537133538133539133540133541133542133543133544133545133546133547133548133549133550133551133552133553133554133555133556133557133558133559133560133561133562133563133564133565133566133567133568133569133570133571133572133573133574133575133576133577133578133579133580133581133582133583133584133585133586133587133588133589133590133591133592133593133594133595133596133597133598133599133600133601133602133603133604133605133606133607133608133609133610133611133612133613133614133615133616133617133618133619133620133621133622133623133624133625133626133627133628133629133630133631133632133633133634133635133636133637133638133639133640133641133642133643133644133645133646133647133648133649133650133651133652133653133654133655133656133657133658133659133660133661133662133663133664133665133666133667133668133669133670133671133672133673133674133675133676133677133678133679133680133681133682133683133684133685133686133687133688133689133690133691133692133693133694133695133696133697133698133699133700133701133702133703133704133705133706133707133708133709133710133711133712133713133714133715133716133717133718133719133720133721133722133723133724133725133726133727133728133729133730133731133732133733133734133735133736133737133738133739133740133741133742133743133744133745133746133747133748133749133750133751133752133753133754133755133756133757133758133759133760133761133762133763133764133765133766133767133768133769133770133771133772133773133774133775133776133777133778133779133780133781133782133783133784133785133786133787133788133789133790133791133792133793133794133795133796133797133798133799133800133801133802133803133804133805133806133807133808133809133810133811133812133813133814133815133816133817133818133819133820133821133822133823133824133825133826133827133828133829133830133831133832133833133834133835133836133837133838133839133840133841133842133843133844133845133846133847133848133849133850133851133852133853133854133855133856133857133858133859133860133861133862133863133864133865133866133867133868133869133870133871133872133873133874133875133876133877133878133879133880133881133882133883133884133885133886133887133888133889133890133891133892133893133894133895133896133897133898133899133900133901133902133903133904133905133906133907133908133909133910133911133912133913133914133915133916133917133918133919133920133921133922133923133924133925133926133927133928133929133930133931133932133933133934133935133936133937133938133939133940133941133942133943133944133945133946133947133948133949133950133951133952133953133954133955133956133957133958133959133960133961133962133963133964133965133966133967133968133969133970133971133972133973133974133975133976133977133978133979133980133981133982133983133984133985133986133987133988133989133990133991133992133993133994133995133996133997133998133999134000134001134002134003134004134005134006134007134008134009134010134011134012134013134014134015134016134017134018134019134020134021134022134023134024134025134026134027134028134029134030134031134032134033134034134035134036134037134038134039134040134041134042134043134044134045134046134047134048134049134050134051134052134053134054134055134056134057134058134059134060134061134062134063134064134065134066134067134068134069134070134071134072134073134074134075134076134077134078134079134080134081134082134083134084134085134086134087134088134089134090134091134092134093134094134095134096134097134098134099134100134101134102134103134104134105134106134107134108134109134110134111134112134113134114134115134116134117134118134119134120134121134122134123134124134125134126134127134128134129134130134131134132134133134134134135134136134137134138134139134140134141134142134143134144134145134146134147134148134149134150134151134152134153134154134155134156134157134158134159134160134161134162134163134164134165134166134167134168134169134170134171134172134173134174134175134176134177134178134179134180134181134182134183134184134185134186134187134188134189134190134191134192134193134194134195134196134197134198134199134200134201134202134203134204134205134206134207134208134209134210134211134212134213134214134215134216134217134218134219134220134221134222134223134224134225134226134227134228134229134230134231134232134233134234134235134236134237134238134239134240134241134242134243134244134245134246134247134248134249134250134251134252134253134254134255134256134257134258134259134260134261134262134263134264134265134266134267134268134269134270134271134272134273134274134275134276134277134278134279134280134281134282134283134284134285134286134287134288134289134290134291134292134293134294134295134296134297134298134299134300134301134302134303134304134305134306134307134308134309134310134311134312134313134314134315134316134317134318134319134320134321134322134323134324134325134326134327134328134329134330134331134332134333134334134335134336134337134338134339134340134341134342134343134344134345134346134347134348134349134350134351134352134353134354134355134356134357134358134359134360134361134362134363134364134365134366134367134368134369134370134371134372134373134374134375134376134377134378134379134380134381134382134383134384134385134386134387134388134389134390134391134392134393134394134395134396134397134398134399134400134401134402134403134404134405134406134407134408134409134410134411134412134413134414134415134416134417134418134419134420134421134422134423134424134425134426134427134428134429134430134431134432134433134434134435134436134437134438134439134440134441134442134443134444134445134446134447134448134449134450134451134452134453134454134455134456134457134458134459134460134461134462134463134464134465134466134467134468134469134470134471134472134473134474134475134476134477134478134479134480134481134482134483134484134485134486134487134488134489134490134491134492134493134494134495134496134497134498134499134500134501134502134503134504134505134506134507134508134509134510134511134512134513134514134515134516134517134518134519134520134521134522134523134524134525134526134527134528134529134530134531134532134533134534134535134536134537134538134539134540134541134542134543134544134545134546134547134548134549134550134551134552134553134554134555134556134557134558134559134560134561134562134563134564134565134566134567134568134569134570134571134572134573134574134575134576134577134578134579134580134581134582134583134584134585134586134587134588134589134590134591134592134593134594134595134596134597134598134599134600134601134602134603134604134605134606134607134608134609134610134611134612134613134614134615134616134617134618134619134620134621134622134623134624134625134626134627134628134629134630134631134632134633134634134635134636134637134638134639134640134641134642134643134644134645134646134647134648134649134650134651134652134653134654134655134656134657134658134659134660134661134662134663134664134665134666134667134668134669134670134671134672134673134674134675134676134677134678134679134680134681134682134683134684134685134686134687134688134689134690134691134692134693134694134695134696134697134698134699134700134701134702134703134704134705134706134707134708134709134710134711134712134713134714134715134716134717134718134719134720134721134722134723134724134725134726134727134728134729134730134731134732134733134734134735134736134737134738134739134740134741134742134743134744134745134746134747134748134749134750134751134752134753134754134755134756134757134758134759134760134761134762134763134764134765134766134767134768134769134770134771134772134773134774134775134776134777134778134779134780134781134782134783134784134785134786134787134788134789134790134791134792134793134794134795134796134797134798134799134800134801134802134803134804134805134806134807134808134809134810134811134812134813134814134815134816134817134818134819134820134821134822134823134824134825134826134827134828134829134830134831134832134833134834134835134836134837134838134839134840134841134842134843134844134845134846134847134848134849134850134851134852134853134854134855134856134857134858134859134860134861134862134863134864134865134866134867134868134869134870134871134872134873134874134875134876134877134878134879134880134881134882134883134884134885134886134887134888134889134890134891134892134893134894134895134896134897134898134899134900134901134902134903134904134905134906134907134908134909134910134911134912134913134914134915134916134917134918134919134920134921134922134923134924134925134926134927134928134929134930134931134932134933134934134935134936134937134938134939134940134941134942134943134944134945134946134947134948134949134950134951134952134953134954134955134956134957134958134959134960134961134962134963134964134965134966134967134968134969134970134971134972134973134974134975134976134977134978134979134980134981134982134983134984134985134986134987134988134989134990134991134992134993134994134995134996134997134998134999135000135001135002135003135004135005135006135007135008135009135010135011135012135013135014135015135016135017135018135019135020135021135022135023135024135025135026135027135028135029135030135031135032135033135034135035135036135037135038135039135040135041135042135043135044135045135046135047135048135049135050135051135052135053135054135055135056135057135058135059135060135061135062135063135064135065135066135067135068135069135070135071135072135073135074135075135076135077135078135079135080135081135082135083135084135085135086135087135088135089135090135091135092135093135094135095135096135097135098135099135100135101135102135103135104135105135106135107135108135109135110135111135112135113135114135115135116135117135118135119135120135121135122135123135124135125135126135127135128135129135130135131135132135133135134135135135136135137135138135139135140135141135142135143135144135145135146135147135148135149135150135151135152135153135154135155135156135157135158135159135160135161135162135163135164135165135166135167135168135169135170135171135172135173135174135175135176135177135178135179135180135181135182135183135184135185135186135187135188135189135190135191135192135193135194135195135196135197135198135199135200135201135202135203135204135205135206135207135208135209135210135211135212135213135214135215135216135217135218135219135220135221135222135223135224135225135226135227135228135229135230135231135232135233135234135235135236135237135238135239135240135241135242135243135244135245135246135247135248135249135250135251135252135253135254135255135256135257135258135259135260135261135262135263135264135265135266135267135268135269135270135271135272135273135274135275135276135277135278135279135280135281135282135283135284135285135286135287135288135289135290135291135292135293135294135295135296135297135298135299135300135301135302135303135304135305135306135307135308135309135310135311135312135313135314135315135316135317135318135319135320135321135322135323135324135325135326135327135328135329135330135331135332135333135334135335135336135337135338135339135340135341135342135343135344135345135346135347135348135349135350135351135352135353135354135355135356135357135358135359135360135361135362135363135364135365135366135367135368135369135370135371135372135373135374135375135376135377135378135379135380135381135382135383135384135385135386135387135388135389135390135391135392135393135394135395135396135397135398135399135400135401135402135403135404135405135406135407135408135409135410135411135412135413135414135415135416135417135418135419135420135421135422135423135424135425135426135427135428135429135430135431135432135433135434135435135436135437135438135439135440135441135442135443135444135445135446135447135448135449135450135451135452135453135454135455135456135457135458135459135460135461135462135463135464135465135466135467135468135469135470135471135472135473135474135475135476135477135478135479135480135481135482135483135484135485135486135487135488135489135490135491135492135493135494135495135496135497135498135499135500135501135502135503135504135505135506135507135508135509135510135511135512135513135514135515135516135517135518135519135520135521135522135523135524135525135526135527135528135529135530135531135532135533135534135535135536135537135538135539135540135541135542135543135544135545135546135547135548135549135550135551135552135553135554135555135556135557135558135559135560135561135562135563135564135565135566135567135568135569135570135571135572135573135574135575135576135577135578135579135580135581135582135583135584135585135586135587135588135589135590135591135592135593135594135595135596135597135598135599135600135601135602135603135604135605135606135607135608135609135610135611135612135613135614135615135616135617135618135619135620135621135622135623135624135625135626135627135628135629135630135631135632135633135634135635135636135637135638135639135640135641135642135643135644135645135646135647135648135649135650135651135652135653135654135655135656135657135658135659135660135661135662135663135664135665135666135667135668135669135670135671135672135673135674135675135676135677135678135679135680135681135682135683135684135685135686135687135688135689135690135691135692135693135694135695135696135697135698135699135700135701135702135703135704135705135706135707135708135709135710135711135712135713135714135715135716135717135718135719135720135721135722135723135724135725135726135727135728135729135730135731135732135733135734135735135736135737135738135739135740135741135742135743135744135745135746135747135748135749135750135751135752135753135754135755135756135757135758135759135760135761135762135763135764135765135766135767135768135769135770135771135772135773135774135775135776135777135778135779135780135781135782135783135784135785135786135787135788135789135790135791135792135793135794135795135796135797135798135799135800135801135802135803135804135805135806135807135808135809135810135811135812135813135814135815135816135817135818135819135820135821135822135823135824135825135826135827135828135829135830135831135832135833135834135835135836135837135838135839135840135841135842135843135844135845135846135847135848135849135850135851135852135853135854135855135856135857135858135859135860135861135862135863135864135865135866135867135868135869135870135871135872135873135874135875135876135877135878135879135880135881135882135883135884135885135886135887135888135889135890135891135892135893135894135895135896135897135898135899135900135901135902135903135904135905135906135907135908135909135910135911135912135913135914135915135916135917135918135919135920135921135922135923135924135925135926135927135928135929135930135931135932135933135934135935135936135937135938135939135940135941135942135943135944135945135946135947135948135949135950135951135952135953135954135955135956135957135958135959135960135961135962135963135964135965135966135967135968135969135970135971135972135973135974135975135976135977135978135979135980135981135982135983135984135985135986135987135988135989135990135991135992135993135994135995135996135997135998135999136000136001136002136003136004136005136006136007136008136009136010136011136012136013136014136015136016136017136018136019136020136021136022136023136024136025136026136027136028136029136030136031136032136033136034136035136036136037136038136039136040136041136042136043136044136045136046136047136048136049136050136051136052136053136054136055136056136057136058136059136060136061136062136063136064136065136066136067136068136069136070136071136072136073136074136075136076136077136078136079136080136081136082136083136084136085136086136087136088136089136090136091136092136093136094136095136096136097136098136099136100136101136102136103136104136105136106136107136108136109136110136111136112136113136114136115136116136117136118136119136120136121136122136123136124136125136126136127136128136129136130136131136132136133136134136135136136136137136138136139136140136141136142136143136144136145136146136147136148136149136150136151136152136153136154136155136156136157136158136159136160136161136162136163136164136165136166136167136168136169136170136171136172136173136174136175136176136177136178136179136180136181136182136183136184136185136186136187136188136189136190136191136192136193136194136195136196136197136198136199136200136201136202136203136204136205136206136207136208136209136210136211136212136213136214136215136216136217136218136219136220136221136222136223136224136225136226136227136228136229136230136231136232136233136234136235136236136237136238136239136240136241136242136243136244136245136246136247136248136249136250136251136252136253136254136255136256136257136258136259136260136261136262136263136264136265136266136267136268136269136270136271136272136273136274136275136276136277136278136279136280136281136282136283136284136285136286136287136288136289136290136291136292136293136294136295136296136297136298136299136300136301136302136303136304136305136306136307136308136309136310136311136312136313136314136315136316136317136318136319136320136321136322136323136324136325136326136327136328136329136330136331136332136333136334136335136336136337136338136339136340136341136342136343136344136345136346136347136348136349136350136351136352136353136354136355136356136357136358136359136360136361136362136363136364136365136366136367136368136369136370136371136372136373136374136375136376136377136378136379136380136381136382136383136384136385136386136387136388136389136390136391136392136393136394136395136396136397136398136399136400136401136402136403136404136405136406136407136408136409136410136411136412136413136414136415136416136417136418136419136420136421136422136423136424136425136426136427136428136429136430136431136432136433136434136435136436136437136438136439136440136441136442136443136444136445136446136447136448136449136450136451136452136453136454136455136456136457136458136459136460136461136462136463136464136465136466136467136468136469136470136471136472136473136474136475136476136477136478136479136480136481136482136483136484136485136486136487136488136489136490136491136492136493136494136495136496136497136498136499136500136501136502136503136504136505136506136507136508136509136510136511136512136513136514136515136516136517136518136519136520136521136522136523136524136525136526136527136528136529136530136531136532136533136534136535136536136537136538136539136540136541136542136543136544136545136546136547136548136549136550136551136552136553136554136555136556136557136558136559136560136561136562136563136564136565136566136567136568136569136570136571136572136573136574136575136576136577136578136579136580136581136582136583136584136585136586136587136588136589136590136591136592136593136594136595136596136597136598136599136600136601136602136603136604136605136606136607136608136609136610136611136612136613136614136615136616136617136618136619136620136621136622136623136624136625136626136627136628136629136630136631136632136633136634136635136636136637136638136639136640136641136642136643136644136645136646136647136648136649136650136651136652136653136654136655136656136657136658136659136660136661136662136663136664136665136666136667136668136669136670136671136672136673136674136675136676136677136678136679136680136681136682136683136684136685136686136687136688136689136690136691136692136693136694136695136696136697136698136699136700136701136702136703136704136705136706136707136708136709136710136711136712136713136714136715136716136717136718136719136720136721136722136723136724136725136726136727136728136729136730136731136732136733136734136735136736136737136738136739136740136741136742136743136744136745136746136747136748136749136750136751136752136753136754136755136756136757136758136759136760136761136762136763136764136765136766136767136768136769136770136771136772136773136774136775136776136777136778136779136780136781136782136783136784136785136786136787136788136789136790136791136792136793136794136795136796136797136798136799136800136801136802136803136804136805136806136807136808136809136810136811136812136813136814136815136816136817136818136819136820136821136822136823136824136825136826136827136828136829136830136831136832136833136834136835136836136837136838136839136840136841136842136843136844136845136846136847136848136849136850136851136852136853136854136855136856136857136858136859136860136861136862136863136864136865136866136867136868136869136870136871136872136873136874136875136876136877136878136879136880136881136882136883136884136885136886136887136888136889136890136891136892136893136894136895136896136897136898136899136900136901136902136903136904136905136906136907136908136909136910136911136912136913136914136915136916136917136918136919136920136921136922136923136924136925136926136927136928136929136930136931136932136933136934136935136936136937136938136939136940136941136942136943136944136945136946136947136948136949136950136951136952136953136954136955136956136957136958136959136960136961136962136963136964136965136966136967136968136969136970136971136972136973136974136975136976136977136978136979136980136981136982136983136984136985136986136987136988136989136990136991136992136993136994136995136996136997136998136999137000137001137002137003137004137005137006137007137008137009137010137011137012137013137014137015137016137017137018137019137020137021137022137023137024137025137026137027137028137029137030137031137032137033137034137035137036137037137038137039137040137041137042137043137044137045137046137047137048137049137050137051137052137053137054137055137056137057137058137059137060137061137062137063137064137065137066137067137068137069137070137071137072137073137074137075137076137077137078137079137080137081137082137083137084137085137086137087137088137089137090137091137092137093137094137095137096137097137098137099137100137101137102137103137104137105137106137107137108137109137110137111137112137113137114137115137116137117137118137119137120137121137122137123137124137125137126137127137128137129137130137131137132137133137134137135137136137137137138137139137140137141137142137143137144137145137146137147137148137149137150137151137152137153137154137155137156137157137158137159137160137161137162137163137164137165137166137167137168137169137170137171137172137173137174137175137176137177137178137179137180137181137182137183137184137185137186137187137188137189137190137191137192137193137194137195137196137197137198137199137200137201137202137203137204137205137206137207137208137209137210137211137212137213137214137215137216137217137218137219137220137221137222137223137224137225137226137227137228137229137230137231137232137233137234137235137236137237137238137239137240137241137242137243137244137245137246137247137248137249137250137251137252137253137254137255137256137257137258137259137260137261137262137263137264137265137266137267137268137269137270137271137272137273137274137275137276137277137278137279137280137281137282137283137284137285137286137287137288137289137290137291137292137293137294137295137296137297137298137299137300137301137302137303137304137305137306137307137308137309137310137311137312137313137314137315137316137317137318137319137320137321137322137323137324137325137326137327137328137329137330137331137332137333137334137335137336137337137338137339137340137341137342137343137344137345137346137347137348137349137350137351137352137353137354137355137356137357137358137359137360137361137362137363137364137365137366137367137368137369137370137371137372137373137374137375137376137377137378137379137380137381137382137383137384137385137386137387137388137389137390137391137392137393137394137395137396137397137398137399137400137401137402137403137404137405137406137407137408137409137410137411137412137413137414137415137416137417137418137419137420137421137422137423137424137425137426137427137428137429137430137431137432137433137434137435137436137437137438137439137440137441137442137443137444137445137446137447137448137449137450137451137452137453137454137455137456137457137458137459137460137461137462137463137464137465137466137467137468137469137470137471137472137473137474137475137476137477137478137479137480137481137482137483137484137485137486137487137488137489137490137491137492137493137494137495137496137497137498137499137500137501137502137503137504137505137506137507137508137509137510137511137512137513137514137515137516137517137518137519137520137521137522137523137524137525137526137527137528137529137530137531137532137533137534137535137536137537137538137539137540137541137542137543137544137545137546137547137548137549137550137551137552137553137554137555137556137557137558137559137560137561137562137563137564137565137566137567137568137569137570137571137572137573137574137575137576137577137578137579137580137581137582137583137584137585137586137587137588137589137590137591137592137593137594137595137596137597137598137599137600137601137602137603137604137605137606137607137608137609137610137611137612137613137614137615137616137617137618137619137620137621137622137623137624137625137626137627137628137629137630137631137632137633137634137635137636137637137638137639137640137641137642137643137644137645137646137647137648137649137650137651137652137653137654137655137656137657137658137659137660137661137662137663137664137665137666137667137668137669137670137671137672137673137674137675137676137677137678137679137680137681137682137683137684137685137686137687137688137689137690137691137692137693137694137695137696137697137698137699137700137701137702137703137704137705137706137707137708137709137710137711137712137713137714137715137716137717137718137719137720137721137722137723137724137725137726137727137728137729137730137731137732137733137734137735137736137737137738137739137740137741137742137743137744137745137746137747137748137749137750137751137752137753137754137755137756137757137758137759137760137761137762137763137764137765137766137767137768137769137770137771137772137773137774137775137776137777137778137779137780137781137782137783137784137785137786137787137788137789137790137791137792137793137794137795137796137797137798137799137800137801137802137803137804137805137806137807137808137809137810137811137812137813137814137815137816137817137818137819137820137821137822137823137824137825137826137827137828137829137830137831137832137833137834137835137836137837137838137839137840137841137842137843137844137845137846137847137848137849137850137851137852137853137854137855137856137857137858137859137860137861137862137863137864137865137866137867137868137869137870137871137872137873137874137875137876137877137878137879137880137881137882137883137884137885137886137887137888137889137890137891137892137893137894137895137896137897137898137899137900137901137902137903137904137905137906137907137908137909137910137911137912137913137914137915137916137917137918137919137920137921137922137923137924137925137926137927137928137929137930137931137932137933137934137935137936137937137938137939137940137941137942137943137944137945137946137947137948137949137950137951137952137953137954137955137956137957137958137959137960137961137962137963137964137965137966137967137968137969137970137971137972137973137974137975137976137977137978137979137980137981137982137983137984137985137986137987137988137989137990137991137992137993137994137995137996137997137998137999138000138001138002138003138004138005138006138007138008138009138010138011138012138013138014138015138016138017138018138019138020138021138022138023138024138025138026138027138028138029138030138031138032138033138034138035138036138037138038138039138040138041138042138043138044138045138046138047138048138049138050138051138052138053138054138055138056138057138058138059138060138061138062138063138064138065138066138067138068138069138070138071138072138073138074138075138076138077138078138079138080138081138082138083138084138085138086138087138088138089138090138091138092138093138094138095138096138097138098138099138100138101138102138103138104138105138106138107138108138109138110138111138112138113138114138115138116138117138118138119138120138121138122138123138124138125138126138127138128138129138130138131138132138133138134138135138136138137138138138139138140138141138142138143138144138145138146138147138148138149138150138151138152138153138154138155138156138157138158138159138160138161138162138163138164138165138166138167138168138169138170138171138172138173138174138175138176138177138178138179138180138181138182138183138184138185138186138187138188138189138190138191138192138193138194138195138196138197138198138199138200138201138202138203138204138205138206138207138208138209138210138211138212138213138214138215138216138217138218138219138220138221138222138223138224138225138226138227138228138229138230138231138232138233138234138235138236138237138238138239138240138241138242138243138244138245138246138247138248138249138250138251138252138253138254138255138256138257138258138259138260138261138262138263138264138265138266138267138268138269138270138271138272138273138274138275138276138277138278138279138280138281138282138283138284138285138286138287138288138289138290138291138292138293138294138295138296138297138298138299138300138301138302138303138304138305138306138307138308138309138310138311138312138313138314138315138316138317138318138319138320138321138322138323138324138325138326138327138328138329138330138331138332138333138334138335138336138337138338138339138340138341138342138343138344138345138346138347138348138349138350138351138352138353138354138355138356138357138358138359138360138361138362138363138364138365138366138367138368138369138370138371138372138373138374138375138376138377138378138379138380138381138382138383138384138385138386138387138388138389138390138391138392138393138394138395138396138397138398138399138400138401138402138403138404138405138406138407138408138409138410138411138412138413138414138415138416138417138418138419138420138421138422138423138424138425138426138427138428138429138430138431138432138433138434138435138436138437138438138439138440138441138442138443138444138445138446138447138448138449138450138451138452138453138454138455138456138457138458138459138460138461138462138463138464138465138466138467138468138469138470138471138472138473138474138475138476138477138478138479138480138481138482138483138484138485138486138487138488138489138490138491138492138493138494138495138496138497138498138499138500138501138502138503138504138505138506138507138508138509138510138511138512138513138514138515138516138517138518138519138520138521138522138523138524138525138526138527138528138529138530138531138532138533138534138535138536138537138538138539138540138541138542138543138544138545138546138547138548138549138550138551138552138553138554138555138556138557138558138559138560138561138562138563138564138565138566138567138568138569138570138571138572138573138574138575138576138577138578138579138580138581138582138583138584138585138586138587138588138589138590138591138592138593138594138595138596138597138598138599138600138601138602138603138604138605138606138607138608138609138610138611138612138613138614138615138616138617138618138619138620138621138622138623138624138625138626138627138628138629138630138631138632138633138634138635138636138637138638138639138640138641138642138643138644138645138646138647138648138649138650138651138652138653138654138655138656138657138658138659138660138661138662138663138664138665138666138667138668138669138670138671138672138673138674138675138676138677138678138679138680138681138682138683138684138685138686138687138688138689138690138691138692138693138694138695138696138697138698138699138700138701138702138703138704138705138706138707138708138709138710138711138712138713138714138715138716138717138718138719138720138721138722138723138724138725138726138727138728138729138730138731138732138733138734138735138736138737138738138739138740138741138742138743138744138745138746138747138748138749138750138751138752138753138754138755138756138757138758138759138760138761138762138763138764138765138766138767138768138769138770138771138772138773138774138775138776138777138778138779138780138781138782138783138784138785138786138787138788138789138790138791138792138793138794138795138796138797138798138799138800138801138802138803138804138805138806138807138808138809138810138811138812138813138814138815138816138817138818138819138820138821138822138823138824138825138826138827138828138829138830138831138832138833138834138835138836138837138838138839138840138841138842138843138844138845138846138847138848138849138850138851138852138853138854138855138856138857138858138859138860138861138862138863138864138865138866138867138868138869138870138871138872138873138874138875138876138877138878138879138880138881138882138883138884138885138886138887138888138889138890138891138892138893138894138895138896138897138898138899138900138901138902138903138904138905138906138907138908138909138910138911138912138913138914138915138916138917138918138919138920138921138922138923138924138925138926138927138928138929138930138931138932138933138934138935138936138937138938138939138940138941138942138943138944138945138946138947138948138949138950138951138952138953138954138955138956138957138958138959138960138961138962138963138964138965138966138967138968138969138970138971138972138973138974138975138976138977138978138979138980138981138982138983138984138985138986138987138988138989138990138991138992138993138994138995138996138997138998138999139000139001139002139003139004139005139006139007139008139009139010139011139012139013139014139015139016139017139018139019139020139021139022139023139024139025139026139027139028139029139030139031139032139033139034139035139036139037139038139039139040139041139042139043139044139045139046139047139048139049139050139051139052139053139054139055139056139057139058139059139060139061139062139063139064139065139066139067139068139069139070139071139072139073139074139075139076139077139078139079139080139081139082139083139084139085139086139087139088139089139090139091139092139093139094139095139096139097139098139099139100139101139102139103139104139105139106139107139108139109139110139111139112139113139114139115139116139117139118139119139120139121139122139123139124139125139126139127139128139129139130139131139132139133139134139135139136139137139138139139139140139141139142139143139144139145139146139147139148139149139150139151139152139153139154139155139156139157139158139159139160139161139162139163139164139165139166139167139168139169139170139171139172139173139174139175139176139177139178139179139180139181139182139183139184139185139186139187139188139189139190139191139192139193139194139195139196139197139198139199139200139201139202139203139204139205139206139207139208139209139210139211139212139213139214139215139216139217139218139219139220139221139222139223139224139225139226139227139228139229139230139231139232139233139234139235139236139237139238139239139240139241139242139243139244139245139246139247139248139249139250139251139252139253139254139255139256139257139258139259139260139261139262139263139264139265139266139267139268139269139270139271139272139273139274139275139276139277139278139279139280139281139282139283139284139285139286139287139288139289139290139291139292139293139294139295139296139297139298139299139300139301139302139303139304139305139306139307139308139309139310139311139312139313139314139315139316139317139318139319139320139321139322139323139324139325139326139327139328139329139330139331139332139333139334139335139336139337139338139339139340139341139342139343139344139345139346139347139348139349139350139351139352139353139354139355139356139357139358139359139360139361139362139363139364139365139366139367139368139369139370139371139372139373139374139375139376139377139378139379139380139381139382139383139384139385139386139387139388139389139390139391139392139393139394139395139396139397139398139399139400139401139402139403139404139405139406139407139408139409139410139411139412139413139414139415139416139417139418139419139420139421139422139423139424139425139426139427139428139429139430139431139432139433139434139435139436139437139438139439139440139441139442139443139444139445139446139447139448139449139450139451139452139453139454139455139456139457139458139459139460139461139462139463139464139465139466139467139468139469139470139471139472139473139474139475139476139477139478139479139480139481139482139483139484139485139486139487139488139489139490139491139492139493139494139495139496139497139498139499139500139501139502139503139504139505139506139507139508139509139510139511139512139513139514139515139516139517139518139519139520139521139522139523139524139525139526139527139528139529139530139531139532139533139534139535139536139537139538139539139540139541139542139543139544139545139546139547139548139549139550139551139552139553139554139555139556139557139558139559139560139561139562139563139564139565139566139567139568139569139570139571139572139573139574139575139576139577139578139579139580139581139582139583139584139585139586139587139588139589139590139591139592139593139594139595139596139597139598139599139600139601139602139603139604139605139606139607139608139609139610139611139612139613139614139615139616139617139618139619139620139621139622139623139624139625139626139627139628139629139630139631139632139633139634139635139636139637139638139639139640139641139642139643139644139645139646139647139648139649139650139651139652139653139654139655139656139657139658139659139660139661139662139663139664139665139666139667139668139669139670139671139672139673139674139675139676139677139678139679139680139681139682139683139684139685139686139687139688139689139690139691139692139693139694139695139696139697139698139699139700139701139702139703139704139705139706139707139708139709139710139711139712139713139714139715139716139717139718139719139720139721139722139723139724139725139726139727139728139729139730139731139732139733139734139735139736139737139738139739139740139741139742139743139744139745139746139747139748139749139750139751139752139753139754139755139756139757139758139759139760139761139762139763139764139765139766139767139768139769139770139771139772139773139774139775139776139777139778139779139780139781139782139783139784139785139786139787139788139789139790139791139792139793139794139795139796139797139798139799139800139801139802139803139804139805139806139807139808139809139810139811139812139813139814139815139816139817139818139819139820139821139822139823139824139825139826139827139828139829139830139831139832139833139834139835139836139837139838139839139840139841139842139843139844139845139846139847139848139849139850139851139852139853139854139855139856139857139858139859139860139861139862139863139864139865139866139867139868139869139870139871139872139873139874139875139876139877139878139879139880139881139882139883139884139885139886139887139888139889139890139891139892139893139894139895139896139897139898139899139900139901139902139903139904139905139906139907139908139909139910139911139912139913139914139915139916139917139918139919139920139921139922139923139924139925139926139927139928139929139930139931139932139933139934139935139936139937139938139939139940139941139942139943139944139945139946139947139948139949139950139951139952139953139954139955139956139957139958139959139960139961139962139963139964139965139966139967139968139969139970139971139972139973139974139975139976139977139978139979139980139981139982139983139984139985139986139987139988139989139990139991139992139993139994139995139996139997139998139999140000140001140002140003140004140005140006140007140008140009140010140011140012140013140014140015140016140017140018140019140020140021140022140023140024140025140026140027140028140029140030140031140032140033140034140035140036140037140038140039140040140041140042140043140044140045140046140047140048140049140050140051140052140053140054140055140056140057140058140059140060140061140062140063140064140065140066140067140068140069140070140071140072140073140074140075140076140077140078140079140080140081140082140083140084140085140086140087140088140089140090140091140092140093140094140095140096140097140098140099140100140101140102140103140104140105140106140107140108140109140110140111140112140113140114140115140116140117140118140119140120140121140122140123140124140125140126140127140128140129140130140131140132140133140134140135140136140137140138140139140140140141140142140143140144140145140146140147140148140149140150140151140152140153140154140155140156140157140158140159140160140161140162140163140164140165140166140167140168140169140170140171140172140173140174140175140176140177140178140179140180140181140182140183140184140185140186140187140188140189140190140191140192140193140194140195140196140197140198140199140200140201140202140203140204140205140206140207140208140209140210140211140212140213140214140215140216140217140218140219140220140221140222140223140224140225140226140227140228140229140230140231140232140233140234140235140236140237140238140239140240140241140242140243140244140245140246140247140248140249140250140251140252140253140254140255140256140257140258140259140260140261140262140263140264140265140266140267140268140269140270140271140272140273140274140275140276140277140278140279140280140281140282140283140284140285140286140287140288140289140290140291140292140293140294140295140296140297140298140299140300140301140302140303140304140305140306140307140308140309140310140311140312140313140314140315140316140317140318140319140320140321140322140323140324140325140326140327140328140329140330140331140332140333140334140335140336140337140338140339140340140341140342140343140344140345140346140347140348140349140350140351140352140353140354140355140356140357140358140359140360140361140362140363140364140365140366140367140368140369140370140371140372140373140374140375140376140377140378140379140380140381140382140383140384140385140386140387140388140389140390140391140392140393140394140395140396140397140398140399140400140401140402140403140404140405140406140407140408140409140410140411140412140413140414140415140416140417140418140419140420140421140422140423140424140425140426140427140428140429140430140431140432140433140434140435140436140437140438140439140440140441140442140443140444140445140446140447140448140449140450140451140452140453140454140455140456140457140458140459140460140461140462140463140464140465140466140467140468140469140470140471140472140473140474140475140476140477140478140479140480140481140482140483140484140485140486140487140488140489140490140491140492140493140494140495140496140497140498140499140500140501140502140503140504140505140506140507140508140509140510140511140512140513140514140515140516140517140518140519140520140521140522140523140524140525140526140527140528140529140530140531140532140533140534140535140536140537140538140539140540140541140542140543140544140545140546140547140548140549140550140551140552140553140554140555140556140557140558140559140560140561140562140563140564140565140566140567140568140569140570140571140572140573140574140575140576140577140578140579140580140581140582140583140584140585140586140587140588140589140590140591140592140593140594140595140596140597140598140599140600140601140602140603140604140605140606140607140608140609140610140611140612140613140614140615140616140617140618140619140620140621140622140623140624140625140626140627140628140629140630140631140632140633140634140635140636140637140638140639140640140641140642140643140644140645140646140647140648140649140650140651140652140653140654140655140656140657140658140659140660140661140662140663140664140665140666140667140668140669140670140671140672140673140674140675140676140677140678140679140680140681140682140683140684140685140686140687140688140689140690140691140692140693140694140695140696140697140698140699140700140701140702140703140704140705140706140707140708140709140710140711140712140713140714140715140716140717140718140719140720140721140722140723140724140725140726140727140728140729140730140731140732140733140734140735140736140737140738140739140740140741140742140743140744140745140746140747140748140749140750140751140752140753140754140755140756140757140758140759140760140761140762140763140764140765140766140767140768140769140770140771140772140773140774140775140776140777140778140779140780140781140782140783140784140785140786140787140788140789140790140791140792140793140794140795140796140797140798140799140800140801140802140803140804140805140806140807140808140809140810140811140812140813140814140815140816140817140818140819140820140821140822140823140824140825140826140827140828140829140830140831140832140833140834140835140836140837140838140839140840140841140842140843140844140845140846140847140848140849140850140851140852140853140854140855140856140857140858140859140860140861140862140863140864140865140866140867140868140869140870140871140872140873140874140875140876140877140878140879140880140881140882140883140884140885140886140887140888140889140890140891140892140893140894140895140896140897140898140899140900140901140902140903140904140905140906140907140908140909140910140911140912140913140914140915140916140917140918140919140920140921140922140923140924140925140926140927140928140929140930140931140932140933140934140935140936140937140938140939140940140941140942140943140944140945140946140947140948140949140950140951140952140953140954140955140956140957140958140959140960140961140962140963140964140965140966140967140968140969140970140971140972140973140974140975140976140977140978140979140980140981140982140983140984140985140986140987140988140989140990140991140992140993140994140995140996140997140998140999141000141001141002141003141004141005141006141007141008141009141010141011141012141013141014141015141016141017141018141019141020141021141022141023141024141025141026141027141028141029141030141031141032141033141034141035141036141037141038141039141040141041141042141043141044141045141046141047141048141049141050141051141052141053141054141055141056141057141058141059141060141061141062141063141064141065141066141067141068141069141070141071141072141073141074141075141076141077141078141079141080141081141082141083141084141085141086141087141088141089141090141091141092141093141094141095141096141097141098141099141100141101141102141103141104141105141106141107141108141109141110141111141112141113141114141115141116141117141118141119141120141121141122141123141124141125141126141127141128141129141130141131141132141133141134141135141136141137141138141139141140141141141142141143141144141145141146141147141148141149141150141151141152141153141154141155141156141157141158141159141160141161141162141163141164141165141166141167141168141169141170141171141172141173141174141175141176141177141178141179141180141181141182141183141184141185141186141187141188141189141190141191141192141193141194141195141196141197141198141199141200141201141202141203141204141205141206141207141208141209141210141211141212141213141214141215141216141217141218141219141220141221141222141223141224141225141226141227141228141229141230141231141232141233141234141235141236141237141238141239141240141241141242141243141244141245141246141247141248141249141250141251141252141253141254141255141256141257141258141259141260141261141262141263141264141265141266141267141268141269141270141271141272141273141274141275141276141277141278141279141280141281141282141283141284141285141286141287141288141289141290141291141292141293141294141295141296141297141298141299141300141301141302141303141304141305141306141307141308141309141310141311141312141313141314141315141316141317141318141319141320141321141322141323141324141325141326141327141328141329141330141331141332141333141334141335141336141337141338141339141340141341141342141343141344141345141346141347141348141349141350141351141352141353141354141355141356141357141358141359141360141361141362141363141364141365141366141367141368141369141370141371141372141373141374141375141376141377141378141379141380141381141382141383141384141385141386141387141388141389141390141391141392141393141394141395141396141397141398141399141400141401141402141403141404141405141406141407141408141409141410141411141412141413141414141415141416141417141418141419141420141421141422141423141424141425141426141427141428141429141430141431141432141433141434141435141436141437141438141439141440141441141442141443141444141445141446141447141448141449141450141451141452141453141454141455141456141457141458141459141460141461141462141463141464141465141466141467141468141469141470141471141472141473141474141475141476141477141478141479141480141481141482141483141484141485141486141487141488141489141490141491141492141493141494141495141496141497141498141499141500141501141502141503141504141505141506141507141508141509141510141511141512141513141514141515141516141517141518141519141520141521141522141523141524141525141526141527141528141529141530141531141532141533141534141535141536141537141538141539141540141541141542141543141544141545141546141547141548141549141550141551141552141553141554141555141556141557141558141559141560141561141562141563141564141565141566141567141568141569141570141571141572141573141574141575141576141577141578141579141580141581141582141583141584141585141586141587141588141589141590141591141592141593141594141595141596141597141598141599141600141601141602141603141604141605141606141607141608141609141610141611141612141613141614141615141616141617141618141619141620141621141622141623141624141625141626141627141628141629141630141631141632141633141634141635141636141637141638141639141640141641141642141643141644141645141646141647141648141649141650141651141652141653141654141655141656141657141658141659141660141661141662141663141664141665141666141667141668141669141670141671141672141673141674141675141676141677141678141679141680141681141682141683141684141685141686141687141688141689141690141691141692141693141694141695141696141697141698141699141700141701141702141703141704141705141706141707141708141709141710141711141712141713141714141715141716141717141718141719141720141721141722141723141724141725141726141727141728141729141730141731141732141733141734141735141736141737141738141739141740141741141742141743141744141745141746141747141748141749141750141751141752141753141754141755141756141757141758141759141760141761141762141763141764141765141766141767141768141769141770141771141772141773141774141775141776141777141778141779141780141781141782141783141784141785141786141787141788141789141790141791141792141793141794141795141796141797141798141799141800141801141802141803141804141805141806141807141808141809141810141811141812141813141814141815141816141817141818141819141820141821141822141823141824141825141826141827141828141829141830141831141832141833141834141835141836141837141838141839141840141841141842141843141844141845141846141847141848141849141850141851141852141853141854141855141856141857141858141859141860141861141862141863141864141865141866141867141868141869141870141871141872141873141874141875141876141877141878141879141880141881141882141883141884141885141886141887141888141889141890141891141892141893141894141895141896141897141898141899141900141901141902141903141904141905141906141907141908141909141910141911141912141913141914141915141916141917141918141919141920141921141922141923141924141925141926141927141928141929141930141931141932141933141934141935141936141937141938141939141940141941141942141943141944141945141946141947141948141949141950141951141952141953141954141955141956141957141958141959141960141961141962141963141964141965141966141967141968141969141970141971141972141973141974141975141976141977141978141979141980141981141982141983141984141985141986141987141988141989141990141991141992141993141994141995141996141997141998141999142000142001142002142003142004142005142006142007142008142009142010142011142012142013142014142015142016142017142018142019142020142021142022142023142024142025142026142027142028142029142030142031142032142033142034142035142036142037142038142039142040142041142042142043142044142045142046142047142048142049142050142051142052142053142054142055142056142057142058142059142060142061142062142063142064142065142066142067142068142069142070142071142072142073142074142075142076142077142078142079142080142081142082142083142084142085142086142087142088142089142090142091142092142093142094142095142096142097142098142099142100142101142102142103142104142105142106142107142108142109142110142111142112142113142114142115142116142117142118142119142120142121142122142123142124142125142126142127142128142129142130142131142132142133142134142135142136142137142138142139142140142141142142142143142144142145142146142147142148142149142150142151142152142153142154142155142156142157142158142159142160142161142162142163142164142165142166142167142168142169142170142171142172142173142174142175142176142177142178142179142180142181142182142183142184142185142186142187142188142189142190142191142192142193142194142195142196142197142198142199142200142201142202142203142204142205142206142207142208142209142210142211142212142213142214142215142216142217142218142219142220142221142222142223142224142225142226142227142228142229142230142231142232142233142234142235142236142237142238142239142240142241142242142243142244142245142246142247142248142249142250142251142252142253142254142255142256142257142258142259142260142261142262142263142264142265142266142267142268142269142270142271142272142273142274142275142276142277142278142279142280142281142282142283142284142285142286142287142288142289142290142291142292142293142294142295142296142297142298142299142300142301142302142303142304142305142306142307142308142309142310142311142312142313142314142315142316142317142318142319142320142321142322142323142324142325142326142327142328142329142330142331142332142333142334142335142336142337142338142339142340142341142342142343142344142345142346142347142348142349142350142351142352142353142354142355142356142357142358142359142360142361142362142363142364142365142366142367142368142369142370142371142372142373142374142375142376142377142378142379142380142381142382142383142384142385142386142387142388142389142390142391142392142393142394142395142396142397142398142399142400142401142402142403142404142405142406142407142408142409142410142411142412142413142414142415142416142417142418142419142420142421142422142423142424142425142426142427142428142429142430142431142432142433142434142435142436142437142438142439142440142441142442142443142444142445142446142447142448142449142450142451142452142453142454142455142456142457142458142459142460142461142462142463142464142465142466142467142468142469142470142471142472142473142474142475142476142477142478142479142480142481142482142483142484142485142486142487142488142489142490142491142492142493142494142495142496142497142498142499142500142501142502142503142504142505142506142507142508142509142510142511142512142513142514142515142516142517142518142519142520142521142522142523142524142525142526142527142528142529142530142531142532142533142534142535142536142537142538142539142540142541142542142543142544142545142546142547142548142549142550142551142552142553142554142555142556142557142558142559142560142561142562142563142564142565142566142567142568142569142570142571142572142573142574142575142576142577142578142579142580142581142582142583142584142585142586142587142588142589142590142591142592142593142594142595142596142597142598142599142600142601142602142603142604142605142606142607142608142609142610142611142612142613142614142615142616142617142618142619142620142621142622142623142624142625142626142627142628142629142630142631142632142633142634142635142636142637142638142639142640142641142642142643142644142645142646142647142648142649142650142651142652142653142654142655142656142657142658142659142660142661142662142663142664142665142666142667142668142669142670142671142672142673142674142675142676142677142678142679142680142681142682142683142684142685142686142687142688142689142690142691142692142693142694142695142696142697142698142699142700142701142702142703142704142705142706142707142708142709142710142711142712142713142714142715142716142717142718142719142720142721142722142723142724142725142726142727142728142729142730142731142732142733142734142735142736142737142738142739142740142741142742142743142744142745142746142747142748142749142750142751142752142753142754142755142756142757142758142759142760142761142762142763142764142765142766142767142768142769142770142771142772142773142774142775142776142777142778142779142780142781142782142783142784142785142786142787142788142789142790142791142792142793142794142795142796142797142798142799142800142801142802142803142804142805142806142807142808142809142810142811142812142813142814142815142816142817142818142819142820142821142822142823142824142825142826142827142828142829142830142831142832142833142834142835142836142837142838142839142840142841142842142843142844142845142846142847142848142849142850142851142852142853142854142855142856142857142858142859142860142861142862142863142864142865142866142867142868142869142870142871142872142873142874142875142876142877142878142879142880142881142882142883142884142885142886142887142888142889142890142891142892142893142894142895142896142897142898142899142900142901142902142903142904142905142906142907142908142909142910142911142912142913142914142915142916142917142918142919142920142921142922142923142924142925142926142927142928142929142930142931142932142933142934142935142936142937142938142939142940142941142942142943142944142945142946142947142948142949142950142951142952142953142954142955142956142957142958142959142960142961142962142963142964142965142966142967142968142969142970142971142972142973142974142975142976142977142978142979142980142981142982142983142984142985142986142987142988142989142990142991142992142993142994142995142996142997142998142999143000143001143002143003143004143005143006143007143008143009143010143011143012143013143014143015143016143017143018143019143020143021143022143023143024143025143026143027143028143029143030143031143032143033143034143035143036143037143038143039143040143041143042143043143044143045143046143047143048143049143050143051143052143053143054143055143056143057143058143059143060143061143062143063143064143065143066143067143068143069143070143071143072143073143074143075143076143077143078143079143080143081143082143083143084143085143086143087143088143089143090143091143092143093143094143095143096143097143098143099143100143101143102143103143104143105143106143107143108143109143110143111143112143113143114143115143116143117143118143119143120143121143122143123143124143125143126143127143128143129143130143131143132143133143134143135143136143137143138143139143140143141143142143143143144143145143146143147143148143149143150143151143152143153143154143155143156143157143158143159143160143161143162143163143164143165143166143167143168143169143170143171143172143173143174143175143176143177143178143179143180143181143182143183143184143185143186143187143188143189143190143191143192143193143194143195143196143197143198143199143200143201143202143203143204143205143206143207143208143209143210143211143212143213143214143215143216143217143218143219143220143221143222143223143224143225143226143227143228143229143230143231143232143233143234143235143236143237143238143239143240143241143242143243143244143245143246143247143248143249143250143251143252143253143254143255143256143257143258143259143260143261143262143263143264143265143266143267143268143269143270143271143272143273143274143275143276143277143278143279143280143281143282143283143284143285143286143287143288143289143290143291143292143293143294143295143296143297143298143299143300143301143302143303143304143305143306143307143308143309143310143311143312143313143314143315143316143317143318143319143320143321143322143323143324143325143326143327143328143329143330143331143332143333143334143335143336143337143338143339143340143341143342143343143344143345143346143347143348143349143350143351143352143353143354143355143356143357143358143359143360143361143362143363143364143365143366143367143368143369143370143371143372143373143374143375143376143377143378143379143380143381143382143383143384143385143386143387143388143389143390143391143392143393143394143395143396143397143398143399143400143401143402143403143404143405143406143407143408143409143410143411143412143413143414143415143416143417143418143419143420143421143422143423143424143425143426143427143428143429143430143431143432143433143434143435143436143437143438143439143440143441143442143443143444143445143446143447143448143449143450143451143452143453143454143455143456143457143458143459143460143461143462143463143464143465143466143467143468143469143470143471143472143473143474143475143476143477143478143479143480143481143482143483143484143485143486143487143488143489143490143491143492143493143494143495143496143497143498143499143500143501143502143503143504143505143506143507143508143509143510143511143512143513143514143515143516143517143518143519143520143521143522143523143524143525143526143527143528143529143530143531143532143533143534143535143536143537143538143539143540143541143542143543143544143545143546143547143548143549143550143551143552143553143554143555143556143557143558143559143560143561143562143563143564143565143566143567143568143569143570143571143572143573143574143575143576143577143578143579143580143581143582143583143584143585143586143587143588143589143590143591143592143593143594143595143596143597143598143599143600143601143602143603143604143605143606143607143608143609143610143611143612143613143614143615143616143617143618143619143620143621143622143623143624143625143626143627143628143629143630143631143632143633143634143635143636143637143638143639143640143641143642143643143644143645143646143647143648143649143650143651143652143653143654143655143656143657143658143659143660143661143662143663143664143665143666143667143668143669143670143671143672143673143674143675143676143677143678143679143680143681143682143683143684143685143686143687143688143689143690143691143692143693143694143695143696143697143698143699143700143701143702143703143704143705143706143707143708143709143710143711143712143713143714143715143716143717143718143719143720143721143722143723143724143725143726143727143728143729143730143731143732143733143734143735143736143737143738143739143740143741143742143743143744143745143746143747143748143749143750143751143752143753143754143755143756143757143758143759143760143761143762143763143764143765143766143767143768143769143770143771143772143773143774143775143776143777143778143779143780143781143782143783143784143785143786143787143788143789143790143791143792143793143794143795143796143797143798143799143800143801143802143803143804143805143806143807143808143809143810143811143812143813143814143815143816143817143818143819143820143821143822143823143824143825143826143827143828143829143830143831143832143833143834143835143836143837143838143839143840143841143842143843143844143845143846143847143848143849143850143851143852143853143854143855143856143857143858143859143860143861143862143863143864143865143866143867143868143869143870143871143872143873143874143875143876143877143878143879143880143881143882143883143884143885143886143887143888143889143890143891143892143893143894143895143896143897143898143899143900143901143902143903143904143905143906143907143908143909143910143911143912143913143914143915143916143917143918143919143920143921143922143923143924143925143926143927143928143929143930143931143932143933143934143935143936143937143938143939143940143941143942143943143944143945143946143947143948143949143950143951143952143953143954143955143956143957143958143959143960143961143962143963143964143965143966143967143968143969143970143971143972143973143974143975143976143977143978143979143980143981143982143983143984143985143986143987143988143989143990143991143992143993143994143995143996143997143998143999144000144001144002144003144004144005144006144007144008144009144010144011144012144013144014144015144016144017144018144019144020144021144022144023144024144025144026144027144028144029144030144031144032144033144034144035144036144037144038144039144040144041144042144043144044144045144046144047144048144049144050144051144052144053144054144055144056144057144058144059144060144061144062144063144064144065144066144067144068144069144070144071144072144073144074144075144076144077144078144079144080144081144082144083144084144085144086144087144088144089144090144091144092144093144094144095144096144097144098144099144100144101144102144103144104144105144106144107144108144109144110144111144112144113144114144115144116144117144118144119144120144121144122144123144124144125144126144127144128144129144130144131144132144133144134144135144136144137144138144139144140144141144142144143144144144145144146144147144148144149144150144151144152144153144154144155144156144157144158144159144160144161144162144163144164144165144166144167144168144169144170144171144172144173144174144175144176144177144178144179144180144181144182144183144184144185144186144187144188144189144190144191144192144193144194144195144196144197144198144199144200144201144202144203144204144205144206144207144208144209144210144211144212144213144214144215144216144217144218144219144220144221144222144223144224144225144226144227144228144229144230144231144232144233144234144235144236144237144238144239144240144241144242144243144244144245144246144247144248144249144250144251144252144253144254144255144256144257144258144259144260144261144262144263144264144265144266144267144268144269144270144271144272144273144274144275144276144277144278144279144280144281144282144283144284144285144286144287144288144289144290144291144292144293144294144295144296144297144298144299144300144301144302144303144304144305144306144307144308144309144310144311144312144313144314144315144316144317144318144319144320144321144322144323144324144325144326144327144328144329144330144331144332144333144334144335144336144337144338144339144340144341144342144343144344144345144346144347144348144349144350144351144352144353144354144355144356144357144358144359144360144361144362144363144364144365144366144367144368144369144370144371144372144373144374144375144376144377144378144379144380144381144382144383144384144385144386144387144388144389144390144391144392144393144394144395144396144397144398144399144400144401144402144403144404144405144406144407144408144409144410144411144412144413144414144415144416144417144418144419144420144421144422144423144424144425144426144427144428144429144430144431144432144433144434144435144436144437144438144439144440144441144442144443144444144445144446144447144448144449144450144451144452144453144454144455144456144457144458144459144460144461144462144463144464144465144466144467144468144469144470144471144472144473144474144475144476144477144478144479144480144481144482144483144484144485144486144487144488144489144490144491144492144493144494144495144496144497144498144499144500144501144502144503144504144505144506144507144508144509144510144511144512144513144514144515144516144517144518144519144520144521144522144523144524144525144526144527144528144529144530144531144532144533144534144535144536144537144538144539144540144541144542144543144544144545144546144547144548144549144550144551144552144553144554144555144556144557144558144559144560144561144562144563144564144565144566144567144568144569144570144571144572144573144574144575144576144577144578144579144580144581144582144583144584144585144586144587144588144589144590144591144592144593144594144595144596144597144598144599144600144601144602144603144604144605144606144607144608144609144610144611144612144613144614144615144616144617144618144619144620144621144622144623144624144625144626144627144628144629144630144631144632144633144634144635144636144637144638144639144640144641144642144643144644144645144646144647144648144649144650144651144652144653144654144655144656144657144658144659144660144661144662144663144664144665144666144667144668144669144670144671144672144673144674144675144676144677144678144679144680144681144682144683144684144685144686144687144688144689144690144691144692144693144694144695144696144697144698144699144700144701144702144703144704144705144706144707144708144709144710144711144712144713144714144715144716144717144718144719144720144721144722144723144724144725144726144727144728144729144730144731144732144733144734144735144736144737144738144739144740144741144742144743144744144745144746144747144748144749144750144751144752144753144754144755144756144757144758144759144760144761144762144763144764144765144766144767144768144769144770144771144772144773144774144775144776144777144778144779144780144781144782144783144784144785144786144787144788144789144790144791144792144793144794144795144796144797144798144799144800144801144802144803144804144805144806144807144808144809144810144811144812144813144814144815144816144817144818144819144820144821144822144823144824144825144826144827144828144829144830144831144832144833144834144835144836144837144838144839144840144841144842144843144844144845144846144847144848144849144850144851144852144853144854144855144856144857144858144859144860144861144862144863144864144865144866144867144868144869144870144871144872144873144874144875144876144877144878144879144880144881144882144883144884144885144886144887144888144889144890144891144892144893144894144895144896144897144898144899144900144901144902144903144904144905144906144907144908144909144910144911144912144913144914144915144916144917144918144919144920144921144922144923144924144925144926144927144928144929144930144931144932144933144934144935144936144937144938144939144940144941144942144943144944144945144946144947144948144949144950144951144952144953144954144955144956144957144958144959144960144961144962144963144964144965144966144967144968144969144970144971144972144973144974144975144976144977144978144979144980144981144982144983144984144985144986144987144988144989144990144991144992144993144994144995144996144997144998144999145000145001145002145003145004145005145006145007145008145009145010145011145012145013145014145015145016145017145018145019145020145021145022145023145024145025145026145027145028145029145030145031145032145033145034145035145036145037145038145039145040145041145042145043145044145045145046145047145048145049145050145051145052145053145054145055145056145057145058145059145060145061145062145063145064145065145066145067145068145069145070145071145072145073145074145075145076145077145078145079145080145081145082145083145084145085145086145087145088145089145090145091145092145093145094145095145096145097145098145099145100145101145102145103145104145105145106145107145108145109145110145111145112145113145114145115145116145117145118145119145120145121145122145123145124145125145126145127145128145129145130145131145132145133145134145135145136145137145138145139145140145141145142145143145144145145145146145147145148145149145150145151145152145153145154145155145156145157145158145159145160145161145162145163145164145165145166145167145168145169145170145171145172145173145174145175145176145177145178145179145180145181145182145183145184145185145186145187145188145189145190145191145192145193145194145195145196145197145198145199145200145201145202145203145204145205145206145207145208145209145210145211145212145213145214145215145216145217145218145219145220145221145222145223145224145225145226145227145228145229145230145231145232145233145234145235145236145237145238145239145240145241145242145243145244145245145246145247145248145249145250145251145252145253145254145255145256145257145258145259145260145261145262145263145264145265145266145267145268145269145270145271145272145273145274145275145276145277145278145279145280145281145282145283145284145285145286145287145288145289145290145291145292145293145294145295145296145297145298145299145300145301145302145303145304145305145306145307145308145309145310145311145312145313145314145315145316145317145318145319145320145321145322145323145324145325145326145327145328145329145330145331145332145333145334145335145336145337145338145339145340145341145342145343145344145345145346145347145348145349145350145351145352145353145354145355145356145357145358145359145360145361145362145363145364145365145366145367145368145369145370145371145372145373145374145375145376145377145378145379145380145381145382145383145384145385145386145387145388145389145390145391145392145393145394145395145396145397145398145399145400145401145402145403145404145405145406145407145408145409145410145411145412145413145414145415145416145417145418145419145420145421145422145423145424145425145426145427145428145429145430145431145432145433145434145435145436145437145438145439145440145441145442145443145444145445145446145447145448145449145450145451145452145453145454145455145456145457145458145459145460145461145462145463145464145465145466145467145468145469145470145471145472145473145474145475145476145477145478145479145480145481145482145483145484145485145486145487145488145489145490145491145492145493145494145495145496145497145498145499145500145501145502145503145504145505145506145507145508145509145510145511145512145513145514145515145516145517145518145519145520145521145522145523145524145525145526145527145528145529145530145531145532145533145534145535145536145537145538145539145540145541145542145543145544145545145546145547145548145549145550145551145552145553145554145555145556145557145558145559145560145561145562145563145564145565145566145567145568145569145570145571145572145573145574145575145576145577145578145579145580145581145582145583145584145585145586145587145588145589145590145591145592145593145594145595145596145597145598145599145600145601145602145603145604145605145606145607145608145609145610145611145612145613145614145615145616145617145618145619145620145621145622145623145624145625145626145627145628145629145630145631145632145633145634145635145636145637145638145639145640145641145642145643145644145645145646145647145648145649145650145651145652145653145654145655145656145657145658145659145660145661145662145663145664145665145666145667145668145669145670145671145672145673145674145675145676145677145678145679145680145681145682145683145684145685145686145687145688145689145690145691145692145693145694145695145696145697145698145699145700145701145702145703145704145705145706145707145708145709145710145711145712145713145714145715145716145717145718145719145720145721145722145723145724145725145726145727145728145729145730145731145732145733145734145735145736145737145738145739145740145741145742145743145744145745145746145747145748145749145750145751145752145753145754145755145756145757145758145759145760145761145762145763145764145765145766145767145768145769145770145771145772145773145774145775145776145777145778145779145780145781145782145783145784145785145786145787145788145789145790145791145792145793145794145795145796145797145798145799145800145801145802145803145804145805145806145807145808145809145810145811145812145813145814145815145816145817145818145819145820145821145822145823145824145825145826145827145828145829145830145831145832145833145834145835145836145837145838145839145840145841145842145843145844145845145846145847145848145849145850145851145852145853145854145855145856145857145858145859145860145861145862145863145864145865145866145867145868145869145870145871145872145873145874145875145876145877145878145879145880145881145882145883145884145885145886145887145888145889145890145891145892145893145894145895145896145897145898145899145900145901145902145903145904145905145906145907145908145909145910145911145912145913145914145915145916145917145918145919145920145921145922145923145924145925145926145927145928145929145930145931145932145933145934145935145936145937145938145939145940145941145942145943145944145945145946145947145948145949145950145951145952145953145954145955145956145957145958145959145960145961145962145963145964145965145966145967145968145969145970145971145972145973145974145975145976145977145978145979145980145981145982145983145984145985145986145987145988145989145990145991145992145993145994145995145996145997145998145999146000146001146002146003146004146005146006146007146008146009146010146011146012146013146014146015146016146017146018146019146020146021146022146023146024146025146026146027146028146029146030146031146032146033146034146035146036146037146038146039146040146041146042146043146044146045146046146047146048146049146050146051146052146053146054146055146056146057146058146059146060146061146062146063146064146065146066146067146068146069146070146071146072146073146074146075146076146077146078146079146080146081146082146083146084146085146086146087146088146089146090146091146092146093146094146095146096146097146098146099146100146101146102146103146104146105146106146107146108146109146110146111146112146113146114146115146116146117146118146119146120146121146122146123146124146125146126146127146128146129146130146131146132146133146134146135146136146137146138146139146140146141146142146143146144146145146146146147146148146149146150146151146152146153146154146155146156146157146158146159146160146161146162146163146164146165146166146167146168146169146170146171146172146173146174146175146176146177146178146179146180146181146182146183146184146185146186146187146188146189146190146191146192146193146194146195146196146197146198146199146200146201146202146203146204146205146206146207146208146209146210146211146212146213146214146215146216146217146218146219146220146221146222146223146224146225146226146227146228146229146230146231146232146233146234146235146236146237146238146239146240146241146242146243146244146245146246146247146248146249146250146251146252146253146254146255146256146257146258146259146260146261146262146263146264146265146266146267146268146269146270146271146272146273146274146275146276146277146278146279146280146281146282146283146284146285146286146287146288146289146290146291146292146293146294146295146296146297146298146299146300146301146302146303146304146305146306146307146308146309146310146311146312146313146314146315146316146317146318146319146320146321146322146323146324146325146326146327146328146329146330146331146332146333146334146335146336146337146338146339146340146341146342146343146344146345146346146347146348146349146350146351146352146353146354146355146356146357146358146359146360146361146362146363146364146365146366146367146368146369146370146371146372146373146374146375146376146377146378146379146380146381146382146383146384146385146386146387146388146389146390146391146392146393146394146395146396146397146398146399146400146401146402146403146404146405146406146407146408146409146410146411146412146413146414146415146416146417146418146419146420146421146422146423146424146425146426146427146428146429146430146431146432146433146434146435146436146437146438146439146440146441146442146443146444146445146446146447146448146449146450146451146452146453146454146455146456146457146458146459146460146461146462146463146464146465146466146467146468146469146470146471146472146473146474146475146476146477146478146479146480146481146482146483146484146485146486146487146488146489146490146491146492146493146494146495146496146497146498146499146500146501146502146503146504146505146506146507146508146509146510146511146512146513146514146515146516146517146518146519146520146521146522146523146524146525146526146527146528146529146530146531146532146533146534146535146536146537146538146539146540146541146542146543146544146545146546146547146548146549146550146551146552146553146554146555146556146557146558146559146560146561146562146563146564146565146566146567146568146569146570146571146572146573146574146575146576146577146578146579146580146581146582146583146584146585146586146587146588146589146590146591146592146593146594146595146596146597146598146599146600146601146602146603146604146605146606146607146608146609146610146611146612146613146614146615146616146617146618146619146620146621146622146623146624146625146626146627146628146629146630146631146632146633146634146635146636146637146638146639146640146641146642146643146644146645146646146647146648146649146650146651146652146653146654146655146656146657146658146659146660146661146662146663146664146665146666146667146668146669146670146671146672146673146674146675146676146677146678146679146680146681146682146683146684146685146686146687146688146689146690146691146692146693146694146695146696146697146698146699146700146701146702146703146704146705146706146707146708146709146710146711146712146713146714146715146716146717146718146719146720146721146722146723146724146725146726146727146728146729146730146731146732146733146734146735146736146737146738146739146740146741146742146743146744146745146746146747146748146749146750146751146752146753146754146755146756146757146758146759146760146761146762146763146764146765146766146767146768146769146770146771146772146773146774146775146776146777146778146779146780146781146782146783146784146785146786146787146788146789146790146791146792146793146794146795146796146797146798146799146800146801146802146803146804146805146806146807146808146809146810146811146812146813146814146815146816146817146818146819146820146821146822146823146824146825146826146827146828146829146830146831146832146833146834146835146836146837146838146839146840146841146842146843146844146845146846146847146848146849146850146851146852146853146854146855146856146857146858146859146860146861146862146863146864146865146866146867146868146869146870146871146872146873146874146875146876146877146878146879146880146881146882146883146884146885146886146887146888146889146890146891146892146893146894146895146896146897146898146899146900146901146902146903146904146905146906146907146908146909146910146911146912146913146914146915146916146917146918146919146920146921146922146923146924146925146926146927146928146929146930146931146932146933146934146935146936146937146938146939146940146941146942146943146944146945146946146947146948146949146950146951146952146953146954146955146956146957146958146959146960146961146962146963146964146965146966146967146968146969146970146971146972146973146974146975146976146977146978146979146980146981146982146983146984146985146986146987146988146989146990146991146992146993146994146995146996146997146998146999147000147001147002147003147004147005147006147007147008147009147010147011147012147013147014147015147016147017147018147019147020147021147022147023147024147025147026147027147028147029147030147031147032147033147034147035147036147037147038147039147040147041147042147043147044147045147046147047147048147049147050147051147052147053147054147055147056147057147058147059147060147061147062147063147064147065147066147067147068147069147070147071147072147073147074147075147076147077147078147079147080147081147082147083147084147085147086147087147088147089147090147091147092147093147094147095147096147097147098147099147100147101147102147103147104147105147106147107147108147109147110147111147112147113147114147115147116147117147118147119147120147121147122147123147124147125147126147127147128147129147130147131147132147133147134147135147136147137147138147139147140147141147142147143147144147145147146147147147148147149147150147151147152147153147154147155147156147157147158147159147160147161147162147163147164147165147166147167147168147169147170147171147172147173147174147175147176147177147178147179147180147181147182147183147184147185147186147187147188147189147190147191147192147193147194147195147196147197147198147199147200147201147202147203147204147205147206147207147208147209147210147211147212147213147214147215147216147217147218147219147220147221147222147223147224147225147226147227147228147229147230147231147232147233147234147235147236147237147238147239147240147241147242147243147244147245147246147247147248147249147250147251147252147253147254147255147256147257147258147259147260147261147262147263147264147265147266147267147268147269147270147271147272147273147274147275147276147277147278147279147280147281147282147283147284147285147286147287147288147289147290147291147292147293147294147295147296147297147298147299147300147301147302147303147304147305147306147307147308147309147310147311147312147313147314147315147316147317147318147319147320147321147322147323147324147325147326147327147328147329147330147331147332147333147334147335147336147337147338147339147340147341147342147343147344147345147346147347147348147349147350147351147352147353147354147355147356147357147358147359147360147361147362147363147364147365147366147367147368147369147370147371147372147373147374147375147376147377147378147379147380147381147382147383147384147385147386147387147388147389147390147391147392147393147394147395147396147397147398147399147400147401147402147403147404147405147406147407147408147409147410147411147412147413147414147415147416147417147418147419147420147421147422147423147424147425147426147427147428147429147430147431147432147433147434147435147436147437147438147439147440147441147442147443147444147445147446147447147448147449147450147451147452147453147454147455147456147457147458147459147460147461147462147463147464147465147466147467147468147469147470147471147472147473147474147475147476147477147478147479147480147481147482147483147484147485147486147487147488147489147490147491147492147493147494147495147496147497147498147499147500147501147502147503147504147505147506147507147508147509147510147511147512147513147514147515147516147517147518147519147520147521147522147523147524147525147526147527147528147529147530147531147532147533147534147535147536147537147538147539147540147541147542147543147544147545147546147547147548147549147550147551147552147553147554147555147556147557147558147559147560147561147562147563147564147565147566147567147568147569147570147571147572147573147574147575147576147577147578147579147580147581147582147583147584147585147586147587147588147589147590147591147592147593147594147595147596147597147598147599147600147601147602147603147604147605147606147607147608147609147610147611147612147613147614147615147616147617147618147619147620147621147622147623147624147625147626147627147628147629147630147631147632147633147634147635147636147637147638147639147640147641147642147643147644147645147646147647147648147649147650147651147652147653147654147655147656147657147658147659147660147661147662147663147664147665147666147667147668147669147670147671147672147673147674147675147676147677147678147679147680147681147682147683147684147685147686147687147688147689147690147691147692147693147694147695147696147697147698147699147700147701147702147703147704147705147706147707147708147709147710147711147712147713147714147715147716147717147718147719147720147721147722147723147724147725147726147727147728147729147730147731147732147733147734147735147736147737147738147739147740147741147742147743147744147745147746147747147748147749147750147751147752147753147754147755147756147757147758147759147760147761147762147763147764147765147766147767147768147769147770147771147772147773147774147775147776147777147778147779147780147781147782147783147784147785147786147787147788147789147790147791147792147793147794147795147796147797147798147799147800147801147802147803147804147805147806147807147808147809147810147811147812147813147814147815147816147817147818147819147820147821147822147823147824147825147826147827147828147829147830147831147832147833147834147835147836147837147838147839147840147841147842147843147844147845147846147847147848147849147850147851147852147853147854147855147856147857147858147859147860147861147862147863147864147865147866147867147868147869147870147871147872147873147874147875147876147877147878147879147880147881147882147883147884147885147886147887147888147889147890147891147892147893147894147895147896147897147898147899147900147901147902147903147904147905147906147907147908147909147910147911147912147913147914147915147916147917147918147919147920147921147922147923147924147925147926147927147928147929147930147931147932147933147934147935147936147937147938147939147940147941147942147943147944147945147946147947147948147949147950147951147952147953147954147955147956147957147958147959147960147961147962147963147964147965147966147967147968147969147970147971147972147973147974147975147976147977147978147979147980147981147982147983147984147985147986147987147988147989147990147991147992147993147994147995147996147997147998147999148000148001148002148003148004148005148006148007148008148009148010148011148012148013148014148015148016148017148018148019148020148021148022148023148024148025148026148027148028148029148030148031148032148033148034148035148036148037148038148039148040148041148042148043148044148045148046148047148048148049148050148051148052148053148054148055148056148057148058148059148060148061148062148063148064148065148066148067148068148069148070148071148072148073148074148075148076148077148078148079148080148081148082148083148084148085148086148087148088148089148090148091148092148093148094148095148096148097148098148099148100148101148102148103148104148105148106148107148108148109148110148111148112148113148114148115148116148117148118148119148120148121148122148123148124148125148126148127148128148129148130148131148132148133148134148135148136148137148138148139148140148141148142148143148144148145148146148147148148148149148150148151148152148153148154148155148156148157148158148159148160148161148162148163148164148165148166148167148168148169148170148171148172148173148174148175148176148177148178148179148180148181148182148183148184148185148186148187148188148189148190148191148192148193148194148195148196148197148198148199148200148201148202148203148204148205148206148207148208148209148210148211148212148213148214148215148216148217148218148219148220148221148222148223148224148225148226148227148228148229148230148231148232148233148234148235148236148237148238148239148240148241148242148243148244148245148246148247148248148249148250148251148252148253148254148255148256148257148258148259148260148261148262148263148264148265148266148267148268148269148270148271148272148273148274148275148276148277148278148279148280148281148282148283148284148285148286148287148288148289148290148291148292148293148294148295148296148297148298148299148300148301148302148303148304148305148306148307148308148309148310148311148312148313148314148315148316148317148318148319148320148321148322148323148324148325148326148327148328148329148330148331148332148333148334148335148336148337148338148339148340148341148342148343148344148345148346148347148348148349148350148351148352148353148354148355148356148357148358148359148360148361148362148363148364148365148366148367148368148369148370148371148372148373148374148375148376148377148378148379148380148381148382148383148384148385148386148387148388148389148390148391148392148393148394148395148396148397148398148399148400148401148402148403148404148405148406148407148408148409148410148411148412148413148414148415148416148417148418148419148420148421148422148423148424148425148426148427148428148429148430148431148432148433148434148435148436148437148438148439148440148441148442148443148444148445148446148447148448148449148450148451148452148453148454148455148456148457148458148459148460148461148462148463148464148465148466148467148468148469148470148471148472148473148474148475148476148477148478148479148480148481148482148483148484148485148486148487148488148489148490148491148492148493148494148495148496148497148498148499148500148501148502148503148504148505148506148507148508148509148510148511148512148513148514148515148516148517148518148519148520148521148522148523148524148525148526148527148528148529148530148531148532148533148534148535148536148537148538148539148540148541148542148543148544148545148546148547148548148549148550148551148552148553148554148555148556148557148558148559148560148561148562148563148564148565148566148567148568148569148570148571148572148573148574148575148576148577148578148579148580148581148582148583148584148585148586148587148588148589148590148591148592148593148594148595148596148597148598148599148600148601148602148603148604148605148606148607148608148609148610148611148612148613148614148615148616148617148618148619148620148621148622148623148624148625148626148627148628148629148630148631148632148633148634148635148636148637148638148639148640148641148642148643148644148645148646148647148648148649148650148651148652148653148654148655148656148657148658148659148660148661148662148663148664148665148666148667148668148669148670148671148672148673148674148675148676148677148678148679148680148681148682148683148684148685148686148687148688148689148690148691148692148693148694148695148696148697148698148699148700148701148702148703148704148705148706148707148708148709148710148711148712148713148714148715148716148717148718148719148720148721148722148723148724148725148726148727148728148729148730148731148732148733148734148735148736148737148738148739148740148741148742148743148744148745148746148747148748148749148750148751148752148753148754148755148756148757148758148759148760148761148762148763148764148765148766148767148768148769148770148771148772148773148774148775148776148777148778148779148780148781148782148783148784148785148786148787148788148789148790148791148792148793148794148795148796148797148798148799148800148801148802148803148804148805148806148807148808148809148810148811148812148813148814148815148816148817148818148819148820148821148822148823148824148825148826148827148828148829148830148831148832148833148834148835148836148837148838148839148840148841148842148843148844148845148846148847148848148849148850148851148852148853148854148855148856148857148858148859148860148861148862148863148864148865148866148867148868148869148870148871148872148873148874148875148876148877148878148879148880148881148882148883148884148885148886148887148888148889148890148891148892148893148894148895148896148897148898148899148900148901148902148903148904148905148906148907148908148909148910148911148912148913148914148915148916148917148918148919148920148921148922148923148924148925148926148927148928148929148930148931148932148933148934148935148936148937148938148939148940148941148942148943148944148945148946148947148948148949148950148951148952148953148954148955148956148957148958148959148960148961148962148963148964148965148966148967148968148969148970148971148972148973148974148975148976148977148978148979148980148981148982148983148984148985148986148987148988148989148990148991148992148993148994148995148996148997148998148999149000149001149002149003149004149005149006149007149008149009149010149011149012149013149014149015149016149017149018149019149020149021149022149023149024149025149026149027149028149029149030149031149032149033149034149035149036149037149038149039149040149041149042149043149044149045149046149047149048149049149050149051149052149053149054149055149056149057149058149059149060149061149062149063149064149065149066149067149068149069149070149071149072149073149074149075149076149077149078149079149080149081149082149083149084149085149086149087149088149089149090149091149092149093149094149095149096149097149098149099149100149101149102149103149104149105149106149107149108149109149110149111149112149113149114149115149116149117149118149119149120149121149122149123149124149125149126149127149128149129149130149131149132149133149134149135149136149137149138149139149140149141149142149143149144149145149146149147149148149149149150149151149152149153149154149155149156149157149158149159149160149161149162149163149164149165149166149167149168149169149170149171149172149173149174149175149176149177149178149179149180149181149182149183149184149185149186149187149188149189149190149191149192149193149194149195149196149197149198149199149200149201149202149203149204149205149206149207149208149209149210149211149212149213149214149215149216149217149218149219149220149221149222149223149224149225149226149227149228149229149230149231149232149233149234149235149236149237149238149239149240149241149242149243149244149245149246149247149248149249149250149251149252149253149254149255149256149257149258149259149260149261149262149263149264149265149266149267149268149269149270149271149272149273149274149275149276149277149278149279149280149281149282149283149284149285149286149287149288149289149290149291149292149293149294149295149296149297149298149299149300149301149302149303149304149305149306149307149308149309149310149311149312149313149314149315149316149317149318149319149320149321149322149323149324149325149326149327149328149329149330149331149332149333149334149335149336149337149338149339149340149341149342149343149344149345149346149347149348149349149350149351149352149353149354149355149356149357149358149359149360149361149362149363149364149365149366149367149368149369149370149371149372149373149374149375149376149377149378149379149380149381149382149383149384149385149386149387149388149389149390149391149392149393149394149395149396149397149398149399149400149401149402149403149404149405149406149407149408149409149410149411149412149413149414149415149416149417149418149419149420149421149422149423149424149425149426149427149428149429149430149431149432149433149434149435149436149437149438149439149440149441149442149443149444149445149446149447149448149449149450149451149452149453149454149455149456149457149458149459149460149461149462149463149464149465149466149467149468149469149470149471149472149473149474149475149476149477149478149479149480149481149482149483149484149485149486149487149488149489149490149491149492149493149494149495149496149497149498149499149500149501149502149503149504149505149506149507149508149509149510149511149512149513149514149515149516149517149518149519149520149521149522149523149524149525149526149527149528149529149530149531149532149533149534149535149536149537149538149539149540149541149542149543149544149545149546149547149548149549149550149551149552149553149554149555149556149557149558149559149560149561149562149563149564149565149566149567149568149569149570149571149572149573149574149575149576149577149578149579149580149581149582149583149584149585149586149587149588149589149590149591149592149593149594149595149596149597149598149599149600149601149602149603149604149605149606149607149608149609149610149611149612149613149614149615149616149617149618149619149620149621149622149623149624149625149626149627149628149629149630149631149632149633149634149635149636149637149638149639149640149641149642149643149644149645149646149647149648149649149650149651149652149653149654149655149656149657149658149659149660149661149662149663149664149665149666149667149668149669149670149671149672149673149674149675149676149677149678149679149680149681149682149683149684149685149686149687149688149689149690149691149692149693149694149695149696149697149698149699149700149701149702149703149704149705149706149707149708149709149710149711149712149713149714149715149716149717149718149719149720149721149722149723149724149725149726149727149728149729149730149731149732149733149734149735149736149737149738149739149740149741149742149743149744149745149746149747149748149749149750149751149752149753149754149755149756149757149758149759149760149761149762149763149764149765149766149767149768149769149770149771149772149773149774149775149776149777149778149779149780149781149782149783149784149785149786149787149788149789149790149791149792149793149794149795149796149797149798149799149800149801149802149803149804149805149806149807149808149809149810149811149812149813149814149815149816149817149818149819149820149821149822149823149824149825149826149827149828149829149830149831149832149833149834149835149836149837149838149839149840149841149842149843149844149845149846149847149848149849149850149851149852149853149854149855149856149857149858149859149860149861149862149863149864149865149866149867149868149869149870149871149872149873149874149875149876149877149878149879149880149881149882149883149884149885149886149887149888149889149890149891149892149893149894149895149896149897149898149899149900149901149902149903149904149905149906149907149908149909149910149911149912149913149914149915149916149917149918149919149920149921149922149923149924149925149926149927149928149929149930149931149932149933149934149935149936149937149938149939149940149941149942149943149944149945149946149947149948149949149950149951149952149953149954149955149956149957149958149959149960149961149962149963149964149965149966149967149968149969149970149971149972149973149974149975149976149977149978149979149980149981149982149983149984149985149986149987149988149989149990149991149992149993149994149995149996149997149998149999150000150001150002150003150004150005150006150007150008150009150010150011150012150013150014150015150016150017150018150019150020150021150022150023150024150025150026150027150028150029150030150031150032150033150034150035150036150037150038150039150040150041150042150043150044150045150046150047150048150049150050150051150052150053150054150055150056150057150058150059150060150061150062150063150064150065150066150067150068150069150070150071150072150073150074150075150076150077150078150079150080150081150082150083150084150085150086150087150088150089150090150091150092150093150094150095150096150097150098150099150100150101150102150103150104150105150106150107150108150109150110150111150112150113150114150115150116150117150118150119150120150121150122150123150124150125150126150127150128150129150130150131150132150133150134150135150136150137150138150139150140150141150142150143150144150145150146150147150148150149150150150151150152150153150154150155150156150157150158150159150160150161150162150163150164150165150166150167150168150169150170150171150172150173150174150175150176150177150178150179150180150181150182150183150184150185150186150187150188150189150190150191150192150193150194150195150196150197150198150199150200150201150202150203150204150205150206150207150208150209150210150211150212150213150214150215150216150217150218150219150220150221150222150223150224150225150226150227150228150229150230150231150232150233150234150235150236150237150238150239150240150241150242150243150244150245150246150247150248150249150250150251150252150253150254150255150256150257150258150259150260150261150262150263150264150265150266150267150268150269150270150271150272150273150274150275150276150277150278150279150280150281150282150283150284150285150286150287150288150289150290150291150292150293150294150295150296150297150298150299150300150301150302150303150304150305150306150307150308150309150310150311150312150313150314150315150316150317150318150319150320150321150322150323150324150325150326150327150328150329150330150331150332150333150334150335150336150337150338150339150340150341150342150343150344150345150346150347150348150349150350150351150352150353150354150355150356150357150358150359150360150361150362150363150364150365150366150367150368150369150370150371150372150373150374150375150376150377150378150379150380150381150382150383150384150385150386150387150388150389150390150391150392150393150394150395150396150397150398150399150400150401150402150403150404150405150406150407150408150409150410150411150412150413150414150415150416150417150418150419150420150421150422150423150424150425150426150427150428150429150430150431150432150433150434150435150436150437150438150439150440150441150442150443150444150445150446150447150448150449150450150451150452150453150454150455150456150457150458150459150460150461150462150463150464150465150466150467150468150469150470150471150472150473150474150475150476150477150478150479150480150481150482150483150484150485150486150487150488150489150490150491150492150493150494150495150496150497150498150499150500150501150502150503150504150505150506150507150508150509150510150511150512150513150514150515150516150517150518150519150520150521150522150523150524150525150526150527150528150529150530150531150532150533150534150535150536150537150538150539150540150541150542150543150544150545150546150547150548150549150550150551150552150553150554150555150556150557150558150559150560150561150562150563150564150565150566150567150568150569150570150571150572150573150574150575150576150577150578150579150580150581150582150583150584150585150586150587150588150589150590150591150592150593150594150595150596150597150598150599150600150601150602150603150604150605150606150607150608150609150610150611150612150613150614150615150616150617150618150619150620150621150622150623150624150625150626150627150628150629150630150631150632150633150634150635150636150637150638150639150640150641150642150643150644150645150646150647150648150649150650150651150652150653150654150655150656150657150658150659150660150661150662150663150664150665150666150667150668150669150670150671150672150673150674150675150676150677150678150679150680150681150682150683150684150685150686150687150688150689150690150691150692150693150694150695150696150697150698150699150700150701150702150703150704150705150706150707150708150709150710150711150712150713150714150715150716150717150718150719150720150721150722150723150724150725150726150727150728150729150730150731150732150733150734150735150736150737150738150739150740150741150742150743150744150745150746150747150748150749150750150751150752150753150754150755150756150757150758150759150760150761150762150763150764150765150766150767150768150769150770150771150772150773150774150775150776150777150778150779150780150781150782150783150784150785150786150787150788150789150790150791150792150793150794150795150796150797150798150799150800150801150802150803150804150805150806150807150808150809150810150811150812150813150814150815150816150817150818150819150820150821150822150823150824150825150826150827150828150829150830150831150832150833150834150835150836150837150838150839150840150841150842150843150844150845150846150847150848150849150850150851150852150853150854150855150856150857150858150859150860150861150862150863150864150865150866150867150868150869150870150871150872150873150874150875150876150877150878150879150880150881150882150883150884150885150886150887150888150889150890150891150892150893150894150895150896150897150898150899150900150901150902150903150904150905150906150907150908150909150910150911150912150913150914150915150916150917150918150919150920150921150922150923150924150925150926150927150928150929150930150931150932150933150934150935150936150937150938150939150940150941150942150943150944150945150946150947150948150949150950150951150952150953150954150955150956150957150958150959150960150961150962150963150964150965150966150967150968150969150970150971150972150973150974150975150976150977150978150979150980150981150982150983150984150985150986150987150988150989150990150991150992150993150994150995150996150997150998150999151000151001151002151003151004151005151006151007151008151009151010151011151012151013151014151015151016151017151018151019151020151021151022151023151024151025151026151027151028151029151030151031151032151033151034151035151036151037151038151039151040151041151042151043151044151045151046151047151048151049151050151051151052151053151054151055151056151057151058151059151060151061151062151063151064151065151066151067151068151069151070151071151072151073151074151075151076151077151078151079151080151081151082151083151084151085151086151087151088151089151090151091151092151093151094151095151096151097151098151099151100151101151102151103151104151105151106151107151108151109151110151111151112151113151114151115151116151117151118151119151120151121151122151123151124151125151126151127151128151129151130151131151132151133151134151135151136151137151138151139151140151141151142151143151144151145151146151147151148151149151150151151151152151153151154151155151156151157151158151159151160151161151162151163151164151165151166151167151168151169151170151171151172151173151174151175151176151177151178151179151180151181151182151183151184151185151186151187151188151189151190151191151192151193151194151195151196151197151198151199151200151201151202151203151204151205151206151207151208151209151210151211151212151213151214151215151216151217151218151219151220151221151222151223151224151225151226151227151228151229151230151231151232151233151234151235151236151237151238151239151240151241151242151243151244151245151246151247151248151249151250151251151252151253151254151255151256151257151258151259151260151261151262151263151264151265151266151267151268151269151270151271151272151273151274151275151276151277151278151279151280151281151282151283151284151285151286151287151288151289151290151291151292151293151294151295151296151297151298151299151300151301151302151303151304151305151306151307151308151309151310151311151312151313151314151315151316151317151318151319151320151321151322151323151324151325151326151327151328151329151330151331151332151333151334151335151336151337151338151339151340151341151342151343151344151345151346151347151348151349151350151351151352151353151354151355151356151357151358151359151360151361151362151363151364151365151366151367151368151369151370151371151372151373151374151375151376151377151378151379151380151381151382151383151384151385151386151387151388151389151390151391151392151393151394151395151396151397151398151399151400151401151402151403151404151405151406151407151408151409151410151411151412151413151414151415151416151417151418151419151420151421151422151423151424151425151426151427151428151429151430151431151432151433151434151435151436151437151438151439151440151441151442151443151444151445151446151447151448151449151450151451151452151453151454151455151456151457151458151459151460151461151462151463151464151465151466151467151468151469151470151471151472151473151474151475151476151477151478151479151480151481151482151483151484151485151486151487151488151489151490151491151492151493151494151495151496151497151498151499151500151501151502151503151504151505151506151507151508151509151510151511151512151513151514151515151516151517151518151519151520151521151522151523151524151525151526151527151528151529151530151531151532151533151534151535151536151537151538151539151540151541151542151543151544151545151546151547151548151549151550151551151552151553151554151555151556151557151558151559151560151561151562151563151564151565151566151567151568151569151570151571151572151573151574151575151576151577151578151579151580151581151582151583151584151585151586151587151588151589151590151591151592151593151594151595151596151597151598151599151600151601151602151603151604151605151606151607151608151609151610151611151612151613151614151615151616151617151618151619151620151621151622151623151624151625151626151627151628151629151630151631151632151633151634151635151636151637151638151639151640151641151642151643151644151645151646151647151648151649151650151651151652151653151654151655151656151657151658151659151660151661151662151663151664151665151666151667151668151669151670151671151672151673151674151675151676151677151678151679151680151681151682151683151684151685151686151687151688151689151690151691151692151693151694151695151696151697151698151699151700151701151702151703151704151705151706151707151708151709151710151711151712151713151714151715151716151717151718151719151720151721151722151723151724151725151726151727151728151729151730151731151732151733151734151735151736151737151738151739151740151741151742151743151744151745151746151747151748151749151750151751151752151753151754151755151756151757151758151759151760151761151762151763151764151765151766151767151768151769151770151771151772151773151774151775151776151777151778151779151780151781151782151783151784151785151786151787151788151789151790151791151792151793151794151795151796151797151798151799151800151801151802151803151804151805151806151807151808151809151810151811151812151813151814151815151816151817151818151819151820151821151822151823151824151825151826151827151828151829151830151831151832151833151834151835151836151837151838151839151840151841151842151843151844151845151846151847151848151849151850151851151852151853151854151855151856151857151858151859151860151861151862151863151864151865151866151867151868151869151870151871151872151873151874151875151876151877151878151879151880151881151882151883151884151885151886151887151888151889151890151891151892151893151894151895151896151897151898151899151900151901151902151903151904151905151906151907151908151909151910151911151912151913151914151915151916151917151918151919151920151921151922151923151924151925151926151927151928151929151930151931151932151933151934151935151936151937151938151939151940151941151942151943151944151945151946151947151948151949151950151951151952151953151954151955151956151957151958151959151960151961151962151963151964151965151966151967151968151969151970151971151972151973151974151975151976151977151978151979151980151981151982151983151984151985151986151987151988151989151990151991151992151993151994151995151996151997151998151999152000152001152002152003152004152005152006152007152008152009152010152011152012152013152014152015152016152017152018152019152020152021152022152023152024152025152026152027152028152029152030152031152032152033152034152035152036152037152038152039152040152041152042152043152044152045152046152047152048152049152050152051152052152053152054152055152056152057152058152059152060152061152062152063152064152065152066152067152068152069152070152071152072152073152074152075152076152077152078152079152080152081152082152083152084152085152086152087152088152089152090152091152092152093152094152095152096152097152098152099152100152101152102152103152104152105152106152107152108152109152110152111152112152113152114152115152116152117152118152119152120152121152122152123152124152125152126152127152128152129152130152131152132152133152134152135152136152137152138152139152140152141152142152143152144152145152146152147152148152149152150152151152152152153152154152155152156152157152158152159152160152161152162152163152164152165152166152167152168152169152170152171152172152173152174152175152176152177152178152179152180152181152182152183152184152185152186152187152188152189152190152191152192152193152194152195152196152197152198152199152200152201152202152203152204152205152206152207152208152209152210152211152212152213152214152215152216152217152218152219152220152221152222152223152224152225152226152227152228152229152230152231152232152233152234152235152236152237152238152239152240152241152242152243152244152245152246152247152248152249152250152251152252152253152254152255152256152257152258152259152260152261152262152263152264152265152266152267152268152269152270152271152272152273152274152275152276152277152278152279152280152281152282152283152284152285152286152287152288152289152290152291152292152293152294152295152296152297152298152299152300152301152302152303152304152305152306152307152308152309152310152311152312152313152314152315152316152317152318152319152320152321152322152323152324152325152326152327152328152329152330152331152332152333152334152335152336152337152338152339152340152341152342152343152344152345152346152347152348152349152350152351152352152353152354152355152356152357152358152359152360152361152362152363152364152365152366152367152368152369152370152371152372152373152374152375152376152377152378152379152380152381152382152383152384152385152386152387152388152389152390152391152392152393152394152395152396152397152398152399152400152401152402152403152404152405152406152407152408152409152410152411152412152413152414152415152416152417152418152419152420152421152422152423152424152425152426152427152428152429152430152431152432152433152434152435152436152437152438152439152440152441152442152443152444152445152446152447152448152449152450152451152452152453152454152455152456152457152458152459152460152461152462152463152464152465152466152467152468152469152470152471152472152473152474152475152476152477152478152479152480152481152482152483152484152485152486152487152488152489152490152491152492152493152494152495152496152497152498152499152500152501152502152503152504152505152506152507152508152509152510152511152512152513152514152515152516152517152518152519152520152521152522152523152524152525152526152527152528152529152530152531152532152533152534152535152536152537152538152539152540152541152542152543152544152545152546152547152548152549152550152551152552152553152554152555152556152557152558152559152560152561152562152563152564152565152566152567152568152569152570152571152572152573152574152575152576152577152578152579152580152581152582152583152584152585152586152587152588152589152590152591152592152593152594152595152596152597152598152599152600152601152602152603152604152605152606152607152608152609152610152611152612152613152614152615152616152617152618152619152620152621152622152623152624152625152626152627152628152629152630152631152632152633152634152635152636152637152638152639152640152641152642152643152644152645152646152647152648152649152650152651152652152653152654152655152656152657152658152659152660152661152662152663152664152665152666152667152668152669152670152671152672152673152674152675152676152677152678152679152680152681152682152683152684152685152686152687152688152689152690152691152692152693152694152695152696152697152698152699152700152701152702152703152704152705152706152707152708152709152710152711152712152713152714152715152716152717152718152719152720152721152722152723152724152725152726152727152728152729152730152731152732152733152734152735152736152737152738152739152740152741152742152743152744152745152746152747152748152749152750152751152752152753152754152755152756152757152758152759152760152761152762152763152764152765152766152767152768152769152770152771152772152773152774152775152776152777152778152779152780152781152782152783152784152785152786152787152788152789152790152791152792152793152794152795152796152797152798152799152800152801152802152803152804152805152806152807152808152809152810152811152812152813152814152815152816152817152818152819152820152821152822152823152824152825152826152827152828152829152830152831152832152833152834152835152836152837152838152839152840152841152842152843152844152845152846152847152848152849152850152851152852152853152854152855152856152857152858152859152860152861152862152863152864152865152866152867152868152869152870152871152872152873152874152875152876152877152878152879152880152881152882152883152884152885152886152887152888152889152890152891152892152893152894152895152896152897152898152899152900152901152902152903152904152905152906152907152908152909152910152911152912152913152914152915152916152917152918152919152920152921152922152923152924152925152926152927152928152929152930152931152932152933152934152935152936152937152938152939152940152941152942152943152944152945152946152947152948152949152950152951152952152953152954152955152956152957152958152959152960152961152962152963152964152965152966152967152968152969152970152971152972152973152974152975152976152977152978152979152980152981152982152983152984152985152986152987152988152989152990152991152992152993152994152995152996152997152998152999153000153001153002153003153004153005153006153007153008153009153010153011153012153013153014153015153016153017153018153019153020153021153022153023153024153025153026153027153028153029153030153031153032153033153034153035153036153037153038153039153040153041153042153043153044153045153046153047153048153049153050153051153052153053153054153055153056153057153058153059153060153061153062153063153064153065153066153067153068153069153070153071153072153073153074153075153076153077153078153079153080153081153082153083153084153085153086153087153088153089153090153091153092153093153094153095153096153097153098153099153100153101153102153103153104153105153106153107153108153109153110153111153112153113153114153115153116153117153118153119153120153121153122153123153124153125153126153127153128153129153130153131153132153133153134153135153136153137153138153139153140153141153142153143153144153145153146153147153148153149153150153151153152153153153154153155153156153157153158153159153160153161153162153163153164153165153166153167153168153169153170153171153172153173153174153175153176153177153178153179153180153181153182153183153184153185153186153187153188153189153190153191153192153193153194153195153196153197153198153199153200153201153202153203153204153205153206153207153208153209153210153211153212153213153214153215153216153217153218153219153220153221153222153223153224153225153226153227153228153229153230153231153232153233153234153235153236153237153238153239153240153241153242153243153244153245153246153247153248153249153250153251153252153253153254153255153256153257153258153259153260153261153262153263153264153265153266153267153268153269153270153271153272153273153274153275153276153277153278153279153280153281153282153283153284153285153286153287153288153289153290153291153292153293153294153295153296153297153298153299153300153301153302153303153304153305153306153307153308153309153310153311153312153313153314153315153316153317153318153319153320153321153322153323153324153325153326153327153328153329153330153331153332153333153334153335153336153337153338153339153340153341153342153343153344153345153346153347153348153349153350153351153352153353153354153355153356153357153358153359153360153361153362153363153364153365153366153367153368153369153370153371153372153373153374153375153376153377153378153379153380153381153382153383153384153385153386153387153388153389153390153391153392153393153394153395153396153397153398153399153400153401153402153403153404153405153406153407153408153409153410153411153412153413153414153415153416153417153418153419153420153421153422153423153424153425153426153427153428153429153430153431153432153433153434153435153436153437153438153439153440153441153442153443153444153445153446153447153448153449153450153451153452153453153454153455153456153457153458153459153460153461153462153463153464153465153466153467153468153469153470153471153472153473153474153475153476153477153478153479153480153481153482153483153484153485153486153487153488153489153490153491153492153493153494153495153496153497153498153499153500153501153502153503153504153505153506153507153508153509153510153511153512153513153514153515153516153517153518153519153520153521153522153523153524153525153526153527153528153529153530153531153532153533153534153535153536153537153538153539153540153541153542153543153544153545153546153547153548153549153550153551153552153553153554153555153556153557153558153559153560153561153562153563153564153565153566153567153568153569153570153571153572153573153574153575153576153577153578153579153580153581153582153583153584153585153586153587153588153589153590153591153592153593153594153595153596153597153598153599153600153601153602153603153604153605153606153607153608153609153610153611153612153613153614153615153616153617153618153619153620153621153622153623153624153625153626153627153628153629153630153631153632153633153634153635153636153637153638153639153640153641153642153643153644153645153646153647153648153649153650153651153652153653153654153655153656153657153658153659153660153661153662153663153664153665153666153667153668153669153670153671153672153673153674153675153676153677153678153679153680153681153682153683153684153685153686153687153688153689153690153691153692153693153694153695153696153697153698153699153700153701153702153703153704153705153706153707153708153709153710153711153712153713153714153715153716153717153718153719153720153721153722153723153724153725153726153727153728153729153730153731153732153733153734153735153736153737153738153739153740153741153742153743153744153745153746153747153748153749153750153751153752153753153754153755153756153757153758153759153760153761153762153763153764153765153766153767153768153769153770153771153772153773153774153775153776153777153778153779153780153781153782153783153784153785153786153787153788153789153790153791153792153793153794153795153796153797153798153799153800153801153802153803153804153805153806153807153808153809153810153811153812153813153814153815153816153817153818153819153820153821153822153823153824153825153826153827153828153829153830153831153832153833153834153835153836153837153838153839153840153841153842153843153844153845153846153847153848153849153850153851153852153853153854153855153856153857153858153859153860153861153862153863153864153865153866153867153868153869153870153871153872153873153874153875153876153877153878153879153880153881153882153883153884153885153886153887153888153889153890153891153892153893153894153895153896153897153898153899153900153901153902153903153904153905153906153907153908153909153910153911153912153913153914153915153916153917153918153919153920153921153922153923153924153925153926153927153928153929153930153931153932153933153934153935153936153937153938153939153940153941153942153943153944153945153946153947153948153949153950153951153952153953153954153955153956153957153958153959153960153961153962153963153964153965153966153967153968153969153970153971153972153973153974153975153976153977153978153979153980153981153982153983153984153985153986153987153988153989153990153991153992153993153994153995153996153997153998153999154000154001154002154003154004154005154006154007154008154009154010154011154012154013154014154015154016154017154018154019154020154021154022154023154024154025154026154027154028154029154030154031154032154033154034154035154036154037154038154039154040154041154042154043154044154045154046154047154048154049154050154051154052154053154054154055154056154057154058154059154060154061154062154063154064154065154066154067154068154069154070154071154072154073154074154075154076154077154078154079154080154081154082154083154084154085154086154087154088154089154090154091154092154093154094154095154096154097154098154099154100154101154102154103154104154105154106154107154108154109154110154111154112154113154114154115154116154117154118154119154120154121154122154123154124154125154126154127154128154129154130154131154132154133154134154135154136154137154138154139154140154141154142154143154144154145154146154147154148154149154150154151154152154153154154154155154156154157154158154159154160154161154162154163154164154165154166154167154168154169154170154171154172154173154174154175154176154177154178154179154180154181154182154183154184154185154186154187154188154189154190154191154192154193154194154195154196154197154198154199154200154201154202154203154204154205154206154207154208154209154210154211154212154213154214154215154216154217154218154219154220154221154222154223154224154225154226154227154228154229154230154231154232154233154234154235154236154237154238154239154240154241154242154243154244154245154246154247154248154249154250154251154252154253154254154255154256154257154258154259154260154261154262154263154264154265154266154267154268154269154270154271154272154273154274154275154276154277154278154279154280154281154282154283154284154285154286154287154288154289154290154291154292154293154294154295154296154297154298154299154300154301154302154303154304154305154306154307154308154309154310154311154312154313154314154315154316154317154318154319154320154321154322154323154324154325154326154327154328154329154330154331154332154333154334154335154336154337154338154339154340154341154342154343154344154345154346154347154348154349154350154351154352154353154354154355154356154357154358154359154360154361154362154363154364154365154366154367154368154369154370154371154372154373154374154375154376154377154378154379154380154381154382154383154384154385154386154387154388154389154390154391154392154393154394154395154396154397154398154399154400154401154402154403154404154405154406154407154408154409154410154411154412154413154414154415154416154417154418154419154420154421154422154423154424154425154426154427154428154429154430154431154432154433154434154435154436154437154438154439154440154441154442154443154444154445154446154447154448154449154450154451154452154453154454154455154456154457154458154459154460154461154462154463154464154465154466154467154468154469154470154471154472154473154474154475154476154477154478154479154480154481154482154483154484154485154486154487154488154489154490154491154492154493154494154495154496154497154498154499154500154501154502154503154504154505154506154507154508154509154510154511154512154513154514154515154516154517154518154519154520154521154522154523154524154525154526154527154528154529154530154531154532154533154534154535154536154537154538154539154540154541154542154543154544154545154546154547154548154549154550154551154552154553154554154555154556154557154558154559154560154561154562154563154564154565154566154567154568154569154570154571154572154573154574154575154576154577154578154579154580154581154582154583154584154585154586154587154588154589154590154591154592154593154594154595154596154597154598154599154600154601154602154603154604154605154606154607154608154609154610154611154612154613154614154615154616154617154618154619154620154621154622154623154624154625154626154627154628154629154630154631154632154633154634154635154636154637154638154639154640154641154642154643154644154645154646154647154648154649154650154651154652154653154654154655154656154657154658154659154660154661154662154663154664154665154666154667154668154669154670154671154672154673154674154675154676154677154678154679154680154681154682154683154684154685154686154687154688154689154690154691154692154693154694154695154696154697154698154699154700154701154702154703154704154705154706154707154708154709154710154711154712154713154714154715154716154717154718154719154720154721154722154723154724154725154726154727154728154729154730154731154732154733154734154735154736154737154738154739154740154741154742154743154744154745154746154747154748154749154750154751154752154753154754154755154756154757154758154759154760154761154762154763154764154765154766154767154768154769154770154771154772154773154774154775154776154777154778154779154780154781154782154783154784154785154786154787154788154789154790154791154792154793154794154795154796154797154798154799154800154801154802154803154804154805154806154807154808154809154810154811154812154813154814154815154816154817154818154819154820154821154822154823154824154825154826154827154828154829154830154831154832154833154834154835154836154837154838154839154840154841154842154843154844154845154846154847154848154849154850154851154852154853154854154855154856154857154858154859154860154861154862154863154864154865154866154867154868154869154870154871154872154873154874154875154876154877154878154879154880154881154882154883154884154885154886154887154888154889154890154891154892154893154894154895154896154897154898154899154900154901154902154903154904154905154906154907154908154909154910154911154912154913154914154915154916154917154918154919154920154921154922154923154924154925154926154927154928154929154930154931154932154933154934154935154936154937154938154939154940154941154942154943154944154945154946154947154948154949154950154951154952154953154954154955154956154957154958154959154960154961154962154963154964154965154966154967154968154969154970154971154972154973154974154975154976154977154978154979154980154981154982154983154984154985154986154987154988154989154990154991154992154993154994154995154996154997154998154999155000155001155002155003155004155005155006155007155008155009155010155011155012155013155014155015155016155017155018155019155020155021155022155023155024155025155026155027155028155029155030155031155032155033155034155035155036155037155038155039155040155041155042155043155044155045155046155047155048155049155050155051155052155053155054155055155056155057155058155059155060155061155062155063155064155065155066155067155068155069155070155071155072155073155074155075155076155077155078155079155080155081155082155083155084155085155086155087155088155089155090155091155092155093155094155095155096155097155098155099155100155101155102155103155104155105155106155107155108155109155110155111155112155113155114155115155116155117155118155119155120155121155122155123155124155125155126155127155128155129155130155131155132155133155134155135155136155137155138155139155140155141155142155143155144155145155146155147155148155149155150155151155152155153155154155155155156155157155158155159155160155161155162155163155164155165155166155167155168155169155170155171155172155173155174155175155176155177155178155179155180155181155182155183155184155185155186155187155188155189155190155191155192155193155194155195155196155197155198155199155200155201155202155203155204155205155206155207155208155209155210155211155212155213155214155215155216155217155218155219155220155221155222155223155224155225155226155227155228155229155230155231155232155233155234155235155236155237155238155239155240155241155242155243155244155245155246155247155248155249155250155251155252155253155254155255155256155257155258155259155260155261155262155263155264155265155266155267155268155269155270155271155272155273155274155275155276155277155278155279155280155281155282155283155284155285155286155287155288155289155290155291155292155293155294155295155296155297155298155299155300155301155302155303155304155305155306155307155308155309155310155311155312155313155314155315155316155317155318155319155320155321155322155323155324155325155326155327155328155329155330155331155332155333155334155335155336155337155338155339155340155341155342155343155344155345155346155347155348155349155350155351155352155353155354155355155356155357155358155359155360155361155362155363155364155365155366155367155368155369155370155371155372155373155374155375155376155377155378155379155380155381155382155383155384155385155386155387155388155389155390155391155392155393155394155395155396155397155398155399155400155401155402155403155404155405155406155407155408155409155410155411155412155413155414155415155416155417155418155419155420155421155422155423155424155425155426155427155428155429155430155431155432155433155434155435155436155437155438155439155440155441155442155443155444155445155446155447155448155449155450155451155452155453155454155455155456155457155458155459155460155461155462155463155464155465155466155467155468155469155470155471155472155473155474155475155476155477155478155479155480155481155482155483155484155485155486155487155488155489155490155491155492155493155494155495155496155497155498155499155500155501155502155503155504155505155506155507155508155509155510155511155512155513155514155515155516155517155518155519155520155521155522155523155524155525155526155527155528155529155530155531155532155533155534155535155536155537155538155539155540155541155542155543155544155545155546155547155548155549155550155551155552155553155554155555155556155557155558155559155560155561155562155563155564155565155566155567155568155569155570155571155572155573155574155575155576155577155578155579155580155581155582155583155584155585155586155587155588155589155590155591155592155593155594155595155596155597155598155599155600155601155602155603155604155605155606155607155608155609155610155611155612155613155614155615155616155617155618155619155620155621155622155623155624155625155626155627155628155629155630155631155632155633155634155635155636155637155638155639155640155641155642155643155644155645155646155647155648155649155650155651155652155653155654155655155656155657155658155659155660155661155662155663155664155665155666155667155668155669155670155671155672155673155674155675155676155677155678155679155680155681155682155683155684155685155686155687155688155689155690155691155692155693155694155695155696155697155698155699155700155701155702155703155704155705155706155707155708155709155710155711155712155713155714155715155716155717155718155719155720155721155722155723155724155725155726155727155728155729155730155731155732155733155734155735155736155737155738155739155740155741155742155743155744155745155746155747155748155749155750155751155752155753155754155755155756155757155758155759155760155761155762155763155764155765155766155767155768155769155770155771155772155773155774155775155776155777155778155779155780155781155782155783155784155785155786155787155788155789155790155791155792155793155794155795155796155797155798155799155800155801155802155803155804155805155806155807155808155809155810155811155812155813155814155815155816155817155818155819155820155821155822155823155824155825155826155827155828155829155830155831155832155833155834155835155836155837155838155839155840155841155842155843155844155845155846155847155848155849155850155851155852155853155854155855155856155857155858155859155860155861155862155863155864155865155866155867155868155869155870155871155872155873155874155875155876155877155878155879155880155881155882155883155884155885155886155887155888155889155890155891155892155893155894155895155896155897155898155899155900155901155902155903155904155905155906155907155908155909155910155911155912155913155914155915155916155917155918155919155920155921155922155923155924155925155926155927155928155929155930155931155932155933155934155935155936155937155938155939155940155941155942155943155944155945155946155947155948155949155950155951155952155953155954155955155956155957155958155959155960155961155962155963155964155965155966155967155968155969155970155971155972155973155974155975155976155977155978155979155980155981155982155983155984155985155986155987155988155989155990155991155992155993155994155995155996155997155998155999156000156001156002156003156004156005156006156007156008156009156010156011156012156013156014156015156016156017156018156019156020156021156022156023156024156025156026156027156028156029156030156031156032156033156034156035156036156037156038156039156040156041156042156043156044156045156046156047156048156049156050156051156052156053156054156055156056156057156058156059156060156061156062156063156064156065156066156067156068156069156070156071156072156073156074156075156076156077156078156079156080156081156082156083156084156085156086156087156088156089156090156091156092156093156094156095156096156097156098156099156100156101156102156103156104156105156106156107156108156109156110156111156112156113156114156115156116156117156118156119156120156121156122156123156124156125156126156127156128156129156130156131156132156133156134156135156136156137156138156139156140156141156142156143156144156145156146156147156148156149156150156151156152156153156154156155156156156157156158156159156160156161156162156163156164156165156166156167156168156169156170156171156172156173156174156175156176156177156178156179156180156181156182156183156184156185156186156187156188156189156190156191156192156193156194156195156196156197156198156199156200156201156202156203156204156205156206156207156208156209156210156211156212156213156214156215156216156217156218156219156220156221156222156223156224156225156226156227156228156229156230156231156232156233156234156235156236156237156238156239156240156241156242156243156244156245156246156247156248156249156250156251156252156253156254156255156256156257156258156259156260156261156262156263156264156265156266156267156268156269156270156271156272156273156274156275156276156277156278156279156280156281156282156283156284156285156286156287156288156289156290156291156292156293156294156295156296156297156298156299156300156301156302156303156304156305156306156307156308156309156310156311156312156313156314156315156316156317156318156319156320156321156322156323156324156325156326156327156328156329156330156331156332156333156334156335156336156337156338156339156340156341156342156343156344156345156346156347156348156349156350156351156352156353156354156355156356156357156358156359156360156361156362156363156364156365156366156367156368156369156370156371156372156373156374156375156376156377156378156379156380156381156382156383156384156385156386156387156388156389156390156391156392156393156394156395156396156397156398156399156400156401156402156403156404156405156406156407156408156409156410156411156412156413156414156415156416156417156418156419156420156421156422156423156424156425156426156427156428156429156430156431156432156433156434156435156436156437156438156439156440156441156442156443156444156445156446156447156448156449156450156451156452156453156454156455156456156457156458156459156460156461156462156463156464156465156466156467156468156469156470156471156472156473156474156475156476156477156478156479156480156481156482156483156484156485156486156487156488156489156490156491156492156493156494156495156496156497156498156499156500156501156502156503156504156505156506156507156508156509156510156511156512156513156514156515156516156517156518156519156520156521156522156523156524156525156526156527156528156529156530156531156532156533156534156535156536156537156538156539156540156541156542156543156544156545156546156547156548156549156550156551156552156553156554156555156556156557156558156559156560156561156562156563156564156565156566156567156568156569156570156571156572156573156574156575156576156577156578156579156580156581156582156583156584156585156586156587156588156589156590156591156592156593156594156595156596156597156598156599156600156601156602156603156604156605156606156607156608156609156610156611156612156613156614156615156616156617156618156619156620156621156622156623156624156625156626156627156628156629156630156631156632156633156634156635156636156637156638156639156640156641156642156643156644156645156646156647156648156649156650156651156652156653156654156655156656156657156658156659156660156661156662156663156664156665156666156667156668156669156670156671156672156673156674156675156676156677156678156679156680156681156682156683156684156685156686156687156688156689156690156691156692156693156694156695156696156697156698156699156700156701156702156703156704156705156706156707156708156709156710156711156712156713156714156715156716156717156718156719156720156721156722156723156724156725156726156727156728156729156730156731156732156733156734156735156736156737156738156739156740156741156742156743156744156745156746156747156748156749156750156751156752156753156754156755156756156757156758156759156760156761156762156763156764156765156766156767156768156769156770156771156772156773156774156775156776156777156778156779156780156781156782156783156784156785156786156787156788156789156790156791156792156793156794156795156796156797156798156799156800156801156802156803156804156805156806156807156808156809156810156811156812156813156814156815156816156817156818156819156820156821156822156823156824156825156826156827156828156829156830156831156832156833156834156835156836156837156838156839156840156841156842156843156844156845156846156847156848156849156850156851156852156853156854156855156856156857156858156859156860156861156862156863156864156865156866156867156868156869156870156871156872156873156874156875156876156877156878156879156880156881156882156883156884156885156886156887156888156889156890156891156892156893156894156895156896156897156898156899156900156901156902156903156904156905156906156907156908156909156910156911156912156913156914156915156916156917156918156919156920156921156922156923156924156925156926156927156928156929156930156931156932156933156934156935156936156937156938156939156940156941156942156943156944156945156946156947156948156949156950156951156952156953156954156955156956156957156958156959156960156961156962156963156964156965156966156967156968156969156970156971156972156973156974156975156976156977156978156979156980156981156982156983156984156985156986156987156988156989156990156991156992156993156994156995156996156997156998156999157000157001157002157003157004157005157006157007157008157009157010157011157012157013157014157015157016157017157018157019157020157021157022157023157024157025157026157027157028157029157030157031157032157033157034157035157036157037157038157039157040157041157042157043157044157045157046157047157048157049157050157051157052157053157054157055157056157057157058157059157060157061157062157063157064157065157066157067157068157069157070157071157072157073157074157075157076157077157078157079157080157081157082157083157084157085157086157087157088157089157090157091157092157093157094157095157096157097157098157099157100157101157102157103157104157105157106157107157108157109157110157111157112157113157114157115157116157117157118157119157120157121157122157123157124157125157126157127157128157129157130157131157132157133157134157135157136157137157138157139157140157141157142157143157144157145157146157147157148157149157150157151157152157153157154157155157156157157157158157159157160157161157162157163157164157165157166157167157168157169157170157171157172157173157174157175157176157177157178157179157180157181157182157183157184157185157186157187157188157189157190157191157192157193157194157195157196157197157198157199157200157201157202157203157204157205157206157207157208157209157210157211157212157213157214157215157216157217157218157219157220157221157222157223157224157225157226157227157228157229157230157231157232157233157234157235157236157237157238157239157240157241157242157243157244157245157246157247157248157249157250157251157252157253157254157255157256157257157258157259157260157261157262157263157264157265157266157267157268157269157270157271157272157273157274157275157276157277157278157279157280157281157282157283157284157285157286157287157288157289157290157291157292157293157294157295157296157297157298157299157300157301157302157303157304157305157306157307157308157309157310157311157312157313157314157315157316157317157318157319157320157321157322157323157324157325157326157327157328157329157330157331157332157333157334157335157336157337157338157339157340157341157342157343157344157345157346157347157348157349157350157351157352157353157354157355157356157357157358157359157360157361157362157363157364157365157366157367157368157369157370157371157372157373157374157375157376157377157378157379157380157381157382157383157384157385157386157387157388157389157390157391157392157393157394157395157396157397157398157399157400157401157402157403157404157405157406157407157408157409157410157411157412157413157414157415157416157417157418157419157420157421157422157423157424157425157426157427157428157429157430157431157432157433157434157435157436157437157438157439157440157441157442157443157444157445157446157447157448157449157450157451157452157453157454157455157456157457157458157459157460157461157462157463157464157465157466157467157468157469157470157471157472157473157474157475157476157477157478157479157480157481157482157483157484157485157486157487157488157489157490157491157492157493157494157495157496157497157498157499157500157501157502157503157504157505157506157507157508157509157510157511157512157513157514157515157516157517157518157519157520157521157522157523157524157525157526157527157528157529157530157531157532157533157534157535157536157537157538157539157540157541157542157543157544157545157546157547157548157549157550157551157552157553157554157555157556157557157558157559157560157561157562157563157564157565157566157567157568157569157570157571157572157573157574157575157576157577157578157579157580157581157582157583157584157585157586157587157588157589157590157591157592157593157594157595157596157597157598157599157600157601157602157603157604157605157606157607157608157609157610157611157612157613157614157615157616157617157618157619157620157621157622157623157624157625157626157627157628157629157630157631157632157633157634157635157636157637157638157639157640157641157642157643157644157645157646157647157648157649157650157651157652157653157654157655157656157657157658157659157660157661157662157663157664157665157666157667157668157669157670157671157672157673157674157675157676157677157678157679157680157681157682157683157684157685157686157687157688157689157690157691157692157693157694157695157696157697157698157699157700157701157702157703157704157705157706157707157708157709157710157711157712157713157714157715157716157717157718157719157720157721157722157723157724157725157726157727157728157729157730157731157732157733157734157735157736157737157738157739157740157741157742157743157744157745157746157747157748157749157750157751157752157753157754157755157756157757157758157759157760157761157762157763157764157765157766157767157768157769157770157771157772157773157774157775157776157777157778157779157780157781157782157783157784157785157786157787157788157789157790157791157792157793157794157795157796157797157798157799157800157801157802157803157804157805157806157807157808157809157810157811157812157813157814157815157816157817157818157819157820157821157822157823157824157825157826157827157828157829157830157831157832157833157834157835157836157837157838157839157840157841157842157843157844157845157846157847157848157849157850157851157852157853157854157855157856157857157858157859157860157861157862157863157864157865157866157867157868157869157870157871157872157873157874157875157876157877157878157879157880157881157882157883157884157885157886157887157888157889157890157891157892157893157894157895157896157897157898157899157900157901157902157903157904157905157906157907157908157909157910157911157912157913157914157915157916157917157918157919157920157921157922157923157924157925157926157927157928157929157930157931157932157933157934157935157936157937157938157939157940157941157942157943157944157945157946157947157948157949157950157951157952157953157954157955157956157957157958157959157960157961157962157963157964157965157966157967157968157969157970157971157972157973157974157975157976157977157978157979157980157981157982157983157984157985157986157987157988157989157990157991157992157993157994157995157996157997157998157999158000158001158002158003158004158005158006158007158008158009158010158011158012158013158014158015158016158017158018158019158020158021158022158023158024158025158026158027158028158029158030158031158032158033158034158035158036158037158038158039158040158041158042158043158044158045158046158047158048158049158050158051158052158053158054158055158056158057158058158059158060158061158062158063158064158065158066158067158068158069158070158071158072158073158074158075158076158077158078158079158080158081158082158083158084158085158086158087158088158089158090158091158092158093158094158095158096158097158098158099158100158101158102158103158104158105158106158107158108158109158110158111158112158113158114158115158116158117158118158119158120158121158122158123158124158125158126158127158128158129158130158131158132158133158134158135158136158137158138158139158140158141158142158143158144158145158146158147158148158149158150158151158152158153158154158155158156158157158158158159158160158161158162158163158164158165158166158167158168158169158170158171158172158173158174158175158176158177158178158179158180158181158182158183158184158185158186158187158188158189158190158191158192158193158194158195158196158197158198158199158200158201158202158203158204158205158206158207158208158209158210158211158212158213158214158215158216158217158218158219158220158221158222158223158224158225158226158227158228158229158230158231158232158233158234158235158236158237158238158239158240158241158242158243158244158245158246158247158248158249158250158251158252158253158254158255158256158257158258158259158260158261158262158263158264158265158266158267158268158269158270158271158272158273158274158275158276158277158278158279158280158281158282158283158284158285158286158287158288158289158290158291158292158293158294158295158296158297158298158299158300158301158302158303158304158305158306158307158308158309158310158311158312158313158314158315158316158317158318158319158320158321158322158323158324158325158326158327158328158329158330158331158332158333158334158335158336158337158338158339158340158341158342158343158344158345158346158347158348158349158350158351158352158353158354158355158356158357158358158359158360158361158362158363158364158365158366158367158368158369158370158371158372158373158374158375158376158377158378158379158380158381158382158383158384158385158386158387158388158389158390158391158392158393158394158395158396158397158398158399158400158401158402158403158404158405158406158407158408158409158410158411158412158413158414158415158416158417158418158419158420158421158422158423158424158425158426158427158428158429158430158431158432158433158434158435158436158437158438158439158440158441158442158443158444158445158446158447158448158449158450158451158452158453158454158455158456158457158458158459158460158461158462158463158464158465158466158467158468158469158470158471158472158473158474158475158476158477158478158479158480158481158482158483158484158485158486158487158488158489158490158491158492158493158494158495158496158497158498158499158500158501158502158503158504158505158506158507158508158509158510158511158512158513158514158515158516158517158518158519158520158521158522158523158524158525158526158527158528158529158530158531158532158533158534158535158536158537158538158539158540158541158542158543158544158545158546158547158548158549158550158551158552158553158554158555158556158557158558158559158560158561158562158563158564158565158566158567158568158569158570158571158572158573158574158575158576158577158578158579158580158581158582158583158584158585158586158587158588158589158590158591158592158593158594158595158596158597158598158599158600158601158602158603158604158605158606158607158608158609158610158611158612158613158614158615158616158617158618158619158620158621158622158623158624158625158626158627158628158629158630158631158632158633158634158635158636158637158638158639158640158641158642158643158644158645158646158647158648158649158650158651158652158653158654158655158656158657158658158659158660158661158662158663158664158665158666158667158668158669158670158671158672158673158674158675158676158677158678158679158680158681158682158683158684158685158686158687158688158689158690158691158692158693158694158695158696158697158698158699158700158701158702158703158704158705158706158707158708158709158710158711158712158713158714158715158716158717158718158719158720158721158722158723158724158725158726158727158728158729158730158731158732158733158734158735158736158737158738158739158740158741158742158743158744158745158746158747158748158749158750158751158752158753158754158755158756158757158758158759158760158761158762158763158764158765158766158767158768158769158770158771158772158773158774158775158776158777158778158779158780158781158782158783158784158785158786158787158788158789158790158791158792158793158794158795158796158797158798158799158800158801158802158803158804158805158806158807158808158809158810158811158812158813158814158815158816158817158818158819158820158821158822158823158824158825158826158827158828158829158830158831158832158833158834158835158836158837158838158839158840158841158842158843158844158845158846158847158848158849158850158851158852158853158854158855158856158857158858158859158860158861158862158863158864158865158866158867158868158869158870158871158872158873158874158875158876158877158878158879158880158881158882158883158884158885158886158887158888158889158890158891158892158893158894158895158896158897158898158899158900158901158902158903158904158905158906158907158908158909158910158911158912158913158914158915158916158917158918158919158920158921158922158923158924158925158926158927158928158929158930158931158932158933158934158935158936158937158938158939158940158941158942158943158944158945158946158947158948158949158950158951158952158953158954158955158956158957158958158959158960158961158962158963158964158965158966158967158968158969158970158971158972158973158974158975158976158977158978158979158980158981158982158983158984158985158986158987158988158989158990158991158992158993158994158995158996158997158998158999159000159001159002159003159004159005159006159007159008159009159010159011159012159013159014159015159016159017159018159019159020159021159022159023159024159025159026159027159028159029159030159031159032159033159034159035159036159037159038159039159040159041159042159043159044159045159046159047159048159049159050159051159052159053159054159055159056159057159058159059159060159061159062159063159064159065159066159067159068159069159070159071159072159073159074159075159076159077159078159079159080159081159082159083159084159085159086159087159088159089159090159091159092159093159094159095159096159097159098159099159100159101159102159103159104159105159106159107159108159109159110159111159112159113159114159115159116159117159118159119159120159121159122159123159124159125159126159127159128159129159130159131159132159133159134159135159136159137159138159139159140159141159142159143159144159145159146159147159148159149159150159151159152159153159154159155159156159157159158159159159160159161159162159163159164159165159166159167159168159169159170159171159172159173159174159175159176159177159178159179159180159181159182159183159184159185159186159187159188159189159190159191159192159193159194159195159196159197159198159199159200159201159202159203159204159205159206159207159208159209159210159211159212159213159214159215159216159217159218159219159220159221159222159223159224159225159226159227159228159229159230159231159232159233159234159235159236159237159238159239159240159241159242159243159244159245159246159247159248159249159250159251159252159253159254159255159256159257159258159259159260159261159262159263159264159265159266159267159268159269159270159271159272159273159274159275159276159277159278159279159280159281159282159283159284159285159286159287159288159289159290159291159292159293159294159295159296159297159298159299159300159301159302159303159304159305159306159307159308159309159310159311159312159313159314159315159316159317159318159319159320159321159322159323159324159325159326159327159328159329159330159331159332159333159334159335159336159337159338159339159340159341159342159343159344159345159346159347159348159349159350159351159352159353159354159355159356159357159358159359159360159361159362159363159364159365159366159367159368159369159370159371159372159373159374159375159376159377159378159379159380159381159382159383159384159385159386159387159388159389159390159391159392159393159394159395159396159397159398159399159400159401159402159403159404159405159406159407159408159409159410159411159412159413159414159415159416159417159418159419159420159421159422159423159424159425159426159427159428159429159430159431159432159433159434159435159436159437159438159439159440159441159442159443159444159445159446159447159448159449159450159451159452159453159454159455159456159457159458159459159460159461159462159463159464159465159466159467159468159469159470159471159472159473159474159475159476159477159478159479159480159481159482159483159484159485159486159487159488159489159490159491159492159493159494159495159496159497159498159499159500159501159502159503159504159505159506159507159508159509159510159511159512159513159514159515159516159517159518159519159520159521159522159523159524159525159526159527159528159529159530159531159532159533159534159535159536159537159538159539159540159541159542159543159544159545159546159547159548159549159550159551159552159553159554159555159556159557159558159559159560159561159562159563159564159565159566159567159568159569159570159571159572159573159574159575159576159577159578159579159580159581159582159583159584159585159586159587159588159589159590159591159592159593159594159595159596159597159598159599159600159601159602159603159604159605159606159607159608159609159610159611159612159613159614159615159616159617159618159619159620159621159622159623159624159625159626159627159628159629159630159631159632159633159634159635159636159637159638159639159640159641159642159643159644159645159646159647159648159649159650159651159652159653159654159655159656159657159658159659159660159661159662159663159664159665159666159667159668159669159670159671159672159673159674159675159676159677159678159679159680159681159682159683159684159685159686159687159688159689159690159691159692159693159694159695159696159697159698159699159700159701159702159703159704159705159706159707159708159709159710159711159712159713159714159715159716159717159718159719159720159721159722159723159724159725159726159727159728159729159730159731159732159733159734159735159736159737159738159739159740159741159742159743159744159745159746159747159748159749159750159751159752159753159754159755159756159757159758159759159760159761159762159763159764159765159766159767159768159769159770159771159772159773159774159775159776159777159778159779159780159781159782159783159784159785159786159787159788159789159790159791159792159793159794159795159796159797159798159799159800159801159802159803159804159805159806159807159808159809159810159811159812159813159814159815159816159817159818159819159820159821159822159823159824159825159826159827159828159829159830159831159832159833159834159835159836159837159838159839159840159841159842159843159844159845159846159847159848159849159850159851159852159853159854159855159856159857159858159859159860159861159862159863159864159865159866159867159868159869159870159871159872159873159874159875159876159877159878159879159880159881159882159883159884159885159886159887159888159889159890159891159892159893159894159895159896159897159898159899159900159901159902159903159904159905159906159907159908159909159910159911159912159913159914159915159916159917159918159919159920159921159922159923159924159925159926159927159928159929159930159931159932159933159934159935159936159937159938159939159940159941159942159943159944159945159946159947159948159949159950159951159952159953159954159955159956159957159958159959159960159961159962159963159964159965159966159967159968159969159970159971159972159973159974159975159976159977159978159979159980159981159982159983159984159985159986159987159988159989159990159991159992159993159994159995159996159997159998159999160000160001160002160003160004160005160006160007160008160009160010160011160012160013160014160015160016160017160018160019160020160021160022160023160024160025160026160027160028160029160030160031160032160033160034160035160036160037160038160039160040160041160042160043160044160045160046160047160048160049160050160051160052160053160054160055160056160057160058160059160060160061160062160063160064160065160066160067160068160069160070160071160072160073160074160075160076160077160078160079160080160081160082160083160084160085160086160087160088160089160090160091160092160093160094160095160096160097160098160099160100160101160102160103160104160105160106160107160108160109160110160111160112160113160114160115160116160117160118160119160120160121160122160123160124160125160126160127160128160129160130160131160132160133160134160135160136160137160138160139160140160141160142160143160144160145160146160147160148160149160150160151160152160153160154160155160156160157160158160159160160160161160162160163160164160165160166160167160168160169160170160171160172160173160174160175160176160177160178160179160180160181160182160183160184160185160186160187160188160189160190160191160192160193160194160195160196160197160198160199160200160201160202160203160204160205160206160207160208160209160210160211160212160213160214160215160216160217160218160219160220160221160222160223160224160225160226160227160228160229160230160231160232160233160234160235160236160237160238160239160240160241160242160243160244160245160246160247160248160249160250160251160252160253160254160255160256160257160258160259160260160261160262160263160264160265160266160267160268160269160270160271160272160273160274160275160276160277160278160279160280160281160282160283160284160285160286160287160288160289160290160291160292160293160294160295160296160297160298160299160300160301160302160303160304160305160306160307160308160309160310160311160312160313160314160315160316160317160318160319160320160321160322160323160324160325160326160327160328160329160330160331160332160333160334160335160336160337160338160339160340160341160342160343160344160345160346160347160348160349160350160351160352160353160354160355160356160357160358160359160360160361160362160363160364160365160366160367160368160369160370160371160372160373160374160375160376160377160378160379160380160381160382160383160384160385160386160387160388160389160390160391160392160393160394160395160396160397160398160399160400160401160402160403160404160405160406160407160408160409160410160411160412160413160414160415160416160417160418160419160420160421160422160423160424160425160426160427160428160429160430160431160432160433160434160435160436160437160438160439160440160441160442160443160444160445160446160447160448160449160450160451160452160453160454160455160456160457160458160459160460160461160462160463160464160465160466160467160468160469160470160471160472160473160474160475160476160477160478160479160480160481160482160483160484160485160486160487160488160489160490160491160492160493160494160495160496160497160498160499160500160501160502160503160504160505160506160507160508160509160510160511160512160513160514160515160516160517160518160519160520160521160522160523160524160525160526160527160528160529160530160531160532160533160534160535160536160537160538160539160540160541160542160543160544160545160546160547160548160549160550160551160552160553160554160555160556160557160558160559160560160561160562160563160564160565160566160567160568160569160570160571160572160573160574160575160576160577160578160579160580160581160582160583160584160585160586160587160588160589160590160591160592160593160594160595160596160597160598160599160600160601160602160603160604160605160606160607160608160609160610160611160612160613160614160615160616160617160618160619160620160621160622160623160624160625160626160627160628160629160630160631160632160633160634160635160636160637160638160639160640160641160642160643160644160645160646160647160648160649160650160651160652160653160654160655160656160657160658160659160660160661160662160663160664160665160666160667160668160669160670160671160672160673160674160675160676160677160678160679160680160681160682160683160684160685160686160687160688160689160690160691160692160693160694160695160696160697160698160699160700160701160702160703160704160705160706160707160708160709160710160711160712160713160714160715160716160717160718160719160720160721160722160723160724160725160726160727160728160729160730160731160732160733160734160735160736160737160738160739160740160741160742160743160744160745160746160747160748160749160750160751160752160753160754160755160756160757160758160759160760160761160762160763160764160765160766160767160768160769160770160771160772160773160774160775160776160777160778160779160780160781160782160783160784160785160786160787160788160789160790160791160792160793160794160795160796160797160798160799160800160801160802160803160804160805160806160807160808160809160810160811160812160813160814160815160816160817160818160819160820160821160822160823160824160825160826160827160828160829160830160831160832160833160834160835160836160837160838160839160840160841160842160843160844160845160846160847160848160849160850160851160852160853160854160855160856160857160858160859160860160861160862160863160864160865160866160867160868160869160870160871160872160873160874160875160876160877160878160879160880160881160882160883160884160885160886160887160888160889160890160891160892160893160894160895160896160897160898160899160900160901160902160903160904160905160906160907160908160909160910160911160912160913160914160915160916160917160918160919160920160921160922160923160924160925160926160927160928160929160930160931160932160933160934160935160936160937160938160939160940160941160942160943160944160945160946160947160948160949160950160951160952160953160954160955160956160957160958160959160960160961160962160963160964160965160966160967160968160969160970160971160972160973160974160975160976160977160978160979160980160981160982160983160984160985160986160987160988160989160990160991160992160993160994160995160996160997160998160999161000161001161002161003161004161005161006161007161008161009161010161011161012161013161014161015161016161017161018161019161020161021161022161023161024161025161026161027161028161029161030161031161032161033161034161035161036161037161038161039161040161041161042161043161044161045161046161047161048161049161050161051161052161053161054161055161056161057161058161059161060161061161062161063161064161065161066161067161068161069161070161071161072161073161074161075161076161077161078161079161080161081161082161083161084161085161086161087161088161089161090161091161092161093161094161095161096161097161098161099161100161101161102161103161104161105161106161107161108161109161110161111161112161113161114161115161116161117161118161119161120161121161122161123161124161125161126161127161128161129161130161131161132161133161134161135161136161137161138161139161140161141161142161143161144161145161146161147161148161149161150161151161152161153161154161155161156161157161158161159161160161161161162161163161164161165161166161167161168161169161170161171161172161173161174161175161176161177161178161179161180161181161182161183161184161185161186161187161188161189161190161191161192161193161194161195161196161197161198161199161200161201161202161203161204161205161206161207161208161209161210161211161212161213161214161215161216161217161218161219161220161221161222161223161224161225161226161227161228161229161230161231161232161233161234161235161236161237161238161239161240161241161242161243161244161245161246161247161248161249161250161251161252161253161254161255161256161257161258161259161260161261161262161263161264161265161266161267161268161269161270161271161272161273161274161275161276161277161278161279161280161281161282161283161284161285161286161287161288161289161290161291161292161293161294161295161296161297161298161299161300161301161302161303161304161305161306161307161308161309161310161311161312161313161314161315161316161317161318161319161320161321161322161323161324161325161326161327161328161329161330161331161332161333161334161335161336161337161338161339161340161341161342161343161344161345161346161347161348161349161350161351161352161353161354161355161356161357161358161359161360161361161362161363161364161365161366161367161368161369161370161371161372161373161374161375161376161377161378161379161380161381161382161383161384161385161386161387161388161389161390161391161392161393161394161395161396161397161398161399161400161401161402161403161404161405161406161407161408161409161410161411161412161413161414161415161416161417161418161419161420161421161422161423161424161425161426161427161428161429161430161431161432161433161434161435161436161437161438161439161440161441161442161443161444161445161446161447161448161449161450161451161452161453161454161455161456161457161458161459161460161461161462161463161464161465161466161467161468161469161470161471161472161473161474161475161476161477161478161479161480161481161482161483161484161485161486161487161488161489161490161491161492161493161494161495161496161497161498161499161500161501161502161503161504161505161506161507161508161509161510161511161512161513161514161515161516161517161518161519161520161521161522161523161524161525161526161527161528161529161530161531161532161533161534161535161536161537161538161539161540161541161542161543161544161545161546161547161548161549161550161551161552161553161554161555161556161557161558161559161560161561161562161563161564161565161566161567161568161569161570161571161572161573161574161575161576161577161578161579161580161581161582161583161584161585161586161587161588161589161590161591161592161593161594161595161596161597161598161599161600161601161602161603161604161605161606161607161608161609161610161611161612161613161614161615161616161617161618161619161620161621161622161623161624161625161626161627161628161629161630161631161632161633161634161635161636161637161638161639161640161641161642161643161644161645161646161647161648161649161650161651161652161653161654161655161656161657161658161659161660161661161662161663161664161665161666161667161668161669161670161671161672161673161674161675161676161677161678161679161680161681161682161683161684161685161686161687161688161689161690161691161692161693161694161695161696161697161698161699161700161701161702161703161704161705161706161707161708161709161710161711161712161713161714161715161716161717161718161719161720161721161722161723161724161725161726161727161728161729161730161731161732161733161734161735161736161737161738161739161740161741161742161743161744161745161746161747161748161749161750161751161752161753161754161755161756161757161758161759161760161761161762161763161764161765161766161767161768161769161770161771161772161773161774161775161776161777161778161779161780161781161782161783161784161785161786161787161788161789161790161791161792161793161794161795161796161797161798161799161800161801161802161803161804161805161806161807161808161809161810161811161812161813161814161815161816161817161818161819161820161821161822161823161824161825161826161827161828161829161830161831161832161833161834161835161836161837161838161839161840161841161842161843161844161845161846161847161848161849161850161851161852161853161854161855161856161857161858161859161860161861161862161863161864161865161866161867161868161869161870161871161872161873161874161875161876161877161878161879161880161881161882161883161884161885161886161887161888161889161890161891161892161893161894161895161896161897161898161899161900161901161902161903161904161905161906161907161908161909161910161911161912161913161914161915161916161917161918161919161920161921161922161923161924161925161926161927161928161929161930161931161932161933161934161935161936161937161938161939161940161941161942161943161944161945161946161947161948161949161950161951161952161953161954161955161956161957161958161959161960161961161962161963161964161965161966161967161968161969161970161971161972161973161974161975161976161977161978161979161980161981161982161983161984161985161986161987161988161989161990161991161992161993161994161995161996161997161998161999162000162001162002162003162004162005162006162007162008162009162010162011162012162013162014162015162016162017162018162019162020162021162022162023162024162025162026162027162028162029162030162031162032162033162034162035162036162037162038162039162040162041162042162043162044162045162046162047162048162049162050162051162052162053162054162055162056162057162058162059162060162061162062162063162064162065162066162067162068162069162070162071162072162073162074162075162076162077162078162079162080162081162082162083162084162085162086162087162088162089162090162091162092162093162094162095162096162097162098162099162100162101162102162103162104162105162106162107162108162109162110162111162112162113162114162115162116162117162118162119162120162121162122162123162124162125162126162127162128162129162130162131162132162133162134162135162136162137162138162139162140162141162142162143162144162145162146162147162148162149162150162151162152162153162154162155162156162157162158162159162160162161162162162163162164162165162166162167162168162169162170162171162172162173162174162175162176162177162178162179162180162181162182162183162184162185162186162187162188162189162190162191162192162193162194162195162196162197162198162199162200162201162202162203162204162205162206162207162208162209162210162211162212162213162214162215162216162217162218162219162220162221162222162223162224162225162226162227162228162229162230162231162232162233162234162235162236162237162238162239162240162241162242162243162244162245162246162247162248162249162250162251162252162253162254162255162256162257162258162259162260162261162262162263162264162265162266162267162268162269162270162271162272162273162274162275162276162277162278162279162280162281162282162283162284162285162286162287162288162289162290162291162292162293162294162295162296162297162298162299162300162301162302162303162304162305162306162307162308162309162310162311162312162313162314162315162316162317162318162319162320162321162322162323162324162325162326162327162328162329162330162331162332162333162334162335162336162337162338162339162340162341162342162343162344162345162346162347162348162349162350162351162352162353162354162355162356162357162358162359162360162361162362162363162364162365162366162367162368162369162370162371162372162373162374162375162376162377162378162379162380162381162382162383162384162385162386162387162388162389162390162391162392162393162394162395162396162397162398162399162400162401162402162403162404162405162406162407162408162409162410162411162412162413162414162415162416162417162418162419162420162421162422162423162424162425162426162427162428162429162430162431162432162433162434162435162436162437162438162439162440162441162442162443162444162445162446162447162448162449162450162451162452162453162454162455162456162457162458162459162460162461162462162463162464162465162466162467162468162469162470162471162472162473162474162475162476162477162478162479162480162481162482162483162484162485162486162487162488162489162490162491162492162493162494162495162496162497162498162499162500162501162502162503162504162505162506162507162508162509162510162511162512162513162514162515162516162517162518162519162520162521162522162523162524162525162526162527162528162529162530162531162532162533162534162535162536162537162538162539162540162541162542162543162544162545162546162547162548162549162550162551162552162553162554162555162556162557162558162559162560162561162562162563162564162565162566162567162568162569162570162571162572162573162574162575162576162577162578162579162580162581162582162583162584162585162586162587162588162589162590162591162592162593162594162595162596162597162598162599162600162601162602162603162604162605162606162607162608162609162610162611162612162613162614162615162616162617162618162619162620162621162622162623162624162625162626162627162628162629162630162631162632162633162634162635162636162637162638162639162640162641162642162643162644162645162646162647162648162649162650162651162652162653162654162655162656162657162658162659162660162661162662162663162664162665162666162667162668162669162670162671162672162673162674162675162676162677162678162679162680162681162682162683162684162685162686162687162688162689162690162691162692162693162694162695162696162697162698162699162700162701162702162703162704162705162706162707162708162709162710162711162712162713162714162715162716162717162718162719162720162721162722162723162724162725162726162727162728162729162730162731162732162733162734162735162736162737162738162739162740162741162742162743162744162745162746162747162748162749162750162751162752162753162754162755162756162757162758162759162760162761162762162763162764162765162766162767162768162769162770162771162772162773162774162775162776162777162778162779162780162781162782162783162784162785162786162787162788162789162790162791162792162793162794162795162796162797162798162799162800162801162802162803162804162805162806162807162808162809162810162811162812162813162814162815162816162817162818162819162820162821162822162823162824162825162826162827162828162829162830162831162832162833162834162835162836162837162838162839162840162841162842162843162844162845162846162847162848162849162850162851162852162853162854162855162856162857162858162859162860162861162862162863162864162865162866162867162868162869162870162871162872162873162874162875162876162877162878162879162880162881162882162883162884162885162886162887162888162889162890162891162892162893162894162895162896162897162898162899162900162901162902162903162904162905162906162907162908162909162910162911162912162913162914162915162916162917162918162919162920162921162922162923162924162925162926162927162928162929162930162931162932162933162934162935162936162937162938162939162940162941162942162943162944162945162946162947162948162949162950162951162952162953162954162955162956162957162958162959162960162961162962162963162964162965162966162967162968162969162970162971162972162973162974162975162976162977162978162979162980162981162982162983162984162985162986162987162988162989162990162991162992162993162994162995162996162997162998162999163000163001163002163003163004163005163006163007163008163009163010163011163012163013163014163015163016163017163018163019163020163021163022163023163024163025163026163027163028163029163030163031163032163033163034163035163036163037163038163039163040163041163042163043163044163045163046163047163048163049163050163051163052163053163054163055163056163057163058163059163060163061163062163063163064163065163066163067163068163069163070163071163072163073163074163075163076163077163078163079163080163081163082163083163084163085163086163087163088163089163090163091163092163093163094163095163096163097163098163099163100163101163102163103163104163105163106163107163108163109163110163111163112163113163114163115163116163117163118163119163120163121163122163123163124163125163126163127163128163129163130163131163132163133163134163135163136163137163138163139163140163141163142163143163144163145163146163147163148163149163150163151163152163153163154163155163156163157163158163159163160163161163162163163163164163165163166163167163168163169163170163171163172163173163174163175163176163177163178163179163180163181163182163183163184163185163186163187163188163189163190163191163192163193163194163195163196163197163198163199163200163201163202163203163204163205163206163207163208163209163210163211163212163213163214163215163216163217163218163219163220163221163222163223163224163225163226163227163228163229163230163231163232163233163234163235163236163237163238163239163240163241163242163243163244163245163246163247163248163249163250163251163252163253163254163255163256163257163258163259163260163261163262163263163264163265163266163267163268163269163270163271163272163273163274163275163276163277163278163279163280163281163282163283163284163285163286163287163288163289163290163291163292163293163294163295163296163297163298163299163300163301163302163303163304163305163306163307163308163309163310163311163312163313163314163315163316163317163318163319163320163321163322163323163324163325163326163327163328163329163330163331163332163333163334163335163336163337163338163339163340163341163342163343163344163345163346163347163348163349163350163351163352163353163354163355163356163357163358163359163360163361163362163363163364163365163366163367163368163369163370163371163372163373163374163375163376163377163378163379163380163381163382163383163384163385163386163387163388163389163390163391163392163393163394163395163396163397163398163399163400163401163402163403163404163405163406163407163408163409163410163411163412163413163414163415163416163417163418163419163420163421163422163423163424163425163426163427163428163429163430163431163432163433163434163435163436163437163438163439163440163441163442163443163444163445163446163447163448163449163450163451163452163453163454163455163456163457163458163459163460163461163462163463163464163465163466163467163468163469163470163471163472163473163474163475163476163477163478163479163480163481163482163483163484163485163486163487163488163489163490163491163492163493163494163495163496163497163498163499163500163501163502163503163504163505163506163507163508163509163510163511163512163513163514163515163516163517163518163519163520163521163522163523163524163525163526163527163528163529163530163531163532163533163534163535163536163537163538163539163540163541163542163543163544163545163546163547163548163549163550163551163552163553163554163555163556163557163558163559163560163561163562163563163564163565163566163567163568163569163570163571163572163573163574163575163576163577163578163579163580163581163582163583163584163585163586163587163588163589163590163591163592163593163594163595163596163597163598163599163600163601163602163603163604163605163606163607163608163609163610163611163612163613163614163615163616163617163618163619163620163621163622163623163624163625163626163627163628163629163630163631163632163633163634163635163636163637163638163639163640163641163642163643163644163645163646163647163648163649163650163651163652163653163654163655163656163657163658163659163660163661163662163663163664163665163666163667163668163669163670163671163672163673163674163675163676163677163678163679163680163681163682163683163684163685163686163687163688163689163690163691163692163693163694163695163696163697163698163699163700163701163702163703163704163705163706163707163708163709163710163711163712163713163714163715163716163717163718163719163720163721163722163723163724163725163726163727163728163729163730163731163732163733163734163735163736163737163738163739163740163741163742163743163744163745163746163747163748163749163750163751163752163753163754163755163756163757163758163759163760163761163762163763163764163765163766163767163768163769163770163771163772163773163774163775163776163777163778163779163780163781163782163783163784163785163786163787163788163789163790163791163792163793163794163795163796163797163798163799163800163801163802163803163804163805163806163807163808163809163810163811163812163813163814163815163816163817163818163819163820163821163822163823163824163825163826163827163828163829163830163831163832163833163834163835163836163837163838163839163840163841163842163843163844163845163846163847163848163849163850163851163852163853163854163855163856163857163858163859163860163861163862163863163864163865163866163867163868163869163870163871163872163873163874163875163876163877163878163879163880163881163882163883163884163885163886163887163888163889163890163891163892163893163894163895163896163897163898163899163900163901163902163903163904163905163906163907163908163909163910163911163912163913163914163915163916163917163918163919163920163921163922163923163924163925163926163927163928163929163930163931163932163933163934163935163936163937163938163939163940163941163942163943163944163945163946163947163948163949163950163951163952163953163954163955163956163957163958163959163960163961163962163963163964163965163966163967163968163969163970163971163972163973163974163975163976163977163978163979163980163981163982163983163984163985163986163987163988163989163990163991163992163993163994163995163996163997163998163999164000164001164002164003164004164005164006164007164008164009164010164011164012164013164014164015164016164017164018164019164020164021164022164023164024164025164026164027164028164029164030164031164032164033164034164035164036164037164038164039164040164041164042164043164044164045164046164047164048164049164050164051164052164053164054164055164056164057164058164059164060164061164062164063164064164065164066164067164068164069164070164071164072164073164074164075164076164077164078164079164080164081164082164083164084164085164086164087164088164089164090164091164092164093164094164095164096164097164098164099164100164101164102164103164104164105164106164107164108164109164110164111164112164113164114164115164116164117164118164119164120164121164122164123164124164125164126164127164128164129164130164131164132164133164134164135164136164137164138164139164140164141164142164143164144164145164146164147164148164149164150164151164152164153164154164155164156164157164158164159164160164161164162164163164164164165164166164167164168164169164170164171164172164173164174164175164176164177164178164179164180164181164182164183164184164185164186164187164188164189164190164191164192164193164194164195164196164197164198164199164200164201164202164203164204164205164206164207164208164209164210164211164212164213164214164215164216164217164218164219164220164221164222164223164224164225164226164227164228164229164230164231164232164233164234164235164236164237164238164239164240164241164242164243164244164245164246164247164248164249164250164251164252164253164254164255164256164257164258164259164260164261164262164263164264164265164266164267164268164269164270164271164272164273164274164275164276164277164278164279164280164281164282164283164284164285164286164287164288164289164290164291164292164293164294164295164296164297164298164299164300164301164302164303164304164305164306164307164308164309164310164311164312164313164314164315164316164317164318164319164320164321164322164323164324164325164326164327164328164329164330164331164332164333164334164335164336164337164338164339164340164341164342164343164344164345164346164347164348164349164350164351164352164353164354164355164356164357164358164359164360164361164362164363164364164365164366164367164368164369164370164371164372164373164374164375164376164377164378164379164380164381164382164383164384164385164386164387164388164389164390164391164392164393164394164395164396164397164398164399164400164401164402164403164404164405164406164407164408164409164410164411164412164413164414164415164416164417164418164419164420164421164422164423164424164425164426164427164428164429164430164431164432164433164434164435164436164437164438164439164440164441164442164443164444164445164446164447164448164449164450164451164452164453164454164455164456164457164458164459164460164461164462164463164464164465164466164467164468164469164470164471164472164473164474164475164476164477164478164479164480164481164482164483164484164485164486164487164488164489164490164491164492164493164494164495164496164497164498164499164500164501164502164503164504164505164506164507164508164509164510164511164512164513164514164515164516164517164518164519164520164521164522164523164524164525164526164527164528164529164530164531164532164533164534164535164536164537164538164539164540164541164542164543164544164545164546164547164548164549164550164551164552164553164554164555164556164557164558164559164560164561164562164563164564164565164566164567164568164569164570164571164572164573164574164575164576164577164578164579164580164581164582164583164584164585164586164587164588164589164590164591164592164593164594164595164596164597164598164599164600164601164602164603164604164605164606164607164608164609164610164611164612164613164614164615164616164617164618164619164620164621164622164623164624164625164626164627164628164629164630164631164632164633164634164635164636164637164638164639164640164641164642164643164644164645164646164647164648164649164650164651164652164653164654164655164656164657164658164659164660164661164662164663164664164665164666164667164668164669164670164671164672164673164674164675164676164677164678164679164680164681164682164683164684164685164686164687164688164689164690164691164692164693164694164695164696164697164698164699164700164701164702164703164704164705164706164707164708164709164710164711164712164713164714164715164716164717164718164719164720164721164722164723164724164725164726164727164728164729164730164731164732164733164734164735164736164737164738164739164740164741164742164743164744164745164746164747164748164749164750164751164752164753164754164755164756164757164758164759164760164761164762164763164764164765164766164767164768164769164770164771164772164773164774164775164776164777164778164779164780164781164782164783164784164785164786164787164788164789164790164791164792164793164794164795164796164797164798164799164800164801164802164803164804164805164806164807164808164809164810164811164812164813164814164815164816164817164818164819164820164821164822164823164824164825164826164827164828164829164830164831164832164833164834164835164836164837164838164839164840164841164842164843164844164845164846164847164848164849164850164851164852164853164854164855164856164857164858164859164860164861164862164863164864164865164866164867164868164869164870164871164872164873164874164875164876164877164878164879164880164881164882164883164884164885164886164887164888164889164890164891164892164893164894164895164896164897164898164899164900164901164902164903164904164905164906164907164908164909164910164911164912164913164914164915164916164917164918164919164920164921164922164923164924164925164926164927164928164929164930164931164932164933164934164935164936164937164938164939164940164941164942164943164944164945164946164947164948164949164950164951164952164953164954164955164956164957164958164959164960164961164962164963164964164965164966164967164968164969164970164971164972164973164974164975164976164977164978164979164980164981164982164983164984164985164986164987164988164989164990164991164992164993164994164995164996164997164998164999165000165001165002165003165004165005165006165007165008165009165010165011165012165013165014165015165016165017165018165019165020165021165022165023165024165025165026165027165028165029165030165031165032165033165034165035165036165037165038165039165040165041165042165043165044165045165046165047165048165049165050165051165052165053165054165055165056165057165058165059165060165061165062165063165064165065165066165067165068165069165070165071165072165073165074165075165076165077165078165079165080165081165082165083165084165085165086165087165088165089165090165091165092165093165094165095165096165097165098165099165100165101165102165103165104165105165106165107165108165109165110165111165112165113165114165115165116165117165118165119165120165121165122165123165124165125165126165127165128165129165130165131165132165133165134165135165136165137165138165139165140165141165142165143165144165145165146165147165148165149165150165151165152165153165154165155165156165157165158165159165160165161165162165163165164165165165166165167165168165169165170165171165172165173165174165175165176165177165178165179165180165181165182165183165184165185165186165187165188165189165190165191165192165193165194165195165196165197165198165199165200165201165202165203165204165205165206165207165208165209165210165211165212165213165214165215165216165217165218165219165220165221165222165223165224165225165226165227165228165229165230165231165232165233165234165235165236165237165238165239165240165241165242165243165244165245165246165247165248165249165250165251165252165253165254165255165256165257165258165259165260165261165262165263165264165265165266165267165268165269165270165271165272165273165274165275165276165277165278165279165280165281165282165283165284165285165286165287165288165289165290165291165292165293165294165295165296165297165298165299165300165301165302165303165304165305165306165307165308165309165310165311165312165313165314165315165316165317165318165319165320165321165322165323165324165325165326165327165328165329165330165331165332165333165334165335165336165337165338165339165340165341165342165343165344165345165346165347165348165349165350165351165352165353165354165355165356165357165358165359165360165361165362165363165364165365165366165367165368165369165370165371165372165373165374165375165376165377165378165379165380165381165382165383165384165385165386165387165388165389165390165391165392165393165394165395165396165397165398165399165400165401165402165403165404165405165406165407165408165409165410165411165412165413165414165415165416165417165418165419165420165421165422165423165424165425165426165427165428165429165430165431165432165433165434165435165436165437165438165439165440165441165442165443165444165445165446165447165448165449165450165451165452165453165454165455165456165457165458165459165460165461165462165463165464165465165466165467165468165469165470165471165472165473165474165475165476165477165478165479165480165481165482165483165484165485165486165487165488165489165490165491165492165493165494165495165496165497165498165499165500165501165502165503165504165505165506165507165508165509165510165511165512165513165514165515165516165517165518165519165520165521165522165523165524165525165526165527165528165529165530165531165532165533165534165535165536165537165538165539165540165541165542165543165544165545165546165547165548165549165550165551165552165553165554165555165556165557165558165559165560165561165562165563165564165565165566165567165568165569165570165571165572165573165574165575165576165577165578165579165580165581165582165583165584165585165586165587165588165589165590165591165592165593165594165595165596165597165598165599165600165601165602165603165604165605165606165607165608165609165610165611165612165613165614165615165616165617165618165619165620165621165622165623165624165625165626165627165628165629165630165631165632165633165634165635165636165637165638165639165640165641165642165643165644165645165646165647165648165649165650165651165652165653165654165655165656165657165658165659165660165661165662165663165664165665165666165667165668165669165670165671165672165673165674165675165676165677165678165679165680165681165682165683165684165685165686165687165688165689165690165691165692165693165694165695165696165697165698165699165700165701165702165703165704165705165706165707165708165709165710165711165712165713165714165715165716165717165718165719165720165721165722165723165724165725165726165727165728165729165730165731165732165733165734165735165736165737165738165739165740165741165742165743165744165745165746165747165748165749165750165751165752165753165754165755165756165757165758165759165760165761165762165763165764165765165766165767165768165769165770165771165772165773165774165775165776165777165778165779165780165781165782165783165784165785165786165787165788165789165790165791165792165793165794165795165796165797165798165799165800165801165802165803165804165805165806165807165808165809165810165811165812165813165814165815165816165817165818165819165820165821165822165823165824165825165826165827165828165829165830165831165832165833165834165835165836165837165838165839165840165841165842165843165844165845165846165847165848165849165850165851165852165853165854165855165856165857165858165859165860165861165862165863165864165865165866165867165868165869165870165871165872165873165874165875165876165877165878165879165880165881165882165883165884165885165886165887165888165889165890165891165892165893165894165895165896165897165898165899165900165901165902165903165904165905165906165907165908165909165910165911165912165913165914165915165916165917165918165919165920165921165922165923165924165925165926165927165928165929165930165931165932165933165934165935165936165937165938165939165940165941165942165943165944165945165946165947165948165949165950165951165952165953165954165955165956165957165958165959165960165961165962165963165964165965165966165967165968165969165970165971165972165973165974165975165976165977165978165979165980165981165982165983165984165985165986165987165988165989165990165991165992165993165994165995165996165997165998165999166000166001166002166003166004166005166006166007166008166009166010166011166012166013166014166015166016166017166018166019166020166021166022166023166024166025166026166027166028166029166030166031166032166033166034166035166036166037166038166039166040166041166042166043166044166045166046166047166048166049166050166051166052166053166054166055166056166057166058166059166060166061166062166063166064166065166066166067166068166069166070166071166072166073166074166075166076166077166078166079166080166081166082166083166084166085166086166087166088166089166090166091166092166093166094166095166096166097166098166099166100166101166102166103166104166105166106166107166108166109166110166111166112166113166114166115166116166117166118166119166120166121166122166123166124166125166126166127166128166129166130166131166132166133166134166135166136166137166138166139166140166141166142166143166144166145166146166147166148166149166150166151166152166153166154166155166156166157166158166159166160166161166162166163166164166165166166166167166168166169166170166171166172166173166174166175166176166177166178166179166180166181166182166183166184166185166186166187166188166189166190166191166192166193166194166195166196166197166198166199166200166201166202166203166204166205166206166207166208166209166210166211166212166213166214166215166216166217166218166219166220166221166222166223166224166225166226166227166228166229166230166231166232166233166234166235166236166237166238166239166240166241166242166243166244166245166246166247166248166249166250166251166252166253166254166255166256166257166258166259166260166261166262166263166264166265166266166267166268166269166270166271166272166273166274166275166276166277166278166279166280166281166282166283166284166285166286166287166288166289166290166291166292166293166294166295166296166297166298166299166300166301166302166303166304166305166306166307166308166309166310166311166312166313166314166315166316166317166318166319166320166321166322166323166324166325166326166327166328166329166330166331166332166333166334166335166336166337166338166339166340166341166342166343166344166345166346166347166348166349166350166351166352166353166354166355166356166357166358166359166360166361166362166363166364166365166366166367166368166369166370166371166372166373166374166375166376166377166378166379166380166381166382166383166384166385166386166387166388166389166390166391166392166393166394166395166396166397166398166399166400166401166402166403166404166405166406166407166408166409166410166411166412166413166414166415166416166417166418166419166420166421166422166423166424166425166426166427166428166429166430166431166432166433166434166435166436166437166438166439166440166441166442166443166444166445166446166447166448166449166450166451166452166453166454166455166456166457166458166459166460166461166462166463166464166465166466166467166468166469166470166471166472166473166474166475166476166477166478166479166480166481166482166483166484166485166486166487166488166489166490166491166492166493166494166495166496166497166498166499166500166501166502166503166504166505166506166507166508166509166510166511166512166513166514166515166516166517166518166519166520166521166522166523166524166525166526166527166528166529166530166531166532166533166534166535166536166537166538166539166540166541166542166543166544166545166546166547166548166549166550166551166552166553166554166555166556166557166558166559166560166561166562166563166564166565166566166567166568166569166570166571166572166573166574166575166576166577166578166579166580166581166582166583166584166585166586166587166588166589166590166591166592166593166594166595166596166597166598166599166600166601166602166603166604166605166606166607166608166609166610166611166612166613166614166615166616166617166618166619166620166621166622166623166624166625166626166627166628166629166630166631166632166633166634166635166636166637166638166639166640166641166642166643166644166645166646166647166648166649166650166651166652166653166654166655166656166657166658166659166660166661166662166663166664166665166666166667166668166669166670166671166672166673166674166675166676166677166678166679166680166681166682166683166684166685166686166687166688166689166690166691166692166693166694166695166696166697166698166699166700166701166702166703166704166705166706166707166708166709166710166711166712166713166714166715166716166717166718166719166720166721166722166723166724166725166726166727166728166729166730166731166732166733166734166735166736166737166738166739166740166741166742166743166744166745166746166747166748166749166750166751166752166753166754166755166756166757166758166759166760166761166762166763166764166765166766166767166768166769166770166771166772166773166774166775166776166777166778166779166780166781166782166783166784166785166786166787166788166789166790166791166792166793166794166795166796166797166798166799166800166801166802166803166804166805166806166807166808166809166810166811166812166813166814166815166816166817166818166819166820166821166822166823166824166825166826166827166828166829166830166831166832166833166834166835166836166837166838166839166840166841166842166843166844166845166846166847166848166849166850166851166852166853166854166855166856166857166858166859166860166861166862166863166864166865166866166867166868166869166870166871166872166873166874166875166876166877166878166879166880166881166882166883166884166885166886166887166888166889166890166891166892166893166894166895166896166897166898166899166900166901166902166903166904166905166906166907166908166909166910166911166912166913166914166915166916166917166918166919166920166921166922166923166924166925166926166927166928166929166930166931166932166933166934166935166936166937166938166939166940166941166942166943166944166945166946166947166948166949166950166951166952166953166954166955166956166957166958166959166960166961166962166963166964166965166966166967166968166969166970166971166972166973166974166975166976166977166978166979166980166981166982166983166984166985166986166987166988166989166990166991166992166993166994166995166996166997166998166999167000167001167002167003167004167005167006167007167008167009167010167011167012167013167014167015167016167017167018167019167020167021167022167023167024167025167026167027167028167029167030167031167032167033167034167035167036167037167038167039167040167041167042167043167044167045167046167047167048167049167050167051167052167053167054167055167056167057167058167059167060167061167062167063167064167065167066167067167068167069167070167071167072167073167074167075167076167077167078167079167080167081167082167083167084167085167086167087167088167089167090167091167092167093167094167095167096167097167098167099167100167101167102167103167104167105167106167107167108167109167110167111167112167113167114167115167116167117167118167119167120167121167122167123167124167125167126167127167128167129167130167131167132167133167134167135167136167137167138167139167140167141167142167143167144167145167146167147167148167149167150167151167152167153167154167155167156167157167158167159167160167161167162167163167164167165167166167167167168167169167170167171167172167173167174167175167176167177167178167179167180167181167182167183167184167185167186167187167188167189167190167191167192167193167194167195167196167197167198167199167200167201167202167203167204167205167206167207167208167209167210167211167212167213167214167215167216167217167218167219167220167221167222167223167224167225167226167227167228167229167230167231167232167233167234167235167236167237167238167239167240167241167242167243167244167245167246167247167248167249167250167251167252167253167254167255167256167257167258167259167260167261167262167263167264167265167266167267167268167269167270167271167272167273167274167275167276167277167278167279167280167281167282167283167284167285167286167287167288167289167290167291167292167293167294167295167296167297167298167299167300167301167302167303167304167305167306167307167308167309167310167311167312167313167314167315167316167317167318167319167320167321167322167323167324167325167326167327167328167329167330167331167332167333167334167335167336167337167338167339167340167341167342167343167344167345167346167347167348167349167350167351167352167353167354167355167356167357167358167359167360167361167362167363167364167365167366167367167368167369167370167371167372167373167374167375167376167377167378167379167380167381167382167383167384167385167386167387167388167389167390167391167392167393167394167395167396167397167398167399167400167401167402167403167404167405167406167407167408167409167410167411167412167413167414167415167416167417167418167419167420167421167422167423167424167425167426167427167428167429167430167431167432167433167434167435167436167437167438167439167440167441167442167443167444167445167446167447167448167449167450167451167452167453167454167455167456167457167458167459167460167461167462167463167464167465167466167467167468167469167470167471167472167473167474167475167476167477167478167479167480167481167482167483167484167485167486167487167488167489167490167491167492167493167494167495167496167497167498167499167500167501167502167503167504167505167506167507167508167509167510167511167512167513167514167515167516167517167518167519167520167521167522167523167524167525167526167527167528167529167530167531167532167533167534167535167536167537167538167539167540167541167542167543167544167545167546167547167548167549167550167551167552167553167554167555167556167557167558167559167560167561167562167563167564167565167566167567167568167569167570167571167572167573167574167575167576167577167578167579167580167581167582167583167584167585167586167587167588167589167590167591167592167593167594167595167596167597167598167599167600167601167602167603167604167605167606167607167608167609167610167611167612167613167614167615167616167617167618167619167620167621167622167623167624167625167626167627167628167629167630167631167632167633167634167635167636167637167638167639167640167641167642167643167644167645167646167647167648167649167650167651167652167653167654167655167656167657167658167659167660167661167662167663167664167665167666167667167668167669167670167671167672167673167674167675167676167677167678167679167680167681167682167683167684167685167686167687167688167689167690167691167692167693167694167695167696167697167698167699167700167701167702167703167704167705167706167707167708167709167710167711167712167713167714167715167716167717167718167719167720167721167722167723167724167725167726167727167728167729167730167731167732167733167734167735167736167737167738167739167740167741167742167743167744167745167746167747167748167749167750167751167752167753167754167755167756167757167758167759167760167761167762167763167764167765167766167767167768167769167770167771167772167773167774167775167776167777167778167779167780167781167782167783167784167785167786167787167788167789167790167791167792167793167794167795167796167797167798167799167800167801167802167803167804167805167806167807167808167809167810167811167812167813167814167815167816167817167818167819167820167821167822167823167824167825167826167827167828167829167830167831167832167833167834167835167836167837167838167839167840167841167842167843167844167845167846167847167848167849167850167851167852167853167854167855167856167857167858167859167860167861167862167863167864167865167866167867167868167869167870167871167872167873167874167875167876167877167878167879167880167881167882167883167884167885167886167887167888167889167890167891167892167893167894167895167896167897167898167899167900167901167902167903167904167905167906167907167908167909167910167911167912167913167914167915167916167917167918167919167920167921167922167923167924167925167926167927167928167929167930167931167932167933167934167935167936167937167938167939167940167941167942167943167944167945167946167947167948167949167950167951167952167953167954167955167956167957167958167959167960167961167962167963167964167965167966167967167968167969167970167971167972167973167974167975167976167977167978167979167980167981167982167983167984167985167986167987167988167989167990167991167992167993167994167995167996167997167998167999168000168001168002168003168004168005168006168007168008168009168010168011168012168013168014168015168016168017168018168019168020168021168022168023168024168025168026168027168028168029168030168031168032168033168034168035168036168037168038168039168040168041168042168043168044168045168046168047168048168049168050168051168052168053168054168055168056168057168058168059168060168061168062168063168064168065168066168067168068168069168070168071168072168073168074168075168076168077168078168079168080168081168082168083168084168085168086168087168088168089168090168091168092168093168094168095168096168097168098168099168100168101168102168103168104168105168106168107168108168109168110168111168112168113168114168115168116168117168118168119168120168121168122168123168124168125168126168127168128168129168130168131168132168133168134168135168136168137168138168139168140168141168142168143168144168145168146168147168148168149168150168151168152168153168154168155168156168157168158168159168160168161168162168163168164168165168166168167168168168169168170168171168172168173168174168175168176168177168178168179168180168181168182168183168184168185168186168187168188168189168190168191168192168193168194168195168196168197168198168199168200168201168202168203168204168205168206168207168208168209168210168211168212168213168214168215168216168217168218168219168220168221168222168223168224168225168226168227168228168229168230168231168232168233168234168235168236168237168238168239168240168241168242168243168244168245168246168247168248168249168250168251168252168253168254168255168256168257168258168259168260168261168262168263168264168265168266168267168268168269168270168271168272168273168274168275168276168277168278168279168280168281168282168283168284168285168286168287168288168289168290168291168292168293168294168295168296168297168298168299168300168301168302168303168304168305168306168307168308168309168310168311168312168313168314168315168316168317168318168319168320168321168322168323168324168325168326168327168328168329168330168331168332168333168334168335168336168337168338168339168340168341168342168343168344168345168346168347168348168349168350168351168352168353168354168355168356168357168358168359168360168361168362168363168364168365168366168367168368168369168370168371168372168373168374168375168376168377168378168379168380168381168382168383168384168385168386168387168388168389168390168391168392168393168394168395168396168397168398168399168400168401168402168403168404168405168406168407168408168409168410168411168412168413168414168415168416168417168418168419168420168421168422168423168424168425168426168427168428168429168430168431168432168433168434168435168436168437168438168439168440168441168442168443168444168445168446168447168448168449168450168451168452168453168454168455168456168457168458168459168460168461168462168463168464168465168466168467168468168469168470168471168472168473168474168475168476168477168478168479168480168481168482168483168484168485168486168487168488168489168490168491168492168493168494168495168496168497168498168499168500168501168502168503168504168505168506168507168508168509168510168511168512168513168514168515168516168517168518168519168520168521168522168523168524168525168526168527168528168529168530168531168532168533168534168535168536168537168538168539168540168541168542168543168544168545168546168547168548168549168550168551168552168553168554168555168556168557168558168559168560168561168562168563168564168565168566168567168568168569168570168571168572168573168574168575168576168577168578168579168580168581168582168583168584168585168586168587168588168589168590168591168592168593168594168595168596168597168598168599168600168601168602168603168604168605168606168607168608168609168610168611168612168613168614168615168616168617168618168619168620168621168622168623168624168625168626168627168628168629168630168631168632168633168634168635168636168637168638168639168640168641168642168643168644168645168646168647168648168649168650168651168652168653168654168655168656168657168658168659168660168661168662168663168664168665168666168667168668168669168670168671168672168673168674168675168676168677168678168679168680168681168682168683168684168685168686168687168688168689168690168691168692168693168694168695168696168697168698168699168700168701168702168703168704168705168706168707168708168709168710168711168712168713168714168715168716168717168718168719168720168721168722168723168724168725168726168727168728168729168730168731168732168733168734168735168736168737168738168739168740168741168742168743168744168745168746168747168748168749168750168751168752168753168754168755168756168757168758168759168760168761168762168763168764168765168766168767168768168769168770168771168772168773168774168775168776168777168778168779168780168781168782168783168784168785168786168787168788168789168790168791168792168793168794168795168796168797168798168799168800168801168802168803168804168805168806168807168808168809168810168811168812168813168814168815168816168817168818168819168820168821168822168823168824168825168826168827168828168829168830168831168832168833168834168835168836168837168838168839168840168841168842168843168844168845168846168847168848168849168850168851168852168853168854168855168856168857168858168859168860168861168862168863168864168865168866168867168868168869168870168871168872168873168874168875168876168877168878168879168880168881168882168883168884168885168886168887168888168889168890168891168892168893168894168895168896168897168898168899168900168901168902168903168904168905168906168907168908168909168910168911168912168913168914168915168916168917168918168919168920168921168922168923168924168925168926168927168928168929168930168931168932168933168934168935168936168937168938168939168940168941168942168943168944168945168946168947168948168949168950168951168952168953168954168955168956168957168958168959168960168961168962168963168964168965168966168967168968168969168970168971168972168973168974168975168976168977168978168979168980168981168982168983168984168985168986168987168988168989168990168991168992168993168994168995168996168997168998168999169000169001169002169003169004169005169006169007169008169009169010169011169012169013169014169015169016169017169018169019169020169021169022169023169024169025169026169027169028169029169030169031169032169033169034169035169036169037169038169039169040169041169042169043169044169045169046169047169048169049169050169051169052169053169054169055169056169057169058169059169060169061169062169063169064169065169066169067169068169069169070169071169072169073169074169075169076169077169078169079169080169081169082169083169084169085169086169087169088169089169090169091169092169093169094169095169096169097169098169099169100169101169102169103169104169105169106169107169108169109169110169111169112169113169114169115169116169117169118169119169120169121169122169123169124169125169126169127169128169129169130169131169132169133169134169135169136169137169138169139169140169141169142169143169144169145169146169147169148169149169150169151169152169153169154169155169156169157169158169159169160169161169162169163169164169165169166169167169168169169169170169171169172169173169174169175169176169177169178169179169180169181169182169183169184169185169186169187169188169189169190169191169192169193169194169195169196169197169198169199169200169201169202169203169204169205169206169207169208169209169210169211169212169213169214169215169216169217169218169219169220169221169222169223169224169225169226169227169228169229169230169231169232169233169234169235169236169237169238169239169240169241169242169243169244169245169246169247169248169249169250169251169252169253169254169255169256169257169258169259169260169261169262169263169264169265169266169267169268169269169270169271169272169273169274169275169276169277169278169279169280169281169282169283169284169285169286169287169288169289169290169291169292169293169294169295169296169297169298169299169300169301169302169303169304169305169306169307169308169309169310169311169312169313169314169315169316169317169318169319169320169321169322169323169324169325169326169327169328169329169330169331169332169333169334169335169336169337169338169339169340169341169342169343169344169345169346169347169348169349169350169351169352169353169354169355169356169357169358169359169360169361169362169363169364169365169366169367169368169369169370169371169372169373169374169375169376169377169378169379169380169381169382169383169384169385169386169387169388169389169390169391169392169393169394169395169396169397169398169399169400169401169402169403169404169405169406169407169408169409169410169411169412169413169414169415169416169417169418169419169420169421169422169423169424169425169426169427169428169429169430169431169432169433169434169435169436169437169438169439169440169441169442169443169444169445169446169447169448169449169450169451169452169453169454169455169456169457169458169459169460169461169462169463169464169465169466169467169468169469169470169471169472169473169474169475169476169477169478169479169480169481169482169483169484169485169486169487169488169489169490169491169492169493169494169495169496169497169498169499169500169501169502169503169504169505169506169507169508169509169510169511169512169513169514169515169516169517169518169519169520169521169522169523169524169525169526169527169528169529169530169531169532169533169534169535169536169537169538169539169540169541169542169543169544169545169546169547169548169549169550169551169552169553169554169555169556169557169558169559169560169561169562169563169564169565169566169567169568169569169570169571169572169573169574169575169576169577169578169579169580169581169582169583169584169585169586169587169588169589169590169591169592169593169594169595169596169597169598169599169600169601169602169603169604169605169606169607169608169609169610169611169612169613169614169615169616169617169618169619169620169621169622169623169624169625169626169627169628169629169630169631169632169633169634169635169636169637169638169639169640169641169642169643169644169645169646169647169648169649169650169651169652169653169654169655169656169657169658169659169660169661169662169663169664169665169666169667169668169669169670169671169672169673169674169675169676169677169678169679169680169681169682169683169684169685169686169687169688169689169690169691169692169693169694169695169696169697169698169699169700169701169702169703169704169705169706169707169708169709169710169711169712169713169714169715169716169717169718169719169720169721169722169723169724169725169726169727169728169729169730169731169732169733169734169735169736169737169738169739169740169741169742169743169744169745169746169747169748169749169750169751169752169753169754169755169756169757169758169759169760169761169762169763169764169765169766169767169768169769169770169771169772169773169774169775169776169777169778169779169780169781169782169783169784169785169786169787169788169789169790169791169792169793169794169795169796169797169798169799169800169801169802169803169804169805169806169807169808169809169810169811169812169813169814169815169816169817169818169819169820169821169822169823169824169825169826169827169828169829169830169831169832169833169834169835169836169837169838169839169840169841169842169843169844169845169846169847169848169849169850169851169852169853169854169855169856169857169858169859169860169861169862169863169864169865169866169867169868169869169870169871169872169873169874169875169876169877169878169879169880169881169882169883169884169885169886169887169888169889169890169891169892169893169894169895169896169897169898169899169900169901169902169903169904169905169906169907169908169909169910169911169912169913169914169915169916169917169918169919169920169921169922169923169924169925169926169927169928169929169930169931169932169933169934169935169936169937169938169939169940169941169942169943169944169945169946169947169948169949169950169951169952169953169954169955169956169957169958169959169960169961169962169963169964169965169966169967169968169969169970169971169972169973169974169975169976169977169978169979169980169981169982169983169984169985169986169987169988169989169990169991169992169993169994169995169996169997169998169999170000170001170002170003170004170005170006170007170008170009170010170011170012170013170014170015170016170017170018170019170020170021170022170023170024170025170026170027170028170029170030170031170032170033170034170035170036170037170038170039170040170041170042170043170044170045170046170047170048170049170050170051170052170053170054170055170056170057170058170059170060170061170062170063170064170065170066170067170068170069170070170071170072170073170074170075170076170077170078170079170080170081170082170083170084170085170086170087170088170089170090170091170092170093170094170095170096170097170098170099170100170101170102170103170104170105170106170107170108170109170110170111170112170113170114170115170116170117170118170119170120170121170122170123170124170125170126170127170128170129170130170131170132170133170134170135170136170137170138170139170140170141170142170143170144170145170146170147170148170149170150170151170152170153170154170155170156170157170158170159170160170161170162170163170164170165170166170167170168170169170170170171170172170173170174170175170176170177170178170179170180170181170182170183170184170185170186170187170188170189170190170191170192170193170194170195170196170197170198170199170200170201170202170203170204170205170206170207170208170209170210170211170212170213170214170215170216170217170218170219170220170221170222170223170224170225170226170227170228170229170230170231170232170233170234170235170236170237170238170239170240170241170242170243170244170245170246170247170248170249170250170251170252170253170254170255170256170257170258170259170260170261170262170263170264170265170266170267170268170269170270170271170272170273170274170275170276170277170278170279170280170281170282170283170284170285170286170287170288170289170290170291170292170293170294170295170296170297170298170299170300170301170302170303170304170305170306170307170308170309170310170311170312170313170314170315170316170317170318170319170320170321170322170323170324170325170326170327170328170329170330170331170332170333170334170335170336170337170338170339170340170341170342170343170344170345170346170347170348170349170350170351170352170353170354170355170356170357170358170359170360170361170362170363170364170365170366170367170368170369170370170371170372170373170374170375170376170377170378170379170380170381170382170383170384170385170386170387170388170389170390170391170392170393170394170395170396170397170398170399170400170401170402170403170404170405170406170407170408170409170410170411170412170413170414170415170416170417170418170419170420170421170422170423170424170425170426170427170428170429170430170431170432170433170434170435170436170437170438170439170440170441170442170443170444170445170446170447170448170449170450170451170452170453170454170455170456170457170458170459170460170461170462170463170464170465170466170467170468170469170470170471170472170473170474170475170476170477170478170479170480170481170482170483170484170485170486170487170488170489170490170491170492170493170494170495170496170497170498170499170500170501170502170503170504170505170506170507170508170509170510170511170512170513170514170515170516170517170518170519170520170521170522170523170524170525170526170527170528170529170530170531170532170533170534170535170536170537170538170539170540170541170542170543170544170545170546170547170548170549170550170551170552170553170554170555170556170557170558170559170560170561170562170563170564170565170566170567170568170569170570170571170572170573170574170575170576170577170578170579170580170581170582170583170584170585170586170587170588170589170590170591170592170593170594170595170596170597170598170599170600170601170602170603170604170605170606170607170608170609170610170611170612170613170614170615170616170617170618170619170620170621170622170623170624170625170626170627170628170629170630170631170632170633170634170635170636170637170638170639170640170641170642170643170644170645170646170647170648170649170650170651170652170653170654170655170656170657170658170659170660170661170662170663170664170665170666170667170668170669170670170671170672170673170674170675170676170677170678170679170680170681170682170683170684170685170686170687170688170689170690170691170692170693170694170695170696170697170698170699170700170701170702170703170704170705170706170707170708170709170710170711170712170713170714170715170716170717170718170719170720170721170722170723170724170725170726170727170728170729170730170731170732170733170734170735170736170737170738170739170740170741170742170743170744170745170746170747170748170749170750170751170752170753170754170755170756170757170758170759170760170761170762170763170764170765170766170767170768170769170770170771170772170773170774170775170776170777170778170779170780170781170782170783170784170785170786170787170788170789170790170791170792170793170794170795170796170797170798170799170800170801170802170803170804170805170806170807170808170809170810170811170812170813170814170815170816170817170818170819170820170821170822170823170824170825170826170827170828170829170830170831170832170833170834170835170836170837170838170839170840170841170842170843170844170845170846170847170848170849170850170851170852170853170854170855170856170857170858170859170860170861170862170863170864170865170866170867170868170869170870170871170872170873170874170875170876170877170878170879170880170881170882170883170884170885170886170887170888170889170890170891170892170893170894170895170896170897170898170899170900170901170902170903170904170905170906170907170908170909170910170911170912170913170914170915170916170917170918170919170920170921170922170923170924170925170926170927170928170929170930170931170932170933170934170935170936170937170938170939170940170941170942170943170944170945170946170947170948170949170950170951170952170953170954170955170956170957170958170959170960170961170962170963170964170965170966170967170968170969170970170971170972170973170974170975170976170977170978170979170980170981170982170983170984170985170986170987170988170989170990170991170992170993170994170995170996170997170998170999171000171001171002171003171004171005171006171007171008171009171010171011171012171013171014171015171016171017171018171019171020171021171022171023171024171025171026171027171028171029171030171031171032171033171034171035171036171037171038171039171040171041171042171043171044171045171046171047171048171049171050171051171052171053171054171055171056171057171058171059171060171061171062171063171064171065171066171067171068171069171070171071171072171073171074171075171076171077171078171079171080171081171082171083171084171085171086171087171088171089171090171091171092171093171094171095171096171097171098171099171100171101171102171103171104171105171106171107171108171109171110171111171112171113171114171115171116171117171118171119171120171121171122171123171124171125171126171127171128171129171130171131171132171133171134171135171136171137171138171139171140171141171142171143171144171145171146171147171148171149171150171151171152171153171154171155171156171157171158171159171160171161171162171163171164171165171166171167171168171169171170171171171172171173171174171175171176171177171178171179171180171181171182171183171184171185171186171187171188171189171190171191171192171193171194171195171196171197171198171199171200171201171202171203171204171205171206171207171208171209171210171211171212171213171214171215171216171217171218171219171220171221171222171223171224171225171226171227171228171229171230171231171232171233171234171235171236171237171238171239171240171241171242171243171244171245171246171247171248171249171250171251171252171253171254171255171256171257171258171259171260171261171262171263171264171265171266171267171268171269171270171271171272171273171274171275171276171277171278171279171280171281171282171283171284171285171286171287171288171289171290171291171292171293171294171295171296171297171298171299171300171301171302171303171304171305171306171307171308171309171310171311171312171313171314171315171316171317171318171319171320171321171322171323171324171325171326171327171328171329171330171331171332171333171334171335171336171337171338171339171340171341171342171343171344171345171346171347171348171349171350171351171352171353171354171355171356171357171358171359171360171361171362171363171364171365171366171367171368171369171370171371171372171373171374171375171376171377171378171379171380171381171382171383171384171385171386171387171388171389171390171391171392171393171394171395171396171397171398171399171400171401171402171403171404171405171406171407171408171409171410171411171412171413171414171415171416171417171418171419171420171421171422171423171424171425171426171427171428171429171430171431171432171433171434171435171436171437171438171439171440171441171442171443171444171445171446171447171448171449171450171451171452171453171454171455171456171457171458171459171460171461171462171463171464171465171466171467171468171469171470171471171472171473171474171475171476171477171478171479171480171481171482171483171484171485171486171487171488171489171490171491171492171493171494171495171496171497171498171499171500171501171502171503171504171505171506171507171508171509171510171511171512171513171514171515171516171517171518171519171520171521171522171523171524171525171526171527171528171529171530171531171532171533171534171535171536171537171538171539171540171541171542171543171544171545171546171547171548171549171550171551171552171553171554171555171556171557171558171559171560171561171562171563171564171565171566171567171568171569171570171571171572171573171574171575171576171577171578171579171580171581171582171583171584171585171586171587171588171589171590171591171592171593171594171595171596171597171598171599171600171601171602171603171604171605171606171607171608171609171610171611171612171613171614171615171616171617171618171619171620171621171622171623171624171625171626171627171628171629171630171631171632171633171634171635171636171637171638171639171640171641171642171643171644171645171646171647171648171649171650171651171652171653171654171655171656171657171658171659171660171661171662171663171664171665171666171667171668171669171670171671171672171673171674171675171676171677171678171679171680171681171682171683171684171685171686171687171688171689171690171691171692171693171694171695171696171697171698171699171700171701171702171703171704171705171706171707171708171709171710171711171712171713171714171715171716171717171718171719171720171721171722171723171724171725171726171727171728171729171730171731171732171733171734171735171736171737171738171739171740171741171742171743171744171745171746171747171748171749171750171751171752171753171754171755171756171757171758171759171760171761171762171763171764171765171766171767171768171769171770171771171772171773171774171775171776171777171778171779171780171781171782171783171784171785171786171787171788171789171790171791171792171793171794171795171796171797171798171799171800171801171802171803171804171805171806171807171808171809171810171811171812171813171814171815171816171817171818171819171820171821171822171823171824171825171826171827171828171829171830171831171832171833171834171835171836171837171838171839171840171841171842171843171844171845171846171847171848171849171850171851171852171853171854171855171856171857171858171859171860171861171862171863171864171865171866171867171868171869171870171871171872171873171874171875171876171877171878171879171880171881171882171883171884171885171886171887171888171889171890171891171892171893171894171895171896171897171898171899171900171901171902171903171904171905171906171907171908171909171910171911171912171913171914171915171916171917171918171919171920171921171922171923171924171925171926171927171928171929171930171931171932171933171934171935171936171937171938171939171940171941171942171943171944171945171946171947171948171949171950171951171952171953171954171955171956171957171958171959171960171961171962171963171964171965171966171967171968171969171970171971171972171973171974171975171976171977171978171979171980171981171982171983171984171985171986171987171988171989171990171991171992171993171994171995171996171997171998171999172000172001172002172003172004172005172006172007172008172009172010172011172012172013172014172015172016172017172018172019172020172021172022172023172024172025172026172027172028172029172030172031172032172033172034172035172036172037172038172039172040172041172042172043172044172045172046172047172048172049172050172051172052172053172054172055172056172057172058172059172060172061172062172063172064172065172066172067172068172069172070172071172072172073172074172075172076172077172078172079172080172081172082172083172084172085172086172087172088172089172090172091172092172093172094172095172096172097172098172099172100172101172102172103172104172105172106172107172108172109172110172111172112172113172114172115172116172117172118172119172120172121172122172123172124172125172126172127172128172129172130172131172132172133172134172135172136172137172138172139172140172141172142172143172144172145172146172147172148172149172150172151172152172153172154172155172156172157172158172159172160172161172162172163172164172165172166172167172168172169172170172171172172172173172174172175172176172177172178172179172180172181172182172183172184172185172186172187172188172189172190172191172192172193172194172195172196172197172198172199172200172201172202172203172204172205172206172207172208172209172210172211172212172213172214172215172216172217172218172219172220172221172222172223172224172225172226172227172228172229172230172231172232172233172234172235172236172237172238172239172240172241172242172243172244172245172246172247172248172249172250172251172252172253172254172255172256172257172258172259172260172261172262172263172264172265172266172267172268172269172270172271172272172273172274172275172276172277172278172279172280172281172282172283172284172285172286172287172288172289172290172291172292172293172294172295172296172297172298172299172300172301172302172303172304172305172306172307172308172309172310172311172312172313172314172315172316172317172318172319172320172321172322172323172324172325172326172327172328172329172330172331172332172333172334172335172336172337172338172339172340172341172342172343172344172345172346172347172348172349172350172351172352172353172354172355172356172357172358172359172360172361172362172363172364172365172366172367172368172369172370172371172372172373172374172375172376172377172378172379172380172381172382172383172384172385172386172387172388172389172390172391172392172393172394172395172396172397172398172399172400172401172402172403172404172405172406172407172408172409172410172411172412172413172414172415172416172417172418172419172420172421172422172423172424172425172426172427172428172429172430172431172432172433172434172435172436172437172438172439172440172441172442172443172444172445172446172447172448172449172450172451172452172453172454172455172456172457172458172459172460172461172462172463172464172465172466172467172468172469172470172471172472172473172474172475172476172477172478172479172480172481172482172483172484172485172486172487172488172489172490172491172492172493172494172495172496172497172498172499172500172501172502172503172504172505172506172507172508172509172510172511172512172513172514172515172516172517172518172519172520172521172522172523172524172525172526172527172528172529172530172531172532172533172534172535172536172537172538172539172540172541172542172543172544172545172546172547172548172549172550172551172552172553172554172555172556172557172558172559172560172561172562172563172564172565172566172567172568172569172570172571172572172573172574172575172576172577172578172579172580172581172582172583172584172585172586172587172588172589172590172591172592172593172594172595172596172597172598172599172600172601172602172603172604172605172606172607172608172609172610172611172612172613172614172615172616172617172618172619172620172621172622172623172624172625172626172627172628172629172630172631172632172633172634172635172636172637172638172639172640172641172642172643172644172645172646172647172648172649172650172651172652172653172654172655172656172657172658172659172660172661172662172663172664172665172666172667172668172669172670172671172672172673172674172675172676172677172678172679172680172681172682172683172684172685172686172687172688172689172690172691172692172693172694172695172696172697172698172699172700172701172702172703172704172705172706172707172708172709172710172711172712172713172714172715172716172717172718172719172720172721172722172723172724172725172726172727172728172729172730172731172732172733172734172735172736172737172738172739172740172741172742172743172744172745172746172747172748172749172750172751172752172753172754172755172756172757172758172759172760172761172762172763172764172765172766172767172768172769172770172771172772172773172774172775172776172777172778172779172780172781172782172783172784172785172786172787172788172789172790172791172792172793172794172795172796172797172798172799172800172801172802172803172804172805172806172807172808172809172810172811172812172813172814172815172816172817172818172819172820172821172822172823172824172825172826172827172828172829172830172831172832172833172834172835172836172837172838172839172840172841172842172843172844172845172846172847172848172849172850172851172852172853172854172855172856172857172858172859172860172861172862172863172864172865172866172867172868172869172870172871172872172873172874172875172876172877172878172879172880172881172882172883172884172885172886172887172888172889172890172891172892172893172894172895172896172897172898172899172900172901172902172903172904172905172906172907172908172909172910172911172912172913172914172915172916172917172918172919172920172921172922172923172924172925172926172927172928172929172930172931172932172933172934172935172936172937172938172939172940172941172942172943172944172945172946172947172948172949172950172951172952172953172954172955172956172957172958172959172960172961172962172963172964172965172966172967172968172969172970172971172972172973172974172975172976172977172978172979172980172981172982172983172984172985172986172987172988172989172990172991172992172993172994172995172996172997172998172999173000173001173002173003173004173005173006173007173008173009173010173011173012173013173014173015173016173017173018173019173020173021173022173023173024173025173026173027173028173029173030173031173032173033173034173035173036173037173038173039173040173041173042173043173044173045173046173047173048173049173050173051173052173053173054173055173056173057173058173059173060173061173062173063173064173065173066173067173068173069173070173071173072173073173074173075173076173077173078173079173080173081173082173083173084173085173086173087173088173089173090173091173092173093173094173095173096173097173098173099173100173101173102173103173104173105173106173107173108173109173110173111173112173113173114173115173116173117173118173119173120173121173122173123173124173125173126173127173128173129173130173131173132173133173134173135173136173137173138173139173140173141173142173143173144173145173146173147173148173149173150173151173152173153173154173155173156173157173158173159173160173161173162173163173164173165173166173167173168173169173170173171173172173173173174173175173176173177173178173179173180173181173182173183173184173185173186173187173188173189173190173191173192173193173194173195173196173197173198173199173200173201173202173203173204173205173206173207173208173209173210173211173212173213173214173215173216173217173218173219173220173221173222173223173224173225173226173227173228173229173230173231173232173233173234173235173236173237173238173239173240173241173242173243173244173245173246173247173248173249173250173251173252173253173254173255173256173257173258173259173260173261173262173263173264173265173266173267173268173269173270173271173272173273173274173275173276173277173278173279173280173281173282173283173284173285173286173287173288173289173290173291173292173293173294173295173296173297173298173299173300173301173302173303173304173305173306173307173308173309173310173311173312173313173314173315173316173317173318173319173320173321173322173323173324173325173326173327173328173329173330173331173332173333173334173335173336173337173338173339173340173341173342173343173344173345173346173347173348173349173350173351173352173353173354173355173356173357173358173359173360173361173362173363173364173365173366173367173368173369173370173371173372173373173374173375173376173377173378173379173380173381173382173383173384173385173386173387173388173389173390173391173392173393173394173395173396173397173398173399173400173401173402173403173404173405173406173407173408173409173410173411173412173413173414173415173416173417173418173419173420173421173422173423173424173425173426173427173428173429173430173431173432173433173434173435173436173437173438173439173440173441173442173443173444173445173446173447173448173449173450173451173452173453173454173455173456173457173458173459173460173461173462173463173464173465173466173467173468173469173470173471173472173473173474173475173476173477173478173479173480173481173482173483173484173485173486173487173488173489173490173491173492173493173494173495173496173497173498173499173500173501173502173503173504173505173506173507173508173509173510173511173512173513173514173515173516173517173518173519173520173521173522173523173524173525173526173527173528173529173530173531173532173533173534173535173536173537173538173539173540173541173542173543173544173545173546173547173548173549173550173551173552173553173554173555173556173557173558173559173560173561173562173563173564173565173566173567173568173569173570173571173572173573173574173575173576173577173578173579173580173581173582173583173584173585173586173587173588173589173590173591173592173593173594173595173596173597173598173599173600173601173602173603173604173605173606173607173608173609173610173611173612173613173614173615173616173617173618173619173620173621173622173623173624173625173626173627173628173629173630173631173632173633173634173635173636173637173638173639173640173641173642173643173644173645173646173647173648173649173650173651173652173653173654173655173656173657173658173659173660173661173662173663173664173665173666173667173668173669173670173671173672173673173674173675173676173677173678173679173680173681173682173683173684173685173686173687173688173689173690173691173692173693173694173695173696173697173698173699173700173701173702173703173704173705173706173707173708173709173710173711173712173713173714173715173716173717173718173719173720173721173722173723173724173725173726173727173728173729173730173731173732173733173734173735173736173737173738173739173740173741173742173743173744173745173746173747173748173749173750173751173752173753173754173755173756173757173758173759173760173761173762173763173764173765173766173767173768173769173770173771173772173773173774173775173776173777173778173779173780173781173782173783173784173785173786173787173788173789173790173791173792173793173794173795173796173797173798173799173800173801173802173803173804173805173806173807173808173809173810173811173812173813173814173815173816173817173818173819173820173821173822173823173824173825173826173827173828173829173830173831173832173833173834173835173836173837173838173839173840173841173842173843173844173845173846173847173848173849173850173851173852173853173854173855173856173857173858173859173860173861173862173863173864173865173866173867173868173869173870173871173872173873173874173875173876173877173878173879173880173881173882173883173884173885173886173887173888173889173890173891173892173893173894173895173896173897173898173899173900173901173902173903173904173905173906173907173908173909173910173911173912173913173914173915173916173917173918173919173920173921173922173923173924173925173926173927173928173929173930173931173932173933173934173935173936173937173938173939173940173941173942173943173944173945173946173947173948173949173950173951173952173953173954173955173956173957173958173959173960173961173962173963173964173965173966173967173968173969173970173971173972173973173974173975173976173977173978173979173980173981173982173983173984173985173986173987173988173989173990173991173992173993173994173995173996173997173998173999174000174001174002174003174004174005174006174007174008174009174010174011174012174013174014174015174016174017174018174019174020174021174022174023174024174025174026174027174028174029174030174031174032174033174034174035174036174037174038174039174040174041174042174043174044174045174046174047174048174049174050174051174052174053174054174055174056174057174058174059174060174061174062174063174064174065174066174067174068174069174070174071174072174073174074174075174076174077174078174079174080174081174082174083174084174085174086174087174088174089174090174091174092174093174094174095174096174097174098174099174100174101174102174103174104174105174106174107174108174109174110174111174112174113174114174115174116174117174118174119174120174121174122174123174124174125174126174127174128174129174130174131174132174133174134174135174136174137174138174139174140174141174142174143174144174145174146174147174148174149174150174151174152174153174154174155174156174157174158174159174160174161174162174163174164174165174166174167174168174169174170174171174172174173174174174175174176174177174178174179174180174181174182174183174184174185174186174187174188174189174190174191174192174193174194174195174196174197174198174199174200174201174202174203174204174205174206174207174208174209174210174211174212174213174214174215174216174217174218174219174220174221174222174223174224174225174226174227174228174229174230174231174232174233174234174235174236174237174238174239174240174241174242174243174244174245174246174247174248174249174250174251174252174253174254174255174256174257174258174259174260174261174262174263174264174265174266174267174268174269174270174271174272174273174274174275174276174277174278174279174280174281174282174283174284174285174286174287174288174289174290174291174292174293174294174295174296174297174298174299174300174301174302174303174304174305174306174307174308174309174310174311174312174313174314174315174316174317174318174319174320174321174322174323174324174325174326174327174328174329174330174331174332174333174334174335174336174337174338174339174340174341174342174343174344174345174346174347174348174349174350174351174352174353174354174355174356174357174358174359174360174361174362174363174364174365174366174367174368174369174370174371174372174373174374174375174376174377174378174379174380174381174382174383174384174385174386174387174388174389174390174391174392174393174394174395174396174397174398174399174400174401174402174403174404174405174406174407174408174409174410174411174412174413174414174415174416174417174418174419174420174421174422174423174424174425174426174427174428174429174430174431174432174433174434174435174436174437174438174439174440174441174442174443174444174445174446174447174448174449174450174451174452174453174454174455174456174457174458174459174460174461174462174463174464174465174466174467174468174469174470174471174472174473174474174475174476174477174478174479174480174481174482174483174484174485174486174487174488174489174490174491174492174493174494174495174496174497174498174499174500174501174502174503174504174505174506174507174508174509174510174511174512174513174514174515174516174517174518174519174520174521174522174523174524174525174526174527174528174529174530174531174532174533174534174535174536174537174538174539174540174541174542174543174544174545174546174547174548174549174550174551174552174553174554174555174556174557174558174559174560174561174562174563174564174565174566174567174568174569174570174571174572174573174574174575174576174577174578174579174580174581174582174583174584174585174586174587174588174589174590174591174592174593174594174595174596174597174598174599174600174601174602174603174604174605174606174607174608174609174610174611174612174613174614174615174616174617174618174619174620174621174622174623174624174625174626174627174628174629174630174631174632174633174634174635174636174637174638174639174640174641174642174643174644174645174646174647174648174649174650174651174652174653174654174655174656174657174658174659174660174661174662174663174664174665174666174667174668174669174670174671174672174673174674174675174676174677174678174679174680174681174682174683174684174685174686174687174688174689174690174691174692174693174694174695174696174697174698174699174700174701174702174703174704174705174706174707174708174709174710174711174712174713174714174715174716174717174718174719174720174721174722174723174724174725174726174727174728174729174730174731174732174733174734174735174736174737174738174739174740174741174742174743174744174745174746174747174748174749174750174751174752174753174754174755174756174757174758174759174760174761174762174763174764174765174766174767174768174769174770174771174772174773174774174775174776174777174778174779174780174781174782174783174784174785174786174787174788174789174790174791174792174793174794174795174796174797174798174799174800174801174802174803174804174805174806174807174808174809174810174811174812174813174814174815174816174817174818174819174820174821174822174823174824174825174826174827174828174829174830174831174832174833174834174835174836174837174838174839174840174841174842174843174844174845174846174847174848174849174850174851174852174853174854174855174856174857174858174859174860174861174862174863174864174865174866174867174868174869174870174871174872174873174874174875174876174877174878174879174880174881174882174883174884174885174886174887174888174889174890174891174892174893174894174895174896174897174898174899174900174901174902174903174904174905174906174907174908174909174910174911174912174913174914174915174916174917174918174919174920174921174922174923174924174925174926174927174928174929174930174931174932174933174934174935174936174937174938174939174940174941174942174943174944174945174946174947174948174949174950174951174952174953174954174955174956174957174958174959174960174961174962174963174964174965174966174967174968174969174970174971174972174973174974174975174976174977174978174979174980174981174982174983174984174985174986174987174988174989174990174991174992174993174994174995174996174997174998174999175000175001175002175003175004175005175006175007175008175009175010175011175012175013175014175015175016175017175018175019175020175021175022175023175024175025175026175027175028175029175030175031175032175033175034175035175036175037175038175039175040175041175042175043175044175045175046175047175048175049175050175051175052175053175054175055175056175057175058175059175060175061175062175063175064175065175066175067175068175069175070175071175072175073175074175075175076175077175078175079175080175081175082175083175084175085175086175087175088175089175090175091175092175093175094175095175096175097175098175099175100175101175102175103175104175105175106175107175108175109175110175111175112175113175114175115175116175117175118175119175120175121175122175123175124175125175126175127175128175129175130175131175132175133175134175135175136175137175138175139175140175141175142175143175144175145175146175147175148175149175150175151175152175153175154175155175156175157175158175159175160175161175162175163175164175165175166175167175168175169175170175171175172175173175174175175175176175177175178175179175180175181175182175183175184175185175186175187175188175189175190175191175192175193175194175195175196175197175198175199175200175201175202175203175204175205175206175207175208175209175210175211175212175213175214175215175216175217175218175219175220175221175222175223175224175225175226175227175228175229175230175231175232175233175234175235175236175237175238175239175240175241175242175243175244175245175246175247175248175249175250175251175252175253175254175255175256175257175258175259175260175261175262175263175264175265175266175267175268175269175270175271175272175273175274175275175276175277175278175279175280175281175282175283175284175285175286175287175288175289175290175291175292175293175294175295175296175297175298175299175300175301175302175303175304175305175306175307175308175309175310175311175312175313175314175315175316175317175318175319175320175321175322175323175324175325175326175327175328175329175330175331175332175333175334175335175336175337175338175339175340175341175342175343175344175345175346175347175348175349175350175351175352175353175354175355175356175357175358175359175360175361175362175363175364175365175366175367175368175369175370175371175372175373175374175375175376175377175378175379175380175381175382175383175384175385175386175387175388175389175390175391175392175393175394175395175396175397175398175399175400175401175402175403175404175405175406175407175408175409175410175411175412175413175414175415175416175417175418175419175420175421175422175423175424175425175426175427175428175429175430175431175432175433175434175435175436175437175438175439175440175441175442175443175444175445175446175447175448175449175450175451175452175453175454175455175456175457175458175459175460175461175462175463175464175465175466175467175468175469175470175471175472175473175474175475175476175477175478175479175480175481175482175483175484175485175486175487175488175489175490175491175492175493175494175495175496175497175498175499175500175501175502175503175504175505175506175507175508175509175510175511175512175513175514175515175516175517175518175519175520175521175522175523175524175525175526175527175528175529175530175531175532175533175534175535175536175537175538175539175540175541175542175543175544175545175546175547175548175549175550175551175552175553175554175555175556175557175558175559175560175561175562175563175564175565175566175567175568175569175570175571175572175573175574175575175576175577175578175579175580175581175582175583175584175585175586175587175588175589175590175591175592175593175594175595175596175597175598175599175600175601175602175603175604175605175606175607175608175609175610175611175612175613175614175615175616175617175618175619175620175621175622175623175624175625175626175627175628175629175630175631175632175633175634175635175636175637175638175639175640175641175642175643175644175645175646175647175648175649175650175651175652175653175654175655175656175657175658175659175660175661175662175663175664175665175666175667175668175669175670175671175672175673175674175675175676175677175678175679175680175681175682175683175684175685175686175687175688175689175690175691175692175693175694175695175696175697175698175699175700175701175702175703175704175705175706175707175708175709175710175711175712175713175714175715175716175717175718175719175720175721175722175723175724175725175726175727175728175729175730175731175732175733175734175735175736175737175738175739175740175741175742175743175744175745175746175747175748175749175750175751175752175753175754175755175756175757175758175759175760175761175762175763175764175765175766175767175768175769175770175771175772175773175774175775175776175777175778175779175780175781175782175783175784175785175786175787175788175789175790175791175792175793175794175795175796175797175798175799175800175801175802175803175804175805175806175807175808175809175810175811175812175813175814175815175816175817175818175819175820175821175822175823175824175825175826175827175828175829175830175831175832175833175834175835175836175837175838175839175840175841175842175843175844175845175846175847175848175849175850175851175852175853175854175855175856175857175858175859175860175861175862175863175864175865175866175867175868175869175870175871175872175873175874175875175876175877175878175879175880175881175882175883175884175885175886175887175888175889175890175891175892175893175894175895175896175897175898175899175900175901175902175903175904175905175906175907175908175909175910175911175912175913175914175915175916175917175918175919175920175921175922175923175924175925175926175927175928175929175930175931175932175933175934175935175936175937175938175939175940175941175942175943175944175945175946175947175948175949175950175951175952175953175954175955175956175957175958175959175960175961175962175963175964175965175966175967175968175969175970175971175972175973175974175975175976175977175978175979175980175981175982175983175984175985175986175987175988175989175990175991175992175993175994175995175996175997175998175999176000176001176002176003176004176005176006176007176008176009176010176011176012176013176014176015176016176017176018176019176020176021176022176023176024176025176026176027176028176029176030176031176032176033176034176035176036176037176038176039176040176041176042176043176044176045176046176047176048176049176050176051176052176053176054176055176056176057176058176059176060176061176062176063176064176065176066176067176068176069176070176071176072176073176074176075176076176077176078176079176080176081176082176083176084176085176086176087176088176089176090176091176092176093176094176095176096176097176098176099176100176101176102176103176104176105176106176107176108176109176110176111176112176113176114176115176116176117176118176119176120176121176122176123176124176125176126176127176128176129176130176131176132176133176134176135176136176137176138176139176140176141176142176143176144176145176146176147176148176149176150176151176152176153176154176155176156176157176158176159176160176161176162176163176164176165176166176167176168176169176170176171176172176173176174176175176176176177176178176179176180176181176182176183176184176185176186176187176188176189176190176191176192176193176194176195176196176197176198176199176200176201176202176203176204176205176206176207176208176209176210176211176212176213176214176215176216176217176218176219176220176221176222176223176224176225176226176227176228176229176230176231176232176233176234176235176236176237176238176239176240176241176242176243176244176245176246176247176248176249176250176251176252176253176254176255176256176257176258176259176260176261176262176263176264176265176266176267176268176269176270176271176272176273176274176275176276176277176278176279176280176281176282176283176284176285176286176287176288176289176290176291176292176293176294176295176296176297176298176299176300176301176302176303176304176305176306176307176308176309176310176311176312176313176314176315176316176317176318176319176320176321176322176323176324176325176326176327176328176329176330176331176332176333176334176335176336176337176338176339176340176341176342176343176344176345176346176347176348176349176350176351176352176353176354176355176356176357176358176359176360176361176362176363176364176365176366176367176368176369176370176371176372176373176374176375176376176377176378176379176380176381176382176383176384176385176386176387176388176389176390176391176392176393176394176395176396176397176398176399176400176401176402176403176404176405176406176407176408176409176410176411176412176413176414176415176416176417176418176419176420176421176422176423176424176425176426176427176428176429176430176431176432176433176434176435176436176437176438176439176440176441176442176443176444176445176446176447176448176449176450176451176452176453176454176455176456176457176458176459176460176461176462176463176464176465176466176467176468176469176470176471176472176473176474176475176476176477176478176479176480176481176482176483176484176485176486176487176488176489176490176491176492176493176494176495176496176497176498176499176500176501176502176503176504176505176506176507176508176509176510176511176512176513176514176515176516176517176518176519176520176521176522176523176524176525176526176527176528176529176530176531176532176533176534176535176536176537176538176539176540176541176542176543176544176545176546176547176548176549176550176551176552176553176554176555176556176557176558176559176560176561176562176563176564176565176566176567176568176569176570176571176572176573176574176575176576176577176578176579176580176581176582176583176584176585176586176587176588176589176590176591176592176593176594176595176596176597176598176599176600176601176602176603176604176605176606176607176608176609176610176611176612176613176614176615176616176617176618176619176620176621176622176623176624176625176626176627176628176629176630176631176632176633176634176635176636176637176638176639176640176641176642176643176644176645176646176647176648176649176650176651176652176653176654176655176656176657176658176659176660176661176662176663176664176665176666176667176668176669176670176671176672176673176674176675176676176677176678176679176680176681176682176683176684176685176686176687176688176689176690176691176692176693176694176695176696176697176698176699176700176701176702176703176704176705176706176707176708176709176710176711176712176713176714176715176716176717176718176719176720176721176722176723176724176725176726176727176728176729176730176731176732176733176734176735176736176737176738176739176740176741176742176743176744176745176746176747176748176749176750176751176752176753176754176755176756176757176758176759176760176761176762176763176764176765176766176767176768176769176770176771176772176773176774176775176776176777176778176779176780176781176782176783176784176785176786176787176788176789176790176791176792176793176794176795176796176797176798176799176800176801176802176803176804176805176806176807176808176809176810176811176812176813176814176815176816176817176818176819176820176821176822176823176824176825176826176827176828176829176830176831176832176833176834176835176836176837176838176839176840176841176842176843176844176845176846176847176848176849176850176851176852176853176854176855176856176857176858176859176860176861176862176863176864176865176866176867176868176869176870176871176872176873176874176875176876176877176878176879176880176881176882176883176884176885176886176887176888176889176890176891176892176893176894176895176896176897176898176899176900176901176902176903176904176905176906176907176908176909176910176911176912176913176914176915176916176917176918176919176920176921176922176923176924176925176926176927176928176929176930176931176932176933176934176935176936176937176938176939176940176941176942176943176944176945176946176947176948176949176950176951176952176953176954176955176956176957176958176959176960176961176962176963176964176965176966176967176968176969176970176971176972176973176974176975176976176977176978176979176980176981176982176983176984176985176986176987176988176989176990176991176992176993176994176995176996176997176998176999177000177001177002177003177004177005177006177007177008177009177010177011177012177013177014177015177016177017177018177019177020177021177022177023177024177025177026177027177028177029177030177031177032177033177034177035177036177037177038177039177040177041177042177043177044177045177046177047177048177049177050177051177052177053177054177055177056177057177058177059177060177061177062177063177064177065177066177067177068177069177070177071177072177073177074177075177076177077177078177079177080177081177082177083177084177085177086177087177088177089177090177091177092177093177094177095177096177097177098177099177100177101177102177103177104177105177106177107177108177109177110177111177112177113177114177115177116177117177118177119177120177121177122177123177124177125177126177127177128177129177130177131177132177133177134177135177136177137177138177139177140177141177142177143177144177145177146177147177148177149177150177151177152177153177154177155177156177157177158177159177160177161177162177163177164177165177166177167177168177169177170177171177172177173177174177175177176177177177178177179177180177181177182177183177184177185177186177187177188177189177190177191177192177193177194177195177196177197177198177199177200177201177202177203177204177205177206177207177208177209177210177211177212177213177214177215177216177217177218177219177220177221177222177223177224177225177226177227177228177229177230177231177232177233177234177235177236177237177238177239177240177241177242177243177244177245177246177247177248177249177250177251177252177253177254177255177256177257177258177259177260177261177262177263177264177265177266177267177268177269177270177271177272177273177274177275177276177277177278177279177280177281177282177283177284177285177286177287177288177289177290177291177292177293177294177295177296177297177298177299177300177301177302177303177304177305177306177307177308177309177310177311177312177313177314177315177316177317177318177319177320177321177322177323177324177325177326177327177328177329177330177331177332177333177334177335177336177337177338177339177340177341177342177343177344177345177346177347177348177349177350177351177352177353177354177355177356177357177358177359177360177361177362177363177364177365177366177367177368177369177370177371177372177373177374177375177376177377177378177379177380177381177382177383177384177385177386177387177388177389177390177391177392177393177394177395177396177397177398177399177400177401177402177403177404177405177406177407177408177409177410177411177412177413177414177415177416177417177418177419177420177421177422177423177424177425177426177427177428177429177430177431177432177433177434177435177436177437177438177439177440177441177442177443177444177445177446177447177448177449177450177451177452177453177454177455177456177457177458177459177460177461177462177463177464177465177466177467177468177469177470177471177472177473177474177475177476177477177478177479177480177481177482177483177484177485177486177487177488177489177490177491177492177493177494177495177496177497177498177499177500177501177502177503177504177505177506177507177508177509177510177511177512177513177514177515177516177517177518177519177520177521177522177523177524177525177526177527177528177529177530177531177532177533177534177535177536177537177538177539177540177541177542177543177544177545177546177547177548177549177550177551177552177553177554177555177556177557177558177559177560177561177562177563177564177565177566177567177568177569177570177571177572177573177574177575177576177577177578177579177580177581177582177583177584177585177586177587177588177589177590177591177592177593177594177595177596177597177598177599177600177601177602177603177604177605177606177607177608177609177610177611177612177613177614177615177616177617177618177619177620177621177622177623177624177625177626177627177628177629177630177631177632177633177634177635177636177637177638177639177640177641177642177643177644177645177646177647177648177649177650177651177652177653177654177655177656177657177658177659177660177661177662177663177664177665177666177667177668177669177670177671177672177673177674177675177676177677177678177679177680177681177682177683177684177685177686177687177688177689177690177691177692177693177694177695177696177697177698177699177700177701177702177703177704177705177706177707177708177709177710177711177712177713177714177715177716177717177718177719177720177721177722177723177724177725177726177727177728177729177730177731177732177733177734177735177736177737177738177739177740177741177742177743177744177745177746177747177748177749177750177751177752177753177754177755177756177757177758177759177760177761177762177763177764177765177766177767177768177769177770177771177772177773177774177775177776177777177778177779177780177781177782177783177784177785177786177787177788177789177790177791177792177793177794177795177796177797177798177799177800177801177802177803177804177805177806177807177808177809177810177811177812177813177814177815177816177817177818177819177820177821177822177823177824177825177826177827177828177829177830177831177832177833177834177835177836177837177838177839177840177841177842177843177844177845177846177847177848177849177850177851177852177853177854177855177856177857177858177859177860177861177862177863177864177865177866177867177868177869177870177871177872177873177874177875177876177877177878177879177880177881177882177883177884177885177886177887177888177889177890177891177892177893177894177895177896177897177898177899177900177901177902177903177904177905177906177907177908177909177910177911177912177913177914177915177916177917177918177919177920177921177922177923177924177925177926177927177928177929177930177931177932177933177934177935177936177937177938177939177940177941177942177943177944177945177946177947177948177949177950177951177952177953177954177955177956177957177958177959177960177961177962177963177964177965177966177967177968177969177970177971177972177973177974177975177976177977177978177979177980177981177982177983177984177985177986177987177988177989177990177991177992177993177994177995177996177997177998177999178000178001178002178003178004178005178006178007178008178009178010178011178012178013178014178015178016178017178018178019178020178021178022178023178024178025178026178027178028178029178030178031178032178033178034178035178036178037178038178039178040178041178042178043178044178045178046178047178048178049178050178051178052178053178054178055178056178057178058178059178060178061178062178063178064178065178066178067178068178069178070178071178072178073178074178075178076178077178078178079178080178081178082178083178084178085178086178087178088178089178090178091178092178093178094178095178096178097178098178099178100178101178102178103178104178105178106178107178108178109178110178111178112178113178114178115178116178117178118178119178120178121178122178123178124178125178126178127178128178129178130178131178132178133178134178135178136178137178138178139178140178141178142178143178144178145178146178147178148178149178150178151178152178153178154178155178156178157178158178159178160178161178162178163178164178165178166178167178168178169178170178171178172178173178174178175178176178177178178178179178180178181178182178183178184178185178186178187178188178189178190178191178192178193178194178195178196178197178198178199178200178201178202178203178204178205178206178207178208178209178210178211178212178213178214178215178216178217178218178219178220178221178222178223178224178225178226178227178228178229178230178231178232178233178234178235178236178237178238178239178240178241178242178243178244178245178246178247178248178249178250178251178252178253178254178255178256178257178258178259178260178261178262178263178264178265178266178267178268178269178270178271178272178273178274178275178276178277178278178279178280178281178282178283178284178285178286178287178288178289178290178291178292178293178294178295178296178297178298178299178300178301178302178303178304178305178306178307178308178309178310178311178312178313178314178315178316178317178318178319178320178321178322178323178324178325178326178327178328178329178330178331178332178333178334178335178336178337178338178339178340178341178342178343178344178345178346178347178348178349178350178351178352178353178354178355178356178357178358178359178360178361178362178363178364178365178366178367178368178369178370178371178372178373178374178375178376178377178378178379178380178381178382178383178384178385178386178387178388178389178390178391178392178393178394178395178396178397178398178399178400178401178402178403178404178405178406178407178408178409178410178411178412178413178414178415178416178417178418178419178420178421178422178423178424178425178426178427178428178429178430178431178432178433178434178435178436178437178438178439178440178441178442178443178444178445178446178447178448178449178450178451178452178453178454178455178456178457178458178459178460178461178462178463178464178465178466178467178468178469178470178471178472178473178474178475178476178477178478178479178480178481178482178483178484178485178486178487178488178489178490178491178492178493178494178495178496178497178498178499178500178501178502178503178504178505178506178507178508178509178510178511178512178513178514178515178516178517178518178519178520178521178522178523178524178525178526178527178528178529178530178531178532178533178534178535178536178537178538178539178540178541178542178543178544178545178546178547178548178549178550178551178552178553178554178555178556178557178558178559178560178561178562178563178564178565178566178567178568178569178570178571178572178573178574178575178576178577178578178579178580178581178582178583178584178585178586178587178588178589178590178591178592178593178594178595178596178597178598178599178600178601178602178603178604178605178606178607178608178609178610178611178612178613178614178615178616178617178618178619178620178621178622178623178624178625178626178627178628178629178630178631178632178633178634178635178636178637178638178639178640178641178642178643178644178645178646178647178648178649178650178651178652178653178654178655178656178657178658178659178660178661178662178663178664178665178666178667178668178669178670178671178672178673178674178675178676178677178678178679178680178681178682178683178684178685178686178687178688178689178690178691178692178693178694178695178696178697178698178699178700178701178702178703178704178705178706178707178708178709178710178711178712178713178714178715178716178717178718178719178720178721178722178723178724178725178726178727178728178729178730178731178732178733178734178735178736178737178738178739178740178741178742178743178744178745178746178747178748178749178750178751178752178753178754178755178756178757178758178759178760178761178762178763178764178765178766178767178768178769178770178771178772178773178774178775178776178777178778178779178780178781178782178783178784178785178786178787178788178789178790178791178792178793178794178795178796178797178798178799178800178801178802178803178804178805178806178807178808178809178810178811178812178813178814178815178816178817178818178819178820178821178822178823178824178825178826178827178828178829178830178831178832178833178834178835178836178837178838178839178840178841178842178843178844178845178846178847178848178849178850178851178852178853178854178855178856178857178858178859178860178861178862178863178864178865178866178867178868178869178870178871178872178873178874178875178876178877178878178879178880178881178882178883178884178885178886178887178888178889178890178891178892178893178894178895178896178897178898178899178900178901178902178903178904178905178906178907178908178909178910178911178912178913178914178915178916178917178918178919178920178921178922178923178924178925178926178927178928178929178930178931178932178933178934178935178936178937178938178939178940178941178942178943178944178945178946178947178948178949178950178951178952178953178954178955178956178957178958178959178960178961178962178963178964178965178966178967178968178969178970178971178972178973178974178975178976178977178978178979178980178981178982178983178984178985178986178987178988178989178990178991178992178993178994178995178996178997178998178999179000179001179002179003179004179005179006179007179008179009179010179011179012179013179014179015179016179017179018179019179020179021179022179023179024179025179026179027179028179029179030179031179032179033179034179035179036179037179038179039179040179041179042179043179044179045179046179047179048179049179050179051179052179053179054179055179056179057179058179059179060179061179062179063179064179065179066179067179068179069179070179071179072179073179074179075179076179077179078179079179080179081179082179083179084179085179086179087179088179089179090179091179092179093179094179095179096179097179098179099179100179101179102179103179104179105179106179107179108179109179110179111179112179113179114179115179116179117179118179119179120179121179122179123179124179125179126179127179128179129179130179131179132179133179134179135179136179137179138179139179140179141179142179143179144179145179146179147179148179149179150179151179152179153179154179155179156179157179158179159179160179161179162179163179164179165179166179167179168179169179170179171179172179173179174179175179176179177179178179179179180179181179182179183179184179185179186179187179188179189179190179191179192179193179194179195179196179197179198179199179200179201179202179203179204179205179206179207179208179209179210179211179212179213179214179215179216179217179218179219179220179221179222179223179224179225179226179227179228179229179230179231179232179233179234179235179236179237179238179239179240179241179242179243179244179245179246179247179248179249179250179251179252179253179254179255179256179257179258179259179260179261179262179263179264179265179266179267179268179269179270179271179272179273179274179275179276179277179278179279179280179281179282179283179284179285179286179287179288179289179290179291179292179293179294179295179296179297179298179299179300179301179302179303179304179305179306179307179308179309179310179311179312179313179314179315179316179317179318179319179320179321179322179323179324179325179326179327179328179329179330179331179332179333179334179335179336179337179338179339179340179341179342179343179344179345179346179347179348179349179350179351179352179353179354179355179356179357179358179359179360179361179362179363179364179365179366179367179368179369179370179371179372179373179374179375179376179377179378179379179380179381179382179383179384179385179386179387179388179389179390179391179392179393179394179395179396179397179398179399179400179401179402179403179404179405179406179407179408179409179410179411179412179413179414179415179416179417179418179419179420179421179422179423179424179425179426179427179428179429179430179431179432179433179434179435179436179437179438179439179440179441179442179443179444179445179446179447179448179449179450179451179452179453179454179455179456179457179458179459179460179461179462179463179464179465179466179467179468179469179470179471179472179473179474179475179476179477179478179479179480179481179482179483179484179485179486179487179488179489179490179491179492179493179494179495179496179497179498179499179500179501179502179503179504179505179506179507179508179509179510179511179512179513179514179515179516179517179518179519179520179521179522179523179524179525179526179527179528179529179530179531179532179533179534179535179536179537179538179539179540179541179542179543179544179545179546179547179548179549179550179551179552179553179554179555179556179557179558179559179560179561179562179563179564179565179566179567179568179569179570179571179572179573179574179575179576179577179578179579179580179581179582179583179584179585179586179587179588179589179590179591179592179593179594179595179596179597179598179599179600179601179602179603179604179605179606179607179608179609179610179611179612179613179614179615179616179617179618179619179620179621179622179623179624179625179626179627179628179629179630179631179632179633179634179635179636179637179638179639179640179641179642179643179644179645179646179647179648179649179650179651179652179653179654179655179656179657179658179659179660179661179662179663179664179665179666179667179668179669179670179671179672179673179674179675179676179677179678179679179680179681179682179683179684179685179686179687179688179689179690179691179692179693179694179695179696179697179698179699179700179701179702179703179704179705179706179707179708179709179710179711179712179713179714179715179716179717179718179719179720179721179722179723179724179725179726179727179728179729179730179731179732179733179734179735179736179737179738179739179740179741179742179743179744179745179746179747179748179749179750179751179752179753179754179755179756179757179758179759179760179761179762179763179764179765179766179767179768179769179770179771179772179773179774179775179776179777179778179779179780179781179782179783179784179785179786179787179788179789179790179791179792179793179794179795179796179797179798179799179800179801179802179803179804179805179806179807179808179809179810179811179812179813179814179815179816179817179818179819179820179821179822179823179824179825179826179827179828179829179830179831179832179833179834179835179836179837179838179839179840179841179842179843179844179845179846179847179848179849179850179851179852179853179854179855179856179857179858179859179860179861179862179863179864179865179866179867179868179869179870179871179872179873179874179875179876179877179878179879179880179881179882179883179884179885179886179887179888179889179890179891179892179893179894179895179896179897179898179899179900179901179902179903179904179905179906179907179908179909179910179911179912179913179914179915179916179917179918179919179920179921179922179923179924179925179926179927179928179929179930179931179932179933179934179935179936179937179938179939179940179941179942179943179944179945179946179947179948179949179950179951179952179953179954179955179956179957179958179959179960179961179962179963179964179965179966179967179968179969179970179971179972179973179974179975179976179977179978179979179980179981179982179983179984179985179986179987179988179989179990179991179992179993179994179995179996179997179998179999180000180001180002180003180004180005180006180007180008180009180010180011180012180013180014180015180016180017180018180019180020180021180022180023180024180025180026180027180028180029180030180031180032180033180034180035180036180037180038180039180040180041180042180043180044180045180046180047180048180049180050180051180052180053180054180055180056180057180058180059180060180061180062180063180064180065180066180067180068180069180070180071180072180073180074180075180076180077180078180079180080180081180082180083180084180085180086180087180088180089180090180091180092180093180094180095180096180097180098180099180100180101180102180103180104180105180106180107180108180109180110180111180112180113180114180115180116180117180118180119180120180121180122180123180124180125180126180127180128180129180130180131180132180133180134180135180136180137180138180139180140180141180142180143180144180145180146180147180148180149180150180151180152180153180154180155180156180157180158180159180160180161180162180163180164180165180166180167180168180169180170180171180172180173180174180175180176180177180178180179180180180181180182180183180184180185180186180187180188180189180190180191180192180193180194180195180196180197180198180199180200180201180202180203180204180205180206180207180208180209180210180211180212180213180214180215180216180217180218180219180220180221180222180223180224180225180226180227180228180229180230180231180232180233180234180235180236180237180238180239180240180241180242180243180244180245180246180247180248180249180250180251180252180253180254180255180256180257180258180259180260180261180262180263180264180265180266180267180268180269180270180271180272180273180274180275180276180277180278180279180280180281180282180283180284180285180286180287180288180289180290180291180292180293180294180295180296180297180298180299180300180301180302180303180304180305180306180307180308180309180310180311180312180313180314180315180316180317180318180319180320180321180322180323180324180325180326180327180328180329180330180331180332180333180334180335180336180337180338180339180340180341180342180343180344180345180346180347180348180349180350180351180352180353180354180355180356180357180358180359180360180361180362180363180364180365180366180367180368180369180370180371180372180373180374180375180376180377180378180379180380180381180382180383180384180385180386180387180388180389180390180391180392180393180394180395180396180397180398180399180400180401180402180403180404180405180406180407180408180409180410180411180412180413180414180415180416180417180418180419180420180421180422180423180424180425180426180427180428180429180430180431180432180433180434180435180436180437180438180439180440180441180442180443180444180445180446180447180448180449180450180451180452180453180454180455180456180457180458180459180460180461180462180463180464180465180466180467180468180469180470180471180472180473180474180475180476180477180478180479180480180481180482180483180484180485180486180487180488180489180490180491180492180493180494180495180496180497180498180499180500180501180502180503180504180505180506180507180508180509180510180511180512180513180514180515180516180517180518180519180520180521180522180523180524180525180526180527180528180529180530180531180532180533180534180535180536180537180538180539180540180541180542180543180544180545180546180547180548180549180550180551180552180553180554180555180556180557180558180559180560180561180562180563180564180565180566180567180568180569180570180571180572180573180574180575180576180577180578180579180580180581180582180583180584180585180586180587180588180589180590180591180592180593180594180595180596180597180598180599180600180601180602180603180604180605180606180607180608180609180610180611180612180613180614180615180616180617180618180619180620180621180622180623180624180625180626180627180628180629180630180631180632180633180634180635180636180637180638180639180640180641180642180643180644180645180646180647180648180649180650180651180652180653180654180655180656180657180658180659180660180661180662180663180664180665180666180667180668180669180670180671180672180673180674180675180676180677180678180679180680180681180682180683180684180685180686180687180688180689180690180691180692180693180694180695180696180697180698180699180700180701180702180703180704180705180706180707180708180709180710180711180712180713180714180715180716180717180718180719180720180721180722180723180724180725180726180727180728180729180730180731180732180733180734180735180736180737180738180739180740180741180742180743180744180745180746180747180748180749180750180751180752180753180754180755180756180757180758180759180760180761180762180763180764180765180766180767180768180769180770180771180772180773180774180775180776180777180778180779180780180781180782180783180784180785180786180787180788180789180790180791180792180793180794180795180796180797180798180799180800180801180802180803180804180805180806180807180808180809180810180811180812180813180814180815180816180817180818180819180820180821180822180823180824180825180826180827180828180829180830180831180832180833180834180835180836180837180838180839180840180841180842180843180844180845180846180847180848180849180850180851180852180853180854180855180856180857180858180859180860180861180862180863180864180865180866180867180868180869180870180871180872180873180874180875180876180877180878180879180880180881180882180883180884180885180886180887180888180889180890180891180892180893180894180895180896180897180898180899180900180901180902180903180904180905180906180907180908180909180910180911180912180913180914180915180916180917180918180919180920180921180922180923180924180925180926180927180928180929180930180931180932180933180934180935180936180937180938180939180940180941180942180943180944180945180946180947180948180949180950180951180952180953180954180955180956180957180958180959180960180961180962180963180964180965180966180967180968180969180970180971180972180973180974180975180976180977180978180979180980180981180982180983180984180985180986180987180988180989180990180991180992180993180994180995180996180997180998180999181000181001181002181003181004181005181006181007181008181009181010181011181012181013181014181015181016181017181018181019181020181021181022181023181024181025181026181027181028181029181030181031181032181033181034181035181036181037181038181039181040181041181042181043181044181045181046181047181048181049181050181051181052181053181054181055181056181057181058181059181060181061181062181063181064181065181066181067181068181069181070181071181072181073181074181075181076181077181078181079181080181081181082181083181084181085181086181087181088181089181090181091181092181093181094181095181096181097181098181099181100181101181102181103181104181105181106181107181108181109181110181111181112181113181114181115181116181117181118181119181120181121181122181123181124181125181126181127181128181129181130181131181132181133181134181135181136181137181138181139181140181141181142181143181144181145181146181147181148181149181150181151181152181153181154181155181156181157181158181159181160181161181162181163181164181165181166181167181168181169181170181171181172181173181174181175181176181177181178181179181180181181181182181183181184181185181186181187181188181189181190181191181192181193181194181195181196181197181198181199181200181201181202181203181204181205181206181207181208181209181210181211181212181213181214181215181216181217181218181219181220181221181222181223181224181225181226181227181228181229181230181231181232181233181234181235181236181237181238181239181240181241181242181243181244181245181246181247181248181249181250181251181252181253181254181255181256181257181258181259181260181261181262181263181264181265181266181267181268181269181270181271181272181273181274181275181276181277181278181279181280181281181282181283181284181285181286181287181288181289181290181291181292181293181294181295181296181297181298181299181300181301181302181303181304181305181306181307181308181309181310181311181312181313181314181315181316181317181318181319181320181321181322181323181324181325181326181327181328181329181330181331181332181333181334181335181336181337181338181339181340181341181342181343181344181345181346181347181348181349181350181351181352181353181354181355181356181357181358181359181360181361181362181363181364181365181366181367181368181369181370181371181372181373181374181375181376181377181378181379181380181381181382181383181384181385181386181387181388181389181390181391181392181393181394181395181396181397181398181399181400181401181402181403181404181405181406181407181408181409181410181411181412181413181414181415181416181417181418181419181420181421181422181423181424181425181426181427181428181429181430181431181432181433181434181435181436181437181438181439181440181441181442181443181444181445181446181447181448181449181450181451181452181453181454181455181456181457181458181459181460181461181462181463181464181465181466181467181468181469181470181471181472181473181474181475181476181477181478181479181480181481181482181483181484181485181486181487181488181489181490181491181492181493181494181495181496181497181498181499181500181501181502181503181504181505181506181507181508181509181510181511181512181513181514181515181516181517181518181519181520181521181522181523181524181525181526181527181528181529181530181531181532181533181534181535181536181537181538181539181540181541181542181543181544181545181546181547181548181549181550181551181552181553181554181555181556181557181558181559181560181561181562181563181564181565181566181567181568181569181570181571181572181573181574181575181576181577181578181579181580181581181582181583181584181585181586181587181588181589181590181591181592181593181594181595181596181597181598181599181600181601181602181603181604181605181606181607181608181609181610181611181612181613181614181615181616181617181618181619181620181621181622181623181624181625181626181627181628181629181630181631181632181633181634181635181636181637181638181639181640181641181642181643181644181645181646181647181648181649181650181651181652181653181654181655181656181657181658181659181660181661181662181663181664181665181666181667181668181669181670181671181672181673181674181675181676181677181678181679181680181681181682181683181684181685181686181687181688181689181690181691181692181693181694181695181696181697181698181699181700181701181702181703181704181705181706181707181708181709181710181711181712181713181714181715181716181717181718181719181720181721181722181723181724181725181726181727181728181729181730181731181732181733181734181735181736181737181738181739181740181741181742181743181744181745181746181747181748181749181750181751181752181753181754181755181756181757181758181759181760181761181762181763181764181765181766181767181768181769181770181771181772181773181774181775181776181777181778181779181780181781181782181783181784181785181786181787181788181789181790181791181792181793181794181795181796181797181798181799181800181801181802181803181804181805181806181807181808181809181810181811181812181813181814181815181816181817181818181819181820181821181822181823181824181825181826181827181828181829181830181831181832181833181834181835181836181837181838181839181840181841181842181843181844181845181846181847181848181849181850181851181852181853181854181855181856181857181858181859181860181861181862181863181864181865181866181867181868181869181870181871181872181873181874181875181876181877181878181879181880181881181882181883181884181885181886181887181888181889181890181891181892181893181894181895181896181897181898181899181900181901181902181903181904181905181906181907181908181909181910181911181912181913181914181915181916181917181918181919181920181921181922181923181924181925181926181927181928181929181930181931181932181933181934181935181936181937181938181939181940181941181942181943181944181945181946181947181948181949181950181951181952181953181954181955181956181957181958181959181960181961181962181963181964181965181966181967181968181969181970181971181972181973181974181975181976181977181978181979181980181981181982181983181984181985181986181987181988181989181990181991181992181993181994181995181996181997181998181999182000182001182002182003182004182005182006182007182008182009182010182011182012182013182014182015182016182017182018182019182020182021182022182023182024182025182026182027182028182029182030182031182032182033182034182035182036182037182038182039182040182041182042182043182044182045182046182047182048182049182050182051182052182053182054182055182056182057182058182059182060182061182062182063182064182065182066182067182068182069182070182071182072182073182074182075182076182077182078182079182080182081182082182083182084182085182086182087182088182089182090182091182092182093182094182095182096182097182098182099182100182101182102182103182104182105182106182107182108182109182110182111182112182113182114182115182116182117182118182119182120182121182122182123182124182125182126182127182128182129182130182131182132182133182134182135182136182137182138182139182140182141182142182143182144182145182146182147182148182149182150182151182152182153182154182155182156182157182158182159182160182161182162182163182164182165182166182167182168182169182170182171182172182173182174182175182176182177182178182179182180182181182182182183182184182185182186182187182188182189182190182191182192182193182194182195182196182197182198182199182200182201182202182203182204182205182206182207182208182209182210182211182212182213182214182215182216182217182218182219182220182221182222182223182224182225182226182227182228182229182230182231182232182233182234182235182236182237182238182239182240182241182242182243182244182245182246182247182248182249182250182251182252182253182254182255182256182257182258182259182260182261182262182263182264182265182266182267182268182269182270182271182272182273182274182275182276182277182278182279182280182281182282182283182284182285182286182287182288182289182290182291182292182293182294182295182296182297182298182299182300182301182302182303182304182305182306182307182308182309182310182311182312182313182314182315182316182317182318182319182320182321182322182323182324182325182326182327182328182329182330182331182332182333182334182335182336182337182338182339182340182341182342182343182344182345182346182347182348182349182350182351182352182353182354182355182356182357182358182359182360182361182362182363182364182365182366182367182368182369182370182371182372182373182374182375182376182377182378182379182380182381182382182383182384182385182386182387182388182389182390182391182392182393182394182395182396182397182398182399182400182401182402182403182404182405182406182407182408182409182410182411182412182413182414182415182416182417182418182419182420182421182422182423182424182425182426182427182428182429182430182431182432182433182434182435182436182437182438182439182440182441182442182443182444182445182446182447182448182449182450182451182452182453182454182455182456182457182458182459182460182461182462182463182464182465182466182467182468182469182470182471182472182473182474182475182476182477182478182479182480182481182482182483182484182485182486182487182488182489182490182491182492182493182494182495182496182497182498182499182500182501182502182503182504182505182506182507182508182509182510182511182512182513182514182515182516182517182518182519182520182521182522182523182524182525182526182527182528182529182530182531182532182533182534182535182536182537182538182539182540182541182542182543182544182545182546182547182548182549182550182551182552182553182554182555182556182557182558182559182560182561182562182563182564182565182566182567182568182569182570182571182572182573182574182575182576182577182578182579182580182581182582182583182584182585182586182587182588182589182590182591182592182593182594182595182596182597182598182599182600182601182602182603182604182605182606182607182608182609182610182611182612182613182614182615182616182617182618182619182620182621182622182623182624182625182626182627182628182629182630182631182632182633182634182635182636182637182638182639182640182641182642182643182644182645182646182647182648182649182650182651182652182653182654182655182656182657182658182659182660182661182662182663182664182665182666182667182668182669182670182671182672182673182674182675182676182677182678182679182680182681182682182683182684182685182686182687182688182689182690182691182692182693182694182695182696182697182698182699182700182701182702182703182704182705182706182707182708182709182710182711182712182713182714182715182716182717182718182719182720182721182722182723182724182725182726182727182728182729182730182731182732182733182734182735182736182737182738182739182740182741182742182743182744182745182746182747182748182749182750182751182752182753182754182755182756182757182758182759182760182761182762182763182764182765182766182767182768182769182770182771182772182773182774182775182776182777182778182779182780182781182782182783182784182785182786182787182788182789182790182791182792182793182794182795182796182797182798182799182800182801182802182803182804182805182806182807182808182809182810182811182812182813182814182815182816182817182818182819182820182821182822182823182824182825182826182827182828182829182830182831182832182833182834182835182836182837182838182839182840182841182842182843182844182845182846182847182848182849182850182851182852182853182854182855182856182857182858182859182860182861182862182863182864182865182866182867182868182869182870182871182872182873182874182875182876182877182878182879182880182881182882182883182884182885182886182887182888182889182890182891182892182893182894182895182896182897182898182899182900182901182902182903182904182905182906182907182908182909182910182911182912182913182914182915182916182917182918182919182920182921182922182923182924182925182926182927182928182929182930182931182932182933182934182935182936182937182938182939182940182941182942182943182944182945182946182947182948182949182950182951182952182953182954182955182956182957182958182959182960182961182962182963182964182965182966182967182968182969182970182971182972182973182974182975182976182977182978182979182980182981182982182983182984182985182986182987182988182989182990182991182992182993182994182995182996182997182998182999183000183001183002183003183004183005183006183007183008183009183010183011183012183013183014183015183016183017183018183019183020183021183022183023183024183025183026183027183028183029183030183031183032183033183034183035183036183037183038183039183040183041183042183043183044183045183046183047183048183049183050183051183052183053183054183055183056183057183058183059183060183061183062183063183064183065183066183067183068183069183070183071183072183073183074183075183076183077183078183079183080183081183082183083183084183085183086183087183088183089183090183091183092183093183094183095183096183097183098183099183100183101183102183103183104183105183106183107183108183109183110183111183112183113183114183115183116183117183118183119183120183121183122183123183124183125183126183127183128183129183130183131183132183133183134183135183136183137183138183139183140183141183142183143183144183145183146183147183148183149183150183151183152183153183154183155183156183157183158183159183160183161183162183163183164183165183166183167183168183169183170183171183172183173183174183175183176183177183178183179183180183181183182183183183184183185183186183187183188183189183190183191183192183193183194183195183196183197183198183199183200183201183202183203183204183205183206183207183208183209183210183211183212183213183214183215183216183217183218183219183220183221183222183223183224183225183226183227183228183229183230183231183232183233183234183235183236183237183238183239183240183241183242183243183244183245183246183247183248183249183250183251183252183253183254183255183256183257183258183259183260183261183262183263183264183265183266183267183268183269183270183271183272183273183274183275183276183277183278183279183280183281183282183283183284183285183286183287183288183289183290183291183292183293183294183295183296183297183298183299183300183301183302183303183304183305183306183307183308183309183310183311183312183313183314183315183316183317183318183319183320183321183322183323183324183325183326183327183328183329183330183331183332183333183334183335183336183337183338183339183340183341183342183343183344183345183346183347183348183349183350183351183352183353183354183355183356183357183358183359183360183361183362183363183364183365183366183367183368183369183370183371183372183373183374183375183376183377183378183379183380183381183382183383183384183385183386183387183388183389183390183391183392183393183394183395183396183397183398183399183400183401183402183403183404183405183406183407183408183409183410183411183412183413183414183415183416183417183418183419183420183421183422183423183424183425183426183427183428183429183430183431183432183433183434183435183436183437183438183439183440183441183442183443183444183445183446183447183448183449183450183451183452183453183454183455183456183457183458183459183460183461183462183463183464183465183466183467183468183469183470183471183472183473183474183475183476183477183478183479183480183481183482183483183484183485183486183487183488183489183490183491183492183493183494183495183496183497183498183499183500183501183502183503183504183505183506183507183508183509183510183511183512183513183514183515183516183517183518183519183520183521183522183523183524183525183526183527183528183529183530183531183532183533183534183535183536183537183538183539183540183541183542183543183544183545183546183547183548183549183550183551183552183553183554183555183556183557183558183559183560183561183562183563183564183565183566183567183568183569183570183571183572183573183574183575183576183577183578183579183580183581183582183583183584183585183586183587183588183589183590183591183592183593183594183595183596183597183598183599183600183601183602183603183604183605183606183607183608183609183610183611183612183613183614183615183616183617183618183619183620183621183622183623183624183625183626183627183628183629183630183631183632183633183634183635183636183637183638183639183640183641183642183643183644183645183646183647183648183649183650183651183652183653183654183655183656183657183658183659183660183661183662183663183664183665183666183667183668183669183670183671183672183673183674183675183676183677183678183679183680183681183682183683183684183685183686183687183688183689183690183691183692183693183694183695183696183697183698183699183700183701183702183703183704183705183706183707183708183709183710183711183712183713183714183715183716183717183718183719183720183721183722183723183724183725183726183727183728183729183730183731183732183733183734183735183736183737183738183739183740183741183742183743183744183745183746183747183748183749183750183751183752183753183754183755183756183757183758183759183760183761183762183763183764183765183766183767183768183769183770183771183772183773183774183775183776183777183778183779183780183781183782183783183784183785183786183787183788183789183790183791183792183793183794183795183796183797183798183799183800183801183802183803183804183805183806183807183808183809183810183811183812183813183814183815183816183817183818183819183820183821183822183823183824183825183826183827183828183829183830183831183832183833183834183835183836183837183838183839183840183841183842183843183844183845183846183847183848183849183850183851183852183853183854183855183856183857183858183859183860183861183862183863183864183865183866183867183868183869183870183871183872183873183874183875183876183877183878183879183880183881183882183883183884183885183886183887183888183889183890183891183892183893183894183895183896183897183898183899183900183901183902183903183904183905183906183907183908183909183910183911183912183913183914183915183916183917183918183919183920183921183922183923183924183925183926183927183928183929183930183931183932183933183934183935183936183937183938183939183940183941183942183943183944183945183946183947183948183949183950183951183952183953183954183955183956183957183958183959183960183961183962183963183964183965183966183967183968183969183970183971183972183973183974183975183976183977183978183979183980183981183982183983183984183985183986183987183988183989183990183991183992183993183994183995183996183997183998183999184000184001184002184003184004184005184006184007184008184009184010184011184012184013184014184015184016184017184018184019184020184021184022184023184024184025184026184027184028184029184030184031184032184033184034184035184036184037184038184039184040184041184042184043184044184045184046184047184048184049184050184051184052184053184054184055184056184057184058184059184060184061184062184063184064184065184066184067184068184069184070184071184072184073184074184075184076184077184078184079184080184081184082184083184084184085184086184087184088184089184090184091184092184093184094184095184096184097184098184099184100184101184102184103184104184105184106184107184108184109184110184111184112184113184114184115184116184117184118184119184120184121184122184123184124184125184126184127184128184129184130184131184132184133184134184135184136184137184138184139184140184141184142184143184144184145184146184147184148184149184150184151184152184153184154184155184156184157184158184159184160184161184162184163184164184165184166184167184168184169184170184171184172184173184174184175184176184177184178184179184180184181184182184183184184184185184186184187184188184189184190184191184192184193184194184195184196184197184198184199184200184201184202184203184204184205184206184207184208184209184210184211184212184213184214184215184216184217184218184219184220184221184222184223184224184225184226184227184228184229184230184231184232184233184234184235184236184237184238184239184240184241184242184243184244184245184246184247184248184249184250184251184252184253184254184255184256184257184258184259184260184261184262184263184264184265184266184267184268184269184270184271184272184273184274184275184276184277184278184279184280184281184282184283184284184285184286184287184288184289184290184291184292184293184294184295184296184297184298184299184300184301184302184303184304184305184306184307184308184309184310184311184312184313184314184315184316184317184318184319184320184321184322184323184324184325184326184327184328184329184330184331184332184333184334184335184336184337184338184339184340184341184342184343184344184345184346184347184348184349184350184351184352184353184354184355184356184357184358184359184360184361184362184363184364184365184366184367184368184369184370184371184372184373184374184375184376184377184378184379184380184381184382184383184384184385184386184387184388184389184390184391184392184393184394184395184396184397184398184399184400184401184402184403184404184405184406184407184408184409184410184411184412184413184414184415184416184417184418184419184420184421184422184423184424184425184426184427184428184429184430184431184432184433184434184435184436184437184438184439184440184441184442184443184444184445184446184447184448184449184450184451184452184453184454184455184456184457184458184459184460184461184462184463184464184465184466184467184468184469184470184471184472184473184474184475184476184477184478184479184480184481184482184483184484184485184486184487184488184489184490184491184492184493184494184495184496184497184498184499184500184501184502184503184504184505184506184507184508184509184510184511184512184513184514184515184516184517184518184519184520184521184522184523184524184525184526184527184528184529184530184531184532184533184534184535184536184537184538184539184540184541184542184543184544184545184546184547184548184549184550184551184552184553184554184555184556184557184558184559184560184561184562184563184564184565184566184567184568184569184570184571184572184573184574184575184576184577184578184579184580184581184582184583184584184585184586184587184588184589184590184591184592184593184594184595184596184597184598184599184600184601184602184603184604184605184606184607184608184609184610184611184612184613184614184615184616184617184618184619184620184621184622184623184624184625184626184627184628184629184630184631184632184633184634184635184636184637184638184639184640184641184642184643184644184645184646184647184648184649184650184651184652184653184654184655184656184657184658184659184660184661184662184663184664184665184666184667184668184669184670184671184672184673184674184675184676184677184678184679184680184681184682184683184684184685184686184687184688184689184690184691184692184693184694184695184696184697184698184699184700184701184702184703184704184705184706184707184708184709184710184711184712184713184714184715184716184717184718184719184720184721184722184723184724184725184726184727184728184729184730184731184732184733184734184735184736184737184738184739184740184741184742184743184744184745184746184747184748184749184750184751184752184753184754184755184756184757184758184759184760184761184762184763184764184765184766184767184768184769184770184771184772184773184774184775184776184777184778184779184780184781184782184783184784184785184786184787184788184789184790184791184792184793184794184795184796184797184798184799184800184801184802184803184804184805184806184807184808184809184810184811184812184813184814184815184816184817184818184819184820184821184822184823184824184825184826184827184828184829184830184831184832184833184834184835184836184837184838184839184840184841184842184843184844184845184846184847184848184849184850184851184852184853184854184855184856184857184858184859184860184861184862184863184864184865184866184867184868184869184870184871184872184873184874184875184876184877184878184879184880184881184882184883184884184885184886184887184888184889184890184891184892184893184894184895184896184897184898184899184900184901184902184903184904184905184906184907184908184909184910184911184912184913184914184915184916184917184918184919184920184921184922184923184924184925184926184927184928184929184930184931184932184933184934184935184936184937184938184939184940184941184942184943184944184945184946184947184948184949184950184951184952184953184954184955184956184957184958184959184960184961184962184963184964184965184966184967184968184969184970184971184972184973184974184975184976184977184978184979184980184981184982184983184984184985184986184987184988184989184990184991184992184993184994184995184996184997184998184999185000185001185002185003185004185005185006185007185008185009185010185011185012185013185014185015185016185017185018185019185020185021185022185023185024185025185026185027185028185029185030185031185032185033185034185035185036185037185038185039185040185041185042185043185044185045185046185047185048185049185050185051185052185053185054185055185056185057185058185059185060185061185062185063185064185065185066185067185068185069185070185071185072185073185074185075185076185077185078185079185080185081185082185083185084185085185086185087185088185089185090185091185092185093185094185095185096185097185098185099185100185101185102185103185104185105185106185107185108185109185110185111185112185113185114185115185116185117185118185119185120185121185122185123185124185125185126185127185128185129185130185131185132185133185134185135185136185137185138185139185140185141185142185143185144185145185146185147185148185149185150185151185152185153185154185155185156185157185158185159185160185161185162185163185164185165185166185167185168185169185170185171185172185173185174185175185176185177185178185179185180185181185182185183185184185185185186185187185188185189185190185191185192185193185194185195185196185197185198185199185200185201185202185203185204185205185206185207185208185209185210185211185212185213185214185215185216185217185218185219185220185221185222185223185224185225185226185227185228185229185230185231185232185233185234185235185236185237185238185239185240185241185242185243185244185245185246185247185248185249185250185251185252185253185254185255185256185257185258185259185260185261185262185263185264185265185266185267185268185269185270185271185272185273185274185275185276185277185278185279185280185281185282185283185284185285185286185287185288185289185290185291185292185293185294185295185296185297185298185299185300185301185302185303185304185305185306185307185308185309185310185311185312185313185314185315185316185317185318185319185320185321185322185323185324185325185326185327185328185329185330185331185332185333185334185335185336185337185338185339185340185341185342185343185344185345185346185347185348185349185350185351185352185353185354185355185356185357185358185359185360185361185362185363185364185365185366185367185368185369185370185371185372185373185374185375185376185377185378185379185380185381185382185383185384185385185386185387185388185389185390185391185392185393185394185395185396185397185398185399185400185401185402185403185404185405185406185407185408185409185410185411185412185413185414185415185416185417185418185419185420185421185422185423185424185425185426185427185428185429185430185431185432185433185434185435185436185437185438185439185440185441185442185443185444185445185446185447185448185449185450185451185452185453185454185455185456185457185458185459185460185461185462185463185464185465185466185467185468185469185470185471185472185473185474185475185476185477185478185479185480185481185482185483185484185485185486185487185488185489185490185491185492185493185494185495185496185497185498185499185500185501185502185503185504185505185506185507185508185509185510185511185512185513185514185515185516185517185518185519185520185521185522185523185524185525185526185527185528185529185530185531185532185533185534185535185536185537185538185539185540185541185542185543185544185545185546185547185548185549185550185551185552185553185554185555185556185557185558185559185560185561185562185563185564185565185566185567185568185569185570185571185572185573185574185575185576185577185578185579185580185581185582185583185584185585185586185587185588185589185590185591185592185593185594185595185596185597185598185599185600185601185602185603185604185605185606185607185608185609185610185611185612185613185614185615185616185617185618185619185620185621185622185623185624185625185626185627185628185629185630185631185632185633185634185635185636185637185638185639185640185641185642185643185644185645185646185647185648185649185650185651185652185653185654185655185656185657185658185659185660185661185662185663185664185665185666185667185668185669185670185671185672185673185674185675185676185677185678185679185680185681185682185683185684185685185686185687185688185689185690185691185692185693185694185695185696185697185698185699185700185701185702185703185704185705185706185707185708185709185710185711185712185713185714185715185716185717185718185719185720185721185722185723185724185725185726185727185728185729185730185731185732185733185734185735185736185737185738185739185740185741185742185743185744185745185746185747185748185749185750185751185752185753185754185755185756185757185758185759185760185761185762185763185764185765185766185767185768185769185770185771185772185773185774185775185776185777185778185779185780185781185782185783185784185785185786185787185788185789185790185791185792185793185794185795185796185797185798185799185800185801185802185803185804185805185806185807185808185809185810185811185812185813185814185815185816185817185818185819185820185821185822185823185824185825185826185827185828185829185830185831185832185833185834185835185836185837185838185839185840185841185842185843185844185845185846185847185848185849185850185851185852185853185854185855185856185857185858185859185860185861185862185863185864185865185866185867185868185869185870185871185872185873185874185875185876185877185878185879185880185881185882185883185884185885185886185887185888185889185890185891185892185893185894185895185896185897185898185899185900185901185902185903185904185905185906185907185908185909185910185911185912185913185914185915185916185917185918185919185920185921185922185923185924185925185926185927185928185929185930185931185932185933185934185935185936185937185938185939185940185941185942185943185944185945185946185947185948185949185950185951185952185953185954185955185956185957185958185959185960185961185962185963185964185965185966185967185968185969185970185971185972185973185974185975185976185977185978185979185980185981185982185983185984185985185986185987185988185989185990185991185992185993185994185995185996185997185998185999186000186001186002186003186004186005186006186007186008186009186010186011186012186013186014186015186016186017186018186019186020186021186022186023186024186025186026186027186028186029186030186031186032186033186034186035186036186037186038186039186040186041186042186043186044186045186046186047186048186049186050186051186052186053186054186055186056186057186058186059186060186061186062186063186064186065186066186067186068186069186070186071186072186073186074186075186076186077186078186079186080186081186082186083186084186085186086186087186088186089186090186091186092186093186094186095186096186097186098186099186100186101186102186103186104186105186106186107186108186109186110186111186112186113186114186115186116186117186118186119186120186121186122186123186124186125186126186127186128186129186130186131186132186133186134186135186136186137186138186139186140186141186142186143186144186145186146186147186148186149186150186151186152186153186154186155186156186157186158186159186160186161186162186163186164186165186166186167186168186169186170186171186172186173186174186175186176186177186178186179186180186181186182186183186184186185186186186187186188186189186190186191186192186193186194186195186196186197186198186199186200186201186202186203186204186205186206186207186208186209186210186211186212186213186214186215186216186217186218186219186220186221186222186223186224186225186226186227186228186229186230186231186232186233186234186235186236186237186238186239186240186241186242186243186244186245186246186247186248186249186250186251186252186253186254186255186256186257186258186259186260186261186262186263186264186265186266186267186268186269186270186271186272186273186274186275186276186277186278186279186280186281186282186283186284186285186286186287186288186289186290186291186292186293186294186295186296186297186298186299186300186301186302186303186304186305186306186307186308186309186310186311186312186313186314186315186316186317186318186319186320186321186322186323186324186325186326186327186328186329186330186331186332186333186334186335186336186337186338186339186340186341186342186343186344186345186346186347186348186349186350186351186352186353186354186355186356186357186358186359186360186361186362186363186364186365186366186367186368186369186370186371186372186373186374186375186376186377186378186379186380186381186382186383186384186385186386186387186388186389186390186391186392186393186394186395186396186397186398186399186400186401186402186403186404186405186406186407186408186409186410186411186412186413186414186415186416186417186418186419186420186421186422186423186424186425186426186427186428186429186430186431186432186433186434186435186436186437186438186439186440186441186442186443186444186445186446186447186448186449186450186451186452186453186454186455186456186457186458186459186460186461186462186463186464186465186466186467186468186469186470186471186472186473186474186475186476186477186478186479186480186481186482186483186484186485186486186487186488186489186490186491186492186493186494186495186496186497186498186499186500186501186502186503186504186505186506186507186508186509186510186511186512186513186514186515186516186517186518186519186520186521186522186523186524186525186526186527186528186529186530186531186532186533186534186535186536186537186538186539186540186541186542186543186544186545186546186547186548186549186550186551186552186553186554186555186556186557186558186559186560186561186562186563186564186565186566186567186568186569186570186571186572186573186574186575186576186577186578186579186580186581186582186583186584186585186586186587186588186589186590186591186592186593186594186595186596186597186598186599186600186601186602186603186604186605186606186607186608186609186610186611186612186613186614186615186616186617186618186619186620186621186622186623186624186625186626186627186628186629186630186631186632186633186634186635186636186637186638186639186640186641186642186643186644186645186646186647186648186649186650186651186652186653186654186655186656186657186658186659186660186661186662186663186664186665186666186667186668186669186670186671186672186673186674186675186676186677186678186679186680186681186682186683186684186685186686186687186688186689186690186691186692186693186694186695186696186697186698186699186700186701186702186703186704186705186706186707186708186709186710186711186712186713186714186715186716186717186718186719186720186721186722186723186724186725186726186727186728186729186730186731186732186733186734186735186736186737186738186739186740186741186742186743186744186745186746186747186748186749186750186751186752186753186754186755186756186757186758186759186760186761186762186763186764186765186766186767186768186769186770186771186772186773186774186775186776186777186778186779186780186781186782186783186784186785186786186787186788186789186790186791186792186793186794186795186796186797186798186799186800186801186802186803186804186805186806186807186808186809186810186811186812186813186814186815186816186817186818186819186820186821186822186823186824186825186826186827186828186829186830186831186832186833186834186835186836186837186838186839186840186841186842186843186844186845186846186847186848186849186850186851186852186853186854186855186856186857186858186859186860186861186862186863186864186865186866186867186868186869186870186871186872186873186874186875186876186877186878186879186880186881186882186883186884186885186886186887186888186889186890186891186892186893186894186895186896186897186898186899186900186901186902186903186904186905186906186907186908186909186910186911186912186913186914186915186916186917186918186919186920186921186922186923186924186925186926186927186928186929186930186931186932186933186934186935186936186937186938186939186940186941186942186943186944186945186946186947186948186949186950186951186952186953186954186955186956186957186958186959186960186961186962186963186964186965186966186967186968186969186970186971186972186973186974186975186976186977186978186979186980186981186982186983186984186985186986186987186988186989186990186991186992186993186994186995186996186997186998186999187000187001187002187003187004187005187006187007187008187009187010187011187012187013187014187015187016187017187018187019187020187021187022187023187024187025187026187027187028187029187030187031187032187033187034187035187036187037187038187039187040187041187042187043187044187045187046187047187048187049187050187051187052187053187054187055187056187057187058187059187060187061187062187063187064187065187066187067187068187069187070187071187072187073187074187075187076187077187078187079187080187081187082187083187084187085187086187087187088187089187090187091187092187093187094187095187096187097187098187099187100187101187102187103187104187105187106187107187108187109187110187111187112187113187114187115187116187117187118187119187120187121187122187123187124187125187126187127187128187129187130187131187132187133187134187135187136187137187138187139187140187141187142187143187144187145187146187147187148187149187150187151187152187153187154187155187156187157187158187159187160187161187162187163187164187165187166187167187168187169187170187171187172187173187174187175187176187177187178187179187180187181187182187183187184187185187186187187187188187189187190187191187192187193187194187195187196187197187198187199187200187201187202187203187204187205187206187207187208187209187210187211187212187213187214187215187216187217187218187219187220187221187222187223187224187225187226187227187228187229187230187231187232187233187234187235187236187237187238187239187240187241187242187243187244187245187246187247187248187249187250187251187252187253187254187255187256187257187258187259187260187261187262187263187264187265187266187267187268187269187270187271187272187273187274187275187276187277187278187279187280187281187282187283187284187285187286187287187288187289187290187291187292187293187294187295187296187297187298187299187300187301187302187303187304187305187306187307187308187309187310187311187312187313187314187315187316187317187318187319187320187321187322187323187324187325187326187327187328187329187330187331187332187333187334187335187336187337187338187339187340187341187342187343187344187345187346187347187348187349187350187351187352187353187354187355187356187357187358187359187360187361187362187363187364187365187366187367187368187369187370187371187372187373187374187375187376187377187378187379187380187381187382187383187384187385187386187387187388187389187390187391187392187393187394187395187396187397187398187399187400187401187402187403187404187405187406187407187408187409187410187411187412187413187414187415187416187417187418187419187420187421187422187423187424187425187426187427187428187429187430187431187432187433187434187435187436187437187438187439187440187441187442187443187444187445187446187447187448187449187450187451187452187453187454187455187456187457187458187459187460187461187462187463187464187465187466187467187468187469187470187471187472187473187474187475187476187477187478187479187480187481187482187483187484187485187486187487187488187489187490187491187492187493187494187495187496187497187498187499187500187501187502187503187504187505187506187507187508187509187510187511187512187513187514187515187516187517187518187519187520187521187522187523187524187525187526187527187528187529187530187531187532187533187534187535187536187537187538187539187540187541187542187543187544187545187546187547187548187549187550187551187552187553187554187555187556187557187558187559187560187561187562187563187564187565187566187567187568187569187570187571187572187573187574187575187576187577187578187579187580187581187582187583187584187585187586187587187588187589187590187591187592187593187594187595187596187597187598187599187600187601187602187603187604187605187606187607187608187609187610187611187612187613187614187615187616187617187618187619187620187621187622187623187624187625187626187627187628187629187630187631187632187633187634187635187636187637187638187639187640187641187642187643187644187645187646187647187648187649187650187651187652187653187654187655187656187657187658187659187660187661187662187663187664187665187666187667187668187669187670187671187672187673187674187675187676187677187678187679187680187681187682187683187684187685187686187687187688187689187690187691187692187693187694187695187696187697187698187699187700187701187702187703187704187705187706187707187708187709187710187711187712187713187714187715187716187717187718187719187720187721187722187723187724187725187726187727187728187729187730187731187732187733187734187735187736187737187738187739187740187741187742187743187744187745187746187747187748187749187750187751187752187753187754187755187756187757187758187759187760187761187762187763187764187765187766187767187768187769187770187771187772187773187774187775187776187777187778187779187780187781187782187783187784187785187786187787187788187789187790187791187792187793187794187795187796187797187798187799187800187801187802187803187804187805187806187807187808187809187810187811187812187813187814187815187816187817187818187819187820187821187822187823187824187825187826187827187828187829187830187831187832187833187834187835187836187837187838187839187840187841187842187843187844187845187846187847187848187849187850187851187852187853187854187855187856187857187858187859187860187861187862187863187864187865187866187867187868187869187870187871187872187873187874187875187876187877187878187879187880187881187882187883187884187885187886187887187888187889187890187891187892187893187894187895187896187897187898187899187900187901187902187903187904187905187906187907187908187909187910187911187912187913187914187915187916187917187918187919187920187921187922187923187924187925187926187927187928187929187930187931187932187933187934187935187936187937187938187939187940187941187942187943187944187945187946187947187948187949187950187951187952187953187954187955187956187957187958187959187960187961187962187963187964187965187966187967187968187969187970187971187972187973187974187975187976187977187978187979187980187981187982187983187984187985187986187987187988187989187990187991187992187993187994187995187996187997187998187999188000188001188002188003188004188005188006188007188008188009188010188011188012188013188014188015188016188017188018188019188020188021188022188023188024188025188026188027188028188029188030188031188032188033188034188035188036188037188038188039188040188041188042188043188044188045188046188047188048188049188050188051188052188053188054188055188056188057188058188059188060188061188062188063188064188065188066188067188068188069188070188071188072188073188074188075188076188077188078188079188080188081188082188083188084188085188086188087188088188089188090188091188092188093188094188095188096188097188098188099188100188101188102188103188104188105188106188107188108188109188110188111188112188113188114188115188116188117188118188119188120188121188122188123188124188125188126188127188128188129188130188131188132188133188134188135188136188137188138188139188140188141188142188143188144188145188146188147188148188149188150188151188152188153188154188155188156188157188158188159188160188161188162188163188164188165188166188167188168188169188170188171188172188173188174188175188176188177188178188179188180188181188182188183188184188185188186188187188188188189188190188191188192188193188194188195188196188197188198188199188200188201188202188203188204188205188206188207188208188209188210188211188212188213188214188215188216188217188218188219188220188221188222188223188224188225188226188227188228188229188230188231188232188233188234188235188236188237188238188239188240188241188242188243188244188245188246188247188248188249188250188251188252188253188254188255188256188257188258188259188260188261188262188263188264188265188266188267188268188269188270188271188272188273188274188275188276188277188278188279188280188281188282188283188284188285188286188287188288188289188290188291188292188293188294188295188296188297188298188299188300188301188302188303188304188305188306188307188308188309188310188311188312188313188314188315188316188317188318188319188320188321188322188323188324188325188326188327188328188329188330188331188332188333188334188335188336188337188338188339188340188341188342188343188344188345188346188347188348188349188350188351188352188353188354188355188356188357188358188359188360188361188362188363188364188365188366188367188368188369188370188371188372188373188374188375188376188377188378188379188380188381188382188383188384188385188386188387188388188389188390188391188392188393188394188395188396188397188398188399188400188401188402188403188404188405188406188407188408188409188410188411188412188413188414188415188416188417188418188419188420188421188422188423188424188425188426188427188428188429188430188431188432188433188434188435188436188437188438188439188440188441188442188443188444188445188446188447188448188449188450188451188452188453188454188455188456188457188458188459188460188461188462188463188464188465188466188467188468188469188470188471188472188473188474188475188476188477188478188479188480188481188482188483188484188485188486188487188488188489188490188491188492188493188494188495188496188497188498188499188500188501188502188503188504188505188506188507188508188509188510188511188512188513188514188515188516188517188518188519188520188521188522188523188524188525188526188527188528188529188530188531188532188533188534188535188536188537188538188539188540188541188542188543188544188545188546188547188548188549188550188551188552188553188554188555188556188557188558188559188560188561188562188563188564188565188566188567188568188569188570188571188572188573188574188575188576188577188578188579188580188581188582188583188584188585188586188587188588188589188590188591188592188593188594188595188596188597188598188599188600188601188602188603188604188605188606188607188608188609188610188611188612188613188614188615188616188617188618188619188620188621188622188623188624188625188626188627188628188629188630188631188632188633188634188635188636188637188638188639188640188641188642188643188644188645188646188647188648188649188650188651188652188653188654188655188656188657188658188659188660188661188662188663188664188665188666188667188668188669188670188671188672188673188674188675188676188677188678188679188680188681188682188683188684188685188686188687188688188689188690188691188692188693188694188695188696188697188698188699188700188701188702188703188704188705188706188707188708188709188710188711188712188713188714188715188716188717188718188719188720188721188722188723188724188725188726188727188728188729188730188731188732188733188734188735188736188737188738188739188740188741188742188743188744188745188746188747188748188749188750188751188752188753188754188755188756188757188758188759188760188761188762188763188764188765188766188767188768188769188770188771188772188773188774188775188776188777188778188779188780188781188782188783188784188785188786188787188788188789188790188791188792188793188794188795188796188797188798188799188800188801188802188803188804188805188806188807188808188809188810188811188812188813188814188815188816188817188818188819188820188821188822188823188824188825188826188827188828188829188830188831188832188833188834188835188836188837188838188839188840188841188842188843188844188845188846188847188848188849188850188851188852188853188854188855188856188857188858188859188860188861188862188863188864188865188866188867188868188869188870188871188872188873188874188875188876188877188878188879188880188881188882188883188884188885188886188887188888188889188890188891188892188893188894188895188896188897188898188899188900188901188902188903188904188905188906188907188908188909188910188911188912188913188914188915188916188917188918188919188920188921188922188923188924188925188926188927188928188929188930188931188932188933188934188935188936188937188938188939188940188941188942188943188944188945188946188947188948188949188950188951188952188953188954188955188956188957188958188959188960188961188962188963188964188965188966188967188968188969188970188971188972188973188974188975188976188977188978188979188980188981188982188983188984188985188986188987188988188989188990188991188992188993188994188995188996188997188998188999189000189001189002189003189004189005189006189007189008189009189010189011189012189013189014189015189016189017189018189019189020189021189022189023189024189025189026189027189028189029189030189031189032189033189034189035189036189037189038189039189040189041189042189043189044189045189046189047189048189049189050189051189052189053189054189055189056189057189058189059189060189061189062189063189064189065189066189067189068189069189070189071189072189073189074189075189076189077189078189079189080189081189082189083189084189085189086189087189088189089189090189091189092189093189094189095189096189097189098189099189100189101189102189103189104189105189106189107189108189109189110189111189112189113189114189115189116189117189118189119189120189121189122189123189124189125189126189127189128189129189130189131189132189133189134189135189136189137189138189139189140189141189142189143189144189145189146189147189148189149189150189151189152189153189154189155189156189157189158189159189160189161189162189163189164189165189166189167189168189169189170189171189172189173189174189175189176189177189178189179189180189181189182189183189184189185189186189187189188189189189190189191189192189193189194189195189196189197189198189199189200189201189202189203189204189205189206189207189208189209189210189211189212189213189214189215189216189217189218189219189220189221189222189223189224189225189226189227189228189229189230189231189232189233189234189235189236189237189238189239189240189241189242189243189244189245189246189247189248189249189250189251189252189253189254189255189256189257189258189259189260189261189262189263189264189265189266189267189268189269189270189271189272189273189274189275189276189277189278189279189280189281189282189283189284189285189286189287189288189289189290189291189292189293189294189295189296189297189298189299189300189301189302189303189304189305189306189307189308189309189310189311189312189313189314189315189316189317189318189319189320189321189322189323189324189325189326189327189328189329189330189331189332189333189334189335189336189337189338189339189340189341189342189343189344189345189346189347189348189349189350189351189352189353189354189355189356189357189358189359189360189361189362189363189364189365189366189367189368189369189370189371189372189373189374189375189376189377189378189379189380189381189382189383189384189385189386189387189388189389189390189391189392189393189394189395189396189397189398189399189400189401189402189403189404189405189406189407189408189409189410189411189412189413189414189415189416189417189418189419189420189421189422189423189424189425189426189427189428189429189430189431189432189433189434189435189436189437189438189439189440189441189442189443189444189445189446189447189448189449189450189451189452189453189454189455189456189457189458189459189460189461189462189463189464189465189466189467189468189469189470189471189472189473189474189475189476189477189478189479189480189481189482189483189484189485189486189487189488189489189490189491189492189493189494189495189496189497189498189499189500189501189502189503189504189505189506189507189508189509189510189511189512189513189514189515189516189517189518189519189520189521189522189523189524189525189526189527189528189529189530189531189532189533189534189535189536189537189538189539189540189541189542189543189544189545189546189547189548189549189550189551189552189553189554189555189556189557189558189559189560189561189562189563189564189565189566189567189568189569189570189571189572189573189574189575189576189577189578189579189580189581189582189583189584189585189586189587189588189589189590189591189592189593189594189595189596189597189598189599189600189601189602189603189604189605189606189607189608189609189610189611189612189613189614189615189616189617189618189619189620189621189622189623189624189625189626189627189628189629189630189631189632189633189634189635189636189637189638189639189640189641189642189643189644189645189646189647189648189649189650189651189652189653189654189655189656189657189658189659189660189661189662189663189664189665189666189667189668189669189670189671189672189673189674189675189676189677189678189679189680189681189682189683189684189685189686189687189688189689189690189691189692189693189694189695189696189697189698189699189700189701189702189703189704189705189706189707189708189709189710189711189712189713189714189715189716189717189718189719189720189721189722189723189724189725189726189727189728189729189730189731189732189733189734189735189736189737189738189739189740189741189742189743189744189745189746189747189748189749189750189751189752189753189754189755189756189757189758189759189760189761189762189763189764189765189766189767189768189769189770189771189772189773189774189775189776189777189778189779189780189781189782189783189784189785189786189787189788189789189790189791189792189793189794189795189796189797189798189799189800189801189802189803189804189805189806189807189808189809189810189811189812189813189814189815189816189817189818189819189820189821189822189823189824189825189826189827189828189829189830189831189832189833189834189835189836189837189838189839189840189841189842189843189844189845189846189847189848189849189850189851189852189853189854189855189856189857189858189859189860189861189862189863189864189865189866189867189868189869189870189871189872189873189874189875189876189877189878189879189880189881189882189883189884189885189886189887189888189889189890189891189892189893189894189895189896189897189898189899189900189901189902189903189904189905189906189907189908189909189910189911189912189913189914189915189916189917189918189919189920189921189922189923189924189925189926189927189928189929189930189931189932189933189934189935189936189937189938189939189940189941189942189943189944189945189946189947189948189949189950189951189952189953189954189955189956189957189958189959189960189961189962189963189964189965189966189967189968189969189970189971189972189973189974189975189976189977189978189979189980189981189982189983189984189985189986189987189988189989189990189991189992189993189994189995189996189997189998189999190000190001190002190003190004190005190006190007190008190009190010190011190012190013190014190015190016190017190018190019190020190021190022190023190024190025190026190027190028190029190030190031190032190033190034190035190036190037190038190039190040190041190042190043190044190045190046190047190048190049190050190051190052190053190054190055190056190057190058190059190060190061190062190063190064190065190066190067190068190069190070190071190072190073190074190075190076190077190078190079190080190081190082190083190084190085190086190087190088190089190090190091190092190093190094190095190096190097190098190099190100190101190102190103190104190105190106190107190108190109190110190111190112190113190114190115190116190117190118190119190120190121190122190123190124190125190126190127190128190129190130190131190132190133190134190135190136190137190138190139190140190141190142190143190144190145190146190147190148190149190150190151190152190153190154190155190156190157190158190159190160190161190162190163190164190165190166190167190168190169190170190171190172190173190174190175190176190177190178190179190180190181190182190183190184190185190186190187190188190189190190190191190192190193190194190195190196190197190198190199190200190201190202190203190204190205190206190207190208190209190210190211190212190213190214190215190216190217190218190219190220190221190222190223190224190225190226190227190228190229190230190231190232190233190234190235190236190237190238190239190240190241190242190243190244190245190246190247190248190249190250190251190252190253190254190255190256190257190258190259190260190261190262190263190264190265190266190267190268190269190270190271190272190273190274190275190276190277190278190279190280190281190282190283190284190285190286190287190288190289190290190291190292190293190294190295190296190297190298190299190300190301190302190303190304190305190306190307190308190309190310190311190312190313190314190315190316190317190318190319190320190321190322190323190324190325190326190327190328190329190330190331190332190333190334190335190336190337190338190339190340190341190342190343190344190345190346190347190348190349190350190351190352190353190354190355190356190357190358190359190360190361190362190363190364190365190366190367190368190369190370190371190372190373190374190375190376190377190378190379190380190381190382190383190384190385190386190387190388190389190390190391190392190393190394190395190396190397190398190399190400190401190402190403190404190405190406190407190408190409190410190411190412190413190414190415190416190417190418190419190420190421190422190423190424190425190426190427190428190429190430190431190432190433190434190435190436190437190438190439190440190441190442190443190444190445190446190447190448190449190450190451190452190453190454190455190456190457190458190459190460190461190462190463190464190465190466190467190468190469190470190471190472190473190474190475190476190477190478190479190480190481190482190483190484190485190486190487190488190489190490190491190492190493190494190495190496190497190498190499190500190501190502190503190504190505190506190507190508190509190510190511190512190513190514190515190516190517190518190519190520190521190522190523190524190525190526190527190528190529190530190531190532190533190534190535190536190537190538190539190540190541190542190543190544190545190546190547190548190549190550190551190552190553190554190555190556190557190558190559190560190561190562190563190564190565190566190567190568190569190570190571190572190573190574190575190576190577190578190579190580190581190582190583190584190585190586190587190588190589190590190591190592190593190594190595190596190597190598190599190600190601190602190603190604190605190606190607190608190609190610190611190612190613190614190615190616190617190618190619190620190621190622190623190624190625190626190627190628190629190630190631190632190633190634190635190636190637190638190639190640190641190642190643190644190645190646190647190648190649190650190651190652190653190654190655190656190657190658190659190660190661190662190663190664190665190666190667190668190669190670190671190672190673190674190675190676190677190678190679190680190681190682190683190684190685190686190687190688190689190690190691190692190693190694190695190696190697190698190699190700190701190702190703190704190705190706190707190708190709190710190711190712190713190714190715190716190717190718190719190720190721190722190723190724190725190726190727190728190729190730190731190732190733190734190735190736190737190738190739190740190741190742190743190744190745190746190747190748190749190750190751190752190753190754190755190756190757190758190759190760190761190762190763190764190765190766190767190768190769190770190771190772190773190774190775190776190777190778190779190780190781190782190783190784190785190786190787190788190789190790190791190792190793190794190795190796190797190798190799190800190801190802190803190804190805190806190807190808190809190810190811190812190813190814190815190816190817190818190819190820190821190822190823190824190825190826190827190828190829190830190831190832190833190834190835190836190837190838190839190840190841190842190843190844190845190846190847190848190849190850190851190852190853190854190855190856190857190858190859190860190861190862190863190864190865190866190867190868190869190870190871190872190873190874190875190876190877190878190879190880190881190882190883190884190885190886190887190888190889190890190891190892190893190894190895190896190897190898190899190900190901190902190903190904190905190906190907190908190909190910190911190912190913190914190915190916190917190918190919190920190921190922190923190924190925190926190927190928190929190930190931190932190933190934190935190936190937190938190939190940190941190942190943190944190945190946190947190948190949190950190951190952190953190954190955190956190957190958190959190960190961190962190963190964190965190966190967190968190969190970190971190972190973190974190975190976190977190978190979190980190981190982190983190984190985190986190987190988190989190990190991190992190993190994190995190996190997190998190999191000191001191002191003191004191005191006191007191008191009191010191011191012191013191014191015191016191017191018191019191020191021191022191023191024191025191026191027191028191029191030191031191032191033191034191035191036191037191038191039191040191041191042191043191044191045191046191047191048191049191050191051191052191053191054191055191056191057191058191059191060191061191062191063191064191065191066191067191068191069191070191071191072191073191074191075191076191077191078191079191080191081191082191083191084191085191086191087191088191089191090191091191092191093191094191095191096191097191098191099191100191101191102191103191104191105191106191107191108191109191110191111191112191113191114191115191116191117191118191119191120191121191122191123191124191125191126191127191128191129191130191131191132191133191134191135191136191137191138191139191140191141191142191143191144191145191146191147191148191149191150191151191152191153191154191155191156191157191158191159191160191161
  1. import { createRequire as topLevelCreateRequire } from 'module';
  2. const require = topLevelCreateRequire(import.meta.url);
  3. var __create = Object.create;
  4. var __defProp = Object.defineProperty;
  5. var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
  6. var __getOwnPropNames = Object.getOwnPropertyNames;
  7. var __getProtoOf = Object.getPrototypeOf;
  8. var __hasOwnProp = Object.prototype.hasOwnProperty;
  9. var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
  10. get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
  11. }) : x)(function(x) {
  12. if (typeof require !== "undefined")
  13. return require.apply(this, arguments);
  14. throw new Error('Dynamic require of "' + x + '" is not supported');
  15. });
  16. var __commonJS = (cb, mod) => function __require2() {
  17. return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
  18. };
  19. var __export = (target, all4) => {
  20. for (var name2 in all4)
  21. __defProp(target, name2, { get: all4[name2], enumerable: true });
  22. };
  23. var __copyProps = (to, from, except, desc) => {
  24. if (from && typeof from === "object" || typeof from === "function") {
  25. for (let key of __getOwnPropNames(from))
  26. if (!__hasOwnProp.call(to, key) && key !== except)
  27. __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
  28. }
  29. return to;
  30. };
  31. var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
  32. isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
  33. mod
  34. ));
  35. // node_modules/@babel/types/lib/utils/shallowEqual.js
  36. var require_shallowEqual = __commonJS({
  37. "node_modules/@babel/types/lib/utils/shallowEqual.js"(exports) {
  38. "use strict";
  39. Object.defineProperty(exports, "__esModule", {
  40. value: true
  41. });
  42. exports.default = shallowEqual;
  43. function shallowEqual(actual, expected) {
  44. const keys2 = Object.keys(expected);
  45. for (const key of keys2) {
  46. if (actual[key] !== expected[key]) {
  47. return false;
  48. }
  49. }
  50. return true;
  51. }
  52. }
  53. });
  54. // node_modules/@babel/types/lib/validators/generated/index.js
  55. var require_generated = __commonJS({
  56. "node_modules/@babel/types/lib/validators/generated/index.js"(exports) {
  57. "use strict";
  58. Object.defineProperty(exports, "__esModule", {
  59. value: true
  60. });
  61. exports.isArrayExpression = isArrayExpression;
  62. exports.isAssignmentExpression = isAssignmentExpression;
  63. exports.isBinaryExpression = isBinaryExpression;
  64. exports.isInterpreterDirective = isInterpreterDirective;
  65. exports.isDirective = isDirective;
  66. exports.isDirectiveLiteral = isDirectiveLiteral;
  67. exports.isBlockStatement = isBlockStatement;
  68. exports.isBreakStatement = isBreakStatement;
  69. exports.isCallExpression = isCallExpression;
  70. exports.isCatchClause = isCatchClause;
  71. exports.isConditionalExpression = isConditionalExpression;
  72. exports.isContinueStatement = isContinueStatement;
  73. exports.isDebuggerStatement = isDebuggerStatement;
  74. exports.isDoWhileStatement = isDoWhileStatement;
  75. exports.isEmptyStatement = isEmptyStatement;
  76. exports.isExpressionStatement = isExpressionStatement2;
  77. exports.isFile = isFile;
  78. exports.isForInStatement = isForInStatement;
  79. exports.isForStatement = isForStatement;
  80. exports.isFunctionDeclaration = isFunctionDeclaration;
  81. exports.isFunctionExpression = isFunctionExpression;
  82. exports.isIdentifier = isIdentifier2;
  83. exports.isIfStatement = isIfStatement;
  84. exports.isLabeledStatement = isLabeledStatement;
  85. exports.isStringLiteral = isStringLiteral2;
  86. exports.isNumericLiteral = isNumericLiteral;
  87. exports.isNullLiteral = isNullLiteral;
  88. exports.isBooleanLiteral = isBooleanLiteral2;
  89. exports.isRegExpLiteral = isRegExpLiteral;
  90. exports.isLogicalExpression = isLogicalExpression;
  91. exports.isMemberExpression = isMemberExpression;
  92. exports.isNewExpression = isNewExpression;
  93. exports.isProgram = isProgram;
  94. exports.isObjectExpression = isObjectExpression;
  95. exports.isObjectMethod = isObjectMethod;
  96. exports.isObjectProperty = isObjectProperty;
  97. exports.isRestElement = isRestElement;
  98. exports.isReturnStatement = isReturnStatement;
  99. exports.isSequenceExpression = isSequenceExpression;
  100. exports.isParenthesizedExpression = isParenthesizedExpression;
  101. exports.isSwitchCase = isSwitchCase;
  102. exports.isSwitchStatement = isSwitchStatement;
  103. exports.isThisExpression = isThisExpression;
  104. exports.isThrowStatement = isThrowStatement;
  105. exports.isTryStatement = isTryStatement;
  106. exports.isUnaryExpression = isUnaryExpression;
  107. exports.isUpdateExpression = isUpdateExpression;
  108. exports.isVariableDeclaration = isVariableDeclaration;
  109. exports.isVariableDeclarator = isVariableDeclarator;
  110. exports.isWhileStatement = isWhileStatement;
  111. exports.isWithStatement = isWithStatement;
  112. exports.isAssignmentPattern = isAssignmentPattern;
  113. exports.isArrayPattern = isArrayPattern;
  114. exports.isArrowFunctionExpression = isArrowFunctionExpression;
  115. exports.isClassBody = isClassBody;
  116. exports.isClassExpression = isClassExpression;
  117. exports.isClassDeclaration = isClassDeclaration;
  118. exports.isExportAllDeclaration = isExportAllDeclaration;
  119. exports.isExportDefaultDeclaration = isExportDefaultDeclaration;
  120. exports.isExportNamedDeclaration = isExportNamedDeclaration;
  121. exports.isExportSpecifier = isExportSpecifier;
  122. exports.isForOfStatement = isForOfStatement;
  123. exports.isImportDeclaration = isImportDeclaration;
  124. exports.isImportDefaultSpecifier = isImportDefaultSpecifier;
  125. exports.isImportNamespaceSpecifier = isImportNamespaceSpecifier;
  126. exports.isImportSpecifier = isImportSpecifier;
  127. exports.isMetaProperty = isMetaProperty;
  128. exports.isClassMethod = isClassMethod;
  129. exports.isObjectPattern = isObjectPattern;
  130. exports.isSpreadElement = isSpreadElement;
  131. exports.isSuper = isSuper;
  132. exports.isTaggedTemplateExpression = isTaggedTemplateExpression;
  133. exports.isTemplateElement = isTemplateElement;
  134. exports.isTemplateLiteral = isTemplateLiteral;
  135. exports.isYieldExpression = isYieldExpression;
  136. exports.isAwaitExpression = isAwaitExpression;
  137. exports.isImport = isImport;
  138. exports.isBigIntLiteral = isBigIntLiteral;
  139. exports.isExportNamespaceSpecifier = isExportNamespaceSpecifier;
  140. exports.isOptionalMemberExpression = isOptionalMemberExpression;
  141. exports.isOptionalCallExpression = isOptionalCallExpression;
  142. exports.isClassProperty = isClassProperty;
  143. exports.isClassPrivateProperty = isClassPrivateProperty;
  144. exports.isClassPrivateMethod = isClassPrivateMethod;
  145. exports.isPrivateName = isPrivateName;
  146. exports.isAnyTypeAnnotation = isAnyTypeAnnotation;
  147. exports.isArrayTypeAnnotation = isArrayTypeAnnotation;
  148. exports.isBooleanTypeAnnotation = isBooleanTypeAnnotation;
  149. exports.isBooleanLiteralTypeAnnotation = isBooleanLiteralTypeAnnotation;
  150. exports.isNullLiteralTypeAnnotation = isNullLiteralTypeAnnotation;
  151. exports.isClassImplements = isClassImplements;
  152. exports.isDeclareClass = isDeclareClass;
  153. exports.isDeclareFunction = isDeclareFunction;
  154. exports.isDeclareInterface = isDeclareInterface;
  155. exports.isDeclareModule = isDeclareModule;
  156. exports.isDeclareModuleExports = isDeclareModuleExports;
  157. exports.isDeclareTypeAlias = isDeclareTypeAlias;
  158. exports.isDeclareOpaqueType = isDeclareOpaqueType;
  159. exports.isDeclareVariable = isDeclareVariable;
  160. exports.isDeclareExportDeclaration = isDeclareExportDeclaration;
  161. exports.isDeclareExportAllDeclaration = isDeclareExportAllDeclaration;
  162. exports.isDeclaredPredicate = isDeclaredPredicate;
  163. exports.isExistsTypeAnnotation = isExistsTypeAnnotation;
  164. exports.isFunctionTypeAnnotation = isFunctionTypeAnnotation;
  165. exports.isFunctionTypeParam = isFunctionTypeParam;
  166. exports.isGenericTypeAnnotation = isGenericTypeAnnotation;
  167. exports.isInferredPredicate = isInferredPredicate;
  168. exports.isInterfaceExtends = isInterfaceExtends;
  169. exports.isInterfaceDeclaration = isInterfaceDeclaration;
  170. exports.isInterfaceTypeAnnotation = isInterfaceTypeAnnotation;
  171. exports.isIntersectionTypeAnnotation = isIntersectionTypeAnnotation;
  172. exports.isMixedTypeAnnotation = isMixedTypeAnnotation;
  173. exports.isEmptyTypeAnnotation = isEmptyTypeAnnotation;
  174. exports.isNullableTypeAnnotation = isNullableTypeAnnotation;
  175. exports.isNumberLiteralTypeAnnotation = isNumberLiteralTypeAnnotation;
  176. exports.isNumberTypeAnnotation = isNumberTypeAnnotation;
  177. exports.isObjectTypeAnnotation = isObjectTypeAnnotation;
  178. exports.isObjectTypeInternalSlot = isObjectTypeInternalSlot;
  179. exports.isObjectTypeCallProperty = isObjectTypeCallProperty;
  180. exports.isObjectTypeIndexer = isObjectTypeIndexer;
  181. exports.isObjectTypeProperty = isObjectTypeProperty;
  182. exports.isObjectTypeSpreadProperty = isObjectTypeSpreadProperty;
  183. exports.isOpaqueType = isOpaqueType;
  184. exports.isQualifiedTypeIdentifier = isQualifiedTypeIdentifier;
  185. exports.isStringLiteralTypeAnnotation = isStringLiteralTypeAnnotation;
  186. exports.isStringTypeAnnotation = isStringTypeAnnotation;
  187. exports.isSymbolTypeAnnotation = isSymbolTypeAnnotation;
  188. exports.isThisTypeAnnotation = isThisTypeAnnotation;
  189. exports.isTupleTypeAnnotation = isTupleTypeAnnotation;
  190. exports.isTypeofTypeAnnotation = isTypeofTypeAnnotation;
  191. exports.isTypeAlias = isTypeAlias;
  192. exports.isTypeAnnotation = isTypeAnnotation;
  193. exports.isTypeCastExpression = isTypeCastExpression;
  194. exports.isTypeParameter = isTypeParameter;
  195. exports.isTypeParameterDeclaration = isTypeParameterDeclaration;
  196. exports.isTypeParameterInstantiation = isTypeParameterInstantiation;
  197. exports.isUnionTypeAnnotation = isUnionTypeAnnotation;
  198. exports.isVariance = isVariance;
  199. exports.isVoidTypeAnnotation = isVoidTypeAnnotation;
  200. exports.isEnumDeclaration = isEnumDeclaration;
  201. exports.isEnumBooleanBody = isEnumBooleanBody;
  202. exports.isEnumNumberBody = isEnumNumberBody;
  203. exports.isEnumStringBody = isEnumStringBody;
  204. exports.isEnumSymbolBody = isEnumSymbolBody;
  205. exports.isEnumBooleanMember = isEnumBooleanMember;
  206. exports.isEnumNumberMember = isEnumNumberMember;
  207. exports.isEnumStringMember = isEnumStringMember;
  208. exports.isEnumDefaultedMember = isEnumDefaultedMember;
  209. exports.isIndexedAccessType = isIndexedAccessType;
  210. exports.isOptionalIndexedAccessType = isOptionalIndexedAccessType;
  211. exports.isJSXAttribute = isJSXAttribute;
  212. exports.isJSXClosingElement = isJSXClosingElement;
  213. exports.isJSXElement = isJSXElement2;
  214. exports.isJSXEmptyExpression = isJSXEmptyExpression;
  215. exports.isJSXExpressionContainer = isJSXExpressionContainer2;
  216. exports.isJSXSpreadChild = isJSXSpreadChild;
  217. exports.isJSXIdentifier = isJSXIdentifier2;
  218. exports.isJSXMemberExpression = isJSXMemberExpression;
  219. exports.isJSXNamespacedName = isJSXNamespacedName;
  220. exports.isJSXOpeningElement = isJSXOpeningElement;
  221. exports.isJSXSpreadAttribute = isJSXSpreadAttribute;
  222. exports.isJSXText = isJSXText;
  223. exports.isJSXFragment = isJSXFragment2;
  224. exports.isJSXOpeningFragment = isJSXOpeningFragment;
  225. exports.isJSXClosingFragment = isJSXClosingFragment;
  226. exports.isNoop = isNoop;
  227. exports.isPlaceholder = isPlaceholder;
  228. exports.isV8IntrinsicIdentifier = isV8IntrinsicIdentifier;
  229. exports.isArgumentPlaceholder = isArgumentPlaceholder;
  230. exports.isBindExpression = isBindExpression;
  231. exports.isPipelineTopicExpression = isPipelineTopicExpression;
  232. exports.isPipelineBareFunction = isPipelineBareFunction;
  233. exports.isPipelinePrimaryTopicReference = isPipelinePrimaryTopicReference;
  234. exports.isImportAttribute = isImportAttribute;
  235. exports.isDecorator = isDecorator;
  236. exports.isDoExpression = isDoExpression;
  237. exports.isExportDefaultSpecifier = isExportDefaultSpecifier;
  238. exports.isRecordExpression = isRecordExpression;
  239. exports.isTupleExpression = isTupleExpression;
  240. exports.isDecimalLiteral = isDecimalLiteral;
  241. exports.isStaticBlock = isStaticBlock;
  242. exports.isModuleExpression = isModuleExpression;
  243. exports.isTSParameterProperty = isTSParameterProperty;
  244. exports.isTSDeclareFunction = isTSDeclareFunction;
  245. exports.isTSDeclareMethod = isTSDeclareMethod;
  246. exports.isTSQualifiedName = isTSQualifiedName;
  247. exports.isTSCallSignatureDeclaration = isTSCallSignatureDeclaration;
  248. exports.isTSConstructSignatureDeclaration = isTSConstructSignatureDeclaration;
  249. exports.isTSPropertySignature = isTSPropertySignature;
  250. exports.isTSMethodSignature = isTSMethodSignature;
  251. exports.isTSIndexSignature = isTSIndexSignature;
  252. exports.isTSAnyKeyword = isTSAnyKeyword;
  253. exports.isTSBooleanKeyword = isTSBooleanKeyword;
  254. exports.isTSBigIntKeyword = isTSBigIntKeyword;
  255. exports.isTSIntrinsicKeyword = isTSIntrinsicKeyword;
  256. exports.isTSNeverKeyword = isTSNeverKeyword;
  257. exports.isTSNullKeyword = isTSNullKeyword;
  258. exports.isTSNumberKeyword = isTSNumberKeyword;
  259. exports.isTSObjectKeyword = isTSObjectKeyword;
  260. exports.isTSStringKeyword = isTSStringKeyword;
  261. exports.isTSSymbolKeyword = isTSSymbolKeyword;
  262. exports.isTSUndefinedKeyword = isTSUndefinedKeyword;
  263. exports.isTSUnknownKeyword = isTSUnknownKeyword;
  264. exports.isTSVoidKeyword = isTSVoidKeyword;
  265. exports.isTSThisType = isTSThisType;
  266. exports.isTSFunctionType = isTSFunctionType;
  267. exports.isTSConstructorType = isTSConstructorType;
  268. exports.isTSTypeReference = isTSTypeReference;
  269. exports.isTSTypePredicate = isTSTypePredicate;
  270. exports.isTSTypeQuery = isTSTypeQuery;
  271. exports.isTSTypeLiteral = isTSTypeLiteral;
  272. exports.isTSArrayType = isTSArrayType;
  273. exports.isTSTupleType = isTSTupleType;
  274. exports.isTSOptionalType = isTSOptionalType;
  275. exports.isTSRestType = isTSRestType;
  276. exports.isTSNamedTupleMember = isTSNamedTupleMember;
  277. exports.isTSUnionType = isTSUnionType;
  278. exports.isTSIntersectionType = isTSIntersectionType;
  279. exports.isTSConditionalType = isTSConditionalType;
  280. exports.isTSInferType = isTSInferType;
  281. exports.isTSParenthesizedType = isTSParenthesizedType;
  282. exports.isTSTypeOperator = isTSTypeOperator;
  283. exports.isTSIndexedAccessType = isTSIndexedAccessType;
  284. exports.isTSMappedType = isTSMappedType;
  285. exports.isTSLiteralType = isTSLiteralType;
  286. exports.isTSExpressionWithTypeArguments = isTSExpressionWithTypeArguments;
  287. exports.isTSInterfaceDeclaration = isTSInterfaceDeclaration;
  288. exports.isTSInterfaceBody = isTSInterfaceBody;
  289. exports.isTSTypeAliasDeclaration = isTSTypeAliasDeclaration;
  290. exports.isTSAsExpression = isTSAsExpression;
  291. exports.isTSTypeAssertion = isTSTypeAssertion;
  292. exports.isTSEnumDeclaration = isTSEnumDeclaration;
  293. exports.isTSEnumMember = isTSEnumMember;
  294. exports.isTSModuleDeclaration = isTSModuleDeclaration;
  295. exports.isTSModuleBlock = isTSModuleBlock;
  296. exports.isTSImportType = isTSImportType;
  297. exports.isTSImportEqualsDeclaration = isTSImportEqualsDeclaration;
  298. exports.isTSExternalModuleReference = isTSExternalModuleReference;
  299. exports.isTSNonNullExpression = isTSNonNullExpression;
  300. exports.isTSExportAssignment = isTSExportAssignment;
  301. exports.isTSNamespaceExportDeclaration = isTSNamespaceExportDeclaration;
  302. exports.isTSTypeAnnotation = isTSTypeAnnotation;
  303. exports.isTSTypeParameterInstantiation = isTSTypeParameterInstantiation;
  304. exports.isTSTypeParameterDeclaration = isTSTypeParameterDeclaration;
  305. exports.isTSTypeParameter = isTSTypeParameter;
  306. exports.isExpression = isExpression;
  307. exports.isBinary = isBinary;
  308. exports.isScopable = isScopable;
  309. exports.isBlockParent = isBlockParent;
  310. exports.isBlock = isBlock;
  311. exports.isStatement = isStatement;
  312. exports.isTerminatorless = isTerminatorless;
  313. exports.isCompletionStatement = isCompletionStatement;
  314. exports.isConditional = isConditional;
  315. exports.isLoop = isLoop;
  316. exports.isWhile = isWhile;
  317. exports.isExpressionWrapper = isExpressionWrapper;
  318. exports.isFor = isFor;
  319. exports.isForXStatement = isForXStatement;
  320. exports.isFunction = isFunction;
  321. exports.isFunctionParent = isFunctionParent;
  322. exports.isPureish = isPureish;
  323. exports.isDeclaration = isDeclaration2;
  324. exports.isPatternLike = isPatternLike;
  325. exports.isLVal = isLVal;
  326. exports.isTSEntityName = isTSEntityName;
  327. exports.isLiteral = isLiteral;
  328. exports.isImmutable = isImmutable;
  329. exports.isUserWhitespacable = isUserWhitespacable;
  330. exports.isMethod = isMethod;
  331. exports.isObjectMember = isObjectMember;
  332. exports.isProperty = isProperty;
  333. exports.isUnaryLike = isUnaryLike;
  334. exports.isPattern = isPattern;
  335. exports.isClass = isClass;
  336. exports.isModuleDeclaration = isModuleDeclaration;
  337. exports.isExportDeclaration = isExportDeclaration;
  338. exports.isModuleSpecifier = isModuleSpecifier;
  339. exports.isPrivate = isPrivate;
  340. exports.isFlow = isFlow;
  341. exports.isFlowType = isFlowType;
  342. exports.isFlowBaseAnnotation = isFlowBaseAnnotation;
  343. exports.isFlowDeclaration = isFlowDeclaration;
  344. exports.isFlowPredicate = isFlowPredicate;
  345. exports.isEnumBody = isEnumBody;
  346. exports.isEnumMember = isEnumMember;
  347. exports.isJSX = isJSX;
  348. exports.isTSTypeElement = isTSTypeElement;
  349. exports.isTSType = isTSType;
  350. exports.isTSBaseType = isTSBaseType;
  351. exports.isNumberLiteral = isNumberLiteral;
  352. exports.isRegexLiteral = isRegexLiteral;
  353. exports.isRestProperty = isRestProperty;
  354. exports.isSpreadProperty = isSpreadProperty;
  355. var _shallowEqual = require_shallowEqual();
  356. function isArrayExpression(node, opts) {
  357. if (!node)
  358. return false;
  359. const nodeType = node.type;
  360. if (nodeType === "ArrayExpression") {
  361. if (typeof opts === "undefined") {
  362. return true;
  363. } else {
  364. return (0, _shallowEqual.default)(node, opts);
  365. }
  366. }
  367. return false;
  368. }
  369. function isAssignmentExpression(node, opts) {
  370. if (!node)
  371. return false;
  372. const nodeType = node.type;
  373. if (nodeType === "AssignmentExpression") {
  374. if (typeof opts === "undefined") {
  375. return true;
  376. } else {
  377. return (0, _shallowEqual.default)(node, opts);
  378. }
  379. }
  380. return false;
  381. }
  382. function isBinaryExpression(node, opts) {
  383. if (!node)
  384. return false;
  385. const nodeType = node.type;
  386. if (nodeType === "BinaryExpression") {
  387. if (typeof opts === "undefined") {
  388. return true;
  389. } else {
  390. return (0, _shallowEqual.default)(node, opts);
  391. }
  392. }
  393. return false;
  394. }
  395. function isInterpreterDirective(node, opts) {
  396. if (!node)
  397. return false;
  398. const nodeType = node.type;
  399. if (nodeType === "InterpreterDirective") {
  400. if (typeof opts === "undefined") {
  401. return true;
  402. } else {
  403. return (0, _shallowEqual.default)(node, opts);
  404. }
  405. }
  406. return false;
  407. }
  408. function isDirective(node, opts) {
  409. if (!node)
  410. return false;
  411. const nodeType = node.type;
  412. if (nodeType === "Directive") {
  413. if (typeof opts === "undefined") {
  414. return true;
  415. } else {
  416. return (0, _shallowEqual.default)(node, opts);
  417. }
  418. }
  419. return false;
  420. }
  421. function isDirectiveLiteral(node, opts) {
  422. if (!node)
  423. return false;
  424. const nodeType = node.type;
  425. if (nodeType === "DirectiveLiteral") {
  426. if (typeof opts === "undefined") {
  427. return true;
  428. } else {
  429. return (0, _shallowEqual.default)(node, opts);
  430. }
  431. }
  432. return false;
  433. }
  434. function isBlockStatement(node, opts) {
  435. if (!node)
  436. return false;
  437. const nodeType = node.type;
  438. if (nodeType === "BlockStatement") {
  439. if (typeof opts === "undefined") {
  440. return true;
  441. } else {
  442. return (0, _shallowEqual.default)(node, opts);
  443. }
  444. }
  445. return false;
  446. }
  447. function isBreakStatement(node, opts) {
  448. if (!node)
  449. return false;
  450. const nodeType = node.type;
  451. if (nodeType === "BreakStatement") {
  452. if (typeof opts === "undefined") {
  453. return true;
  454. } else {
  455. return (0, _shallowEqual.default)(node, opts);
  456. }
  457. }
  458. return false;
  459. }
  460. function isCallExpression(node, opts) {
  461. if (!node)
  462. return false;
  463. const nodeType = node.type;
  464. if (nodeType === "CallExpression") {
  465. if (typeof opts === "undefined") {
  466. return true;
  467. } else {
  468. return (0, _shallowEqual.default)(node, opts);
  469. }
  470. }
  471. return false;
  472. }
  473. function isCatchClause(node, opts) {
  474. if (!node)
  475. return false;
  476. const nodeType = node.type;
  477. if (nodeType === "CatchClause") {
  478. if (typeof opts === "undefined") {
  479. return true;
  480. } else {
  481. return (0, _shallowEqual.default)(node, opts);
  482. }
  483. }
  484. return false;
  485. }
  486. function isConditionalExpression(node, opts) {
  487. if (!node)
  488. return false;
  489. const nodeType = node.type;
  490. if (nodeType === "ConditionalExpression") {
  491. if (typeof opts === "undefined") {
  492. return true;
  493. } else {
  494. return (0, _shallowEqual.default)(node, opts);
  495. }
  496. }
  497. return false;
  498. }
  499. function isContinueStatement(node, opts) {
  500. if (!node)
  501. return false;
  502. const nodeType = node.type;
  503. if (nodeType === "ContinueStatement") {
  504. if (typeof opts === "undefined") {
  505. return true;
  506. } else {
  507. return (0, _shallowEqual.default)(node, opts);
  508. }
  509. }
  510. return false;
  511. }
  512. function isDebuggerStatement(node, opts) {
  513. if (!node)
  514. return false;
  515. const nodeType = node.type;
  516. if (nodeType === "DebuggerStatement") {
  517. if (typeof opts === "undefined") {
  518. return true;
  519. } else {
  520. return (0, _shallowEqual.default)(node, opts);
  521. }
  522. }
  523. return false;
  524. }
  525. function isDoWhileStatement(node, opts) {
  526. if (!node)
  527. return false;
  528. const nodeType = node.type;
  529. if (nodeType === "DoWhileStatement") {
  530. if (typeof opts === "undefined") {
  531. return true;
  532. } else {
  533. return (0, _shallowEqual.default)(node, opts);
  534. }
  535. }
  536. return false;
  537. }
  538. function isEmptyStatement(node, opts) {
  539. if (!node)
  540. return false;
  541. const nodeType = node.type;
  542. if (nodeType === "EmptyStatement") {
  543. if (typeof opts === "undefined") {
  544. return true;
  545. } else {
  546. return (0, _shallowEqual.default)(node, opts);
  547. }
  548. }
  549. return false;
  550. }
  551. function isExpressionStatement2(node, opts) {
  552. if (!node)
  553. return false;
  554. const nodeType = node.type;
  555. if (nodeType === "ExpressionStatement") {
  556. if (typeof opts === "undefined") {
  557. return true;
  558. } else {
  559. return (0, _shallowEqual.default)(node, opts);
  560. }
  561. }
  562. return false;
  563. }
  564. function isFile(node, opts) {
  565. if (!node)
  566. return false;
  567. const nodeType = node.type;
  568. if (nodeType === "File") {
  569. if (typeof opts === "undefined") {
  570. return true;
  571. } else {
  572. return (0, _shallowEqual.default)(node, opts);
  573. }
  574. }
  575. return false;
  576. }
  577. function isForInStatement(node, opts) {
  578. if (!node)
  579. return false;
  580. const nodeType = node.type;
  581. if (nodeType === "ForInStatement") {
  582. if (typeof opts === "undefined") {
  583. return true;
  584. } else {
  585. return (0, _shallowEqual.default)(node, opts);
  586. }
  587. }
  588. return false;
  589. }
  590. function isForStatement(node, opts) {
  591. if (!node)
  592. return false;
  593. const nodeType = node.type;
  594. if (nodeType === "ForStatement") {
  595. if (typeof opts === "undefined") {
  596. return true;
  597. } else {
  598. return (0, _shallowEqual.default)(node, opts);
  599. }
  600. }
  601. return false;
  602. }
  603. function isFunctionDeclaration(node, opts) {
  604. if (!node)
  605. return false;
  606. const nodeType = node.type;
  607. if (nodeType === "FunctionDeclaration") {
  608. if (typeof opts === "undefined") {
  609. return true;
  610. } else {
  611. return (0, _shallowEqual.default)(node, opts);
  612. }
  613. }
  614. return false;
  615. }
  616. function isFunctionExpression(node, opts) {
  617. if (!node)
  618. return false;
  619. const nodeType = node.type;
  620. if (nodeType === "FunctionExpression") {
  621. if (typeof opts === "undefined") {
  622. return true;
  623. } else {
  624. return (0, _shallowEqual.default)(node, opts);
  625. }
  626. }
  627. return false;
  628. }
  629. function isIdentifier2(node, opts) {
  630. if (!node)
  631. return false;
  632. const nodeType = node.type;
  633. if (nodeType === "Identifier") {
  634. if (typeof opts === "undefined") {
  635. return true;
  636. } else {
  637. return (0, _shallowEqual.default)(node, opts);
  638. }
  639. }
  640. return false;
  641. }
  642. function isIfStatement(node, opts) {
  643. if (!node)
  644. return false;
  645. const nodeType = node.type;
  646. if (nodeType === "IfStatement") {
  647. if (typeof opts === "undefined") {
  648. return true;
  649. } else {
  650. return (0, _shallowEqual.default)(node, opts);
  651. }
  652. }
  653. return false;
  654. }
  655. function isLabeledStatement(node, opts) {
  656. if (!node)
  657. return false;
  658. const nodeType = node.type;
  659. if (nodeType === "LabeledStatement") {
  660. if (typeof opts === "undefined") {
  661. return true;
  662. } else {
  663. return (0, _shallowEqual.default)(node, opts);
  664. }
  665. }
  666. return false;
  667. }
  668. function isStringLiteral2(node, opts) {
  669. if (!node)
  670. return false;
  671. const nodeType = node.type;
  672. if (nodeType === "StringLiteral") {
  673. if (typeof opts === "undefined") {
  674. return true;
  675. } else {
  676. return (0, _shallowEqual.default)(node, opts);
  677. }
  678. }
  679. return false;
  680. }
  681. function isNumericLiteral(node, opts) {
  682. if (!node)
  683. return false;
  684. const nodeType = node.type;
  685. if (nodeType === "NumericLiteral") {
  686. if (typeof opts === "undefined") {
  687. return true;
  688. } else {
  689. return (0, _shallowEqual.default)(node, opts);
  690. }
  691. }
  692. return false;
  693. }
  694. function isNullLiteral(node, opts) {
  695. if (!node)
  696. return false;
  697. const nodeType = node.type;
  698. if (nodeType === "NullLiteral") {
  699. if (typeof opts === "undefined") {
  700. return true;
  701. } else {
  702. return (0, _shallowEqual.default)(node, opts);
  703. }
  704. }
  705. return false;
  706. }
  707. function isBooleanLiteral2(node, opts) {
  708. if (!node)
  709. return false;
  710. const nodeType = node.type;
  711. if (nodeType === "BooleanLiteral") {
  712. if (typeof opts === "undefined") {
  713. return true;
  714. } else {
  715. return (0, _shallowEqual.default)(node, opts);
  716. }
  717. }
  718. return false;
  719. }
  720. function isRegExpLiteral(node, opts) {
  721. if (!node)
  722. return false;
  723. const nodeType = node.type;
  724. if (nodeType === "RegExpLiteral") {
  725. if (typeof opts === "undefined") {
  726. return true;
  727. } else {
  728. return (0, _shallowEqual.default)(node, opts);
  729. }
  730. }
  731. return false;
  732. }
  733. function isLogicalExpression(node, opts) {
  734. if (!node)
  735. return false;
  736. const nodeType = node.type;
  737. if (nodeType === "LogicalExpression") {
  738. if (typeof opts === "undefined") {
  739. return true;
  740. } else {
  741. return (0, _shallowEqual.default)(node, opts);
  742. }
  743. }
  744. return false;
  745. }
  746. function isMemberExpression(node, opts) {
  747. if (!node)
  748. return false;
  749. const nodeType = node.type;
  750. if (nodeType === "MemberExpression") {
  751. if (typeof opts === "undefined") {
  752. return true;
  753. } else {
  754. return (0, _shallowEqual.default)(node, opts);
  755. }
  756. }
  757. return false;
  758. }
  759. function isNewExpression(node, opts) {
  760. if (!node)
  761. return false;
  762. const nodeType = node.type;
  763. if (nodeType === "NewExpression") {
  764. if (typeof opts === "undefined") {
  765. return true;
  766. } else {
  767. return (0, _shallowEqual.default)(node, opts);
  768. }
  769. }
  770. return false;
  771. }
  772. function isProgram(node, opts) {
  773. if (!node)
  774. return false;
  775. const nodeType = node.type;
  776. if (nodeType === "Program") {
  777. if (typeof opts === "undefined") {
  778. return true;
  779. } else {
  780. return (0, _shallowEqual.default)(node, opts);
  781. }
  782. }
  783. return false;
  784. }
  785. function isObjectExpression(node, opts) {
  786. if (!node)
  787. return false;
  788. const nodeType = node.type;
  789. if (nodeType === "ObjectExpression") {
  790. if (typeof opts === "undefined") {
  791. return true;
  792. } else {
  793. return (0, _shallowEqual.default)(node, opts);
  794. }
  795. }
  796. return false;
  797. }
  798. function isObjectMethod(node, opts) {
  799. if (!node)
  800. return false;
  801. const nodeType = node.type;
  802. if (nodeType === "ObjectMethod") {
  803. if (typeof opts === "undefined") {
  804. return true;
  805. } else {
  806. return (0, _shallowEqual.default)(node, opts);
  807. }
  808. }
  809. return false;
  810. }
  811. function isObjectProperty(node, opts) {
  812. if (!node)
  813. return false;
  814. const nodeType = node.type;
  815. if (nodeType === "ObjectProperty") {
  816. if (typeof opts === "undefined") {
  817. return true;
  818. } else {
  819. return (0, _shallowEqual.default)(node, opts);
  820. }
  821. }
  822. return false;
  823. }
  824. function isRestElement(node, opts) {
  825. if (!node)
  826. return false;
  827. const nodeType = node.type;
  828. if (nodeType === "RestElement") {
  829. if (typeof opts === "undefined") {
  830. return true;
  831. } else {
  832. return (0, _shallowEqual.default)(node, opts);
  833. }
  834. }
  835. return false;
  836. }
  837. function isReturnStatement(node, opts) {
  838. if (!node)
  839. return false;
  840. const nodeType = node.type;
  841. if (nodeType === "ReturnStatement") {
  842. if (typeof opts === "undefined") {
  843. return true;
  844. } else {
  845. return (0, _shallowEqual.default)(node, opts);
  846. }
  847. }
  848. return false;
  849. }
  850. function isSequenceExpression(node, opts) {
  851. if (!node)
  852. return false;
  853. const nodeType = node.type;
  854. if (nodeType === "SequenceExpression") {
  855. if (typeof opts === "undefined") {
  856. return true;
  857. } else {
  858. return (0, _shallowEqual.default)(node, opts);
  859. }
  860. }
  861. return false;
  862. }
  863. function isParenthesizedExpression(node, opts) {
  864. if (!node)
  865. return false;
  866. const nodeType = node.type;
  867. if (nodeType === "ParenthesizedExpression") {
  868. if (typeof opts === "undefined") {
  869. return true;
  870. } else {
  871. return (0, _shallowEqual.default)(node, opts);
  872. }
  873. }
  874. return false;
  875. }
  876. function isSwitchCase(node, opts) {
  877. if (!node)
  878. return false;
  879. const nodeType = node.type;
  880. if (nodeType === "SwitchCase") {
  881. if (typeof opts === "undefined") {
  882. return true;
  883. } else {
  884. return (0, _shallowEqual.default)(node, opts);
  885. }
  886. }
  887. return false;
  888. }
  889. function isSwitchStatement(node, opts) {
  890. if (!node)
  891. return false;
  892. const nodeType = node.type;
  893. if (nodeType === "SwitchStatement") {
  894. if (typeof opts === "undefined") {
  895. return true;
  896. } else {
  897. return (0, _shallowEqual.default)(node, opts);
  898. }
  899. }
  900. return false;
  901. }
  902. function isThisExpression(node, opts) {
  903. if (!node)
  904. return false;
  905. const nodeType = node.type;
  906. if (nodeType === "ThisExpression") {
  907. if (typeof opts === "undefined") {
  908. return true;
  909. } else {
  910. return (0, _shallowEqual.default)(node, opts);
  911. }
  912. }
  913. return false;
  914. }
  915. function isThrowStatement(node, opts) {
  916. if (!node)
  917. return false;
  918. const nodeType = node.type;
  919. if (nodeType === "ThrowStatement") {
  920. if (typeof opts === "undefined") {
  921. return true;
  922. } else {
  923. return (0, _shallowEqual.default)(node, opts);
  924. }
  925. }
  926. return false;
  927. }
  928. function isTryStatement(node, opts) {
  929. if (!node)
  930. return false;
  931. const nodeType = node.type;
  932. if (nodeType === "TryStatement") {
  933. if (typeof opts === "undefined") {
  934. return true;
  935. } else {
  936. return (0, _shallowEqual.default)(node, opts);
  937. }
  938. }
  939. return false;
  940. }
  941. function isUnaryExpression(node, opts) {
  942. if (!node)
  943. return false;
  944. const nodeType = node.type;
  945. if (nodeType === "UnaryExpression") {
  946. if (typeof opts === "undefined") {
  947. return true;
  948. } else {
  949. return (0, _shallowEqual.default)(node, opts);
  950. }
  951. }
  952. return false;
  953. }
  954. function isUpdateExpression(node, opts) {
  955. if (!node)
  956. return false;
  957. const nodeType = node.type;
  958. if (nodeType === "UpdateExpression") {
  959. if (typeof opts === "undefined") {
  960. return true;
  961. } else {
  962. return (0, _shallowEqual.default)(node, opts);
  963. }
  964. }
  965. return false;
  966. }
  967. function isVariableDeclaration(node, opts) {
  968. if (!node)
  969. return false;
  970. const nodeType = node.type;
  971. if (nodeType === "VariableDeclaration") {
  972. if (typeof opts === "undefined") {
  973. return true;
  974. } else {
  975. return (0, _shallowEqual.default)(node, opts);
  976. }
  977. }
  978. return false;
  979. }
  980. function isVariableDeclarator(node, opts) {
  981. if (!node)
  982. return false;
  983. const nodeType = node.type;
  984. if (nodeType === "VariableDeclarator") {
  985. if (typeof opts === "undefined") {
  986. return true;
  987. } else {
  988. return (0, _shallowEqual.default)(node, opts);
  989. }
  990. }
  991. return false;
  992. }
  993. function isWhileStatement(node, opts) {
  994. if (!node)
  995. return false;
  996. const nodeType = node.type;
  997. if (nodeType === "WhileStatement") {
  998. if (typeof opts === "undefined") {
  999. return true;
  1000. } else {
  1001. return (0, _shallowEqual.default)(node, opts);
  1002. }
  1003. }
  1004. return false;
  1005. }
  1006. function isWithStatement(node, opts) {
  1007. if (!node)
  1008. return false;
  1009. const nodeType = node.type;
  1010. if (nodeType === "WithStatement") {
  1011. if (typeof opts === "undefined") {
  1012. return true;
  1013. } else {
  1014. return (0, _shallowEqual.default)(node, opts);
  1015. }
  1016. }
  1017. return false;
  1018. }
  1019. function isAssignmentPattern(node, opts) {
  1020. if (!node)
  1021. return false;
  1022. const nodeType = node.type;
  1023. if (nodeType === "AssignmentPattern") {
  1024. if (typeof opts === "undefined") {
  1025. return true;
  1026. } else {
  1027. return (0, _shallowEqual.default)(node, opts);
  1028. }
  1029. }
  1030. return false;
  1031. }
  1032. function isArrayPattern(node, opts) {
  1033. if (!node)
  1034. return false;
  1035. const nodeType = node.type;
  1036. if (nodeType === "ArrayPattern") {
  1037. if (typeof opts === "undefined") {
  1038. return true;
  1039. } else {
  1040. return (0, _shallowEqual.default)(node, opts);
  1041. }
  1042. }
  1043. return false;
  1044. }
  1045. function isArrowFunctionExpression(node, opts) {
  1046. if (!node)
  1047. return false;
  1048. const nodeType = node.type;
  1049. if (nodeType === "ArrowFunctionExpression") {
  1050. if (typeof opts === "undefined") {
  1051. return true;
  1052. } else {
  1053. return (0, _shallowEqual.default)(node, opts);
  1054. }
  1055. }
  1056. return false;
  1057. }
  1058. function isClassBody(node, opts) {
  1059. if (!node)
  1060. return false;
  1061. const nodeType = node.type;
  1062. if (nodeType === "ClassBody") {
  1063. if (typeof opts === "undefined") {
  1064. return true;
  1065. } else {
  1066. return (0, _shallowEqual.default)(node, opts);
  1067. }
  1068. }
  1069. return false;
  1070. }
  1071. function isClassExpression(node, opts) {
  1072. if (!node)
  1073. return false;
  1074. const nodeType = node.type;
  1075. if (nodeType === "ClassExpression") {
  1076. if (typeof opts === "undefined") {
  1077. return true;
  1078. } else {
  1079. return (0, _shallowEqual.default)(node, opts);
  1080. }
  1081. }
  1082. return false;
  1083. }
  1084. function isClassDeclaration(node, opts) {
  1085. if (!node)
  1086. return false;
  1087. const nodeType = node.type;
  1088. if (nodeType === "ClassDeclaration") {
  1089. if (typeof opts === "undefined") {
  1090. return true;
  1091. } else {
  1092. return (0, _shallowEqual.default)(node, opts);
  1093. }
  1094. }
  1095. return false;
  1096. }
  1097. function isExportAllDeclaration(node, opts) {
  1098. if (!node)
  1099. return false;
  1100. const nodeType = node.type;
  1101. if (nodeType === "ExportAllDeclaration") {
  1102. if (typeof opts === "undefined") {
  1103. return true;
  1104. } else {
  1105. return (0, _shallowEqual.default)(node, opts);
  1106. }
  1107. }
  1108. return false;
  1109. }
  1110. function isExportDefaultDeclaration(node, opts) {
  1111. if (!node)
  1112. return false;
  1113. const nodeType = node.type;
  1114. if (nodeType === "ExportDefaultDeclaration") {
  1115. if (typeof opts === "undefined") {
  1116. return true;
  1117. } else {
  1118. return (0, _shallowEqual.default)(node, opts);
  1119. }
  1120. }
  1121. return false;
  1122. }
  1123. function isExportNamedDeclaration(node, opts) {
  1124. if (!node)
  1125. return false;
  1126. const nodeType = node.type;
  1127. if (nodeType === "ExportNamedDeclaration") {
  1128. if (typeof opts === "undefined") {
  1129. return true;
  1130. } else {
  1131. return (0, _shallowEqual.default)(node, opts);
  1132. }
  1133. }
  1134. return false;
  1135. }
  1136. function isExportSpecifier(node, opts) {
  1137. if (!node)
  1138. return false;
  1139. const nodeType = node.type;
  1140. if (nodeType === "ExportSpecifier") {
  1141. if (typeof opts === "undefined") {
  1142. return true;
  1143. } else {
  1144. return (0, _shallowEqual.default)(node, opts);
  1145. }
  1146. }
  1147. return false;
  1148. }
  1149. function isForOfStatement(node, opts) {
  1150. if (!node)
  1151. return false;
  1152. const nodeType = node.type;
  1153. if (nodeType === "ForOfStatement") {
  1154. if (typeof opts === "undefined") {
  1155. return true;
  1156. } else {
  1157. return (0, _shallowEqual.default)(node, opts);
  1158. }
  1159. }
  1160. return false;
  1161. }
  1162. function isImportDeclaration(node, opts) {
  1163. if (!node)
  1164. return false;
  1165. const nodeType = node.type;
  1166. if (nodeType === "ImportDeclaration") {
  1167. if (typeof opts === "undefined") {
  1168. return true;
  1169. } else {
  1170. return (0, _shallowEqual.default)(node, opts);
  1171. }
  1172. }
  1173. return false;
  1174. }
  1175. function isImportDefaultSpecifier(node, opts) {
  1176. if (!node)
  1177. return false;
  1178. const nodeType = node.type;
  1179. if (nodeType === "ImportDefaultSpecifier") {
  1180. if (typeof opts === "undefined") {
  1181. return true;
  1182. } else {
  1183. return (0, _shallowEqual.default)(node, opts);
  1184. }
  1185. }
  1186. return false;
  1187. }
  1188. function isImportNamespaceSpecifier(node, opts) {
  1189. if (!node)
  1190. return false;
  1191. const nodeType = node.type;
  1192. if (nodeType === "ImportNamespaceSpecifier") {
  1193. if (typeof opts === "undefined") {
  1194. return true;
  1195. } else {
  1196. return (0, _shallowEqual.default)(node, opts);
  1197. }
  1198. }
  1199. return false;
  1200. }
  1201. function isImportSpecifier(node, opts) {
  1202. if (!node)
  1203. return false;
  1204. const nodeType = node.type;
  1205. if (nodeType === "ImportSpecifier") {
  1206. if (typeof opts === "undefined") {
  1207. return true;
  1208. } else {
  1209. return (0, _shallowEqual.default)(node, opts);
  1210. }
  1211. }
  1212. return false;
  1213. }
  1214. function isMetaProperty(node, opts) {
  1215. if (!node)
  1216. return false;
  1217. const nodeType = node.type;
  1218. if (nodeType === "MetaProperty") {
  1219. if (typeof opts === "undefined") {
  1220. return true;
  1221. } else {
  1222. return (0, _shallowEqual.default)(node, opts);
  1223. }
  1224. }
  1225. return false;
  1226. }
  1227. function isClassMethod(node, opts) {
  1228. if (!node)
  1229. return false;
  1230. const nodeType = node.type;
  1231. if (nodeType === "ClassMethod") {
  1232. if (typeof opts === "undefined") {
  1233. return true;
  1234. } else {
  1235. return (0, _shallowEqual.default)(node, opts);
  1236. }
  1237. }
  1238. return false;
  1239. }
  1240. function isObjectPattern(node, opts) {
  1241. if (!node)
  1242. return false;
  1243. const nodeType = node.type;
  1244. if (nodeType === "ObjectPattern") {
  1245. if (typeof opts === "undefined") {
  1246. return true;
  1247. } else {
  1248. return (0, _shallowEqual.default)(node, opts);
  1249. }
  1250. }
  1251. return false;
  1252. }
  1253. function isSpreadElement(node, opts) {
  1254. if (!node)
  1255. return false;
  1256. const nodeType = node.type;
  1257. if (nodeType === "SpreadElement") {
  1258. if (typeof opts === "undefined") {
  1259. return true;
  1260. } else {
  1261. return (0, _shallowEqual.default)(node, opts);
  1262. }
  1263. }
  1264. return false;
  1265. }
  1266. function isSuper(node, opts) {
  1267. if (!node)
  1268. return false;
  1269. const nodeType = node.type;
  1270. if (nodeType === "Super") {
  1271. if (typeof opts === "undefined") {
  1272. return true;
  1273. } else {
  1274. return (0, _shallowEqual.default)(node, opts);
  1275. }
  1276. }
  1277. return false;
  1278. }
  1279. function isTaggedTemplateExpression(node, opts) {
  1280. if (!node)
  1281. return false;
  1282. const nodeType = node.type;
  1283. if (nodeType === "TaggedTemplateExpression") {
  1284. if (typeof opts === "undefined") {
  1285. return true;
  1286. } else {
  1287. return (0, _shallowEqual.default)(node, opts);
  1288. }
  1289. }
  1290. return false;
  1291. }
  1292. function isTemplateElement(node, opts) {
  1293. if (!node)
  1294. return false;
  1295. const nodeType = node.type;
  1296. if (nodeType === "TemplateElement") {
  1297. if (typeof opts === "undefined") {
  1298. return true;
  1299. } else {
  1300. return (0, _shallowEqual.default)(node, opts);
  1301. }
  1302. }
  1303. return false;
  1304. }
  1305. function isTemplateLiteral(node, opts) {
  1306. if (!node)
  1307. return false;
  1308. const nodeType = node.type;
  1309. if (nodeType === "TemplateLiteral") {
  1310. if (typeof opts === "undefined") {
  1311. return true;
  1312. } else {
  1313. return (0, _shallowEqual.default)(node, opts);
  1314. }
  1315. }
  1316. return false;
  1317. }
  1318. function isYieldExpression(node, opts) {
  1319. if (!node)
  1320. return false;
  1321. const nodeType = node.type;
  1322. if (nodeType === "YieldExpression") {
  1323. if (typeof opts === "undefined") {
  1324. return true;
  1325. } else {
  1326. return (0, _shallowEqual.default)(node, opts);
  1327. }
  1328. }
  1329. return false;
  1330. }
  1331. function isAwaitExpression(node, opts) {
  1332. if (!node)
  1333. return false;
  1334. const nodeType = node.type;
  1335. if (nodeType === "AwaitExpression") {
  1336. if (typeof opts === "undefined") {
  1337. return true;
  1338. } else {
  1339. return (0, _shallowEqual.default)(node, opts);
  1340. }
  1341. }
  1342. return false;
  1343. }
  1344. function isImport(node, opts) {
  1345. if (!node)
  1346. return false;
  1347. const nodeType = node.type;
  1348. if (nodeType === "Import") {
  1349. if (typeof opts === "undefined") {
  1350. return true;
  1351. } else {
  1352. return (0, _shallowEqual.default)(node, opts);
  1353. }
  1354. }
  1355. return false;
  1356. }
  1357. function isBigIntLiteral(node, opts) {
  1358. if (!node)
  1359. return false;
  1360. const nodeType = node.type;
  1361. if (nodeType === "BigIntLiteral") {
  1362. if (typeof opts === "undefined") {
  1363. return true;
  1364. } else {
  1365. return (0, _shallowEqual.default)(node, opts);
  1366. }
  1367. }
  1368. return false;
  1369. }
  1370. function isExportNamespaceSpecifier(node, opts) {
  1371. if (!node)
  1372. return false;
  1373. const nodeType = node.type;
  1374. if (nodeType === "ExportNamespaceSpecifier") {
  1375. if (typeof opts === "undefined") {
  1376. return true;
  1377. } else {
  1378. return (0, _shallowEqual.default)(node, opts);
  1379. }
  1380. }
  1381. return false;
  1382. }
  1383. function isOptionalMemberExpression(node, opts) {
  1384. if (!node)
  1385. return false;
  1386. const nodeType = node.type;
  1387. if (nodeType === "OptionalMemberExpression") {
  1388. if (typeof opts === "undefined") {
  1389. return true;
  1390. } else {
  1391. return (0, _shallowEqual.default)(node, opts);
  1392. }
  1393. }
  1394. return false;
  1395. }
  1396. function isOptionalCallExpression(node, opts) {
  1397. if (!node)
  1398. return false;
  1399. const nodeType = node.type;
  1400. if (nodeType === "OptionalCallExpression") {
  1401. if (typeof opts === "undefined") {
  1402. return true;
  1403. } else {
  1404. return (0, _shallowEqual.default)(node, opts);
  1405. }
  1406. }
  1407. return false;
  1408. }
  1409. function isClassProperty(node, opts) {
  1410. if (!node)
  1411. return false;
  1412. const nodeType = node.type;
  1413. if (nodeType === "ClassProperty") {
  1414. if (typeof opts === "undefined") {
  1415. return true;
  1416. } else {
  1417. return (0, _shallowEqual.default)(node, opts);
  1418. }
  1419. }
  1420. return false;
  1421. }
  1422. function isClassPrivateProperty(node, opts) {
  1423. if (!node)
  1424. return false;
  1425. const nodeType = node.type;
  1426. if (nodeType === "ClassPrivateProperty") {
  1427. if (typeof opts === "undefined") {
  1428. return true;
  1429. } else {
  1430. return (0, _shallowEqual.default)(node, opts);
  1431. }
  1432. }
  1433. return false;
  1434. }
  1435. function isClassPrivateMethod(node, opts) {
  1436. if (!node)
  1437. return false;
  1438. const nodeType = node.type;
  1439. if (nodeType === "ClassPrivateMethod") {
  1440. if (typeof opts === "undefined") {
  1441. return true;
  1442. } else {
  1443. return (0, _shallowEqual.default)(node, opts);
  1444. }
  1445. }
  1446. return false;
  1447. }
  1448. function isPrivateName(node, opts) {
  1449. if (!node)
  1450. return false;
  1451. const nodeType = node.type;
  1452. if (nodeType === "PrivateName") {
  1453. if (typeof opts === "undefined") {
  1454. return true;
  1455. } else {
  1456. return (0, _shallowEqual.default)(node, opts);
  1457. }
  1458. }
  1459. return false;
  1460. }
  1461. function isAnyTypeAnnotation(node, opts) {
  1462. if (!node)
  1463. return false;
  1464. const nodeType = node.type;
  1465. if (nodeType === "AnyTypeAnnotation") {
  1466. if (typeof opts === "undefined") {
  1467. return true;
  1468. } else {
  1469. return (0, _shallowEqual.default)(node, opts);
  1470. }
  1471. }
  1472. return false;
  1473. }
  1474. function isArrayTypeAnnotation(node, opts) {
  1475. if (!node)
  1476. return false;
  1477. const nodeType = node.type;
  1478. if (nodeType === "ArrayTypeAnnotation") {
  1479. if (typeof opts === "undefined") {
  1480. return true;
  1481. } else {
  1482. return (0, _shallowEqual.default)(node, opts);
  1483. }
  1484. }
  1485. return false;
  1486. }
  1487. function isBooleanTypeAnnotation(node, opts) {
  1488. if (!node)
  1489. return false;
  1490. const nodeType = node.type;
  1491. if (nodeType === "BooleanTypeAnnotation") {
  1492. if (typeof opts === "undefined") {
  1493. return true;
  1494. } else {
  1495. return (0, _shallowEqual.default)(node, opts);
  1496. }
  1497. }
  1498. return false;
  1499. }
  1500. function isBooleanLiteralTypeAnnotation(node, opts) {
  1501. if (!node)
  1502. return false;
  1503. const nodeType = node.type;
  1504. if (nodeType === "BooleanLiteralTypeAnnotation") {
  1505. if (typeof opts === "undefined") {
  1506. return true;
  1507. } else {
  1508. return (0, _shallowEqual.default)(node, opts);
  1509. }
  1510. }
  1511. return false;
  1512. }
  1513. function isNullLiteralTypeAnnotation(node, opts) {
  1514. if (!node)
  1515. return false;
  1516. const nodeType = node.type;
  1517. if (nodeType === "NullLiteralTypeAnnotation") {
  1518. if (typeof opts === "undefined") {
  1519. return true;
  1520. } else {
  1521. return (0, _shallowEqual.default)(node, opts);
  1522. }
  1523. }
  1524. return false;
  1525. }
  1526. function isClassImplements(node, opts) {
  1527. if (!node)
  1528. return false;
  1529. const nodeType = node.type;
  1530. if (nodeType === "ClassImplements") {
  1531. if (typeof opts === "undefined") {
  1532. return true;
  1533. } else {
  1534. return (0, _shallowEqual.default)(node, opts);
  1535. }
  1536. }
  1537. return false;
  1538. }
  1539. function isDeclareClass(node, opts) {
  1540. if (!node)
  1541. return false;
  1542. const nodeType = node.type;
  1543. if (nodeType === "DeclareClass") {
  1544. if (typeof opts === "undefined") {
  1545. return true;
  1546. } else {
  1547. return (0, _shallowEqual.default)(node, opts);
  1548. }
  1549. }
  1550. return false;
  1551. }
  1552. function isDeclareFunction(node, opts) {
  1553. if (!node)
  1554. return false;
  1555. const nodeType = node.type;
  1556. if (nodeType === "DeclareFunction") {
  1557. if (typeof opts === "undefined") {
  1558. return true;
  1559. } else {
  1560. return (0, _shallowEqual.default)(node, opts);
  1561. }
  1562. }
  1563. return false;
  1564. }
  1565. function isDeclareInterface(node, opts) {
  1566. if (!node)
  1567. return false;
  1568. const nodeType = node.type;
  1569. if (nodeType === "DeclareInterface") {
  1570. if (typeof opts === "undefined") {
  1571. return true;
  1572. } else {
  1573. return (0, _shallowEqual.default)(node, opts);
  1574. }
  1575. }
  1576. return false;
  1577. }
  1578. function isDeclareModule(node, opts) {
  1579. if (!node)
  1580. return false;
  1581. const nodeType = node.type;
  1582. if (nodeType === "DeclareModule") {
  1583. if (typeof opts === "undefined") {
  1584. return true;
  1585. } else {
  1586. return (0, _shallowEqual.default)(node, opts);
  1587. }
  1588. }
  1589. return false;
  1590. }
  1591. function isDeclareModuleExports(node, opts) {
  1592. if (!node)
  1593. return false;
  1594. const nodeType = node.type;
  1595. if (nodeType === "DeclareModuleExports") {
  1596. if (typeof opts === "undefined") {
  1597. return true;
  1598. } else {
  1599. return (0, _shallowEqual.default)(node, opts);
  1600. }
  1601. }
  1602. return false;
  1603. }
  1604. function isDeclareTypeAlias(node, opts) {
  1605. if (!node)
  1606. return false;
  1607. const nodeType = node.type;
  1608. if (nodeType === "DeclareTypeAlias") {
  1609. if (typeof opts === "undefined") {
  1610. return true;
  1611. } else {
  1612. return (0, _shallowEqual.default)(node, opts);
  1613. }
  1614. }
  1615. return false;
  1616. }
  1617. function isDeclareOpaqueType(node, opts) {
  1618. if (!node)
  1619. return false;
  1620. const nodeType = node.type;
  1621. if (nodeType === "DeclareOpaqueType") {
  1622. if (typeof opts === "undefined") {
  1623. return true;
  1624. } else {
  1625. return (0, _shallowEqual.default)(node, opts);
  1626. }
  1627. }
  1628. return false;
  1629. }
  1630. function isDeclareVariable(node, opts) {
  1631. if (!node)
  1632. return false;
  1633. const nodeType = node.type;
  1634. if (nodeType === "DeclareVariable") {
  1635. if (typeof opts === "undefined") {
  1636. return true;
  1637. } else {
  1638. return (0, _shallowEqual.default)(node, opts);
  1639. }
  1640. }
  1641. return false;
  1642. }
  1643. function isDeclareExportDeclaration(node, opts) {
  1644. if (!node)
  1645. return false;
  1646. const nodeType = node.type;
  1647. if (nodeType === "DeclareExportDeclaration") {
  1648. if (typeof opts === "undefined") {
  1649. return true;
  1650. } else {
  1651. return (0, _shallowEqual.default)(node, opts);
  1652. }
  1653. }
  1654. return false;
  1655. }
  1656. function isDeclareExportAllDeclaration(node, opts) {
  1657. if (!node)
  1658. return false;
  1659. const nodeType = node.type;
  1660. if (nodeType === "DeclareExportAllDeclaration") {
  1661. if (typeof opts === "undefined") {
  1662. return true;
  1663. } else {
  1664. return (0, _shallowEqual.default)(node, opts);
  1665. }
  1666. }
  1667. return false;
  1668. }
  1669. function isDeclaredPredicate(node, opts) {
  1670. if (!node)
  1671. return false;
  1672. const nodeType = node.type;
  1673. if (nodeType === "DeclaredPredicate") {
  1674. if (typeof opts === "undefined") {
  1675. return true;
  1676. } else {
  1677. return (0, _shallowEqual.default)(node, opts);
  1678. }
  1679. }
  1680. return false;
  1681. }
  1682. function isExistsTypeAnnotation(node, opts) {
  1683. if (!node)
  1684. return false;
  1685. const nodeType = node.type;
  1686. if (nodeType === "ExistsTypeAnnotation") {
  1687. if (typeof opts === "undefined") {
  1688. return true;
  1689. } else {
  1690. return (0, _shallowEqual.default)(node, opts);
  1691. }
  1692. }
  1693. return false;
  1694. }
  1695. function isFunctionTypeAnnotation(node, opts) {
  1696. if (!node)
  1697. return false;
  1698. const nodeType = node.type;
  1699. if (nodeType === "FunctionTypeAnnotation") {
  1700. if (typeof opts === "undefined") {
  1701. return true;
  1702. } else {
  1703. return (0, _shallowEqual.default)(node, opts);
  1704. }
  1705. }
  1706. return false;
  1707. }
  1708. function isFunctionTypeParam(node, opts) {
  1709. if (!node)
  1710. return false;
  1711. const nodeType = node.type;
  1712. if (nodeType === "FunctionTypeParam") {
  1713. if (typeof opts === "undefined") {
  1714. return true;
  1715. } else {
  1716. return (0, _shallowEqual.default)(node, opts);
  1717. }
  1718. }
  1719. return false;
  1720. }
  1721. function isGenericTypeAnnotation(node, opts) {
  1722. if (!node)
  1723. return false;
  1724. const nodeType = node.type;
  1725. if (nodeType === "GenericTypeAnnotation") {
  1726. if (typeof opts === "undefined") {
  1727. return true;
  1728. } else {
  1729. return (0, _shallowEqual.default)(node, opts);
  1730. }
  1731. }
  1732. return false;
  1733. }
  1734. function isInferredPredicate(node, opts) {
  1735. if (!node)
  1736. return false;
  1737. const nodeType = node.type;
  1738. if (nodeType === "InferredPredicate") {
  1739. if (typeof opts === "undefined") {
  1740. return true;
  1741. } else {
  1742. return (0, _shallowEqual.default)(node, opts);
  1743. }
  1744. }
  1745. return false;
  1746. }
  1747. function isInterfaceExtends(node, opts) {
  1748. if (!node)
  1749. return false;
  1750. const nodeType = node.type;
  1751. if (nodeType === "InterfaceExtends") {
  1752. if (typeof opts === "undefined") {
  1753. return true;
  1754. } else {
  1755. return (0, _shallowEqual.default)(node, opts);
  1756. }
  1757. }
  1758. return false;
  1759. }
  1760. function isInterfaceDeclaration(node, opts) {
  1761. if (!node)
  1762. return false;
  1763. const nodeType = node.type;
  1764. if (nodeType === "InterfaceDeclaration") {
  1765. if (typeof opts === "undefined") {
  1766. return true;
  1767. } else {
  1768. return (0, _shallowEqual.default)(node, opts);
  1769. }
  1770. }
  1771. return false;
  1772. }
  1773. function isInterfaceTypeAnnotation(node, opts) {
  1774. if (!node)
  1775. return false;
  1776. const nodeType = node.type;
  1777. if (nodeType === "InterfaceTypeAnnotation") {
  1778. if (typeof opts === "undefined") {
  1779. return true;
  1780. } else {
  1781. return (0, _shallowEqual.default)(node, opts);
  1782. }
  1783. }
  1784. return false;
  1785. }
  1786. function isIntersectionTypeAnnotation(node, opts) {
  1787. if (!node)
  1788. return false;
  1789. const nodeType = node.type;
  1790. if (nodeType === "IntersectionTypeAnnotation") {
  1791. if (typeof opts === "undefined") {
  1792. return true;
  1793. } else {
  1794. return (0, _shallowEqual.default)(node, opts);
  1795. }
  1796. }
  1797. return false;
  1798. }
  1799. function isMixedTypeAnnotation(node, opts) {
  1800. if (!node)
  1801. return false;
  1802. const nodeType = node.type;
  1803. if (nodeType === "MixedTypeAnnotation") {
  1804. if (typeof opts === "undefined") {
  1805. return true;
  1806. } else {
  1807. return (0, _shallowEqual.default)(node, opts);
  1808. }
  1809. }
  1810. return false;
  1811. }
  1812. function isEmptyTypeAnnotation(node, opts) {
  1813. if (!node)
  1814. return false;
  1815. const nodeType = node.type;
  1816. if (nodeType === "EmptyTypeAnnotation") {
  1817. if (typeof opts === "undefined") {
  1818. return true;
  1819. } else {
  1820. return (0, _shallowEqual.default)(node, opts);
  1821. }
  1822. }
  1823. return false;
  1824. }
  1825. function isNullableTypeAnnotation(node, opts) {
  1826. if (!node)
  1827. return false;
  1828. const nodeType = node.type;
  1829. if (nodeType === "NullableTypeAnnotation") {
  1830. if (typeof opts === "undefined") {
  1831. return true;
  1832. } else {
  1833. return (0, _shallowEqual.default)(node, opts);
  1834. }
  1835. }
  1836. return false;
  1837. }
  1838. function isNumberLiteralTypeAnnotation(node, opts) {
  1839. if (!node)
  1840. return false;
  1841. const nodeType = node.type;
  1842. if (nodeType === "NumberLiteralTypeAnnotation") {
  1843. if (typeof opts === "undefined") {
  1844. return true;
  1845. } else {
  1846. return (0, _shallowEqual.default)(node, opts);
  1847. }
  1848. }
  1849. return false;
  1850. }
  1851. function isNumberTypeAnnotation(node, opts) {
  1852. if (!node)
  1853. return false;
  1854. const nodeType = node.type;
  1855. if (nodeType === "NumberTypeAnnotation") {
  1856. if (typeof opts === "undefined") {
  1857. return true;
  1858. } else {
  1859. return (0, _shallowEqual.default)(node, opts);
  1860. }
  1861. }
  1862. return false;
  1863. }
  1864. function isObjectTypeAnnotation(node, opts) {
  1865. if (!node)
  1866. return false;
  1867. const nodeType = node.type;
  1868. if (nodeType === "ObjectTypeAnnotation") {
  1869. if (typeof opts === "undefined") {
  1870. return true;
  1871. } else {
  1872. return (0, _shallowEqual.default)(node, opts);
  1873. }
  1874. }
  1875. return false;
  1876. }
  1877. function isObjectTypeInternalSlot(node, opts) {
  1878. if (!node)
  1879. return false;
  1880. const nodeType = node.type;
  1881. if (nodeType === "ObjectTypeInternalSlot") {
  1882. if (typeof opts === "undefined") {
  1883. return true;
  1884. } else {
  1885. return (0, _shallowEqual.default)(node, opts);
  1886. }
  1887. }
  1888. return false;
  1889. }
  1890. function isObjectTypeCallProperty(node, opts) {
  1891. if (!node)
  1892. return false;
  1893. const nodeType = node.type;
  1894. if (nodeType === "ObjectTypeCallProperty") {
  1895. if (typeof opts === "undefined") {
  1896. return true;
  1897. } else {
  1898. return (0, _shallowEqual.default)(node, opts);
  1899. }
  1900. }
  1901. return false;
  1902. }
  1903. function isObjectTypeIndexer(node, opts) {
  1904. if (!node)
  1905. return false;
  1906. const nodeType = node.type;
  1907. if (nodeType === "ObjectTypeIndexer") {
  1908. if (typeof opts === "undefined") {
  1909. return true;
  1910. } else {
  1911. return (0, _shallowEqual.default)(node, opts);
  1912. }
  1913. }
  1914. return false;
  1915. }
  1916. function isObjectTypeProperty(node, opts) {
  1917. if (!node)
  1918. return false;
  1919. const nodeType = node.type;
  1920. if (nodeType === "ObjectTypeProperty") {
  1921. if (typeof opts === "undefined") {
  1922. return true;
  1923. } else {
  1924. return (0, _shallowEqual.default)(node, opts);
  1925. }
  1926. }
  1927. return false;
  1928. }
  1929. function isObjectTypeSpreadProperty(node, opts) {
  1930. if (!node)
  1931. return false;
  1932. const nodeType = node.type;
  1933. if (nodeType === "ObjectTypeSpreadProperty") {
  1934. if (typeof opts === "undefined") {
  1935. return true;
  1936. } else {
  1937. return (0, _shallowEqual.default)(node, opts);
  1938. }
  1939. }
  1940. return false;
  1941. }
  1942. function isOpaqueType(node, opts) {
  1943. if (!node)
  1944. return false;
  1945. const nodeType = node.type;
  1946. if (nodeType === "OpaqueType") {
  1947. if (typeof opts === "undefined") {
  1948. return true;
  1949. } else {
  1950. return (0, _shallowEqual.default)(node, opts);
  1951. }
  1952. }
  1953. return false;
  1954. }
  1955. function isQualifiedTypeIdentifier(node, opts) {
  1956. if (!node)
  1957. return false;
  1958. const nodeType = node.type;
  1959. if (nodeType === "QualifiedTypeIdentifier") {
  1960. if (typeof opts === "undefined") {
  1961. return true;
  1962. } else {
  1963. return (0, _shallowEqual.default)(node, opts);
  1964. }
  1965. }
  1966. return false;
  1967. }
  1968. function isStringLiteralTypeAnnotation(node, opts) {
  1969. if (!node)
  1970. return false;
  1971. const nodeType = node.type;
  1972. if (nodeType === "StringLiteralTypeAnnotation") {
  1973. if (typeof opts === "undefined") {
  1974. return true;
  1975. } else {
  1976. return (0, _shallowEqual.default)(node, opts);
  1977. }
  1978. }
  1979. return false;
  1980. }
  1981. function isStringTypeAnnotation(node, opts) {
  1982. if (!node)
  1983. return false;
  1984. const nodeType = node.type;
  1985. if (nodeType === "StringTypeAnnotation") {
  1986. if (typeof opts === "undefined") {
  1987. return true;
  1988. } else {
  1989. return (0, _shallowEqual.default)(node, opts);
  1990. }
  1991. }
  1992. return false;
  1993. }
  1994. function isSymbolTypeAnnotation(node, opts) {
  1995. if (!node)
  1996. return false;
  1997. const nodeType = node.type;
  1998. if (nodeType === "SymbolTypeAnnotation") {
  1999. if (typeof opts === "undefined") {
  2000. return true;
  2001. } else {
  2002. return (0, _shallowEqual.default)(node, opts);
  2003. }
  2004. }
  2005. return false;
  2006. }
  2007. function isThisTypeAnnotation(node, opts) {
  2008. if (!node)
  2009. return false;
  2010. const nodeType = node.type;
  2011. if (nodeType === "ThisTypeAnnotation") {
  2012. if (typeof opts === "undefined") {
  2013. return true;
  2014. } else {
  2015. return (0, _shallowEqual.default)(node, opts);
  2016. }
  2017. }
  2018. return false;
  2019. }
  2020. function isTupleTypeAnnotation(node, opts) {
  2021. if (!node)
  2022. return false;
  2023. const nodeType = node.type;
  2024. if (nodeType === "TupleTypeAnnotation") {
  2025. if (typeof opts === "undefined") {
  2026. return true;
  2027. } else {
  2028. return (0, _shallowEqual.default)(node, opts);
  2029. }
  2030. }
  2031. return false;
  2032. }
  2033. function isTypeofTypeAnnotation(node, opts) {
  2034. if (!node)
  2035. return false;
  2036. const nodeType = node.type;
  2037. if (nodeType === "TypeofTypeAnnotation") {
  2038. if (typeof opts === "undefined") {
  2039. return true;
  2040. } else {
  2041. return (0, _shallowEqual.default)(node, opts);
  2042. }
  2043. }
  2044. return false;
  2045. }
  2046. function isTypeAlias(node, opts) {
  2047. if (!node)
  2048. return false;
  2049. const nodeType = node.type;
  2050. if (nodeType === "TypeAlias") {
  2051. if (typeof opts === "undefined") {
  2052. return true;
  2053. } else {
  2054. return (0, _shallowEqual.default)(node, opts);
  2055. }
  2056. }
  2057. return false;
  2058. }
  2059. function isTypeAnnotation(node, opts) {
  2060. if (!node)
  2061. return false;
  2062. const nodeType = node.type;
  2063. if (nodeType === "TypeAnnotation") {
  2064. if (typeof opts === "undefined") {
  2065. return true;
  2066. } else {
  2067. return (0, _shallowEqual.default)(node, opts);
  2068. }
  2069. }
  2070. return false;
  2071. }
  2072. function isTypeCastExpression(node, opts) {
  2073. if (!node)
  2074. return false;
  2075. const nodeType = node.type;
  2076. if (nodeType === "TypeCastExpression") {
  2077. if (typeof opts === "undefined") {
  2078. return true;
  2079. } else {
  2080. return (0, _shallowEqual.default)(node, opts);
  2081. }
  2082. }
  2083. return false;
  2084. }
  2085. function isTypeParameter(node, opts) {
  2086. if (!node)
  2087. return false;
  2088. const nodeType = node.type;
  2089. if (nodeType === "TypeParameter") {
  2090. if (typeof opts === "undefined") {
  2091. return true;
  2092. } else {
  2093. return (0, _shallowEqual.default)(node, opts);
  2094. }
  2095. }
  2096. return false;
  2097. }
  2098. function isTypeParameterDeclaration(node, opts) {
  2099. if (!node)
  2100. return false;
  2101. const nodeType = node.type;
  2102. if (nodeType === "TypeParameterDeclaration") {
  2103. if (typeof opts === "undefined") {
  2104. return true;
  2105. } else {
  2106. return (0, _shallowEqual.default)(node, opts);
  2107. }
  2108. }
  2109. return false;
  2110. }
  2111. function isTypeParameterInstantiation(node, opts) {
  2112. if (!node)
  2113. return false;
  2114. const nodeType = node.type;
  2115. if (nodeType === "TypeParameterInstantiation") {
  2116. if (typeof opts === "undefined") {
  2117. return true;
  2118. } else {
  2119. return (0, _shallowEqual.default)(node, opts);
  2120. }
  2121. }
  2122. return false;
  2123. }
  2124. function isUnionTypeAnnotation(node, opts) {
  2125. if (!node)
  2126. return false;
  2127. const nodeType = node.type;
  2128. if (nodeType === "UnionTypeAnnotation") {
  2129. if (typeof opts === "undefined") {
  2130. return true;
  2131. } else {
  2132. return (0, _shallowEqual.default)(node, opts);
  2133. }
  2134. }
  2135. return false;
  2136. }
  2137. function isVariance(node, opts) {
  2138. if (!node)
  2139. return false;
  2140. const nodeType = node.type;
  2141. if (nodeType === "Variance") {
  2142. if (typeof opts === "undefined") {
  2143. return true;
  2144. } else {
  2145. return (0, _shallowEqual.default)(node, opts);
  2146. }
  2147. }
  2148. return false;
  2149. }
  2150. function isVoidTypeAnnotation(node, opts) {
  2151. if (!node)
  2152. return false;
  2153. const nodeType = node.type;
  2154. if (nodeType === "VoidTypeAnnotation") {
  2155. if (typeof opts === "undefined") {
  2156. return true;
  2157. } else {
  2158. return (0, _shallowEqual.default)(node, opts);
  2159. }
  2160. }
  2161. return false;
  2162. }
  2163. function isEnumDeclaration(node, opts) {
  2164. if (!node)
  2165. return false;
  2166. const nodeType = node.type;
  2167. if (nodeType === "EnumDeclaration") {
  2168. if (typeof opts === "undefined") {
  2169. return true;
  2170. } else {
  2171. return (0, _shallowEqual.default)(node, opts);
  2172. }
  2173. }
  2174. return false;
  2175. }
  2176. function isEnumBooleanBody(node, opts) {
  2177. if (!node)
  2178. return false;
  2179. const nodeType = node.type;
  2180. if (nodeType === "EnumBooleanBody") {
  2181. if (typeof opts === "undefined") {
  2182. return true;
  2183. } else {
  2184. return (0, _shallowEqual.default)(node, opts);
  2185. }
  2186. }
  2187. return false;
  2188. }
  2189. function isEnumNumberBody(node, opts) {
  2190. if (!node)
  2191. return false;
  2192. const nodeType = node.type;
  2193. if (nodeType === "EnumNumberBody") {
  2194. if (typeof opts === "undefined") {
  2195. return true;
  2196. } else {
  2197. return (0, _shallowEqual.default)(node, opts);
  2198. }
  2199. }
  2200. return false;
  2201. }
  2202. function isEnumStringBody(node, opts) {
  2203. if (!node)
  2204. return false;
  2205. const nodeType = node.type;
  2206. if (nodeType === "EnumStringBody") {
  2207. if (typeof opts === "undefined") {
  2208. return true;
  2209. } else {
  2210. return (0, _shallowEqual.default)(node, opts);
  2211. }
  2212. }
  2213. return false;
  2214. }
  2215. function isEnumSymbolBody(node, opts) {
  2216. if (!node)
  2217. return false;
  2218. const nodeType = node.type;
  2219. if (nodeType === "EnumSymbolBody") {
  2220. if (typeof opts === "undefined") {
  2221. return true;
  2222. } else {
  2223. return (0, _shallowEqual.default)(node, opts);
  2224. }
  2225. }
  2226. return false;
  2227. }
  2228. function isEnumBooleanMember(node, opts) {
  2229. if (!node)
  2230. return false;
  2231. const nodeType = node.type;
  2232. if (nodeType === "EnumBooleanMember") {
  2233. if (typeof opts === "undefined") {
  2234. return true;
  2235. } else {
  2236. return (0, _shallowEqual.default)(node, opts);
  2237. }
  2238. }
  2239. return false;
  2240. }
  2241. function isEnumNumberMember(node, opts) {
  2242. if (!node)
  2243. return false;
  2244. const nodeType = node.type;
  2245. if (nodeType === "EnumNumberMember") {
  2246. if (typeof opts === "undefined") {
  2247. return true;
  2248. } else {
  2249. return (0, _shallowEqual.default)(node, opts);
  2250. }
  2251. }
  2252. return false;
  2253. }
  2254. function isEnumStringMember(node, opts) {
  2255. if (!node)
  2256. return false;
  2257. const nodeType = node.type;
  2258. if (nodeType === "EnumStringMember") {
  2259. if (typeof opts === "undefined") {
  2260. return true;
  2261. } else {
  2262. return (0, _shallowEqual.default)(node, opts);
  2263. }
  2264. }
  2265. return false;
  2266. }
  2267. function isEnumDefaultedMember(node, opts) {
  2268. if (!node)
  2269. return false;
  2270. const nodeType = node.type;
  2271. if (nodeType === "EnumDefaultedMember") {
  2272. if (typeof opts === "undefined") {
  2273. return true;
  2274. } else {
  2275. return (0, _shallowEqual.default)(node, opts);
  2276. }
  2277. }
  2278. return false;
  2279. }
  2280. function isIndexedAccessType(node, opts) {
  2281. if (!node)
  2282. return false;
  2283. const nodeType = node.type;
  2284. if (nodeType === "IndexedAccessType") {
  2285. if (typeof opts === "undefined") {
  2286. return true;
  2287. } else {
  2288. return (0, _shallowEqual.default)(node, opts);
  2289. }
  2290. }
  2291. return false;
  2292. }
  2293. function isOptionalIndexedAccessType(node, opts) {
  2294. if (!node)
  2295. return false;
  2296. const nodeType = node.type;
  2297. if (nodeType === "OptionalIndexedAccessType") {
  2298. if (typeof opts === "undefined") {
  2299. return true;
  2300. } else {
  2301. return (0, _shallowEqual.default)(node, opts);
  2302. }
  2303. }
  2304. return false;
  2305. }
  2306. function isJSXAttribute(node, opts) {
  2307. if (!node)
  2308. return false;
  2309. const nodeType = node.type;
  2310. if (nodeType === "JSXAttribute") {
  2311. if (typeof opts === "undefined") {
  2312. return true;
  2313. } else {
  2314. return (0, _shallowEqual.default)(node, opts);
  2315. }
  2316. }
  2317. return false;
  2318. }
  2319. function isJSXClosingElement(node, opts) {
  2320. if (!node)
  2321. return false;
  2322. const nodeType = node.type;
  2323. if (nodeType === "JSXClosingElement") {
  2324. if (typeof opts === "undefined") {
  2325. return true;
  2326. } else {
  2327. return (0, _shallowEqual.default)(node, opts);
  2328. }
  2329. }
  2330. return false;
  2331. }
  2332. function isJSXElement2(node, opts) {
  2333. if (!node)
  2334. return false;
  2335. const nodeType = node.type;
  2336. if (nodeType === "JSXElement") {
  2337. if (typeof opts === "undefined") {
  2338. return true;
  2339. } else {
  2340. return (0, _shallowEqual.default)(node, opts);
  2341. }
  2342. }
  2343. return false;
  2344. }
  2345. function isJSXEmptyExpression(node, opts) {
  2346. if (!node)
  2347. return false;
  2348. const nodeType = node.type;
  2349. if (nodeType === "JSXEmptyExpression") {
  2350. if (typeof opts === "undefined") {
  2351. return true;
  2352. } else {
  2353. return (0, _shallowEqual.default)(node, opts);
  2354. }
  2355. }
  2356. return false;
  2357. }
  2358. function isJSXExpressionContainer2(node, opts) {
  2359. if (!node)
  2360. return false;
  2361. const nodeType = node.type;
  2362. if (nodeType === "JSXExpressionContainer") {
  2363. if (typeof opts === "undefined") {
  2364. return true;
  2365. } else {
  2366. return (0, _shallowEqual.default)(node, opts);
  2367. }
  2368. }
  2369. return false;
  2370. }
  2371. function isJSXSpreadChild(node, opts) {
  2372. if (!node)
  2373. return false;
  2374. const nodeType = node.type;
  2375. if (nodeType === "JSXSpreadChild") {
  2376. if (typeof opts === "undefined") {
  2377. return true;
  2378. } else {
  2379. return (0, _shallowEqual.default)(node, opts);
  2380. }
  2381. }
  2382. return false;
  2383. }
  2384. function isJSXIdentifier2(node, opts) {
  2385. if (!node)
  2386. return false;
  2387. const nodeType = node.type;
  2388. if (nodeType === "JSXIdentifier") {
  2389. if (typeof opts === "undefined") {
  2390. return true;
  2391. } else {
  2392. return (0, _shallowEqual.default)(node, opts);
  2393. }
  2394. }
  2395. return false;
  2396. }
  2397. function isJSXMemberExpression(node, opts) {
  2398. if (!node)
  2399. return false;
  2400. const nodeType = node.type;
  2401. if (nodeType === "JSXMemberExpression") {
  2402. if (typeof opts === "undefined") {
  2403. return true;
  2404. } else {
  2405. return (0, _shallowEqual.default)(node, opts);
  2406. }
  2407. }
  2408. return false;
  2409. }
  2410. function isJSXNamespacedName(node, opts) {
  2411. if (!node)
  2412. return false;
  2413. const nodeType = node.type;
  2414. if (nodeType === "JSXNamespacedName") {
  2415. if (typeof opts === "undefined") {
  2416. return true;
  2417. } else {
  2418. return (0, _shallowEqual.default)(node, opts);
  2419. }
  2420. }
  2421. return false;
  2422. }
  2423. function isJSXOpeningElement(node, opts) {
  2424. if (!node)
  2425. return false;
  2426. const nodeType = node.type;
  2427. if (nodeType === "JSXOpeningElement") {
  2428. if (typeof opts === "undefined") {
  2429. return true;
  2430. } else {
  2431. return (0, _shallowEqual.default)(node, opts);
  2432. }
  2433. }
  2434. return false;
  2435. }
  2436. function isJSXSpreadAttribute(node, opts) {
  2437. if (!node)
  2438. return false;
  2439. const nodeType = node.type;
  2440. if (nodeType === "JSXSpreadAttribute") {
  2441. if (typeof opts === "undefined") {
  2442. return true;
  2443. } else {
  2444. return (0, _shallowEqual.default)(node, opts);
  2445. }
  2446. }
  2447. return false;
  2448. }
  2449. function isJSXText(node, opts) {
  2450. if (!node)
  2451. return false;
  2452. const nodeType = node.type;
  2453. if (nodeType === "JSXText") {
  2454. if (typeof opts === "undefined") {
  2455. return true;
  2456. } else {
  2457. return (0, _shallowEqual.default)(node, opts);
  2458. }
  2459. }
  2460. return false;
  2461. }
  2462. function isJSXFragment2(node, opts) {
  2463. if (!node)
  2464. return false;
  2465. const nodeType = node.type;
  2466. if (nodeType === "JSXFragment") {
  2467. if (typeof opts === "undefined") {
  2468. return true;
  2469. } else {
  2470. return (0, _shallowEqual.default)(node, opts);
  2471. }
  2472. }
  2473. return false;
  2474. }
  2475. function isJSXOpeningFragment(node, opts) {
  2476. if (!node)
  2477. return false;
  2478. const nodeType = node.type;
  2479. if (nodeType === "JSXOpeningFragment") {
  2480. if (typeof opts === "undefined") {
  2481. return true;
  2482. } else {
  2483. return (0, _shallowEqual.default)(node, opts);
  2484. }
  2485. }
  2486. return false;
  2487. }
  2488. function isJSXClosingFragment(node, opts) {
  2489. if (!node)
  2490. return false;
  2491. const nodeType = node.type;
  2492. if (nodeType === "JSXClosingFragment") {
  2493. if (typeof opts === "undefined") {
  2494. return true;
  2495. } else {
  2496. return (0, _shallowEqual.default)(node, opts);
  2497. }
  2498. }
  2499. return false;
  2500. }
  2501. function isNoop(node, opts) {
  2502. if (!node)
  2503. return false;
  2504. const nodeType = node.type;
  2505. if (nodeType === "Noop") {
  2506. if (typeof opts === "undefined") {
  2507. return true;
  2508. } else {
  2509. return (0, _shallowEqual.default)(node, opts);
  2510. }
  2511. }
  2512. return false;
  2513. }
  2514. function isPlaceholder(node, opts) {
  2515. if (!node)
  2516. return false;
  2517. const nodeType = node.type;
  2518. if (nodeType === "Placeholder") {
  2519. if (typeof opts === "undefined") {
  2520. return true;
  2521. } else {
  2522. return (0, _shallowEqual.default)(node, opts);
  2523. }
  2524. }
  2525. return false;
  2526. }
  2527. function isV8IntrinsicIdentifier(node, opts) {
  2528. if (!node)
  2529. return false;
  2530. const nodeType = node.type;
  2531. if (nodeType === "V8IntrinsicIdentifier") {
  2532. if (typeof opts === "undefined") {
  2533. return true;
  2534. } else {
  2535. return (0, _shallowEqual.default)(node, opts);
  2536. }
  2537. }
  2538. return false;
  2539. }
  2540. function isArgumentPlaceholder(node, opts) {
  2541. if (!node)
  2542. return false;
  2543. const nodeType = node.type;
  2544. if (nodeType === "ArgumentPlaceholder") {
  2545. if (typeof opts === "undefined") {
  2546. return true;
  2547. } else {
  2548. return (0, _shallowEqual.default)(node, opts);
  2549. }
  2550. }
  2551. return false;
  2552. }
  2553. function isBindExpression(node, opts) {
  2554. if (!node)
  2555. return false;
  2556. const nodeType = node.type;
  2557. if (nodeType === "BindExpression") {
  2558. if (typeof opts === "undefined") {
  2559. return true;
  2560. } else {
  2561. return (0, _shallowEqual.default)(node, opts);
  2562. }
  2563. }
  2564. return false;
  2565. }
  2566. function isPipelineTopicExpression(node, opts) {
  2567. if (!node)
  2568. return false;
  2569. const nodeType = node.type;
  2570. if (nodeType === "PipelineTopicExpression") {
  2571. if (typeof opts === "undefined") {
  2572. return true;
  2573. } else {
  2574. return (0, _shallowEqual.default)(node, opts);
  2575. }
  2576. }
  2577. return false;
  2578. }
  2579. function isPipelineBareFunction(node, opts) {
  2580. if (!node)
  2581. return false;
  2582. const nodeType = node.type;
  2583. if (nodeType === "PipelineBareFunction") {
  2584. if (typeof opts === "undefined") {
  2585. return true;
  2586. } else {
  2587. return (0, _shallowEqual.default)(node, opts);
  2588. }
  2589. }
  2590. return false;
  2591. }
  2592. function isPipelinePrimaryTopicReference(node, opts) {
  2593. if (!node)
  2594. return false;
  2595. const nodeType = node.type;
  2596. if (nodeType === "PipelinePrimaryTopicReference") {
  2597. if (typeof opts === "undefined") {
  2598. return true;
  2599. } else {
  2600. return (0, _shallowEqual.default)(node, opts);
  2601. }
  2602. }
  2603. return false;
  2604. }
  2605. function isImportAttribute(node, opts) {
  2606. if (!node)
  2607. return false;
  2608. const nodeType = node.type;
  2609. if (nodeType === "ImportAttribute") {
  2610. if (typeof opts === "undefined") {
  2611. return true;
  2612. } else {
  2613. return (0, _shallowEqual.default)(node, opts);
  2614. }
  2615. }
  2616. return false;
  2617. }
  2618. function isDecorator(node, opts) {
  2619. if (!node)
  2620. return false;
  2621. const nodeType = node.type;
  2622. if (nodeType === "Decorator") {
  2623. if (typeof opts === "undefined") {
  2624. return true;
  2625. } else {
  2626. return (0, _shallowEqual.default)(node, opts);
  2627. }
  2628. }
  2629. return false;
  2630. }
  2631. function isDoExpression(node, opts) {
  2632. if (!node)
  2633. return false;
  2634. const nodeType = node.type;
  2635. if (nodeType === "DoExpression") {
  2636. if (typeof opts === "undefined") {
  2637. return true;
  2638. } else {
  2639. return (0, _shallowEqual.default)(node, opts);
  2640. }
  2641. }
  2642. return false;
  2643. }
  2644. function isExportDefaultSpecifier(node, opts) {
  2645. if (!node)
  2646. return false;
  2647. const nodeType = node.type;
  2648. if (nodeType === "ExportDefaultSpecifier") {
  2649. if (typeof opts === "undefined") {
  2650. return true;
  2651. } else {
  2652. return (0, _shallowEqual.default)(node, opts);
  2653. }
  2654. }
  2655. return false;
  2656. }
  2657. function isRecordExpression(node, opts) {
  2658. if (!node)
  2659. return false;
  2660. const nodeType = node.type;
  2661. if (nodeType === "RecordExpression") {
  2662. if (typeof opts === "undefined") {
  2663. return true;
  2664. } else {
  2665. return (0, _shallowEqual.default)(node, opts);
  2666. }
  2667. }
  2668. return false;
  2669. }
  2670. function isTupleExpression(node, opts) {
  2671. if (!node)
  2672. return false;
  2673. const nodeType = node.type;
  2674. if (nodeType === "TupleExpression") {
  2675. if (typeof opts === "undefined") {
  2676. return true;
  2677. } else {
  2678. return (0, _shallowEqual.default)(node, opts);
  2679. }
  2680. }
  2681. return false;
  2682. }
  2683. function isDecimalLiteral(node, opts) {
  2684. if (!node)
  2685. return false;
  2686. const nodeType = node.type;
  2687. if (nodeType === "DecimalLiteral") {
  2688. if (typeof opts === "undefined") {
  2689. return true;
  2690. } else {
  2691. return (0, _shallowEqual.default)(node, opts);
  2692. }
  2693. }
  2694. return false;
  2695. }
  2696. function isStaticBlock(node, opts) {
  2697. if (!node)
  2698. return false;
  2699. const nodeType = node.type;
  2700. if (nodeType === "StaticBlock") {
  2701. if (typeof opts === "undefined") {
  2702. return true;
  2703. } else {
  2704. return (0, _shallowEqual.default)(node, opts);
  2705. }
  2706. }
  2707. return false;
  2708. }
  2709. function isModuleExpression(node, opts) {
  2710. if (!node)
  2711. return false;
  2712. const nodeType = node.type;
  2713. if (nodeType === "ModuleExpression") {
  2714. if (typeof opts === "undefined") {
  2715. return true;
  2716. } else {
  2717. return (0, _shallowEqual.default)(node, opts);
  2718. }
  2719. }
  2720. return false;
  2721. }
  2722. function isTSParameterProperty(node, opts) {
  2723. if (!node)
  2724. return false;
  2725. const nodeType = node.type;
  2726. if (nodeType === "TSParameterProperty") {
  2727. if (typeof opts === "undefined") {
  2728. return true;
  2729. } else {
  2730. return (0, _shallowEqual.default)(node, opts);
  2731. }
  2732. }
  2733. return false;
  2734. }
  2735. function isTSDeclareFunction(node, opts) {
  2736. if (!node)
  2737. return false;
  2738. const nodeType = node.type;
  2739. if (nodeType === "TSDeclareFunction") {
  2740. if (typeof opts === "undefined") {
  2741. return true;
  2742. } else {
  2743. return (0, _shallowEqual.default)(node, opts);
  2744. }
  2745. }
  2746. return false;
  2747. }
  2748. function isTSDeclareMethod(node, opts) {
  2749. if (!node)
  2750. return false;
  2751. const nodeType = node.type;
  2752. if (nodeType === "TSDeclareMethod") {
  2753. if (typeof opts === "undefined") {
  2754. return true;
  2755. } else {
  2756. return (0, _shallowEqual.default)(node, opts);
  2757. }
  2758. }
  2759. return false;
  2760. }
  2761. function isTSQualifiedName(node, opts) {
  2762. if (!node)
  2763. return false;
  2764. const nodeType = node.type;
  2765. if (nodeType === "TSQualifiedName") {
  2766. if (typeof opts === "undefined") {
  2767. return true;
  2768. } else {
  2769. return (0, _shallowEqual.default)(node, opts);
  2770. }
  2771. }
  2772. return false;
  2773. }
  2774. function isTSCallSignatureDeclaration(node, opts) {
  2775. if (!node)
  2776. return false;
  2777. const nodeType = node.type;
  2778. if (nodeType === "TSCallSignatureDeclaration") {
  2779. if (typeof opts === "undefined") {
  2780. return true;
  2781. } else {
  2782. return (0, _shallowEqual.default)(node, opts);
  2783. }
  2784. }
  2785. return false;
  2786. }
  2787. function isTSConstructSignatureDeclaration(node, opts) {
  2788. if (!node)
  2789. return false;
  2790. const nodeType = node.type;
  2791. if (nodeType === "TSConstructSignatureDeclaration") {
  2792. if (typeof opts === "undefined") {
  2793. return true;
  2794. } else {
  2795. return (0, _shallowEqual.default)(node, opts);
  2796. }
  2797. }
  2798. return false;
  2799. }
  2800. function isTSPropertySignature(node, opts) {
  2801. if (!node)
  2802. return false;
  2803. const nodeType = node.type;
  2804. if (nodeType === "TSPropertySignature") {
  2805. if (typeof opts === "undefined") {
  2806. return true;
  2807. } else {
  2808. return (0, _shallowEqual.default)(node, opts);
  2809. }
  2810. }
  2811. return false;
  2812. }
  2813. function isTSMethodSignature(node, opts) {
  2814. if (!node)
  2815. return false;
  2816. const nodeType = node.type;
  2817. if (nodeType === "TSMethodSignature") {
  2818. if (typeof opts === "undefined") {
  2819. return true;
  2820. } else {
  2821. return (0, _shallowEqual.default)(node, opts);
  2822. }
  2823. }
  2824. return false;
  2825. }
  2826. function isTSIndexSignature(node, opts) {
  2827. if (!node)
  2828. return false;
  2829. const nodeType = node.type;
  2830. if (nodeType === "TSIndexSignature") {
  2831. if (typeof opts === "undefined") {
  2832. return true;
  2833. } else {
  2834. return (0, _shallowEqual.default)(node, opts);
  2835. }
  2836. }
  2837. return false;
  2838. }
  2839. function isTSAnyKeyword(node, opts) {
  2840. if (!node)
  2841. return false;
  2842. const nodeType = node.type;
  2843. if (nodeType === "TSAnyKeyword") {
  2844. if (typeof opts === "undefined") {
  2845. return true;
  2846. } else {
  2847. return (0, _shallowEqual.default)(node, opts);
  2848. }
  2849. }
  2850. return false;
  2851. }
  2852. function isTSBooleanKeyword(node, opts) {
  2853. if (!node)
  2854. return false;
  2855. const nodeType = node.type;
  2856. if (nodeType === "TSBooleanKeyword") {
  2857. if (typeof opts === "undefined") {
  2858. return true;
  2859. } else {
  2860. return (0, _shallowEqual.default)(node, opts);
  2861. }
  2862. }
  2863. return false;
  2864. }
  2865. function isTSBigIntKeyword(node, opts) {
  2866. if (!node)
  2867. return false;
  2868. const nodeType = node.type;
  2869. if (nodeType === "TSBigIntKeyword") {
  2870. if (typeof opts === "undefined") {
  2871. return true;
  2872. } else {
  2873. return (0, _shallowEqual.default)(node, opts);
  2874. }
  2875. }
  2876. return false;
  2877. }
  2878. function isTSIntrinsicKeyword(node, opts) {
  2879. if (!node)
  2880. return false;
  2881. const nodeType = node.type;
  2882. if (nodeType === "TSIntrinsicKeyword") {
  2883. if (typeof opts === "undefined") {
  2884. return true;
  2885. } else {
  2886. return (0, _shallowEqual.default)(node, opts);
  2887. }
  2888. }
  2889. return false;
  2890. }
  2891. function isTSNeverKeyword(node, opts) {
  2892. if (!node)
  2893. return false;
  2894. const nodeType = node.type;
  2895. if (nodeType === "TSNeverKeyword") {
  2896. if (typeof opts === "undefined") {
  2897. return true;
  2898. } else {
  2899. return (0, _shallowEqual.default)(node, opts);
  2900. }
  2901. }
  2902. return false;
  2903. }
  2904. function isTSNullKeyword(node, opts) {
  2905. if (!node)
  2906. return false;
  2907. const nodeType = node.type;
  2908. if (nodeType === "TSNullKeyword") {
  2909. if (typeof opts === "undefined") {
  2910. return true;
  2911. } else {
  2912. return (0, _shallowEqual.default)(node, opts);
  2913. }
  2914. }
  2915. return false;
  2916. }
  2917. function isTSNumberKeyword(node, opts) {
  2918. if (!node)
  2919. return false;
  2920. const nodeType = node.type;
  2921. if (nodeType === "TSNumberKeyword") {
  2922. if (typeof opts === "undefined") {
  2923. return true;
  2924. } else {
  2925. return (0, _shallowEqual.default)(node, opts);
  2926. }
  2927. }
  2928. return false;
  2929. }
  2930. function isTSObjectKeyword(node, opts) {
  2931. if (!node)
  2932. return false;
  2933. const nodeType = node.type;
  2934. if (nodeType === "TSObjectKeyword") {
  2935. if (typeof opts === "undefined") {
  2936. return true;
  2937. } else {
  2938. return (0, _shallowEqual.default)(node, opts);
  2939. }
  2940. }
  2941. return false;
  2942. }
  2943. function isTSStringKeyword(node, opts) {
  2944. if (!node)
  2945. return false;
  2946. const nodeType = node.type;
  2947. if (nodeType === "TSStringKeyword") {
  2948. if (typeof opts === "undefined") {
  2949. return true;
  2950. } else {
  2951. return (0, _shallowEqual.default)(node, opts);
  2952. }
  2953. }
  2954. return false;
  2955. }
  2956. function isTSSymbolKeyword(node, opts) {
  2957. if (!node)
  2958. return false;
  2959. const nodeType = node.type;
  2960. if (nodeType === "TSSymbolKeyword") {
  2961. if (typeof opts === "undefined") {
  2962. return true;
  2963. } else {
  2964. return (0, _shallowEqual.default)(node, opts);
  2965. }
  2966. }
  2967. return false;
  2968. }
  2969. function isTSUndefinedKeyword(node, opts) {
  2970. if (!node)
  2971. return false;
  2972. const nodeType = node.type;
  2973. if (nodeType === "TSUndefinedKeyword") {
  2974. if (typeof opts === "undefined") {
  2975. return true;
  2976. } else {
  2977. return (0, _shallowEqual.default)(node, opts);
  2978. }
  2979. }
  2980. return false;
  2981. }
  2982. function isTSUnknownKeyword(node, opts) {
  2983. if (!node)
  2984. return false;
  2985. const nodeType = node.type;
  2986. if (nodeType === "TSUnknownKeyword") {
  2987. if (typeof opts === "undefined") {
  2988. return true;
  2989. } else {
  2990. return (0, _shallowEqual.default)(node, opts);
  2991. }
  2992. }
  2993. return false;
  2994. }
  2995. function isTSVoidKeyword(node, opts) {
  2996. if (!node)
  2997. return false;
  2998. const nodeType = node.type;
  2999. if (nodeType === "TSVoidKeyword") {
  3000. if (typeof opts === "undefined") {
  3001. return true;
  3002. } else {
  3003. return (0, _shallowEqual.default)(node, opts);
  3004. }
  3005. }
  3006. return false;
  3007. }
  3008. function isTSThisType(node, opts) {
  3009. if (!node)
  3010. return false;
  3011. const nodeType = node.type;
  3012. if (nodeType === "TSThisType") {
  3013. if (typeof opts === "undefined") {
  3014. return true;
  3015. } else {
  3016. return (0, _shallowEqual.default)(node, opts);
  3017. }
  3018. }
  3019. return false;
  3020. }
  3021. function isTSFunctionType(node, opts) {
  3022. if (!node)
  3023. return false;
  3024. const nodeType = node.type;
  3025. if (nodeType === "TSFunctionType") {
  3026. if (typeof opts === "undefined") {
  3027. return true;
  3028. } else {
  3029. return (0, _shallowEqual.default)(node, opts);
  3030. }
  3031. }
  3032. return false;
  3033. }
  3034. function isTSConstructorType(node, opts) {
  3035. if (!node)
  3036. return false;
  3037. const nodeType = node.type;
  3038. if (nodeType === "TSConstructorType") {
  3039. if (typeof opts === "undefined") {
  3040. return true;
  3041. } else {
  3042. return (0, _shallowEqual.default)(node, opts);
  3043. }
  3044. }
  3045. return false;
  3046. }
  3047. function isTSTypeReference(node, opts) {
  3048. if (!node)
  3049. return false;
  3050. const nodeType = node.type;
  3051. if (nodeType === "TSTypeReference") {
  3052. if (typeof opts === "undefined") {
  3053. return true;
  3054. } else {
  3055. return (0, _shallowEqual.default)(node, opts);
  3056. }
  3057. }
  3058. return false;
  3059. }
  3060. function isTSTypePredicate(node, opts) {
  3061. if (!node)
  3062. return false;
  3063. const nodeType = node.type;
  3064. if (nodeType === "TSTypePredicate") {
  3065. if (typeof opts === "undefined") {
  3066. return true;
  3067. } else {
  3068. return (0, _shallowEqual.default)(node, opts);
  3069. }
  3070. }
  3071. return false;
  3072. }
  3073. function isTSTypeQuery(node, opts) {
  3074. if (!node)
  3075. return false;
  3076. const nodeType = node.type;
  3077. if (nodeType === "TSTypeQuery") {
  3078. if (typeof opts === "undefined") {
  3079. return true;
  3080. } else {
  3081. return (0, _shallowEqual.default)(node, opts);
  3082. }
  3083. }
  3084. return false;
  3085. }
  3086. function isTSTypeLiteral(node, opts) {
  3087. if (!node)
  3088. return false;
  3089. const nodeType = node.type;
  3090. if (nodeType === "TSTypeLiteral") {
  3091. if (typeof opts === "undefined") {
  3092. return true;
  3093. } else {
  3094. return (0, _shallowEqual.default)(node, opts);
  3095. }
  3096. }
  3097. return false;
  3098. }
  3099. function isTSArrayType(node, opts) {
  3100. if (!node)
  3101. return false;
  3102. const nodeType = node.type;
  3103. if (nodeType === "TSArrayType") {
  3104. if (typeof opts === "undefined") {
  3105. return true;
  3106. } else {
  3107. return (0, _shallowEqual.default)(node, opts);
  3108. }
  3109. }
  3110. return false;
  3111. }
  3112. function isTSTupleType(node, opts) {
  3113. if (!node)
  3114. return false;
  3115. const nodeType = node.type;
  3116. if (nodeType === "TSTupleType") {
  3117. if (typeof opts === "undefined") {
  3118. return true;
  3119. } else {
  3120. return (0, _shallowEqual.default)(node, opts);
  3121. }
  3122. }
  3123. return false;
  3124. }
  3125. function isTSOptionalType(node, opts) {
  3126. if (!node)
  3127. return false;
  3128. const nodeType = node.type;
  3129. if (nodeType === "TSOptionalType") {
  3130. if (typeof opts === "undefined") {
  3131. return true;
  3132. } else {
  3133. return (0, _shallowEqual.default)(node, opts);
  3134. }
  3135. }
  3136. return false;
  3137. }
  3138. function isTSRestType(node, opts) {
  3139. if (!node)
  3140. return false;
  3141. const nodeType = node.type;
  3142. if (nodeType === "TSRestType") {
  3143. if (typeof opts === "undefined") {
  3144. return true;
  3145. } else {
  3146. return (0, _shallowEqual.default)(node, opts);
  3147. }
  3148. }
  3149. return false;
  3150. }
  3151. function isTSNamedTupleMember(node, opts) {
  3152. if (!node)
  3153. return false;
  3154. const nodeType = node.type;
  3155. if (nodeType === "TSNamedTupleMember") {
  3156. if (typeof opts === "undefined") {
  3157. return true;
  3158. } else {
  3159. return (0, _shallowEqual.default)(node, opts);
  3160. }
  3161. }
  3162. return false;
  3163. }
  3164. function isTSUnionType(node, opts) {
  3165. if (!node)
  3166. return false;
  3167. const nodeType = node.type;
  3168. if (nodeType === "TSUnionType") {
  3169. if (typeof opts === "undefined") {
  3170. return true;
  3171. } else {
  3172. return (0, _shallowEqual.default)(node, opts);
  3173. }
  3174. }
  3175. return false;
  3176. }
  3177. function isTSIntersectionType(node, opts) {
  3178. if (!node)
  3179. return false;
  3180. const nodeType = node.type;
  3181. if (nodeType === "TSIntersectionType") {
  3182. if (typeof opts === "undefined") {
  3183. return true;
  3184. } else {
  3185. return (0, _shallowEqual.default)(node, opts);
  3186. }
  3187. }
  3188. return false;
  3189. }
  3190. function isTSConditionalType(node, opts) {
  3191. if (!node)
  3192. return false;
  3193. const nodeType = node.type;
  3194. if (nodeType === "TSConditionalType") {
  3195. if (typeof opts === "undefined") {
  3196. return true;
  3197. } else {
  3198. return (0, _shallowEqual.default)(node, opts);
  3199. }
  3200. }
  3201. return false;
  3202. }
  3203. function isTSInferType(node, opts) {
  3204. if (!node)
  3205. return false;
  3206. const nodeType = node.type;
  3207. if (nodeType === "TSInferType") {
  3208. if (typeof opts === "undefined") {
  3209. return true;
  3210. } else {
  3211. return (0, _shallowEqual.default)(node, opts);
  3212. }
  3213. }
  3214. return false;
  3215. }
  3216. function isTSParenthesizedType(node, opts) {
  3217. if (!node)
  3218. return false;
  3219. const nodeType = node.type;
  3220. if (nodeType === "TSParenthesizedType") {
  3221. if (typeof opts === "undefined") {
  3222. return true;
  3223. } else {
  3224. return (0, _shallowEqual.default)(node, opts);
  3225. }
  3226. }
  3227. return false;
  3228. }
  3229. function isTSTypeOperator(node, opts) {
  3230. if (!node)
  3231. return false;
  3232. const nodeType = node.type;
  3233. if (nodeType === "TSTypeOperator") {
  3234. if (typeof opts === "undefined") {
  3235. return true;
  3236. } else {
  3237. return (0, _shallowEqual.default)(node, opts);
  3238. }
  3239. }
  3240. return false;
  3241. }
  3242. function isTSIndexedAccessType(node, opts) {
  3243. if (!node)
  3244. return false;
  3245. const nodeType = node.type;
  3246. if (nodeType === "TSIndexedAccessType") {
  3247. if (typeof opts === "undefined") {
  3248. return true;
  3249. } else {
  3250. return (0, _shallowEqual.default)(node, opts);
  3251. }
  3252. }
  3253. return false;
  3254. }
  3255. function isTSMappedType(node, opts) {
  3256. if (!node)
  3257. return false;
  3258. const nodeType = node.type;
  3259. if (nodeType === "TSMappedType") {
  3260. if (typeof opts === "undefined") {
  3261. return true;
  3262. } else {
  3263. return (0, _shallowEqual.default)(node, opts);
  3264. }
  3265. }
  3266. return false;
  3267. }
  3268. function isTSLiteralType(node, opts) {
  3269. if (!node)
  3270. return false;
  3271. const nodeType = node.type;
  3272. if (nodeType === "TSLiteralType") {
  3273. if (typeof opts === "undefined") {
  3274. return true;
  3275. } else {
  3276. return (0, _shallowEqual.default)(node, opts);
  3277. }
  3278. }
  3279. return false;
  3280. }
  3281. function isTSExpressionWithTypeArguments(node, opts) {
  3282. if (!node)
  3283. return false;
  3284. const nodeType = node.type;
  3285. if (nodeType === "TSExpressionWithTypeArguments") {
  3286. if (typeof opts === "undefined") {
  3287. return true;
  3288. } else {
  3289. return (0, _shallowEqual.default)(node, opts);
  3290. }
  3291. }
  3292. return false;
  3293. }
  3294. function isTSInterfaceDeclaration(node, opts) {
  3295. if (!node)
  3296. return false;
  3297. const nodeType = node.type;
  3298. if (nodeType === "TSInterfaceDeclaration") {
  3299. if (typeof opts === "undefined") {
  3300. return true;
  3301. } else {
  3302. return (0, _shallowEqual.default)(node, opts);
  3303. }
  3304. }
  3305. return false;
  3306. }
  3307. function isTSInterfaceBody(node, opts) {
  3308. if (!node)
  3309. return false;
  3310. const nodeType = node.type;
  3311. if (nodeType === "TSInterfaceBody") {
  3312. if (typeof opts === "undefined") {
  3313. return true;
  3314. } else {
  3315. return (0, _shallowEqual.default)(node, opts);
  3316. }
  3317. }
  3318. return false;
  3319. }
  3320. function isTSTypeAliasDeclaration(node, opts) {
  3321. if (!node)
  3322. return false;
  3323. const nodeType = node.type;
  3324. if (nodeType === "TSTypeAliasDeclaration") {
  3325. if (typeof opts === "undefined") {
  3326. return true;
  3327. } else {
  3328. return (0, _shallowEqual.default)(node, opts);
  3329. }
  3330. }
  3331. return false;
  3332. }
  3333. function isTSAsExpression(node, opts) {
  3334. if (!node)
  3335. return false;
  3336. const nodeType = node.type;
  3337. if (nodeType === "TSAsExpression") {
  3338. if (typeof opts === "undefined") {
  3339. return true;
  3340. } else {
  3341. return (0, _shallowEqual.default)(node, opts);
  3342. }
  3343. }
  3344. return false;
  3345. }
  3346. function isTSTypeAssertion(node, opts) {
  3347. if (!node)
  3348. return false;
  3349. const nodeType = node.type;
  3350. if (nodeType === "TSTypeAssertion") {
  3351. if (typeof opts === "undefined") {
  3352. return true;
  3353. } else {
  3354. return (0, _shallowEqual.default)(node, opts);
  3355. }
  3356. }
  3357. return false;
  3358. }
  3359. function isTSEnumDeclaration(node, opts) {
  3360. if (!node)
  3361. return false;
  3362. const nodeType = node.type;
  3363. if (nodeType === "TSEnumDeclaration") {
  3364. if (typeof opts === "undefined") {
  3365. return true;
  3366. } else {
  3367. return (0, _shallowEqual.default)(node, opts);
  3368. }
  3369. }
  3370. return false;
  3371. }
  3372. function isTSEnumMember(node, opts) {
  3373. if (!node)
  3374. return false;
  3375. const nodeType = node.type;
  3376. if (nodeType === "TSEnumMember") {
  3377. if (typeof opts === "undefined") {
  3378. return true;
  3379. } else {
  3380. return (0, _shallowEqual.default)(node, opts);
  3381. }
  3382. }
  3383. return false;
  3384. }
  3385. function isTSModuleDeclaration(node, opts) {
  3386. if (!node)
  3387. return false;
  3388. const nodeType = node.type;
  3389. if (nodeType === "TSModuleDeclaration") {
  3390. if (typeof opts === "undefined") {
  3391. return true;
  3392. } else {
  3393. return (0, _shallowEqual.default)(node, opts);
  3394. }
  3395. }
  3396. return false;
  3397. }
  3398. function isTSModuleBlock(node, opts) {
  3399. if (!node)
  3400. return false;
  3401. const nodeType = node.type;
  3402. if (nodeType === "TSModuleBlock") {
  3403. if (typeof opts === "undefined") {
  3404. return true;
  3405. } else {
  3406. return (0, _shallowEqual.default)(node, opts);
  3407. }
  3408. }
  3409. return false;
  3410. }
  3411. function isTSImportType(node, opts) {
  3412. if (!node)
  3413. return false;
  3414. const nodeType = node.type;
  3415. if (nodeType === "TSImportType") {
  3416. if (typeof opts === "undefined") {
  3417. return true;
  3418. } else {
  3419. return (0, _shallowEqual.default)(node, opts);
  3420. }
  3421. }
  3422. return false;
  3423. }
  3424. function isTSImportEqualsDeclaration(node, opts) {
  3425. if (!node)
  3426. return false;
  3427. const nodeType = node.type;
  3428. if (nodeType === "TSImportEqualsDeclaration") {
  3429. if (typeof opts === "undefined") {
  3430. return true;
  3431. } else {
  3432. return (0, _shallowEqual.default)(node, opts);
  3433. }
  3434. }
  3435. return false;
  3436. }
  3437. function isTSExternalModuleReference(node, opts) {
  3438. if (!node)
  3439. return false;
  3440. const nodeType = node.type;
  3441. if (nodeType === "TSExternalModuleReference") {
  3442. if (typeof opts === "undefined") {
  3443. return true;
  3444. } else {
  3445. return (0, _shallowEqual.default)(node, opts);
  3446. }
  3447. }
  3448. return false;
  3449. }
  3450. function isTSNonNullExpression(node, opts) {
  3451. if (!node)
  3452. return false;
  3453. const nodeType = node.type;
  3454. if (nodeType === "TSNonNullExpression") {
  3455. if (typeof opts === "undefined") {
  3456. return true;
  3457. } else {
  3458. return (0, _shallowEqual.default)(node, opts);
  3459. }
  3460. }
  3461. return false;
  3462. }
  3463. function isTSExportAssignment(node, opts) {
  3464. if (!node)
  3465. return false;
  3466. const nodeType = node.type;
  3467. if (nodeType === "TSExportAssignment") {
  3468. if (typeof opts === "undefined") {
  3469. return true;
  3470. } else {
  3471. return (0, _shallowEqual.default)(node, opts);
  3472. }
  3473. }
  3474. return false;
  3475. }
  3476. function isTSNamespaceExportDeclaration(node, opts) {
  3477. if (!node)
  3478. return false;
  3479. const nodeType = node.type;
  3480. if (nodeType === "TSNamespaceExportDeclaration") {
  3481. if (typeof opts === "undefined") {
  3482. return true;
  3483. } else {
  3484. return (0, _shallowEqual.default)(node, opts);
  3485. }
  3486. }
  3487. return false;
  3488. }
  3489. function isTSTypeAnnotation(node, opts) {
  3490. if (!node)
  3491. return false;
  3492. const nodeType = node.type;
  3493. if (nodeType === "TSTypeAnnotation") {
  3494. if (typeof opts === "undefined") {
  3495. return true;
  3496. } else {
  3497. return (0, _shallowEqual.default)(node, opts);
  3498. }
  3499. }
  3500. return false;
  3501. }
  3502. function isTSTypeParameterInstantiation(node, opts) {
  3503. if (!node)
  3504. return false;
  3505. const nodeType = node.type;
  3506. if (nodeType === "TSTypeParameterInstantiation") {
  3507. if (typeof opts === "undefined") {
  3508. return true;
  3509. } else {
  3510. return (0, _shallowEqual.default)(node, opts);
  3511. }
  3512. }
  3513. return false;
  3514. }
  3515. function isTSTypeParameterDeclaration(node, opts) {
  3516. if (!node)
  3517. return false;
  3518. const nodeType = node.type;
  3519. if (nodeType === "TSTypeParameterDeclaration") {
  3520. if (typeof opts === "undefined") {
  3521. return true;
  3522. } else {
  3523. return (0, _shallowEqual.default)(node, opts);
  3524. }
  3525. }
  3526. return false;
  3527. }
  3528. function isTSTypeParameter(node, opts) {
  3529. if (!node)
  3530. return false;
  3531. const nodeType = node.type;
  3532. if (nodeType === "TSTypeParameter") {
  3533. if (typeof opts === "undefined") {
  3534. return true;
  3535. } else {
  3536. return (0, _shallowEqual.default)(node, opts);
  3537. }
  3538. }
  3539. return false;
  3540. }
  3541. function isExpression(node, opts) {
  3542. if (!node)
  3543. return false;
  3544. const nodeType = node.type;
  3545. if ("ArrayExpression" === nodeType || "AssignmentExpression" === nodeType || "BinaryExpression" === nodeType || "CallExpression" === nodeType || "ConditionalExpression" === nodeType || "FunctionExpression" === nodeType || "Identifier" === nodeType || "StringLiteral" === nodeType || "NumericLiteral" === nodeType || "NullLiteral" === nodeType || "BooleanLiteral" === nodeType || "RegExpLiteral" === nodeType || "LogicalExpression" === nodeType || "MemberExpression" === nodeType || "NewExpression" === nodeType || "ObjectExpression" === nodeType || "SequenceExpression" === nodeType || "ParenthesizedExpression" === nodeType || "ThisExpression" === nodeType || "UnaryExpression" === nodeType || "UpdateExpression" === nodeType || "ArrowFunctionExpression" === nodeType || "ClassExpression" === nodeType || "MetaProperty" === nodeType || "Super" === nodeType || "TaggedTemplateExpression" === nodeType || "TemplateLiteral" === nodeType || "YieldExpression" === nodeType || "AwaitExpression" === nodeType || "Import" === nodeType || "BigIntLiteral" === nodeType || "OptionalMemberExpression" === nodeType || "OptionalCallExpression" === nodeType || "TypeCastExpression" === nodeType || "JSXElement" === nodeType || "JSXFragment" === nodeType || "BindExpression" === nodeType || "PipelinePrimaryTopicReference" === nodeType || "DoExpression" === nodeType || "RecordExpression" === nodeType || "TupleExpression" === nodeType || "DecimalLiteral" === nodeType || "ModuleExpression" === nodeType || "TSAsExpression" === nodeType || "TSTypeAssertion" === nodeType || "TSNonNullExpression" === nodeType || nodeType === "Placeholder" && ("Expression" === node.expectedNode || "Identifier" === node.expectedNode || "StringLiteral" === node.expectedNode)) {
  3546. if (typeof opts === "undefined") {
  3547. return true;
  3548. } else {
  3549. return (0, _shallowEqual.default)(node, opts);
  3550. }
  3551. }
  3552. return false;
  3553. }
  3554. function isBinary(node, opts) {
  3555. if (!node)
  3556. return false;
  3557. const nodeType = node.type;
  3558. if ("BinaryExpression" === nodeType || "LogicalExpression" === nodeType) {
  3559. if (typeof opts === "undefined") {
  3560. return true;
  3561. } else {
  3562. return (0, _shallowEqual.default)(node, opts);
  3563. }
  3564. }
  3565. return false;
  3566. }
  3567. function isScopable(node, opts) {
  3568. if (!node)
  3569. return false;
  3570. const nodeType = node.type;
  3571. if ("BlockStatement" === nodeType || "CatchClause" === nodeType || "DoWhileStatement" === nodeType || "ForInStatement" === nodeType || "ForStatement" === nodeType || "FunctionDeclaration" === nodeType || "FunctionExpression" === nodeType || "Program" === nodeType || "ObjectMethod" === nodeType || "SwitchStatement" === nodeType || "WhileStatement" === nodeType || "ArrowFunctionExpression" === nodeType || "ClassExpression" === nodeType || "ClassDeclaration" === nodeType || "ForOfStatement" === nodeType || "ClassMethod" === nodeType || "ClassPrivateMethod" === nodeType || "StaticBlock" === nodeType || "TSModuleBlock" === nodeType || nodeType === "Placeholder" && "BlockStatement" === node.expectedNode) {
  3572. if (typeof opts === "undefined") {
  3573. return true;
  3574. } else {
  3575. return (0, _shallowEqual.default)(node, opts);
  3576. }
  3577. }
  3578. return false;
  3579. }
  3580. function isBlockParent(node, opts) {
  3581. if (!node)
  3582. return false;
  3583. const nodeType = node.type;
  3584. if ("BlockStatement" === nodeType || "CatchClause" === nodeType || "DoWhileStatement" === nodeType || "ForInStatement" === nodeType || "ForStatement" === nodeType || "FunctionDeclaration" === nodeType || "FunctionExpression" === nodeType || "Program" === nodeType || "ObjectMethod" === nodeType || "SwitchStatement" === nodeType || "WhileStatement" === nodeType || "ArrowFunctionExpression" === nodeType || "ForOfStatement" === nodeType || "ClassMethod" === nodeType || "ClassPrivateMethod" === nodeType || "StaticBlock" === nodeType || "TSModuleBlock" === nodeType || nodeType === "Placeholder" && "BlockStatement" === node.expectedNode) {
  3585. if (typeof opts === "undefined") {
  3586. return true;
  3587. } else {
  3588. return (0, _shallowEqual.default)(node, opts);
  3589. }
  3590. }
  3591. return false;
  3592. }
  3593. function isBlock(node, opts) {
  3594. if (!node)
  3595. return false;
  3596. const nodeType = node.type;
  3597. if ("BlockStatement" === nodeType || "Program" === nodeType || "TSModuleBlock" === nodeType || nodeType === "Placeholder" && "BlockStatement" === node.expectedNode) {
  3598. if (typeof opts === "undefined") {
  3599. return true;
  3600. } else {
  3601. return (0, _shallowEqual.default)(node, opts);
  3602. }
  3603. }
  3604. return false;
  3605. }
  3606. function isStatement(node, opts) {
  3607. if (!node)
  3608. return false;
  3609. const nodeType = node.type;
  3610. if ("BlockStatement" === nodeType || "BreakStatement" === nodeType || "ContinueStatement" === nodeType || "DebuggerStatement" === nodeType || "DoWhileStatement" === nodeType || "EmptyStatement" === nodeType || "ExpressionStatement" === nodeType || "ForInStatement" === nodeType || "ForStatement" === nodeType || "FunctionDeclaration" === nodeType || "IfStatement" === nodeType || "LabeledStatement" === nodeType || "ReturnStatement" === nodeType || "SwitchStatement" === nodeType || "ThrowStatement" === nodeType || "TryStatement" === nodeType || "VariableDeclaration" === nodeType || "WhileStatement" === nodeType || "WithStatement" === nodeType || "ClassDeclaration" === nodeType || "ExportAllDeclaration" === nodeType || "ExportDefaultDeclaration" === nodeType || "ExportNamedDeclaration" === nodeType || "ForOfStatement" === nodeType || "ImportDeclaration" === nodeType || "DeclareClass" === nodeType || "DeclareFunction" === nodeType || "DeclareInterface" === nodeType || "DeclareModule" === nodeType || "DeclareModuleExports" === nodeType || "DeclareTypeAlias" === nodeType || "DeclareOpaqueType" === nodeType || "DeclareVariable" === nodeType || "DeclareExportDeclaration" === nodeType || "DeclareExportAllDeclaration" === nodeType || "InterfaceDeclaration" === nodeType || "OpaqueType" === nodeType || "TypeAlias" === nodeType || "EnumDeclaration" === nodeType || "TSDeclareFunction" === nodeType || "TSInterfaceDeclaration" === nodeType || "TSTypeAliasDeclaration" === nodeType || "TSEnumDeclaration" === nodeType || "TSModuleDeclaration" === nodeType || "TSImportEqualsDeclaration" === nodeType || "TSExportAssignment" === nodeType || "TSNamespaceExportDeclaration" === nodeType || nodeType === "Placeholder" && ("Statement" === node.expectedNode || "Declaration" === node.expectedNode || "BlockStatement" === node.expectedNode)) {
  3611. if (typeof opts === "undefined") {
  3612. return true;
  3613. } else {
  3614. return (0, _shallowEqual.default)(node, opts);
  3615. }
  3616. }
  3617. return false;
  3618. }
  3619. function isTerminatorless(node, opts) {
  3620. if (!node)
  3621. return false;
  3622. const nodeType = node.type;
  3623. if ("BreakStatement" === nodeType || "ContinueStatement" === nodeType || "ReturnStatement" === nodeType || "ThrowStatement" === nodeType || "YieldExpression" === nodeType || "AwaitExpression" === nodeType) {
  3624. if (typeof opts === "undefined") {
  3625. return true;
  3626. } else {
  3627. return (0, _shallowEqual.default)(node, opts);
  3628. }
  3629. }
  3630. return false;
  3631. }
  3632. function isCompletionStatement(node, opts) {
  3633. if (!node)
  3634. return false;
  3635. const nodeType = node.type;
  3636. if ("BreakStatement" === nodeType || "ContinueStatement" === nodeType || "ReturnStatement" === nodeType || "ThrowStatement" === nodeType) {
  3637. if (typeof opts === "undefined") {
  3638. return true;
  3639. } else {
  3640. return (0, _shallowEqual.default)(node, opts);
  3641. }
  3642. }
  3643. return false;
  3644. }
  3645. function isConditional(node, opts) {
  3646. if (!node)
  3647. return false;
  3648. const nodeType = node.type;
  3649. if ("ConditionalExpression" === nodeType || "IfStatement" === nodeType) {
  3650. if (typeof opts === "undefined") {
  3651. return true;
  3652. } else {
  3653. return (0, _shallowEqual.default)(node, opts);
  3654. }
  3655. }
  3656. return false;
  3657. }
  3658. function isLoop(node, opts) {
  3659. if (!node)
  3660. return false;
  3661. const nodeType = node.type;
  3662. if ("DoWhileStatement" === nodeType || "ForInStatement" === nodeType || "ForStatement" === nodeType || "WhileStatement" === nodeType || "ForOfStatement" === nodeType) {
  3663. if (typeof opts === "undefined") {
  3664. return true;
  3665. } else {
  3666. return (0, _shallowEqual.default)(node, opts);
  3667. }
  3668. }
  3669. return false;
  3670. }
  3671. function isWhile(node, opts) {
  3672. if (!node)
  3673. return false;
  3674. const nodeType = node.type;
  3675. if ("DoWhileStatement" === nodeType || "WhileStatement" === nodeType) {
  3676. if (typeof opts === "undefined") {
  3677. return true;
  3678. } else {
  3679. return (0, _shallowEqual.default)(node, opts);
  3680. }
  3681. }
  3682. return false;
  3683. }
  3684. function isExpressionWrapper(node, opts) {
  3685. if (!node)
  3686. return false;
  3687. const nodeType = node.type;
  3688. if ("ExpressionStatement" === nodeType || "ParenthesizedExpression" === nodeType || "TypeCastExpression" === nodeType) {
  3689. if (typeof opts === "undefined") {
  3690. return true;
  3691. } else {
  3692. return (0, _shallowEqual.default)(node, opts);
  3693. }
  3694. }
  3695. return false;
  3696. }
  3697. function isFor(node, opts) {
  3698. if (!node)
  3699. return false;
  3700. const nodeType = node.type;
  3701. if ("ForInStatement" === nodeType || "ForStatement" === nodeType || "ForOfStatement" === nodeType) {
  3702. if (typeof opts === "undefined") {
  3703. return true;
  3704. } else {
  3705. return (0, _shallowEqual.default)(node, opts);
  3706. }
  3707. }
  3708. return false;
  3709. }
  3710. function isForXStatement(node, opts) {
  3711. if (!node)
  3712. return false;
  3713. const nodeType = node.type;
  3714. if ("ForInStatement" === nodeType || "ForOfStatement" === nodeType) {
  3715. if (typeof opts === "undefined") {
  3716. return true;
  3717. } else {
  3718. return (0, _shallowEqual.default)(node, opts);
  3719. }
  3720. }
  3721. return false;
  3722. }
  3723. function isFunction(node, opts) {
  3724. if (!node)
  3725. return false;
  3726. const nodeType = node.type;
  3727. if ("FunctionDeclaration" === nodeType || "FunctionExpression" === nodeType || "ObjectMethod" === nodeType || "ArrowFunctionExpression" === nodeType || "ClassMethod" === nodeType || "ClassPrivateMethod" === nodeType) {
  3728. if (typeof opts === "undefined") {
  3729. return true;
  3730. } else {
  3731. return (0, _shallowEqual.default)(node, opts);
  3732. }
  3733. }
  3734. return false;
  3735. }
  3736. function isFunctionParent(node, opts) {
  3737. if (!node)
  3738. return false;
  3739. const nodeType = node.type;
  3740. if ("FunctionDeclaration" === nodeType || "FunctionExpression" === nodeType || "ObjectMethod" === nodeType || "ArrowFunctionExpression" === nodeType || "ClassMethod" === nodeType || "ClassPrivateMethod" === nodeType) {
  3741. if (typeof opts === "undefined") {
  3742. return true;
  3743. } else {
  3744. return (0, _shallowEqual.default)(node, opts);
  3745. }
  3746. }
  3747. return false;
  3748. }
  3749. function isPureish(node, opts) {
  3750. if (!node)
  3751. return false;
  3752. const nodeType = node.type;
  3753. if ("FunctionDeclaration" === nodeType || "FunctionExpression" === nodeType || "StringLiteral" === nodeType || "NumericLiteral" === nodeType || "NullLiteral" === nodeType || "BooleanLiteral" === nodeType || "RegExpLiteral" === nodeType || "ArrowFunctionExpression" === nodeType || "BigIntLiteral" === nodeType || "DecimalLiteral" === nodeType || nodeType === "Placeholder" && "StringLiteral" === node.expectedNode) {
  3754. if (typeof opts === "undefined") {
  3755. return true;
  3756. } else {
  3757. return (0, _shallowEqual.default)(node, opts);
  3758. }
  3759. }
  3760. return false;
  3761. }
  3762. function isDeclaration2(node, opts) {
  3763. if (!node)
  3764. return false;
  3765. const nodeType = node.type;
  3766. if ("FunctionDeclaration" === nodeType || "VariableDeclaration" === nodeType || "ClassDeclaration" === nodeType || "ExportAllDeclaration" === nodeType || "ExportDefaultDeclaration" === nodeType || "ExportNamedDeclaration" === nodeType || "ImportDeclaration" === nodeType || "DeclareClass" === nodeType || "DeclareFunction" === nodeType || "DeclareInterface" === nodeType || "DeclareModule" === nodeType || "DeclareModuleExports" === nodeType || "DeclareTypeAlias" === nodeType || "DeclareOpaqueType" === nodeType || "DeclareVariable" === nodeType || "DeclareExportDeclaration" === nodeType || "DeclareExportAllDeclaration" === nodeType || "InterfaceDeclaration" === nodeType || "OpaqueType" === nodeType || "TypeAlias" === nodeType || "EnumDeclaration" === nodeType || "TSDeclareFunction" === nodeType || "TSInterfaceDeclaration" === nodeType || "TSTypeAliasDeclaration" === nodeType || "TSEnumDeclaration" === nodeType || "TSModuleDeclaration" === nodeType || nodeType === "Placeholder" && "Declaration" === node.expectedNode) {
  3767. if (typeof opts === "undefined") {
  3768. return true;
  3769. } else {
  3770. return (0, _shallowEqual.default)(node, opts);
  3771. }
  3772. }
  3773. return false;
  3774. }
  3775. function isPatternLike(node, opts) {
  3776. if (!node)
  3777. return false;
  3778. const nodeType = node.type;
  3779. if ("Identifier" === nodeType || "RestElement" === nodeType || "AssignmentPattern" === nodeType || "ArrayPattern" === nodeType || "ObjectPattern" === nodeType || nodeType === "Placeholder" && ("Pattern" === node.expectedNode || "Identifier" === node.expectedNode)) {
  3780. if (typeof opts === "undefined") {
  3781. return true;
  3782. } else {
  3783. return (0, _shallowEqual.default)(node, opts);
  3784. }
  3785. }
  3786. return false;
  3787. }
  3788. function isLVal(node, opts) {
  3789. if (!node)
  3790. return false;
  3791. const nodeType = node.type;
  3792. if ("Identifier" === nodeType || "MemberExpression" === nodeType || "RestElement" === nodeType || "AssignmentPattern" === nodeType || "ArrayPattern" === nodeType || "ObjectPattern" === nodeType || "TSParameterProperty" === nodeType || nodeType === "Placeholder" && ("Pattern" === node.expectedNode || "Identifier" === node.expectedNode)) {
  3793. if (typeof opts === "undefined") {
  3794. return true;
  3795. } else {
  3796. return (0, _shallowEqual.default)(node, opts);
  3797. }
  3798. }
  3799. return false;
  3800. }
  3801. function isTSEntityName(node, opts) {
  3802. if (!node)
  3803. return false;
  3804. const nodeType = node.type;
  3805. if ("Identifier" === nodeType || "TSQualifiedName" === nodeType || nodeType === "Placeholder" && "Identifier" === node.expectedNode) {
  3806. if (typeof opts === "undefined") {
  3807. return true;
  3808. } else {
  3809. return (0, _shallowEqual.default)(node, opts);
  3810. }
  3811. }
  3812. return false;
  3813. }
  3814. function isLiteral(node, opts) {
  3815. if (!node)
  3816. return false;
  3817. const nodeType = node.type;
  3818. if ("StringLiteral" === nodeType || "NumericLiteral" === nodeType || "NullLiteral" === nodeType || "BooleanLiteral" === nodeType || "RegExpLiteral" === nodeType || "TemplateLiteral" === nodeType || "BigIntLiteral" === nodeType || "DecimalLiteral" === nodeType || nodeType === "Placeholder" && "StringLiteral" === node.expectedNode) {
  3819. if (typeof opts === "undefined") {
  3820. return true;
  3821. } else {
  3822. return (0, _shallowEqual.default)(node, opts);
  3823. }
  3824. }
  3825. return false;
  3826. }
  3827. function isImmutable(node, opts) {
  3828. if (!node)
  3829. return false;
  3830. const nodeType = node.type;
  3831. if ("StringLiteral" === nodeType || "NumericLiteral" === nodeType || "NullLiteral" === nodeType || "BooleanLiteral" === nodeType || "BigIntLiteral" === nodeType || "JSXAttribute" === nodeType || "JSXClosingElement" === nodeType || "JSXElement" === nodeType || "JSXExpressionContainer" === nodeType || "JSXSpreadChild" === nodeType || "JSXOpeningElement" === nodeType || "JSXText" === nodeType || "JSXFragment" === nodeType || "JSXOpeningFragment" === nodeType || "JSXClosingFragment" === nodeType || "DecimalLiteral" === nodeType || nodeType === "Placeholder" && "StringLiteral" === node.expectedNode) {
  3832. if (typeof opts === "undefined") {
  3833. return true;
  3834. } else {
  3835. return (0, _shallowEqual.default)(node, opts);
  3836. }
  3837. }
  3838. return false;
  3839. }
  3840. function isUserWhitespacable(node, opts) {
  3841. if (!node)
  3842. return false;
  3843. const nodeType = node.type;
  3844. if ("ObjectMethod" === nodeType || "ObjectProperty" === nodeType || "ObjectTypeInternalSlot" === nodeType || "ObjectTypeCallProperty" === nodeType || "ObjectTypeIndexer" === nodeType || "ObjectTypeProperty" === nodeType || "ObjectTypeSpreadProperty" === nodeType) {
  3845. if (typeof opts === "undefined") {
  3846. return true;
  3847. } else {
  3848. return (0, _shallowEqual.default)(node, opts);
  3849. }
  3850. }
  3851. return false;
  3852. }
  3853. function isMethod(node, opts) {
  3854. if (!node)
  3855. return false;
  3856. const nodeType = node.type;
  3857. if ("ObjectMethod" === nodeType || "ClassMethod" === nodeType || "ClassPrivateMethod" === nodeType) {
  3858. if (typeof opts === "undefined") {
  3859. return true;
  3860. } else {
  3861. return (0, _shallowEqual.default)(node, opts);
  3862. }
  3863. }
  3864. return false;
  3865. }
  3866. function isObjectMember(node, opts) {
  3867. if (!node)
  3868. return false;
  3869. const nodeType = node.type;
  3870. if ("ObjectMethod" === nodeType || "ObjectProperty" === nodeType) {
  3871. if (typeof opts === "undefined") {
  3872. return true;
  3873. } else {
  3874. return (0, _shallowEqual.default)(node, opts);
  3875. }
  3876. }
  3877. return false;
  3878. }
  3879. function isProperty(node, opts) {
  3880. if (!node)
  3881. return false;
  3882. const nodeType = node.type;
  3883. if ("ObjectProperty" === nodeType || "ClassProperty" === nodeType || "ClassPrivateProperty" === nodeType) {
  3884. if (typeof opts === "undefined") {
  3885. return true;
  3886. } else {
  3887. return (0, _shallowEqual.default)(node, opts);
  3888. }
  3889. }
  3890. return false;
  3891. }
  3892. function isUnaryLike(node, opts) {
  3893. if (!node)
  3894. return false;
  3895. const nodeType = node.type;
  3896. if ("UnaryExpression" === nodeType || "SpreadElement" === nodeType) {
  3897. if (typeof opts === "undefined") {
  3898. return true;
  3899. } else {
  3900. return (0, _shallowEqual.default)(node, opts);
  3901. }
  3902. }
  3903. return false;
  3904. }
  3905. function isPattern(node, opts) {
  3906. if (!node)
  3907. return false;
  3908. const nodeType = node.type;
  3909. if ("AssignmentPattern" === nodeType || "ArrayPattern" === nodeType || "ObjectPattern" === nodeType || nodeType === "Placeholder" && "Pattern" === node.expectedNode) {
  3910. if (typeof opts === "undefined") {
  3911. return true;
  3912. } else {
  3913. return (0, _shallowEqual.default)(node, opts);
  3914. }
  3915. }
  3916. return false;
  3917. }
  3918. function isClass(node, opts) {
  3919. if (!node)
  3920. return false;
  3921. const nodeType = node.type;
  3922. if ("ClassExpression" === nodeType || "ClassDeclaration" === nodeType) {
  3923. if (typeof opts === "undefined") {
  3924. return true;
  3925. } else {
  3926. return (0, _shallowEqual.default)(node, opts);
  3927. }
  3928. }
  3929. return false;
  3930. }
  3931. function isModuleDeclaration(node, opts) {
  3932. if (!node)
  3933. return false;
  3934. const nodeType = node.type;
  3935. if ("ExportAllDeclaration" === nodeType || "ExportDefaultDeclaration" === nodeType || "ExportNamedDeclaration" === nodeType || "ImportDeclaration" === nodeType) {
  3936. if (typeof opts === "undefined") {
  3937. return true;
  3938. } else {
  3939. return (0, _shallowEqual.default)(node, opts);
  3940. }
  3941. }
  3942. return false;
  3943. }
  3944. function isExportDeclaration(node, opts) {
  3945. if (!node)
  3946. return false;
  3947. const nodeType = node.type;
  3948. if ("ExportAllDeclaration" === nodeType || "ExportDefaultDeclaration" === nodeType || "ExportNamedDeclaration" === nodeType) {
  3949. if (typeof opts === "undefined") {
  3950. return true;
  3951. } else {
  3952. return (0, _shallowEqual.default)(node, opts);
  3953. }
  3954. }
  3955. return false;
  3956. }
  3957. function isModuleSpecifier(node, opts) {
  3958. if (!node)
  3959. return false;
  3960. const nodeType = node.type;
  3961. if ("ExportSpecifier" === nodeType || "ImportDefaultSpecifier" === nodeType || "ImportNamespaceSpecifier" === nodeType || "ImportSpecifier" === nodeType || "ExportNamespaceSpecifier" === nodeType || "ExportDefaultSpecifier" === nodeType) {
  3962. if (typeof opts === "undefined") {
  3963. return true;
  3964. } else {
  3965. return (0, _shallowEqual.default)(node, opts);
  3966. }
  3967. }
  3968. return false;
  3969. }
  3970. function isPrivate(node, opts) {
  3971. if (!node)
  3972. return false;
  3973. const nodeType = node.type;
  3974. if ("ClassPrivateProperty" === nodeType || "ClassPrivateMethod" === nodeType || "PrivateName" === nodeType) {
  3975. if (typeof opts === "undefined") {
  3976. return true;
  3977. } else {
  3978. return (0, _shallowEqual.default)(node, opts);
  3979. }
  3980. }
  3981. return false;
  3982. }
  3983. function isFlow(node, opts) {
  3984. if (!node)
  3985. return false;
  3986. const nodeType = node.type;
  3987. if ("AnyTypeAnnotation" === nodeType || "ArrayTypeAnnotation" === nodeType || "BooleanTypeAnnotation" === nodeType || "BooleanLiteralTypeAnnotation" === nodeType || "NullLiteralTypeAnnotation" === nodeType || "ClassImplements" === nodeType || "DeclareClass" === nodeType || "DeclareFunction" === nodeType || "DeclareInterface" === nodeType || "DeclareModule" === nodeType || "DeclareModuleExports" === nodeType || "DeclareTypeAlias" === nodeType || "DeclareOpaqueType" === nodeType || "DeclareVariable" === nodeType || "DeclareExportDeclaration" === nodeType || "DeclareExportAllDeclaration" === nodeType || "DeclaredPredicate" === nodeType || "ExistsTypeAnnotation" === nodeType || "FunctionTypeAnnotation" === nodeType || "FunctionTypeParam" === nodeType || "GenericTypeAnnotation" === nodeType || "InferredPredicate" === nodeType || "InterfaceExtends" === nodeType || "InterfaceDeclaration" === nodeType || "InterfaceTypeAnnotation" === nodeType || "IntersectionTypeAnnotation" === nodeType || "MixedTypeAnnotation" === nodeType || "EmptyTypeAnnotation" === nodeType || "NullableTypeAnnotation" === nodeType || "NumberLiteralTypeAnnotation" === nodeType || "NumberTypeAnnotation" === nodeType || "ObjectTypeAnnotation" === nodeType || "ObjectTypeInternalSlot" === nodeType || "ObjectTypeCallProperty" === nodeType || "ObjectTypeIndexer" === nodeType || "ObjectTypeProperty" === nodeType || "ObjectTypeSpreadProperty" === nodeType || "OpaqueType" === nodeType || "QualifiedTypeIdentifier" === nodeType || "StringLiteralTypeAnnotation" === nodeType || "StringTypeAnnotation" === nodeType || "SymbolTypeAnnotation" === nodeType || "ThisTypeAnnotation" === nodeType || "TupleTypeAnnotation" === nodeType || "TypeofTypeAnnotation" === nodeType || "TypeAlias" === nodeType || "TypeAnnotation" === nodeType || "TypeCastExpression" === nodeType || "TypeParameter" === nodeType || "TypeParameterDeclaration" === nodeType || "TypeParameterInstantiation" === nodeType || "UnionTypeAnnotation" === nodeType || "Variance" === nodeType || "VoidTypeAnnotation" === nodeType || "IndexedAccessType" === nodeType || "OptionalIndexedAccessType" === nodeType) {
  3988. if (typeof opts === "undefined") {
  3989. return true;
  3990. } else {
  3991. return (0, _shallowEqual.default)(node, opts);
  3992. }
  3993. }
  3994. return false;
  3995. }
  3996. function isFlowType(node, opts) {
  3997. if (!node)
  3998. return false;
  3999. const nodeType = node.type;
  4000. if ("AnyTypeAnnotation" === nodeType || "ArrayTypeAnnotation" === nodeType || "BooleanTypeAnnotation" === nodeType || "BooleanLiteralTypeAnnotation" === nodeType || "NullLiteralTypeAnnotation" === nodeType || "ExistsTypeAnnotation" === nodeType || "FunctionTypeAnnotation" === nodeType || "GenericTypeAnnotation" === nodeType || "InterfaceTypeAnnotation" === nodeType || "IntersectionTypeAnnotation" === nodeType || "MixedTypeAnnotation" === nodeType || "EmptyTypeAnnotation" === nodeType || "NullableTypeAnnotation" === nodeType || "NumberLiteralTypeAnnotation" === nodeType || "NumberTypeAnnotation" === nodeType || "ObjectTypeAnnotation" === nodeType || "StringLiteralTypeAnnotation" === nodeType || "StringTypeAnnotation" === nodeType || "SymbolTypeAnnotation" === nodeType || "ThisTypeAnnotation" === nodeType || "TupleTypeAnnotation" === nodeType || "TypeofTypeAnnotation" === nodeType || "UnionTypeAnnotation" === nodeType || "VoidTypeAnnotation" === nodeType || "IndexedAccessType" === nodeType || "OptionalIndexedAccessType" === nodeType) {
  4001. if (typeof opts === "undefined") {
  4002. return true;
  4003. } else {
  4004. return (0, _shallowEqual.default)(node, opts);
  4005. }
  4006. }
  4007. return false;
  4008. }
  4009. function isFlowBaseAnnotation(node, opts) {
  4010. if (!node)
  4011. return false;
  4012. const nodeType = node.type;
  4013. if ("AnyTypeAnnotation" === nodeType || "BooleanTypeAnnotation" === nodeType || "NullLiteralTypeAnnotation" === nodeType || "MixedTypeAnnotation" === nodeType || "EmptyTypeAnnotation" === nodeType || "NumberTypeAnnotation" === nodeType || "StringTypeAnnotation" === nodeType || "SymbolTypeAnnotation" === nodeType || "ThisTypeAnnotation" === nodeType || "VoidTypeAnnotation" === nodeType) {
  4014. if (typeof opts === "undefined") {
  4015. return true;
  4016. } else {
  4017. return (0, _shallowEqual.default)(node, opts);
  4018. }
  4019. }
  4020. return false;
  4021. }
  4022. function isFlowDeclaration(node, opts) {
  4023. if (!node)
  4024. return false;
  4025. const nodeType = node.type;
  4026. if ("DeclareClass" === nodeType || "DeclareFunction" === nodeType || "DeclareInterface" === nodeType || "DeclareModule" === nodeType || "DeclareModuleExports" === nodeType || "DeclareTypeAlias" === nodeType || "DeclareOpaqueType" === nodeType || "DeclareVariable" === nodeType || "DeclareExportDeclaration" === nodeType || "DeclareExportAllDeclaration" === nodeType || "InterfaceDeclaration" === nodeType || "OpaqueType" === nodeType || "TypeAlias" === nodeType) {
  4027. if (typeof opts === "undefined") {
  4028. return true;
  4029. } else {
  4030. return (0, _shallowEqual.default)(node, opts);
  4031. }
  4032. }
  4033. return false;
  4034. }
  4035. function isFlowPredicate(node, opts) {
  4036. if (!node)
  4037. return false;
  4038. const nodeType = node.type;
  4039. if ("DeclaredPredicate" === nodeType || "InferredPredicate" === nodeType) {
  4040. if (typeof opts === "undefined") {
  4041. return true;
  4042. } else {
  4043. return (0, _shallowEqual.default)(node, opts);
  4044. }
  4045. }
  4046. return false;
  4047. }
  4048. function isEnumBody(node, opts) {
  4049. if (!node)
  4050. return false;
  4051. const nodeType = node.type;
  4052. if ("EnumBooleanBody" === nodeType || "EnumNumberBody" === nodeType || "EnumStringBody" === nodeType || "EnumSymbolBody" === nodeType) {
  4053. if (typeof opts === "undefined") {
  4054. return true;
  4055. } else {
  4056. return (0, _shallowEqual.default)(node, opts);
  4057. }
  4058. }
  4059. return false;
  4060. }
  4061. function isEnumMember(node, opts) {
  4062. if (!node)
  4063. return false;
  4064. const nodeType = node.type;
  4065. if ("EnumBooleanMember" === nodeType || "EnumNumberMember" === nodeType || "EnumStringMember" === nodeType || "EnumDefaultedMember" === nodeType) {
  4066. if (typeof opts === "undefined") {
  4067. return true;
  4068. } else {
  4069. return (0, _shallowEqual.default)(node, opts);
  4070. }
  4071. }
  4072. return false;
  4073. }
  4074. function isJSX(node, opts) {
  4075. if (!node)
  4076. return false;
  4077. const nodeType = node.type;
  4078. if ("JSXAttribute" === nodeType || "JSXClosingElement" === nodeType || "JSXElement" === nodeType || "JSXEmptyExpression" === nodeType || "JSXExpressionContainer" === nodeType || "JSXSpreadChild" === nodeType || "JSXIdentifier" === nodeType || "JSXMemberExpression" === nodeType || "JSXNamespacedName" === nodeType || "JSXOpeningElement" === nodeType || "JSXSpreadAttribute" === nodeType || "JSXText" === nodeType || "JSXFragment" === nodeType || "JSXOpeningFragment" === nodeType || "JSXClosingFragment" === nodeType) {
  4079. if (typeof opts === "undefined") {
  4080. return true;
  4081. } else {
  4082. return (0, _shallowEqual.default)(node, opts);
  4083. }
  4084. }
  4085. return false;
  4086. }
  4087. function isTSTypeElement(node, opts) {
  4088. if (!node)
  4089. return false;
  4090. const nodeType = node.type;
  4091. if ("TSCallSignatureDeclaration" === nodeType || "TSConstructSignatureDeclaration" === nodeType || "TSPropertySignature" === nodeType || "TSMethodSignature" === nodeType || "TSIndexSignature" === nodeType) {
  4092. if (typeof opts === "undefined") {
  4093. return true;
  4094. } else {
  4095. return (0, _shallowEqual.default)(node, opts);
  4096. }
  4097. }
  4098. return false;
  4099. }
  4100. function isTSType(node, opts) {
  4101. if (!node)
  4102. return false;
  4103. const nodeType = node.type;
  4104. if ("TSAnyKeyword" === nodeType || "TSBooleanKeyword" === nodeType || "TSBigIntKeyword" === nodeType || "TSIntrinsicKeyword" === nodeType || "TSNeverKeyword" === nodeType || "TSNullKeyword" === nodeType || "TSNumberKeyword" === nodeType || "TSObjectKeyword" === nodeType || "TSStringKeyword" === nodeType || "TSSymbolKeyword" === nodeType || "TSUndefinedKeyword" === nodeType || "TSUnknownKeyword" === nodeType || "TSVoidKeyword" === nodeType || "TSThisType" === nodeType || "TSFunctionType" === nodeType || "TSConstructorType" === nodeType || "TSTypeReference" === nodeType || "TSTypePredicate" === nodeType || "TSTypeQuery" === nodeType || "TSTypeLiteral" === nodeType || "TSArrayType" === nodeType || "TSTupleType" === nodeType || "TSOptionalType" === nodeType || "TSRestType" === nodeType || "TSUnionType" === nodeType || "TSIntersectionType" === nodeType || "TSConditionalType" === nodeType || "TSInferType" === nodeType || "TSParenthesizedType" === nodeType || "TSTypeOperator" === nodeType || "TSIndexedAccessType" === nodeType || "TSMappedType" === nodeType || "TSLiteralType" === nodeType || "TSExpressionWithTypeArguments" === nodeType || "TSImportType" === nodeType) {
  4105. if (typeof opts === "undefined") {
  4106. return true;
  4107. } else {
  4108. return (0, _shallowEqual.default)(node, opts);
  4109. }
  4110. }
  4111. return false;
  4112. }
  4113. function isTSBaseType(node, opts) {
  4114. if (!node)
  4115. return false;
  4116. const nodeType = node.type;
  4117. if ("TSAnyKeyword" === nodeType || "TSBooleanKeyword" === nodeType || "TSBigIntKeyword" === nodeType || "TSIntrinsicKeyword" === nodeType || "TSNeverKeyword" === nodeType || "TSNullKeyword" === nodeType || "TSNumberKeyword" === nodeType || "TSObjectKeyword" === nodeType || "TSStringKeyword" === nodeType || "TSSymbolKeyword" === nodeType || "TSUndefinedKeyword" === nodeType || "TSUnknownKeyword" === nodeType || "TSVoidKeyword" === nodeType || "TSThisType" === nodeType || "TSLiteralType" === nodeType) {
  4118. if (typeof opts === "undefined") {
  4119. return true;
  4120. } else {
  4121. return (0, _shallowEqual.default)(node, opts);
  4122. }
  4123. }
  4124. return false;
  4125. }
  4126. function isNumberLiteral(node, opts) {
  4127. console.trace("The node type NumberLiteral has been renamed to NumericLiteral");
  4128. if (!node)
  4129. return false;
  4130. const nodeType = node.type;
  4131. if (nodeType === "NumberLiteral") {
  4132. if (typeof opts === "undefined") {
  4133. return true;
  4134. } else {
  4135. return (0, _shallowEqual.default)(node, opts);
  4136. }
  4137. }
  4138. return false;
  4139. }
  4140. function isRegexLiteral(node, opts) {
  4141. console.trace("The node type RegexLiteral has been renamed to RegExpLiteral");
  4142. if (!node)
  4143. return false;
  4144. const nodeType = node.type;
  4145. if (nodeType === "RegexLiteral") {
  4146. if (typeof opts === "undefined") {
  4147. return true;
  4148. } else {
  4149. return (0, _shallowEqual.default)(node, opts);
  4150. }
  4151. }
  4152. return false;
  4153. }
  4154. function isRestProperty(node, opts) {
  4155. console.trace("The node type RestProperty has been renamed to RestElement");
  4156. if (!node)
  4157. return false;
  4158. const nodeType = node.type;
  4159. if (nodeType === "RestProperty") {
  4160. if (typeof opts === "undefined") {
  4161. return true;
  4162. } else {
  4163. return (0, _shallowEqual.default)(node, opts);
  4164. }
  4165. }
  4166. return false;
  4167. }
  4168. function isSpreadProperty(node, opts) {
  4169. console.trace("The node type SpreadProperty has been renamed to SpreadElement");
  4170. if (!node)
  4171. return false;
  4172. const nodeType = node.type;
  4173. if (nodeType === "SpreadProperty") {
  4174. if (typeof opts === "undefined") {
  4175. return true;
  4176. } else {
  4177. return (0, _shallowEqual.default)(node, opts);
  4178. }
  4179. }
  4180. return false;
  4181. }
  4182. }
  4183. });
  4184. // node_modules/@babel/types/lib/validators/matchesPattern.js
  4185. var require_matchesPattern = __commonJS({
  4186. "node_modules/@babel/types/lib/validators/matchesPattern.js"(exports) {
  4187. "use strict";
  4188. Object.defineProperty(exports, "__esModule", {
  4189. value: true
  4190. });
  4191. exports.default = matchesPattern;
  4192. var _generated = require_generated();
  4193. function matchesPattern(member, match, allowPartial) {
  4194. if (!(0, _generated.isMemberExpression)(member))
  4195. return false;
  4196. const parts = Array.isArray(match) ? match : match.split(".");
  4197. const nodes = [];
  4198. let node;
  4199. for (node = member; (0, _generated.isMemberExpression)(node); node = node.object) {
  4200. nodes.push(node.property);
  4201. }
  4202. nodes.push(node);
  4203. if (nodes.length < parts.length)
  4204. return false;
  4205. if (!allowPartial && nodes.length > parts.length)
  4206. return false;
  4207. for (let i = 0, j = nodes.length - 1; i < parts.length; i++, j--) {
  4208. const node2 = nodes[j];
  4209. let value;
  4210. if ((0, _generated.isIdentifier)(node2)) {
  4211. value = node2.name;
  4212. } else if ((0, _generated.isStringLiteral)(node2)) {
  4213. value = node2.value;
  4214. } else if ((0, _generated.isThisExpression)(node2)) {
  4215. value = "this";
  4216. } else {
  4217. return false;
  4218. }
  4219. if (parts[i] !== value)
  4220. return false;
  4221. }
  4222. return true;
  4223. }
  4224. }
  4225. });
  4226. // node_modules/@babel/types/lib/validators/buildMatchMemberExpression.js
  4227. var require_buildMatchMemberExpression = __commonJS({
  4228. "node_modules/@babel/types/lib/validators/buildMatchMemberExpression.js"(exports) {
  4229. "use strict";
  4230. Object.defineProperty(exports, "__esModule", {
  4231. value: true
  4232. });
  4233. exports.default = buildMatchMemberExpression;
  4234. var _matchesPattern = require_matchesPattern();
  4235. function buildMatchMemberExpression(match, allowPartial) {
  4236. const parts = match.split(".");
  4237. return (member) => (0, _matchesPattern.default)(member, parts, allowPartial);
  4238. }
  4239. }
  4240. });
  4241. // node_modules/@babel/types/lib/validators/react/isReactComponent.js
  4242. var require_isReactComponent = __commonJS({
  4243. "node_modules/@babel/types/lib/validators/react/isReactComponent.js"(exports) {
  4244. "use strict";
  4245. Object.defineProperty(exports, "__esModule", {
  4246. value: true
  4247. });
  4248. exports.default = void 0;
  4249. var _buildMatchMemberExpression = require_buildMatchMemberExpression();
  4250. var isReactComponent = (0, _buildMatchMemberExpression.default)("React.Component");
  4251. var _default = isReactComponent;
  4252. exports.default = _default;
  4253. }
  4254. });
  4255. // node_modules/@babel/types/lib/validators/react/isCompatTag.js
  4256. var require_isCompatTag = __commonJS({
  4257. "node_modules/@babel/types/lib/validators/react/isCompatTag.js"(exports) {
  4258. "use strict";
  4259. Object.defineProperty(exports, "__esModule", {
  4260. value: true
  4261. });
  4262. exports.default = isCompatTag;
  4263. function isCompatTag(tagName) {
  4264. return !!tagName && /^[a-z]/.test(tagName);
  4265. }
  4266. }
  4267. });
  4268. // node_modules/to-fast-properties/index.js
  4269. var require_to_fast_properties = __commonJS({
  4270. "node_modules/to-fast-properties/index.js"(exports, module) {
  4271. "use strict";
  4272. var fastProto = null;
  4273. function FastObject(o) {
  4274. if (fastProto !== null && typeof fastProto.property) {
  4275. const result = fastProto;
  4276. fastProto = FastObject.prototype = null;
  4277. return result;
  4278. }
  4279. fastProto = FastObject.prototype = o == null ? /* @__PURE__ */ Object.create(null) : o;
  4280. return new FastObject();
  4281. }
  4282. FastObject();
  4283. module.exports = function toFastproperties(o) {
  4284. return FastObject(o);
  4285. };
  4286. }
  4287. });
  4288. // node_modules/@babel/types/lib/validators/isType.js
  4289. var require_isType = __commonJS({
  4290. "node_modules/@babel/types/lib/validators/isType.js"(exports) {
  4291. "use strict";
  4292. Object.defineProperty(exports, "__esModule", {
  4293. value: true
  4294. });
  4295. exports.default = isType;
  4296. var _definitions = require_definitions();
  4297. function isType(nodeType, targetType) {
  4298. if (nodeType === targetType)
  4299. return true;
  4300. if (_definitions.ALIAS_KEYS[targetType])
  4301. return false;
  4302. const aliases = _definitions.FLIPPED_ALIAS_KEYS[targetType];
  4303. if (aliases) {
  4304. if (aliases[0] === nodeType)
  4305. return true;
  4306. for (const alias of aliases) {
  4307. if (nodeType === alias)
  4308. return true;
  4309. }
  4310. }
  4311. return false;
  4312. }
  4313. }
  4314. });
  4315. // node_modules/@babel/types/lib/validators/isPlaceholderType.js
  4316. var require_isPlaceholderType = __commonJS({
  4317. "node_modules/@babel/types/lib/validators/isPlaceholderType.js"(exports) {
  4318. "use strict";
  4319. Object.defineProperty(exports, "__esModule", {
  4320. value: true
  4321. });
  4322. exports.default = isPlaceholderType;
  4323. var _definitions = require_definitions();
  4324. function isPlaceholderType(placeholderType, targetType) {
  4325. if (placeholderType === targetType)
  4326. return true;
  4327. const aliases = _definitions.PLACEHOLDERS_ALIAS[placeholderType];
  4328. if (aliases) {
  4329. for (const alias of aliases) {
  4330. if (targetType === alias)
  4331. return true;
  4332. }
  4333. }
  4334. return false;
  4335. }
  4336. }
  4337. });
  4338. // node_modules/@babel/types/lib/validators/is.js
  4339. var require_is = __commonJS({
  4340. "node_modules/@babel/types/lib/validators/is.js"(exports) {
  4341. "use strict";
  4342. Object.defineProperty(exports, "__esModule", {
  4343. value: true
  4344. });
  4345. exports.default = is;
  4346. var _shallowEqual = require_shallowEqual();
  4347. var _isType = require_isType();
  4348. var _isPlaceholderType = require_isPlaceholderType();
  4349. var _definitions = require_definitions();
  4350. function is(type, node, opts) {
  4351. if (!node)
  4352. return false;
  4353. const matches = (0, _isType.default)(node.type, type);
  4354. if (!matches) {
  4355. if (!opts && node.type === "Placeholder" && type in _definitions.FLIPPED_ALIAS_KEYS) {
  4356. return (0, _isPlaceholderType.default)(node.expectedNode, type);
  4357. }
  4358. return false;
  4359. }
  4360. if (typeof opts === "undefined") {
  4361. return true;
  4362. } else {
  4363. return (0, _shallowEqual.default)(node, opts);
  4364. }
  4365. }
  4366. }
  4367. });
  4368. // node_modules/@babel/types/node_modules/@babel/helper-validator-identifier/lib/identifier.js
  4369. var require_identifier = __commonJS({
  4370. "node_modules/@babel/types/node_modules/@babel/helper-validator-identifier/lib/identifier.js"(exports) {
  4371. "use strict";
  4372. Object.defineProperty(exports, "__esModule", {
  4373. value: true
  4374. });
  4375. exports.isIdentifierStart = isIdentifierStart2;
  4376. exports.isIdentifierChar = isIdentifierChar2;
  4377. exports.isIdentifierName = isIdentifierName;
  4378. var nonASCIIidentifierStartChars2 = "\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u08A0-\u08B4\u08B6-\u08C7\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1878\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309B-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u31BF\u31F0-\u31FF\u3400-\u4DBF\u4E00-\u9FFC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7BF\uA7C2-\uA7CA\uA7F5-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC";
  4379. var nonASCIIidentifierChars2 = "\u200C\u200D\xB7\u0300-\u036F\u0387\u0483-\u0487\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u0669\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u06F0-\u06F9\u0711\u0730-\u074A\u07A6-\u07B0\u07C0-\u07C9\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u08D3-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0966-\u096F\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u09E6-\u09EF\u09FE\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A66-\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0AE6-\u0AEF\u0AFA-\u0AFF\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B55-\u0B57\u0B62\u0B63\u0B66-\u0B6F\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0BE6-\u0BEF\u0C00-\u0C04\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C66-\u0C6F\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0CE6-\u0CEF\u0D00-\u0D03\u0D3B\u0D3C\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D66-\u0D6F\u0D81-\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0E50-\u0E59\u0EB1\u0EB4-\u0EBC\u0EC8-\u0ECD\u0ED0-\u0ED9\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1040-\u1049\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F-\u109D\u135D-\u135F\u1369-\u1371\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u18A9\u1920-\u192B\u1930-\u193B\u1946-\u194F\u19D0-\u19DA\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AB0-\u1ABD\u1ABF\u1AC0\u1B00-\u1B04\u1B34-\u1B44\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BB0-\u1BB9\u1BE6-\u1BF3\u1C24-\u1C37\u1C40-\u1C49\u1C50-\u1C59\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF4\u1CF7-\u1CF9\u1DC0-\u1DF9\u1DFB-\u1DFF\u203F\u2040\u2054\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA620-\uA629\uA66F\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA82C\uA880\uA881\uA8B4-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F1\uA8FF-\uA909\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9D0-\uA9D9\uA9E5\uA9F0-\uA9F9\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA50-\uAA59\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uABF0-\uABF9\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFF10-\uFF19\uFF3F";
  4380. var nonASCIIidentifierStart2 = new RegExp("[" + nonASCIIidentifierStartChars2 + "]");
  4381. var nonASCIIidentifier2 = new RegExp("[" + nonASCIIidentifierStartChars2 + nonASCIIidentifierChars2 + "]");
  4382. nonASCIIidentifierStartChars2 = nonASCIIidentifierChars2 = null;
  4383. var astralIdentifierStartCodes2 = [0, 11, 2, 25, 2, 18, 2, 1, 2, 14, 3, 13, 35, 122, 70, 52, 268, 28, 4, 48, 48, 31, 14, 29, 6, 37, 11, 29, 3, 35, 5, 7, 2, 4, 43, 157, 19, 35, 5, 35, 5, 39, 9, 51, 157, 310, 10, 21, 11, 7, 153, 5, 3, 0, 2, 43, 2, 1, 4, 0, 3, 22, 11, 22, 10, 30, 66, 18, 2, 1, 11, 21, 11, 25, 71, 55, 7, 1, 65, 0, 16, 3, 2, 2, 2, 28, 43, 28, 4, 28, 36, 7, 2, 27, 28, 53, 11, 21, 11, 18, 14, 17, 111, 72, 56, 50, 14, 50, 14, 35, 349, 41, 7, 1, 79, 28, 11, 0, 9, 21, 107, 20, 28, 22, 13, 52, 76, 44, 33, 24, 27, 35, 30, 0, 3, 0, 9, 34, 4, 0, 13, 47, 15, 3, 22, 0, 2, 0, 36, 17, 2, 24, 85, 6, 2, 0, 2, 3, 2, 14, 2, 9, 8, 46, 39, 7, 3, 1, 3, 21, 2, 6, 2, 1, 2, 4, 4, 0, 19, 0, 13, 4, 159, 52, 19, 3, 21, 2, 31, 47, 21, 1, 2, 0, 185, 46, 42, 3, 37, 47, 21, 0, 60, 42, 14, 0, 72, 26, 230, 43, 117, 63, 32, 7, 3, 0, 3, 7, 2, 1, 2, 23, 16, 0, 2, 0, 95, 7, 3, 38, 17, 0, 2, 0, 29, 0, 11, 39, 8, 0, 22, 0, 12, 45, 20, 0, 35, 56, 264, 8, 2, 36, 18, 0, 50, 29, 113, 6, 2, 1, 2, 37, 22, 0, 26, 5, 2, 1, 2, 31, 15, 0, 328, 18, 190, 0, 80, 921, 103, 110, 18, 195, 2749, 1070, 4050, 582, 8634, 568, 8, 30, 114, 29, 19, 47, 17, 3, 32, 20, 6, 18, 689, 63, 129, 74, 6, 0, 67, 12, 65, 1, 2, 0, 29, 6135, 9, 1237, 43, 8, 8952, 286, 50, 2, 18, 3, 9, 395, 2309, 106, 6, 12, 4, 8, 8, 9, 5991, 84, 2, 70, 2, 1, 3, 0, 3, 1, 3, 3, 2, 11, 2, 0, 2, 6, 2, 64, 2, 3, 3, 7, 2, 6, 2, 27, 2, 3, 2, 4, 2, 0, 4, 6, 2, 339, 3, 24, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 7, 2357, 44, 11, 6, 17, 0, 370, 43, 1301, 196, 60, 67, 8, 0, 1205, 3, 2, 26, 2, 1, 2, 0, 3, 0, 2, 9, 2, 3, 2, 0, 2, 0, 7, 0, 5, 0, 2, 0, 2, 0, 2, 2, 2, 1, 2, 0, 3, 0, 2, 0, 2, 0, 2, 0, 2, 0, 2, 1, 2, 0, 3, 3, 2, 6, 2, 3, 2, 3, 2, 0, 2, 9, 2, 16, 6, 2, 2, 4, 2, 16, 4421, 42717, 35, 4148, 12, 221, 3, 5761, 15, 7472, 3104, 541, 1507, 4938];
  4384. var astralIdentifierCodes2 = [509, 0, 227, 0, 150, 4, 294, 9, 1368, 2, 2, 1, 6, 3, 41, 2, 5, 0, 166, 1, 574, 3, 9, 9, 370, 1, 154, 10, 176, 2, 54, 14, 32, 9, 16, 3, 46, 10, 54, 9, 7, 2, 37, 13, 2, 9, 6, 1, 45, 0, 13, 2, 49, 13, 9, 3, 2, 11, 83, 11, 7, 0, 161, 11, 6, 9, 7, 3, 56, 1, 2, 6, 3, 1, 3, 2, 10, 0, 11, 1, 3, 6, 4, 4, 193, 17, 10, 9, 5, 0, 82, 19, 13, 9, 214, 6, 3, 8, 28, 1, 83, 16, 16, 9, 82, 12, 9, 9, 84, 14, 5, 9, 243, 14, 166, 9, 71, 5, 2, 1, 3, 3, 2, 0, 2, 1, 13, 9, 120, 6, 3, 6, 4, 0, 29, 9, 41, 6, 2, 3, 9, 0, 10, 10, 47, 15, 406, 7, 2, 7, 17, 9, 57, 21, 2, 13, 123, 5, 4, 0, 2, 1, 2, 6, 2, 0, 9, 9, 49, 4, 2, 1, 2, 4, 9, 9, 330, 3, 19306, 9, 135, 4, 60, 6, 26, 9, 1014, 0, 2, 54, 8, 3, 82, 0, 12, 1, 19628, 1, 5319, 4, 4, 5, 9, 7, 3, 6, 31, 3, 149, 2, 1418, 49, 513, 54, 5, 49, 9, 0, 15, 0, 23, 4, 2, 14, 1361, 6, 2, 16, 3, 6, 2, 1, 2, 4, 262, 6, 10, 9, 419, 13, 1495, 6, 110, 6, 6, 9, 4759, 9, 787719, 239];
  4385. function isInAstralSet2(code2, set) {
  4386. let pos = 65536;
  4387. for (let i = 0, length = set.length; i < length; i += 2) {
  4388. pos += set[i];
  4389. if (pos > code2)
  4390. return false;
  4391. pos += set[i + 1];
  4392. if (pos >= code2)
  4393. return true;
  4394. }
  4395. return false;
  4396. }
  4397. function isIdentifierStart2(code2) {
  4398. if (code2 < 65)
  4399. return code2 === 36;
  4400. if (code2 <= 90)
  4401. return true;
  4402. if (code2 < 97)
  4403. return code2 === 95;
  4404. if (code2 <= 122)
  4405. return true;
  4406. if (code2 <= 65535) {
  4407. return code2 >= 170 && nonASCIIidentifierStart2.test(String.fromCharCode(code2));
  4408. }
  4409. return isInAstralSet2(code2, astralIdentifierStartCodes2);
  4410. }
  4411. function isIdentifierChar2(code2) {
  4412. if (code2 < 48)
  4413. return code2 === 36;
  4414. if (code2 < 58)
  4415. return true;
  4416. if (code2 < 65)
  4417. return false;
  4418. if (code2 <= 90)
  4419. return true;
  4420. if (code2 < 97)
  4421. return code2 === 95;
  4422. if (code2 <= 122)
  4423. return true;
  4424. if (code2 <= 65535) {
  4425. return code2 >= 170 && nonASCIIidentifier2.test(String.fromCharCode(code2));
  4426. }
  4427. return isInAstralSet2(code2, astralIdentifierStartCodes2) || isInAstralSet2(code2, astralIdentifierCodes2);
  4428. }
  4429. function isIdentifierName(name2) {
  4430. let isFirst = true;
  4431. for (let i = 0; i < name2.length; i++) {
  4432. let cp = name2.charCodeAt(i);
  4433. if ((cp & 64512) === 55296 && i + 1 < name2.length) {
  4434. const trail = name2.charCodeAt(++i);
  4435. if ((trail & 64512) === 56320) {
  4436. cp = 65536 + ((cp & 1023) << 10) + (trail & 1023);
  4437. }
  4438. }
  4439. if (isFirst) {
  4440. isFirst = false;
  4441. if (!isIdentifierStart2(cp)) {
  4442. return false;
  4443. }
  4444. } else if (!isIdentifierChar2(cp)) {
  4445. return false;
  4446. }
  4447. }
  4448. return !isFirst;
  4449. }
  4450. }
  4451. });
  4452. // node_modules/@babel/types/node_modules/@babel/helper-validator-identifier/lib/keyword.js
  4453. var require_keyword = __commonJS({
  4454. "node_modules/@babel/types/node_modules/@babel/helper-validator-identifier/lib/keyword.js"(exports) {
  4455. "use strict";
  4456. Object.defineProperty(exports, "__esModule", {
  4457. value: true
  4458. });
  4459. exports.isReservedWord = isReservedWord;
  4460. exports.isStrictReservedWord = isStrictReservedWord;
  4461. exports.isStrictBindOnlyReservedWord = isStrictBindOnlyReservedWord;
  4462. exports.isStrictBindReservedWord = isStrictBindReservedWord;
  4463. exports.isKeyword = isKeyword;
  4464. var reservedWords2 = {
  4465. keyword: ["break", "case", "catch", "continue", "debugger", "default", "do", "else", "finally", "for", "function", "if", "return", "switch", "throw", "try", "var", "const", "while", "with", "new", "this", "super", "class", "extends", "export", "import", "null", "true", "false", "in", "instanceof", "typeof", "void", "delete"],
  4466. strict: ["implements", "interface", "let", "package", "private", "protected", "public", "static", "yield"],
  4467. strictBind: ["eval", "arguments"]
  4468. };
  4469. var keywords2 = new Set(reservedWords2.keyword);
  4470. var reservedWordsStrictSet = new Set(reservedWords2.strict);
  4471. var reservedWordsStrictBindSet = new Set(reservedWords2.strictBind);
  4472. function isReservedWord(word, inModule) {
  4473. return inModule && word === "await" || word === "enum";
  4474. }
  4475. function isStrictReservedWord(word, inModule) {
  4476. return isReservedWord(word, inModule) || reservedWordsStrictSet.has(word);
  4477. }
  4478. function isStrictBindOnlyReservedWord(word) {
  4479. return reservedWordsStrictBindSet.has(word);
  4480. }
  4481. function isStrictBindReservedWord(word, inModule) {
  4482. return isStrictReservedWord(word, inModule) || isStrictBindOnlyReservedWord(word);
  4483. }
  4484. function isKeyword(word) {
  4485. return keywords2.has(word);
  4486. }
  4487. }
  4488. });
  4489. // node_modules/@babel/types/node_modules/@babel/helper-validator-identifier/lib/index.js
  4490. var require_lib = __commonJS({
  4491. "node_modules/@babel/types/node_modules/@babel/helper-validator-identifier/lib/index.js"(exports) {
  4492. "use strict";
  4493. Object.defineProperty(exports, "__esModule", {
  4494. value: true
  4495. });
  4496. Object.defineProperty(exports, "isIdentifierName", {
  4497. enumerable: true,
  4498. get: function() {
  4499. return _identifier.isIdentifierName;
  4500. }
  4501. });
  4502. Object.defineProperty(exports, "isIdentifierChar", {
  4503. enumerable: true,
  4504. get: function() {
  4505. return _identifier.isIdentifierChar;
  4506. }
  4507. });
  4508. Object.defineProperty(exports, "isIdentifierStart", {
  4509. enumerable: true,
  4510. get: function() {
  4511. return _identifier.isIdentifierStart;
  4512. }
  4513. });
  4514. Object.defineProperty(exports, "isReservedWord", {
  4515. enumerable: true,
  4516. get: function() {
  4517. return _keyword.isReservedWord;
  4518. }
  4519. });
  4520. Object.defineProperty(exports, "isStrictBindOnlyReservedWord", {
  4521. enumerable: true,
  4522. get: function() {
  4523. return _keyword.isStrictBindOnlyReservedWord;
  4524. }
  4525. });
  4526. Object.defineProperty(exports, "isStrictBindReservedWord", {
  4527. enumerable: true,
  4528. get: function() {
  4529. return _keyword.isStrictBindReservedWord;
  4530. }
  4531. });
  4532. Object.defineProperty(exports, "isStrictReservedWord", {
  4533. enumerable: true,
  4534. get: function() {
  4535. return _keyword.isStrictReservedWord;
  4536. }
  4537. });
  4538. Object.defineProperty(exports, "isKeyword", {
  4539. enumerable: true,
  4540. get: function() {
  4541. return _keyword.isKeyword;
  4542. }
  4543. });
  4544. var _identifier = require_identifier();
  4545. var _keyword = require_keyword();
  4546. }
  4547. });
  4548. // node_modules/@babel/types/lib/validators/isValidIdentifier.js
  4549. var require_isValidIdentifier = __commonJS({
  4550. "node_modules/@babel/types/lib/validators/isValidIdentifier.js"(exports) {
  4551. "use strict";
  4552. Object.defineProperty(exports, "__esModule", {
  4553. value: true
  4554. });
  4555. exports.default = isValidIdentifier;
  4556. var _helperValidatorIdentifier = require_lib();
  4557. function isValidIdentifier(name2, reserved = true) {
  4558. if (typeof name2 !== "string")
  4559. return false;
  4560. if (reserved) {
  4561. if ((0, _helperValidatorIdentifier.isKeyword)(name2) || (0, _helperValidatorIdentifier.isStrictReservedWord)(name2, true)) {
  4562. return false;
  4563. }
  4564. }
  4565. return (0, _helperValidatorIdentifier.isIdentifierName)(name2);
  4566. }
  4567. }
  4568. });
  4569. // node_modules/@babel/types/lib/constants/index.js
  4570. var require_constants = __commonJS({
  4571. "node_modules/@babel/types/lib/constants/index.js"(exports) {
  4572. "use strict";
  4573. Object.defineProperty(exports, "__esModule", {
  4574. value: true
  4575. });
  4576. exports.NOT_LOCAL_BINDING = exports.BLOCK_SCOPED_SYMBOL = exports.INHERIT_KEYS = exports.UNARY_OPERATORS = exports.STRING_UNARY_OPERATORS = exports.NUMBER_UNARY_OPERATORS = exports.BOOLEAN_UNARY_OPERATORS = exports.ASSIGNMENT_OPERATORS = exports.BINARY_OPERATORS = exports.NUMBER_BINARY_OPERATORS = exports.BOOLEAN_BINARY_OPERATORS = exports.COMPARISON_BINARY_OPERATORS = exports.EQUALITY_BINARY_OPERATORS = exports.BOOLEAN_NUMBER_BINARY_OPERATORS = exports.UPDATE_OPERATORS = exports.LOGICAL_OPERATORS = exports.COMMENT_KEYS = exports.FOR_INIT_KEYS = exports.FLATTENABLE_KEYS = exports.STATEMENT_OR_BLOCK_KEYS = void 0;
  4577. var STATEMENT_OR_BLOCK_KEYS = ["consequent", "body", "alternate"];
  4578. exports.STATEMENT_OR_BLOCK_KEYS = STATEMENT_OR_BLOCK_KEYS;
  4579. var FLATTENABLE_KEYS = ["body", "expressions"];
  4580. exports.FLATTENABLE_KEYS = FLATTENABLE_KEYS;
  4581. var FOR_INIT_KEYS = ["left", "init"];
  4582. exports.FOR_INIT_KEYS = FOR_INIT_KEYS;
  4583. var COMMENT_KEYS = ["leadingComments", "trailingComments", "innerComments"];
  4584. exports.COMMENT_KEYS = COMMENT_KEYS;
  4585. var LOGICAL_OPERATORS = ["||", "&&", "??"];
  4586. exports.LOGICAL_OPERATORS = LOGICAL_OPERATORS;
  4587. var UPDATE_OPERATORS = ["++", "--"];
  4588. exports.UPDATE_OPERATORS = UPDATE_OPERATORS;
  4589. var BOOLEAN_NUMBER_BINARY_OPERATORS = [">", "<", ">=", "<="];
  4590. exports.BOOLEAN_NUMBER_BINARY_OPERATORS = BOOLEAN_NUMBER_BINARY_OPERATORS;
  4591. var EQUALITY_BINARY_OPERATORS = ["==", "===", "!=", "!=="];
  4592. exports.EQUALITY_BINARY_OPERATORS = EQUALITY_BINARY_OPERATORS;
  4593. var COMPARISON_BINARY_OPERATORS = [...EQUALITY_BINARY_OPERATORS, "in", "instanceof"];
  4594. exports.COMPARISON_BINARY_OPERATORS = COMPARISON_BINARY_OPERATORS;
  4595. var BOOLEAN_BINARY_OPERATORS = [...COMPARISON_BINARY_OPERATORS, ...BOOLEAN_NUMBER_BINARY_OPERATORS];
  4596. exports.BOOLEAN_BINARY_OPERATORS = BOOLEAN_BINARY_OPERATORS;
  4597. var NUMBER_BINARY_OPERATORS = ["-", "/", "%", "*", "**", "&", "|", ">>", ">>>", "<<", "^"];
  4598. exports.NUMBER_BINARY_OPERATORS = NUMBER_BINARY_OPERATORS;
  4599. var BINARY_OPERATORS = ["+", ...NUMBER_BINARY_OPERATORS, ...BOOLEAN_BINARY_OPERATORS];
  4600. exports.BINARY_OPERATORS = BINARY_OPERATORS;
  4601. var ASSIGNMENT_OPERATORS = ["=", "+=", ...NUMBER_BINARY_OPERATORS.map((op) => op + "="), ...LOGICAL_OPERATORS.map((op) => op + "=")];
  4602. exports.ASSIGNMENT_OPERATORS = ASSIGNMENT_OPERATORS;
  4603. var BOOLEAN_UNARY_OPERATORS = ["delete", "!"];
  4604. exports.BOOLEAN_UNARY_OPERATORS = BOOLEAN_UNARY_OPERATORS;
  4605. var NUMBER_UNARY_OPERATORS = ["+", "-", "~"];
  4606. exports.NUMBER_UNARY_OPERATORS = NUMBER_UNARY_OPERATORS;
  4607. var STRING_UNARY_OPERATORS = ["typeof"];
  4608. exports.STRING_UNARY_OPERATORS = STRING_UNARY_OPERATORS;
  4609. var UNARY_OPERATORS = ["void", "throw", ...BOOLEAN_UNARY_OPERATORS, ...NUMBER_UNARY_OPERATORS, ...STRING_UNARY_OPERATORS];
  4610. exports.UNARY_OPERATORS = UNARY_OPERATORS;
  4611. var INHERIT_KEYS = {
  4612. optional: ["typeAnnotation", "typeParameters", "returnType"],
  4613. force: ["start", "loc", "end"]
  4614. };
  4615. exports.INHERIT_KEYS = INHERIT_KEYS;
  4616. var BLOCK_SCOPED_SYMBOL = Symbol.for("var used to be block scoped");
  4617. exports.BLOCK_SCOPED_SYMBOL = BLOCK_SCOPED_SYMBOL;
  4618. var NOT_LOCAL_BINDING = Symbol.for("should not be considered a local binding");
  4619. exports.NOT_LOCAL_BINDING = NOT_LOCAL_BINDING;
  4620. }
  4621. });
  4622. // node_modules/@babel/types/lib/validators/validate.js
  4623. var require_validate = __commonJS({
  4624. "node_modules/@babel/types/lib/validators/validate.js"(exports) {
  4625. "use strict";
  4626. Object.defineProperty(exports, "__esModule", {
  4627. value: true
  4628. });
  4629. exports.default = validate;
  4630. exports.validateField = validateField;
  4631. exports.validateChild = validateChild;
  4632. var _definitions = require_definitions();
  4633. function validate(node, key, val) {
  4634. if (!node)
  4635. return;
  4636. const fields = _definitions.NODE_FIELDS[node.type];
  4637. if (!fields)
  4638. return;
  4639. const field = fields[key];
  4640. validateField(node, key, val, field);
  4641. validateChild(node, key, val);
  4642. }
  4643. function validateField(node, key, val, field) {
  4644. if (!(field != null && field.validate))
  4645. return;
  4646. if (field.optional && val == null)
  4647. return;
  4648. field.validate(node, key, val);
  4649. }
  4650. function validateChild(node, key, val) {
  4651. if (val == null)
  4652. return;
  4653. const validate2 = _definitions.NODE_PARENT_VALIDATIONS[val.type];
  4654. if (!validate2)
  4655. return;
  4656. validate2(node, key, val);
  4657. }
  4658. }
  4659. });
  4660. // node_modules/@babel/types/lib/definitions/utils.js
  4661. var require_utils = __commonJS({
  4662. "node_modules/@babel/types/lib/definitions/utils.js"(exports) {
  4663. "use strict";
  4664. Object.defineProperty(exports, "__esModule", {
  4665. value: true
  4666. });
  4667. exports.validate = validate;
  4668. exports.typeIs = typeIs;
  4669. exports.validateType = validateType;
  4670. exports.validateOptional = validateOptional;
  4671. exports.validateOptionalType = validateOptionalType;
  4672. exports.arrayOf = arrayOf;
  4673. exports.arrayOfType = arrayOfType;
  4674. exports.validateArrayOfType = validateArrayOfType;
  4675. exports.assertEach = assertEach;
  4676. exports.assertOneOf = assertOneOf;
  4677. exports.assertNodeType = assertNodeType;
  4678. exports.assertNodeOrValueType = assertNodeOrValueType;
  4679. exports.assertValueType = assertValueType;
  4680. exports.assertShape = assertShape;
  4681. exports.assertOptionalChainStart = assertOptionalChainStart;
  4682. exports.chain = chain;
  4683. exports.default = defineType;
  4684. exports.NODE_PARENT_VALIDATIONS = exports.DEPRECATED_KEYS = exports.BUILDER_KEYS = exports.NODE_FIELDS = exports.FLIPPED_ALIAS_KEYS = exports.ALIAS_KEYS = exports.VISITOR_KEYS = void 0;
  4685. var _is = require_is();
  4686. var _validate = require_validate();
  4687. var VISITOR_KEYS = {};
  4688. exports.VISITOR_KEYS = VISITOR_KEYS;
  4689. var ALIAS_KEYS = {};
  4690. exports.ALIAS_KEYS = ALIAS_KEYS;
  4691. var FLIPPED_ALIAS_KEYS = {};
  4692. exports.FLIPPED_ALIAS_KEYS = FLIPPED_ALIAS_KEYS;
  4693. var NODE_FIELDS = {};
  4694. exports.NODE_FIELDS = NODE_FIELDS;
  4695. var BUILDER_KEYS = {};
  4696. exports.BUILDER_KEYS = BUILDER_KEYS;
  4697. var DEPRECATED_KEYS = {};
  4698. exports.DEPRECATED_KEYS = DEPRECATED_KEYS;
  4699. var NODE_PARENT_VALIDATIONS = {};
  4700. exports.NODE_PARENT_VALIDATIONS = NODE_PARENT_VALIDATIONS;
  4701. function getType(val) {
  4702. if (Array.isArray(val)) {
  4703. return "array";
  4704. } else if (val === null) {
  4705. return "null";
  4706. } else {
  4707. return typeof val;
  4708. }
  4709. }
  4710. function validate(validate2) {
  4711. return {
  4712. validate: validate2
  4713. };
  4714. }
  4715. function typeIs(typeName) {
  4716. return typeof typeName === "string" ? assertNodeType(typeName) : assertNodeType(...typeName);
  4717. }
  4718. function validateType(typeName) {
  4719. return validate(typeIs(typeName));
  4720. }
  4721. function validateOptional(validate2) {
  4722. return {
  4723. validate: validate2,
  4724. optional: true
  4725. };
  4726. }
  4727. function validateOptionalType(typeName) {
  4728. return {
  4729. validate: typeIs(typeName),
  4730. optional: true
  4731. };
  4732. }
  4733. function arrayOf(elementType) {
  4734. return chain(assertValueType("array"), assertEach(elementType));
  4735. }
  4736. function arrayOfType(typeName) {
  4737. return arrayOf(typeIs(typeName));
  4738. }
  4739. function validateArrayOfType(typeName) {
  4740. return validate(arrayOfType(typeName));
  4741. }
  4742. function assertEach(callback) {
  4743. function validator(node, key, val) {
  4744. if (!Array.isArray(val))
  4745. return;
  4746. for (let i = 0; i < val.length; i++) {
  4747. const subkey = `${key}[${i}]`;
  4748. const v = val[i];
  4749. callback(node, subkey, v);
  4750. if (process.env.BABEL_TYPES_8_BREAKING)
  4751. (0, _validate.validateChild)(node, subkey, v);
  4752. }
  4753. }
  4754. validator.each = callback;
  4755. return validator;
  4756. }
  4757. function assertOneOf(...values) {
  4758. function validate2(node, key, val) {
  4759. if (values.indexOf(val) < 0) {
  4760. throw new TypeError(`Property ${key} expected value to be one of ${JSON.stringify(values)} but got ${JSON.stringify(val)}`);
  4761. }
  4762. }
  4763. validate2.oneOf = values;
  4764. return validate2;
  4765. }
  4766. function assertNodeType(...types2) {
  4767. function validate2(node, key, val) {
  4768. for (const type of types2) {
  4769. if ((0, _is.default)(type, val)) {
  4770. (0, _validate.validateChild)(node, key, val);
  4771. return;
  4772. }
  4773. }
  4774. throw new TypeError(`Property ${key} of ${node.type} expected node to be of a type ${JSON.stringify(types2)} but instead got ${JSON.stringify(val == null ? void 0 : val.type)}`);
  4775. }
  4776. validate2.oneOfNodeTypes = types2;
  4777. return validate2;
  4778. }
  4779. function assertNodeOrValueType(...types2) {
  4780. function validate2(node, key, val) {
  4781. for (const type of types2) {
  4782. if (getType(val) === type || (0, _is.default)(type, val)) {
  4783. (0, _validate.validateChild)(node, key, val);
  4784. return;
  4785. }
  4786. }
  4787. throw new TypeError(`Property ${key} of ${node.type} expected node to be of a type ${JSON.stringify(types2)} but instead got ${JSON.stringify(val == null ? void 0 : val.type)}`);
  4788. }
  4789. validate2.oneOfNodeOrValueTypes = types2;
  4790. return validate2;
  4791. }
  4792. function assertValueType(type) {
  4793. function validate2(node, key, val) {
  4794. const valid2 = getType(val) === type;
  4795. if (!valid2) {
  4796. throw new TypeError(`Property ${key} expected type of ${type} but got ${getType(val)}`);
  4797. }
  4798. }
  4799. validate2.type = type;
  4800. return validate2;
  4801. }
  4802. function assertShape(shape) {
  4803. function validate2(node, key, val) {
  4804. const errors = [];
  4805. for (const property of Object.keys(shape)) {
  4806. try {
  4807. (0, _validate.validateField)(node, property, val[property], shape[property]);
  4808. } catch (error) {
  4809. if (error instanceof TypeError) {
  4810. errors.push(error.message);
  4811. continue;
  4812. }
  4813. throw error;
  4814. }
  4815. }
  4816. if (errors.length) {
  4817. throw new TypeError(`Property ${key} of ${node.type} expected to have the following:
  4818. ${errors.join("\n")}`);
  4819. }
  4820. }
  4821. validate2.shapeOf = shape;
  4822. return validate2;
  4823. }
  4824. function assertOptionalChainStart() {
  4825. function validate2(node) {
  4826. var _current;
  4827. let current2 = node;
  4828. while (node) {
  4829. const {
  4830. type
  4831. } = current2;
  4832. if (type === "OptionalCallExpression") {
  4833. if (current2.optional)
  4834. return;
  4835. current2 = current2.callee;
  4836. continue;
  4837. }
  4838. if (type === "OptionalMemberExpression") {
  4839. if (current2.optional)
  4840. return;
  4841. current2 = current2.object;
  4842. continue;
  4843. }
  4844. break;
  4845. }
  4846. throw new TypeError(`Non-optional ${node.type} must chain from an optional OptionalMemberExpression or OptionalCallExpression. Found chain from ${(_current = current2) == null ? void 0 : _current.type}`);
  4847. }
  4848. return validate2;
  4849. }
  4850. function chain(...fns) {
  4851. function validate2(...args) {
  4852. for (const fn of fns) {
  4853. fn(...args);
  4854. }
  4855. }
  4856. validate2.chainOf = fns;
  4857. if (fns.length >= 2 && "type" in fns[0] && fns[0].type === "array" && !("each" in fns[1])) {
  4858. throw new Error(`An assertValueType("array") validator can only be followed by an assertEach(...) validator.`);
  4859. }
  4860. return validate2;
  4861. }
  4862. var validTypeOpts = ["aliases", "builder", "deprecatedAlias", "fields", "inherits", "visitor", "validate"];
  4863. var validFieldKeys = ["default", "optional", "validate"];
  4864. function defineType(type, opts = {}) {
  4865. const inherits = opts.inherits && store[opts.inherits] || {};
  4866. let fields = opts.fields;
  4867. if (!fields) {
  4868. fields = {};
  4869. if (inherits.fields) {
  4870. const keys2 = Object.getOwnPropertyNames(inherits.fields);
  4871. for (const key of keys2) {
  4872. const field = inherits.fields[key];
  4873. const def = field.default;
  4874. if (Array.isArray(def) ? def.length > 0 : def && typeof def === "object") {
  4875. throw new Error("field defaults can only be primitives or empty arrays currently");
  4876. }
  4877. fields[key] = {
  4878. default: Array.isArray(def) ? [] : def,
  4879. optional: field.optional,
  4880. validate: field.validate
  4881. };
  4882. }
  4883. }
  4884. }
  4885. const visitor = opts.visitor || inherits.visitor || [];
  4886. const aliases = opts.aliases || inherits.aliases || [];
  4887. const builder = opts.builder || inherits.builder || opts.visitor || [];
  4888. for (const k of Object.keys(opts)) {
  4889. if (validTypeOpts.indexOf(k) === -1) {
  4890. throw new Error(`Unknown type option "${k}" on ${type}`);
  4891. }
  4892. }
  4893. if (opts.deprecatedAlias) {
  4894. DEPRECATED_KEYS[opts.deprecatedAlias] = type;
  4895. }
  4896. for (const key of visitor.concat(builder)) {
  4897. fields[key] = fields[key] || {};
  4898. }
  4899. for (const key of Object.keys(fields)) {
  4900. const field = fields[key];
  4901. if (field.default !== void 0 && builder.indexOf(key) === -1) {
  4902. field.optional = true;
  4903. }
  4904. if (field.default === void 0) {
  4905. field.default = null;
  4906. } else if (!field.validate && field.default != null) {
  4907. field.validate = assertValueType(getType(field.default));
  4908. }
  4909. for (const k of Object.keys(field)) {
  4910. if (validFieldKeys.indexOf(k) === -1) {
  4911. throw new Error(`Unknown field key "${k}" on ${type}.${key}`);
  4912. }
  4913. }
  4914. }
  4915. VISITOR_KEYS[type] = opts.visitor = visitor;
  4916. BUILDER_KEYS[type] = opts.builder = builder;
  4917. NODE_FIELDS[type] = opts.fields = fields;
  4918. ALIAS_KEYS[type] = opts.aliases = aliases;
  4919. aliases.forEach((alias) => {
  4920. FLIPPED_ALIAS_KEYS[alias] = FLIPPED_ALIAS_KEYS[alias] || [];
  4921. FLIPPED_ALIAS_KEYS[alias].push(type);
  4922. });
  4923. if (opts.validate) {
  4924. NODE_PARENT_VALIDATIONS[type] = opts.validate;
  4925. }
  4926. store[type] = opts;
  4927. }
  4928. var store = {};
  4929. }
  4930. });
  4931. // node_modules/@babel/types/lib/definitions/core.js
  4932. var require_core = __commonJS({
  4933. "node_modules/@babel/types/lib/definitions/core.js"(exports) {
  4934. "use strict";
  4935. Object.defineProperty(exports, "__esModule", {
  4936. value: true
  4937. });
  4938. exports.classMethodOrDeclareMethodCommon = exports.classMethodOrPropertyCommon = exports.patternLikeCommon = exports.functionDeclarationCommon = exports.functionTypeAnnotationCommon = exports.functionCommon = void 0;
  4939. var _is = require_is();
  4940. var _isValidIdentifier = require_isValidIdentifier();
  4941. var _helperValidatorIdentifier = require_lib();
  4942. var _constants = require_constants();
  4943. var _utils = require_utils();
  4944. (0, _utils.default)("ArrayExpression", {
  4945. fields: {
  4946. elements: {
  4947. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeOrValueType)("null", "Expression", "SpreadElement"))),
  4948. default: !process.env.BABEL_TYPES_8_BREAKING ? [] : void 0
  4949. }
  4950. },
  4951. visitor: ["elements"],
  4952. aliases: ["Expression"]
  4953. });
  4954. (0, _utils.default)("AssignmentExpression", {
  4955. fields: {
  4956. operator: {
  4957. validate: function() {
  4958. if (!process.env.BABEL_TYPES_8_BREAKING) {
  4959. return (0, _utils.assertValueType)("string");
  4960. }
  4961. const identifier = (0, _utils.assertOneOf)(..._constants.ASSIGNMENT_OPERATORS);
  4962. const pattern = (0, _utils.assertOneOf)("=");
  4963. return function(node, key, val) {
  4964. const validator = (0, _is.default)("Pattern", node.left) ? pattern : identifier;
  4965. validator(node, key, val);
  4966. };
  4967. }()
  4968. },
  4969. left: {
  4970. validate: !process.env.BABEL_TYPES_8_BREAKING ? (0, _utils.assertNodeType)("LVal") : (0, _utils.assertNodeType)("Identifier", "MemberExpression", "ArrayPattern", "ObjectPattern")
  4971. },
  4972. right: {
  4973. validate: (0, _utils.assertNodeType)("Expression")
  4974. }
  4975. },
  4976. builder: ["operator", "left", "right"],
  4977. visitor: ["left", "right"],
  4978. aliases: ["Expression"]
  4979. });
  4980. (0, _utils.default)("BinaryExpression", {
  4981. builder: ["operator", "left", "right"],
  4982. fields: {
  4983. operator: {
  4984. validate: (0, _utils.assertOneOf)(..._constants.BINARY_OPERATORS)
  4985. },
  4986. left: {
  4987. validate: function() {
  4988. const expression = (0, _utils.assertNodeType)("Expression");
  4989. const inOp = (0, _utils.assertNodeType)("Expression", "PrivateName");
  4990. const validator = function(node, key, val) {
  4991. const validator2 = node.operator === "in" ? inOp : expression;
  4992. validator2(node, key, val);
  4993. };
  4994. validator.oneOfNodeTypes = ["Expression", "PrivateName"];
  4995. return validator;
  4996. }()
  4997. },
  4998. right: {
  4999. validate: (0, _utils.assertNodeType)("Expression")
  5000. }
  5001. },
  5002. visitor: ["left", "right"],
  5003. aliases: ["Binary", "Expression"]
  5004. });
  5005. (0, _utils.default)("InterpreterDirective", {
  5006. builder: ["value"],
  5007. fields: {
  5008. value: {
  5009. validate: (0, _utils.assertValueType)("string")
  5010. }
  5011. }
  5012. });
  5013. (0, _utils.default)("Directive", {
  5014. visitor: ["value"],
  5015. fields: {
  5016. value: {
  5017. validate: (0, _utils.assertNodeType)("DirectiveLiteral")
  5018. }
  5019. }
  5020. });
  5021. (0, _utils.default)("DirectiveLiteral", {
  5022. builder: ["value"],
  5023. fields: {
  5024. value: {
  5025. validate: (0, _utils.assertValueType)("string")
  5026. }
  5027. }
  5028. });
  5029. (0, _utils.default)("BlockStatement", {
  5030. builder: ["body", "directives"],
  5031. visitor: ["directives", "body"],
  5032. fields: {
  5033. directives: {
  5034. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Directive"))),
  5035. default: []
  5036. },
  5037. body: {
  5038. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Statement")))
  5039. }
  5040. },
  5041. aliases: ["Scopable", "BlockParent", "Block", "Statement"]
  5042. });
  5043. (0, _utils.default)("BreakStatement", {
  5044. visitor: ["label"],
  5045. fields: {
  5046. label: {
  5047. validate: (0, _utils.assertNodeType)("Identifier"),
  5048. optional: true
  5049. }
  5050. },
  5051. aliases: ["Statement", "Terminatorless", "CompletionStatement"]
  5052. });
  5053. (0, _utils.default)("CallExpression", {
  5054. visitor: ["callee", "arguments", "typeParameters", "typeArguments"],
  5055. builder: ["callee", "arguments"],
  5056. aliases: ["Expression"],
  5057. fields: Object.assign({
  5058. callee: {
  5059. validate: (0, _utils.assertNodeType)("Expression", "V8IntrinsicIdentifier")
  5060. },
  5061. arguments: {
  5062. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Expression", "SpreadElement", "JSXNamespacedName", "ArgumentPlaceholder")))
  5063. }
  5064. }, !process.env.BABEL_TYPES_8_BREAKING ? {
  5065. optional: {
  5066. validate: (0, _utils.assertOneOf)(true, false),
  5067. optional: true
  5068. }
  5069. } : {}, {
  5070. typeArguments: {
  5071. validate: (0, _utils.assertNodeType)("TypeParameterInstantiation"),
  5072. optional: true
  5073. },
  5074. typeParameters: {
  5075. validate: (0, _utils.assertNodeType)("TSTypeParameterInstantiation"),
  5076. optional: true
  5077. }
  5078. })
  5079. });
  5080. (0, _utils.default)("CatchClause", {
  5081. visitor: ["param", "body"],
  5082. fields: {
  5083. param: {
  5084. validate: (0, _utils.assertNodeType)("Identifier", "ArrayPattern", "ObjectPattern"),
  5085. optional: true
  5086. },
  5087. body: {
  5088. validate: (0, _utils.assertNodeType)("BlockStatement")
  5089. }
  5090. },
  5091. aliases: ["Scopable", "BlockParent"]
  5092. });
  5093. (0, _utils.default)("ConditionalExpression", {
  5094. visitor: ["test", "consequent", "alternate"],
  5095. fields: {
  5096. test: {
  5097. validate: (0, _utils.assertNodeType)("Expression")
  5098. },
  5099. consequent: {
  5100. validate: (0, _utils.assertNodeType)("Expression")
  5101. },
  5102. alternate: {
  5103. validate: (0, _utils.assertNodeType)("Expression")
  5104. }
  5105. },
  5106. aliases: ["Expression", "Conditional"]
  5107. });
  5108. (0, _utils.default)("ContinueStatement", {
  5109. visitor: ["label"],
  5110. fields: {
  5111. label: {
  5112. validate: (0, _utils.assertNodeType)("Identifier"),
  5113. optional: true
  5114. }
  5115. },
  5116. aliases: ["Statement", "Terminatorless", "CompletionStatement"]
  5117. });
  5118. (0, _utils.default)("DebuggerStatement", {
  5119. aliases: ["Statement"]
  5120. });
  5121. (0, _utils.default)("DoWhileStatement", {
  5122. visitor: ["test", "body"],
  5123. fields: {
  5124. test: {
  5125. validate: (0, _utils.assertNodeType)("Expression")
  5126. },
  5127. body: {
  5128. validate: (0, _utils.assertNodeType)("Statement")
  5129. }
  5130. },
  5131. aliases: ["Statement", "BlockParent", "Loop", "While", "Scopable"]
  5132. });
  5133. (0, _utils.default)("EmptyStatement", {
  5134. aliases: ["Statement"]
  5135. });
  5136. (0, _utils.default)("ExpressionStatement", {
  5137. visitor: ["expression"],
  5138. fields: {
  5139. expression: {
  5140. validate: (0, _utils.assertNodeType)("Expression")
  5141. }
  5142. },
  5143. aliases: ["Statement", "ExpressionWrapper"]
  5144. });
  5145. (0, _utils.default)("File", {
  5146. builder: ["program", "comments", "tokens"],
  5147. visitor: ["program"],
  5148. fields: {
  5149. program: {
  5150. validate: (0, _utils.assertNodeType)("Program")
  5151. },
  5152. comments: {
  5153. validate: !process.env.BABEL_TYPES_8_BREAKING ? Object.assign(() => {
  5154. }, {
  5155. each: {
  5156. oneOfNodeTypes: ["CommentBlock", "CommentLine"]
  5157. }
  5158. }) : (0, _utils.assertEach)((0, _utils.assertNodeType)("CommentBlock", "CommentLine")),
  5159. optional: true
  5160. },
  5161. tokens: {
  5162. validate: (0, _utils.assertEach)(Object.assign(() => {
  5163. }, {
  5164. type: "any"
  5165. })),
  5166. optional: true
  5167. }
  5168. }
  5169. });
  5170. (0, _utils.default)("ForInStatement", {
  5171. visitor: ["left", "right", "body"],
  5172. aliases: ["Scopable", "Statement", "For", "BlockParent", "Loop", "ForXStatement"],
  5173. fields: {
  5174. left: {
  5175. validate: !process.env.BABEL_TYPES_8_BREAKING ? (0, _utils.assertNodeType)("VariableDeclaration", "LVal") : (0, _utils.assertNodeType)("VariableDeclaration", "Identifier", "MemberExpression", "ArrayPattern", "ObjectPattern")
  5176. },
  5177. right: {
  5178. validate: (0, _utils.assertNodeType)("Expression")
  5179. },
  5180. body: {
  5181. validate: (0, _utils.assertNodeType)("Statement")
  5182. }
  5183. }
  5184. });
  5185. (0, _utils.default)("ForStatement", {
  5186. visitor: ["init", "test", "update", "body"],
  5187. aliases: ["Scopable", "Statement", "For", "BlockParent", "Loop"],
  5188. fields: {
  5189. init: {
  5190. validate: (0, _utils.assertNodeType)("VariableDeclaration", "Expression"),
  5191. optional: true
  5192. },
  5193. test: {
  5194. validate: (0, _utils.assertNodeType)("Expression"),
  5195. optional: true
  5196. },
  5197. update: {
  5198. validate: (0, _utils.assertNodeType)("Expression"),
  5199. optional: true
  5200. },
  5201. body: {
  5202. validate: (0, _utils.assertNodeType)("Statement")
  5203. }
  5204. }
  5205. });
  5206. var functionCommon = {
  5207. params: {
  5208. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Identifier", "Pattern", "RestElement")))
  5209. },
  5210. generator: {
  5211. default: false
  5212. },
  5213. async: {
  5214. default: false
  5215. }
  5216. };
  5217. exports.functionCommon = functionCommon;
  5218. var functionTypeAnnotationCommon = {
  5219. returnType: {
  5220. validate: (0, _utils.assertNodeType)("TypeAnnotation", "TSTypeAnnotation", "Noop"),
  5221. optional: true
  5222. },
  5223. typeParameters: {
  5224. validate: (0, _utils.assertNodeType)("TypeParameterDeclaration", "TSTypeParameterDeclaration", "Noop"),
  5225. optional: true
  5226. }
  5227. };
  5228. exports.functionTypeAnnotationCommon = functionTypeAnnotationCommon;
  5229. var functionDeclarationCommon = Object.assign({}, functionCommon, {
  5230. declare: {
  5231. validate: (0, _utils.assertValueType)("boolean"),
  5232. optional: true
  5233. },
  5234. id: {
  5235. validate: (0, _utils.assertNodeType)("Identifier"),
  5236. optional: true
  5237. }
  5238. });
  5239. exports.functionDeclarationCommon = functionDeclarationCommon;
  5240. (0, _utils.default)("FunctionDeclaration", {
  5241. builder: ["id", "params", "body", "generator", "async"],
  5242. visitor: ["id", "params", "body", "returnType", "typeParameters"],
  5243. fields: Object.assign({}, functionDeclarationCommon, functionTypeAnnotationCommon, {
  5244. body: {
  5245. validate: (0, _utils.assertNodeType)("BlockStatement")
  5246. }
  5247. }),
  5248. aliases: ["Scopable", "Function", "BlockParent", "FunctionParent", "Statement", "Pureish", "Declaration"],
  5249. validate: function() {
  5250. if (!process.env.BABEL_TYPES_8_BREAKING)
  5251. return () => {
  5252. };
  5253. const identifier = (0, _utils.assertNodeType)("Identifier");
  5254. return function(parent, key, node) {
  5255. if (!(0, _is.default)("ExportDefaultDeclaration", parent)) {
  5256. identifier(node, "id", node.id);
  5257. }
  5258. };
  5259. }()
  5260. });
  5261. (0, _utils.default)("FunctionExpression", {
  5262. inherits: "FunctionDeclaration",
  5263. aliases: ["Scopable", "Function", "BlockParent", "FunctionParent", "Expression", "Pureish"],
  5264. fields: Object.assign({}, functionCommon, functionTypeAnnotationCommon, {
  5265. id: {
  5266. validate: (0, _utils.assertNodeType)("Identifier"),
  5267. optional: true
  5268. },
  5269. body: {
  5270. validate: (0, _utils.assertNodeType)("BlockStatement")
  5271. }
  5272. })
  5273. });
  5274. var patternLikeCommon = {
  5275. typeAnnotation: {
  5276. validate: (0, _utils.assertNodeType)("TypeAnnotation", "TSTypeAnnotation", "Noop"),
  5277. optional: true
  5278. },
  5279. decorators: {
  5280. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Decorator")))
  5281. }
  5282. };
  5283. exports.patternLikeCommon = patternLikeCommon;
  5284. (0, _utils.default)("Identifier", {
  5285. builder: ["name"],
  5286. visitor: ["typeAnnotation", "decorators"],
  5287. aliases: ["Expression", "PatternLike", "LVal", "TSEntityName"],
  5288. fields: Object.assign({}, patternLikeCommon, {
  5289. name: {
  5290. validate: (0, _utils.chain)((0, _utils.assertValueType)("string"), Object.assign(function(node, key, val) {
  5291. if (!process.env.BABEL_TYPES_8_BREAKING)
  5292. return;
  5293. if (!(0, _isValidIdentifier.default)(val, false)) {
  5294. throw new TypeError(`"${val}" is not a valid identifier name`);
  5295. }
  5296. }, {
  5297. type: "string"
  5298. }))
  5299. },
  5300. optional: {
  5301. validate: (0, _utils.assertValueType)("boolean"),
  5302. optional: true
  5303. }
  5304. }),
  5305. validate(parent, key, node) {
  5306. if (!process.env.BABEL_TYPES_8_BREAKING)
  5307. return;
  5308. const match = /\.(\w+)$/.exec(key);
  5309. if (!match)
  5310. return;
  5311. const [, parentKey] = match;
  5312. const nonComp = {
  5313. computed: false
  5314. };
  5315. if (parentKey === "property") {
  5316. if ((0, _is.default)("MemberExpression", parent, nonComp))
  5317. return;
  5318. if ((0, _is.default)("OptionalMemberExpression", parent, nonComp))
  5319. return;
  5320. } else if (parentKey === "key") {
  5321. if ((0, _is.default)("Property", parent, nonComp))
  5322. return;
  5323. if ((0, _is.default)("Method", parent, nonComp))
  5324. return;
  5325. } else if (parentKey === "exported") {
  5326. if ((0, _is.default)("ExportSpecifier", parent))
  5327. return;
  5328. } else if (parentKey === "imported") {
  5329. if ((0, _is.default)("ImportSpecifier", parent, {
  5330. imported: node
  5331. }))
  5332. return;
  5333. } else if (parentKey === "meta") {
  5334. if ((0, _is.default)("MetaProperty", parent, {
  5335. meta: node
  5336. }))
  5337. return;
  5338. }
  5339. if (((0, _helperValidatorIdentifier.isKeyword)(node.name) || (0, _helperValidatorIdentifier.isReservedWord)(node.name, false)) && node.name !== "this") {
  5340. throw new TypeError(`"${node.name}" is not a valid identifier`);
  5341. }
  5342. }
  5343. });
  5344. (0, _utils.default)("IfStatement", {
  5345. visitor: ["test", "consequent", "alternate"],
  5346. aliases: ["Statement", "Conditional"],
  5347. fields: {
  5348. test: {
  5349. validate: (0, _utils.assertNodeType)("Expression")
  5350. },
  5351. consequent: {
  5352. validate: (0, _utils.assertNodeType)("Statement")
  5353. },
  5354. alternate: {
  5355. optional: true,
  5356. validate: (0, _utils.assertNodeType)("Statement")
  5357. }
  5358. }
  5359. });
  5360. (0, _utils.default)("LabeledStatement", {
  5361. visitor: ["label", "body"],
  5362. aliases: ["Statement"],
  5363. fields: {
  5364. label: {
  5365. validate: (0, _utils.assertNodeType)("Identifier")
  5366. },
  5367. body: {
  5368. validate: (0, _utils.assertNodeType)("Statement")
  5369. }
  5370. }
  5371. });
  5372. (0, _utils.default)("StringLiteral", {
  5373. builder: ["value"],
  5374. fields: {
  5375. value: {
  5376. validate: (0, _utils.assertValueType)("string")
  5377. }
  5378. },
  5379. aliases: ["Expression", "Pureish", "Literal", "Immutable"]
  5380. });
  5381. (0, _utils.default)("NumericLiteral", {
  5382. builder: ["value"],
  5383. deprecatedAlias: "NumberLiteral",
  5384. fields: {
  5385. value: {
  5386. validate: (0, _utils.assertValueType)("number")
  5387. }
  5388. },
  5389. aliases: ["Expression", "Pureish", "Literal", "Immutable"]
  5390. });
  5391. (0, _utils.default)("NullLiteral", {
  5392. aliases: ["Expression", "Pureish", "Literal", "Immutable"]
  5393. });
  5394. (0, _utils.default)("BooleanLiteral", {
  5395. builder: ["value"],
  5396. fields: {
  5397. value: {
  5398. validate: (0, _utils.assertValueType)("boolean")
  5399. }
  5400. },
  5401. aliases: ["Expression", "Pureish", "Literal", "Immutable"]
  5402. });
  5403. (0, _utils.default)("RegExpLiteral", {
  5404. builder: ["pattern", "flags"],
  5405. deprecatedAlias: "RegexLiteral",
  5406. aliases: ["Expression", "Pureish", "Literal"],
  5407. fields: {
  5408. pattern: {
  5409. validate: (0, _utils.assertValueType)("string")
  5410. },
  5411. flags: {
  5412. validate: (0, _utils.chain)((0, _utils.assertValueType)("string"), Object.assign(function(node, key, val) {
  5413. if (!process.env.BABEL_TYPES_8_BREAKING)
  5414. return;
  5415. const invalid2 = /[^gimsuy]/.exec(val);
  5416. if (invalid2) {
  5417. throw new TypeError(`"${invalid2[0]}" is not a valid RegExp flag`);
  5418. }
  5419. }, {
  5420. type: "string"
  5421. })),
  5422. default: ""
  5423. }
  5424. }
  5425. });
  5426. (0, _utils.default)("LogicalExpression", {
  5427. builder: ["operator", "left", "right"],
  5428. visitor: ["left", "right"],
  5429. aliases: ["Binary", "Expression"],
  5430. fields: {
  5431. operator: {
  5432. validate: (0, _utils.assertOneOf)(..._constants.LOGICAL_OPERATORS)
  5433. },
  5434. left: {
  5435. validate: (0, _utils.assertNodeType)("Expression")
  5436. },
  5437. right: {
  5438. validate: (0, _utils.assertNodeType)("Expression")
  5439. }
  5440. }
  5441. });
  5442. (0, _utils.default)("MemberExpression", {
  5443. builder: ["object", "property", "computed", ...!process.env.BABEL_TYPES_8_BREAKING ? ["optional"] : []],
  5444. visitor: ["object", "property"],
  5445. aliases: ["Expression", "LVal"],
  5446. fields: Object.assign({
  5447. object: {
  5448. validate: (0, _utils.assertNodeType)("Expression")
  5449. },
  5450. property: {
  5451. validate: function() {
  5452. const normal = (0, _utils.assertNodeType)("Identifier", "PrivateName");
  5453. const computed = (0, _utils.assertNodeType)("Expression");
  5454. const validator = function(node, key, val) {
  5455. const validator2 = node.computed ? computed : normal;
  5456. validator2(node, key, val);
  5457. };
  5458. validator.oneOfNodeTypes = ["Expression", "Identifier", "PrivateName"];
  5459. return validator;
  5460. }()
  5461. },
  5462. computed: {
  5463. default: false
  5464. }
  5465. }, !process.env.BABEL_TYPES_8_BREAKING ? {
  5466. optional: {
  5467. validate: (0, _utils.assertOneOf)(true, false),
  5468. optional: true
  5469. }
  5470. } : {})
  5471. });
  5472. (0, _utils.default)("NewExpression", {
  5473. inherits: "CallExpression"
  5474. });
  5475. (0, _utils.default)("Program", {
  5476. visitor: ["directives", "body"],
  5477. builder: ["body", "directives", "sourceType", "interpreter"],
  5478. fields: {
  5479. sourceFile: {
  5480. validate: (0, _utils.assertValueType)("string")
  5481. },
  5482. sourceType: {
  5483. validate: (0, _utils.assertOneOf)("script", "module"),
  5484. default: "script"
  5485. },
  5486. interpreter: {
  5487. validate: (0, _utils.assertNodeType)("InterpreterDirective"),
  5488. default: null,
  5489. optional: true
  5490. },
  5491. directives: {
  5492. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Directive"))),
  5493. default: []
  5494. },
  5495. body: {
  5496. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Statement")))
  5497. }
  5498. },
  5499. aliases: ["Scopable", "BlockParent", "Block"]
  5500. });
  5501. (0, _utils.default)("ObjectExpression", {
  5502. visitor: ["properties"],
  5503. aliases: ["Expression"],
  5504. fields: {
  5505. properties: {
  5506. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("ObjectMethod", "ObjectProperty", "SpreadElement")))
  5507. }
  5508. }
  5509. });
  5510. (0, _utils.default)("ObjectMethod", {
  5511. builder: ["kind", "key", "params", "body", "computed", "generator", "async"],
  5512. fields: Object.assign({}, functionCommon, functionTypeAnnotationCommon, {
  5513. kind: Object.assign({
  5514. validate: (0, _utils.assertOneOf)("method", "get", "set")
  5515. }, !process.env.BABEL_TYPES_8_BREAKING ? {
  5516. default: "method"
  5517. } : {}),
  5518. computed: {
  5519. default: false
  5520. },
  5521. key: {
  5522. validate: function() {
  5523. const normal = (0, _utils.assertNodeType)("Identifier", "StringLiteral", "NumericLiteral");
  5524. const computed = (0, _utils.assertNodeType)("Expression");
  5525. const validator = function(node, key, val) {
  5526. const validator2 = node.computed ? computed : normal;
  5527. validator2(node, key, val);
  5528. };
  5529. validator.oneOfNodeTypes = ["Expression", "Identifier", "StringLiteral", "NumericLiteral"];
  5530. return validator;
  5531. }()
  5532. },
  5533. decorators: {
  5534. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Decorator"))),
  5535. optional: true
  5536. },
  5537. body: {
  5538. validate: (0, _utils.assertNodeType)("BlockStatement")
  5539. }
  5540. }),
  5541. visitor: ["key", "params", "body", "decorators", "returnType", "typeParameters"],
  5542. aliases: ["UserWhitespacable", "Function", "Scopable", "BlockParent", "FunctionParent", "Method", "ObjectMember"]
  5543. });
  5544. (0, _utils.default)("ObjectProperty", {
  5545. builder: ["key", "value", "computed", "shorthand", ...!process.env.BABEL_TYPES_8_BREAKING ? ["decorators"] : []],
  5546. fields: {
  5547. computed: {
  5548. default: false
  5549. },
  5550. key: {
  5551. validate: function() {
  5552. const normal = (0, _utils.assertNodeType)("Identifier", "StringLiteral", "NumericLiteral");
  5553. const computed = (0, _utils.assertNodeType)("Expression");
  5554. const validator = function(node, key, val) {
  5555. const validator2 = node.computed ? computed : normal;
  5556. validator2(node, key, val);
  5557. };
  5558. validator.oneOfNodeTypes = ["Expression", "Identifier", "StringLiteral", "NumericLiteral"];
  5559. return validator;
  5560. }()
  5561. },
  5562. value: {
  5563. validate: (0, _utils.assertNodeType)("Expression", "PatternLike")
  5564. },
  5565. shorthand: {
  5566. validate: (0, _utils.chain)((0, _utils.assertValueType)("boolean"), Object.assign(function(node, key, val) {
  5567. if (!process.env.BABEL_TYPES_8_BREAKING)
  5568. return;
  5569. if (val && node.computed) {
  5570. throw new TypeError("Property shorthand of ObjectProperty cannot be true if computed is true");
  5571. }
  5572. }, {
  5573. type: "boolean"
  5574. }), function(node, key, val) {
  5575. if (!process.env.BABEL_TYPES_8_BREAKING)
  5576. return;
  5577. if (val && !(0, _is.default)("Identifier", node.key)) {
  5578. throw new TypeError("Property shorthand of ObjectProperty cannot be true if key is not an Identifier");
  5579. }
  5580. }),
  5581. default: false
  5582. },
  5583. decorators: {
  5584. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Decorator"))),
  5585. optional: true
  5586. }
  5587. },
  5588. visitor: ["key", "value", "decorators"],
  5589. aliases: ["UserWhitespacable", "Property", "ObjectMember"],
  5590. validate: function() {
  5591. const pattern = (0, _utils.assertNodeType)("Identifier", "Pattern");
  5592. const expression = (0, _utils.assertNodeType)("Expression");
  5593. return function(parent, key, node) {
  5594. if (!process.env.BABEL_TYPES_8_BREAKING)
  5595. return;
  5596. const validator = (0, _is.default)("ObjectPattern", parent) ? pattern : expression;
  5597. validator(node, "value", node.value);
  5598. };
  5599. }()
  5600. });
  5601. (0, _utils.default)("RestElement", {
  5602. visitor: ["argument", "typeAnnotation"],
  5603. builder: ["argument"],
  5604. aliases: ["LVal", "PatternLike"],
  5605. deprecatedAlias: "RestProperty",
  5606. fields: Object.assign({}, patternLikeCommon, {
  5607. argument: {
  5608. validate: !process.env.BABEL_TYPES_8_BREAKING ? (0, _utils.assertNodeType)("LVal") : (0, _utils.assertNodeType)("Identifier", "Pattern", "MemberExpression")
  5609. }
  5610. }),
  5611. validate(parent, key) {
  5612. if (!process.env.BABEL_TYPES_8_BREAKING)
  5613. return;
  5614. const match = /(\w+)\[(\d+)\]/.exec(key);
  5615. if (!match)
  5616. throw new Error("Internal Babel error: malformed key.");
  5617. const [, listKey, index2] = match;
  5618. if (parent[listKey].length > index2 + 1) {
  5619. throw new TypeError(`RestElement must be last element of ${listKey}`);
  5620. }
  5621. }
  5622. });
  5623. (0, _utils.default)("ReturnStatement", {
  5624. visitor: ["argument"],
  5625. aliases: ["Statement", "Terminatorless", "CompletionStatement"],
  5626. fields: {
  5627. argument: {
  5628. validate: (0, _utils.assertNodeType)("Expression"),
  5629. optional: true
  5630. }
  5631. }
  5632. });
  5633. (0, _utils.default)("SequenceExpression", {
  5634. visitor: ["expressions"],
  5635. fields: {
  5636. expressions: {
  5637. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Expression")))
  5638. }
  5639. },
  5640. aliases: ["Expression"]
  5641. });
  5642. (0, _utils.default)("ParenthesizedExpression", {
  5643. visitor: ["expression"],
  5644. aliases: ["Expression", "ExpressionWrapper"],
  5645. fields: {
  5646. expression: {
  5647. validate: (0, _utils.assertNodeType)("Expression")
  5648. }
  5649. }
  5650. });
  5651. (0, _utils.default)("SwitchCase", {
  5652. visitor: ["test", "consequent"],
  5653. fields: {
  5654. test: {
  5655. validate: (0, _utils.assertNodeType)("Expression"),
  5656. optional: true
  5657. },
  5658. consequent: {
  5659. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Statement")))
  5660. }
  5661. }
  5662. });
  5663. (0, _utils.default)("SwitchStatement", {
  5664. visitor: ["discriminant", "cases"],
  5665. aliases: ["Statement", "BlockParent", "Scopable"],
  5666. fields: {
  5667. discriminant: {
  5668. validate: (0, _utils.assertNodeType)("Expression")
  5669. },
  5670. cases: {
  5671. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("SwitchCase")))
  5672. }
  5673. }
  5674. });
  5675. (0, _utils.default)("ThisExpression", {
  5676. aliases: ["Expression"]
  5677. });
  5678. (0, _utils.default)("ThrowStatement", {
  5679. visitor: ["argument"],
  5680. aliases: ["Statement", "Terminatorless", "CompletionStatement"],
  5681. fields: {
  5682. argument: {
  5683. validate: (0, _utils.assertNodeType)("Expression")
  5684. }
  5685. }
  5686. });
  5687. (0, _utils.default)("TryStatement", {
  5688. visitor: ["block", "handler", "finalizer"],
  5689. aliases: ["Statement"],
  5690. fields: {
  5691. block: {
  5692. validate: (0, _utils.chain)((0, _utils.assertNodeType)("BlockStatement"), Object.assign(function(node) {
  5693. if (!process.env.BABEL_TYPES_8_BREAKING)
  5694. return;
  5695. if (!node.handler && !node.finalizer) {
  5696. throw new TypeError("TryStatement expects either a handler or finalizer, or both");
  5697. }
  5698. }, {
  5699. oneOfNodeTypes: ["BlockStatement"]
  5700. }))
  5701. },
  5702. handler: {
  5703. optional: true,
  5704. validate: (0, _utils.assertNodeType)("CatchClause")
  5705. },
  5706. finalizer: {
  5707. optional: true,
  5708. validate: (0, _utils.assertNodeType)("BlockStatement")
  5709. }
  5710. }
  5711. });
  5712. (0, _utils.default)("UnaryExpression", {
  5713. builder: ["operator", "argument", "prefix"],
  5714. fields: {
  5715. prefix: {
  5716. default: true
  5717. },
  5718. argument: {
  5719. validate: (0, _utils.assertNodeType)("Expression")
  5720. },
  5721. operator: {
  5722. validate: (0, _utils.assertOneOf)(..._constants.UNARY_OPERATORS)
  5723. }
  5724. },
  5725. visitor: ["argument"],
  5726. aliases: ["UnaryLike", "Expression"]
  5727. });
  5728. (0, _utils.default)("UpdateExpression", {
  5729. builder: ["operator", "argument", "prefix"],
  5730. fields: {
  5731. prefix: {
  5732. default: false
  5733. },
  5734. argument: {
  5735. validate: !process.env.BABEL_TYPES_8_BREAKING ? (0, _utils.assertNodeType)("Expression") : (0, _utils.assertNodeType)("Identifier", "MemberExpression")
  5736. },
  5737. operator: {
  5738. validate: (0, _utils.assertOneOf)(..._constants.UPDATE_OPERATORS)
  5739. }
  5740. },
  5741. visitor: ["argument"],
  5742. aliases: ["Expression"]
  5743. });
  5744. (0, _utils.default)("VariableDeclaration", {
  5745. builder: ["kind", "declarations"],
  5746. visitor: ["declarations"],
  5747. aliases: ["Statement", "Declaration"],
  5748. fields: {
  5749. declare: {
  5750. validate: (0, _utils.assertValueType)("boolean"),
  5751. optional: true
  5752. },
  5753. kind: {
  5754. validate: (0, _utils.assertOneOf)("var", "let", "const")
  5755. },
  5756. declarations: {
  5757. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("VariableDeclarator")))
  5758. }
  5759. },
  5760. validate(parent, key, node) {
  5761. if (!process.env.BABEL_TYPES_8_BREAKING)
  5762. return;
  5763. if (!(0, _is.default)("ForXStatement", parent, {
  5764. left: node
  5765. }))
  5766. return;
  5767. if (node.declarations.length !== 1) {
  5768. throw new TypeError(`Exactly one VariableDeclarator is required in the VariableDeclaration of a ${parent.type}`);
  5769. }
  5770. }
  5771. });
  5772. (0, _utils.default)("VariableDeclarator", {
  5773. visitor: ["id", "init"],
  5774. fields: {
  5775. id: {
  5776. validate: function() {
  5777. if (!process.env.BABEL_TYPES_8_BREAKING) {
  5778. return (0, _utils.assertNodeType)("LVal");
  5779. }
  5780. const normal = (0, _utils.assertNodeType)("Identifier", "ArrayPattern", "ObjectPattern");
  5781. const without = (0, _utils.assertNodeType)("Identifier");
  5782. return function(node, key, val) {
  5783. const validator = node.init ? normal : without;
  5784. validator(node, key, val);
  5785. };
  5786. }()
  5787. },
  5788. definite: {
  5789. optional: true,
  5790. validate: (0, _utils.assertValueType)("boolean")
  5791. },
  5792. init: {
  5793. optional: true,
  5794. validate: (0, _utils.assertNodeType)("Expression")
  5795. }
  5796. }
  5797. });
  5798. (0, _utils.default)("WhileStatement", {
  5799. visitor: ["test", "body"],
  5800. aliases: ["Statement", "BlockParent", "Loop", "While", "Scopable"],
  5801. fields: {
  5802. test: {
  5803. validate: (0, _utils.assertNodeType)("Expression")
  5804. },
  5805. body: {
  5806. validate: (0, _utils.assertNodeType)("Statement")
  5807. }
  5808. }
  5809. });
  5810. (0, _utils.default)("WithStatement", {
  5811. visitor: ["object", "body"],
  5812. aliases: ["Statement"],
  5813. fields: {
  5814. object: {
  5815. validate: (0, _utils.assertNodeType)("Expression")
  5816. },
  5817. body: {
  5818. validate: (0, _utils.assertNodeType)("Statement")
  5819. }
  5820. }
  5821. });
  5822. (0, _utils.default)("AssignmentPattern", {
  5823. visitor: ["left", "right", "decorators"],
  5824. builder: ["left", "right"],
  5825. aliases: ["Pattern", "PatternLike", "LVal"],
  5826. fields: Object.assign({}, patternLikeCommon, {
  5827. left: {
  5828. validate: (0, _utils.assertNodeType)("Identifier", "ObjectPattern", "ArrayPattern", "MemberExpression")
  5829. },
  5830. right: {
  5831. validate: (0, _utils.assertNodeType)("Expression")
  5832. },
  5833. decorators: {
  5834. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Decorator"))),
  5835. optional: true
  5836. }
  5837. })
  5838. });
  5839. (0, _utils.default)("ArrayPattern", {
  5840. visitor: ["elements", "typeAnnotation"],
  5841. builder: ["elements"],
  5842. aliases: ["Pattern", "PatternLike", "LVal"],
  5843. fields: Object.assign({}, patternLikeCommon, {
  5844. elements: {
  5845. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeOrValueType)("null", "PatternLike")))
  5846. },
  5847. decorators: {
  5848. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Decorator"))),
  5849. optional: true
  5850. }
  5851. })
  5852. });
  5853. (0, _utils.default)("ArrowFunctionExpression", {
  5854. builder: ["params", "body", "async"],
  5855. visitor: ["params", "body", "returnType", "typeParameters"],
  5856. aliases: ["Scopable", "Function", "BlockParent", "FunctionParent", "Expression", "Pureish"],
  5857. fields: Object.assign({}, functionCommon, functionTypeAnnotationCommon, {
  5858. expression: {
  5859. validate: (0, _utils.assertValueType)("boolean")
  5860. },
  5861. body: {
  5862. validate: (0, _utils.assertNodeType)("BlockStatement", "Expression")
  5863. }
  5864. })
  5865. });
  5866. (0, _utils.default)("ClassBody", {
  5867. visitor: ["body"],
  5868. fields: {
  5869. body: {
  5870. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("ClassMethod", "ClassPrivateMethod", "ClassProperty", "ClassPrivateProperty", "TSDeclareMethod", "TSIndexSignature")))
  5871. }
  5872. }
  5873. });
  5874. (0, _utils.default)("ClassExpression", {
  5875. builder: ["id", "superClass", "body", "decorators"],
  5876. visitor: ["id", "body", "superClass", "mixins", "typeParameters", "superTypeParameters", "implements", "decorators"],
  5877. aliases: ["Scopable", "Class", "Expression"],
  5878. fields: {
  5879. id: {
  5880. validate: (0, _utils.assertNodeType)("Identifier"),
  5881. optional: true
  5882. },
  5883. typeParameters: {
  5884. validate: (0, _utils.assertNodeType)("TypeParameterDeclaration", "TSTypeParameterDeclaration", "Noop"),
  5885. optional: true
  5886. },
  5887. body: {
  5888. validate: (0, _utils.assertNodeType)("ClassBody")
  5889. },
  5890. superClass: {
  5891. optional: true,
  5892. validate: (0, _utils.assertNodeType)("Expression")
  5893. },
  5894. superTypeParameters: {
  5895. validate: (0, _utils.assertNodeType)("TypeParameterInstantiation", "TSTypeParameterInstantiation"),
  5896. optional: true
  5897. },
  5898. implements: {
  5899. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("TSExpressionWithTypeArguments", "ClassImplements"))),
  5900. optional: true
  5901. },
  5902. decorators: {
  5903. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Decorator"))),
  5904. optional: true
  5905. },
  5906. mixins: {
  5907. validate: (0, _utils.assertNodeType)("InterfaceExtends"),
  5908. optional: true
  5909. }
  5910. }
  5911. });
  5912. (0, _utils.default)("ClassDeclaration", {
  5913. inherits: "ClassExpression",
  5914. aliases: ["Scopable", "Class", "Statement", "Declaration"],
  5915. fields: {
  5916. id: {
  5917. validate: (0, _utils.assertNodeType)("Identifier")
  5918. },
  5919. typeParameters: {
  5920. validate: (0, _utils.assertNodeType)("TypeParameterDeclaration", "TSTypeParameterDeclaration", "Noop"),
  5921. optional: true
  5922. },
  5923. body: {
  5924. validate: (0, _utils.assertNodeType)("ClassBody")
  5925. },
  5926. superClass: {
  5927. optional: true,
  5928. validate: (0, _utils.assertNodeType)("Expression")
  5929. },
  5930. superTypeParameters: {
  5931. validate: (0, _utils.assertNodeType)("TypeParameterInstantiation", "TSTypeParameterInstantiation"),
  5932. optional: true
  5933. },
  5934. implements: {
  5935. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("TSExpressionWithTypeArguments", "ClassImplements"))),
  5936. optional: true
  5937. },
  5938. decorators: {
  5939. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Decorator"))),
  5940. optional: true
  5941. },
  5942. mixins: {
  5943. validate: (0, _utils.assertNodeType)("InterfaceExtends"),
  5944. optional: true
  5945. },
  5946. declare: {
  5947. validate: (0, _utils.assertValueType)("boolean"),
  5948. optional: true
  5949. },
  5950. abstract: {
  5951. validate: (0, _utils.assertValueType)("boolean"),
  5952. optional: true
  5953. }
  5954. },
  5955. validate: function() {
  5956. const identifier = (0, _utils.assertNodeType)("Identifier");
  5957. return function(parent, key, node) {
  5958. if (!process.env.BABEL_TYPES_8_BREAKING)
  5959. return;
  5960. if (!(0, _is.default)("ExportDefaultDeclaration", parent)) {
  5961. identifier(node, "id", node.id);
  5962. }
  5963. };
  5964. }()
  5965. });
  5966. (0, _utils.default)("ExportAllDeclaration", {
  5967. visitor: ["source"],
  5968. aliases: ["Statement", "Declaration", "ModuleDeclaration", "ExportDeclaration"],
  5969. fields: {
  5970. source: {
  5971. validate: (0, _utils.assertNodeType)("StringLiteral")
  5972. },
  5973. exportKind: (0, _utils.validateOptional)((0, _utils.assertOneOf)("type", "value")),
  5974. assertions: {
  5975. optional: true,
  5976. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("ImportAttribute")))
  5977. }
  5978. }
  5979. });
  5980. (0, _utils.default)("ExportDefaultDeclaration", {
  5981. visitor: ["declaration"],
  5982. aliases: ["Statement", "Declaration", "ModuleDeclaration", "ExportDeclaration"],
  5983. fields: {
  5984. declaration: {
  5985. validate: (0, _utils.assertNodeType)("FunctionDeclaration", "TSDeclareFunction", "ClassDeclaration", "Expression")
  5986. }
  5987. }
  5988. });
  5989. (0, _utils.default)("ExportNamedDeclaration", {
  5990. visitor: ["declaration", "specifiers", "source"],
  5991. aliases: ["Statement", "Declaration", "ModuleDeclaration", "ExportDeclaration"],
  5992. fields: {
  5993. declaration: {
  5994. optional: true,
  5995. validate: (0, _utils.chain)((0, _utils.assertNodeType)("Declaration"), Object.assign(function(node, key, val) {
  5996. if (!process.env.BABEL_TYPES_8_BREAKING)
  5997. return;
  5998. if (val && node.specifiers.length) {
  5999. throw new TypeError("Only declaration or specifiers is allowed on ExportNamedDeclaration");
  6000. }
  6001. }, {
  6002. oneOfNodeTypes: ["Declaration"]
  6003. }), function(node, key, val) {
  6004. if (!process.env.BABEL_TYPES_8_BREAKING)
  6005. return;
  6006. if (val && node.source) {
  6007. throw new TypeError("Cannot export a declaration from a source");
  6008. }
  6009. })
  6010. },
  6011. assertions: {
  6012. optional: true,
  6013. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("ImportAttribute")))
  6014. },
  6015. specifiers: {
  6016. default: [],
  6017. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)(function() {
  6018. const sourced = (0, _utils.assertNodeType)("ExportSpecifier", "ExportDefaultSpecifier", "ExportNamespaceSpecifier");
  6019. const sourceless = (0, _utils.assertNodeType)("ExportSpecifier");
  6020. if (!process.env.BABEL_TYPES_8_BREAKING)
  6021. return sourced;
  6022. return function(node, key, val) {
  6023. const validator = node.source ? sourced : sourceless;
  6024. validator(node, key, val);
  6025. };
  6026. }()))
  6027. },
  6028. source: {
  6029. validate: (0, _utils.assertNodeType)("StringLiteral"),
  6030. optional: true
  6031. },
  6032. exportKind: (0, _utils.validateOptional)((0, _utils.assertOneOf)("type", "value"))
  6033. }
  6034. });
  6035. (0, _utils.default)("ExportSpecifier", {
  6036. visitor: ["local", "exported"],
  6037. aliases: ["ModuleSpecifier"],
  6038. fields: {
  6039. local: {
  6040. validate: (0, _utils.assertNodeType)("Identifier")
  6041. },
  6042. exported: {
  6043. validate: (0, _utils.assertNodeType)("Identifier", "StringLiteral")
  6044. }
  6045. }
  6046. });
  6047. (0, _utils.default)("ForOfStatement", {
  6048. visitor: ["left", "right", "body"],
  6049. builder: ["left", "right", "body", "await"],
  6050. aliases: ["Scopable", "Statement", "For", "BlockParent", "Loop", "ForXStatement"],
  6051. fields: {
  6052. left: {
  6053. validate: function() {
  6054. if (!process.env.BABEL_TYPES_8_BREAKING) {
  6055. return (0, _utils.assertNodeType)("VariableDeclaration", "LVal");
  6056. }
  6057. const declaration = (0, _utils.assertNodeType)("VariableDeclaration");
  6058. const lval = (0, _utils.assertNodeType)("Identifier", "MemberExpression", "ArrayPattern", "ObjectPattern");
  6059. return function(node, key, val) {
  6060. if ((0, _is.default)("VariableDeclaration", val)) {
  6061. declaration(node, key, val);
  6062. } else {
  6063. lval(node, key, val);
  6064. }
  6065. };
  6066. }()
  6067. },
  6068. right: {
  6069. validate: (0, _utils.assertNodeType)("Expression")
  6070. },
  6071. body: {
  6072. validate: (0, _utils.assertNodeType)("Statement")
  6073. },
  6074. await: {
  6075. default: false
  6076. }
  6077. }
  6078. });
  6079. (0, _utils.default)("ImportDeclaration", {
  6080. visitor: ["specifiers", "source"],
  6081. aliases: ["Statement", "Declaration", "ModuleDeclaration"],
  6082. fields: {
  6083. assertions: {
  6084. optional: true,
  6085. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("ImportAttribute")))
  6086. },
  6087. specifiers: {
  6088. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("ImportSpecifier", "ImportDefaultSpecifier", "ImportNamespaceSpecifier")))
  6089. },
  6090. source: {
  6091. validate: (0, _utils.assertNodeType)("StringLiteral")
  6092. },
  6093. importKind: {
  6094. validate: (0, _utils.assertOneOf)("type", "typeof", "value"),
  6095. optional: true
  6096. }
  6097. }
  6098. });
  6099. (0, _utils.default)("ImportDefaultSpecifier", {
  6100. visitor: ["local"],
  6101. aliases: ["ModuleSpecifier"],
  6102. fields: {
  6103. local: {
  6104. validate: (0, _utils.assertNodeType)("Identifier")
  6105. }
  6106. }
  6107. });
  6108. (0, _utils.default)("ImportNamespaceSpecifier", {
  6109. visitor: ["local"],
  6110. aliases: ["ModuleSpecifier"],
  6111. fields: {
  6112. local: {
  6113. validate: (0, _utils.assertNodeType)("Identifier")
  6114. }
  6115. }
  6116. });
  6117. (0, _utils.default)("ImportSpecifier", {
  6118. visitor: ["local", "imported"],
  6119. aliases: ["ModuleSpecifier"],
  6120. fields: {
  6121. local: {
  6122. validate: (0, _utils.assertNodeType)("Identifier")
  6123. },
  6124. imported: {
  6125. validate: (0, _utils.assertNodeType)("Identifier", "StringLiteral")
  6126. },
  6127. importKind: {
  6128. validate: (0, _utils.assertOneOf)("type", "typeof"),
  6129. optional: true
  6130. }
  6131. }
  6132. });
  6133. (0, _utils.default)("MetaProperty", {
  6134. visitor: ["meta", "property"],
  6135. aliases: ["Expression"],
  6136. fields: {
  6137. meta: {
  6138. validate: (0, _utils.chain)((0, _utils.assertNodeType)("Identifier"), Object.assign(function(node, key, val) {
  6139. if (!process.env.BABEL_TYPES_8_BREAKING)
  6140. return;
  6141. let property;
  6142. switch (val.name) {
  6143. case "function":
  6144. property = "sent";
  6145. break;
  6146. case "new":
  6147. property = "target";
  6148. break;
  6149. case "import":
  6150. property = "meta";
  6151. break;
  6152. }
  6153. if (!(0, _is.default)("Identifier", node.property, {
  6154. name: property
  6155. })) {
  6156. throw new TypeError("Unrecognised MetaProperty");
  6157. }
  6158. }, {
  6159. oneOfNodeTypes: ["Identifier"]
  6160. }))
  6161. },
  6162. property: {
  6163. validate: (0, _utils.assertNodeType)("Identifier")
  6164. }
  6165. }
  6166. });
  6167. var classMethodOrPropertyCommon = {
  6168. abstract: {
  6169. validate: (0, _utils.assertValueType)("boolean"),
  6170. optional: true
  6171. },
  6172. accessibility: {
  6173. validate: (0, _utils.assertOneOf)("public", "private", "protected"),
  6174. optional: true
  6175. },
  6176. static: {
  6177. default: false
  6178. },
  6179. override: {
  6180. default: false
  6181. },
  6182. computed: {
  6183. default: false
  6184. },
  6185. optional: {
  6186. validate: (0, _utils.assertValueType)("boolean"),
  6187. optional: true
  6188. },
  6189. key: {
  6190. validate: (0, _utils.chain)(function() {
  6191. const normal = (0, _utils.assertNodeType)("Identifier", "StringLiteral", "NumericLiteral");
  6192. const computed = (0, _utils.assertNodeType)("Expression");
  6193. return function(node, key, val) {
  6194. const validator = node.computed ? computed : normal;
  6195. validator(node, key, val);
  6196. };
  6197. }(), (0, _utils.assertNodeType)("Identifier", "StringLiteral", "NumericLiteral", "Expression"))
  6198. }
  6199. };
  6200. exports.classMethodOrPropertyCommon = classMethodOrPropertyCommon;
  6201. var classMethodOrDeclareMethodCommon = Object.assign({}, functionCommon, classMethodOrPropertyCommon, {
  6202. params: {
  6203. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Identifier", "Pattern", "RestElement", "TSParameterProperty")))
  6204. },
  6205. kind: {
  6206. validate: (0, _utils.assertOneOf)("get", "set", "method", "constructor"),
  6207. default: "method"
  6208. },
  6209. access: {
  6210. validate: (0, _utils.chain)((0, _utils.assertValueType)("string"), (0, _utils.assertOneOf)("public", "private", "protected")),
  6211. optional: true
  6212. },
  6213. decorators: {
  6214. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Decorator"))),
  6215. optional: true
  6216. }
  6217. });
  6218. exports.classMethodOrDeclareMethodCommon = classMethodOrDeclareMethodCommon;
  6219. (0, _utils.default)("ClassMethod", {
  6220. aliases: ["Function", "Scopable", "BlockParent", "FunctionParent", "Method"],
  6221. builder: ["kind", "key", "params", "body", "computed", "static", "generator", "async"],
  6222. visitor: ["key", "params", "body", "decorators", "returnType", "typeParameters"],
  6223. fields: Object.assign({}, classMethodOrDeclareMethodCommon, functionTypeAnnotationCommon, {
  6224. body: {
  6225. validate: (0, _utils.assertNodeType)("BlockStatement")
  6226. }
  6227. })
  6228. });
  6229. (0, _utils.default)("ObjectPattern", {
  6230. visitor: ["properties", "typeAnnotation", "decorators"],
  6231. builder: ["properties"],
  6232. aliases: ["Pattern", "PatternLike", "LVal"],
  6233. fields: Object.assign({}, patternLikeCommon, {
  6234. properties: {
  6235. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("RestElement", "ObjectProperty")))
  6236. }
  6237. })
  6238. });
  6239. (0, _utils.default)("SpreadElement", {
  6240. visitor: ["argument"],
  6241. aliases: ["UnaryLike"],
  6242. deprecatedAlias: "SpreadProperty",
  6243. fields: {
  6244. argument: {
  6245. validate: (0, _utils.assertNodeType)("Expression")
  6246. }
  6247. }
  6248. });
  6249. (0, _utils.default)("Super", {
  6250. aliases: ["Expression"]
  6251. });
  6252. (0, _utils.default)("TaggedTemplateExpression", {
  6253. visitor: ["tag", "quasi", "typeParameters"],
  6254. builder: ["tag", "quasi"],
  6255. aliases: ["Expression"],
  6256. fields: {
  6257. tag: {
  6258. validate: (0, _utils.assertNodeType)("Expression")
  6259. },
  6260. quasi: {
  6261. validate: (0, _utils.assertNodeType)("TemplateLiteral")
  6262. },
  6263. typeParameters: {
  6264. validate: (0, _utils.assertNodeType)("TypeParameterInstantiation", "TSTypeParameterInstantiation"),
  6265. optional: true
  6266. }
  6267. }
  6268. });
  6269. (0, _utils.default)("TemplateElement", {
  6270. builder: ["value", "tail"],
  6271. fields: {
  6272. value: {
  6273. validate: (0, _utils.assertShape)({
  6274. raw: {
  6275. validate: (0, _utils.assertValueType)("string")
  6276. },
  6277. cooked: {
  6278. validate: (0, _utils.assertValueType)("string"),
  6279. optional: true
  6280. }
  6281. })
  6282. },
  6283. tail: {
  6284. default: false
  6285. }
  6286. }
  6287. });
  6288. (0, _utils.default)("TemplateLiteral", {
  6289. visitor: ["quasis", "expressions"],
  6290. aliases: ["Expression", "Literal"],
  6291. fields: {
  6292. quasis: {
  6293. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("TemplateElement")))
  6294. },
  6295. expressions: {
  6296. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Expression", "TSType")), function(node, key, val) {
  6297. if (node.quasis.length !== val.length + 1) {
  6298. throw new TypeError(`Number of ${node.type} quasis should be exactly one more than the number of expressions.
  6299. Expected ${val.length + 1} quasis but got ${node.quasis.length}`);
  6300. }
  6301. })
  6302. }
  6303. }
  6304. });
  6305. (0, _utils.default)("YieldExpression", {
  6306. builder: ["argument", "delegate"],
  6307. visitor: ["argument"],
  6308. aliases: ["Expression", "Terminatorless"],
  6309. fields: {
  6310. delegate: {
  6311. validate: (0, _utils.chain)((0, _utils.assertValueType)("boolean"), Object.assign(function(node, key, val) {
  6312. if (!process.env.BABEL_TYPES_8_BREAKING)
  6313. return;
  6314. if (val && !node.argument) {
  6315. throw new TypeError("Property delegate of YieldExpression cannot be true if there is no argument");
  6316. }
  6317. }, {
  6318. type: "boolean"
  6319. })),
  6320. default: false
  6321. },
  6322. argument: {
  6323. optional: true,
  6324. validate: (0, _utils.assertNodeType)("Expression")
  6325. }
  6326. }
  6327. });
  6328. (0, _utils.default)("AwaitExpression", {
  6329. builder: ["argument"],
  6330. visitor: ["argument"],
  6331. aliases: ["Expression", "Terminatorless"],
  6332. fields: {
  6333. argument: {
  6334. validate: (0, _utils.assertNodeType)("Expression")
  6335. }
  6336. }
  6337. });
  6338. (0, _utils.default)("Import", {
  6339. aliases: ["Expression"]
  6340. });
  6341. (0, _utils.default)("BigIntLiteral", {
  6342. builder: ["value"],
  6343. fields: {
  6344. value: {
  6345. validate: (0, _utils.assertValueType)("string")
  6346. }
  6347. },
  6348. aliases: ["Expression", "Pureish", "Literal", "Immutable"]
  6349. });
  6350. (0, _utils.default)("ExportNamespaceSpecifier", {
  6351. visitor: ["exported"],
  6352. aliases: ["ModuleSpecifier"],
  6353. fields: {
  6354. exported: {
  6355. validate: (0, _utils.assertNodeType)("Identifier")
  6356. }
  6357. }
  6358. });
  6359. (0, _utils.default)("OptionalMemberExpression", {
  6360. builder: ["object", "property", "computed", "optional"],
  6361. visitor: ["object", "property"],
  6362. aliases: ["Expression"],
  6363. fields: {
  6364. object: {
  6365. validate: (0, _utils.assertNodeType)("Expression")
  6366. },
  6367. property: {
  6368. validate: function() {
  6369. const normal = (0, _utils.assertNodeType)("Identifier");
  6370. const computed = (0, _utils.assertNodeType)("Expression");
  6371. const validator = function(node, key, val) {
  6372. const validator2 = node.computed ? computed : normal;
  6373. validator2(node, key, val);
  6374. };
  6375. validator.oneOfNodeTypes = ["Expression", "Identifier"];
  6376. return validator;
  6377. }()
  6378. },
  6379. computed: {
  6380. default: false
  6381. },
  6382. optional: {
  6383. validate: !process.env.BABEL_TYPES_8_BREAKING ? (0, _utils.assertValueType)("boolean") : (0, _utils.chain)((0, _utils.assertValueType)("boolean"), (0, _utils.assertOptionalChainStart)())
  6384. }
  6385. }
  6386. });
  6387. (0, _utils.default)("OptionalCallExpression", {
  6388. visitor: ["callee", "arguments", "typeParameters", "typeArguments"],
  6389. builder: ["callee", "arguments", "optional"],
  6390. aliases: ["Expression"],
  6391. fields: {
  6392. callee: {
  6393. validate: (0, _utils.assertNodeType)("Expression")
  6394. },
  6395. arguments: {
  6396. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Expression", "SpreadElement", "JSXNamespacedName", "ArgumentPlaceholder")))
  6397. },
  6398. optional: {
  6399. validate: !process.env.BABEL_TYPES_8_BREAKING ? (0, _utils.assertValueType)("boolean") : (0, _utils.chain)((0, _utils.assertValueType)("boolean"), (0, _utils.assertOptionalChainStart)())
  6400. },
  6401. typeArguments: {
  6402. validate: (0, _utils.assertNodeType)("TypeParameterInstantiation"),
  6403. optional: true
  6404. },
  6405. typeParameters: {
  6406. validate: (0, _utils.assertNodeType)("TSTypeParameterInstantiation"),
  6407. optional: true
  6408. }
  6409. }
  6410. });
  6411. (0, _utils.default)("ClassProperty", {
  6412. visitor: ["key", "value", "typeAnnotation", "decorators"],
  6413. builder: ["key", "value", "typeAnnotation", "decorators", "computed", "static"],
  6414. aliases: ["Property"],
  6415. fields: Object.assign({}, classMethodOrPropertyCommon, {
  6416. value: {
  6417. validate: (0, _utils.assertNodeType)("Expression"),
  6418. optional: true
  6419. },
  6420. definite: {
  6421. validate: (0, _utils.assertValueType)("boolean"),
  6422. optional: true
  6423. },
  6424. typeAnnotation: {
  6425. validate: (0, _utils.assertNodeType)("TypeAnnotation", "TSTypeAnnotation", "Noop"),
  6426. optional: true
  6427. },
  6428. decorators: {
  6429. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Decorator"))),
  6430. optional: true
  6431. },
  6432. readonly: {
  6433. validate: (0, _utils.assertValueType)("boolean"),
  6434. optional: true
  6435. },
  6436. declare: {
  6437. validate: (0, _utils.assertValueType)("boolean"),
  6438. optional: true
  6439. }
  6440. })
  6441. });
  6442. (0, _utils.default)("ClassPrivateProperty", {
  6443. visitor: ["key", "value", "decorators", "typeAnnotation"],
  6444. builder: ["key", "value", "decorators", "static"],
  6445. aliases: ["Property", "Private"],
  6446. fields: {
  6447. key: {
  6448. validate: (0, _utils.assertNodeType)("PrivateName")
  6449. },
  6450. value: {
  6451. validate: (0, _utils.assertNodeType)("Expression"),
  6452. optional: true
  6453. },
  6454. typeAnnotation: {
  6455. validate: (0, _utils.assertNodeType)("TypeAnnotation", "TSTypeAnnotation", "Noop"),
  6456. optional: true
  6457. },
  6458. decorators: {
  6459. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Decorator"))),
  6460. optional: true
  6461. }
  6462. }
  6463. });
  6464. (0, _utils.default)("ClassPrivateMethod", {
  6465. builder: ["kind", "key", "params", "body", "static"],
  6466. visitor: ["key", "params", "body", "decorators", "returnType", "typeParameters"],
  6467. aliases: ["Function", "Scopable", "BlockParent", "FunctionParent", "Method", "Private"],
  6468. fields: Object.assign({}, classMethodOrDeclareMethodCommon, functionTypeAnnotationCommon, {
  6469. key: {
  6470. validate: (0, _utils.assertNodeType)("PrivateName")
  6471. },
  6472. body: {
  6473. validate: (0, _utils.assertNodeType)("BlockStatement")
  6474. }
  6475. })
  6476. });
  6477. (0, _utils.default)("PrivateName", {
  6478. visitor: ["id"],
  6479. aliases: ["Private"],
  6480. fields: {
  6481. id: {
  6482. validate: (0, _utils.assertNodeType)("Identifier")
  6483. }
  6484. }
  6485. });
  6486. }
  6487. });
  6488. // node_modules/@babel/types/lib/definitions/flow.js
  6489. var require_flow = __commonJS({
  6490. "node_modules/@babel/types/lib/definitions/flow.js"() {
  6491. "use strict";
  6492. var _utils = require_utils();
  6493. var defineInterfaceishType = (name2, typeParameterType = "TypeParameterDeclaration") => {
  6494. (0, _utils.default)(name2, {
  6495. builder: ["id", "typeParameters", "extends", "body"],
  6496. visitor: ["id", "typeParameters", "extends", "mixins", "implements", "body"],
  6497. aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"],
  6498. fields: {
  6499. id: (0, _utils.validateType)("Identifier"),
  6500. typeParameters: (0, _utils.validateOptionalType)(typeParameterType),
  6501. extends: (0, _utils.validateOptional)((0, _utils.arrayOfType)("InterfaceExtends")),
  6502. mixins: (0, _utils.validateOptional)((0, _utils.arrayOfType)("InterfaceExtends")),
  6503. implements: (0, _utils.validateOptional)((0, _utils.arrayOfType)("ClassImplements")),
  6504. body: (0, _utils.validateType)("ObjectTypeAnnotation")
  6505. }
  6506. });
  6507. };
  6508. (0, _utils.default)("AnyTypeAnnotation", {
  6509. aliases: ["Flow", "FlowType", "FlowBaseAnnotation"]
  6510. });
  6511. (0, _utils.default)("ArrayTypeAnnotation", {
  6512. visitor: ["elementType"],
  6513. aliases: ["Flow", "FlowType"],
  6514. fields: {
  6515. elementType: (0, _utils.validateType)("FlowType")
  6516. }
  6517. });
  6518. (0, _utils.default)("BooleanTypeAnnotation", {
  6519. aliases: ["Flow", "FlowType", "FlowBaseAnnotation"]
  6520. });
  6521. (0, _utils.default)("BooleanLiteralTypeAnnotation", {
  6522. builder: ["value"],
  6523. aliases: ["Flow", "FlowType"],
  6524. fields: {
  6525. value: (0, _utils.validate)((0, _utils.assertValueType)("boolean"))
  6526. }
  6527. });
  6528. (0, _utils.default)("NullLiteralTypeAnnotation", {
  6529. aliases: ["Flow", "FlowType", "FlowBaseAnnotation"]
  6530. });
  6531. (0, _utils.default)("ClassImplements", {
  6532. visitor: ["id", "typeParameters"],
  6533. aliases: ["Flow"],
  6534. fields: {
  6535. id: (0, _utils.validateType)("Identifier"),
  6536. typeParameters: (0, _utils.validateOptionalType)("TypeParameterInstantiation")
  6537. }
  6538. });
  6539. defineInterfaceishType("DeclareClass");
  6540. (0, _utils.default)("DeclareFunction", {
  6541. visitor: ["id"],
  6542. aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"],
  6543. fields: {
  6544. id: (0, _utils.validateType)("Identifier"),
  6545. predicate: (0, _utils.validateOptionalType)("DeclaredPredicate")
  6546. }
  6547. });
  6548. defineInterfaceishType("DeclareInterface");
  6549. (0, _utils.default)("DeclareModule", {
  6550. builder: ["id", "body", "kind"],
  6551. visitor: ["id", "body"],
  6552. aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"],
  6553. fields: {
  6554. id: (0, _utils.validateType)(["Identifier", "StringLiteral"]),
  6555. body: (0, _utils.validateType)("BlockStatement"),
  6556. kind: (0, _utils.validateOptional)((0, _utils.assertOneOf)("CommonJS", "ES"))
  6557. }
  6558. });
  6559. (0, _utils.default)("DeclareModuleExports", {
  6560. visitor: ["typeAnnotation"],
  6561. aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"],
  6562. fields: {
  6563. typeAnnotation: (0, _utils.validateType)("TypeAnnotation")
  6564. }
  6565. });
  6566. (0, _utils.default)("DeclareTypeAlias", {
  6567. visitor: ["id", "typeParameters", "right"],
  6568. aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"],
  6569. fields: {
  6570. id: (0, _utils.validateType)("Identifier"),
  6571. typeParameters: (0, _utils.validateOptionalType)("TypeParameterDeclaration"),
  6572. right: (0, _utils.validateType)("FlowType")
  6573. }
  6574. });
  6575. (0, _utils.default)("DeclareOpaqueType", {
  6576. visitor: ["id", "typeParameters", "supertype"],
  6577. aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"],
  6578. fields: {
  6579. id: (0, _utils.validateType)("Identifier"),
  6580. typeParameters: (0, _utils.validateOptionalType)("TypeParameterDeclaration"),
  6581. supertype: (0, _utils.validateOptionalType)("FlowType")
  6582. }
  6583. });
  6584. (0, _utils.default)("DeclareVariable", {
  6585. visitor: ["id"],
  6586. aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"],
  6587. fields: {
  6588. id: (0, _utils.validateType)("Identifier")
  6589. }
  6590. });
  6591. (0, _utils.default)("DeclareExportDeclaration", {
  6592. visitor: ["declaration", "specifiers", "source"],
  6593. aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"],
  6594. fields: {
  6595. declaration: (0, _utils.validateOptionalType)("Flow"),
  6596. specifiers: (0, _utils.validateOptional)((0, _utils.arrayOfType)(["ExportSpecifier", "ExportNamespaceSpecifier"])),
  6597. source: (0, _utils.validateOptionalType)("StringLiteral"),
  6598. default: (0, _utils.validateOptional)((0, _utils.assertValueType)("boolean"))
  6599. }
  6600. });
  6601. (0, _utils.default)("DeclareExportAllDeclaration", {
  6602. visitor: ["source"],
  6603. aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"],
  6604. fields: {
  6605. source: (0, _utils.validateType)("StringLiteral"),
  6606. exportKind: (0, _utils.validateOptional)((0, _utils.assertOneOf)("type", "value"))
  6607. }
  6608. });
  6609. (0, _utils.default)("DeclaredPredicate", {
  6610. visitor: ["value"],
  6611. aliases: ["Flow", "FlowPredicate"],
  6612. fields: {
  6613. value: (0, _utils.validateType)("Flow")
  6614. }
  6615. });
  6616. (0, _utils.default)("ExistsTypeAnnotation", {
  6617. aliases: ["Flow", "FlowType"]
  6618. });
  6619. (0, _utils.default)("FunctionTypeAnnotation", {
  6620. visitor: ["typeParameters", "params", "rest", "returnType"],
  6621. aliases: ["Flow", "FlowType"],
  6622. fields: {
  6623. typeParameters: (0, _utils.validateOptionalType)("TypeParameterDeclaration"),
  6624. params: (0, _utils.validate)((0, _utils.arrayOfType)("FunctionTypeParam")),
  6625. rest: (0, _utils.validateOptionalType)("FunctionTypeParam"),
  6626. this: (0, _utils.validateOptionalType)("FunctionTypeParam"),
  6627. returnType: (0, _utils.validateType)("FlowType")
  6628. }
  6629. });
  6630. (0, _utils.default)("FunctionTypeParam", {
  6631. visitor: ["name", "typeAnnotation"],
  6632. aliases: ["Flow"],
  6633. fields: {
  6634. name: (0, _utils.validateOptionalType)("Identifier"),
  6635. typeAnnotation: (0, _utils.validateType)("FlowType"),
  6636. optional: (0, _utils.validateOptional)((0, _utils.assertValueType)("boolean"))
  6637. }
  6638. });
  6639. (0, _utils.default)("GenericTypeAnnotation", {
  6640. visitor: ["id", "typeParameters"],
  6641. aliases: ["Flow", "FlowType"],
  6642. fields: {
  6643. id: (0, _utils.validateType)(["Identifier", "QualifiedTypeIdentifier"]),
  6644. typeParameters: (0, _utils.validateOptionalType)("TypeParameterInstantiation")
  6645. }
  6646. });
  6647. (0, _utils.default)("InferredPredicate", {
  6648. aliases: ["Flow", "FlowPredicate"]
  6649. });
  6650. (0, _utils.default)("InterfaceExtends", {
  6651. visitor: ["id", "typeParameters"],
  6652. aliases: ["Flow"],
  6653. fields: {
  6654. id: (0, _utils.validateType)(["Identifier", "QualifiedTypeIdentifier"]),
  6655. typeParameters: (0, _utils.validateOptionalType)("TypeParameterInstantiation")
  6656. }
  6657. });
  6658. defineInterfaceishType("InterfaceDeclaration");
  6659. (0, _utils.default)("InterfaceTypeAnnotation", {
  6660. visitor: ["extends", "body"],
  6661. aliases: ["Flow", "FlowType"],
  6662. fields: {
  6663. extends: (0, _utils.validateOptional)((0, _utils.arrayOfType)("InterfaceExtends")),
  6664. body: (0, _utils.validateType)("ObjectTypeAnnotation")
  6665. }
  6666. });
  6667. (0, _utils.default)("IntersectionTypeAnnotation", {
  6668. visitor: ["types"],
  6669. aliases: ["Flow", "FlowType"],
  6670. fields: {
  6671. types: (0, _utils.validate)((0, _utils.arrayOfType)("FlowType"))
  6672. }
  6673. });
  6674. (0, _utils.default)("MixedTypeAnnotation", {
  6675. aliases: ["Flow", "FlowType", "FlowBaseAnnotation"]
  6676. });
  6677. (0, _utils.default)("EmptyTypeAnnotation", {
  6678. aliases: ["Flow", "FlowType", "FlowBaseAnnotation"]
  6679. });
  6680. (0, _utils.default)("NullableTypeAnnotation", {
  6681. visitor: ["typeAnnotation"],
  6682. aliases: ["Flow", "FlowType"],
  6683. fields: {
  6684. typeAnnotation: (0, _utils.validateType)("FlowType")
  6685. }
  6686. });
  6687. (0, _utils.default)("NumberLiteralTypeAnnotation", {
  6688. builder: ["value"],
  6689. aliases: ["Flow", "FlowType"],
  6690. fields: {
  6691. value: (0, _utils.validate)((0, _utils.assertValueType)("number"))
  6692. }
  6693. });
  6694. (0, _utils.default)("NumberTypeAnnotation", {
  6695. aliases: ["Flow", "FlowType", "FlowBaseAnnotation"]
  6696. });
  6697. (0, _utils.default)("ObjectTypeAnnotation", {
  6698. visitor: ["properties", "indexers", "callProperties", "internalSlots"],
  6699. aliases: ["Flow", "FlowType"],
  6700. builder: ["properties", "indexers", "callProperties", "internalSlots", "exact"],
  6701. fields: {
  6702. properties: (0, _utils.validate)((0, _utils.arrayOfType)(["ObjectTypeProperty", "ObjectTypeSpreadProperty"])),
  6703. indexers: (0, _utils.validateOptional)((0, _utils.arrayOfType)("ObjectTypeIndexer")),
  6704. callProperties: (0, _utils.validateOptional)((0, _utils.arrayOfType)("ObjectTypeCallProperty")),
  6705. internalSlots: (0, _utils.validateOptional)((0, _utils.arrayOfType)("ObjectTypeInternalSlot")),
  6706. exact: {
  6707. validate: (0, _utils.assertValueType)("boolean"),
  6708. default: false
  6709. },
  6710. inexact: (0, _utils.validateOptional)((0, _utils.assertValueType)("boolean"))
  6711. }
  6712. });
  6713. (0, _utils.default)("ObjectTypeInternalSlot", {
  6714. visitor: ["id", "value", "optional", "static", "method"],
  6715. aliases: ["Flow", "UserWhitespacable"],
  6716. fields: {
  6717. id: (0, _utils.validateType)("Identifier"),
  6718. value: (0, _utils.validateType)("FlowType"),
  6719. optional: (0, _utils.validate)((0, _utils.assertValueType)("boolean")),
  6720. static: (0, _utils.validate)((0, _utils.assertValueType)("boolean")),
  6721. method: (0, _utils.validate)((0, _utils.assertValueType)("boolean"))
  6722. }
  6723. });
  6724. (0, _utils.default)("ObjectTypeCallProperty", {
  6725. visitor: ["value"],
  6726. aliases: ["Flow", "UserWhitespacable"],
  6727. fields: {
  6728. value: (0, _utils.validateType)("FlowType"),
  6729. static: (0, _utils.validate)((0, _utils.assertValueType)("boolean"))
  6730. }
  6731. });
  6732. (0, _utils.default)("ObjectTypeIndexer", {
  6733. visitor: ["id", "key", "value", "variance"],
  6734. aliases: ["Flow", "UserWhitespacable"],
  6735. fields: {
  6736. id: (0, _utils.validateOptionalType)("Identifier"),
  6737. key: (0, _utils.validateType)("FlowType"),
  6738. value: (0, _utils.validateType)("FlowType"),
  6739. static: (0, _utils.validate)((0, _utils.assertValueType)("boolean")),
  6740. variance: (0, _utils.validateOptionalType)("Variance")
  6741. }
  6742. });
  6743. (0, _utils.default)("ObjectTypeProperty", {
  6744. visitor: ["key", "value", "variance"],
  6745. aliases: ["Flow", "UserWhitespacable"],
  6746. fields: {
  6747. key: (0, _utils.validateType)(["Identifier", "StringLiteral"]),
  6748. value: (0, _utils.validateType)("FlowType"),
  6749. kind: (0, _utils.validate)((0, _utils.assertOneOf)("init", "get", "set")),
  6750. static: (0, _utils.validate)((0, _utils.assertValueType)("boolean")),
  6751. proto: (0, _utils.validate)((0, _utils.assertValueType)("boolean")),
  6752. optional: (0, _utils.validate)((0, _utils.assertValueType)("boolean")),
  6753. variance: (0, _utils.validateOptionalType)("Variance"),
  6754. method: (0, _utils.validate)((0, _utils.assertValueType)("boolean"))
  6755. }
  6756. });
  6757. (0, _utils.default)("ObjectTypeSpreadProperty", {
  6758. visitor: ["argument"],
  6759. aliases: ["Flow", "UserWhitespacable"],
  6760. fields: {
  6761. argument: (0, _utils.validateType)("FlowType")
  6762. }
  6763. });
  6764. (0, _utils.default)("OpaqueType", {
  6765. visitor: ["id", "typeParameters", "supertype", "impltype"],
  6766. aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"],
  6767. fields: {
  6768. id: (0, _utils.validateType)("Identifier"),
  6769. typeParameters: (0, _utils.validateOptionalType)("TypeParameterDeclaration"),
  6770. supertype: (0, _utils.validateOptionalType)("FlowType"),
  6771. impltype: (0, _utils.validateType)("FlowType")
  6772. }
  6773. });
  6774. (0, _utils.default)("QualifiedTypeIdentifier", {
  6775. visitor: ["id", "qualification"],
  6776. aliases: ["Flow"],
  6777. fields: {
  6778. id: (0, _utils.validateType)("Identifier"),
  6779. qualification: (0, _utils.validateType)(["Identifier", "QualifiedTypeIdentifier"])
  6780. }
  6781. });
  6782. (0, _utils.default)("StringLiteralTypeAnnotation", {
  6783. builder: ["value"],
  6784. aliases: ["Flow", "FlowType"],
  6785. fields: {
  6786. value: (0, _utils.validate)((0, _utils.assertValueType)("string"))
  6787. }
  6788. });
  6789. (0, _utils.default)("StringTypeAnnotation", {
  6790. aliases: ["Flow", "FlowType", "FlowBaseAnnotation"]
  6791. });
  6792. (0, _utils.default)("SymbolTypeAnnotation", {
  6793. aliases: ["Flow", "FlowType", "FlowBaseAnnotation"]
  6794. });
  6795. (0, _utils.default)("ThisTypeAnnotation", {
  6796. aliases: ["Flow", "FlowType", "FlowBaseAnnotation"]
  6797. });
  6798. (0, _utils.default)("TupleTypeAnnotation", {
  6799. visitor: ["types"],
  6800. aliases: ["Flow", "FlowType"],
  6801. fields: {
  6802. types: (0, _utils.validate)((0, _utils.arrayOfType)("FlowType"))
  6803. }
  6804. });
  6805. (0, _utils.default)("TypeofTypeAnnotation", {
  6806. visitor: ["argument"],
  6807. aliases: ["Flow", "FlowType"],
  6808. fields: {
  6809. argument: (0, _utils.validateType)("FlowType")
  6810. }
  6811. });
  6812. (0, _utils.default)("TypeAlias", {
  6813. visitor: ["id", "typeParameters", "right"],
  6814. aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"],
  6815. fields: {
  6816. id: (0, _utils.validateType)("Identifier"),
  6817. typeParameters: (0, _utils.validateOptionalType)("TypeParameterDeclaration"),
  6818. right: (0, _utils.validateType)("FlowType")
  6819. }
  6820. });
  6821. (0, _utils.default)("TypeAnnotation", {
  6822. aliases: ["Flow"],
  6823. visitor: ["typeAnnotation"],
  6824. fields: {
  6825. typeAnnotation: (0, _utils.validateType)("FlowType")
  6826. }
  6827. });
  6828. (0, _utils.default)("TypeCastExpression", {
  6829. visitor: ["expression", "typeAnnotation"],
  6830. aliases: ["Flow", "ExpressionWrapper", "Expression"],
  6831. fields: {
  6832. expression: (0, _utils.validateType)("Expression"),
  6833. typeAnnotation: (0, _utils.validateType)("TypeAnnotation")
  6834. }
  6835. });
  6836. (0, _utils.default)("TypeParameter", {
  6837. aliases: ["Flow"],
  6838. visitor: ["bound", "default", "variance"],
  6839. fields: {
  6840. name: (0, _utils.validate)((0, _utils.assertValueType)("string")),
  6841. bound: (0, _utils.validateOptionalType)("TypeAnnotation"),
  6842. default: (0, _utils.validateOptionalType)("FlowType"),
  6843. variance: (0, _utils.validateOptionalType)("Variance")
  6844. }
  6845. });
  6846. (0, _utils.default)("TypeParameterDeclaration", {
  6847. aliases: ["Flow"],
  6848. visitor: ["params"],
  6849. fields: {
  6850. params: (0, _utils.validate)((0, _utils.arrayOfType)("TypeParameter"))
  6851. }
  6852. });
  6853. (0, _utils.default)("TypeParameterInstantiation", {
  6854. aliases: ["Flow"],
  6855. visitor: ["params"],
  6856. fields: {
  6857. params: (0, _utils.validate)((0, _utils.arrayOfType)("FlowType"))
  6858. }
  6859. });
  6860. (0, _utils.default)("UnionTypeAnnotation", {
  6861. visitor: ["types"],
  6862. aliases: ["Flow", "FlowType"],
  6863. fields: {
  6864. types: (0, _utils.validate)((0, _utils.arrayOfType)("FlowType"))
  6865. }
  6866. });
  6867. (0, _utils.default)("Variance", {
  6868. aliases: ["Flow"],
  6869. builder: ["kind"],
  6870. fields: {
  6871. kind: (0, _utils.validate)((0, _utils.assertOneOf)("minus", "plus"))
  6872. }
  6873. });
  6874. (0, _utils.default)("VoidTypeAnnotation", {
  6875. aliases: ["Flow", "FlowType", "FlowBaseAnnotation"]
  6876. });
  6877. (0, _utils.default)("EnumDeclaration", {
  6878. aliases: ["Statement", "Declaration"],
  6879. visitor: ["id", "body"],
  6880. fields: {
  6881. id: (0, _utils.validateType)("Identifier"),
  6882. body: (0, _utils.validateType)(["EnumBooleanBody", "EnumNumberBody", "EnumStringBody", "EnumSymbolBody"])
  6883. }
  6884. });
  6885. (0, _utils.default)("EnumBooleanBody", {
  6886. aliases: ["EnumBody"],
  6887. visitor: ["members"],
  6888. fields: {
  6889. explicitType: (0, _utils.validate)((0, _utils.assertValueType)("boolean")),
  6890. members: (0, _utils.validateArrayOfType)("EnumBooleanMember"),
  6891. hasUnknownMembers: (0, _utils.validate)((0, _utils.assertValueType)("boolean"))
  6892. }
  6893. });
  6894. (0, _utils.default)("EnumNumberBody", {
  6895. aliases: ["EnumBody"],
  6896. visitor: ["members"],
  6897. fields: {
  6898. explicitType: (0, _utils.validate)((0, _utils.assertValueType)("boolean")),
  6899. members: (0, _utils.validateArrayOfType)("EnumNumberMember"),
  6900. hasUnknownMembers: (0, _utils.validate)((0, _utils.assertValueType)("boolean"))
  6901. }
  6902. });
  6903. (0, _utils.default)("EnumStringBody", {
  6904. aliases: ["EnumBody"],
  6905. visitor: ["members"],
  6906. fields: {
  6907. explicitType: (0, _utils.validate)((0, _utils.assertValueType)("boolean")),
  6908. members: (0, _utils.validateArrayOfType)(["EnumStringMember", "EnumDefaultedMember"]),
  6909. hasUnknownMembers: (0, _utils.validate)((0, _utils.assertValueType)("boolean"))
  6910. }
  6911. });
  6912. (0, _utils.default)("EnumSymbolBody", {
  6913. aliases: ["EnumBody"],
  6914. visitor: ["members"],
  6915. fields: {
  6916. members: (0, _utils.validateArrayOfType)("EnumDefaultedMember"),
  6917. hasUnknownMembers: (0, _utils.validate)((0, _utils.assertValueType)("boolean"))
  6918. }
  6919. });
  6920. (0, _utils.default)("EnumBooleanMember", {
  6921. aliases: ["EnumMember"],
  6922. visitor: ["id"],
  6923. fields: {
  6924. id: (0, _utils.validateType)("Identifier"),
  6925. init: (0, _utils.validateType)("BooleanLiteral")
  6926. }
  6927. });
  6928. (0, _utils.default)("EnumNumberMember", {
  6929. aliases: ["EnumMember"],
  6930. visitor: ["id", "init"],
  6931. fields: {
  6932. id: (0, _utils.validateType)("Identifier"),
  6933. init: (0, _utils.validateType)("NumericLiteral")
  6934. }
  6935. });
  6936. (0, _utils.default)("EnumStringMember", {
  6937. aliases: ["EnumMember"],
  6938. visitor: ["id", "init"],
  6939. fields: {
  6940. id: (0, _utils.validateType)("Identifier"),
  6941. init: (0, _utils.validateType)("StringLiteral")
  6942. }
  6943. });
  6944. (0, _utils.default)("EnumDefaultedMember", {
  6945. aliases: ["EnumMember"],
  6946. visitor: ["id"],
  6947. fields: {
  6948. id: (0, _utils.validateType)("Identifier")
  6949. }
  6950. });
  6951. (0, _utils.default)("IndexedAccessType", {
  6952. visitor: ["objectType", "indexType"],
  6953. aliases: ["Flow", "FlowType"],
  6954. fields: {
  6955. objectType: (0, _utils.validateType)("FlowType"),
  6956. indexType: (0, _utils.validateType)("FlowType")
  6957. }
  6958. });
  6959. (0, _utils.default)("OptionalIndexedAccessType", {
  6960. visitor: ["objectType", "indexType"],
  6961. aliases: ["Flow", "FlowType"],
  6962. fields: {
  6963. objectType: (0, _utils.validateType)("FlowType"),
  6964. indexType: (0, _utils.validateType)("FlowType"),
  6965. optional: (0, _utils.validate)((0, _utils.assertValueType)("boolean"))
  6966. }
  6967. });
  6968. }
  6969. });
  6970. // node_modules/@babel/types/lib/definitions/jsx.js
  6971. var require_jsx = __commonJS({
  6972. "node_modules/@babel/types/lib/definitions/jsx.js"() {
  6973. "use strict";
  6974. var _utils = require_utils();
  6975. (0, _utils.default)("JSXAttribute", {
  6976. visitor: ["name", "value"],
  6977. aliases: ["JSX", "Immutable"],
  6978. fields: {
  6979. name: {
  6980. validate: (0, _utils.assertNodeType)("JSXIdentifier", "JSXNamespacedName")
  6981. },
  6982. value: {
  6983. optional: true,
  6984. validate: (0, _utils.assertNodeType)("JSXElement", "JSXFragment", "StringLiteral", "JSXExpressionContainer")
  6985. }
  6986. }
  6987. });
  6988. (0, _utils.default)("JSXClosingElement", {
  6989. visitor: ["name"],
  6990. aliases: ["JSX", "Immutable"],
  6991. fields: {
  6992. name: {
  6993. validate: (0, _utils.assertNodeType)("JSXIdentifier", "JSXMemberExpression", "JSXNamespacedName")
  6994. }
  6995. }
  6996. });
  6997. (0, _utils.default)("JSXElement", {
  6998. builder: ["openingElement", "closingElement", "children", "selfClosing"],
  6999. visitor: ["openingElement", "children", "closingElement"],
  7000. aliases: ["JSX", "Immutable", "Expression"],
  7001. fields: {
  7002. openingElement: {
  7003. validate: (0, _utils.assertNodeType)("JSXOpeningElement")
  7004. },
  7005. closingElement: {
  7006. optional: true,
  7007. validate: (0, _utils.assertNodeType)("JSXClosingElement")
  7008. },
  7009. children: {
  7010. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("JSXText", "JSXExpressionContainer", "JSXSpreadChild", "JSXElement", "JSXFragment")))
  7011. },
  7012. selfClosing: {
  7013. validate: (0, _utils.assertValueType)("boolean"),
  7014. optional: true
  7015. }
  7016. }
  7017. });
  7018. (0, _utils.default)("JSXEmptyExpression", {
  7019. aliases: ["JSX"]
  7020. });
  7021. (0, _utils.default)("JSXExpressionContainer", {
  7022. visitor: ["expression"],
  7023. aliases: ["JSX", "Immutable"],
  7024. fields: {
  7025. expression: {
  7026. validate: (0, _utils.assertNodeType)("Expression", "JSXEmptyExpression")
  7027. }
  7028. }
  7029. });
  7030. (0, _utils.default)("JSXSpreadChild", {
  7031. visitor: ["expression"],
  7032. aliases: ["JSX", "Immutable"],
  7033. fields: {
  7034. expression: {
  7035. validate: (0, _utils.assertNodeType)("Expression")
  7036. }
  7037. }
  7038. });
  7039. (0, _utils.default)("JSXIdentifier", {
  7040. builder: ["name"],
  7041. aliases: ["JSX"],
  7042. fields: {
  7043. name: {
  7044. validate: (0, _utils.assertValueType)("string")
  7045. }
  7046. }
  7047. });
  7048. (0, _utils.default)("JSXMemberExpression", {
  7049. visitor: ["object", "property"],
  7050. aliases: ["JSX"],
  7051. fields: {
  7052. object: {
  7053. validate: (0, _utils.assertNodeType)("JSXMemberExpression", "JSXIdentifier")
  7054. },
  7055. property: {
  7056. validate: (0, _utils.assertNodeType)("JSXIdentifier")
  7057. }
  7058. }
  7059. });
  7060. (0, _utils.default)("JSXNamespacedName", {
  7061. visitor: ["namespace", "name"],
  7062. aliases: ["JSX"],
  7063. fields: {
  7064. namespace: {
  7065. validate: (0, _utils.assertNodeType)("JSXIdentifier")
  7066. },
  7067. name: {
  7068. validate: (0, _utils.assertNodeType)("JSXIdentifier")
  7069. }
  7070. }
  7071. });
  7072. (0, _utils.default)("JSXOpeningElement", {
  7073. builder: ["name", "attributes", "selfClosing"],
  7074. visitor: ["name", "attributes"],
  7075. aliases: ["JSX", "Immutable"],
  7076. fields: {
  7077. name: {
  7078. validate: (0, _utils.assertNodeType)("JSXIdentifier", "JSXMemberExpression", "JSXNamespacedName")
  7079. },
  7080. selfClosing: {
  7081. default: false
  7082. },
  7083. attributes: {
  7084. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("JSXAttribute", "JSXSpreadAttribute")))
  7085. },
  7086. typeParameters: {
  7087. validate: (0, _utils.assertNodeType)("TypeParameterInstantiation", "TSTypeParameterInstantiation"),
  7088. optional: true
  7089. }
  7090. }
  7091. });
  7092. (0, _utils.default)("JSXSpreadAttribute", {
  7093. visitor: ["argument"],
  7094. aliases: ["JSX"],
  7095. fields: {
  7096. argument: {
  7097. validate: (0, _utils.assertNodeType)("Expression")
  7098. }
  7099. }
  7100. });
  7101. (0, _utils.default)("JSXText", {
  7102. aliases: ["JSX", "Immutable"],
  7103. builder: ["value"],
  7104. fields: {
  7105. value: {
  7106. validate: (0, _utils.assertValueType)("string")
  7107. }
  7108. }
  7109. });
  7110. (0, _utils.default)("JSXFragment", {
  7111. builder: ["openingFragment", "closingFragment", "children"],
  7112. visitor: ["openingFragment", "children", "closingFragment"],
  7113. aliases: ["JSX", "Immutable", "Expression"],
  7114. fields: {
  7115. openingFragment: {
  7116. validate: (0, _utils.assertNodeType)("JSXOpeningFragment")
  7117. },
  7118. closingFragment: {
  7119. validate: (0, _utils.assertNodeType)("JSXClosingFragment")
  7120. },
  7121. children: {
  7122. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("JSXText", "JSXExpressionContainer", "JSXSpreadChild", "JSXElement", "JSXFragment")))
  7123. }
  7124. }
  7125. });
  7126. (0, _utils.default)("JSXOpeningFragment", {
  7127. aliases: ["JSX", "Immutable"]
  7128. });
  7129. (0, _utils.default)("JSXClosingFragment", {
  7130. aliases: ["JSX", "Immutable"]
  7131. });
  7132. }
  7133. });
  7134. // node_modules/@babel/types/lib/definitions/placeholders.js
  7135. var require_placeholders = __commonJS({
  7136. "node_modules/@babel/types/lib/definitions/placeholders.js"(exports) {
  7137. "use strict";
  7138. Object.defineProperty(exports, "__esModule", {
  7139. value: true
  7140. });
  7141. exports.PLACEHOLDERS_FLIPPED_ALIAS = exports.PLACEHOLDERS_ALIAS = exports.PLACEHOLDERS = void 0;
  7142. var _utils = require_utils();
  7143. var PLACEHOLDERS = ["Identifier", "StringLiteral", "Expression", "Statement", "Declaration", "BlockStatement", "ClassBody", "Pattern"];
  7144. exports.PLACEHOLDERS = PLACEHOLDERS;
  7145. var PLACEHOLDERS_ALIAS = {
  7146. Declaration: ["Statement"],
  7147. Pattern: ["PatternLike", "LVal"]
  7148. };
  7149. exports.PLACEHOLDERS_ALIAS = PLACEHOLDERS_ALIAS;
  7150. for (const type of PLACEHOLDERS) {
  7151. const alias = _utils.ALIAS_KEYS[type];
  7152. if (alias != null && alias.length)
  7153. PLACEHOLDERS_ALIAS[type] = alias;
  7154. }
  7155. var PLACEHOLDERS_FLIPPED_ALIAS = {};
  7156. exports.PLACEHOLDERS_FLIPPED_ALIAS = PLACEHOLDERS_FLIPPED_ALIAS;
  7157. Object.keys(PLACEHOLDERS_ALIAS).forEach((type) => {
  7158. PLACEHOLDERS_ALIAS[type].forEach((alias) => {
  7159. if (!Object.hasOwnProperty.call(PLACEHOLDERS_FLIPPED_ALIAS, alias)) {
  7160. PLACEHOLDERS_FLIPPED_ALIAS[alias] = [];
  7161. }
  7162. PLACEHOLDERS_FLIPPED_ALIAS[alias].push(type);
  7163. });
  7164. });
  7165. }
  7166. });
  7167. // node_modules/@babel/types/lib/definitions/misc.js
  7168. var require_misc = __commonJS({
  7169. "node_modules/@babel/types/lib/definitions/misc.js"() {
  7170. "use strict";
  7171. var _utils = require_utils();
  7172. var _placeholders = require_placeholders();
  7173. {
  7174. (0, _utils.default)("Noop", {
  7175. visitor: []
  7176. });
  7177. }
  7178. (0, _utils.default)("Placeholder", {
  7179. visitor: [],
  7180. builder: ["expectedNode", "name"],
  7181. fields: {
  7182. name: {
  7183. validate: (0, _utils.assertNodeType)("Identifier")
  7184. },
  7185. expectedNode: {
  7186. validate: (0, _utils.assertOneOf)(..._placeholders.PLACEHOLDERS)
  7187. }
  7188. }
  7189. });
  7190. (0, _utils.default)("V8IntrinsicIdentifier", {
  7191. builder: ["name"],
  7192. fields: {
  7193. name: {
  7194. validate: (0, _utils.assertValueType)("string")
  7195. }
  7196. }
  7197. });
  7198. }
  7199. });
  7200. // node_modules/@babel/types/lib/definitions/experimental.js
  7201. var require_experimental = __commonJS({
  7202. "node_modules/@babel/types/lib/definitions/experimental.js"() {
  7203. "use strict";
  7204. var _utils = require_utils();
  7205. (0, _utils.default)("ArgumentPlaceholder", {});
  7206. (0, _utils.default)("BindExpression", {
  7207. visitor: ["object", "callee"],
  7208. aliases: ["Expression"],
  7209. fields: !process.env.BABEL_TYPES_8_BREAKING ? {
  7210. object: {
  7211. validate: Object.assign(() => {
  7212. }, {
  7213. oneOfNodeTypes: ["Expression"]
  7214. })
  7215. },
  7216. callee: {
  7217. validate: Object.assign(() => {
  7218. }, {
  7219. oneOfNodeTypes: ["Expression"]
  7220. })
  7221. }
  7222. } : {
  7223. object: {
  7224. validate: (0, _utils.assertNodeType)("Expression")
  7225. },
  7226. callee: {
  7227. validate: (0, _utils.assertNodeType)("Expression")
  7228. }
  7229. }
  7230. });
  7231. (0, _utils.default)("PipelineTopicExpression", {
  7232. builder: ["expression"],
  7233. visitor: ["expression"],
  7234. fields: {
  7235. expression: {
  7236. validate: (0, _utils.assertNodeType)("Expression")
  7237. }
  7238. }
  7239. });
  7240. (0, _utils.default)("PipelineBareFunction", {
  7241. builder: ["callee"],
  7242. visitor: ["callee"],
  7243. fields: {
  7244. callee: {
  7245. validate: (0, _utils.assertNodeType)("Expression")
  7246. }
  7247. }
  7248. });
  7249. (0, _utils.default)("PipelinePrimaryTopicReference", {
  7250. aliases: ["Expression"]
  7251. });
  7252. (0, _utils.default)("ImportAttribute", {
  7253. visitor: ["key", "value"],
  7254. fields: {
  7255. key: {
  7256. validate: (0, _utils.assertNodeType)("Identifier", "StringLiteral")
  7257. },
  7258. value: {
  7259. validate: (0, _utils.assertNodeType)("StringLiteral")
  7260. }
  7261. }
  7262. });
  7263. (0, _utils.default)("Decorator", {
  7264. visitor: ["expression"],
  7265. fields: {
  7266. expression: {
  7267. validate: (0, _utils.assertNodeType)("Expression")
  7268. }
  7269. }
  7270. });
  7271. (0, _utils.default)("DoExpression", {
  7272. visitor: ["body"],
  7273. builder: ["body", "async"],
  7274. aliases: ["Expression"],
  7275. fields: {
  7276. body: {
  7277. validate: (0, _utils.assertNodeType)("BlockStatement")
  7278. },
  7279. async: {
  7280. validate: (0, _utils.assertValueType)("boolean"),
  7281. default: false
  7282. }
  7283. }
  7284. });
  7285. (0, _utils.default)("ExportDefaultSpecifier", {
  7286. visitor: ["exported"],
  7287. aliases: ["ModuleSpecifier"],
  7288. fields: {
  7289. exported: {
  7290. validate: (0, _utils.assertNodeType)("Identifier")
  7291. }
  7292. }
  7293. });
  7294. (0, _utils.default)("RecordExpression", {
  7295. visitor: ["properties"],
  7296. aliases: ["Expression"],
  7297. fields: {
  7298. properties: {
  7299. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("ObjectProperty", "SpreadElement")))
  7300. }
  7301. }
  7302. });
  7303. (0, _utils.default)("TupleExpression", {
  7304. fields: {
  7305. elements: {
  7306. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Expression", "SpreadElement"))),
  7307. default: []
  7308. }
  7309. },
  7310. visitor: ["elements"],
  7311. aliases: ["Expression"]
  7312. });
  7313. (0, _utils.default)("DecimalLiteral", {
  7314. builder: ["value"],
  7315. fields: {
  7316. value: {
  7317. validate: (0, _utils.assertValueType)("string")
  7318. }
  7319. },
  7320. aliases: ["Expression", "Pureish", "Literal", "Immutable"]
  7321. });
  7322. (0, _utils.default)("StaticBlock", {
  7323. visitor: ["body"],
  7324. fields: {
  7325. body: {
  7326. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Statement")))
  7327. }
  7328. },
  7329. aliases: ["Scopable", "BlockParent"]
  7330. });
  7331. (0, _utils.default)("ModuleExpression", {
  7332. visitor: ["body"],
  7333. fields: {
  7334. body: {
  7335. validate: (0, _utils.assertNodeType)("Program")
  7336. }
  7337. },
  7338. aliases: ["Expression"]
  7339. });
  7340. }
  7341. });
  7342. // node_modules/@babel/types/lib/definitions/typescript.js
  7343. var require_typescript = __commonJS({
  7344. "node_modules/@babel/types/lib/definitions/typescript.js"() {
  7345. "use strict";
  7346. var _utils = require_utils();
  7347. var _core = require_core();
  7348. var _is = require_is();
  7349. var bool = (0, _utils.assertValueType)("boolean");
  7350. var tSFunctionTypeAnnotationCommon = {
  7351. returnType: {
  7352. validate: (0, _utils.assertNodeType)("TSTypeAnnotation", "Noop"),
  7353. optional: true
  7354. },
  7355. typeParameters: {
  7356. validate: (0, _utils.assertNodeType)("TSTypeParameterDeclaration", "Noop"),
  7357. optional: true
  7358. }
  7359. };
  7360. (0, _utils.default)("TSParameterProperty", {
  7361. aliases: ["LVal"],
  7362. visitor: ["parameter"],
  7363. fields: {
  7364. accessibility: {
  7365. validate: (0, _utils.assertOneOf)("public", "private", "protected"),
  7366. optional: true
  7367. },
  7368. readonly: {
  7369. validate: (0, _utils.assertValueType)("boolean"),
  7370. optional: true
  7371. },
  7372. parameter: {
  7373. validate: (0, _utils.assertNodeType)("Identifier", "AssignmentPattern")
  7374. }
  7375. }
  7376. });
  7377. (0, _utils.default)("TSDeclareFunction", {
  7378. aliases: ["Statement", "Declaration"],
  7379. visitor: ["id", "typeParameters", "params", "returnType"],
  7380. fields: Object.assign({}, _core.functionDeclarationCommon, tSFunctionTypeAnnotationCommon)
  7381. });
  7382. (0, _utils.default)("TSDeclareMethod", {
  7383. visitor: ["decorators", "key", "typeParameters", "params", "returnType"],
  7384. fields: Object.assign({}, _core.classMethodOrDeclareMethodCommon, tSFunctionTypeAnnotationCommon)
  7385. });
  7386. (0, _utils.default)("TSQualifiedName", {
  7387. aliases: ["TSEntityName"],
  7388. visitor: ["left", "right"],
  7389. fields: {
  7390. left: (0, _utils.validateType)("TSEntityName"),
  7391. right: (0, _utils.validateType)("Identifier")
  7392. }
  7393. });
  7394. var signatureDeclarationCommon = {
  7395. typeParameters: (0, _utils.validateOptionalType)("TSTypeParameterDeclaration"),
  7396. parameters: (0, _utils.validateArrayOfType)(["Identifier", "RestElement"]),
  7397. typeAnnotation: (0, _utils.validateOptionalType)("TSTypeAnnotation")
  7398. };
  7399. var callConstructSignatureDeclaration = {
  7400. aliases: ["TSTypeElement"],
  7401. visitor: ["typeParameters", "parameters", "typeAnnotation"],
  7402. fields: signatureDeclarationCommon
  7403. };
  7404. (0, _utils.default)("TSCallSignatureDeclaration", callConstructSignatureDeclaration);
  7405. (0, _utils.default)("TSConstructSignatureDeclaration", callConstructSignatureDeclaration);
  7406. var namedTypeElementCommon = {
  7407. key: (0, _utils.validateType)("Expression"),
  7408. computed: (0, _utils.validate)(bool),
  7409. optional: (0, _utils.validateOptional)(bool)
  7410. };
  7411. (0, _utils.default)("TSPropertySignature", {
  7412. aliases: ["TSTypeElement"],
  7413. visitor: ["key", "typeAnnotation", "initializer"],
  7414. fields: Object.assign({}, namedTypeElementCommon, {
  7415. readonly: (0, _utils.validateOptional)(bool),
  7416. typeAnnotation: (0, _utils.validateOptionalType)("TSTypeAnnotation"),
  7417. initializer: (0, _utils.validateOptionalType)("Expression")
  7418. })
  7419. });
  7420. (0, _utils.default)("TSMethodSignature", {
  7421. aliases: ["TSTypeElement"],
  7422. visitor: ["key", "typeParameters", "parameters", "typeAnnotation"],
  7423. fields: Object.assign({}, signatureDeclarationCommon, namedTypeElementCommon, {
  7424. kind: {
  7425. validate: (0, _utils.assertOneOf)("method", "get", "set")
  7426. }
  7427. })
  7428. });
  7429. (0, _utils.default)("TSIndexSignature", {
  7430. aliases: ["TSTypeElement"],
  7431. visitor: ["parameters", "typeAnnotation"],
  7432. fields: {
  7433. readonly: (0, _utils.validateOptional)(bool),
  7434. static: (0, _utils.validateOptional)(bool),
  7435. parameters: (0, _utils.validateArrayOfType)("Identifier"),
  7436. typeAnnotation: (0, _utils.validateOptionalType)("TSTypeAnnotation")
  7437. }
  7438. });
  7439. var tsKeywordTypes = ["TSAnyKeyword", "TSBooleanKeyword", "TSBigIntKeyword", "TSIntrinsicKeyword", "TSNeverKeyword", "TSNullKeyword", "TSNumberKeyword", "TSObjectKeyword", "TSStringKeyword", "TSSymbolKeyword", "TSUndefinedKeyword", "TSUnknownKeyword", "TSVoidKeyword"];
  7440. for (const type of tsKeywordTypes) {
  7441. (0, _utils.default)(type, {
  7442. aliases: ["TSType", "TSBaseType"],
  7443. visitor: [],
  7444. fields: {}
  7445. });
  7446. }
  7447. (0, _utils.default)("TSThisType", {
  7448. aliases: ["TSType", "TSBaseType"],
  7449. visitor: [],
  7450. fields: {}
  7451. });
  7452. var fnOrCtrBase = {
  7453. aliases: ["TSType"],
  7454. visitor: ["typeParameters", "parameters", "typeAnnotation"]
  7455. };
  7456. (0, _utils.default)("TSFunctionType", Object.assign({}, fnOrCtrBase, {
  7457. fields: signatureDeclarationCommon
  7458. }));
  7459. (0, _utils.default)("TSConstructorType", Object.assign({}, fnOrCtrBase, {
  7460. fields: Object.assign({}, signatureDeclarationCommon, {
  7461. abstract: (0, _utils.validateOptional)(bool)
  7462. })
  7463. }));
  7464. (0, _utils.default)("TSTypeReference", {
  7465. aliases: ["TSType"],
  7466. visitor: ["typeName", "typeParameters"],
  7467. fields: {
  7468. typeName: (0, _utils.validateType)("TSEntityName"),
  7469. typeParameters: (0, _utils.validateOptionalType)("TSTypeParameterInstantiation")
  7470. }
  7471. });
  7472. (0, _utils.default)("TSTypePredicate", {
  7473. aliases: ["TSType"],
  7474. visitor: ["parameterName", "typeAnnotation"],
  7475. builder: ["parameterName", "typeAnnotation", "asserts"],
  7476. fields: {
  7477. parameterName: (0, _utils.validateType)(["Identifier", "TSThisType"]),
  7478. typeAnnotation: (0, _utils.validateOptionalType)("TSTypeAnnotation"),
  7479. asserts: (0, _utils.validateOptional)(bool)
  7480. }
  7481. });
  7482. (0, _utils.default)("TSTypeQuery", {
  7483. aliases: ["TSType"],
  7484. visitor: ["exprName"],
  7485. fields: {
  7486. exprName: (0, _utils.validateType)(["TSEntityName", "TSImportType"])
  7487. }
  7488. });
  7489. (0, _utils.default)("TSTypeLiteral", {
  7490. aliases: ["TSType"],
  7491. visitor: ["members"],
  7492. fields: {
  7493. members: (0, _utils.validateArrayOfType)("TSTypeElement")
  7494. }
  7495. });
  7496. (0, _utils.default)("TSArrayType", {
  7497. aliases: ["TSType"],
  7498. visitor: ["elementType"],
  7499. fields: {
  7500. elementType: (0, _utils.validateType)("TSType")
  7501. }
  7502. });
  7503. (0, _utils.default)("TSTupleType", {
  7504. aliases: ["TSType"],
  7505. visitor: ["elementTypes"],
  7506. fields: {
  7507. elementTypes: (0, _utils.validateArrayOfType)(["TSType", "TSNamedTupleMember"])
  7508. }
  7509. });
  7510. (0, _utils.default)("TSOptionalType", {
  7511. aliases: ["TSType"],
  7512. visitor: ["typeAnnotation"],
  7513. fields: {
  7514. typeAnnotation: (0, _utils.validateType)("TSType")
  7515. }
  7516. });
  7517. (0, _utils.default)("TSRestType", {
  7518. aliases: ["TSType"],
  7519. visitor: ["typeAnnotation"],
  7520. fields: {
  7521. typeAnnotation: (0, _utils.validateType)("TSType")
  7522. }
  7523. });
  7524. (0, _utils.default)("TSNamedTupleMember", {
  7525. visitor: ["label", "elementType"],
  7526. builder: ["label", "elementType", "optional"],
  7527. fields: {
  7528. label: (0, _utils.validateType)("Identifier"),
  7529. optional: {
  7530. validate: bool,
  7531. default: false
  7532. },
  7533. elementType: (0, _utils.validateType)("TSType")
  7534. }
  7535. });
  7536. var unionOrIntersection = {
  7537. aliases: ["TSType"],
  7538. visitor: ["types"],
  7539. fields: {
  7540. types: (0, _utils.validateArrayOfType)("TSType")
  7541. }
  7542. };
  7543. (0, _utils.default)("TSUnionType", unionOrIntersection);
  7544. (0, _utils.default)("TSIntersectionType", unionOrIntersection);
  7545. (0, _utils.default)("TSConditionalType", {
  7546. aliases: ["TSType"],
  7547. visitor: ["checkType", "extendsType", "trueType", "falseType"],
  7548. fields: {
  7549. checkType: (0, _utils.validateType)("TSType"),
  7550. extendsType: (0, _utils.validateType)("TSType"),
  7551. trueType: (0, _utils.validateType)("TSType"),
  7552. falseType: (0, _utils.validateType)("TSType")
  7553. }
  7554. });
  7555. (0, _utils.default)("TSInferType", {
  7556. aliases: ["TSType"],
  7557. visitor: ["typeParameter"],
  7558. fields: {
  7559. typeParameter: (0, _utils.validateType)("TSTypeParameter")
  7560. }
  7561. });
  7562. (0, _utils.default)("TSParenthesizedType", {
  7563. aliases: ["TSType"],
  7564. visitor: ["typeAnnotation"],
  7565. fields: {
  7566. typeAnnotation: (0, _utils.validateType)("TSType")
  7567. }
  7568. });
  7569. (0, _utils.default)("TSTypeOperator", {
  7570. aliases: ["TSType"],
  7571. visitor: ["typeAnnotation"],
  7572. fields: {
  7573. operator: (0, _utils.validate)((0, _utils.assertValueType)("string")),
  7574. typeAnnotation: (0, _utils.validateType)("TSType")
  7575. }
  7576. });
  7577. (0, _utils.default)("TSIndexedAccessType", {
  7578. aliases: ["TSType"],
  7579. visitor: ["objectType", "indexType"],
  7580. fields: {
  7581. objectType: (0, _utils.validateType)("TSType"),
  7582. indexType: (0, _utils.validateType)("TSType")
  7583. }
  7584. });
  7585. (0, _utils.default)("TSMappedType", {
  7586. aliases: ["TSType"],
  7587. visitor: ["typeParameter", "typeAnnotation", "nameType"],
  7588. fields: {
  7589. readonly: (0, _utils.validateOptional)(bool),
  7590. typeParameter: (0, _utils.validateType)("TSTypeParameter"),
  7591. optional: (0, _utils.validateOptional)(bool),
  7592. typeAnnotation: (0, _utils.validateOptionalType)("TSType"),
  7593. nameType: (0, _utils.validateOptionalType)("TSType")
  7594. }
  7595. });
  7596. (0, _utils.default)("TSLiteralType", {
  7597. aliases: ["TSType", "TSBaseType"],
  7598. visitor: ["literal"],
  7599. fields: {
  7600. literal: {
  7601. validate: function() {
  7602. const unaryExpression = (0, _utils.assertNodeType)("NumericLiteral", "BigIntLiteral");
  7603. const unaryOperator = (0, _utils.assertOneOf)("-");
  7604. const literal2 = (0, _utils.assertNodeType)("NumericLiteral", "StringLiteral", "BooleanLiteral", "BigIntLiteral");
  7605. function validator(parent, key, node) {
  7606. if ((0, _is.default)("UnaryExpression", node)) {
  7607. unaryOperator(node, "operator", node.operator);
  7608. unaryExpression(node, "argument", node.argument);
  7609. } else {
  7610. literal2(parent, key, node);
  7611. }
  7612. }
  7613. validator.oneOfNodeTypes = ["NumericLiteral", "StringLiteral", "BooleanLiteral", "BigIntLiteral", "UnaryExpression"];
  7614. return validator;
  7615. }()
  7616. }
  7617. }
  7618. });
  7619. (0, _utils.default)("TSExpressionWithTypeArguments", {
  7620. aliases: ["TSType"],
  7621. visitor: ["expression", "typeParameters"],
  7622. fields: {
  7623. expression: (0, _utils.validateType)("TSEntityName"),
  7624. typeParameters: (0, _utils.validateOptionalType)("TSTypeParameterInstantiation")
  7625. }
  7626. });
  7627. (0, _utils.default)("TSInterfaceDeclaration", {
  7628. aliases: ["Statement", "Declaration"],
  7629. visitor: ["id", "typeParameters", "extends", "body"],
  7630. fields: {
  7631. declare: (0, _utils.validateOptional)(bool),
  7632. id: (0, _utils.validateType)("Identifier"),
  7633. typeParameters: (0, _utils.validateOptionalType)("TSTypeParameterDeclaration"),
  7634. extends: (0, _utils.validateOptional)((0, _utils.arrayOfType)("TSExpressionWithTypeArguments")),
  7635. body: (0, _utils.validateType)("TSInterfaceBody")
  7636. }
  7637. });
  7638. (0, _utils.default)("TSInterfaceBody", {
  7639. visitor: ["body"],
  7640. fields: {
  7641. body: (0, _utils.validateArrayOfType)("TSTypeElement")
  7642. }
  7643. });
  7644. (0, _utils.default)("TSTypeAliasDeclaration", {
  7645. aliases: ["Statement", "Declaration"],
  7646. visitor: ["id", "typeParameters", "typeAnnotation"],
  7647. fields: {
  7648. declare: (0, _utils.validateOptional)(bool),
  7649. id: (0, _utils.validateType)("Identifier"),
  7650. typeParameters: (0, _utils.validateOptionalType)("TSTypeParameterDeclaration"),
  7651. typeAnnotation: (0, _utils.validateType)("TSType")
  7652. }
  7653. });
  7654. (0, _utils.default)("TSAsExpression", {
  7655. aliases: ["Expression"],
  7656. visitor: ["expression", "typeAnnotation"],
  7657. fields: {
  7658. expression: (0, _utils.validateType)("Expression"),
  7659. typeAnnotation: (0, _utils.validateType)("TSType")
  7660. }
  7661. });
  7662. (0, _utils.default)("TSTypeAssertion", {
  7663. aliases: ["Expression"],
  7664. visitor: ["typeAnnotation", "expression"],
  7665. fields: {
  7666. typeAnnotation: (0, _utils.validateType)("TSType"),
  7667. expression: (0, _utils.validateType)("Expression")
  7668. }
  7669. });
  7670. (0, _utils.default)("TSEnumDeclaration", {
  7671. aliases: ["Statement", "Declaration"],
  7672. visitor: ["id", "members"],
  7673. fields: {
  7674. declare: (0, _utils.validateOptional)(bool),
  7675. const: (0, _utils.validateOptional)(bool),
  7676. id: (0, _utils.validateType)("Identifier"),
  7677. members: (0, _utils.validateArrayOfType)("TSEnumMember"),
  7678. initializer: (0, _utils.validateOptionalType)("Expression")
  7679. }
  7680. });
  7681. (0, _utils.default)("TSEnumMember", {
  7682. visitor: ["id", "initializer"],
  7683. fields: {
  7684. id: (0, _utils.validateType)(["Identifier", "StringLiteral"]),
  7685. initializer: (0, _utils.validateOptionalType)("Expression")
  7686. }
  7687. });
  7688. (0, _utils.default)("TSModuleDeclaration", {
  7689. aliases: ["Statement", "Declaration"],
  7690. visitor: ["id", "body"],
  7691. fields: {
  7692. declare: (0, _utils.validateOptional)(bool),
  7693. global: (0, _utils.validateOptional)(bool),
  7694. id: (0, _utils.validateType)(["Identifier", "StringLiteral"]),
  7695. body: (0, _utils.validateType)(["TSModuleBlock", "TSModuleDeclaration"])
  7696. }
  7697. });
  7698. (0, _utils.default)("TSModuleBlock", {
  7699. aliases: ["Scopable", "Block", "BlockParent"],
  7700. visitor: ["body"],
  7701. fields: {
  7702. body: (0, _utils.validateArrayOfType)("Statement")
  7703. }
  7704. });
  7705. (0, _utils.default)("TSImportType", {
  7706. aliases: ["TSType"],
  7707. visitor: ["argument", "qualifier", "typeParameters"],
  7708. fields: {
  7709. argument: (0, _utils.validateType)("StringLiteral"),
  7710. qualifier: (0, _utils.validateOptionalType)("TSEntityName"),
  7711. typeParameters: (0, _utils.validateOptionalType)("TSTypeParameterInstantiation")
  7712. }
  7713. });
  7714. (0, _utils.default)("TSImportEqualsDeclaration", {
  7715. aliases: ["Statement"],
  7716. visitor: ["id", "moduleReference"],
  7717. fields: {
  7718. isExport: (0, _utils.validate)(bool),
  7719. id: (0, _utils.validateType)("Identifier"),
  7720. moduleReference: (0, _utils.validateType)(["TSEntityName", "TSExternalModuleReference"])
  7721. }
  7722. });
  7723. (0, _utils.default)("TSExternalModuleReference", {
  7724. visitor: ["expression"],
  7725. fields: {
  7726. expression: (0, _utils.validateType)("StringLiteral")
  7727. }
  7728. });
  7729. (0, _utils.default)("TSNonNullExpression", {
  7730. aliases: ["Expression"],
  7731. visitor: ["expression"],
  7732. fields: {
  7733. expression: (0, _utils.validateType)("Expression")
  7734. }
  7735. });
  7736. (0, _utils.default)("TSExportAssignment", {
  7737. aliases: ["Statement"],
  7738. visitor: ["expression"],
  7739. fields: {
  7740. expression: (0, _utils.validateType)("Expression")
  7741. }
  7742. });
  7743. (0, _utils.default)("TSNamespaceExportDeclaration", {
  7744. aliases: ["Statement"],
  7745. visitor: ["id"],
  7746. fields: {
  7747. id: (0, _utils.validateType)("Identifier")
  7748. }
  7749. });
  7750. (0, _utils.default)("TSTypeAnnotation", {
  7751. visitor: ["typeAnnotation"],
  7752. fields: {
  7753. typeAnnotation: {
  7754. validate: (0, _utils.assertNodeType)("TSType")
  7755. }
  7756. }
  7757. });
  7758. (0, _utils.default)("TSTypeParameterInstantiation", {
  7759. visitor: ["params"],
  7760. fields: {
  7761. params: {
  7762. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("TSType")))
  7763. }
  7764. }
  7765. });
  7766. (0, _utils.default)("TSTypeParameterDeclaration", {
  7767. visitor: ["params"],
  7768. fields: {
  7769. params: {
  7770. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("TSTypeParameter")))
  7771. }
  7772. }
  7773. });
  7774. (0, _utils.default)("TSTypeParameter", {
  7775. builder: ["constraint", "default", "name"],
  7776. visitor: ["constraint", "default"],
  7777. fields: {
  7778. name: {
  7779. validate: (0, _utils.assertValueType)("string")
  7780. },
  7781. constraint: {
  7782. validate: (0, _utils.assertNodeType)("TSType"),
  7783. optional: true
  7784. },
  7785. default: {
  7786. validate: (0, _utils.assertNodeType)("TSType"),
  7787. optional: true
  7788. }
  7789. }
  7790. });
  7791. }
  7792. });
  7793. // node_modules/@babel/types/lib/definitions/index.js
  7794. var require_definitions = __commonJS({
  7795. "node_modules/@babel/types/lib/definitions/index.js"(exports) {
  7796. "use strict";
  7797. Object.defineProperty(exports, "__esModule", {
  7798. value: true
  7799. });
  7800. Object.defineProperty(exports, "VISITOR_KEYS", {
  7801. enumerable: true,
  7802. get: function() {
  7803. return _utils.VISITOR_KEYS;
  7804. }
  7805. });
  7806. Object.defineProperty(exports, "ALIAS_KEYS", {
  7807. enumerable: true,
  7808. get: function() {
  7809. return _utils.ALIAS_KEYS;
  7810. }
  7811. });
  7812. Object.defineProperty(exports, "FLIPPED_ALIAS_KEYS", {
  7813. enumerable: true,
  7814. get: function() {
  7815. return _utils.FLIPPED_ALIAS_KEYS;
  7816. }
  7817. });
  7818. Object.defineProperty(exports, "NODE_FIELDS", {
  7819. enumerable: true,
  7820. get: function() {
  7821. return _utils.NODE_FIELDS;
  7822. }
  7823. });
  7824. Object.defineProperty(exports, "BUILDER_KEYS", {
  7825. enumerable: true,
  7826. get: function() {
  7827. return _utils.BUILDER_KEYS;
  7828. }
  7829. });
  7830. Object.defineProperty(exports, "DEPRECATED_KEYS", {
  7831. enumerable: true,
  7832. get: function() {
  7833. return _utils.DEPRECATED_KEYS;
  7834. }
  7835. });
  7836. Object.defineProperty(exports, "NODE_PARENT_VALIDATIONS", {
  7837. enumerable: true,
  7838. get: function() {
  7839. return _utils.NODE_PARENT_VALIDATIONS;
  7840. }
  7841. });
  7842. Object.defineProperty(exports, "PLACEHOLDERS", {
  7843. enumerable: true,
  7844. get: function() {
  7845. return _placeholders.PLACEHOLDERS;
  7846. }
  7847. });
  7848. Object.defineProperty(exports, "PLACEHOLDERS_ALIAS", {
  7849. enumerable: true,
  7850. get: function() {
  7851. return _placeholders.PLACEHOLDERS_ALIAS;
  7852. }
  7853. });
  7854. Object.defineProperty(exports, "PLACEHOLDERS_FLIPPED_ALIAS", {
  7855. enumerable: true,
  7856. get: function() {
  7857. return _placeholders.PLACEHOLDERS_FLIPPED_ALIAS;
  7858. }
  7859. });
  7860. exports.TYPES = void 0;
  7861. var _toFastProperties = require_to_fast_properties();
  7862. require_core();
  7863. require_flow();
  7864. require_jsx();
  7865. require_misc();
  7866. require_experimental();
  7867. require_typescript();
  7868. var _utils = require_utils();
  7869. var _placeholders = require_placeholders();
  7870. _toFastProperties(_utils.VISITOR_KEYS);
  7871. _toFastProperties(_utils.ALIAS_KEYS);
  7872. _toFastProperties(_utils.FLIPPED_ALIAS_KEYS);
  7873. _toFastProperties(_utils.NODE_FIELDS);
  7874. _toFastProperties(_utils.BUILDER_KEYS);
  7875. _toFastProperties(_utils.DEPRECATED_KEYS);
  7876. _toFastProperties(_placeholders.PLACEHOLDERS_ALIAS);
  7877. _toFastProperties(_placeholders.PLACEHOLDERS_FLIPPED_ALIAS);
  7878. var TYPES = Object.keys(_utils.VISITOR_KEYS).concat(Object.keys(_utils.FLIPPED_ALIAS_KEYS)).concat(Object.keys(_utils.DEPRECATED_KEYS));
  7879. exports.TYPES = TYPES;
  7880. }
  7881. });
  7882. // node_modules/@babel/types/lib/builders/builder.js
  7883. var require_builder = __commonJS({
  7884. "node_modules/@babel/types/lib/builders/builder.js"(exports) {
  7885. "use strict";
  7886. Object.defineProperty(exports, "__esModule", {
  7887. value: true
  7888. });
  7889. exports.default = builder;
  7890. var _definitions = require_definitions();
  7891. var _validate = require_validate();
  7892. function builder(type, ...args) {
  7893. const keys2 = _definitions.BUILDER_KEYS[type];
  7894. const countArgs = args.length;
  7895. if (countArgs > keys2.length) {
  7896. throw new Error(`${type}: Too many arguments passed. Received ${countArgs} but can receive no more than ${keys2.length}`);
  7897. }
  7898. const node = {
  7899. type
  7900. };
  7901. let i = 0;
  7902. keys2.forEach((key) => {
  7903. const field = _definitions.NODE_FIELDS[type][key];
  7904. let arg;
  7905. if (i < countArgs)
  7906. arg = args[i];
  7907. if (arg === void 0) {
  7908. arg = Array.isArray(field.default) ? [] : field.default;
  7909. }
  7910. node[key] = arg;
  7911. i++;
  7912. });
  7913. for (const key of Object.keys(node)) {
  7914. (0, _validate.default)(node, key, node[key]);
  7915. }
  7916. return node;
  7917. }
  7918. }
  7919. });
  7920. // node_modules/@babel/types/lib/builders/generated/index.js
  7921. var require_generated2 = __commonJS({
  7922. "node_modules/@babel/types/lib/builders/generated/index.js"(exports) {
  7923. "use strict";
  7924. Object.defineProperty(exports, "__esModule", {
  7925. value: true
  7926. });
  7927. exports.arrayExpression = arrayExpression;
  7928. exports.assignmentExpression = assignmentExpression;
  7929. exports.binaryExpression = binaryExpression;
  7930. exports.interpreterDirective = interpreterDirective;
  7931. exports.directive = directive;
  7932. exports.directiveLiteral = directiveLiteral;
  7933. exports.blockStatement = blockStatement;
  7934. exports.breakStatement = breakStatement;
  7935. exports.callExpression = callExpression;
  7936. exports.catchClause = catchClause;
  7937. exports.conditionalExpression = conditionalExpression;
  7938. exports.continueStatement = continueStatement;
  7939. exports.debuggerStatement = debuggerStatement;
  7940. exports.doWhileStatement = doWhileStatement;
  7941. exports.emptyStatement = emptyStatement;
  7942. exports.expressionStatement = expressionStatement;
  7943. exports.file = file;
  7944. exports.forInStatement = forInStatement;
  7945. exports.forStatement = forStatement;
  7946. exports.functionDeclaration = functionDeclaration;
  7947. exports.functionExpression = functionExpression;
  7948. exports.identifier = identifier;
  7949. exports.ifStatement = ifStatement;
  7950. exports.labeledStatement = labeledStatement;
  7951. exports.stringLiteral = stringLiteral;
  7952. exports.numericLiteral = numericLiteral;
  7953. exports.nullLiteral = nullLiteral;
  7954. exports.booleanLiteral = booleanLiteral;
  7955. exports.regExpLiteral = regExpLiteral;
  7956. exports.logicalExpression = logicalExpression;
  7957. exports.memberExpression = memberExpression;
  7958. exports.newExpression = newExpression;
  7959. exports.program = program;
  7960. exports.objectExpression = objectExpression;
  7961. exports.objectMethod = objectMethod;
  7962. exports.objectProperty = objectProperty;
  7963. exports.restElement = restElement;
  7964. exports.returnStatement = returnStatement;
  7965. exports.sequenceExpression = sequenceExpression;
  7966. exports.parenthesizedExpression = parenthesizedExpression;
  7967. exports.switchCase = switchCase;
  7968. exports.switchStatement = switchStatement;
  7969. exports.thisExpression = thisExpression;
  7970. exports.throwStatement = throwStatement;
  7971. exports.tryStatement = tryStatement;
  7972. exports.unaryExpression = unaryExpression;
  7973. exports.updateExpression = updateExpression;
  7974. exports.variableDeclaration = variableDeclaration;
  7975. exports.variableDeclarator = variableDeclarator;
  7976. exports.whileStatement = whileStatement;
  7977. exports.withStatement = withStatement;
  7978. exports.assignmentPattern = assignmentPattern;
  7979. exports.arrayPattern = arrayPattern;
  7980. exports.arrowFunctionExpression = arrowFunctionExpression;
  7981. exports.classBody = classBody;
  7982. exports.classExpression = classExpression;
  7983. exports.classDeclaration = classDeclaration;
  7984. exports.exportAllDeclaration = exportAllDeclaration;
  7985. exports.exportDefaultDeclaration = exportDefaultDeclaration;
  7986. exports.exportNamedDeclaration = exportNamedDeclaration;
  7987. exports.exportSpecifier = exportSpecifier;
  7988. exports.forOfStatement = forOfStatement;
  7989. exports.importDeclaration = importDeclaration;
  7990. exports.importDefaultSpecifier = importDefaultSpecifier;
  7991. exports.importNamespaceSpecifier = importNamespaceSpecifier;
  7992. exports.importSpecifier = importSpecifier;
  7993. exports.metaProperty = metaProperty;
  7994. exports.classMethod = classMethod;
  7995. exports.objectPattern = objectPattern;
  7996. exports.spreadElement = spreadElement;
  7997. exports.super = _super;
  7998. exports.taggedTemplateExpression = taggedTemplateExpression;
  7999. exports.templateElement = templateElement;
  8000. exports.templateLiteral = templateLiteral;
  8001. exports.yieldExpression = yieldExpression;
  8002. exports.awaitExpression = awaitExpression;
  8003. exports.import = _import;
  8004. exports.bigIntLiteral = bigIntLiteral;
  8005. exports.exportNamespaceSpecifier = exportNamespaceSpecifier;
  8006. exports.optionalMemberExpression = optionalMemberExpression;
  8007. exports.optionalCallExpression = optionalCallExpression;
  8008. exports.classProperty = classProperty;
  8009. exports.classPrivateProperty = classPrivateProperty;
  8010. exports.classPrivateMethod = classPrivateMethod;
  8011. exports.privateName = privateName;
  8012. exports.anyTypeAnnotation = anyTypeAnnotation;
  8013. exports.arrayTypeAnnotation = arrayTypeAnnotation;
  8014. exports.booleanTypeAnnotation = booleanTypeAnnotation;
  8015. exports.booleanLiteralTypeAnnotation = booleanLiteralTypeAnnotation;
  8016. exports.nullLiteralTypeAnnotation = nullLiteralTypeAnnotation;
  8017. exports.classImplements = classImplements;
  8018. exports.declareClass = declareClass;
  8019. exports.declareFunction = declareFunction;
  8020. exports.declareInterface = declareInterface;
  8021. exports.declareModule = declareModule;
  8022. exports.declareModuleExports = declareModuleExports;
  8023. exports.declareTypeAlias = declareTypeAlias;
  8024. exports.declareOpaqueType = declareOpaqueType;
  8025. exports.declareVariable = declareVariable;
  8026. exports.declareExportDeclaration = declareExportDeclaration;
  8027. exports.declareExportAllDeclaration = declareExportAllDeclaration;
  8028. exports.declaredPredicate = declaredPredicate;
  8029. exports.existsTypeAnnotation = existsTypeAnnotation;
  8030. exports.functionTypeAnnotation = functionTypeAnnotation;
  8031. exports.functionTypeParam = functionTypeParam;
  8032. exports.genericTypeAnnotation = genericTypeAnnotation;
  8033. exports.inferredPredicate = inferredPredicate;
  8034. exports.interfaceExtends = interfaceExtends;
  8035. exports.interfaceDeclaration = interfaceDeclaration;
  8036. exports.interfaceTypeAnnotation = interfaceTypeAnnotation;
  8037. exports.intersectionTypeAnnotation = intersectionTypeAnnotation;
  8038. exports.mixedTypeAnnotation = mixedTypeAnnotation;
  8039. exports.emptyTypeAnnotation = emptyTypeAnnotation;
  8040. exports.nullableTypeAnnotation = nullableTypeAnnotation;
  8041. exports.numberLiteralTypeAnnotation = numberLiteralTypeAnnotation;
  8042. exports.numberTypeAnnotation = numberTypeAnnotation;
  8043. exports.objectTypeAnnotation = objectTypeAnnotation;
  8044. exports.objectTypeInternalSlot = objectTypeInternalSlot;
  8045. exports.objectTypeCallProperty = objectTypeCallProperty;
  8046. exports.objectTypeIndexer = objectTypeIndexer;
  8047. exports.objectTypeProperty = objectTypeProperty;
  8048. exports.objectTypeSpreadProperty = objectTypeSpreadProperty;
  8049. exports.opaqueType = opaqueType;
  8050. exports.qualifiedTypeIdentifier = qualifiedTypeIdentifier;
  8051. exports.stringLiteralTypeAnnotation = stringLiteralTypeAnnotation;
  8052. exports.stringTypeAnnotation = stringTypeAnnotation;
  8053. exports.symbolTypeAnnotation = symbolTypeAnnotation;
  8054. exports.thisTypeAnnotation = thisTypeAnnotation;
  8055. exports.tupleTypeAnnotation = tupleTypeAnnotation;
  8056. exports.typeofTypeAnnotation = typeofTypeAnnotation;
  8057. exports.typeAlias = typeAlias;
  8058. exports.typeAnnotation = typeAnnotation;
  8059. exports.typeCastExpression = typeCastExpression;
  8060. exports.typeParameter = typeParameter;
  8061. exports.typeParameterDeclaration = typeParameterDeclaration;
  8062. exports.typeParameterInstantiation = typeParameterInstantiation;
  8063. exports.unionTypeAnnotation = unionTypeAnnotation;
  8064. exports.variance = variance;
  8065. exports.voidTypeAnnotation = voidTypeAnnotation;
  8066. exports.enumDeclaration = enumDeclaration;
  8067. exports.enumBooleanBody = enumBooleanBody;
  8068. exports.enumNumberBody = enumNumberBody;
  8069. exports.enumStringBody = enumStringBody;
  8070. exports.enumSymbolBody = enumSymbolBody;
  8071. exports.enumBooleanMember = enumBooleanMember;
  8072. exports.enumNumberMember = enumNumberMember;
  8073. exports.enumStringMember = enumStringMember;
  8074. exports.enumDefaultedMember = enumDefaultedMember;
  8075. exports.indexedAccessType = indexedAccessType;
  8076. exports.optionalIndexedAccessType = optionalIndexedAccessType;
  8077. exports.jSXAttribute = exports.jsxAttribute = jsxAttribute;
  8078. exports.jSXClosingElement = exports.jsxClosingElement = jsxClosingElement;
  8079. exports.jSXElement = exports.jsxElement = jsxElement;
  8080. exports.jSXEmptyExpression = exports.jsxEmptyExpression = jsxEmptyExpression;
  8081. exports.jSXExpressionContainer = exports.jsxExpressionContainer = jsxExpressionContainer;
  8082. exports.jSXSpreadChild = exports.jsxSpreadChild = jsxSpreadChild;
  8083. exports.jSXIdentifier = exports.jsxIdentifier = jsxIdentifier;
  8084. exports.jSXMemberExpression = exports.jsxMemberExpression = jsxMemberExpression;
  8085. exports.jSXNamespacedName = exports.jsxNamespacedName = jsxNamespacedName;
  8086. exports.jSXOpeningElement = exports.jsxOpeningElement = jsxOpeningElement;
  8087. exports.jSXSpreadAttribute = exports.jsxSpreadAttribute = jsxSpreadAttribute;
  8088. exports.jSXText = exports.jsxText = jsxText2;
  8089. exports.jSXFragment = exports.jsxFragment = jsxFragment;
  8090. exports.jSXOpeningFragment = exports.jsxOpeningFragment = jsxOpeningFragment;
  8091. exports.jSXClosingFragment = exports.jsxClosingFragment = jsxClosingFragment;
  8092. exports.noop = noop;
  8093. exports.placeholder = placeholder;
  8094. exports.v8IntrinsicIdentifier = v8IntrinsicIdentifier;
  8095. exports.argumentPlaceholder = argumentPlaceholder;
  8096. exports.bindExpression = bindExpression;
  8097. exports.pipelineTopicExpression = pipelineTopicExpression;
  8098. exports.pipelineBareFunction = pipelineBareFunction;
  8099. exports.pipelinePrimaryTopicReference = pipelinePrimaryTopicReference;
  8100. exports.importAttribute = importAttribute;
  8101. exports.decorator = decorator;
  8102. exports.doExpression = doExpression;
  8103. exports.exportDefaultSpecifier = exportDefaultSpecifier;
  8104. exports.recordExpression = recordExpression;
  8105. exports.tupleExpression = tupleExpression;
  8106. exports.decimalLiteral = decimalLiteral;
  8107. exports.staticBlock = staticBlock;
  8108. exports.moduleExpression = moduleExpression;
  8109. exports.tSParameterProperty = exports.tsParameterProperty = tsParameterProperty;
  8110. exports.tSDeclareFunction = exports.tsDeclareFunction = tsDeclareFunction;
  8111. exports.tSDeclareMethod = exports.tsDeclareMethod = tsDeclareMethod;
  8112. exports.tSQualifiedName = exports.tsQualifiedName = tsQualifiedName;
  8113. exports.tSCallSignatureDeclaration = exports.tsCallSignatureDeclaration = tsCallSignatureDeclaration;
  8114. exports.tSConstructSignatureDeclaration = exports.tsConstructSignatureDeclaration = tsConstructSignatureDeclaration;
  8115. exports.tSPropertySignature = exports.tsPropertySignature = tsPropertySignature;
  8116. exports.tSMethodSignature = exports.tsMethodSignature = tsMethodSignature;
  8117. exports.tSIndexSignature = exports.tsIndexSignature = tsIndexSignature;
  8118. exports.tSAnyKeyword = exports.tsAnyKeyword = tsAnyKeyword;
  8119. exports.tSBooleanKeyword = exports.tsBooleanKeyword = tsBooleanKeyword;
  8120. exports.tSBigIntKeyword = exports.tsBigIntKeyword = tsBigIntKeyword;
  8121. exports.tSIntrinsicKeyword = exports.tsIntrinsicKeyword = tsIntrinsicKeyword;
  8122. exports.tSNeverKeyword = exports.tsNeverKeyword = tsNeverKeyword;
  8123. exports.tSNullKeyword = exports.tsNullKeyword = tsNullKeyword;
  8124. exports.tSNumberKeyword = exports.tsNumberKeyword = tsNumberKeyword;
  8125. exports.tSObjectKeyword = exports.tsObjectKeyword = tsObjectKeyword;
  8126. exports.tSStringKeyword = exports.tsStringKeyword = tsStringKeyword;
  8127. exports.tSSymbolKeyword = exports.tsSymbolKeyword = tsSymbolKeyword;
  8128. exports.tSUndefinedKeyword = exports.tsUndefinedKeyword = tsUndefinedKeyword;
  8129. exports.tSUnknownKeyword = exports.tsUnknownKeyword = tsUnknownKeyword;
  8130. exports.tSVoidKeyword = exports.tsVoidKeyword = tsVoidKeyword;
  8131. exports.tSThisType = exports.tsThisType = tsThisType;
  8132. exports.tSFunctionType = exports.tsFunctionType = tsFunctionType;
  8133. exports.tSConstructorType = exports.tsConstructorType = tsConstructorType;
  8134. exports.tSTypeReference = exports.tsTypeReference = tsTypeReference;
  8135. exports.tSTypePredicate = exports.tsTypePredicate = tsTypePredicate;
  8136. exports.tSTypeQuery = exports.tsTypeQuery = tsTypeQuery;
  8137. exports.tSTypeLiteral = exports.tsTypeLiteral = tsTypeLiteral;
  8138. exports.tSArrayType = exports.tsArrayType = tsArrayType;
  8139. exports.tSTupleType = exports.tsTupleType = tsTupleType;
  8140. exports.tSOptionalType = exports.tsOptionalType = tsOptionalType;
  8141. exports.tSRestType = exports.tsRestType = tsRestType;
  8142. exports.tSNamedTupleMember = exports.tsNamedTupleMember = tsNamedTupleMember;
  8143. exports.tSUnionType = exports.tsUnionType = tsUnionType;
  8144. exports.tSIntersectionType = exports.tsIntersectionType = tsIntersectionType;
  8145. exports.tSConditionalType = exports.tsConditionalType = tsConditionalType;
  8146. exports.tSInferType = exports.tsInferType = tsInferType;
  8147. exports.tSParenthesizedType = exports.tsParenthesizedType = tsParenthesizedType;
  8148. exports.tSTypeOperator = exports.tsTypeOperator = tsTypeOperator;
  8149. exports.tSIndexedAccessType = exports.tsIndexedAccessType = tsIndexedAccessType;
  8150. exports.tSMappedType = exports.tsMappedType = tsMappedType;
  8151. exports.tSLiteralType = exports.tsLiteralType = tsLiteralType;
  8152. exports.tSExpressionWithTypeArguments = exports.tsExpressionWithTypeArguments = tsExpressionWithTypeArguments;
  8153. exports.tSInterfaceDeclaration = exports.tsInterfaceDeclaration = tsInterfaceDeclaration;
  8154. exports.tSInterfaceBody = exports.tsInterfaceBody = tsInterfaceBody;
  8155. exports.tSTypeAliasDeclaration = exports.tsTypeAliasDeclaration = tsTypeAliasDeclaration;
  8156. exports.tSAsExpression = exports.tsAsExpression = tsAsExpression;
  8157. exports.tSTypeAssertion = exports.tsTypeAssertion = tsTypeAssertion;
  8158. exports.tSEnumDeclaration = exports.tsEnumDeclaration = tsEnumDeclaration;
  8159. exports.tSEnumMember = exports.tsEnumMember = tsEnumMember;
  8160. exports.tSModuleDeclaration = exports.tsModuleDeclaration = tsModuleDeclaration;
  8161. exports.tSModuleBlock = exports.tsModuleBlock = tsModuleBlock;
  8162. exports.tSImportType = exports.tsImportType = tsImportType;
  8163. exports.tSImportEqualsDeclaration = exports.tsImportEqualsDeclaration = tsImportEqualsDeclaration;
  8164. exports.tSExternalModuleReference = exports.tsExternalModuleReference = tsExternalModuleReference;
  8165. exports.tSNonNullExpression = exports.tsNonNullExpression = tsNonNullExpression;
  8166. exports.tSExportAssignment = exports.tsExportAssignment = tsExportAssignment;
  8167. exports.tSNamespaceExportDeclaration = exports.tsNamespaceExportDeclaration = tsNamespaceExportDeclaration;
  8168. exports.tSTypeAnnotation = exports.tsTypeAnnotation = tsTypeAnnotation;
  8169. exports.tSTypeParameterInstantiation = exports.tsTypeParameterInstantiation = tsTypeParameterInstantiation;
  8170. exports.tSTypeParameterDeclaration = exports.tsTypeParameterDeclaration = tsTypeParameterDeclaration;
  8171. exports.tSTypeParameter = exports.tsTypeParameter = tsTypeParameter;
  8172. exports.numberLiteral = NumberLiteral;
  8173. exports.regexLiteral = RegexLiteral;
  8174. exports.restProperty = RestProperty;
  8175. exports.spreadProperty = SpreadProperty;
  8176. var _builder = require_builder();
  8177. function arrayExpression(elements) {
  8178. return (0, _builder.default)("ArrayExpression", ...arguments);
  8179. }
  8180. function assignmentExpression(operator, left, right) {
  8181. return (0, _builder.default)("AssignmentExpression", ...arguments);
  8182. }
  8183. function binaryExpression(operator, left, right) {
  8184. return (0, _builder.default)("BinaryExpression", ...arguments);
  8185. }
  8186. function interpreterDirective(value) {
  8187. return (0, _builder.default)("InterpreterDirective", ...arguments);
  8188. }
  8189. function directive(value) {
  8190. return (0, _builder.default)("Directive", ...arguments);
  8191. }
  8192. function directiveLiteral(value) {
  8193. return (0, _builder.default)("DirectiveLiteral", ...arguments);
  8194. }
  8195. function blockStatement(body, directives) {
  8196. return (0, _builder.default)("BlockStatement", ...arguments);
  8197. }
  8198. function breakStatement(label) {
  8199. return (0, _builder.default)("BreakStatement", ...arguments);
  8200. }
  8201. function callExpression(callee, _arguments) {
  8202. return (0, _builder.default)("CallExpression", ...arguments);
  8203. }
  8204. function catchClause(param, body) {
  8205. return (0, _builder.default)("CatchClause", ...arguments);
  8206. }
  8207. function conditionalExpression(test, consequent, alternate) {
  8208. return (0, _builder.default)("ConditionalExpression", ...arguments);
  8209. }
  8210. function continueStatement(label) {
  8211. return (0, _builder.default)("ContinueStatement", ...arguments);
  8212. }
  8213. function debuggerStatement() {
  8214. return (0, _builder.default)("DebuggerStatement", ...arguments);
  8215. }
  8216. function doWhileStatement(test, body) {
  8217. return (0, _builder.default)("DoWhileStatement", ...arguments);
  8218. }
  8219. function emptyStatement() {
  8220. return (0, _builder.default)("EmptyStatement", ...arguments);
  8221. }
  8222. function expressionStatement(expression) {
  8223. return (0, _builder.default)("ExpressionStatement", ...arguments);
  8224. }
  8225. function file(program2, comments, tokens) {
  8226. return (0, _builder.default)("File", ...arguments);
  8227. }
  8228. function forInStatement(left, right, body) {
  8229. return (0, _builder.default)("ForInStatement", ...arguments);
  8230. }
  8231. function forStatement(init, test, update, body) {
  8232. return (0, _builder.default)("ForStatement", ...arguments);
  8233. }
  8234. function functionDeclaration(id, params, body, generator, async) {
  8235. return (0, _builder.default)("FunctionDeclaration", ...arguments);
  8236. }
  8237. function functionExpression(id, params, body, generator, async) {
  8238. return (0, _builder.default)("FunctionExpression", ...arguments);
  8239. }
  8240. function identifier(name2) {
  8241. return (0, _builder.default)("Identifier", ...arguments);
  8242. }
  8243. function ifStatement(test, consequent, alternate) {
  8244. return (0, _builder.default)("IfStatement", ...arguments);
  8245. }
  8246. function labeledStatement(label, body) {
  8247. return (0, _builder.default)("LabeledStatement", ...arguments);
  8248. }
  8249. function stringLiteral(value) {
  8250. return (0, _builder.default)("StringLiteral", ...arguments);
  8251. }
  8252. function numericLiteral(value) {
  8253. return (0, _builder.default)("NumericLiteral", ...arguments);
  8254. }
  8255. function nullLiteral() {
  8256. return (0, _builder.default)("NullLiteral", ...arguments);
  8257. }
  8258. function booleanLiteral(value) {
  8259. return (0, _builder.default)("BooleanLiteral", ...arguments);
  8260. }
  8261. function regExpLiteral(pattern, flags) {
  8262. return (0, _builder.default)("RegExpLiteral", ...arguments);
  8263. }
  8264. function logicalExpression(operator, left, right) {
  8265. return (0, _builder.default)("LogicalExpression", ...arguments);
  8266. }
  8267. function memberExpression(object, property, computed, optional) {
  8268. return (0, _builder.default)("MemberExpression", ...arguments);
  8269. }
  8270. function newExpression(callee, _arguments) {
  8271. return (0, _builder.default)("NewExpression", ...arguments);
  8272. }
  8273. function program(body, directives, sourceType, interpreter) {
  8274. return (0, _builder.default)("Program", ...arguments);
  8275. }
  8276. function objectExpression(properties) {
  8277. return (0, _builder.default)("ObjectExpression", ...arguments);
  8278. }
  8279. function objectMethod(kind, key, params, body, computed, generator, async) {
  8280. return (0, _builder.default)("ObjectMethod", ...arguments);
  8281. }
  8282. function objectProperty(key, value, computed, shorthand, decorators) {
  8283. return (0, _builder.default)("ObjectProperty", ...arguments);
  8284. }
  8285. function restElement(argument) {
  8286. return (0, _builder.default)("RestElement", ...arguments);
  8287. }
  8288. function returnStatement(argument) {
  8289. return (0, _builder.default)("ReturnStatement", ...arguments);
  8290. }
  8291. function sequenceExpression(expressions) {
  8292. return (0, _builder.default)("SequenceExpression", ...arguments);
  8293. }
  8294. function parenthesizedExpression(expression) {
  8295. return (0, _builder.default)("ParenthesizedExpression", ...arguments);
  8296. }
  8297. function switchCase(test, consequent) {
  8298. return (0, _builder.default)("SwitchCase", ...arguments);
  8299. }
  8300. function switchStatement(discriminant, cases) {
  8301. return (0, _builder.default)("SwitchStatement", ...arguments);
  8302. }
  8303. function thisExpression() {
  8304. return (0, _builder.default)("ThisExpression", ...arguments);
  8305. }
  8306. function throwStatement(argument) {
  8307. return (0, _builder.default)("ThrowStatement", ...arguments);
  8308. }
  8309. function tryStatement(block, handler, finalizer) {
  8310. return (0, _builder.default)("TryStatement", ...arguments);
  8311. }
  8312. function unaryExpression(operator, argument, prefix) {
  8313. return (0, _builder.default)("UnaryExpression", ...arguments);
  8314. }
  8315. function updateExpression(operator, argument, prefix) {
  8316. return (0, _builder.default)("UpdateExpression", ...arguments);
  8317. }
  8318. function variableDeclaration(kind, declarations) {
  8319. return (0, _builder.default)("VariableDeclaration", ...arguments);
  8320. }
  8321. function variableDeclarator(id, init) {
  8322. return (0, _builder.default)("VariableDeclarator", ...arguments);
  8323. }
  8324. function whileStatement(test, body) {
  8325. return (0, _builder.default)("WhileStatement", ...arguments);
  8326. }
  8327. function withStatement(object, body) {
  8328. return (0, _builder.default)("WithStatement", ...arguments);
  8329. }
  8330. function assignmentPattern(left, right) {
  8331. return (0, _builder.default)("AssignmentPattern", ...arguments);
  8332. }
  8333. function arrayPattern(elements) {
  8334. return (0, _builder.default)("ArrayPattern", ...arguments);
  8335. }
  8336. function arrowFunctionExpression(params, body, async) {
  8337. return (0, _builder.default)("ArrowFunctionExpression", ...arguments);
  8338. }
  8339. function classBody(body) {
  8340. return (0, _builder.default)("ClassBody", ...arguments);
  8341. }
  8342. function classExpression(id, superClass, body, decorators) {
  8343. return (0, _builder.default)("ClassExpression", ...arguments);
  8344. }
  8345. function classDeclaration(id, superClass, body, decorators) {
  8346. return (0, _builder.default)("ClassDeclaration", ...arguments);
  8347. }
  8348. function exportAllDeclaration(source) {
  8349. return (0, _builder.default)("ExportAllDeclaration", ...arguments);
  8350. }
  8351. function exportDefaultDeclaration(declaration) {
  8352. return (0, _builder.default)("ExportDefaultDeclaration", ...arguments);
  8353. }
  8354. function exportNamedDeclaration(declaration, specifiers, source) {
  8355. return (0, _builder.default)("ExportNamedDeclaration", ...arguments);
  8356. }
  8357. function exportSpecifier(local, exported) {
  8358. return (0, _builder.default)("ExportSpecifier", ...arguments);
  8359. }
  8360. function forOfStatement(left, right, body, _await) {
  8361. return (0, _builder.default)("ForOfStatement", ...arguments);
  8362. }
  8363. function importDeclaration(specifiers, source) {
  8364. return (0, _builder.default)("ImportDeclaration", ...arguments);
  8365. }
  8366. function importDefaultSpecifier(local) {
  8367. return (0, _builder.default)("ImportDefaultSpecifier", ...arguments);
  8368. }
  8369. function importNamespaceSpecifier(local) {
  8370. return (0, _builder.default)("ImportNamespaceSpecifier", ...arguments);
  8371. }
  8372. function importSpecifier(local, imported) {
  8373. return (0, _builder.default)("ImportSpecifier", ...arguments);
  8374. }
  8375. function metaProperty(meta, property) {
  8376. return (0, _builder.default)("MetaProperty", ...arguments);
  8377. }
  8378. function classMethod(kind, key, params, body, computed, _static, generator, async) {
  8379. return (0, _builder.default)("ClassMethod", ...arguments);
  8380. }
  8381. function objectPattern(properties) {
  8382. return (0, _builder.default)("ObjectPattern", ...arguments);
  8383. }
  8384. function spreadElement(argument) {
  8385. return (0, _builder.default)("SpreadElement", ...arguments);
  8386. }
  8387. function _super() {
  8388. return (0, _builder.default)("Super", ...arguments);
  8389. }
  8390. function taggedTemplateExpression(tag, quasi) {
  8391. return (0, _builder.default)("TaggedTemplateExpression", ...arguments);
  8392. }
  8393. function templateElement(value, tail) {
  8394. return (0, _builder.default)("TemplateElement", ...arguments);
  8395. }
  8396. function templateLiteral(quasis, expressions) {
  8397. return (0, _builder.default)("TemplateLiteral", ...arguments);
  8398. }
  8399. function yieldExpression(argument, delegate) {
  8400. return (0, _builder.default)("YieldExpression", ...arguments);
  8401. }
  8402. function awaitExpression(argument) {
  8403. return (0, _builder.default)("AwaitExpression", ...arguments);
  8404. }
  8405. function _import() {
  8406. return (0, _builder.default)("Import", ...arguments);
  8407. }
  8408. function bigIntLiteral(value) {
  8409. return (0, _builder.default)("BigIntLiteral", ...arguments);
  8410. }
  8411. function exportNamespaceSpecifier(exported) {
  8412. return (0, _builder.default)("ExportNamespaceSpecifier", ...arguments);
  8413. }
  8414. function optionalMemberExpression(object, property, computed, optional) {
  8415. return (0, _builder.default)("OptionalMemberExpression", ...arguments);
  8416. }
  8417. function optionalCallExpression(callee, _arguments, optional) {
  8418. return (0, _builder.default)("OptionalCallExpression", ...arguments);
  8419. }
  8420. function classProperty(key, value, typeAnnotation2, decorators, computed, _static) {
  8421. return (0, _builder.default)("ClassProperty", ...arguments);
  8422. }
  8423. function classPrivateProperty(key, value, decorators, _static) {
  8424. return (0, _builder.default)("ClassPrivateProperty", ...arguments);
  8425. }
  8426. function classPrivateMethod(kind, key, params, body, _static) {
  8427. return (0, _builder.default)("ClassPrivateMethod", ...arguments);
  8428. }
  8429. function privateName(id) {
  8430. return (0, _builder.default)("PrivateName", ...arguments);
  8431. }
  8432. function anyTypeAnnotation() {
  8433. return (0, _builder.default)("AnyTypeAnnotation", ...arguments);
  8434. }
  8435. function arrayTypeAnnotation(elementType) {
  8436. return (0, _builder.default)("ArrayTypeAnnotation", ...arguments);
  8437. }
  8438. function booleanTypeAnnotation() {
  8439. return (0, _builder.default)("BooleanTypeAnnotation", ...arguments);
  8440. }
  8441. function booleanLiteralTypeAnnotation(value) {
  8442. return (0, _builder.default)("BooleanLiteralTypeAnnotation", ...arguments);
  8443. }
  8444. function nullLiteralTypeAnnotation() {
  8445. return (0, _builder.default)("NullLiteralTypeAnnotation", ...arguments);
  8446. }
  8447. function classImplements(id, typeParameters) {
  8448. return (0, _builder.default)("ClassImplements", ...arguments);
  8449. }
  8450. function declareClass(id, typeParameters, _extends, body) {
  8451. return (0, _builder.default)("DeclareClass", ...arguments);
  8452. }
  8453. function declareFunction(id) {
  8454. return (0, _builder.default)("DeclareFunction", ...arguments);
  8455. }
  8456. function declareInterface(id, typeParameters, _extends, body) {
  8457. return (0, _builder.default)("DeclareInterface", ...arguments);
  8458. }
  8459. function declareModule(id, body, kind) {
  8460. return (0, _builder.default)("DeclareModule", ...arguments);
  8461. }
  8462. function declareModuleExports(typeAnnotation2) {
  8463. return (0, _builder.default)("DeclareModuleExports", ...arguments);
  8464. }
  8465. function declareTypeAlias(id, typeParameters, right) {
  8466. return (0, _builder.default)("DeclareTypeAlias", ...arguments);
  8467. }
  8468. function declareOpaqueType(id, typeParameters, supertype) {
  8469. return (0, _builder.default)("DeclareOpaqueType", ...arguments);
  8470. }
  8471. function declareVariable(id) {
  8472. return (0, _builder.default)("DeclareVariable", ...arguments);
  8473. }
  8474. function declareExportDeclaration(declaration, specifiers, source) {
  8475. return (0, _builder.default)("DeclareExportDeclaration", ...arguments);
  8476. }
  8477. function declareExportAllDeclaration(source) {
  8478. return (0, _builder.default)("DeclareExportAllDeclaration", ...arguments);
  8479. }
  8480. function declaredPredicate(value) {
  8481. return (0, _builder.default)("DeclaredPredicate", ...arguments);
  8482. }
  8483. function existsTypeAnnotation() {
  8484. return (0, _builder.default)("ExistsTypeAnnotation", ...arguments);
  8485. }
  8486. function functionTypeAnnotation(typeParameters, params, rest, returnType) {
  8487. return (0, _builder.default)("FunctionTypeAnnotation", ...arguments);
  8488. }
  8489. function functionTypeParam(name2, typeAnnotation2) {
  8490. return (0, _builder.default)("FunctionTypeParam", ...arguments);
  8491. }
  8492. function genericTypeAnnotation(id, typeParameters) {
  8493. return (0, _builder.default)("GenericTypeAnnotation", ...arguments);
  8494. }
  8495. function inferredPredicate() {
  8496. return (0, _builder.default)("InferredPredicate", ...arguments);
  8497. }
  8498. function interfaceExtends(id, typeParameters) {
  8499. return (0, _builder.default)("InterfaceExtends", ...arguments);
  8500. }
  8501. function interfaceDeclaration(id, typeParameters, _extends, body) {
  8502. return (0, _builder.default)("InterfaceDeclaration", ...arguments);
  8503. }
  8504. function interfaceTypeAnnotation(_extends, body) {
  8505. return (0, _builder.default)("InterfaceTypeAnnotation", ...arguments);
  8506. }
  8507. function intersectionTypeAnnotation(types2) {
  8508. return (0, _builder.default)("IntersectionTypeAnnotation", ...arguments);
  8509. }
  8510. function mixedTypeAnnotation() {
  8511. return (0, _builder.default)("MixedTypeAnnotation", ...arguments);
  8512. }
  8513. function emptyTypeAnnotation() {
  8514. return (0, _builder.default)("EmptyTypeAnnotation", ...arguments);
  8515. }
  8516. function nullableTypeAnnotation(typeAnnotation2) {
  8517. return (0, _builder.default)("NullableTypeAnnotation", ...arguments);
  8518. }
  8519. function numberLiteralTypeAnnotation(value) {
  8520. return (0, _builder.default)("NumberLiteralTypeAnnotation", ...arguments);
  8521. }
  8522. function numberTypeAnnotation() {
  8523. return (0, _builder.default)("NumberTypeAnnotation", ...arguments);
  8524. }
  8525. function objectTypeAnnotation(properties, indexers, callProperties, internalSlots, exact) {
  8526. return (0, _builder.default)("ObjectTypeAnnotation", ...arguments);
  8527. }
  8528. function objectTypeInternalSlot(id, value, optional, _static, method) {
  8529. return (0, _builder.default)("ObjectTypeInternalSlot", ...arguments);
  8530. }
  8531. function objectTypeCallProperty(value) {
  8532. return (0, _builder.default)("ObjectTypeCallProperty", ...arguments);
  8533. }
  8534. function objectTypeIndexer(id, key, value, variance2) {
  8535. return (0, _builder.default)("ObjectTypeIndexer", ...arguments);
  8536. }
  8537. function objectTypeProperty(key, value, variance2) {
  8538. return (0, _builder.default)("ObjectTypeProperty", ...arguments);
  8539. }
  8540. function objectTypeSpreadProperty(argument) {
  8541. return (0, _builder.default)("ObjectTypeSpreadProperty", ...arguments);
  8542. }
  8543. function opaqueType(id, typeParameters, supertype, impltype) {
  8544. return (0, _builder.default)("OpaqueType", ...arguments);
  8545. }
  8546. function qualifiedTypeIdentifier(id, qualification) {
  8547. return (0, _builder.default)("QualifiedTypeIdentifier", ...arguments);
  8548. }
  8549. function stringLiteralTypeAnnotation(value) {
  8550. return (0, _builder.default)("StringLiteralTypeAnnotation", ...arguments);
  8551. }
  8552. function stringTypeAnnotation() {
  8553. return (0, _builder.default)("StringTypeAnnotation", ...arguments);
  8554. }
  8555. function symbolTypeAnnotation() {
  8556. return (0, _builder.default)("SymbolTypeAnnotation", ...arguments);
  8557. }
  8558. function thisTypeAnnotation() {
  8559. return (0, _builder.default)("ThisTypeAnnotation", ...arguments);
  8560. }
  8561. function tupleTypeAnnotation(types2) {
  8562. return (0, _builder.default)("TupleTypeAnnotation", ...arguments);
  8563. }
  8564. function typeofTypeAnnotation(argument) {
  8565. return (0, _builder.default)("TypeofTypeAnnotation", ...arguments);
  8566. }
  8567. function typeAlias(id, typeParameters, right) {
  8568. return (0, _builder.default)("TypeAlias", ...arguments);
  8569. }
  8570. function typeAnnotation(typeAnnotation2) {
  8571. return (0, _builder.default)("TypeAnnotation", ...arguments);
  8572. }
  8573. function typeCastExpression(expression, typeAnnotation2) {
  8574. return (0, _builder.default)("TypeCastExpression", ...arguments);
  8575. }
  8576. function typeParameter(bound, _default, variance2) {
  8577. return (0, _builder.default)("TypeParameter", ...arguments);
  8578. }
  8579. function typeParameterDeclaration(params) {
  8580. return (0, _builder.default)("TypeParameterDeclaration", ...arguments);
  8581. }
  8582. function typeParameterInstantiation(params) {
  8583. return (0, _builder.default)("TypeParameterInstantiation", ...arguments);
  8584. }
  8585. function unionTypeAnnotation(types2) {
  8586. return (0, _builder.default)("UnionTypeAnnotation", ...arguments);
  8587. }
  8588. function variance(kind) {
  8589. return (0, _builder.default)("Variance", ...arguments);
  8590. }
  8591. function voidTypeAnnotation() {
  8592. return (0, _builder.default)("VoidTypeAnnotation", ...arguments);
  8593. }
  8594. function enumDeclaration(id, body) {
  8595. return (0, _builder.default)("EnumDeclaration", ...arguments);
  8596. }
  8597. function enumBooleanBody(members) {
  8598. return (0, _builder.default)("EnumBooleanBody", ...arguments);
  8599. }
  8600. function enumNumberBody(members) {
  8601. return (0, _builder.default)("EnumNumberBody", ...arguments);
  8602. }
  8603. function enumStringBody(members) {
  8604. return (0, _builder.default)("EnumStringBody", ...arguments);
  8605. }
  8606. function enumSymbolBody(members) {
  8607. return (0, _builder.default)("EnumSymbolBody", ...arguments);
  8608. }
  8609. function enumBooleanMember(id) {
  8610. return (0, _builder.default)("EnumBooleanMember", ...arguments);
  8611. }
  8612. function enumNumberMember(id, init) {
  8613. return (0, _builder.default)("EnumNumberMember", ...arguments);
  8614. }
  8615. function enumStringMember(id, init) {
  8616. return (0, _builder.default)("EnumStringMember", ...arguments);
  8617. }
  8618. function enumDefaultedMember(id) {
  8619. return (0, _builder.default)("EnumDefaultedMember", ...arguments);
  8620. }
  8621. function indexedAccessType(objectType, indexType) {
  8622. return (0, _builder.default)("IndexedAccessType", ...arguments);
  8623. }
  8624. function optionalIndexedAccessType(objectType, indexType) {
  8625. return (0, _builder.default)("OptionalIndexedAccessType", ...arguments);
  8626. }
  8627. function jsxAttribute(name2, value) {
  8628. return (0, _builder.default)("JSXAttribute", ...arguments);
  8629. }
  8630. function jsxClosingElement(name2) {
  8631. return (0, _builder.default)("JSXClosingElement", ...arguments);
  8632. }
  8633. function jsxElement(openingElement, closingElement, children, selfClosing) {
  8634. return (0, _builder.default)("JSXElement", ...arguments);
  8635. }
  8636. function jsxEmptyExpression() {
  8637. return (0, _builder.default)("JSXEmptyExpression", ...arguments);
  8638. }
  8639. function jsxExpressionContainer(expression) {
  8640. return (0, _builder.default)("JSXExpressionContainer", ...arguments);
  8641. }
  8642. function jsxSpreadChild(expression) {
  8643. return (0, _builder.default)("JSXSpreadChild", ...arguments);
  8644. }
  8645. function jsxIdentifier(name2) {
  8646. return (0, _builder.default)("JSXIdentifier", ...arguments);
  8647. }
  8648. function jsxMemberExpression(object, property) {
  8649. return (0, _builder.default)("JSXMemberExpression", ...arguments);
  8650. }
  8651. function jsxNamespacedName(namespace, name2) {
  8652. return (0, _builder.default)("JSXNamespacedName", ...arguments);
  8653. }
  8654. function jsxOpeningElement(name2, attributes, selfClosing) {
  8655. return (0, _builder.default)("JSXOpeningElement", ...arguments);
  8656. }
  8657. function jsxSpreadAttribute(argument) {
  8658. return (0, _builder.default)("JSXSpreadAttribute", ...arguments);
  8659. }
  8660. function jsxText2(value) {
  8661. return (0, _builder.default)("JSXText", ...arguments);
  8662. }
  8663. function jsxFragment(openingFragment, closingFragment, children) {
  8664. return (0, _builder.default)("JSXFragment", ...arguments);
  8665. }
  8666. function jsxOpeningFragment() {
  8667. return (0, _builder.default)("JSXOpeningFragment", ...arguments);
  8668. }
  8669. function jsxClosingFragment() {
  8670. return (0, _builder.default)("JSXClosingFragment", ...arguments);
  8671. }
  8672. function noop() {
  8673. return (0, _builder.default)("Noop", ...arguments);
  8674. }
  8675. function placeholder(expectedNode, name2) {
  8676. return (0, _builder.default)("Placeholder", ...arguments);
  8677. }
  8678. function v8IntrinsicIdentifier(name2) {
  8679. return (0, _builder.default)("V8IntrinsicIdentifier", ...arguments);
  8680. }
  8681. function argumentPlaceholder() {
  8682. return (0, _builder.default)("ArgumentPlaceholder", ...arguments);
  8683. }
  8684. function bindExpression(object, callee) {
  8685. return (0, _builder.default)("BindExpression", ...arguments);
  8686. }
  8687. function pipelineTopicExpression(expression) {
  8688. return (0, _builder.default)("PipelineTopicExpression", ...arguments);
  8689. }
  8690. function pipelineBareFunction(callee) {
  8691. return (0, _builder.default)("PipelineBareFunction", ...arguments);
  8692. }
  8693. function pipelinePrimaryTopicReference() {
  8694. return (0, _builder.default)("PipelinePrimaryTopicReference", ...arguments);
  8695. }
  8696. function importAttribute(key, value) {
  8697. return (0, _builder.default)("ImportAttribute", ...arguments);
  8698. }
  8699. function decorator(expression) {
  8700. return (0, _builder.default)("Decorator", ...arguments);
  8701. }
  8702. function doExpression(body, async) {
  8703. return (0, _builder.default)("DoExpression", ...arguments);
  8704. }
  8705. function exportDefaultSpecifier(exported) {
  8706. return (0, _builder.default)("ExportDefaultSpecifier", ...arguments);
  8707. }
  8708. function recordExpression(properties) {
  8709. return (0, _builder.default)("RecordExpression", ...arguments);
  8710. }
  8711. function tupleExpression(elements) {
  8712. return (0, _builder.default)("TupleExpression", ...arguments);
  8713. }
  8714. function decimalLiteral(value) {
  8715. return (0, _builder.default)("DecimalLiteral", ...arguments);
  8716. }
  8717. function staticBlock(body) {
  8718. return (0, _builder.default)("StaticBlock", ...arguments);
  8719. }
  8720. function moduleExpression(body) {
  8721. return (0, _builder.default)("ModuleExpression", ...arguments);
  8722. }
  8723. function tsParameterProperty(parameter) {
  8724. return (0, _builder.default)("TSParameterProperty", ...arguments);
  8725. }
  8726. function tsDeclareFunction(id, typeParameters, params, returnType) {
  8727. return (0, _builder.default)("TSDeclareFunction", ...arguments);
  8728. }
  8729. function tsDeclareMethod(decorators, key, typeParameters, params, returnType) {
  8730. return (0, _builder.default)("TSDeclareMethod", ...arguments);
  8731. }
  8732. function tsQualifiedName(left, right) {
  8733. return (0, _builder.default)("TSQualifiedName", ...arguments);
  8734. }
  8735. function tsCallSignatureDeclaration(typeParameters, parameters, typeAnnotation2) {
  8736. return (0, _builder.default)("TSCallSignatureDeclaration", ...arguments);
  8737. }
  8738. function tsConstructSignatureDeclaration(typeParameters, parameters, typeAnnotation2) {
  8739. return (0, _builder.default)("TSConstructSignatureDeclaration", ...arguments);
  8740. }
  8741. function tsPropertySignature(key, typeAnnotation2, initializer) {
  8742. return (0, _builder.default)("TSPropertySignature", ...arguments);
  8743. }
  8744. function tsMethodSignature(key, typeParameters, parameters, typeAnnotation2) {
  8745. return (0, _builder.default)("TSMethodSignature", ...arguments);
  8746. }
  8747. function tsIndexSignature(parameters, typeAnnotation2) {
  8748. return (0, _builder.default)("TSIndexSignature", ...arguments);
  8749. }
  8750. function tsAnyKeyword() {
  8751. return (0, _builder.default)("TSAnyKeyword", ...arguments);
  8752. }
  8753. function tsBooleanKeyword() {
  8754. return (0, _builder.default)("TSBooleanKeyword", ...arguments);
  8755. }
  8756. function tsBigIntKeyword() {
  8757. return (0, _builder.default)("TSBigIntKeyword", ...arguments);
  8758. }
  8759. function tsIntrinsicKeyword() {
  8760. return (0, _builder.default)("TSIntrinsicKeyword", ...arguments);
  8761. }
  8762. function tsNeverKeyword() {
  8763. return (0, _builder.default)("TSNeverKeyword", ...arguments);
  8764. }
  8765. function tsNullKeyword() {
  8766. return (0, _builder.default)("TSNullKeyword", ...arguments);
  8767. }
  8768. function tsNumberKeyword() {
  8769. return (0, _builder.default)("TSNumberKeyword", ...arguments);
  8770. }
  8771. function tsObjectKeyword() {
  8772. return (0, _builder.default)("TSObjectKeyword", ...arguments);
  8773. }
  8774. function tsStringKeyword() {
  8775. return (0, _builder.default)("TSStringKeyword", ...arguments);
  8776. }
  8777. function tsSymbolKeyword() {
  8778. return (0, _builder.default)("TSSymbolKeyword", ...arguments);
  8779. }
  8780. function tsUndefinedKeyword() {
  8781. return (0, _builder.default)("TSUndefinedKeyword", ...arguments);
  8782. }
  8783. function tsUnknownKeyword() {
  8784. return (0, _builder.default)("TSUnknownKeyword", ...arguments);
  8785. }
  8786. function tsVoidKeyword() {
  8787. return (0, _builder.default)("TSVoidKeyword", ...arguments);
  8788. }
  8789. function tsThisType() {
  8790. return (0, _builder.default)("TSThisType", ...arguments);
  8791. }
  8792. function tsFunctionType(typeParameters, parameters, typeAnnotation2) {
  8793. return (0, _builder.default)("TSFunctionType", ...arguments);
  8794. }
  8795. function tsConstructorType(typeParameters, parameters, typeAnnotation2) {
  8796. return (0, _builder.default)("TSConstructorType", ...arguments);
  8797. }
  8798. function tsTypeReference(typeName, typeParameters) {
  8799. return (0, _builder.default)("TSTypeReference", ...arguments);
  8800. }
  8801. function tsTypePredicate(parameterName, typeAnnotation2, asserts) {
  8802. return (0, _builder.default)("TSTypePredicate", ...arguments);
  8803. }
  8804. function tsTypeQuery(exprName) {
  8805. return (0, _builder.default)("TSTypeQuery", ...arguments);
  8806. }
  8807. function tsTypeLiteral(members) {
  8808. return (0, _builder.default)("TSTypeLiteral", ...arguments);
  8809. }
  8810. function tsArrayType(elementType) {
  8811. return (0, _builder.default)("TSArrayType", ...arguments);
  8812. }
  8813. function tsTupleType(elementTypes) {
  8814. return (0, _builder.default)("TSTupleType", ...arguments);
  8815. }
  8816. function tsOptionalType(typeAnnotation2) {
  8817. return (0, _builder.default)("TSOptionalType", ...arguments);
  8818. }
  8819. function tsRestType(typeAnnotation2) {
  8820. return (0, _builder.default)("TSRestType", ...arguments);
  8821. }
  8822. function tsNamedTupleMember(label, elementType, optional) {
  8823. return (0, _builder.default)("TSNamedTupleMember", ...arguments);
  8824. }
  8825. function tsUnionType(types2) {
  8826. return (0, _builder.default)("TSUnionType", ...arguments);
  8827. }
  8828. function tsIntersectionType(types2) {
  8829. return (0, _builder.default)("TSIntersectionType", ...arguments);
  8830. }
  8831. function tsConditionalType(checkType, extendsType, trueType, falseType) {
  8832. return (0, _builder.default)("TSConditionalType", ...arguments);
  8833. }
  8834. function tsInferType(typeParameter2) {
  8835. return (0, _builder.default)("TSInferType", ...arguments);
  8836. }
  8837. function tsParenthesizedType(typeAnnotation2) {
  8838. return (0, _builder.default)("TSParenthesizedType", ...arguments);
  8839. }
  8840. function tsTypeOperator(typeAnnotation2) {
  8841. return (0, _builder.default)("TSTypeOperator", ...arguments);
  8842. }
  8843. function tsIndexedAccessType(objectType, indexType) {
  8844. return (0, _builder.default)("TSIndexedAccessType", ...arguments);
  8845. }
  8846. function tsMappedType(typeParameter2, typeAnnotation2, nameType) {
  8847. return (0, _builder.default)("TSMappedType", ...arguments);
  8848. }
  8849. function tsLiteralType(literal2) {
  8850. return (0, _builder.default)("TSLiteralType", ...arguments);
  8851. }
  8852. function tsExpressionWithTypeArguments(expression, typeParameters) {
  8853. return (0, _builder.default)("TSExpressionWithTypeArguments", ...arguments);
  8854. }
  8855. function tsInterfaceDeclaration(id, typeParameters, _extends, body) {
  8856. return (0, _builder.default)("TSInterfaceDeclaration", ...arguments);
  8857. }
  8858. function tsInterfaceBody(body) {
  8859. return (0, _builder.default)("TSInterfaceBody", ...arguments);
  8860. }
  8861. function tsTypeAliasDeclaration(id, typeParameters, typeAnnotation2) {
  8862. return (0, _builder.default)("TSTypeAliasDeclaration", ...arguments);
  8863. }
  8864. function tsAsExpression(expression, typeAnnotation2) {
  8865. return (0, _builder.default)("TSAsExpression", ...arguments);
  8866. }
  8867. function tsTypeAssertion(typeAnnotation2, expression) {
  8868. return (0, _builder.default)("TSTypeAssertion", ...arguments);
  8869. }
  8870. function tsEnumDeclaration(id, members) {
  8871. return (0, _builder.default)("TSEnumDeclaration", ...arguments);
  8872. }
  8873. function tsEnumMember(id, initializer) {
  8874. return (0, _builder.default)("TSEnumMember", ...arguments);
  8875. }
  8876. function tsModuleDeclaration(id, body) {
  8877. return (0, _builder.default)("TSModuleDeclaration", ...arguments);
  8878. }
  8879. function tsModuleBlock(body) {
  8880. return (0, _builder.default)("TSModuleBlock", ...arguments);
  8881. }
  8882. function tsImportType(argument, qualifier, typeParameters) {
  8883. return (0, _builder.default)("TSImportType", ...arguments);
  8884. }
  8885. function tsImportEqualsDeclaration(id, moduleReference) {
  8886. return (0, _builder.default)("TSImportEqualsDeclaration", ...arguments);
  8887. }
  8888. function tsExternalModuleReference(expression) {
  8889. return (0, _builder.default)("TSExternalModuleReference", ...arguments);
  8890. }
  8891. function tsNonNullExpression(expression) {
  8892. return (0, _builder.default)("TSNonNullExpression", ...arguments);
  8893. }
  8894. function tsExportAssignment(expression) {
  8895. return (0, _builder.default)("TSExportAssignment", ...arguments);
  8896. }
  8897. function tsNamespaceExportDeclaration(id) {
  8898. return (0, _builder.default)("TSNamespaceExportDeclaration", ...arguments);
  8899. }
  8900. function tsTypeAnnotation(typeAnnotation2) {
  8901. return (0, _builder.default)("TSTypeAnnotation", ...arguments);
  8902. }
  8903. function tsTypeParameterInstantiation(params) {
  8904. return (0, _builder.default)("TSTypeParameterInstantiation", ...arguments);
  8905. }
  8906. function tsTypeParameterDeclaration(params) {
  8907. return (0, _builder.default)("TSTypeParameterDeclaration", ...arguments);
  8908. }
  8909. function tsTypeParameter(constraint, _default, name2) {
  8910. return (0, _builder.default)("TSTypeParameter", ...arguments);
  8911. }
  8912. function NumberLiteral(...args) {
  8913. console.trace("The node type NumberLiteral has been renamed to NumericLiteral");
  8914. return (0, _builder.default)("NumberLiteral", ...args);
  8915. }
  8916. function RegexLiteral(...args) {
  8917. console.trace("The node type RegexLiteral has been renamed to RegExpLiteral");
  8918. return (0, _builder.default)("RegexLiteral", ...args);
  8919. }
  8920. function RestProperty(...args) {
  8921. console.trace("The node type RestProperty has been renamed to RestElement");
  8922. return (0, _builder.default)("RestProperty", ...args);
  8923. }
  8924. function SpreadProperty(...args) {
  8925. console.trace("The node type SpreadProperty has been renamed to SpreadElement");
  8926. return (0, _builder.default)("SpreadProperty", ...args);
  8927. }
  8928. }
  8929. });
  8930. // node_modules/@babel/types/lib/utils/react/cleanJSXElementLiteralChild.js
  8931. var require_cleanJSXElementLiteralChild = __commonJS({
  8932. "node_modules/@babel/types/lib/utils/react/cleanJSXElementLiteralChild.js"(exports) {
  8933. "use strict";
  8934. Object.defineProperty(exports, "__esModule", {
  8935. value: true
  8936. });
  8937. exports.default = cleanJSXElementLiteralChild;
  8938. var _generated = require_generated2();
  8939. function cleanJSXElementLiteralChild(child, args) {
  8940. const lines = child.value.split(/\r\n|\n|\r/);
  8941. let lastNonEmptyLine = 0;
  8942. for (let i = 0; i < lines.length; i++) {
  8943. if (lines[i].match(/[^ \t]/)) {
  8944. lastNonEmptyLine = i;
  8945. }
  8946. }
  8947. let str = "";
  8948. for (let i = 0; i < lines.length; i++) {
  8949. const line = lines[i];
  8950. const isFirstLine = i === 0;
  8951. const isLastLine = i === lines.length - 1;
  8952. const isLastNonEmptyLine = i === lastNonEmptyLine;
  8953. let trimmedLine = line.replace(/\t/g, " ");
  8954. if (!isFirstLine) {
  8955. trimmedLine = trimmedLine.replace(/^[ ]+/, "");
  8956. }
  8957. if (!isLastLine) {
  8958. trimmedLine = trimmedLine.replace(/[ ]+$/, "");
  8959. }
  8960. if (trimmedLine) {
  8961. if (!isLastNonEmptyLine) {
  8962. trimmedLine += " ";
  8963. }
  8964. str += trimmedLine;
  8965. }
  8966. }
  8967. if (str)
  8968. args.push((0, _generated.stringLiteral)(str));
  8969. }
  8970. }
  8971. });
  8972. // node_modules/@babel/types/lib/builders/react/buildChildren.js
  8973. var require_buildChildren = __commonJS({
  8974. "node_modules/@babel/types/lib/builders/react/buildChildren.js"(exports) {
  8975. "use strict";
  8976. Object.defineProperty(exports, "__esModule", {
  8977. value: true
  8978. });
  8979. exports.default = buildChildren;
  8980. var _generated = require_generated();
  8981. var _cleanJSXElementLiteralChild = require_cleanJSXElementLiteralChild();
  8982. function buildChildren(node) {
  8983. const elements = [];
  8984. for (let i = 0; i < node.children.length; i++) {
  8985. let child = node.children[i];
  8986. if ((0, _generated.isJSXText)(child)) {
  8987. (0, _cleanJSXElementLiteralChild.default)(child, elements);
  8988. continue;
  8989. }
  8990. if ((0, _generated.isJSXExpressionContainer)(child))
  8991. child = child.expression;
  8992. if ((0, _generated.isJSXEmptyExpression)(child))
  8993. continue;
  8994. elements.push(child);
  8995. }
  8996. return elements;
  8997. }
  8998. }
  8999. });
  9000. // node_modules/@babel/types/lib/validators/isNode.js
  9001. var require_isNode = __commonJS({
  9002. "node_modules/@babel/types/lib/validators/isNode.js"(exports) {
  9003. "use strict";
  9004. Object.defineProperty(exports, "__esModule", {
  9005. value: true
  9006. });
  9007. exports.default = isNode;
  9008. var _definitions = require_definitions();
  9009. function isNode(node) {
  9010. return !!(node && _definitions.VISITOR_KEYS[node.type]);
  9011. }
  9012. }
  9013. });
  9014. // node_modules/@babel/types/lib/asserts/assertNode.js
  9015. var require_assertNode = __commonJS({
  9016. "node_modules/@babel/types/lib/asserts/assertNode.js"(exports) {
  9017. "use strict";
  9018. Object.defineProperty(exports, "__esModule", {
  9019. value: true
  9020. });
  9021. exports.default = assertNode2;
  9022. var _isNode = require_isNode();
  9023. function assertNode2(node) {
  9024. if (!(0, _isNode.default)(node)) {
  9025. var _node$type;
  9026. const type = (_node$type = node == null ? void 0 : node.type) != null ? _node$type : JSON.stringify(node);
  9027. throw new TypeError(`Not a valid node of type "${type}"`);
  9028. }
  9029. }
  9030. }
  9031. });
  9032. // node_modules/@babel/types/lib/asserts/generated/index.js
  9033. var require_generated3 = __commonJS({
  9034. "node_modules/@babel/types/lib/asserts/generated/index.js"(exports) {
  9035. "use strict";
  9036. Object.defineProperty(exports, "__esModule", {
  9037. value: true
  9038. });
  9039. exports.assertArrayExpression = assertArrayExpression;
  9040. exports.assertAssignmentExpression = assertAssignmentExpression;
  9041. exports.assertBinaryExpression = assertBinaryExpression;
  9042. exports.assertInterpreterDirective = assertInterpreterDirective;
  9043. exports.assertDirective = assertDirective;
  9044. exports.assertDirectiveLiteral = assertDirectiveLiteral;
  9045. exports.assertBlockStatement = assertBlockStatement;
  9046. exports.assertBreakStatement = assertBreakStatement;
  9047. exports.assertCallExpression = assertCallExpression;
  9048. exports.assertCatchClause = assertCatchClause;
  9049. exports.assertConditionalExpression = assertConditionalExpression;
  9050. exports.assertContinueStatement = assertContinueStatement;
  9051. exports.assertDebuggerStatement = assertDebuggerStatement;
  9052. exports.assertDoWhileStatement = assertDoWhileStatement;
  9053. exports.assertEmptyStatement = assertEmptyStatement;
  9054. exports.assertExpressionStatement = assertExpressionStatement;
  9055. exports.assertFile = assertFile;
  9056. exports.assertForInStatement = assertForInStatement;
  9057. exports.assertForStatement = assertForStatement;
  9058. exports.assertFunctionDeclaration = assertFunctionDeclaration;
  9059. exports.assertFunctionExpression = assertFunctionExpression;
  9060. exports.assertIdentifier = assertIdentifier;
  9061. exports.assertIfStatement = assertIfStatement;
  9062. exports.assertLabeledStatement = assertLabeledStatement;
  9063. exports.assertStringLiteral = assertStringLiteral;
  9064. exports.assertNumericLiteral = assertNumericLiteral;
  9065. exports.assertNullLiteral = assertNullLiteral;
  9066. exports.assertBooleanLiteral = assertBooleanLiteral;
  9067. exports.assertRegExpLiteral = assertRegExpLiteral;
  9068. exports.assertLogicalExpression = assertLogicalExpression;
  9069. exports.assertMemberExpression = assertMemberExpression;
  9070. exports.assertNewExpression = assertNewExpression;
  9071. exports.assertProgram = assertProgram;
  9072. exports.assertObjectExpression = assertObjectExpression;
  9073. exports.assertObjectMethod = assertObjectMethod;
  9074. exports.assertObjectProperty = assertObjectProperty;
  9075. exports.assertRestElement = assertRestElement;
  9076. exports.assertReturnStatement = assertReturnStatement;
  9077. exports.assertSequenceExpression = assertSequenceExpression;
  9078. exports.assertParenthesizedExpression = assertParenthesizedExpression;
  9079. exports.assertSwitchCase = assertSwitchCase;
  9080. exports.assertSwitchStatement = assertSwitchStatement;
  9081. exports.assertThisExpression = assertThisExpression;
  9082. exports.assertThrowStatement = assertThrowStatement;
  9083. exports.assertTryStatement = assertTryStatement;
  9084. exports.assertUnaryExpression = assertUnaryExpression;
  9085. exports.assertUpdateExpression = assertUpdateExpression;
  9086. exports.assertVariableDeclaration = assertVariableDeclaration;
  9087. exports.assertVariableDeclarator = assertVariableDeclarator;
  9088. exports.assertWhileStatement = assertWhileStatement;
  9089. exports.assertWithStatement = assertWithStatement;
  9090. exports.assertAssignmentPattern = assertAssignmentPattern;
  9091. exports.assertArrayPattern = assertArrayPattern;
  9092. exports.assertArrowFunctionExpression = assertArrowFunctionExpression;
  9093. exports.assertClassBody = assertClassBody;
  9094. exports.assertClassExpression = assertClassExpression;
  9095. exports.assertClassDeclaration = assertClassDeclaration;
  9096. exports.assertExportAllDeclaration = assertExportAllDeclaration;
  9097. exports.assertExportDefaultDeclaration = assertExportDefaultDeclaration;
  9098. exports.assertExportNamedDeclaration = assertExportNamedDeclaration;
  9099. exports.assertExportSpecifier = assertExportSpecifier;
  9100. exports.assertForOfStatement = assertForOfStatement;
  9101. exports.assertImportDeclaration = assertImportDeclaration;
  9102. exports.assertImportDefaultSpecifier = assertImportDefaultSpecifier;
  9103. exports.assertImportNamespaceSpecifier = assertImportNamespaceSpecifier;
  9104. exports.assertImportSpecifier = assertImportSpecifier;
  9105. exports.assertMetaProperty = assertMetaProperty;
  9106. exports.assertClassMethod = assertClassMethod;
  9107. exports.assertObjectPattern = assertObjectPattern;
  9108. exports.assertSpreadElement = assertSpreadElement;
  9109. exports.assertSuper = assertSuper;
  9110. exports.assertTaggedTemplateExpression = assertTaggedTemplateExpression;
  9111. exports.assertTemplateElement = assertTemplateElement;
  9112. exports.assertTemplateLiteral = assertTemplateLiteral;
  9113. exports.assertYieldExpression = assertYieldExpression;
  9114. exports.assertAwaitExpression = assertAwaitExpression;
  9115. exports.assertImport = assertImport;
  9116. exports.assertBigIntLiteral = assertBigIntLiteral;
  9117. exports.assertExportNamespaceSpecifier = assertExportNamespaceSpecifier;
  9118. exports.assertOptionalMemberExpression = assertOptionalMemberExpression;
  9119. exports.assertOptionalCallExpression = assertOptionalCallExpression;
  9120. exports.assertClassProperty = assertClassProperty;
  9121. exports.assertClassPrivateProperty = assertClassPrivateProperty;
  9122. exports.assertClassPrivateMethod = assertClassPrivateMethod;
  9123. exports.assertPrivateName = assertPrivateName;
  9124. exports.assertAnyTypeAnnotation = assertAnyTypeAnnotation;
  9125. exports.assertArrayTypeAnnotation = assertArrayTypeAnnotation;
  9126. exports.assertBooleanTypeAnnotation = assertBooleanTypeAnnotation;
  9127. exports.assertBooleanLiteralTypeAnnotation = assertBooleanLiteralTypeAnnotation;
  9128. exports.assertNullLiteralTypeAnnotation = assertNullLiteralTypeAnnotation;
  9129. exports.assertClassImplements = assertClassImplements;
  9130. exports.assertDeclareClass = assertDeclareClass;
  9131. exports.assertDeclareFunction = assertDeclareFunction;
  9132. exports.assertDeclareInterface = assertDeclareInterface;
  9133. exports.assertDeclareModule = assertDeclareModule;
  9134. exports.assertDeclareModuleExports = assertDeclareModuleExports;
  9135. exports.assertDeclareTypeAlias = assertDeclareTypeAlias;
  9136. exports.assertDeclareOpaqueType = assertDeclareOpaqueType;
  9137. exports.assertDeclareVariable = assertDeclareVariable;
  9138. exports.assertDeclareExportDeclaration = assertDeclareExportDeclaration;
  9139. exports.assertDeclareExportAllDeclaration = assertDeclareExportAllDeclaration;
  9140. exports.assertDeclaredPredicate = assertDeclaredPredicate;
  9141. exports.assertExistsTypeAnnotation = assertExistsTypeAnnotation;
  9142. exports.assertFunctionTypeAnnotation = assertFunctionTypeAnnotation;
  9143. exports.assertFunctionTypeParam = assertFunctionTypeParam;
  9144. exports.assertGenericTypeAnnotation = assertGenericTypeAnnotation;
  9145. exports.assertInferredPredicate = assertInferredPredicate;
  9146. exports.assertInterfaceExtends = assertInterfaceExtends;
  9147. exports.assertInterfaceDeclaration = assertInterfaceDeclaration;
  9148. exports.assertInterfaceTypeAnnotation = assertInterfaceTypeAnnotation;
  9149. exports.assertIntersectionTypeAnnotation = assertIntersectionTypeAnnotation;
  9150. exports.assertMixedTypeAnnotation = assertMixedTypeAnnotation;
  9151. exports.assertEmptyTypeAnnotation = assertEmptyTypeAnnotation;
  9152. exports.assertNullableTypeAnnotation = assertNullableTypeAnnotation;
  9153. exports.assertNumberLiteralTypeAnnotation = assertNumberLiteralTypeAnnotation;
  9154. exports.assertNumberTypeAnnotation = assertNumberTypeAnnotation;
  9155. exports.assertObjectTypeAnnotation = assertObjectTypeAnnotation;
  9156. exports.assertObjectTypeInternalSlot = assertObjectTypeInternalSlot;
  9157. exports.assertObjectTypeCallProperty = assertObjectTypeCallProperty;
  9158. exports.assertObjectTypeIndexer = assertObjectTypeIndexer;
  9159. exports.assertObjectTypeProperty = assertObjectTypeProperty;
  9160. exports.assertObjectTypeSpreadProperty = assertObjectTypeSpreadProperty;
  9161. exports.assertOpaqueType = assertOpaqueType;
  9162. exports.assertQualifiedTypeIdentifier = assertQualifiedTypeIdentifier;
  9163. exports.assertStringLiteralTypeAnnotation = assertStringLiteralTypeAnnotation;
  9164. exports.assertStringTypeAnnotation = assertStringTypeAnnotation;
  9165. exports.assertSymbolTypeAnnotation = assertSymbolTypeAnnotation;
  9166. exports.assertThisTypeAnnotation = assertThisTypeAnnotation;
  9167. exports.assertTupleTypeAnnotation = assertTupleTypeAnnotation;
  9168. exports.assertTypeofTypeAnnotation = assertTypeofTypeAnnotation;
  9169. exports.assertTypeAlias = assertTypeAlias;
  9170. exports.assertTypeAnnotation = assertTypeAnnotation;
  9171. exports.assertTypeCastExpression = assertTypeCastExpression;
  9172. exports.assertTypeParameter = assertTypeParameter;
  9173. exports.assertTypeParameterDeclaration = assertTypeParameterDeclaration;
  9174. exports.assertTypeParameterInstantiation = assertTypeParameterInstantiation;
  9175. exports.assertUnionTypeAnnotation = assertUnionTypeAnnotation;
  9176. exports.assertVariance = assertVariance;
  9177. exports.assertVoidTypeAnnotation = assertVoidTypeAnnotation;
  9178. exports.assertEnumDeclaration = assertEnumDeclaration;
  9179. exports.assertEnumBooleanBody = assertEnumBooleanBody;
  9180. exports.assertEnumNumberBody = assertEnumNumberBody;
  9181. exports.assertEnumStringBody = assertEnumStringBody;
  9182. exports.assertEnumSymbolBody = assertEnumSymbolBody;
  9183. exports.assertEnumBooleanMember = assertEnumBooleanMember;
  9184. exports.assertEnumNumberMember = assertEnumNumberMember;
  9185. exports.assertEnumStringMember = assertEnumStringMember;
  9186. exports.assertEnumDefaultedMember = assertEnumDefaultedMember;
  9187. exports.assertIndexedAccessType = assertIndexedAccessType;
  9188. exports.assertOptionalIndexedAccessType = assertOptionalIndexedAccessType;
  9189. exports.assertJSXAttribute = assertJSXAttribute;
  9190. exports.assertJSXClosingElement = assertJSXClosingElement;
  9191. exports.assertJSXElement = assertJSXElement;
  9192. exports.assertJSXEmptyExpression = assertJSXEmptyExpression;
  9193. exports.assertJSXExpressionContainer = assertJSXExpressionContainer;
  9194. exports.assertJSXSpreadChild = assertJSXSpreadChild;
  9195. exports.assertJSXIdentifier = assertJSXIdentifier;
  9196. exports.assertJSXMemberExpression = assertJSXMemberExpression;
  9197. exports.assertJSXNamespacedName = assertJSXNamespacedName;
  9198. exports.assertJSXOpeningElement = assertJSXOpeningElement;
  9199. exports.assertJSXSpreadAttribute = assertJSXSpreadAttribute;
  9200. exports.assertJSXText = assertJSXText;
  9201. exports.assertJSXFragment = assertJSXFragment;
  9202. exports.assertJSXOpeningFragment = assertJSXOpeningFragment;
  9203. exports.assertJSXClosingFragment = assertJSXClosingFragment;
  9204. exports.assertNoop = assertNoop;
  9205. exports.assertPlaceholder = assertPlaceholder;
  9206. exports.assertV8IntrinsicIdentifier = assertV8IntrinsicIdentifier;
  9207. exports.assertArgumentPlaceholder = assertArgumentPlaceholder;
  9208. exports.assertBindExpression = assertBindExpression;
  9209. exports.assertPipelineTopicExpression = assertPipelineTopicExpression;
  9210. exports.assertPipelineBareFunction = assertPipelineBareFunction;
  9211. exports.assertPipelinePrimaryTopicReference = assertPipelinePrimaryTopicReference;
  9212. exports.assertImportAttribute = assertImportAttribute;
  9213. exports.assertDecorator = assertDecorator;
  9214. exports.assertDoExpression = assertDoExpression;
  9215. exports.assertExportDefaultSpecifier = assertExportDefaultSpecifier;
  9216. exports.assertRecordExpression = assertRecordExpression;
  9217. exports.assertTupleExpression = assertTupleExpression;
  9218. exports.assertDecimalLiteral = assertDecimalLiteral;
  9219. exports.assertStaticBlock = assertStaticBlock;
  9220. exports.assertModuleExpression = assertModuleExpression;
  9221. exports.assertTSParameterProperty = assertTSParameterProperty;
  9222. exports.assertTSDeclareFunction = assertTSDeclareFunction;
  9223. exports.assertTSDeclareMethod = assertTSDeclareMethod;
  9224. exports.assertTSQualifiedName = assertTSQualifiedName;
  9225. exports.assertTSCallSignatureDeclaration = assertTSCallSignatureDeclaration;
  9226. exports.assertTSConstructSignatureDeclaration = assertTSConstructSignatureDeclaration;
  9227. exports.assertTSPropertySignature = assertTSPropertySignature;
  9228. exports.assertTSMethodSignature = assertTSMethodSignature;
  9229. exports.assertTSIndexSignature = assertTSIndexSignature;
  9230. exports.assertTSAnyKeyword = assertTSAnyKeyword;
  9231. exports.assertTSBooleanKeyword = assertTSBooleanKeyword;
  9232. exports.assertTSBigIntKeyword = assertTSBigIntKeyword;
  9233. exports.assertTSIntrinsicKeyword = assertTSIntrinsicKeyword;
  9234. exports.assertTSNeverKeyword = assertTSNeverKeyword;
  9235. exports.assertTSNullKeyword = assertTSNullKeyword;
  9236. exports.assertTSNumberKeyword = assertTSNumberKeyword;
  9237. exports.assertTSObjectKeyword = assertTSObjectKeyword;
  9238. exports.assertTSStringKeyword = assertTSStringKeyword;
  9239. exports.assertTSSymbolKeyword = assertTSSymbolKeyword;
  9240. exports.assertTSUndefinedKeyword = assertTSUndefinedKeyword;
  9241. exports.assertTSUnknownKeyword = assertTSUnknownKeyword;
  9242. exports.assertTSVoidKeyword = assertTSVoidKeyword;
  9243. exports.assertTSThisType = assertTSThisType;
  9244. exports.assertTSFunctionType = assertTSFunctionType;
  9245. exports.assertTSConstructorType = assertTSConstructorType;
  9246. exports.assertTSTypeReference = assertTSTypeReference;
  9247. exports.assertTSTypePredicate = assertTSTypePredicate;
  9248. exports.assertTSTypeQuery = assertTSTypeQuery;
  9249. exports.assertTSTypeLiteral = assertTSTypeLiteral;
  9250. exports.assertTSArrayType = assertTSArrayType;
  9251. exports.assertTSTupleType = assertTSTupleType;
  9252. exports.assertTSOptionalType = assertTSOptionalType;
  9253. exports.assertTSRestType = assertTSRestType;
  9254. exports.assertTSNamedTupleMember = assertTSNamedTupleMember;
  9255. exports.assertTSUnionType = assertTSUnionType;
  9256. exports.assertTSIntersectionType = assertTSIntersectionType;
  9257. exports.assertTSConditionalType = assertTSConditionalType;
  9258. exports.assertTSInferType = assertTSInferType;
  9259. exports.assertTSParenthesizedType = assertTSParenthesizedType;
  9260. exports.assertTSTypeOperator = assertTSTypeOperator;
  9261. exports.assertTSIndexedAccessType = assertTSIndexedAccessType;
  9262. exports.assertTSMappedType = assertTSMappedType;
  9263. exports.assertTSLiteralType = assertTSLiteralType;
  9264. exports.assertTSExpressionWithTypeArguments = assertTSExpressionWithTypeArguments;
  9265. exports.assertTSInterfaceDeclaration = assertTSInterfaceDeclaration;
  9266. exports.assertTSInterfaceBody = assertTSInterfaceBody;
  9267. exports.assertTSTypeAliasDeclaration = assertTSTypeAliasDeclaration;
  9268. exports.assertTSAsExpression = assertTSAsExpression;
  9269. exports.assertTSTypeAssertion = assertTSTypeAssertion;
  9270. exports.assertTSEnumDeclaration = assertTSEnumDeclaration;
  9271. exports.assertTSEnumMember = assertTSEnumMember;
  9272. exports.assertTSModuleDeclaration = assertTSModuleDeclaration;
  9273. exports.assertTSModuleBlock = assertTSModuleBlock;
  9274. exports.assertTSImportType = assertTSImportType;
  9275. exports.assertTSImportEqualsDeclaration = assertTSImportEqualsDeclaration;
  9276. exports.assertTSExternalModuleReference = assertTSExternalModuleReference;
  9277. exports.assertTSNonNullExpression = assertTSNonNullExpression;
  9278. exports.assertTSExportAssignment = assertTSExportAssignment;
  9279. exports.assertTSNamespaceExportDeclaration = assertTSNamespaceExportDeclaration;
  9280. exports.assertTSTypeAnnotation = assertTSTypeAnnotation;
  9281. exports.assertTSTypeParameterInstantiation = assertTSTypeParameterInstantiation;
  9282. exports.assertTSTypeParameterDeclaration = assertTSTypeParameterDeclaration;
  9283. exports.assertTSTypeParameter = assertTSTypeParameter;
  9284. exports.assertExpression = assertExpression;
  9285. exports.assertBinary = assertBinary;
  9286. exports.assertScopable = assertScopable;
  9287. exports.assertBlockParent = assertBlockParent;
  9288. exports.assertBlock = assertBlock;
  9289. exports.assertStatement = assertStatement;
  9290. exports.assertTerminatorless = assertTerminatorless;
  9291. exports.assertCompletionStatement = assertCompletionStatement;
  9292. exports.assertConditional = assertConditional;
  9293. exports.assertLoop = assertLoop;
  9294. exports.assertWhile = assertWhile;
  9295. exports.assertExpressionWrapper = assertExpressionWrapper;
  9296. exports.assertFor = assertFor;
  9297. exports.assertForXStatement = assertForXStatement;
  9298. exports.assertFunction = assertFunction;
  9299. exports.assertFunctionParent = assertFunctionParent;
  9300. exports.assertPureish = assertPureish;
  9301. exports.assertDeclaration = assertDeclaration;
  9302. exports.assertPatternLike = assertPatternLike;
  9303. exports.assertLVal = assertLVal;
  9304. exports.assertTSEntityName = assertTSEntityName;
  9305. exports.assertLiteral = assertLiteral;
  9306. exports.assertImmutable = assertImmutable;
  9307. exports.assertUserWhitespacable = assertUserWhitespacable;
  9308. exports.assertMethod = assertMethod;
  9309. exports.assertObjectMember = assertObjectMember;
  9310. exports.assertProperty = assertProperty;
  9311. exports.assertUnaryLike = assertUnaryLike;
  9312. exports.assertPattern = assertPattern;
  9313. exports.assertClass = assertClass;
  9314. exports.assertModuleDeclaration = assertModuleDeclaration;
  9315. exports.assertExportDeclaration = assertExportDeclaration;
  9316. exports.assertModuleSpecifier = assertModuleSpecifier;
  9317. exports.assertPrivate = assertPrivate;
  9318. exports.assertFlow = assertFlow;
  9319. exports.assertFlowType = assertFlowType;
  9320. exports.assertFlowBaseAnnotation = assertFlowBaseAnnotation;
  9321. exports.assertFlowDeclaration = assertFlowDeclaration;
  9322. exports.assertFlowPredicate = assertFlowPredicate;
  9323. exports.assertEnumBody = assertEnumBody;
  9324. exports.assertEnumMember = assertEnumMember;
  9325. exports.assertJSX = assertJSX;
  9326. exports.assertTSTypeElement = assertTSTypeElement;
  9327. exports.assertTSType = assertTSType;
  9328. exports.assertTSBaseType = assertTSBaseType;
  9329. exports.assertNumberLiteral = assertNumberLiteral;
  9330. exports.assertRegexLiteral = assertRegexLiteral;
  9331. exports.assertRestProperty = assertRestProperty;
  9332. exports.assertSpreadProperty = assertSpreadProperty;
  9333. var _is = require_is();
  9334. function assert(type, node, opts) {
  9335. if (!(0, _is.default)(type, node, opts)) {
  9336. throw new Error(`Expected type "${type}" with option ${JSON.stringify(opts)}, but instead got "${node.type}".`);
  9337. }
  9338. }
  9339. function assertArrayExpression(node, opts) {
  9340. assert("ArrayExpression", node, opts);
  9341. }
  9342. function assertAssignmentExpression(node, opts) {
  9343. assert("AssignmentExpression", node, opts);
  9344. }
  9345. function assertBinaryExpression(node, opts) {
  9346. assert("BinaryExpression", node, opts);
  9347. }
  9348. function assertInterpreterDirective(node, opts) {
  9349. assert("InterpreterDirective", node, opts);
  9350. }
  9351. function assertDirective(node, opts) {
  9352. assert("Directive", node, opts);
  9353. }
  9354. function assertDirectiveLiteral(node, opts) {
  9355. assert("DirectiveLiteral", node, opts);
  9356. }
  9357. function assertBlockStatement(node, opts) {
  9358. assert("BlockStatement", node, opts);
  9359. }
  9360. function assertBreakStatement(node, opts) {
  9361. assert("BreakStatement", node, opts);
  9362. }
  9363. function assertCallExpression(node, opts) {
  9364. assert("CallExpression", node, opts);
  9365. }
  9366. function assertCatchClause(node, opts) {
  9367. assert("CatchClause", node, opts);
  9368. }
  9369. function assertConditionalExpression(node, opts) {
  9370. assert("ConditionalExpression", node, opts);
  9371. }
  9372. function assertContinueStatement(node, opts) {
  9373. assert("ContinueStatement", node, opts);
  9374. }
  9375. function assertDebuggerStatement(node, opts) {
  9376. assert("DebuggerStatement", node, opts);
  9377. }
  9378. function assertDoWhileStatement(node, opts) {
  9379. assert("DoWhileStatement", node, opts);
  9380. }
  9381. function assertEmptyStatement(node, opts) {
  9382. assert("EmptyStatement", node, opts);
  9383. }
  9384. function assertExpressionStatement(node, opts) {
  9385. assert("ExpressionStatement", node, opts);
  9386. }
  9387. function assertFile(node, opts) {
  9388. assert("File", node, opts);
  9389. }
  9390. function assertForInStatement(node, opts) {
  9391. assert("ForInStatement", node, opts);
  9392. }
  9393. function assertForStatement(node, opts) {
  9394. assert("ForStatement", node, opts);
  9395. }
  9396. function assertFunctionDeclaration(node, opts) {
  9397. assert("FunctionDeclaration", node, opts);
  9398. }
  9399. function assertFunctionExpression(node, opts) {
  9400. assert("FunctionExpression", node, opts);
  9401. }
  9402. function assertIdentifier(node, opts) {
  9403. assert("Identifier", node, opts);
  9404. }
  9405. function assertIfStatement(node, opts) {
  9406. assert("IfStatement", node, opts);
  9407. }
  9408. function assertLabeledStatement(node, opts) {
  9409. assert("LabeledStatement", node, opts);
  9410. }
  9411. function assertStringLiteral(node, opts) {
  9412. assert("StringLiteral", node, opts);
  9413. }
  9414. function assertNumericLiteral(node, opts) {
  9415. assert("NumericLiteral", node, opts);
  9416. }
  9417. function assertNullLiteral(node, opts) {
  9418. assert("NullLiteral", node, opts);
  9419. }
  9420. function assertBooleanLiteral(node, opts) {
  9421. assert("BooleanLiteral", node, opts);
  9422. }
  9423. function assertRegExpLiteral(node, opts) {
  9424. assert("RegExpLiteral", node, opts);
  9425. }
  9426. function assertLogicalExpression(node, opts) {
  9427. assert("LogicalExpression", node, opts);
  9428. }
  9429. function assertMemberExpression(node, opts) {
  9430. assert("MemberExpression", node, opts);
  9431. }
  9432. function assertNewExpression(node, opts) {
  9433. assert("NewExpression", node, opts);
  9434. }
  9435. function assertProgram(node, opts) {
  9436. assert("Program", node, opts);
  9437. }
  9438. function assertObjectExpression(node, opts) {
  9439. assert("ObjectExpression", node, opts);
  9440. }
  9441. function assertObjectMethod(node, opts) {
  9442. assert("ObjectMethod", node, opts);
  9443. }
  9444. function assertObjectProperty(node, opts) {
  9445. assert("ObjectProperty", node, opts);
  9446. }
  9447. function assertRestElement(node, opts) {
  9448. assert("RestElement", node, opts);
  9449. }
  9450. function assertReturnStatement(node, opts) {
  9451. assert("ReturnStatement", node, opts);
  9452. }
  9453. function assertSequenceExpression(node, opts) {
  9454. assert("SequenceExpression", node, opts);
  9455. }
  9456. function assertParenthesizedExpression(node, opts) {
  9457. assert("ParenthesizedExpression", node, opts);
  9458. }
  9459. function assertSwitchCase(node, opts) {
  9460. assert("SwitchCase", node, opts);
  9461. }
  9462. function assertSwitchStatement(node, opts) {
  9463. assert("SwitchStatement", node, opts);
  9464. }
  9465. function assertThisExpression(node, opts) {
  9466. assert("ThisExpression", node, opts);
  9467. }
  9468. function assertThrowStatement(node, opts) {
  9469. assert("ThrowStatement", node, opts);
  9470. }
  9471. function assertTryStatement(node, opts) {
  9472. assert("TryStatement", node, opts);
  9473. }
  9474. function assertUnaryExpression(node, opts) {
  9475. assert("UnaryExpression", node, opts);
  9476. }
  9477. function assertUpdateExpression(node, opts) {
  9478. assert("UpdateExpression", node, opts);
  9479. }
  9480. function assertVariableDeclaration(node, opts) {
  9481. assert("VariableDeclaration", node, opts);
  9482. }
  9483. function assertVariableDeclarator(node, opts) {
  9484. assert("VariableDeclarator", node, opts);
  9485. }
  9486. function assertWhileStatement(node, opts) {
  9487. assert("WhileStatement", node, opts);
  9488. }
  9489. function assertWithStatement(node, opts) {
  9490. assert("WithStatement", node, opts);
  9491. }
  9492. function assertAssignmentPattern(node, opts) {
  9493. assert("AssignmentPattern", node, opts);
  9494. }
  9495. function assertArrayPattern(node, opts) {
  9496. assert("ArrayPattern", node, opts);
  9497. }
  9498. function assertArrowFunctionExpression(node, opts) {
  9499. assert("ArrowFunctionExpression", node, opts);
  9500. }
  9501. function assertClassBody(node, opts) {
  9502. assert("ClassBody", node, opts);
  9503. }
  9504. function assertClassExpression(node, opts) {
  9505. assert("ClassExpression", node, opts);
  9506. }
  9507. function assertClassDeclaration(node, opts) {
  9508. assert("ClassDeclaration", node, opts);
  9509. }
  9510. function assertExportAllDeclaration(node, opts) {
  9511. assert("ExportAllDeclaration", node, opts);
  9512. }
  9513. function assertExportDefaultDeclaration(node, opts) {
  9514. assert("ExportDefaultDeclaration", node, opts);
  9515. }
  9516. function assertExportNamedDeclaration(node, opts) {
  9517. assert("ExportNamedDeclaration", node, opts);
  9518. }
  9519. function assertExportSpecifier(node, opts) {
  9520. assert("ExportSpecifier", node, opts);
  9521. }
  9522. function assertForOfStatement(node, opts) {
  9523. assert("ForOfStatement", node, opts);
  9524. }
  9525. function assertImportDeclaration(node, opts) {
  9526. assert("ImportDeclaration", node, opts);
  9527. }
  9528. function assertImportDefaultSpecifier(node, opts) {
  9529. assert("ImportDefaultSpecifier", node, opts);
  9530. }
  9531. function assertImportNamespaceSpecifier(node, opts) {
  9532. assert("ImportNamespaceSpecifier", node, opts);
  9533. }
  9534. function assertImportSpecifier(node, opts) {
  9535. assert("ImportSpecifier", node, opts);
  9536. }
  9537. function assertMetaProperty(node, opts) {
  9538. assert("MetaProperty", node, opts);
  9539. }
  9540. function assertClassMethod(node, opts) {
  9541. assert("ClassMethod", node, opts);
  9542. }
  9543. function assertObjectPattern(node, opts) {
  9544. assert("ObjectPattern", node, opts);
  9545. }
  9546. function assertSpreadElement(node, opts) {
  9547. assert("SpreadElement", node, opts);
  9548. }
  9549. function assertSuper(node, opts) {
  9550. assert("Super", node, opts);
  9551. }
  9552. function assertTaggedTemplateExpression(node, opts) {
  9553. assert("TaggedTemplateExpression", node, opts);
  9554. }
  9555. function assertTemplateElement(node, opts) {
  9556. assert("TemplateElement", node, opts);
  9557. }
  9558. function assertTemplateLiteral(node, opts) {
  9559. assert("TemplateLiteral", node, opts);
  9560. }
  9561. function assertYieldExpression(node, opts) {
  9562. assert("YieldExpression", node, opts);
  9563. }
  9564. function assertAwaitExpression(node, opts) {
  9565. assert("AwaitExpression", node, opts);
  9566. }
  9567. function assertImport(node, opts) {
  9568. assert("Import", node, opts);
  9569. }
  9570. function assertBigIntLiteral(node, opts) {
  9571. assert("BigIntLiteral", node, opts);
  9572. }
  9573. function assertExportNamespaceSpecifier(node, opts) {
  9574. assert("ExportNamespaceSpecifier", node, opts);
  9575. }
  9576. function assertOptionalMemberExpression(node, opts) {
  9577. assert("OptionalMemberExpression", node, opts);
  9578. }
  9579. function assertOptionalCallExpression(node, opts) {
  9580. assert("OptionalCallExpression", node, opts);
  9581. }
  9582. function assertClassProperty(node, opts) {
  9583. assert("ClassProperty", node, opts);
  9584. }
  9585. function assertClassPrivateProperty(node, opts) {
  9586. assert("ClassPrivateProperty", node, opts);
  9587. }
  9588. function assertClassPrivateMethod(node, opts) {
  9589. assert("ClassPrivateMethod", node, opts);
  9590. }
  9591. function assertPrivateName(node, opts) {
  9592. assert("PrivateName", node, opts);
  9593. }
  9594. function assertAnyTypeAnnotation(node, opts) {
  9595. assert("AnyTypeAnnotation", node, opts);
  9596. }
  9597. function assertArrayTypeAnnotation(node, opts) {
  9598. assert("ArrayTypeAnnotation", node, opts);
  9599. }
  9600. function assertBooleanTypeAnnotation(node, opts) {
  9601. assert("BooleanTypeAnnotation", node, opts);
  9602. }
  9603. function assertBooleanLiteralTypeAnnotation(node, opts) {
  9604. assert("BooleanLiteralTypeAnnotation", node, opts);
  9605. }
  9606. function assertNullLiteralTypeAnnotation(node, opts) {
  9607. assert("NullLiteralTypeAnnotation", node, opts);
  9608. }
  9609. function assertClassImplements(node, opts) {
  9610. assert("ClassImplements", node, opts);
  9611. }
  9612. function assertDeclareClass(node, opts) {
  9613. assert("DeclareClass", node, opts);
  9614. }
  9615. function assertDeclareFunction(node, opts) {
  9616. assert("DeclareFunction", node, opts);
  9617. }
  9618. function assertDeclareInterface(node, opts) {
  9619. assert("DeclareInterface", node, opts);
  9620. }
  9621. function assertDeclareModule(node, opts) {
  9622. assert("DeclareModule", node, opts);
  9623. }
  9624. function assertDeclareModuleExports(node, opts) {
  9625. assert("DeclareModuleExports", node, opts);
  9626. }
  9627. function assertDeclareTypeAlias(node, opts) {
  9628. assert("DeclareTypeAlias", node, opts);
  9629. }
  9630. function assertDeclareOpaqueType(node, opts) {
  9631. assert("DeclareOpaqueType", node, opts);
  9632. }
  9633. function assertDeclareVariable(node, opts) {
  9634. assert("DeclareVariable", node, opts);
  9635. }
  9636. function assertDeclareExportDeclaration(node, opts) {
  9637. assert("DeclareExportDeclaration", node, opts);
  9638. }
  9639. function assertDeclareExportAllDeclaration(node, opts) {
  9640. assert("DeclareExportAllDeclaration", node, opts);
  9641. }
  9642. function assertDeclaredPredicate(node, opts) {
  9643. assert("DeclaredPredicate", node, opts);
  9644. }
  9645. function assertExistsTypeAnnotation(node, opts) {
  9646. assert("ExistsTypeAnnotation", node, opts);
  9647. }
  9648. function assertFunctionTypeAnnotation(node, opts) {
  9649. assert("FunctionTypeAnnotation", node, opts);
  9650. }
  9651. function assertFunctionTypeParam(node, opts) {
  9652. assert("FunctionTypeParam", node, opts);
  9653. }
  9654. function assertGenericTypeAnnotation(node, opts) {
  9655. assert("GenericTypeAnnotation", node, opts);
  9656. }
  9657. function assertInferredPredicate(node, opts) {
  9658. assert("InferredPredicate", node, opts);
  9659. }
  9660. function assertInterfaceExtends(node, opts) {
  9661. assert("InterfaceExtends", node, opts);
  9662. }
  9663. function assertInterfaceDeclaration(node, opts) {
  9664. assert("InterfaceDeclaration", node, opts);
  9665. }
  9666. function assertInterfaceTypeAnnotation(node, opts) {
  9667. assert("InterfaceTypeAnnotation", node, opts);
  9668. }
  9669. function assertIntersectionTypeAnnotation(node, opts) {
  9670. assert("IntersectionTypeAnnotation", node, opts);
  9671. }
  9672. function assertMixedTypeAnnotation(node, opts) {
  9673. assert("MixedTypeAnnotation", node, opts);
  9674. }
  9675. function assertEmptyTypeAnnotation(node, opts) {
  9676. assert("EmptyTypeAnnotation", node, opts);
  9677. }
  9678. function assertNullableTypeAnnotation(node, opts) {
  9679. assert("NullableTypeAnnotation", node, opts);
  9680. }
  9681. function assertNumberLiteralTypeAnnotation(node, opts) {
  9682. assert("NumberLiteralTypeAnnotation", node, opts);
  9683. }
  9684. function assertNumberTypeAnnotation(node, opts) {
  9685. assert("NumberTypeAnnotation", node, opts);
  9686. }
  9687. function assertObjectTypeAnnotation(node, opts) {
  9688. assert("ObjectTypeAnnotation", node, opts);
  9689. }
  9690. function assertObjectTypeInternalSlot(node, opts) {
  9691. assert("ObjectTypeInternalSlot", node, opts);
  9692. }
  9693. function assertObjectTypeCallProperty(node, opts) {
  9694. assert("ObjectTypeCallProperty", node, opts);
  9695. }
  9696. function assertObjectTypeIndexer(node, opts) {
  9697. assert("ObjectTypeIndexer", node, opts);
  9698. }
  9699. function assertObjectTypeProperty(node, opts) {
  9700. assert("ObjectTypeProperty", node, opts);
  9701. }
  9702. function assertObjectTypeSpreadProperty(node, opts) {
  9703. assert("ObjectTypeSpreadProperty", node, opts);
  9704. }
  9705. function assertOpaqueType(node, opts) {
  9706. assert("OpaqueType", node, opts);
  9707. }
  9708. function assertQualifiedTypeIdentifier(node, opts) {
  9709. assert("QualifiedTypeIdentifier", node, opts);
  9710. }
  9711. function assertStringLiteralTypeAnnotation(node, opts) {
  9712. assert("StringLiteralTypeAnnotation", node, opts);
  9713. }
  9714. function assertStringTypeAnnotation(node, opts) {
  9715. assert("StringTypeAnnotation", node, opts);
  9716. }
  9717. function assertSymbolTypeAnnotation(node, opts) {
  9718. assert("SymbolTypeAnnotation", node, opts);
  9719. }
  9720. function assertThisTypeAnnotation(node, opts) {
  9721. assert("ThisTypeAnnotation", node, opts);
  9722. }
  9723. function assertTupleTypeAnnotation(node, opts) {
  9724. assert("TupleTypeAnnotation", node, opts);
  9725. }
  9726. function assertTypeofTypeAnnotation(node, opts) {
  9727. assert("TypeofTypeAnnotation", node, opts);
  9728. }
  9729. function assertTypeAlias(node, opts) {
  9730. assert("TypeAlias", node, opts);
  9731. }
  9732. function assertTypeAnnotation(node, opts) {
  9733. assert("TypeAnnotation", node, opts);
  9734. }
  9735. function assertTypeCastExpression(node, opts) {
  9736. assert("TypeCastExpression", node, opts);
  9737. }
  9738. function assertTypeParameter(node, opts) {
  9739. assert("TypeParameter", node, opts);
  9740. }
  9741. function assertTypeParameterDeclaration(node, opts) {
  9742. assert("TypeParameterDeclaration", node, opts);
  9743. }
  9744. function assertTypeParameterInstantiation(node, opts) {
  9745. assert("TypeParameterInstantiation", node, opts);
  9746. }
  9747. function assertUnionTypeAnnotation(node, opts) {
  9748. assert("UnionTypeAnnotation", node, opts);
  9749. }
  9750. function assertVariance(node, opts) {
  9751. assert("Variance", node, opts);
  9752. }
  9753. function assertVoidTypeAnnotation(node, opts) {
  9754. assert("VoidTypeAnnotation", node, opts);
  9755. }
  9756. function assertEnumDeclaration(node, opts) {
  9757. assert("EnumDeclaration", node, opts);
  9758. }
  9759. function assertEnumBooleanBody(node, opts) {
  9760. assert("EnumBooleanBody", node, opts);
  9761. }
  9762. function assertEnumNumberBody(node, opts) {
  9763. assert("EnumNumberBody", node, opts);
  9764. }
  9765. function assertEnumStringBody(node, opts) {
  9766. assert("EnumStringBody", node, opts);
  9767. }
  9768. function assertEnumSymbolBody(node, opts) {
  9769. assert("EnumSymbolBody", node, opts);
  9770. }
  9771. function assertEnumBooleanMember(node, opts) {
  9772. assert("EnumBooleanMember", node, opts);
  9773. }
  9774. function assertEnumNumberMember(node, opts) {
  9775. assert("EnumNumberMember", node, opts);
  9776. }
  9777. function assertEnumStringMember(node, opts) {
  9778. assert("EnumStringMember", node, opts);
  9779. }
  9780. function assertEnumDefaultedMember(node, opts) {
  9781. assert("EnumDefaultedMember", node, opts);
  9782. }
  9783. function assertIndexedAccessType(node, opts) {
  9784. assert("IndexedAccessType", node, opts);
  9785. }
  9786. function assertOptionalIndexedAccessType(node, opts) {
  9787. assert("OptionalIndexedAccessType", node, opts);
  9788. }
  9789. function assertJSXAttribute(node, opts) {
  9790. assert("JSXAttribute", node, opts);
  9791. }
  9792. function assertJSXClosingElement(node, opts) {
  9793. assert("JSXClosingElement", node, opts);
  9794. }
  9795. function assertJSXElement(node, opts) {
  9796. assert("JSXElement", node, opts);
  9797. }
  9798. function assertJSXEmptyExpression(node, opts) {
  9799. assert("JSXEmptyExpression", node, opts);
  9800. }
  9801. function assertJSXExpressionContainer(node, opts) {
  9802. assert("JSXExpressionContainer", node, opts);
  9803. }
  9804. function assertJSXSpreadChild(node, opts) {
  9805. assert("JSXSpreadChild", node, opts);
  9806. }
  9807. function assertJSXIdentifier(node, opts) {
  9808. assert("JSXIdentifier", node, opts);
  9809. }
  9810. function assertJSXMemberExpression(node, opts) {
  9811. assert("JSXMemberExpression", node, opts);
  9812. }
  9813. function assertJSXNamespacedName(node, opts) {
  9814. assert("JSXNamespacedName", node, opts);
  9815. }
  9816. function assertJSXOpeningElement(node, opts) {
  9817. assert("JSXOpeningElement", node, opts);
  9818. }
  9819. function assertJSXSpreadAttribute(node, opts) {
  9820. assert("JSXSpreadAttribute", node, opts);
  9821. }
  9822. function assertJSXText(node, opts) {
  9823. assert("JSXText", node, opts);
  9824. }
  9825. function assertJSXFragment(node, opts) {
  9826. assert("JSXFragment", node, opts);
  9827. }
  9828. function assertJSXOpeningFragment(node, opts) {
  9829. assert("JSXOpeningFragment", node, opts);
  9830. }
  9831. function assertJSXClosingFragment(node, opts) {
  9832. assert("JSXClosingFragment", node, opts);
  9833. }
  9834. function assertNoop(node, opts) {
  9835. assert("Noop", node, opts);
  9836. }
  9837. function assertPlaceholder(node, opts) {
  9838. assert("Placeholder", node, opts);
  9839. }
  9840. function assertV8IntrinsicIdentifier(node, opts) {
  9841. assert("V8IntrinsicIdentifier", node, opts);
  9842. }
  9843. function assertArgumentPlaceholder(node, opts) {
  9844. assert("ArgumentPlaceholder", node, opts);
  9845. }
  9846. function assertBindExpression(node, opts) {
  9847. assert("BindExpression", node, opts);
  9848. }
  9849. function assertPipelineTopicExpression(node, opts) {
  9850. assert("PipelineTopicExpression", node, opts);
  9851. }
  9852. function assertPipelineBareFunction(node, opts) {
  9853. assert("PipelineBareFunction", node, opts);
  9854. }
  9855. function assertPipelinePrimaryTopicReference(node, opts) {
  9856. assert("PipelinePrimaryTopicReference", node, opts);
  9857. }
  9858. function assertImportAttribute(node, opts) {
  9859. assert("ImportAttribute", node, opts);
  9860. }
  9861. function assertDecorator(node, opts) {
  9862. assert("Decorator", node, opts);
  9863. }
  9864. function assertDoExpression(node, opts) {
  9865. assert("DoExpression", node, opts);
  9866. }
  9867. function assertExportDefaultSpecifier(node, opts) {
  9868. assert("ExportDefaultSpecifier", node, opts);
  9869. }
  9870. function assertRecordExpression(node, opts) {
  9871. assert("RecordExpression", node, opts);
  9872. }
  9873. function assertTupleExpression(node, opts) {
  9874. assert("TupleExpression", node, opts);
  9875. }
  9876. function assertDecimalLiteral(node, opts) {
  9877. assert("DecimalLiteral", node, opts);
  9878. }
  9879. function assertStaticBlock(node, opts) {
  9880. assert("StaticBlock", node, opts);
  9881. }
  9882. function assertModuleExpression(node, opts) {
  9883. assert("ModuleExpression", node, opts);
  9884. }
  9885. function assertTSParameterProperty(node, opts) {
  9886. assert("TSParameterProperty", node, opts);
  9887. }
  9888. function assertTSDeclareFunction(node, opts) {
  9889. assert("TSDeclareFunction", node, opts);
  9890. }
  9891. function assertTSDeclareMethod(node, opts) {
  9892. assert("TSDeclareMethod", node, opts);
  9893. }
  9894. function assertTSQualifiedName(node, opts) {
  9895. assert("TSQualifiedName", node, opts);
  9896. }
  9897. function assertTSCallSignatureDeclaration(node, opts) {
  9898. assert("TSCallSignatureDeclaration", node, opts);
  9899. }
  9900. function assertTSConstructSignatureDeclaration(node, opts) {
  9901. assert("TSConstructSignatureDeclaration", node, opts);
  9902. }
  9903. function assertTSPropertySignature(node, opts) {
  9904. assert("TSPropertySignature", node, opts);
  9905. }
  9906. function assertTSMethodSignature(node, opts) {
  9907. assert("TSMethodSignature", node, opts);
  9908. }
  9909. function assertTSIndexSignature(node, opts) {
  9910. assert("TSIndexSignature", node, opts);
  9911. }
  9912. function assertTSAnyKeyword(node, opts) {
  9913. assert("TSAnyKeyword", node, opts);
  9914. }
  9915. function assertTSBooleanKeyword(node, opts) {
  9916. assert("TSBooleanKeyword", node, opts);
  9917. }
  9918. function assertTSBigIntKeyword(node, opts) {
  9919. assert("TSBigIntKeyword", node, opts);
  9920. }
  9921. function assertTSIntrinsicKeyword(node, opts) {
  9922. assert("TSIntrinsicKeyword", node, opts);
  9923. }
  9924. function assertTSNeverKeyword(node, opts) {
  9925. assert("TSNeverKeyword", node, opts);
  9926. }
  9927. function assertTSNullKeyword(node, opts) {
  9928. assert("TSNullKeyword", node, opts);
  9929. }
  9930. function assertTSNumberKeyword(node, opts) {
  9931. assert("TSNumberKeyword", node, opts);
  9932. }
  9933. function assertTSObjectKeyword(node, opts) {
  9934. assert("TSObjectKeyword", node, opts);
  9935. }
  9936. function assertTSStringKeyword(node, opts) {
  9937. assert("TSStringKeyword", node, opts);
  9938. }
  9939. function assertTSSymbolKeyword(node, opts) {
  9940. assert("TSSymbolKeyword", node, opts);
  9941. }
  9942. function assertTSUndefinedKeyword(node, opts) {
  9943. assert("TSUndefinedKeyword", node, opts);
  9944. }
  9945. function assertTSUnknownKeyword(node, opts) {
  9946. assert("TSUnknownKeyword", node, opts);
  9947. }
  9948. function assertTSVoidKeyword(node, opts) {
  9949. assert("TSVoidKeyword", node, opts);
  9950. }
  9951. function assertTSThisType(node, opts) {
  9952. assert("TSThisType", node, opts);
  9953. }
  9954. function assertTSFunctionType(node, opts) {
  9955. assert("TSFunctionType", node, opts);
  9956. }
  9957. function assertTSConstructorType(node, opts) {
  9958. assert("TSConstructorType", node, opts);
  9959. }
  9960. function assertTSTypeReference(node, opts) {
  9961. assert("TSTypeReference", node, opts);
  9962. }
  9963. function assertTSTypePredicate(node, opts) {
  9964. assert("TSTypePredicate", node, opts);
  9965. }
  9966. function assertTSTypeQuery(node, opts) {
  9967. assert("TSTypeQuery", node, opts);
  9968. }
  9969. function assertTSTypeLiteral(node, opts) {
  9970. assert("TSTypeLiteral", node, opts);
  9971. }
  9972. function assertTSArrayType(node, opts) {
  9973. assert("TSArrayType", node, opts);
  9974. }
  9975. function assertTSTupleType(node, opts) {
  9976. assert("TSTupleType", node, opts);
  9977. }
  9978. function assertTSOptionalType(node, opts) {
  9979. assert("TSOptionalType", node, opts);
  9980. }
  9981. function assertTSRestType(node, opts) {
  9982. assert("TSRestType", node, opts);
  9983. }
  9984. function assertTSNamedTupleMember(node, opts) {
  9985. assert("TSNamedTupleMember", node, opts);
  9986. }
  9987. function assertTSUnionType(node, opts) {
  9988. assert("TSUnionType", node, opts);
  9989. }
  9990. function assertTSIntersectionType(node, opts) {
  9991. assert("TSIntersectionType", node, opts);
  9992. }
  9993. function assertTSConditionalType(node, opts) {
  9994. assert("TSConditionalType", node, opts);
  9995. }
  9996. function assertTSInferType(node, opts) {
  9997. assert("TSInferType", node, opts);
  9998. }
  9999. function assertTSParenthesizedType(node, opts) {
  10000. assert("TSParenthesizedType", node, opts);
  10001. }
  10002. function assertTSTypeOperator(node, opts) {
  10003. assert("TSTypeOperator", node, opts);
  10004. }
  10005. function assertTSIndexedAccessType(node, opts) {
  10006. assert("TSIndexedAccessType", node, opts);
  10007. }
  10008. function assertTSMappedType(node, opts) {
  10009. assert("TSMappedType", node, opts);
  10010. }
  10011. function assertTSLiteralType(node, opts) {
  10012. assert("TSLiteralType", node, opts);
  10013. }
  10014. function assertTSExpressionWithTypeArguments(node, opts) {
  10015. assert("TSExpressionWithTypeArguments", node, opts);
  10016. }
  10017. function assertTSInterfaceDeclaration(node, opts) {
  10018. assert("TSInterfaceDeclaration", node, opts);
  10019. }
  10020. function assertTSInterfaceBody(node, opts) {
  10021. assert("TSInterfaceBody", node, opts);
  10022. }
  10023. function assertTSTypeAliasDeclaration(node, opts) {
  10024. assert("TSTypeAliasDeclaration", node, opts);
  10025. }
  10026. function assertTSAsExpression(node, opts) {
  10027. assert("TSAsExpression", node, opts);
  10028. }
  10029. function assertTSTypeAssertion(node, opts) {
  10030. assert("TSTypeAssertion", node, opts);
  10031. }
  10032. function assertTSEnumDeclaration(node, opts) {
  10033. assert("TSEnumDeclaration", node, opts);
  10034. }
  10035. function assertTSEnumMember(node, opts) {
  10036. assert("TSEnumMember", node, opts);
  10037. }
  10038. function assertTSModuleDeclaration(node, opts) {
  10039. assert("TSModuleDeclaration", node, opts);
  10040. }
  10041. function assertTSModuleBlock(node, opts) {
  10042. assert("TSModuleBlock", node, opts);
  10043. }
  10044. function assertTSImportType(node, opts) {
  10045. assert("TSImportType", node, opts);
  10046. }
  10047. function assertTSImportEqualsDeclaration(node, opts) {
  10048. assert("TSImportEqualsDeclaration", node, opts);
  10049. }
  10050. function assertTSExternalModuleReference(node, opts) {
  10051. assert("TSExternalModuleReference", node, opts);
  10052. }
  10053. function assertTSNonNullExpression(node, opts) {
  10054. assert("TSNonNullExpression", node, opts);
  10055. }
  10056. function assertTSExportAssignment(node, opts) {
  10057. assert("TSExportAssignment", node, opts);
  10058. }
  10059. function assertTSNamespaceExportDeclaration(node, opts) {
  10060. assert("TSNamespaceExportDeclaration", node, opts);
  10061. }
  10062. function assertTSTypeAnnotation(node, opts) {
  10063. assert("TSTypeAnnotation", node, opts);
  10064. }
  10065. function assertTSTypeParameterInstantiation(node, opts) {
  10066. assert("TSTypeParameterInstantiation", node, opts);
  10067. }
  10068. function assertTSTypeParameterDeclaration(node, opts) {
  10069. assert("TSTypeParameterDeclaration", node, opts);
  10070. }
  10071. function assertTSTypeParameter(node, opts) {
  10072. assert("TSTypeParameter", node, opts);
  10073. }
  10074. function assertExpression(node, opts) {
  10075. assert("Expression", node, opts);
  10076. }
  10077. function assertBinary(node, opts) {
  10078. assert("Binary", node, opts);
  10079. }
  10080. function assertScopable(node, opts) {
  10081. assert("Scopable", node, opts);
  10082. }
  10083. function assertBlockParent(node, opts) {
  10084. assert("BlockParent", node, opts);
  10085. }
  10086. function assertBlock(node, opts) {
  10087. assert("Block", node, opts);
  10088. }
  10089. function assertStatement(node, opts) {
  10090. assert("Statement", node, opts);
  10091. }
  10092. function assertTerminatorless(node, opts) {
  10093. assert("Terminatorless", node, opts);
  10094. }
  10095. function assertCompletionStatement(node, opts) {
  10096. assert("CompletionStatement", node, opts);
  10097. }
  10098. function assertConditional(node, opts) {
  10099. assert("Conditional", node, opts);
  10100. }
  10101. function assertLoop(node, opts) {
  10102. assert("Loop", node, opts);
  10103. }
  10104. function assertWhile(node, opts) {
  10105. assert("While", node, opts);
  10106. }
  10107. function assertExpressionWrapper(node, opts) {
  10108. assert("ExpressionWrapper", node, opts);
  10109. }
  10110. function assertFor(node, opts) {
  10111. assert("For", node, opts);
  10112. }
  10113. function assertForXStatement(node, opts) {
  10114. assert("ForXStatement", node, opts);
  10115. }
  10116. function assertFunction(node, opts) {
  10117. assert("Function", node, opts);
  10118. }
  10119. function assertFunctionParent(node, opts) {
  10120. assert("FunctionParent", node, opts);
  10121. }
  10122. function assertPureish(node, opts) {
  10123. assert("Pureish", node, opts);
  10124. }
  10125. function assertDeclaration(node, opts) {
  10126. assert("Declaration", node, opts);
  10127. }
  10128. function assertPatternLike(node, opts) {
  10129. assert("PatternLike", node, opts);
  10130. }
  10131. function assertLVal(node, opts) {
  10132. assert("LVal", node, opts);
  10133. }
  10134. function assertTSEntityName(node, opts) {
  10135. assert("TSEntityName", node, opts);
  10136. }
  10137. function assertLiteral(node, opts) {
  10138. assert("Literal", node, opts);
  10139. }
  10140. function assertImmutable(node, opts) {
  10141. assert("Immutable", node, opts);
  10142. }
  10143. function assertUserWhitespacable(node, opts) {
  10144. assert("UserWhitespacable", node, opts);
  10145. }
  10146. function assertMethod(node, opts) {
  10147. assert("Method", node, opts);
  10148. }
  10149. function assertObjectMember(node, opts) {
  10150. assert("ObjectMember", node, opts);
  10151. }
  10152. function assertProperty(node, opts) {
  10153. assert("Property", node, opts);
  10154. }
  10155. function assertUnaryLike(node, opts) {
  10156. assert("UnaryLike", node, opts);
  10157. }
  10158. function assertPattern(node, opts) {
  10159. assert("Pattern", node, opts);
  10160. }
  10161. function assertClass(node, opts) {
  10162. assert("Class", node, opts);
  10163. }
  10164. function assertModuleDeclaration(node, opts) {
  10165. assert("ModuleDeclaration", node, opts);
  10166. }
  10167. function assertExportDeclaration(node, opts) {
  10168. assert("ExportDeclaration", node, opts);
  10169. }
  10170. function assertModuleSpecifier(node, opts) {
  10171. assert("ModuleSpecifier", node, opts);
  10172. }
  10173. function assertPrivate(node, opts) {
  10174. assert("Private", node, opts);
  10175. }
  10176. function assertFlow(node, opts) {
  10177. assert("Flow", node, opts);
  10178. }
  10179. function assertFlowType(node, opts) {
  10180. assert("FlowType", node, opts);
  10181. }
  10182. function assertFlowBaseAnnotation(node, opts) {
  10183. assert("FlowBaseAnnotation", node, opts);
  10184. }
  10185. function assertFlowDeclaration(node, opts) {
  10186. assert("FlowDeclaration", node, opts);
  10187. }
  10188. function assertFlowPredicate(node, opts) {
  10189. assert("FlowPredicate", node, opts);
  10190. }
  10191. function assertEnumBody(node, opts) {
  10192. assert("EnumBody", node, opts);
  10193. }
  10194. function assertEnumMember(node, opts) {
  10195. assert("EnumMember", node, opts);
  10196. }
  10197. function assertJSX(node, opts) {
  10198. assert("JSX", node, opts);
  10199. }
  10200. function assertTSTypeElement(node, opts) {
  10201. assert("TSTypeElement", node, opts);
  10202. }
  10203. function assertTSType(node, opts) {
  10204. assert("TSType", node, opts);
  10205. }
  10206. function assertTSBaseType(node, opts) {
  10207. assert("TSBaseType", node, opts);
  10208. }
  10209. function assertNumberLiteral(node, opts) {
  10210. console.trace("The node type NumberLiteral has been renamed to NumericLiteral");
  10211. assert("NumberLiteral", node, opts);
  10212. }
  10213. function assertRegexLiteral(node, opts) {
  10214. console.trace("The node type RegexLiteral has been renamed to RegExpLiteral");
  10215. assert("RegexLiteral", node, opts);
  10216. }
  10217. function assertRestProperty(node, opts) {
  10218. console.trace("The node type RestProperty has been renamed to RestElement");
  10219. assert("RestProperty", node, opts);
  10220. }
  10221. function assertSpreadProperty(node, opts) {
  10222. console.trace("The node type SpreadProperty has been renamed to SpreadElement");
  10223. assert("SpreadProperty", node, opts);
  10224. }
  10225. }
  10226. });
  10227. // node_modules/@babel/types/lib/builders/flow/createTypeAnnotationBasedOnTypeof.js
  10228. var require_createTypeAnnotationBasedOnTypeof = __commonJS({
  10229. "node_modules/@babel/types/lib/builders/flow/createTypeAnnotationBasedOnTypeof.js"(exports) {
  10230. "use strict";
  10231. Object.defineProperty(exports, "__esModule", {
  10232. value: true
  10233. });
  10234. exports.default = createTypeAnnotationBasedOnTypeof;
  10235. var _generated = require_generated2();
  10236. function createTypeAnnotationBasedOnTypeof(type) {
  10237. if (type === "string") {
  10238. return (0, _generated.stringTypeAnnotation)();
  10239. } else if (type === "number") {
  10240. return (0, _generated.numberTypeAnnotation)();
  10241. } else if (type === "undefined") {
  10242. return (0, _generated.voidTypeAnnotation)();
  10243. } else if (type === "boolean") {
  10244. return (0, _generated.booleanTypeAnnotation)();
  10245. } else if (type === "function") {
  10246. return (0, _generated.genericTypeAnnotation)((0, _generated.identifier)("Function"));
  10247. } else if (type === "object") {
  10248. return (0, _generated.genericTypeAnnotation)((0, _generated.identifier)("Object"));
  10249. } else if (type === "symbol") {
  10250. return (0, _generated.genericTypeAnnotation)((0, _generated.identifier)("Symbol"));
  10251. } else if (type === "bigint") {
  10252. return (0, _generated.anyTypeAnnotation)();
  10253. } else {
  10254. throw new Error("Invalid typeof value: " + type);
  10255. }
  10256. }
  10257. }
  10258. });
  10259. // node_modules/@babel/types/lib/modifications/flow/removeTypeDuplicates.js
  10260. var require_removeTypeDuplicates = __commonJS({
  10261. "node_modules/@babel/types/lib/modifications/flow/removeTypeDuplicates.js"(exports) {
  10262. "use strict";
  10263. Object.defineProperty(exports, "__esModule", {
  10264. value: true
  10265. });
  10266. exports.default = removeTypeDuplicates;
  10267. var _generated = require_generated();
  10268. function getQualifiedName(node) {
  10269. return (0, _generated.isIdentifier)(node) ? node.name : `${node.id.name}.${getQualifiedName(node.qualification)}`;
  10270. }
  10271. function removeTypeDuplicates(nodes) {
  10272. const generics = {};
  10273. const bases = {};
  10274. const typeGroups = [];
  10275. const types2 = [];
  10276. for (let i = 0; i < nodes.length; i++) {
  10277. const node = nodes[i];
  10278. if (!node)
  10279. continue;
  10280. if (types2.indexOf(node) >= 0) {
  10281. continue;
  10282. }
  10283. if ((0, _generated.isAnyTypeAnnotation)(node)) {
  10284. return [node];
  10285. }
  10286. if ((0, _generated.isFlowBaseAnnotation)(node)) {
  10287. bases[node.type] = node;
  10288. continue;
  10289. }
  10290. if ((0, _generated.isUnionTypeAnnotation)(node)) {
  10291. if (typeGroups.indexOf(node.types) < 0) {
  10292. nodes = nodes.concat(node.types);
  10293. typeGroups.push(node.types);
  10294. }
  10295. continue;
  10296. }
  10297. if ((0, _generated.isGenericTypeAnnotation)(node)) {
  10298. const name2 = getQualifiedName(node.id);
  10299. if (generics[name2]) {
  10300. let existing = generics[name2];
  10301. if (existing.typeParameters) {
  10302. if (node.typeParameters) {
  10303. existing.typeParameters.params = removeTypeDuplicates(existing.typeParameters.params.concat(node.typeParameters.params));
  10304. }
  10305. } else {
  10306. existing = node.typeParameters;
  10307. }
  10308. } else {
  10309. generics[name2] = node;
  10310. }
  10311. continue;
  10312. }
  10313. types2.push(node);
  10314. }
  10315. for (const type of Object.keys(bases)) {
  10316. types2.push(bases[type]);
  10317. }
  10318. for (const name2 of Object.keys(generics)) {
  10319. types2.push(generics[name2]);
  10320. }
  10321. return types2;
  10322. }
  10323. }
  10324. });
  10325. // node_modules/@babel/types/lib/builders/flow/createFlowUnionType.js
  10326. var require_createFlowUnionType = __commonJS({
  10327. "node_modules/@babel/types/lib/builders/flow/createFlowUnionType.js"(exports) {
  10328. "use strict";
  10329. Object.defineProperty(exports, "__esModule", {
  10330. value: true
  10331. });
  10332. exports.default = createFlowUnionType;
  10333. var _generated = require_generated2();
  10334. var _removeTypeDuplicates = require_removeTypeDuplicates();
  10335. function createFlowUnionType(types2) {
  10336. const flattened = (0, _removeTypeDuplicates.default)(types2);
  10337. if (flattened.length === 1) {
  10338. return flattened[0];
  10339. } else {
  10340. return (0, _generated.unionTypeAnnotation)(flattened);
  10341. }
  10342. }
  10343. }
  10344. });
  10345. // node_modules/@babel/types/lib/modifications/typescript/removeTypeDuplicates.js
  10346. var require_removeTypeDuplicates2 = __commonJS({
  10347. "node_modules/@babel/types/lib/modifications/typescript/removeTypeDuplicates.js"(exports) {
  10348. "use strict";
  10349. Object.defineProperty(exports, "__esModule", {
  10350. value: true
  10351. });
  10352. exports.default = removeTypeDuplicates;
  10353. var _generated = require_generated();
  10354. function removeTypeDuplicates(nodes) {
  10355. const generics = {};
  10356. const bases = {};
  10357. const typeGroups = [];
  10358. const types2 = [];
  10359. for (let i = 0; i < nodes.length; i++) {
  10360. const node = nodes[i];
  10361. if (!node)
  10362. continue;
  10363. if (types2.indexOf(node) >= 0) {
  10364. continue;
  10365. }
  10366. if ((0, _generated.isTSAnyKeyword)(node)) {
  10367. return [node];
  10368. }
  10369. if ((0, _generated.isTSBaseType)(node)) {
  10370. bases[node.type] = node;
  10371. continue;
  10372. }
  10373. if ((0, _generated.isTSUnionType)(node)) {
  10374. if (typeGroups.indexOf(node.types) < 0) {
  10375. nodes = nodes.concat(node.types);
  10376. typeGroups.push(node.types);
  10377. }
  10378. continue;
  10379. }
  10380. types2.push(node);
  10381. }
  10382. for (const type of Object.keys(bases)) {
  10383. types2.push(bases[type]);
  10384. }
  10385. for (const name2 of Object.keys(generics)) {
  10386. types2.push(generics[name2]);
  10387. }
  10388. return types2;
  10389. }
  10390. }
  10391. });
  10392. // node_modules/@babel/types/lib/builders/typescript/createTSUnionType.js
  10393. var require_createTSUnionType = __commonJS({
  10394. "node_modules/@babel/types/lib/builders/typescript/createTSUnionType.js"(exports) {
  10395. "use strict";
  10396. Object.defineProperty(exports, "__esModule", {
  10397. value: true
  10398. });
  10399. exports.default = createTSUnionType;
  10400. var _generated = require_generated2();
  10401. var _removeTypeDuplicates = require_removeTypeDuplicates2();
  10402. function createTSUnionType(typeAnnotations) {
  10403. const types2 = typeAnnotations.map((type) => type.typeAnnotation);
  10404. const flattened = (0, _removeTypeDuplicates.default)(types2);
  10405. if (flattened.length === 1) {
  10406. return flattened[0];
  10407. } else {
  10408. return (0, _generated.tsUnionType)(flattened);
  10409. }
  10410. }
  10411. }
  10412. });
  10413. // node_modules/@babel/types/lib/builders/generated/uppercase.js
  10414. var require_uppercase = __commonJS({
  10415. "node_modules/@babel/types/lib/builders/generated/uppercase.js"(exports) {
  10416. "use strict";
  10417. Object.defineProperty(exports, "__esModule", {
  10418. value: true
  10419. });
  10420. Object.defineProperty(exports, "ArrayExpression", {
  10421. enumerable: true,
  10422. get: function() {
  10423. return _index.arrayExpression;
  10424. }
  10425. });
  10426. Object.defineProperty(exports, "AssignmentExpression", {
  10427. enumerable: true,
  10428. get: function() {
  10429. return _index.assignmentExpression;
  10430. }
  10431. });
  10432. Object.defineProperty(exports, "BinaryExpression", {
  10433. enumerable: true,
  10434. get: function() {
  10435. return _index.binaryExpression;
  10436. }
  10437. });
  10438. Object.defineProperty(exports, "InterpreterDirective", {
  10439. enumerable: true,
  10440. get: function() {
  10441. return _index.interpreterDirective;
  10442. }
  10443. });
  10444. Object.defineProperty(exports, "Directive", {
  10445. enumerable: true,
  10446. get: function() {
  10447. return _index.directive;
  10448. }
  10449. });
  10450. Object.defineProperty(exports, "DirectiveLiteral", {
  10451. enumerable: true,
  10452. get: function() {
  10453. return _index.directiveLiteral;
  10454. }
  10455. });
  10456. Object.defineProperty(exports, "BlockStatement", {
  10457. enumerable: true,
  10458. get: function() {
  10459. return _index.blockStatement;
  10460. }
  10461. });
  10462. Object.defineProperty(exports, "BreakStatement", {
  10463. enumerable: true,
  10464. get: function() {
  10465. return _index.breakStatement;
  10466. }
  10467. });
  10468. Object.defineProperty(exports, "CallExpression", {
  10469. enumerable: true,
  10470. get: function() {
  10471. return _index.callExpression;
  10472. }
  10473. });
  10474. Object.defineProperty(exports, "CatchClause", {
  10475. enumerable: true,
  10476. get: function() {
  10477. return _index.catchClause;
  10478. }
  10479. });
  10480. Object.defineProperty(exports, "ConditionalExpression", {
  10481. enumerable: true,
  10482. get: function() {
  10483. return _index.conditionalExpression;
  10484. }
  10485. });
  10486. Object.defineProperty(exports, "ContinueStatement", {
  10487. enumerable: true,
  10488. get: function() {
  10489. return _index.continueStatement;
  10490. }
  10491. });
  10492. Object.defineProperty(exports, "DebuggerStatement", {
  10493. enumerable: true,
  10494. get: function() {
  10495. return _index.debuggerStatement;
  10496. }
  10497. });
  10498. Object.defineProperty(exports, "DoWhileStatement", {
  10499. enumerable: true,
  10500. get: function() {
  10501. return _index.doWhileStatement;
  10502. }
  10503. });
  10504. Object.defineProperty(exports, "EmptyStatement", {
  10505. enumerable: true,
  10506. get: function() {
  10507. return _index.emptyStatement;
  10508. }
  10509. });
  10510. Object.defineProperty(exports, "ExpressionStatement", {
  10511. enumerable: true,
  10512. get: function() {
  10513. return _index.expressionStatement;
  10514. }
  10515. });
  10516. Object.defineProperty(exports, "File", {
  10517. enumerable: true,
  10518. get: function() {
  10519. return _index.file;
  10520. }
  10521. });
  10522. Object.defineProperty(exports, "ForInStatement", {
  10523. enumerable: true,
  10524. get: function() {
  10525. return _index.forInStatement;
  10526. }
  10527. });
  10528. Object.defineProperty(exports, "ForStatement", {
  10529. enumerable: true,
  10530. get: function() {
  10531. return _index.forStatement;
  10532. }
  10533. });
  10534. Object.defineProperty(exports, "FunctionDeclaration", {
  10535. enumerable: true,
  10536. get: function() {
  10537. return _index.functionDeclaration;
  10538. }
  10539. });
  10540. Object.defineProperty(exports, "FunctionExpression", {
  10541. enumerable: true,
  10542. get: function() {
  10543. return _index.functionExpression;
  10544. }
  10545. });
  10546. Object.defineProperty(exports, "Identifier", {
  10547. enumerable: true,
  10548. get: function() {
  10549. return _index.identifier;
  10550. }
  10551. });
  10552. Object.defineProperty(exports, "IfStatement", {
  10553. enumerable: true,
  10554. get: function() {
  10555. return _index.ifStatement;
  10556. }
  10557. });
  10558. Object.defineProperty(exports, "LabeledStatement", {
  10559. enumerable: true,
  10560. get: function() {
  10561. return _index.labeledStatement;
  10562. }
  10563. });
  10564. Object.defineProperty(exports, "StringLiteral", {
  10565. enumerable: true,
  10566. get: function() {
  10567. return _index.stringLiteral;
  10568. }
  10569. });
  10570. Object.defineProperty(exports, "NumericLiteral", {
  10571. enumerable: true,
  10572. get: function() {
  10573. return _index.numericLiteral;
  10574. }
  10575. });
  10576. Object.defineProperty(exports, "NullLiteral", {
  10577. enumerable: true,
  10578. get: function() {
  10579. return _index.nullLiteral;
  10580. }
  10581. });
  10582. Object.defineProperty(exports, "BooleanLiteral", {
  10583. enumerable: true,
  10584. get: function() {
  10585. return _index.booleanLiteral;
  10586. }
  10587. });
  10588. Object.defineProperty(exports, "RegExpLiteral", {
  10589. enumerable: true,
  10590. get: function() {
  10591. return _index.regExpLiteral;
  10592. }
  10593. });
  10594. Object.defineProperty(exports, "LogicalExpression", {
  10595. enumerable: true,
  10596. get: function() {
  10597. return _index.logicalExpression;
  10598. }
  10599. });
  10600. Object.defineProperty(exports, "MemberExpression", {
  10601. enumerable: true,
  10602. get: function() {
  10603. return _index.memberExpression;
  10604. }
  10605. });
  10606. Object.defineProperty(exports, "NewExpression", {
  10607. enumerable: true,
  10608. get: function() {
  10609. return _index.newExpression;
  10610. }
  10611. });
  10612. Object.defineProperty(exports, "Program", {
  10613. enumerable: true,
  10614. get: function() {
  10615. return _index.program;
  10616. }
  10617. });
  10618. Object.defineProperty(exports, "ObjectExpression", {
  10619. enumerable: true,
  10620. get: function() {
  10621. return _index.objectExpression;
  10622. }
  10623. });
  10624. Object.defineProperty(exports, "ObjectMethod", {
  10625. enumerable: true,
  10626. get: function() {
  10627. return _index.objectMethod;
  10628. }
  10629. });
  10630. Object.defineProperty(exports, "ObjectProperty", {
  10631. enumerable: true,
  10632. get: function() {
  10633. return _index.objectProperty;
  10634. }
  10635. });
  10636. Object.defineProperty(exports, "RestElement", {
  10637. enumerable: true,
  10638. get: function() {
  10639. return _index.restElement;
  10640. }
  10641. });
  10642. Object.defineProperty(exports, "ReturnStatement", {
  10643. enumerable: true,
  10644. get: function() {
  10645. return _index.returnStatement;
  10646. }
  10647. });
  10648. Object.defineProperty(exports, "SequenceExpression", {
  10649. enumerable: true,
  10650. get: function() {
  10651. return _index.sequenceExpression;
  10652. }
  10653. });
  10654. Object.defineProperty(exports, "ParenthesizedExpression", {
  10655. enumerable: true,
  10656. get: function() {
  10657. return _index.parenthesizedExpression;
  10658. }
  10659. });
  10660. Object.defineProperty(exports, "SwitchCase", {
  10661. enumerable: true,
  10662. get: function() {
  10663. return _index.switchCase;
  10664. }
  10665. });
  10666. Object.defineProperty(exports, "SwitchStatement", {
  10667. enumerable: true,
  10668. get: function() {
  10669. return _index.switchStatement;
  10670. }
  10671. });
  10672. Object.defineProperty(exports, "ThisExpression", {
  10673. enumerable: true,
  10674. get: function() {
  10675. return _index.thisExpression;
  10676. }
  10677. });
  10678. Object.defineProperty(exports, "ThrowStatement", {
  10679. enumerable: true,
  10680. get: function() {
  10681. return _index.throwStatement;
  10682. }
  10683. });
  10684. Object.defineProperty(exports, "TryStatement", {
  10685. enumerable: true,
  10686. get: function() {
  10687. return _index.tryStatement;
  10688. }
  10689. });
  10690. Object.defineProperty(exports, "UnaryExpression", {
  10691. enumerable: true,
  10692. get: function() {
  10693. return _index.unaryExpression;
  10694. }
  10695. });
  10696. Object.defineProperty(exports, "UpdateExpression", {
  10697. enumerable: true,
  10698. get: function() {
  10699. return _index.updateExpression;
  10700. }
  10701. });
  10702. Object.defineProperty(exports, "VariableDeclaration", {
  10703. enumerable: true,
  10704. get: function() {
  10705. return _index.variableDeclaration;
  10706. }
  10707. });
  10708. Object.defineProperty(exports, "VariableDeclarator", {
  10709. enumerable: true,
  10710. get: function() {
  10711. return _index.variableDeclarator;
  10712. }
  10713. });
  10714. Object.defineProperty(exports, "WhileStatement", {
  10715. enumerable: true,
  10716. get: function() {
  10717. return _index.whileStatement;
  10718. }
  10719. });
  10720. Object.defineProperty(exports, "WithStatement", {
  10721. enumerable: true,
  10722. get: function() {
  10723. return _index.withStatement;
  10724. }
  10725. });
  10726. Object.defineProperty(exports, "AssignmentPattern", {
  10727. enumerable: true,
  10728. get: function() {
  10729. return _index.assignmentPattern;
  10730. }
  10731. });
  10732. Object.defineProperty(exports, "ArrayPattern", {
  10733. enumerable: true,
  10734. get: function() {
  10735. return _index.arrayPattern;
  10736. }
  10737. });
  10738. Object.defineProperty(exports, "ArrowFunctionExpression", {
  10739. enumerable: true,
  10740. get: function() {
  10741. return _index.arrowFunctionExpression;
  10742. }
  10743. });
  10744. Object.defineProperty(exports, "ClassBody", {
  10745. enumerable: true,
  10746. get: function() {
  10747. return _index.classBody;
  10748. }
  10749. });
  10750. Object.defineProperty(exports, "ClassExpression", {
  10751. enumerable: true,
  10752. get: function() {
  10753. return _index.classExpression;
  10754. }
  10755. });
  10756. Object.defineProperty(exports, "ClassDeclaration", {
  10757. enumerable: true,
  10758. get: function() {
  10759. return _index.classDeclaration;
  10760. }
  10761. });
  10762. Object.defineProperty(exports, "ExportAllDeclaration", {
  10763. enumerable: true,
  10764. get: function() {
  10765. return _index.exportAllDeclaration;
  10766. }
  10767. });
  10768. Object.defineProperty(exports, "ExportDefaultDeclaration", {
  10769. enumerable: true,
  10770. get: function() {
  10771. return _index.exportDefaultDeclaration;
  10772. }
  10773. });
  10774. Object.defineProperty(exports, "ExportNamedDeclaration", {
  10775. enumerable: true,
  10776. get: function() {
  10777. return _index.exportNamedDeclaration;
  10778. }
  10779. });
  10780. Object.defineProperty(exports, "ExportSpecifier", {
  10781. enumerable: true,
  10782. get: function() {
  10783. return _index.exportSpecifier;
  10784. }
  10785. });
  10786. Object.defineProperty(exports, "ForOfStatement", {
  10787. enumerable: true,
  10788. get: function() {
  10789. return _index.forOfStatement;
  10790. }
  10791. });
  10792. Object.defineProperty(exports, "ImportDeclaration", {
  10793. enumerable: true,
  10794. get: function() {
  10795. return _index.importDeclaration;
  10796. }
  10797. });
  10798. Object.defineProperty(exports, "ImportDefaultSpecifier", {
  10799. enumerable: true,
  10800. get: function() {
  10801. return _index.importDefaultSpecifier;
  10802. }
  10803. });
  10804. Object.defineProperty(exports, "ImportNamespaceSpecifier", {
  10805. enumerable: true,
  10806. get: function() {
  10807. return _index.importNamespaceSpecifier;
  10808. }
  10809. });
  10810. Object.defineProperty(exports, "ImportSpecifier", {
  10811. enumerable: true,
  10812. get: function() {
  10813. return _index.importSpecifier;
  10814. }
  10815. });
  10816. Object.defineProperty(exports, "MetaProperty", {
  10817. enumerable: true,
  10818. get: function() {
  10819. return _index.metaProperty;
  10820. }
  10821. });
  10822. Object.defineProperty(exports, "ClassMethod", {
  10823. enumerable: true,
  10824. get: function() {
  10825. return _index.classMethod;
  10826. }
  10827. });
  10828. Object.defineProperty(exports, "ObjectPattern", {
  10829. enumerable: true,
  10830. get: function() {
  10831. return _index.objectPattern;
  10832. }
  10833. });
  10834. Object.defineProperty(exports, "SpreadElement", {
  10835. enumerable: true,
  10836. get: function() {
  10837. return _index.spreadElement;
  10838. }
  10839. });
  10840. Object.defineProperty(exports, "Super", {
  10841. enumerable: true,
  10842. get: function() {
  10843. return _index.super;
  10844. }
  10845. });
  10846. Object.defineProperty(exports, "TaggedTemplateExpression", {
  10847. enumerable: true,
  10848. get: function() {
  10849. return _index.taggedTemplateExpression;
  10850. }
  10851. });
  10852. Object.defineProperty(exports, "TemplateElement", {
  10853. enumerable: true,
  10854. get: function() {
  10855. return _index.templateElement;
  10856. }
  10857. });
  10858. Object.defineProperty(exports, "TemplateLiteral", {
  10859. enumerable: true,
  10860. get: function() {
  10861. return _index.templateLiteral;
  10862. }
  10863. });
  10864. Object.defineProperty(exports, "YieldExpression", {
  10865. enumerable: true,
  10866. get: function() {
  10867. return _index.yieldExpression;
  10868. }
  10869. });
  10870. Object.defineProperty(exports, "AwaitExpression", {
  10871. enumerable: true,
  10872. get: function() {
  10873. return _index.awaitExpression;
  10874. }
  10875. });
  10876. Object.defineProperty(exports, "Import", {
  10877. enumerable: true,
  10878. get: function() {
  10879. return _index.import;
  10880. }
  10881. });
  10882. Object.defineProperty(exports, "BigIntLiteral", {
  10883. enumerable: true,
  10884. get: function() {
  10885. return _index.bigIntLiteral;
  10886. }
  10887. });
  10888. Object.defineProperty(exports, "ExportNamespaceSpecifier", {
  10889. enumerable: true,
  10890. get: function() {
  10891. return _index.exportNamespaceSpecifier;
  10892. }
  10893. });
  10894. Object.defineProperty(exports, "OptionalMemberExpression", {
  10895. enumerable: true,
  10896. get: function() {
  10897. return _index.optionalMemberExpression;
  10898. }
  10899. });
  10900. Object.defineProperty(exports, "OptionalCallExpression", {
  10901. enumerable: true,
  10902. get: function() {
  10903. return _index.optionalCallExpression;
  10904. }
  10905. });
  10906. Object.defineProperty(exports, "ClassProperty", {
  10907. enumerable: true,
  10908. get: function() {
  10909. return _index.classProperty;
  10910. }
  10911. });
  10912. Object.defineProperty(exports, "ClassPrivateProperty", {
  10913. enumerable: true,
  10914. get: function() {
  10915. return _index.classPrivateProperty;
  10916. }
  10917. });
  10918. Object.defineProperty(exports, "ClassPrivateMethod", {
  10919. enumerable: true,
  10920. get: function() {
  10921. return _index.classPrivateMethod;
  10922. }
  10923. });
  10924. Object.defineProperty(exports, "PrivateName", {
  10925. enumerable: true,
  10926. get: function() {
  10927. return _index.privateName;
  10928. }
  10929. });
  10930. Object.defineProperty(exports, "AnyTypeAnnotation", {
  10931. enumerable: true,
  10932. get: function() {
  10933. return _index.anyTypeAnnotation;
  10934. }
  10935. });
  10936. Object.defineProperty(exports, "ArrayTypeAnnotation", {
  10937. enumerable: true,
  10938. get: function() {
  10939. return _index.arrayTypeAnnotation;
  10940. }
  10941. });
  10942. Object.defineProperty(exports, "BooleanTypeAnnotation", {
  10943. enumerable: true,
  10944. get: function() {
  10945. return _index.booleanTypeAnnotation;
  10946. }
  10947. });
  10948. Object.defineProperty(exports, "BooleanLiteralTypeAnnotation", {
  10949. enumerable: true,
  10950. get: function() {
  10951. return _index.booleanLiteralTypeAnnotation;
  10952. }
  10953. });
  10954. Object.defineProperty(exports, "NullLiteralTypeAnnotation", {
  10955. enumerable: true,
  10956. get: function() {
  10957. return _index.nullLiteralTypeAnnotation;
  10958. }
  10959. });
  10960. Object.defineProperty(exports, "ClassImplements", {
  10961. enumerable: true,
  10962. get: function() {
  10963. return _index.classImplements;
  10964. }
  10965. });
  10966. Object.defineProperty(exports, "DeclareClass", {
  10967. enumerable: true,
  10968. get: function() {
  10969. return _index.declareClass;
  10970. }
  10971. });
  10972. Object.defineProperty(exports, "DeclareFunction", {
  10973. enumerable: true,
  10974. get: function() {
  10975. return _index.declareFunction;
  10976. }
  10977. });
  10978. Object.defineProperty(exports, "DeclareInterface", {
  10979. enumerable: true,
  10980. get: function() {
  10981. return _index.declareInterface;
  10982. }
  10983. });
  10984. Object.defineProperty(exports, "DeclareModule", {
  10985. enumerable: true,
  10986. get: function() {
  10987. return _index.declareModule;
  10988. }
  10989. });
  10990. Object.defineProperty(exports, "DeclareModuleExports", {
  10991. enumerable: true,
  10992. get: function() {
  10993. return _index.declareModuleExports;
  10994. }
  10995. });
  10996. Object.defineProperty(exports, "DeclareTypeAlias", {
  10997. enumerable: true,
  10998. get: function() {
  10999. return _index.declareTypeAlias;
  11000. }
  11001. });
  11002. Object.defineProperty(exports, "DeclareOpaqueType", {
  11003. enumerable: true,
  11004. get: function() {
  11005. return _index.declareOpaqueType;
  11006. }
  11007. });
  11008. Object.defineProperty(exports, "DeclareVariable", {
  11009. enumerable: true,
  11010. get: function() {
  11011. return _index.declareVariable;
  11012. }
  11013. });
  11014. Object.defineProperty(exports, "DeclareExportDeclaration", {
  11015. enumerable: true,
  11016. get: function() {
  11017. return _index.declareExportDeclaration;
  11018. }
  11019. });
  11020. Object.defineProperty(exports, "DeclareExportAllDeclaration", {
  11021. enumerable: true,
  11022. get: function() {
  11023. return _index.declareExportAllDeclaration;
  11024. }
  11025. });
  11026. Object.defineProperty(exports, "DeclaredPredicate", {
  11027. enumerable: true,
  11028. get: function() {
  11029. return _index.declaredPredicate;
  11030. }
  11031. });
  11032. Object.defineProperty(exports, "ExistsTypeAnnotation", {
  11033. enumerable: true,
  11034. get: function() {
  11035. return _index.existsTypeAnnotation;
  11036. }
  11037. });
  11038. Object.defineProperty(exports, "FunctionTypeAnnotation", {
  11039. enumerable: true,
  11040. get: function() {
  11041. return _index.functionTypeAnnotation;
  11042. }
  11043. });
  11044. Object.defineProperty(exports, "FunctionTypeParam", {
  11045. enumerable: true,
  11046. get: function() {
  11047. return _index.functionTypeParam;
  11048. }
  11049. });
  11050. Object.defineProperty(exports, "GenericTypeAnnotation", {
  11051. enumerable: true,
  11052. get: function() {
  11053. return _index.genericTypeAnnotation;
  11054. }
  11055. });
  11056. Object.defineProperty(exports, "InferredPredicate", {
  11057. enumerable: true,
  11058. get: function() {
  11059. return _index.inferredPredicate;
  11060. }
  11061. });
  11062. Object.defineProperty(exports, "InterfaceExtends", {
  11063. enumerable: true,
  11064. get: function() {
  11065. return _index.interfaceExtends;
  11066. }
  11067. });
  11068. Object.defineProperty(exports, "InterfaceDeclaration", {
  11069. enumerable: true,
  11070. get: function() {
  11071. return _index.interfaceDeclaration;
  11072. }
  11073. });
  11074. Object.defineProperty(exports, "InterfaceTypeAnnotation", {
  11075. enumerable: true,
  11076. get: function() {
  11077. return _index.interfaceTypeAnnotation;
  11078. }
  11079. });
  11080. Object.defineProperty(exports, "IntersectionTypeAnnotation", {
  11081. enumerable: true,
  11082. get: function() {
  11083. return _index.intersectionTypeAnnotation;
  11084. }
  11085. });
  11086. Object.defineProperty(exports, "MixedTypeAnnotation", {
  11087. enumerable: true,
  11088. get: function() {
  11089. return _index.mixedTypeAnnotation;
  11090. }
  11091. });
  11092. Object.defineProperty(exports, "EmptyTypeAnnotation", {
  11093. enumerable: true,
  11094. get: function() {
  11095. return _index.emptyTypeAnnotation;
  11096. }
  11097. });
  11098. Object.defineProperty(exports, "NullableTypeAnnotation", {
  11099. enumerable: true,
  11100. get: function() {
  11101. return _index.nullableTypeAnnotation;
  11102. }
  11103. });
  11104. Object.defineProperty(exports, "NumberLiteralTypeAnnotation", {
  11105. enumerable: true,
  11106. get: function() {
  11107. return _index.numberLiteralTypeAnnotation;
  11108. }
  11109. });
  11110. Object.defineProperty(exports, "NumberTypeAnnotation", {
  11111. enumerable: true,
  11112. get: function() {
  11113. return _index.numberTypeAnnotation;
  11114. }
  11115. });
  11116. Object.defineProperty(exports, "ObjectTypeAnnotation", {
  11117. enumerable: true,
  11118. get: function() {
  11119. return _index.objectTypeAnnotation;
  11120. }
  11121. });
  11122. Object.defineProperty(exports, "ObjectTypeInternalSlot", {
  11123. enumerable: true,
  11124. get: function() {
  11125. return _index.objectTypeInternalSlot;
  11126. }
  11127. });
  11128. Object.defineProperty(exports, "ObjectTypeCallProperty", {
  11129. enumerable: true,
  11130. get: function() {
  11131. return _index.objectTypeCallProperty;
  11132. }
  11133. });
  11134. Object.defineProperty(exports, "ObjectTypeIndexer", {
  11135. enumerable: true,
  11136. get: function() {
  11137. return _index.objectTypeIndexer;
  11138. }
  11139. });
  11140. Object.defineProperty(exports, "ObjectTypeProperty", {
  11141. enumerable: true,
  11142. get: function() {
  11143. return _index.objectTypeProperty;
  11144. }
  11145. });
  11146. Object.defineProperty(exports, "ObjectTypeSpreadProperty", {
  11147. enumerable: true,
  11148. get: function() {
  11149. return _index.objectTypeSpreadProperty;
  11150. }
  11151. });
  11152. Object.defineProperty(exports, "OpaqueType", {
  11153. enumerable: true,
  11154. get: function() {
  11155. return _index.opaqueType;
  11156. }
  11157. });
  11158. Object.defineProperty(exports, "QualifiedTypeIdentifier", {
  11159. enumerable: true,
  11160. get: function() {
  11161. return _index.qualifiedTypeIdentifier;
  11162. }
  11163. });
  11164. Object.defineProperty(exports, "StringLiteralTypeAnnotation", {
  11165. enumerable: true,
  11166. get: function() {
  11167. return _index.stringLiteralTypeAnnotation;
  11168. }
  11169. });
  11170. Object.defineProperty(exports, "StringTypeAnnotation", {
  11171. enumerable: true,
  11172. get: function() {
  11173. return _index.stringTypeAnnotation;
  11174. }
  11175. });
  11176. Object.defineProperty(exports, "SymbolTypeAnnotation", {
  11177. enumerable: true,
  11178. get: function() {
  11179. return _index.symbolTypeAnnotation;
  11180. }
  11181. });
  11182. Object.defineProperty(exports, "ThisTypeAnnotation", {
  11183. enumerable: true,
  11184. get: function() {
  11185. return _index.thisTypeAnnotation;
  11186. }
  11187. });
  11188. Object.defineProperty(exports, "TupleTypeAnnotation", {
  11189. enumerable: true,
  11190. get: function() {
  11191. return _index.tupleTypeAnnotation;
  11192. }
  11193. });
  11194. Object.defineProperty(exports, "TypeofTypeAnnotation", {
  11195. enumerable: true,
  11196. get: function() {
  11197. return _index.typeofTypeAnnotation;
  11198. }
  11199. });
  11200. Object.defineProperty(exports, "TypeAlias", {
  11201. enumerable: true,
  11202. get: function() {
  11203. return _index.typeAlias;
  11204. }
  11205. });
  11206. Object.defineProperty(exports, "TypeAnnotation", {
  11207. enumerable: true,
  11208. get: function() {
  11209. return _index.typeAnnotation;
  11210. }
  11211. });
  11212. Object.defineProperty(exports, "TypeCastExpression", {
  11213. enumerable: true,
  11214. get: function() {
  11215. return _index.typeCastExpression;
  11216. }
  11217. });
  11218. Object.defineProperty(exports, "TypeParameter", {
  11219. enumerable: true,
  11220. get: function() {
  11221. return _index.typeParameter;
  11222. }
  11223. });
  11224. Object.defineProperty(exports, "TypeParameterDeclaration", {
  11225. enumerable: true,
  11226. get: function() {
  11227. return _index.typeParameterDeclaration;
  11228. }
  11229. });
  11230. Object.defineProperty(exports, "TypeParameterInstantiation", {
  11231. enumerable: true,
  11232. get: function() {
  11233. return _index.typeParameterInstantiation;
  11234. }
  11235. });
  11236. Object.defineProperty(exports, "UnionTypeAnnotation", {
  11237. enumerable: true,
  11238. get: function() {
  11239. return _index.unionTypeAnnotation;
  11240. }
  11241. });
  11242. Object.defineProperty(exports, "Variance", {
  11243. enumerable: true,
  11244. get: function() {
  11245. return _index.variance;
  11246. }
  11247. });
  11248. Object.defineProperty(exports, "VoidTypeAnnotation", {
  11249. enumerable: true,
  11250. get: function() {
  11251. return _index.voidTypeAnnotation;
  11252. }
  11253. });
  11254. Object.defineProperty(exports, "EnumDeclaration", {
  11255. enumerable: true,
  11256. get: function() {
  11257. return _index.enumDeclaration;
  11258. }
  11259. });
  11260. Object.defineProperty(exports, "EnumBooleanBody", {
  11261. enumerable: true,
  11262. get: function() {
  11263. return _index.enumBooleanBody;
  11264. }
  11265. });
  11266. Object.defineProperty(exports, "EnumNumberBody", {
  11267. enumerable: true,
  11268. get: function() {
  11269. return _index.enumNumberBody;
  11270. }
  11271. });
  11272. Object.defineProperty(exports, "EnumStringBody", {
  11273. enumerable: true,
  11274. get: function() {
  11275. return _index.enumStringBody;
  11276. }
  11277. });
  11278. Object.defineProperty(exports, "EnumSymbolBody", {
  11279. enumerable: true,
  11280. get: function() {
  11281. return _index.enumSymbolBody;
  11282. }
  11283. });
  11284. Object.defineProperty(exports, "EnumBooleanMember", {
  11285. enumerable: true,
  11286. get: function() {
  11287. return _index.enumBooleanMember;
  11288. }
  11289. });
  11290. Object.defineProperty(exports, "EnumNumberMember", {
  11291. enumerable: true,
  11292. get: function() {
  11293. return _index.enumNumberMember;
  11294. }
  11295. });
  11296. Object.defineProperty(exports, "EnumStringMember", {
  11297. enumerable: true,
  11298. get: function() {
  11299. return _index.enumStringMember;
  11300. }
  11301. });
  11302. Object.defineProperty(exports, "EnumDefaultedMember", {
  11303. enumerable: true,
  11304. get: function() {
  11305. return _index.enumDefaultedMember;
  11306. }
  11307. });
  11308. Object.defineProperty(exports, "IndexedAccessType", {
  11309. enumerable: true,
  11310. get: function() {
  11311. return _index.indexedAccessType;
  11312. }
  11313. });
  11314. Object.defineProperty(exports, "OptionalIndexedAccessType", {
  11315. enumerable: true,
  11316. get: function() {
  11317. return _index.optionalIndexedAccessType;
  11318. }
  11319. });
  11320. Object.defineProperty(exports, "JSXAttribute", {
  11321. enumerable: true,
  11322. get: function() {
  11323. return _index.jsxAttribute;
  11324. }
  11325. });
  11326. Object.defineProperty(exports, "JSXClosingElement", {
  11327. enumerable: true,
  11328. get: function() {
  11329. return _index.jsxClosingElement;
  11330. }
  11331. });
  11332. Object.defineProperty(exports, "JSXElement", {
  11333. enumerable: true,
  11334. get: function() {
  11335. return _index.jsxElement;
  11336. }
  11337. });
  11338. Object.defineProperty(exports, "JSXEmptyExpression", {
  11339. enumerable: true,
  11340. get: function() {
  11341. return _index.jsxEmptyExpression;
  11342. }
  11343. });
  11344. Object.defineProperty(exports, "JSXExpressionContainer", {
  11345. enumerable: true,
  11346. get: function() {
  11347. return _index.jsxExpressionContainer;
  11348. }
  11349. });
  11350. Object.defineProperty(exports, "JSXSpreadChild", {
  11351. enumerable: true,
  11352. get: function() {
  11353. return _index.jsxSpreadChild;
  11354. }
  11355. });
  11356. Object.defineProperty(exports, "JSXIdentifier", {
  11357. enumerable: true,
  11358. get: function() {
  11359. return _index.jsxIdentifier;
  11360. }
  11361. });
  11362. Object.defineProperty(exports, "JSXMemberExpression", {
  11363. enumerable: true,
  11364. get: function() {
  11365. return _index.jsxMemberExpression;
  11366. }
  11367. });
  11368. Object.defineProperty(exports, "JSXNamespacedName", {
  11369. enumerable: true,
  11370. get: function() {
  11371. return _index.jsxNamespacedName;
  11372. }
  11373. });
  11374. Object.defineProperty(exports, "JSXOpeningElement", {
  11375. enumerable: true,
  11376. get: function() {
  11377. return _index.jsxOpeningElement;
  11378. }
  11379. });
  11380. Object.defineProperty(exports, "JSXSpreadAttribute", {
  11381. enumerable: true,
  11382. get: function() {
  11383. return _index.jsxSpreadAttribute;
  11384. }
  11385. });
  11386. Object.defineProperty(exports, "JSXText", {
  11387. enumerable: true,
  11388. get: function() {
  11389. return _index.jsxText;
  11390. }
  11391. });
  11392. Object.defineProperty(exports, "JSXFragment", {
  11393. enumerable: true,
  11394. get: function() {
  11395. return _index.jsxFragment;
  11396. }
  11397. });
  11398. Object.defineProperty(exports, "JSXOpeningFragment", {
  11399. enumerable: true,
  11400. get: function() {
  11401. return _index.jsxOpeningFragment;
  11402. }
  11403. });
  11404. Object.defineProperty(exports, "JSXClosingFragment", {
  11405. enumerable: true,
  11406. get: function() {
  11407. return _index.jsxClosingFragment;
  11408. }
  11409. });
  11410. Object.defineProperty(exports, "Noop", {
  11411. enumerable: true,
  11412. get: function() {
  11413. return _index.noop;
  11414. }
  11415. });
  11416. Object.defineProperty(exports, "Placeholder", {
  11417. enumerable: true,
  11418. get: function() {
  11419. return _index.placeholder;
  11420. }
  11421. });
  11422. Object.defineProperty(exports, "V8IntrinsicIdentifier", {
  11423. enumerable: true,
  11424. get: function() {
  11425. return _index.v8IntrinsicIdentifier;
  11426. }
  11427. });
  11428. Object.defineProperty(exports, "ArgumentPlaceholder", {
  11429. enumerable: true,
  11430. get: function() {
  11431. return _index.argumentPlaceholder;
  11432. }
  11433. });
  11434. Object.defineProperty(exports, "BindExpression", {
  11435. enumerable: true,
  11436. get: function() {
  11437. return _index.bindExpression;
  11438. }
  11439. });
  11440. Object.defineProperty(exports, "PipelineTopicExpression", {
  11441. enumerable: true,
  11442. get: function() {
  11443. return _index.pipelineTopicExpression;
  11444. }
  11445. });
  11446. Object.defineProperty(exports, "PipelineBareFunction", {
  11447. enumerable: true,
  11448. get: function() {
  11449. return _index.pipelineBareFunction;
  11450. }
  11451. });
  11452. Object.defineProperty(exports, "PipelinePrimaryTopicReference", {
  11453. enumerable: true,
  11454. get: function() {
  11455. return _index.pipelinePrimaryTopicReference;
  11456. }
  11457. });
  11458. Object.defineProperty(exports, "ImportAttribute", {
  11459. enumerable: true,
  11460. get: function() {
  11461. return _index.importAttribute;
  11462. }
  11463. });
  11464. Object.defineProperty(exports, "Decorator", {
  11465. enumerable: true,
  11466. get: function() {
  11467. return _index.decorator;
  11468. }
  11469. });
  11470. Object.defineProperty(exports, "DoExpression", {
  11471. enumerable: true,
  11472. get: function() {
  11473. return _index.doExpression;
  11474. }
  11475. });
  11476. Object.defineProperty(exports, "ExportDefaultSpecifier", {
  11477. enumerable: true,
  11478. get: function() {
  11479. return _index.exportDefaultSpecifier;
  11480. }
  11481. });
  11482. Object.defineProperty(exports, "RecordExpression", {
  11483. enumerable: true,
  11484. get: function() {
  11485. return _index.recordExpression;
  11486. }
  11487. });
  11488. Object.defineProperty(exports, "TupleExpression", {
  11489. enumerable: true,
  11490. get: function() {
  11491. return _index.tupleExpression;
  11492. }
  11493. });
  11494. Object.defineProperty(exports, "DecimalLiteral", {
  11495. enumerable: true,
  11496. get: function() {
  11497. return _index.decimalLiteral;
  11498. }
  11499. });
  11500. Object.defineProperty(exports, "StaticBlock", {
  11501. enumerable: true,
  11502. get: function() {
  11503. return _index.staticBlock;
  11504. }
  11505. });
  11506. Object.defineProperty(exports, "ModuleExpression", {
  11507. enumerable: true,
  11508. get: function() {
  11509. return _index.moduleExpression;
  11510. }
  11511. });
  11512. Object.defineProperty(exports, "TSParameterProperty", {
  11513. enumerable: true,
  11514. get: function() {
  11515. return _index.tsParameterProperty;
  11516. }
  11517. });
  11518. Object.defineProperty(exports, "TSDeclareFunction", {
  11519. enumerable: true,
  11520. get: function() {
  11521. return _index.tsDeclareFunction;
  11522. }
  11523. });
  11524. Object.defineProperty(exports, "TSDeclareMethod", {
  11525. enumerable: true,
  11526. get: function() {
  11527. return _index.tsDeclareMethod;
  11528. }
  11529. });
  11530. Object.defineProperty(exports, "TSQualifiedName", {
  11531. enumerable: true,
  11532. get: function() {
  11533. return _index.tsQualifiedName;
  11534. }
  11535. });
  11536. Object.defineProperty(exports, "TSCallSignatureDeclaration", {
  11537. enumerable: true,
  11538. get: function() {
  11539. return _index.tsCallSignatureDeclaration;
  11540. }
  11541. });
  11542. Object.defineProperty(exports, "TSConstructSignatureDeclaration", {
  11543. enumerable: true,
  11544. get: function() {
  11545. return _index.tsConstructSignatureDeclaration;
  11546. }
  11547. });
  11548. Object.defineProperty(exports, "TSPropertySignature", {
  11549. enumerable: true,
  11550. get: function() {
  11551. return _index.tsPropertySignature;
  11552. }
  11553. });
  11554. Object.defineProperty(exports, "TSMethodSignature", {
  11555. enumerable: true,
  11556. get: function() {
  11557. return _index.tsMethodSignature;
  11558. }
  11559. });
  11560. Object.defineProperty(exports, "TSIndexSignature", {
  11561. enumerable: true,
  11562. get: function() {
  11563. return _index.tsIndexSignature;
  11564. }
  11565. });
  11566. Object.defineProperty(exports, "TSAnyKeyword", {
  11567. enumerable: true,
  11568. get: function() {
  11569. return _index.tsAnyKeyword;
  11570. }
  11571. });
  11572. Object.defineProperty(exports, "TSBooleanKeyword", {
  11573. enumerable: true,
  11574. get: function() {
  11575. return _index.tsBooleanKeyword;
  11576. }
  11577. });
  11578. Object.defineProperty(exports, "TSBigIntKeyword", {
  11579. enumerable: true,
  11580. get: function() {
  11581. return _index.tsBigIntKeyword;
  11582. }
  11583. });
  11584. Object.defineProperty(exports, "TSIntrinsicKeyword", {
  11585. enumerable: true,
  11586. get: function() {
  11587. return _index.tsIntrinsicKeyword;
  11588. }
  11589. });
  11590. Object.defineProperty(exports, "TSNeverKeyword", {
  11591. enumerable: true,
  11592. get: function() {
  11593. return _index.tsNeverKeyword;
  11594. }
  11595. });
  11596. Object.defineProperty(exports, "TSNullKeyword", {
  11597. enumerable: true,
  11598. get: function() {
  11599. return _index.tsNullKeyword;
  11600. }
  11601. });
  11602. Object.defineProperty(exports, "TSNumberKeyword", {
  11603. enumerable: true,
  11604. get: function() {
  11605. return _index.tsNumberKeyword;
  11606. }
  11607. });
  11608. Object.defineProperty(exports, "TSObjectKeyword", {
  11609. enumerable: true,
  11610. get: function() {
  11611. return _index.tsObjectKeyword;
  11612. }
  11613. });
  11614. Object.defineProperty(exports, "TSStringKeyword", {
  11615. enumerable: true,
  11616. get: function() {
  11617. return _index.tsStringKeyword;
  11618. }
  11619. });
  11620. Object.defineProperty(exports, "TSSymbolKeyword", {
  11621. enumerable: true,
  11622. get: function() {
  11623. return _index.tsSymbolKeyword;
  11624. }
  11625. });
  11626. Object.defineProperty(exports, "TSUndefinedKeyword", {
  11627. enumerable: true,
  11628. get: function() {
  11629. return _index.tsUndefinedKeyword;
  11630. }
  11631. });
  11632. Object.defineProperty(exports, "TSUnknownKeyword", {
  11633. enumerable: true,
  11634. get: function() {
  11635. return _index.tsUnknownKeyword;
  11636. }
  11637. });
  11638. Object.defineProperty(exports, "TSVoidKeyword", {
  11639. enumerable: true,
  11640. get: function() {
  11641. return _index.tsVoidKeyword;
  11642. }
  11643. });
  11644. Object.defineProperty(exports, "TSThisType", {
  11645. enumerable: true,
  11646. get: function() {
  11647. return _index.tsThisType;
  11648. }
  11649. });
  11650. Object.defineProperty(exports, "TSFunctionType", {
  11651. enumerable: true,
  11652. get: function() {
  11653. return _index.tsFunctionType;
  11654. }
  11655. });
  11656. Object.defineProperty(exports, "TSConstructorType", {
  11657. enumerable: true,
  11658. get: function() {
  11659. return _index.tsConstructorType;
  11660. }
  11661. });
  11662. Object.defineProperty(exports, "TSTypeReference", {
  11663. enumerable: true,
  11664. get: function() {
  11665. return _index.tsTypeReference;
  11666. }
  11667. });
  11668. Object.defineProperty(exports, "TSTypePredicate", {
  11669. enumerable: true,
  11670. get: function() {
  11671. return _index.tsTypePredicate;
  11672. }
  11673. });
  11674. Object.defineProperty(exports, "TSTypeQuery", {
  11675. enumerable: true,
  11676. get: function() {
  11677. return _index.tsTypeQuery;
  11678. }
  11679. });
  11680. Object.defineProperty(exports, "TSTypeLiteral", {
  11681. enumerable: true,
  11682. get: function() {
  11683. return _index.tsTypeLiteral;
  11684. }
  11685. });
  11686. Object.defineProperty(exports, "TSArrayType", {
  11687. enumerable: true,
  11688. get: function() {
  11689. return _index.tsArrayType;
  11690. }
  11691. });
  11692. Object.defineProperty(exports, "TSTupleType", {
  11693. enumerable: true,
  11694. get: function() {
  11695. return _index.tsTupleType;
  11696. }
  11697. });
  11698. Object.defineProperty(exports, "TSOptionalType", {
  11699. enumerable: true,
  11700. get: function() {
  11701. return _index.tsOptionalType;
  11702. }
  11703. });
  11704. Object.defineProperty(exports, "TSRestType", {
  11705. enumerable: true,
  11706. get: function() {
  11707. return _index.tsRestType;
  11708. }
  11709. });
  11710. Object.defineProperty(exports, "TSNamedTupleMember", {
  11711. enumerable: true,
  11712. get: function() {
  11713. return _index.tsNamedTupleMember;
  11714. }
  11715. });
  11716. Object.defineProperty(exports, "TSUnionType", {
  11717. enumerable: true,
  11718. get: function() {
  11719. return _index.tsUnionType;
  11720. }
  11721. });
  11722. Object.defineProperty(exports, "TSIntersectionType", {
  11723. enumerable: true,
  11724. get: function() {
  11725. return _index.tsIntersectionType;
  11726. }
  11727. });
  11728. Object.defineProperty(exports, "TSConditionalType", {
  11729. enumerable: true,
  11730. get: function() {
  11731. return _index.tsConditionalType;
  11732. }
  11733. });
  11734. Object.defineProperty(exports, "TSInferType", {
  11735. enumerable: true,
  11736. get: function() {
  11737. return _index.tsInferType;
  11738. }
  11739. });
  11740. Object.defineProperty(exports, "TSParenthesizedType", {
  11741. enumerable: true,
  11742. get: function() {
  11743. return _index.tsParenthesizedType;
  11744. }
  11745. });
  11746. Object.defineProperty(exports, "TSTypeOperator", {
  11747. enumerable: true,
  11748. get: function() {
  11749. return _index.tsTypeOperator;
  11750. }
  11751. });
  11752. Object.defineProperty(exports, "TSIndexedAccessType", {
  11753. enumerable: true,
  11754. get: function() {
  11755. return _index.tsIndexedAccessType;
  11756. }
  11757. });
  11758. Object.defineProperty(exports, "TSMappedType", {
  11759. enumerable: true,
  11760. get: function() {
  11761. return _index.tsMappedType;
  11762. }
  11763. });
  11764. Object.defineProperty(exports, "TSLiteralType", {
  11765. enumerable: true,
  11766. get: function() {
  11767. return _index.tsLiteralType;
  11768. }
  11769. });
  11770. Object.defineProperty(exports, "TSExpressionWithTypeArguments", {
  11771. enumerable: true,
  11772. get: function() {
  11773. return _index.tsExpressionWithTypeArguments;
  11774. }
  11775. });
  11776. Object.defineProperty(exports, "TSInterfaceDeclaration", {
  11777. enumerable: true,
  11778. get: function() {
  11779. return _index.tsInterfaceDeclaration;
  11780. }
  11781. });
  11782. Object.defineProperty(exports, "TSInterfaceBody", {
  11783. enumerable: true,
  11784. get: function() {
  11785. return _index.tsInterfaceBody;
  11786. }
  11787. });
  11788. Object.defineProperty(exports, "TSTypeAliasDeclaration", {
  11789. enumerable: true,
  11790. get: function() {
  11791. return _index.tsTypeAliasDeclaration;
  11792. }
  11793. });
  11794. Object.defineProperty(exports, "TSAsExpression", {
  11795. enumerable: true,
  11796. get: function() {
  11797. return _index.tsAsExpression;
  11798. }
  11799. });
  11800. Object.defineProperty(exports, "TSTypeAssertion", {
  11801. enumerable: true,
  11802. get: function() {
  11803. return _index.tsTypeAssertion;
  11804. }
  11805. });
  11806. Object.defineProperty(exports, "TSEnumDeclaration", {
  11807. enumerable: true,
  11808. get: function() {
  11809. return _index.tsEnumDeclaration;
  11810. }
  11811. });
  11812. Object.defineProperty(exports, "TSEnumMember", {
  11813. enumerable: true,
  11814. get: function() {
  11815. return _index.tsEnumMember;
  11816. }
  11817. });
  11818. Object.defineProperty(exports, "TSModuleDeclaration", {
  11819. enumerable: true,
  11820. get: function() {
  11821. return _index.tsModuleDeclaration;
  11822. }
  11823. });
  11824. Object.defineProperty(exports, "TSModuleBlock", {
  11825. enumerable: true,
  11826. get: function() {
  11827. return _index.tsModuleBlock;
  11828. }
  11829. });
  11830. Object.defineProperty(exports, "TSImportType", {
  11831. enumerable: true,
  11832. get: function() {
  11833. return _index.tsImportType;
  11834. }
  11835. });
  11836. Object.defineProperty(exports, "TSImportEqualsDeclaration", {
  11837. enumerable: true,
  11838. get: function() {
  11839. return _index.tsImportEqualsDeclaration;
  11840. }
  11841. });
  11842. Object.defineProperty(exports, "TSExternalModuleReference", {
  11843. enumerable: true,
  11844. get: function() {
  11845. return _index.tsExternalModuleReference;
  11846. }
  11847. });
  11848. Object.defineProperty(exports, "TSNonNullExpression", {
  11849. enumerable: true,
  11850. get: function() {
  11851. return _index.tsNonNullExpression;
  11852. }
  11853. });
  11854. Object.defineProperty(exports, "TSExportAssignment", {
  11855. enumerable: true,
  11856. get: function() {
  11857. return _index.tsExportAssignment;
  11858. }
  11859. });
  11860. Object.defineProperty(exports, "TSNamespaceExportDeclaration", {
  11861. enumerable: true,
  11862. get: function() {
  11863. return _index.tsNamespaceExportDeclaration;
  11864. }
  11865. });
  11866. Object.defineProperty(exports, "TSTypeAnnotation", {
  11867. enumerable: true,
  11868. get: function() {
  11869. return _index.tsTypeAnnotation;
  11870. }
  11871. });
  11872. Object.defineProperty(exports, "TSTypeParameterInstantiation", {
  11873. enumerable: true,
  11874. get: function() {
  11875. return _index.tsTypeParameterInstantiation;
  11876. }
  11877. });
  11878. Object.defineProperty(exports, "TSTypeParameterDeclaration", {
  11879. enumerable: true,
  11880. get: function() {
  11881. return _index.tsTypeParameterDeclaration;
  11882. }
  11883. });
  11884. Object.defineProperty(exports, "TSTypeParameter", {
  11885. enumerable: true,
  11886. get: function() {
  11887. return _index.tsTypeParameter;
  11888. }
  11889. });
  11890. Object.defineProperty(exports, "NumberLiteral", {
  11891. enumerable: true,
  11892. get: function() {
  11893. return _index.numberLiteral;
  11894. }
  11895. });
  11896. Object.defineProperty(exports, "RegexLiteral", {
  11897. enumerable: true,
  11898. get: function() {
  11899. return _index.regexLiteral;
  11900. }
  11901. });
  11902. Object.defineProperty(exports, "RestProperty", {
  11903. enumerable: true,
  11904. get: function() {
  11905. return _index.restProperty;
  11906. }
  11907. });
  11908. Object.defineProperty(exports, "SpreadProperty", {
  11909. enumerable: true,
  11910. get: function() {
  11911. return _index.spreadProperty;
  11912. }
  11913. });
  11914. var _index = require_generated2();
  11915. }
  11916. });
  11917. // node_modules/@babel/types/lib/clone/cloneNode.js
  11918. var require_cloneNode = __commonJS({
  11919. "node_modules/@babel/types/lib/clone/cloneNode.js"(exports) {
  11920. "use strict";
  11921. Object.defineProperty(exports, "__esModule", {
  11922. value: true
  11923. });
  11924. exports.default = cloneNode;
  11925. var _definitions = require_definitions();
  11926. var _generated = require_generated();
  11927. var has = Function.call.bind(Object.prototype.hasOwnProperty);
  11928. function cloneIfNode(obj, deep, withoutLoc) {
  11929. if (obj && typeof obj.type === "string") {
  11930. return cloneNode(obj, deep, withoutLoc);
  11931. }
  11932. return obj;
  11933. }
  11934. function cloneIfNodeOrArray(obj, deep, withoutLoc) {
  11935. if (Array.isArray(obj)) {
  11936. return obj.map((node) => cloneIfNode(node, deep, withoutLoc));
  11937. }
  11938. return cloneIfNode(obj, deep, withoutLoc);
  11939. }
  11940. function cloneNode(node, deep = true, withoutLoc = false) {
  11941. if (!node)
  11942. return node;
  11943. const {
  11944. type
  11945. } = node;
  11946. const newNode = {
  11947. type: node.type
  11948. };
  11949. if ((0, _generated.isIdentifier)(node)) {
  11950. newNode.name = node.name;
  11951. if (has(node, "optional") && typeof node.optional === "boolean") {
  11952. newNode.optional = node.optional;
  11953. }
  11954. if (has(node, "typeAnnotation")) {
  11955. newNode.typeAnnotation = deep ? cloneIfNodeOrArray(node.typeAnnotation, true, withoutLoc) : node.typeAnnotation;
  11956. }
  11957. } else if (!has(_definitions.NODE_FIELDS, type)) {
  11958. throw new Error(`Unknown node type: "${type}"`);
  11959. } else {
  11960. for (const field of Object.keys(_definitions.NODE_FIELDS[type])) {
  11961. if (has(node, field)) {
  11962. if (deep) {
  11963. newNode[field] = (0, _generated.isFile)(node) && field === "comments" ? maybeCloneComments(node.comments, deep, withoutLoc) : cloneIfNodeOrArray(node[field], true, withoutLoc);
  11964. } else {
  11965. newNode[field] = node[field];
  11966. }
  11967. }
  11968. }
  11969. }
  11970. if (has(node, "loc")) {
  11971. if (withoutLoc) {
  11972. newNode.loc = null;
  11973. } else {
  11974. newNode.loc = node.loc;
  11975. }
  11976. }
  11977. if (has(node, "leadingComments")) {
  11978. newNode.leadingComments = maybeCloneComments(node.leadingComments, deep, withoutLoc);
  11979. }
  11980. if (has(node, "innerComments")) {
  11981. newNode.innerComments = maybeCloneComments(node.innerComments, deep, withoutLoc);
  11982. }
  11983. if (has(node, "trailingComments")) {
  11984. newNode.trailingComments = maybeCloneComments(node.trailingComments, deep, withoutLoc);
  11985. }
  11986. if (has(node, "extra")) {
  11987. newNode.extra = Object.assign({}, node.extra);
  11988. }
  11989. return newNode;
  11990. }
  11991. function maybeCloneComments(comments, deep, withoutLoc) {
  11992. if (!comments || !deep) {
  11993. return comments;
  11994. }
  11995. return comments.map(({
  11996. type,
  11997. value,
  11998. loc
  11999. }) => {
  12000. if (withoutLoc) {
  12001. return {
  12002. type,
  12003. value,
  12004. loc: null
  12005. };
  12006. }
  12007. return {
  12008. type,
  12009. value,
  12010. loc
  12011. };
  12012. });
  12013. }
  12014. }
  12015. });
  12016. // node_modules/@babel/types/lib/clone/clone.js
  12017. var require_clone = __commonJS({
  12018. "node_modules/@babel/types/lib/clone/clone.js"(exports) {
  12019. "use strict";
  12020. Object.defineProperty(exports, "__esModule", {
  12021. value: true
  12022. });
  12023. exports.default = clone;
  12024. var _cloneNode = require_cloneNode();
  12025. function clone(node) {
  12026. return (0, _cloneNode.default)(node, false);
  12027. }
  12028. }
  12029. });
  12030. // node_modules/@babel/types/lib/clone/cloneDeep.js
  12031. var require_cloneDeep = __commonJS({
  12032. "node_modules/@babel/types/lib/clone/cloneDeep.js"(exports) {
  12033. "use strict";
  12034. Object.defineProperty(exports, "__esModule", {
  12035. value: true
  12036. });
  12037. exports.default = cloneDeep2;
  12038. var _cloneNode = require_cloneNode();
  12039. function cloneDeep2(node) {
  12040. return (0, _cloneNode.default)(node);
  12041. }
  12042. }
  12043. });
  12044. // node_modules/@babel/types/lib/clone/cloneDeepWithoutLoc.js
  12045. var require_cloneDeepWithoutLoc = __commonJS({
  12046. "node_modules/@babel/types/lib/clone/cloneDeepWithoutLoc.js"(exports) {
  12047. "use strict";
  12048. Object.defineProperty(exports, "__esModule", {
  12049. value: true
  12050. });
  12051. exports.default = cloneDeepWithoutLoc;
  12052. var _cloneNode = require_cloneNode();
  12053. function cloneDeepWithoutLoc(node) {
  12054. return (0, _cloneNode.default)(node, true, true);
  12055. }
  12056. }
  12057. });
  12058. // node_modules/@babel/types/lib/clone/cloneWithoutLoc.js
  12059. var require_cloneWithoutLoc = __commonJS({
  12060. "node_modules/@babel/types/lib/clone/cloneWithoutLoc.js"(exports) {
  12061. "use strict";
  12062. Object.defineProperty(exports, "__esModule", {
  12063. value: true
  12064. });
  12065. exports.default = cloneWithoutLoc;
  12066. var _cloneNode = require_cloneNode();
  12067. function cloneWithoutLoc(node) {
  12068. return (0, _cloneNode.default)(node, false, true);
  12069. }
  12070. }
  12071. });
  12072. // node_modules/@babel/types/lib/comments/addComments.js
  12073. var require_addComments = __commonJS({
  12074. "node_modules/@babel/types/lib/comments/addComments.js"(exports) {
  12075. "use strict";
  12076. Object.defineProperty(exports, "__esModule", {
  12077. value: true
  12078. });
  12079. exports.default = addComments;
  12080. function addComments(node, type, comments) {
  12081. if (!comments || !node)
  12082. return node;
  12083. const key = `${type}Comments`;
  12084. if (node[key]) {
  12085. if (type === "leading") {
  12086. node[key] = comments.concat(node[key]);
  12087. } else {
  12088. node[key] = node[key].concat(comments);
  12089. }
  12090. } else {
  12091. node[key] = comments;
  12092. }
  12093. return node;
  12094. }
  12095. }
  12096. });
  12097. // node_modules/@babel/types/lib/comments/addComment.js
  12098. var require_addComment = __commonJS({
  12099. "node_modules/@babel/types/lib/comments/addComment.js"(exports) {
  12100. "use strict";
  12101. Object.defineProperty(exports, "__esModule", {
  12102. value: true
  12103. });
  12104. exports.default = addComment;
  12105. var _addComments = require_addComments();
  12106. function addComment(node, type, content3, line) {
  12107. return (0, _addComments.default)(node, type, [{
  12108. type: line ? "CommentLine" : "CommentBlock",
  12109. value: content3
  12110. }]);
  12111. }
  12112. }
  12113. });
  12114. // node_modules/@babel/types/lib/utils/inherit.js
  12115. var require_inherit = __commonJS({
  12116. "node_modules/@babel/types/lib/utils/inherit.js"(exports) {
  12117. "use strict";
  12118. Object.defineProperty(exports, "__esModule", {
  12119. value: true
  12120. });
  12121. exports.default = inherit2;
  12122. function inherit2(key, child, parent) {
  12123. if (child && parent) {
  12124. child[key] = Array.from(new Set([].concat(child[key], parent[key]).filter(Boolean)));
  12125. }
  12126. }
  12127. }
  12128. });
  12129. // node_modules/@babel/types/lib/comments/inheritInnerComments.js
  12130. var require_inheritInnerComments = __commonJS({
  12131. "node_modules/@babel/types/lib/comments/inheritInnerComments.js"(exports) {
  12132. "use strict";
  12133. Object.defineProperty(exports, "__esModule", {
  12134. value: true
  12135. });
  12136. exports.default = inheritInnerComments;
  12137. var _inherit = require_inherit();
  12138. function inheritInnerComments(child, parent) {
  12139. (0, _inherit.default)("innerComments", child, parent);
  12140. }
  12141. }
  12142. });
  12143. // node_modules/@babel/types/lib/comments/inheritLeadingComments.js
  12144. var require_inheritLeadingComments = __commonJS({
  12145. "node_modules/@babel/types/lib/comments/inheritLeadingComments.js"(exports) {
  12146. "use strict";
  12147. Object.defineProperty(exports, "__esModule", {
  12148. value: true
  12149. });
  12150. exports.default = inheritLeadingComments;
  12151. var _inherit = require_inherit();
  12152. function inheritLeadingComments(child, parent) {
  12153. (0, _inherit.default)("leadingComments", child, parent);
  12154. }
  12155. }
  12156. });
  12157. // node_modules/@babel/types/lib/comments/inheritTrailingComments.js
  12158. var require_inheritTrailingComments = __commonJS({
  12159. "node_modules/@babel/types/lib/comments/inheritTrailingComments.js"(exports) {
  12160. "use strict";
  12161. Object.defineProperty(exports, "__esModule", {
  12162. value: true
  12163. });
  12164. exports.default = inheritTrailingComments;
  12165. var _inherit = require_inherit();
  12166. function inheritTrailingComments(child, parent) {
  12167. (0, _inherit.default)("trailingComments", child, parent);
  12168. }
  12169. }
  12170. });
  12171. // node_modules/@babel/types/lib/comments/inheritsComments.js
  12172. var require_inheritsComments = __commonJS({
  12173. "node_modules/@babel/types/lib/comments/inheritsComments.js"(exports) {
  12174. "use strict";
  12175. Object.defineProperty(exports, "__esModule", {
  12176. value: true
  12177. });
  12178. exports.default = inheritsComments;
  12179. var _inheritTrailingComments = require_inheritTrailingComments();
  12180. var _inheritLeadingComments = require_inheritLeadingComments();
  12181. var _inheritInnerComments = require_inheritInnerComments();
  12182. function inheritsComments(child, parent) {
  12183. (0, _inheritTrailingComments.default)(child, parent);
  12184. (0, _inheritLeadingComments.default)(child, parent);
  12185. (0, _inheritInnerComments.default)(child, parent);
  12186. return child;
  12187. }
  12188. }
  12189. });
  12190. // node_modules/@babel/types/lib/comments/removeComments.js
  12191. var require_removeComments = __commonJS({
  12192. "node_modules/@babel/types/lib/comments/removeComments.js"(exports) {
  12193. "use strict";
  12194. Object.defineProperty(exports, "__esModule", {
  12195. value: true
  12196. });
  12197. exports.default = removeComments;
  12198. var _constants = require_constants();
  12199. function removeComments(node) {
  12200. _constants.COMMENT_KEYS.forEach((key) => {
  12201. node[key] = null;
  12202. });
  12203. return node;
  12204. }
  12205. }
  12206. });
  12207. // node_modules/@babel/types/lib/constants/generated/index.js
  12208. var require_generated4 = __commonJS({
  12209. "node_modules/@babel/types/lib/constants/generated/index.js"(exports) {
  12210. "use strict";
  12211. Object.defineProperty(exports, "__esModule", {
  12212. value: true
  12213. });
  12214. exports.TSBASETYPE_TYPES = exports.TSTYPE_TYPES = exports.TSTYPEELEMENT_TYPES = exports.JSX_TYPES = exports.ENUMMEMBER_TYPES = exports.ENUMBODY_TYPES = exports.FLOWPREDICATE_TYPES = exports.FLOWDECLARATION_TYPES = exports.FLOWBASEANNOTATION_TYPES = exports.FLOWTYPE_TYPES = exports.FLOW_TYPES = exports.PRIVATE_TYPES = exports.MODULESPECIFIER_TYPES = exports.EXPORTDECLARATION_TYPES = exports.MODULEDECLARATION_TYPES = exports.CLASS_TYPES = exports.PATTERN_TYPES = exports.UNARYLIKE_TYPES = exports.PROPERTY_TYPES = exports.OBJECTMEMBER_TYPES = exports.METHOD_TYPES = exports.USERWHITESPACABLE_TYPES = exports.IMMUTABLE_TYPES = exports.LITERAL_TYPES = exports.TSENTITYNAME_TYPES = exports.LVAL_TYPES = exports.PATTERNLIKE_TYPES = exports.DECLARATION_TYPES = exports.PUREISH_TYPES = exports.FUNCTIONPARENT_TYPES = exports.FUNCTION_TYPES = exports.FORXSTATEMENT_TYPES = exports.FOR_TYPES = exports.EXPRESSIONWRAPPER_TYPES = exports.WHILE_TYPES = exports.LOOP_TYPES = exports.CONDITIONAL_TYPES = exports.COMPLETIONSTATEMENT_TYPES = exports.TERMINATORLESS_TYPES = exports.STATEMENT_TYPES = exports.BLOCK_TYPES = exports.BLOCKPARENT_TYPES = exports.SCOPABLE_TYPES = exports.BINARY_TYPES = exports.EXPRESSION_TYPES = void 0;
  12215. var _definitions = require_definitions();
  12216. var EXPRESSION_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Expression"];
  12217. exports.EXPRESSION_TYPES = EXPRESSION_TYPES;
  12218. var BINARY_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Binary"];
  12219. exports.BINARY_TYPES = BINARY_TYPES;
  12220. var SCOPABLE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Scopable"];
  12221. exports.SCOPABLE_TYPES = SCOPABLE_TYPES;
  12222. var BLOCKPARENT_TYPES = _definitions.FLIPPED_ALIAS_KEYS["BlockParent"];
  12223. exports.BLOCKPARENT_TYPES = BLOCKPARENT_TYPES;
  12224. var BLOCK_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Block"];
  12225. exports.BLOCK_TYPES = BLOCK_TYPES;
  12226. var STATEMENT_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Statement"];
  12227. exports.STATEMENT_TYPES = STATEMENT_TYPES;
  12228. var TERMINATORLESS_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Terminatorless"];
  12229. exports.TERMINATORLESS_TYPES = TERMINATORLESS_TYPES;
  12230. var COMPLETIONSTATEMENT_TYPES = _definitions.FLIPPED_ALIAS_KEYS["CompletionStatement"];
  12231. exports.COMPLETIONSTATEMENT_TYPES = COMPLETIONSTATEMENT_TYPES;
  12232. var CONDITIONAL_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Conditional"];
  12233. exports.CONDITIONAL_TYPES = CONDITIONAL_TYPES;
  12234. var LOOP_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Loop"];
  12235. exports.LOOP_TYPES = LOOP_TYPES;
  12236. var WHILE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["While"];
  12237. exports.WHILE_TYPES = WHILE_TYPES;
  12238. var EXPRESSIONWRAPPER_TYPES = _definitions.FLIPPED_ALIAS_KEYS["ExpressionWrapper"];
  12239. exports.EXPRESSIONWRAPPER_TYPES = EXPRESSIONWRAPPER_TYPES;
  12240. var FOR_TYPES = _definitions.FLIPPED_ALIAS_KEYS["For"];
  12241. exports.FOR_TYPES = FOR_TYPES;
  12242. var FORXSTATEMENT_TYPES = _definitions.FLIPPED_ALIAS_KEYS["ForXStatement"];
  12243. exports.FORXSTATEMENT_TYPES = FORXSTATEMENT_TYPES;
  12244. var FUNCTION_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Function"];
  12245. exports.FUNCTION_TYPES = FUNCTION_TYPES;
  12246. var FUNCTIONPARENT_TYPES = _definitions.FLIPPED_ALIAS_KEYS["FunctionParent"];
  12247. exports.FUNCTIONPARENT_TYPES = FUNCTIONPARENT_TYPES;
  12248. var PUREISH_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Pureish"];
  12249. exports.PUREISH_TYPES = PUREISH_TYPES;
  12250. var DECLARATION_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Declaration"];
  12251. exports.DECLARATION_TYPES = DECLARATION_TYPES;
  12252. var PATTERNLIKE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["PatternLike"];
  12253. exports.PATTERNLIKE_TYPES = PATTERNLIKE_TYPES;
  12254. var LVAL_TYPES = _definitions.FLIPPED_ALIAS_KEYS["LVal"];
  12255. exports.LVAL_TYPES = LVAL_TYPES;
  12256. var TSENTITYNAME_TYPES = _definitions.FLIPPED_ALIAS_KEYS["TSEntityName"];
  12257. exports.TSENTITYNAME_TYPES = TSENTITYNAME_TYPES;
  12258. var LITERAL_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Literal"];
  12259. exports.LITERAL_TYPES = LITERAL_TYPES;
  12260. var IMMUTABLE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Immutable"];
  12261. exports.IMMUTABLE_TYPES = IMMUTABLE_TYPES;
  12262. var USERWHITESPACABLE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["UserWhitespacable"];
  12263. exports.USERWHITESPACABLE_TYPES = USERWHITESPACABLE_TYPES;
  12264. var METHOD_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Method"];
  12265. exports.METHOD_TYPES = METHOD_TYPES;
  12266. var OBJECTMEMBER_TYPES = _definitions.FLIPPED_ALIAS_KEYS["ObjectMember"];
  12267. exports.OBJECTMEMBER_TYPES = OBJECTMEMBER_TYPES;
  12268. var PROPERTY_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Property"];
  12269. exports.PROPERTY_TYPES = PROPERTY_TYPES;
  12270. var UNARYLIKE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["UnaryLike"];
  12271. exports.UNARYLIKE_TYPES = UNARYLIKE_TYPES;
  12272. var PATTERN_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Pattern"];
  12273. exports.PATTERN_TYPES = PATTERN_TYPES;
  12274. var CLASS_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Class"];
  12275. exports.CLASS_TYPES = CLASS_TYPES;
  12276. var MODULEDECLARATION_TYPES = _definitions.FLIPPED_ALIAS_KEYS["ModuleDeclaration"];
  12277. exports.MODULEDECLARATION_TYPES = MODULEDECLARATION_TYPES;
  12278. var EXPORTDECLARATION_TYPES = _definitions.FLIPPED_ALIAS_KEYS["ExportDeclaration"];
  12279. exports.EXPORTDECLARATION_TYPES = EXPORTDECLARATION_TYPES;
  12280. var MODULESPECIFIER_TYPES = _definitions.FLIPPED_ALIAS_KEYS["ModuleSpecifier"];
  12281. exports.MODULESPECIFIER_TYPES = MODULESPECIFIER_TYPES;
  12282. var PRIVATE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Private"];
  12283. exports.PRIVATE_TYPES = PRIVATE_TYPES;
  12284. var FLOW_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Flow"];
  12285. exports.FLOW_TYPES = FLOW_TYPES;
  12286. var FLOWTYPE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["FlowType"];
  12287. exports.FLOWTYPE_TYPES = FLOWTYPE_TYPES;
  12288. var FLOWBASEANNOTATION_TYPES = _definitions.FLIPPED_ALIAS_KEYS["FlowBaseAnnotation"];
  12289. exports.FLOWBASEANNOTATION_TYPES = FLOWBASEANNOTATION_TYPES;
  12290. var FLOWDECLARATION_TYPES = _definitions.FLIPPED_ALIAS_KEYS["FlowDeclaration"];
  12291. exports.FLOWDECLARATION_TYPES = FLOWDECLARATION_TYPES;
  12292. var FLOWPREDICATE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["FlowPredicate"];
  12293. exports.FLOWPREDICATE_TYPES = FLOWPREDICATE_TYPES;
  12294. var ENUMBODY_TYPES = _definitions.FLIPPED_ALIAS_KEYS["EnumBody"];
  12295. exports.ENUMBODY_TYPES = ENUMBODY_TYPES;
  12296. var ENUMMEMBER_TYPES = _definitions.FLIPPED_ALIAS_KEYS["EnumMember"];
  12297. exports.ENUMMEMBER_TYPES = ENUMMEMBER_TYPES;
  12298. var JSX_TYPES = _definitions.FLIPPED_ALIAS_KEYS["JSX"];
  12299. exports.JSX_TYPES = JSX_TYPES;
  12300. var TSTYPEELEMENT_TYPES = _definitions.FLIPPED_ALIAS_KEYS["TSTypeElement"];
  12301. exports.TSTYPEELEMENT_TYPES = TSTYPEELEMENT_TYPES;
  12302. var TSTYPE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["TSType"];
  12303. exports.TSTYPE_TYPES = TSTYPE_TYPES;
  12304. var TSBASETYPE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["TSBaseType"];
  12305. exports.TSBASETYPE_TYPES = TSBASETYPE_TYPES;
  12306. }
  12307. });
  12308. // node_modules/@babel/types/lib/converters/toBlock.js
  12309. var require_toBlock = __commonJS({
  12310. "node_modules/@babel/types/lib/converters/toBlock.js"(exports) {
  12311. "use strict";
  12312. Object.defineProperty(exports, "__esModule", {
  12313. value: true
  12314. });
  12315. exports.default = toBlock;
  12316. var _generated = require_generated();
  12317. var _generated2 = require_generated2();
  12318. function toBlock(node, parent) {
  12319. if ((0, _generated.isBlockStatement)(node)) {
  12320. return node;
  12321. }
  12322. let blockNodes = [];
  12323. if ((0, _generated.isEmptyStatement)(node)) {
  12324. blockNodes = [];
  12325. } else {
  12326. if (!(0, _generated.isStatement)(node)) {
  12327. if ((0, _generated.isFunction)(parent)) {
  12328. node = (0, _generated2.returnStatement)(node);
  12329. } else {
  12330. node = (0, _generated2.expressionStatement)(node);
  12331. }
  12332. }
  12333. blockNodes = [node];
  12334. }
  12335. return (0, _generated2.blockStatement)(blockNodes);
  12336. }
  12337. }
  12338. });
  12339. // node_modules/@babel/types/lib/converters/ensureBlock.js
  12340. var require_ensureBlock = __commonJS({
  12341. "node_modules/@babel/types/lib/converters/ensureBlock.js"(exports) {
  12342. "use strict";
  12343. Object.defineProperty(exports, "__esModule", {
  12344. value: true
  12345. });
  12346. exports.default = ensureBlock;
  12347. var _toBlock = require_toBlock();
  12348. function ensureBlock(node, key = "body") {
  12349. return node[key] = (0, _toBlock.default)(node[key], node);
  12350. }
  12351. }
  12352. });
  12353. // node_modules/@babel/types/lib/converters/toIdentifier.js
  12354. var require_toIdentifier = __commonJS({
  12355. "node_modules/@babel/types/lib/converters/toIdentifier.js"(exports) {
  12356. "use strict";
  12357. Object.defineProperty(exports, "__esModule", {
  12358. value: true
  12359. });
  12360. exports.default = toIdentifier2;
  12361. var _isValidIdentifier = require_isValidIdentifier();
  12362. var _helperValidatorIdentifier = require_lib();
  12363. function toIdentifier2(input) {
  12364. input = input + "";
  12365. let name2 = "";
  12366. for (const c of input) {
  12367. name2 += (0, _helperValidatorIdentifier.isIdentifierChar)(c.codePointAt(0)) ? c : "-";
  12368. }
  12369. name2 = name2.replace(/^[-0-9]+/, "");
  12370. name2 = name2.replace(/[-\s]+(.)?/g, function(match, c) {
  12371. return c ? c.toUpperCase() : "";
  12372. });
  12373. if (!(0, _isValidIdentifier.default)(name2)) {
  12374. name2 = `_${name2}`;
  12375. }
  12376. return name2 || "_";
  12377. }
  12378. }
  12379. });
  12380. // node_modules/@babel/types/lib/converters/toBindingIdentifierName.js
  12381. var require_toBindingIdentifierName = __commonJS({
  12382. "node_modules/@babel/types/lib/converters/toBindingIdentifierName.js"(exports) {
  12383. "use strict";
  12384. Object.defineProperty(exports, "__esModule", {
  12385. value: true
  12386. });
  12387. exports.default = toBindingIdentifierName;
  12388. var _toIdentifier = require_toIdentifier();
  12389. function toBindingIdentifierName(name2) {
  12390. name2 = (0, _toIdentifier.default)(name2);
  12391. if (name2 === "eval" || name2 === "arguments")
  12392. name2 = "_" + name2;
  12393. return name2;
  12394. }
  12395. }
  12396. });
  12397. // node_modules/@babel/types/lib/converters/toComputedKey.js
  12398. var require_toComputedKey = __commonJS({
  12399. "node_modules/@babel/types/lib/converters/toComputedKey.js"(exports) {
  12400. "use strict";
  12401. Object.defineProperty(exports, "__esModule", {
  12402. value: true
  12403. });
  12404. exports.default = toComputedKey;
  12405. var _generated = require_generated();
  12406. var _generated2 = require_generated2();
  12407. function toComputedKey(node, key = node.key || node.property) {
  12408. if (!node.computed && (0, _generated.isIdentifier)(key))
  12409. key = (0, _generated2.stringLiteral)(key.name);
  12410. return key;
  12411. }
  12412. }
  12413. });
  12414. // node_modules/@babel/types/lib/converters/toExpression.js
  12415. var require_toExpression = __commonJS({
  12416. "node_modules/@babel/types/lib/converters/toExpression.js"(exports) {
  12417. "use strict";
  12418. Object.defineProperty(exports, "__esModule", {
  12419. value: true
  12420. });
  12421. exports.default = void 0;
  12422. var _generated = require_generated();
  12423. var _default = toExpression;
  12424. exports.default = _default;
  12425. function toExpression(node) {
  12426. if ((0, _generated.isExpressionStatement)(node)) {
  12427. node = node.expression;
  12428. }
  12429. if ((0, _generated.isExpression)(node)) {
  12430. return node;
  12431. }
  12432. if ((0, _generated.isClass)(node)) {
  12433. node.type = "ClassExpression";
  12434. } else if ((0, _generated.isFunction)(node)) {
  12435. node.type = "FunctionExpression";
  12436. }
  12437. if (!(0, _generated.isExpression)(node)) {
  12438. throw new Error(`cannot turn ${node.type} to an expression`);
  12439. }
  12440. return node;
  12441. }
  12442. }
  12443. });
  12444. // node_modules/@babel/types/lib/traverse/traverseFast.js
  12445. var require_traverseFast = __commonJS({
  12446. "node_modules/@babel/types/lib/traverse/traverseFast.js"(exports) {
  12447. "use strict";
  12448. Object.defineProperty(exports, "__esModule", {
  12449. value: true
  12450. });
  12451. exports.default = traverseFast;
  12452. var _definitions = require_definitions();
  12453. function traverseFast(node, enter, opts) {
  12454. if (!node)
  12455. return;
  12456. const keys2 = _definitions.VISITOR_KEYS[node.type];
  12457. if (!keys2)
  12458. return;
  12459. opts = opts || {};
  12460. enter(node, opts);
  12461. for (const key of keys2) {
  12462. const subNode = node[key];
  12463. if (Array.isArray(subNode)) {
  12464. for (const node2 of subNode) {
  12465. traverseFast(node2, enter, opts);
  12466. }
  12467. } else {
  12468. traverseFast(subNode, enter, opts);
  12469. }
  12470. }
  12471. }
  12472. }
  12473. });
  12474. // node_modules/@babel/types/lib/modifications/removeProperties.js
  12475. var require_removeProperties = __commonJS({
  12476. "node_modules/@babel/types/lib/modifications/removeProperties.js"(exports) {
  12477. "use strict";
  12478. Object.defineProperty(exports, "__esModule", {
  12479. value: true
  12480. });
  12481. exports.default = removeProperties;
  12482. var _constants = require_constants();
  12483. var CLEAR_KEYS = ["tokens", "start", "end", "loc", "raw", "rawValue"];
  12484. var CLEAR_KEYS_PLUS_COMMENTS = _constants.COMMENT_KEYS.concat(["comments"]).concat(CLEAR_KEYS);
  12485. function removeProperties(node, opts = {}) {
  12486. const map = opts.preserveComments ? CLEAR_KEYS : CLEAR_KEYS_PLUS_COMMENTS;
  12487. for (const key of map) {
  12488. if (node[key] != null)
  12489. node[key] = void 0;
  12490. }
  12491. for (const key of Object.keys(node)) {
  12492. if (key[0] === "_" && node[key] != null)
  12493. node[key] = void 0;
  12494. }
  12495. const symbols = Object.getOwnPropertySymbols(node);
  12496. for (const sym of symbols) {
  12497. node[sym] = null;
  12498. }
  12499. }
  12500. }
  12501. });
  12502. // node_modules/@babel/types/lib/modifications/removePropertiesDeep.js
  12503. var require_removePropertiesDeep = __commonJS({
  12504. "node_modules/@babel/types/lib/modifications/removePropertiesDeep.js"(exports) {
  12505. "use strict";
  12506. Object.defineProperty(exports, "__esModule", {
  12507. value: true
  12508. });
  12509. exports.default = removePropertiesDeep;
  12510. var _traverseFast = require_traverseFast();
  12511. var _removeProperties = require_removeProperties();
  12512. function removePropertiesDeep(tree, opts) {
  12513. (0, _traverseFast.default)(tree, _removeProperties.default, opts);
  12514. return tree;
  12515. }
  12516. }
  12517. });
  12518. // node_modules/@babel/types/lib/converters/toKeyAlias.js
  12519. var require_toKeyAlias = __commonJS({
  12520. "node_modules/@babel/types/lib/converters/toKeyAlias.js"(exports) {
  12521. "use strict";
  12522. Object.defineProperty(exports, "__esModule", {
  12523. value: true
  12524. });
  12525. exports.default = toKeyAlias;
  12526. var _generated = require_generated();
  12527. var _cloneNode = require_cloneNode();
  12528. var _removePropertiesDeep = require_removePropertiesDeep();
  12529. function toKeyAlias(node, key = node.key) {
  12530. let alias;
  12531. if (node.kind === "method") {
  12532. return toKeyAlias.increment() + "";
  12533. } else if ((0, _generated.isIdentifier)(key)) {
  12534. alias = key.name;
  12535. } else if ((0, _generated.isStringLiteral)(key)) {
  12536. alias = JSON.stringify(key.value);
  12537. } else {
  12538. alias = JSON.stringify((0, _removePropertiesDeep.default)((0, _cloneNode.default)(key)));
  12539. }
  12540. if (node.computed) {
  12541. alias = `[${alias}]`;
  12542. }
  12543. if (node.static) {
  12544. alias = `static:${alias}`;
  12545. }
  12546. return alias;
  12547. }
  12548. toKeyAlias.uid = 0;
  12549. toKeyAlias.increment = function() {
  12550. if (toKeyAlias.uid >= Number.MAX_SAFE_INTEGER) {
  12551. return toKeyAlias.uid = 0;
  12552. } else {
  12553. return toKeyAlias.uid++;
  12554. }
  12555. };
  12556. }
  12557. });
  12558. // node_modules/@babel/types/lib/retrievers/getBindingIdentifiers.js
  12559. var require_getBindingIdentifiers = __commonJS({
  12560. "node_modules/@babel/types/lib/retrievers/getBindingIdentifiers.js"(exports) {
  12561. "use strict";
  12562. Object.defineProperty(exports, "__esModule", {
  12563. value: true
  12564. });
  12565. exports.default = getBindingIdentifiers;
  12566. var _generated = require_generated();
  12567. function getBindingIdentifiers(node, duplicates, outerOnly) {
  12568. let search2 = [].concat(node);
  12569. const ids = /* @__PURE__ */ Object.create(null);
  12570. while (search2.length) {
  12571. const id = search2.shift();
  12572. if (!id)
  12573. continue;
  12574. const keys2 = getBindingIdentifiers.keys[id.type];
  12575. if ((0, _generated.isIdentifier)(id)) {
  12576. if (duplicates) {
  12577. const _ids = ids[id.name] = ids[id.name] || [];
  12578. _ids.push(id);
  12579. } else {
  12580. ids[id.name] = id;
  12581. }
  12582. continue;
  12583. }
  12584. if ((0, _generated.isExportDeclaration)(id) && !(0, _generated.isExportAllDeclaration)(id)) {
  12585. if ((0, _generated.isDeclaration)(id.declaration)) {
  12586. search2.push(id.declaration);
  12587. }
  12588. continue;
  12589. }
  12590. if (outerOnly) {
  12591. if ((0, _generated.isFunctionDeclaration)(id)) {
  12592. search2.push(id.id);
  12593. continue;
  12594. }
  12595. if ((0, _generated.isFunctionExpression)(id)) {
  12596. continue;
  12597. }
  12598. }
  12599. if (keys2) {
  12600. for (let i = 0; i < keys2.length; i++) {
  12601. const key = keys2[i];
  12602. if (id[key]) {
  12603. search2 = search2.concat(id[key]);
  12604. }
  12605. }
  12606. }
  12607. }
  12608. return ids;
  12609. }
  12610. getBindingIdentifiers.keys = {
  12611. DeclareClass: ["id"],
  12612. DeclareFunction: ["id"],
  12613. DeclareModule: ["id"],
  12614. DeclareVariable: ["id"],
  12615. DeclareInterface: ["id"],
  12616. DeclareTypeAlias: ["id"],
  12617. DeclareOpaqueType: ["id"],
  12618. InterfaceDeclaration: ["id"],
  12619. TypeAlias: ["id"],
  12620. OpaqueType: ["id"],
  12621. CatchClause: ["param"],
  12622. LabeledStatement: ["label"],
  12623. UnaryExpression: ["argument"],
  12624. AssignmentExpression: ["left"],
  12625. ImportSpecifier: ["local"],
  12626. ImportNamespaceSpecifier: ["local"],
  12627. ImportDefaultSpecifier: ["local"],
  12628. ImportDeclaration: ["specifiers"],
  12629. ExportSpecifier: ["exported"],
  12630. ExportNamespaceSpecifier: ["exported"],
  12631. ExportDefaultSpecifier: ["exported"],
  12632. FunctionDeclaration: ["id", "params"],
  12633. FunctionExpression: ["id", "params"],
  12634. ArrowFunctionExpression: ["params"],
  12635. ObjectMethod: ["params"],
  12636. ClassMethod: ["params"],
  12637. ForInStatement: ["left"],
  12638. ForOfStatement: ["left"],
  12639. ClassDeclaration: ["id"],
  12640. ClassExpression: ["id"],
  12641. RestElement: ["argument"],
  12642. UpdateExpression: ["argument"],
  12643. ObjectProperty: ["value"],
  12644. AssignmentPattern: ["left"],
  12645. ArrayPattern: ["elements"],
  12646. ObjectPattern: ["properties"],
  12647. VariableDeclaration: ["declarations"],
  12648. VariableDeclarator: ["id"]
  12649. };
  12650. }
  12651. });
  12652. // node_modules/@babel/types/lib/converters/gatherSequenceExpressions.js
  12653. var require_gatherSequenceExpressions = __commonJS({
  12654. "node_modules/@babel/types/lib/converters/gatherSequenceExpressions.js"(exports) {
  12655. "use strict";
  12656. Object.defineProperty(exports, "__esModule", {
  12657. value: true
  12658. });
  12659. exports.default = gatherSequenceExpressions;
  12660. var _getBindingIdentifiers = require_getBindingIdentifiers();
  12661. var _generated = require_generated();
  12662. var _generated2 = require_generated2();
  12663. var _cloneNode = require_cloneNode();
  12664. function gatherSequenceExpressions(nodes, scope, declars) {
  12665. const exprs = [];
  12666. let ensureLastUndefined = true;
  12667. for (const node of nodes) {
  12668. if (!(0, _generated.isEmptyStatement)(node)) {
  12669. ensureLastUndefined = false;
  12670. }
  12671. if ((0, _generated.isExpression)(node)) {
  12672. exprs.push(node);
  12673. } else if ((0, _generated.isExpressionStatement)(node)) {
  12674. exprs.push(node.expression);
  12675. } else if ((0, _generated.isVariableDeclaration)(node)) {
  12676. if (node.kind !== "var")
  12677. return;
  12678. for (const declar of node.declarations) {
  12679. const bindings = (0, _getBindingIdentifiers.default)(declar);
  12680. for (const key of Object.keys(bindings)) {
  12681. declars.push({
  12682. kind: node.kind,
  12683. id: (0, _cloneNode.default)(bindings[key])
  12684. });
  12685. }
  12686. if (declar.init) {
  12687. exprs.push((0, _generated2.assignmentExpression)("=", declar.id, declar.init));
  12688. }
  12689. }
  12690. ensureLastUndefined = true;
  12691. } else if ((0, _generated.isIfStatement)(node)) {
  12692. const consequent = node.consequent ? gatherSequenceExpressions([node.consequent], scope, declars) : scope.buildUndefinedNode();
  12693. const alternate = node.alternate ? gatherSequenceExpressions([node.alternate], scope, declars) : scope.buildUndefinedNode();
  12694. if (!consequent || !alternate)
  12695. return;
  12696. exprs.push((0, _generated2.conditionalExpression)(node.test, consequent, alternate));
  12697. } else if ((0, _generated.isBlockStatement)(node)) {
  12698. const body = gatherSequenceExpressions(node.body, scope, declars);
  12699. if (!body)
  12700. return;
  12701. exprs.push(body);
  12702. } else if ((0, _generated.isEmptyStatement)(node)) {
  12703. if (nodes.indexOf(node) === 0) {
  12704. ensureLastUndefined = true;
  12705. }
  12706. } else {
  12707. return;
  12708. }
  12709. }
  12710. if (ensureLastUndefined) {
  12711. exprs.push(scope.buildUndefinedNode());
  12712. }
  12713. if (exprs.length === 1) {
  12714. return exprs[0];
  12715. } else {
  12716. return (0, _generated2.sequenceExpression)(exprs);
  12717. }
  12718. }
  12719. }
  12720. });
  12721. // node_modules/@babel/types/lib/converters/toSequenceExpression.js
  12722. var require_toSequenceExpression = __commonJS({
  12723. "node_modules/@babel/types/lib/converters/toSequenceExpression.js"(exports) {
  12724. "use strict";
  12725. Object.defineProperty(exports, "__esModule", {
  12726. value: true
  12727. });
  12728. exports.default = toSequenceExpression;
  12729. var _gatherSequenceExpressions = require_gatherSequenceExpressions();
  12730. function toSequenceExpression(nodes, scope) {
  12731. if (!(nodes != null && nodes.length))
  12732. return;
  12733. const declars = [];
  12734. const result = (0, _gatherSequenceExpressions.default)(nodes, scope, declars);
  12735. if (!result)
  12736. return;
  12737. for (const declar of declars) {
  12738. scope.push(declar);
  12739. }
  12740. return result;
  12741. }
  12742. }
  12743. });
  12744. // node_modules/@babel/types/lib/converters/toStatement.js
  12745. var require_toStatement = __commonJS({
  12746. "node_modules/@babel/types/lib/converters/toStatement.js"(exports) {
  12747. "use strict";
  12748. Object.defineProperty(exports, "__esModule", {
  12749. value: true
  12750. });
  12751. exports.default = void 0;
  12752. var _generated = require_generated();
  12753. var _generated2 = require_generated2();
  12754. var _default = toStatement;
  12755. exports.default = _default;
  12756. function toStatement(node, ignore3) {
  12757. if ((0, _generated.isStatement)(node)) {
  12758. return node;
  12759. }
  12760. let mustHaveId = false;
  12761. let newType;
  12762. if ((0, _generated.isClass)(node)) {
  12763. mustHaveId = true;
  12764. newType = "ClassDeclaration";
  12765. } else if ((0, _generated.isFunction)(node)) {
  12766. mustHaveId = true;
  12767. newType = "FunctionDeclaration";
  12768. } else if ((0, _generated.isAssignmentExpression)(node)) {
  12769. return (0, _generated2.expressionStatement)(node);
  12770. }
  12771. if (mustHaveId && !node.id) {
  12772. newType = false;
  12773. }
  12774. if (!newType) {
  12775. if (ignore3) {
  12776. return false;
  12777. } else {
  12778. throw new Error(`cannot turn ${node.type} to a statement`);
  12779. }
  12780. }
  12781. node.type = newType;
  12782. return node;
  12783. }
  12784. }
  12785. });
  12786. // node_modules/@babel/types/lib/converters/valueToNode.js
  12787. var require_valueToNode = __commonJS({
  12788. "node_modules/@babel/types/lib/converters/valueToNode.js"(exports) {
  12789. "use strict";
  12790. Object.defineProperty(exports, "__esModule", {
  12791. value: true
  12792. });
  12793. exports.default = void 0;
  12794. var _isValidIdentifier = require_isValidIdentifier();
  12795. var _generated = require_generated2();
  12796. var _default = valueToNode;
  12797. exports.default = _default;
  12798. var objectToString = Function.call.bind(Object.prototype.toString);
  12799. function isRegExp(value) {
  12800. return objectToString(value) === "[object RegExp]";
  12801. }
  12802. function isPlainObject2(value) {
  12803. if (typeof value !== "object" || value === null || Object.prototype.toString.call(value) !== "[object Object]") {
  12804. return false;
  12805. }
  12806. const proto = Object.getPrototypeOf(value);
  12807. return proto === null || Object.getPrototypeOf(proto) === null;
  12808. }
  12809. function valueToNode(value) {
  12810. if (value === void 0) {
  12811. return (0, _generated.identifier)("undefined");
  12812. }
  12813. if (value === true || value === false) {
  12814. return (0, _generated.booleanLiteral)(value);
  12815. }
  12816. if (value === null) {
  12817. return (0, _generated.nullLiteral)();
  12818. }
  12819. if (typeof value === "string") {
  12820. return (0, _generated.stringLiteral)(value);
  12821. }
  12822. if (typeof value === "number") {
  12823. let result;
  12824. if (Number.isFinite(value)) {
  12825. result = (0, _generated.numericLiteral)(Math.abs(value));
  12826. } else {
  12827. let numerator;
  12828. if (Number.isNaN(value)) {
  12829. numerator = (0, _generated.numericLiteral)(0);
  12830. } else {
  12831. numerator = (0, _generated.numericLiteral)(1);
  12832. }
  12833. result = (0, _generated.binaryExpression)("/", numerator, (0, _generated.numericLiteral)(0));
  12834. }
  12835. if (value < 0 || Object.is(value, -0)) {
  12836. result = (0, _generated.unaryExpression)("-", result);
  12837. }
  12838. return result;
  12839. }
  12840. if (isRegExp(value)) {
  12841. const pattern = value.source;
  12842. const flags = value.toString().match(/\/([a-z]+|)$/)[1];
  12843. return (0, _generated.regExpLiteral)(pattern, flags);
  12844. }
  12845. if (Array.isArray(value)) {
  12846. return (0, _generated.arrayExpression)(value.map(valueToNode));
  12847. }
  12848. if (isPlainObject2(value)) {
  12849. const props = [];
  12850. for (const key of Object.keys(value)) {
  12851. let nodeKey;
  12852. if ((0, _isValidIdentifier.default)(key)) {
  12853. nodeKey = (0, _generated.identifier)(key);
  12854. } else {
  12855. nodeKey = (0, _generated.stringLiteral)(key);
  12856. }
  12857. props.push((0, _generated.objectProperty)(nodeKey, valueToNode(value[key])));
  12858. }
  12859. return (0, _generated.objectExpression)(props);
  12860. }
  12861. throw new Error("don't know how to turn this value into a node");
  12862. }
  12863. }
  12864. });
  12865. // node_modules/@babel/types/lib/modifications/appendToMemberExpression.js
  12866. var require_appendToMemberExpression = __commonJS({
  12867. "node_modules/@babel/types/lib/modifications/appendToMemberExpression.js"(exports) {
  12868. "use strict";
  12869. Object.defineProperty(exports, "__esModule", {
  12870. value: true
  12871. });
  12872. exports.default = appendToMemberExpression;
  12873. var _generated = require_generated2();
  12874. function appendToMemberExpression(member, append, computed = false) {
  12875. member.object = (0, _generated.memberExpression)(member.object, member.property, member.computed);
  12876. member.property = append;
  12877. member.computed = !!computed;
  12878. return member;
  12879. }
  12880. }
  12881. });
  12882. // node_modules/@babel/types/lib/modifications/inherits.js
  12883. var require_inherits = __commonJS({
  12884. "node_modules/@babel/types/lib/modifications/inherits.js"(exports) {
  12885. "use strict";
  12886. Object.defineProperty(exports, "__esModule", {
  12887. value: true
  12888. });
  12889. exports.default = inherits;
  12890. var _constants = require_constants();
  12891. var _inheritsComments = require_inheritsComments();
  12892. function inherits(child, parent) {
  12893. if (!child || !parent)
  12894. return child;
  12895. for (const key of _constants.INHERIT_KEYS.optional) {
  12896. if (child[key] == null) {
  12897. child[key] = parent[key];
  12898. }
  12899. }
  12900. for (const key of Object.keys(parent)) {
  12901. if (key[0] === "_" && key !== "__clone")
  12902. child[key] = parent[key];
  12903. }
  12904. for (const key of _constants.INHERIT_KEYS.force) {
  12905. child[key] = parent[key];
  12906. }
  12907. (0, _inheritsComments.default)(child, parent);
  12908. return child;
  12909. }
  12910. }
  12911. });
  12912. // node_modules/@babel/types/lib/modifications/prependToMemberExpression.js
  12913. var require_prependToMemberExpression = __commonJS({
  12914. "node_modules/@babel/types/lib/modifications/prependToMemberExpression.js"(exports) {
  12915. "use strict";
  12916. Object.defineProperty(exports, "__esModule", {
  12917. value: true
  12918. });
  12919. exports.default = prependToMemberExpression;
  12920. var _generated = require_generated2();
  12921. function prependToMemberExpression(member, prepend) {
  12922. member.object = (0, _generated.memberExpression)(prepend, member.object);
  12923. return member;
  12924. }
  12925. }
  12926. });
  12927. // node_modules/@babel/types/lib/retrievers/getOuterBindingIdentifiers.js
  12928. var require_getOuterBindingIdentifiers = __commonJS({
  12929. "node_modules/@babel/types/lib/retrievers/getOuterBindingIdentifiers.js"(exports) {
  12930. "use strict";
  12931. Object.defineProperty(exports, "__esModule", {
  12932. value: true
  12933. });
  12934. exports.default = void 0;
  12935. var _getBindingIdentifiers = require_getBindingIdentifiers();
  12936. var _default = getOuterBindingIdentifiers;
  12937. exports.default = _default;
  12938. function getOuterBindingIdentifiers(node, duplicates) {
  12939. return (0, _getBindingIdentifiers.default)(node, duplicates, true);
  12940. }
  12941. }
  12942. });
  12943. // node_modules/@babel/types/lib/traverse/traverse.js
  12944. var require_traverse = __commonJS({
  12945. "node_modules/@babel/types/lib/traverse/traverse.js"(exports) {
  12946. "use strict";
  12947. Object.defineProperty(exports, "__esModule", {
  12948. value: true
  12949. });
  12950. exports.default = traverse;
  12951. var _definitions = require_definitions();
  12952. function traverse(node, handlers2, state) {
  12953. if (typeof handlers2 === "function") {
  12954. handlers2 = {
  12955. enter: handlers2
  12956. };
  12957. }
  12958. const {
  12959. enter,
  12960. exit: exit2
  12961. } = handlers2;
  12962. traverseSimpleImpl(node, enter, exit2, state, []);
  12963. }
  12964. function traverseSimpleImpl(node, enter, exit2, state, ancestors) {
  12965. const keys2 = _definitions.VISITOR_KEYS[node.type];
  12966. if (!keys2)
  12967. return;
  12968. if (enter)
  12969. enter(node, ancestors, state);
  12970. for (const key of keys2) {
  12971. const subNode = node[key];
  12972. if (Array.isArray(subNode)) {
  12973. for (let i = 0; i < subNode.length; i++) {
  12974. const child = subNode[i];
  12975. if (!child)
  12976. continue;
  12977. ancestors.push({
  12978. node,
  12979. key,
  12980. index: i
  12981. });
  12982. traverseSimpleImpl(child, enter, exit2, state, ancestors);
  12983. ancestors.pop();
  12984. }
  12985. } else if (subNode) {
  12986. ancestors.push({
  12987. node,
  12988. key
  12989. });
  12990. traverseSimpleImpl(subNode, enter, exit2, state, ancestors);
  12991. ancestors.pop();
  12992. }
  12993. }
  12994. if (exit2)
  12995. exit2(node, ancestors, state);
  12996. }
  12997. }
  12998. });
  12999. // node_modules/@babel/types/lib/validators/isBinding.js
  13000. var require_isBinding = __commonJS({
  13001. "node_modules/@babel/types/lib/validators/isBinding.js"(exports) {
  13002. "use strict";
  13003. Object.defineProperty(exports, "__esModule", {
  13004. value: true
  13005. });
  13006. exports.default = isBinding;
  13007. var _getBindingIdentifiers = require_getBindingIdentifiers();
  13008. function isBinding(node, parent, grandparent) {
  13009. if (grandparent && node.type === "Identifier" && parent.type === "ObjectProperty" && grandparent.type === "ObjectExpression") {
  13010. return false;
  13011. }
  13012. const keys2 = _getBindingIdentifiers.default.keys[parent.type];
  13013. if (keys2) {
  13014. for (let i = 0; i < keys2.length; i++) {
  13015. const key = keys2[i];
  13016. const val = parent[key];
  13017. if (Array.isArray(val)) {
  13018. if (val.indexOf(node) >= 0)
  13019. return true;
  13020. } else {
  13021. if (val === node)
  13022. return true;
  13023. }
  13024. }
  13025. }
  13026. return false;
  13027. }
  13028. }
  13029. });
  13030. // node_modules/@babel/types/lib/validators/isLet.js
  13031. var require_isLet = __commonJS({
  13032. "node_modules/@babel/types/lib/validators/isLet.js"(exports) {
  13033. "use strict";
  13034. Object.defineProperty(exports, "__esModule", {
  13035. value: true
  13036. });
  13037. exports.default = isLet;
  13038. var _generated = require_generated();
  13039. var _constants = require_constants();
  13040. function isLet(node) {
  13041. return (0, _generated.isVariableDeclaration)(node) && (node.kind !== "var" || node[_constants.BLOCK_SCOPED_SYMBOL]);
  13042. }
  13043. }
  13044. });
  13045. // node_modules/@babel/types/lib/validators/isBlockScoped.js
  13046. var require_isBlockScoped = __commonJS({
  13047. "node_modules/@babel/types/lib/validators/isBlockScoped.js"(exports) {
  13048. "use strict";
  13049. Object.defineProperty(exports, "__esModule", {
  13050. value: true
  13051. });
  13052. exports.default = isBlockScoped;
  13053. var _generated = require_generated();
  13054. var _isLet = require_isLet();
  13055. function isBlockScoped(node) {
  13056. return (0, _generated.isFunctionDeclaration)(node) || (0, _generated.isClassDeclaration)(node) || (0, _isLet.default)(node);
  13057. }
  13058. }
  13059. });
  13060. // node_modules/@babel/types/lib/validators/isImmutable.js
  13061. var require_isImmutable = __commonJS({
  13062. "node_modules/@babel/types/lib/validators/isImmutable.js"(exports) {
  13063. "use strict";
  13064. Object.defineProperty(exports, "__esModule", {
  13065. value: true
  13066. });
  13067. exports.default = isImmutable;
  13068. var _isType = require_isType();
  13069. var _generated = require_generated();
  13070. function isImmutable(node) {
  13071. if ((0, _isType.default)(node.type, "Immutable"))
  13072. return true;
  13073. if ((0, _generated.isIdentifier)(node)) {
  13074. if (node.name === "undefined") {
  13075. return true;
  13076. } else {
  13077. return false;
  13078. }
  13079. }
  13080. return false;
  13081. }
  13082. }
  13083. });
  13084. // node_modules/@babel/types/lib/validators/isNodesEquivalent.js
  13085. var require_isNodesEquivalent = __commonJS({
  13086. "node_modules/@babel/types/lib/validators/isNodesEquivalent.js"(exports) {
  13087. "use strict";
  13088. Object.defineProperty(exports, "__esModule", {
  13089. value: true
  13090. });
  13091. exports.default = isNodesEquivalent;
  13092. var _definitions = require_definitions();
  13093. function isNodesEquivalent(a, b) {
  13094. if (typeof a !== "object" || typeof b !== "object" || a == null || b == null) {
  13095. return a === b;
  13096. }
  13097. if (a.type !== b.type) {
  13098. return false;
  13099. }
  13100. const fields = Object.keys(_definitions.NODE_FIELDS[a.type] || a.type);
  13101. const visitorKeys = _definitions.VISITOR_KEYS[a.type];
  13102. for (const field of fields) {
  13103. if (typeof a[field] !== typeof b[field]) {
  13104. return false;
  13105. }
  13106. if (a[field] == null && b[field] == null) {
  13107. continue;
  13108. } else if (a[field] == null || b[field] == null) {
  13109. return false;
  13110. }
  13111. if (Array.isArray(a[field])) {
  13112. if (!Array.isArray(b[field])) {
  13113. return false;
  13114. }
  13115. if (a[field].length !== b[field].length) {
  13116. return false;
  13117. }
  13118. for (let i = 0; i < a[field].length; i++) {
  13119. if (!isNodesEquivalent(a[field][i], b[field][i])) {
  13120. return false;
  13121. }
  13122. }
  13123. continue;
  13124. }
  13125. if (typeof a[field] === "object" && !(visitorKeys != null && visitorKeys.includes(field))) {
  13126. for (const key of Object.keys(a[field])) {
  13127. if (a[field][key] !== b[field][key]) {
  13128. return false;
  13129. }
  13130. }
  13131. continue;
  13132. }
  13133. if (!isNodesEquivalent(a[field], b[field])) {
  13134. return false;
  13135. }
  13136. }
  13137. return true;
  13138. }
  13139. }
  13140. });
  13141. // node_modules/@babel/types/lib/validators/isReferenced.js
  13142. var require_isReferenced = __commonJS({
  13143. "node_modules/@babel/types/lib/validators/isReferenced.js"(exports) {
  13144. "use strict";
  13145. Object.defineProperty(exports, "__esModule", {
  13146. value: true
  13147. });
  13148. exports.default = isReferenced;
  13149. function isReferenced(node, parent, grandparent) {
  13150. switch (parent.type) {
  13151. case "MemberExpression":
  13152. case "JSXMemberExpression":
  13153. case "OptionalMemberExpression":
  13154. if (parent.property === node) {
  13155. return !!parent.computed;
  13156. }
  13157. return parent.object === node;
  13158. case "VariableDeclarator":
  13159. return parent.init === node;
  13160. case "ArrowFunctionExpression":
  13161. return parent.body === node;
  13162. case "PrivateName":
  13163. return false;
  13164. case "ClassMethod":
  13165. case "ClassPrivateMethod":
  13166. case "ObjectMethod":
  13167. if (parent.params.includes(node)) {
  13168. return false;
  13169. }
  13170. case "ObjectProperty":
  13171. case "ClassProperty":
  13172. case "ClassPrivateProperty":
  13173. if (parent.key === node) {
  13174. return !!parent.computed;
  13175. }
  13176. if (parent.value === node) {
  13177. return !grandparent || grandparent.type !== "ObjectPattern";
  13178. }
  13179. return true;
  13180. case "ClassDeclaration":
  13181. case "ClassExpression":
  13182. return parent.superClass === node;
  13183. case "AssignmentExpression":
  13184. return parent.right === node;
  13185. case "AssignmentPattern":
  13186. return parent.right === node;
  13187. case "LabeledStatement":
  13188. return false;
  13189. case "CatchClause":
  13190. return false;
  13191. case "RestElement":
  13192. return false;
  13193. case "BreakStatement":
  13194. case "ContinueStatement":
  13195. return false;
  13196. case "FunctionDeclaration":
  13197. case "FunctionExpression":
  13198. return false;
  13199. case "ExportNamespaceSpecifier":
  13200. case "ExportDefaultSpecifier":
  13201. return false;
  13202. case "ExportSpecifier":
  13203. if (grandparent != null && grandparent.source) {
  13204. return false;
  13205. }
  13206. return parent.local === node;
  13207. case "ImportDefaultSpecifier":
  13208. case "ImportNamespaceSpecifier":
  13209. case "ImportSpecifier":
  13210. return false;
  13211. case "JSXAttribute":
  13212. return false;
  13213. case "ObjectPattern":
  13214. case "ArrayPattern":
  13215. return false;
  13216. case "MetaProperty":
  13217. return false;
  13218. case "ObjectTypeProperty":
  13219. return parent.key !== node;
  13220. case "TSEnumMember":
  13221. return parent.id !== node;
  13222. case "TSPropertySignature":
  13223. if (parent.key === node) {
  13224. return !!parent.computed;
  13225. }
  13226. return true;
  13227. }
  13228. return true;
  13229. }
  13230. }
  13231. });
  13232. // node_modules/@babel/types/lib/validators/isScope.js
  13233. var require_isScope = __commonJS({
  13234. "node_modules/@babel/types/lib/validators/isScope.js"(exports) {
  13235. "use strict";
  13236. Object.defineProperty(exports, "__esModule", {
  13237. value: true
  13238. });
  13239. exports.default = isScope;
  13240. var _generated = require_generated();
  13241. function isScope(node, parent) {
  13242. if ((0, _generated.isBlockStatement)(node) && ((0, _generated.isFunction)(parent) || (0, _generated.isCatchClause)(parent))) {
  13243. return false;
  13244. }
  13245. if ((0, _generated.isPattern)(node) && ((0, _generated.isFunction)(parent) || (0, _generated.isCatchClause)(parent))) {
  13246. return true;
  13247. }
  13248. return (0, _generated.isScopable)(node);
  13249. }
  13250. }
  13251. });
  13252. // node_modules/@babel/types/lib/validators/isSpecifierDefault.js
  13253. var require_isSpecifierDefault = __commonJS({
  13254. "node_modules/@babel/types/lib/validators/isSpecifierDefault.js"(exports) {
  13255. "use strict";
  13256. Object.defineProperty(exports, "__esModule", {
  13257. value: true
  13258. });
  13259. exports.default = isSpecifierDefault;
  13260. var _generated = require_generated();
  13261. function isSpecifierDefault(specifier) {
  13262. return (0, _generated.isImportDefaultSpecifier)(specifier) || (0, _generated.isIdentifier)(specifier.imported || specifier.exported, {
  13263. name: "default"
  13264. });
  13265. }
  13266. }
  13267. });
  13268. // node_modules/@babel/types/lib/validators/isValidES3Identifier.js
  13269. var require_isValidES3Identifier = __commonJS({
  13270. "node_modules/@babel/types/lib/validators/isValidES3Identifier.js"(exports) {
  13271. "use strict";
  13272. Object.defineProperty(exports, "__esModule", {
  13273. value: true
  13274. });
  13275. exports.default = isValidES3Identifier;
  13276. var _isValidIdentifier = require_isValidIdentifier();
  13277. var RESERVED_WORDS_ES3_ONLY = /* @__PURE__ */ new Set(["abstract", "boolean", "byte", "char", "double", "enum", "final", "float", "goto", "implements", "int", "interface", "long", "native", "package", "private", "protected", "public", "short", "static", "synchronized", "throws", "transient", "volatile"]);
  13278. function isValidES3Identifier(name2) {
  13279. return (0, _isValidIdentifier.default)(name2) && !RESERVED_WORDS_ES3_ONLY.has(name2);
  13280. }
  13281. }
  13282. });
  13283. // node_modules/@babel/types/lib/validators/isVar.js
  13284. var require_isVar = __commonJS({
  13285. "node_modules/@babel/types/lib/validators/isVar.js"(exports) {
  13286. "use strict";
  13287. Object.defineProperty(exports, "__esModule", {
  13288. value: true
  13289. });
  13290. exports.default = isVar;
  13291. var _generated = require_generated();
  13292. var _constants = require_constants();
  13293. function isVar(node) {
  13294. return (0, _generated.isVariableDeclaration)(node, {
  13295. kind: "var"
  13296. }) && !node[_constants.BLOCK_SCOPED_SYMBOL];
  13297. }
  13298. }
  13299. });
  13300. // node_modules/@babel/types/lib/ast-types/generated/index.js
  13301. var require_generated5 = __commonJS({
  13302. "node_modules/@babel/types/lib/ast-types/generated/index.js"() {
  13303. }
  13304. });
  13305. // node_modules/@babel/types/lib/index.js
  13306. var require_lib2 = __commonJS({
  13307. "node_modules/@babel/types/lib/index.js"(exports) {
  13308. "use strict";
  13309. Object.defineProperty(exports, "__esModule", {
  13310. value: true
  13311. });
  13312. var _exportNames = {
  13313. react: true,
  13314. assertNode: true,
  13315. createTypeAnnotationBasedOnTypeof: true,
  13316. createUnionTypeAnnotation: true,
  13317. createFlowUnionType: true,
  13318. createTSUnionType: true,
  13319. cloneNode: true,
  13320. clone: true,
  13321. cloneDeep: true,
  13322. cloneDeepWithoutLoc: true,
  13323. cloneWithoutLoc: true,
  13324. addComment: true,
  13325. addComments: true,
  13326. inheritInnerComments: true,
  13327. inheritLeadingComments: true,
  13328. inheritsComments: true,
  13329. inheritTrailingComments: true,
  13330. removeComments: true,
  13331. ensureBlock: true,
  13332. toBindingIdentifierName: true,
  13333. toBlock: true,
  13334. toComputedKey: true,
  13335. toExpression: true,
  13336. toIdentifier: true,
  13337. toKeyAlias: true,
  13338. toSequenceExpression: true,
  13339. toStatement: true,
  13340. valueToNode: true,
  13341. appendToMemberExpression: true,
  13342. inherits: true,
  13343. prependToMemberExpression: true,
  13344. removeProperties: true,
  13345. removePropertiesDeep: true,
  13346. removeTypeDuplicates: true,
  13347. getBindingIdentifiers: true,
  13348. getOuterBindingIdentifiers: true,
  13349. traverse: true,
  13350. traverseFast: true,
  13351. shallowEqual: true,
  13352. is: true,
  13353. isBinding: true,
  13354. isBlockScoped: true,
  13355. isImmutable: true,
  13356. isLet: true,
  13357. isNode: true,
  13358. isNodesEquivalent: true,
  13359. isPlaceholderType: true,
  13360. isReferenced: true,
  13361. isScope: true,
  13362. isSpecifierDefault: true,
  13363. isType: true,
  13364. isValidES3Identifier: true,
  13365. isValidIdentifier: true,
  13366. isVar: true,
  13367. matchesPattern: true,
  13368. validate: true,
  13369. buildMatchMemberExpression: true
  13370. };
  13371. Object.defineProperty(exports, "assertNode", {
  13372. enumerable: true,
  13373. get: function() {
  13374. return _assertNode.default;
  13375. }
  13376. });
  13377. Object.defineProperty(exports, "createTypeAnnotationBasedOnTypeof", {
  13378. enumerable: true,
  13379. get: function() {
  13380. return _createTypeAnnotationBasedOnTypeof.default;
  13381. }
  13382. });
  13383. Object.defineProperty(exports, "createUnionTypeAnnotation", {
  13384. enumerable: true,
  13385. get: function() {
  13386. return _createFlowUnionType.default;
  13387. }
  13388. });
  13389. Object.defineProperty(exports, "createFlowUnionType", {
  13390. enumerable: true,
  13391. get: function() {
  13392. return _createFlowUnionType.default;
  13393. }
  13394. });
  13395. Object.defineProperty(exports, "createTSUnionType", {
  13396. enumerable: true,
  13397. get: function() {
  13398. return _createTSUnionType.default;
  13399. }
  13400. });
  13401. Object.defineProperty(exports, "cloneNode", {
  13402. enumerable: true,
  13403. get: function() {
  13404. return _cloneNode.default;
  13405. }
  13406. });
  13407. Object.defineProperty(exports, "clone", {
  13408. enumerable: true,
  13409. get: function() {
  13410. return _clone.default;
  13411. }
  13412. });
  13413. Object.defineProperty(exports, "cloneDeep", {
  13414. enumerable: true,
  13415. get: function() {
  13416. return _cloneDeep.default;
  13417. }
  13418. });
  13419. Object.defineProperty(exports, "cloneDeepWithoutLoc", {
  13420. enumerable: true,
  13421. get: function() {
  13422. return _cloneDeepWithoutLoc.default;
  13423. }
  13424. });
  13425. Object.defineProperty(exports, "cloneWithoutLoc", {
  13426. enumerable: true,
  13427. get: function() {
  13428. return _cloneWithoutLoc.default;
  13429. }
  13430. });
  13431. Object.defineProperty(exports, "addComment", {
  13432. enumerable: true,
  13433. get: function() {
  13434. return _addComment.default;
  13435. }
  13436. });
  13437. Object.defineProperty(exports, "addComments", {
  13438. enumerable: true,
  13439. get: function() {
  13440. return _addComments.default;
  13441. }
  13442. });
  13443. Object.defineProperty(exports, "inheritInnerComments", {
  13444. enumerable: true,
  13445. get: function() {
  13446. return _inheritInnerComments.default;
  13447. }
  13448. });
  13449. Object.defineProperty(exports, "inheritLeadingComments", {
  13450. enumerable: true,
  13451. get: function() {
  13452. return _inheritLeadingComments.default;
  13453. }
  13454. });
  13455. Object.defineProperty(exports, "inheritsComments", {
  13456. enumerable: true,
  13457. get: function() {
  13458. return _inheritsComments.default;
  13459. }
  13460. });
  13461. Object.defineProperty(exports, "inheritTrailingComments", {
  13462. enumerable: true,
  13463. get: function() {
  13464. return _inheritTrailingComments.default;
  13465. }
  13466. });
  13467. Object.defineProperty(exports, "removeComments", {
  13468. enumerable: true,
  13469. get: function() {
  13470. return _removeComments.default;
  13471. }
  13472. });
  13473. Object.defineProperty(exports, "ensureBlock", {
  13474. enumerable: true,
  13475. get: function() {
  13476. return _ensureBlock.default;
  13477. }
  13478. });
  13479. Object.defineProperty(exports, "toBindingIdentifierName", {
  13480. enumerable: true,
  13481. get: function() {
  13482. return _toBindingIdentifierName.default;
  13483. }
  13484. });
  13485. Object.defineProperty(exports, "toBlock", {
  13486. enumerable: true,
  13487. get: function() {
  13488. return _toBlock.default;
  13489. }
  13490. });
  13491. Object.defineProperty(exports, "toComputedKey", {
  13492. enumerable: true,
  13493. get: function() {
  13494. return _toComputedKey.default;
  13495. }
  13496. });
  13497. Object.defineProperty(exports, "toExpression", {
  13498. enumerable: true,
  13499. get: function() {
  13500. return _toExpression.default;
  13501. }
  13502. });
  13503. Object.defineProperty(exports, "toIdentifier", {
  13504. enumerable: true,
  13505. get: function() {
  13506. return _toIdentifier.default;
  13507. }
  13508. });
  13509. Object.defineProperty(exports, "toKeyAlias", {
  13510. enumerable: true,
  13511. get: function() {
  13512. return _toKeyAlias.default;
  13513. }
  13514. });
  13515. Object.defineProperty(exports, "toSequenceExpression", {
  13516. enumerable: true,
  13517. get: function() {
  13518. return _toSequenceExpression.default;
  13519. }
  13520. });
  13521. Object.defineProperty(exports, "toStatement", {
  13522. enumerable: true,
  13523. get: function() {
  13524. return _toStatement.default;
  13525. }
  13526. });
  13527. Object.defineProperty(exports, "valueToNode", {
  13528. enumerable: true,
  13529. get: function() {
  13530. return _valueToNode.default;
  13531. }
  13532. });
  13533. Object.defineProperty(exports, "appendToMemberExpression", {
  13534. enumerable: true,
  13535. get: function() {
  13536. return _appendToMemberExpression.default;
  13537. }
  13538. });
  13539. Object.defineProperty(exports, "inherits", {
  13540. enumerable: true,
  13541. get: function() {
  13542. return _inherits.default;
  13543. }
  13544. });
  13545. Object.defineProperty(exports, "prependToMemberExpression", {
  13546. enumerable: true,
  13547. get: function() {
  13548. return _prependToMemberExpression.default;
  13549. }
  13550. });
  13551. Object.defineProperty(exports, "removeProperties", {
  13552. enumerable: true,
  13553. get: function() {
  13554. return _removeProperties.default;
  13555. }
  13556. });
  13557. Object.defineProperty(exports, "removePropertiesDeep", {
  13558. enumerable: true,
  13559. get: function() {
  13560. return _removePropertiesDeep.default;
  13561. }
  13562. });
  13563. Object.defineProperty(exports, "removeTypeDuplicates", {
  13564. enumerable: true,
  13565. get: function() {
  13566. return _removeTypeDuplicates.default;
  13567. }
  13568. });
  13569. Object.defineProperty(exports, "getBindingIdentifiers", {
  13570. enumerable: true,
  13571. get: function() {
  13572. return _getBindingIdentifiers.default;
  13573. }
  13574. });
  13575. Object.defineProperty(exports, "getOuterBindingIdentifiers", {
  13576. enumerable: true,
  13577. get: function() {
  13578. return _getOuterBindingIdentifiers.default;
  13579. }
  13580. });
  13581. Object.defineProperty(exports, "traverse", {
  13582. enumerable: true,
  13583. get: function() {
  13584. return _traverse.default;
  13585. }
  13586. });
  13587. Object.defineProperty(exports, "traverseFast", {
  13588. enumerable: true,
  13589. get: function() {
  13590. return _traverseFast.default;
  13591. }
  13592. });
  13593. Object.defineProperty(exports, "shallowEqual", {
  13594. enumerable: true,
  13595. get: function() {
  13596. return _shallowEqual.default;
  13597. }
  13598. });
  13599. Object.defineProperty(exports, "is", {
  13600. enumerable: true,
  13601. get: function() {
  13602. return _is.default;
  13603. }
  13604. });
  13605. Object.defineProperty(exports, "isBinding", {
  13606. enumerable: true,
  13607. get: function() {
  13608. return _isBinding.default;
  13609. }
  13610. });
  13611. Object.defineProperty(exports, "isBlockScoped", {
  13612. enumerable: true,
  13613. get: function() {
  13614. return _isBlockScoped.default;
  13615. }
  13616. });
  13617. Object.defineProperty(exports, "isImmutable", {
  13618. enumerable: true,
  13619. get: function() {
  13620. return _isImmutable.default;
  13621. }
  13622. });
  13623. Object.defineProperty(exports, "isLet", {
  13624. enumerable: true,
  13625. get: function() {
  13626. return _isLet.default;
  13627. }
  13628. });
  13629. Object.defineProperty(exports, "isNode", {
  13630. enumerable: true,
  13631. get: function() {
  13632. return _isNode.default;
  13633. }
  13634. });
  13635. Object.defineProperty(exports, "isNodesEquivalent", {
  13636. enumerable: true,
  13637. get: function() {
  13638. return _isNodesEquivalent.default;
  13639. }
  13640. });
  13641. Object.defineProperty(exports, "isPlaceholderType", {
  13642. enumerable: true,
  13643. get: function() {
  13644. return _isPlaceholderType.default;
  13645. }
  13646. });
  13647. Object.defineProperty(exports, "isReferenced", {
  13648. enumerable: true,
  13649. get: function() {
  13650. return _isReferenced.default;
  13651. }
  13652. });
  13653. Object.defineProperty(exports, "isScope", {
  13654. enumerable: true,
  13655. get: function() {
  13656. return _isScope.default;
  13657. }
  13658. });
  13659. Object.defineProperty(exports, "isSpecifierDefault", {
  13660. enumerable: true,
  13661. get: function() {
  13662. return _isSpecifierDefault.default;
  13663. }
  13664. });
  13665. Object.defineProperty(exports, "isType", {
  13666. enumerable: true,
  13667. get: function() {
  13668. return _isType.default;
  13669. }
  13670. });
  13671. Object.defineProperty(exports, "isValidES3Identifier", {
  13672. enumerable: true,
  13673. get: function() {
  13674. return _isValidES3Identifier.default;
  13675. }
  13676. });
  13677. Object.defineProperty(exports, "isValidIdentifier", {
  13678. enumerable: true,
  13679. get: function() {
  13680. return _isValidIdentifier.default;
  13681. }
  13682. });
  13683. Object.defineProperty(exports, "isVar", {
  13684. enumerable: true,
  13685. get: function() {
  13686. return _isVar.default;
  13687. }
  13688. });
  13689. Object.defineProperty(exports, "matchesPattern", {
  13690. enumerable: true,
  13691. get: function() {
  13692. return _matchesPattern.default;
  13693. }
  13694. });
  13695. Object.defineProperty(exports, "validate", {
  13696. enumerable: true,
  13697. get: function() {
  13698. return _validate.default;
  13699. }
  13700. });
  13701. Object.defineProperty(exports, "buildMatchMemberExpression", {
  13702. enumerable: true,
  13703. get: function() {
  13704. return _buildMatchMemberExpression.default;
  13705. }
  13706. });
  13707. exports.react = void 0;
  13708. var _isReactComponent = require_isReactComponent();
  13709. var _isCompatTag = require_isCompatTag();
  13710. var _buildChildren = require_buildChildren();
  13711. var _assertNode = require_assertNode();
  13712. var _generated = require_generated3();
  13713. Object.keys(_generated).forEach(function(key) {
  13714. if (key === "default" || key === "__esModule")
  13715. return;
  13716. if (Object.prototype.hasOwnProperty.call(_exportNames, key))
  13717. return;
  13718. if (key in exports && exports[key] === _generated[key])
  13719. return;
  13720. Object.defineProperty(exports, key, {
  13721. enumerable: true,
  13722. get: function() {
  13723. return _generated[key];
  13724. }
  13725. });
  13726. });
  13727. var _createTypeAnnotationBasedOnTypeof = require_createTypeAnnotationBasedOnTypeof();
  13728. var _createFlowUnionType = require_createFlowUnionType();
  13729. var _createTSUnionType = require_createTSUnionType();
  13730. var _generated2 = require_generated2();
  13731. Object.keys(_generated2).forEach(function(key) {
  13732. if (key === "default" || key === "__esModule")
  13733. return;
  13734. if (Object.prototype.hasOwnProperty.call(_exportNames, key))
  13735. return;
  13736. if (key in exports && exports[key] === _generated2[key])
  13737. return;
  13738. Object.defineProperty(exports, key, {
  13739. enumerable: true,
  13740. get: function() {
  13741. return _generated2[key];
  13742. }
  13743. });
  13744. });
  13745. var _uppercase = require_uppercase();
  13746. Object.keys(_uppercase).forEach(function(key) {
  13747. if (key === "default" || key === "__esModule")
  13748. return;
  13749. if (Object.prototype.hasOwnProperty.call(_exportNames, key))
  13750. return;
  13751. if (key in exports && exports[key] === _uppercase[key])
  13752. return;
  13753. Object.defineProperty(exports, key, {
  13754. enumerable: true,
  13755. get: function() {
  13756. return _uppercase[key];
  13757. }
  13758. });
  13759. });
  13760. var _cloneNode = require_cloneNode();
  13761. var _clone = require_clone();
  13762. var _cloneDeep = require_cloneDeep();
  13763. var _cloneDeepWithoutLoc = require_cloneDeepWithoutLoc();
  13764. var _cloneWithoutLoc = require_cloneWithoutLoc();
  13765. var _addComment = require_addComment();
  13766. var _addComments = require_addComments();
  13767. var _inheritInnerComments = require_inheritInnerComments();
  13768. var _inheritLeadingComments = require_inheritLeadingComments();
  13769. var _inheritsComments = require_inheritsComments();
  13770. var _inheritTrailingComments = require_inheritTrailingComments();
  13771. var _removeComments = require_removeComments();
  13772. var _generated3 = require_generated4();
  13773. Object.keys(_generated3).forEach(function(key) {
  13774. if (key === "default" || key === "__esModule")
  13775. return;
  13776. if (Object.prototype.hasOwnProperty.call(_exportNames, key))
  13777. return;
  13778. if (key in exports && exports[key] === _generated3[key])
  13779. return;
  13780. Object.defineProperty(exports, key, {
  13781. enumerable: true,
  13782. get: function() {
  13783. return _generated3[key];
  13784. }
  13785. });
  13786. });
  13787. var _constants = require_constants();
  13788. Object.keys(_constants).forEach(function(key) {
  13789. if (key === "default" || key === "__esModule")
  13790. return;
  13791. if (Object.prototype.hasOwnProperty.call(_exportNames, key))
  13792. return;
  13793. if (key in exports && exports[key] === _constants[key])
  13794. return;
  13795. Object.defineProperty(exports, key, {
  13796. enumerable: true,
  13797. get: function() {
  13798. return _constants[key];
  13799. }
  13800. });
  13801. });
  13802. var _ensureBlock = require_ensureBlock();
  13803. var _toBindingIdentifierName = require_toBindingIdentifierName();
  13804. var _toBlock = require_toBlock();
  13805. var _toComputedKey = require_toComputedKey();
  13806. var _toExpression = require_toExpression();
  13807. var _toIdentifier = require_toIdentifier();
  13808. var _toKeyAlias = require_toKeyAlias();
  13809. var _toSequenceExpression = require_toSequenceExpression();
  13810. var _toStatement = require_toStatement();
  13811. var _valueToNode = require_valueToNode();
  13812. var _definitions = require_definitions();
  13813. Object.keys(_definitions).forEach(function(key) {
  13814. if (key === "default" || key === "__esModule")
  13815. return;
  13816. if (Object.prototype.hasOwnProperty.call(_exportNames, key))
  13817. return;
  13818. if (key in exports && exports[key] === _definitions[key])
  13819. return;
  13820. Object.defineProperty(exports, key, {
  13821. enumerable: true,
  13822. get: function() {
  13823. return _definitions[key];
  13824. }
  13825. });
  13826. });
  13827. var _appendToMemberExpression = require_appendToMemberExpression();
  13828. var _inherits = require_inherits();
  13829. var _prependToMemberExpression = require_prependToMemberExpression();
  13830. var _removeProperties = require_removeProperties();
  13831. var _removePropertiesDeep = require_removePropertiesDeep();
  13832. var _removeTypeDuplicates = require_removeTypeDuplicates();
  13833. var _getBindingIdentifiers = require_getBindingIdentifiers();
  13834. var _getOuterBindingIdentifiers = require_getOuterBindingIdentifiers();
  13835. var _traverse = require_traverse();
  13836. Object.keys(_traverse).forEach(function(key) {
  13837. if (key === "default" || key === "__esModule")
  13838. return;
  13839. if (Object.prototype.hasOwnProperty.call(_exportNames, key))
  13840. return;
  13841. if (key in exports && exports[key] === _traverse[key])
  13842. return;
  13843. Object.defineProperty(exports, key, {
  13844. enumerable: true,
  13845. get: function() {
  13846. return _traverse[key];
  13847. }
  13848. });
  13849. });
  13850. var _traverseFast = require_traverseFast();
  13851. var _shallowEqual = require_shallowEqual();
  13852. var _is = require_is();
  13853. var _isBinding = require_isBinding();
  13854. var _isBlockScoped = require_isBlockScoped();
  13855. var _isImmutable = require_isImmutable();
  13856. var _isLet = require_isLet();
  13857. var _isNode = require_isNode();
  13858. var _isNodesEquivalent = require_isNodesEquivalent();
  13859. var _isPlaceholderType = require_isPlaceholderType();
  13860. var _isReferenced = require_isReferenced();
  13861. var _isScope = require_isScope();
  13862. var _isSpecifierDefault = require_isSpecifierDefault();
  13863. var _isType = require_isType();
  13864. var _isValidES3Identifier = require_isValidES3Identifier();
  13865. var _isValidIdentifier = require_isValidIdentifier();
  13866. var _isVar = require_isVar();
  13867. var _matchesPattern = require_matchesPattern();
  13868. var _validate = require_validate();
  13869. var _buildMatchMemberExpression = require_buildMatchMemberExpression();
  13870. var _generated4 = require_generated();
  13871. Object.keys(_generated4).forEach(function(key) {
  13872. if (key === "default" || key === "__esModule")
  13873. return;
  13874. if (Object.prototype.hasOwnProperty.call(_exportNames, key))
  13875. return;
  13876. if (key in exports && exports[key] === _generated4[key])
  13877. return;
  13878. Object.defineProperty(exports, key, {
  13879. enumerable: true,
  13880. get: function() {
  13881. return _generated4[key];
  13882. }
  13883. });
  13884. });
  13885. var _generated5 = require_generated5();
  13886. Object.keys(_generated5).forEach(function(key) {
  13887. if (key === "default" || key === "__esModule")
  13888. return;
  13889. if (Object.prototype.hasOwnProperty.call(_exportNames, key))
  13890. return;
  13891. if (key in exports && exports[key] === _generated5[key])
  13892. return;
  13893. Object.defineProperty(exports, key, {
  13894. enumerable: true,
  13895. get: function() {
  13896. return _generated5[key];
  13897. }
  13898. });
  13899. });
  13900. var react = {
  13901. isReactComponent: _isReactComponent.default,
  13902. isCompatTag: _isCompatTag.default,
  13903. buildChildren: _buildChildren.default
  13904. };
  13905. exports.react = react;
  13906. }
  13907. });
  13908. // node_modules/estree-to-babel/node_modules/@babel/types/lib/utils/shallowEqual.js
  13909. var require_shallowEqual2 = __commonJS({
  13910. "node_modules/estree-to-babel/node_modules/@babel/types/lib/utils/shallowEqual.js"(exports) {
  13911. "use strict";
  13912. Object.defineProperty(exports, "__esModule", {
  13913. value: true
  13914. });
  13915. exports.default = shallowEqual;
  13916. function shallowEqual(actual, expected) {
  13917. const keys2 = Object.keys(expected);
  13918. for (const key of keys2) {
  13919. if (actual[key] !== expected[key]) {
  13920. return false;
  13921. }
  13922. }
  13923. return true;
  13924. }
  13925. }
  13926. });
  13927. // node_modules/estree-to-babel/node_modules/@babel/types/lib/validators/generated/index.js
  13928. var require_generated6 = __commonJS({
  13929. "node_modules/estree-to-babel/node_modules/@babel/types/lib/validators/generated/index.js"(exports) {
  13930. "use strict";
  13931. Object.defineProperty(exports, "__esModule", {
  13932. value: true
  13933. });
  13934. exports.isArrayExpression = isArrayExpression;
  13935. exports.isAssignmentExpression = isAssignmentExpression;
  13936. exports.isBinaryExpression = isBinaryExpression;
  13937. exports.isInterpreterDirective = isInterpreterDirective;
  13938. exports.isDirective = isDirective;
  13939. exports.isDirectiveLiteral = isDirectiveLiteral;
  13940. exports.isBlockStatement = isBlockStatement;
  13941. exports.isBreakStatement = isBreakStatement;
  13942. exports.isCallExpression = isCallExpression;
  13943. exports.isCatchClause = isCatchClause;
  13944. exports.isConditionalExpression = isConditionalExpression;
  13945. exports.isContinueStatement = isContinueStatement;
  13946. exports.isDebuggerStatement = isDebuggerStatement;
  13947. exports.isDoWhileStatement = isDoWhileStatement;
  13948. exports.isEmptyStatement = isEmptyStatement;
  13949. exports.isExpressionStatement = isExpressionStatement2;
  13950. exports.isFile = isFile;
  13951. exports.isForInStatement = isForInStatement;
  13952. exports.isForStatement = isForStatement;
  13953. exports.isFunctionDeclaration = isFunctionDeclaration;
  13954. exports.isFunctionExpression = isFunctionExpression;
  13955. exports.isIdentifier = isIdentifier2;
  13956. exports.isIfStatement = isIfStatement;
  13957. exports.isLabeledStatement = isLabeledStatement;
  13958. exports.isStringLiteral = isStringLiteral2;
  13959. exports.isNumericLiteral = isNumericLiteral;
  13960. exports.isNullLiteral = isNullLiteral;
  13961. exports.isBooleanLiteral = isBooleanLiteral2;
  13962. exports.isRegExpLiteral = isRegExpLiteral;
  13963. exports.isLogicalExpression = isLogicalExpression;
  13964. exports.isMemberExpression = isMemberExpression;
  13965. exports.isNewExpression = isNewExpression;
  13966. exports.isProgram = isProgram;
  13967. exports.isObjectExpression = isObjectExpression;
  13968. exports.isObjectMethod = isObjectMethod;
  13969. exports.isObjectProperty = isObjectProperty;
  13970. exports.isRestElement = isRestElement;
  13971. exports.isReturnStatement = isReturnStatement;
  13972. exports.isSequenceExpression = isSequenceExpression;
  13973. exports.isParenthesizedExpression = isParenthesizedExpression;
  13974. exports.isSwitchCase = isSwitchCase;
  13975. exports.isSwitchStatement = isSwitchStatement;
  13976. exports.isThisExpression = isThisExpression;
  13977. exports.isThrowStatement = isThrowStatement;
  13978. exports.isTryStatement = isTryStatement;
  13979. exports.isUnaryExpression = isUnaryExpression;
  13980. exports.isUpdateExpression = isUpdateExpression;
  13981. exports.isVariableDeclaration = isVariableDeclaration;
  13982. exports.isVariableDeclarator = isVariableDeclarator;
  13983. exports.isWhileStatement = isWhileStatement;
  13984. exports.isWithStatement = isWithStatement;
  13985. exports.isAssignmentPattern = isAssignmentPattern;
  13986. exports.isArrayPattern = isArrayPattern;
  13987. exports.isArrowFunctionExpression = isArrowFunctionExpression;
  13988. exports.isClassBody = isClassBody;
  13989. exports.isClassExpression = isClassExpression;
  13990. exports.isClassDeclaration = isClassDeclaration;
  13991. exports.isExportAllDeclaration = isExportAllDeclaration;
  13992. exports.isExportDefaultDeclaration = isExportDefaultDeclaration;
  13993. exports.isExportNamedDeclaration = isExportNamedDeclaration;
  13994. exports.isExportSpecifier = isExportSpecifier;
  13995. exports.isForOfStatement = isForOfStatement;
  13996. exports.isImportDeclaration = isImportDeclaration;
  13997. exports.isImportDefaultSpecifier = isImportDefaultSpecifier;
  13998. exports.isImportNamespaceSpecifier = isImportNamespaceSpecifier;
  13999. exports.isImportSpecifier = isImportSpecifier;
  14000. exports.isMetaProperty = isMetaProperty;
  14001. exports.isClassMethod = isClassMethod;
  14002. exports.isObjectPattern = isObjectPattern;
  14003. exports.isSpreadElement = isSpreadElement;
  14004. exports.isSuper = isSuper;
  14005. exports.isTaggedTemplateExpression = isTaggedTemplateExpression;
  14006. exports.isTemplateElement = isTemplateElement;
  14007. exports.isTemplateLiteral = isTemplateLiteral;
  14008. exports.isYieldExpression = isYieldExpression;
  14009. exports.isAwaitExpression = isAwaitExpression;
  14010. exports.isImport = isImport;
  14011. exports.isBigIntLiteral = isBigIntLiteral;
  14012. exports.isExportNamespaceSpecifier = isExportNamespaceSpecifier;
  14013. exports.isOptionalMemberExpression = isOptionalMemberExpression;
  14014. exports.isOptionalCallExpression = isOptionalCallExpression;
  14015. exports.isAnyTypeAnnotation = isAnyTypeAnnotation;
  14016. exports.isArrayTypeAnnotation = isArrayTypeAnnotation;
  14017. exports.isBooleanTypeAnnotation = isBooleanTypeAnnotation;
  14018. exports.isBooleanLiteralTypeAnnotation = isBooleanLiteralTypeAnnotation;
  14019. exports.isNullLiteralTypeAnnotation = isNullLiteralTypeAnnotation;
  14020. exports.isClassImplements = isClassImplements;
  14021. exports.isDeclareClass = isDeclareClass;
  14022. exports.isDeclareFunction = isDeclareFunction;
  14023. exports.isDeclareInterface = isDeclareInterface;
  14024. exports.isDeclareModule = isDeclareModule;
  14025. exports.isDeclareModuleExports = isDeclareModuleExports;
  14026. exports.isDeclareTypeAlias = isDeclareTypeAlias;
  14027. exports.isDeclareOpaqueType = isDeclareOpaqueType;
  14028. exports.isDeclareVariable = isDeclareVariable;
  14029. exports.isDeclareExportDeclaration = isDeclareExportDeclaration;
  14030. exports.isDeclareExportAllDeclaration = isDeclareExportAllDeclaration;
  14031. exports.isDeclaredPredicate = isDeclaredPredicate;
  14032. exports.isExistsTypeAnnotation = isExistsTypeAnnotation;
  14033. exports.isFunctionTypeAnnotation = isFunctionTypeAnnotation;
  14034. exports.isFunctionTypeParam = isFunctionTypeParam;
  14035. exports.isGenericTypeAnnotation = isGenericTypeAnnotation;
  14036. exports.isInferredPredicate = isInferredPredicate;
  14037. exports.isInterfaceExtends = isInterfaceExtends;
  14038. exports.isInterfaceDeclaration = isInterfaceDeclaration;
  14039. exports.isInterfaceTypeAnnotation = isInterfaceTypeAnnotation;
  14040. exports.isIntersectionTypeAnnotation = isIntersectionTypeAnnotation;
  14041. exports.isMixedTypeAnnotation = isMixedTypeAnnotation;
  14042. exports.isEmptyTypeAnnotation = isEmptyTypeAnnotation;
  14043. exports.isNullableTypeAnnotation = isNullableTypeAnnotation;
  14044. exports.isNumberLiteralTypeAnnotation = isNumberLiteralTypeAnnotation;
  14045. exports.isNumberTypeAnnotation = isNumberTypeAnnotation;
  14046. exports.isObjectTypeAnnotation = isObjectTypeAnnotation;
  14047. exports.isObjectTypeInternalSlot = isObjectTypeInternalSlot;
  14048. exports.isObjectTypeCallProperty = isObjectTypeCallProperty;
  14049. exports.isObjectTypeIndexer = isObjectTypeIndexer;
  14050. exports.isObjectTypeProperty = isObjectTypeProperty;
  14051. exports.isObjectTypeSpreadProperty = isObjectTypeSpreadProperty;
  14052. exports.isOpaqueType = isOpaqueType;
  14053. exports.isQualifiedTypeIdentifier = isQualifiedTypeIdentifier;
  14054. exports.isStringLiteralTypeAnnotation = isStringLiteralTypeAnnotation;
  14055. exports.isStringTypeAnnotation = isStringTypeAnnotation;
  14056. exports.isSymbolTypeAnnotation = isSymbolTypeAnnotation;
  14057. exports.isThisTypeAnnotation = isThisTypeAnnotation;
  14058. exports.isTupleTypeAnnotation = isTupleTypeAnnotation;
  14059. exports.isTypeofTypeAnnotation = isTypeofTypeAnnotation;
  14060. exports.isTypeAlias = isTypeAlias;
  14061. exports.isTypeAnnotation = isTypeAnnotation;
  14062. exports.isTypeCastExpression = isTypeCastExpression;
  14063. exports.isTypeParameter = isTypeParameter;
  14064. exports.isTypeParameterDeclaration = isTypeParameterDeclaration;
  14065. exports.isTypeParameterInstantiation = isTypeParameterInstantiation;
  14066. exports.isUnionTypeAnnotation = isUnionTypeAnnotation;
  14067. exports.isVariance = isVariance;
  14068. exports.isVoidTypeAnnotation = isVoidTypeAnnotation;
  14069. exports.isEnumDeclaration = isEnumDeclaration;
  14070. exports.isEnumBooleanBody = isEnumBooleanBody;
  14071. exports.isEnumNumberBody = isEnumNumberBody;
  14072. exports.isEnumStringBody = isEnumStringBody;
  14073. exports.isEnumSymbolBody = isEnumSymbolBody;
  14074. exports.isEnumBooleanMember = isEnumBooleanMember;
  14075. exports.isEnumNumberMember = isEnumNumberMember;
  14076. exports.isEnumStringMember = isEnumStringMember;
  14077. exports.isEnumDefaultedMember = isEnumDefaultedMember;
  14078. exports.isIndexedAccessType = isIndexedAccessType;
  14079. exports.isOptionalIndexedAccessType = isOptionalIndexedAccessType;
  14080. exports.isJSXAttribute = isJSXAttribute;
  14081. exports.isJSXClosingElement = isJSXClosingElement;
  14082. exports.isJSXElement = isJSXElement2;
  14083. exports.isJSXEmptyExpression = isJSXEmptyExpression;
  14084. exports.isJSXExpressionContainer = isJSXExpressionContainer2;
  14085. exports.isJSXSpreadChild = isJSXSpreadChild;
  14086. exports.isJSXIdentifier = isJSXIdentifier2;
  14087. exports.isJSXMemberExpression = isJSXMemberExpression;
  14088. exports.isJSXNamespacedName = isJSXNamespacedName;
  14089. exports.isJSXOpeningElement = isJSXOpeningElement;
  14090. exports.isJSXSpreadAttribute = isJSXSpreadAttribute;
  14091. exports.isJSXText = isJSXText;
  14092. exports.isJSXFragment = isJSXFragment2;
  14093. exports.isJSXOpeningFragment = isJSXOpeningFragment;
  14094. exports.isJSXClosingFragment = isJSXClosingFragment;
  14095. exports.isNoop = isNoop;
  14096. exports.isPlaceholder = isPlaceholder;
  14097. exports.isV8IntrinsicIdentifier = isV8IntrinsicIdentifier;
  14098. exports.isArgumentPlaceholder = isArgumentPlaceholder;
  14099. exports.isBindExpression = isBindExpression;
  14100. exports.isClassProperty = isClassProperty;
  14101. exports.isPipelineTopicExpression = isPipelineTopicExpression;
  14102. exports.isPipelineBareFunction = isPipelineBareFunction;
  14103. exports.isPipelinePrimaryTopicReference = isPipelinePrimaryTopicReference;
  14104. exports.isClassPrivateProperty = isClassPrivateProperty;
  14105. exports.isClassPrivateMethod = isClassPrivateMethod;
  14106. exports.isImportAttribute = isImportAttribute;
  14107. exports.isDecorator = isDecorator;
  14108. exports.isDoExpression = isDoExpression;
  14109. exports.isExportDefaultSpecifier = isExportDefaultSpecifier;
  14110. exports.isPrivateName = isPrivateName;
  14111. exports.isRecordExpression = isRecordExpression;
  14112. exports.isTupleExpression = isTupleExpression;
  14113. exports.isDecimalLiteral = isDecimalLiteral;
  14114. exports.isStaticBlock = isStaticBlock;
  14115. exports.isModuleExpression = isModuleExpression;
  14116. exports.isTSParameterProperty = isTSParameterProperty;
  14117. exports.isTSDeclareFunction = isTSDeclareFunction;
  14118. exports.isTSDeclareMethod = isTSDeclareMethod;
  14119. exports.isTSQualifiedName = isTSQualifiedName;
  14120. exports.isTSCallSignatureDeclaration = isTSCallSignatureDeclaration;
  14121. exports.isTSConstructSignatureDeclaration = isTSConstructSignatureDeclaration;
  14122. exports.isTSPropertySignature = isTSPropertySignature;
  14123. exports.isTSMethodSignature = isTSMethodSignature;
  14124. exports.isTSIndexSignature = isTSIndexSignature;
  14125. exports.isTSAnyKeyword = isTSAnyKeyword;
  14126. exports.isTSBooleanKeyword = isTSBooleanKeyword;
  14127. exports.isTSBigIntKeyword = isTSBigIntKeyword;
  14128. exports.isTSIntrinsicKeyword = isTSIntrinsicKeyword;
  14129. exports.isTSNeverKeyword = isTSNeverKeyword;
  14130. exports.isTSNullKeyword = isTSNullKeyword;
  14131. exports.isTSNumberKeyword = isTSNumberKeyword;
  14132. exports.isTSObjectKeyword = isTSObjectKeyword;
  14133. exports.isTSStringKeyword = isTSStringKeyword;
  14134. exports.isTSSymbolKeyword = isTSSymbolKeyword;
  14135. exports.isTSUndefinedKeyword = isTSUndefinedKeyword;
  14136. exports.isTSUnknownKeyword = isTSUnknownKeyword;
  14137. exports.isTSVoidKeyword = isTSVoidKeyword;
  14138. exports.isTSThisType = isTSThisType;
  14139. exports.isTSFunctionType = isTSFunctionType;
  14140. exports.isTSConstructorType = isTSConstructorType;
  14141. exports.isTSTypeReference = isTSTypeReference;
  14142. exports.isTSTypePredicate = isTSTypePredicate;
  14143. exports.isTSTypeQuery = isTSTypeQuery;
  14144. exports.isTSTypeLiteral = isTSTypeLiteral;
  14145. exports.isTSArrayType = isTSArrayType;
  14146. exports.isTSTupleType = isTSTupleType;
  14147. exports.isTSOptionalType = isTSOptionalType;
  14148. exports.isTSRestType = isTSRestType;
  14149. exports.isTSNamedTupleMember = isTSNamedTupleMember;
  14150. exports.isTSUnionType = isTSUnionType;
  14151. exports.isTSIntersectionType = isTSIntersectionType;
  14152. exports.isTSConditionalType = isTSConditionalType;
  14153. exports.isTSInferType = isTSInferType;
  14154. exports.isTSParenthesizedType = isTSParenthesizedType;
  14155. exports.isTSTypeOperator = isTSTypeOperator;
  14156. exports.isTSIndexedAccessType = isTSIndexedAccessType;
  14157. exports.isTSMappedType = isTSMappedType;
  14158. exports.isTSLiteralType = isTSLiteralType;
  14159. exports.isTSExpressionWithTypeArguments = isTSExpressionWithTypeArguments;
  14160. exports.isTSInterfaceDeclaration = isTSInterfaceDeclaration;
  14161. exports.isTSInterfaceBody = isTSInterfaceBody;
  14162. exports.isTSTypeAliasDeclaration = isTSTypeAliasDeclaration;
  14163. exports.isTSAsExpression = isTSAsExpression;
  14164. exports.isTSTypeAssertion = isTSTypeAssertion;
  14165. exports.isTSEnumDeclaration = isTSEnumDeclaration;
  14166. exports.isTSEnumMember = isTSEnumMember;
  14167. exports.isTSModuleDeclaration = isTSModuleDeclaration;
  14168. exports.isTSModuleBlock = isTSModuleBlock;
  14169. exports.isTSImportType = isTSImportType;
  14170. exports.isTSImportEqualsDeclaration = isTSImportEqualsDeclaration;
  14171. exports.isTSExternalModuleReference = isTSExternalModuleReference;
  14172. exports.isTSNonNullExpression = isTSNonNullExpression;
  14173. exports.isTSExportAssignment = isTSExportAssignment;
  14174. exports.isTSNamespaceExportDeclaration = isTSNamespaceExportDeclaration;
  14175. exports.isTSTypeAnnotation = isTSTypeAnnotation;
  14176. exports.isTSTypeParameterInstantiation = isTSTypeParameterInstantiation;
  14177. exports.isTSTypeParameterDeclaration = isTSTypeParameterDeclaration;
  14178. exports.isTSTypeParameter = isTSTypeParameter;
  14179. exports.isExpression = isExpression;
  14180. exports.isBinary = isBinary;
  14181. exports.isScopable = isScopable;
  14182. exports.isBlockParent = isBlockParent;
  14183. exports.isBlock = isBlock;
  14184. exports.isStatement = isStatement;
  14185. exports.isTerminatorless = isTerminatorless;
  14186. exports.isCompletionStatement = isCompletionStatement;
  14187. exports.isConditional = isConditional;
  14188. exports.isLoop = isLoop;
  14189. exports.isWhile = isWhile;
  14190. exports.isExpressionWrapper = isExpressionWrapper;
  14191. exports.isFor = isFor;
  14192. exports.isForXStatement = isForXStatement;
  14193. exports.isFunction = isFunction;
  14194. exports.isFunctionParent = isFunctionParent;
  14195. exports.isPureish = isPureish;
  14196. exports.isDeclaration = isDeclaration2;
  14197. exports.isPatternLike = isPatternLike;
  14198. exports.isLVal = isLVal;
  14199. exports.isTSEntityName = isTSEntityName;
  14200. exports.isLiteral = isLiteral;
  14201. exports.isImmutable = isImmutable;
  14202. exports.isUserWhitespacable = isUserWhitespacable;
  14203. exports.isMethod = isMethod;
  14204. exports.isObjectMember = isObjectMember;
  14205. exports.isProperty = isProperty;
  14206. exports.isUnaryLike = isUnaryLike;
  14207. exports.isPattern = isPattern;
  14208. exports.isClass = isClass;
  14209. exports.isModuleDeclaration = isModuleDeclaration;
  14210. exports.isExportDeclaration = isExportDeclaration;
  14211. exports.isModuleSpecifier = isModuleSpecifier;
  14212. exports.isFlow = isFlow;
  14213. exports.isFlowType = isFlowType;
  14214. exports.isFlowBaseAnnotation = isFlowBaseAnnotation;
  14215. exports.isFlowDeclaration = isFlowDeclaration;
  14216. exports.isFlowPredicate = isFlowPredicate;
  14217. exports.isEnumBody = isEnumBody;
  14218. exports.isEnumMember = isEnumMember;
  14219. exports.isJSX = isJSX;
  14220. exports.isPrivate = isPrivate;
  14221. exports.isTSTypeElement = isTSTypeElement;
  14222. exports.isTSType = isTSType;
  14223. exports.isTSBaseType = isTSBaseType;
  14224. exports.isNumberLiteral = isNumberLiteral;
  14225. exports.isRegexLiteral = isRegexLiteral;
  14226. exports.isRestProperty = isRestProperty;
  14227. exports.isSpreadProperty = isSpreadProperty;
  14228. var _shallowEqual = require_shallowEqual2();
  14229. function isArrayExpression(node, opts) {
  14230. if (!node)
  14231. return false;
  14232. const nodeType = node.type;
  14233. if (nodeType === "ArrayExpression") {
  14234. if (typeof opts === "undefined") {
  14235. return true;
  14236. } else {
  14237. return (0, _shallowEqual.default)(node, opts);
  14238. }
  14239. }
  14240. return false;
  14241. }
  14242. function isAssignmentExpression(node, opts) {
  14243. if (!node)
  14244. return false;
  14245. const nodeType = node.type;
  14246. if (nodeType === "AssignmentExpression") {
  14247. if (typeof opts === "undefined") {
  14248. return true;
  14249. } else {
  14250. return (0, _shallowEqual.default)(node, opts);
  14251. }
  14252. }
  14253. return false;
  14254. }
  14255. function isBinaryExpression(node, opts) {
  14256. if (!node)
  14257. return false;
  14258. const nodeType = node.type;
  14259. if (nodeType === "BinaryExpression") {
  14260. if (typeof opts === "undefined") {
  14261. return true;
  14262. } else {
  14263. return (0, _shallowEqual.default)(node, opts);
  14264. }
  14265. }
  14266. return false;
  14267. }
  14268. function isInterpreterDirective(node, opts) {
  14269. if (!node)
  14270. return false;
  14271. const nodeType = node.type;
  14272. if (nodeType === "InterpreterDirective") {
  14273. if (typeof opts === "undefined") {
  14274. return true;
  14275. } else {
  14276. return (0, _shallowEqual.default)(node, opts);
  14277. }
  14278. }
  14279. return false;
  14280. }
  14281. function isDirective(node, opts) {
  14282. if (!node)
  14283. return false;
  14284. const nodeType = node.type;
  14285. if (nodeType === "Directive") {
  14286. if (typeof opts === "undefined") {
  14287. return true;
  14288. } else {
  14289. return (0, _shallowEqual.default)(node, opts);
  14290. }
  14291. }
  14292. return false;
  14293. }
  14294. function isDirectiveLiteral(node, opts) {
  14295. if (!node)
  14296. return false;
  14297. const nodeType = node.type;
  14298. if (nodeType === "DirectiveLiteral") {
  14299. if (typeof opts === "undefined") {
  14300. return true;
  14301. } else {
  14302. return (0, _shallowEqual.default)(node, opts);
  14303. }
  14304. }
  14305. return false;
  14306. }
  14307. function isBlockStatement(node, opts) {
  14308. if (!node)
  14309. return false;
  14310. const nodeType = node.type;
  14311. if (nodeType === "BlockStatement") {
  14312. if (typeof opts === "undefined") {
  14313. return true;
  14314. } else {
  14315. return (0, _shallowEqual.default)(node, opts);
  14316. }
  14317. }
  14318. return false;
  14319. }
  14320. function isBreakStatement(node, opts) {
  14321. if (!node)
  14322. return false;
  14323. const nodeType = node.type;
  14324. if (nodeType === "BreakStatement") {
  14325. if (typeof opts === "undefined") {
  14326. return true;
  14327. } else {
  14328. return (0, _shallowEqual.default)(node, opts);
  14329. }
  14330. }
  14331. return false;
  14332. }
  14333. function isCallExpression(node, opts) {
  14334. if (!node)
  14335. return false;
  14336. const nodeType = node.type;
  14337. if (nodeType === "CallExpression") {
  14338. if (typeof opts === "undefined") {
  14339. return true;
  14340. } else {
  14341. return (0, _shallowEqual.default)(node, opts);
  14342. }
  14343. }
  14344. return false;
  14345. }
  14346. function isCatchClause(node, opts) {
  14347. if (!node)
  14348. return false;
  14349. const nodeType = node.type;
  14350. if (nodeType === "CatchClause") {
  14351. if (typeof opts === "undefined") {
  14352. return true;
  14353. } else {
  14354. return (0, _shallowEqual.default)(node, opts);
  14355. }
  14356. }
  14357. return false;
  14358. }
  14359. function isConditionalExpression(node, opts) {
  14360. if (!node)
  14361. return false;
  14362. const nodeType = node.type;
  14363. if (nodeType === "ConditionalExpression") {
  14364. if (typeof opts === "undefined") {
  14365. return true;
  14366. } else {
  14367. return (0, _shallowEqual.default)(node, opts);
  14368. }
  14369. }
  14370. return false;
  14371. }
  14372. function isContinueStatement(node, opts) {
  14373. if (!node)
  14374. return false;
  14375. const nodeType = node.type;
  14376. if (nodeType === "ContinueStatement") {
  14377. if (typeof opts === "undefined") {
  14378. return true;
  14379. } else {
  14380. return (0, _shallowEqual.default)(node, opts);
  14381. }
  14382. }
  14383. return false;
  14384. }
  14385. function isDebuggerStatement(node, opts) {
  14386. if (!node)
  14387. return false;
  14388. const nodeType = node.type;
  14389. if (nodeType === "DebuggerStatement") {
  14390. if (typeof opts === "undefined") {
  14391. return true;
  14392. } else {
  14393. return (0, _shallowEqual.default)(node, opts);
  14394. }
  14395. }
  14396. return false;
  14397. }
  14398. function isDoWhileStatement(node, opts) {
  14399. if (!node)
  14400. return false;
  14401. const nodeType = node.type;
  14402. if (nodeType === "DoWhileStatement") {
  14403. if (typeof opts === "undefined") {
  14404. return true;
  14405. } else {
  14406. return (0, _shallowEqual.default)(node, opts);
  14407. }
  14408. }
  14409. return false;
  14410. }
  14411. function isEmptyStatement(node, opts) {
  14412. if (!node)
  14413. return false;
  14414. const nodeType = node.type;
  14415. if (nodeType === "EmptyStatement") {
  14416. if (typeof opts === "undefined") {
  14417. return true;
  14418. } else {
  14419. return (0, _shallowEqual.default)(node, opts);
  14420. }
  14421. }
  14422. return false;
  14423. }
  14424. function isExpressionStatement2(node, opts) {
  14425. if (!node)
  14426. return false;
  14427. const nodeType = node.type;
  14428. if (nodeType === "ExpressionStatement") {
  14429. if (typeof opts === "undefined") {
  14430. return true;
  14431. } else {
  14432. return (0, _shallowEqual.default)(node, opts);
  14433. }
  14434. }
  14435. return false;
  14436. }
  14437. function isFile(node, opts) {
  14438. if (!node)
  14439. return false;
  14440. const nodeType = node.type;
  14441. if (nodeType === "File") {
  14442. if (typeof opts === "undefined") {
  14443. return true;
  14444. } else {
  14445. return (0, _shallowEqual.default)(node, opts);
  14446. }
  14447. }
  14448. return false;
  14449. }
  14450. function isForInStatement(node, opts) {
  14451. if (!node)
  14452. return false;
  14453. const nodeType = node.type;
  14454. if (nodeType === "ForInStatement") {
  14455. if (typeof opts === "undefined") {
  14456. return true;
  14457. } else {
  14458. return (0, _shallowEqual.default)(node, opts);
  14459. }
  14460. }
  14461. return false;
  14462. }
  14463. function isForStatement(node, opts) {
  14464. if (!node)
  14465. return false;
  14466. const nodeType = node.type;
  14467. if (nodeType === "ForStatement") {
  14468. if (typeof opts === "undefined") {
  14469. return true;
  14470. } else {
  14471. return (0, _shallowEqual.default)(node, opts);
  14472. }
  14473. }
  14474. return false;
  14475. }
  14476. function isFunctionDeclaration(node, opts) {
  14477. if (!node)
  14478. return false;
  14479. const nodeType = node.type;
  14480. if (nodeType === "FunctionDeclaration") {
  14481. if (typeof opts === "undefined") {
  14482. return true;
  14483. } else {
  14484. return (0, _shallowEqual.default)(node, opts);
  14485. }
  14486. }
  14487. return false;
  14488. }
  14489. function isFunctionExpression(node, opts) {
  14490. if (!node)
  14491. return false;
  14492. const nodeType = node.type;
  14493. if (nodeType === "FunctionExpression") {
  14494. if (typeof opts === "undefined") {
  14495. return true;
  14496. } else {
  14497. return (0, _shallowEqual.default)(node, opts);
  14498. }
  14499. }
  14500. return false;
  14501. }
  14502. function isIdentifier2(node, opts) {
  14503. if (!node)
  14504. return false;
  14505. const nodeType = node.type;
  14506. if (nodeType === "Identifier") {
  14507. if (typeof opts === "undefined") {
  14508. return true;
  14509. } else {
  14510. return (0, _shallowEqual.default)(node, opts);
  14511. }
  14512. }
  14513. return false;
  14514. }
  14515. function isIfStatement(node, opts) {
  14516. if (!node)
  14517. return false;
  14518. const nodeType = node.type;
  14519. if (nodeType === "IfStatement") {
  14520. if (typeof opts === "undefined") {
  14521. return true;
  14522. } else {
  14523. return (0, _shallowEqual.default)(node, opts);
  14524. }
  14525. }
  14526. return false;
  14527. }
  14528. function isLabeledStatement(node, opts) {
  14529. if (!node)
  14530. return false;
  14531. const nodeType = node.type;
  14532. if (nodeType === "LabeledStatement") {
  14533. if (typeof opts === "undefined") {
  14534. return true;
  14535. } else {
  14536. return (0, _shallowEqual.default)(node, opts);
  14537. }
  14538. }
  14539. return false;
  14540. }
  14541. function isStringLiteral2(node, opts) {
  14542. if (!node)
  14543. return false;
  14544. const nodeType = node.type;
  14545. if (nodeType === "StringLiteral") {
  14546. if (typeof opts === "undefined") {
  14547. return true;
  14548. } else {
  14549. return (0, _shallowEqual.default)(node, opts);
  14550. }
  14551. }
  14552. return false;
  14553. }
  14554. function isNumericLiteral(node, opts) {
  14555. if (!node)
  14556. return false;
  14557. const nodeType = node.type;
  14558. if (nodeType === "NumericLiteral") {
  14559. if (typeof opts === "undefined") {
  14560. return true;
  14561. } else {
  14562. return (0, _shallowEqual.default)(node, opts);
  14563. }
  14564. }
  14565. return false;
  14566. }
  14567. function isNullLiteral(node, opts) {
  14568. if (!node)
  14569. return false;
  14570. const nodeType = node.type;
  14571. if (nodeType === "NullLiteral") {
  14572. if (typeof opts === "undefined") {
  14573. return true;
  14574. } else {
  14575. return (0, _shallowEqual.default)(node, opts);
  14576. }
  14577. }
  14578. return false;
  14579. }
  14580. function isBooleanLiteral2(node, opts) {
  14581. if (!node)
  14582. return false;
  14583. const nodeType = node.type;
  14584. if (nodeType === "BooleanLiteral") {
  14585. if (typeof opts === "undefined") {
  14586. return true;
  14587. } else {
  14588. return (0, _shallowEqual.default)(node, opts);
  14589. }
  14590. }
  14591. return false;
  14592. }
  14593. function isRegExpLiteral(node, opts) {
  14594. if (!node)
  14595. return false;
  14596. const nodeType = node.type;
  14597. if (nodeType === "RegExpLiteral") {
  14598. if (typeof opts === "undefined") {
  14599. return true;
  14600. } else {
  14601. return (0, _shallowEqual.default)(node, opts);
  14602. }
  14603. }
  14604. return false;
  14605. }
  14606. function isLogicalExpression(node, opts) {
  14607. if (!node)
  14608. return false;
  14609. const nodeType = node.type;
  14610. if (nodeType === "LogicalExpression") {
  14611. if (typeof opts === "undefined") {
  14612. return true;
  14613. } else {
  14614. return (0, _shallowEqual.default)(node, opts);
  14615. }
  14616. }
  14617. return false;
  14618. }
  14619. function isMemberExpression(node, opts) {
  14620. if (!node)
  14621. return false;
  14622. const nodeType = node.type;
  14623. if (nodeType === "MemberExpression") {
  14624. if (typeof opts === "undefined") {
  14625. return true;
  14626. } else {
  14627. return (0, _shallowEqual.default)(node, opts);
  14628. }
  14629. }
  14630. return false;
  14631. }
  14632. function isNewExpression(node, opts) {
  14633. if (!node)
  14634. return false;
  14635. const nodeType = node.type;
  14636. if (nodeType === "NewExpression") {
  14637. if (typeof opts === "undefined") {
  14638. return true;
  14639. } else {
  14640. return (0, _shallowEqual.default)(node, opts);
  14641. }
  14642. }
  14643. return false;
  14644. }
  14645. function isProgram(node, opts) {
  14646. if (!node)
  14647. return false;
  14648. const nodeType = node.type;
  14649. if (nodeType === "Program") {
  14650. if (typeof opts === "undefined") {
  14651. return true;
  14652. } else {
  14653. return (0, _shallowEqual.default)(node, opts);
  14654. }
  14655. }
  14656. return false;
  14657. }
  14658. function isObjectExpression(node, opts) {
  14659. if (!node)
  14660. return false;
  14661. const nodeType = node.type;
  14662. if (nodeType === "ObjectExpression") {
  14663. if (typeof opts === "undefined") {
  14664. return true;
  14665. } else {
  14666. return (0, _shallowEqual.default)(node, opts);
  14667. }
  14668. }
  14669. return false;
  14670. }
  14671. function isObjectMethod(node, opts) {
  14672. if (!node)
  14673. return false;
  14674. const nodeType = node.type;
  14675. if (nodeType === "ObjectMethod") {
  14676. if (typeof opts === "undefined") {
  14677. return true;
  14678. } else {
  14679. return (0, _shallowEqual.default)(node, opts);
  14680. }
  14681. }
  14682. return false;
  14683. }
  14684. function isObjectProperty(node, opts) {
  14685. if (!node)
  14686. return false;
  14687. const nodeType = node.type;
  14688. if (nodeType === "ObjectProperty") {
  14689. if (typeof opts === "undefined") {
  14690. return true;
  14691. } else {
  14692. return (0, _shallowEqual.default)(node, opts);
  14693. }
  14694. }
  14695. return false;
  14696. }
  14697. function isRestElement(node, opts) {
  14698. if (!node)
  14699. return false;
  14700. const nodeType = node.type;
  14701. if (nodeType === "RestElement") {
  14702. if (typeof opts === "undefined") {
  14703. return true;
  14704. } else {
  14705. return (0, _shallowEqual.default)(node, opts);
  14706. }
  14707. }
  14708. return false;
  14709. }
  14710. function isReturnStatement(node, opts) {
  14711. if (!node)
  14712. return false;
  14713. const nodeType = node.type;
  14714. if (nodeType === "ReturnStatement") {
  14715. if (typeof opts === "undefined") {
  14716. return true;
  14717. } else {
  14718. return (0, _shallowEqual.default)(node, opts);
  14719. }
  14720. }
  14721. return false;
  14722. }
  14723. function isSequenceExpression(node, opts) {
  14724. if (!node)
  14725. return false;
  14726. const nodeType = node.type;
  14727. if (nodeType === "SequenceExpression") {
  14728. if (typeof opts === "undefined") {
  14729. return true;
  14730. } else {
  14731. return (0, _shallowEqual.default)(node, opts);
  14732. }
  14733. }
  14734. return false;
  14735. }
  14736. function isParenthesizedExpression(node, opts) {
  14737. if (!node)
  14738. return false;
  14739. const nodeType = node.type;
  14740. if (nodeType === "ParenthesizedExpression") {
  14741. if (typeof opts === "undefined") {
  14742. return true;
  14743. } else {
  14744. return (0, _shallowEqual.default)(node, opts);
  14745. }
  14746. }
  14747. return false;
  14748. }
  14749. function isSwitchCase(node, opts) {
  14750. if (!node)
  14751. return false;
  14752. const nodeType = node.type;
  14753. if (nodeType === "SwitchCase") {
  14754. if (typeof opts === "undefined") {
  14755. return true;
  14756. } else {
  14757. return (0, _shallowEqual.default)(node, opts);
  14758. }
  14759. }
  14760. return false;
  14761. }
  14762. function isSwitchStatement(node, opts) {
  14763. if (!node)
  14764. return false;
  14765. const nodeType = node.type;
  14766. if (nodeType === "SwitchStatement") {
  14767. if (typeof opts === "undefined") {
  14768. return true;
  14769. } else {
  14770. return (0, _shallowEqual.default)(node, opts);
  14771. }
  14772. }
  14773. return false;
  14774. }
  14775. function isThisExpression(node, opts) {
  14776. if (!node)
  14777. return false;
  14778. const nodeType = node.type;
  14779. if (nodeType === "ThisExpression") {
  14780. if (typeof opts === "undefined") {
  14781. return true;
  14782. } else {
  14783. return (0, _shallowEqual.default)(node, opts);
  14784. }
  14785. }
  14786. return false;
  14787. }
  14788. function isThrowStatement(node, opts) {
  14789. if (!node)
  14790. return false;
  14791. const nodeType = node.type;
  14792. if (nodeType === "ThrowStatement") {
  14793. if (typeof opts === "undefined") {
  14794. return true;
  14795. } else {
  14796. return (0, _shallowEqual.default)(node, opts);
  14797. }
  14798. }
  14799. return false;
  14800. }
  14801. function isTryStatement(node, opts) {
  14802. if (!node)
  14803. return false;
  14804. const nodeType = node.type;
  14805. if (nodeType === "TryStatement") {
  14806. if (typeof opts === "undefined") {
  14807. return true;
  14808. } else {
  14809. return (0, _shallowEqual.default)(node, opts);
  14810. }
  14811. }
  14812. return false;
  14813. }
  14814. function isUnaryExpression(node, opts) {
  14815. if (!node)
  14816. return false;
  14817. const nodeType = node.type;
  14818. if (nodeType === "UnaryExpression") {
  14819. if (typeof opts === "undefined") {
  14820. return true;
  14821. } else {
  14822. return (0, _shallowEqual.default)(node, opts);
  14823. }
  14824. }
  14825. return false;
  14826. }
  14827. function isUpdateExpression(node, opts) {
  14828. if (!node)
  14829. return false;
  14830. const nodeType = node.type;
  14831. if (nodeType === "UpdateExpression") {
  14832. if (typeof opts === "undefined") {
  14833. return true;
  14834. } else {
  14835. return (0, _shallowEqual.default)(node, opts);
  14836. }
  14837. }
  14838. return false;
  14839. }
  14840. function isVariableDeclaration(node, opts) {
  14841. if (!node)
  14842. return false;
  14843. const nodeType = node.type;
  14844. if (nodeType === "VariableDeclaration") {
  14845. if (typeof opts === "undefined") {
  14846. return true;
  14847. } else {
  14848. return (0, _shallowEqual.default)(node, opts);
  14849. }
  14850. }
  14851. return false;
  14852. }
  14853. function isVariableDeclarator(node, opts) {
  14854. if (!node)
  14855. return false;
  14856. const nodeType = node.type;
  14857. if (nodeType === "VariableDeclarator") {
  14858. if (typeof opts === "undefined") {
  14859. return true;
  14860. } else {
  14861. return (0, _shallowEqual.default)(node, opts);
  14862. }
  14863. }
  14864. return false;
  14865. }
  14866. function isWhileStatement(node, opts) {
  14867. if (!node)
  14868. return false;
  14869. const nodeType = node.type;
  14870. if (nodeType === "WhileStatement") {
  14871. if (typeof opts === "undefined") {
  14872. return true;
  14873. } else {
  14874. return (0, _shallowEqual.default)(node, opts);
  14875. }
  14876. }
  14877. return false;
  14878. }
  14879. function isWithStatement(node, opts) {
  14880. if (!node)
  14881. return false;
  14882. const nodeType = node.type;
  14883. if (nodeType === "WithStatement") {
  14884. if (typeof opts === "undefined") {
  14885. return true;
  14886. } else {
  14887. return (0, _shallowEqual.default)(node, opts);
  14888. }
  14889. }
  14890. return false;
  14891. }
  14892. function isAssignmentPattern(node, opts) {
  14893. if (!node)
  14894. return false;
  14895. const nodeType = node.type;
  14896. if (nodeType === "AssignmentPattern") {
  14897. if (typeof opts === "undefined") {
  14898. return true;
  14899. } else {
  14900. return (0, _shallowEqual.default)(node, opts);
  14901. }
  14902. }
  14903. return false;
  14904. }
  14905. function isArrayPattern(node, opts) {
  14906. if (!node)
  14907. return false;
  14908. const nodeType = node.type;
  14909. if (nodeType === "ArrayPattern") {
  14910. if (typeof opts === "undefined") {
  14911. return true;
  14912. } else {
  14913. return (0, _shallowEqual.default)(node, opts);
  14914. }
  14915. }
  14916. return false;
  14917. }
  14918. function isArrowFunctionExpression(node, opts) {
  14919. if (!node)
  14920. return false;
  14921. const nodeType = node.type;
  14922. if (nodeType === "ArrowFunctionExpression") {
  14923. if (typeof opts === "undefined") {
  14924. return true;
  14925. } else {
  14926. return (0, _shallowEqual.default)(node, opts);
  14927. }
  14928. }
  14929. return false;
  14930. }
  14931. function isClassBody(node, opts) {
  14932. if (!node)
  14933. return false;
  14934. const nodeType = node.type;
  14935. if (nodeType === "ClassBody") {
  14936. if (typeof opts === "undefined") {
  14937. return true;
  14938. } else {
  14939. return (0, _shallowEqual.default)(node, opts);
  14940. }
  14941. }
  14942. return false;
  14943. }
  14944. function isClassExpression(node, opts) {
  14945. if (!node)
  14946. return false;
  14947. const nodeType = node.type;
  14948. if (nodeType === "ClassExpression") {
  14949. if (typeof opts === "undefined") {
  14950. return true;
  14951. } else {
  14952. return (0, _shallowEqual.default)(node, opts);
  14953. }
  14954. }
  14955. return false;
  14956. }
  14957. function isClassDeclaration(node, opts) {
  14958. if (!node)
  14959. return false;
  14960. const nodeType = node.type;
  14961. if (nodeType === "ClassDeclaration") {
  14962. if (typeof opts === "undefined") {
  14963. return true;
  14964. } else {
  14965. return (0, _shallowEqual.default)(node, opts);
  14966. }
  14967. }
  14968. return false;
  14969. }
  14970. function isExportAllDeclaration(node, opts) {
  14971. if (!node)
  14972. return false;
  14973. const nodeType = node.type;
  14974. if (nodeType === "ExportAllDeclaration") {
  14975. if (typeof opts === "undefined") {
  14976. return true;
  14977. } else {
  14978. return (0, _shallowEqual.default)(node, opts);
  14979. }
  14980. }
  14981. return false;
  14982. }
  14983. function isExportDefaultDeclaration(node, opts) {
  14984. if (!node)
  14985. return false;
  14986. const nodeType = node.type;
  14987. if (nodeType === "ExportDefaultDeclaration") {
  14988. if (typeof opts === "undefined") {
  14989. return true;
  14990. } else {
  14991. return (0, _shallowEqual.default)(node, opts);
  14992. }
  14993. }
  14994. return false;
  14995. }
  14996. function isExportNamedDeclaration(node, opts) {
  14997. if (!node)
  14998. return false;
  14999. const nodeType = node.type;
  15000. if (nodeType === "ExportNamedDeclaration") {
  15001. if (typeof opts === "undefined") {
  15002. return true;
  15003. } else {
  15004. return (0, _shallowEqual.default)(node, opts);
  15005. }
  15006. }
  15007. return false;
  15008. }
  15009. function isExportSpecifier(node, opts) {
  15010. if (!node)
  15011. return false;
  15012. const nodeType = node.type;
  15013. if (nodeType === "ExportSpecifier") {
  15014. if (typeof opts === "undefined") {
  15015. return true;
  15016. } else {
  15017. return (0, _shallowEqual.default)(node, opts);
  15018. }
  15019. }
  15020. return false;
  15021. }
  15022. function isForOfStatement(node, opts) {
  15023. if (!node)
  15024. return false;
  15025. const nodeType = node.type;
  15026. if (nodeType === "ForOfStatement") {
  15027. if (typeof opts === "undefined") {
  15028. return true;
  15029. } else {
  15030. return (0, _shallowEqual.default)(node, opts);
  15031. }
  15032. }
  15033. return false;
  15034. }
  15035. function isImportDeclaration(node, opts) {
  15036. if (!node)
  15037. return false;
  15038. const nodeType = node.type;
  15039. if (nodeType === "ImportDeclaration") {
  15040. if (typeof opts === "undefined") {
  15041. return true;
  15042. } else {
  15043. return (0, _shallowEqual.default)(node, opts);
  15044. }
  15045. }
  15046. return false;
  15047. }
  15048. function isImportDefaultSpecifier(node, opts) {
  15049. if (!node)
  15050. return false;
  15051. const nodeType = node.type;
  15052. if (nodeType === "ImportDefaultSpecifier") {
  15053. if (typeof opts === "undefined") {
  15054. return true;
  15055. } else {
  15056. return (0, _shallowEqual.default)(node, opts);
  15057. }
  15058. }
  15059. return false;
  15060. }
  15061. function isImportNamespaceSpecifier(node, opts) {
  15062. if (!node)
  15063. return false;
  15064. const nodeType = node.type;
  15065. if (nodeType === "ImportNamespaceSpecifier") {
  15066. if (typeof opts === "undefined") {
  15067. return true;
  15068. } else {
  15069. return (0, _shallowEqual.default)(node, opts);
  15070. }
  15071. }
  15072. return false;
  15073. }
  15074. function isImportSpecifier(node, opts) {
  15075. if (!node)
  15076. return false;
  15077. const nodeType = node.type;
  15078. if (nodeType === "ImportSpecifier") {
  15079. if (typeof opts === "undefined") {
  15080. return true;
  15081. } else {
  15082. return (0, _shallowEqual.default)(node, opts);
  15083. }
  15084. }
  15085. return false;
  15086. }
  15087. function isMetaProperty(node, opts) {
  15088. if (!node)
  15089. return false;
  15090. const nodeType = node.type;
  15091. if (nodeType === "MetaProperty") {
  15092. if (typeof opts === "undefined") {
  15093. return true;
  15094. } else {
  15095. return (0, _shallowEqual.default)(node, opts);
  15096. }
  15097. }
  15098. return false;
  15099. }
  15100. function isClassMethod(node, opts) {
  15101. if (!node)
  15102. return false;
  15103. const nodeType = node.type;
  15104. if (nodeType === "ClassMethod") {
  15105. if (typeof opts === "undefined") {
  15106. return true;
  15107. } else {
  15108. return (0, _shallowEqual.default)(node, opts);
  15109. }
  15110. }
  15111. return false;
  15112. }
  15113. function isObjectPattern(node, opts) {
  15114. if (!node)
  15115. return false;
  15116. const nodeType = node.type;
  15117. if (nodeType === "ObjectPattern") {
  15118. if (typeof opts === "undefined") {
  15119. return true;
  15120. } else {
  15121. return (0, _shallowEqual.default)(node, opts);
  15122. }
  15123. }
  15124. return false;
  15125. }
  15126. function isSpreadElement(node, opts) {
  15127. if (!node)
  15128. return false;
  15129. const nodeType = node.type;
  15130. if (nodeType === "SpreadElement") {
  15131. if (typeof opts === "undefined") {
  15132. return true;
  15133. } else {
  15134. return (0, _shallowEqual.default)(node, opts);
  15135. }
  15136. }
  15137. return false;
  15138. }
  15139. function isSuper(node, opts) {
  15140. if (!node)
  15141. return false;
  15142. const nodeType = node.type;
  15143. if (nodeType === "Super") {
  15144. if (typeof opts === "undefined") {
  15145. return true;
  15146. } else {
  15147. return (0, _shallowEqual.default)(node, opts);
  15148. }
  15149. }
  15150. return false;
  15151. }
  15152. function isTaggedTemplateExpression(node, opts) {
  15153. if (!node)
  15154. return false;
  15155. const nodeType = node.type;
  15156. if (nodeType === "TaggedTemplateExpression") {
  15157. if (typeof opts === "undefined") {
  15158. return true;
  15159. } else {
  15160. return (0, _shallowEqual.default)(node, opts);
  15161. }
  15162. }
  15163. return false;
  15164. }
  15165. function isTemplateElement(node, opts) {
  15166. if (!node)
  15167. return false;
  15168. const nodeType = node.type;
  15169. if (nodeType === "TemplateElement") {
  15170. if (typeof opts === "undefined") {
  15171. return true;
  15172. } else {
  15173. return (0, _shallowEqual.default)(node, opts);
  15174. }
  15175. }
  15176. return false;
  15177. }
  15178. function isTemplateLiteral(node, opts) {
  15179. if (!node)
  15180. return false;
  15181. const nodeType = node.type;
  15182. if (nodeType === "TemplateLiteral") {
  15183. if (typeof opts === "undefined") {
  15184. return true;
  15185. } else {
  15186. return (0, _shallowEqual.default)(node, opts);
  15187. }
  15188. }
  15189. return false;
  15190. }
  15191. function isYieldExpression(node, opts) {
  15192. if (!node)
  15193. return false;
  15194. const nodeType = node.type;
  15195. if (nodeType === "YieldExpression") {
  15196. if (typeof opts === "undefined") {
  15197. return true;
  15198. } else {
  15199. return (0, _shallowEqual.default)(node, opts);
  15200. }
  15201. }
  15202. return false;
  15203. }
  15204. function isAwaitExpression(node, opts) {
  15205. if (!node)
  15206. return false;
  15207. const nodeType = node.type;
  15208. if (nodeType === "AwaitExpression") {
  15209. if (typeof opts === "undefined") {
  15210. return true;
  15211. } else {
  15212. return (0, _shallowEqual.default)(node, opts);
  15213. }
  15214. }
  15215. return false;
  15216. }
  15217. function isImport(node, opts) {
  15218. if (!node)
  15219. return false;
  15220. const nodeType = node.type;
  15221. if (nodeType === "Import") {
  15222. if (typeof opts === "undefined") {
  15223. return true;
  15224. } else {
  15225. return (0, _shallowEqual.default)(node, opts);
  15226. }
  15227. }
  15228. return false;
  15229. }
  15230. function isBigIntLiteral(node, opts) {
  15231. if (!node)
  15232. return false;
  15233. const nodeType = node.type;
  15234. if (nodeType === "BigIntLiteral") {
  15235. if (typeof opts === "undefined") {
  15236. return true;
  15237. } else {
  15238. return (0, _shallowEqual.default)(node, opts);
  15239. }
  15240. }
  15241. return false;
  15242. }
  15243. function isExportNamespaceSpecifier(node, opts) {
  15244. if (!node)
  15245. return false;
  15246. const nodeType = node.type;
  15247. if (nodeType === "ExportNamespaceSpecifier") {
  15248. if (typeof opts === "undefined") {
  15249. return true;
  15250. } else {
  15251. return (0, _shallowEqual.default)(node, opts);
  15252. }
  15253. }
  15254. return false;
  15255. }
  15256. function isOptionalMemberExpression(node, opts) {
  15257. if (!node)
  15258. return false;
  15259. const nodeType = node.type;
  15260. if (nodeType === "OptionalMemberExpression") {
  15261. if (typeof opts === "undefined") {
  15262. return true;
  15263. } else {
  15264. return (0, _shallowEqual.default)(node, opts);
  15265. }
  15266. }
  15267. return false;
  15268. }
  15269. function isOptionalCallExpression(node, opts) {
  15270. if (!node)
  15271. return false;
  15272. const nodeType = node.type;
  15273. if (nodeType === "OptionalCallExpression") {
  15274. if (typeof opts === "undefined") {
  15275. return true;
  15276. } else {
  15277. return (0, _shallowEqual.default)(node, opts);
  15278. }
  15279. }
  15280. return false;
  15281. }
  15282. function isAnyTypeAnnotation(node, opts) {
  15283. if (!node)
  15284. return false;
  15285. const nodeType = node.type;
  15286. if (nodeType === "AnyTypeAnnotation") {
  15287. if (typeof opts === "undefined") {
  15288. return true;
  15289. } else {
  15290. return (0, _shallowEqual.default)(node, opts);
  15291. }
  15292. }
  15293. return false;
  15294. }
  15295. function isArrayTypeAnnotation(node, opts) {
  15296. if (!node)
  15297. return false;
  15298. const nodeType = node.type;
  15299. if (nodeType === "ArrayTypeAnnotation") {
  15300. if (typeof opts === "undefined") {
  15301. return true;
  15302. } else {
  15303. return (0, _shallowEqual.default)(node, opts);
  15304. }
  15305. }
  15306. return false;
  15307. }
  15308. function isBooleanTypeAnnotation(node, opts) {
  15309. if (!node)
  15310. return false;
  15311. const nodeType = node.type;
  15312. if (nodeType === "BooleanTypeAnnotation") {
  15313. if (typeof opts === "undefined") {
  15314. return true;
  15315. } else {
  15316. return (0, _shallowEqual.default)(node, opts);
  15317. }
  15318. }
  15319. return false;
  15320. }
  15321. function isBooleanLiteralTypeAnnotation(node, opts) {
  15322. if (!node)
  15323. return false;
  15324. const nodeType = node.type;
  15325. if (nodeType === "BooleanLiteralTypeAnnotation") {
  15326. if (typeof opts === "undefined") {
  15327. return true;
  15328. } else {
  15329. return (0, _shallowEqual.default)(node, opts);
  15330. }
  15331. }
  15332. return false;
  15333. }
  15334. function isNullLiteralTypeAnnotation(node, opts) {
  15335. if (!node)
  15336. return false;
  15337. const nodeType = node.type;
  15338. if (nodeType === "NullLiteralTypeAnnotation") {
  15339. if (typeof opts === "undefined") {
  15340. return true;
  15341. } else {
  15342. return (0, _shallowEqual.default)(node, opts);
  15343. }
  15344. }
  15345. return false;
  15346. }
  15347. function isClassImplements(node, opts) {
  15348. if (!node)
  15349. return false;
  15350. const nodeType = node.type;
  15351. if (nodeType === "ClassImplements") {
  15352. if (typeof opts === "undefined") {
  15353. return true;
  15354. } else {
  15355. return (0, _shallowEqual.default)(node, opts);
  15356. }
  15357. }
  15358. return false;
  15359. }
  15360. function isDeclareClass(node, opts) {
  15361. if (!node)
  15362. return false;
  15363. const nodeType = node.type;
  15364. if (nodeType === "DeclareClass") {
  15365. if (typeof opts === "undefined") {
  15366. return true;
  15367. } else {
  15368. return (0, _shallowEqual.default)(node, opts);
  15369. }
  15370. }
  15371. return false;
  15372. }
  15373. function isDeclareFunction(node, opts) {
  15374. if (!node)
  15375. return false;
  15376. const nodeType = node.type;
  15377. if (nodeType === "DeclareFunction") {
  15378. if (typeof opts === "undefined") {
  15379. return true;
  15380. } else {
  15381. return (0, _shallowEqual.default)(node, opts);
  15382. }
  15383. }
  15384. return false;
  15385. }
  15386. function isDeclareInterface(node, opts) {
  15387. if (!node)
  15388. return false;
  15389. const nodeType = node.type;
  15390. if (nodeType === "DeclareInterface") {
  15391. if (typeof opts === "undefined") {
  15392. return true;
  15393. } else {
  15394. return (0, _shallowEqual.default)(node, opts);
  15395. }
  15396. }
  15397. return false;
  15398. }
  15399. function isDeclareModule(node, opts) {
  15400. if (!node)
  15401. return false;
  15402. const nodeType = node.type;
  15403. if (nodeType === "DeclareModule") {
  15404. if (typeof opts === "undefined") {
  15405. return true;
  15406. } else {
  15407. return (0, _shallowEqual.default)(node, opts);
  15408. }
  15409. }
  15410. return false;
  15411. }
  15412. function isDeclareModuleExports(node, opts) {
  15413. if (!node)
  15414. return false;
  15415. const nodeType = node.type;
  15416. if (nodeType === "DeclareModuleExports") {
  15417. if (typeof opts === "undefined") {
  15418. return true;
  15419. } else {
  15420. return (0, _shallowEqual.default)(node, opts);
  15421. }
  15422. }
  15423. return false;
  15424. }
  15425. function isDeclareTypeAlias(node, opts) {
  15426. if (!node)
  15427. return false;
  15428. const nodeType = node.type;
  15429. if (nodeType === "DeclareTypeAlias") {
  15430. if (typeof opts === "undefined") {
  15431. return true;
  15432. } else {
  15433. return (0, _shallowEqual.default)(node, opts);
  15434. }
  15435. }
  15436. return false;
  15437. }
  15438. function isDeclareOpaqueType(node, opts) {
  15439. if (!node)
  15440. return false;
  15441. const nodeType = node.type;
  15442. if (nodeType === "DeclareOpaqueType") {
  15443. if (typeof opts === "undefined") {
  15444. return true;
  15445. } else {
  15446. return (0, _shallowEqual.default)(node, opts);
  15447. }
  15448. }
  15449. return false;
  15450. }
  15451. function isDeclareVariable(node, opts) {
  15452. if (!node)
  15453. return false;
  15454. const nodeType = node.type;
  15455. if (nodeType === "DeclareVariable") {
  15456. if (typeof opts === "undefined") {
  15457. return true;
  15458. } else {
  15459. return (0, _shallowEqual.default)(node, opts);
  15460. }
  15461. }
  15462. return false;
  15463. }
  15464. function isDeclareExportDeclaration(node, opts) {
  15465. if (!node)
  15466. return false;
  15467. const nodeType = node.type;
  15468. if (nodeType === "DeclareExportDeclaration") {
  15469. if (typeof opts === "undefined") {
  15470. return true;
  15471. } else {
  15472. return (0, _shallowEqual.default)(node, opts);
  15473. }
  15474. }
  15475. return false;
  15476. }
  15477. function isDeclareExportAllDeclaration(node, opts) {
  15478. if (!node)
  15479. return false;
  15480. const nodeType = node.type;
  15481. if (nodeType === "DeclareExportAllDeclaration") {
  15482. if (typeof opts === "undefined") {
  15483. return true;
  15484. } else {
  15485. return (0, _shallowEqual.default)(node, opts);
  15486. }
  15487. }
  15488. return false;
  15489. }
  15490. function isDeclaredPredicate(node, opts) {
  15491. if (!node)
  15492. return false;
  15493. const nodeType = node.type;
  15494. if (nodeType === "DeclaredPredicate") {
  15495. if (typeof opts === "undefined") {
  15496. return true;
  15497. } else {
  15498. return (0, _shallowEqual.default)(node, opts);
  15499. }
  15500. }
  15501. return false;
  15502. }
  15503. function isExistsTypeAnnotation(node, opts) {
  15504. if (!node)
  15505. return false;
  15506. const nodeType = node.type;
  15507. if (nodeType === "ExistsTypeAnnotation") {
  15508. if (typeof opts === "undefined") {
  15509. return true;
  15510. } else {
  15511. return (0, _shallowEqual.default)(node, opts);
  15512. }
  15513. }
  15514. return false;
  15515. }
  15516. function isFunctionTypeAnnotation(node, opts) {
  15517. if (!node)
  15518. return false;
  15519. const nodeType = node.type;
  15520. if (nodeType === "FunctionTypeAnnotation") {
  15521. if (typeof opts === "undefined") {
  15522. return true;
  15523. } else {
  15524. return (0, _shallowEqual.default)(node, opts);
  15525. }
  15526. }
  15527. return false;
  15528. }
  15529. function isFunctionTypeParam(node, opts) {
  15530. if (!node)
  15531. return false;
  15532. const nodeType = node.type;
  15533. if (nodeType === "FunctionTypeParam") {
  15534. if (typeof opts === "undefined") {
  15535. return true;
  15536. } else {
  15537. return (0, _shallowEqual.default)(node, opts);
  15538. }
  15539. }
  15540. return false;
  15541. }
  15542. function isGenericTypeAnnotation(node, opts) {
  15543. if (!node)
  15544. return false;
  15545. const nodeType = node.type;
  15546. if (nodeType === "GenericTypeAnnotation") {
  15547. if (typeof opts === "undefined") {
  15548. return true;
  15549. } else {
  15550. return (0, _shallowEqual.default)(node, opts);
  15551. }
  15552. }
  15553. return false;
  15554. }
  15555. function isInferredPredicate(node, opts) {
  15556. if (!node)
  15557. return false;
  15558. const nodeType = node.type;
  15559. if (nodeType === "InferredPredicate") {
  15560. if (typeof opts === "undefined") {
  15561. return true;
  15562. } else {
  15563. return (0, _shallowEqual.default)(node, opts);
  15564. }
  15565. }
  15566. return false;
  15567. }
  15568. function isInterfaceExtends(node, opts) {
  15569. if (!node)
  15570. return false;
  15571. const nodeType = node.type;
  15572. if (nodeType === "InterfaceExtends") {
  15573. if (typeof opts === "undefined") {
  15574. return true;
  15575. } else {
  15576. return (0, _shallowEqual.default)(node, opts);
  15577. }
  15578. }
  15579. return false;
  15580. }
  15581. function isInterfaceDeclaration(node, opts) {
  15582. if (!node)
  15583. return false;
  15584. const nodeType = node.type;
  15585. if (nodeType === "InterfaceDeclaration") {
  15586. if (typeof opts === "undefined") {
  15587. return true;
  15588. } else {
  15589. return (0, _shallowEqual.default)(node, opts);
  15590. }
  15591. }
  15592. return false;
  15593. }
  15594. function isInterfaceTypeAnnotation(node, opts) {
  15595. if (!node)
  15596. return false;
  15597. const nodeType = node.type;
  15598. if (nodeType === "InterfaceTypeAnnotation") {
  15599. if (typeof opts === "undefined") {
  15600. return true;
  15601. } else {
  15602. return (0, _shallowEqual.default)(node, opts);
  15603. }
  15604. }
  15605. return false;
  15606. }
  15607. function isIntersectionTypeAnnotation(node, opts) {
  15608. if (!node)
  15609. return false;
  15610. const nodeType = node.type;
  15611. if (nodeType === "IntersectionTypeAnnotation") {
  15612. if (typeof opts === "undefined") {
  15613. return true;
  15614. } else {
  15615. return (0, _shallowEqual.default)(node, opts);
  15616. }
  15617. }
  15618. return false;
  15619. }
  15620. function isMixedTypeAnnotation(node, opts) {
  15621. if (!node)
  15622. return false;
  15623. const nodeType = node.type;
  15624. if (nodeType === "MixedTypeAnnotation") {
  15625. if (typeof opts === "undefined") {
  15626. return true;
  15627. } else {
  15628. return (0, _shallowEqual.default)(node, opts);
  15629. }
  15630. }
  15631. return false;
  15632. }
  15633. function isEmptyTypeAnnotation(node, opts) {
  15634. if (!node)
  15635. return false;
  15636. const nodeType = node.type;
  15637. if (nodeType === "EmptyTypeAnnotation") {
  15638. if (typeof opts === "undefined") {
  15639. return true;
  15640. } else {
  15641. return (0, _shallowEqual.default)(node, opts);
  15642. }
  15643. }
  15644. return false;
  15645. }
  15646. function isNullableTypeAnnotation(node, opts) {
  15647. if (!node)
  15648. return false;
  15649. const nodeType = node.type;
  15650. if (nodeType === "NullableTypeAnnotation") {
  15651. if (typeof opts === "undefined") {
  15652. return true;
  15653. } else {
  15654. return (0, _shallowEqual.default)(node, opts);
  15655. }
  15656. }
  15657. return false;
  15658. }
  15659. function isNumberLiteralTypeAnnotation(node, opts) {
  15660. if (!node)
  15661. return false;
  15662. const nodeType = node.type;
  15663. if (nodeType === "NumberLiteralTypeAnnotation") {
  15664. if (typeof opts === "undefined") {
  15665. return true;
  15666. } else {
  15667. return (0, _shallowEqual.default)(node, opts);
  15668. }
  15669. }
  15670. return false;
  15671. }
  15672. function isNumberTypeAnnotation(node, opts) {
  15673. if (!node)
  15674. return false;
  15675. const nodeType = node.type;
  15676. if (nodeType === "NumberTypeAnnotation") {
  15677. if (typeof opts === "undefined") {
  15678. return true;
  15679. } else {
  15680. return (0, _shallowEqual.default)(node, opts);
  15681. }
  15682. }
  15683. return false;
  15684. }
  15685. function isObjectTypeAnnotation(node, opts) {
  15686. if (!node)
  15687. return false;
  15688. const nodeType = node.type;
  15689. if (nodeType === "ObjectTypeAnnotation") {
  15690. if (typeof opts === "undefined") {
  15691. return true;
  15692. } else {
  15693. return (0, _shallowEqual.default)(node, opts);
  15694. }
  15695. }
  15696. return false;
  15697. }
  15698. function isObjectTypeInternalSlot(node, opts) {
  15699. if (!node)
  15700. return false;
  15701. const nodeType = node.type;
  15702. if (nodeType === "ObjectTypeInternalSlot") {
  15703. if (typeof opts === "undefined") {
  15704. return true;
  15705. } else {
  15706. return (0, _shallowEqual.default)(node, opts);
  15707. }
  15708. }
  15709. return false;
  15710. }
  15711. function isObjectTypeCallProperty(node, opts) {
  15712. if (!node)
  15713. return false;
  15714. const nodeType = node.type;
  15715. if (nodeType === "ObjectTypeCallProperty") {
  15716. if (typeof opts === "undefined") {
  15717. return true;
  15718. } else {
  15719. return (0, _shallowEqual.default)(node, opts);
  15720. }
  15721. }
  15722. return false;
  15723. }
  15724. function isObjectTypeIndexer(node, opts) {
  15725. if (!node)
  15726. return false;
  15727. const nodeType = node.type;
  15728. if (nodeType === "ObjectTypeIndexer") {
  15729. if (typeof opts === "undefined") {
  15730. return true;
  15731. } else {
  15732. return (0, _shallowEqual.default)(node, opts);
  15733. }
  15734. }
  15735. return false;
  15736. }
  15737. function isObjectTypeProperty(node, opts) {
  15738. if (!node)
  15739. return false;
  15740. const nodeType = node.type;
  15741. if (nodeType === "ObjectTypeProperty") {
  15742. if (typeof opts === "undefined") {
  15743. return true;
  15744. } else {
  15745. return (0, _shallowEqual.default)(node, opts);
  15746. }
  15747. }
  15748. return false;
  15749. }
  15750. function isObjectTypeSpreadProperty(node, opts) {
  15751. if (!node)
  15752. return false;
  15753. const nodeType = node.type;
  15754. if (nodeType === "ObjectTypeSpreadProperty") {
  15755. if (typeof opts === "undefined") {
  15756. return true;
  15757. } else {
  15758. return (0, _shallowEqual.default)(node, opts);
  15759. }
  15760. }
  15761. return false;
  15762. }
  15763. function isOpaqueType(node, opts) {
  15764. if (!node)
  15765. return false;
  15766. const nodeType = node.type;
  15767. if (nodeType === "OpaqueType") {
  15768. if (typeof opts === "undefined") {
  15769. return true;
  15770. } else {
  15771. return (0, _shallowEqual.default)(node, opts);
  15772. }
  15773. }
  15774. return false;
  15775. }
  15776. function isQualifiedTypeIdentifier(node, opts) {
  15777. if (!node)
  15778. return false;
  15779. const nodeType = node.type;
  15780. if (nodeType === "QualifiedTypeIdentifier") {
  15781. if (typeof opts === "undefined") {
  15782. return true;
  15783. } else {
  15784. return (0, _shallowEqual.default)(node, opts);
  15785. }
  15786. }
  15787. return false;
  15788. }
  15789. function isStringLiteralTypeAnnotation(node, opts) {
  15790. if (!node)
  15791. return false;
  15792. const nodeType = node.type;
  15793. if (nodeType === "StringLiteralTypeAnnotation") {
  15794. if (typeof opts === "undefined") {
  15795. return true;
  15796. } else {
  15797. return (0, _shallowEqual.default)(node, opts);
  15798. }
  15799. }
  15800. return false;
  15801. }
  15802. function isStringTypeAnnotation(node, opts) {
  15803. if (!node)
  15804. return false;
  15805. const nodeType = node.type;
  15806. if (nodeType === "StringTypeAnnotation") {
  15807. if (typeof opts === "undefined") {
  15808. return true;
  15809. } else {
  15810. return (0, _shallowEqual.default)(node, opts);
  15811. }
  15812. }
  15813. return false;
  15814. }
  15815. function isSymbolTypeAnnotation(node, opts) {
  15816. if (!node)
  15817. return false;
  15818. const nodeType = node.type;
  15819. if (nodeType === "SymbolTypeAnnotation") {
  15820. if (typeof opts === "undefined") {
  15821. return true;
  15822. } else {
  15823. return (0, _shallowEqual.default)(node, opts);
  15824. }
  15825. }
  15826. return false;
  15827. }
  15828. function isThisTypeAnnotation(node, opts) {
  15829. if (!node)
  15830. return false;
  15831. const nodeType = node.type;
  15832. if (nodeType === "ThisTypeAnnotation") {
  15833. if (typeof opts === "undefined") {
  15834. return true;
  15835. } else {
  15836. return (0, _shallowEqual.default)(node, opts);
  15837. }
  15838. }
  15839. return false;
  15840. }
  15841. function isTupleTypeAnnotation(node, opts) {
  15842. if (!node)
  15843. return false;
  15844. const nodeType = node.type;
  15845. if (nodeType === "TupleTypeAnnotation") {
  15846. if (typeof opts === "undefined") {
  15847. return true;
  15848. } else {
  15849. return (0, _shallowEqual.default)(node, opts);
  15850. }
  15851. }
  15852. return false;
  15853. }
  15854. function isTypeofTypeAnnotation(node, opts) {
  15855. if (!node)
  15856. return false;
  15857. const nodeType = node.type;
  15858. if (nodeType === "TypeofTypeAnnotation") {
  15859. if (typeof opts === "undefined") {
  15860. return true;
  15861. } else {
  15862. return (0, _shallowEqual.default)(node, opts);
  15863. }
  15864. }
  15865. return false;
  15866. }
  15867. function isTypeAlias(node, opts) {
  15868. if (!node)
  15869. return false;
  15870. const nodeType = node.type;
  15871. if (nodeType === "TypeAlias") {
  15872. if (typeof opts === "undefined") {
  15873. return true;
  15874. } else {
  15875. return (0, _shallowEqual.default)(node, opts);
  15876. }
  15877. }
  15878. return false;
  15879. }
  15880. function isTypeAnnotation(node, opts) {
  15881. if (!node)
  15882. return false;
  15883. const nodeType = node.type;
  15884. if (nodeType === "TypeAnnotation") {
  15885. if (typeof opts === "undefined") {
  15886. return true;
  15887. } else {
  15888. return (0, _shallowEqual.default)(node, opts);
  15889. }
  15890. }
  15891. return false;
  15892. }
  15893. function isTypeCastExpression(node, opts) {
  15894. if (!node)
  15895. return false;
  15896. const nodeType = node.type;
  15897. if (nodeType === "TypeCastExpression") {
  15898. if (typeof opts === "undefined") {
  15899. return true;
  15900. } else {
  15901. return (0, _shallowEqual.default)(node, opts);
  15902. }
  15903. }
  15904. return false;
  15905. }
  15906. function isTypeParameter(node, opts) {
  15907. if (!node)
  15908. return false;
  15909. const nodeType = node.type;
  15910. if (nodeType === "TypeParameter") {
  15911. if (typeof opts === "undefined") {
  15912. return true;
  15913. } else {
  15914. return (0, _shallowEqual.default)(node, opts);
  15915. }
  15916. }
  15917. return false;
  15918. }
  15919. function isTypeParameterDeclaration(node, opts) {
  15920. if (!node)
  15921. return false;
  15922. const nodeType = node.type;
  15923. if (nodeType === "TypeParameterDeclaration") {
  15924. if (typeof opts === "undefined") {
  15925. return true;
  15926. } else {
  15927. return (0, _shallowEqual.default)(node, opts);
  15928. }
  15929. }
  15930. return false;
  15931. }
  15932. function isTypeParameterInstantiation(node, opts) {
  15933. if (!node)
  15934. return false;
  15935. const nodeType = node.type;
  15936. if (nodeType === "TypeParameterInstantiation") {
  15937. if (typeof opts === "undefined") {
  15938. return true;
  15939. } else {
  15940. return (0, _shallowEqual.default)(node, opts);
  15941. }
  15942. }
  15943. return false;
  15944. }
  15945. function isUnionTypeAnnotation(node, opts) {
  15946. if (!node)
  15947. return false;
  15948. const nodeType = node.type;
  15949. if (nodeType === "UnionTypeAnnotation") {
  15950. if (typeof opts === "undefined") {
  15951. return true;
  15952. } else {
  15953. return (0, _shallowEqual.default)(node, opts);
  15954. }
  15955. }
  15956. return false;
  15957. }
  15958. function isVariance(node, opts) {
  15959. if (!node)
  15960. return false;
  15961. const nodeType = node.type;
  15962. if (nodeType === "Variance") {
  15963. if (typeof opts === "undefined") {
  15964. return true;
  15965. } else {
  15966. return (0, _shallowEqual.default)(node, opts);
  15967. }
  15968. }
  15969. return false;
  15970. }
  15971. function isVoidTypeAnnotation(node, opts) {
  15972. if (!node)
  15973. return false;
  15974. const nodeType = node.type;
  15975. if (nodeType === "VoidTypeAnnotation") {
  15976. if (typeof opts === "undefined") {
  15977. return true;
  15978. } else {
  15979. return (0, _shallowEqual.default)(node, opts);
  15980. }
  15981. }
  15982. return false;
  15983. }
  15984. function isEnumDeclaration(node, opts) {
  15985. if (!node)
  15986. return false;
  15987. const nodeType = node.type;
  15988. if (nodeType === "EnumDeclaration") {
  15989. if (typeof opts === "undefined") {
  15990. return true;
  15991. } else {
  15992. return (0, _shallowEqual.default)(node, opts);
  15993. }
  15994. }
  15995. return false;
  15996. }
  15997. function isEnumBooleanBody(node, opts) {
  15998. if (!node)
  15999. return false;
  16000. const nodeType = node.type;
  16001. if (nodeType === "EnumBooleanBody") {
  16002. if (typeof opts === "undefined") {
  16003. return true;
  16004. } else {
  16005. return (0, _shallowEqual.default)(node, opts);
  16006. }
  16007. }
  16008. return false;
  16009. }
  16010. function isEnumNumberBody(node, opts) {
  16011. if (!node)
  16012. return false;
  16013. const nodeType = node.type;
  16014. if (nodeType === "EnumNumberBody") {
  16015. if (typeof opts === "undefined") {
  16016. return true;
  16017. } else {
  16018. return (0, _shallowEqual.default)(node, opts);
  16019. }
  16020. }
  16021. return false;
  16022. }
  16023. function isEnumStringBody(node, opts) {
  16024. if (!node)
  16025. return false;
  16026. const nodeType = node.type;
  16027. if (nodeType === "EnumStringBody") {
  16028. if (typeof opts === "undefined") {
  16029. return true;
  16030. } else {
  16031. return (0, _shallowEqual.default)(node, opts);
  16032. }
  16033. }
  16034. return false;
  16035. }
  16036. function isEnumSymbolBody(node, opts) {
  16037. if (!node)
  16038. return false;
  16039. const nodeType = node.type;
  16040. if (nodeType === "EnumSymbolBody") {
  16041. if (typeof opts === "undefined") {
  16042. return true;
  16043. } else {
  16044. return (0, _shallowEqual.default)(node, opts);
  16045. }
  16046. }
  16047. return false;
  16048. }
  16049. function isEnumBooleanMember(node, opts) {
  16050. if (!node)
  16051. return false;
  16052. const nodeType = node.type;
  16053. if (nodeType === "EnumBooleanMember") {
  16054. if (typeof opts === "undefined") {
  16055. return true;
  16056. } else {
  16057. return (0, _shallowEqual.default)(node, opts);
  16058. }
  16059. }
  16060. return false;
  16061. }
  16062. function isEnumNumberMember(node, opts) {
  16063. if (!node)
  16064. return false;
  16065. const nodeType = node.type;
  16066. if (nodeType === "EnumNumberMember") {
  16067. if (typeof opts === "undefined") {
  16068. return true;
  16069. } else {
  16070. return (0, _shallowEqual.default)(node, opts);
  16071. }
  16072. }
  16073. return false;
  16074. }
  16075. function isEnumStringMember(node, opts) {
  16076. if (!node)
  16077. return false;
  16078. const nodeType = node.type;
  16079. if (nodeType === "EnumStringMember") {
  16080. if (typeof opts === "undefined") {
  16081. return true;
  16082. } else {
  16083. return (0, _shallowEqual.default)(node, opts);
  16084. }
  16085. }
  16086. return false;
  16087. }
  16088. function isEnumDefaultedMember(node, opts) {
  16089. if (!node)
  16090. return false;
  16091. const nodeType = node.type;
  16092. if (nodeType === "EnumDefaultedMember") {
  16093. if (typeof opts === "undefined") {
  16094. return true;
  16095. } else {
  16096. return (0, _shallowEqual.default)(node, opts);
  16097. }
  16098. }
  16099. return false;
  16100. }
  16101. function isIndexedAccessType(node, opts) {
  16102. if (!node)
  16103. return false;
  16104. const nodeType = node.type;
  16105. if (nodeType === "IndexedAccessType") {
  16106. if (typeof opts === "undefined") {
  16107. return true;
  16108. } else {
  16109. return (0, _shallowEqual.default)(node, opts);
  16110. }
  16111. }
  16112. return false;
  16113. }
  16114. function isOptionalIndexedAccessType(node, opts) {
  16115. if (!node)
  16116. return false;
  16117. const nodeType = node.type;
  16118. if (nodeType === "OptionalIndexedAccessType") {
  16119. if (typeof opts === "undefined") {
  16120. return true;
  16121. } else {
  16122. return (0, _shallowEqual.default)(node, opts);
  16123. }
  16124. }
  16125. return false;
  16126. }
  16127. function isJSXAttribute(node, opts) {
  16128. if (!node)
  16129. return false;
  16130. const nodeType = node.type;
  16131. if (nodeType === "JSXAttribute") {
  16132. if (typeof opts === "undefined") {
  16133. return true;
  16134. } else {
  16135. return (0, _shallowEqual.default)(node, opts);
  16136. }
  16137. }
  16138. return false;
  16139. }
  16140. function isJSXClosingElement(node, opts) {
  16141. if (!node)
  16142. return false;
  16143. const nodeType = node.type;
  16144. if (nodeType === "JSXClosingElement") {
  16145. if (typeof opts === "undefined") {
  16146. return true;
  16147. } else {
  16148. return (0, _shallowEqual.default)(node, opts);
  16149. }
  16150. }
  16151. return false;
  16152. }
  16153. function isJSXElement2(node, opts) {
  16154. if (!node)
  16155. return false;
  16156. const nodeType = node.type;
  16157. if (nodeType === "JSXElement") {
  16158. if (typeof opts === "undefined") {
  16159. return true;
  16160. } else {
  16161. return (0, _shallowEqual.default)(node, opts);
  16162. }
  16163. }
  16164. return false;
  16165. }
  16166. function isJSXEmptyExpression(node, opts) {
  16167. if (!node)
  16168. return false;
  16169. const nodeType = node.type;
  16170. if (nodeType === "JSXEmptyExpression") {
  16171. if (typeof opts === "undefined") {
  16172. return true;
  16173. } else {
  16174. return (0, _shallowEqual.default)(node, opts);
  16175. }
  16176. }
  16177. return false;
  16178. }
  16179. function isJSXExpressionContainer2(node, opts) {
  16180. if (!node)
  16181. return false;
  16182. const nodeType = node.type;
  16183. if (nodeType === "JSXExpressionContainer") {
  16184. if (typeof opts === "undefined") {
  16185. return true;
  16186. } else {
  16187. return (0, _shallowEqual.default)(node, opts);
  16188. }
  16189. }
  16190. return false;
  16191. }
  16192. function isJSXSpreadChild(node, opts) {
  16193. if (!node)
  16194. return false;
  16195. const nodeType = node.type;
  16196. if (nodeType === "JSXSpreadChild") {
  16197. if (typeof opts === "undefined") {
  16198. return true;
  16199. } else {
  16200. return (0, _shallowEqual.default)(node, opts);
  16201. }
  16202. }
  16203. return false;
  16204. }
  16205. function isJSXIdentifier2(node, opts) {
  16206. if (!node)
  16207. return false;
  16208. const nodeType = node.type;
  16209. if (nodeType === "JSXIdentifier") {
  16210. if (typeof opts === "undefined") {
  16211. return true;
  16212. } else {
  16213. return (0, _shallowEqual.default)(node, opts);
  16214. }
  16215. }
  16216. return false;
  16217. }
  16218. function isJSXMemberExpression(node, opts) {
  16219. if (!node)
  16220. return false;
  16221. const nodeType = node.type;
  16222. if (nodeType === "JSXMemberExpression") {
  16223. if (typeof opts === "undefined") {
  16224. return true;
  16225. } else {
  16226. return (0, _shallowEqual.default)(node, opts);
  16227. }
  16228. }
  16229. return false;
  16230. }
  16231. function isJSXNamespacedName(node, opts) {
  16232. if (!node)
  16233. return false;
  16234. const nodeType = node.type;
  16235. if (nodeType === "JSXNamespacedName") {
  16236. if (typeof opts === "undefined") {
  16237. return true;
  16238. } else {
  16239. return (0, _shallowEqual.default)(node, opts);
  16240. }
  16241. }
  16242. return false;
  16243. }
  16244. function isJSXOpeningElement(node, opts) {
  16245. if (!node)
  16246. return false;
  16247. const nodeType = node.type;
  16248. if (nodeType === "JSXOpeningElement") {
  16249. if (typeof opts === "undefined") {
  16250. return true;
  16251. } else {
  16252. return (0, _shallowEqual.default)(node, opts);
  16253. }
  16254. }
  16255. return false;
  16256. }
  16257. function isJSXSpreadAttribute(node, opts) {
  16258. if (!node)
  16259. return false;
  16260. const nodeType = node.type;
  16261. if (nodeType === "JSXSpreadAttribute") {
  16262. if (typeof opts === "undefined") {
  16263. return true;
  16264. } else {
  16265. return (0, _shallowEqual.default)(node, opts);
  16266. }
  16267. }
  16268. return false;
  16269. }
  16270. function isJSXText(node, opts) {
  16271. if (!node)
  16272. return false;
  16273. const nodeType = node.type;
  16274. if (nodeType === "JSXText") {
  16275. if (typeof opts === "undefined") {
  16276. return true;
  16277. } else {
  16278. return (0, _shallowEqual.default)(node, opts);
  16279. }
  16280. }
  16281. return false;
  16282. }
  16283. function isJSXFragment2(node, opts) {
  16284. if (!node)
  16285. return false;
  16286. const nodeType = node.type;
  16287. if (nodeType === "JSXFragment") {
  16288. if (typeof opts === "undefined") {
  16289. return true;
  16290. } else {
  16291. return (0, _shallowEqual.default)(node, opts);
  16292. }
  16293. }
  16294. return false;
  16295. }
  16296. function isJSXOpeningFragment(node, opts) {
  16297. if (!node)
  16298. return false;
  16299. const nodeType = node.type;
  16300. if (nodeType === "JSXOpeningFragment") {
  16301. if (typeof opts === "undefined") {
  16302. return true;
  16303. } else {
  16304. return (0, _shallowEqual.default)(node, opts);
  16305. }
  16306. }
  16307. return false;
  16308. }
  16309. function isJSXClosingFragment(node, opts) {
  16310. if (!node)
  16311. return false;
  16312. const nodeType = node.type;
  16313. if (nodeType === "JSXClosingFragment") {
  16314. if (typeof opts === "undefined") {
  16315. return true;
  16316. } else {
  16317. return (0, _shallowEqual.default)(node, opts);
  16318. }
  16319. }
  16320. return false;
  16321. }
  16322. function isNoop(node, opts) {
  16323. if (!node)
  16324. return false;
  16325. const nodeType = node.type;
  16326. if (nodeType === "Noop") {
  16327. if (typeof opts === "undefined") {
  16328. return true;
  16329. } else {
  16330. return (0, _shallowEqual.default)(node, opts);
  16331. }
  16332. }
  16333. return false;
  16334. }
  16335. function isPlaceholder(node, opts) {
  16336. if (!node)
  16337. return false;
  16338. const nodeType = node.type;
  16339. if (nodeType === "Placeholder") {
  16340. if (typeof opts === "undefined") {
  16341. return true;
  16342. } else {
  16343. return (0, _shallowEqual.default)(node, opts);
  16344. }
  16345. }
  16346. return false;
  16347. }
  16348. function isV8IntrinsicIdentifier(node, opts) {
  16349. if (!node)
  16350. return false;
  16351. const nodeType = node.type;
  16352. if (nodeType === "V8IntrinsicIdentifier") {
  16353. if (typeof opts === "undefined") {
  16354. return true;
  16355. } else {
  16356. return (0, _shallowEqual.default)(node, opts);
  16357. }
  16358. }
  16359. return false;
  16360. }
  16361. function isArgumentPlaceholder(node, opts) {
  16362. if (!node)
  16363. return false;
  16364. const nodeType = node.type;
  16365. if (nodeType === "ArgumentPlaceholder") {
  16366. if (typeof opts === "undefined") {
  16367. return true;
  16368. } else {
  16369. return (0, _shallowEqual.default)(node, opts);
  16370. }
  16371. }
  16372. return false;
  16373. }
  16374. function isBindExpression(node, opts) {
  16375. if (!node)
  16376. return false;
  16377. const nodeType = node.type;
  16378. if (nodeType === "BindExpression") {
  16379. if (typeof opts === "undefined") {
  16380. return true;
  16381. } else {
  16382. return (0, _shallowEqual.default)(node, opts);
  16383. }
  16384. }
  16385. return false;
  16386. }
  16387. function isClassProperty(node, opts) {
  16388. if (!node)
  16389. return false;
  16390. const nodeType = node.type;
  16391. if (nodeType === "ClassProperty") {
  16392. if (typeof opts === "undefined") {
  16393. return true;
  16394. } else {
  16395. return (0, _shallowEqual.default)(node, opts);
  16396. }
  16397. }
  16398. return false;
  16399. }
  16400. function isPipelineTopicExpression(node, opts) {
  16401. if (!node)
  16402. return false;
  16403. const nodeType = node.type;
  16404. if (nodeType === "PipelineTopicExpression") {
  16405. if (typeof opts === "undefined") {
  16406. return true;
  16407. } else {
  16408. return (0, _shallowEqual.default)(node, opts);
  16409. }
  16410. }
  16411. return false;
  16412. }
  16413. function isPipelineBareFunction(node, opts) {
  16414. if (!node)
  16415. return false;
  16416. const nodeType = node.type;
  16417. if (nodeType === "PipelineBareFunction") {
  16418. if (typeof opts === "undefined") {
  16419. return true;
  16420. } else {
  16421. return (0, _shallowEqual.default)(node, opts);
  16422. }
  16423. }
  16424. return false;
  16425. }
  16426. function isPipelinePrimaryTopicReference(node, opts) {
  16427. if (!node)
  16428. return false;
  16429. const nodeType = node.type;
  16430. if (nodeType === "PipelinePrimaryTopicReference") {
  16431. if (typeof opts === "undefined") {
  16432. return true;
  16433. } else {
  16434. return (0, _shallowEqual.default)(node, opts);
  16435. }
  16436. }
  16437. return false;
  16438. }
  16439. function isClassPrivateProperty(node, opts) {
  16440. if (!node)
  16441. return false;
  16442. const nodeType = node.type;
  16443. if (nodeType === "ClassPrivateProperty") {
  16444. if (typeof opts === "undefined") {
  16445. return true;
  16446. } else {
  16447. return (0, _shallowEqual.default)(node, opts);
  16448. }
  16449. }
  16450. return false;
  16451. }
  16452. function isClassPrivateMethod(node, opts) {
  16453. if (!node)
  16454. return false;
  16455. const nodeType = node.type;
  16456. if (nodeType === "ClassPrivateMethod") {
  16457. if (typeof opts === "undefined") {
  16458. return true;
  16459. } else {
  16460. return (0, _shallowEqual.default)(node, opts);
  16461. }
  16462. }
  16463. return false;
  16464. }
  16465. function isImportAttribute(node, opts) {
  16466. if (!node)
  16467. return false;
  16468. const nodeType = node.type;
  16469. if (nodeType === "ImportAttribute") {
  16470. if (typeof opts === "undefined") {
  16471. return true;
  16472. } else {
  16473. return (0, _shallowEqual.default)(node, opts);
  16474. }
  16475. }
  16476. return false;
  16477. }
  16478. function isDecorator(node, opts) {
  16479. if (!node)
  16480. return false;
  16481. const nodeType = node.type;
  16482. if (nodeType === "Decorator") {
  16483. if (typeof opts === "undefined") {
  16484. return true;
  16485. } else {
  16486. return (0, _shallowEqual.default)(node, opts);
  16487. }
  16488. }
  16489. return false;
  16490. }
  16491. function isDoExpression(node, opts) {
  16492. if (!node)
  16493. return false;
  16494. const nodeType = node.type;
  16495. if (nodeType === "DoExpression") {
  16496. if (typeof opts === "undefined") {
  16497. return true;
  16498. } else {
  16499. return (0, _shallowEqual.default)(node, opts);
  16500. }
  16501. }
  16502. return false;
  16503. }
  16504. function isExportDefaultSpecifier(node, opts) {
  16505. if (!node)
  16506. return false;
  16507. const nodeType = node.type;
  16508. if (nodeType === "ExportDefaultSpecifier") {
  16509. if (typeof opts === "undefined") {
  16510. return true;
  16511. } else {
  16512. return (0, _shallowEqual.default)(node, opts);
  16513. }
  16514. }
  16515. return false;
  16516. }
  16517. function isPrivateName(node, opts) {
  16518. if (!node)
  16519. return false;
  16520. const nodeType = node.type;
  16521. if (nodeType === "PrivateName") {
  16522. if (typeof opts === "undefined") {
  16523. return true;
  16524. } else {
  16525. return (0, _shallowEqual.default)(node, opts);
  16526. }
  16527. }
  16528. return false;
  16529. }
  16530. function isRecordExpression(node, opts) {
  16531. if (!node)
  16532. return false;
  16533. const nodeType = node.type;
  16534. if (nodeType === "RecordExpression") {
  16535. if (typeof opts === "undefined") {
  16536. return true;
  16537. } else {
  16538. return (0, _shallowEqual.default)(node, opts);
  16539. }
  16540. }
  16541. return false;
  16542. }
  16543. function isTupleExpression(node, opts) {
  16544. if (!node)
  16545. return false;
  16546. const nodeType = node.type;
  16547. if (nodeType === "TupleExpression") {
  16548. if (typeof opts === "undefined") {
  16549. return true;
  16550. } else {
  16551. return (0, _shallowEqual.default)(node, opts);
  16552. }
  16553. }
  16554. return false;
  16555. }
  16556. function isDecimalLiteral(node, opts) {
  16557. if (!node)
  16558. return false;
  16559. const nodeType = node.type;
  16560. if (nodeType === "DecimalLiteral") {
  16561. if (typeof opts === "undefined") {
  16562. return true;
  16563. } else {
  16564. return (0, _shallowEqual.default)(node, opts);
  16565. }
  16566. }
  16567. return false;
  16568. }
  16569. function isStaticBlock(node, opts) {
  16570. if (!node)
  16571. return false;
  16572. const nodeType = node.type;
  16573. if (nodeType === "StaticBlock") {
  16574. if (typeof opts === "undefined") {
  16575. return true;
  16576. } else {
  16577. return (0, _shallowEqual.default)(node, opts);
  16578. }
  16579. }
  16580. return false;
  16581. }
  16582. function isModuleExpression(node, opts) {
  16583. if (!node)
  16584. return false;
  16585. const nodeType = node.type;
  16586. if (nodeType === "ModuleExpression") {
  16587. if (typeof opts === "undefined") {
  16588. return true;
  16589. } else {
  16590. return (0, _shallowEqual.default)(node, opts);
  16591. }
  16592. }
  16593. return false;
  16594. }
  16595. function isTSParameterProperty(node, opts) {
  16596. if (!node)
  16597. return false;
  16598. const nodeType = node.type;
  16599. if (nodeType === "TSParameterProperty") {
  16600. if (typeof opts === "undefined") {
  16601. return true;
  16602. } else {
  16603. return (0, _shallowEqual.default)(node, opts);
  16604. }
  16605. }
  16606. return false;
  16607. }
  16608. function isTSDeclareFunction(node, opts) {
  16609. if (!node)
  16610. return false;
  16611. const nodeType = node.type;
  16612. if (nodeType === "TSDeclareFunction") {
  16613. if (typeof opts === "undefined") {
  16614. return true;
  16615. } else {
  16616. return (0, _shallowEqual.default)(node, opts);
  16617. }
  16618. }
  16619. return false;
  16620. }
  16621. function isTSDeclareMethod(node, opts) {
  16622. if (!node)
  16623. return false;
  16624. const nodeType = node.type;
  16625. if (nodeType === "TSDeclareMethod") {
  16626. if (typeof opts === "undefined") {
  16627. return true;
  16628. } else {
  16629. return (0, _shallowEqual.default)(node, opts);
  16630. }
  16631. }
  16632. return false;
  16633. }
  16634. function isTSQualifiedName(node, opts) {
  16635. if (!node)
  16636. return false;
  16637. const nodeType = node.type;
  16638. if (nodeType === "TSQualifiedName") {
  16639. if (typeof opts === "undefined") {
  16640. return true;
  16641. } else {
  16642. return (0, _shallowEqual.default)(node, opts);
  16643. }
  16644. }
  16645. return false;
  16646. }
  16647. function isTSCallSignatureDeclaration(node, opts) {
  16648. if (!node)
  16649. return false;
  16650. const nodeType = node.type;
  16651. if (nodeType === "TSCallSignatureDeclaration") {
  16652. if (typeof opts === "undefined") {
  16653. return true;
  16654. } else {
  16655. return (0, _shallowEqual.default)(node, opts);
  16656. }
  16657. }
  16658. return false;
  16659. }
  16660. function isTSConstructSignatureDeclaration(node, opts) {
  16661. if (!node)
  16662. return false;
  16663. const nodeType = node.type;
  16664. if (nodeType === "TSConstructSignatureDeclaration") {
  16665. if (typeof opts === "undefined") {
  16666. return true;
  16667. } else {
  16668. return (0, _shallowEqual.default)(node, opts);
  16669. }
  16670. }
  16671. return false;
  16672. }
  16673. function isTSPropertySignature(node, opts) {
  16674. if (!node)
  16675. return false;
  16676. const nodeType = node.type;
  16677. if (nodeType === "TSPropertySignature") {
  16678. if (typeof opts === "undefined") {
  16679. return true;
  16680. } else {
  16681. return (0, _shallowEqual.default)(node, opts);
  16682. }
  16683. }
  16684. return false;
  16685. }
  16686. function isTSMethodSignature(node, opts) {
  16687. if (!node)
  16688. return false;
  16689. const nodeType = node.type;
  16690. if (nodeType === "TSMethodSignature") {
  16691. if (typeof opts === "undefined") {
  16692. return true;
  16693. } else {
  16694. return (0, _shallowEqual.default)(node, opts);
  16695. }
  16696. }
  16697. return false;
  16698. }
  16699. function isTSIndexSignature(node, opts) {
  16700. if (!node)
  16701. return false;
  16702. const nodeType = node.type;
  16703. if (nodeType === "TSIndexSignature") {
  16704. if (typeof opts === "undefined") {
  16705. return true;
  16706. } else {
  16707. return (0, _shallowEqual.default)(node, opts);
  16708. }
  16709. }
  16710. return false;
  16711. }
  16712. function isTSAnyKeyword(node, opts) {
  16713. if (!node)
  16714. return false;
  16715. const nodeType = node.type;
  16716. if (nodeType === "TSAnyKeyword") {
  16717. if (typeof opts === "undefined") {
  16718. return true;
  16719. } else {
  16720. return (0, _shallowEqual.default)(node, opts);
  16721. }
  16722. }
  16723. return false;
  16724. }
  16725. function isTSBooleanKeyword(node, opts) {
  16726. if (!node)
  16727. return false;
  16728. const nodeType = node.type;
  16729. if (nodeType === "TSBooleanKeyword") {
  16730. if (typeof opts === "undefined") {
  16731. return true;
  16732. } else {
  16733. return (0, _shallowEqual.default)(node, opts);
  16734. }
  16735. }
  16736. return false;
  16737. }
  16738. function isTSBigIntKeyword(node, opts) {
  16739. if (!node)
  16740. return false;
  16741. const nodeType = node.type;
  16742. if (nodeType === "TSBigIntKeyword") {
  16743. if (typeof opts === "undefined") {
  16744. return true;
  16745. } else {
  16746. return (0, _shallowEqual.default)(node, opts);
  16747. }
  16748. }
  16749. return false;
  16750. }
  16751. function isTSIntrinsicKeyword(node, opts) {
  16752. if (!node)
  16753. return false;
  16754. const nodeType = node.type;
  16755. if (nodeType === "TSIntrinsicKeyword") {
  16756. if (typeof opts === "undefined") {
  16757. return true;
  16758. } else {
  16759. return (0, _shallowEqual.default)(node, opts);
  16760. }
  16761. }
  16762. return false;
  16763. }
  16764. function isTSNeverKeyword(node, opts) {
  16765. if (!node)
  16766. return false;
  16767. const nodeType = node.type;
  16768. if (nodeType === "TSNeverKeyword") {
  16769. if (typeof opts === "undefined") {
  16770. return true;
  16771. } else {
  16772. return (0, _shallowEqual.default)(node, opts);
  16773. }
  16774. }
  16775. return false;
  16776. }
  16777. function isTSNullKeyword(node, opts) {
  16778. if (!node)
  16779. return false;
  16780. const nodeType = node.type;
  16781. if (nodeType === "TSNullKeyword") {
  16782. if (typeof opts === "undefined") {
  16783. return true;
  16784. } else {
  16785. return (0, _shallowEqual.default)(node, opts);
  16786. }
  16787. }
  16788. return false;
  16789. }
  16790. function isTSNumberKeyword(node, opts) {
  16791. if (!node)
  16792. return false;
  16793. const nodeType = node.type;
  16794. if (nodeType === "TSNumberKeyword") {
  16795. if (typeof opts === "undefined") {
  16796. return true;
  16797. } else {
  16798. return (0, _shallowEqual.default)(node, opts);
  16799. }
  16800. }
  16801. return false;
  16802. }
  16803. function isTSObjectKeyword(node, opts) {
  16804. if (!node)
  16805. return false;
  16806. const nodeType = node.type;
  16807. if (nodeType === "TSObjectKeyword") {
  16808. if (typeof opts === "undefined") {
  16809. return true;
  16810. } else {
  16811. return (0, _shallowEqual.default)(node, opts);
  16812. }
  16813. }
  16814. return false;
  16815. }
  16816. function isTSStringKeyword(node, opts) {
  16817. if (!node)
  16818. return false;
  16819. const nodeType = node.type;
  16820. if (nodeType === "TSStringKeyword") {
  16821. if (typeof opts === "undefined") {
  16822. return true;
  16823. } else {
  16824. return (0, _shallowEqual.default)(node, opts);
  16825. }
  16826. }
  16827. return false;
  16828. }
  16829. function isTSSymbolKeyword(node, opts) {
  16830. if (!node)
  16831. return false;
  16832. const nodeType = node.type;
  16833. if (nodeType === "TSSymbolKeyword") {
  16834. if (typeof opts === "undefined") {
  16835. return true;
  16836. } else {
  16837. return (0, _shallowEqual.default)(node, opts);
  16838. }
  16839. }
  16840. return false;
  16841. }
  16842. function isTSUndefinedKeyword(node, opts) {
  16843. if (!node)
  16844. return false;
  16845. const nodeType = node.type;
  16846. if (nodeType === "TSUndefinedKeyword") {
  16847. if (typeof opts === "undefined") {
  16848. return true;
  16849. } else {
  16850. return (0, _shallowEqual.default)(node, opts);
  16851. }
  16852. }
  16853. return false;
  16854. }
  16855. function isTSUnknownKeyword(node, opts) {
  16856. if (!node)
  16857. return false;
  16858. const nodeType = node.type;
  16859. if (nodeType === "TSUnknownKeyword") {
  16860. if (typeof opts === "undefined") {
  16861. return true;
  16862. } else {
  16863. return (0, _shallowEqual.default)(node, opts);
  16864. }
  16865. }
  16866. return false;
  16867. }
  16868. function isTSVoidKeyword(node, opts) {
  16869. if (!node)
  16870. return false;
  16871. const nodeType = node.type;
  16872. if (nodeType === "TSVoidKeyword") {
  16873. if (typeof opts === "undefined") {
  16874. return true;
  16875. } else {
  16876. return (0, _shallowEqual.default)(node, opts);
  16877. }
  16878. }
  16879. return false;
  16880. }
  16881. function isTSThisType(node, opts) {
  16882. if (!node)
  16883. return false;
  16884. const nodeType = node.type;
  16885. if (nodeType === "TSThisType") {
  16886. if (typeof opts === "undefined") {
  16887. return true;
  16888. } else {
  16889. return (0, _shallowEqual.default)(node, opts);
  16890. }
  16891. }
  16892. return false;
  16893. }
  16894. function isTSFunctionType(node, opts) {
  16895. if (!node)
  16896. return false;
  16897. const nodeType = node.type;
  16898. if (nodeType === "TSFunctionType") {
  16899. if (typeof opts === "undefined") {
  16900. return true;
  16901. } else {
  16902. return (0, _shallowEqual.default)(node, opts);
  16903. }
  16904. }
  16905. return false;
  16906. }
  16907. function isTSConstructorType(node, opts) {
  16908. if (!node)
  16909. return false;
  16910. const nodeType = node.type;
  16911. if (nodeType === "TSConstructorType") {
  16912. if (typeof opts === "undefined") {
  16913. return true;
  16914. } else {
  16915. return (0, _shallowEqual.default)(node, opts);
  16916. }
  16917. }
  16918. return false;
  16919. }
  16920. function isTSTypeReference(node, opts) {
  16921. if (!node)
  16922. return false;
  16923. const nodeType = node.type;
  16924. if (nodeType === "TSTypeReference") {
  16925. if (typeof opts === "undefined") {
  16926. return true;
  16927. } else {
  16928. return (0, _shallowEqual.default)(node, opts);
  16929. }
  16930. }
  16931. return false;
  16932. }
  16933. function isTSTypePredicate(node, opts) {
  16934. if (!node)
  16935. return false;
  16936. const nodeType = node.type;
  16937. if (nodeType === "TSTypePredicate") {
  16938. if (typeof opts === "undefined") {
  16939. return true;
  16940. } else {
  16941. return (0, _shallowEqual.default)(node, opts);
  16942. }
  16943. }
  16944. return false;
  16945. }
  16946. function isTSTypeQuery(node, opts) {
  16947. if (!node)
  16948. return false;
  16949. const nodeType = node.type;
  16950. if (nodeType === "TSTypeQuery") {
  16951. if (typeof opts === "undefined") {
  16952. return true;
  16953. } else {
  16954. return (0, _shallowEqual.default)(node, opts);
  16955. }
  16956. }
  16957. return false;
  16958. }
  16959. function isTSTypeLiteral(node, opts) {
  16960. if (!node)
  16961. return false;
  16962. const nodeType = node.type;
  16963. if (nodeType === "TSTypeLiteral") {
  16964. if (typeof opts === "undefined") {
  16965. return true;
  16966. } else {
  16967. return (0, _shallowEqual.default)(node, opts);
  16968. }
  16969. }
  16970. return false;
  16971. }
  16972. function isTSArrayType(node, opts) {
  16973. if (!node)
  16974. return false;
  16975. const nodeType = node.type;
  16976. if (nodeType === "TSArrayType") {
  16977. if (typeof opts === "undefined") {
  16978. return true;
  16979. } else {
  16980. return (0, _shallowEqual.default)(node, opts);
  16981. }
  16982. }
  16983. return false;
  16984. }
  16985. function isTSTupleType(node, opts) {
  16986. if (!node)
  16987. return false;
  16988. const nodeType = node.type;
  16989. if (nodeType === "TSTupleType") {
  16990. if (typeof opts === "undefined") {
  16991. return true;
  16992. } else {
  16993. return (0, _shallowEqual.default)(node, opts);
  16994. }
  16995. }
  16996. return false;
  16997. }
  16998. function isTSOptionalType(node, opts) {
  16999. if (!node)
  17000. return false;
  17001. const nodeType = node.type;
  17002. if (nodeType === "TSOptionalType") {
  17003. if (typeof opts === "undefined") {
  17004. return true;
  17005. } else {
  17006. return (0, _shallowEqual.default)(node, opts);
  17007. }
  17008. }
  17009. return false;
  17010. }
  17011. function isTSRestType(node, opts) {
  17012. if (!node)
  17013. return false;
  17014. const nodeType = node.type;
  17015. if (nodeType === "TSRestType") {
  17016. if (typeof opts === "undefined") {
  17017. return true;
  17018. } else {
  17019. return (0, _shallowEqual.default)(node, opts);
  17020. }
  17021. }
  17022. return false;
  17023. }
  17024. function isTSNamedTupleMember(node, opts) {
  17025. if (!node)
  17026. return false;
  17027. const nodeType = node.type;
  17028. if (nodeType === "TSNamedTupleMember") {
  17029. if (typeof opts === "undefined") {
  17030. return true;
  17031. } else {
  17032. return (0, _shallowEqual.default)(node, opts);
  17033. }
  17034. }
  17035. return false;
  17036. }
  17037. function isTSUnionType(node, opts) {
  17038. if (!node)
  17039. return false;
  17040. const nodeType = node.type;
  17041. if (nodeType === "TSUnionType") {
  17042. if (typeof opts === "undefined") {
  17043. return true;
  17044. } else {
  17045. return (0, _shallowEqual.default)(node, opts);
  17046. }
  17047. }
  17048. return false;
  17049. }
  17050. function isTSIntersectionType(node, opts) {
  17051. if (!node)
  17052. return false;
  17053. const nodeType = node.type;
  17054. if (nodeType === "TSIntersectionType") {
  17055. if (typeof opts === "undefined") {
  17056. return true;
  17057. } else {
  17058. return (0, _shallowEqual.default)(node, opts);
  17059. }
  17060. }
  17061. return false;
  17062. }
  17063. function isTSConditionalType(node, opts) {
  17064. if (!node)
  17065. return false;
  17066. const nodeType = node.type;
  17067. if (nodeType === "TSConditionalType") {
  17068. if (typeof opts === "undefined") {
  17069. return true;
  17070. } else {
  17071. return (0, _shallowEqual.default)(node, opts);
  17072. }
  17073. }
  17074. return false;
  17075. }
  17076. function isTSInferType(node, opts) {
  17077. if (!node)
  17078. return false;
  17079. const nodeType = node.type;
  17080. if (nodeType === "TSInferType") {
  17081. if (typeof opts === "undefined") {
  17082. return true;
  17083. } else {
  17084. return (0, _shallowEqual.default)(node, opts);
  17085. }
  17086. }
  17087. return false;
  17088. }
  17089. function isTSParenthesizedType(node, opts) {
  17090. if (!node)
  17091. return false;
  17092. const nodeType = node.type;
  17093. if (nodeType === "TSParenthesizedType") {
  17094. if (typeof opts === "undefined") {
  17095. return true;
  17096. } else {
  17097. return (0, _shallowEqual.default)(node, opts);
  17098. }
  17099. }
  17100. return false;
  17101. }
  17102. function isTSTypeOperator(node, opts) {
  17103. if (!node)
  17104. return false;
  17105. const nodeType = node.type;
  17106. if (nodeType === "TSTypeOperator") {
  17107. if (typeof opts === "undefined") {
  17108. return true;
  17109. } else {
  17110. return (0, _shallowEqual.default)(node, opts);
  17111. }
  17112. }
  17113. return false;
  17114. }
  17115. function isTSIndexedAccessType(node, opts) {
  17116. if (!node)
  17117. return false;
  17118. const nodeType = node.type;
  17119. if (nodeType === "TSIndexedAccessType") {
  17120. if (typeof opts === "undefined") {
  17121. return true;
  17122. } else {
  17123. return (0, _shallowEqual.default)(node, opts);
  17124. }
  17125. }
  17126. return false;
  17127. }
  17128. function isTSMappedType(node, opts) {
  17129. if (!node)
  17130. return false;
  17131. const nodeType = node.type;
  17132. if (nodeType === "TSMappedType") {
  17133. if (typeof opts === "undefined") {
  17134. return true;
  17135. } else {
  17136. return (0, _shallowEqual.default)(node, opts);
  17137. }
  17138. }
  17139. return false;
  17140. }
  17141. function isTSLiteralType(node, opts) {
  17142. if (!node)
  17143. return false;
  17144. const nodeType = node.type;
  17145. if (nodeType === "TSLiteralType") {
  17146. if (typeof opts === "undefined") {
  17147. return true;
  17148. } else {
  17149. return (0, _shallowEqual.default)(node, opts);
  17150. }
  17151. }
  17152. return false;
  17153. }
  17154. function isTSExpressionWithTypeArguments(node, opts) {
  17155. if (!node)
  17156. return false;
  17157. const nodeType = node.type;
  17158. if (nodeType === "TSExpressionWithTypeArguments") {
  17159. if (typeof opts === "undefined") {
  17160. return true;
  17161. } else {
  17162. return (0, _shallowEqual.default)(node, opts);
  17163. }
  17164. }
  17165. return false;
  17166. }
  17167. function isTSInterfaceDeclaration(node, opts) {
  17168. if (!node)
  17169. return false;
  17170. const nodeType = node.type;
  17171. if (nodeType === "TSInterfaceDeclaration") {
  17172. if (typeof opts === "undefined") {
  17173. return true;
  17174. } else {
  17175. return (0, _shallowEqual.default)(node, opts);
  17176. }
  17177. }
  17178. return false;
  17179. }
  17180. function isTSInterfaceBody(node, opts) {
  17181. if (!node)
  17182. return false;
  17183. const nodeType = node.type;
  17184. if (nodeType === "TSInterfaceBody") {
  17185. if (typeof opts === "undefined") {
  17186. return true;
  17187. } else {
  17188. return (0, _shallowEqual.default)(node, opts);
  17189. }
  17190. }
  17191. return false;
  17192. }
  17193. function isTSTypeAliasDeclaration(node, opts) {
  17194. if (!node)
  17195. return false;
  17196. const nodeType = node.type;
  17197. if (nodeType === "TSTypeAliasDeclaration") {
  17198. if (typeof opts === "undefined") {
  17199. return true;
  17200. } else {
  17201. return (0, _shallowEqual.default)(node, opts);
  17202. }
  17203. }
  17204. return false;
  17205. }
  17206. function isTSAsExpression(node, opts) {
  17207. if (!node)
  17208. return false;
  17209. const nodeType = node.type;
  17210. if (nodeType === "TSAsExpression") {
  17211. if (typeof opts === "undefined") {
  17212. return true;
  17213. } else {
  17214. return (0, _shallowEqual.default)(node, opts);
  17215. }
  17216. }
  17217. return false;
  17218. }
  17219. function isTSTypeAssertion(node, opts) {
  17220. if (!node)
  17221. return false;
  17222. const nodeType = node.type;
  17223. if (nodeType === "TSTypeAssertion") {
  17224. if (typeof opts === "undefined") {
  17225. return true;
  17226. } else {
  17227. return (0, _shallowEqual.default)(node, opts);
  17228. }
  17229. }
  17230. return false;
  17231. }
  17232. function isTSEnumDeclaration(node, opts) {
  17233. if (!node)
  17234. return false;
  17235. const nodeType = node.type;
  17236. if (nodeType === "TSEnumDeclaration") {
  17237. if (typeof opts === "undefined") {
  17238. return true;
  17239. } else {
  17240. return (0, _shallowEqual.default)(node, opts);
  17241. }
  17242. }
  17243. return false;
  17244. }
  17245. function isTSEnumMember(node, opts) {
  17246. if (!node)
  17247. return false;
  17248. const nodeType = node.type;
  17249. if (nodeType === "TSEnumMember") {
  17250. if (typeof opts === "undefined") {
  17251. return true;
  17252. } else {
  17253. return (0, _shallowEqual.default)(node, opts);
  17254. }
  17255. }
  17256. return false;
  17257. }
  17258. function isTSModuleDeclaration(node, opts) {
  17259. if (!node)
  17260. return false;
  17261. const nodeType = node.type;
  17262. if (nodeType === "TSModuleDeclaration") {
  17263. if (typeof opts === "undefined") {
  17264. return true;
  17265. } else {
  17266. return (0, _shallowEqual.default)(node, opts);
  17267. }
  17268. }
  17269. return false;
  17270. }
  17271. function isTSModuleBlock(node, opts) {
  17272. if (!node)
  17273. return false;
  17274. const nodeType = node.type;
  17275. if (nodeType === "TSModuleBlock") {
  17276. if (typeof opts === "undefined") {
  17277. return true;
  17278. } else {
  17279. return (0, _shallowEqual.default)(node, opts);
  17280. }
  17281. }
  17282. return false;
  17283. }
  17284. function isTSImportType(node, opts) {
  17285. if (!node)
  17286. return false;
  17287. const nodeType = node.type;
  17288. if (nodeType === "TSImportType") {
  17289. if (typeof opts === "undefined") {
  17290. return true;
  17291. } else {
  17292. return (0, _shallowEqual.default)(node, opts);
  17293. }
  17294. }
  17295. return false;
  17296. }
  17297. function isTSImportEqualsDeclaration(node, opts) {
  17298. if (!node)
  17299. return false;
  17300. const nodeType = node.type;
  17301. if (nodeType === "TSImportEqualsDeclaration") {
  17302. if (typeof opts === "undefined") {
  17303. return true;
  17304. } else {
  17305. return (0, _shallowEqual.default)(node, opts);
  17306. }
  17307. }
  17308. return false;
  17309. }
  17310. function isTSExternalModuleReference(node, opts) {
  17311. if (!node)
  17312. return false;
  17313. const nodeType = node.type;
  17314. if (nodeType === "TSExternalModuleReference") {
  17315. if (typeof opts === "undefined") {
  17316. return true;
  17317. } else {
  17318. return (0, _shallowEqual.default)(node, opts);
  17319. }
  17320. }
  17321. return false;
  17322. }
  17323. function isTSNonNullExpression(node, opts) {
  17324. if (!node)
  17325. return false;
  17326. const nodeType = node.type;
  17327. if (nodeType === "TSNonNullExpression") {
  17328. if (typeof opts === "undefined") {
  17329. return true;
  17330. } else {
  17331. return (0, _shallowEqual.default)(node, opts);
  17332. }
  17333. }
  17334. return false;
  17335. }
  17336. function isTSExportAssignment(node, opts) {
  17337. if (!node)
  17338. return false;
  17339. const nodeType = node.type;
  17340. if (nodeType === "TSExportAssignment") {
  17341. if (typeof opts === "undefined") {
  17342. return true;
  17343. } else {
  17344. return (0, _shallowEqual.default)(node, opts);
  17345. }
  17346. }
  17347. return false;
  17348. }
  17349. function isTSNamespaceExportDeclaration(node, opts) {
  17350. if (!node)
  17351. return false;
  17352. const nodeType = node.type;
  17353. if (nodeType === "TSNamespaceExportDeclaration") {
  17354. if (typeof opts === "undefined") {
  17355. return true;
  17356. } else {
  17357. return (0, _shallowEqual.default)(node, opts);
  17358. }
  17359. }
  17360. return false;
  17361. }
  17362. function isTSTypeAnnotation(node, opts) {
  17363. if (!node)
  17364. return false;
  17365. const nodeType = node.type;
  17366. if (nodeType === "TSTypeAnnotation") {
  17367. if (typeof opts === "undefined") {
  17368. return true;
  17369. } else {
  17370. return (0, _shallowEqual.default)(node, opts);
  17371. }
  17372. }
  17373. return false;
  17374. }
  17375. function isTSTypeParameterInstantiation(node, opts) {
  17376. if (!node)
  17377. return false;
  17378. const nodeType = node.type;
  17379. if (nodeType === "TSTypeParameterInstantiation") {
  17380. if (typeof opts === "undefined") {
  17381. return true;
  17382. } else {
  17383. return (0, _shallowEqual.default)(node, opts);
  17384. }
  17385. }
  17386. return false;
  17387. }
  17388. function isTSTypeParameterDeclaration(node, opts) {
  17389. if (!node)
  17390. return false;
  17391. const nodeType = node.type;
  17392. if (nodeType === "TSTypeParameterDeclaration") {
  17393. if (typeof opts === "undefined") {
  17394. return true;
  17395. } else {
  17396. return (0, _shallowEqual.default)(node, opts);
  17397. }
  17398. }
  17399. return false;
  17400. }
  17401. function isTSTypeParameter(node, opts) {
  17402. if (!node)
  17403. return false;
  17404. const nodeType = node.type;
  17405. if (nodeType === "TSTypeParameter") {
  17406. if (typeof opts === "undefined") {
  17407. return true;
  17408. } else {
  17409. return (0, _shallowEqual.default)(node, opts);
  17410. }
  17411. }
  17412. return false;
  17413. }
  17414. function isExpression(node, opts) {
  17415. if (!node)
  17416. return false;
  17417. const nodeType = node.type;
  17418. if ("ArrayExpression" === nodeType || "AssignmentExpression" === nodeType || "BinaryExpression" === nodeType || "CallExpression" === nodeType || "ConditionalExpression" === nodeType || "FunctionExpression" === nodeType || "Identifier" === nodeType || "StringLiteral" === nodeType || "NumericLiteral" === nodeType || "NullLiteral" === nodeType || "BooleanLiteral" === nodeType || "RegExpLiteral" === nodeType || "LogicalExpression" === nodeType || "MemberExpression" === nodeType || "NewExpression" === nodeType || "ObjectExpression" === nodeType || "SequenceExpression" === nodeType || "ParenthesizedExpression" === nodeType || "ThisExpression" === nodeType || "UnaryExpression" === nodeType || "UpdateExpression" === nodeType || "ArrowFunctionExpression" === nodeType || "ClassExpression" === nodeType || "MetaProperty" === nodeType || "Super" === nodeType || "TaggedTemplateExpression" === nodeType || "TemplateLiteral" === nodeType || "YieldExpression" === nodeType || "AwaitExpression" === nodeType || "Import" === nodeType || "BigIntLiteral" === nodeType || "OptionalMemberExpression" === nodeType || "OptionalCallExpression" === nodeType || "TypeCastExpression" === nodeType || "JSXElement" === nodeType || "JSXFragment" === nodeType || "BindExpression" === nodeType || "PipelinePrimaryTopicReference" === nodeType || "DoExpression" === nodeType || "RecordExpression" === nodeType || "TupleExpression" === nodeType || "DecimalLiteral" === nodeType || "ModuleExpression" === nodeType || "TSAsExpression" === nodeType || "TSTypeAssertion" === nodeType || "TSNonNullExpression" === nodeType || nodeType === "Placeholder" && ("Expression" === node.expectedNode || "Identifier" === node.expectedNode || "StringLiteral" === node.expectedNode)) {
  17419. if (typeof opts === "undefined") {
  17420. return true;
  17421. } else {
  17422. return (0, _shallowEqual.default)(node, opts);
  17423. }
  17424. }
  17425. return false;
  17426. }
  17427. function isBinary(node, opts) {
  17428. if (!node)
  17429. return false;
  17430. const nodeType = node.type;
  17431. if ("BinaryExpression" === nodeType || "LogicalExpression" === nodeType) {
  17432. if (typeof opts === "undefined") {
  17433. return true;
  17434. } else {
  17435. return (0, _shallowEqual.default)(node, opts);
  17436. }
  17437. }
  17438. return false;
  17439. }
  17440. function isScopable(node, opts) {
  17441. if (!node)
  17442. return false;
  17443. const nodeType = node.type;
  17444. if ("BlockStatement" === nodeType || "CatchClause" === nodeType || "DoWhileStatement" === nodeType || "ForInStatement" === nodeType || "ForStatement" === nodeType || "FunctionDeclaration" === nodeType || "FunctionExpression" === nodeType || "Program" === nodeType || "ObjectMethod" === nodeType || "SwitchStatement" === nodeType || "WhileStatement" === nodeType || "ArrowFunctionExpression" === nodeType || "ClassExpression" === nodeType || "ClassDeclaration" === nodeType || "ForOfStatement" === nodeType || "ClassMethod" === nodeType || "ClassPrivateMethod" === nodeType || "StaticBlock" === nodeType || "TSModuleBlock" === nodeType || nodeType === "Placeholder" && "BlockStatement" === node.expectedNode) {
  17445. if (typeof opts === "undefined") {
  17446. return true;
  17447. } else {
  17448. return (0, _shallowEqual.default)(node, opts);
  17449. }
  17450. }
  17451. return false;
  17452. }
  17453. function isBlockParent(node, opts) {
  17454. if (!node)
  17455. return false;
  17456. const nodeType = node.type;
  17457. if ("BlockStatement" === nodeType || "CatchClause" === nodeType || "DoWhileStatement" === nodeType || "ForInStatement" === nodeType || "ForStatement" === nodeType || "FunctionDeclaration" === nodeType || "FunctionExpression" === nodeType || "Program" === nodeType || "ObjectMethod" === nodeType || "SwitchStatement" === nodeType || "WhileStatement" === nodeType || "ArrowFunctionExpression" === nodeType || "ForOfStatement" === nodeType || "ClassMethod" === nodeType || "ClassPrivateMethod" === nodeType || "StaticBlock" === nodeType || "TSModuleBlock" === nodeType || nodeType === "Placeholder" && "BlockStatement" === node.expectedNode) {
  17458. if (typeof opts === "undefined") {
  17459. return true;
  17460. } else {
  17461. return (0, _shallowEqual.default)(node, opts);
  17462. }
  17463. }
  17464. return false;
  17465. }
  17466. function isBlock(node, opts) {
  17467. if (!node)
  17468. return false;
  17469. const nodeType = node.type;
  17470. if ("BlockStatement" === nodeType || "Program" === nodeType || "TSModuleBlock" === nodeType || nodeType === "Placeholder" && "BlockStatement" === node.expectedNode) {
  17471. if (typeof opts === "undefined") {
  17472. return true;
  17473. } else {
  17474. return (0, _shallowEqual.default)(node, opts);
  17475. }
  17476. }
  17477. return false;
  17478. }
  17479. function isStatement(node, opts) {
  17480. if (!node)
  17481. return false;
  17482. const nodeType = node.type;
  17483. if ("BlockStatement" === nodeType || "BreakStatement" === nodeType || "ContinueStatement" === nodeType || "DebuggerStatement" === nodeType || "DoWhileStatement" === nodeType || "EmptyStatement" === nodeType || "ExpressionStatement" === nodeType || "ForInStatement" === nodeType || "ForStatement" === nodeType || "FunctionDeclaration" === nodeType || "IfStatement" === nodeType || "LabeledStatement" === nodeType || "ReturnStatement" === nodeType || "SwitchStatement" === nodeType || "ThrowStatement" === nodeType || "TryStatement" === nodeType || "VariableDeclaration" === nodeType || "WhileStatement" === nodeType || "WithStatement" === nodeType || "ClassDeclaration" === nodeType || "ExportAllDeclaration" === nodeType || "ExportDefaultDeclaration" === nodeType || "ExportNamedDeclaration" === nodeType || "ForOfStatement" === nodeType || "ImportDeclaration" === nodeType || "DeclareClass" === nodeType || "DeclareFunction" === nodeType || "DeclareInterface" === nodeType || "DeclareModule" === nodeType || "DeclareModuleExports" === nodeType || "DeclareTypeAlias" === nodeType || "DeclareOpaqueType" === nodeType || "DeclareVariable" === nodeType || "DeclareExportDeclaration" === nodeType || "DeclareExportAllDeclaration" === nodeType || "InterfaceDeclaration" === nodeType || "OpaqueType" === nodeType || "TypeAlias" === nodeType || "EnumDeclaration" === nodeType || "TSDeclareFunction" === nodeType || "TSInterfaceDeclaration" === nodeType || "TSTypeAliasDeclaration" === nodeType || "TSEnumDeclaration" === nodeType || "TSModuleDeclaration" === nodeType || "TSImportEqualsDeclaration" === nodeType || "TSExportAssignment" === nodeType || "TSNamespaceExportDeclaration" === nodeType || nodeType === "Placeholder" && ("Statement" === node.expectedNode || "Declaration" === node.expectedNode || "BlockStatement" === node.expectedNode)) {
  17484. if (typeof opts === "undefined") {
  17485. return true;
  17486. } else {
  17487. return (0, _shallowEqual.default)(node, opts);
  17488. }
  17489. }
  17490. return false;
  17491. }
  17492. function isTerminatorless(node, opts) {
  17493. if (!node)
  17494. return false;
  17495. const nodeType = node.type;
  17496. if ("BreakStatement" === nodeType || "ContinueStatement" === nodeType || "ReturnStatement" === nodeType || "ThrowStatement" === nodeType || "YieldExpression" === nodeType || "AwaitExpression" === nodeType) {
  17497. if (typeof opts === "undefined") {
  17498. return true;
  17499. } else {
  17500. return (0, _shallowEqual.default)(node, opts);
  17501. }
  17502. }
  17503. return false;
  17504. }
  17505. function isCompletionStatement(node, opts) {
  17506. if (!node)
  17507. return false;
  17508. const nodeType = node.type;
  17509. if ("BreakStatement" === nodeType || "ContinueStatement" === nodeType || "ReturnStatement" === nodeType || "ThrowStatement" === nodeType) {
  17510. if (typeof opts === "undefined") {
  17511. return true;
  17512. } else {
  17513. return (0, _shallowEqual.default)(node, opts);
  17514. }
  17515. }
  17516. return false;
  17517. }
  17518. function isConditional(node, opts) {
  17519. if (!node)
  17520. return false;
  17521. const nodeType = node.type;
  17522. if ("ConditionalExpression" === nodeType || "IfStatement" === nodeType) {
  17523. if (typeof opts === "undefined") {
  17524. return true;
  17525. } else {
  17526. return (0, _shallowEqual.default)(node, opts);
  17527. }
  17528. }
  17529. return false;
  17530. }
  17531. function isLoop(node, opts) {
  17532. if (!node)
  17533. return false;
  17534. const nodeType = node.type;
  17535. if ("DoWhileStatement" === nodeType || "ForInStatement" === nodeType || "ForStatement" === nodeType || "WhileStatement" === nodeType || "ForOfStatement" === nodeType) {
  17536. if (typeof opts === "undefined") {
  17537. return true;
  17538. } else {
  17539. return (0, _shallowEqual.default)(node, opts);
  17540. }
  17541. }
  17542. return false;
  17543. }
  17544. function isWhile(node, opts) {
  17545. if (!node)
  17546. return false;
  17547. const nodeType = node.type;
  17548. if ("DoWhileStatement" === nodeType || "WhileStatement" === nodeType) {
  17549. if (typeof opts === "undefined") {
  17550. return true;
  17551. } else {
  17552. return (0, _shallowEqual.default)(node, opts);
  17553. }
  17554. }
  17555. return false;
  17556. }
  17557. function isExpressionWrapper(node, opts) {
  17558. if (!node)
  17559. return false;
  17560. const nodeType = node.type;
  17561. if ("ExpressionStatement" === nodeType || "ParenthesizedExpression" === nodeType || "TypeCastExpression" === nodeType) {
  17562. if (typeof opts === "undefined") {
  17563. return true;
  17564. } else {
  17565. return (0, _shallowEqual.default)(node, opts);
  17566. }
  17567. }
  17568. return false;
  17569. }
  17570. function isFor(node, opts) {
  17571. if (!node)
  17572. return false;
  17573. const nodeType = node.type;
  17574. if ("ForInStatement" === nodeType || "ForStatement" === nodeType || "ForOfStatement" === nodeType) {
  17575. if (typeof opts === "undefined") {
  17576. return true;
  17577. } else {
  17578. return (0, _shallowEqual.default)(node, opts);
  17579. }
  17580. }
  17581. return false;
  17582. }
  17583. function isForXStatement(node, opts) {
  17584. if (!node)
  17585. return false;
  17586. const nodeType = node.type;
  17587. if ("ForInStatement" === nodeType || "ForOfStatement" === nodeType) {
  17588. if (typeof opts === "undefined") {
  17589. return true;
  17590. } else {
  17591. return (0, _shallowEqual.default)(node, opts);
  17592. }
  17593. }
  17594. return false;
  17595. }
  17596. function isFunction(node, opts) {
  17597. if (!node)
  17598. return false;
  17599. const nodeType = node.type;
  17600. if ("FunctionDeclaration" === nodeType || "FunctionExpression" === nodeType || "ObjectMethod" === nodeType || "ArrowFunctionExpression" === nodeType || "ClassMethod" === nodeType || "ClassPrivateMethod" === nodeType) {
  17601. if (typeof opts === "undefined") {
  17602. return true;
  17603. } else {
  17604. return (0, _shallowEqual.default)(node, opts);
  17605. }
  17606. }
  17607. return false;
  17608. }
  17609. function isFunctionParent(node, opts) {
  17610. if (!node)
  17611. return false;
  17612. const nodeType = node.type;
  17613. if ("FunctionDeclaration" === nodeType || "FunctionExpression" === nodeType || "ObjectMethod" === nodeType || "ArrowFunctionExpression" === nodeType || "ClassMethod" === nodeType || "ClassPrivateMethod" === nodeType) {
  17614. if (typeof opts === "undefined") {
  17615. return true;
  17616. } else {
  17617. return (0, _shallowEqual.default)(node, opts);
  17618. }
  17619. }
  17620. return false;
  17621. }
  17622. function isPureish(node, opts) {
  17623. if (!node)
  17624. return false;
  17625. const nodeType = node.type;
  17626. if ("FunctionDeclaration" === nodeType || "FunctionExpression" === nodeType || "StringLiteral" === nodeType || "NumericLiteral" === nodeType || "NullLiteral" === nodeType || "BooleanLiteral" === nodeType || "RegExpLiteral" === nodeType || "ArrowFunctionExpression" === nodeType || "BigIntLiteral" === nodeType || "DecimalLiteral" === nodeType || nodeType === "Placeholder" && "StringLiteral" === node.expectedNode) {
  17627. if (typeof opts === "undefined") {
  17628. return true;
  17629. } else {
  17630. return (0, _shallowEqual.default)(node, opts);
  17631. }
  17632. }
  17633. return false;
  17634. }
  17635. function isDeclaration2(node, opts) {
  17636. if (!node)
  17637. return false;
  17638. const nodeType = node.type;
  17639. if ("FunctionDeclaration" === nodeType || "VariableDeclaration" === nodeType || "ClassDeclaration" === nodeType || "ExportAllDeclaration" === nodeType || "ExportDefaultDeclaration" === nodeType || "ExportNamedDeclaration" === nodeType || "ImportDeclaration" === nodeType || "DeclareClass" === nodeType || "DeclareFunction" === nodeType || "DeclareInterface" === nodeType || "DeclareModule" === nodeType || "DeclareModuleExports" === nodeType || "DeclareTypeAlias" === nodeType || "DeclareOpaqueType" === nodeType || "DeclareVariable" === nodeType || "DeclareExportDeclaration" === nodeType || "DeclareExportAllDeclaration" === nodeType || "InterfaceDeclaration" === nodeType || "OpaqueType" === nodeType || "TypeAlias" === nodeType || "EnumDeclaration" === nodeType || "TSDeclareFunction" === nodeType || "TSInterfaceDeclaration" === nodeType || "TSTypeAliasDeclaration" === nodeType || "TSEnumDeclaration" === nodeType || "TSModuleDeclaration" === nodeType || nodeType === "Placeholder" && "Declaration" === node.expectedNode) {
  17640. if (typeof opts === "undefined") {
  17641. return true;
  17642. } else {
  17643. return (0, _shallowEqual.default)(node, opts);
  17644. }
  17645. }
  17646. return false;
  17647. }
  17648. function isPatternLike(node, opts) {
  17649. if (!node)
  17650. return false;
  17651. const nodeType = node.type;
  17652. if ("Identifier" === nodeType || "RestElement" === nodeType || "AssignmentPattern" === nodeType || "ArrayPattern" === nodeType || "ObjectPattern" === nodeType || nodeType === "Placeholder" && ("Pattern" === node.expectedNode || "Identifier" === node.expectedNode)) {
  17653. if (typeof opts === "undefined") {
  17654. return true;
  17655. } else {
  17656. return (0, _shallowEqual.default)(node, opts);
  17657. }
  17658. }
  17659. return false;
  17660. }
  17661. function isLVal(node, opts) {
  17662. if (!node)
  17663. return false;
  17664. const nodeType = node.type;
  17665. if ("Identifier" === nodeType || "MemberExpression" === nodeType || "RestElement" === nodeType || "AssignmentPattern" === nodeType || "ArrayPattern" === nodeType || "ObjectPattern" === nodeType || "TSParameterProperty" === nodeType || nodeType === "Placeholder" && ("Pattern" === node.expectedNode || "Identifier" === node.expectedNode)) {
  17666. if (typeof opts === "undefined") {
  17667. return true;
  17668. } else {
  17669. return (0, _shallowEqual.default)(node, opts);
  17670. }
  17671. }
  17672. return false;
  17673. }
  17674. function isTSEntityName(node, opts) {
  17675. if (!node)
  17676. return false;
  17677. const nodeType = node.type;
  17678. if ("Identifier" === nodeType || "TSQualifiedName" === nodeType || nodeType === "Placeholder" && "Identifier" === node.expectedNode) {
  17679. if (typeof opts === "undefined") {
  17680. return true;
  17681. } else {
  17682. return (0, _shallowEqual.default)(node, opts);
  17683. }
  17684. }
  17685. return false;
  17686. }
  17687. function isLiteral(node, opts) {
  17688. if (!node)
  17689. return false;
  17690. const nodeType = node.type;
  17691. if ("StringLiteral" === nodeType || "NumericLiteral" === nodeType || "NullLiteral" === nodeType || "BooleanLiteral" === nodeType || "RegExpLiteral" === nodeType || "TemplateLiteral" === nodeType || "BigIntLiteral" === nodeType || "DecimalLiteral" === nodeType || nodeType === "Placeholder" && "StringLiteral" === node.expectedNode) {
  17692. if (typeof opts === "undefined") {
  17693. return true;
  17694. } else {
  17695. return (0, _shallowEqual.default)(node, opts);
  17696. }
  17697. }
  17698. return false;
  17699. }
  17700. function isImmutable(node, opts) {
  17701. if (!node)
  17702. return false;
  17703. const nodeType = node.type;
  17704. if ("StringLiteral" === nodeType || "NumericLiteral" === nodeType || "NullLiteral" === nodeType || "BooleanLiteral" === nodeType || "BigIntLiteral" === nodeType || "JSXAttribute" === nodeType || "JSXClosingElement" === nodeType || "JSXElement" === nodeType || "JSXExpressionContainer" === nodeType || "JSXSpreadChild" === nodeType || "JSXOpeningElement" === nodeType || "JSXText" === nodeType || "JSXFragment" === nodeType || "JSXOpeningFragment" === nodeType || "JSXClosingFragment" === nodeType || "DecimalLiteral" === nodeType || nodeType === "Placeholder" && "StringLiteral" === node.expectedNode) {
  17705. if (typeof opts === "undefined") {
  17706. return true;
  17707. } else {
  17708. return (0, _shallowEqual.default)(node, opts);
  17709. }
  17710. }
  17711. return false;
  17712. }
  17713. function isUserWhitespacable(node, opts) {
  17714. if (!node)
  17715. return false;
  17716. const nodeType = node.type;
  17717. if ("ObjectMethod" === nodeType || "ObjectProperty" === nodeType || "ObjectTypeInternalSlot" === nodeType || "ObjectTypeCallProperty" === nodeType || "ObjectTypeIndexer" === nodeType || "ObjectTypeProperty" === nodeType || "ObjectTypeSpreadProperty" === nodeType) {
  17718. if (typeof opts === "undefined") {
  17719. return true;
  17720. } else {
  17721. return (0, _shallowEqual.default)(node, opts);
  17722. }
  17723. }
  17724. return false;
  17725. }
  17726. function isMethod(node, opts) {
  17727. if (!node)
  17728. return false;
  17729. const nodeType = node.type;
  17730. if ("ObjectMethod" === nodeType || "ClassMethod" === nodeType || "ClassPrivateMethod" === nodeType) {
  17731. if (typeof opts === "undefined") {
  17732. return true;
  17733. } else {
  17734. return (0, _shallowEqual.default)(node, opts);
  17735. }
  17736. }
  17737. return false;
  17738. }
  17739. function isObjectMember(node, opts) {
  17740. if (!node)
  17741. return false;
  17742. const nodeType = node.type;
  17743. if ("ObjectMethod" === nodeType || "ObjectProperty" === nodeType) {
  17744. if (typeof opts === "undefined") {
  17745. return true;
  17746. } else {
  17747. return (0, _shallowEqual.default)(node, opts);
  17748. }
  17749. }
  17750. return false;
  17751. }
  17752. function isProperty(node, opts) {
  17753. if (!node)
  17754. return false;
  17755. const nodeType = node.type;
  17756. if ("ObjectProperty" === nodeType || "ClassProperty" === nodeType || "ClassPrivateProperty" === nodeType) {
  17757. if (typeof opts === "undefined") {
  17758. return true;
  17759. } else {
  17760. return (0, _shallowEqual.default)(node, opts);
  17761. }
  17762. }
  17763. return false;
  17764. }
  17765. function isUnaryLike(node, opts) {
  17766. if (!node)
  17767. return false;
  17768. const nodeType = node.type;
  17769. if ("UnaryExpression" === nodeType || "SpreadElement" === nodeType) {
  17770. if (typeof opts === "undefined") {
  17771. return true;
  17772. } else {
  17773. return (0, _shallowEqual.default)(node, opts);
  17774. }
  17775. }
  17776. return false;
  17777. }
  17778. function isPattern(node, opts) {
  17779. if (!node)
  17780. return false;
  17781. const nodeType = node.type;
  17782. if ("AssignmentPattern" === nodeType || "ArrayPattern" === nodeType || "ObjectPattern" === nodeType || nodeType === "Placeholder" && "Pattern" === node.expectedNode) {
  17783. if (typeof opts === "undefined") {
  17784. return true;
  17785. } else {
  17786. return (0, _shallowEqual.default)(node, opts);
  17787. }
  17788. }
  17789. return false;
  17790. }
  17791. function isClass(node, opts) {
  17792. if (!node)
  17793. return false;
  17794. const nodeType = node.type;
  17795. if ("ClassExpression" === nodeType || "ClassDeclaration" === nodeType) {
  17796. if (typeof opts === "undefined") {
  17797. return true;
  17798. } else {
  17799. return (0, _shallowEqual.default)(node, opts);
  17800. }
  17801. }
  17802. return false;
  17803. }
  17804. function isModuleDeclaration(node, opts) {
  17805. if (!node)
  17806. return false;
  17807. const nodeType = node.type;
  17808. if ("ExportAllDeclaration" === nodeType || "ExportDefaultDeclaration" === nodeType || "ExportNamedDeclaration" === nodeType || "ImportDeclaration" === nodeType) {
  17809. if (typeof opts === "undefined") {
  17810. return true;
  17811. } else {
  17812. return (0, _shallowEqual.default)(node, opts);
  17813. }
  17814. }
  17815. return false;
  17816. }
  17817. function isExportDeclaration(node, opts) {
  17818. if (!node)
  17819. return false;
  17820. const nodeType = node.type;
  17821. if ("ExportAllDeclaration" === nodeType || "ExportDefaultDeclaration" === nodeType || "ExportNamedDeclaration" === nodeType) {
  17822. if (typeof opts === "undefined") {
  17823. return true;
  17824. } else {
  17825. return (0, _shallowEqual.default)(node, opts);
  17826. }
  17827. }
  17828. return false;
  17829. }
  17830. function isModuleSpecifier(node, opts) {
  17831. if (!node)
  17832. return false;
  17833. const nodeType = node.type;
  17834. if ("ExportSpecifier" === nodeType || "ImportDefaultSpecifier" === nodeType || "ImportNamespaceSpecifier" === nodeType || "ImportSpecifier" === nodeType || "ExportNamespaceSpecifier" === nodeType || "ExportDefaultSpecifier" === nodeType) {
  17835. if (typeof opts === "undefined") {
  17836. return true;
  17837. } else {
  17838. return (0, _shallowEqual.default)(node, opts);
  17839. }
  17840. }
  17841. return false;
  17842. }
  17843. function isFlow(node, opts) {
  17844. if (!node)
  17845. return false;
  17846. const nodeType = node.type;
  17847. if ("AnyTypeAnnotation" === nodeType || "ArrayTypeAnnotation" === nodeType || "BooleanTypeAnnotation" === nodeType || "BooleanLiteralTypeAnnotation" === nodeType || "NullLiteralTypeAnnotation" === nodeType || "ClassImplements" === nodeType || "DeclareClass" === nodeType || "DeclareFunction" === nodeType || "DeclareInterface" === nodeType || "DeclareModule" === nodeType || "DeclareModuleExports" === nodeType || "DeclareTypeAlias" === nodeType || "DeclareOpaqueType" === nodeType || "DeclareVariable" === nodeType || "DeclareExportDeclaration" === nodeType || "DeclareExportAllDeclaration" === nodeType || "DeclaredPredicate" === nodeType || "ExistsTypeAnnotation" === nodeType || "FunctionTypeAnnotation" === nodeType || "FunctionTypeParam" === nodeType || "GenericTypeAnnotation" === nodeType || "InferredPredicate" === nodeType || "InterfaceExtends" === nodeType || "InterfaceDeclaration" === nodeType || "InterfaceTypeAnnotation" === nodeType || "IntersectionTypeAnnotation" === nodeType || "MixedTypeAnnotation" === nodeType || "EmptyTypeAnnotation" === nodeType || "NullableTypeAnnotation" === nodeType || "NumberLiteralTypeAnnotation" === nodeType || "NumberTypeAnnotation" === nodeType || "ObjectTypeAnnotation" === nodeType || "ObjectTypeInternalSlot" === nodeType || "ObjectTypeCallProperty" === nodeType || "ObjectTypeIndexer" === nodeType || "ObjectTypeProperty" === nodeType || "ObjectTypeSpreadProperty" === nodeType || "OpaqueType" === nodeType || "QualifiedTypeIdentifier" === nodeType || "StringLiteralTypeAnnotation" === nodeType || "StringTypeAnnotation" === nodeType || "SymbolTypeAnnotation" === nodeType || "ThisTypeAnnotation" === nodeType || "TupleTypeAnnotation" === nodeType || "TypeofTypeAnnotation" === nodeType || "TypeAlias" === nodeType || "TypeAnnotation" === nodeType || "TypeCastExpression" === nodeType || "TypeParameter" === nodeType || "TypeParameterDeclaration" === nodeType || "TypeParameterInstantiation" === nodeType || "UnionTypeAnnotation" === nodeType || "Variance" === nodeType || "VoidTypeAnnotation" === nodeType || "IndexedAccessType" === nodeType || "OptionalIndexedAccessType" === nodeType) {
  17848. if (typeof opts === "undefined") {
  17849. return true;
  17850. } else {
  17851. return (0, _shallowEqual.default)(node, opts);
  17852. }
  17853. }
  17854. return false;
  17855. }
  17856. function isFlowType(node, opts) {
  17857. if (!node)
  17858. return false;
  17859. const nodeType = node.type;
  17860. if ("AnyTypeAnnotation" === nodeType || "ArrayTypeAnnotation" === nodeType || "BooleanTypeAnnotation" === nodeType || "BooleanLiteralTypeAnnotation" === nodeType || "NullLiteralTypeAnnotation" === nodeType || "ExistsTypeAnnotation" === nodeType || "FunctionTypeAnnotation" === nodeType || "GenericTypeAnnotation" === nodeType || "InterfaceTypeAnnotation" === nodeType || "IntersectionTypeAnnotation" === nodeType || "MixedTypeAnnotation" === nodeType || "EmptyTypeAnnotation" === nodeType || "NullableTypeAnnotation" === nodeType || "NumberLiteralTypeAnnotation" === nodeType || "NumberTypeAnnotation" === nodeType || "ObjectTypeAnnotation" === nodeType || "StringLiteralTypeAnnotation" === nodeType || "StringTypeAnnotation" === nodeType || "SymbolTypeAnnotation" === nodeType || "ThisTypeAnnotation" === nodeType || "TupleTypeAnnotation" === nodeType || "TypeofTypeAnnotation" === nodeType || "UnionTypeAnnotation" === nodeType || "VoidTypeAnnotation" === nodeType || "IndexedAccessType" === nodeType || "OptionalIndexedAccessType" === nodeType) {
  17861. if (typeof opts === "undefined") {
  17862. return true;
  17863. } else {
  17864. return (0, _shallowEqual.default)(node, opts);
  17865. }
  17866. }
  17867. return false;
  17868. }
  17869. function isFlowBaseAnnotation(node, opts) {
  17870. if (!node)
  17871. return false;
  17872. const nodeType = node.type;
  17873. if ("AnyTypeAnnotation" === nodeType || "BooleanTypeAnnotation" === nodeType || "NullLiteralTypeAnnotation" === nodeType || "MixedTypeAnnotation" === nodeType || "EmptyTypeAnnotation" === nodeType || "NumberTypeAnnotation" === nodeType || "StringTypeAnnotation" === nodeType || "SymbolTypeAnnotation" === nodeType || "ThisTypeAnnotation" === nodeType || "VoidTypeAnnotation" === nodeType) {
  17874. if (typeof opts === "undefined") {
  17875. return true;
  17876. } else {
  17877. return (0, _shallowEqual.default)(node, opts);
  17878. }
  17879. }
  17880. return false;
  17881. }
  17882. function isFlowDeclaration(node, opts) {
  17883. if (!node)
  17884. return false;
  17885. const nodeType = node.type;
  17886. if ("DeclareClass" === nodeType || "DeclareFunction" === nodeType || "DeclareInterface" === nodeType || "DeclareModule" === nodeType || "DeclareModuleExports" === nodeType || "DeclareTypeAlias" === nodeType || "DeclareOpaqueType" === nodeType || "DeclareVariable" === nodeType || "DeclareExportDeclaration" === nodeType || "DeclareExportAllDeclaration" === nodeType || "InterfaceDeclaration" === nodeType || "OpaqueType" === nodeType || "TypeAlias" === nodeType) {
  17887. if (typeof opts === "undefined") {
  17888. return true;
  17889. } else {
  17890. return (0, _shallowEqual.default)(node, opts);
  17891. }
  17892. }
  17893. return false;
  17894. }
  17895. function isFlowPredicate(node, opts) {
  17896. if (!node)
  17897. return false;
  17898. const nodeType = node.type;
  17899. if ("DeclaredPredicate" === nodeType || "InferredPredicate" === nodeType) {
  17900. if (typeof opts === "undefined") {
  17901. return true;
  17902. } else {
  17903. return (0, _shallowEqual.default)(node, opts);
  17904. }
  17905. }
  17906. return false;
  17907. }
  17908. function isEnumBody(node, opts) {
  17909. if (!node)
  17910. return false;
  17911. const nodeType = node.type;
  17912. if ("EnumBooleanBody" === nodeType || "EnumNumberBody" === nodeType || "EnumStringBody" === nodeType || "EnumSymbolBody" === nodeType) {
  17913. if (typeof opts === "undefined") {
  17914. return true;
  17915. } else {
  17916. return (0, _shallowEqual.default)(node, opts);
  17917. }
  17918. }
  17919. return false;
  17920. }
  17921. function isEnumMember(node, opts) {
  17922. if (!node)
  17923. return false;
  17924. const nodeType = node.type;
  17925. if ("EnumBooleanMember" === nodeType || "EnumNumberMember" === nodeType || "EnumStringMember" === nodeType || "EnumDefaultedMember" === nodeType) {
  17926. if (typeof opts === "undefined") {
  17927. return true;
  17928. } else {
  17929. return (0, _shallowEqual.default)(node, opts);
  17930. }
  17931. }
  17932. return false;
  17933. }
  17934. function isJSX(node, opts) {
  17935. if (!node)
  17936. return false;
  17937. const nodeType = node.type;
  17938. if ("JSXAttribute" === nodeType || "JSXClosingElement" === nodeType || "JSXElement" === nodeType || "JSXEmptyExpression" === nodeType || "JSXExpressionContainer" === nodeType || "JSXSpreadChild" === nodeType || "JSXIdentifier" === nodeType || "JSXMemberExpression" === nodeType || "JSXNamespacedName" === nodeType || "JSXOpeningElement" === nodeType || "JSXSpreadAttribute" === nodeType || "JSXText" === nodeType || "JSXFragment" === nodeType || "JSXOpeningFragment" === nodeType || "JSXClosingFragment" === nodeType) {
  17939. if (typeof opts === "undefined") {
  17940. return true;
  17941. } else {
  17942. return (0, _shallowEqual.default)(node, opts);
  17943. }
  17944. }
  17945. return false;
  17946. }
  17947. function isPrivate(node, opts) {
  17948. if (!node)
  17949. return false;
  17950. const nodeType = node.type;
  17951. if ("ClassPrivateProperty" === nodeType || "ClassPrivateMethod" === nodeType || "PrivateName" === nodeType) {
  17952. if (typeof opts === "undefined") {
  17953. return true;
  17954. } else {
  17955. return (0, _shallowEqual.default)(node, opts);
  17956. }
  17957. }
  17958. return false;
  17959. }
  17960. function isTSTypeElement(node, opts) {
  17961. if (!node)
  17962. return false;
  17963. const nodeType = node.type;
  17964. if ("TSCallSignatureDeclaration" === nodeType || "TSConstructSignatureDeclaration" === nodeType || "TSPropertySignature" === nodeType || "TSMethodSignature" === nodeType || "TSIndexSignature" === nodeType) {
  17965. if (typeof opts === "undefined") {
  17966. return true;
  17967. } else {
  17968. return (0, _shallowEqual.default)(node, opts);
  17969. }
  17970. }
  17971. return false;
  17972. }
  17973. function isTSType(node, opts) {
  17974. if (!node)
  17975. return false;
  17976. const nodeType = node.type;
  17977. if ("TSAnyKeyword" === nodeType || "TSBooleanKeyword" === nodeType || "TSBigIntKeyword" === nodeType || "TSIntrinsicKeyword" === nodeType || "TSNeverKeyword" === nodeType || "TSNullKeyword" === nodeType || "TSNumberKeyword" === nodeType || "TSObjectKeyword" === nodeType || "TSStringKeyword" === nodeType || "TSSymbolKeyword" === nodeType || "TSUndefinedKeyword" === nodeType || "TSUnknownKeyword" === nodeType || "TSVoidKeyword" === nodeType || "TSThisType" === nodeType || "TSFunctionType" === nodeType || "TSConstructorType" === nodeType || "TSTypeReference" === nodeType || "TSTypePredicate" === nodeType || "TSTypeQuery" === nodeType || "TSTypeLiteral" === nodeType || "TSArrayType" === nodeType || "TSTupleType" === nodeType || "TSOptionalType" === nodeType || "TSRestType" === nodeType || "TSUnionType" === nodeType || "TSIntersectionType" === nodeType || "TSConditionalType" === nodeType || "TSInferType" === nodeType || "TSParenthesizedType" === nodeType || "TSTypeOperator" === nodeType || "TSIndexedAccessType" === nodeType || "TSMappedType" === nodeType || "TSLiteralType" === nodeType || "TSExpressionWithTypeArguments" === nodeType || "TSImportType" === nodeType) {
  17978. if (typeof opts === "undefined") {
  17979. return true;
  17980. } else {
  17981. return (0, _shallowEqual.default)(node, opts);
  17982. }
  17983. }
  17984. return false;
  17985. }
  17986. function isTSBaseType(node, opts) {
  17987. if (!node)
  17988. return false;
  17989. const nodeType = node.type;
  17990. if ("TSAnyKeyword" === nodeType || "TSBooleanKeyword" === nodeType || "TSBigIntKeyword" === nodeType || "TSIntrinsicKeyword" === nodeType || "TSNeverKeyword" === nodeType || "TSNullKeyword" === nodeType || "TSNumberKeyword" === nodeType || "TSObjectKeyword" === nodeType || "TSStringKeyword" === nodeType || "TSSymbolKeyword" === nodeType || "TSUndefinedKeyword" === nodeType || "TSUnknownKeyword" === nodeType || "TSVoidKeyword" === nodeType || "TSThisType" === nodeType || "TSLiteralType" === nodeType) {
  17991. if (typeof opts === "undefined") {
  17992. return true;
  17993. } else {
  17994. return (0, _shallowEqual.default)(node, opts);
  17995. }
  17996. }
  17997. return false;
  17998. }
  17999. function isNumberLiteral(node, opts) {
  18000. console.trace("The node type NumberLiteral has been renamed to NumericLiteral");
  18001. if (!node)
  18002. return false;
  18003. const nodeType = node.type;
  18004. if (nodeType === "NumberLiteral") {
  18005. if (typeof opts === "undefined") {
  18006. return true;
  18007. } else {
  18008. return (0, _shallowEqual.default)(node, opts);
  18009. }
  18010. }
  18011. return false;
  18012. }
  18013. function isRegexLiteral(node, opts) {
  18014. console.trace("The node type RegexLiteral has been renamed to RegExpLiteral");
  18015. if (!node)
  18016. return false;
  18017. const nodeType = node.type;
  18018. if (nodeType === "RegexLiteral") {
  18019. if (typeof opts === "undefined") {
  18020. return true;
  18021. } else {
  18022. return (0, _shallowEqual.default)(node, opts);
  18023. }
  18024. }
  18025. return false;
  18026. }
  18027. function isRestProperty(node, opts) {
  18028. console.trace("The node type RestProperty has been renamed to RestElement");
  18029. if (!node)
  18030. return false;
  18031. const nodeType = node.type;
  18032. if (nodeType === "RestProperty") {
  18033. if (typeof opts === "undefined") {
  18034. return true;
  18035. } else {
  18036. return (0, _shallowEqual.default)(node, opts);
  18037. }
  18038. }
  18039. return false;
  18040. }
  18041. function isSpreadProperty(node, opts) {
  18042. console.trace("The node type SpreadProperty has been renamed to SpreadElement");
  18043. if (!node)
  18044. return false;
  18045. const nodeType = node.type;
  18046. if (nodeType === "SpreadProperty") {
  18047. if (typeof opts === "undefined") {
  18048. return true;
  18049. } else {
  18050. return (0, _shallowEqual.default)(node, opts);
  18051. }
  18052. }
  18053. return false;
  18054. }
  18055. }
  18056. });
  18057. // node_modules/estree-to-babel/node_modules/@babel/types/lib/validators/matchesPattern.js
  18058. var require_matchesPattern2 = __commonJS({
  18059. "node_modules/estree-to-babel/node_modules/@babel/types/lib/validators/matchesPattern.js"(exports) {
  18060. "use strict";
  18061. Object.defineProperty(exports, "__esModule", {
  18062. value: true
  18063. });
  18064. exports.default = matchesPattern;
  18065. var _generated = require_generated6();
  18066. function matchesPattern(member, match, allowPartial) {
  18067. if (!(0, _generated.isMemberExpression)(member))
  18068. return false;
  18069. const parts = Array.isArray(match) ? match : match.split(".");
  18070. const nodes = [];
  18071. let node;
  18072. for (node = member; (0, _generated.isMemberExpression)(node); node = node.object) {
  18073. nodes.push(node.property);
  18074. }
  18075. nodes.push(node);
  18076. if (nodes.length < parts.length)
  18077. return false;
  18078. if (!allowPartial && nodes.length > parts.length)
  18079. return false;
  18080. for (let i = 0, j = nodes.length - 1; i < parts.length; i++, j--) {
  18081. const node2 = nodes[j];
  18082. let value;
  18083. if ((0, _generated.isIdentifier)(node2)) {
  18084. value = node2.name;
  18085. } else if ((0, _generated.isStringLiteral)(node2)) {
  18086. value = node2.value;
  18087. } else if ((0, _generated.isThisExpression)(node2)) {
  18088. value = "this";
  18089. } else {
  18090. return false;
  18091. }
  18092. if (parts[i] !== value)
  18093. return false;
  18094. }
  18095. return true;
  18096. }
  18097. }
  18098. });
  18099. // node_modules/estree-to-babel/node_modules/@babel/types/lib/validators/buildMatchMemberExpression.js
  18100. var require_buildMatchMemberExpression2 = __commonJS({
  18101. "node_modules/estree-to-babel/node_modules/@babel/types/lib/validators/buildMatchMemberExpression.js"(exports) {
  18102. "use strict";
  18103. Object.defineProperty(exports, "__esModule", {
  18104. value: true
  18105. });
  18106. exports.default = buildMatchMemberExpression;
  18107. var _matchesPattern = require_matchesPattern2();
  18108. function buildMatchMemberExpression(match, allowPartial) {
  18109. const parts = match.split(".");
  18110. return (member) => (0, _matchesPattern.default)(member, parts, allowPartial);
  18111. }
  18112. }
  18113. });
  18114. // node_modules/estree-to-babel/node_modules/@babel/types/lib/validators/react/isReactComponent.js
  18115. var require_isReactComponent2 = __commonJS({
  18116. "node_modules/estree-to-babel/node_modules/@babel/types/lib/validators/react/isReactComponent.js"(exports) {
  18117. "use strict";
  18118. Object.defineProperty(exports, "__esModule", {
  18119. value: true
  18120. });
  18121. exports.default = void 0;
  18122. var _buildMatchMemberExpression = require_buildMatchMemberExpression2();
  18123. var isReactComponent = (0, _buildMatchMemberExpression.default)("React.Component");
  18124. var _default = isReactComponent;
  18125. exports.default = _default;
  18126. }
  18127. });
  18128. // node_modules/estree-to-babel/node_modules/@babel/types/lib/validators/react/isCompatTag.js
  18129. var require_isCompatTag2 = __commonJS({
  18130. "node_modules/estree-to-babel/node_modules/@babel/types/lib/validators/react/isCompatTag.js"(exports) {
  18131. "use strict";
  18132. Object.defineProperty(exports, "__esModule", {
  18133. value: true
  18134. });
  18135. exports.default = isCompatTag;
  18136. function isCompatTag(tagName) {
  18137. return !!tagName && /^[a-z]/.test(tagName);
  18138. }
  18139. }
  18140. });
  18141. // node_modules/estree-to-babel/node_modules/@babel/types/lib/validators/isType.js
  18142. var require_isType2 = __commonJS({
  18143. "node_modules/estree-to-babel/node_modules/@babel/types/lib/validators/isType.js"(exports) {
  18144. "use strict";
  18145. Object.defineProperty(exports, "__esModule", {
  18146. value: true
  18147. });
  18148. exports.default = isType;
  18149. var _definitions = require_definitions2();
  18150. function isType(nodeType, targetType) {
  18151. if (nodeType === targetType)
  18152. return true;
  18153. if (_definitions.ALIAS_KEYS[targetType])
  18154. return false;
  18155. const aliases = _definitions.FLIPPED_ALIAS_KEYS[targetType];
  18156. if (aliases) {
  18157. if (aliases[0] === nodeType)
  18158. return true;
  18159. for (const alias of aliases) {
  18160. if (nodeType === alias)
  18161. return true;
  18162. }
  18163. }
  18164. return false;
  18165. }
  18166. }
  18167. });
  18168. // node_modules/estree-to-babel/node_modules/@babel/types/lib/validators/isPlaceholderType.js
  18169. var require_isPlaceholderType2 = __commonJS({
  18170. "node_modules/estree-to-babel/node_modules/@babel/types/lib/validators/isPlaceholderType.js"(exports) {
  18171. "use strict";
  18172. Object.defineProperty(exports, "__esModule", {
  18173. value: true
  18174. });
  18175. exports.default = isPlaceholderType;
  18176. var _definitions = require_definitions2();
  18177. function isPlaceholderType(placeholderType, targetType) {
  18178. if (placeholderType === targetType)
  18179. return true;
  18180. const aliases = _definitions.PLACEHOLDERS_ALIAS[placeholderType];
  18181. if (aliases) {
  18182. for (const alias of aliases) {
  18183. if (targetType === alias)
  18184. return true;
  18185. }
  18186. }
  18187. return false;
  18188. }
  18189. }
  18190. });
  18191. // node_modules/estree-to-babel/node_modules/@babel/types/lib/validators/is.js
  18192. var require_is2 = __commonJS({
  18193. "node_modules/estree-to-babel/node_modules/@babel/types/lib/validators/is.js"(exports) {
  18194. "use strict";
  18195. Object.defineProperty(exports, "__esModule", {
  18196. value: true
  18197. });
  18198. exports.default = is;
  18199. var _shallowEqual = require_shallowEqual2();
  18200. var _isType = require_isType2();
  18201. var _isPlaceholderType = require_isPlaceholderType2();
  18202. var _definitions = require_definitions2();
  18203. function is(type, node, opts) {
  18204. if (!node)
  18205. return false;
  18206. const matches = (0, _isType.default)(node.type, type);
  18207. if (!matches) {
  18208. if (!opts && node.type === "Placeholder" && type in _definitions.FLIPPED_ALIAS_KEYS) {
  18209. return (0, _isPlaceholderType.default)(node.expectedNode, type);
  18210. }
  18211. return false;
  18212. }
  18213. if (typeof opts === "undefined") {
  18214. return true;
  18215. } else {
  18216. return (0, _shallowEqual.default)(node, opts);
  18217. }
  18218. }
  18219. }
  18220. });
  18221. // node_modules/estree-to-babel/node_modules/@babel/helper-validator-identifier/lib/identifier.js
  18222. var require_identifier2 = __commonJS({
  18223. "node_modules/estree-to-babel/node_modules/@babel/helper-validator-identifier/lib/identifier.js"(exports) {
  18224. "use strict";
  18225. Object.defineProperty(exports, "__esModule", {
  18226. value: true
  18227. });
  18228. exports.isIdentifierStart = isIdentifierStart2;
  18229. exports.isIdentifierChar = isIdentifierChar2;
  18230. exports.isIdentifierName = isIdentifierName;
  18231. var nonASCIIidentifierStartChars2 = "\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u08A0-\u08B4\u08B6-\u08C7\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1878\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309B-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u31BF\u31F0-\u31FF\u3400-\u4DBF\u4E00-\u9FFC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7BF\uA7C2-\uA7CA\uA7F5-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC";
  18232. var nonASCIIidentifierChars2 = "\u200C\u200D\xB7\u0300-\u036F\u0387\u0483-\u0487\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u0669\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u06F0-\u06F9\u0711\u0730-\u074A\u07A6-\u07B0\u07C0-\u07C9\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u08D3-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0966-\u096F\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u09E6-\u09EF\u09FE\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A66-\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0AE6-\u0AEF\u0AFA-\u0AFF\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B55-\u0B57\u0B62\u0B63\u0B66-\u0B6F\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0BE6-\u0BEF\u0C00-\u0C04\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C66-\u0C6F\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0CE6-\u0CEF\u0D00-\u0D03\u0D3B\u0D3C\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D66-\u0D6F\u0D81-\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0E50-\u0E59\u0EB1\u0EB4-\u0EBC\u0EC8-\u0ECD\u0ED0-\u0ED9\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1040-\u1049\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F-\u109D\u135D-\u135F\u1369-\u1371\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u18A9\u1920-\u192B\u1930-\u193B\u1946-\u194F\u19D0-\u19DA\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AB0-\u1ABD\u1ABF\u1AC0\u1B00-\u1B04\u1B34-\u1B44\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BB0-\u1BB9\u1BE6-\u1BF3\u1C24-\u1C37\u1C40-\u1C49\u1C50-\u1C59\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF4\u1CF7-\u1CF9\u1DC0-\u1DF9\u1DFB-\u1DFF\u203F\u2040\u2054\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA620-\uA629\uA66F\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA82C\uA880\uA881\uA8B4-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F1\uA8FF-\uA909\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9D0-\uA9D9\uA9E5\uA9F0-\uA9F9\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA50-\uAA59\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uABF0-\uABF9\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFF10-\uFF19\uFF3F";
  18233. var nonASCIIidentifierStart2 = new RegExp("[" + nonASCIIidentifierStartChars2 + "]");
  18234. var nonASCIIidentifier2 = new RegExp("[" + nonASCIIidentifierStartChars2 + nonASCIIidentifierChars2 + "]");
  18235. nonASCIIidentifierStartChars2 = nonASCIIidentifierChars2 = null;
  18236. var astralIdentifierStartCodes2 = [0, 11, 2, 25, 2, 18, 2, 1, 2, 14, 3, 13, 35, 122, 70, 52, 268, 28, 4, 48, 48, 31, 14, 29, 6, 37, 11, 29, 3, 35, 5, 7, 2, 4, 43, 157, 19, 35, 5, 35, 5, 39, 9, 51, 157, 310, 10, 21, 11, 7, 153, 5, 3, 0, 2, 43, 2, 1, 4, 0, 3, 22, 11, 22, 10, 30, 66, 18, 2, 1, 11, 21, 11, 25, 71, 55, 7, 1, 65, 0, 16, 3, 2, 2, 2, 28, 43, 28, 4, 28, 36, 7, 2, 27, 28, 53, 11, 21, 11, 18, 14, 17, 111, 72, 56, 50, 14, 50, 14, 35, 349, 41, 7, 1, 79, 28, 11, 0, 9, 21, 107, 20, 28, 22, 13, 52, 76, 44, 33, 24, 27, 35, 30, 0, 3, 0, 9, 34, 4, 0, 13, 47, 15, 3, 22, 0, 2, 0, 36, 17, 2, 24, 85, 6, 2, 0, 2, 3, 2, 14, 2, 9, 8, 46, 39, 7, 3, 1, 3, 21, 2, 6, 2, 1, 2, 4, 4, 0, 19, 0, 13, 4, 159, 52, 19, 3, 21, 2, 31, 47, 21, 1, 2, 0, 185, 46, 42, 3, 37, 47, 21, 0, 60, 42, 14, 0, 72, 26, 230, 43, 117, 63, 32, 7, 3, 0, 3, 7, 2, 1, 2, 23, 16, 0, 2, 0, 95, 7, 3, 38, 17, 0, 2, 0, 29, 0, 11, 39, 8, 0, 22, 0, 12, 45, 20, 0, 35, 56, 264, 8, 2, 36, 18, 0, 50, 29, 113, 6, 2, 1, 2, 37, 22, 0, 26, 5, 2, 1, 2, 31, 15, 0, 328, 18, 190, 0, 80, 921, 103, 110, 18, 195, 2749, 1070, 4050, 582, 8634, 568, 8, 30, 114, 29, 19, 47, 17, 3, 32, 20, 6, 18, 689, 63, 129, 74, 6, 0, 67, 12, 65, 1, 2, 0, 29, 6135, 9, 1237, 43, 8, 8952, 286, 50, 2, 18, 3, 9, 395, 2309, 106, 6, 12, 4, 8, 8, 9, 5991, 84, 2, 70, 2, 1, 3, 0, 3, 1, 3, 3, 2, 11, 2, 0, 2, 6, 2, 64, 2, 3, 3, 7, 2, 6, 2, 27, 2, 3, 2, 4, 2, 0, 4, 6, 2, 339, 3, 24, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 7, 2357, 44, 11, 6, 17, 0, 370, 43, 1301, 196, 60, 67, 8, 0, 1205, 3, 2, 26, 2, 1, 2, 0, 3, 0, 2, 9, 2, 3, 2, 0, 2, 0, 7, 0, 5, 0, 2, 0, 2, 0, 2, 2, 2, 1, 2, 0, 3, 0, 2, 0, 2, 0, 2, 0, 2, 0, 2, 1, 2, 0, 3, 3, 2, 6, 2, 3, 2, 3, 2, 0, 2, 9, 2, 16, 6, 2, 2, 4, 2, 16, 4421, 42717, 35, 4148, 12, 221, 3, 5761, 15, 7472, 3104, 541, 1507, 4938];
  18237. var astralIdentifierCodes2 = [509, 0, 227, 0, 150, 4, 294, 9, 1368, 2, 2, 1, 6, 3, 41, 2, 5, 0, 166, 1, 574, 3, 9, 9, 370, 1, 154, 10, 176, 2, 54, 14, 32, 9, 16, 3, 46, 10, 54, 9, 7, 2, 37, 13, 2, 9, 6, 1, 45, 0, 13, 2, 49, 13, 9, 3, 2, 11, 83, 11, 7, 0, 161, 11, 6, 9, 7, 3, 56, 1, 2, 6, 3, 1, 3, 2, 10, 0, 11, 1, 3, 6, 4, 4, 193, 17, 10, 9, 5, 0, 82, 19, 13, 9, 214, 6, 3, 8, 28, 1, 83, 16, 16, 9, 82, 12, 9, 9, 84, 14, 5, 9, 243, 14, 166, 9, 71, 5, 2, 1, 3, 3, 2, 0, 2, 1, 13, 9, 120, 6, 3, 6, 4, 0, 29, 9, 41, 6, 2, 3, 9, 0, 10, 10, 47, 15, 406, 7, 2, 7, 17, 9, 57, 21, 2, 13, 123, 5, 4, 0, 2, 1, 2, 6, 2, 0, 9, 9, 49, 4, 2, 1, 2, 4, 9, 9, 330, 3, 19306, 9, 135, 4, 60, 6, 26, 9, 1014, 0, 2, 54, 8, 3, 82, 0, 12, 1, 19628, 1, 5319, 4, 4, 5, 9, 7, 3, 6, 31, 3, 149, 2, 1418, 49, 513, 54, 5, 49, 9, 0, 15, 0, 23, 4, 2, 14, 1361, 6, 2, 16, 3, 6, 2, 1, 2, 4, 262, 6, 10, 9, 419, 13, 1495, 6, 110, 6, 6, 9, 4759, 9, 787719, 239];
  18238. function isInAstralSet2(code2, set) {
  18239. let pos = 65536;
  18240. for (let i = 0, length = set.length; i < length; i += 2) {
  18241. pos += set[i];
  18242. if (pos > code2)
  18243. return false;
  18244. pos += set[i + 1];
  18245. if (pos >= code2)
  18246. return true;
  18247. }
  18248. return false;
  18249. }
  18250. function isIdentifierStart2(code2) {
  18251. if (code2 < 65)
  18252. return code2 === 36;
  18253. if (code2 <= 90)
  18254. return true;
  18255. if (code2 < 97)
  18256. return code2 === 95;
  18257. if (code2 <= 122)
  18258. return true;
  18259. if (code2 <= 65535) {
  18260. return code2 >= 170 && nonASCIIidentifierStart2.test(String.fromCharCode(code2));
  18261. }
  18262. return isInAstralSet2(code2, astralIdentifierStartCodes2);
  18263. }
  18264. function isIdentifierChar2(code2) {
  18265. if (code2 < 48)
  18266. return code2 === 36;
  18267. if (code2 < 58)
  18268. return true;
  18269. if (code2 < 65)
  18270. return false;
  18271. if (code2 <= 90)
  18272. return true;
  18273. if (code2 < 97)
  18274. return code2 === 95;
  18275. if (code2 <= 122)
  18276. return true;
  18277. if (code2 <= 65535) {
  18278. return code2 >= 170 && nonASCIIidentifier2.test(String.fromCharCode(code2));
  18279. }
  18280. return isInAstralSet2(code2, astralIdentifierStartCodes2) || isInAstralSet2(code2, astralIdentifierCodes2);
  18281. }
  18282. function isIdentifierName(name2) {
  18283. let isFirst = true;
  18284. for (let i = 0; i < name2.length; i++) {
  18285. let cp = name2.charCodeAt(i);
  18286. if ((cp & 64512) === 55296 && i + 1 < name2.length) {
  18287. const trail = name2.charCodeAt(++i);
  18288. if ((trail & 64512) === 56320) {
  18289. cp = 65536 + ((cp & 1023) << 10) + (trail & 1023);
  18290. }
  18291. }
  18292. if (isFirst) {
  18293. isFirst = false;
  18294. if (!isIdentifierStart2(cp)) {
  18295. return false;
  18296. }
  18297. } else if (!isIdentifierChar2(cp)) {
  18298. return false;
  18299. }
  18300. }
  18301. return !isFirst;
  18302. }
  18303. }
  18304. });
  18305. // node_modules/estree-to-babel/node_modules/@babel/helper-validator-identifier/lib/keyword.js
  18306. var require_keyword2 = __commonJS({
  18307. "node_modules/estree-to-babel/node_modules/@babel/helper-validator-identifier/lib/keyword.js"(exports) {
  18308. "use strict";
  18309. Object.defineProperty(exports, "__esModule", {
  18310. value: true
  18311. });
  18312. exports.isReservedWord = isReservedWord;
  18313. exports.isStrictReservedWord = isStrictReservedWord;
  18314. exports.isStrictBindOnlyReservedWord = isStrictBindOnlyReservedWord;
  18315. exports.isStrictBindReservedWord = isStrictBindReservedWord;
  18316. exports.isKeyword = isKeyword;
  18317. var reservedWords2 = {
  18318. keyword: ["break", "case", "catch", "continue", "debugger", "default", "do", "else", "finally", "for", "function", "if", "return", "switch", "throw", "try", "var", "const", "while", "with", "new", "this", "super", "class", "extends", "export", "import", "null", "true", "false", "in", "instanceof", "typeof", "void", "delete"],
  18319. strict: ["implements", "interface", "let", "package", "private", "protected", "public", "static", "yield"],
  18320. strictBind: ["eval", "arguments"]
  18321. };
  18322. var keywords2 = new Set(reservedWords2.keyword);
  18323. var reservedWordsStrictSet = new Set(reservedWords2.strict);
  18324. var reservedWordsStrictBindSet = new Set(reservedWords2.strictBind);
  18325. function isReservedWord(word, inModule) {
  18326. return inModule && word === "await" || word === "enum";
  18327. }
  18328. function isStrictReservedWord(word, inModule) {
  18329. return isReservedWord(word, inModule) || reservedWordsStrictSet.has(word);
  18330. }
  18331. function isStrictBindOnlyReservedWord(word) {
  18332. return reservedWordsStrictBindSet.has(word);
  18333. }
  18334. function isStrictBindReservedWord(word, inModule) {
  18335. return isStrictReservedWord(word, inModule) || isStrictBindOnlyReservedWord(word);
  18336. }
  18337. function isKeyword(word) {
  18338. return keywords2.has(word);
  18339. }
  18340. }
  18341. });
  18342. // node_modules/estree-to-babel/node_modules/@babel/helper-validator-identifier/lib/index.js
  18343. var require_lib3 = __commonJS({
  18344. "node_modules/estree-to-babel/node_modules/@babel/helper-validator-identifier/lib/index.js"(exports) {
  18345. "use strict";
  18346. Object.defineProperty(exports, "__esModule", {
  18347. value: true
  18348. });
  18349. Object.defineProperty(exports, "isIdentifierName", {
  18350. enumerable: true,
  18351. get: function() {
  18352. return _identifier.isIdentifierName;
  18353. }
  18354. });
  18355. Object.defineProperty(exports, "isIdentifierChar", {
  18356. enumerable: true,
  18357. get: function() {
  18358. return _identifier.isIdentifierChar;
  18359. }
  18360. });
  18361. Object.defineProperty(exports, "isIdentifierStart", {
  18362. enumerable: true,
  18363. get: function() {
  18364. return _identifier.isIdentifierStart;
  18365. }
  18366. });
  18367. Object.defineProperty(exports, "isReservedWord", {
  18368. enumerable: true,
  18369. get: function() {
  18370. return _keyword.isReservedWord;
  18371. }
  18372. });
  18373. Object.defineProperty(exports, "isStrictBindOnlyReservedWord", {
  18374. enumerable: true,
  18375. get: function() {
  18376. return _keyword.isStrictBindOnlyReservedWord;
  18377. }
  18378. });
  18379. Object.defineProperty(exports, "isStrictBindReservedWord", {
  18380. enumerable: true,
  18381. get: function() {
  18382. return _keyword.isStrictBindReservedWord;
  18383. }
  18384. });
  18385. Object.defineProperty(exports, "isStrictReservedWord", {
  18386. enumerable: true,
  18387. get: function() {
  18388. return _keyword.isStrictReservedWord;
  18389. }
  18390. });
  18391. Object.defineProperty(exports, "isKeyword", {
  18392. enumerable: true,
  18393. get: function() {
  18394. return _keyword.isKeyword;
  18395. }
  18396. });
  18397. var _identifier = require_identifier2();
  18398. var _keyword = require_keyword2();
  18399. }
  18400. });
  18401. // node_modules/estree-to-babel/node_modules/@babel/types/lib/validators/isValidIdentifier.js
  18402. var require_isValidIdentifier2 = __commonJS({
  18403. "node_modules/estree-to-babel/node_modules/@babel/types/lib/validators/isValidIdentifier.js"(exports) {
  18404. "use strict";
  18405. Object.defineProperty(exports, "__esModule", {
  18406. value: true
  18407. });
  18408. exports.default = isValidIdentifier;
  18409. var _helperValidatorIdentifier = require_lib3();
  18410. function isValidIdentifier(name2, reserved = true) {
  18411. if (typeof name2 !== "string")
  18412. return false;
  18413. if (reserved) {
  18414. if ((0, _helperValidatorIdentifier.isKeyword)(name2) || (0, _helperValidatorIdentifier.isStrictReservedWord)(name2, true)) {
  18415. return false;
  18416. }
  18417. }
  18418. return (0, _helperValidatorIdentifier.isIdentifierName)(name2);
  18419. }
  18420. }
  18421. });
  18422. // node_modules/estree-to-babel/node_modules/@babel/types/lib/constants/index.js
  18423. var require_constants2 = __commonJS({
  18424. "node_modules/estree-to-babel/node_modules/@babel/types/lib/constants/index.js"(exports) {
  18425. "use strict";
  18426. Object.defineProperty(exports, "__esModule", {
  18427. value: true
  18428. });
  18429. exports.NOT_LOCAL_BINDING = exports.BLOCK_SCOPED_SYMBOL = exports.INHERIT_KEYS = exports.UNARY_OPERATORS = exports.STRING_UNARY_OPERATORS = exports.NUMBER_UNARY_OPERATORS = exports.BOOLEAN_UNARY_OPERATORS = exports.ASSIGNMENT_OPERATORS = exports.BINARY_OPERATORS = exports.NUMBER_BINARY_OPERATORS = exports.BOOLEAN_BINARY_OPERATORS = exports.COMPARISON_BINARY_OPERATORS = exports.EQUALITY_BINARY_OPERATORS = exports.BOOLEAN_NUMBER_BINARY_OPERATORS = exports.UPDATE_OPERATORS = exports.LOGICAL_OPERATORS = exports.COMMENT_KEYS = exports.FOR_INIT_KEYS = exports.FLATTENABLE_KEYS = exports.STATEMENT_OR_BLOCK_KEYS = void 0;
  18430. var STATEMENT_OR_BLOCK_KEYS = ["consequent", "body", "alternate"];
  18431. exports.STATEMENT_OR_BLOCK_KEYS = STATEMENT_OR_BLOCK_KEYS;
  18432. var FLATTENABLE_KEYS = ["body", "expressions"];
  18433. exports.FLATTENABLE_KEYS = FLATTENABLE_KEYS;
  18434. var FOR_INIT_KEYS = ["left", "init"];
  18435. exports.FOR_INIT_KEYS = FOR_INIT_KEYS;
  18436. var COMMENT_KEYS = ["leadingComments", "trailingComments", "innerComments"];
  18437. exports.COMMENT_KEYS = COMMENT_KEYS;
  18438. var LOGICAL_OPERATORS = ["||", "&&", "??"];
  18439. exports.LOGICAL_OPERATORS = LOGICAL_OPERATORS;
  18440. var UPDATE_OPERATORS = ["++", "--"];
  18441. exports.UPDATE_OPERATORS = UPDATE_OPERATORS;
  18442. var BOOLEAN_NUMBER_BINARY_OPERATORS = [">", "<", ">=", "<="];
  18443. exports.BOOLEAN_NUMBER_BINARY_OPERATORS = BOOLEAN_NUMBER_BINARY_OPERATORS;
  18444. var EQUALITY_BINARY_OPERATORS = ["==", "===", "!=", "!=="];
  18445. exports.EQUALITY_BINARY_OPERATORS = EQUALITY_BINARY_OPERATORS;
  18446. var COMPARISON_BINARY_OPERATORS = [...EQUALITY_BINARY_OPERATORS, "in", "instanceof"];
  18447. exports.COMPARISON_BINARY_OPERATORS = COMPARISON_BINARY_OPERATORS;
  18448. var BOOLEAN_BINARY_OPERATORS = [...COMPARISON_BINARY_OPERATORS, ...BOOLEAN_NUMBER_BINARY_OPERATORS];
  18449. exports.BOOLEAN_BINARY_OPERATORS = BOOLEAN_BINARY_OPERATORS;
  18450. var NUMBER_BINARY_OPERATORS = ["-", "/", "%", "*", "**", "&", "|", ">>", ">>>", "<<", "^"];
  18451. exports.NUMBER_BINARY_OPERATORS = NUMBER_BINARY_OPERATORS;
  18452. var BINARY_OPERATORS = ["+", ...NUMBER_BINARY_OPERATORS, ...BOOLEAN_BINARY_OPERATORS];
  18453. exports.BINARY_OPERATORS = BINARY_OPERATORS;
  18454. var ASSIGNMENT_OPERATORS = ["=", "+=", ...NUMBER_BINARY_OPERATORS.map((op) => op + "="), ...LOGICAL_OPERATORS.map((op) => op + "=")];
  18455. exports.ASSIGNMENT_OPERATORS = ASSIGNMENT_OPERATORS;
  18456. var BOOLEAN_UNARY_OPERATORS = ["delete", "!"];
  18457. exports.BOOLEAN_UNARY_OPERATORS = BOOLEAN_UNARY_OPERATORS;
  18458. var NUMBER_UNARY_OPERATORS = ["+", "-", "~"];
  18459. exports.NUMBER_UNARY_OPERATORS = NUMBER_UNARY_OPERATORS;
  18460. var STRING_UNARY_OPERATORS = ["typeof"];
  18461. exports.STRING_UNARY_OPERATORS = STRING_UNARY_OPERATORS;
  18462. var UNARY_OPERATORS = ["void", "throw", ...BOOLEAN_UNARY_OPERATORS, ...NUMBER_UNARY_OPERATORS, ...STRING_UNARY_OPERATORS];
  18463. exports.UNARY_OPERATORS = UNARY_OPERATORS;
  18464. var INHERIT_KEYS = {
  18465. optional: ["typeAnnotation", "typeParameters", "returnType"],
  18466. force: ["start", "loc", "end"]
  18467. };
  18468. exports.INHERIT_KEYS = INHERIT_KEYS;
  18469. var BLOCK_SCOPED_SYMBOL = Symbol.for("var used to be block scoped");
  18470. exports.BLOCK_SCOPED_SYMBOL = BLOCK_SCOPED_SYMBOL;
  18471. var NOT_LOCAL_BINDING = Symbol.for("should not be considered a local binding");
  18472. exports.NOT_LOCAL_BINDING = NOT_LOCAL_BINDING;
  18473. }
  18474. });
  18475. // node_modules/estree-to-babel/node_modules/@babel/types/lib/validators/validate.js
  18476. var require_validate2 = __commonJS({
  18477. "node_modules/estree-to-babel/node_modules/@babel/types/lib/validators/validate.js"(exports) {
  18478. "use strict";
  18479. Object.defineProperty(exports, "__esModule", {
  18480. value: true
  18481. });
  18482. exports.default = validate;
  18483. exports.validateField = validateField;
  18484. exports.validateChild = validateChild;
  18485. var _definitions = require_definitions2();
  18486. function validate(node, key, val) {
  18487. if (!node)
  18488. return;
  18489. const fields = _definitions.NODE_FIELDS[node.type];
  18490. if (!fields)
  18491. return;
  18492. const field = fields[key];
  18493. validateField(node, key, val, field);
  18494. validateChild(node, key, val);
  18495. }
  18496. function validateField(node, key, val, field) {
  18497. if (!(field != null && field.validate))
  18498. return;
  18499. if (field.optional && val == null)
  18500. return;
  18501. field.validate(node, key, val);
  18502. }
  18503. function validateChild(node, key, val) {
  18504. if (val == null)
  18505. return;
  18506. const validate2 = _definitions.NODE_PARENT_VALIDATIONS[val.type];
  18507. if (!validate2)
  18508. return;
  18509. validate2(node, key, val);
  18510. }
  18511. }
  18512. });
  18513. // node_modules/estree-to-babel/node_modules/@babel/types/lib/definitions/utils.js
  18514. var require_utils2 = __commonJS({
  18515. "node_modules/estree-to-babel/node_modules/@babel/types/lib/definitions/utils.js"(exports) {
  18516. "use strict";
  18517. Object.defineProperty(exports, "__esModule", {
  18518. value: true
  18519. });
  18520. exports.validate = validate;
  18521. exports.typeIs = typeIs;
  18522. exports.validateType = validateType;
  18523. exports.validateOptional = validateOptional;
  18524. exports.validateOptionalType = validateOptionalType;
  18525. exports.arrayOf = arrayOf;
  18526. exports.arrayOfType = arrayOfType;
  18527. exports.validateArrayOfType = validateArrayOfType;
  18528. exports.assertEach = assertEach;
  18529. exports.assertOneOf = assertOneOf;
  18530. exports.assertNodeType = assertNodeType;
  18531. exports.assertNodeOrValueType = assertNodeOrValueType;
  18532. exports.assertValueType = assertValueType;
  18533. exports.assertShape = assertShape;
  18534. exports.assertOptionalChainStart = assertOptionalChainStart;
  18535. exports.chain = chain;
  18536. exports.default = defineType;
  18537. exports.NODE_PARENT_VALIDATIONS = exports.DEPRECATED_KEYS = exports.BUILDER_KEYS = exports.NODE_FIELDS = exports.FLIPPED_ALIAS_KEYS = exports.ALIAS_KEYS = exports.VISITOR_KEYS = void 0;
  18538. var _is = require_is2();
  18539. var _validate = require_validate2();
  18540. var VISITOR_KEYS = {};
  18541. exports.VISITOR_KEYS = VISITOR_KEYS;
  18542. var ALIAS_KEYS = {};
  18543. exports.ALIAS_KEYS = ALIAS_KEYS;
  18544. var FLIPPED_ALIAS_KEYS = {};
  18545. exports.FLIPPED_ALIAS_KEYS = FLIPPED_ALIAS_KEYS;
  18546. var NODE_FIELDS = {};
  18547. exports.NODE_FIELDS = NODE_FIELDS;
  18548. var BUILDER_KEYS = {};
  18549. exports.BUILDER_KEYS = BUILDER_KEYS;
  18550. var DEPRECATED_KEYS = {};
  18551. exports.DEPRECATED_KEYS = DEPRECATED_KEYS;
  18552. var NODE_PARENT_VALIDATIONS = {};
  18553. exports.NODE_PARENT_VALIDATIONS = NODE_PARENT_VALIDATIONS;
  18554. function getType(val) {
  18555. if (Array.isArray(val)) {
  18556. return "array";
  18557. } else if (val === null) {
  18558. return "null";
  18559. } else {
  18560. return typeof val;
  18561. }
  18562. }
  18563. function validate(validate2) {
  18564. return {
  18565. validate: validate2
  18566. };
  18567. }
  18568. function typeIs(typeName) {
  18569. return typeof typeName === "string" ? assertNodeType(typeName) : assertNodeType(...typeName);
  18570. }
  18571. function validateType(typeName) {
  18572. return validate(typeIs(typeName));
  18573. }
  18574. function validateOptional(validate2) {
  18575. return {
  18576. validate: validate2,
  18577. optional: true
  18578. };
  18579. }
  18580. function validateOptionalType(typeName) {
  18581. return {
  18582. validate: typeIs(typeName),
  18583. optional: true
  18584. };
  18585. }
  18586. function arrayOf(elementType) {
  18587. return chain(assertValueType("array"), assertEach(elementType));
  18588. }
  18589. function arrayOfType(typeName) {
  18590. return arrayOf(typeIs(typeName));
  18591. }
  18592. function validateArrayOfType(typeName) {
  18593. return validate(arrayOfType(typeName));
  18594. }
  18595. function assertEach(callback) {
  18596. function validator(node, key, val) {
  18597. if (!Array.isArray(val))
  18598. return;
  18599. for (let i = 0; i < val.length; i++) {
  18600. const subkey = `${key}[${i}]`;
  18601. const v = val[i];
  18602. callback(node, subkey, v);
  18603. if (process.env.BABEL_TYPES_8_BREAKING)
  18604. (0, _validate.validateChild)(node, subkey, v);
  18605. }
  18606. }
  18607. validator.each = callback;
  18608. return validator;
  18609. }
  18610. function assertOneOf(...values) {
  18611. function validate2(node, key, val) {
  18612. if (values.indexOf(val) < 0) {
  18613. throw new TypeError(`Property ${key} expected value to be one of ${JSON.stringify(values)} but got ${JSON.stringify(val)}`);
  18614. }
  18615. }
  18616. validate2.oneOf = values;
  18617. return validate2;
  18618. }
  18619. function assertNodeType(...types2) {
  18620. function validate2(node, key, val) {
  18621. for (const type of types2) {
  18622. if ((0, _is.default)(type, val)) {
  18623. (0, _validate.validateChild)(node, key, val);
  18624. return;
  18625. }
  18626. }
  18627. throw new TypeError(`Property ${key} of ${node.type} expected node to be of a type ${JSON.stringify(types2)} but instead got ${JSON.stringify(val == null ? void 0 : val.type)}`);
  18628. }
  18629. validate2.oneOfNodeTypes = types2;
  18630. return validate2;
  18631. }
  18632. function assertNodeOrValueType(...types2) {
  18633. function validate2(node, key, val) {
  18634. for (const type of types2) {
  18635. if (getType(val) === type || (0, _is.default)(type, val)) {
  18636. (0, _validate.validateChild)(node, key, val);
  18637. return;
  18638. }
  18639. }
  18640. throw new TypeError(`Property ${key} of ${node.type} expected node to be of a type ${JSON.stringify(types2)} but instead got ${JSON.stringify(val == null ? void 0 : val.type)}`);
  18641. }
  18642. validate2.oneOfNodeOrValueTypes = types2;
  18643. return validate2;
  18644. }
  18645. function assertValueType(type) {
  18646. function validate2(node, key, val) {
  18647. const valid2 = getType(val) === type;
  18648. if (!valid2) {
  18649. throw new TypeError(`Property ${key} expected type of ${type} but got ${getType(val)}`);
  18650. }
  18651. }
  18652. validate2.type = type;
  18653. return validate2;
  18654. }
  18655. function assertShape(shape) {
  18656. function validate2(node, key, val) {
  18657. const errors = [];
  18658. for (const property of Object.keys(shape)) {
  18659. try {
  18660. (0, _validate.validateField)(node, property, val[property], shape[property]);
  18661. } catch (error) {
  18662. if (error instanceof TypeError) {
  18663. errors.push(error.message);
  18664. continue;
  18665. }
  18666. throw error;
  18667. }
  18668. }
  18669. if (errors.length) {
  18670. throw new TypeError(`Property ${key} of ${node.type} expected to have the following:
  18671. ${errors.join("\n")}`);
  18672. }
  18673. }
  18674. validate2.shapeOf = shape;
  18675. return validate2;
  18676. }
  18677. function assertOptionalChainStart() {
  18678. function validate2(node) {
  18679. var _current;
  18680. let current2 = node;
  18681. while (node) {
  18682. const {
  18683. type
  18684. } = current2;
  18685. if (type === "OptionalCallExpression") {
  18686. if (current2.optional)
  18687. return;
  18688. current2 = current2.callee;
  18689. continue;
  18690. }
  18691. if (type === "OptionalMemberExpression") {
  18692. if (current2.optional)
  18693. return;
  18694. current2 = current2.object;
  18695. continue;
  18696. }
  18697. break;
  18698. }
  18699. throw new TypeError(`Non-optional ${node.type} must chain from an optional OptionalMemberExpression or OptionalCallExpression. Found chain from ${(_current = current2) == null ? void 0 : _current.type}`);
  18700. }
  18701. return validate2;
  18702. }
  18703. function chain(...fns) {
  18704. function validate2(...args) {
  18705. for (const fn of fns) {
  18706. fn(...args);
  18707. }
  18708. }
  18709. validate2.chainOf = fns;
  18710. if (fns.length >= 2 && "type" in fns[0] && fns[0].type === "array" && !("each" in fns[1])) {
  18711. throw new Error(`An assertValueType("array") validator can only be followed by an assertEach(...) validator.`);
  18712. }
  18713. return validate2;
  18714. }
  18715. var validTypeOpts = ["aliases", "builder", "deprecatedAlias", "fields", "inherits", "visitor", "validate"];
  18716. var validFieldKeys = ["default", "optional", "validate"];
  18717. function defineType(type, opts = {}) {
  18718. const inherits = opts.inherits && store[opts.inherits] || {};
  18719. let fields = opts.fields;
  18720. if (!fields) {
  18721. fields = {};
  18722. if (inherits.fields) {
  18723. const keys2 = Object.getOwnPropertyNames(inherits.fields);
  18724. for (const key of keys2) {
  18725. const field = inherits.fields[key];
  18726. const def = field.default;
  18727. if (Array.isArray(def) ? def.length > 0 : def && typeof def === "object") {
  18728. throw new Error("field defaults can only be primitives or empty arrays currently");
  18729. }
  18730. fields[key] = {
  18731. default: Array.isArray(def) ? [] : def,
  18732. optional: field.optional,
  18733. validate: field.validate
  18734. };
  18735. }
  18736. }
  18737. }
  18738. const visitor = opts.visitor || inherits.visitor || [];
  18739. const aliases = opts.aliases || inherits.aliases || [];
  18740. const builder = opts.builder || inherits.builder || opts.visitor || [];
  18741. for (const k of Object.keys(opts)) {
  18742. if (validTypeOpts.indexOf(k) === -1) {
  18743. throw new Error(`Unknown type option "${k}" on ${type}`);
  18744. }
  18745. }
  18746. if (opts.deprecatedAlias) {
  18747. DEPRECATED_KEYS[opts.deprecatedAlias] = type;
  18748. }
  18749. for (const key of visitor.concat(builder)) {
  18750. fields[key] = fields[key] || {};
  18751. }
  18752. for (const key of Object.keys(fields)) {
  18753. const field = fields[key];
  18754. if (field.default !== void 0 && builder.indexOf(key) === -1) {
  18755. field.optional = true;
  18756. }
  18757. if (field.default === void 0) {
  18758. field.default = null;
  18759. } else if (!field.validate && field.default != null) {
  18760. field.validate = assertValueType(getType(field.default));
  18761. }
  18762. for (const k of Object.keys(field)) {
  18763. if (validFieldKeys.indexOf(k) === -1) {
  18764. throw new Error(`Unknown field key "${k}" on ${type}.${key}`);
  18765. }
  18766. }
  18767. }
  18768. VISITOR_KEYS[type] = opts.visitor = visitor;
  18769. BUILDER_KEYS[type] = opts.builder = builder;
  18770. NODE_FIELDS[type] = opts.fields = fields;
  18771. ALIAS_KEYS[type] = opts.aliases = aliases;
  18772. aliases.forEach((alias) => {
  18773. FLIPPED_ALIAS_KEYS[alias] = FLIPPED_ALIAS_KEYS[alias] || [];
  18774. FLIPPED_ALIAS_KEYS[alias].push(type);
  18775. });
  18776. if (opts.validate) {
  18777. NODE_PARENT_VALIDATIONS[type] = opts.validate;
  18778. }
  18779. store[type] = opts;
  18780. }
  18781. var store = {};
  18782. }
  18783. });
  18784. // node_modules/estree-to-babel/node_modules/@babel/types/lib/definitions/core.js
  18785. var require_core2 = __commonJS({
  18786. "node_modules/estree-to-babel/node_modules/@babel/types/lib/definitions/core.js"(exports) {
  18787. "use strict";
  18788. Object.defineProperty(exports, "__esModule", {
  18789. value: true
  18790. });
  18791. exports.classMethodOrDeclareMethodCommon = exports.classMethodOrPropertyCommon = exports.patternLikeCommon = exports.functionDeclarationCommon = exports.functionTypeAnnotationCommon = exports.functionCommon = void 0;
  18792. var _is = require_is2();
  18793. var _isValidIdentifier = require_isValidIdentifier2();
  18794. var _helperValidatorIdentifier = require_lib3();
  18795. var _constants = require_constants2();
  18796. var _utils = require_utils2();
  18797. (0, _utils.default)("ArrayExpression", {
  18798. fields: {
  18799. elements: {
  18800. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeOrValueType)("null", "Expression", "SpreadElement"))),
  18801. default: !process.env.BABEL_TYPES_8_BREAKING ? [] : void 0
  18802. }
  18803. },
  18804. visitor: ["elements"],
  18805. aliases: ["Expression"]
  18806. });
  18807. (0, _utils.default)("AssignmentExpression", {
  18808. fields: {
  18809. operator: {
  18810. validate: function() {
  18811. if (!process.env.BABEL_TYPES_8_BREAKING) {
  18812. return (0, _utils.assertValueType)("string");
  18813. }
  18814. const identifier = (0, _utils.assertOneOf)(..._constants.ASSIGNMENT_OPERATORS);
  18815. const pattern = (0, _utils.assertOneOf)("=");
  18816. return function(node, key, val) {
  18817. const validator = (0, _is.default)("Pattern", node.left) ? pattern : identifier;
  18818. validator(node, key, val);
  18819. };
  18820. }()
  18821. },
  18822. left: {
  18823. validate: !process.env.BABEL_TYPES_8_BREAKING ? (0, _utils.assertNodeType)("LVal") : (0, _utils.assertNodeType)("Identifier", "MemberExpression", "ArrayPattern", "ObjectPattern")
  18824. },
  18825. right: {
  18826. validate: (0, _utils.assertNodeType)("Expression")
  18827. }
  18828. },
  18829. builder: ["operator", "left", "right"],
  18830. visitor: ["left", "right"],
  18831. aliases: ["Expression"]
  18832. });
  18833. (0, _utils.default)("BinaryExpression", {
  18834. builder: ["operator", "left", "right"],
  18835. fields: {
  18836. operator: {
  18837. validate: (0, _utils.assertOneOf)(..._constants.BINARY_OPERATORS)
  18838. },
  18839. left: {
  18840. validate: function() {
  18841. const expression = (0, _utils.assertNodeType)("Expression");
  18842. const inOp = (0, _utils.assertNodeType)("Expression", "PrivateName");
  18843. const validator = function(node, key, val) {
  18844. const validator2 = node.operator === "in" ? inOp : expression;
  18845. validator2(node, key, val);
  18846. };
  18847. validator.oneOfNodeTypes = ["Expression", "PrivateName"];
  18848. return validator;
  18849. }()
  18850. },
  18851. right: {
  18852. validate: (0, _utils.assertNodeType)("Expression")
  18853. }
  18854. },
  18855. visitor: ["left", "right"],
  18856. aliases: ["Binary", "Expression"]
  18857. });
  18858. (0, _utils.default)("InterpreterDirective", {
  18859. builder: ["value"],
  18860. fields: {
  18861. value: {
  18862. validate: (0, _utils.assertValueType)("string")
  18863. }
  18864. }
  18865. });
  18866. (0, _utils.default)("Directive", {
  18867. visitor: ["value"],
  18868. fields: {
  18869. value: {
  18870. validate: (0, _utils.assertNodeType)("DirectiveLiteral")
  18871. }
  18872. }
  18873. });
  18874. (0, _utils.default)("DirectiveLiteral", {
  18875. builder: ["value"],
  18876. fields: {
  18877. value: {
  18878. validate: (0, _utils.assertValueType)("string")
  18879. }
  18880. }
  18881. });
  18882. (0, _utils.default)("BlockStatement", {
  18883. builder: ["body", "directives"],
  18884. visitor: ["directives", "body"],
  18885. fields: {
  18886. directives: {
  18887. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Directive"))),
  18888. default: []
  18889. },
  18890. body: {
  18891. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Statement")))
  18892. }
  18893. },
  18894. aliases: ["Scopable", "BlockParent", "Block", "Statement"]
  18895. });
  18896. (0, _utils.default)("BreakStatement", {
  18897. visitor: ["label"],
  18898. fields: {
  18899. label: {
  18900. validate: (0, _utils.assertNodeType)("Identifier"),
  18901. optional: true
  18902. }
  18903. },
  18904. aliases: ["Statement", "Terminatorless", "CompletionStatement"]
  18905. });
  18906. (0, _utils.default)("CallExpression", {
  18907. visitor: ["callee", "arguments", "typeParameters", "typeArguments"],
  18908. builder: ["callee", "arguments"],
  18909. aliases: ["Expression"],
  18910. fields: Object.assign({
  18911. callee: {
  18912. validate: (0, _utils.assertNodeType)("Expression", "V8IntrinsicIdentifier")
  18913. },
  18914. arguments: {
  18915. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Expression", "SpreadElement", "JSXNamespacedName", "ArgumentPlaceholder")))
  18916. }
  18917. }, !process.env.BABEL_TYPES_8_BREAKING ? {
  18918. optional: {
  18919. validate: (0, _utils.assertOneOf)(true, false),
  18920. optional: true
  18921. }
  18922. } : {}, {
  18923. typeArguments: {
  18924. validate: (0, _utils.assertNodeType)("TypeParameterInstantiation"),
  18925. optional: true
  18926. },
  18927. typeParameters: {
  18928. validate: (0, _utils.assertNodeType)("TSTypeParameterInstantiation"),
  18929. optional: true
  18930. }
  18931. })
  18932. });
  18933. (0, _utils.default)("CatchClause", {
  18934. visitor: ["param", "body"],
  18935. fields: {
  18936. param: {
  18937. validate: (0, _utils.assertNodeType)("Identifier", "ArrayPattern", "ObjectPattern"),
  18938. optional: true
  18939. },
  18940. body: {
  18941. validate: (0, _utils.assertNodeType)("BlockStatement")
  18942. }
  18943. },
  18944. aliases: ["Scopable", "BlockParent"]
  18945. });
  18946. (0, _utils.default)("ConditionalExpression", {
  18947. visitor: ["test", "consequent", "alternate"],
  18948. fields: {
  18949. test: {
  18950. validate: (0, _utils.assertNodeType)("Expression")
  18951. },
  18952. consequent: {
  18953. validate: (0, _utils.assertNodeType)("Expression")
  18954. },
  18955. alternate: {
  18956. validate: (0, _utils.assertNodeType)("Expression")
  18957. }
  18958. },
  18959. aliases: ["Expression", "Conditional"]
  18960. });
  18961. (0, _utils.default)("ContinueStatement", {
  18962. visitor: ["label"],
  18963. fields: {
  18964. label: {
  18965. validate: (0, _utils.assertNodeType)("Identifier"),
  18966. optional: true
  18967. }
  18968. },
  18969. aliases: ["Statement", "Terminatorless", "CompletionStatement"]
  18970. });
  18971. (0, _utils.default)("DebuggerStatement", {
  18972. aliases: ["Statement"]
  18973. });
  18974. (0, _utils.default)("DoWhileStatement", {
  18975. visitor: ["test", "body"],
  18976. fields: {
  18977. test: {
  18978. validate: (0, _utils.assertNodeType)("Expression")
  18979. },
  18980. body: {
  18981. validate: (0, _utils.assertNodeType)("Statement")
  18982. }
  18983. },
  18984. aliases: ["Statement", "BlockParent", "Loop", "While", "Scopable"]
  18985. });
  18986. (0, _utils.default)("EmptyStatement", {
  18987. aliases: ["Statement"]
  18988. });
  18989. (0, _utils.default)("ExpressionStatement", {
  18990. visitor: ["expression"],
  18991. fields: {
  18992. expression: {
  18993. validate: (0, _utils.assertNodeType)("Expression")
  18994. }
  18995. },
  18996. aliases: ["Statement", "ExpressionWrapper"]
  18997. });
  18998. (0, _utils.default)("File", {
  18999. builder: ["program", "comments", "tokens"],
  19000. visitor: ["program"],
  19001. fields: {
  19002. program: {
  19003. validate: (0, _utils.assertNodeType)("Program")
  19004. },
  19005. comments: {
  19006. validate: !process.env.BABEL_TYPES_8_BREAKING ? Object.assign(() => {
  19007. }, {
  19008. each: {
  19009. oneOfNodeTypes: ["CommentBlock", "CommentLine"]
  19010. }
  19011. }) : (0, _utils.assertEach)((0, _utils.assertNodeType)("CommentBlock", "CommentLine")),
  19012. optional: true
  19013. },
  19014. tokens: {
  19015. validate: (0, _utils.assertEach)(Object.assign(() => {
  19016. }, {
  19017. type: "any"
  19018. })),
  19019. optional: true
  19020. }
  19021. }
  19022. });
  19023. (0, _utils.default)("ForInStatement", {
  19024. visitor: ["left", "right", "body"],
  19025. aliases: ["Scopable", "Statement", "For", "BlockParent", "Loop", "ForXStatement"],
  19026. fields: {
  19027. left: {
  19028. validate: !process.env.BABEL_TYPES_8_BREAKING ? (0, _utils.assertNodeType)("VariableDeclaration", "LVal") : (0, _utils.assertNodeType)("VariableDeclaration", "Identifier", "MemberExpression", "ArrayPattern", "ObjectPattern")
  19029. },
  19030. right: {
  19031. validate: (0, _utils.assertNodeType)("Expression")
  19032. },
  19033. body: {
  19034. validate: (0, _utils.assertNodeType)("Statement")
  19035. }
  19036. }
  19037. });
  19038. (0, _utils.default)("ForStatement", {
  19039. visitor: ["init", "test", "update", "body"],
  19040. aliases: ["Scopable", "Statement", "For", "BlockParent", "Loop"],
  19041. fields: {
  19042. init: {
  19043. validate: (0, _utils.assertNodeType)("VariableDeclaration", "Expression"),
  19044. optional: true
  19045. },
  19046. test: {
  19047. validate: (0, _utils.assertNodeType)("Expression"),
  19048. optional: true
  19049. },
  19050. update: {
  19051. validate: (0, _utils.assertNodeType)("Expression"),
  19052. optional: true
  19053. },
  19054. body: {
  19055. validate: (0, _utils.assertNodeType)("Statement")
  19056. }
  19057. }
  19058. });
  19059. var functionCommon = {
  19060. params: {
  19061. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Identifier", "Pattern", "RestElement")))
  19062. },
  19063. generator: {
  19064. default: false
  19065. },
  19066. async: {
  19067. default: false
  19068. }
  19069. };
  19070. exports.functionCommon = functionCommon;
  19071. var functionTypeAnnotationCommon = {
  19072. returnType: {
  19073. validate: (0, _utils.assertNodeType)("TypeAnnotation", "TSTypeAnnotation", "Noop"),
  19074. optional: true
  19075. },
  19076. typeParameters: {
  19077. validate: (0, _utils.assertNodeType)("TypeParameterDeclaration", "TSTypeParameterDeclaration", "Noop"),
  19078. optional: true
  19079. }
  19080. };
  19081. exports.functionTypeAnnotationCommon = functionTypeAnnotationCommon;
  19082. var functionDeclarationCommon = Object.assign({}, functionCommon, {
  19083. declare: {
  19084. validate: (0, _utils.assertValueType)("boolean"),
  19085. optional: true
  19086. },
  19087. id: {
  19088. validate: (0, _utils.assertNodeType)("Identifier"),
  19089. optional: true
  19090. }
  19091. });
  19092. exports.functionDeclarationCommon = functionDeclarationCommon;
  19093. (0, _utils.default)("FunctionDeclaration", {
  19094. builder: ["id", "params", "body", "generator", "async"],
  19095. visitor: ["id", "params", "body", "returnType", "typeParameters"],
  19096. fields: Object.assign({}, functionDeclarationCommon, functionTypeAnnotationCommon, {
  19097. body: {
  19098. validate: (0, _utils.assertNodeType)("BlockStatement")
  19099. }
  19100. }),
  19101. aliases: ["Scopable", "Function", "BlockParent", "FunctionParent", "Statement", "Pureish", "Declaration"],
  19102. validate: function() {
  19103. if (!process.env.BABEL_TYPES_8_BREAKING)
  19104. return () => {
  19105. };
  19106. const identifier = (0, _utils.assertNodeType)("Identifier");
  19107. return function(parent, key, node) {
  19108. if (!(0, _is.default)("ExportDefaultDeclaration", parent)) {
  19109. identifier(node, "id", node.id);
  19110. }
  19111. };
  19112. }()
  19113. });
  19114. (0, _utils.default)("FunctionExpression", {
  19115. inherits: "FunctionDeclaration",
  19116. aliases: ["Scopable", "Function", "BlockParent", "FunctionParent", "Expression", "Pureish"],
  19117. fields: Object.assign({}, functionCommon, functionTypeAnnotationCommon, {
  19118. id: {
  19119. validate: (0, _utils.assertNodeType)("Identifier"),
  19120. optional: true
  19121. },
  19122. body: {
  19123. validate: (0, _utils.assertNodeType)("BlockStatement")
  19124. }
  19125. })
  19126. });
  19127. var patternLikeCommon = {
  19128. typeAnnotation: {
  19129. validate: (0, _utils.assertNodeType)("TypeAnnotation", "TSTypeAnnotation", "Noop"),
  19130. optional: true
  19131. },
  19132. decorators: {
  19133. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Decorator")))
  19134. }
  19135. };
  19136. exports.patternLikeCommon = patternLikeCommon;
  19137. (0, _utils.default)("Identifier", {
  19138. builder: ["name"],
  19139. visitor: ["typeAnnotation", "decorators"],
  19140. aliases: ["Expression", "PatternLike", "LVal", "TSEntityName"],
  19141. fields: Object.assign({}, patternLikeCommon, {
  19142. name: {
  19143. validate: (0, _utils.chain)((0, _utils.assertValueType)("string"), Object.assign(function(node, key, val) {
  19144. if (!process.env.BABEL_TYPES_8_BREAKING)
  19145. return;
  19146. if (!(0, _isValidIdentifier.default)(val, false)) {
  19147. throw new TypeError(`"${val}" is not a valid identifier name`);
  19148. }
  19149. }, {
  19150. type: "string"
  19151. }))
  19152. },
  19153. optional: {
  19154. validate: (0, _utils.assertValueType)("boolean"),
  19155. optional: true
  19156. }
  19157. }),
  19158. validate(parent, key, node) {
  19159. if (!process.env.BABEL_TYPES_8_BREAKING)
  19160. return;
  19161. const match = /\.(\w+)$/.exec(key);
  19162. if (!match)
  19163. return;
  19164. const [, parentKey] = match;
  19165. const nonComp = {
  19166. computed: false
  19167. };
  19168. if (parentKey === "property") {
  19169. if ((0, _is.default)("MemberExpression", parent, nonComp))
  19170. return;
  19171. if ((0, _is.default)("OptionalMemberExpression", parent, nonComp))
  19172. return;
  19173. } else if (parentKey === "key") {
  19174. if ((0, _is.default)("Property", parent, nonComp))
  19175. return;
  19176. if ((0, _is.default)("Method", parent, nonComp))
  19177. return;
  19178. } else if (parentKey === "exported") {
  19179. if ((0, _is.default)("ExportSpecifier", parent))
  19180. return;
  19181. } else if (parentKey === "imported") {
  19182. if ((0, _is.default)("ImportSpecifier", parent, {
  19183. imported: node
  19184. }))
  19185. return;
  19186. } else if (parentKey === "meta") {
  19187. if ((0, _is.default)("MetaProperty", parent, {
  19188. meta: node
  19189. }))
  19190. return;
  19191. }
  19192. if (((0, _helperValidatorIdentifier.isKeyword)(node.name) || (0, _helperValidatorIdentifier.isReservedWord)(node.name, false)) && node.name !== "this") {
  19193. throw new TypeError(`"${node.name}" is not a valid identifier`);
  19194. }
  19195. }
  19196. });
  19197. (0, _utils.default)("IfStatement", {
  19198. visitor: ["test", "consequent", "alternate"],
  19199. aliases: ["Statement", "Conditional"],
  19200. fields: {
  19201. test: {
  19202. validate: (0, _utils.assertNodeType)("Expression")
  19203. },
  19204. consequent: {
  19205. validate: (0, _utils.assertNodeType)("Statement")
  19206. },
  19207. alternate: {
  19208. optional: true,
  19209. validate: (0, _utils.assertNodeType)("Statement")
  19210. }
  19211. }
  19212. });
  19213. (0, _utils.default)("LabeledStatement", {
  19214. visitor: ["label", "body"],
  19215. aliases: ["Statement"],
  19216. fields: {
  19217. label: {
  19218. validate: (0, _utils.assertNodeType)("Identifier")
  19219. },
  19220. body: {
  19221. validate: (0, _utils.assertNodeType)("Statement")
  19222. }
  19223. }
  19224. });
  19225. (0, _utils.default)("StringLiteral", {
  19226. builder: ["value"],
  19227. fields: {
  19228. value: {
  19229. validate: (0, _utils.assertValueType)("string")
  19230. }
  19231. },
  19232. aliases: ["Expression", "Pureish", "Literal", "Immutable"]
  19233. });
  19234. (0, _utils.default)("NumericLiteral", {
  19235. builder: ["value"],
  19236. deprecatedAlias: "NumberLiteral",
  19237. fields: {
  19238. value: {
  19239. validate: (0, _utils.assertValueType)("number")
  19240. }
  19241. },
  19242. aliases: ["Expression", "Pureish", "Literal", "Immutable"]
  19243. });
  19244. (0, _utils.default)("NullLiteral", {
  19245. aliases: ["Expression", "Pureish", "Literal", "Immutable"]
  19246. });
  19247. (0, _utils.default)("BooleanLiteral", {
  19248. builder: ["value"],
  19249. fields: {
  19250. value: {
  19251. validate: (0, _utils.assertValueType)("boolean")
  19252. }
  19253. },
  19254. aliases: ["Expression", "Pureish", "Literal", "Immutable"]
  19255. });
  19256. (0, _utils.default)("RegExpLiteral", {
  19257. builder: ["pattern", "flags"],
  19258. deprecatedAlias: "RegexLiteral",
  19259. aliases: ["Expression", "Pureish", "Literal"],
  19260. fields: {
  19261. pattern: {
  19262. validate: (0, _utils.assertValueType)("string")
  19263. },
  19264. flags: {
  19265. validate: (0, _utils.chain)((0, _utils.assertValueType)("string"), Object.assign(function(node, key, val) {
  19266. if (!process.env.BABEL_TYPES_8_BREAKING)
  19267. return;
  19268. const invalid2 = /[^gimsuy]/.exec(val);
  19269. if (invalid2) {
  19270. throw new TypeError(`"${invalid2[0]}" is not a valid RegExp flag`);
  19271. }
  19272. }, {
  19273. type: "string"
  19274. })),
  19275. default: ""
  19276. }
  19277. }
  19278. });
  19279. (0, _utils.default)("LogicalExpression", {
  19280. builder: ["operator", "left", "right"],
  19281. visitor: ["left", "right"],
  19282. aliases: ["Binary", "Expression"],
  19283. fields: {
  19284. operator: {
  19285. validate: (0, _utils.assertOneOf)(..._constants.LOGICAL_OPERATORS)
  19286. },
  19287. left: {
  19288. validate: (0, _utils.assertNodeType)("Expression")
  19289. },
  19290. right: {
  19291. validate: (0, _utils.assertNodeType)("Expression")
  19292. }
  19293. }
  19294. });
  19295. (0, _utils.default)("MemberExpression", {
  19296. builder: ["object", "property", "computed", "optional"],
  19297. visitor: ["object", "property"],
  19298. aliases: ["Expression", "LVal"],
  19299. fields: Object.assign({
  19300. object: {
  19301. validate: (0, _utils.assertNodeType)("Expression")
  19302. },
  19303. property: {
  19304. validate: function() {
  19305. const normal = (0, _utils.assertNodeType)("Identifier", "PrivateName");
  19306. const computed = (0, _utils.assertNodeType)("Expression");
  19307. const validator = function(node, key, val) {
  19308. const validator2 = node.computed ? computed : normal;
  19309. validator2(node, key, val);
  19310. };
  19311. validator.oneOfNodeTypes = ["Expression", "Identifier", "PrivateName"];
  19312. return validator;
  19313. }()
  19314. },
  19315. computed: {
  19316. default: false
  19317. }
  19318. }, !process.env.BABEL_TYPES_8_BREAKING ? {
  19319. optional: {
  19320. validate: (0, _utils.assertOneOf)(true, false),
  19321. optional: true
  19322. }
  19323. } : {})
  19324. });
  19325. (0, _utils.default)("NewExpression", {
  19326. inherits: "CallExpression"
  19327. });
  19328. (0, _utils.default)("Program", {
  19329. visitor: ["directives", "body"],
  19330. builder: ["body", "directives", "sourceType", "interpreter"],
  19331. fields: {
  19332. sourceFile: {
  19333. validate: (0, _utils.assertValueType)("string")
  19334. },
  19335. sourceType: {
  19336. validate: (0, _utils.assertOneOf)("script", "module"),
  19337. default: "script"
  19338. },
  19339. interpreter: {
  19340. validate: (0, _utils.assertNodeType)("InterpreterDirective"),
  19341. default: null,
  19342. optional: true
  19343. },
  19344. directives: {
  19345. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Directive"))),
  19346. default: []
  19347. },
  19348. body: {
  19349. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Statement")))
  19350. }
  19351. },
  19352. aliases: ["Scopable", "BlockParent", "Block"]
  19353. });
  19354. (0, _utils.default)("ObjectExpression", {
  19355. visitor: ["properties"],
  19356. aliases: ["Expression"],
  19357. fields: {
  19358. properties: {
  19359. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("ObjectMethod", "ObjectProperty", "SpreadElement")))
  19360. }
  19361. }
  19362. });
  19363. (0, _utils.default)("ObjectMethod", {
  19364. builder: ["kind", "key", "params", "body", "computed", "generator", "async"],
  19365. fields: Object.assign({}, functionCommon, functionTypeAnnotationCommon, {
  19366. kind: Object.assign({
  19367. validate: (0, _utils.assertOneOf)("method", "get", "set")
  19368. }, !process.env.BABEL_TYPES_8_BREAKING ? {
  19369. default: "method"
  19370. } : {}),
  19371. computed: {
  19372. default: false
  19373. },
  19374. key: {
  19375. validate: function() {
  19376. const normal = (0, _utils.assertNodeType)("Identifier", "StringLiteral", "NumericLiteral");
  19377. const computed = (0, _utils.assertNodeType)("Expression");
  19378. const validator = function(node, key, val) {
  19379. const validator2 = node.computed ? computed : normal;
  19380. validator2(node, key, val);
  19381. };
  19382. validator.oneOfNodeTypes = ["Expression", "Identifier", "StringLiteral", "NumericLiteral"];
  19383. return validator;
  19384. }()
  19385. },
  19386. decorators: {
  19387. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Decorator"))),
  19388. optional: true
  19389. },
  19390. body: {
  19391. validate: (0, _utils.assertNodeType)("BlockStatement")
  19392. }
  19393. }),
  19394. visitor: ["key", "params", "body", "decorators", "returnType", "typeParameters"],
  19395. aliases: ["UserWhitespacable", "Function", "Scopable", "BlockParent", "FunctionParent", "Method", "ObjectMember"]
  19396. });
  19397. (0, _utils.default)("ObjectProperty", {
  19398. builder: ["key", "value", "computed", "shorthand", ...!process.env.BABEL_TYPES_8_BREAKING ? ["decorators"] : []],
  19399. fields: {
  19400. computed: {
  19401. default: false
  19402. },
  19403. key: {
  19404. validate: function() {
  19405. const normal = (0, _utils.assertNodeType)("Identifier", "StringLiteral", "NumericLiteral");
  19406. const computed = (0, _utils.assertNodeType)("Expression");
  19407. const validator = function(node, key, val) {
  19408. const validator2 = node.computed ? computed : normal;
  19409. validator2(node, key, val);
  19410. };
  19411. validator.oneOfNodeTypes = ["Expression", "Identifier", "StringLiteral", "NumericLiteral"];
  19412. return validator;
  19413. }()
  19414. },
  19415. value: {
  19416. validate: (0, _utils.assertNodeType)("Expression", "PatternLike")
  19417. },
  19418. shorthand: {
  19419. validate: (0, _utils.chain)((0, _utils.assertValueType)("boolean"), Object.assign(function(node, key, val) {
  19420. if (!process.env.BABEL_TYPES_8_BREAKING)
  19421. return;
  19422. if (val && node.computed) {
  19423. throw new TypeError("Property shorthand of ObjectProperty cannot be true if computed is true");
  19424. }
  19425. }, {
  19426. type: "boolean"
  19427. }), function(node, key, val) {
  19428. if (!process.env.BABEL_TYPES_8_BREAKING)
  19429. return;
  19430. if (val && !(0, _is.default)("Identifier", node.key)) {
  19431. throw new TypeError("Property shorthand of ObjectProperty cannot be true if key is not an Identifier");
  19432. }
  19433. }),
  19434. default: false
  19435. },
  19436. decorators: {
  19437. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Decorator"))),
  19438. optional: true
  19439. }
  19440. },
  19441. visitor: ["key", "value", "decorators"],
  19442. aliases: ["UserWhitespacable", "Property", "ObjectMember"],
  19443. validate: function() {
  19444. const pattern = (0, _utils.assertNodeType)("Identifier", "Pattern");
  19445. const expression = (0, _utils.assertNodeType)("Expression");
  19446. return function(parent, key, node) {
  19447. if (!process.env.BABEL_TYPES_8_BREAKING)
  19448. return;
  19449. const validator = (0, _is.default)("ObjectPattern", parent) ? pattern : expression;
  19450. validator(node, "value", node.value);
  19451. };
  19452. }()
  19453. });
  19454. (0, _utils.default)("RestElement", {
  19455. visitor: ["argument", "typeAnnotation"],
  19456. builder: ["argument"],
  19457. aliases: ["LVal", "PatternLike"],
  19458. deprecatedAlias: "RestProperty",
  19459. fields: Object.assign({}, patternLikeCommon, {
  19460. argument: {
  19461. validate: !process.env.BABEL_TYPES_8_BREAKING ? (0, _utils.assertNodeType)("LVal") : (0, _utils.assertNodeType)("Identifier", "Pattern", "MemberExpression")
  19462. }
  19463. }),
  19464. validate(parent, key) {
  19465. if (!process.env.BABEL_TYPES_8_BREAKING)
  19466. return;
  19467. const match = /(\w+)\[(\d+)\]/.exec(key);
  19468. if (!match)
  19469. throw new Error("Internal Babel error: malformed key.");
  19470. const [, listKey, index2] = match;
  19471. if (parent[listKey].length > index2 + 1) {
  19472. throw new TypeError(`RestElement must be last element of ${listKey}`);
  19473. }
  19474. }
  19475. });
  19476. (0, _utils.default)("ReturnStatement", {
  19477. visitor: ["argument"],
  19478. aliases: ["Statement", "Terminatorless", "CompletionStatement"],
  19479. fields: {
  19480. argument: {
  19481. validate: (0, _utils.assertNodeType)("Expression"),
  19482. optional: true
  19483. }
  19484. }
  19485. });
  19486. (0, _utils.default)("SequenceExpression", {
  19487. visitor: ["expressions"],
  19488. fields: {
  19489. expressions: {
  19490. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Expression")))
  19491. }
  19492. },
  19493. aliases: ["Expression"]
  19494. });
  19495. (0, _utils.default)("ParenthesizedExpression", {
  19496. visitor: ["expression"],
  19497. aliases: ["Expression", "ExpressionWrapper"],
  19498. fields: {
  19499. expression: {
  19500. validate: (0, _utils.assertNodeType)("Expression")
  19501. }
  19502. }
  19503. });
  19504. (0, _utils.default)("SwitchCase", {
  19505. visitor: ["test", "consequent"],
  19506. fields: {
  19507. test: {
  19508. validate: (0, _utils.assertNodeType)("Expression"),
  19509. optional: true
  19510. },
  19511. consequent: {
  19512. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Statement")))
  19513. }
  19514. }
  19515. });
  19516. (0, _utils.default)("SwitchStatement", {
  19517. visitor: ["discriminant", "cases"],
  19518. aliases: ["Statement", "BlockParent", "Scopable"],
  19519. fields: {
  19520. discriminant: {
  19521. validate: (0, _utils.assertNodeType)("Expression")
  19522. },
  19523. cases: {
  19524. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("SwitchCase")))
  19525. }
  19526. }
  19527. });
  19528. (0, _utils.default)("ThisExpression", {
  19529. aliases: ["Expression"]
  19530. });
  19531. (0, _utils.default)("ThrowStatement", {
  19532. visitor: ["argument"],
  19533. aliases: ["Statement", "Terminatorless", "CompletionStatement"],
  19534. fields: {
  19535. argument: {
  19536. validate: (0, _utils.assertNodeType)("Expression")
  19537. }
  19538. }
  19539. });
  19540. (0, _utils.default)("TryStatement", {
  19541. visitor: ["block", "handler", "finalizer"],
  19542. aliases: ["Statement"],
  19543. fields: {
  19544. block: {
  19545. validate: (0, _utils.chain)((0, _utils.assertNodeType)("BlockStatement"), Object.assign(function(node) {
  19546. if (!process.env.BABEL_TYPES_8_BREAKING)
  19547. return;
  19548. if (!node.handler && !node.finalizer) {
  19549. throw new TypeError("TryStatement expects either a handler or finalizer, or both");
  19550. }
  19551. }, {
  19552. oneOfNodeTypes: ["BlockStatement"]
  19553. }))
  19554. },
  19555. handler: {
  19556. optional: true,
  19557. validate: (0, _utils.assertNodeType)("CatchClause")
  19558. },
  19559. finalizer: {
  19560. optional: true,
  19561. validate: (0, _utils.assertNodeType)("BlockStatement")
  19562. }
  19563. }
  19564. });
  19565. (0, _utils.default)("UnaryExpression", {
  19566. builder: ["operator", "argument", "prefix"],
  19567. fields: {
  19568. prefix: {
  19569. default: true
  19570. },
  19571. argument: {
  19572. validate: (0, _utils.assertNodeType)("Expression")
  19573. },
  19574. operator: {
  19575. validate: (0, _utils.assertOneOf)(..._constants.UNARY_OPERATORS)
  19576. }
  19577. },
  19578. visitor: ["argument"],
  19579. aliases: ["UnaryLike", "Expression"]
  19580. });
  19581. (0, _utils.default)("UpdateExpression", {
  19582. builder: ["operator", "argument", "prefix"],
  19583. fields: {
  19584. prefix: {
  19585. default: false
  19586. },
  19587. argument: {
  19588. validate: !process.env.BABEL_TYPES_8_BREAKING ? (0, _utils.assertNodeType)("Expression") : (0, _utils.assertNodeType)("Identifier", "MemberExpression")
  19589. },
  19590. operator: {
  19591. validate: (0, _utils.assertOneOf)(..._constants.UPDATE_OPERATORS)
  19592. }
  19593. },
  19594. visitor: ["argument"],
  19595. aliases: ["Expression"]
  19596. });
  19597. (0, _utils.default)("VariableDeclaration", {
  19598. builder: ["kind", "declarations"],
  19599. visitor: ["declarations"],
  19600. aliases: ["Statement", "Declaration"],
  19601. fields: {
  19602. declare: {
  19603. validate: (0, _utils.assertValueType)("boolean"),
  19604. optional: true
  19605. },
  19606. kind: {
  19607. validate: (0, _utils.assertOneOf)("var", "let", "const")
  19608. },
  19609. declarations: {
  19610. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("VariableDeclarator")))
  19611. }
  19612. },
  19613. validate(parent, key, node) {
  19614. if (!process.env.BABEL_TYPES_8_BREAKING)
  19615. return;
  19616. if (!(0, _is.default)("ForXStatement", parent, {
  19617. left: node
  19618. }))
  19619. return;
  19620. if (node.declarations.length !== 1) {
  19621. throw new TypeError(`Exactly one VariableDeclarator is required in the VariableDeclaration of a ${parent.type}`);
  19622. }
  19623. }
  19624. });
  19625. (0, _utils.default)("VariableDeclarator", {
  19626. visitor: ["id", "init"],
  19627. fields: {
  19628. id: {
  19629. validate: function() {
  19630. if (!process.env.BABEL_TYPES_8_BREAKING) {
  19631. return (0, _utils.assertNodeType)("LVal");
  19632. }
  19633. const normal = (0, _utils.assertNodeType)("Identifier", "ArrayPattern", "ObjectPattern");
  19634. const without = (0, _utils.assertNodeType)("Identifier");
  19635. return function(node, key, val) {
  19636. const validator = node.init ? normal : without;
  19637. validator(node, key, val);
  19638. };
  19639. }()
  19640. },
  19641. definite: {
  19642. optional: true,
  19643. validate: (0, _utils.assertValueType)("boolean")
  19644. },
  19645. init: {
  19646. optional: true,
  19647. validate: (0, _utils.assertNodeType)("Expression")
  19648. }
  19649. }
  19650. });
  19651. (0, _utils.default)("WhileStatement", {
  19652. visitor: ["test", "body"],
  19653. aliases: ["Statement", "BlockParent", "Loop", "While", "Scopable"],
  19654. fields: {
  19655. test: {
  19656. validate: (0, _utils.assertNodeType)("Expression")
  19657. },
  19658. body: {
  19659. validate: (0, _utils.assertNodeType)("Statement")
  19660. }
  19661. }
  19662. });
  19663. (0, _utils.default)("WithStatement", {
  19664. visitor: ["object", "body"],
  19665. aliases: ["Statement"],
  19666. fields: {
  19667. object: {
  19668. validate: (0, _utils.assertNodeType)("Expression")
  19669. },
  19670. body: {
  19671. validate: (0, _utils.assertNodeType)("Statement")
  19672. }
  19673. }
  19674. });
  19675. (0, _utils.default)("AssignmentPattern", {
  19676. visitor: ["left", "right", "decorators"],
  19677. builder: ["left", "right"],
  19678. aliases: ["Pattern", "PatternLike", "LVal"],
  19679. fields: Object.assign({}, patternLikeCommon, {
  19680. left: {
  19681. validate: (0, _utils.assertNodeType)("Identifier", "ObjectPattern", "ArrayPattern", "MemberExpression")
  19682. },
  19683. right: {
  19684. validate: (0, _utils.assertNodeType)("Expression")
  19685. },
  19686. decorators: {
  19687. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Decorator"))),
  19688. optional: true
  19689. }
  19690. })
  19691. });
  19692. (0, _utils.default)("ArrayPattern", {
  19693. visitor: ["elements", "typeAnnotation"],
  19694. builder: ["elements"],
  19695. aliases: ["Pattern", "PatternLike", "LVal"],
  19696. fields: Object.assign({}, patternLikeCommon, {
  19697. elements: {
  19698. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeOrValueType)("null", "PatternLike")))
  19699. },
  19700. decorators: {
  19701. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Decorator"))),
  19702. optional: true
  19703. }
  19704. })
  19705. });
  19706. (0, _utils.default)("ArrowFunctionExpression", {
  19707. builder: ["params", "body", "async"],
  19708. visitor: ["params", "body", "returnType", "typeParameters"],
  19709. aliases: ["Scopable", "Function", "BlockParent", "FunctionParent", "Expression", "Pureish"],
  19710. fields: Object.assign({}, functionCommon, functionTypeAnnotationCommon, {
  19711. expression: {
  19712. validate: (0, _utils.assertValueType)("boolean")
  19713. },
  19714. body: {
  19715. validate: (0, _utils.assertNodeType)("BlockStatement", "Expression")
  19716. }
  19717. })
  19718. });
  19719. (0, _utils.default)("ClassBody", {
  19720. visitor: ["body"],
  19721. fields: {
  19722. body: {
  19723. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("ClassMethod", "ClassPrivateMethod", "ClassProperty", "ClassPrivateProperty", "TSDeclareMethod", "TSIndexSignature")))
  19724. }
  19725. }
  19726. });
  19727. (0, _utils.default)("ClassExpression", {
  19728. builder: ["id", "superClass", "body", "decorators"],
  19729. visitor: ["id", "body", "superClass", "mixins", "typeParameters", "superTypeParameters", "implements", "decorators"],
  19730. aliases: ["Scopable", "Class", "Expression"],
  19731. fields: {
  19732. id: {
  19733. validate: (0, _utils.assertNodeType)("Identifier"),
  19734. optional: true
  19735. },
  19736. typeParameters: {
  19737. validate: (0, _utils.assertNodeType)("TypeParameterDeclaration", "TSTypeParameterDeclaration", "Noop"),
  19738. optional: true
  19739. },
  19740. body: {
  19741. validate: (0, _utils.assertNodeType)("ClassBody")
  19742. },
  19743. superClass: {
  19744. optional: true,
  19745. validate: (0, _utils.assertNodeType)("Expression")
  19746. },
  19747. superTypeParameters: {
  19748. validate: (0, _utils.assertNodeType)("TypeParameterInstantiation", "TSTypeParameterInstantiation"),
  19749. optional: true
  19750. },
  19751. implements: {
  19752. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("TSExpressionWithTypeArguments", "ClassImplements"))),
  19753. optional: true
  19754. },
  19755. decorators: {
  19756. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Decorator"))),
  19757. optional: true
  19758. },
  19759. mixins: {
  19760. validate: (0, _utils.assertNodeType)("InterfaceExtends"),
  19761. optional: true
  19762. }
  19763. }
  19764. });
  19765. (0, _utils.default)("ClassDeclaration", {
  19766. inherits: "ClassExpression",
  19767. aliases: ["Scopable", "Class", "Statement", "Declaration"],
  19768. fields: {
  19769. id: {
  19770. validate: (0, _utils.assertNodeType)("Identifier")
  19771. },
  19772. typeParameters: {
  19773. validate: (0, _utils.assertNodeType)("TypeParameterDeclaration", "TSTypeParameterDeclaration", "Noop"),
  19774. optional: true
  19775. },
  19776. body: {
  19777. validate: (0, _utils.assertNodeType)("ClassBody")
  19778. },
  19779. superClass: {
  19780. optional: true,
  19781. validate: (0, _utils.assertNodeType)("Expression")
  19782. },
  19783. superTypeParameters: {
  19784. validate: (0, _utils.assertNodeType)("TypeParameterInstantiation", "TSTypeParameterInstantiation"),
  19785. optional: true
  19786. },
  19787. implements: {
  19788. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("TSExpressionWithTypeArguments", "ClassImplements"))),
  19789. optional: true
  19790. },
  19791. decorators: {
  19792. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Decorator"))),
  19793. optional: true
  19794. },
  19795. mixins: {
  19796. validate: (0, _utils.assertNodeType)("InterfaceExtends"),
  19797. optional: true
  19798. },
  19799. declare: {
  19800. validate: (0, _utils.assertValueType)("boolean"),
  19801. optional: true
  19802. },
  19803. abstract: {
  19804. validate: (0, _utils.assertValueType)("boolean"),
  19805. optional: true
  19806. }
  19807. },
  19808. validate: function() {
  19809. const identifier = (0, _utils.assertNodeType)("Identifier");
  19810. return function(parent, key, node) {
  19811. if (!process.env.BABEL_TYPES_8_BREAKING)
  19812. return;
  19813. if (!(0, _is.default)("ExportDefaultDeclaration", parent)) {
  19814. identifier(node, "id", node.id);
  19815. }
  19816. };
  19817. }()
  19818. });
  19819. (0, _utils.default)("ExportAllDeclaration", {
  19820. visitor: ["source"],
  19821. aliases: ["Statement", "Declaration", "ModuleDeclaration", "ExportDeclaration"],
  19822. fields: {
  19823. source: {
  19824. validate: (0, _utils.assertNodeType)("StringLiteral")
  19825. },
  19826. exportKind: (0, _utils.validateOptional)((0, _utils.assertOneOf)("type", "value")),
  19827. assertions: {
  19828. optional: true,
  19829. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("ImportAttribute")))
  19830. }
  19831. }
  19832. });
  19833. (0, _utils.default)("ExportDefaultDeclaration", {
  19834. visitor: ["declaration"],
  19835. aliases: ["Statement", "Declaration", "ModuleDeclaration", "ExportDeclaration"],
  19836. fields: {
  19837. declaration: {
  19838. validate: (0, _utils.assertNodeType)("FunctionDeclaration", "TSDeclareFunction", "ClassDeclaration", "Expression")
  19839. }
  19840. }
  19841. });
  19842. (0, _utils.default)("ExportNamedDeclaration", {
  19843. visitor: ["declaration", "specifiers", "source"],
  19844. aliases: ["Statement", "Declaration", "ModuleDeclaration", "ExportDeclaration"],
  19845. fields: {
  19846. declaration: {
  19847. optional: true,
  19848. validate: (0, _utils.chain)((0, _utils.assertNodeType)("Declaration"), Object.assign(function(node, key, val) {
  19849. if (!process.env.BABEL_TYPES_8_BREAKING)
  19850. return;
  19851. if (val && node.specifiers.length) {
  19852. throw new TypeError("Only declaration or specifiers is allowed on ExportNamedDeclaration");
  19853. }
  19854. }, {
  19855. oneOfNodeTypes: ["Declaration"]
  19856. }), function(node, key, val) {
  19857. if (!process.env.BABEL_TYPES_8_BREAKING)
  19858. return;
  19859. if (val && node.source) {
  19860. throw new TypeError("Cannot export a declaration from a source");
  19861. }
  19862. })
  19863. },
  19864. assertions: {
  19865. optional: true,
  19866. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("ImportAttribute")))
  19867. },
  19868. specifiers: {
  19869. default: [],
  19870. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)(function() {
  19871. const sourced = (0, _utils.assertNodeType)("ExportSpecifier", "ExportDefaultSpecifier", "ExportNamespaceSpecifier");
  19872. const sourceless = (0, _utils.assertNodeType)("ExportSpecifier");
  19873. if (!process.env.BABEL_TYPES_8_BREAKING)
  19874. return sourced;
  19875. return function(node, key, val) {
  19876. const validator = node.source ? sourced : sourceless;
  19877. validator(node, key, val);
  19878. };
  19879. }()))
  19880. },
  19881. source: {
  19882. validate: (0, _utils.assertNodeType)("StringLiteral"),
  19883. optional: true
  19884. },
  19885. exportKind: (0, _utils.validateOptional)((0, _utils.assertOneOf)("type", "value"))
  19886. }
  19887. });
  19888. (0, _utils.default)("ExportSpecifier", {
  19889. visitor: ["local", "exported"],
  19890. aliases: ["ModuleSpecifier"],
  19891. fields: {
  19892. local: {
  19893. validate: (0, _utils.assertNodeType)("Identifier")
  19894. },
  19895. exported: {
  19896. validate: (0, _utils.assertNodeType)("Identifier", "StringLiteral")
  19897. }
  19898. }
  19899. });
  19900. (0, _utils.default)("ForOfStatement", {
  19901. visitor: ["left", "right", "body"],
  19902. builder: ["left", "right", "body", "await"],
  19903. aliases: ["Scopable", "Statement", "For", "BlockParent", "Loop", "ForXStatement"],
  19904. fields: {
  19905. left: {
  19906. validate: function() {
  19907. if (!process.env.BABEL_TYPES_8_BREAKING) {
  19908. return (0, _utils.assertNodeType)("VariableDeclaration", "LVal");
  19909. }
  19910. const declaration = (0, _utils.assertNodeType)("VariableDeclaration");
  19911. const lval = (0, _utils.assertNodeType)("Identifier", "MemberExpression", "ArrayPattern", "ObjectPattern");
  19912. return function(node, key, val) {
  19913. if ((0, _is.default)("VariableDeclaration", val)) {
  19914. declaration(node, key, val);
  19915. } else {
  19916. lval(node, key, val);
  19917. }
  19918. };
  19919. }()
  19920. },
  19921. right: {
  19922. validate: (0, _utils.assertNodeType)("Expression")
  19923. },
  19924. body: {
  19925. validate: (0, _utils.assertNodeType)("Statement")
  19926. },
  19927. await: {
  19928. default: false
  19929. }
  19930. }
  19931. });
  19932. (0, _utils.default)("ImportDeclaration", {
  19933. visitor: ["specifiers", "source"],
  19934. aliases: ["Statement", "Declaration", "ModuleDeclaration"],
  19935. fields: {
  19936. assertions: {
  19937. optional: true,
  19938. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("ImportAttribute")))
  19939. },
  19940. specifiers: {
  19941. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("ImportSpecifier", "ImportDefaultSpecifier", "ImportNamespaceSpecifier")))
  19942. },
  19943. source: {
  19944. validate: (0, _utils.assertNodeType)("StringLiteral")
  19945. },
  19946. importKind: {
  19947. validate: (0, _utils.assertOneOf)("type", "typeof", "value"),
  19948. optional: true
  19949. }
  19950. }
  19951. });
  19952. (0, _utils.default)("ImportDefaultSpecifier", {
  19953. visitor: ["local"],
  19954. aliases: ["ModuleSpecifier"],
  19955. fields: {
  19956. local: {
  19957. validate: (0, _utils.assertNodeType)("Identifier")
  19958. }
  19959. }
  19960. });
  19961. (0, _utils.default)("ImportNamespaceSpecifier", {
  19962. visitor: ["local"],
  19963. aliases: ["ModuleSpecifier"],
  19964. fields: {
  19965. local: {
  19966. validate: (0, _utils.assertNodeType)("Identifier")
  19967. }
  19968. }
  19969. });
  19970. (0, _utils.default)("ImportSpecifier", {
  19971. visitor: ["local", "imported"],
  19972. aliases: ["ModuleSpecifier"],
  19973. fields: {
  19974. local: {
  19975. validate: (0, _utils.assertNodeType)("Identifier")
  19976. },
  19977. imported: {
  19978. validate: (0, _utils.assertNodeType)("Identifier", "StringLiteral")
  19979. },
  19980. importKind: {
  19981. validate: (0, _utils.assertOneOf)("type", "typeof"),
  19982. optional: true
  19983. }
  19984. }
  19985. });
  19986. (0, _utils.default)("MetaProperty", {
  19987. visitor: ["meta", "property"],
  19988. aliases: ["Expression"],
  19989. fields: {
  19990. meta: {
  19991. validate: (0, _utils.chain)((0, _utils.assertNodeType)("Identifier"), Object.assign(function(node, key, val) {
  19992. if (!process.env.BABEL_TYPES_8_BREAKING)
  19993. return;
  19994. let property;
  19995. switch (val.name) {
  19996. case "function":
  19997. property = "sent";
  19998. break;
  19999. case "new":
  20000. property = "target";
  20001. break;
  20002. case "import":
  20003. property = "meta";
  20004. break;
  20005. }
  20006. if (!(0, _is.default)("Identifier", node.property, {
  20007. name: property
  20008. })) {
  20009. throw new TypeError("Unrecognised MetaProperty");
  20010. }
  20011. }, {
  20012. oneOfNodeTypes: ["Identifier"]
  20013. }))
  20014. },
  20015. property: {
  20016. validate: (0, _utils.assertNodeType)("Identifier")
  20017. }
  20018. }
  20019. });
  20020. var classMethodOrPropertyCommon = {
  20021. abstract: {
  20022. validate: (0, _utils.assertValueType)("boolean"),
  20023. optional: true
  20024. },
  20025. accessibility: {
  20026. validate: (0, _utils.assertOneOf)("public", "private", "protected"),
  20027. optional: true
  20028. },
  20029. static: {
  20030. default: false
  20031. },
  20032. override: {
  20033. default: false
  20034. },
  20035. computed: {
  20036. default: false
  20037. },
  20038. optional: {
  20039. validate: (0, _utils.assertValueType)("boolean"),
  20040. optional: true
  20041. },
  20042. key: {
  20043. validate: (0, _utils.chain)(function() {
  20044. const normal = (0, _utils.assertNodeType)("Identifier", "StringLiteral", "NumericLiteral");
  20045. const computed = (0, _utils.assertNodeType)("Expression");
  20046. return function(node, key, val) {
  20047. const validator = node.computed ? computed : normal;
  20048. validator(node, key, val);
  20049. };
  20050. }(), (0, _utils.assertNodeType)("Identifier", "StringLiteral", "NumericLiteral", "Expression"))
  20051. }
  20052. };
  20053. exports.classMethodOrPropertyCommon = classMethodOrPropertyCommon;
  20054. var classMethodOrDeclareMethodCommon = Object.assign({}, functionCommon, classMethodOrPropertyCommon, {
  20055. params: {
  20056. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Identifier", "Pattern", "RestElement", "TSParameterProperty")))
  20057. },
  20058. kind: {
  20059. validate: (0, _utils.assertOneOf)("get", "set", "method", "constructor"),
  20060. default: "method"
  20061. },
  20062. access: {
  20063. validate: (0, _utils.chain)((0, _utils.assertValueType)("string"), (0, _utils.assertOneOf)("public", "private", "protected")),
  20064. optional: true
  20065. },
  20066. decorators: {
  20067. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Decorator"))),
  20068. optional: true
  20069. }
  20070. });
  20071. exports.classMethodOrDeclareMethodCommon = classMethodOrDeclareMethodCommon;
  20072. (0, _utils.default)("ClassMethod", {
  20073. aliases: ["Function", "Scopable", "BlockParent", "FunctionParent", "Method"],
  20074. builder: ["kind", "key", "params", "body", "computed", "static", "generator", "async"],
  20075. visitor: ["key", "params", "body", "decorators", "returnType", "typeParameters"],
  20076. fields: Object.assign({}, classMethodOrDeclareMethodCommon, functionTypeAnnotationCommon, {
  20077. body: {
  20078. validate: (0, _utils.assertNodeType)("BlockStatement")
  20079. }
  20080. })
  20081. });
  20082. (0, _utils.default)("ObjectPattern", {
  20083. visitor: ["properties", "typeAnnotation", "decorators"],
  20084. builder: ["properties"],
  20085. aliases: ["Pattern", "PatternLike", "LVal"],
  20086. fields: Object.assign({}, patternLikeCommon, {
  20087. properties: {
  20088. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("RestElement", "ObjectProperty")))
  20089. }
  20090. })
  20091. });
  20092. (0, _utils.default)("SpreadElement", {
  20093. visitor: ["argument"],
  20094. aliases: ["UnaryLike"],
  20095. deprecatedAlias: "SpreadProperty",
  20096. fields: {
  20097. argument: {
  20098. validate: (0, _utils.assertNodeType)("Expression")
  20099. }
  20100. }
  20101. });
  20102. (0, _utils.default)("Super", {
  20103. aliases: ["Expression"]
  20104. });
  20105. (0, _utils.default)("TaggedTemplateExpression", {
  20106. visitor: ["tag", "quasi"],
  20107. aliases: ["Expression"],
  20108. fields: {
  20109. tag: {
  20110. validate: (0, _utils.assertNodeType)("Expression")
  20111. },
  20112. quasi: {
  20113. validate: (0, _utils.assertNodeType)("TemplateLiteral")
  20114. },
  20115. typeParameters: {
  20116. validate: (0, _utils.assertNodeType)("TypeParameterInstantiation", "TSTypeParameterInstantiation"),
  20117. optional: true
  20118. }
  20119. }
  20120. });
  20121. (0, _utils.default)("TemplateElement", {
  20122. builder: ["value", "tail"],
  20123. fields: {
  20124. value: {
  20125. validate: (0, _utils.assertShape)({
  20126. raw: {
  20127. validate: (0, _utils.assertValueType)("string")
  20128. },
  20129. cooked: {
  20130. validate: (0, _utils.assertValueType)("string"),
  20131. optional: true
  20132. }
  20133. })
  20134. },
  20135. tail: {
  20136. default: false
  20137. }
  20138. }
  20139. });
  20140. (0, _utils.default)("TemplateLiteral", {
  20141. visitor: ["quasis", "expressions"],
  20142. aliases: ["Expression", "Literal"],
  20143. fields: {
  20144. quasis: {
  20145. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("TemplateElement")))
  20146. },
  20147. expressions: {
  20148. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Expression", "TSType")), function(node, key, val) {
  20149. if (node.quasis.length !== val.length + 1) {
  20150. throw new TypeError(`Number of ${node.type} quasis should be exactly one more than the number of expressions.
  20151. Expected ${val.length + 1} quasis but got ${node.quasis.length}`);
  20152. }
  20153. })
  20154. }
  20155. }
  20156. });
  20157. (0, _utils.default)("YieldExpression", {
  20158. builder: ["argument", "delegate"],
  20159. visitor: ["argument"],
  20160. aliases: ["Expression", "Terminatorless"],
  20161. fields: {
  20162. delegate: {
  20163. validate: (0, _utils.chain)((0, _utils.assertValueType)("boolean"), Object.assign(function(node, key, val) {
  20164. if (!process.env.BABEL_TYPES_8_BREAKING)
  20165. return;
  20166. if (val && !node.argument) {
  20167. throw new TypeError("Property delegate of YieldExpression cannot be true if there is no argument");
  20168. }
  20169. }, {
  20170. type: "boolean"
  20171. })),
  20172. default: false
  20173. },
  20174. argument: {
  20175. optional: true,
  20176. validate: (0, _utils.assertNodeType)("Expression")
  20177. }
  20178. }
  20179. });
  20180. (0, _utils.default)("AwaitExpression", {
  20181. builder: ["argument"],
  20182. visitor: ["argument"],
  20183. aliases: ["Expression", "Terminatorless"],
  20184. fields: {
  20185. argument: {
  20186. validate: (0, _utils.assertNodeType)("Expression")
  20187. }
  20188. }
  20189. });
  20190. (0, _utils.default)("Import", {
  20191. aliases: ["Expression"]
  20192. });
  20193. (0, _utils.default)("BigIntLiteral", {
  20194. builder: ["value"],
  20195. fields: {
  20196. value: {
  20197. validate: (0, _utils.assertValueType)("string")
  20198. }
  20199. },
  20200. aliases: ["Expression", "Pureish", "Literal", "Immutable"]
  20201. });
  20202. (0, _utils.default)("ExportNamespaceSpecifier", {
  20203. visitor: ["exported"],
  20204. aliases: ["ModuleSpecifier"],
  20205. fields: {
  20206. exported: {
  20207. validate: (0, _utils.assertNodeType)("Identifier")
  20208. }
  20209. }
  20210. });
  20211. (0, _utils.default)("OptionalMemberExpression", {
  20212. builder: ["object", "property", "computed", "optional"],
  20213. visitor: ["object", "property"],
  20214. aliases: ["Expression"],
  20215. fields: {
  20216. object: {
  20217. validate: (0, _utils.assertNodeType)("Expression")
  20218. },
  20219. property: {
  20220. validate: function() {
  20221. const normal = (0, _utils.assertNodeType)("Identifier");
  20222. const computed = (0, _utils.assertNodeType)("Expression");
  20223. const validator = function(node, key, val) {
  20224. const validator2 = node.computed ? computed : normal;
  20225. validator2(node, key, val);
  20226. };
  20227. validator.oneOfNodeTypes = ["Expression", "Identifier"];
  20228. return validator;
  20229. }()
  20230. },
  20231. computed: {
  20232. default: false
  20233. },
  20234. optional: {
  20235. validate: !process.env.BABEL_TYPES_8_BREAKING ? (0, _utils.assertValueType)("boolean") : (0, _utils.chain)((0, _utils.assertValueType)("boolean"), (0, _utils.assertOptionalChainStart)())
  20236. }
  20237. }
  20238. });
  20239. (0, _utils.default)("OptionalCallExpression", {
  20240. visitor: ["callee", "arguments", "typeParameters", "typeArguments"],
  20241. builder: ["callee", "arguments", "optional"],
  20242. aliases: ["Expression"],
  20243. fields: {
  20244. callee: {
  20245. validate: (0, _utils.assertNodeType)("Expression")
  20246. },
  20247. arguments: {
  20248. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Expression", "SpreadElement", "JSXNamespacedName", "ArgumentPlaceholder")))
  20249. },
  20250. optional: {
  20251. validate: !process.env.BABEL_TYPES_8_BREAKING ? (0, _utils.assertValueType)("boolean") : (0, _utils.chain)((0, _utils.assertValueType)("boolean"), (0, _utils.assertOptionalChainStart)())
  20252. },
  20253. typeArguments: {
  20254. validate: (0, _utils.assertNodeType)("TypeParameterInstantiation"),
  20255. optional: true
  20256. },
  20257. typeParameters: {
  20258. validate: (0, _utils.assertNodeType)("TSTypeParameterInstantiation"),
  20259. optional: true
  20260. }
  20261. }
  20262. });
  20263. }
  20264. });
  20265. // node_modules/estree-to-babel/node_modules/@babel/types/lib/definitions/flow.js
  20266. var require_flow2 = __commonJS({
  20267. "node_modules/estree-to-babel/node_modules/@babel/types/lib/definitions/flow.js"() {
  20268. "use strict";
  20269. var _utils = require_utils2();
  20270. var defineInterfaceishType = (name2, typeParameterType = "TypeParameterDeclaration") => {
  20271. (0, _utils.default)(name2, {
  20272. builder: ["id", "typeParameters", "extends", "body"],
  20273. visitor: ["id", "typeParameters", "extends", "mixins", "implements", "body"],
  20274. aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"],
  20275. fields: {
  20276. id: (0, _utils.validateType)("Identifier"),
  20277. typeParameters: (0, _utils.validateOptionalType)(typeParameterType),
  20278. extends: (0, _utils.validateOptional)((0, _utils.arrayOfType)("InterfaceExtends")),
  20279. mixins: (0, _utils.validateOptional)((0, _utils.arrayOfType)("InterfaceExtends")),
  20280. implements: (0, _utils.validateOptional)((0, _utils.arrayOfType)("ClassImplements")),
  20281. body: (0, _utils.validateType)("ObjectTypeAnnotation")
  20282. }
  20283. });
  20284. };
  20285. (0, _utils.default)("AnyTypeAnnotation", {
  20286. aliases: ["Flow", "FlowType", "FlowBaseAnnotation"]
  20287. });
  20288. (0, _utils.default)("ArrayTypeAnnotation", {
  20289. visitor: ["elementType"],
  20290. aliases: ["Flow", "FlowType"],
  20291. fields: {
  20292. elementType: (0, _utils.validateType)("FlowType")
  20293. }
  20294. });
  20295. (0, _utils.default)("BooleanTypeAnnotation", {
  20296. aliases: ["Flow", "FlowType", "FlowBaseAnnotation"]
  20297. });
  20298. (0, _utils.default)("BooleanLiteralTypeAnnotation", {
  20299. builder: ["value"],
  20300. aliases: ["Flow", "FlowType"],
  20301. fields: {
  20302. value: (0, _utils.validate)((0, _utils.assertValueType)("boolean"))
  20303. }
  20304. });
  20305. (0, _utils.default)("NullLiteralTypeAnnotation", {
  20306. aliases: ["Flow", "FlowType", "FlowBaseAnnotation"]
  20307. });
  20308. (0, _utils.default)("ClassImplements", {
  20309. visitor: ["id", "typeParameters"],
  20310. aliases: ["Flow"],
  20311. fields: {
  20312. id: (0, _utils.validateType)("Identifier"),
  20313. typeParameters: (0, _utils.validateOptionalType)("TypeParameterInstantiation")
  20314. }
  20315. });
  20316. defineInterfaceishType("DeclareClass");
  20317. (0, _utils.default)("DeclareFunction", {
  20318. visitor: ["id"],
  20319. aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"],
  20320. fields: {
  20321. id: (0, _utils.validateType)("Identifier"),
  20322. predicate: (0, _utils.validateOptionalType)("DeclaredPredicate")
  20323. }
  20324. });
  20325. defineInterfaceishType("DeclareInterface");
  20326. (0, _utils.default)("DeclareModule", {
  20327. builder: ["id", "body", "kind"],
  20328. visitor: ["id", "body"],
  20329. aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"],
  20330. fields: {
  20331. id: (0, _utils.validateType)(["Identifier", "StringLiteral"]),
  20332. body: (0, _utils.validateType)("BlockStatement"),
  20333. kind: (0, _utils.validateOptional)((0, _utils.assertOneOf)("CommonJS", "ES"))
  20334. }
  20335. });
  20336. (0, _utils.default)("DeclareModuleExports", {
  20337. visitor: ["typeAnnotation"],
  20338. aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"],
  20339. fields: {
  20340. typeAnnotation: (0, _utils.validateType)("TypeAnnotation")
  20341. }
  20342. });
  20343. (0, _utils.default)("DeclareTypeAlias", {
  20344. visitor: ["id", "typeParameters", "right"],
  20345. aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"],
  20346. fields: {
  20347. id: (0, _utils.validateType)("Identifier"),
  20348. typeParameters: (0, _utils.validateOptionalType)("TypeParameterDeclaration"),
  20349. right: (0, _utils.validateType)("FlowType")
  20350. }
  20351. });
  20352. (0, _utils.default)("DeclareOpaqueType", {
  20353. visitor: ["id", "typeParameters", "supertype"],
  20354. aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"],
  20355. fields: {
  20356. id: (0, _utils.validateType)("Identifier"),
  20357. typeParameters: (0, _utils.validateOptionalType)("TypeParameterDeclaration"),
  20358. supertype: (0, _utils.validateOptionalType)("FlowType")
  20359. }
  20360. });
  20361. (0, _utils.default)("DeclareVariable", {
  20362. visitor: ["id"],
  20363. aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"],
  20364. fields: {
  20365. id: (0, _utils.validateType)("Identifier")
  20366. }
  20367. });
  20368. (0, _utils.default)("DeclareExportDeclaration", {
  20369. visitor: ["declaration", "specifiers", "source"],
  20370. aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"],
  20371. fields: {
  20372. declaration: (0, _utils.validateOptionalType)("Flow"),
  20373. specifiers: (0, _utils.validateOptional)((0, _utils.arrayOfType)(["ExportSpecifier", "ExportNamespaceSpecifier"])),
  20374. source: (0, _utils.validateOptionalType)("StringLiteral"),
  20375. default: (0, _utils.validateOptional)((0, _utils.assertValueType)("boolean"))
  20376. }
  20377. });
  20378. (0, _utils.default)("DeclareExportAllDeclaration", {
  20379. visitor: ["source"],
  20380. aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"],
  20381. fields: {
  20382. source: (0, _utils.validateType)("StringLiteral"),
  20383. exportKind: (0, _utils.validateOptional)((0, _utils.assertOneOf)("type", "value"))
  20384. }
  20385. });
  20386. (0, _utils.default)("DeclaredPredicate", {
  20387. visitor: ["value"],
  20388. aliases: ["Flow", "FlowPredicate"],
  20389. fields: {
  20390. value: (0, _utils.validateType)("Flow")
  20391. }
  20392. });
  20393. (0, _utils.default)("ExistsTypeAnnotation", {
  20394. aliases: ["Flow", "FlowType"]
  20395. });
  20396. (0, _utils.default)("FunctionTypeAnnotation", {
  20397. visitor: ["typeParameters", "params", "rest", "returnType"],
  20398. aliases: ["Flow", "FlowType"],
  20399. fields: {
  20400. typeParameters: (0, _utils.validateOptionalType)("TypeParameterDeclaration"),
  20401. params: (0, _utils.validate)((0, _utils.arrayOfType)("FunctionTypeParam")),
  20402. rest: (0, _utils.validateOptionalType)("FunctionTypeParam"),
  20403. this: (0, _utils.validateOptionalType)("FunctionTypeParam"),
  20404. returnType: (0, _utils.validateType)("FlowType")
  20405. }
  20406. });
  20407. (0, _utils.default)("FunctionTypeParam", {
  20408. visitor: ["name", "typeAnnotation"],
  20409. aliases: ["Flow"],
  20410. fields: {
  20411. name: (0, _utils.validateOptionalType)("Identifier"),
  20412. typeAnnotation: (0, _utils.validateType)("FlowType"),
  20413. optional: (0, _utils.validateOptional)((0, _utils.assertValueType)("boolean"))
  20414. }
  20415. });
  20416. (0, _utils.default)("GenericTypeAnnotation", {
  20417. visitor: ["id", "typeParameters"],
  20418. aliases: ["Flow", "FlowType"],
  20419. fields: {
  20420. id: (0, _utils.validateType)(["Identifier", "QualifiedTypeIdentifier"]),
  20421. typeParameters: (0, _utils.validateOptionalType)("TypeParameterInstantiation")
  20422. }
  20423. });
  20424. (0, _utils.default)("InferredPredicate", {
  20425. aliases: ["Flow", "FlowPredicate"]
  20426. });
  20427. (0, _utils.default)("InterfaceExtends", {
  20428. visitor: ["id", "typeParameters"],
  20429. aliases: ["Flow"],
  20430. fields: {
  20431. id: (0, _utils.validateType)(["Identifier", "QualifiedTypeIdentifier"]),
  20432. typeParameters: (0, _utils.validateOptionalType)("TypeParameterInstantiation")
  20433. }
  20434. });
  20435. defineInterfaceishType("InterfaceDeclaration");
  20436. (0, _utils.default)("InterfaceTypeAnnotation", {
  20437. visitor: ["extends", "body"],
  20438. aliases: ["Flow", "FlowType"],
  20439. fields: {
  20440. extends: (0, _utils.validateOptional)((0, _utils.arrayOfType)("InterfaceExtends")),
  20441. body: (0, _utils.validateType)("ObjectTypeAnnotation")
  20442. }
  20443. });
  20444. (0, _utils.default)("IntersectionTypeAnnotation", {
  20445. visitor: ["types"],
  20446. aliases: ["Flow", "FlowType"],
  20447. fields: {
  20448. types: (0, _utils.validate)((0, _utils.arrayOfType)("FlowType"))
  20449. }
  20450. });
  20451. (0, _utils.default)("MixedTypeAnnotation", {
  20452. aliases: ["Flow", "FlowType", "FlowBaseAnnotation"]
  20453. });
  20454. (0, _utils.default)("EmptyTypeAnnotation", {
  20455. aliases: ["Flow", "FlowType", "FlowBaseAnnotation"]
  20456. });
  20457. (0, _utils.default)("NullableTypeAnnotation", {
  20458. visitor: ["typeAnnotation"],
  20459. aliases: ["Flow", "FlowType"],
  20460. fields: {
  20461. typeAnnotation: (0, _utils.validateType)("FlowType")
  20462. }
  20463. });
  20464. (0, _utils.default)("NumberLiteralTypeAnnotation", {
  20465. builder: ["value"],
  20466. aliases: ["Flow", "FlowType"],
  20467. fields: {
  20468. value: (0, _utils.validate)((0, _utils.assertValueType)("number"))
  20469. }
  20470. });
  20471. (0, _utils.default)("NumberTypeAnnotation", {
  20472. aliases: ["Flow", "FlowType", "FlowBaseAnnotation"]
  20473. });
  20474. (0, _utils.default)("ObjectTypeAnnotation", {
  20475. visitor: ["properties", "indexers", "callProperties", "internalSlots"],
  20476. aliases: ["Flow", "FlowType"],
  20477. builder: ["properties", "indexers", "callProperties", "internalSlots", "exact"],
  20478. fields: {
  20479. properties: (0, _utils.validate)((0, _utils.arrayOfType)(["ObjectTypeProperty", "ObjectTypeSpreadProperty"])),
  20480. indexers: (0, _utils.validateOptional)((0, _utils.arrayOfType)("ObjectTypeIndexer")),
  20481. callProperties: (0, _utils.validateOptional)((0, _utils.arrayOfType)("ObjectTypeCallProperty")),
  20482. internalSlots: (0, _utils.validateOptional)((0, _utils.arrayOfType)("ObjectTypeInternalSlot")),
  20483. exact: {
  20484. validate: (0, _utils.assertValueType)("boolean"),
  20485. default: false
  20486. },
  20487. inexact: (0, _utils.validateOptional)((0, _utils.assertValueType)("boolean"))
  20488. }
  20489. });
  20490. (0, _utils.default)("ObjectTypeInternalSlot", {
  20491. visitor: ["id", "value", "optional", "static", "method"],
  20492. aliases: ["Flow", "UserWhitespacable"],
  20493. fields: {
  20494. id: (0, _utils.validateType)("Identifier"),
  20495. value: (0, _utils.validateType)("FlowType"),
  20496. optional: (0, _utils.validate)((0, _utils.assertValueType)("boolean")),
  20497. static: (0, _utils.validate)((0, _utils.assertValueType)("boolean")),
  20498. method: (0, _utils.validate)((0, _utils.assertValueType)("boolean"))
  20499. }
  20500. });
  20501. (0, _utils.default)("ObjectTypeCallProperty", {
  20502. visitor: ["value"],
  20503. aliases: ["Flow", "UserWhitespacable"],
  20504. fields: {
  20505. value: (0, _utils.validateType)("FlowType"),
  20506. static: (0, _utils.validate)((0, _utils.assertValueType)("boolean"))
  20507. }
  20508. });
  20509. (0, _utils.default)("ObjectTypeIndexer", {
  20510. visitor: ["id", "key", "value", "variance"],
  20511. aliases: ["Flow", "UserWhitespacable"],
  20512. fields: {
  20513. id: (0, _utils.validateOptionalType)("Identifier"),
  20514. key: (0, _utils.validateType)("FlowType"),
  20515. value: (0, _utils.validateType)("FlowType"),
  20516. static: (0, _utils.validate)((0, _utils.assertValueType)("boolean")),
  20517. variance: (0, _utils.validateOptionalType)("Variance")
  20518. }
  20519. });
  20520. (0, _utils.default)("ObjectTypeProperty", {
  20521. visitor: ["key", "value", "variance"],
  20522. aliases: ["Flow", "UserWhitespacable"],
  20523. fields: {
  20524. key: (0, _utils.validateType)(["Identifier", "StringLiteral"]),
  20525. value: (0, _utils.validateType)("FlowType"),
  20526. kind: (0, _utils.validate)((0, _utils.assertOneOf)("init", "get", "set")),
  20527. static: (0, _utils.validate)((0, _utils.assertValueType)("boolean")),
  20528. proto: (0, _utils.validate)((0, _utils.assertValueType)("boolean")),
  20529. optional: (0, _utils.validate)((0, _utils.assertValueType)("boolean")),
  20530. variance: (0, _utils.validateOptionalType)("Variance"),
  20531. method: (0, _utils.validate)((0, _utils.assertValueType)("boolean"))
  20532. }
  20533. });
  20534. (0, _utils.default)("ObjectTypeSpreadProperty", {
  20535. visitor: ["argument"],
  20536. aliases: ["Flow", "UserWhitespacable"],
  20537. fields: {
  20538. argument: (0, _utils.validateType)("FlowType")
  20539. }
  20540. });
  20541. (0, _utils.default)("OpaqueType", {
  20542. visitor: ["id", "typeParameters", "supertype", "impltype"],
  20543. aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"],
  20544. fields: {
  20545. id: (0, _utils.validateType)("Identifier"),
  20546. typeParameters: (0, _utils.validateOptionalType)("TypeParameterDeclaration"),
  20547. supertype: (0, _utils.validateOptionalType)("FlowType"),
  20548. impltype: (0, _utils.validateType)("FlowType")
  20549. }
  20550. });
  20551. (0, _utils.default)("QualifiedTypeIdentifier", {
  20552. visitor: ["id", "qualification"],
  20553. aliases: ["Flow"],
  20554. fields: {
  20555. id: (0, _utils.validateType)("Identifier"),
  20556. qualification: (0, _utils.validateType)(["Identifier", "QualifiedTypeIdentifier"])
  20557. }
  20558. });
  20559. (0, _utils.default)("StringLiteralTypeAnnotation", {
  20560. builder: ["value"],
  20561. aliases: ["Flow", "FlowType"],
  20562. fields: {
  20563. value: (0, _utils.validate)((0, _utils.assertValueType)("string"))
  20564. }
  20565. });
  20566. (0, _utils.default)("StringTypeAnnotation", {
  20567. aliases: ["Flow", "FlowType", "FlowBaseAnnotation"]
  20568. });
  20569. (0, _utils.default)("SymbolTypeAnnotation", {
  20570. aliases: ["Flow", "FlowType", "FlowBaseAnnotation"]
  20571. });
  20572. (0, _utils.default)("ThisTypeAnnotation", {
  20573. aliases: ["Flow", "FlowType", "FlowBaseAnnotation"]
  20574. });
  20575. (0, _utils.default)("TupleTypeAnnotation", {
  20576. visitor: ["types"],
  20577. aliases: ["Flow", "FlowType"],
  20578. fields: {
  20579. types: (0, _utils.validate)((0, _utils.arrayOfType)("FlowType"))
  20580. }
  20581. });
  20582. (0, _utils.default)("TypeofTypeAnnotation", {
  20583. visitor: ["argument"],
  20584. aliases: ["Flow", "FlowType"],
  20585. fields: {
  20586. argument: (0, _utils.validateType)("FlowType")
  20587. }
  20588. });
  20589. (0, _utils.default)("TypeAlias", {
  20590. visitor: ["id", "typeParameters", "right"],
  20591. aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"],
  20592. fields: {
  20593. id: (0, _utils.validateType)("Identifier"),
  20594. typeParameters: (0, _utils.validateOptionalType)("TypeParameterDeclaration"),
  20595. right: (0, _utils.validateType)("FlowType")
  20596. }
  20597. });
  20598. (0, _utils.default)("TypeAnnotation", {
  20599. aliases: ["Flow"],
  20600. visitor: ["typeAnnotation"],
  20601. fields: {
  20602. typeAnnotation: (0, _utils.validateType)("FlowType")
  20603. }
  20604. });
  20605. (0, _utils.default)("TypeCastExpression", {
  20606. visitor: ["expression", "typeAnnotation"],
  20607. aliases: ["Flow", "ExpressionWrapper", "Expression"],
  20608. fields: {
  20609. expression: (0, _utils.validateType)("Expression"),
  20610. typeAnnotation: (0, _utils.validateType)("TypeAnnotation")
  20611. }
  20612. });
  20613. (0, _utils.default)("TypeParameter", {
  20614. aliases: ["Flow"],
  20615. visitor: ["bound", "default", "variance"],
  20616. fields: {
  20617. name: (0, _utils.validate)((0, _utils.assertValueType)("string")),
  20618. bound: (0, _utils.validateOptionalType)("TypeAnnotation"),
  20619. default: (0, _utils.validateOptionalType)("FlowType"),
  20620. variance: (0, _utils.validateOptionalType)("Variance")
  20621. }
  20622. });
  20623. (0, _utils.default)("TypeParameterDeclaration", {
  20624. aliases: ["Flow"],
  20625. visitor: ["params"],
  20626. fields: {
  20627. params: (0, _utils.validate)((0, _utils.arrayOfType)("TypeParameter"))
  20628. }
  20629. });
  20630. (0, _utils.default)("TypeParameterInstantiation", {
  20631. aliases: ["Flow"],
  20632. visitor: ["params"],
  20633. fields: {
  20634. params: (0, _utils.validate)((0, _utils.arrayOfType)("FlowType"))
  20635. }
  20636. });
  20637. (0, _utils.default)("UnionTypeAnnotation", {
  20638. visitor: ["types"],
  20639. aliases: ["Flow", "FlowType"],
  20640. fields: {
  20641. types: (0, _utils.validate)((0, _utils.arrayOfType)("FlowType"))
  20642. }
  20643. });
  20644. (0, _utils.default)("Variance", {
  20645. aliases: ["Flow"],
  20646. builder: ["kind"],
  20647. fields: {
  20648. kind: (0, _utils.validate)((0, _utils.assertOneOf)("minus", "plus"))
  20649. }
  20650. });
  20651. (0, _utils.default)("VoidTypeAnnotation", {
  20652. aliases: ["Flow", "FlowType", "FlowBaseAnnotation"]
  20653. });
  20654. (0, _utils.default)("EnumDeclaration", {
  20655. aliases: ["Statement", "Declaration"],
  20656. visitor: ["id", "body"],
  20657. fields: {
  20658. id: (0, _utils.validateType)("Identifier"),
  20659. body: (0, _utils.validateType)(["EnumBooleanBody", "EnumNumberBody", "EnumStringBody", "EnumSymbolBody"])
  20660. }
  20661. });
  20662. (0, _utils.default)("EnumBooleanBody", {
  20663. aliases: ["EnumBody"],
  20664. visitor: ["members"],
  20665. fields: {
  20666. explicitType: (0, _utils.validate)((0, _utils.assertValueType)("boolean")),
  20667. members: (0, _utils.validateArrayOfType)("EnumBooleanMember"),
  20668. hasUnknownMembers: (0, _utils.validate)((0, _utils.assertValueType)("boolean"))
  20669. }
  20670. });
  20671. (0, _utils.default)("EnumNumberBody", {
  20672. aliases: ["EnumBody"],
  20673. visitor: ["members"],
  20674. fields: {
  20675. explicitType: (0, _utils.validate)((0, _utils.assertValueType)("boolean")),
  20676. members: (0, _utils.validateArrayOfType)("EnumNumberMember"),
  20677. hasUnknownMembers: (0, _utils.validate)((0, _utils.assertValueType)("boolean"))
  20678. }
  20679. });
  20680. (0, _utils.default)("EnumStringBody", {
  20681. aliases: ["EnumBody"],
  20682. visitor: ["members"],
  20683. fields: {
  20684. explicitType: (0, _utils.validate)((0, _utils.assertValueType)("boolean")),
  20685. members: (0, _utils.validateArrayOfType)(["EnumStringMember", "EnumDefaultedMember"]),
  20686. hasUnknownMembers: (0, _utils.validate)((0, _utils.assertValueType)("boolean"))
  20687. }
  20688. });
  20689. (0, _utils.default)("EnumSymbolBody", {
  20690. aliases: ["EnumBody"],
  20691. visitor: ["members"],
  20692. fields: {
  20693. members: (0, _utils.validateArrayOfType)("EnumDefaultedMember"),
  20694. hasUnknownMembers: (0, _utils.validate)((0, _utils.assertValueType)("boolean"))
  20695. }
  20696. });
  20697. (0, _utils.default)("EnumBooleanMember", {
  20698. aliases: ["EnumMember"],
  20699. visitor: ["id"],
  20700. fields: {
  20701. id: (0, _utils.validateType)("Identifier"),
  20702. init: (0, _utils.validateType)("BooleanLiteral")
  20703. }
  20704. });
  20705. (0, _utils.default)("EnumNumberMember", {
  20706. aliases: ["EnumMember"],
  20707. visitor: ["id", "init"],
  20708. fields: {
  20709. id: (0, _utils.validateType)("Identifier"),
  20710. init: (0, _utils.validateType)("NumericLiteral")
  20711. }
  20712. });
  20713. (0, _utils.default)("EnumStringMember", {
  20714. aliases: ["EnumMember"],
  20715. visitor: ["id", "init"],
  20716. fields: {
  20717. id: (0, _utils.validateType)("Identifier"),
  20718. init: (0, _utils.validateType)("StringLiteral")
  20719. }
  20720. });
  20721. (0, _utils.default)("EnumDefaultedMember", {
  20722. aliases: ["EnumMember"],
  20723. visitor: ["id"],
  20724. fields: {
  20725. id: (0, _utils.validateType)("Identifier")
  20726. }
  20727. });
  20728. (0, _utils.default)("IndexedAccessType", {
  20729. visitor: ["objectType", "indexType"],
  20730. aliases: ["Flow", "FlowType"],
  20731. fields: {
  20732. objectType: (0, _utils.validateType)("FlowType"),
  20733. indexType: (0, _utils.validateType)("FlowType")
  20734. }
  20735. });
  20736. (0, _utils.default)("OptionalIndexedAccessType", {
  20737. visitor: ["objectType", "indexType"],
  20738. aliases: ["Flow", "FlowType"],
  20739. fields: {
  20740. objectType: (0, _utils.validateType)("FlowType"),
  20741. indexType: (0, _utils.validateType)("FlowType"),
  20742. optional: (0, _utils.validate)((0, _utils.assertValueType)("boolean"))
  20743. }
  20744. });
  20745. }
  20746. });
  20747. // node_modules/estree-to-babel/node_modules/@babel/types/lib/definitions/jsx.js
  20748. var require_jsx2 = __commonJS({
  20749. "node_modules/estree-to-babel/node_modules/@babel/types/lib/definitions/jsx.js"() {
  20750. "use strict";
  20751. var _utils = require_utils2();
  20752. (0, _utils.default)("JSXAttribute", {
  20753. visitor: ["name", "value"],
  20754. aliases: ["JSX", "Immutable"],
  20755. fields: {
  20756. name: {
  20757. validate: (0, _utils.assertNodeType)("JSXIdentifier", "JSXNamespacedName")
  20758. },
  20759. value: {
  20760. optional: true,
  20761. validate: (0, _utils.assertNodeType)("JSXElement", "JSXFragment", "StringLiteral", "JSXExpressionContainer")
  20762. }
  20763. }
  20764. });
  20765. (0, _utils.default)("JSXClosingElement", {
  20766. visitor: ["name"],
  20767. aliases: ["JSX", "Immutable"],
  20768. fields: {
  20769. name: {
  20770. validate: (0, _utils.assertNodeType)("JSXIdentifier", "JSXMemberExpression", "JSXNamespacedName")
  20771. }
  20772. }
  20773. });
  20774. (0, _utils.default)("JSXElement", {
  20775. builder: ["openingElement", "closingElement", "children", "selfClosing"],
  20776. visitor: ["openingElement", "children", "closingElement"],
  20777. aliases: ["JSX", "Immutable", "Expression"],
  20778. fields: {
  20779. openingElement: {
  20780. validate: (0, _utils.assertNodeType)("JSXOpeningElement")
  20781. },
  20782. closingElement: {
  20783. optional: true,
  20784. validate: (0, _utils.assertNodeType)("JSXClosingElement")
  20785. },
  20786. children: {
  20787. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("JSXText", "JSXExpressionContainer", "JSXSpreadChild", "JSXElement", "JSXFragment")))
  20788. },
  20789. selfClosing: {
  20790. validate: (0, _utils.assertValueType)("boolean"),
  20791. optional: true
  20792. }
  20793. }
  20794. });
  20795. (0, _utils.default)("JSXEmptyExpression", {
  20796. aliases: ["JSX"]
  20797. });
  20798. (0, _utils.default)("JSXExpressionContainer", {
  20799. visitor: ["expression"],
  20800. aliases: ["JSX", "Immutable"],
  20801. fields: {
  20802. expression: {
  20803. validate: (0, _utils.assertNodeType)("Expression", "JSXEmptyExpression")
  20804. }
  20805. }
  20806. });
  20807. (0, _utils.default)("JSXSpreadChild", {
  20808. visitor: ["expression"],
  20809. aliases: ["JSX", "Immutable"],
  20810. fields: {
  20811. expression: {
  20812. validate: (0, _utils.assertNodeType)("Expression")
  20813. }
  20814. }
  20815. });
  20816. (0, _utils.default)("JSXIdentifier", {
  20817. builder: ["name"],
  20818. aliases: ["JSX"],
  20819. fields: {
  20820. name: {
  20821. validate: (0, _utils.assertValueType)("string")
  20822. }
  20823. }
  20824. });
  20825. (0, _utils.default)("JSXMemberExpression", {
  20826. visitor: ["object", "property"],
  20827. aliases: ["JSX"],
  20828. fields: {
  20829. object: {
  20830. validate: (0, _utils.assertNodeType)("JSXMemberExpression", "JSXIdentifier")
  20831. },
  20832. property: {
  20833. validate: (0, _utils.assertNodeType)("JSXIdentifier")
  20834. }
  20835. }
  20836. });
  20837. (0, _utils.default)("JSXNamespacedName", {
  20838. visitor: ["namespace", "name"],
  20839. aliases: ["JSX"],
  20840. fields: {
  20841. namespace: {
  20842. validate: (0, _utils.assertNodeType)("JSXIdentifier")
  20843. },
  20844. name: {
  20845. validate: (0, _utils.assertNodeType)("JSXIdentifier")
  20846. }
  20847. }
  20848. });
  20849. (0, _utils.default)("JSXOpeningElement", {
  20850. builder: ["name", "attributes", "selfClosing"],
  20851. visitor: ["name", "attributes"],
  20852. aliases: ["JSX", "Immutable"],
  20853. fields: {
  20854. name: {
  20855. validate: (0, _utils.assertNodeType)("JSXIdentifier", "JSXMemberExpression", "JSXNamespacedName")
  20856. },
  20857. selfClosing: {
  20858. default: false
  20859. },
  20860. attributes: {
  20861. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("JSXAttribute", "JSXSpreadAttribute")))
  20862. },
  20863. typeParameters: {
  20864. validate: (0, _utils.assertNodeType)("TypeParameterInstantiation", "TSTypeParameterInstantiation"),
  20865. optional: true
  20866. }
  20867. }
  20868. });
  20869. (0, _utils.default)("JSXSpreadAttribute", {
  20870. visitor: ["argument"],
  20871. aliases: ["JSX"],
  20872. fields: {
  20873. argument: {
  20874. validate: (0, _utils.assertNodeType)("Expression")
  20875. }
  20876. }
  20877. });
  20878. (0, _utils.default)("JSXText", {
  20879. aliases: ["JSX", "Immutable"],
  20880. builder: ["value"],
  20881. fields: {
  20882. value: {
  20883. validate: (0, _utils.assertValueType)("string")
  20884. }
  20885. }
  20886. });
  20887. (0, _utils.default)("JSXFragment", {
  20888. builder: ["openingFragment", "closingFragment", "children"],
  20889. visitor: ["openingFragment", "children", "closingFragment"],
  20890. aliases: ["JSX", "Immutable", "Expression"],
  20891. fields: {
  20892. openingFragment: {
  20893. validate: (0, _utils.assertNodeType)("JSXOpeningFragment")
  20894. },
  20895. closingFragment: {
  20896. validate: (0, _utils.assertNodeType)("JSXClosingFragment")
  20897. },
  20898. children: {
  20899. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("JSXText", "JSXExpressionContainer", "JSXSpreadChild", "JSXElement", "JSXFragment")))
  20900. }
  20901. }
  20902. });
  20903. (0, _utils.default)("JSXOpeningFragment", {
  20904. aliases: ["JSX", "Immutable"]
  20905. });
  20906. (0, _utils.default)("JSXClosingFragment", {
  20907. aliases: ["JSX", "Immutable"]
  20908. });
  20909. }
  20910. });
  20911. // node_modules/estree-to-babel/node_modules/@babel/types/lib/definitions/placeholders.js
  20912. var require_placeholders2 = __commonJS({
  20913. "node_modules/estree-to-babel/node_modules/@babel/types/lib/definitions/placeholders.js"(exports) {
  20914. "use strict";
  20915. Object.defineProperty(exports, "__esModule", {
  20916. value: true
  20917. });
  20918. exports.PLACEHOLDERS_FLIPPED_ALIAS = exports.PLACEHOLDERS_ALIAS = exports.PLACEHOLDERS = void 0;
  20919. var _utils = require_utils2();
  20920. var PLACEHOLDERS = ["Identifier", "StringLiteral", "Expression", "Statement", "Declaration", "BlockStatement", "ClassBody", "Pattern"];
  20921. exports.PLACEHOLDERS = PLACEHOLDERS;
  20922. var PLACEHOLDERS_ALIAS = {
  20923. Declaration: ["Statement"],
  20924. Pattern: ["PatternLike", "LVal"]
  20925. };
  20926. exports.PLACEHOLDERS_ALIAS = PLACEHOLDERS_ALIAS;
  20927. for (const type of PLACEHOLDERS) {
  20928. const alias = _utils.ALIAS_KEYS[type];
  20929. if (alias != null && alias.length)
  20930. PLACEHOLDERS_ALIAS[type] = alias;
  20931. }
  20932. var PLACEHOLDERS_FLIPPED_ALIAS = {};
  20933. exports.PLACEHOLDERS_FLIPPED_ALIAS = PLACEHOLDERS_FLIPPED_ALIAS;
  20934. Object.keys(PLACEHOLDERS_ALIAS).forEach((type) => {
  20935. PLACEHOLDERS_ALIAS[type].forEach((alias) => {
  20936. if (!Object.hasOwnProperty.call(PLACEHOLDERS_FLIPPED_ALIAS, alias)) {
  20937. PLACEHOLDERS_FLIPPED_ALIAS[alias] = [];
  20938. }
  20939. PLACEHOLDERS_FLIPPED_ALIAS[alias].push(type);
  20940. });
  20941. });
  20942. }
  20943. });
  20944. // node_modules/estree-to-babel/node_modules/@babel/types/lib/definitions/misc.js
  20945. var require_misc2 = __commonJS({
  20946. "node_modules/estree-to-babel/node_modules/@babel/types/lib/definitions/misc.js"() {
  20947. "use strict";
  20948. var _utils = require_utils2();
  20949. var _placeholders = require_placeholders2();
  20950. {
  20951. (0, _utils.default)("Noop", {
  20952. visitor: []
  20953. });
  20954. }
  20955. (0, _utils.default)("Placeholder", {
  20956. visitor: [],
  20957. builder: ["expectedNode", "name"],
  20958. fields: {
  20959. name: {
  20960. validate: (0, _utils.assertNodeType)("Identifier")
  20961. },
  20962. expectedNode: {
  20963. validate: (0, _utils.assertOneOf)(..._placeholders.PLACEHOLDERS)
  20964. }
  20965. }
  20966. });
  20967. (0, _utils.default)("V8IntrinsicIdentifier", {
  20968. builder: ["name"],
  20969. fields: {
  20970. name: {
  20971. validate: (0, _utils.assertValueType)("string")
  20972. }
  20973. }
  20974. });
  20975. }
  20976. });
  20977. // node_modules/estree-to-babel/node_modules/@babel/types/lib/definitions/experimental.js
  20978. var require_experimental2 = __commonJS({
  20979. "node_modules/estree-to-babel/node_modules/@babel/types/lib/definitions/experimental.js"() {
  20980. "use strict";
  20981. var _utils = require_utils2();
  20982. var _core = require_core2();
  20983. (0, _utils.default)("ArgumentPlaceholder", {});
  20984. (0, _utils.default)("BindExpression", {
  20985. visitor: ["object", "callee"],
  20986. aliases: ["Expression"],
  20987. fields: !process.env.BABEL_TYPES_8_BREAKING ? {
  20988. object: {
  20989. validate: Object.assign(() => {
  20990. }, {
  20991. oneOfNodeTypes: ["Expression"]
  20992. })
  20993. },
  20994. callee: {
  20995. validate: Object.assign(() => {
  20996. }, {
  20997. oneOfNodeTypes: ["Expression"]
  20998. })
  20999. }
  21000. } : {
  21001. object: {
  21002. validate: (0, _utils.assertNodeType)("Expression")
  21003. },
  21004. callee: {
  21005. validate: (0, _utils.assertNodeType)("Expression")
  21006. }
  21007. }
  21008. });
  21009. (0, _utils.default)("ClassProperty", {
  21010. visitor: ["key", "value", "typeAnnotation", "decorators"],
  21011. builder: ["key", "value", "typeAnnotation", "decorators", "computed", "static"],
  21012. aliases: ["Property"],
  21013. fields: Object.assign({}, _core.classMethodOrPropertyCommon, {
  21014. value: {
  21015. validate: (0, _utils.assertNodeType)("Expression"),
  21016. optional: true
  21017. },
  21018. definite: {
  21019. validate: (0, _utils.assertValueType)("boolean"),
  21020. optional: true
  21021. },
  21022. typeAnnotation: {
  21023. validate: (0, _utils.assertNodeType)("TypeAnnotation", "TSTypeAnnotation", "Noop"),
  21024. optional: true
  21025. },
  21026. decorators: {
  21027. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Decorator"))),
  21028. optional: true
  21029. },
  21030. readonly: {
  21031. validate: (0, _utils.assertValueType)("boolean"),
  21032. optional: true
  21033. },
  21034. declare: {
  21035. validate: (0, _utils.assertValueType)("boolean"),
  21036. optional: true
  21037. }
  21038. })
  21039. });
  21040. (0, _utils.default)("PipelineTopicExpression", {
  21041. builder: ["expression"],
  21042. visitor: ["expression"],
  21043. fields: {
  21044. expression: {
  21045. validate: (0, _utils.assertNodeType)("Expression")
  21046. }
  21047. }
  21048. });
  21049. (0, _utils.default)("PipelineBareFunction", {
  21050. builder: ["callee"],
  21051. visitor: ["callee"],
  21052. fields: {
  21053. callee: {
  21054. validate: (0, _utils.assertNodeType)("Expression")
  21055. }
  21056. }
  21057. });
  21058. (0, _utils.default)("PipelinePrimaryTopicReference", {
  21059. aliases: ["Expression"]
  21060. });
  21061. (0, _utils.default)("ClassPrivateProperty", {
  21062. visitor: ["key", "value", "decorators"],
  21063. builder: ["key", "value", "decorators", "static"],
  21064. aliases: ["Property", "Private"],
  21065. fields: {
  21066. key: {
  21067. validate: (0, _utils.assertNodeType)("PrivateName")
  21068. },
  21069. value: {
  21070. validate: (0, _utils.assertNodeType)("Expression"),
  21071. optional: true
  21072. },
  21073. typeAnnotation: {
  21074. validate: (0, _utils.assertNodeType)("TypeAnnotation", "TSTypeAnnotation", "Noop"),
  21075. optional: true
  21076. },
  21077. decorators: {
  21078. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Decorator"))),
  21079. optional: true
  21080. }
  21081. }
  21082. });
  21083. (0, _utils.default)("ClassPrivateMethod", {
  21084. builder: ["kind", "key", "params", "body", "static"],
  21085. visitor: ["key", "params", "body", "decorators", "returnType", "typeParameters"],
  21086. aliases: ["Function", "Scopable", "BlockParent", "FunctionParent", "Method", "Private"],
  21087. fields: Object.assign({}, _core.classMethodOrDeclareMethodCommon, _core.functionTypeAnnotationCommon, {
  21088. key: {
  21089. validate: (0, _utils.assertNodeType)("PrivateName")
  21090. },
  21091. body: {
  21092. validate: (0, _utils.assertNodeType)("BlockStatement")
  21093. }
  21094. })
  21095. });
  21096. (0, _utils.default)("ImportAttribute", {
  21097. visitor: ["key", "value"],
  21098. fields: {
  21099. key: {
  21100. validate: (0, _utils.assertNodeType)("Identifier", "StringLiteral")
  21101. },
  21102. value: {
  21103. validate: (0, _utils.assertNodeType)("StringLiteral")
  21104. }
  21105. }
  21106. });
  21107. (0, _utils.default)("Decorator", {
  21108. visitor: ["expression"],
  21109. fields: {
  21110. expression: {
  21111. validate: (0, _utils.assertNodeType)("Expression")
  21112. }
  21113. }
  21114. });
  21115. (0, _utils.default)("DoExpression", {
  21116. visitor: ["body"],
  21117. builder: ["body", "async"],
  21118. aliases: ["Expression"],
  21119. fields: {
  21120. body: {
  21121. validate: (0, _utils.assertNodeType)("BlockStatement")
  21122. },
  21123. async: {
  21124. validate: (0, _utils.assertValueType)("boolean"),
  21125. default: false
  21126. }
  21127. }
  21128. });
  21129. (0, _utils.default)("ExportDefaultSpecifier", {
  21130. visitor: ["exported"],
  21131. aliases: ["ModuleSpecifier"],
  21132. fields: {
  21133. exported: {
  21134. validate: (0, _utils.assertNodeType)("Identifier")
  21135. }
  21136. }
  21137. });
  21138. (0, _utils.default)("PrivateName", {
  21139. visitor: ["id"],
  21140. aliases: ["Private"],
  21141. fields: {
  21142. id: {
  21143. validate: (0, _utils.assertNodeType)("Identifier")
  21144. }
  21145. }
  21146. });
  21147. (0, _utils.default)("RecordExpression", {
  21148. visitor: ["properties"],
  21149. aliases: ["Expression"],
  21150. fields: {
  21151. properties: {
  21152. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("ObjectProperty", "SpreadElement")))
  21153. }
  21154. }
  21155. });
  21156. (0, _utils.default)("TupleExpression", {
  21157. fields: {
  21158. elements: {
  21159. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Expression", "SpreadElement"))),
  21160. default: []
  21161. }
  21162. },
  21163. visitor: ["elements"],
  21164. aliases: ["Expression"]
  21165. });
  21166. (0, _utils.default)("DecimalLiteral", {
  21167. builder: ["value"],
  21168. fields: {
  21169. value: {
  21170. validate: (0, _utils.assertValueType)("string")
  21171. }
  21172. },
  21173. aliases: ["Expression", "Pureish", "Literal", "Immutable"]
  21174. });
  21175. (0, _utils.default)("StaticBlock", {
  21176. visitor: ["body"],
  21177. fields: {
  21178. body: {
  21179. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Statement")))
  21180. }
  21181. },
  21182. aliases: ["Scopable", "BlockParent"]
  21183. });
  21184. (0, _utils.default)("ModuleExpression", {
  21185. visitor: ["body"],
  21186. fields: {
  21187. body: {
  21188. validate: (0, _utils.assertNodeType)("Program")
  21189. }
  21190. },
  21191. aliases: ["Expression"]
  21192. });
  21193. }
  21194. });
  21195. // node_modules/estree-to-babel/node_modules/@babel/types/lib/definitions/typescript.js
  21196. var require_typescript2 = __commonJS({
  21197. "node_modules/estree-to-babel/node_modules/@babel/types/lib/definitions/typescript.js"() {
  21198. "use strict";
  21199. var _utils = require_utils2();
  21200. var _core = require_core2();
  21201. var bool = (0, _utils.assertValueType)("boolean");
  21202. var tSFunctionTypeAnnotationCommon = {
  21203. returnType: {
  21204. validate: (0, _utils.assertNodeType)("TSTypeAnnotation", "Noop"),
  21205. optional: true
  21206. },
  21207. typeParameters: {
  21208. validate: (0, _utils.assertNodeType)("TSTypeParameterDeclaration", "Noop"),
  21209. optional: true
  21210. }
  21211. };
  21212. (0, _utils.default)("TSParameterProperty", {
  21213. aliases: ["LVal"],
  21214. visitor: ["parameter"],
  21215. fields: {
  21216. accessibility: {
  21217. validate: (0, _utils.assertOneOf)("public", "private", "protected"),
  21218. optional: true
  21219. },
  21220. readonly: {
  21221. validate: (0, _utils.assertValueType)("boolean"),
  21222. optional: true
  21223. },
  21224. parameter: {
  21225. validate: (0, _utils.assertNodeType)("Identifier", "AssignmentPattern")
  21226. }
  21227. }
  21228. });
  21229. (0, _utils.default)("TSDeclareFunction", {
  21230. aliases: ["Statement", "Declaration"],
  21231. visitor: ["id", "typeParameters", "params", "returnType"],
  21232. fields: Object.assign({}, _core.functionDeclarationCommon, tSFunctionTypeAnnotationCommon)
  21233. });
  21234. (0, _utils.default)("TSDeclareMethod", {
  21235. visitor: ["decorators", "key", "typeParameters", "params", "returnType"],
  21236. fields: Object.assign({}, _core.classMethodOrDeclareMethodCommon, tSFunctionTypeAnnotationCommon)
  21237. });
  21238. (0, _utils.default)("TSQualifiedName", {
  21239. aliases: ["TSEntityName"],
  21240. visitor: ["left", "right"],
  21241. fields: {
  21242. left: (0, _utils.validateType)("TSEntityName"),
  21243. right: (0, _utils.validateType)("Identifier")
  21244. }
  21245. });
  21246. var signatureDeclarationCommon = {
  21247. typeParameters: (0, _utils.validateOptionalType)("TSTypeParameterDeclaration"),
  21248. parameters: (0, _utils.validateArrayOfType)(["Identifier", "RestElement"]),
  21249. typeAnnotation: (0, _utils.validateOptionalType)("TSTypeAnnotation")
  21250. };
  21251. var callConstructSignatureDeclaration = {
  21252. aliases: ["TSTypeElement"],
  21253. visitor: ["typeParameters", "parameters", "typeAnnotation"],
  21254. fields: signatureDeclarationCommon
  21255. };
  21256. (0, _utils.default)("TSCallSignatureDeclaration", callConstructSignatureDeclaration);
  21257. (0, _utils.default)("TSConstructSignatureDeclaration", callConstructSignatureDeclaration);
  21258. var namedTypeElementCommon = {
  21259. key: (0, _utils.validateType)("Expression"),
  21260. computed: (0, _utils.validate)(bool),
  21261. optional: (0, _utils.validateOptional)(bool)
  21262. };
  21263. (0, _utils.default)("TSPropertySignature", {
  21264. aliases: ["TSTypeElement"],
  21265. visitor: ["key", "typeAnnotation", "initializer"],
  21266. fields: Object.assign({}, namedTypeElementCommon, {
  21267. readonly: (0, _utils.validateOptional)(bool),
  21268. typeAnnotation: (0, _utils.validateOptionalType)("TSTypeAnnotation"),
  21269. initializer: (0, _utils.validateOptionalType)("Expression")
  21270. })
  21271. });
  21272. (0, _utils.default)("TSMethodSignature", {
  21273. aliases: ["TSTypeElement"],
  21274. visitor: ["key", "typeParameters", "parameters", "typeAnnotation"],
  21275. fields: Object.assign({}, signatureDeclarationCommon, namedTypeElementCommon, {
  21276. kind: {
  21277. validate: (0, _utils.assertOneOf)("method", "get", "set")
  21278. }
  21279. })
  21280. });
  21281. (0, _utils.default)("TSIndexSignature", {
  21282. aliases: ["TSTypeElement"],
  21283. visitor: ["parameters", "typeAnnotation"],
  21284. fields: {
  21285. readonly: (0, _utils.validateOptional)(bool),
  21286. static: (0, _utils.validateOptional)(bool),
  21287. parameters: (0, _utils.validateArrayOfType)("Identifier"),
  21288. typeAnnotation: (0, _utils.validateOptionalType)("TSTypeAnnotation")
  21289. }
  21290. });
  21291. var tsKeywordTypes = ["TSAnyKeyword", "TSBooleanKeyword", "TSBigIntKeyword", "TSIntrinsicKeyword", "TSNeverKeyword", "TSNullKeyword", "TSNumberKeyword", "TSObjectKeyword", "TSStringKeyword", "TSSymbolKeyword", "TSUndefinedKeyword", "TSUnknownKeyword", "TSVoidKeyword"];
  21292. for (const type of tsKeywordTypes) {
  21293. (0, _utils.default)(type, {
  21294. aliases: ["TSType", "TSBaseType"],
  21295. visitor: [],
  21296. fields: {}
  21297. });
  21298. }
  21299. (0, _utils.default)("TSThisType", {
  21300. aliases: ["TSType", "TSBaseType"],
  21301. visitor: [],
  21302. fields: {}
  21303. });
  21304. var fnOrCtrBase = {
  21305. aliases: ["TSType"],
  21306. visitor: ["typeParameters", "parameters", "typeAnnotation"]
  21307. };
  21308. (0, _utils.default)("TSFunctionType", Object.assign({}, fnOrCtrBase, {
  21309. fields: signatureDeclarationCommon
  21310. }));
  21311. (0, _utils.default)("TSConstructorType", Object.assign({}, fnOrCtrBase, {
  21312. fields: Object.assign({}, signatureDeclarationCommon, {
  21313. abstract: (0, _utils.validateOptional)(bool)
  21314. })
  21315. }));
  21316. (0, _utils.default)("TSTypeReference", {
  21317. aliases: ["TSType"],
  21318. visitor: ["typeName", "typeParameters"],
  21319. fields: {
  21320. typeName: (0, _utils.validateType)("TSEntityName"),
  21321. typeParameters: (0, _utils.validateOptionalType)("TSTypeParameterInstantiation")
  21322. }
  21323. });
  21324. (0, _utils.default)("TSTypePredicate", {
  21325. aliases: ["TSType"],
  21326. visitor: ["parameterName", "typeAnnotation"],
  21327. builder: ["parameterName", "typeAnnotation", "asserts"],
  21328. fields: {
  21329. parameterName: (0, _utils.validateType)(["Identifier", "TSThisType"]),
  21330. typeAnnotation: (0, _utils.validateOptionalType)("TSTypeAnnotation"),
  21331. asserts: (0, _utils.validateOptional)(bool)
  21332. }
  21333. });
  21334. (0, _utils.default)("TSTypeQuery", {
  21335. aliases: ["TSType"],
  21336. visitor: ["exprName"],
  21337. fields: {
  21338. exprName: (0, _utils.validateType)(["TSEntityName", "TSImportType"])
  21339. }
  21340. });
  21341. (0, _utils.default)("TSTypeLiteral", {
  21342. aliases: ["TSType"],
  21343. visitor: ["members"],
  21344. fields: {
  21345. members: (0, _utils.validateArrayOfType)("TSTypeElement")
  21346. }
  21347. });
  21348. (0, _utils.default)("TSArrayType", {
  21349. aliases: ["TSType"],
  21350. visitor: ["elementType"],
  21351. fields: {
  21352. elementType: (0, _utils.validateType)("TSType")
  21353. }
  21354. });
  21355. (0, _utils.default)("TSTupleType", {
  21356. aliases: ["TSType"],
  21357. visitor: ["elementTypes"],
  21358. fields: {
  21359. elementTypes: (0, _utils.validateArrayOfType)(["TSType", "TSNamedTupleMember"])
  21360. }
  21361. });
  21362. (0, _utils.default)("TSOptionalType", {
  21363. aliases: ["TSType"],
  21364. visitor: ["typeAnnotation"],
  21365. fields: {
  21366. typeAnnotation: (0, _utils.validateType)("TSType")
  21367. }
  21368. });
  21369. (0, _utils.default)("TSRestType", {
  21370. aliases: ["TSType"],
  21371. visitor: ["typeAnnotation"],
  21372. fields: {
  21373. typeAnnotation: (0, _utils.validateType)("TSType")
  21374. }
  21375. });
  21376. (0, _utils.default)("TSNamedTupleMember", {
  21377. visitor: ["label", "elementType"],
  21378. builder: ["label", "elementType", "optional"],
  21379. fields: {
  21380. label: (0, _utils.validateType)("Identifier"),
  21381. optional: {
  21382. validate: bool,
  21383. default: false
  21384. },
  21385. elementType: (0, _utils.validateType)("TSType")
  21386. }
  21387. });
  21388. var unionOrIntersection = {
  21389. aliases: ["TSType"],
  21390. visitor: ["types"],
  21391. fields: {
  21392. types: (0, _utils.validateArrayOfType)("TSType")
  21393. }
  21394. };
  21395. (0, _utils.default)("TSUnionType", unionOrIntersection);
  21396. (0, _utils.default)("TSIntersectionType", unionOrIntersection);
  21397. (0, _utils.default)("TSConditionalType", {
  21398. aliases: ["TSType"],
  21399. visitor: ["checkType", "extendsType", "trueType", "falseType"],
  21400. fields: {
  21401. checkType: (0, _utils.validateType)("TSType"),
  21402. extendsType: (0, _utils.validateType)("TSType"),
  21403. trueType: (0, _utils.validateType)("TSType"),
  21404. falseType: (0, _utils.validateType)("TSType")
  21405. }
  21406. });
  21407. (0, _utils.default)("TSInferType", {
  21408. aliases: ["TSType"],
  21409. visitor: ["typeParameter"],
  21410. fields: {
  21411. typeParameter: (0, _utils.validateType)("TSTypeParameter")
  21412. }
  21413. });
  21414. (0, _utils.default)("TSParenthesizedType", {
  21415. aliases: ["TSType"],
  21416. visitor: ["typeAnnotation"],
  21417. fields: {
  21418. typeAnnotation: (0, _utils.validateType)("TSType")
  21419. }
  21420. });
  21421. (0, _utils.default)("TSTypeOperator", {
  21422. aliases: ["TSType"],
  21423. visitor: ["typeAnnotation"],
  21424. fields: {
  21425. operator: (0, _utils.validate)((0, _utils.assertValueType)("string")),
  21426. typeAnnotation: (0, _utils.validateType)("TSType")
  21427. }
  21428. });
  21429. (0, _utils.default)("TSIndexedAccessType", {
  21430. aliases: ["TSType"],
  21431. visitor: ["objectType", "indexType"],
  21432. fields: {
  21433. objectType: (0, _utils.validateType)("TSType"),
  21434. indexType: (0, _utils.validateType)("TSType")
  21435. }
  21436. });
  21437. (0, _utils.default)("TSMappedType", {
  21438. aliases: ["TSType"],
  21439. visitor: ["typeParameter", "typeAnnotation", "nameType"],
  21440. fields: {
  21441. readonly: (0, _utils.validateOptional)(bool),
  21442. typeParameter: (0, _utils.validateType)("TSTypeParameter"),
  21443. optional: (0, _utils.validateOptional)(bool),
  21444. typeAnnotation: (0, _utils.validateOptionalType)("TSType"),
  21445. nameType: (0, _utils.validateOptionalType)("TSType")
  21446. }
  21447. });
  21448. (0, _utils.default)("TSLiteralType", {
  21449. aliases: ["TSType", "TSBaseType"],
  21450. visitor: ["literal"],
  21451. fields: {
  21452. literal: (0, _utils.validateType)(["NumericLiteral", "StringLiteral", "BooleanLiteral", "BigIntLiteral"])
  21453. }
  21454. });
  21455. (0, _utils.default)("TSExpressionWithTypeArguments", {
  21456. aliases: ["TSType"],
  21457. visitor: ["expression", "typeParameters"],
  21458. fields: {
  21459. expression: (0, _utils.validateType)("TSEntityName"),
  21460. typeParameters: (0, _utils.validateOptionalType)("TSTypeParameterInstantiation")
  21461. }
  21462. });
  21463. (0, _utils.default)("TSInterfaceDeclaration", {
  21464. aliases: ["Statement", "Declaration"],
  21465. visitor: ["id", "typeParameters", "extends", "body"],
  21466. fields: {
  21467. declare: (0, _utils.validateOptional)(bool),
  21468. id: (0, _utils.validateType)("Identifier"),
  21469. typeParameters: (0, _utils.validateOptionalType)("TSTypeParameterDeclaration"),
  21470. extends: (0, _utils.validateOptional)((0, _utils.arrayOfType)("TSExpressionWithTypeArguments")),
  21471. body: (0, _utils.validateType)("TSInterfaceBody")
  21472. }
  21473. });
  21474. (0, _utils.default)("TSInterfaceBody", {
  21475. visitor: ["body"],
  21476. fields: {
  21477. body: (0, _utils.validateArrayOfType)("TSTypeElement")
  21478. }
  21479. });
  21480. (0, _utils.default)("TSTypeAliasDeclaration", {
  21481. aliases: ["Statement", "Declaration"],
  21482. visitor: ["id", "typeParameters", "typeAnnotation"],
  21483. fields: {
  21484. declare: (0, _utils.validateOptional)(bool),
  21485. id: (0, _utils.validateType)("Identifier"),
  21486. typeParameters: (0, _utils.validateOptionalType)("TSTypeParameterDeclaration"),
  21487. typeAnnotation: (0, _utils.validateType)("TSType")
  21488. }
  21489. });
  21490. (0, _utils.default)("TSAsExpression", {
  21491. aliases: ["Expression"],
  21492. visitor: ["expression", "typeAnnotation"],
  21493. fields: {
  21494. expression: (0, _utils.validateType)("Expression"),
  21495. typeAnnotation: (0, _utils.validateType)("TSType")
  21496. }
  21497. });
  21498. (0, _utils.default)("TSTypeAssertion", {
  21499. aliases: ["Expression"],
  21500. visitor: ["typeAnnotation", "expression"],
  21501. fields: {
  21502. typeAnnotation: (0, _utils.validateType)("TSType"),
  21503. expression: (0, _utils.validateType)("Expression")
  21504. }
  21505. });
  21506. (0, _utils.default)("TSEnumDeclaration", {
  21507. aliases: ["Statement", "Declaration"],
  21508. visitor: ["id", "members"],
  21509. fields: {
  21510. declare: (0, _utils.validateOptional)(bool),
  21511. const: (0, _utils.validateOptional)(bool),
  21512. id: (0, _utils.validateType)("Identifier"),
  21513. members: (0, _utils.validateArrayOfType)("TSEnumMember"),
  21514. initializer: (0, _utils.validateOptionalType)("Expression")
  21515. }
  21516. });
  21517. (0, _utils.default)("TSEnumMember", {
  21518. visitor: ["id", "initializer"],
  21519. fields: {
  21520. id: (0, _utils.validateType)(["Identifier", "StringLiteral"]),
  21521. initializer: (0, _utils.validateOptionalType)("Expression")
  21522. }
  21523. });
  21524. (0, _utils.default)("TSModuleDeclaration", {
  21525. aliases: ["Statement", "Declaration"],
  21526. visitor: ["id", "body"],
  21527. fields: {
  21528. declare: (0, _utils.validateOptional)(bool),
  21529. global: (0, _utils.validateOptional)(bool),
  21530. id: (0, _utils.validateType)(["Identifier", "StringLiteral"]),
  21531. body: (0, _utils.validateType)(["TSModuleBlock", "TSModuleDeclaration"])
  21532. }
  21533. });
  21534. (0, _utils.default)("TSModuleBlock", {
  21535. aliases: ["Scopable", "Block", "BlockParent"],
  21536. visitor: ["body"],
  21537. fields: {
  21538. body: (0, _utils.validateArrayOfType)("Statement")
  21539. }
  21540. });
  21541. (0, _utils.default)("TSImportType", {
  21542. aliases: ["TSType"],
  21543. visitor: ["argument", "qualifier", "typeParameters"],
  21544. fields: {
  21545. argument: (0, _utils.validateType)("StringLiteral"),
  21546. qualifier: (0, _utils.validateOptionalType)("TSEntityName"),
  21547. typeParameters: (0, _utils.validateOptionalType)("TSTypeParameterInstantiation")
  21548. }
  21549. });
  21550. (0, _utils.default)("TSImportEqualsDeclaration", {
  21551. aliases: ["Statement"],
  21552. visitor: ["id", "moduleReference"],
  21553. fields: {
  21554. isExport: (0, _utils.validate)(bool),
  21555. id: (0, _utils.validateType)("Identifier"),
  21556. moduleReference: (0, _utils.validateType)(["TSEntityName", "TSExternalModuleReference"])
  21557. }
  21558. });
  21559. (0, _utils.default)("TSExternalModuleReference", {
  21560. visitor: ["expression"],
  21561. fields: {
  21562. expression: (0, _utils.validateType)("StringLiteral")
  21563. }
  21564. });
  21565. (0, _utils.default)("TSNonNullExpression", {
  21566. aliases: ["Expression"],
  21567. visitor: ["expression"],
  21568. fields: {
  21569. expression: (0, _utils.validateType)("Expression")
  21570. }
  21571. });
  21572. (0, _utils.default)("TSExportAssignment", {
  21573. aliases: ["Statement"],
  21574. visitor: ["expression"],
  21575. fields: {
  21576. expression: (0, _utils.validateType)("Expression")
  21577. }
  21578. });
  21579. (0, _utils.default)("TSNamespaceExportDeclaration", {
  21580. aliases: ["Statement"],
  21581. visitor: ["id"],
  21582. fields: {
  21583. id: (0, _utils.validateType)("Identifier")
  21584. }
  21585. });
  21586. (0, _utils.default)("TSTypeAnnotation", {
  21587. visitor: ["typeAnnotation"],
  21588. fields: {
  21589. typeAnnotation: {
  21590. validate: (0, _utils.assertNodeType)("TSType")
  21591. }
  21592. }
  21593. });
  21594. (0, _utils.default)("TSTypeParameterInstantiation", {
  21595. visitor: ["params"],
  21596. fields: {
  21597. params: {
  21598. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("TSType")))
  21599. }
  21600. }
  21601. });
  21602. (0, _utils.default)("TSTypeParameterDeclaration", {
  21603. visitor: ["params"],
  21604. fields: {
  21605. params: {
  21606. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("TSTypeParameter")))
  21607. }
  21608. }
  21609. });
  21610. (0, _utils.default)("TSTypeParameter", {
  21611. builder: ["constraint", "default", "name"],
  21612. visitor: ["constraint", "default"],
  21613. fields: {
  21614. name: {
  21615. validate: (0, _utils.assertValueType)("string")
  21616. },
  21617. constraint: {
  21618. validate: (0, _utils.assertNodeType)("TSType"),
  21619. optional: true
  21620. },
  21621. default: {
  21622. validate: (0, _utils.assertNodeType)("TSType"),
  21623. optional: true
  21624. }
  21625. }
  21626. });
  21627. }
  21628. });
  21629. // node_modules/estree-to-babel/node_modules/@babel/types/lib/definitions/index.js
  21630. var require_definitions2 = __commonJS({
  21631. "node_modules/estree-to-babel/node_modules/@babel/types/lib/definitions/index.js"(exports) {
  21632. "use strict";
  21633. Object.defineProperty(exports, "__esModule", {
  21634. value: true
  21635. });
  21636. Object.defineProperty(exports, "VISITOR_KEYS", {
  21637. enumerable: true,
  21638. get: function() {
  21639. return _utils.VISITOR_KEYS;
  21640. }
  21641. });
  21642. Object.defineProperty(exports, "ALIAS_KEYS", {
  21643. enumerable: true,
  21644. get: function() {
  21645. return _utils.ALIAS_KEYS;
  21646. }
  21647. });
  21648. Object.defineProperty(exports, "FLIPPED_ALIAS_KEYS", {
  21649. enumerable: true,
  21650. get: function() {
  21651. return _utils.FLIPPED_ALIAS_KEYS;
  21652. }
  21653. });
  21654. Object.defineProperty(exports, "NODE_FIELDS", {
  21655. enumerable: true,
  21656. get: function() {
  21657. return _utils.NODE_FIELDS;
  21658. }
  21659. });
  21660. Object.defineProperty(exports, "BUILDER_KEYS", {
  21661. enumerable: true,
  21662. get: function() {
  21663. return _utils.BUILDER_KEYS;
  21664. }
  21665. });
  21666. Object.defineProperty(exports, "DEPRECATED_KEYS", {
  21667. enumerable: true,
  21668. get: function() {
  21669. return _utils.DEPRECATED_KEYS;
  21670. }
  21671. });
  21672. Object.defineProperty(exports, "NODE_PARENT_VALIDATIONS", {
  21673. enumerable: true,
  21674. get: function() {
  21675. return _utils.NODE_PARENT_VALIDATIONS;
  21676. }
  21677. });
  21678. Object.defineProperty(exports, "PLACEHOLDERS", {
  21679. enumerable: true,
  21680. get: function() {
  21681. return _placeholders.PLACEHOLDERS;
  21682. }
  21683. });
  21684. Object.defineProperty(exports, "PLACEHOLDERS_ALIAS", {
  21685. enumerable: true,
  21686. get: function() {
  21687. return _placeholders.PLACEHOLDERS_ALIAS;
  21688. }
  21689. });
  21690. Object.defineProperty(exports, "PLACEHOLDERS_FLIPPED_ALIAS", {
  21691. enumerable: true,
  21692. get: function() {
  21693. return _placeholders.PLACEHOLDERS_FLIPPED_ALIAS;
  21694. }
  21695. });
  21696. exports.TYPES = void 0;
  21697. var _toFastProperties = require_to_fast_properties();
  21698. require_core2();
  21699. require_flow2();
  21700. require_jsx2();
  21701. require_misc2();
  21702. require_experimental2();
  21703. require_typescript2();
  21704. var _utils = require_utils2();
  21705. var _placeholders = require_placeholders2();
  21706. _toFastProperties(_utils.VISITOR_KEYS);
  21707. _toFastProperties(_utils.ALIAS_KEYS);
  21708. _toFastProperties(_utils.FLIPPED_ALIAS_KEYS);
  21709. _toFastProperties(_utils.NODE_FIELDS);
  21710. _toFastProperties(_utils.BUILDER_KEYS);
  21711. _toFastProperties(_utils.DEPRECATED_KEYS);
  21712. _toFastProperties(_placeholders.PLACEHOLDERS_ALIAS);
  21713. _toFastProperties(_placeholders.PLACEHOLDERS_FLIPPED_ALIAS);
  21714. var TYPES = Object.keys(_utils.VISITOR_KEYS).concat(Object.keys(_utils.FLIPPED_ALIAS_KEYS)).concat(Object.keys(_utils.DEPRECATED_KEYS));
  21715. exports.TYPES = TYPES;
  21716. }
  21717. });
  21718. // node_modules/estree-to-babel/node_modules/@babel/types/lib/builders/builder.js
  21719. var require_builder2 = __commonJS({
  21720. "node_modules/estree-to-babel/node_modules/@babel/types/lib/builders/builder.js"(exports) {
  21721. "use strict";
  21722. Object.defineProperty(exports, "__esModule", {
  21723. value: true
  21724. });
  21725. exports.default = builder;
  21726. var _definitions = require_definitions2();
  21727. var _validate = require_validate2();
  21728. function builder(type, ...args) {
  21729. const keys2 = _definitions.BUILDER_KEYS[type];
  21730. const countArgs = args.length;
  21731. if (countArgs > keys2.length) {
  21732. throw new Error(`${type}: Too many arguments passed. Received ${countArgs} but can receive no more than ${keys2.length}`);
  21733. }
  21734. const node = {
  21735. type
  21736. };
  21737. let i = 0;
  21738. keys2.forEach((key) => {
  21739. const field = _definitions.NODE_FIELDS[type][key];
  21740. let arg;
  21741. if (i < countArgs)
  21742. arg = args[i];
  21743. if (arg === void 0) {
  21744. arg = Array.isArray(field.default) ? [] : field.default;
  21745. }
  21746. node[key] = arg;
  21747. i++;
  21748. });
  21749. for (const key of Object.keys(node)) {
  21750. (0, _validate.default)(node, key, node[key]);
  21751. }
  21752. return node;
  21753. }
  21754. }
  21755. });
  21756. // node_modules/estree-to-babel/node_modules/@babel/types/lib/builders/generated/index.js
  21757. var require_generated7 = __commonJS({
  21758. "node_modules/estree-to-babel/node_modules/@babel/types/lib/builders/generated/index.js"(exports) {
  21759. "use strict";
  21760. Object.defineProperty(exports, "__esModule", {
  21761. value: true
  21762. });
  21763. exports.arrayExpression = arrayExpression;
  21764. exports.assignmentExpression = assignmentExpression;
  21765. exports.binaryExpression = binaryExpression;
  21766. exports.interpreterDirective = interpreterDirective;
  21767. exports.directive = directive;
  21768. exports.directiveLiteral = directiveLiteral;
  21769. exports.blockStatement = blockStatement;
  21770. exports.breakStatement = breakStatement;
  21771. exports.callExpression = callExpression;
  21772. exports.catchClause = catchClause;
  21773. exports.conditionalExpression = conditionalExpression;
  21774. exports.continueStatement = continueStatement;
  21775. exports.debuggerStatement = debuggerStatement;
  21776. exports.doWhileStatement = doWhileStatement;
  21777. exports.emptyStatement = emptyStatement;
  21778. exports.expressionStatement = expressionStatement;
  21779. exports.file = file;
  21780. exports.forInStatement = forInStatement;
  21781. exports.forStatement = forStatement;
  21782. exports.functionDeclaration = functionDeclaration;
  21783. exports.functionExpression = functionExpression;
  21784. exports.identifier = identifier;
  21785. exports.ifStatement = ifStatement;
  21786. exports.labeledStatement = labeledStatement;
  21787. exports.stringLiteral = stringLiteral;
  21788. exports.numericLiteral = numericLiteral;
  21789. exports.nullLiteral = nullLiteral;
  21790. exports.booleanLiteral = booleanLiteral;
  21791. exports.regExpLiteral = regExpLiteral;
  21792. exports.logicalExpression = logicalExpression;
  21793. exports.memberExpression = memberExpression;
  21794. exports.newExpression = newExpression;
  21795. exports.program = program;
  21796. exports.objectExpression = objectExpression;
  21797. exports.objectMethod = objectMethod;
  21798. exports.objectProperty = objectProperty;
  21799. exports.restElement = restElement;
  21800. exports.returnStatement = returnStatement;
  21801. exports.sequenceExpression = sequenceExpression;
  21802. exports.parenthesizedExpression = parenthesizedExpression;
  21803. exports.switchCase = switchCase;
  21804. exports.switchStatement = switchStatement;
  21805. exports.thisExpression = thisExpression;
  21806. exports.throwStatement = throwStatement;
  21807. exports.tryStatement = tryStatement;
  21808. exports.unaryExpression = unaryExpression;
  21809. exports.updateExpression = updateExpression;
  21810. exports.variableDeclaration = variableDeclaration;
  21811. exports.variableDeclarator = variableDeclarator;
  21812. exports.whileStatement = whileStatement;
  21813. exports.withStatement = withStatement;
  21814. exports.assignmentPattern = assignmentPattern;
  21815. exports.arrayPattern = arrayPattern;
  21816. exports.arrowFunctionExpression = arrowFunctionExpression;
  21817. exports.classBody = classBody;
  21818. exports.classExpression = classExpression;
  21819. exports.classDeclaration = classDeclaration;
  21820. exports.exportAllDeclaration = exportAllDeclaration;
  21821. exports.exportDefaultDeclaration = exportDefaultDeclaration;
  21822. exports.exportNamedDeclaration = exportNamedDeclaration;
  21823. exports.exportSpecifier = exportSpecifier;
  21824. exports.forOfStatement = forOfStatement;
  21825. exports.importDeclaration = importDeclaration;
  21826. exports.importDefaultSpecifier = importDefaultSpecifier;
  21827. exports.importNamespaceSpecifier = importNamespaceSpecifier;
  21828. exports.importSpecifier = importSpecifier;
  21829. exports.metaProperty = metaProperty;
  21830. exports.classMethod = classMethod;
  21831. exports.objectPattern = objectPattern;
  21832. exports.spreadElement = spreadElement;
  21833. exports.super = _super;
  21834. exports.taggedTemplateExpression = taggedTemplateExpression;
  21835. exports.templateElement = templateElement;
  21836. exports.templateLiteral = templateLiteral;
  21837. exports.yieldExpression = yieldExpression;
  21838. exports.awaitExpression = awaitExpression;
  21839. exports.import = _import;
  21840. exports.bigIntLiteral = bigIntLiteral;
  21841. exports.exportNamespaceSpecifier = exportNamespaceSpecifier;
  21842. exports.optionalMemberExpression = optionalMemberExpression;
  21843. exports.optionalCallExpression = optionalCallExpression;
  21844. exports.anyTypeAnnotation = anyTypeAnnotation;
  21845. exports.arrayTypeAnnotation = arrayTypeAnnotation;
  21846. exports.booleanTypeAnnotation = booleanTypeAnnotation;
  21847. exports.booleanLiteralTypeAnnotation = booleanLiteralTypeAnnotation;
  21848. exports.nullLiteralTypeAnnotation = nullLiteralTypeAnnotation;
  21849. exports.classImplements = classImplements;
  21850. exports.declareClass = declareClass;
  21851. exports.declareFunction = declareFunction;
  21852. exports.declareInterface = declareInterface;
  21853. exports.declareModule = declareModule;
  21854. exports.declareModuleExports = declareModuleExports;
  21855. exports.declareTypeAlias = declareTypeAlias;
  21856. exports.declareOpaqueType = declareOpaqueType;
  21857. exports.declareVariable = declareVariable;
  21858. exports.declareExportDeclaration = declareExportDeclaration;
  21859. exports.declareExportAllDeclaration = declareExportAllDeclaration;
  21860. exports.declaredPredicate = declaredPredicate;
  21861. exports.existsTypeAnnotation = existsTypeAnnotation;
  21862. exports.functionTypeAnnotation = functionTypeAnnotation;
  21863. exports.functionTypeParam = functionTypeParam;
  21864. exports.genericTypeAnnotation = genericTypeAnnotation;
  21865. exports.inferredPredicate = inferredPredicate;
  21866. exports.interfaceExtends = interfaceExtends;
  21867. exports.interfaceDeclaration = interfaceDeclaration;
  21868. exports.interfaceTypeAnnotation = interfaceTypeAnnotation;
  21869. exports.intersectionTypeAnnotation = intersectionTypeAnnotation;
  21870. exports.mixedTypeAnnotation = mixedTypeAnnotation;
  21871. exports.emptyTypeAnnotation = emptyTypeAnnotation;
  21872. exports.nullableTypeAnnotation = nullableTypeAnnotation;
  21873. exports.numberLiteralTypeAnnotation = numberLiteralTypeAnnotation;
  21874. exports.numberTypeAnnotation = numberTypeAnnotation;
  21875. exports.objectTypeAnnotation = objectTypeAnnotation;
  21876. exports.objectTypeInternalSlot = objectTypeInternalSlot;
  21877. exports.objectTypeCallProperty = objectTypeCallProperty;
  21878. exports.objectTypeIndexer = objectTypeIndexer;
  21879. exports.objectTypeProperty = objectTypeProperty;
  21880. exports.objectTypeSpreadProperty = objectTypeSpreadProperty;
  21881. exports.opaqueType = opaqueType;
  21882. exports.qualifiedTypeIdentifier = qualifiedTypeIdentifier;
  21883. exports.stringLiteralTypeAnnotation = stringLiteralTypeAnnotation;
  21884. exports.stringTypeAnnotation = stringTypeAnnotation;
  21885. exports.symbolTypeAnnotation = symbolTypeAnnotation;
  21886. exports.thisTypeAnnotation = thisTypeAnnotation;
  21887. exports.tupleTypeAnnotation = tupleTypeAnnotation;
  21888. exports.typeofTypeAnnotation = typeofTypeAnnotation;
  21889. exports.typeAlias = typeAlias;
  21890. exports.typeAnnotation = typeAnnotation;
  21891. exports.typeCastExpression = typeCastExpression;
  21892. exports.typeParameter = typeParameter;
  21893. exports.typeParameterDeclaration = typeParameterDeclaration;
  21894. exports.typeParameterInstantiation = typeParameterInstantiation;
  21895. exports.unionTypeAnnotation = unionTypeAnnotation;
  21896. exports.variance = variance;
  21897. exports.voidTypeAnnotation = voidTypeAnnotation;
  21898. exports.enumDeclaration = enumDeclaration;
  21899. exports.enumBooleanBody = enumBooleanBody;
  21900. exports.enumNumberBody = enumNumberBody;
  21901. exports.enumStringBody = enumStringBody;
  21902. exports.enumSymbolBody = enumSymbolBody;
  21903. exports.enumBooleanMember = enumBooleanMember;
  21904. exports.enumNumberMember = enumNumberMember;
  21905. exports.enumStringMember = enumStringMember;
  21906. exports.enumDefaultedMember = enumDefaultedMember;
  21907. exports.indexedAccessType = indexedAccessType;
  21908. exports.optionalIndexedAccessType = optionalIndexedAccessType;
  21909. exports.jSXAttribute = exports.jsxAttribute = jsxAttribute;
  21910. exports.jSXClosingElement = exports.jsxClosingElement = jsxClosingElement;
  21911. exports.jSXElement = exports.jsxElement = jsxElement;
  21912. exports.jSXEmptyExpression = exports.jsxEmptyExpression = jsxEmptyExpression;
  21913. exports.jSXExpressionContainer = exports.jsxExpressionContainer = jsxExpressionContainer;
  21914. exports.jSXSpreadChild = exports.jsxSpreadChild = jsxSpreadChild;
  21915. exports.jSXIdentifier = exports.jsxIdentifier = jsxIdentifier;
  21916. exports.jSXMemberExpression = exports.jsxMemberExpression = jsxMemberExpression;
  21917. exports.jSXNamespacedName = exports.jsxNamespacedName = jsxNamespacedName;
  21918. exports.jSXOpeningElement = exports.jsxOpeningElement = jsxOpeningElement;
  21919. exports.jSXSpreadAttribute = exports.jsxSpreadAttribute = jsxSpreadAttribute;
  21920. exports.jSXText = exports.jsxText = jsxText2;
  21921. exports.jSXFragment = exports.jsxFragment = jsxFragment;
  21922. exports.jSXOpeningFragment = exports.jsxOpeningFragment = jsxOpeningFragment;
  21923. exports.jSXClosingFragment = exports.jsxClosingFragment = jsxClosingFragment;
  21924. exports.noop = noop;
  21925. exports.placeholder = placeholder;
  21926. exports.v8IntrinsicIdentifier = v8IntrinsicIdentifier;
  21927. exports.argumentPlaceholder = argumentPlaceholder;
  21928. exports.bindExpression = bindExpression;
  21929. exports.classProperty = classProperty;
  21930. exports.pipelineTopicExpression = pipelineTopicExpression;
  21931. exports.pipelineBareFunction = pipelineBareFunction;
  21932. exports.pipelinePrimaryTopicReference = pipelinePrimaryTopicReference;
  21933. exports.classPrivateProperty = classPrivateProperty;
  21934. exports.classPrivateMethod = classPrivateMethod;
  21935. exports.importAttribute = importAttribute;
  21936. exports.decorator = decorator;
  21937. exports.doExpression = doExpression;
  21938. exports.exportDefaultSpecifier = exportDefaultSpecifier;
  21939. exports.privateName = privateName;
  21940. exports.recordExpression = recordExpression;
  21941. exports.tupleExpression = tupleExpression;
  21942. exports.decimalLiteral = decimalLiteral;
  21943. exports.staticBlock = staticBlock;
  21944. exports.moduleExpression = moduleExpression;
  21945. exports.tSParameterProperty = exports.tsParameterProperty = tsParameterProperty;
  21946. exports.tSDeclareFunction = exports.tsDeclareFunction = tsDeclareFunction;
  21947. exports.tSDeclareMethod = exports.tsDeclareMethod = tsDeclareMethod;
  21948. exports.tSQualifiedName = exports.tsQualifiedName = tsQualifiedName;
  21949. exports.tSCallSignatureDeclaration = exports.tsCallSignatureDeclaration = tsCallSignatureDeclaration;
  21950. exports.tSConstructSignatureDeclaration = exports.tsConstructSignatureDeclaration = tsConstructSignatureDeclaration;
  21951. exports.tSPropertySignature = exports.tsPropertySignature = tsPropertySignature;
  21952. exports.tSMethodSignature = exports.tsMethodSignature = tsMethodSignature;
  21953. exports.tSIndexSignature = exports.tsIndexSignature = tsIndexSignature;
  21954. exports.tSAnyKeyword = exports.tsAnyKeyword = tsAnyKeyword;
  21955. exports.tSBooleanKeyword = exports.tsBooleanKeyword = tsBooleanKeyword;
  21956. exports.tSBigIntKeyword = exports.tsBigIntKeyword = tsBigIntKeyword;
  21957. exports.tSIntrinsicKeyword = exports.tsIntrinsicKeyword = tsIntrinsicKeyword;
  21958. exports.tSNeverKeyword = exports.tsNeverKeyword = tsNeverKeyword;
  21959. exports.tSNullKeyword = exports.tsNullKeyword = tsNullKeyword;
  21960. exports.tSNumberKeyword = exports.tsNumberKeyword = tsNumberKeyword;
  21961. exports.tSObjectKeyword = exports.tsObjectKeyword = tsObjectKeyword;
  21962. exports.tSStringKeyword = exports.tsStringKeyword = tsStringKeyword;
  21963. exports.tSSymbolKeyword = exports.tsSymbolKeyword = tsSymbolKeyword;
  21964. exports.tSUndefinedKeyword = exports.tsUndefinedKeyword = tsUndefinedKeyword;
  21965. exports.tSUnknownKeyword = exports.tsUnknownKeyword = tsUnknownKeyword;
  21966. exports.tSVoidKeyword = exports.tsVoidKeyword = tsVoidKeyword;
  21967. exports.tSThisType = exports.tsThisType = tsThisType;
  21968. exports.tSFunctionType = exports.tsFunctionType = tsFunctionType;
  21969. exports.tSConstructorType = exports.tsConstructorType = tsConstructorType;
  21970. exports.tSTypeReference = exports.tsTypeReference = tsTypeReference;
  21971. exports.tSTypePredicate = exports.tsTypePredicate = tsTypePredicate;
  21972. exports.tSTypeQuery = exports.tsTypeQuery = tsTypeQuery;
  21973. exports.tSTypeLiteral = exports.tsTypeLiteral = tsTypeLiteral;
  21974. exports.tSArrayType = exports.tsArrayType = tsArrayType;
  21975. exports.tSTupleType = exports.tsTupleType = tsTupleType;
  21976. exports.tSOptionalType = exports.tsOptionalType = tsOptionalType;
  21977. exports.tSRestType = exports.tsRestType = tsRestType;
  21978. exports.tSNamedTupleMember = exports.tsNamedTupleMember = tsNamedTupleMember;
  21979. exports.tSUnionType = exports.tsUnionType = tsUnionType;
  21980. exports.tSIntersectionType = exports.tsIntersectionType = tsIntersectionType;
  21981. exports.tSConditionalType = exports.tsConditionalType = tsConditionalType;
  21982. exports.tSInferType = exports.tsInferType = tsInferType;
  21983. exports.tSParenthesizedType = exports.tsParenthesizedType = tsParenthesizedType;
  21984. exports.tSTypeOperator = exports.tsTypeOperator = tsTypeOperator;
  21985. exports.tSIndexedAccessType = exports.tsIndexedAccessType = tsIndexedAccessType;
  21986. exports.tSMappedType = exports.tsMappedType = tsMappedType;
  21987. exports.tSLiteralType = exports.tsLiteralType = tsLiteralType;
  21988. exports.tSExpressionWithTypeArguments = exports.tsExpressionWithTypeArguments = tsExpressionWithTypeArguments;
  21989. exports.tSInterfaceDeclaration = exports.tsInterfaceDeclaration = tsInterfaceDeclaration;
  21990. exports.tSInterfaceBody = exports.tsInterfaceBody = tsInterfaceBody;
  21991. exports.tSTypeAliasDeclaration = exports.tsTypeAliasDeclaration = tsTypeAliasDeclaration;
  21992. exports.tSAsExpression = exports.tsAsExpression = tsAsExpression;
  21993. exports.tSTypeAssertion = exports.tsTypeAssertion = tsTypeAssertion;
  21994. exports.tSEnumDeclaration = exports.tsEnumDeclaration = tsEnumDeclaration;
  21995. exports.tSEnumMember = exports.tsEnumMember = tsEnumMember;
  21996. exports.tSModuleDeclaration = exports.tsModuleDeclaration = tsModuleDeclaration;
  21997. exports.tSModuleBlock = exports.tsModuleBlock = tsModuleBlock;
  21998. exports.tSImportType = exports.tsImportType = tsImportType;
  21999. exports.tSImportEqualsDeclaration = exports.tsImportEqualsDeclaration = tsImportEqualsDeclaration;
  22000. exports.tSExternalModuleReference = exports.tsExternalModuleReference = tsExternalModuleReference;
  22001. exports.tSNonNullExpression = exports.tsNonNullExpression = tsNonNullExpression;
  22002. exports.tSExportAssignment = exports.tsExportAssignment = tsExportAssignment;
  22003. exports.tSNamespaceExportDeclaration = exports.tsNamespaceExportDeclaration = tsNamespaceExportDeclaration;
  22004. exports.tSTypeAnnotation = exports.tsTypeAnnotation = tsTypeAnnotation;
  22005. exports.tSTypeParameterInstantiation = exports.tsTypeParameterInstantiation = tsTypeParameterInstantiation;
  22006. exports.tSTypeParameterDeclaration = exports.tsTypeParameterDeclaration = tsTypeParameterDeclaration;
  22007. exports.tSTypeParameter = exports.tsTypeParameter = tsTypeParameter;
  22008. exports.numberLiteral = NumberLiteral;
  22009. exports.regexLiteral = RegexLiteral;
  22010. exports.restProperty = RestProperty;
  22011. exports.spreadProperty = SpreadProperty;
  22012. var _builder = require_builder2();
  22013. function arrayExpression(elements) {
  22014. return (0, _builder.default)("ArrayExpression", ...arguments);
  22015. }
  22016. function assignmentExpression(operator, left, right) {
  22017. return (0, _builder.default)("AssignmentExpression", ...arguments);
  22018. }
  22019. function binaryExpression(operator, left, right) {
  22020. return (0, _builder.default)("BinaryExpression", ...arguments);
  22021. }
  22022. function interpreterDirective(value) {
  22023. return (0, _builder.default)("InterpreterDirective", ...arguments);
  22024. }
  22025. function directive(value) {
  22026. return (0, _builder.default)("Directive", ...arguments);
  22027. }
  22028. function directiveLiteral(value) {
  22029. return (0, _builder.default)("DirectiveLiteral", ...arguments);
  22030. }
  22031. function blockStatement(body, directives) {
  22032. return (0, _builder.default)("BlockStatement", ...arguments);
  22033. }
  22034. function breakStatement(label) {
  22035. return (0, _builder.default)("BreakStatement", ...arguments);
  22036. }
  22037. function callExpression(callee, _arguments) {
  22038. return (0, _builder.default)("CallExpression", ...arguments);
  22039. }
  22040. function catchClause(param, body) {
  22041. return (0, _builder.default)("CatchClause", ...arguments);
  22042. }
  22043. function conditionalExpression(test, consequent, alternate) {
  22044. return (0, _builder.default)("ConditionalExpression", ...arguments);
  22045. }
  22046. function continueStatement(label) {
  22047. return (0, _builder.default)("ContinueStatement", ...arguments);
  22048. }
  22049. function debuggerStatement() {
  22050. return (0, _builder.default)("DebuggerStatement", ...arguments);
  22051. }
  22052. function doWhileStatement(test, body) {
  22053. return (0, _builder.default)("DoWhileStatement", ...arguments);
  22054. }
  22055. function emptyStatement() {
  22056. return (0, _builder.default)("EmptyStatement", ...arguments);
  22057. }
  22058. function expressionStatement(expression) {
  22059. return (0, _builder.default)("ExpressionStatement", ...arguments);
  22060. }
  22061. function file(program2, comments, tokens) {
  22062. return (0, _builder.default)("File", ...arguments);
  22063. }
  22064. function forInStatement(left, right, body) {
  22065. return (0, _builder.default)("ForInStatement", ...arguments);
  22066. }
  22067. function forStatement(init, test, update, body) {
  22068. return (0, _builder.default)("ForStatement", ...arguments);
  22069. }
  22070. function functionDeclaration(id, params, body, generator, async) {
  22071. return (0, _builder.default)("FunctionDeclaration", ...arguments);
  22072. }
  22073. function functionExpression(id, params, body, generator, async) {
  22074. return (0, _builder.default)("FunctionExpression", ...arguments);
  22075. }
  22076. function identifier(name2) {
  22077. return (0, _builder.default)("Identifier", ...arguments);
  22078. }
  22079. function ifStatement(test, consequent, alternate) {
  22080. return (0, _builder.default)("IfStatement", ...arguments);
  22081. }
  22082. function labeledStatement(label, body) {
  22083. return (0, _builder.default)("LabeledStatement", ...arguments);
  22084. }
  22085. function stringLiteral(value) {
  22086. return (0, _builder.default)("StringLiteral", ...arguments);
  22087. }
  22088. function numericLiteral(value) {
  22089. return (0, _builder.default)("NumericLiteral", ...arguments);
  22090. }
  22091. function nullLiteral() {
  22092. return (0, _builder.default)("NullLiteral", ...arguments);
  22093. }
  22094. function booleanLiteral(value) {
  22095. return (0, _builder.default)("BooleanLiteral", ...arguments);
  22096. }
  22097. function regExpLiteral(pattern, flags) {
  22098. return (0, _builder.default)("RegExpLiteral", ...arguments);
  22099. }
  22100. function logicalExpression(operator, left, right) {
  22101. return (0, _builder.default)("LogicalExpression", ...arguments);
  22102. }
  22103. function memberExpression(object, property, computed, optional) {
  22104. return (0, _builder.default)("MemberExpression", ...arguments);
  22105. }
  22106. function newExpression(callee, _arguments) {
  22107. return (0, _builder.default)("NewExpression", ...arguments);
  22108. }
  22109. function program(body, directives, sourceType, interpreter) {
  22110. return (0, _builder.default)("Program", ...arguments);
  22111. }
  22112. function objectExpression(properties) {
  22113. return (0, _builder.default)("ObjectExpression", ...arguments);
  22114. }
  22115. function objectMethod(kind, key, params, body, computed, generator, async) {
  22116. return (0, _builder.default)("ObjectMethod", ...arguments);
  22117. }
  22118. function objectProperty(key, value, computed, shorthand, decorators) {
  22119. return (0, _builder.default)("ObjectProperty", ...arguments);
  22120. }
  22121. function restElement(argument) {
  22122. return (0, _builder.default)("RestElement", ...arguments);
  22123. }
  22124. function returnStatement(argument) {
  22125. return (0, _builder.default)("ReturnStatement", ...arguments);
  22126. }
  22127. function sequenceExpression(expressions) {
  22128. return (0, _builder.default)("SequenceExpression", ...arguments);
  22129. }
  22130. function parenthesizedExpression(expression) {
  22131. return (0, _builder.default)("ParenthesizedExpression", ...arguments);
  22132. }
  22133. function switchCase(test, consequent) {
  22134. return (0, _builder.default)("SwitchCase", ...arguments);
  22135. }
  22136. function switchStatement(discriminant, cases) {
  22137. return (0, _builder.default)("SwitchStatement", ...arguments);
  22138. }
  22139. function thisExpression() {
  22140. return (0, _builder.default)("ThisExpression", ...arguments);
  22141. }
  22142. function throwStatement(argument) {
  22143. return (0, _builder.default)("ThrowStatement", ...arguments);
  22144. }
  22145. function tryStatement(block, handler, finalizer) {
  22146. return (0, _builder.default)("TryStatement", ...arguments);
  22147. }
  22148. function unaryExpression(operator, argument, prefix) {
  22149. return (0, _builder.default)("UnaryExpression", ...arguments);
  22150. }
  22151. function updateExpression(operator, argument, prefix) {
  22152. return (0, _builder.default)("UpdateExpression", ...arguments);
  22153. }
  22154. function variableDeclaration(kind, declarations) {
  22155. return (0, _builder.default)("VariableDeclaration", ...arguments);
  22156. }
  22157. function variableDeclarator(id, init) {
  22158. return (0, _builder.default)("VariableDeclarator", ...arguments);
  22159. }
  22160. function whileStatement(test, body) {
  22161. return (0, _builder.default)("WhileStatement", ...arguments);
  22162. }
  22163. function withStatement(object, body) {
  22164. return (0, _builder.default)("WithStatement", ...arguments);
  22165. }
  22166. function assignmentPattern(left, right) {
  22167. return (0, _builder.default)("AssignmentPattern", ...arguments);
  22168. }
  22169. function arrayPattern(elements) {
  22170. return (0, _builder.default)("ArrayPattern", ...arguments);
  22171. }
  22172. function arrowFunctionExpression(params, body, async) {
  22173. return (0, _builder.default)("ArrowFunctionExpression", ...arguments);
  22174. }
  22175. function classBody(body) {
  22176. return (0, _builder.default)("ClassBody", ...arguments);
  22177. }
  22178. function classExpression(id, superClass, body, decorators) {
  22179. return (0, _builder.default)("ClassExpression", ...arguments);
  22180. }
  22181. function classDeclaration(id, superClass, body, decorators) {
  22182. return (0, _builder.default)("ClassDeclaration", ...arguments);
  22183. }
  22184. function exportAllDeclaration(source) {
  22185. return (0, _builder.default)("ExportAllDeclaration", ...arguments);
  22186. }
  22187. function exportDefaultDeclaration(declaration) {
  22188. return (0, _builder.default)("ExportDefaultDeclaration", ...arguments);
  22189. }
  22190. function exportNamedDeclaration(declaration, specifiers, source) {
  22191. return (0, _builder.default)("ExportNamedDeclaration", ...arguments);
  22192. }
  22193. function exportSpecifier(local, exported) {
  22194. return (0, _builder.default)("ExportSpecifier", ...arguments);
  22195. }
  22196. function forOfStatement(left, right, body, _await) {
  22197. return (0, _builder.default)("ForOfStatement", ...arguments);
  22198. }
  22199. function importDeclaration(specifiers, source) {
  22200. return (0, _builder.default)("ImportDeclaration", ...arguments);
  22201. }
  22202. function importDefaultSpecifier(local) {
  22203. return (0, _builder.default)("ImportDefaultSpecifier", ...arguments);
  22204. }
  22205. function importNamespaceSpecifier(local) {
  22206. return (0, _builder.default)("ImportNamespaceSpecifier", ...arguments);
  22207. }
  22208. function importSpecifier(local, imported) {
  22209. return (0, _builder.default)("ImportSpecifier", ...arguments);
  22210. }
  22211. function metaProperty(meta, property) {
  22212. return (0, _builder.default)("MetaProperty", ...arguments);
  22213. }
  22214. function classMethod(kind, key, params, body, computed, _static, generator, async) {
  22215. return (0, _builder.default)("ClassMethod", ...arguments);
  22216. }
  22217. function objectPattern(properties) {
  22218. return (0, _builder.default)("ObjectPattern", ...arguments);
  22219. }
  22220. function spreadElement(argument) {
  22221. return (0, _builder.default)("SpreadElement", ...arguments);
  22222. }
  22223. function _super() {
  22224. return (0, _builder.default)("Super", ...arguments);
  22225. }
  22226. function taggedTemplateExpression(tag, quasi) {
  22227. return (0, _builder.default)("TaggedTemplateExpression", ...arguments);
  22228. }
  22229. function templateElement(value, tail) {
  22230. return (0, _builder.default)("TemplateElement", ...arguments);
  22231. }
  22232. function templateLiteral(quasis, expressions) {
  22233. return (0, _builder.default)("TemplateLiteral", ...arguments);
  22234. }
  22235. function yieldExpression(argument, delegate) {
  22236. return (0, _builder.default)("YieldExpression", ...arguments);
  22237. }
  22238. function awaitExpression(argument) {
  22239. return (0, _builder.default)("AwaitExpression", ...arguments);
  22240. }
  22241. function _import() {
  22242. return (0, _builder.default)("Import", ...arguments);
  22243. }
  22244. function bigIntLiteral(value) {
  22245. return (0, _builder.default)("BigIntLiteral", ...arguments);
  22246. }
  22247. function exportNamespaceSpecifier(exported) {
  22248. return (0, _builder.default)("ExportNamespaceSpecifier", ...arguments);
  22249. }
  22250. function optionalMemberExpression(object, property, computed, optional) {
  22251. return (0, _builder.default)("OptionalMemberExpression", ...arguments);
  22252. }
  22253. function optionalCallExpression(callee, _arguments, optional) {
  22254. return (0, _builder.default)("OptionalCallExpression", ...arguments);
  22255. }
  22256. function anyTypeAnnotation() {
  22257. return (0, _builder.default)("AnyTypeAnnotation", ...arguments);
  22258. }
  22259. function arrayTypeAnnotation(elementType) {
  22260. return (0, _builder.default)("ArrayTypeAnnotation", ...arguments);
  22261. }
  22262. function booleanTypeAnnotation() {
  22263. return (0, _builder.default)("BooleanTypeAnnotation", ...arguments);
  22264. }
  22265. function booleanLiteralTypeAnnotation(value) {
  22266. return (0, _builder.default)("BooleanLiteralTypeAnnotation", ...arguments);
  22267. }
  22268. function nullLiteralTypeAnnotation() {
  22269. return (0, _builder.default)("NullLiteralTypeAnnotation", ...arguments);
  22270. }
  22271. function classImplements(id, typeParameters) {
  22272. return (0, _builder.default)("ClassImplements", ...arguments);
  22273. }
  22274. function declareClass(id, typeParameters, _extends, body) {
  22275. return (0, _builder.default)("DeclareClass", ...arguments);
  22276. }
  22277. function declareFunction(id) {
  22278. return (0, _builder.default)("DeclareFunction", ...arguments);
  22279. }
  22280. function declareInterface(id, typeParameters, _extends, body) {
  22281. return (0, _builder.default)("DeclareInterface", ...arguments);
  22282. }
  22283. function declareModule(id, body, kind) {
  22284. return (0, _builder.default)("DeclareModule", ...arguments);
  22285. }
  22286. function declareModuleExports(typeAnnotation2) {
  22287. return (0, _builder.default)("DeclareModuleExports", ...arguments);
  22288. }
  22289. function declareTypeAlias(id, typeParameters, right) {
  22290. return (0, _builder.default)("DeclareTypeAlias", ...arguments);
  22291. }
  22292. function declareOpaqueType(id, typeParameters, supertype) {
  22293. return (0, _builder.default)("DeclareOpaqueType", ...arguments);
  22294. }
  22295. function declareVariable(id) {
  22296. return (0, _builder.default)("DeclareVariable", ...arguments);
  22297. }
  22298. function declareExportDeclaration(declaration, specifiers, source) {
  22299. return (0, _builder.default)("DeclareExportDeclaration", ...arguments);
  22300. }
  22301. function declareExportAllDeclaration(source) {
  22302. return (0, _builder.default)("DeclareExportAllDeclaration", ...arguments);
  22303. }
  22304. function declaredPredicate(value) {
  22305. return (0, _builder.default)("DeclaredPredicate", ...arguments);
  22306. }
  22307. function existsTypeAnnotation() {
  22308. return (0, _builder.default)("ExistsTypeAnnotation", ...arguments);
  22309. }
  22310. function functionTypeAnnotation(typeParameters, params, rest, returnType) {
  22311. return (0, _builder.default)("FunctionTypeAnnotation", ...arguments);
  22312. }
  22313. function functionTypeParam(name2, typeAnnotation2) {
  22314. return (0, _builder.default)("FunctionTypeParam", ...arguments);
  22315. }
  22316. function genericTypeAnnotation(id, typeParameters) {
  22317. return (0, _builder.default)("GenericTypeAnnotation", ...arguments);
  22318. }
  22319. function inferredPredicate() {
  22320. return (0, _builder.default)("InferredPredicate", ...arguments);
  22321. }
  22322. function interfaceExtends(id, typeParameters) {
  22323. return (0, _builder.default)("InterfaceExtends", ...arguments);
  22324. }
  22325. function interfaceDeclaration(id, typeParameters, _extends, body) {
  22326. return (0, _builder.default)("InterfaceDeclaration", ...arguments);
  22327. }
  22328. function interfaceTypeAnnotation(_extends, body) {
  22329. return (0, _builder.default)("InterfaceTypeAnnotation", ...arguments);
  22330. }
  22331. function intersectionTypeAnnotation(types2) {
  22332. return (0, _builder.default)("IntersectionTypeAnnotation", ...arguments);
  22333. }
  22334. function mixedTypeAnnotation() {
  22335. return (0, _builder.default)("MixedTypeAnnotation", ...arguments);
  22336. }
  22337. function emptyTypeAnnotation() {
  22338. return (0, _builder.default)("EmptyTypeAnnotation", ...arguments);
  22339. }
  22340. function nullableTypeAnnotation(typeAnnotation2) {
  22341. return (0, _builder.default)("NullableTypeAnnotation", ...arguments);
  22342. }
  22343. function numberLiteralTypeAnnotation(value) {
  22344. return (0, _builder.default)("NumberLiteralTypeAnnotation", ...arguments);
  22345. }
  22346. function numberTypeAnnotation() {
  22347. return (0, _builder.default)("NumberTypeAnnotation", ...arguments);
  22348. }
  22349. function objectTypeAnnotation(properties, indexers, callProperties, internalSlots, exact) {
  22350. return (0, _builder.default)("ObjectTypeAnnotation", ...arguments);
  22351. }
  22352. function objectTypeInternalSlot(id, value, optional, _static, method) {
  22353. return (0, _builder.default)("ObjectTypeInternalSlot", ...arguments);
  22354. }
  22355. function objectTypeCallProperty(value) {
  22356. return (0, _builder.default)("ObjectTypeCallProperty", ...arguments);
  22357. }
  22358. function objectTypeIndexer(id, key, value, variance2) {
  22359. return (0, _builder.default)("ObjectTypeIndexer", ...arguments);
  22360. }
  22361. function objectTypeProperty(key, value, variance2) {
  22362. return (0, _builder.default)("ObjectTypeProperty", ...arguments);
  22363. }
  22364. function objectTypeSpreadProperty(argument) {
  22365. return (0, _builder.default)("ObjectTypeSpreadProperty", ...arguments);
  22366. }
  22367. function opaqueType(id, typeParameters, supertype, impltype) {
  22368. return (0, _builder.default)("OpaqueType", ...arguments);
  22369. }
  22370. function qualifiedTypeIdentifier(id, qualification) {
  22371. return (0, _builder.default)("QualifiedTypeIdentifier", ...arguments);
  22372. }
  22373. function stringLiteralTypeAnnotation(value) {
  22374. return (0, _builder.default)("StringLiteralTypeAnnotation", ...arguments);
  22375. }
  22376. function stringTypeAnnotation() {
  22377. return (0, _builder.default)("StringTypeAnnotation", ...arguments);
  22378. }
  22379. function symbolTypeAnnotation() {
  22380. return (0, _builder.default)("SymbolTypeAnnotation", ...arguments);
  22381. }
  22382. function thisTypeAnnotation() {
  22383. return (0, _builder.default)("ThisTypeAnnotation", ...arguments);
  22384. }
  22385. function tupleTypeAnnotation(types2) {
  22386. return (0, _builder.default)("TupleTypeAnnotation", ...arguments);
  22387. }
  22388. function typeofTypeAnnotation(argument) {
  22389. return (0, _builder.default)("TypeofTypeAnnotation", ...arguments);
  22390. }
  22391. function typeAlias(id, typeParameters, right) {
  22392. return (0, _builder.default)("TypeAlias", ...arguments);
  22393. }
  22394. function typeAnnotation(typeAnnotation2) {
  22395. return (0, _builder.default)("TypeAnnotation", ...arguments);
  22396. }
  22397. function typeCastExpression(expression, typeAnnotation2) {
  22398. return (0, _builder.default)("TypeCastExpression", ...arguments);
  22399. }
  22400. function typeParameter(bound, _default, variance2) {
  22401. return (0, _builder.default)("TypeParameter", ...arguments);
  22402. }
  22403. function typeParameterDeclaration(params) {
  22404. return (0, _builder.default)("TypeParameterDeclaration", ...arguments);
  22405. }
  22406. function typeParameterInstantiation(params) {
  22407. return (0, _builder.default)("TypeParameterInstantiation", ...arguments);
  22408. }
  22409. function unionTypeAnnotation(types2) {
  22410. return (0, _builder.default)("UnionTypeAnnotation", ...arguments);
  22411. }
  22412. function variance(kind) {
  22413. return (0, _builder.default)("Variance", ...arguments);
  22414. }
  22415. function voidTypeAnnotation() {
  22416. return (0, _builder.default)("VoidTypeAnnotation", ...arguments);
  22417. }
  22418. function enumDeclaration(id, body) {
  22419. return (0, _builder.default)("EnumDeclaration", ...arguments);
  22420. }
  22421. function enumBooleanBody(members) {
  22422. return (0, _builder.default)("EnumBooleanBody", ...arguments);
  22423. }
  22424. function enumNumberBody(members) {
  22425. return (0, _builder.default)("EnumNumberBody", ...arguments);
  22426. }
  22427. function enumStringBody(members) {
  22428. return (0, _builder.default)("EnumStringBody", ...arguments);
  22429. }
  22430. function enumSymbolBody(members) {
  22431. return (0, _builder.default)("EnumSymbolBody", ...arguments);
  22432. }
  22433. function enumBooleanMember(id) {
  22434. return (0, _builder.default)("EnumBooleanMember", ...arguments);
  22435. }
  22436. function enumNumberMember(id, init) {
  22437. return (0, _builder.default)("EnumNumberMember", ...arguments);
  22438. }
  22439. function enumStringMember(id, init) {
  22440. return (0, _builder.default)("EnumStringMember", ...arguments);
  22441. }
  22442. function enumDefaultedMember(id) {
  22443. return (0, _builder.default)("EnumDefaultedMember", ...arguments);
  22444. }
  22445. function indexedAccessType(objectType, indexType) {
  22446. return (0, _builder.default)("IndexedAccessType", ...arguments);
  22447. }
  22448. function optionalIndexedAccessType(objectType, indexType) {
  22449. return (0, _builder.default)("OptionalIndexedAccessType", ...arguments);
  22450. }
  22451. function jsxAttribute(name2, value) {
  22452. return (0, _builder.default)("JSXAttribute", ...arguments);
  22453. }
  22454. function jsxClosingElement(name2) {
  22455. return (0, _builder.default)("JSXClosingElement", ...arguments);
  22456. }
  22457. function jsxElement(openingElement, closingElement, children, selfClosing) {
  22458. return (0, _builder.default)("JSXElement", ...arguments);
  22459. }
  22460. function jsxEmptyExpression() {
  22461. return (0, _builder.default)("JSXEmptyExpression", ...arguments);
  22462. }
  22463. function jsxExpressionContainer(expression) {
  22464. return (0, _builder.default)("JSXExpressionContainer", ...arguments);
  22465. }
  22466. function jsxSpreadChild(expression) {
  22467. return (0, _builder.default)("JSXSpreadChild", ...arguments);
  22468. }
  22469. function jsxIdentifier(name2) {
  22470. return (0, _builder.default)("JSXIdentifier", ...arguments);
  22471. }
  22472. function jsxMemberExpression(object, property) {
  22473. return (0, _builder.default)("JSXMemberExpression", ...arguments);
  22474. }
  22475. function jsxNamespacedName(namespace, name2) {
  22476. return (0, _builder.default)("JSXNamespacedName", ...arguments);
  22477. }
  22478. function jsxOpeningElement(name2, attributes, selfClosing) {
  22479. return (0, _builder.default)("JSXOpeningElement", ...arguments);
  22480. }
  22481. function jsxSpreadAttribute(argument) {
  22482. return (0, _builder.default)("JSXSpreadAttribute", ...arguments);
  22483. }
  22484. function jsxText2(value) {
  22485. return (0, _builder.default)("JSXText", ...arguments);
  22486. }
  22487. function jsxFragment(openingFragment, closingFragment, children) {
  22488. return (0, _builder.default)("JSXFragment", ...arguments);
  22489. }
  22490. function jsxOpeningFragment() {
  22491. return (0, _builder.default)("JSXOpeningFragment", ...arguments);
  22492. }
  22493. function jsxClosingFragment() {
  22494. return (0, _builder.default)("JSXClosingFragment", ...arguments);
  22495. }
  22496. function noop() {
  22497. return (0, _builder.default)("Noop", ...arguments);
  22498. }
  22499. function placeholder(expectedNode, name2) {
  22500. return (0, _builder.default)("Placeholder", ...arguments);
  22501. }
  22502. function v8IntrinsicIdentifier(name2) {
  22503. return (0, _builder.default)("V8IntrinsicIdentifier", ...arguments);
  22504. }
  22505. function argumentPlaceholder() {
  22506. return (0, _builder.default)("ArgumentPlaceholder", ...arguments);
  22507. }
  22508. function bindExpression(object, callee) {
  22509. return (0, _builder.default)("BindExpression", ...arguments);
  22510. }
  22511. function classProperty(key, value, typeAnnotation2, decorators, computed, _static) {
  22512. return (0, _builder.default)("ClassProperty", ...arguments);
  22513. }
  22514. function pipelineTopicExpression(expression) {
  22515. return (0, _builder.default)("PipelineTopicExpression", ...arguments);
  22516. }
  22517. function pipelineBareFunction(callee) {
  22518. return (0, _builder.default)("PipelineBareFunction", ...arguments);
  22519. }
  22520. function pipelinePrimaryTopicReference() {
  22521. return (0, _builder.default)("PipelinePrimaryTopicReference", ...arguments);
  22522. }
  22523. function classPrivateProperty(key, value, decorators, _static) {
  22524. return (0, _builder.default)("ClassPrivateProperty", ...arguments);
  22525. }
  22526. function classPrivateMethod(kind, key, params, body, _static) {
  22527. return (0, _builder.default)("ClassPrivateMethod", ...arguments);
  22528. }
  22529. function importAttribute(key, value) {
  22530. return (0, _builder.default)("ImportAttribute", ...arguments);
  22531. }
  22532. function decorator(expression) {
  22533. return (0, _builder.default)("Decorator", ...arguments);
  22534. }
  22535. function doExpression(body, async) {
  22536. return (0, _builder.default)("DoExpression", ...arguments);
  22537. }
  22538. function exportDefaultSpecifier(exported) {
  22539. return (0, _builder.default)("ExportDefaultSpecifier", ...arguments);
  22540. }
  22541. function privateName(id) {
  22542. return (0, _builder.default)("PrivateName", ...arguments);
  22543. }
  22544. function recordExpression(properties) {
  22545. return (0, _builder.default)("RecordExpression", ...arguments);
  22546. }
  22547. function tupleExpression(elements) {
  22548. return (0, _builder.default)("TupleExpression", ...arguments);
  22549. }
  22550. function decimalLiteral(value) {
  22551. return (0, _builder.default)("DecimalLiteral", ...arguments);
  22552. }
  22553. function staticBlock(body) {
  22554. return (0, _builder.default)("StaticBlock", ...arguments);
  22555. }
  22556. function moduleExpression(body) {
  22557. return (0, _builder.default)("ModuleExpression", ...arguments);
  22558. }
  22559. function tsParameterProperty(parameter) {
  22560. return (0, _builder.default)("TSParameterProperty", ...arguments);
  22561. }
  22562. function tsDeclareFunction(id, typeParameters, params, returnType) {
  22563. return (0, _builder.default)("TSDeclareFunction", ...arguments);
  22564. }
  22565. function tsDeclareMethod(decorators, key, typeParameters, params, returnType) {
  22566. return (0, _builder.default)("TSDeclareMethod", ...arguments);
  22567. }
  22568. function tsQualifiedName(left, right) {
  22569. return (0, _builder.default)("TSQualifiedName", ...arguments);
  22570. }
  22571. function tsCallSignatureDeclaration(typeParameters, parameters, typeAnnotation2) {
  22572. return (0, _builder.default)("TSCallSignatureDeclaration", ...arguments);
  22573. }
  22574. function tsConstructSignatureDeclaration(typeParameters, parameters, typeAnnotation2) {
  22575. return (0, _builder.default)("TSConstructSignatureDeclaration", ...arguments);
  22576. }
  22577. function tsPropertySignature(key, typeAnnotation2, initializer) {
  22578. return (0, _builder.default)("TSPropertySignature", ...arguments);
  22579. }
  22580. function tsMethodSignature(key, typeParameters, parameters, typeAnnotation2) {
  22581. return (0, _builder.default)("TSMethodSignature", ...arguments);
  22582. }
  22583. function tsIndexSignature(parameters, typeAnnotation2) {
  22584. return (0, _builder.default)("TSIndexSignature", ...arguments);
  22585. }
  22586. function tsAnyKeyword() {
  22587. return (0, _builder.default)("TSAnyKeyword", ...arguments);
  22588. }
  22589. function tsBooleanKeyword() {
  22590. return (0, _builder.default)("TSBooleanKeyword", ...arguments);
  22591. }
  22592. function tsBigIntKeyword() {
  22593. return (0, _builder.default)("TSBigIntKeyword", ...arguments);
  22594. }
  22595. function tsIntrinsicKeyword() {
  22596. return (0, _builder.default)("TSIntrinsicKeyword", ...arguments);
  22597. }
  22598. function tsNeverKeyword() {
  22599. return (0, _builder.default)("TSNeverKeyword", ...arguments);
  22600. }
  22601. function tsNullKeyword() {
  22602. return (0, _builder.default)("TSNullKeyword", ...arguments);
  22603. }
  22604. function tsNumberKeyword() {
  22605. return (0, _builder.default)("TSNumberKeyword", ...arguments);
  22606. }
  22607. function tsObjectKeyword() {
  22608. return (0, _builder.default)("TSObjectKeyword", ...arguments);
  22609. }
  22610. function tsStringKeyword() {
  22611. return (0, _builder.default)("TSStringKeyword", ...arguments);
  22612. }
  22613. function tsSymbolKeyword() {
  22614. return (0, _builder.default)("TSSymbolKeyword", ...arguments);
  22615. }
  22616. function tsUndefinedKeyword() {
  22617. return (0, _builder.default)("TSUndefinedKeyword", ...arguments);
  22618. }
  22619. function tsUnknownKeyword() {
  22620. return (0, _builder.default)("TSUnknownKeyword", ...arguments);
  22621. }
  22622. function tsVoidKeyword() {
  22623. return (0, _builder.default)("TSVoidKeyword", ...arguments);
  22624. }
  22625. function tsThisType() {
  22626. return (0, _builder.default)("TSThisType", ...arguments);
  22627. }
  22628. function tsFunctionType(typeParameters, parameters, typeAnnotation2) {
  22629. return (0, _builder.default)("TSFunctionType", ...arguments);
  22630. }
  22631. function tsConstructorType(typeParameters, parameters, typeAnnotation2) {
  22632. return (0, _builder.default)("TSConstructorType", ...arguments);
  22633. }
  22634. function tsTypeReference(typeName, typeParameters) {
  22635. return (0, _builder.default)("TSTypeReference", ...arguments);
  22636. }
  22637. function tsTypePredicate(parameterName, typeAnnotation2, asserts) {
  22638. return (0, _builder.default)("TSTypePredicate", ...arguments);
  22639. }
  22640. function tsTypeQuery(exprName) {
  22641. return (0, _builder.default)("TSTypeQuery", ...arguments);
  22642. }
  22643. function tsTypeLiteral(members) {
  22644. return (0, _builder.default)("TSTypeLiteral", ...arguments);
  22645. }
  22646. function tsArrayType(elementType) {
  22647. return (0, _builder.default)("TSArrayType", ...arguments);
  22648. }
  22649. function tsTupleType(elementTypes) {
  22650. return (0, _builder.default)("TSTupleType", ...arguments);
  22651. }
  22652. function tsOptionalType(typeAnnotation2) {
  22653. return (0, _builder.default)("TSOptionalType", ...arguments);
  22654. }
  22655. function tsRestType(typeAnnotation2) {
  22656. return (0, _builder.default)("TSRestType", ...arguments);
  22657. }
  22658. function tsNamedTupleMember(label, elementType, optional) {
  22659. return (0, _builder.default)("TSNamedTupleMember", ...arguments);
  22660. }
  22661. function tsUnionType(types2) {
  22662. return (0, _builder.default)("TSUnionType", ...arguments);
  22663. }
  22664. function tsIntersectionType(types2) {
  22665. return (0, _builder.default)("TSIntersectionType", ...arguments);
  22666. }
  22667. function tsConditionalType(checkType, extendsType, trueType, falseType) {
  22668. return (0, _builder.default)("TSConditionalType", ...arguments);
  22669. }
  22670. function tsInferType(typeParameter2) {
  22671. return (0, _builder.default)("TSInferType", ...arguments);
  22672. }
  22673. function tsParenthesizedType(typeAnnotation2) {
  22674. return (0, _builder.default)("TSParenthesizedType", ...arguments);
  22675. }
  22676. function tsTypeOperator(typeAnnotation2) {
  22677. return (0, _builder.default)("TSTypeOperator", ...arguments);
  22678. }
  22679. function tsIndexedAccessType(objectType, indexType) {
  22680. return (0, _builder.default)("TSIndexedAccessType", ...arguments);
  22681. }
  22682. function tsMappedType(typeParameter2, typeAnnotation2, nameType) {
  22683. return (0, _builder.default)("TSMappedType", ...arguments);
  22684. }
  22685. function tsLiteralType(literal2) {
  22686. return (0, _builder.default)("TSLiteralType", ...arguments);
  22687. }
  22688. function tsExpressionWithTypeArguments(expression, typeParameters) {
  22689. return (0, _builder.default)("TSExpressionWithTypeArguments", ...arguments);
  22690. }
  22691. function tsInterfaceDeclaration(id, typeParameters, _extends, body) {
  22692. return (0, _builder.default)("TSInterfaceDeclaration", ...arguments);
  22693. }
  22694. function tsInterfaceBody(body) {
  22695. return (0, _builder.default)("TSInterfaceBody", ...arguments);
  22696. }
  22697. function tsTypeAliasDeclaration(id, typeParameters, typeAnnotation2) {
  22698. return (0, _builder.default)("TSTypeAliasDeclaration", ...arguments);
  22699. }
  22700. function tsAsExpression(expression, typeAnnotation2) {
  22701. return (0, _builder.default)("TSAsExpression", ...arguments);
  22702. }
  22703. function tsTypeAssertion(typeAnnotation2, expression) {
  22704. return (0, _builder.default)("TSTypeAssertion", ...arguments);
  22705. }
  22706. function tsEnumDeclaration(id, members) {
  22707. return (0, _builder.default)("TSEnumDeclaration", ...arguments);
  22708. }
  22709. function tsEnumMember(id, initializer) {
  22710. return (0, _builder.default)("TSEnumMember", ...arguments);
  22711. }
  22712. function tsModuleDeclaration(id, body) {
  22713. return (0, _builder.default)("TSModuleDeclaration", ...arguments);
  22714. }
  22715. function tsModuleBlock(body) {
  22716. return (0, _builder.default)("TSModuleBlock", ...arguments);
  22717. }
  22718. function tsImportType(argument, qualifier, typeParameters) {
  22719. return (0, _builder.default)("TSImportType", ...arguments);
  22720. }
  22721. function tsImportEqualsDeclaration(id, moduleReference) {
  22722. return (0, _builder.default)("TSImportEqualsDeclaration", ...arguments);
  22723. }
  22724. function tsExternalModuleReference(expression) {
  22725. return (0, _builder.default)("TSExternalModuleReference", ...arguments);
  22726. }
  22727. function tsNonNullExpression(expression) {
  22728. return (0, _builder.default)("TSNonNullExpression", ...arguments);
  22729. }
  22730. function tsExportAssignment(expression) {
  22731. return (0, _builder.default)("TSExportAssignment", ...arguments);
  22732. }
  22733. function tsNamespaceExportDeclaration(id) {
  22734. return (0, _builder.default)("TSNamespaceExportDeclaration", ...arguments);
  22735. }
  22736. function tsTypeAnnotation(typeAnnotation2) {
  22737. return (0, _builder.default)("TSTypeAnnotation", ...arguments);
  22738. }
  22739. function tsTypeParameterInstantiation(params) {
  22740. return (0, _builder.default)("TSTypeParameterInstantiation", ...arguments);
  22741. }
  22742. function tsTypeParameterDeclaration(params) {
  22743. return (0, _builder.default)("TSTypeParameterDeclaration", ...arguments);
  22744. }
  22745. function tsTypeParameter(constraint, _default, name2) {
  22746. return (0, _builder.default)("TSTypeParameter", ...arguments);
  22747. }
  22748. function NumberLiteral(...args) {
  22749. console.trace("The node type NumberLiteral has been renamed to NumericLiteral");
  22750. return (0, _builder.default)("NumberLiteral", ...args);
  22751. }
  22752. function RegexLiteral(...args) {
  22753. console.trace("The node type RegexLiteral has been renamed to RegExpLiteral");
  22754. return (0, _builder.default)("RegexLiteral", ...args);
  22755. }
  22756. function RestProperty(...args) {
  22757. console.trace("The node type RestProperty has been renamed to RestElement");
  22758. return (0, _builder.default)("RestProperty", ...args);
  22759. }
  22760. function SpreadProperty(...args) {
  22761. console.trace("The node type SpreadProperty has been renamed to SpreadElement");
  22762. return (0, _builder.default)("SpreadProperty", ...args);
  22763. }
  22764. }
  22765. });
  22766. // node_modules/estree-to-babel/node_modules/@babel/types/lib/utils/react/cleanJSXElementLiteralChild.js
  22767. var require_cleanJSXElementLiteralChild2 = __commonJS({
  22768. "node_modules/estree-to-babel/node_modules/@babel/types/lib/utils/react/cleanJSXElementLiteralChild.js"(exports) {
  22769. "use strict";
  22770. Object.defineProperty(exports, "__esModule", {
  22771. value: true
  22772. });
  22773. exports.default = cleanJSXElementLiteralChild;
  22774. var _generated = require_generated7();
  22775. function cleanJSXElementLiteralChild(child, args) {
  22776. const lines = child.value.split(/\r\n|\n|\r/);
  22777. let lastNonEmptyLine = 0;
  22778. for (let i = 0; i < lines.length; i++) {
  22779. if (lines[i].match(/[^ \t]/)) {
  22780. lastNonEmptyLine = i;
  22781. }
  22782. }
  22783. let str = "";
  22784. for (let i = 0; i < lines.length; i++) {
  22785. const line = lines[i];
  22786. const isFirstLine = i === 0;
  22787. const isLastLine = i === lines.length - 1;
  22788. const isLastNonEmptyLine = i === lastNonEmptyLine;
  22789. let trimmedLine = line.replace(/\t/g, " ");
  22790. if (!isFirstLine) {
  22791. trimmedLine = trimmedLine.replace(/^[ ]+/, "");
  22792. }
  22793. if (!isLastLine) {
  22794. trimmedLine = trimmedLine.replace(/[ ]+$/, "");
  22795. }
  22796. if (trimmedLine) {
  22797. if (!isLastNonEmptyLine) {
  22798. trimmedLine += " ";
  22799. }
  22800. str += trimmedLine;
  22801. }
  22802. }
  22803. if (str)
  22804. args.push((0, _generated.stringLiteral)(str));
  22805. }
  22806. }
  22807. });
  22808. // node_modules/estree-to-babel/node_modules/@babel/types/lib/builders/react/buildChildren.js
  22809. var require_buildChildren2 = __commonJS({
  22810. "node_modules/estree-to-babel/node_modules/@babel/types/lib/builders/react/buildChildren.js"(exports) {
  22811. "use strict";
  22812. Object.defineProperty(exports, "__esModule", {
  22813. value: true
  22814. });
  22815. exports.default = buildChildren;
  22816. var _generated = require_generated6();
  22817. var _cleanJSXElementLiteralChild = require_cleanJSXElementLiteralChild2();
  22818. function buildChildren(node) {
  22819. const elements = [];
  22820. for (let i = 0; i < node.children.length; i++) {
  22821. let child = node.children[i];
  22822. if ((0, _generated.isJSXText)(child)) {
  22823. (0, _cleanJSXElementLiteralChild.default)(child, elements);
  22824. continue;
  22825. }
  22826. if ((0, _generated.isJSXExpressionContainer)(child))
  22827. child = child.expression;
  22828. if ((0, _generated.isJSXEmptyExpression)(child))
  22829. continue;
  22830. elements.push(child);
  22831. }
  22832. return elements;
  22833. }
  22834. }
  22835. });
  22836. // node_modules/estree-to-babel/node_modules/@babel/types/lib/validators/isNode.js
  22837. var require_isNode2 = __commonJS({
  22838. "node_modules/estree-to-babel/node_modules/@babel/types/lib/validators/isNode.js"(exports) {
  22839. "use strict";
  22840. Object.defineProperty(exports, "__esModule", {
  22841. value: true
  22842. });
  22843. exports.default = isNode;
  22844. var _definitions = require_definitions2();
  22845. function isNode(node) {
  22846. return !!(node && _definitions.VISITOR_KEYS[node.type]);
  22847. }
  22848. }
  22849. });
  22850. // node_modules/estree-to-babel/node_modules/@babel/types/lib/asserts/assertNode.js
  22851. var require_assertNode2 = __commonJS({
  22852. "node_modules/estree-to-babel/node_modules/@babel/types/lib/asserts/assertNode.js"(exports) {
  22853. "use strict";
  22854. Object.defineProperty(exports, "__esModule", {
  22855. value: true
  22856. });
  22857. exports.default = assertNode2;
  22858. var _isNode = require_isNode2();
  22859. function assertNode2(node) {
  22860. if (!(0, _isNode.default)(node)) {
  22861. var _node$type;
  22862. const type = (_node$type = node == null ? void 0 : node.type) != null ? _node$type : JSON.stringify(node);
  22863. throw new TypeError(`Not a valid node of type "${type}"`);
  22864. }
  22865. }
  22866. }
  22867. });
  22868. // node_modules/estree-to-babel/node_modules/@babel/types/lib/asserts/generated/index.js
  22869. var require_generated8 = __commonJS({
  22870. "node_modules/estree-to-babel/node_modules/@babel/types/lib/asserts/generated/index.js"(exports) {
  22871. "use strict";
  22872. Object.defineProperty(exports, "__esModule", {
  22873. value: true
  22874. });
  22875. exports.assertArrayExpression = assertArrayExpression;
  22876. exports.assertAssignmentExpression = assertAssignmentExpression;
  22877. exports.assertBinaryExpression = assertBinaryExpression;
  22878. exports.assertInterpreterDirective = assertInterpreterDirective;
  22879. exports.assertDirective = assertDirective;
  22880. exports.assertDirectiveLiteral = assertDirectiveLiteral;
  22881. exports.assertBlockStatement = assertBlockStatement;
  22882. exports.assertBreakStatement = assertBreakStatement;
  22883. exports.assertCallExpression = assertCallExpression;
  22884. exports.assertCatchClause = assertCatchClause;
  22885. exports.assertConditionalExpression = assertConditionalExpression;
  22886. exports.assertContinueStatement = assertContinueStatement;
  22887. exports.assertDebuggerStatement = assertDebuggerStatement;
  22888. exports.assertDoWhileStatement = assertDoWhileStatement;
  22889. exports.assertEmptyStatement = assertEmptyStatement;
  22890. exports.assertExpressionStatement = assertExpressionStatement;
  22891. exports.assertFile = assertFile;
  22892. exports.assertForInStatement = assertForInStatement;
  22893. exports.assertForStatement = assertForStatement;
  22894. exports.assertFunctionDeclaration = assertFunctionDeclaration;
  22895. exports.assertFunctionExpression = assertFunctionExpression;
  22896. exports.assertIdentifier = assertIdentifier;
  22897. exports.assertIfStatement = assertIfStatement;
  22898. exports.assertLabeledStatement = assertLabeledStatement;
  22899. exports.assertStringLiteral = assertStringLiteral;
  22900. exports.assertNumericLiteral = assertNumericLiteral;
  22901. exports.assertNullLiteral = assertNullLiteral;
  22902. exports.assertBooleanLiteral = assertBooleanLiteral;
  22903. exports.assertRegExpLiteral = assertRegExpLiteral;
  22904. exports.assertLogicalExpression = assertLogicalExpression;
  22905. exports.assertMemberExpression = assertMemberExpression;
  22906. exports.assertNewExpression = assertNewExpression;
  22907. exports.assertProgram = assertProgram;
  22908. exports.assertObjectExpression = assertObjectExpression;
  22909. exports.assertObjectMethod = assertObjectMethod;
  22910. exports.assertObjectProperty = assertObjectProperty;
  22911. exports.assertRestElement = assertRestElement;
  22912. exports.assertReturnStatement = assertReturnStatement;
  22913. exports.assertSequenceExpression = assertSequenceExpression;
  22914. exports.assertParenthesizedExpression = assertParenthesizedExpression;
  22915. exports.assertSwitchCase = assertSwitchCase;
  22916. exports.assertSwitchStatement = assertSwitchStatement;
  22917. exports.assertThisExpression = assertThisExpression;
  22918. exports.assertThrowStatement = assertThrowStatement;
  22919. exports.assertTryStatement = assertTryStatement;
  22920. exports.assertUnaryExpression = assertUnaryExpression;
  22921. exports.assertUpdateExpression = assertUpdateExpression;
  22922. exports.assertVariableDeclaration = assertVariableDeclaration;
  22923. exports.assertVariableDeclarator = assertVariableDeclarator;
  22924. exports.assertWhileStatement = assertWhileStatement;
  22925. exports.assertWithStatement = assertWithStatement;
  22926. exports.assertAssignmentPattern = assertAssignmentPattern;
  22927. exports.assertArrayPattern = assertArrayPattern;
  22928. exports.assertArrowFunctionExpression = assertArrowFunctionExpression;
  22929. exports.assertClassBody = assertClassBody;
  22930. exports.assertClassExpression = assertClassExpression;
  22931. exports.assertClassDeclaration = assertClassDeclaration;
  22932. exports.assertExportAllDeclaration = assertExportAllDeclaration;
  22933. exports.assertExportDefaultDeclaration = assertExportDefaultDeclaration;
  22934. exports.assertExportNamedDeclaration = assertExportNamedDeclaration;
  22935. exports.assertExportSpecifier = assertExportSpecifier;
  22936. exports.assertForOfStatement = assertForOfStatement;
  22937. exports.assertImportDeclaration = assertImportDeclaration;
  22938. exports.assertImportDefaultSpecifier = assertImportDefaultSpecifier;
  22939. exports.assertImportNamespaceSpecifier = assertImportNamespaceSpecifier;
  22940. exports.assertImportSpecifier = assertImportSpecifier;
  22941. exports.assertMetaProperty = assertMetaProperty;
  22942. exports.assertClassMethod = assertClassMethod;
  22943. exports.assertObjectPattern = assertObjectPattern;
  22944. exports.assertSpreadElement = assertSpreadElement;
  22945. exports.assertSuper = assertSuper;
  22946. exports.assertTaggedTemplateExpression = assertTaggedTemplateExpression;
  22947. exports.assertTemplateElement = assertTemplateElement;
  22948. exports.assertTemplateLiteral = assertTemplateLiteral;
  22949. exports.assertYieldExpression = assertYieldExpression;
  22950. exports.assertAwaitExpression = assertAwaitExpression;
  22951. exports.assertImport = assertImport;
  22952. exports.assertBigIntLiteral = assertBigIntLiteral;
  22953. exports.assertExportNamespaceSpecifier = assertExportNamespaceSpecifier;
  22954. exports.assertOptionalMemberExpression = assertOptionalMemberExpression;
  22955. exports.assertOptionalCallExpression = assertOptionalCallExpression;
  22956. exports.assertAnyTypeAnnotation = assertAnyTypeAnnotation;
  22957. exports.assertArrayTypeAnnotation = assertArrayTypeAnnotation;
  22958. exports.assertBooleanTypeAnnotation = assertBooleanTypeAnnotation;
  22959. exports.assertBooleanLiteralTypeAnnotation = assertBooleanLiteralTypeAnnotation;
  22960. exports.assertNullLiteralTypeAnnotation = assertNullLiteralTypeAnnotation;
  22961. exports.assertClassImplements = assertClassImplements;
  22962. exports.assertDeclareClass = assertDeclareClass;
  22963. exports.assertDeclareFunction = assertDeclareFunction;
  22964. exports.assertDeclareInterface = assertDeclareInterface;
  22965. exports.assertDeclareModule = assertDeclareModule;
  22966. exports.assertDeclareModuleExports = assertDeclareModuleExports;
  22967. exports.assertDeclareTypeAlias = assertDeclareTypeAlias;
  22968. exports.assertDeclareOpaqueType = assertDeclareOpaqueType;
  22969. exports.assertDeclareVariable = assertDeclareVariable;
  22970. exports.assertDeclareExportDeclaration = assertDeclareExportDeclaration;
  22971. exports.assertDeclareExportAllDeclaration = assertDeclareExportAllDeclaration;
  22972. exports.assertDeclaredPredicate = assertDeclaredPredicate;
  22973. exports.assertExistsTypeAnnotation = assertExistsTypeAnnotation;
  22974. exports.assertFunctionTypeAnnotation = assertFunctionTypeAnnotation;
  22975. exports.assertFunctionTypeParam = assertFunctionTypeParam;
  22976. exports.assertGenericTypeAnnotation = assertGenericTypeAnnotation;
  22977. exports.assertInferredPredicate = assertInferredPredicate;
  22978. exports.assertInterfaceExtends = assertInterfaceExtends;
  22979. exports.assertInterfaceDeclaration = assertInterfaceDeclaration;
  22980. exports.assertInterfaceTypeAnnotation = assertInterfaceTypeAnnotation;
  22981. exports.assertIntersectionTypeAnnotation = assertIntersectionTypeAnnotation;
  22982. exports.assertMixedTypeAnnotation = assertMixedTypeAnnotation;
  22983. exports.assertEmptyTypeAnnotation = assertEmptyTypeAnnotation;
  22984. exports.assertNullableTypeAnnotation = assertNullableTypeAnnotation;
  22985. exports.assertNumberLiteralTypeAnnotation = assertNumberLiteralTypeAnnotation;
  22986. exports.assertNumberTypeAnnotation = assertNumberTypeAnnotation;
  22987. exports.assertObjectTypeAnnotation = assertObjectTypeAnnotation;
  22988. exports.assertObjectTypeInternalSlot = assertObjectTypeInternalSlot;
  22989. exports.assertObjectTypeCallProperty = assertObjectTypeCallProperty;
  22990. exports.assertObjectTypeIndexer = assertObjectTypeIndexer;
  22991. exports.assertObjectTypeProperty = assertObjectTypeProperty;
  22992. exports.assertObjectTypeSpreadProperty = assertObjectTypeSpreadProperty;
  22993. exports.assertOpaqueType = assertOpaqueType;
  22994. exports.assertQualifiedTypeIdentifier = assertQualifiedTypeIdentifier;
  22995. exports.assertStringLiteralTypeAnnotation = assertStringLiteralTypeAnnotation;
  22996. exports.assertStringTypeAnnotation = assertStringTypeAnnotation;
  22997. exports.assertSymbolTypeAnnotation = assertSymbolTypeAnnotation;
  22998. exports.assertThisTypeAnnotation = assertThisTypeAnnotation;
  22999. exports.assertTupleTypeAnnotation = assertTupleTypeAnnotation;
  23000. exports.assertTypeofTypeAnnotation = assertTypeofTypeAnnotation;
  23001. exports.assertTypeAlias = assertTypeAlias;
  23002. exports.assertTypeAnnotation = assertTypeAnnotation;
  23003. exports.assertTypeCastExpression = assertTypeCastExpression;
  23004. exports.assertTypeParameter = assertTypeParameter;
  23005. exports.assertTypeParameterDeclaration = assertTypeParameterDeclaration;
  23006. exports.assertTypeParameterInstantiation = assertTypeParameterInstantiation;
  23007. exports.assertUnionTypeAnnotation = assertUnionTypeAnnotation;
  23008. exports.assertVariance = assertVariance;
  23009. exports.assertVoidTypeAnnotation = assertVoidTypeAnnotation;
  23010. exports.assertEnumDeclaration = assertEnumDeclaration;
  23011. exports.assertEnumBooleanBody = assertEnumBooleanBody;
  23012. exports.assertEnumNumberBody = assertEnumNumberBody;
  23013. exports.assertEnumStringBody = assertEnumStringBody;
  23014. exports.assertEnumSymbolBody = assertEnumSymbolBody;
  23015. exports.assertEnumBooleanMember = assertEnumBooleanMember;
  23016. exports.assertEnumNumberMember = assertEnumNumberMember;
  23017. exports.assertEnumStringMember = assertEnumStringMember;
  23018. exports.assertEnumDefaultedMember = assertEnumDefaultedMember;
  23019. exports.assertIndexedAccessType = assertIndexedAccessType;
  23020. exports.assertOptionalIndexedAccessType = assertOptionalIndexedAccessType;
  23021. exports.assertJSXAttribute = assertJSXAttribute;
  23022. exports.assertJSXClosingElement = assertJSXClosingElement;
  23023. exports.assertJSXElement = assertJSXElement;
  23024. exports.assertJSXEmptyExpression = assertJSXEmptyExpression;
  23025. exports.assertJSXExpressionContainer = assertJSXExpressionContainer;
  23026. exports.assertJSXSpreadChild = assertJSXSpreadChild;
  23027. exports.assertJSXIdentifier = assertJSXIdentifier;
  23028. exports.assertJSXMemberExpression = assertJSXMemberExpression;
  23029. exports.assertJSXNamespacedName = assertJSXNamespacedName;
  23030. exports.assertJSXOpeningElement = assertJSXOpeningElement;
  23031. exports.assertJSXSpreadAttribute = assertJSXSpreadAttribute;
  23032. exports.assertJSXText = assertJSXText;
  23033. exports.assertJSXFragment = assertJSXFragment;
  23034. exports.assertJSXOpeningFragment = assertJSXOpeningFragment;
  23035. exports.assertJSXClosingFragment = assertJSXClosingFragment;
  23036. exports.assertNoop = assertNoop;
  23037. exports.assertPlaceholder = assertPlaceholder;
  23038. exports.assertV8IntrinsicIdentifier = assertV8IntrinsicIdentifier;
  23039. exports.assertArgumentPlaceholder = assertArgumentPlaceholder;
  23040. exports.assertBindExpression = assertBindExpression;
  23041. exports.assertClassProperty = assertClassProperty;
  23042. exports.assertPipelineTopicExpression = assertPipelineTopicExpression;
  23043. exports.assertPipelineBareFunction = assertPipelineBareFunction;
  23044. exports.assertPipelinePrimaryTopicReference = assertPipelinePrimaryTopicReference;
  23045. exports.assertClassPrivateProperty = assertClassPrivateProperty;
  23046. exports.assertClassPrivateMethod = assertClassPrivateMethod;
  23047. exports.assertImportAttribute = assertImportAttribute;
  23048. exports.assertDecorator = assertDecorator;
  23049. exports.assertDoExpression = assertDoExpression;
  23050. exports.assertExportDefaultSpecifier = assertExportDefaultSpecifier;
  23051. exports.assertPrivateName = assertPrivateName;
  23052. exports.assertRecordExpression = assertRecordExpression;
  23053. exports.assertTupleExpression = assertTupleExpression;
  23054. exports.assertDecimalLiteral = assertDecimalLiteral;
  23055. exports.assertStaticBlock = assertStaticBlock;
  23056. exports.assertModuleExpression = assertModuleExpression;
  23057. exports.assertTSParameterProperty = assertTSParameterProperty;
  23058. exports.assertTSDeclareFunction = assertTSDeclareFunction;
  23059. exports.assertTSDeclareMethod = assertTSDeclareMethod;
  23060. exports.assertTSQualifiedName = assertTSQualifiedName;
  23061. exports.assertTSCallSignatureDeclaration = assertTSCallSignatureDeclaration;
  23062. exports.assertTSConstructSignatureDeclaration = assertTSConstructSignatureDeclaration;
  23063. exports.assertTSPropertySignature = assertTSPropertySignature;
  23064. exports.assertTSMethodSignature = assertTSMethodSignature;
  23065. exports.assertTSIndexSignature = assertTSIndexSignature;
  23066. exports.assertTSAnyKeyword = assertTSAnyKeyword;
  23067. exports.assertTSBooleanKeyword = assertTSBooleanKeyword;
  23068. exports.assertTSBigIntKeyword = assertTSBigIntKeyword;
  23069. exports.assertTSIntrinsicKeyword = assertTSIntrinsicKeyword;
  23070. exports.assertTSNeverKeyword = assertTSNeverKeyword;
  23071. exports.assertTSNullKeyword = assertTSNullKeyword;
  23072. exports.assertTSNumberKeyword = assertTSNumberKeyword;
  23073. exports.assertTSObjectKeyword = assertTSObjectKeyword;
  23074. exports.assertTSStringKeyword = assertTSStringKeyword;
  23075. exports.assertTSSymbolKeyword = assertTSSymbolKeyword;
  23076. exports.assertTSUndefinedKeyword = assertTSUndefinedKeyword;
  23077. exports.assertTSUnknownKeyword = assertTSUnknownKeyword;
  23078. exports.assertTSVoidKeyword = assertTSVoidKeyword;
  23079. exports.assertTSThisType = assertTSThisType;
  23080. exports.assertTSFunctionType = assertTSFunctionType;
  23081. exports.assertTSConstructorType = assertTSConstructorType;
  23082. exports.assertTSTypeReference = assertTSTypeReference;
  23083. exports.assertTSTypePredicate = assertTSTypePredicate;
  23084. exports.assertTSTypeQuery = assertTSTypeQuery;
  23085. exports.assertTSTypeLiteral = assertTSTypeLiteral;
  23086. exports.assertTSArrayType = assertTSArrayType;
  23087. exports.assertTSTupleType = assertTSTupleType;
  23088. exports.assertTSOptionalType = assertTSOptionalType;
  23089. exports.assertTSRestType = assertTSRestType;
  23090. exports.assertTSNamedTupleMember = assertTSNamedTupleMember;
  23091. exports.assertTSUnionType = assertTSUnionType;
  23092. exports.assertTSIntersectionType = assertTSIntersectionType;
  23093. exports.assertTSConditionalType = assertTSConditionalType;
  23094. exports.assertTSInferType = assertTSInferType;
  23095. exports.assertTSParenthesizedType = assertTSParenthesizedType;
  23096. exports.assertTSTypeOperator = assertTSTypeOperator;
  23097. exports.assertTSIndexedAccessType = assertTSIndexedAccessType;
  23098. exports.assertTSMappedType = assertTSMappedType;
  23099. exports.assertTSLiteralType = assertTSLiteralType;
  23100. exports.assertTSExpressionWithTypeArguments = assertTSExpressionWithTypeArguments;
  23101. exports.assertTSInterfaceDeclaration = assertTSInterfaceDeclaration;
  23102. exports.assertTSInterfaceBody = assertTSInterfaceBody;
  23103. exports.assertTSTypeAliasDeclaration = assertTSTypeAliasDeclaration;
  23104. exports.assertTSAsExpression = assertTSAsExpression;
  23105. exports.assertTSTypeAssertion = assertTSTypeAssertion;
  23106. exports.assertTSEnumDeclaration = assertTSEnumDeclaration;
  23107. exports.assertTSEnumMember = assertTSEnumMember;
  23108. exports.assertTSModuleDeclaration = assertTSModuleDeclaration;
  23109. exports.assertTSModuleBlock = assertTSModuleBlock;
  23110. exports.assertTSImportType = assertTSImportType;
  23111. exports.assertTSImportEqualsDeclaration = assertTSImportEqualsDeclaration;
  23112. exports.assertTSExternalModuleReference = assertTSExternalModuleReference;
  23113. exports.assertTSNonNullExpression = assertTSNonNullExpression;
  23114. exports.assertTSExportAssignment = assertTSExportAssignment;
  23115. exports.assertTSNamespaceExportDeclaration = assertTSNamespaceExportDeclaration;
  23116. exports.assertTSTypeAnnotation = assertTSTypeAnnotation;
  23117. exports.assertTSTypeParameterInstantiation = assertTSTypeParameterInstantiation;
  23118. exports.assertTSTypeParameterDeclaration = assertTSTypeParameterDeclaration;
  23119. exports.assertTSTypeParameter = assertTSTypeParameter;
  23120. exports.assertExpression = assertExpression;
  23121. exports.assertBinary = assertBinary;
  23122. exports.assertScopable = assertScopable;
  23123. exports.assertBlockParent = assertBlockParent;
  23124. exports.assertBlock = assertBlock;
  23125. exports.assertStatement = assertStatement;
  23126. exports.assertTerminatorless = assertTerminatorless;
  23127. exports.assertCompletionStatement = assertCompletionStatement;
  23128. exports.assertConditional = assertConditional;
  23129. exports.assertLoop = assertLoop;
  23130. exports.assertWhile = assertWhile;
  23131. exports.assertExpressionWrapper = assertExpressionWrapper;
  23132. exports.assertFor = assertFor;
  23133. exports.assertForXStatement = assertForXStatement;
  23134. exports.assertFunction = assertFunction;
  23135. exports.assertFunctionParent = assertFunctionParent;
  23136. exports.assertPureish = assertPureish;
  23137. exports.assertDeclaration = assertDeclaration;
  23138. exports.assertPatternLike = assertPatternLike;
  23139. exports.assertLVal = assertLVal;
  23140. exports.assertTSEntityName = assertTSEntityName;
  23141. exports.assertLiteral = assertLiteral;
  23142. exports.assertImmutable = assertImmutable;
  23143. exports.assertUserWhitespacable = assertUserWhitespacable;
  23144. exports.assertMethod = assertMethod;
  23145. exports.assertObjectMember = assertObjectMember;
  23146. exports.assertProperty = assertProperty;
  23147. exports.assertUnaryLike = assertUnaryLike;
  23148. exports.assertPattern = assertPattern;
  23149. exports.assertClass = assertClass;
  23150. exports.assertModuleDeclaration = assertModuleDeclaration;
  23151. exports.assertExportDeclaration = assertExportDeclaration;
  23152. exports.assertModuleSpecifier = assertModuleSpecifier;
  23153. exports.assertFlow = assertFlow;
  23154. exports.assertFlowType = assertFlowType;
  23155. exports.assertFlowBaseAnnotation = assertFlowBaseAnnotation;
  23156. exports.assertFlowDeclaration = assertFlowDeclaration;
  23157. exports.assertFlowPredicate = assertFlowPredicate;
  23158. exports.assertEnumBody = assertEnumBody;
  23159. exports.assertEnumMember = assertEnumMember;
  23160. exports.assertJSX = assertJSX;
  23161. exports.assertPrivate = assertPrivate;
  23162. exports.assertTSTypeElement = assertTSTypeElement;
  23163. exports.assertTSType = assertTSType;
  23164. exports.assertTSBaseType = assertTSBaseType;
  23165. exports.assertNumberLiteral = assertNumberLiteral;
  23166. exports.assertRegexLiteral = assertRegexLiteral;
  23167. exports.assertRestProperty = assertRestProperty;
  23168. exports.assertSpreadProperty = assertSpreadProperty;
  23169. var _is = require_is2();
  23170. function assert(type, node, opts) {
  23171. if (!(0, _is.default)(type, node, opts)) {
  23172. throw new Error(`Expected type "${type}" with option ${JSON.stringify(opts)}, but instead got "${node.type}".`);
  23173. }
  23174. }
  23175. function assertArrayExpression(node, opts) {
  23176. assert("ArrayExpression", node, opts);
  23177. }
  23178. function assertAssignmentExpression(node, opts) {
  23179. assert("AssignmentExpression", node, opts);
  23180. }
  23181. function assertBinaryExpression(node, opts) {
  23182. assert("BinaryExpression", node, opts);
  23183. }
  23184. function assertInterpreterDirective(node, opts) {
  23185. assert("InterpreterDirective", node, opts);
  23186. }
  23187. function assertDirective(node, opts) {
  23188. assert("Directive", node, opts);
  23189. }
  23190. function assertDirectiveLiteral(node, opts) {
  23191. assert("DirectiveLiteral", node, opts);
  23192. }
  23193. function assertBlockStatement(node, opts) {
  23194. assert("BlockStatement", node, opts);
  23195. }
  23196. function assertBreakStatement(node, opts) {
  23197. assert("BreakStatement", node, opts);
  23198. }
  23199. function assertCallExpression(node, opts) {
  23200. assert("CallExpression", node, opts);
  23201. }
  23202. function assertCatchClause(node, opts) {
  23203. assert("CatchClause", node, opts);
  23204. }
  23205. function assertConditionalExpression(node, opts) {
  23206. assert("ConditionalExpression", node, opts);
  23207. }
  23208. function assertContinueStatement(node, opts) {
  23209. assert("ContinueStatement", node, opts);
  23210. }
  23211. function assertDebuggerStatement(node, opts) {
  23212. assert("DebuggerStatement", node, opts);
  23213. }
  23214. function assertDoWhileStatement(node, opts) {
  23215. assert("DoWhileStatement", node, opts);
  23216. }
  23217. function assertEmptyStatement(node, opts) {
  23218. assert("EmptyStatement", node, opts);
  23219. }
  23220. function assertExpressionStatement(node, opts) {
  23221. assert("ExpressionStatement", node, opts);
  23222. }
  23223. function assertFile(node, opts) {
  23224. assert("File", node, opts);
  23225. }
  23226. function assertForInStatement(node, opts) {
  23227. assert("ForInStatement", node, opts);
  23228. }
  23229. function assertForStatement(node, opts) {
  23230. assert("ForStatement", node, opts);
  23231. }
  23232. function assertFunctionDeclaration(node, opts) {
  23233. assert("FunctionDeclaration", node, opts);
  23234. }
  23235. function assertFunctionExpression(node, opts) {
  23236. assert("FunctionExpression", node, opts);
  23237. }
  23238. function assertIdentifier(node, opts) {
  23239. assert("Identifier", node, opts);
  23240. }
  23241. function assertIfStatement(node, opts) {
  23242. assert("IfStatement", node, opts);
  23243. }
  23244. function assertLabeledStatement(node, opts) {
  23245. assert("LabeledStatement", node, opts);
  23246. }
  23247. function assertStringLiteral(node, opts) {
  23248. assert("StringLiteral", node, opts);
  23249. }
  23250. function assertNumericLiteral(node, opts) {
  23251. assert("NumericLiteral", node, opts);
  23252. }
  23253. function assertNullLiteral(node, opts) {
  23254. assert("NullLiteral", node, opts);
  23255. }
  23256. function assertBooleanLiteral(node, opts) {
  23257. assert("BooleanLiteral", node, opts);
  23258. }
  23259. function assertRegExpLiteral(node, opts) {
  23260. assert("RegExpLiteral", node, opts);
  23261. }
  23262. function assertLogicalExpression(node, opts) {
  23263. assert("LogicalExpression", node, opts);
  23264. }
  23265. function assertMemberExpression(node, opts) {
  23266. assert("MemberExpression", node, opts);
  23267. }
  23268. function assertNewExpression(node, opts) {
  23269. assert("NewExpression", node, opts);
  23270. }
  23271. function assertProgram(node, opts) {
  23272. assert("Program", node, opts);
  23273. }
  23274. function assertObjectExpression(node, opts) {
  23275. assert("ObjectExpression", node, opts);
  23276. }
  23277. function assertObjectMethod(node, opts) {
  23278. assert("ObjectMethod", node, opts);
  23279. }
  23280. function assertObjectProperty(node, opts) {
  23281. assert("ObjectProperty", node, opts);
  23282. }
  23283. function assertRestElement(node, opts) {
  23284. assert("RestElement", node, opts);
  23285. }
  23286. function assertReturnStatement(node, opts) {
  23287. assert("ReturnStatement", node, opts);
  23288. }
  23289. function assertSequenceExpression(node, opts) {
  23290. assert("SequenceExpression", node, opts);
  23291. }
  23292. function assertParenthesizedExpression(node, opts) {
  23293. assert("ParenthesizedExpression", node, opts);
  23294. }
  23295. function assertSwitchCase(node, opts) {
  23296. assert("SwitchCase", node, opts);
  23297. }
  23298. function assertSwitchStatement(node, opts) {
  23299. assert("SwitchStatement", node, opts);
  23300. }
  23301. function assertThisExpression(node, opts) {
  23302. assert("ThisExpression", node, opts);
  23303. }
  23304. function assertThrowStatement(node, opts) {
  23305. assert("ThrowStatement", node, opts);
  23306. }
  23307. function assertTryStatement(node, opts) {
  23308. assert("TryStatement", node, opts);
  23309. }
  23310. function assertUnaryExpression(node, opts) {
  23311. assert("UnaryExpression", node, opts);
  23312. }
  23313. function assertUpdateExpression(node, opts) {
  23314. assert("UpdateExpression", node, opts);
  23315. }
  23316. function assertVariableDeclaration(node, opts) {
  23317. assert("VariableDeclaration", node, opts);
  23318. }
  23319. function assertVariableDeclarator(node, opts) {
  23320. assert("VariableDeclarator", node, opts);
  23321. }
  23322. function assertWhileStatement(node, opts) {
  23323. assert("WhileStatement", node, opts);
  23324. }
  23325. function assertWithStatement(node, opts) {
  23326. assert("WithStatement", node, opts);
  23327. }
  23328. function assertAssignmentPattern(node, opts) {
  23329. assert("AssignmentPattern", node, opts);
  23330. }
  23331. function assertArrayPattern(node, opts) {
  23332. assert("ArrayPattern", node, opts);
  23333. }
  23334. function assertArrowFunctionExpression(node, opts) {
  23335. assert("ArrowFunctionExpression", node, opts);
  23336. }
  23337. function assertClassBody(node, opts) {
  23338. assert("ClassBody", node, opts);
  23339. }
  23340. function assertClassExpression(node, opts) {
  23341. assert("ClassExpression", node, opts);
  23342. }
  23343. function assertClassDeclaration(node, opts) {
  23344. assert("ClassDeclaration", node, opts);
  23345. }
  23346. function assertExportAllDeclaration(node, opts) {
  23347. assert("ExportAllDeclaration", node, opts);
  23348. }
  23349. function assertExportDefaultDeclaration(node, opts) {
  23350. assert("ExportDefaultDeclaration", node, opts);
  23351. }
  23352. function assertExportNamedDeclaration(node, opts) {
  23353. assert("ExportNamedDeclaration", node, opts);
  23354. }
  23355. function assertExportSpecifier(node, opts) {
  23356. assert("ExportSpecifier", node, opts);
  23357. }
  23358. function assertForOfStatement(node, opts) {
  23359. assert("ForOfStatement", node, opts);
  23360. }
  23361. function assertImportDeclaration(node, opts) {
  23362. assert("ImportDeclaration", node, opts);
  23363. }
  23364. function assertImportDefaultSpecifier(node, opts) {
  23365. assert("ImportDefaultSpecifier", node, opts);
  23366. }
  23367. function assertImportNamespaceSpecifier(node, opts) {
  23368. assert("ImportNamespaceSpecifier", node, opts);
  23369. }
  23370. function assertImportSpecifier(node, opts) {
  23371. assert("ImportSpecifier", node, opts);
  23372. }
  23373. function assertMetaProperty(node, opts) {
  23374. assert("MetaProperty", node, opts);
  23375. }
  23376. function assertClassMethod(node, opts) {
  23377. assert("ClassMethod", node, opts);
  23378. }
  23379. function assertObjectPattern(node, opts) {
  23380. assert("ObjectPattern", node, opts);
  23381. }
  23382. function assertSpreadElement(node, opts) {
  23383. assert("SpreadElement", node, opts);
  23384. }
  23385. function assertSuper(node, opts) {
  23386. assert("Super", node, opts);
  23387. }
  23388. function assertTaggedTemplateExpression(node, opts) {
  23389. assert("TaggedTemplateExpression", node, opts);
  23390. }
  23391. function assertTemplateElement(node, opts) {
  23392. assert("TemplateElement", node, opts);
  23393. }
  23394. function assertTemplateLiteral(node, opts) {
  23395. assert("TemplateLiteral", node, opts);
  23396. }
  23397. function assertYieldExpression(node, opts) {
  23398. assert("YieldExpression", node, opts);
  23399. }
  23400. function assertAwaitExpression(node, opts) {
  23401. assert("AwaitExpression", node, opts);
  23402. }
  23403. function assertImport(node, opts) {
  23404. assert("Import", node, opts);
  23405. }
  23406. function assertBigIntLiteral(node, opts) {
  23407. assert("BigIntLiteral", node, opts);
  23408. }
  23409. function assertExportNamespaceSpecifier(node, opts) {
  23410. assert("ExportNamespaceSpecifier", node, opts);
  23411. }
  23412. function assertOptionalMemberExpression(node, opts) {
  23413. assert("OptionalMemberExpression", node, opts);
  23414. }
  23415. function assertOptionalCallExpression(node, opts) {
  23416. assert("OptionalCallExpression", node, opts);
  23417. }
  23418. function assertAnyTypeAnnotation(node, opts) {
  23419. assert("AnyTypeAnnotation", node, opts);
  23420. }
  23421. function assertArrayTypeAnnotation(node, opts) {
  23422. assert("ArrayTypeAnnotation", node, opts);
  23423. }
  23424. function assertBooleanTypeAnnotation(node, opts) {
  23425. assert("BooleanTypeAnnotation", node, opts);
  23426. }
  23427. function assertBooleanLiteralTypeAnnotation(node, opts) {
  23428. assert("BooleanLiteralTypeAnnotation", node, opts);
  23429. }
  23430. function assertNullLiteralTypeAnnotation(node, opts) {
  23431. assert("NullLiteralTypeAnnotation", node, opts);
  23432. }
  23433. function assertClassImplements(node, opts) {
  23434. assert("ClassImplements", node, opts);
  23435. }
  23436. function assertDeclareClass(node, opts) {
  23437. assert("DeclareClass", node, opts);
  23438. }
  23439. function assertDeclareFunction(node, opts) {
  23440. assert("DeclareFunction", node, opts);
  23441. }
  23442. function assertDeclareInterface(node, opts) {
  23443. assert("DeclareInterface", node, opts);
  23444. }
  23445. function assertDeclareModule(node, opts) {
  23446. assert("DeclareModule", node, opts);
  23447. }
  23448. function assertDeclareModuleExports(node, opts) {
  23449. assert("DeclareModuleExports", node, opts);
  23450. }
  23451. function assertDeclareTypeAlias(node, opts) {
  23452. assert("DeclareTypeAlias", node, opts);
  23453. }
  23454. function assertDeclareOpaqueType(node, opts) {
  23455. assert("DeclareOpaqueType", node, opts);
  23456. }
  23457. function assertDeclareVariable(node, opts) {
  23458. assert("DeclareVariable", node, opts);
  23459. }
  23460. function assertDeclareExportDeclaration(node, opts) {
  23461. assert("DeclareExportDeclaration", node, opts);
  23462. }
  23463. function assertDeclareExportAllDeclaration(node, opts) {
  23464. assert("DeclareExportAllDeclaration", node, opts);
  23465. }
  23466. function assertDeclaredPredicate(node, opts) {
  23467. assert("DeclaredPredicate", node, opts);
  23468. }
  23469. function assertExistsTypeAnnotation(node, opts) {
  23470. assert("ExistsTypeAnnotation", node, opts);
  23471. }
  23472. function assertFunctionTypeAnnotation(node, opts) {
  23473. assert("FunctionTypeAnnotation", node, opts);
  23474. }
  23475. function assertFunctionTypeParam(node, opts) {
  23476. assert("FunctionTypeParam", node, opts);
  23477. }
  23478. function assertGenericTypeAnnotation(node, opts) {
  23479. assert("GenericTypeAnnotation", node, opts);
  23480. }
  23481. function assertInferredPredicate(node, opts) {
  23482. assert("InferredPredicate", node, opts);
  23483. }
  23484. function assertInterfaceExtends(node, opts) {
  23485. assert("InterfaceExtends", node, opts);
  23486. }
  23487. function assertInterfaceDeclaration(node, opts) {
  23488. assert("InterfaceDeclaration", node, opts);
  23489. }
  23490. function assertInterfaceTypeAnnotation(node, opts) {
  23491. assert("InterfaceTypeAnnotation", node, opts);
  23492. }
  23493. function assertIntersectionTypeAnnotation(node, opts) {
  23494. assert("IntersectionTypeAnnotation", node, opts);
  23495. }
  23496. function assertMixedTypeAnnotation(node, opts) {
  23497. assert("MixedTypeAnnotation", node, opts);
  23498. }
  23499. function assertEmptyTypeAnnotation(node, opts) {
  23500. assert("EmptyTypeAnnotation", node, opts);
  23501. }
  23502. function assertNullableTypeAnnotation(node, opts) {
  23503. assert("NullableTypeAnnotation", node, opts);
  23504. }
  23505. function assertNumberLiteralTypeAnnotation(node, opts) {
  23506. assert("NumberLiteralTypeAnnotation", node, opts);
  23507. }
  23508. function assertNumberTypeAnnotation(node, opts) {
  23509. assert("NumberTypeAnnotation", node, opts);
  23510. }
  23511. function assertObjectTypeAnnotation(node, opts) {
  23512. assert("ObjectTypeAnnotation", node, opts);
  23513. }
  23514. function assertObjectTypeInternalSlot(node, opts) {
  23515. assert("ObjectTypeInternalSlot", node, opts);
  23516. }
  23517. function assertObjectTypeCallProperty(node, opts) {
  23518. assert("ObjectTypeCallProperty", node, opts);
  23519. }
  23520. function assertObjectTypeIndexer(node, opts) {
  23521. assert("ObjectTypeIndexer", node, opts);
  23522. }
  23523. function assertObjectTypeProperty(node, opts) {
  23524. assert("ObjectTypeProperty", node, opts);
  23525. }
  23526. function assertObjectTypeSpreadProperty(node, opts) {
  23527. assert("ObjectTypeSpreadProperty", node, opts);
  23528. }
  23529. function assertOpaqueType(node, opts) {
  23530. assert("OpaqueType", node, opts);
  23531. }
  23532. function assertQualifiedTypeIdentifier(node, opts) {
  23533. assert("QualifiedTypeIdentifier", node, opts);
  23534. }
  23535. function assertStringLiteralTypeAnnotation(node, opts) {
  23536. assert("StringLiteralTypeAnnotation", node, opts);
  23537. }
  23538. function assertStringTypeAnnotation(node, opts) {
  23539. assert("StringTypeAnnotation", node, opts);
  23540. }
  23541. function assertSymbolTypeAnnotation(node, opts) {
  23542. assert("SymbolTypeAnnotation", node, opts);
  23543. }
  23544. function assertThisTypeAnnotation(node, opts) {
  23545. assert("ThisTypeAnnotation", node, opts);
  23546. }
  23547. function assertTupleTypeAnnotation(node, opts) {
  23548. assert("TupleTypeAnnotation", node, opts);
  23549. }
  23550. function assertTypeofTypeAnnotation(node, opts) {
  23551. assert("TypeofTypeAnnotation", node, opts);
  23552. }
  23553. function assertTypeAlias(node, opts) {
  23554. assert("TypeAlias", node, opts);
  23555. }
  23556. function assertTypeAnnotation(node, opts) {
  23557. assert("TypeAnnotation", node, opts);
  23558. }
  23559. function assertTypeCastExpression(node, opts) {
  23560. assert("TypeCastExpression", node, opts);
  23561. }
  23562. function assertTypeParameter(node, opts) {
  23563. assert("TypeParameter", node, opts);
  23564. }
  23565. function assertTypeParameterDeclaration(node, opts) {
  23566. assert("TypeParameterDeclaration", node, opts);
  23567. }
  23568. function assertTypeParameterInstantiation(node, opts) {
  23569. assert("TypeParameterInstantiation", node, opts);
  23570. }
  23571. function assertUnionTypeAnnotation(node, opts) {
  23572. assert("UnionTypeAnnotation", node, opts);
  23573. }
  23574. function assertVariance(node, opts) {
  23575. assert("Variance", node, opts);
  23576. }
  23577. function assertVoidTypeAnnotation(node, opts) {
  23578. assert("VoidTypeAnnotation", node, opts);
  23579. }
  23580. function assertEnumDeclaration(node, opts) {
  23581. assert("EnumDeclaration", node, opts);
  23582. }
  23583. function assertEnumBooleanBody(node, opts) {
  23584. assert("EnumBooleanBody", node, opts);
  23585. }
  23586. function assertEnumNumberBody(node, opts) {
  23587. assert("EnumNumberBody", node, opts);
  23588. }
  23589. function assertEnumStringBody(node, opts) {
  23590. assert("EnumStringBody", node, opts);
  23591. }
  23592. function assertEnumSymbolBody(node, opts) {
  23593. assert("EnumSymbolBody", node, opts);
  23594. }
  23595. function assertEnumBooleanMember(node, opts) {
  23596. assert("EnumBooleanMember", node, opts);
  23597. }
  23598. function assertEnumNumberMember(node, opts) {
  23599. assert("EnumNumberMember", node, opts);
  23600. }
  23601. function assertEnumStringMember(node, opts) {
  23602. assert("EnumStringMember", node, opts);
  23603. }
  23604. function assertEnumDefaultedMember(node, opts) {
  23605. assert("EnumDefaultedMember", node, opts);
  23606. }
  23607. function assertIndexedAccessType(node, opts) {
  23608. assert("IndexedAccessType", node, opts);
  23609. }
  23610. function assertOptionalIndexedAccessType(node, opts) {
  23611. assert("OptionalIndexedAccessType", node, opts);
  23612. }
  23613. function assertJSXAttribute(node, opts) {
  23614. assert("JSXAttribute", node, opts);
  23615. }
  23616. function assertJSXClosingElement(node, opts) {
  23617. assert("JSXClosingElement", node, opts);
  23618. }
  23619. function assertJSXElement(node, opts) {
  23620. assert("JSXElement", node, opts);
  23621. }
  23622. function assertJSXEmptyExpression(node, opts) {
  23623. assert("JSXEmptyExpression", node, opts);
  23624. }
  23625. function assertJSXExpressionContainer(node, opts) {
  23626. assert("JSXExpressionContainer", node, opts);
  23627. }
  23628. function assertJSXSpreadChild(node, opts) {
  23629. assert("JSXSpreadChild", node, opts);
  23630. }
  23631. function assertJSXIdentifier(node, opts) {
  23632. assert("JSXIdentifier", node, opts);
  23633. }
  23634. function assertJSXMemberExpression(node, opts) {
  23635. assert("JSXMemberExpression", node, opts);
  23636. }
  23637. function assertJSXNamespacedName(node, opts) {
  23638. assert("JSXNamespacedName", node, opts);
  23639. }
  23640. function assertJSXOpeningElement(node, opts) {
  23641. assert("JSXOpeningElement", node, opts);
  23642. }
  23643. function assertJSXSpreadAttribute(node, opts) {
  23644. assert("JSXSpreadAttribute", node, opts);
  23645. }
  23646. function assertJSXText(node, opts) {
  23647. assert("JSXText", node, opts);
  23648. }
  23649. function assertJSXFragment(node, opts) {
  23650. assert("JSXFragment", node, opts);
  23651. }
  23652. function assertJSXOpeningFragment(node, opts) {
  23653. assert("JSXOpeningFragment", node, opts);
  23654. }
  23655. function assertJSXClosingFragment(node, opts) {
  23656. assert("JSXClosingFragment", node, opts);
  23657. }
  23658. function assertNoop(node, opts) {
  23659. assert("Noop", node, opts);
  23660. }
  23661. function assertPlaceholder(node, opts) {
  23662. assert("Placeholder", node, opts);
  23663. }
  23664. function assertV8IntrinsicIdentifier(node, opts) {
  23665. assert("V8IntrinsicIdentifier", node, opts);
  23666. }
  23667. function assertArgumentPlaceholder(node, opts) {
  23668. assert("ArgumentPlaceholder", node, opts);
  23669. }
  23670. function assertBindExpression(node, opts) {
  23671. assert("BindExpression", node, opts);
  23672. }
  23673. function assertClassProperty(node, opts) {
  23674. assert("ClassProperty", node, opts);
  23675. }
  23676. function assertPipelineTopicExpression(node, opts) {
  23677. assert("PipelineTopicExpression", node, opts);
  23678. }
  23679. function assertPipelineBareFunction(node, opts) {
  23680. assert("PipelineBareFunction", node, opts);
  23681. }
  23682. function assertPipelinePrimaryTopicReference(node, opts) {
  23683. assert("PipelinePrimaryTopicReference", node, opts);
  23684. }
  23685. function assertClassPrivateProperty(node, opts) {
  23686. assert("ClassPrivateProperty", node, opts);
  23687. }
  23688. function assertClassPrivateMethod(node, opts) {
  23689. assert("ClassPrivateMethod", node, opts);
  23690. }
  23691. function assertImportAttribute(node, opts) {
  23692. assert("ImportAttribute", node, opts);
  23693. }
  23694. function assertDecorator(node, opts) {
  23695. assert("Decorator", node, opts);
  23696. }
  23697. function assertDoExpression(node, opts) {
  23698. assert("DoExpression", node, opts);
  23699. }
  23700. function assertExportDefaultSpecifier(node, opts) {
  23701. assert("ExportDefaultSpecifier", node, opts);
  23702. }
  23703. function assertPrivateName(node, opts) {
  23704. assert("PrivateName", node, opts);
  23705. }
  23706. function assertRecordExpression(node, opts) {
  23707. assert("RecordExpression", node, opts);
  23708. }
  23709. function assertTupleExpression(node, opts) {
  23710. assert("TupleExpression", node, opts);
  23711. }
  23712. function assertDecimalLiteral(node, opts) {
  23713. assert("DecimalLiteral", node, opts);
  23714. }
  23715. function assertStaticBlock(node, opts) {
  23716. assert("StaticBlock", node, opts);
  23717. }
  23718. function assertModuleExpression(node, opts) {
  23719. assert("ModuleExpression", node, opts);
  23720. }
  23721. function assertTSParameterProperty(node, opts) {
  23722. assert("TSParameterProperty", node, opts);
  23723. }
  23724. function assertTSDeclareFunction(node, opts) {
  23725. assert("TSDeclareFunction", node, opts);
  23726. }
  23727. function assertTSDeclareMethod(node, opts) {
  23728. assert("TSDeclareMethod", node, opts);
  23729. }
  23730. function assertTSQualifiedName(node, opts) {
  23731. assert("TSQualifiedName", node, opts);
  23732. }
  23733. function assertTSCallSignatureDeclaration(node, opts) {
  23734. assert("TSCallSignatureDeclaration", node, opts);
  23735. }
  23736. function assertTSConstructSignatureDeclaration(node, opts) {
  23737. assert("TSConstructSignatureDeclaration", node, opts);
  23738. }
  23739. function assertTSPropertySignature(node, opts) {
  23740. assert("TSPropertySignature", node, opts);
  23741. }
  23742. function assertTSMethodSignature(node, opts) {
  23743. assert("TSMethodSignature", node, opts);
  23744. }
  23745. function assertTSIndexSignature(node, opts) {
  23746. assert("TSIndexSignature", node, opts);
  23747. }
  23748. function assertTSAnyKeyword(node, opts) {
  23749. assert("TSAnyKeyword", node, opts);
  23750. }
  23751. function assertTSBooleanKeyword(node, opts) {
  23752. assert("TSBooleanKeyword", node, opts);
  23753. }
  23754. function assertTSBigIntKeyword(node, opts) {
  23755. assert("TSBigIntKeyword", node, opts);
  23756. }
  23757. function assertTSIntrinsicKeyword(node, opts) {
  23758. assert("TSIntrinsicKeyword", node, opts);
  23759. }
  23760. function assertTSNeverKeyword(node, opts) {
  23761. assert("TSNeverKeyword", node, opts);
  23762. }
  23763. function assertTSNullKeyword(node, opts) {
  23764. assert("TSNullKeyword", node, opts);
  23765. }
  23766. function assertTSNumberKeyword(node, opts) {
  23767. assert("TSNumberKeyword", node, opts);
  23768. }
  23769. function assertTSObjectKeyword(node, opts) {
  23770. assert("TSObjectKeyword", node, opts);
  23771. }
  23772. function assertTSStringKeyword(node, opts) {
  23773. assert("TSStringKeyword", node, opts);
  23774. }
  23775. function assertTSSymbolKeyword(node, opts) {
  23776. assert("TSSymbolKeyword", node, opts);
  23777. }
  23778. function assertTSUndefinedKeyword(node, opts) {
  23779. assert("TSUndefinedKeyword", node, opts);
  23780. }
  23781. function assertTSUnknownKeyword(node, opts) {
  23782. assert("TSUnknownKeyword", node, opts);
  23783. }
  23784. function assertTSVoidKeyword(node, opts) {
  23785. assert("TSVoidKeyword", node, opts);
  23786. }
  23787. function assertTSThisType(node, opts) {
  23788. assert("TSThisType", node, opts);
  23789. }
  23790. function assertTSFunctionType(node, opts) {
  23791. assert("TSFunctionType", node, opts);
  23792. }
  23793. function assertTSConstructorType(node, opts) {
  23794. assert("TSConstructorType", node, opts);
  23795. }
  23796. function assertTSTypeReference(node, opts) {
  23797. assert("TSTypeReference", node, opts);
  23798. }
  23799. function assertTSTypePredicate(node, opts) {
  23800. assert("TSTypePredicate", node, opts);
  23801. }
  23802. function assertTSTypeQuery(node, opts) {
  23803. assert("TSTypeQuery", node, opts);
  23804. }
  23805. function assertTSTypeLiteral(node, opts) {
  23806. assert("TSTypeLiteral", node, opts);
  23807. }
  23808. function assertTSArrayType(node, opts) {
  23809. assert("TSArrayType", node, opts);
  23810. }
  23811. function assertTSTupleType(node, opts) {
  23812. assert("TSTupleType", node, opts);
  23813. }
  23814. function assertTSOptionalType(node, opts) {
  23815. assert("TSOptionalType", node, opts);
  23816. }
  23817. function assertTSRestType(node, opts) {
  23818. assert("TSRestType", node, opts);
  23819. }
  23820. function assertTSNamedTupleMember(node, opts) {
  23821. assert("TSNamedTupleMember", node, opts);
  23822. }
  23823. function assertTSUnionType(node, opts) {
  23824. assert("TSUnionType", node, opts);
  23825. }
  23826. function assertTSIntersectionType(node, opts) {
  23827. assert("TSIntersectionType", node, opts);
  23828. }
  23829. function assertTSConditionalType(node, opts) {
  23830. assert("TSConditionalType", node, opts);
  23831. }
  23832. function assertTSInferType(node, opts) {
  23833. assert("TSInferType", node, opts);
  23834. }
  23835. function assertTSParenthesizedType(node, opts) {
  23836. assert("TSParenthesizedType", node, opts);
  23837. }
  23838. function assertTSTypeOperator(node, opts) {
  23839. assert("TSTypeOperator", node, opts);
  23840. }
  23841. function assertTSIndexedAccessType(node, opts) {
  23842. assert("TSIndexedAccessType", node, opts);
  23843. }
  23844. function assertTSMappedType(node, opts) {
  23845. assert("TSMappedType", node, opts);
  23846. }
  23847. function assertTSLiteralType(node, opts) {
  23848. assert("TSLiteralType", node, opts);
  23849. }
  23850. function assertTSExpressionWithTypeArguments(node, opts) {
  23851. assert("TSExpressionWithTypeArguments", node, opts);
  23852. }
  23853. function assertTSInterfaceDeclaration(node, opts) {
  23854. assert("TSInterfaceDeclaration", node, opts);
  23855. }
  23856. function assertTSInterfaceBody(node, opts) {
  23857. assert("TSInterfaceBody", node, opts);
  23858. }
  23859. function assertTSTypeAliasDeclaration(node, opts) {
  23860. assert("TSTypeAliasDeclaration", node, opts);
  23861. }
  23862. function assertTSAsExpression(node, opts) {
  23863. assert("TSAsExpression", node, opts);
  23864. }
  23865. function assertTSTypeAssertion(node, opts) {
  23866. assert("TSTypeAssertion", node, opts);
  23867. }
  23868. function assertTSEnumDeclaration(node, opts) {
  23869. assert("TSEnumDeclaration", node, opts);
  23870. }
  23871. function assertTSEnumMember(node, opts) {
  23872. assert("TSEnumMember", node, opts);
  23873. }
  23874. function assertTSModuleDeclaration(node, opts) {
  23875. assert("TSModuleDeclaration", node, opts);
  23876. }
  23877. function assertTSModuleBlock(node, opts) {
  23878. assert("TSModuleBlock", node, opts);
  23879. }
  23880. function assertTSImportType(node, opts) {
  23881. assert("TSImportType", node, opts);
  23882. }
  23883. function assertTSImportEqualsDeclaration(node, opts) {
  23884. assert("TSImportEqualsDeclaration", node, opts);
  23885. }
  23886. function assertTSExternalModuleReference(node, opts) {
  23887. assert("TSExternalModuleReference", node, opts);
  23888. }
  23889. function assertTSNonNullExpression(node, opts) {
  23890. assert("TSNonNullExpression", node, opts);
  23891. }
  23892. function assertTSExportAssignment(node, opts) {
  23893. assert("TSExportAssignment", node, opts);
  23894. }
  23895. function assertTSNamespaceExportDeclaration(node, opts) {
  23896. assert("TSNamespaceExportDeclaration", node, opts);
  23897. }
  23898. function assertTSTypeAnnotation(node, opts) {
  23899. assert("TSTypeAnnotation", node, opts);
  23900. }
  23901. function assertTSTypeParameterInstantiation(node, opts) {
  23902. assert("TSTypeParameterInstantiation", node, opts);
  23903. }
  23904. function assertTSTypeParameterDeclaration(node, opts) {
  23905. assert("TSTypeParameterDeclaration", node, opts);
  23906. }
  23907. function assertTSTypeParameter(node, opts) {
  23908. assert("TSTypeParameter", node, opts);
  23909. }
  23910. function assertExpression(node, opts) {
  23911. assert("Expression", node, opts);
  23912. }
  23913. function assertBinary(node, opts) {
  23914. assert("Binary", node, opts);
  23915. }
  23916. function assertScopable(node, opts) {
  23917. assert("Scopable", node, opts);
  23918. }
  23919. function assertBlockParent(node, opts) {
  23920. assert("BlockParent", node, opts);
  23921. }
  23922. function assertBlock(node, opts) {
  23923. assert("Block", node, opts);
  23924. }
  23925. function assertStatement(node, opts) {
  23926. assert("Statement", node, opts);
  23927. }
  23928. function assertTerminatorless(node, opts) {
  23929. assert("Terminatorless", node, opts);
  23930. }
  23931. function assertCompletionStatement(node, opts) {
  23932. assert("CompletionStatement", node, opts);
  23933. }
  23934. function assertConditional(node, opts) {
  23935. assert("Conditional", node, opts);
  23936. }
  23937. function assertLoop(node, opts) {
  23938. assert("Loop", node, opts);
  23939. }
  23940. function assertWhile(node, opts) {
  23941. assert("While", node, opts);
  23942. }
  23943. function assertExpressionWrapper(node, opts) {
  23944. assert("ExpressionWrapper", node, opts);
  23945. }
  23946. function assertFor(node, opts) {
  23947. assert("For", node, opts);
  23948. }
  23949. function assertForXStatement(node, opts) {
  23950. assert("ForXStatement", node, opts);
  23951. }
  23952. function assertFunction(node, opts) {
  23953. assert("Function", node, opts);
  23954. }
  23955. function assertFunctionParent(node, opts) {
  23956. assert("FunctionParent", node, opts);
  23957. }
  23958. function assertPureish(node, opts) {
  23959. assert("Pureish", node, opts);
  23960. }
  23961. function assertDeclaration(node, opts) {
  23962. assert("Declaration", node, opts);
  23963. }
  23964. function assertPatternLike(node, opts) {
  23965. assert("PatternLike", node, opts);
  23966. }
  23967. function assertLVal(node, opts) {
  23968. assert("LVal", node, opts);
  23969. }
  23970. function assertTSEntityName(node, opts) {
  23971. assert("TSEntityName", node, opts);
  23972. }
  23973. function assertLiteral(node, opts) {
  23974. assert("Literal", node, opts);
  23975. }
  23976. function assertImmutable(node, opts) {
  23977. assert("Immutable", node, opts);
  23978. }
  23979. function assertUserWhitespacable(node, opts) {
  23980. assert("UserWhitespacable", node, opts);
  23981. }
  23982. function assertMethod(node, opts) {
  23983. assert("Method", node, opts);
  23984. }
  23985. function assertObjectMember(node, opts) {
  23986. assert("ObjectMember", node, opts);
  23987. }
  23988. function assertProperty(node, opts) {
  23989. assert("Property", node, opts);
  23990. }
  23991. function assertUnaryLike(node, opts) {
  23992. assert("UnaryLike", node, opts);
  23993. }
  23994. function assertPattern(node, opts) {
  23995. assert("Pattern", node, opts);
  23996. }
  23997. function assertClass(node, opts) {
  23998. assert("Class", node, opts);
  23999. }
  24000. function assertModuleDeclaration(node, opts) {
  24001. assert("ModuleDeclaration", node, opts);
  24002. }
  24003. function assertExportDeclaration(node, opts) {
  24004. assert("ExportDeclaration", node, opts);
  24005. }
  24006. function assertModuleSpecifier(node, opts) {
  24007. assert("ModuleSpecifier", node, opts);
  24008. }
  24009. function assertFlow(node, opts) {
  24010. assert("Flow", node, opts);
  24011. }
  24012. function assertFlowType(node, opts) {
  24013. assert("FlowType", node, opts);
  24014. }
  24015. function assertFlowBaseAnnotation(node, opts) {
  24016. assert("FlowBaseAnnotation", node, opts);
  24017. }
  24018. function assertFlowDeclaration(node, opts) {
  24019. assert("FlowDeclaration", node, opts);
  24020. }
  24021. function assertFlowPredicate(node, opts) {
  24022. assert("FlowPredicate", node, opts);
  24023. }
  24024. function assertEnumBody(node, opts) {
  24025. assert("EnumBody", node, opts);
  24026. }
  24027. function assertEnumMember(node, opts) {
  24028. assert("EnumMember", node, opts);
  24029. }
  24030. function assertJSX(node, opts) {
  24031. assert("JSX", node, opts);
  24032. }
  24033. function assertPrivate(node, opts) {
  24034. assert("Private", node, opts);
  24035. }
  24036. function assertTSTypeElement(node, opts) {
  24037. assert("TSTypeElement", node, opts);
  24038. }
  24039. function assertTSType(node, opts) {
  24040. assert("TSType", node, opts);
  24041. }
  24042. function assertTSBaseType(node, opts) {
  24043. assert("TSBaseType", node, opts);
  24044. }
  24045. function assertNumberLiteral(node, opts) {
  24046. console.trace("The node type NumberLiteral has been renamed to NumericLiteral");
  24047. assert("NumberLiteral", node, opts);
  24048. }
  24049. function assertRegexLiteral(node, opts) {
  24050. console.trace("The node type RegexLiteral has been renamed to RegExpLiteral");
  24051. assert("RegexLiteral", node, opts);
  24052. }
  24053. function assertRestProperty(node, opts) {
  24054. console.trace("The node type RestProperty has been renamed to RestElement");
  24055. assert("RestProperty", node, opts);
  24056. }
  24057. function assertSpreadProperty(node, opts) {
  24058. console.trace("The node type SpreadProperty has been renamed to SpreadElement");
  24059. assert("SpreadProperty", node, opts);
  24060. }
  24061. }
  24062. });
  24063. // node_modules/estree-to-babel/node_modules/@babel/types/lib/builders/flow/createTypeAnnotationBasedOnTypeof.js
  24064. var require_createTypeAnnotationBasedOnTypeof2 = __commonJS({
  24065. "node_modules/estree-to-babel/node_modules/@babel/types/lib/builders/flow/createTypeAnnotationBasedOnTypeof.js"(exports) {
  24066. "use strict";
  24067. Object.defineProperty(exports, "__esModule", {
  24068. value: true
  24069. });
  24070. exports.default = createTypeAnnotationBasedOnTypeof;
  24071. var _generated = require_generated7();
  24072. function createTypeAnnotationBasedOnTypeof(type) {
  24073. if (type === "string") {
  24074. return (0, _generated.stringTypeAnnotation)();
  24075. } else if (type === "number") {
  24076. return (0, _generated.numberTypeAnnotation)();
  24077. } else if (type === "undefined") {
  24078. return (0, _generated.voidTypeAnnotation)();
  24079. } else if (type === "boolean") {
  24080. return (0, _generated.booleanTypeAnnotation)();
  24081. } else if (type === "function") {
  24082. return (0, _generated.genericTypeAnnotation)((0, _generated.identifier)("Function"));
  24083. } else if (type === "object") {
  24084. return (0, _generated.genericTypeAnnotation)((0, _generated.identifier)("Object"));
  24085. } else if (type === "symbol") {
  24086. return (0, _generated.genericTypeAnnotation)((0, _generated.identifier)("Symbol"));
  24087. } else if (type === "bigint") {
  24088. return (0, _generated.anyTypeAnnotation)();
  24089. } else {
  24090. throw new Error("Invalid typeof value: " + type);
  24091. }
  24092. }
  24093. }
  24094. });
  24095. // node_modules/estree-to-babel/node_modules/@babel/types/lib/modifications/flow/removeTypeDuplicates.js
  24096. var require_removeTypeDuplicates3 = __commonJS({
  24097. "node_modules/estree-to-babel/node_modules/@babel/types/lib/modifications/flow/removeTypeDuplicates.js"(exports) {
  24098. "use strict";
  24099. Object.defineProperty(exports, "__esModule", {
  24100. value: true
  24101. });
  24102. exports.default = removeTypeDuplicates;
  24103. var _generated = require_generated6();
  24104. function getQualifiedName(node) {
  24105. return (0, _generated.isIdentifier)(node) ? node.name : `${node.id.name}.${getQualifiedName(node.qualification)}`;
  24106. }
  24107. function removeTypeDuplicates(nodes) {
  24108. const generics = {};
  24109. const bases = {};
  24110. const typeGroups = [];
  24111. const types2 = [];
  24112. for (let i = 0; i < nodes.length; i++) {
  24113. const node = nodes[i];
  24114. if (!node)
  24115. continue;
  24116. if (types2.indexOf(node) >= 0) {
  24117. continue;
  24118. }
  24119. if ((0, _generated.isAnyTypeAnnotation)(node)) {
  24120. return [node];
  24121. }
  24122. if ((0, _generated.isFlowBaseAnnotation)(node)) {
  24123. bases[node.type] = node;
  24124. continue;
  24125. }
  24126. if ((0, _generated.isUnionTypeAnnotation)(node)) {
  24127. if (typeGroups.indexOf(node.types) < 0) {
  24128. nodes = nodes.concat(node.types);
  24129. typeGroups.push(node.types);
  24130. }
  24131. continue;
  24132. }
  24133. if ((0, _generated.isGenericTypeAnnotation)(node)) {
  24134. const name2 = getQualifiedName(node.id);
  24135. if (generics[name2]) {
  24136. let existing = generics[name2];
  24137. if (existing.typeParameters) {
  24138. if (node.typeParameters) {
  24139. existing.typeParameters.params = removeTypeDuplicates(existing.typeParameters.params.concat(node.typeParameters.params));
  24140. }
  24141. } else {
  24142. existing = node.typeParameters;
  24143. }
  24144. } else {
  24145. generics[name2] = node;
  24146. }
  24147. continue;
  24148. }
  24149. types2.push(node);
  24150. }
  24151. for (const type of Object.keys(bases)) {
  24152. types2.push(bases[type]);
  24153. }
  24154. for (const name2 of Object.keys(generics)) {
  24155. types2.push(generics[name2]);
  24156. }
  24157. return types2;
  24158. }
  24159. }
  24160. });
  24161. // node_modules/estree-to-babel/node_modules/@babel/types/lib/builders/flow/createFlowUnionType.js
  24162. var require_createFlowUnionType2 = __commonJS({
  24163. "node_modules/estree-to-babel/node_modules/@babel/types/lib/builders/flow/createFlowUnionType.js"(exports) {
  24164. "use strict";
  24165. Object.defineProperty(exports, "__esModule", {
  24166. value: true
  24167. });
  24168. exports.default = createFlowUnionType;
  24169. var _generated = require_generated7();
  24170. var _removeTypeDuplicates = require_removeTypeDuplicates3();
  24171. function createFlowUnionType(types2) {
  24172. const flattened = (0, _removeTypeDuplicates.default)(types2);
  24173. if (flattened.length === 1) {
  24174. return flattened[0];
  24175. } else {
  24176. return (0, _generated.unionTypeAnnotation)(flattened);
  24177. }
  24178. }
  24179. }
  24180. });
  24181. // node_modules/estree-to-babel/node_modules/@babel/types/lib/modifications/typescript/removeTypeDuplicates.js
  24182. var require_removeTypeDuplicates4 = __commonJS({
  24183. "node_modules/estree-to-babel/node_modules/@babel/types/lib/modifications/typescript/removeTypeDuplicates.js"(exports) {
  24184. "use strict";
  24185. Object.defineProperty(exports, "__esModule", {
  24186. value: true
  24187. });
  24188. exports.default = removeTypeDuplicates;
  24189. var _generated = require_generated6();
  24190. function removeTypeDuplicates(nodes) {
  24191. const generics = {};
  24192. const bases = {};
  24193. const typeGroups = [];
  24194. const types2 = [];
  24195. for (let i = 0; i < nodes.length; i++) {
  24196. const node = nodes[i];
  24197. if (!node)
  24198. continue;
  24199. if (types2.indexOf(node) >= 0) {
  24200. continue;
  24201. }
  24202. if ((0, _generated.isTSAnyKeyword)(node)) {
  24203. return [node];
  24204. }
  24205. if ((0, _generated.isTSBaseType)(node)) {
  24206. bases[node.type] = node;
  24207. continue;
  24208. }
  24209. if ((0, _generated.isTSUnionType)(node)) {
  24210. if (typeGroups.indexOf(node.types) < 0) {
  24211. nodes = nodes.concat(node.types);
  24212. typeGroups.push(node.types);
  24213. }
  24214. continue;
  24215. }
  24216. types2.push(node);
  24217. }
  24218. for (const type of Object.keys(bases)) {
  24219. types2.push(bases[type]);
  24220. }
  24221. for (const name2 of Object.keys(generics)) {
  24222. types2.push(generics[name2]);
  24223. }
  24224. return types2;
  24225. }
  24226. }
  24227. });
  24228. // node_modules/estree-to-babel/node_modules/@babel/types/lib/builders/typescript/createTSUnionType.js
  24229. var require_createTSUnionType2 = __commonJS({
  24230. "node_modules/estree-to-babel/node_modules/@babel/types/lib/builders/typescript/createTSUnionType.js"(exports) {
  24231. "use strict";
  24232. Object.defineProperty(exports, "__esModule", {
  24233. value: true
  24234. });
  24235. exports.default = createTSUnionType;
  24236. var _generated = require_generated7();
  24237. var _removeTypeDuplicates = require_removeTypeDuplicates4();
  24238. function createTSUnionType(typeAnnotations) {
  24239. const types2 = typeAnnotations.map((type) => type.typeAnnotation);
  24240. const flattened = (0, _removeTypeDuplicates.default)(types2);
  24241. if (flattened.length === 1) {
  24242. return flattened[0];
  24243. } else {
  24244. return (0, _generated.tsUnionType)(flattened);
  24245. }
  24246. }
  24247. }
  24248. });
  24249. // node_modules/estree-to-babel/node_modules/@babel/types/lib/builders/generated/uppercase.js
  24250. var require_uppercase2 = __commonJS({
  24251. "node_modules/estree-to-babel/node_modules/@babel/types/lib/builders/generated/uppercase.js"(exports) {
  24252. "use strict";
  24253. Object.defineProperty(exports, "__esModule", {
  24254. value: true
  24255. });
  24256. Object.defineProperty(exports, "ArrayExpression", {
  24257. enumerable: true,
  24258. get: function() {
  24259. return _index.arrayExpression;
  24260. }
  24261. });
  24262. Object.defineProperty(exports, "AssignmentExpression", {
  24263. enumerable: true,
  24264. get: function() {
  24265. return _index.assignmentExpression;
  24266. }
  24267. });
  24268. Object.defineProperty(exports, "BinaryExpression", {
  24269. enumerable: true,
  24270. get: function() {
  24271. return _index.binaryExpression;
  24272. }
  24273. });
  24274. Object.defineProperty(exports, "InterpreterDirective", {
  24275. enumerable: true,
  24276. get: function() {
  24277. return _index.interpreterDirective;
  24278. }
  24279. });
  24280. Object.defineProperty(exports, "Directive", {
  24281. enumerable: true,
  24282. get: function() {
  24283. return _index.directive;
  24284. }
  24285. });
  24286. Object.defineProperty(exports, "DirectiveLiteral", {
  24287. enumerable: true,
  24288. get: function() {
  24289. return _index.directiveLiteral;
  24290. }
  24291. });
  24292. Object.defineProperty(exports, "BlockStatement", {
  24293. enumerable: true,
  24294. get: function() {
  24295. return _index.blockStatement;
  24296. }
  24297. });
  24298. Object.defineProperty(exports, "BreakStatement", {
  24299. enumerable: true,
  24300. get: function() {
  24301. return _index.breakStatement;
  24302. }
  24303. });
  24304. Object.defineProperty(exports, "CallExpression", {
  24305. enumerable: true,
  24306. get: function() {
  24307. return _index.callExpression;
  24308. }
  24309. });
  24310. Object.defineProperty(exports, "CatchClause", {
  24311. enumerable: true,
  24312. get: function() {
  24313. return _index.catchClause;
  24314. }
  24315. });
  24316. Object.defineProperty(exports, "ConditionalExpression", {
  24317. enumerable: true,
  24318. get: function() {
  24319. return _index.conditionalExpression;
  24320. }
  24321. });
  24322. Object.defineProperty(exports, "ContinueStatement", {
  24323. enumerable: true,
  24324. get: function() {
  24325. return _index.continueStatement;
  24326. }
  24327. });
  24328. Object.defineProperty(exports, "DebuggerStatement", {
  24329. enumerable: true,
  24330. get: function() {
  24331. return _index.debuggerStatement;
  24332. }
  24333. });
  24334. Object.defineProperty(exports, "DoWhileStatement", {
  24335. enumerable: true,
  24336. get: function() {
  24337. return _index.doWhileStatement;
  24338. }
  24339. });
  24340. Object.defineProperty(exports, "EmptyStatement", {
  24341. enumerable: true,
  24342. get: function() {
  24343. return _index.emptyStatement;
  24344. }
  24345. });
  24346. Object.defineProperty(exports, "ExpressionStatement", {
  24347. enumerable: true,
  24348. get: function() {
  24349. return _index.expressionStatement;
  24350. }
  24351. });
  24352. Object.defineProperty(exports, "File", {
  24353. enumerable: true,
  24354. get: function() {
  24355. return _index.file;
  24356. }
  24357. });
  24358. Object.defineProperty(exports, "ForInStatement", {
  24359. enumerable: true,
  24360. get: function() {
  24361. return _index.forInStatement;
  24362. }
  24363. });
  24364. Object.defineProperty(exports, "ForStatement", {
  24365. enumerable: true,
  24366. get: function() {
  24367. return _index.forStatement;
  24368. }
  24369. });
  24370. Object.defineProperty(exports, "FunctionDeclaration", {
  24371. enumerable: true,
  24372. get: function() {
  24373. return _index.functionDeclaration;
  24374. }
  24375. });
  24376. Object.defineProperty(exports, "FunctionExpression", {
  24377. enumerable: true,
  24378. get: function() {
  24379. return _index.functionExpression;
  24380. }
  24381. });
  24382. Object.defineProperty(exports, "Identifier", {
  24383. enumerable: true,
  24384. get: function() {
  24385. return _index.identifier;
  24386. }
  24387. });
  24388. Object.defineProperty(exports, "IfStatement", {
  24389. enumerable: true,
  24390. get: function() {
  24391. return _index.ifStatement;
  24392. }
  24393. });
  24394. Object.defineProperty(exports, "LabeledStatement", {
  24395. enumerable: true,
  24396. get: function() {
  24397. return _index.labeledStatement;
  24398. }
  24399. });
  24400. Object.defineProperty(exports, "StringLiteral", {
  24401. enumerable: true,
  24402. get: function() {
  24403. return _index.stringLiteral;
  24404. }
  24405. });
  24406. Object.defineProperty(exports, "NumericLiteral", {
  24407. enumerable: true,
  24408. get: function() {
  24409. return _index.numericLiteral;
  24410. }
  24411. });
  24412. Object.defineProperty(exports, "NullLiteral", {
  24413. enumerable: true,
  24414. get: function() {
  24415. return _index.nullLiteral;
  24416. }
  24417. });
  24418. Object.defineProperty(exports, "BooleanLiteral", {
  24419. enumerable: true,
  24420. get: function() {
  24421. return _index.booleanLiteral;
  24422. }
  24423. });
  24424. Object.defineProperty(exports, "RegExpLiteral", {
  24425. enumerable: true,
  24426. get: function() {
  24427. return _index.regExpLiteral;
  24428. }
  24429. });
  24430. Object.defineProperty(exports, "LogicalExpression", {
  24431. enumerable: true,
  24432. get: function() {
  24433. return _index.logicalExpression;
  24434. }
  24435. });
  24436. Object.defineProperty(exports, "MemberExpression", {
  24437. enumerable: true,
  24438. get: function() {
  24439. return _index.memberExpression;
  24440. }
  24441. });
  24442. Object.defineProperty(exports, "NewExpression", {
  24443. enumerable: true,
  24444. get: function() {
  24445. return _index.newExpression;
  24446. }
  24447. });
  24448. Object.defineProperty(exports, "Program", {
  24449. enumerable: true,
  24450. get: function() {
  24451. return _index.program;
  24452. }
  24453. });
  24454. Object.defineProperty(exports, "ObjectExpression", {
  24455. enumerable: true,
  24456. get: function() {
  24457. return _index.objectExpression;
  24458. }
  24459. });
  24460. Object.defineProperty(exports, "ObjectMethod", {
  24461. enumerable: true,
  24462. get: function() {
  24463. return _index.objectMethod;
  24464. }
  24465. });
  24466. Object.defineProperty(exports, "ObjectProperty", {
  24467. enumerable: true,
  24468. get: function() {
  24469. return _index.objectProperty;
  24470. }
  24471. });
  24472. Object.defineProperty(exports, "RestElement", {
  24473. enumerable: true,
  24474. get: function() {
  24475. return _index.restElement;
  24476. }
  24477. });
  24478. Object.defineProperty(exports, "ReturnStatement", {
  24479. enumerable: true,
  24480. get: function() {
  24481. return _index.returnStatement;
  24482. }
  24483. });
  24484. Object.defineProperty(exports, "SequenceExpression", {
  24485. enumerable: true,
  24486. get: function() {
  24487. return _index.sequenceExpression;
  24488. }
  24489. });
  24490. Object.defineProperty(exports, "ParenthesizedExpression", {
  24491. enumerable: true,
  24492. get: function() {
  24493. return _index.parenthesizedExpression;
  24494. }
  24495. });
  24496. Object.defineProperty(exports, "SwitchCase", {
  24497. enumerable: true,
  24498. get: function() {
  24499. return _index.switchCase;
  24500. }
  24501. });
  24502. Object.defineProperty(exports, "SwitchStatement", {
  24503. enumerable: true,
  24504. get: function() {
  24505. return _index.switchStatement;
  24506. }
  24507. });
  24508. Object.defineProperty(exports, "ThisExpression", {
  24509. enumerable: true,
  24510. get: function() {
  24511. return _index.thisExpression;
  24512. }
  24513. });
  24514. Object.defineProperty(exports, "ThrowStatement", {
  24515. enumerable: true,
  24516. get: function() {
  24517. return _index.throwStatement;
  24518. }
  24519. });
  24520. Object.defineProperty(exports, "TryStatement", {
  24521. enumerable: true,
  24522. get: function() {
  24523. return _index.tryStatement;
  24524. }
  24525. });
  24526. Object.defineProperty(exports, "UnaryExpression", {
  24527. enumerable: true,
  24528. get: function() {
  24529. return _index.unaryExpression;
  24530. }
  24531. });
  24532. Object.defineProperty(exports, "UpdateExpression", {
  24533. enumerable: true,
  24534. get: function() {
  24535. return _index.updateExpression;
  24536. }
  24537. });
  24538. Object.defineProperty(exports, "VariableDeclaration", {
  24539. enumerable: true,
  24540. get: function() {
  24541. return _index.variableDeclaration;
  24542. }
  24543. });
  24544. Object.defineProperty(exports, "VariableDeclarator", {
  24545. enumerable: true,
  24546. get: function() {
  24547. return _index.variableDeclarator;
  24548. }
  24549. });
  24550. Object.defineProperty(exports, "WhileStatement", {
  24551. enumerable: true,
  24552. get: function() {
  24553. return _index.whileStatement;
  24554. }
  24555. });
  24556. Object.defineProperty(exports, "WithStatement", {
  24557. enumerable: true,
  24558. get: function() {
  24559. return _index.withStatement;
  24560. }
  24561. });
  24562. Object.defineProperty(exports, "AssignmentPattern", {
  24563. enumerable: true,
  24564. get: function() {
  24565. return _index.assignmentPattern;
  24566. }
  24567. });
  24568. Object.defineProperty(exports, "ArrayPattern", {
  24569. enumerable: true,
  24570. get: function() {
  24571. return _index.arrayPattern;
  24572. }
  24573. });
  24574. Object.defineProperty(exports, "ArrowFunctionExpression", {
  24575. enumerable: true,
  24576. get: function() {
  24577. return _index.arrowFunctionExpression;
  24578. }
  24579. });
  24580. Object.defineProperty(exports, "ClassBody", {
  24581. enumerable: true,
  24582. get: function() {
  24583. return _index.classBody;
  24584. }
  24585. });
  24586. Object.defineProperty(exports, "ClassExpression", {
  24587. enumerable: true,
  24588. get: function() {
  24589. return _index.classExpression;
  24590. }
  24591. });
  24592. Object.defineProperty(exports, "ClassDeclaration", {
  24593. enumerable: true,
  24594. get: function() {
  24595. return _index.classDeclaration;
  24596. }
  24597. });
  24598. Object.defineProperty(exports, "ExportAllDeclaration", {
  24599. enumerable: true,
  24600. get: function() {
  24601. return _index.exportAllDeclaration;
  24602. }
  24603. });
  24604. Object.defineProperty(exports, "ExportDefaultDeclaration", {
  24605. enumerable: true,
  24606. get: function() {
  24607. return _index.exportDefaultDeclaration;
  24608. }
  24609. });
  24610. Object.defineProperty(exports, "ExportNamedDeclaration", {
  24611. enumerable: true,
  24612. get: function() {
  24613. return _index.exportNamedDeclaration;
  24614. }
  24615. });
  24616. Object.defineProperty(exports, "ExportSpecifier", {
  24617. enumerable: true,
  24618. get: function() {
  24619. return _index.exportSpecifier;
  24620. }
  24621. });
  24622. Object.defineProperty(exports, "ForOfStatement", {
  24623. enumerable: true,
  24624. get: function() {
  24625. return _index.forOfStatement;
  24626. }
  24627. });
  24628. Object.defineProperty(exports, "ImportDeclaration", {
  24629. enumerable: true,
  24630. get: function() {
  24631. return _index.importDeclaration;
  24632. }
  24633. });
  24634. Object.defineProperty(exports, "ImportDefaultSpecifier", {
  24635. enumerable: true,
  24636. get: function() {
  24637. return _index.importDefaultSpecifier;
  24638. }
  24639. });
  24640. Object.defineProperty(exports, "ImportNamespaceSpecifier", {
  24641. enumerable: true,
  24642. get: function() {
  24643. return _index.importNamespaceSpecifier;
  24644. }
  24645. });
  24646. Object.defineProperty(exports, "ImportSpecifier", {
  24647. enumerable: true,
  24648. get: function() {
  24649. return _index.importSpecifier;
  24650. }
  24651. });
  24652. Object.defineProperty(exports, "MetaProperty", {
  24653. enumerable: true,
  24654. get: function() {
  24655. return _index.metaProperty;
  24656. }
  24657. });
  24658. Object.defineProperty(exports, "ClassMethod", {
  24659. enumerable: true,
  24660. get: function() {
  24661. return _index.classMethod;
  24662. }
  24663. });
  24664. Object.defineProperty(exports, "ObjectPattern", {
  24665. enumerable: true,
  24666. get: function() {
  24667. return _index.objectPattern;
  24668. }
  24669. });
  24670. Object.defineProperty(exports, "SpreadElement", {
  24671. enumerable: true,
  24672. get: function() {
  24673. return _index.spreadElement;
  24674. }
  24675. });
  24676. Object.defineProperty(exports, "Super", {
  24677. enumerable: true,
  24678. get: function() {
  24679. return _index.super;
  24680. }
  24681. });
  24682. Object.defineProperty(exports, "TaggedTemplateExpression", {
  24683. enumerable: true,
  24684. get: function() {
  24685. return _index.taggedTemplateExpression;
  24686. }
  24687. });
  24688. Object.defineProperty(exports, "TemplateElement", {
  24689. enumerable: true,
  24690. get: function() {
  24691. return _index.templateElement;
  24692. }
  24693. });
  24694. Object.defineProperty(exports, "TemplateLiteral", {
  24695. enumerable: true,
  24696. get: function() {
  24697. return _index.templateLiteral;
  24698. }
  24699. });
  24700. Object.defineProperty(exports, "YieldExpression", {
  24701. enumerable: true,
  24702. get: function() {
  24703. return _index.yieldExpression;
  24704. }
  24705. });
  24706. Object.defineProperty(exports, "AwaitExpression", {
  24707. enumerable: true,
  24708. get: function() {
  24709. return _index.awaitExpression;
  24710. }
  24711. });
  24712. Object.defineProperty(exports, "Import", {
  24713. enumerable: true,
  24714. get: function() {
  24715. return _index.import;
  24716. }
  24717. });
  24718. Object.defineProperty(exports, "BigIntLiteral", {
  24719. enumerable: true,
  24720. get: function() {
  24721. return _index.bigIntLiteral;
  24722. }
  24723. });
  24724. Object.defineProperty(exports, "ExportNamespaceSpecifier", {
  24725. enumerable: true,
  24726. get: function() {
  24727. return _index.exportNamespaceSpecifier;
  24728. }
  24729. });
  24730. Object.defineProperty(exports, "OptionalMemberExpression", {
  24731. enumerable: true,
  24732. get: function() {
  24733. return _index.optionalMemberExpression;
  24734. }
  24735. });
  24736. Object.defineProperty(exports, "OptionalCallExpression", {
  24737. enumerable: true,
  24738. get: function() {
  24739. return _index.optionalCallExpression;
  24740. }
  24741. });
  24742. Object.defineProperty(exports, "AnyTypeAnnotation", {
  24743. enumerable: true,
  24744. get: function() {
  24745. return _index.anyTypeAnnotation;
  24746. }
  24747. });
  24748. Object.defineProperty(exports, "ArrayTypeAnnotation", {
  24749. enumerable: true,
  24750. get: function() {
  24751. return _index.arrayTypeAnnotation;
  24752. }
  24753. });
  24754. Object.defineProperty(exports, "BooleanTypeAnnotation", {
  24755. enumerable: true,
  24756. get: function() {
  24757. return _index.booleanTypeAnnotation;
  24758. }
  24759. });
  24760. Object.defineProperty(exports, "BooleanLiteralTypeAnnotation", {
  24761. enumerable: true,
  24762. get: function() {
  24763. return _index.booleanLiteralTypeAnnotation;
  24764. }
  24765. });
  24766. Object.defineProperty(exports, "NullLiteralTypeAnnotation", {
  24767. enumerable: true,
  24768. get: function() {
  24769. return _index.nullLiteralTypeAnnotation;
  24770. }
  24771. });
  24772. Object.defineProperty(exports, "ClassImplements", {
  24773. enumerable: true,
  24774. get: function() {
  24775. return _index.classImplements;
  24776. }
  24777. });
  24778. Object.defineProperty(exports, "DeclareClass", {
  24779. enumerable: true,
  24780. get: function() {
  24781. return _index.declareClass;
  24782. }
  24783. });
  24784. Object.defineProperty(exports, "DeclareFunction", {
  24785. enumerable: true,
  24786. get: function() {
  24787. return _index.declareFunction;
  24788. }
  24789. });
  24790. Object.defineProperty(exports, "DeclareInterface", {
  24791. enumerable: true,
  24792. get: function() {
  24793. return _index.declareInterface;
  24794. }
  24795. });
  24796. Object.defineProperty(exports, "DeclareModule", {
  24797. enumerable: true,
  24798. get: function() {
  24799. return _index.declareModule;
  24800. }
  24801. });
  24802. Object.defineProperty(exports, "DeclareModuleExports", {
  24803. enumerable: true,
  24804. get: function() {
  24805. return _index.declareModuleExports;
  24806. }
  24807. });
  24808. Object.defineProperty(exports, "DeclareTypeAlias", {
  24809. enumerable: true,
  24810. get: function() {
  24811. return _index.declareTypeAlias;
  24812. }
  24813. });
  24814. Object.defineProperty(exports, "DeclareOpaqueType", {
  24815. enumerable: true,
  24816. get: function() {
  24817. return _index.declareOpaqueType;
  24818. }
  24819. });
  24820. Object.defineProperty(exports, "DeclareVariable", {
  24821. enumerable: true,
  24822. get: function() {
  24823. return _index.declareVariable;
  24824. }
  24825. });
  24826. Object.defineProperty(exports, "DeclareExportDeclaration", {
  24827. enumerable: true,
  24828. get: function() {
  24829. return _index.declareExportDeclaration;
  24830. }
  24831. });
  24832. Object.defineProperty(exports, "DeclareExportAllDeclaration", {
  24833. enumerable: true,
  24834. get: function() {
  24835. return _index.declareExportAllDeclaration;
  24836. }
  24837. });
  24838. Object.defineProperty(exports, "DeclaredPredicate", {
  24839. enumerable: true,
  24840. get: function() {
  24841. return _index.declaredPredicate;
  24842. }
  24843. });
  24844. Object.defineProperty(exports, "ExistsTypeAnnotation", {
  24845. enumerable: true,
  24846. get: function() {
  24847. return _index.existsTypeAnnotation;
  24848. }
  24849. });
  24850. Object.defineProperty(exports, "FunctionTypeAnnotation", {
  24851. enumerable: true,
  24852. get: function() {
  24853. return _index.functionTypeAnnotation;
  24854. }
  24855. });
  24856. Object.defineProperty(exports, "FunctionTypeParam", {
  24857. enumerable: true,
  24858. get: function() {
  24859. return _index.functionTypeParam;
  24860. }
  24861. });
  24862. Object.defineProperty(exports, "GenericTypeAnnotation", {
  24863. enumerable: true,
  24864. get: function() {
  24865. return _index.genericTypeAnnotation;
  24866. }
  24867. });
  24868. Object.defineProperty(exports, "InferredPredicate", {
  24869. enumerable: true,
  24870. get: function() {
  24871. return _index.inferredPredicate;
  24872. }
  24873. });
  24874. Object.defineProperty(exports, "InterfaceExtends", {
  24875. enumerable: true,
  24876. get: function() {
  24877. return _index.interfaceExtends;
  24878. }
  24879. });
  24880. Object.defineProperty(exports, "InterfaceDeclaration", {
  24881. enumerable: true,
  24882. get: function() {
  24883. return _index.interfaceDeclaration;
  24884. }
  24885. });
  24886. Object.defineProperty(exports, "InterfaceTypeAnnotation", {
  24887. enumerable: true,
  24888. get: function() {
  24889. return _index.interfaceTypeAnnotation;
  24890. }
  24891. });
  24892. Object.defineProperty(exports, "IntersectionTypeAnnotation", {
  24893. enumerable: true,
  24894. get: function() {
  24895. return _index.intersectionTypeAnnotation;
  24896. }
  24897. });
  24898. Object.defineProperty(exports, "MixedTypeAnnotation", {
  24899. enumerable: true,
  24900. get: function() {
  24901. return _index.mixedTypeAnnotation;
  24902. }
  24903. });
  24904. Object.defineProperty(exports, "EmptyTypeAnnotation", {
  24905. enumerable: true,
  24906. get: function() {
  24907. return _index.emptyTypeAnnotation;
  24908. }
  24909. });
  24910. Object.defineProperty(exports, "NullableTypeAnnotation", {
  24911. enumerable: true,
  24912. get: function() {
  24913. return _index.nullableTypeAnnotation;
  24914. }
  24915. });
  24916. Object.defineProperty(exports, "NumberLiteralTypeAnnotation", {
  24917. enumerable: true,
  24918. get: function() {
  24919. return _index.numberLiteralTypeAnnotation;
  24920. }
  24921. });
  24922. Object.defineProperty(exports, "NumberTypeAnnotation", {
  24923. enumerable: true,
  24924. get: function() {
  24925. return _index.numberTypeAnnotation;
  24926. }
  24927. });
  24928. Object.defineProperty(exports, "ObjectTypeAnnotation", {
  24929. enumerable: true,
  24930. get: function() {
  24931. return _index.objectTypeAnnotation;
  24932. }
  24933. });
  24934. Object.defineProperty(exports, "ObjectTypeInternalSlot", {
  24935. enumerable: true,
  24936. get: function() {
  24937. return _index.objectTypeInternalSlot;
  24938. }
  24939. });
  24940. Object.defineProperty(exports, "ObjectTypeCallProperty", {
  24941. enumerable: true,
  24942. get: function() {
  24943. return _index.objectTypeCallProperty;
  24944. }
  24945. });
  24946. Object.defineProperty(exports, "ObjectTypeIndexer", {
  24947. enumerable: true,
  24948. get: function() {
  24949. return _index.objectTypeIndexer;
  24950. }
  24951. });
  24952. Object.defineProperty(exports, "ObjectTypeProperty", {
  24953. enumerable: true,
  24954. get: function() {
  24955. return _index.objectTypeProperty;
  24956. }
  24957. });
  24958. Object.defineProperty(exports, "ObjectTypeSpreadProperty", {
  24959. enumerable: true,
  24960. get: function() {
  24961. return _index.objectTypeSpreadProperty;
  24962. }
  24963. });
  24964. Object.defineProperty(exports, "OpaqueType", {
  24965. enumerable: true,
  24966. get: function() {
  24967. return _index.opaqueType;
  24968. }
  24969. });
  24970. Object.defineProperty(exports, "QualifiedTypeIdentifier", {
  24971. enumerable: true,
  24972. get: function() {
  24973. return _index.qualifiedTypeIdentifier;
  24974. }
  24975. });
  24976. Object.defineProperty(exports, "StringLiteralTypeAnnotation", {
  24977. enumerable: true,
  24978. get: function() {
  24979. return _index.stringLiteralTypeAnnotation;
  24980. }
  24981. });
  24982. Object.defineProperty(exports, "StringTypeAnnotation", {
  24983. enumerable: true,
  24984. get: function() {
  24985. return _index.stringTypeAnnotation;
  24986. }
  24987. });
  24988. Object.defineProperty(exports, "SymbolTypeAnnotation", {
  24989. enumerable: true,
  24990. get: function() {
  24991. return _index.symbolTypeAnnotation;
  24992. }
  24993. });
  24994. Object.defineProperty(exports, "ThisTypeAnnotation", {
  24995. enumerable: true,
  24996. get: function() {
  24997. return _index.thisTypeAnnotation;
  24998. }
  24999. });
  25000. Object.defineProperty(exports, "TupleTypeAnnotation", {
  25001. enumerable: true,
  25002. get: function() {
  25003. return _index.tupleTypeAnnotation;
  25004. }
  25005. });
  25006. Object.defineProperty(exports, "TypeofTypeAnnotation", {
  25007. enumerable: true,
  25008. get: function() {
  25009. return _index.typeofTypeAnnotation;
  25010. }
  25011. });
  25012. Object.defineProperty(exports, "TypeAlias", {
  25013. enumerable: true,
  25014. get: function() {
  25015. return _index.typeAlias;
  25016. }
  25017. });
  25018. Object.defineProperty(exports, "TypeAnnotation", {
  25019. enumerable: true,
  25020. get: function() {
  25021. return _index.typeAnnotation;
  25022. }
  25023. });
  25024. Object.defineProperty(exports, "TypeCastExpression", {
  25025. enumerable: true,
  25026. get: function() {
  25027. return _index.typeCastExpression;
  25028. }
  25029. });
  25030. Object.defineProperty(exports, "TypeParameter", {
  25031. enumerable: true,
  25032. get: function() {
  25033. return _index.typeParameter;
  25034. }
  25035. });
  25036. Object.defineProperty(exports, "TypeParameterDeclaration", {
  25037. enumerable: true,
  25038. get: function() {
  25039. return _index.typeParameterDeclaration;
  25040. }
  25041. });
  25042. Object.defineProperty(exports, "TypeParameterInstantiation", {
  25043. enumerable: true,
  25044. get: function() {
  25045. return _index.typeParameterInstantiation;
  25046. }
  25047. });
  25048. Object.defineProperty(exports, "UnionTypeAnnotation", {
  25049. enumerable: true,
  25050. get: function() {
  25051. return _index.unionTypeAnnotation;
  25052. }
  25053. });
  25054. Object.defineProperty(exports, "Variance", {
  25055. enumerable: true,
  25056. get: function() {
  25057. return _index.variance;
  25058. }
  25059. });
  25060. Object.defineProperty(exports, "VoidTypeAnnotation", {
  25061. enumerable: true,
  25062. get: function() {
  25063. return _index.voidTypeAnnotation;
  25064. }
  25065. });
  25066. Object.defineProperty(exports, "EnumDeclaration", {
  25067. enumerable: true,
  25068. get: function() {
  25069. return _index.enumDeclaration;
  25070. }
  25071. });
  25072. Object.defineProperty(exports, "EnumBooleanBody", {
  25073. enumerable: true,
  25074. get: function() {
  25075. return _index.enumBooleanBody;
  25076. }
  25077. });
  25078. Object.defineProperty(exports, "EnumNumberBody", {
  25079. enumerable: true,
  25080. get: function() {
  25081. return _index.enumNumberBody;
  25082. }
  25083. });
  25084. Object.defineProperty(exports, "EnumStringBody", {
  25085. enumerable: true,
  25086. get: function() {
  25087. return _index.enumStringBody;
  25088. }
  25089. });
  25090. Object.defineProperty(exports, "EnumSymbolBody", {
  25091. enumerable: true,
  25092. get: function() {
  25093. return _index.enumSymbolBody;
  25094. }
  25095. });
  25096. Object.defineProperty(exports, "EnumBooleanMember", {
  25097. enumerable: true,
  25098. get: function() {
  25099. return _index.enumBooleanMember;
  25100. }
  25101. });
  25102. Object.defineProperty(exports, "EnumNumberMember", {
  25103. enumerable: true,
  25104. get: function() {
  25105. return _index.enumNumberMember;
  25106. }
  25107. });
  25108. Object.defineProperty(exports, "EnumStringMember", {
  25109. enumerable: true,
  25110. get: function() {
  25111. return _index.enumStringMember;
  25112. }
  25113. });
  25114. Object.defineProperty(exports, "EnumDefaultedMember", {
  25115. enumerable: true,
  25116. get: function() {
  25117. return _index.enumDefaultedMember;
  25118. }
  25119. });
  25120. Object.defineProperty(exports, "IndexedAccessType", {
  25121. enumerable: true,
  25122. get: function() {
  25123. return _index.indexedAccessType;
  25124. }
  25125. });
  25126. Object.defineProperty(exports, "OptionalIndexedAccessType", {
  25127. enumerable: true,
  25128. get: function() {
  25129. return _index.optionalIndexedAccessType;
  25130. }
  25131. });
  25132. Object.defineProperty(exports, "JSXAttribute", {
  25133. enumerable: true,
  25134. get: function() {
  25135. return _index.jsxAttribute;
  25136. }
  25137. });
  25138. Object.defineProperty(exports, "JSXClosingElement", {
  25139. enumerable: true,
  25140. get: function() {
  25141. return _index.jsxClosingElement;
  25142. }
  25143. });
  25144. Object.defineProperty(exports, "JSXElement", {
  25145. enumerable: true,
  25146. get: function() {
  25147. return _index.jsxElement;
  25148. }
  25149. });
  25150. Object.defineProperty(exports, "JSXEmptyExpression", {
  25151. enumerable: true,
  25152. get: function() {
  25153. return _index.jsxEmptyExpression;
  25154. }
  25155. });
  25156. Object.defineProperty(exports, "JSXExpressionContainer", {
  25157. enumerable: true,
  25158. get: function() {
  25159. return _index.jsxExpressionContainer;
  25160. }
  25161. });
  25162. Object.defineProperty(exports, "JSXSpreadChild", {
  25163. enumerable: true,
  25164. get: function() {
  25165. return _index.jsxSpreadChild;
  25166. }
  25167. });
  25168. Object.defineProperty(exports, "JSXIdentifier", {
  25169. enumerable: true,
  25170. get: function() {
  25171. return _index.jsxIdentifier;
  25172. }
  25173. });
  25174. Object.defineProperty(exports, "JSXMemberExpression", {
  25175. enumerable: true,
  25176. get: function() {
  25177. return _index.jsxMemberExpression;
  25178. }
  25179. });
  25180. Object.defineProperty(exports, "JSXNamespacedName", {
  25181. enumerable: true,
  25182. get: function() {
  25183. return _index.jsxNamespacedName;
  25184. }
  25185. });
  25186. Object.defineProperty(exports, "JSXOpeningElement", {
  25187. enumerable: true,
  25188. get: function() {
  25189. return _index.jsxOpeningElement;
  25190. }
  25191. });
  25192. Object.defineProperty(exports, "JSXSpreadAttribute", {
  25193. enumerable: true,
  25194. get: function() {
  25195. return _index.jsxSpreadAttribute;
  25196. }
  25197. });
  25198. Object.defineProperty(exports, "JSXText", {
  25199. enumerable: true,
  25200. get: function() {
  25201. return _index.jsxText;
  25202. }
  25203. });
  25204. Object.defineProperty(exports, "JSXFragment", {
  25205. enumerable: true,
  25206. get: function() {
  25207. return _index.jsxFragment;
  25208. }
  25209. });
  25210. Object.defineProperty(exports, "JSXOpeningFragment", {
  25211. enumerable: true,
  25212. get: function() {
  25213. return _index.jsxOpeningFragment;
  25214. }
  25215. });
  25216. Object.defineProperty(exports, "JSXClosingFragment", {
  25217. enumerable: true,
  25218. get: function() {
  25219. return _index.jsxClosingFragment;
  25220. }
  25221. });
  25222. Object.defineProperty(exports, "Noop", {
  25223. enumerable: true,
  25224. get: function() {
  25225. return _index.noop;
  25226. }
  25227. });
  25228. Object.defineProperty(exports, "Placeholder", {
  25229. enumerable: true,
  25230. get: function() {
  25231. return _index.placeholder;
  25232. }
  25233. });
  25234. Object.defineProperty(exports, "V8IntrinsicIdentifier", {
  25235. enumerable: true,
  25236. get: function() {
  25237. return _index.v8IntrinsicIdentifier;
  25238. }
  25239. });
  25240. Object.defineProperty(exports, "ArgumentPlaceholder", {
  25241. enumerable: true,
  25242. get: function() {
  25243. return _index.argumentPlaceholder;
  25244. }
  25245. });
  25246. Object.defineProperty(exports, "BindExpression", {
  25247. enumerable: true,
  25248. get: function() {
  25249. return _index.bindExpression;
  25250. }
  25251. });
  25252. Object.defineProperty(exports, "ClassProperty", {
  25253. enumerable: true,
  25254. get: function() {
  25255. return _index.classProperty;
  25256. }
  25257. });
  25258. Object.defineProperty(exports, "PipelineTopicExpression", {
  25259. enumerable: true,
  25260. get: function() {
  25261. return _index.pipelineTopicExpression;
  25262. }
  25263. });
  25264. Object.defineProperty(exports, "PipelineBareFunction", {
  25265. enumerable: true,
  25266. get: function() {
  25267. return _index.pipelineBareFunction;
  25268. }
  25269. });
  25270. Object.defineProperty(exports, "PipelinePrimaryTopicReference", {
  25271. enumerable: true,
  25272. get: function() {
  25273. return _index.pipelinePrimaryTopicReference;
  25274. }
  25275. });
  25276. Object.defineProperty(exports, "ClassPrivateProperty", {
  25277. enumerable: true,
  25278. get: function() {
  25279. return _index.classPrivateProperty;
  25280. }
  25281. });
  25282. Object.defineProperty(exports, "ClassPrivateMethod", {
  25283. enumerable: true,
  25284. get: function() {
  25285. return _index.classPrivateMethod;
  25286. }
  25287. });
  25288. Object.defineProperty(exports, "ImportAttribute", {
  25289. enumerable: true,
  25290. get: function() {
  25291. return _index.importAttribute;
  25292. }
  25293. });
  25294. Object.defineProperty(exports, "Decorator", {
  25295. enumerable: true,
  25296. get: function() {
  25297. return _index.decorator;
  25298. }
  25299. });
  25300. Object.defineProperty(exports, "DoExpression", {
  25301. enumerable: true,
  25302. get: function() {
  25303. return _index.doExpression;
  25304. }
  25305. });
  25306. Object.defineProperty(exports, "ExportDefaultSpecifier", {
  25307. enumerable: true,
  25308. get: function() {
  25309. return _index.exportDefaultSpecifier;
  25310. }
  25311. });
  25312. Object.defineProperty(exports, "PrivateName", {
  25313. enumerable: true,
  25314. get: function() {
  25315. return _index.privateName;
  25316. }
  25317. });
  25318. Object.defineProperty(exports, "RecordExpression", {
  25319. enumerable: true,
  25320. get: function() {
  25321. return _index.recordExpression;
  25322. }
  25323. });
  25324. Object.defineProperty(exports, "TupleExpression", {
  25325. enumerable: true,
  25326. get: function() {
  25327. return _index.tupleExpression;
  25328. }
  25329. });
  25330. Object.defineProperty(exports, "DecimalLiteral", {
  25331. enumerable: true,
  25332. get: function() {
  25333. return _index.decimalLiteral;
  25334. }
  25335. });
  25336. Object.defineProperty(exports, "StaticBlock", {
  25337. enumerable: true,
  25338. get: function() {
  25339. return _index.staticBlock;
  25340. }
  25341. });
  25342. Object.defineProperty(exports, "ModuleExpression", {
  25343. enumerable: true,
  25344. get: function() {
  25345. return _index.moduleExpression;
  25346. }
  25347. });
  25348. Object.defineProperty(exports, "TSParameterProperty", {
  25349. enumerable: true,
  25350. get: function() {
  25351. return _index.tsParameterProperty;
  25352. }
  25353. });
  25354. Object.defineProperty(exports, "TSDeclareFunction", {
  25355. enumerable: true,
  25356. get: function() {
  25357. return _index.tsDeclareFunction;
  25358. }
  25359. });
  25360. Object.defineProperty(exports, "TSDeclareMethod", {
  25361. enumerable: true,
  25362. get: function() {
  25363. return _index.tsDeclareMethod;
  25364. }
  25365. });
  25366. Object.defineProperty(exports, "TSQualifiedName", {
  25367. enumerable: true,
  25368. get: function() {
  25369. return _index.tsQualifiedName;
  25370. }
  25371. });
  25372. Object.defineProperty(exports, "TSCallSignatureDeclaration", {
  25373. enumerable: true,
  25374. get: function() {
  25375. return _index.tsCallSignatureDeclaration;
  25376. }
  25377. });
  25378. Object.defineProperty(exports, "TSConstructSignatureDeclaration", {
  25379. enumerable: true,
  25380. get: function() {
  25381. return _index.tsConstructSignatureDeclaration;
  25382. }
  25383. });
  25384. Object.defineProperty(exports, "TSPropertySignature", {
  25385. enumerable: true,
  25386. get: function() {
  25387. return _index.tsPropertySignature;
  25388. }
  25389. });
  25390. Object.defineProperty(exports, "TSMethodSignature", {
  25391. enumerable: true,
  25392. get: function() {
  25393. return _index.tsMethodSignature;
  25394. }
  25395. });
  25396. Object.defineProperty(exports, "TSIndexSignature", {
  25397. enumerable: true,
  25398. get: function() {
  25399. return _index.tsIndexSignature;
  25400. }
  25401. });
  25402. Object.defineProperty(exports, "TSAnyKeyword", {
  25403. enumerable: true,
  25404. get: function() {
  25405. return _index.tsAnyKeyword;
  25406. }
  25407. });
  25408. Object.defineProperty(exports, "TSBooleanKeyword", {
  25409. enumerable: true,
  25410. get: function() {
  25411. return _index.tsBooleanKeyword;
  25412. }
  25413. });
  25414. Object.defineProperty(exports, "TSBigIntKeyword", {
  25415. enumerable: true,
  25416. get: function() {
  25417. return _index.tsBigIntKeyword;
  25418. }
  25419. });
  25420. Object.defineProperty(exports, "TSIntrinsicKeyword", {
  25421. enumerable: true,
  25422. get: function() {
  25423. return _index.tsIntrinsicKeyword;
  25424. }
  25425. });
  25426. Object.defineProperty(exports, "TSNeverKeyword", {
  25427. enumerable: true,
  25428. get: function() {
  25429. return _index.tsNeverKeyword;
  25430. }
  25431. });
  25432. Object.defineProperty(exports, "TSNullKeyword", {
  25433. enumerable: true,
  25434. get: function() {
  25435. return _index.tsNullKeyword;
  25436. }
  25437. });
  25438. Object.defineProperty(exports, "TSNumberKeyword", {
  25439. enumerable: true,
  25440. get: function() {
  25441. return _index.tsNumberKeyword;
  25442. }
  25443. });
  25444. Object.defineProperty(exports, "TSObjectKeyword", {
  25445. enumerable: true,
  25446. get: function() {
  25447. return _index.tsObjectKeyword;
  25448. }
  25449. });
  25450. Object.defineProperty(exports, "TSStringKeyword", {
  25451. enumerable: true,
  25452. get: function() {
  25453. return _index.tsStringKeyword;
  25454. }
  25455. });
  25456. Object.defineProperty(exports, "TSSymbolKeyword", {
  25457. enumerable: true,
  25458. get: function() {
  25459. return _index.tsSymbolKeyword;
  25460. }
  25461. });
  25462. Object.defineProperty(exports, "TSUndefinedKeyword", {
  25463. enumerable: true,
  25464. get: function() {
  25465. return _index.tsUndefinedKeyword;
  25466. }
  25467. });
  25468. Object.defineProperty(exports, "TSUnknownKeyword", {
  25469. enumerable: true,
  25470. get: function() {
  25471. return _index.tsUnknownKeyword;
  25472. }
  25473. });
  25474. Object.defineProperty(exports, "TSVoidKeyword", {
  25475. enumerable: true,
  25476. get: function() {
  25477. return _index.tsVoidKeyword;
  25478. }
  25479. });
  25480. Object.defineProperty(exports, "TSThisType", {
  25481. enumerable: true,
  25482. get: function() {
  25483. return _index.tsThisType;
  25484. }
  25485. });
  25486. Object.defineProperty(exports, "TSFunctionType", {
  25487. enumerable: true,
  25488. get: function() {
  25489. return _index.tsFunctionType;
  25490. }
  25491. });
  25492. Object.defineProperty(exports, "TSConstructorType", {
  25493. enumerable: true,
  25494. get: function() {
  25495. return _index.tsConstructorType;
  25496. }
  25497. });
  25498. Object.defineProperty(exports, "TSTypeReference", {
  25499. enumerable: true,
  25500. get: function() {
  25501. return _index.tsTypeReference;
  25502. }
  25503. });
  25504. Object.defineProperty(exports, "TSTypePredicate", {
  25505. enumerable: true,
  25506. get: function() {
  25507. return _index.tsTypePredicate;
  25508. }
  25509. });
  25510. Object.defineProperty(exports, "TSTypeQuery", {
  25511. enumerable: true,
  25512. get: function() {
  25513. return _index.tsTypeQuery;
  25514. }
  25515. });
  25516. Object.defineProperty(exports, "TSTypeLiteral", {
  25517. enumerable: true,
  25518. get: function() {
  25519. return _index.tsTypeLiteral;
  25520. }
  25521. });
  25522. Object.defineProperty(exports, "TSArrayType", {
  25523. enumerable: true,
  25524. get: function() {
  25525. return _index.tsArrayType;
  25526. }
  25527. });
  25528. Object.defineProperty(exports, "TSTupleType", {
  25529. enumerable: true,
  25530. get: function() {
  25531. return _index.tsTupleType;
  25532. }
  25533. });
  25534. Object.defineProperty(exports, "TSOptionalType", {
  25535. enumerable: true,
  25536. get: function() {
  25537. return _index.tsOptionalType;
  25538. }
  25539. });
  25540. Object.defineProperty(exports, "TSRestType", {
  25541. enumerable: true,
  25542. get: function() {
  25543. return _index.tsRestType;
  25544. }
  25545. });
  25546. Object.defineProperty(exports, "TSNamedTupleMember", {
  25547. enumerable: true,
  25548. get: function() {
  25549. return _index.tsNamedTupleMember;
  25550. }
  25551. });
  25552. Object.defineProperty(exports, "TSUnionType", {
  25553. enumerable: true,
  25554. get: function() {
  25555. return _index.tsUnionType;
  25556. }
  25557. });
  25558. Object.defineProperty(exports, "TSIntersectionType", {
  25559. enumerable: true,
  25560. get: function() {
  25561. return _index.tsIntersectionType;
  25562. }
  25563. });
  25564. Object.defineProperty(exports, "TSConditionalType", {
  25565. enumerable: true,
  25566. get: function() {
  25567. return _index.tsConditionalType;
  25568. }
  25569. });
  25570. Object.defineProperty(exports, "TSInferType", {
  25571. enumerable: true,
  25572. get: function() {
  25573. return _index.tsInferType;
  25574. }
  25575. });
  25576. Object.defineProperty(exports, "TSParenthesizedType", {
  25577. enumerable: true,
  25578. get: function() {
  25579. return _index.tsParenthesizedType;
  25580. }
  25581. });
  25582. Object.defineProperty(exports, "TSTypeOperator", {
  25583. enumerable: true,
  25584. get: function() {
  25585. return _index.tsTypeOperator;
  25586. }
  25587. });
  25588. Object.defineProperty(exports, "TSIndexedAccessType", {
  25589. enumerable: true,
  25590. get: function() {
  25591. return _index.tsIndexedAccessType;
  25592. }
  25593. });
  25594. Object.defineProperty(exports, "TSMappedType", {
  25595. enumerable: true,
  25596. get: function() {
  25597. return _index.tsMappedType;
  25598. }
  25599. });
  25600. Object.defineProperty(exports, "TSLiteralType", {
  25601. enumerable: true,
  25602. get: function() {
  25603. return _index.tsLiteralType;
  25604. }
  25605. });
  25606. Object.defineProperty(exports, "TSExpressionWithTypeArguments", {
  25607. enumerable: true,
  25608. get: function() {
  25609. return _index.tsExpressionWithTypeArguments;
  25610. }
  25611. });
  25612. Object.defineProperty(exports, "TSInterfaceDeclaration", {
  25613. enumerable: true,
  25614. get: function() {
  25615. return _index.tsInterfaceDeclaration;
  25616. }
  25617. });
  25618. Object.defineProperty(exports, "TSInterfaceBody", {
  25619. enumerable: true,
  25620. get: function() {
  25621. return _index.tsInterfaceBody;
  25622. }
  25623. });
  25624. Object.defineProperty(exports, "TSTypeAliasDeclaration", {
  25625. enumerable: true,
  25626. get: function() {
  25627. return _index.tsTypeAliasDeclaration;
  25628. }
  25629. });
  25630. Object.defineProperty(exports, "TSAsExpression", {
  25631. enumerable: true,
  25632. get: function() {
  25633. return _index.tsAsExpression;
  25634. }
  25635. });
  25636. Object.defineProperty(exports, "TSTypeAssertion", {
  25637. enumerable: true,
  25638. get: function() {
  25639. return _index.tsTypeAssertion;
  25640. }
  25641. });
  25642. Object.defineProperty(exports, "TSEnumDeclaration", {
  25643. enumerable: true,
  25644. get: function() {
  25645. return _index.tsEnumDeclaration;
  25646. }
  25647. });
  25648. Object.defineProperty(exports, "TSEnumMember", {
  25649. enumerable: true,
  25650. get: function() {
  25651. return _index.tsEnumMember;
  25652. }
  25653. });
  25654. Object.defineProperty(exports, "TSModuleDeclaration", {
  25655. enumerable: true,
  25656. get: function() {
  25657. return _index.tsModuleDeclaration;
  25658. }
  25659. });
  25660. Object.defineProperty(exports, "TSModuleBlock", {
  25661. enumerable: true,
  25662. get: function() {
  25663. return _index.tsModuleBlock;
  25664. }
  25665. });
  25666. Object.defineProperty(exports, "TSImportType", {
  25667. enumerable: true,
  25668. get: function() {
  25669. return _index.tsImportType;
  25670. }
  25671. });
  25672. Object.defineProperty(exports, "TSImportEqualsDeclaration", {
  25673. enumerable: true,
  25674. get: function() {
  25675. return _index.tsImportEqualsDeclaration;
  25676. }
  25677. });
  25678. Object.defineProperty(exports, "TSExternalModuleReference", {
  25679. enumerable: true,
  25680. get: function() {
  25681. return _index.tsExternalModuleReference;
  25682. }
  25683. });
  25684. Object.defineProperty(exports, "TSNonNullExpression", {
  25685. enumerable: true,
  25686. get: function() {
  25687. return _index.tsNonNullExpression;
  25688. }
  25689. });
  25690. Object.defineProperty(exports, "TSExportAssignment", {
  25691. enumerable: true,
  25692. get: function() {
  25693. return _index.tsExportAssignment;
  25694. }
  25695. });
  25696. Object.defineProperty(exports, "TSNamespaceExportDeclaration", {
  25697. enumerable: true,
  25698. get: function() {
  25699. return _index.tsNamespaceExportDeclaration;
  25700. }
  25701. });
  25702. Object.defineProperty(exports, "TSTypeAnnotation", {
  25703. enumerable: true,
  25704. get: function() {
  25705. return _index.tsTypeAnnotation;
  25706. }
  25707. });
  25708. Object.defineProperty(exports, "TSTypeParameterInstantiation", {
  25709. enumerable: true,
  25710. get: function() {
  25711. return _index.tsTypeParameterInstantiation;
  25712. }
  25713. });
  25714. Object.defineProperty(exports, "TSTypeParameterDeclaration", {
  25715. enumerable: true,
  25716. get: function() {
  25717. return _index.tsTypeParameterDeclaration;
  25718. }
  25719. });
  25720. Object.defineProperty(exports, "TSTypeParameter", {
  25721. enumerable: true,
  25722. get: function() {
  25723. return _index.tsTypeParameter;
  25724. }
  25725. });
  25726. Object.defineProperty(exports, "NumberLiteral", {
  25727. enumerable: true,
  25728. get: function() {
  25729. return _index.numberLiteral;
  25730. }
  25731. });
  25732. Object.defineProperty(exports, "RegexLiteral", {
  25733. enumerable: true,
  25734. get: function() {
  25735. return _index.regexLiteral;
  25736. }
  25737. });
  25738. Object.defineProperty(exports, "RestProperty", {
  25739. enumerable: true,
  25740. get: function() {
  25741. return _index.restProperty;
  25742. }
  25743. });
  25744. Object.defineProperty(exports, "SpreadProperty", {
  25745. enumerable: true,
  25746. get: function() {
  25747. return _index.spreadProperty;
  25748. }
  25749. });
  25750. var _index = require_generated7();
  25751. }
  25752. });
  25753. // node_modules/estree-to-babel/node_modules/@babel/types/lib/clone/cloneNode.js
  25754. var require_cloneNode2 = __commonJS({
  25755. "node_modules/estree-to-babel/node_modules/@babel/types/lib/clone/cloneNode.js"(exports) {
  25756. "use strict";
  25757. Object.defineProperty(exports, "__esModule", {
  25758. value: true
  25759. });
  25760. exports.default = cloneNode;
  25761. var _definitions = require_definitions2();
  25762. var _generated = require_generated6();
  25763. var has = Function.call.bind(Object.prototype.hasOwnProperty);
  25764. function cloneIfNode(obj, deep, withoutLoc) {
  25765. if (obj && typeof obj.type === "string") {
  25766. return cloneNode(obj, deep, withoutLoc);
  25767. }
  25768. return obj;
  25769. }
  25770. function cloneIfNodeOrArray(obj, deep, withoutLoc) {
  25771. if (Array.isArray(obj)) {
  25772. return obj.map((node) => cloneIfNode(node, deep, withoutLoc));
  25773. }
  25774. return cloneIfNode(obj, deep, withoutLoc);
  25775. }
  25776. function cloneNode(node, deep = true, withoutLoc = false) {
  25777. if (!node)
  25778. return node;
  25779. const {
  25780. type
  25781. } = node;
  25782. const newNode = {
  25783. type: node.type
  25784. };
  25785. if ((0, _generated.isIdentifier)(node)) {
  25786. newNode.name = node.name;
  25787. if (has(node, "optional") && typeof node.optional === "boolean") {
  25788. newNode.optional = node.optional;
  25789. }
  25790. if (has(node, "typeAnnotation")) {
  25791. newNode.typeAnnotation = deep ? cloneIfNodeOrArray(node.typeAnnotation, true, withoutLoc) : node.typeAnnotation;
  25792. }
  25793. } else if (!has(_definitions.NODE_FIELDS, type)) {
  25794. throw new Error(`Unknown node type: "${type}"`);
  25795. } else {
  25796. for (const field of Object.keys(_definitions.NODE_FIELDS[type])) {
  25797. if (has(node, field)) {
  25798. if (deep) {
  25799. newNode[field] = (0, _generated.isFile)(node) && field === "comments" ? maybeCloneComments(node.comments, deep, withoutLoc) : cloneIfNodeOrArray(node[field], true, withoutLoc);
  25800. } else {
  25801. newNode[field] = node[field];
  25802. }
  25803. }
  25804. }
  25805. }
  25806. if (has(node, "loc")) {
  25807. if (withoutLoc) {
  25808. newNode.loc = null;
  25809. } else {
  25810. newNode.loc = node.loc;
  25811. }
  25812. }
  25813. if (has(node, "leadingComments")) {
  25814. newNode.leadingComments = maybeCloneComments(node.leadingComments, deep, withoutLoc);
  25815. }
  25816. if (has(node, "innerComments")) {
  25817. newNode.innerComments = maybeCloneComments(node.innerComments, deep, withoutLoc);
  25818. }
  25819. if (has(node, "trailingComments")) {
  25820. newNode.trailingComments = maybeCloneComments(node.trailingComments, deep, withoutLoc);
  25821. }
  25822. if (has(node, "extra")) {
  25823. newNode.extra = Object.assign({}, node.extra);
  25824. }
  25825. return newNode;
  25826. }
  25827. function maybeCloneComments(comments, deep, withoutLoc) {
  25828. if (!comments || !deep) {
  25829. return comments;
  25830. }
  25831. return comments.map(({
  25832. type,
  25833. value,
  25834. loc
  25835. }) => {
  25836. if (withoutLoc) {
  25837. return {
  25838. type,
  25839. value,
  25840. loc: null
  25841. };
  25842. }
  25843. return {
  25844. type,
  25845. value,
  25846. loc
  25847. };
  25848. });
  25849. }
  25850. }
  25851. });
  25852. // node_modules/estree-to-babel/node_modules/@babel/types/lib/clone/clone.js
  25853. var require_clone2 = __commonJS({
  25854. "node_modules/estree-to-babel/node_modules/@babel/types/lib/clone/clone.js"(exports) {
  25855. "use strict";
  25856. Object.defineProperty(exports, "__esModule", {
  25857. value: true
  25858. });
  25859. exports.default = clone;
  25860. var _cloneNode = require_cloneNode2();
  25861. function clone(node) {
  25862. return (0, _cloneNode.default)(node, false);
  25863. }
  25864. }
  25865. });
  25866. // node_modules/estree-to-babel/node_modules/@babel/types/lib/clone/cloneDeep.js
  25867. var require_cloneDeep2 = __commonJS({
  25868. "node_modules/estree-to-babel/node_modules/@babel/types/lib/clone/cloneDeep.js"(exports) {
  25869. "use strict";
  25870. Object.defineProperty(exports, "__esModule", {
  25871. value: true
  25872. });
  25873. exports.default = cloneDeep2;
  25874. var _cloneNode = require_cloneNode2();
  25875. function cloneDeep2(node) {
  25876. return (0, _cloneNode.default)(node);
  25877. }
  25878. }
  25879. });
  25880. // node_modules/estree-to-babel/node_modules/@babel/types/lib/clone/cloneDeepWithoutLoc.js
  25881. var require_cloneDeepWithoutLoc2 = __commonJS({
  25882. "node_modules/estree-to-babel/node_modules/@babel/types/lib/clone/cloneDeepWithoutLoc.js"(exports) {
  25883. "use strict";
  25884. Object.defineProperty(exports, "__esModule", {
  25885. value: true
  25886. });
  25887. exports.default = cloneDeepWithoutLoc;
  25888. var _cloneNode = require_cloneNode2();
  25889. function cloneDeepWithoutLoc(node) {
  25890. return (0, _cloneNode.default)(node, true, true);
  25891. }
  25892. }
  25893. });
  25894. // node_modules/estree-to-babel/node_modules/@babel/types/lib/clone/cloneWithoutLoc.js
  25895. var require_cloneWithoutLoc2 = __commonJS({
  25896. "node_modules/estree-to-babel/node_modules/@babel/types/lib/clone/cloneWithoutLoc.js"(exports) {
  25897. "use strict";
  25898. Object.defineProperty(exports, "__esModule", {
  25899. value: true
  25900. });
  25901. exports.default = cloneWithoutLoc;
  25902. var _cloneNode = require_cloneNode2();
  25903. function cloneWithoutLoc(node) {
  25904. return (0, _cloneNode.default)(node, false, true);
  25905. }
  25906. }
  25907. });
  25908. // node_modules/estree-to-babel/node_modules/@babel/types/lib/comments/addComments.js
  25909. var require_addComments2 = __commonJS({
  25910. "node_modules/estree-to-babel/node_modules/@babel/types/lib/comments/addComments.js"(exports) {
  25911. "use strict";
  25912. Object.defineProperty(exports, "__esModule", {
  25913. value: true
  25914. });
  25915. exports.default = addComments;
  25916. function addComments(node, type, comments) {
  25917. if (!comments || !node)
  25918. return node;
  25919. const key = `${type}Comments`;
  25920. if (node[key]) {
  25921. if (type === "leading") {
  25922. node[key] = comments.concat(node[key]);
  25923. } else {
  25924. node[key] = node[key].concat(comments);
  25925. }
  25926. } else {
  25927. node[key] = comments;
  25928. }
  25929. return node;
  25930. }
  25931. }
  25932. });
  25933. // node_modules/estree-to-babel/node_modules/@babel/types/lib/comments/addComment.js
  25934. var require_addComment2 = __commonJS({
  25935. "node_modules/estree-to-babel/node_modules/@babel/types/lib/comments/addComment.js"(exports) {
  25936. "use strict";
  25937. Object.defineProperty(exports, "__esModule", {
  25938. value: true
  25939. });
  25940. exports.default = addComment;
  25941. var _addComments = require_addComments2();
  25942. function addComment(node, type, content3, line) {
  25943. return (0, _addComments.default)(node, type, [{
  25944. type: line ? "CommentLine" : "CommentBlock",
  25945. value: content3
  25946. }]);
  25947. }
  25948. }
  25949. });
  25950. // node_modules/estree-to-babel/node_modules/@babel/types/lib/utils/inherit.js
  25951. var require_inherit2 = __commonJS({
  25952. "node_modules/estree-to-babel/node_modules/@babel/types/lib/utils/inherit.js"(exports) {
  25953. "use strict";
  25954. Object.defineProperty(exports, "__esModule", {
  25955. value: true
  25956. });
  25957. exports.default = inherit2;
  25958. function inherit2(key, child, parent) {
  25959. if (child && parent) {
  25960. child[key] = Array.from(new Set([].concat(child[key], parent[key]).filter(Boolean)));
  25961. }
  25962. }
  25963. }
  25964. });
  25965. // node_modules/estree-to-babel/node_modules/@babel/types/lib/comments/inheritInnerComments.js
  25966. var require_inheritInnerComments2 = __commonJS({
  25967. "node_modules/estree-to-babel/node_modules/@babel/types/lib/comments/inheritInnerComments.js"(exports) {
  25968. "use strict";
  25969. Object.defineProperty(exports, "__esModule", {
  25970. value: true
  25971. });
  25972. exports.default = inheritInnerComments;
  25973. var _inherit = require_inherit2();
  25974. function inheritInnerComments(child, parent) {
  25975. (0, _inherit.default)("innerComments", child, parent);
  25976. }
  25977. }
  25978. });
  25979. // node_modules/estree-to-babel/node_modules/@babel/types/lib/comments/inheritLeadingComments.js
  25980. var require_inheritLeadingComments2 = __commonJS({
  25981. "node_modules/estree-to-babel/node_modules/@babel/types/lib/comments/inheritLeadingComments.js"(exports) {
  25982. "use strict";
  25983. Object.defineProperty(exports, "__esModule", {
  25984. value: true
  25985. });
  25986. exports.default = inheritLeadingComments;
  25987. var _inherit = require_inherit2();
  25988. function inheritLeadingComments(child, parent) {
  25989. (0, _inherit.default)("leadingComments", child, parent);
  25990. }
  25991. }
  25992. });
  25993. // node_modules/estree-to-babel/node_modules/@babel/types/lib/comments/inheritTrailingComments.js
  25994. var require_inheritTrailingComments2 = __commonJS({
  25995. "node_modules/estree-to-babel/node_modules/@babel/types/lib/comments/inheritTrailingComments.js"(exports) {
  25996. "use strict";
  25997. Object.defineProperty(exports, "__esModule", {
  25998. value: true
  25999. });
  26000. exports.default = inheritTrailingComments;
  26001. var _inherit = require_inherit2();
  26002. function inheritTrailingComments(child, parent) {
  26003. (0, _inherit.default)("trailingComments", child, parent);
  26004. }
  26005. }
  26006. });
  26007. // node_modules/estree-to-babel/node_modules/@babel/types/lib/comments/inheritsComments.js
  26008. var require_inheritsComments2 = __commonJS({
  26009. "node_modules/estree-to-babel/node_modules/@babel/types/lib/comments/inheritsComments.js"(exports) {
  26010. "use strict";
  26011. Object.defineProperty(exports, "__esModule", {
  26012. value: true
  26013. });
  26014. exports.default = inheritsComments;
  26015. var _inheritTrailingComments = require_inheritTrailingComments2();
  26016. var _inheritLeadingComments = require_inheritLeadingComments2();
  26017. var _inheritInnerComments = require_inheritInnerComments2();
  26018. function inheritsComments(child, parent) {
  26019. (0, _inheritTrailingComments.default)(child, parent);
  26020. (0, _inheritLeadingComments.default)(child, parent);
  26021. (0, _inheritInnerComments.default)(child, parent);
  26022. return child;
  26023. }
  26024. }
  26025. });
  26026. // node_modules/estree-to-babel/node_modules/@babel/types/lib/comments/removeComments.js
  26027. var require_removeComments2 = __commonJS({
  26028. "node_modules/estree-to-babel/node_modules/@babel/types/lib/comments/removeComments.js"(exports) {
  26029. "use strict";
  26030. Object.defineProperty(exports, "__esModule", {
  26031. value: true
  26032. });
  26033. exports.default = removeComments;
  26034. var _constants = require_constants2();
  26035. function removeComments(node) {
  26036. _constants.COMMENT_KEYS.forEach((key) => {
  26037. node[key] = null;
  26038. });
  26039. return node;
  26040. }
  26041. }
  26042. });
  26043. // node_modules/estree-to-babel/node_modules/@babel/types/lib/constants/generated/index.js
  26044. var require_generated9 = __commonJS({
  26045. "node_modules/estree-to-babel/node_modules/@babel/types/lib/constants/generated/index.js"(exports) {
  26046. "use strict";
  26047. Object.defineProperty(exports, "__esModule", {
  26048. value: true
  26049. });
  26050. exports.TSBASETYPE_TYPES = exports.TSTYPE_TYPES = exports.TSTYPEELEMENT_TYPES = exports.PRIVATE_TYPES = exports.JSX_TYPES = exports.ENUMMEMBER_TYPES = exports.ENUMBODY_TYPES = exports.FLOWPREDICATE_TYPES = exports.FLOWDECLARATION_TYPES = exports.FLOWBASEANNOTATION_TYPES = exports.FLOWTYPE_TYPES = exports.FLOW_TYPES = exports.MODULESPECIFIER_TYPES = exports.EXPORTDECLARATION_TYPES = exports.MODULEDECLARATION_TYPES = exports.CLASS_TYPES = exports.PATTERN_TYPES = exports.UNARYLIKE_TYPES = exports.PROPERTY_TYPES = exports.OBJECTMEMBER_TYPES = exports.METHOD_TYPES = exports.USERWHITESPACABLE_TYPES = exports.IMMUTABLE_TYPES = exports.LITERAL_TYPES = exports.TSENTITYNAME_TYPES = exports.LVAL_TYPES = exports.PATTERNLIKE_TYPES = exports.DECLARATION_TYPES = exports.PUREISH_TYPES = exports.FUNCTIONPARENT_TYPES = exports.FUNCTION_TYPES = exports.FORXSTATEMENT_TYPES = exports.FOR_TYPES = exports.EXPRESSIONWRAPPER_TYPES = exports.WHILE_TYPES = exports.LOOP_TYPES = exports.CONDITIONAL_TYPES = exports.COMPLETIONSTATEMENT_TYPES = exports.TERMINATORLESS_TYPES = exports.STATEMENT_TYPES = exports.BLOCK_TYPES = exports.BLOCKPARENT_TYPES = exports.SCOPABLE_TYPES = exports.BINARY_TYPES = exports.EXPRESSION_TYPES = void 0;
  26051. var _definitions = require_definitions2();
  26052. var EXPRESSION_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Expression"];
  26053. exports.EXPRESSION_TYPES = EXPRESSION_TYPES;
  26054. var BINARY_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Binary"];
  26055. exports.BINARY_TYPES = BINARY_TYPES;
  26056. var SCOPABLE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Scopable"];
  26057. exports.SCOPABLE_TYPES = SCOPABLE_TYPES;
  26058. var BLOCKPARENT_TYPES = _definitions.FLIPPED_ALIAS_KEYS["BlockParent"];
  26059. exports.BLOCKPARENT_TYPES = BLOCKPARENT_TYPES;
  26060. var BLOCK_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Block"];
  26061. exports.BLOCK_TYPES = BLOCK_TYPES;
  26062. var STATEMENT_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Statement"];
  26063. exports.STATEMENT_TYPES = STATEMENT_TYPES;
  26064. var TERMINATORLESS_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Terminatorless"];
  26065. exports.TERMINATORLESS_TYPES = TERMINATORLESS_TYPES;
  26066. var COMPLETIONSTATEMENT_TYPES = _definitions.FLIPPED_ALIAS_KEYS["CompletionStatement"];
  26067. exports.COMPLETIONSTATEMENT_TYPES = COMPLETIONSTATEMENT_TYPES;
  26068. var CONDITIONAL_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Conditional"];
  26069. exports.CONDITIONAL_TYPES = CONDITIONAL_TYPES;
  26070. var LOOP_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Loop"];
  26071. exports.LOOP_TYPES = LOOP_TYPES;
  26072. var WHILE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["While"];
  26073. exports.WHILE_TYPES = WHILE_TYPES;
  26074. var EXPRESSIONWRAPPER_TYPES = _definitions.FLIPPED_ALIAS_KEYS["ExpressionWrapper"];
  26075. exports.EXPRESSIONWRAPPER_TYPES = EXPRESSIONWRAPPER_TYPES;
  26076. var FOR_TYPES = _definitions.FLIPPED_ALIAS_KEYS["For"];
  26077. exports.FOR_TYPES = FOR_TYPES;
  26078. var FORXSTATEMENT_TYPES = _definitions.FLIPPED_ALIAS_KEYS["ForXStatement"];
  26079. exports.FORXSTATEMENT_TYPES = FORXSTATEMENT_TYPES;
  26080. var FUNCTION_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Function"];
  26081. exports.FUNCTION_TYPES = FUNCTION_TYPES;
  26082. var FUNCTIONPARENT_TYPES = _definitions.FLIPPED_ALIAS_KEYS["FunctionParent"];
  26083. exports.FUNCTIONPARENT_TYPES = FUNCTIONPARENT_TYPES;
  26084. var PUREISH_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Pureish"];
  26085. exports.PUREISH_TYPES = PUREISH_TYPES;
  26086. var DECLARATION_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Declaration"];
  26087. exports.DECLARATION_TYPES = DECLARATION_TYPES;
  26088. var PATTERNLIKE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["PatternLike"];
  26089. exports.PATTERNLIKE_TYPES = PATTERNLIKE_TYPES;
  26090. var LVAL_TYPES = _definitions.FLIPPED_ALIAS_KEYS["LVal"];
  26091. exports.LVAL_TYPES = LVAL_TYPES;
  26092. var TSENTITYNAME_TYPES = _definitions.FLIPPED_ALIAS_KEYS["TSEntityName"];
  26093. exports.TSENTITYNAME_TYPES = TSENTITYNAME_TYPES;
  26094. var LITERAL_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Literal"];
  26095. exports.LITERAL_TYPES = LITERAL_TYPES;
  26096. var IMMUTABLE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Immutable"];
  26097. exports.IMMUTABLE_TYPES = IMMUTABLE_TYPES;
  26098. var USERWHITESPACABLE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["UserWhitespacable"];
  26099. exports.USERWHITESPACABLE_TYPES = USERWHITESPACABLE_TYPES;
  26100. var METHOD_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Method"];
  26101. exports.METHOD_TYPES = METHOD_TYPES;
  26102. var OBJECTMEMBER_TYPES = _definitions.FLIPPED_ALIAS_KEYS["ObjectMember"];
  26103. exports.OBJECTMEMBER_TYPES = OBJECTMEMBER_TYPES;
  26104. var PROPERTY_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Property"];
  26105. exports.PROPERTY_TYPES = PROPERTY_TYPES;
  26106. var UNARYLIKE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["UnaryLike"];
  26107. exports.UNARYLIKE_TYPES = UNARYLIKE_TYPES;
  26108. var PATTERN_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Pattern"];
  26109. exports.PATTERN_TYPES = PATTERN_TYPES;
  26110. var CLASS_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Class"];
  26111. exports.CLASS_TYPES = CLASS_TYPES;
  26112. var MODULEDECLARATION_TYPES = _definitions.FLIPPED_ALIAS_KEYS["ModuleDeclaration"];
  26113. exports.MODULEDECLARATION_TYPES = MODULEDECLARATION_TYPES;
  26114. var EXPORTDECLARATION_TYPES = _definitions.FLIPPED_ALIAS_KEYS["ExportDeclaration"];
  26115. exports.EXPORTDECLARATION_TYPES = EXPORTDECLARATION_TYPES;
  26116. var MODULESPECIFIER_TYPES = _definitions.FLIPPED_ALIAS_KEYS["ModuleSpecifier"];
  26117. exports.MODULESPECIFIER_TYPES = MODULESPECIFIER_TYPES;
  26118. var FLOW_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Flow"];
  26119. exports.FLOW_TYPES = FLOW_TYPES;
  26120. var FLOWTYPE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["FlowType"];
  26121. exports.FLOWTYPE_TYPES = FLOWTYPE_TYPES;
  26122. var FLOWBASEANNOTATION_TYPES = _definitions.FLIPPED_ALIAS_KEYS["FlowBaseAnnotation"];
  26123. exports.FLOWBASEANNOTATION_TYPES = FLOWBASEANNOTATION_TYPES;
  26124. var FLOWDECLARATION_TYPES = _definitions.FLIPPED_ALIAS_KEYS["FlowDeclaration"];
  26125. exports.FLOWDECLARATION_TYPES = FLOWDECLARATION_TYPES;
  26126. var FLOWPREDICATE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["FlowPredicate"];
  26127. exports.FLOWPREDICATE_TYPES = FLOWPREDICATE_TYPES;
  26128. var ENUMBODY_TYPES = _definitions.FLIPPED_ALIAS_KEYS["EnumBody"];
  26129. exports.ENUMBODY_TYPES = ENUMBODY_TYPES;
  26130. var ENUMMEMBER_TYPES = _definitions.FLIPPED_ALIAS_KEYS["EnumMember"];
  26131. exports.ENUMMEMBER_TYPES = ENUMMEMBER_TYPES;
  26132. var JSX_TYPES = _definitions.FLIPPED_ALIAS_KEYS["JSX"];
  26133. exports.JSX_TYPES = JSX_TYPES;
  26134. var PRIVATE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Private"];
  26135. exports.PRIVATE_TYPES = PRIVATE_TYPES;
  26136. var TSTYPEELEMENT_TYPES = _definitions.FLIPPED_ALIAS_KEYS["TSTypeElement"];
  26137. exports.TSTYPEELEMENT_TYPES = TSTYPEELEMENT_TYPES;
  26138. var TSTYPE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["TSType"];
  26139. exports.TSTYPE_TYPES = TSTYPE_TYPES;
  26140. var TSBASETYPE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["TSBaseType"];
  26141. exports.TSBASETYPE_TYPES = TSBASETYPE_TYPES;
  26142. }
  26143. });
  26144. // node_modules/estree-to-babel/node_modules/@babel/types/lib/converters/toBlock.js
  26145. var require_toBlock2 = __commonJS({
  26146. "node_modules/estree-to-babel/node_modules/@babel/types/lib/converters/toBlock.js"(exports) {
  26147. "use strict";
  26148. Object.defineProperty(exports, "__esModule", {
  26149. value: true
  26150. });
  26151. exports.default = toBlock;
  26152. var _generated = require_generated6();
  26153. var _generated2 = require_generated7();
  26154. function toBlock(node, parent) {
  26155. if ((0, _generated.isBlockStatement)(node)) {
  26156. return node;
  26157. }
  26158. let blockNodes = [];
  26159. if ((0, _generated.isEmptyStatement)(node)) {
  26160. blockNodes = [];
  26161. } else {
  26162. if (!(0, _generated.isStatement)(node)) {
  26163. if ((0, _generated.isFunction)(parent)) {
  26164. node = (0, _generated2.returnStatement)(node);
  26165. } else {
  26166. node = (0, _generated2.expressionStatement)(node);
  26167. }
  26168. }
  26169. blockNodes = [node];
  26170. }
  26171. return (0, _generated2.blockStatement)(blockNodes);
  26172. }
  26173. }
  26174. });
  26175. // node_modules/estree-to-babel/node_modules/@babel/types/lib/converters/ensureBlock.js
  26176. var require_ensureBlock2 = __commonJS({
  26177. "node_modules/estree-to-babel/node_modules/@babel/types/lib/converters/ensureBlock.js"(exports) {
  26178. "use strict";
  26179. Object.defineProperty(exports, "__esModule", {
  26180. value: true
  26181. });
  26182. exports.default = ensureBlock;
  26183. var _toBlock = require_toBlock2();
  26184. function ensureBlock(node, key = "body") {
  26185. return node[key] = (0, _toBlock.default)(node[key], node);
  26186. }
  26187. }
  26188. });
  26189. // node_modules/estree-to-babel/node_modules/@babel/types/lib/converters/toIdentifier.js
  26190. var require_toIdentifier2 = __commonJS({
  26191. "node_modules/estree-to-babel/node_modules/@babel/types/lib/converters/toIdentifier.js"(exports) {
  26192. "use strict";
  26193. Object.defineProperty(exports, "__esModule", {
  26194. value: true
  26195. });
  26196. exports.default = toIdentifier2;
  26197. var _isValidIdentifier = require_isValidIdentifier2();
  26198. var _helperValidatorIdentifier = require_lib3();
  26199. function toIdentifier2(input) {
  26200. input = input + "";
  26201. let name2 = "";
  26202. for (const c of input) {
  26203. name2 += (0, _helperValidatorIdentifier.isIdentifierChar)(c.codePointAt(0)) ? c : "-";
  26204. }
  26205. name2 = name2.replace(/^[-0-9]+/, "");
  26206. name2 = name2.replace(/[-\s]+(.)?/g, function(match, c) {
  26207. return c ? c.toUpperCase() : "";
  26208. });
  26209. if (!(0, _isValidIdentifier.default)(name2)) {
  26210. name2 = `_${name2}`;
  26211. }
  26212. return name2 || "_";
  26213. }
  26214. }
  26215. });
  26216. // node_modules/estree-to-babel/node_modules/@babel/types/lib/converters/toBindingIdentifierName.js
  26217. var require_toBindingIdentifierName2 = __commonJS({
  26218. "node_modules/estree-to-babel/node_modules/@babel/types/lib/converters/toBindingIdentifierName.js"(exports) {
  26219. "use strict";
  26220. Object.defineProperty(exports, "__esModule", {
  26221. value: true
  26222. });
  26223. exports.default = toBindingIdentifierName;
  26224. var _toIdentifier = require_toIdentifier2();
  26225. function toBindingIdentifierName(name2) {
  26226. name2 = (0, _toIdentifier.default)(name2);
  26227. if (name2 === "eval" || name2 === "arguments")
  26228. name2 = "_" + name2;
  26229. return name2;
  26230. }
  26231. }
  26232. });
  26233. // node_modules/estree-to-babel/node_modules/@babel/types/lib/converters/toComputedKey.js
  26234. var require_toComputedKey2 = __commonJS({
  26235. "node_modules/estree-to-babel/node_modules/@babel/types/lib/converters/toComputedKey.js"(exports) {
  26236. "use strict";
  26237. Object.defineProperty(exports, "__esModule", {
  26238. value: true
  26239. });
  26240. exports.default = toComputedKey;
  26241. var _generated = require_generated6();
  26242. var _generated2 = require_generated7();
  26243. function toComputedKey(node, key = node.key || node.property) {
  26244. if (!node.computed && (0, _generated.isIdentifier)(key))
  26245. key = (0, _generated2.stringLiteral)(key.name);
  26246. return key;
  26247. }
  26248. }
  26249. });
  26250. // node_modules/estree-to-babel/node_modules/@babel/types/lib/converters/toExpression.js
  26251. var require_toExpression2 = __commonJS({
  26252. "node_modules/estree-to-babel/node_modules/@babel/types/lib/converters/toExpression.js"(exports) {
  26253. "use strict";
  26254. Object.defineProperty(exports, "__esModule", {
  26255. value: true
  26256. });
  26257. exports.default = void 0;
  26258. var _generated = require_generated6();
  26259. var _default = toExpression;
  26260. exports.default = _default;
  26261. function toExpression(node) {
  26262. if ((0, _generated.isExpressionStatement)(node)) {
  26263. node = node.expression;
  26264. }
  26265. if ((0, _generated.isExpression)(node)) {
  26266. return node;
  26267. }
  26268. if ((0, _generated.isClass)(node)) {
  26269. node.type = "ClassExpression";
  26270. } else if ((0, _generated.isFunction)(node)) {
  26271. node.type = "FunctionExpression";
  26272. }
  26273. if (!(0, _generated.isExpression)(node)) {
  26274. throw new Error(`cannot turn ${node.type} to an expression`);
  26275. }
  26276. return node;
  26277. }
  26278. }
  26279. });
  26280. // node_modules/estree-to-babel/node_modules/@babel/types/lib/traverse/traverseFast.js
  26281. var require_traverseFast2 = __commonJS({
  26282. "node_modules/estree-to-babel/node_modules/@babel/types/lib/traverse/traverseFast.js"(exports) {
  26283. "use strict";
  26284. Object.defineProperty(exports, "__esModule", {
  26285. value: true
  26286. });
  26287. exports.default = traverseFast;
  26288. var _definitions = require_definitions2();
  26289. function traverseFast(node, enter, opts) {
  26290. if (!node)
  26291. return;
  26292. const keys2 = _definitions.VISITOR_KEYS[node.type];
  26293. if (!keys2)
  26294. return;
  26295. opts = opts || {};
  26296. enter(node, opts);
  26297. for (const key of keys2) {
  26298. const subNode = node[key];
  26299. if (Array.isArray(subNode)) {
  26300. for (const node2 of subNode) {
  26301. traverseFast(node2, enter, opts);
  26302. }
  26303. } else {
  26304. traverseFast(subNode, enter, opts);
  26305. }
  26306. }
  26307. }
  26308. }
  26309. });
  26310. // node_modules/estree-to-babel/node_modules/@babel/types/lib/modifications/removeProperties.js
  26311. var require_removeProperties2 = __commonJS({
  26312. "node_modules/estree-to-babel/node_modules/@babel/types/lib/modifications/removeProperties.js"(exports) {
  26313. "use strict";
  26314. Object.defineProperty(exports, "__esModule", {
  26315. value: true
  26316. });
  26317. exports.default = removeProperties;
  26318. var _constants = require_constants2();
  26319. var CLEAR_KEYS = ["tokens", "start", "end", "loc", "raw", "rawValue"];
  26320. var CLEAR_KEYS_PLUS_COMMENTS = _constants.COMMENT_KEYS.concat(["comments"]).concat(CLEAR_KEYS);
  26321. function removeProperties(node, opts = {}) {
  26322. const map = opts.preserveComments ? CLEAR_KEYS : CLEAR_KEYS_PLUS_COMMENTS;
  26323. for (const key of map) {
  26324. if (node[key] != null)
  26325. node[key] = void 0;
  26326. }
  26327. for (const key of Object.keys(node)) {
  26328. if (key[0] === "_" && node[key] != null)
  26329. node[key] = void 0;
  26330. }
  26331. const symbols = Object.getOwnPropertySymbols(node);
  26332. for (const sym of symbols) {
  26333. node[sym] = null;
  26334. }
  26335. }
  26336. }
  26337. });
  26338. // node_modules/estree-to-babel/node_modules/@babel/types/lib/modifications/removePropertiesDeep.js
  26339. var require_removePropertiesDeep2 = __commonJS({
  26340. "node_modules/estree-to-babel/node_modules/@babel/types/lib/modifications/removePropertiesDeep.js"(exports) {
  26341. "use strict";
  26342. Object.defineProperty(exports, "__esModule", {
  26343. value: true
  26344. });
  26345. exports.default = removePropertiesDeep;
  26346. var _traverseFast = require_traverseFast2();
  26347. var _removeProperties = require_removeProperties2();
  26348. function removePropertiesDeep(tree, opts) {
  26349. (0, _traverseFast.default)(tree, _removeProperties.default, opts);
  26350. return tree;
  26351. }
  26352. }
  26353. });
  26354. // node_modules/estree-to-babel/node_modules/@babel/types/lib/converters/toKeyAlias.js
  26355. var require_toKeyAlias2 = __commonJS({
  26356. "node_modules/estree-to-babel/node_modules/@babel/types/lib/converters/toKeyAlias.js"(exports) {
  26357. "use strict";
  26358. Object.defineProperty(exports, "__esModule", {
  26359. value: true
  26360. });
  26361. exports.default = toKeyAlias;
  26362. var _generated = require_generated6();
  26363. var _cloneNode = require_cloneNode2();
  26364. var _removePropertiesDeep = require_removePropertiesDeep2();
  26365. function toKeyAlias(node, key = node.key) {
  26366. let alias;
  26367. if (node.kind === "method") {
  26368. return toKeyAlias.increment() + "";
  26369. } else if ((0, _generated.isIdentifier)(key)) {
  26370. alias = key.name;
  26371. } else if ((0, _generated.isStringLiteral)(key)) {
  26372. alias = JSON.stringify(key.value);
  26373. } else {
  26374. alias = JSON.stringify((0, _removePropertiesDeep.default)((0, _cloneNode.default)(key)));
  26375. }
  26376. if (node.computed) {
  26377. alias = `[${alias}]`;
  26378. }
  26379. if (node.static) {
  26380. alias = `static:${alias}`;
  26381. }
  26382. return alias;
  26383. }
  26384. toKeyAlias.uid = 0;
  26385. toKeyAlias.increment = function() {
  26386. if (toKeyAlias.uid >= Number.MAX_SAFE_INTEGER) {
  26387. return toKeyAlias.uid = 0;
  26388. } else {
  26389. return toKeyAlias.uid++;
  26390. }
  26391. };
  26392. }
  26393. });
  26394. // node_modules/estree-to-babel/node_modules/@babel/types/lib/retrievers/getBindingIdentifiers.js
  26395. var require_getBindingIdentifiers2 = __commonJS({
  26396. "node_modules/estree-to-babel/node_modules/@babel/types/lib/retrievers/getBindingIdentifiers.js"(exports) {
  26397. "use strict";
  26398. Object.defineProperty(exports, "__esModule", {
  26399. value: true
  26400. });
  26401. exports.default = getBindingIdentifiers;
  26402. var _generated = require_generated6();
  26403. function getBindingIdentifiers(node, duplicates, outerOnly) {
  26404. let search2 = [].concat(node);
  26405. const ids = /* @__PURE__ */ Object.create(null);
  26406. while (search2.length) {
  26407. const id = search2.shift();
  26408. if (!id)
  26409. continue;
  26410. const keys2 = getBindingIdentifiers.keys[id.type];
  26411. if ((0, _generated.isIdentifier)(id)) {
  26412. if (duplicates) {
  26413. const _ids = ids[id.name] = ids[id.name] || [];
  26414. _ids.push(id);
  26415. } else {
  26416. ids[id.name] = id;
  26417. }
  26418. continue;
  26419. }
  26420. if ((0, _generated.isExportDeclaration)(id) && !(0, _generated.isExportAllDeclaration)(id)) {
  26421. if ((0, _generated.isDeclaration)(id.declaration)) {
  26422. search2.push(id.declaration);
  26423. }
  26424. continue;
  26425. }
  26426. if (outerOnly) {
  26427. if ((0, _generated.isFunctionDeclaration)(id)) {
  26428. search2.push(id.id);
  26429. continue;
  26430. }
  26431. if ((0, _generated.isFunctionExpression)(id)) {
  26432. continue;
  26433. }
  26434. }
  26435. if (keys2) {
  26436. for (let i = 0; i < keys2.length; i++) {
  26437. const key = keys2[i];
  26438. if (id[key]) {
  26439. search2 = search2.concat(id[key]);
  26440. }
  26441. }
  26442. }
  26443. }
  26444. return ids;
  26445. }
  26446. getBindingIdentifiers.keys = {
  26447. DeclareClass: ["id"],
  26448. DeclareFunction: ["id"],
  26449. DeclareModule: ["id"],
  26450. DeclareVariable: ["id"],
  26451. DeclareInterface: ["id"],
  26452. DeclareTypeAlias: ["id"],
  26453. DeclareOpaqueType: ["id"],
  26454. InterfaceDeclaration: ["id"],
  26455. TypeAlias: ["id"],
  26456. OpaqueType: ["id"],
  26457. CatchClause: ["param"],
  26458. LabeledStatement: ["label"],
  26459. UnaryExpression: ["argument"],
  26460. AssignmentExpression: ["left"],
  26461. ImportSpecifier: ["local"],
  26462. ImportNamespaceSpecifier: ["local"],
  26463. ImportDefaultSpecifier: ["local"],
  26464. ImportDeclaration: ["specifiers"],
  26465. ExportSpecifier: ["exported"],
  26466. ExportNamespaceSpecifier: ["exported"],
  26467. ExportDefaultSpecifier: ["exported"],
  26468. FunctionDeclaration: ["id", "params"],
  26469. FunctionExpression: ["id", "params"],
  26470. ArrowFunctionExpression: ["params"],
  26471. ObjectMethod: ["params"],
  26472. ClassMethod: ["params"],
  26473. ForInStatement: ["left"],
  26474. ForOfStatement: ["left"],
  26475. ClassDeclaration: ["id"],
  26476. ClassExpression: ["id"],
  26477. RestElement: ["argument"],
  26478. UpdateExpression: ["argument"],
  26479. ObjectProperty: ["value"],
  26480. AssignmentPattern: ["left"],
  26481. ArrayPattern: ["elements"],
  26482. ObjectPattern: ["properties"],
  26483. VariableDeclaration: ["declarations"],
  26484. VariableDeclarator: ["id"]
  26485. };
  26486. }
  26487. });
  26488. // node_modules/estree-to-babel/node_modules/@babel/types/lib/converters/gatherSequenceExpressions.js
  26489. var require_gatherSequenceExpressions2 = __commonJS({
  26490. "node_modules/estree-to-babel/node_modules/@babel/types/lib/converters/gatherSequenceExpressions.js"(exports) {
  26491. "use strict";
  26492. Object.defineProperty(exports, "__esModule", {
  26493. value: true
  26494. });
  26495. exports.default = gatherSequenceExpressions;
  26496. var _getBindingIdentifiers = require_getBindingIdentifiers2();
  26497. var _generated = require_generated6();
  26498. var _generated2 = require_generated7();
  26499. var _cloneNode = require_cloneNode2();
  26500. function gatherSequenceExpressions(nodes, scope, declars) {
  26501. const exprs = [];
  26502. let ensureLastUndefined = true;
  26503. for (const node of nodes) {
  26504. if (!(0, _generated.isEmptyStatement)(node)) {
  26505. ensureLastUndefined = false;
  26506. }
  26507. if ((0, _generated.isExpression)(node)) {
  26508. exprs.push(node);
  26509. } else if ((0, _generated.isExpressionStatement)(node)) {
  26510. exprs.push(node.expression);
  26511. } else if ((0, _generated.isVariableDeclaration)(node)) {
  26512. if (node.kind !== "var")
  26513. return;
  26514. for (const declar of node.declarations) {
  26515. const bindings = (0, _getBindingIdentifiers.default)(declar);
  26516. for (const key of Object.keys(bindings)) {
  26517. declars.push({
  26518. kind: node.kind,
  26519. id: (0, _cloneNode.default)(bindings[key])
  26520. });
  26521. }
  26522. if (declar.init) {
  26523. exprs.push((0, _generated2.assignmentExpression)("=", declar.id, declar.init));
  26524. }
  26525. }
  26526. ensureLastUndefined = true;
  26527. } else if ((0, _generated.isIfStatement)(node)) {
  26528. const consequent = node.consequent ? gatherSequenceExpressions([node.consequent], scope, declars) : scope.buildUndefinedNode();
  26529. const alternate = node.alternate ? gatherSequenceExpressions([node.alternate], scope, declars) : scope.buildUndefinedNode();
  26530. if (!consequent || !alternate)
  26531. return;
  26532. exprs.push((0, _generated2.conditionalExpression)(node.test, consequent, alternate));
  26533. } else if ((0, _generated.isBlockStatement)(node)) {
  26534. const body = gatherSequenceExpressions(node.body, scope, declars);
  26535. if (!body)
  26536. return;
  26537. exprs.push(body);
  26538. } else if ((0, _generated.isEmptyStatement)(node)) {
  26539. if (nodes.indexOf(node) === 0) {
  26540. ensureLastUndefined = true;
  26541. }
  26542. } else {
  26543. return;
  26544. }
  26545. }
  26546. if (ensureLastUndefined) {
  26547. exprs.push(scope.buildUndefinedNode());
  26548. }
  26549. if (exprs.length === 1) {
  26550. return exprs[0];
  26551. } else {
  26552. return (0, _generated2.sequenceExpression)(exprs);
  26553. }
  26554. }
  26555. }
  26556. });
  26557. // node_modules/estree-to-babel/node_modules/@babel/types/lib/converters/toSequenceExpression.js
  26558. var require_toSequenceExpression2 = __commonJS({
  26559. "node_modules/estree-to-babel/node_modules/@babel/types/lib/converters/toSequenceExpression.js"(exports) {
  26560. "use strict";
  26561. Object.defineProperty(exports, "__esModule", {
  26562. value: true
  26563. });
  26564. exports.default = toSequenceExpression;
  26565. var _gatherSequenceExpressions = require_gatherSequenceExpressions2();
  26566. function toSequenceExpression(nodes, scope) {
  26567. if (!(nodes != null && nodes.length))
  26568. return;
  26569. const declars = [];
  26570. const result = (0, _gatherSequenceExpressions.default)(nodes, scope, declars);
  26571. if (!result)
  26572. return;
  26573. for (const declar of declars) {
  26574. scope.push(declar);
  26575. }
  26576. return result;
  26577. }
  26578. }
  26579. });
  26580. // node_modules/estree-to-babel/node_modules/@babel/types/lib/converters/toStatement.js
  26581. var require_toStatement2 = __commonJS({
  26582. "node_modules/estree-to-babel/node_modules/@babel/types/lib/converters/toStatement.js"(exports) {
  26583. "use strict";
  26584. Object.defineProperty(exports, "__esModule", {
  26585. value: true
  26586. });
  26587. exports.default = void 0;
  26588. var _generated = require_generated6();
  26589. var _generated2 = require_generated7();
  26590. var _default = toStatement;
  26591. exports.default = _default;
  26592. function toStatement(node, ignore3) {
  26593. if ((0, _generated.isStatement)(node)) {
  26594. return node;
  26595. }
  26596. let mustHaveId = false;
  26597. let newType;
  26598. if ((0, _generated.isClass)(node)) {
  26599. mustHaveId = true;
  26600. newType = "ClassDeclaration";
  26601. } else if ((0, _generated.isFunction)(node)) {
  26602. mustHaveId = true;
  26603. newType = "FunctionDeclaration";
  26604. } else if ((0, _generated.isAssignmentExpression)(node)) {
  26605. return (0, _generated2.expressionStatement)(node);
  26606. }
  26607. if (mustHaveId && !node.id) {
  26608. newType = false;
  26609. }
  26610. if (!newType) {
  26611. if (ignore3) {
  26612. return false;
  26613. } else {
  26614. throw new Error(`cannot turn ${node.type} to a statement`);
  26615. }
  26616. }
  26617. node.type = newType;
  26618. return node;
  26619. }
  26620. }
  26621. });
  26622. // node_modules/estree-to-babel/node_modules/@babel/types/lib/converters/valueToNode.js
  26623. var require_valueToNode2 = __commonJS({
  26624. "node_modules/estree-to-babel/node_modules/@babel/types/lib/converters/valueToNode.js"(exports) {
  26625. "use strict";
  26626. Object.defineProperty(exports, "__esModule", {
  26627. value: true
  26628. });
  26629. exports.default = void 0;
  26630. var _isValidIdentifier = require_isValidIdentifier2();
  26631. var _generated = require_generated7();
  26632. var _default = valueToNode;
  26633. exports.default = _default;
  26634. var objectToString = Function.call.bind(Object.prototype.toString);
  26635. function isRegExp(value) {
  26636. return objectToString(value) === "[object RegExp]";
  26637. }
  26638. function isPlainObject2(value) {
  26639. if (typeof value !== "object" || value === null || Object.prototype.toString.call(value) !== "[object Object]") {
  26640. return false;
  26641. }
  26642. const proto = Object.getPrototypeOf(value);
  26643. return proto === null || Object.getPrototypeOf(proto) === null;
  26644. }
  26645. function valueToNode(value) {
  26646. if (value === void 0) {
  26647. return (0, _generated.identifier)("undefined");
  26648. }
  26649. if (value === true || value === false) {
  26650. return (0, _generated.booleanLiteral)(value);
  26651. }
  26652. if (value === null) {
  26653. return (0, _generated.nullLiteral)();
  26654. }
  26655. if (typeof value === "string") {
  26656. return (0, _generated.stringLiteral)(value);
  26657. }
  26658. if (typeof value === "number") {
  26659. let result;
  26660. if (Number.isFinite(value)) {
  26661. result = (0, _generated.numericLiteral)(Math.abs(value));
  26662. } else {
  26663. let numerator;
  26664. if (Number.isNaN(value)) {
  26665. numerator = (0, _generated.numericLiteral)(0);
  26666. } else {
  26667. numerator = (0, _generated.numericLiteral)(1);
  26668. }
  26669. result = (0, _generated.binaryExpression)("/", numerator, (0, _generated.numericLiteral)(0));
  26670. }
  26671. if (value < 0 || Object.is(value, -0)) {
  26672. result = (0, _generated.unaryExpression)("-", result);
  26673. }
  26674. return result;
  26675. }
  26676. if (isRegExp(value)) {
  26677. const pattern = value.source;
  26678. const flags = value.toString().match(/\/([a-z]+|)$/)[1];
  26679. return (0, _generated.regExpLiteral)(pattern, flags);
  26680. }
  26681. if (Array.isArray(value)) {
  26682. return (0, _generated.arrayExpression)(value.map(valueToNode));
  26683. }
  26684. if (isPlainObject2(value)) {
  26685. const props = [];
  26686. for (const key of Object.keys(value)) {
  26687. let nodeKey;
  26688. if ((0, _isValidIdentifier.default)(key)) {
  26689. nodeKey = (0, _generated.identifier)(key);
  26690. } else {
  26691. nodeKey = (0, _generated.stringLiteral)(key);
  26692. }
  26693. props.push((0, _generated.objectProperty)(nodeKey, valueToNode(value[key])));
  26694. }
  26695. return (0, _generated.objectExpression)(props);
  26696. }
  26697. throw new Error("don't know how to turn this value into a node");
  26698. }
  26699. }
  26700. });
  26701. // node_modules/estree-to-babel/node_modules/@babel/types/lib/modifications/appendToMemberExpression.js
  26702. var require_appendToMemberExpression2 = __commonJS({
  26703. "node_modules/estree-to-babel/node_modules/@babel/types/lib/modifications/appendToMemberExpression.js"(exports) {
  26704. "use strict";
  26705. Object.defineProperty(exports, "__esModule", {
  26706. value: true
  26707. });
  26708. exports.default = appendToMemberExpression;
  26709. var _generated = require_generated7();
  26710. function appendToMemberExpression(member, append, computed = false) {
  26711. member.object = (0, _generated.memberExpression)(member.object, member.property, member.computed);
  26712. member.property = append;
  26713. member.computed = !!computed;
  26714. return member;
  26715. }
  26716. }
  26717. });
  26718. // node_modules/estree-to-babel/node_modules/@babel/types/lib/modifications/inherits.js
  26719. var require_inherits2 = __commonJS({
  26720. "node_modules/estree-to-babel/node_modules/@babel/types/lib/modifications/inherits.js"(exports) {
  26721. "use strict";
  26722. Object.defineProperty(exports, "__esModule", {
  26723. value: true
  26724. });
  26725. exports.default = inherits;
  26726. var _constants = require_constants2();
  26727. var _inheritsComments = require_inheritsComments2();
  26728. function inherits(child, parent) {
  26729. if (!child || !parent)
  26730. return child;
  26731. for (const key of _constants.INHERIT_KEYS.optional) {
  26732. if (child[key] == null) {
  26733. child[key] = parent[key];
  26734. }
  26735. }
  26736. for (const key of Object.keys(parent)) {
  26737. if (key[0] === "_" && key !== "__clone")
  26738. child[key] = parent[key];
  26739. }
  26740. for (const key of _constants.INHERIT_KEYS.force) {
  26741. child[key] = parent[key];
  26742. }
  26743. (0, _inheritsComments.default)(child, parent);
  26744. return child;
  26745. }
  26746. }
  26747. });
  26748. // node_modules/estree-to-babel/node_modules/@babel/types/lib/modifications/prependToMemberExpression.js
  26749. var require_prependToMemberExpression2 = __commonJS({
  26750. "node_modules/estree-to-babel/node_modules/@babel/types/lib/modifications/prependToMemberExpression.js"(exports) {
  26751. "use strict";
  26752. Object.defineProperty(exports, "__esModule", {
  26753. value: true
  26754. });
  26755. exports.default = prependToMemberExpression;
  26756. var _generated = require_generated7();
  26757. function prependToMemberExpression(member, prepend) {
  26758. member.object = (0, _generated.memberExpression)(prepend, member.object);
  26759. return member;
  26760. }
  26761. }
  26762. });
  26763. // node_modules/estree-to-babel/node_modules/@babel/types/lib/retrievers/getOuterBindingIdentifiers.js
  26764. var require_getOuterBindingIdentifiers2 = __commonJS({
  26765. "node_modules/estree-to-babel/node_modules/@babel/types/lib/retrievers/getOuterBindingIdentifiers.js"(exports) {
  26766. "use strict";
  26767. Object.defineProperty(exports, "__esModule", {
  26768. value: true
  26769. });
  26770. exports.default = void 0;
  26771. var _getBindingIdentifiers = require_getBindingIdentifiers2();
  26772. var _default = getOuterBindingIdentifiers;
  26773. exports.default = _default;
  26774. function getOuterBindingIdentifiers(node, duplicates) {
  26775. return (0, _getBindingIdentifiers.default)(node, duplicates, true);
  26776. }
  26777. }
  26778. });
  26779. // node_modules/estree-to-babel/node_modules/@babel/types/lib/traverse/traverse.js
  26780. var require_traverse2 = __commonJS({
  26781. "node_modules/estree-to-babel/node_modules/@babel/types/lib/traverse/traverse.js"(exports) {
  26782. "use strict";
  26783. Object.defineProperty(exports, "__esModule", {
  26784. value: true
  26785. });
  26786. exports.default = traverse;
  26787. var _definitions = require_definitions2();
  26788. function traverse(node, handlers2, state) {
  26789. if (typeof handlers2 === "function") {
  26790. handlers2 = {
  26791. enter: handlers2
  26792. };
  26793. }
  26794. const {
  26795. enter,
  26796. exit: exit2
  26797. } = handlers2;
  26798. traverseSimpleImpl(node, enter, exit2, state, []);
  26799. }
  26800. function traverseSimpleImpl(node, enter, exit2, state, ancestors) {
  26801. const keys2 = _definitions.VISITOR_KEYS[node.type];
  26802. if (!keys2)
  26803. return;
  26804. if (enter)
  26805. enter(node, ancestors, state);
  26806. for (const key of keys2) {
  26807. const subNode = node[key];
  26808. if (Array.isArray(subNode)) {
  26809. for (let i = 0; i < subNode.length; i++) {
  26810. const child = subNode[i];
  26811. if (!child)
  26812. continue;
  26813. ancestors.push({
  26814. node,
  26815. key,
  26816. index: i
  26817. });
  26818. traverseSimpleImpl(child, enter, exit2, state, ancestors);
  26819. ancestors.pop();
  26820. }
  26821. } else if (subNode) {
  26822. ancestors.push({
  26823. node,
  26824. key
  26825. });
  26826. traverseSimpleImpl(subNode, enter, exit2, state, ancestors);
  26827. ancestors.pop();
  26828. }
  26829. }
  26830. if (exit2)
  26831. exit2(node, ancestors, state);
  26832. }
  26833. }
  26834. });
  26835. // node_modules/estree-to-babel/node_modules/@babel/types/lib/validators/isBinding.js
  26836. var require_isBinding2 = __commonJS({
  26837. "node_modules/estree-to-babel/node_modules/@babel/types/lib/validators/isBinding.js"(exports) {
  26838. "use strict";
  26839. Object.defineProperty(exports, "__esModule", {
  26840. value: true
  26841. });
  26842. exports.default = isBinding;
  26843. var _getBindingIdentifiers = require_getBindingIdentifiers2();
  26844. function isBinding(node, parent, grandparent) {
  26845. if (grandparent && node.type === "Identifier" && parent.type === "ObjectProperty" && grandparent.type === "ObjectExpression") {
  26846. return false;
  26847. }
  26848. const keys2 = _getBindingIdentifiers.default.keys[parent.type];
  26849. if (keys2) {
  26850. for (let i = 0; i < keys2.length; i++) {
  26851. const key = keys2[i];
  26852. const val = parent[key];
  26853. if (Array.isArray(val)) {
  26854. if (val.indexOf(node) >= 0)
  26855. return true;
  26856. } else {
  26857. if (val === node)
  26858. return true;
  26859. }
  26860. }
  26861. }
  26862. return false;
  26863. }
  26864. }
  26865. });
  26866. // node_modules/estree-to-babel/node_modules/@babel/types/lib/validators/isLet.js
  26867. var require_isLet2 = __commonJS({
  26868. "node_modules/estree-to-babel/node_modules/@babel/types/lib/validators/isLet.js"(exports) {
  26869. "use strict";
  26870. Object.defineProperty(exports, "__esModule", {
  26871. value: true
  26872. });
  26873. exports.default = isLet;
  26874. var _generated = require_generated6();
  26875. var _constants = require_constants2();
  26876. function isLet(node) {
  26877. return (0, _generated.isVariableDeclaration)(node) && (node.kind !== "var" || node[_constants.BLOCK_SCOPED_SYMBOL]);
  26878. }
  26879. }
  26880. });
  26881. // node_modules/estree-to-babel/node_modules/@babel/types/lib/validators/isBlockScoped.js
  26882. var require_isBlockScoped2 = __commonJS({
  26883. "node_modules/estree-to-babel/node_modules/@babel/types/lib/validators/isBlockScoped.js"(exports) {
  26884. "use strict";
  26885. Object.defineProperty(exports, "__esModule", {
  26886. value: true
  26887. });
  26888. exports.default = isBlockScoped;
  26889. var _generated = require_generated6();
  26890. var _isLet = require_isLet2();
  26891. function isBlockScoped(node) {
  26892. return (0, _generated.isFunctionDeclaration)(node) || (0, _generated.isClassDeclaration)(node) || (0, _isLet.default)(node);
  26893. }
  26894. }
  26895. });
  26896. // node_modules/estree-to-babel/node_modules/@babel/types/lib/validators/isImmutable.js
  26897. var require_isImmutable2 = __commonJS({
  26898. "node_modules/estree-to-babel/node_modules/@babel/types/lib/validators/isImmutable.js"(exports) {
  26899. "use strict";
  26900. Object.defineProperty(exports, "__esModule", {
  26901. value: true
  26902. });
  26903. exports.default = isImmutable;
  26904. var _isType = require_isType2();
  26905. var _generated = require_generated6();
  26906. function isImmutable(node) {
  26907. if ((0, _isType.default)(node.type, "Immutable"))
  26908. return true;
  26909. if ((0, _generated.isIdentifier)(node)) {
  26910. if (node.name === "undefined") {
  26911. return true;
  26912. } else {
  26913. return false;
  26914. }
  26915. }
  26916. return false;
  26917. }
  26918. }
  26919. });
  26920. // node_modules/estree-to-babel/node_modules/@babel/types/lib/validators/isNodesEquivalent.js
  26921. var require_isNodesEquivalent2 = __commonJS({
  26922. "node_modules/estree-to-babel/node_modules/@babel/types/lib/validators/isNodesEquivalent.js"(exports) {
  26923. "use strict";
  26924. Object.defineProperty(exports, "__esModule", {
  26925. value: true
  26926. });
  26927. exports.default = isNodesEquivalent;
  26928. var _definitions = require_definitions2();
  26929. function isNodesEquivalent(a, b) {
  26930. if (typeof a !== "object" || typeof b !== "object" || a == null || b == null) {
  26931. return a === b;
  26932. }
  26933. if (a.type !== b.type) {
  26934. return false;
  26935. }
  26936. const fields = Object.keys(_definitions.NODE_FIELDS[a.type] || a.type);
  26937. const visitorKeys = _definitions.VISITOR_KEYS[a.type];
  26938. for (const field of fields) {
  26939. if (typeof a[field] !== typeof b[field]) {
  26940. return false;
  26941. }
  26942. if (a[field] == null && b[field] == null) {
  26943. continue;
  26944. } else if (a[field] == null || b[field] == null) {
  26945. return false;
  26946. }
  26947. if (Array.isArray(a[field])) {
  26948. if (!Array.isArray(b[field])) {
  26949. return false;
  26950. }
  26951. if (a[field].length !== b[field].length) {
  26952. return false;
  26953. }
  26954. for (let i = 0; i < a[field].length; i++) {
  26955. if (!isNodesEquivalent(a[field][i], b[field][i])) {
  26956. return false;
  26957. }
  26958. }
  26959. continue;
  26960. }
  26961. if (typeof a[field] === "object" && !(visitorKeys != null && visitorKeys.includes(field))) {
  26962. for (const key of Object.keys(a[field])) {
  26963. if (a[field][key] !== b[field][key]) {
  26964. return false;
  26965. }
  26966. }
  26967. continue;
  26968. }
  26969. if (!isNodesEquivalent(a[field], b[field])) {
  26970. return false;
  26971. }
  26972. }
  26973. return true;
  26974. }
  26975. }
  26976. });
  26977. // node_modules/estree-to-babel/node_modules/@babel/types/lib/validators/isReferenced.js
  26978. var require_isReferenced2 = __commonJS({
  26979. "node_modules/estree-to-babel/node_modules/@babel/types/lib/validators/isReferenced.js"(exports) {
  26980. "use strict";
  26981. Object.defineProperty(exports, "__esModule", {
  26982. value: true
  26983. });
  26984. exports.default = isReferenced;
  26985. function isReferenced(node, parent, grandparent) {
  26986. switch (parent.type) {
  26987. case "MemberExpression":
  26988. case "JSXMemberExpression":
  26989. case "OptionalMemberExpression":
  26990. if (parent.property === node) {
  26991. return !!parent.computed;
  26992. }
  26993. return parent.object === node;
  26994. case "VariableDeclarator":
  26995. return parent.init === node;
  26996. case "ArrowFunctionExpression":
  26997. return parent.body === node;
  26998. case "PrivateName":
  26999. return false;
  27000. case "ClassMethod":
  27001. case "ClassPrivateMethod":
  27002. case "ObjectMethod":
  27003. if (parent.params.includes(node)) {
  27004. return false;
  27005. }
  27006. case "ObjectProperty":
  27007. case "ClassProperty":
  27008. case "ClassPrivateProperty":
  27009. if (parent.key === node) {
  27010. return !!parent.computed;
  27011. }
  27012. if (parent.value === node) {
  27013. return !grandparent || grandparent.type !== "ObjectPattern";
  27014. }
  27015. return true;
  27016. case "ClassDeclaration":
  27017. case "ClassExpression":
  27018. return parent.superClass === node;
  27019. case "AssignmentExpression":
  27020. return parent.right === node;
  27021. case "AssignmentPattern":
  27022. return parent.right === node;
  27023. case "LabeledStatement":
  27024. return false;
  27025. case "CatchClause":
  27026. return false;
  27027. case "RestElement":
  27028. return false;
  27029. case "BreakStatement":
  27030. case "ContinueStatement":
  27031. return false;
  27032. case "FunctionDeclaration":
  27033. case "FunctionExpression":
  27034. return false;
  27035. case "ExportNamespaceSpecifier":
  27036. case "ExportDefaultSpecifier":
  27037. return false;
  27038. case "ExportSpecifier":
  27039. if (grandparent != null && grandparent.source) {
  27040. return false;
  27041. }
  27042. return parent.local === node;
  27043. case "ImportDefaultSpecifier":
  27044. case "ImportNamespaceSpecifier":
  27045. case "ImportSpecifier":
  27046. return false;
  27047. case "JSXAttribute":
  27048. return false;
  27049. case "ObjectPattern":
  27050. case "ArrayPattern":
  27051. return false;
  27052. case "MetaProperty":
  27053. return false;
  27054. case "ObjectTypeProperty":
  27055. return parent.key !== node;
  27056. case "TSEnumMember":
  27057. return parent.id !== node;
  27058. case "TSPropertySignature":
  27059. if (parent.key === node) {
  27060. return !!parent.computed;
  27061. }
  27062. return true;
  27063. }
  27064. return true;
  27065. }
  27066. }
  27067. });
  27068. // node_modules/estree-to-babel/node_modules/@babel/types/lib/validators/isScope.js
  27069. var require_isScope2 = __commonJS({
  27070. "node_modules/estree-to-babel/node_modules/@babel/types/lib/validators/isScope.js"(exports) {
  27071. "use strict";
  27072. Object.defineProperty(exports, "__esModule", {
  27073. value: true
  27074. });
  27075. exports.default = isScope;
  27076. var _generated = require_generated6();
  27077. function isScope(node, parent) {
  27078. if ((0, _generated.isBlockStatement)(node) && ((0, _generated.isFunction)(parent) || (0, _generated.isCatchClause)(parent))) {
  27079. return false;
  27080. }
  27081. if ((0, _generated.isPattern)(node) && ((0, _generated.isFunction)(parent) || (0, _generated.isCatchClause)(parent))) {
  27082. return true;
  27083. }
  27084. return (0, _generated.isScopable)(node);
  27085. }
  27086. }
  27087. });
  27088. // node_modules/estree-to-babel/node_modules/@babel/types/lib/validators/isSpecifierDefault.js
  27089. var require_isSpecifierDefault2 = __commonJS({
  27090. "node_modules/estree-to-babel/node_modules/@babel/types/lib/validators/isSpecifierDefault.js"(exports) {
  27091. "use strict";
  27092. Object.defineProperty(exports, "__esModule", {
  27093. value: true
  27094. });
  27095. exports.default = isSpecifierDefault;
  27096. var _generated = require_generated6();
  27097. function isSpecifierDefault(specifier) {
  27098. return (0, _generated.isImportDefaultSpecifier)(specifier) || (0, _generated.isIdentifier)(specifier.imported || specifier.exported, {
  27099. name: "default"
  27100. });
  27101. }
  27102. }
  27103. });
  27104. // node_modules/estree-to-babel/node_modules/@babel/types/lib/validators/isValidES3Identifier.js
  27105. var require_isValidES3Identifier2 = __commonJS({
  27106. "node_modules/estree-to-babel/node_modules/@babel/types/lib/validators/isValidES3Identifier.js"(exports) {
  27107. "use strict";
  27108. Object.defineProperty(exports, "__esModule", {
  27109. value: true
  27110. });
  27111. exports.default = isValidES3Identifier;
  27112. var _isValidIdentifier = require_isValidIdentifier2();
  27113. var RESERVED_WORDS_ES3_ONLY = /* @__PURE__ */ new Set(["abstract", "boolean", "byte", "char", "double", "enum", "final", "float", "goto", "implements", "int", "interface", "long", "native", "package", "private", "protected", "public", "short", "static", "synchronized", "throws", "transient", "volatile"]);
  27114. function isValidES3Identifier(name2) {
  27115. return (0, _isValidIdentifier.default)(name2) && !RESERVED_WORDS_ES3_ONLY.has(name2);
  27116. }
  27117. }
  27118. });
  27119. // node_modules/estree-to-babel/node_modules/@babel/types/lib/validators/isVar.js
  27120. var require_isVar2 = __commonJS({
  27121. "node_modules/estree-to-babel/node_modules/@babel/types/lib/validators/isVar.js"(exports) {
  27122. "use strict";
  27123. Object.defineProperty(exports, "__esModule", {
  27124. value: true
  27125. });
  27126. exports.default = isVar;
  27127. var _generated = require_generated6();
  27128. var _constants = require_constants2();
  27129. function isVar(node) {
  27130. return (0, _generated.isVariableDeclaration)(node, {
  27131. kind: "var"
  27132. }) && !node[_constants.BLOCK_SCOPED_SYMBOL];
  27133. }
  27134. }
  27135. });
  27136. // node_modules/estree-to-babel/node_modules/@babel/types/lib/ast-types/generated/index.js
  27137. var require_generated10 = __commonJS({
  27138. "node_modules/estree-to-babel/node_modules/@babel/types/lib/ast-types/generated/index.js"() {
  27139. }
  27140. });
  27141. // node_modules/estree-to-babel/node_modules/@babel/types/lib/index.js
  27142. var require_lib4 = __commonJS({
  27143. "node_modules/estree-to-babel/node_modules/@babel/types/lib/index.js"(exports) {
  27144. "use strict";
  27145. Object.defineProperty(exports, "__esModule", {
  27146. value: true
  27147. });
  27148. var _exportNames = {
  27149. react: true,
  27150. assertNode: true,
  27151. createTypeAnnotationBasedOnTypeof: true,
  27152. createUnionTypeAnnotation: true,
  27153. createFlowUnionType: true,
  27154. createTSUnionType: true,
  27155. cloneNode: true,
  27156. clone: true,
  27157. cloneDeep: true,
  27158. cloneDeepWithoutLoc: true,
  27159. cloneWithoutLoc: true,
  27160. addComment: true,
  27161. addComments: true,
  27162. inheritInnerComments: true,
  27163. inheritLeadingComments: true,
  27164. inheritsComments: true,
  27165. inheritTrailingComments: true,
  27166. removeComments: true,
  27167. ensureBlock: true,
  27168. toBindingIdentifierName: true,
  27169. toBlock: true,
  27170. toComputedKey: true,
  27171. toExpression: true,
  27172. toIdentifier: true,
  27173. toKeyAlias: true,
  27174. toSequenceExpression: true,
  27175. toStatement: true,
  27176. valueToNode: true,
  27177. appendToMemberExpression: true,
  27178. inherits: true,
  27179. prependToMemberExpression: true,
  27180. removeProperties: true,
  27181. removePropertiesDeep: true,
  27182. removeTypeDuplicates: true,
  27183. getBindingIdentifiers: true,
  27184. getOuterBindingIdentifiers: true,
  27185. traverse: true,
  27186. traverseFast: true,
  27187. shallowEqual: true,
  27188. is: true,
  27189. isBinding: true,
  27190. isBlockScoped: true,
  27191. isImmutable: true,
  27192. isLet: true,
  27193. isNode: true,
  27194. isNodesEquivalent: true,
  27195. isPlaceholderType: true,
  27196. isReferenced: true,
  27197. isScope: true,
  27198. isSpecifierDefault: true,
  27199. isType: true,
  27200. isValidES3Identifier: true,
  27201. isValidIdentifier: true,
  27202. isVar: true,
  27203. matchesPattern: true,
  27204. validate: true,
  27205. buildMatchMemberExpression: true
  27206. };
  27207. Object.defineProperty(exports, "assertNode", {
  27208. enumerable: true,
  27209. get: function() {
  27210. return _assertNode.default;
  27211. }
  27212. });
  27213. Object.defineProperty(exports, "createTypeAnnotationBasedOnTypeof", {
  27214. enumerable: true,
  27215. get: function() {
  27216. return _createTypeAnnotationBasedOnTypeof.default;
  27217. }
  27218. });
  27219. Object.defineProperty(exports, "createUnionTypeAnnotation", {
  27220. enumerable: true,
  27221. get: function() {
  27222. return _createFlowUnionType.default;
  27223. }
  27224. });
  27225. Object.defineProperty(exports, "createFlowUnionType", {
  27226. enumerable: true,
  27227. get: function() {
  27228. return _createFlowUnionType.default;
  27229. }
  27230. });
  27231. Object.defineProperty(exports, "createTSUnionType", {
  27232. enumerable: true,
  27233. get: function() {
  27234. return _createTSUnionType.default;
  27235. }
  27236. });
  27237. Object.defineProperty(exports, "cloneNode", {
  27238. enumerable: true,
  27239. get: function() {
  27240. return _cloneNode.default;
  27241. }
  27242. });
  27243. Object.defineProperty(exports, "clone", {
  27244. enumerable: true,
  27245. get: function() {
  27246. return _clone.default;
  27247. }
  27248. });
  27249. Object.defineProperty(exports, "cloneDeep", {
  27250. enumerable: true,
  27251. get: function() {
  27252. return _cloneDeep.default;
  27253. }
  27254. });
  27255. Object.defineProperty(exports, "cloneDeepWithoutLoc", {
  27256. enumerable: true,
  27257. get: function() {
  27258. return _cloneDeepWithoutLoc.default;
  27259. }
  27260. });
  27261. Object.defineProperty(exports, "cloneWithoutLoc", {
  27262. enumerable: true,
  27263. get: function() {
  27264. return _cloneWithoutLoc.default;
  27265. }
  27266. });
  27267. Object.defineProperty(exports, "addComment", {
  27268. enumerable: true,
  27269. get: function() {
  27270. return _addComment.default;
  27271. }
  27272. });
  27273. Object.defineProperty(exports, "addComments", {
  27274. enumerable: true,
  27275. get: function() {
  27276. return _addComments.default;
  27277. }
  27278. });
  27279. Object.defineProperty(exports, "inheritInnerComments", {
  27280. enumerable: true,
  27281. get: function() {
  27282. return _inheritInnerComments.default;
  27283. }
  27284. });
  27285. Object.defineProperty(exports, "inheritLeadingComments", {
  27286. enumerable: true,
  27287. get: function() {
  27288. return _inheritLeadingComments.default;
  27289. }
  27290. });
  27291. Object.defineProperty(exports, "inheritsComments", {
  27292. enumerable: true,
  27293. get: function() {
  27294. return _inheritsComments.default;
  27295. }
  27296. });
  27297. Object.defineProperty(exports, "inheritTrailingComments", {
  27298. enumerable: true,
  27299. get: function() {
  27300. return _inheritTrailingComments.default;
  27301. }
  27302. });
  27303. Object.defineProperty(exports, "removeComments", {
  27304. enumerable: true,
  27305. get: function() {
  27306. return _removeComments.default;
  27307. }
  27308. });
  27309. Object.defineProperty(exports, "ensureBlock", {
  27310. enumerable: true,
  27311. get: function() {
  27312. return _ensureBlock.default;
  27313. }
  27314. });
  27315. Object.defineProperty(exports, "toBindingIdentifierName", {
  27316. enumerable: true,
  27317. get: function() {
  27318. return _toBindingIdentifierName.default;
  27319. }
  27320. });
  27321. Object.defineProperty(exports, "toBlock", {
  27322. enumerable: true,
  27323. get: function() {
  27324. return _toBlock.default;
  27325. }
  27326. });
  27327. Object.defineProperty(exports, "toComputedKey", {
  27328. enumerable: true,
  27329. get: function() {
  27330. return _toComputedKey.default;
  27331. }
  27332. });
  27333. Object.defineProperty(exports, "toExpression", {
  27334. enumerable: true,
  27335. get: function() {
  27336. return _toExpression.default;
  27337. }
  27338. });
  27339. Object.defineProperty(exports, "toIdentifier", {
  27340. enumerable: true,
  27341. get: function() {
  27342. return _toIdentifier.default;
  27343. }
  27344. });
  27345. Object.defineProperty(exports, "toKeyAlias", {
  27346. enumerable: true,
  27347. get: function() {
  27348. return _toKeyAlias.default;
  27349. }
  27350. });
  27351. Object.defineProperty(exports, "toSequenceExpression", {
  27352. enumerable: true,
  27353. get: function() {
  27354. return _toSequenceExpression.default;
  27355. }
  27356. });
  27357. Object.defineProperty(exports, "toStatement", {
  27358. enumerable: true,
  27359. get: function() {
  27360. return _toStatement.default;
  27361. }
  27362. });
  27363. Object.defineProperty(exports, "valueToNode", {
  27364. enumerable: true,
  27365. get: function() {
  27366. return _valueToNode.default;
  27367. }
  27368. });
  27369. Object.defineProperty(exports, "appendToMemberExpression", {
  27370. enumerable: true,
  27371. get: function() {
  27372. return _appendToMemberExpression.default;
  27373. }
  27374. });
  27375. Object.defineProperty(exports, "inherits", {
  27376. enumerable: true,
  27377. get: function() {
  27378. return _inherits.default;
  27379. }
  27380. });
  27381. Object.defineProperty(exports, "prependToMemberExpression", {
  27382. enumerable: true,
  27383. get: function() {
  27384. return _prependToMemberExpression.default;
  27385. }
  27386. });
  27387. Object.defineProperty(exports, "removeProperties", {
  27388. enumerable: true,
  27389. get: function() {
  27390. return _removeProperties.default;
  27391. }
  27392. });
  27393. Object.defineProperty(exports, "removePropertiesDeep", {
  27394. enumerable: true,
  27395. get: function() {
  27396. return _removePropertiesDeep.default;
  27397. }
  27398. });
  27399. Object.defineProperty(exports, "removeTypeDuplicates", {
  27400. enumerable: true,
  27401. get: function() {
  27402. return _removeTypeDuplicates.default;
  27403. }
  27404. });
  27405. Object.defineProperty(exports, "getBindingIdentifiers", {
  27406. enumerable: true,
  27407. get: function() {
  27408. return _getBindingIdentifiers.default;
  27409. }
  27410. });
  27411. Object.defineProperty(exports, "getOuterBindingIdentifiers", {
  27412. enumerable: true,
  27413. get: function() {
  27414. return _getOuterBindingIdentifiers.default;
  27415. }
  27416. });
  27417. Object.defineProperty(exports, "traverse", {
  27418. enumerable: true,
  27419. get: function() {
  27420. return _traverse.default;
  27421. }
  27422. });
  27423. Object.defineProperty(exports, "traverseFast", {
  27424. enumerable: true,
  27425. get: function() {
  27426. return _traverseFast.default;
  27427. }
  27428. });
  27429. Object.defineProperty(exports, "shallowEqual", {
  27430. enumerable: true,
  27431. get: function() {
  27432. return _shallowEqual.default;
  27433. }
  27434. });
  27435. Object.defineProperty(exports, "is", {
  27436. enumerable: true,
  27437. get: function() {
  27438. return _is.default;
  27439. }
  27440. });
  27441. Object.defineProperty(exports, "isBinding", {
  27442. enumerable: true,
  27443. get: function() {
  27444. return _isBinding.default;
  27445. }
  27446. });
  27447. Object.defineProperty(exports, "isBlockScoped", {
  27448. enumerable: true,
  27449. get: function() {
  27450. return _isBlockScoped.default;
  27451. }
  27452. });
  27453. Object.defineProperty(exports, "isImmutable", {
  27454. enumerable: true,
  27455. get: function() {
  27456. return _isImmutable.default;
  27457. }
  27458. });
  27459. Object.defineProperty(exports, "isLet", {
  27460. enumerable: true,
  27461. get: function() {
  27462. return _isLet.default;
  27463. }
  27464. });
  27465. Object.defineProperty(exports, "isNode", {
  27466. enumerable: true,
  27467. get: function() {
  27468. return _isNode.default;
  27469. }
  27470. });
  27471. Object.defineProperty(exports, "isNodesEquivalent", {
  27472. enumerable: true,
  27473. get: function() {
  27474. return _isNodesEquivalent.default;
  27475. }
  27476. });
  27477. Object.defineProperty(exports, "isPlaceholderType", {
  27478. enumerable: true,
  27479. get: function() {
  27480. return _isPlaceholderType.default;
  27481. }
  27482. });
  27483. Object.defineProperty(exports, "isReferenced", {
  27484. enumerable: true,
  27485. get: function() {
  27486. return _isReferenced.default;
  27487. }
  27488. });
  27489. Object.defineProperty(exports, "isScope", {
  27490. enumerable: true,
  27491. get: function() {
  27492. return _isScope.default;
  27493. }
  27494. });
  27495. Object.defineProperty(exports, "isSpecifierDefault", {
  27496. enumerable: true,
  27497. get: function() {
  27498. return _isSpecifierDefault.default;
  27499. }
  27500. });
  27501. Object.defineProperty(exports, "isType", {
  27502. enumerable: true,
  27503. get: function() {
  27504. return _isType.default;
  27505. }
  27506. });
  27507. Object.defineProperty(exports, "isValidES3Identifier", {
  27508. enumerable: true,
  27509. get: function() {
  27510. return _isValidES3Identifier.default;
  27511. }
  27512. });
  27513. Object.defineProperty(exports, "isValidIdentifier", {
  27514. enumerable: true,
  27515. get: function() {
  27516. return _isValidIdentifier.default;
  27517. }
  27518. });
  27519. Object.defineProperty(exports, "isVar", {
  27520. enumerable: true,
  27521. get: function() {
  27522. return _isVar.default;
  27523. }
  27524. });
  27525. Object.defineProperty(exports, "matchesPattern", {
  27526. enumerable: true,
  27527. get: function() {
  27528. return _matchesPattern.default;
  27529. }
  27530. });
  27531. Object.defineProperty(exports, "validate", {
  27532. enumerable: true,
  27533. get: function() {
  27534. return _validate.default;
  27535. }
  27536. });
  27537. Object.defineProperty(exports, "buildMatchMemberExpression", {
  27538. enumerable: true,
  27539. get: function() {
  27540. return _buildMatchMemberExpression.default;
  27541. }
  27542. });
  27543. exports.react = void 0;
  27544. var _isReactComponent = require_isReactComponent2();
  27545. var _isCompatTag = require_isCompatTag2();
  27546. var _buildChildren = require_buildChildren2();
  27547. var _assertNode = require_assertNode2();
  27548. var _generated = require_generated8();
  27549. Object.keys(_generated).forEach(function(key) {
  27550. if (key === "default" || key === "__esModule")
  27551. return;
  27552. if (Object.prototype.hasOwnProperty.call(_exportNames, key))
  27553. return;
  27554. if (key in exports && exports[key] === _generated[key])
  27555. return;
  27556. Object.defineProperty(exports, key, {
  27557. enumerable: true,
  27558. get: function() {
  27559. return _generated[key];
  27560. }
  27561. });
  27562. });
  27563. var _createTypeAnnotationBasedOnTypeof = require_createTypeAnnotationBasedOnTypeof2();
  27564. var _createFlowUnionType = require_createFlowUnionType2();
  27565. var _createTSUnionType = require_createTSUnionType2();
  27566. var _generated2 = require_generated7();
  27567. Object.keys(_generated2).forEach(function(key) {
  27568. if (key === "default" || key === "__esModule")
  27569. return;
  27570. if (Object.prototype.hasOwnProperty.call(_exportNames, key))
  27571. return;
  27572. if (key in exports && exports[key] === _generated2[key])
  27573. return;
  27574. Object.defineProperty(exports, key, {
  27575. enumerable: true,
  27576. get: function() {
  27577. return _generated2[key];
  27578. }
  27579. });
  27580. });
  27581. var _uppercase = require_uppercase2();
  27582. Object.keys(_uppercase).forEach(function(key) {
  27583. if (key === "default" || key === "__esModule")
  27584. return;
  27585. if (Object.prototype.hasOwnProperty.call(_exportNames, key))
  27586. return;
  27587. if (key in exports && exports[key] === _uppercase[key])
  27588. return;
  27589. Object.defineProperty(exports, key, {
  27590. enumerable: true,
  27591. get: function() {
  27592. return _uppercase[key];
  27593. }
  27594. });
  27595. });
  27596. var _cloneNode = require_cloneNode2();
  27597. var _clone = require_clone2();
  27598. var _cloneDeep = require_cloneDeep2();
  27599. var _cloneDeepWithoutLoc = require_cloneDeepWithoutLoc2();
  27600. var _cloneWithoutLoc = require_cloneWithoutLoc2();
  27601. var _addComment = require_addComment2();
  27602. var _addComments = require_addComments2();
  27603. var _inheritInnerComments = require_inheritInnerComments2();
  27604. var _inheritLeadingComments = require_inheritLeadingComments2();
  27605. var _inheritsComments = require_inheritsComments2();
  27606. var _inheritTrailingComments = require_inheritTrailingComments2();
  27607. var _removeComments = require_removeComments2();
  27608. var _generated3 = require_generated9();
  27609. Object.keys(_generated3).forEach(function(key) {
  27610. if (key === "default" || key === "__esModule")
  27611. return;
  27612. if (Object.prototype.hasOwnProperty.call(_exportNames, key))
  27613. return;
  27614. if (key in exports && exports[key] === _generated3[key])
  27615. return;
  27616. Object.defineProperty(exports, key, {
  27617. enumerable: true,
  27618. get: function() {
  27619. return _generated3[key];
  27620. }
  27621. });
  27622. });
  27623. var _constants = require_constants2();
  27624. Object.keys(_constants).forEach(function(key) {
  27625. if (key === "default" || key === "__esModule")
  27626. return;
  27627. if (Object.prototype.hasOwnProperty.call(_exportNames, key))
  27628. return;
  27629. if (key in exports && exports[key] === _constants[key])
  27630. return;
  27631. Object.defineProperty(exports, key, {
  27632. enumerable: true,
  27633. get: function() {
  27634. return _constants[key];
  27635. }
  27636. });
  27637. });
  27638. var _ensureBlock = require_ensureBlock2();
  27639. var _toBindingIdentifierName = require_toBindingIdentifierName2();
  27640. var _toBlock = require_toBlock2();
  27641. var _toComputedKey = require_toComputedKey2();
  27642. var _toExpression = require_toExpression2();
  27643. var _toIdentifier = require_toIdentifier2();
  27644. var _toKeyAlias = require_toKeyAlias2();
  27645. var _toSequenceExpression = require_toSequenceExpression2();
  27646. var _toStatement = require_toStatement2();
  27647. var _valueToNode = require_valueToNode2();
  27648. var _definitions = require_definitions2();
  27649. Object.keys(_definitions).forEach(function(key) {
  27650. if (key === "default" || key === "__esModule")
  27651. return;
  27652. if (Object.prototype.hasOwnProperty.call(_exportNames, key))
  27653. return;
  27654. if (key in exports && exports[key] === _definitions[key])
  27655. return;
  27656. Object.defineProperty(exports, key, {
  27657. enumerable: true,
  27658. get: function() {
  27659. return _definitions[key];
  27660. }
  27661. });
  27662. });
  27663. var _appendToMemberExpression = require_appendToMemberExpression2();
  27664. var _inherits = require_inherits2();
  27665. var _prependToMemberExpression = require_prependToMemberExpression2();
  27666. var _removeProperties = require_removeProperties2();
  27667. var _removePropertiesDeep = require_removePropertiesDeep2();
  27668. var _removeTypeDuplicates = require_removeTypeDuplicates3();
  27669. var _getBindingIdentifiers = require_getBindingIdentifiers2();
  27670. var _getOuterBindingIdentifiers = require_getOuterBindingIdentifiers2();
  27671. var _traverse = require_traverse2();
  27672. Object.keys(_traverse).forEach(function(key) {
  27673. if (key === "default" || key === "__esModule")
  27674. return;
  27675. if (Object.prototype.hasOwnProperty.call(_exportNames, key))
  27676. return;
  27677. if (key in exports && exports[key] === _traverse[key])
  27678. return;
  27679. Object.defineProperty(exports, key, {
  27680. enumerable: true,
  27681. get: function() {
  27682. return _traverse[key];
  27683. }
  27684. });
  27685. });
  27686. var _traverseFast = require_traverseFast2();
  27687. var _shallowEqual = require_shallowEqual2();
  27688. var _is = require_is2();
  27689. var _isBinding = require_isBinding2();
  27690. var _isBlockScoped = require_isBlockScoped2();
  27691. var _isImmutable = require_isImmutable2();
  27692. var _isLet = require_isLet2();
  27693. var _isNode = require_isNode2();
  27694. var _isNodesEquivalent = require_isNodesEquivalent2();
  27695. var _isPlaceholderType = require_isPlaceholderType2();
  27696. var _isReferenced = require_isReferenced2();
  27697. var _isScope = require_isScope2();
  27698. var _isSpecifierDefault = require_isSpecifierDefault2();
  27699. var _isType = require_isType2();
  27700. var _isValidES3Identifier = require_isValidES3Identifier2();
  27701. var _isValidIdentifier = require_isValidIdentifier2();
  27702. var _isVar = require_isVar2();
  27703. var _matchesPattern = require_matchesPattern2();
  27704. var _validate = require_validate2();
  27705. var _buildMatchMemberExpression = require_buildMatchMemberExpression2();
  27706. var _generated4 = require_generated6();
  27707. Object.keys(_generated4).forEach(function(key) {
  27708. if (key === "default" || key === "__esModule")
  27709. return;
  27710. if (Object.prototype.hasOwnProperty.call(_exportNames, key))
  27711. return;
  27712. if (key in exports && exports[key] === _generated4[key])
  27713. return;
  27714. Object.defineProperty(exports, key, {
  27715. enumerable: true,
  27716. get: function() {
  27717. return _generated4[key];
  27718. }
  27719. });
  27720. });
  27721. var _generated5 = require_generated10();
  27722. Object.keys(_generated5).forEach(function(key) {
  27723. if (key === "default" || key === "__esModule")
  27724. return;
  27725. if (Object.prototype.hasOwnProperty.call(_exportNames, key))
  27726. return;
  27727. if (key in exports && exports[key] === _generated5[key])
  27728. return;
  27729. Object.defineProperty(exports, key, {
  27730. enumerable: true,
  27731. get: function() {
  27732. return _generated5[key];
  27733. }
  27734. });
  27735. });
  27736. var react = {
  27737. isReactComponent: _isReactComponent.default,
  27738. isCompatTag: _isCompatTag.default,
  27739. buildChildren: _buildChildren.default
  27740. };
  27741. exports.react = react;
  27742. }
  27743. });
  27744. // node_modules/estree-to-babel/node_modules/@babel/traverse/lib/path/lib/virtual-types.js
  27745. var require_virtual_types = __commonJS({
  27746. "node_modules/estree-to-babel/node_modules/@babel/traverse/lib/path/lib/virtual-types.js"(exports) {
  27747. "use strict";
  27748. Object.defineProperty(exports, "__esModule", {
  27749. value: true
  27750. });
  27751. exports.ForAwaitStatement = exports.NumericLiteralTypeAnnotation = exports.ExistentialTypeParam = exports.SpreadProperty = exports.RestProperty = exports.Flow = exports.Pure = exports.Generated = exports.User = exports.Var = exports.BlockScoped = exports.Referenced = exports.Scope = exports.Expression = exports.Statement = exports.BindingIdentifier = exports.ReferencedMemberExpression = exports.ReferencedIdentifier = void 0;
  27752. var t2 = require_lib4();
  27753. var ReferencedIdentifier = {
  27754. types: ["Identifier", "JSXIdentifier"],
  27755. checkPath(path, opts) {
  27756. const {
  27757. node,
  27758. parent
  27759. } = path;
  27760. if (!t2.isIdentifier(node, opts) && !t2.isJSXMemberExpression(parent, opts)) {
  27761. if (t2.isJSXIdentifier(node, opts)) {
  27762. if (t2.react.isCompatTag(node.name))
  27763. return false;
  27764. } else {
  27765. return false;
  27766. }
  27767. }
  27768. return t2.isReferenced(node, parent, path.parentPath.parent);
  27769. }
  27770. };
  27771. exports.ReferencedIdentifier = ReferencedIdentifier;
  27772. var ReferencedMemberExpression = {
  27773. types: ["MemberExpression"],
  27774. checkPath({
  27775. node,
  27776. parent
  27777. }) {
  27778. return t2.isMemberExpression(node) && t2.isReferenced(node, parent);
  27779. }
  27780. };
  27781. exports.ReferencedMemberExpression = ReferencedMemberExpression;
  27782. var BindingIdentifier = {
  27783. types: ["Identifier"],
  27784. checkPath(path) {
  27785. const {
  27786. node,
  27787. parent
  27788. } = path;
  27789. const grandparent = path.parentPath.parent;
  27790. return t2.isIdentifier(node) && t2.isBinding(node, parent, grandparent);
  27791. }
  27792. };
  27793. exports.BindingIdentifier = BindingIdentifier;
  27794. var Statement = {
  27795. types: ["Statement"],
  27796. checkPath({
  27797. node,
  27798. parent
  27799. }) {
  27800. if (t2.isStatement(node)) {
  27801. if (t2.isVariableDeclaration(node)) {
  27802. if (t2.isForXStatement(parent, {
  27803. left: node
  27804. }))
  27805. return false;
  27806. if (t2.isForStatement(parent, {
  27807. init: node
  27808. }))
  27809. return false;
  27810. }
  27811. return true;
  27812. } else {
  27813. return false;
  27814. }
  27815. }
  27816. };
  27817. exports.Statement = Statement;
  27818. var Expression = {
  27819. types: ["Expression"],
  27820. checkPath(path) {
  27821. if (path.isIdentifier()) {
  27822. return path.isReferencedIdentifier();
  27823. } else {
  27824. return t2.isExpression(path.node);
  27825. }
  27826. }
  27827. };
  27828. exports.Expression = Expression;
  27829. var Scope4 = {
  27830. types: ["Scopable", "Pattern"],
  27831. checkPath(path) {
  27832. return t2.isScope(path.node, path.parent);
  27833. }
  27834. };
  27835. exports.Scope = Scope4;
  27836. var Referenced = {
  27837. checkPath(path) {
  27838. return t2.isReferenced(path.node, path.parent);
  27839. }
  27840. };
  27841. exports.Referenced = Referenced;
  27842. var BlockScoped = {
  27843. checkPath(path) {
  27844. return t2.isBlockScoped(path.node);
  27845. }
  27846. };
  27847. exports.BlockScoped = BlockScoped;
  27848. var Var = {
  27849. types: ["VariableDeclaration"],
  27850. checkPath(path) {
  27851. return t2.isVar(path.node);
  27852. }
  27853. };
  27854. exports.Var = Var;
  27855. var User = {
  27856. checkPath(path) {
  27857. return path.node && !!path.node.loc;
  27858. }
  27859. };
  27860. exports.User = User;
  27861. var Generated = {
  27862. checkPath(path) {
  27863. return !path.isUser();
  27864. }
  27865. };
  27866. exports.Generated = Generated;
  27867. var Pure = {
  27868. checkPath(path, opts) {
  27869. return path.scope.isPure(path.node, opts);
  27870. }
  27871. };
  27872. exports.Pure = Pure;
  27873. var Flow = {
  27874. types: ["Flow", "ImportDeclaration", "ExportDeclaration", "ImportSpecifier"],
  27875. checkPath({
  27876. node
  27877. }) {
  27878. if (t2.isFlow(node)) {
  27879. return true;
  27880. } else if (t2.isImportDeclaration(node)) {
  27881. return node.importKind === "type" || node.importKind === "typeof";
  27882. } else if (t2.isExportDeclaration(node)) {
  27883. return node.exportKind === "type";
  27884. } else if (t2.isImportSpecifier(node)) {
  27885. return node.importKind === "type" || node.importKind === "typeof";
  27886. } else {
  27887. return false;
  27888. }
  27889. }
  27890. };
  27891. exports.Flow = Flow;
  27892. var RestProperty = {
  27893. types: ["RestElement"],
  27894. checkPath(path) {
  27895. return path.parentPath && path.parentPath.isObjectPattern();
  27896. }
  27897. };
  27898. exports.RestProperty = RestProperty;
  27899. var SpreadProperty = {
  27900. types: ["RestElement"],
  27901. checkPath(path) {
  27902. return path.parentPath && path.parentPath.isObjectExpression();
  27903. }
  27904. };
  27905. exports.SpreadProperty = SpreadProperty;
  27906. var ExistentialTypeParam = {
  27907. types: ["ExistsTypeAnnotation"]
  27908. };
  27909. exports.ExistentialTypeParam = ExistentialTypeParam;
  27910. var NumericLiteralTypeAnnotation = {
  27911. types: ["NumberLiteralTypeAnnotation"]
  27912. };
  27913. exports.NumericLiteralTypeAnnotation = NumericLiteralTypeAnnotation;
  27914. var ForAwaitStatement = {
  27915. types: ["ForOfStatement"],
  27916. checkPath({
  27917. node
  27918. }) {
  27919. return node.await === true;
  27920. }
  27921. };
  27922. exports.ForAwaitStatement = ForAwaitStatement;
  27923. }
  27924. });
  27925. // node_modules/ms/index.js
  27926. var require_ms = __commonJS({
  27927. "node_modules/ms/index.js"(exports, module) {
  27928. var s = 1e3;
  27929. var m = s * 60;
  27930. var h = m * 60;
  27931. var d = h * 24;
  27932. var w = d * 7;
  27933. var y = d * 365.25;
  27934. module.exports = function(val, options) {
  27935. options = options || {};
  27936. var type = typeof val;
  27937. if (type === "string" && val.length > 0) {
  27938. return parse4(val);
  27939. } else if (type === "number" && isFinite(val)) {
  27940. return options.long ? fmtLong(val) : fmtShort(val);
  27941. }
  27942. throw new Error(
  27943. "val is not a non-empty string or a valid number. val=" + JSON.stringify(val)
  27944. );
  27945. };
  27946. function parse4(str) {
  27947. str = String(str);
  27948. if (str.length > 100) {
  27949. return;
  27950. }
  27951. var match = /^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(
  27952. str
  27953. );
  27954. if (!match) {
  27955. return;
  27956. }
  27957. var n = parseFloat(match[1]);
  27958. var type = (match[2] || "ms").toLowerCase();
  27959. switch (type) {
  27960. case "years":
  27961. case "year":
  27962. case "yrs":
  27963. case "yr":
  27964. case "y":
  27965. return n * y;
  27966. case "weeks":
  27967. case "week":
  27968. case "w":
  27969. return n * w;
  27970. case "days":
  27971. case "day":
  27972. case "d":
  27973. return n * d;
  27974. case "hours":
  27975. case "hour":
  27976. case "hrs":
  27977. case "hr":
  27978. case "h":
  27979. return n * h;
  27980. case "minutes":
  27981. case "minute":
  27982. case "mins":
  27983. case "min":
  27984. case "m":
  27985. return n * m;
  27986. case "seconds":
  27987. case "second":
  27988. case "secs":
  27989. case "sec":
  27990. case "s":
  27991. return n * s;
  27992. case "milliseconds":
  27993. case "millisecond":
  27994. case "msecs":
  27995. case "msec":
  27996. case "ms":
  27997. return n;
  27998. default:
  27999. return void 0;
  28000. }
  28001. }
  28002. function fmtShort(ms) {
  28003. var msAbs = Math.abs(ms);
  28004. if (msAbs >= d) {
  28005. return Math.round(ms / d) + "d";
  28006. }
  28007. if (msAbs >= h) {
  28008. return Math.round(ms / h) + "h";
  28009. }
  28010. if (msAbs >= m) {
  28011. return Math.round(ms / m) + "m";
  28012. }
  28013. if (msAbs >= s) {
  28014. return Math.round(ms / s) + "s";
  28015. }
  28016. return ms + "ms";
  28017. }
  28018. function fmtLong(ms) {
  28019. var msAbs = Math.abs(ms);
  28020. if (msAbs >= d) {
  28021. return plural(ms, msAbs, d, "day");
  28022. }
  28023. if (msAbs >= h) {
  28024. return plural(ms, msAbs, h, "hour");
  28025. }
  28026. if (msAbs >= m) {
  28027. return plural(ms, msAbs, m, "minute");
  28028. }
  28029. if (msAbs >= s) {
  28030. return plural(ms, msAbs, s, "second");
  28031. }
  28032. return ms + " ms";
  28033. }
  28034. function plural(ms, msAbs, n, name2) {
  28035. var isPlural = msAbs >= n * 1.5;
  28036. return Math.round(ms / n) + " " + name2 + (isPlural ? "s" : "");
  28037. }
  28038. }
  28039. });
  28040. // node_modules/debug/src/common.js
  28041. var require_common = __commonJS({
  28042. "node_modules/debug/src/common.js"(exports, module) {
  28043. function setup(env) {
  28044. createDebug.debug = createDebug;
  28045. createDebug.default = createDebug;
  28046. createDebug.coerce = coerce;
  28047. createDebug.disable = disable2;
  28048. createDebug.enable = enable;
  28049. createDebug.enabled = enabled;
  28050. createDebug.humanize = require_ms();
  28051. createDebug.destroy = destroy;
  28052. Object.keys(env).forEach((key) => {
  28053. createDebug[key] = env[key];
  28054. });
  28055. createDebug.names = [];
  28056. createDebug.skips = [];
  28057. createDebug.formatters = {};
  28058. function selectColor(namespace) {
  28059. let hash = 0;
  28060. for (let i = 0; i < namespace.length; i++) {
  28061. hash = (hash << 5) - hash + namespace.charCodeAt(i);
  28062. hash |= 0;
  28063. }
  28064. return createDebug.colors[Math.abs(hash) % createDebug.colors.length];
  28065. }
  28066. createDebug.selectColor = selectColor;
  28067. function createDebug(namespace) {
  28068. let prevTime;
  28069. let enableOverride = null;
  28070. function debug(...args) {
  28071. if (!debug.enabled) {
  28072. return;
  28073. }
  28074. const self2 = debug;
  28075. const curr = Number(new Date());
  28076. const ms = curr - (prevTime || curr);
  28077. self2.diff = ms;
  28078. self2.prev = prevTime;
  28079. self2.curr = curr;
  28080. prevTime = curr;
  28081. args[0] = createDebug.coerce(args[0]);
  28082. if (typeof args[0] !== "string") {
  28083. args.unshift("%O");
  28084. }
  28085. let index2 = 0;
  28086. args[0] = args[0].replace(/%([a-zA-Z%])/g, (match, format) => {
  28087. if (match === "%%") {
  28088. return "%";
  28089. }
  28090. index2++;
  28091. const formatter = createDebug.formatters[format];
  28092. if (typeof formatter === "function") {
  28093. const val = args[index2];
  28094. match = formatter.call(self2, val);
  28095. args.splice(index2, 1);
  28096. index2--;
  28097. }
  28098. return match;
  28099. });
  28100. createDebug.formatArgs.call(self2, args);
  28101. const logFn = self2.log || createDebug.log;
  28102. logFn.apply(self2, args);
  28103. }
  28104. debug.namespace = namespace;
  28105. debug.useColors = createDebug.useColors();
  28106. debug.color = createDebug.selectColor(namespace);
  28107. debug.extend = extend3;
  28108. debug.destroy = createDebug.destroy;
  28109. Object.defineProperty(debug, "enabled", {
  28110. enumerable: true,
  28111. configurable: false,
  28112. get: () => enableOverride === null ? createDebug.enabled(namespace) : enableOverride,
  28113. set: (v) => {
  28114. enableOverride = v;
  28115. }
  28116. });
  28117. if (typeof createDebug.init === "function") {
  28118. createDebug.init(debug);
  28119. }
  28120. return debug;
  28121. }
  28122. function extend3(namespace, delimiter) {
  28123. const newDebug = createDebug(this.namespace + (typeof delimiter === "undefined" ? ":" : delimiter) + namespace);
  28124. newDebug.log = this.log;
  28125. return newDebug;
  28126. }
  28127. function enable(namespaces) {
  28128. createDebug.save(namespaces);
  28129. createDebug.names = [];
  28130. createDebug.skips = [];
  28131. let i;
  28132. const split = (typeof namespaces === "string" ? namespaces : "").split(/[\s,]+/);
  28133. const len = split.length;
  28134. for (i = 0; i < len; i++) {
  28135. if (!split[i]) {
  28136. continue;
  28137. }
  28138. namespaces = split[i].replace(/\*/g, ".*?");
  28139. if (namespaces[0] === "-") {
  28140. createDebug.skips.push(new RegExp("^" + namespaces.substr(1) + "$"));
  28141. } else {
  28142. createDebug.names.push(new RegExp("^" + namespaces + "$"));
  28143. }
  28144. }
  28145. }
  28146. function disable2() {
  28147. const namespaces = [
  28148. ...createDebug.names.map(toNamespace),
  28149. ...createDebug.skips.map(toNamespace).map((namespace) => "-" + namespace)
  28150. ].join(",");
  28151. createDebug.enable("");
  28152. return namespaces;
  28153. }
  28154. function enabled(name2) {
  28155. if (name2[name2.length - 1] === "*") {
  28156. return true;
  28157. }
  28158. let i;
  28159. let len;
  28160. for (i = 0, len = createDebug.skips.length; i < len; i++) {
  28161. if (createDebug.skips[i].test(name2)) {
  28162. return false;
  28163. }
  28164. }
  28165. for (i = 0, len = createDebug.names.length; i < len; i++) {
  28166. if (createDebug.names[i].test(name2)) {
  28167. return true;
  28168. }
  28169. }
  28170. return false;
  28171. }
  28172. function toNamespace(regexp) {
  28173. return regexp.toString().substring(2, regexp.toString().length - 2).replace(/\.\*\?$/, "*");
  28174. }
  28175. function coerce(val) {
  28176. if (val instanceof Error) {
  28177. return val.stack || val.message;
  28178. }
  28179. return val;
  28180. }
  28181. function destroy() {
  28182. console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");
  28183. }
  28184. createDebug.enable(createDebug.load());
  28185. return createDebug;
  28186. }
  28187. module.exports = setup;
  28188. }
  28189. });
  28190. // node_modules/debug/src/browser.js
  28191. var require_browser = __commonJS({
  28192. "node_modules/debug/src/browser.js"(exports, module) {
  28193. exports.formatArgs = formatArgs;
  28194. exports.save = save;
  28195. exports.load = load;
  28196. exports.useColors = useColors;
  28197. exports.storage = localstorage();
  28198. exports.destroy = (() => {
  28199. let warned = false;
  28200. return () => {
  28201. if (!warned) {
  28202. warned = true;
  28203. console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");
  28204. }
  28205. };
  28206. })();
  28207. exports.colors = [
  28208. "#0000CC",
  28209. "#0000FF",
  28210. "#0033CC",
  28211. "#0033FF",
  28212. "#0066CC",
  28213. "#0066FF",
  28214. "#0099CC",
  28215. "#0099FF",
  28216. "#00CC00",
  28217. "#00CC33",
  28218. "#00CC66",
  28219. "#00CC99",
  28220. "#00CCCC",
  28221. "#00CCFF",
  28222. "#3300CC",
  28223. "#3300FF",
  28224. "#3333CC",
  28225. "#3333FF",
  28226. "#3366CC",
  28227. "#3366FF",
  28228. "#3399CC",
  28229. "#3399FF",
  28230. "#33CC00",
  28231. "#33CC33",
  28232. "#33CC66",
  28233. "#33CC99",
  28234. "#33CCCC",
  28235. "#33CCFF",
  28236. "#6600CC",
  28237. "#6600FF",
  28238. "#6633CC",
  28239. "#6633FF",
  28240. "#66CC00",
  28241. "#66CC33",
  28242. "#9900CC",
  28243. "#9900FF",
  28244. "#9933CC",
  28245. "#9933FF",
  28246. "#99CC00",
  28247. "#99CC33",
  28248. "#CC0000",
  28249. "#CC0033",
  28250. "#CC0066",
  28251. "#CC0099",
  28252. "#CC00CC",
  28253. "#CC00FF",
  28254. "#CC3300",
  28255. "#CC3333",
  28256. "#CC3366",
  28257. "#CC3399",
  28258. "#CC33CC",
  28259. "#CC33FF",
  28260. "#CC6600",
  28261. "#CC6633",
  28262. "#CC9900",
  28263. "#CC9933",
  28264. "#CCCC00",
  28265. "#CCCC33",
  28266. "#FF0000",
  28267. "#FF0033",
  28268. "#FF0066",
  28269. "#FF0099",
  28270. "#FF00CC",
  28271. "#FF00FF",
  28272. "#FF3300",
  28273. "#FF3333",
  28274. "#FF3366",
  28275. "#FF3399",
  28276. "#FF33CC",
  28277. "#FF33FF",
  28278. "#FF6600",
  28279. "#FF6633",
  28280. "#FF9900",
  28281. "#FF9933",
  28282. "#FFCC00",
  28283. "#FFCC33"
  28284. ];
  28285. function useColors() {
  28286. if (typeof window !== "undefined" && window.process && (window.process.type === "renderer" || window.process.__nwjs)) {
  28287. return true;
  28288. }
  28289. if (typeof navigator !== "undefined" && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)) {
  28290. return false;
  28291. }
  28292. return typeof document !== "undefined" && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance || typeof window !== "undefined" && window.console && (window.console.firebug || window.console.exception && window.console.table) || typeof navigator !== "undefined" && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/) && parseInt(RegExp.$1, 10) >= 31 || typeof navigator !== "undefined" && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/);
  28293. }
  28294. function formatArgs(args) {
  28295. args[0] = (this.useColors ? "%c" : "") + this.namespace + (this.useColors ? " %c" : " ") + args[0] + (this.useColors ? "%c " : " ") + "+" + module.exports.humanize(this.diff);
  28296. if (!this.useColors) {
  28297. return;
  28298. }
  28299. const c = "color: " + this.color;
  28300. args.splice(1, 0, c, "color: inherit");
  28301. let index2 = 0;
  28302. let lastC = 0;
  28303. args[0].replace(/%[a-zA-Z%]/g, (match) => {
  28304. if (match === "%%") {
  28305. return;
  28306. }
  28307. index2++;
  28308. if (match === "%c") {
  28309. lastC = index2;
  28310. }
  28311. });
  28312. args.splice(lastC, 0, c);
  28313. }
  28314. exports.log = console.debug || console.log || (() => {
  28315. });
  28316. function save(namespaces) {
  28317. try {
  28318. if (namespaces) {
  28319. exports.storage.setItem("debug", namespaces);
  28320. } else {
  28321. exports.storage.removeItem("debug");
  28322. }
  28323. } catch (error) {
  28324. }
  28325. }
  28326. function load() {
  28327. let r;
  28328. try {
  28329. r = exports.storage.getItem("debug");
  28330. } catch (error) {
  28331. }
  28332. if (!r && typeof process !== "undefined" && "env" in process) {
  28333. r = process.env.DEBUG;
  28334. }
  28335. return r;
  28336. }
  28337. function localstorage() {
  28338. try {
  28339. return localStorage;
  28340. } catch (error) {
  28341. }
  28342. }
  28343. module.exports = require_common()(exports);
  28344. var { formatters } = module.exports;
  28345. formatters.j = function(v) {
  28346. try {
  28347. return JSON.stringify(v);
  28348. } catch (error) {
  28349. return "[UnexpectedJSONParseError]: " + error.message;
  28350. }
  28351. };
  28352. }
  28353. });
  28354. // node_modules/has-flag/index.js
  28355. var require_has_flag = __commonJS({
  28356. "node_modules/has-flag/index.js"(exports, module) {
  28357. "use strict";
  28358. module.exports = (flag, argv = process.argv) => {
  28359. const prefix = flag.startsWith("-") ? "" : flag.length === 1 ? "-" : "--";
  28360. const position3 = argv.indexOf(prefix + flag);
  28361. const terminatorPosition = argv.indexOf("--");
  28362. return position3 !== -1 && (terminatorPosition === -1 || position3 < terminatorPosition);
  28363. };
  28364. }
  28365. });
  28366. // node_modules/supports-color/index.js
  28367. var require_supports_color = __commonJS({
  28368. "node_modules/supports-color/index.js"(exports, module) {
  28369. "use strict";
  28370. var os = __require("os");
  28371. var tty = __require("tty");
  28372. var hasFlag = require_has_flag();
  28373. var { env } = process;
  28374. var forceColor;
  28375. if (hasFlag("no-color") || hasFlag("no-colors") || hasFlag("color=false") || hasFlag("color=never")) {
  28376. forceColor = 0;
  28377. } else if (hasFlag("color") || hasFlag("colors") || hasFlag("color=true") || hasFlag("color=always")) {
  28378. forceColor = 1;
  28379. }
  28380. if ("FORCE_COLOR" in env) {
  28381. if (env.FORCE_COLOR === "true") {
  28382. forceColor = 1;
  28383. } else if (env.FORCE_COLOR === "false") {
  28384. forceColor = 0;
  28385. } else {
  28386. forceColor = env.FORCE_COLOR.length === 0 ? 1 : Math.min(parseInt(env.FORCE_COLOR, 10), 3);
  28387. }
  28388. }
  28389. function translateLevel(level) {
  28390. if (level === 0) {
  28391. return false;
  28392. }
  28393. return {
  28394. level,
  28395. hasBasic: true,
  28396. has256: level >= 2,
  28397. has16m: level >= 3
  28398. };
  28399. }
  28400. function supportsColor(haveStream, streamIsTTY) {
  28401. if (forceColor === 0) {
  28402. return 0;
  28403. }
  28404. if (hasFlag("color=16m") || hasFlag("color=full") || hasFlag("color=truecolor")) {
  28405. return 3;
  28406. }
  28407. if (hasFlag("color=256")) {
  28408. return 2;
  28409. }
  28410. if (haveStream && !streamIsTTY && forceColor === void 0) {
  28411. return 0;
  28412. }
  28413. const min = forceColor || 0;
  28414. if (env.TERM === "dumb") {
  28415. return min;
  28416. }
  28417. if (process.platform === "win32") {
  28418. const osRelease = os.release().split(".");
  28419. if (Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) {
  28420. return Number(osRelease[2]) >= 14931 ? 3 : 2;
  28421. }
  28422. return 1;
  28423. }
  28424. if ("CI" in env) {
  28425. if (["TRAVIS", "CIRCLECI", "APPVEYOR", "GITLAB_CI", "GITHUB_ACTIONS", "BUILDKITE"].some((sign) => sign in env) || env.CI_NAME === "codeship") {
  28426. return 1;
  28427. }
  28428. return min;
  28429. }
  28430. if ("TEAMCITY_VERSION" in env) {
  28431. return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env.TEAMCITY_VERSION) ? 1 : 0;
  28432. }
  28433. if (env.COLORTERM === "truecolor") {
  28434. return 3;
  28435. }
  28436. if ("TERM_PROGRAM" in env) {
  28437. const version2 = parseInt((env.TERM_PROGRAM_VERSION || "").split(".")[0], 10);
  28438. switch (env.TERM_PROGRAM) {
  28439. case "iTerm.app":
  28440. return version2 >= 3 ? 3 : 2;
  28441. case "Apple_Terminal":
  28442. return 2;
  28443. }
  28444. }
  28445. if (/-256(color)?$/i.test(env.TERM)) {
  28446. return 2;
  28447. }
  28448. if (/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(env.TERM)) {
  28449. return 1;
  28450. }
  28451. if ("COLORTERM" in env) {
  28452. return 1;
  28453. }
  28454. return min;
  28455. }
  28456. function getSupportLevel(stream) {
  28457. const level = supportsColor(stream, stream && stream.isTTY);
  28458. return translateLevel(level);
  28459. }
  28460. module.exports = {
  28461. supportsColor: getSupportLevel,
  28462. stdout: translateLevel(supportsColor(true, tty.isatty(1))),
  28463. stderr: translateLevel(supportsColor(true, tty.isatty(2)))
  28464. };
  28465. }
  28466. });
  28467. // node_modules/debug/src/node.js
  28468. var require_node = __commonJS({
  28469. "node_modules/debug/src/node.js"(exports, module) {
  28470. var tty = __require("tty");
  28471. var util = __require("util");
  28472. exports.init = init;
  28473. exports.log = log;
  28474. exports.formatArgs = formatArgs;
  28475. exports.save = save;
  28476. exports.load = load;
  28477. exports.useColors = useColors;
  28478. exports.destroy = util.deprecate(
  28479. () => {
  28480. },
  28481. "Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."
  28482. );
  28483. exports.colors = [6, 2, 3, 4, 5, 1];
  28484. try {
  28485. const supportsColor = require_supports_color();
  28486. if (supportsColor && (supportsColor.stderr || supportsColor).level >= 2) {
  28487. exports.colors = [
  28488. 20,
  28489. 21,
  28490. 26,
  28491. 27,
  28492. 32,
  28493. 33,
  28494. 38,
  28495. 39,
  28496. 40,
  28497. 41,
  28498. 42,
  28499. 43,
  28500. 44,
  28501. 45,
  28502. 56,
  28503. 57,
  28504. 62,
  28505. 63,
  28506. 68,
  28507. 69,
  28508. 74,
  28509. 75,
  28510. 76,
  28511. 77,
  28512. 78,
  28513. 79,
  28514. 80,
  28515. 81,
  28516. 92,
  28517. 93,
  28518. 98,
  28519. 99,
  28520. 112,
  28521. 113,
  28522. 128,
  28523. 129,
  28524. 134,
  28525. 135,
  28526. 148,
  28527. 149,
  28528. 160,
  28529. 161,
  28530. 162,
  28531. 163,
  28532. 164,
  28533. 165,
  28534. 166,
  28535. 167,
  28536. 168,
  28537. 169,
  28538. 170,
  28539. 171,
  28540. 172,
  28541. 173,
  28542. 178,
  28543. 179,
  28544. 184,
  28545. 185,
  28546. 196,
  28547. 197,
  28548. 198,
  28549. 199,
  28550. 200,
  28551. 201,
  28552. 202,
  28553. 203,
  28554. 204,
  28555. 205,
  28556. 206,
  28557. 207,
  28558. 208,
  28559. 209,
  28560. 214,
  28561. 215,
  28562. 220,
  28563. 221
  28564. ];
  28565. }
  28566. } catch (error) {
  28567. }
  28568. exports.inspectOpts = Object.keys(process.env).filter((key) => {
  28569. return /^debug_/i.test(key);
  28570. }).reduce((obj, key) => {
  28571. const prop = key.substring(6).toLowerCase().replace(/_([a-z])/g, (_, k) => {
  28572. return k.toUpperCase();
  28573. });
  28574. let val = process.env[key];
  28575. if (/^(yes|on|true|enabled)$/i.test(val)) {
  28576. val = true;
  28577. } else if (/^(no|off|false|disabled)$/i.test(val)) {
  28578. val = false;
  28579. } else if (val === "null") {
  28580. val = null;
  28581. } else {
  28582. val = Number(val);
  28583. }
  28584. obj[prop] = val;
  28585. return obj;
  28586. }, {});
  28587. function useColors() {
  28588. return "colors" in exports.inspectOpts ? Boolean(exports.inspectOpts.colors) : tty.isatty(process.stderr.fd);
  28589. }
  28590. function formatArgs(args) {
  28591. const { namespace: name2, useColors: useColors2 } = this;
  28592. if (useColors2) {
  28593. const c = this.color;
  28594. const colorCode = "\x1B[3" + (c < 8 ? c : "8;5;" + c);
  28595. const prefix = ` ${colorCode};1m${name2} \x1B[0m`;
  28596. args[0] = prefix + args[0].split("\n").join("\n" + prefix);
  28597. args.push(colorCode + "m+" + module.exports.humanize(this.diff) + "\x1B[0m");
  28598. } else {
  28599. args[0] = getDate() + name2 + " " + args[0];
  28600. }
  28601. }
  28602. function getDate() {
  28603. if (exports.inspectOpts.hideDate) {
  28604. return "";
  28605. }
  28606. return new Date().toISOString() + " ";
  28607. }
  28608. function log(...args) {
  28609. return process.stderr.write(util.format(...args) + "\n");
  28610. }
  28611. function save(namespaces) {
  28612. if (namespaces) {
  28613. process.env.DEBUG = namespaces;
  28614. } else {
  28615. delete process.env.DEBUG;
  28616. }
  28617. }
  28618. function load() {
  28619. return process.env.DEBUG;
  28620. }
  28621. function init(debug) {
  28622. debug.inspectOpts = {};
  28623. const keys2 = Object.keys(exports.inspectOpts);
  28624. for (let i = 0; i < keys2.length; i++) {
  28625. debug.inspectOpts[keys2[i]] = exports.inspectOpts[keys2[i]];
  28626. }
  28627. }
  28628. module.exports = require_common()(exports);
  28629. var { formatters } = module.exports;
  28630. formatters.o = function(v) {
  28631. this.inspectOpts.colors = this.useColors;
  28632. return util.inspect(v, this.inspectOpts).split("\n").map((str) => str.trim()).join(" ");
  28633. };
  28634. formatters.O = function(v) {
  28635. this.inspectOpts.colors = this.useColors;
  28636. return util.inspect(v, this.inspectOpts);
  28637. };
  28638. }
  28639. });
  28640. // node_modules/debug/src/index.js
  28641. var require_src = __commonJS({
  28642. "node_modules/debug/src/index.js"(exports, module) {
  28643. if (typeof process === "undefined" || process.type === "renderer" || process.browser === true || process.__nwjs) {
  28644. module.exports = require_browser();
  28645. } else {
  28646. module.exports = require_node();
  28647. }
  28648. }
  28649. });
  28650. // node_modules/estree-to-babel/node_modules/@babel/traverse/lib/scope/binding.js
  28651. var require_binding = __commonJS({
  28652. "node_modules/estree-to-babel/node_modules/@babel/traverse/lib/scope/binding.js"(exports) {
  28653. "use strict";
  28654. Object.defineProperty(exports, "__esModule", {
  28655. value: true
  28656. });
  28657. exports.default = void 0;
  28658. var Binding = class {
  28659. constructor({
  28660. identifier,
  28661. scope,
  28662. path,
  28663. kind
  28664. }) {
  28665. this.identifier = void 0;
  28666. this.scope = void 0;
  28667. this.path = void 0;
  28668. this.kind = void 0;
  28669. this.constantViolations = [];
  28670. this.constant = true;
  28671. this.referencePaths = [];
  28672. this.referenced = false;
  28673. this.references = 0;
  28674. this.identifier = identifier;
  28675. this.scope = scope;
  28676. this.path = path;
  28677. this.kind = kind;
  28678. this.clearValue();
  28679. }
  28680. deoptValue() {
  28681. this.clearValue();
  28682. this.hasDeoptedValue = true;
  28683. }
  28684. setValue(value) {
  28685. if (this.hasDeoptedValue)
  28686. return;
  28687. this.hasValue = true;
  28688. this.value = value;
  28689. }
  28690. clearValue() {
  28691. this.hasDeoptedValue = false;
  28692. this.hasValue = false;
  28693. this.value = null;
  28694. }
  28695. reassign(path) {
  28696. this.constant = false;
  28697. if (this.constantViolations.indexOf(path) !== -1) {
  28698. return;
  28699. }
  28700. this.constantViolations.push(path);
  28701. }
  28702. reference(path) {
  28703. if (this.referencePaths.indexOf(path) !== -1) {
  28704. return;
  28705. }
  28706. this.referenced = true;
  28707. this.references++;
  28708. this.referencePaths.push(path);
  28709. }
  28710. dereference() {
  28711. this.references--;
  28712. this.referenced = !!this.references;
  28713. }
  28714. };
  28715. exports.default = Binding;
  28716. }
  28717. });
  28718. // node_modules/estree-to-babel/node_modules/@babel/helper-split-export-declaration/lib/index.js
  28719. var require_lib5 = __commonJS({
  28720. "node_modules/estree-to-babel/node_modules/@babel/helper-split-export-declaration/lib/index.js"(exports) {
  28721. "use strict";
  28722. Object.defineProperty(exports, "__esModule", {
  28723. value: true
  28724. });
  28725. exports.default = splitExportDeclaration;
  28726. var t2 = _interopRequireWildcard(require_lib4());
  28727. function _getRequireWildcardCache() {
  28728. if (typeof WeakMap !== "function")
  28729. return null;
  28730. var cache = /* @__PURE__ */ new WeakMap();
  28731. _getRequireWildcardCache = function() {
  28732. return cache;
  28733. };
  28734. return cache;
  28735. }
  28736. function _interopRequireWildcard(obj) {
  28737. if (obj && obj.__esModule) {
  28738. return obj;
  28739. }
  28740. if (obj === null || typeof obj !== "object" && typeof obj !== "function") {
  28741. return { default: obj };
  28742. }
  28743. var cache = _getRequireWildcardCache();
  28744. if (cache && cache.has(obj)) {
  28745. return cache.get(obj);
  28746. }
  28747. var newObj = {};
  28748. var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;
  28749. for (var key in obj) {
  28750. if (Object.prototype.hasOwnProperty.call(obj, key)) {
  28751. var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null;
  28752. if (desc && (desc.get || desc.set)) {
  28753. Object.defineProperty(newObj, key, desc);
  28754. } else {
  28755. newObj[key] = obj[key];
  28756. }
  28757. }
  28758. }
  28759. newObj.default = obj;
  28760. if (cache) {
  28761. cache.set(obj, newObj);
  28762. }
  28763. return newObj;
  28764. }
  28765. function splitExportDeclaration(exportDeclaration) {
  28766. if (!exportDeclaration.isExportDeclaration()) {
  28767. throw new Error("Only export declarations can be split.");
  28768. }
  28769. const isDefault = exportDeclaration.isExportDefaultDeclaration();
  28770. const declaration = exportDeclaration.get("declaration");
  28771. const isClassDeclaration = declaration.isClassDeclaration();
  28772. if (isDefault) {
  28773. const standaloneDeclaration = declaration.isFunctionDeclaration() || isClassDeclaration;
  28774. const scope = declaration.isScope() ? declaration.scope.parent : declaration.scope;
  28775. let id = declaration.node.id;
  28776. let needBindingRegistration = false;
  28777. if (!id) {
  28778. needBindingRegistration = true;
  28779. id = scope.generateUidIdentifier("default");
  28780. if (standaloneDeclaration || declaration.isFunctionExpression() || declaration.isClassExpression()) {
  28781. declaration.node.id = t2.cloneNode(id);
  28782. }
  28783. }
  28784. const updatedDeclaration = standaloneDeclaration ? declaration : t2.variableDeclaration("var", [t2.variableDeclarator(t2.cloneNode(id), declaration.node)]);
  28785. const updatedExportDeclaration = t2.exportNamedDeclaration(null, [t2.exportSpecifier(t2.cloneNode(id), t2.identifier("default"))]);
  28786. exportDeclaration.insertAfter(updatedExportDeclaration);
  28787. exportDeclaration.replaceWith(updatedDeclaration);
  28788. if (needBindingRegistration) {
  28789. scope.registerDeclaration(exportDeclaration);
  28790. }
  28791. return exportDeclaration;
  28792. }
  28793. if (exportDeclaration.get("specifiers").length > 0) {
  28794. throw new Error("It doesn't make sense to split exported specifiers.");
  28795. }
  28796. const bindingIdentifiers = declaration.getOuterBindingIdentifiers();
  28797. const specifiers = Object.keys(bindingIdentifiers).map((name2) => {
  28798. return t2.exportSpecifier(t2.identifier(name2), t2.identifier(name2));
  28799. });
  28800. const aliasDeclar = t2.exportNamedDeclaration(null, specifiers);
  28801. exportDeclaration.insertAfter(aliasDeclar);
  28802. exportDeclaration.replaceWith(declaration.node);
  28803. return exportDeclaration;
  28804. }
  28805. }
  28806. });
  28807. // node_modules/estree-to-babel/node_modules/@babel/traverse/lib/scope/lib/renamer.js
  28808. var require_renamer = __commonJS({
  28809. "node_modules/estree-to-babel/node_modules/@babel/traverse/lib/scope/lib/renamer.js"(exports) {
  28810. "use strict";
  28811. Object.defineProperty(exports, "__esModule", {
  28812. value: true
  28813. });
  28814. exports.default = void 0;
  28815. var _binding = require_binding();
  28816. var _helperSplitExportDeclaration = require_lib5();
  28817. var t2 = require_lib4();
  28818. var renameVisitor = {
  28819. ReferencedIdentifier({
  28820. node
  28821. }, state) {
  28822. if (node.name === state.oldName) {
  28823. node.name = state.newName;
  28824. }
  28825. },
  28826. Scope(path, state) {
  28827. if (!path.scope.bindingIdentifierEquals(state.oldName, state.binding.identifier)) {
  28828. skipAllButComputedMethodKey(path);
  28829. }
  28830. },
  28831. "AssignmentExpression|Declaration|VariableDeclarator"(path, state) {
  28832. if (path.isVariableDeclaration())
  28833. return;
  28834. const ids = path.getOuterBindingIdentifiers();
  28835. for (const name2 in ids) {
  28836. if (name2 === state.oldName)
  28837. ids[name2].name = state.newName;
  28838. }
  28839. }
  28840. };
  28841. var Renamer = class {
  28842. constructor(binding, oldName, newName) {
  28843. this.newName = newName;
  28844. this.oldName = oldName;
  28845. this.binding = binding;
  28846. }
  28847. maybeConvertFromExportDeclaration(parentDeclar) {
  28848. const maybeExportDeclar = parentDeclar.parentPath;
  28849. if (!maybeExportDeclar.isExportDeclaration()) {
  28850. return;
  28851. }
  28852. if (maybeExportDeclar.isExportDefaultDeclaration() && !maybeExportDeclar.get("declaration").node.id) {
  28853. return;
  28854. }
  28855. (0, _helperSplitExportDeclaration.default)(maybeExportDeclar);
  28856. }
  28857. maybeConvertFromClassFunctionDeclaration(path) {
  28858. return;
  28859. if (!path.isFunctionDeclaration() && !path.isClassDeclaration())
  28860. return;
  28861. if (this.binding.kind !== "hoisted")
  28862. return;
  28863. path.node.id = t2.identifier(this.oldName);
  28864. path.node._blockHoist = 3;
  28865. path.replaceWith(t2.variableDeclaration("let", [t2.variableDeclarator(t2.identifier(this.newName), t2.toExpression(path.node))]));
  28866. }
  28867. maybeConvertFromClassFunctionExpression(path) {
  28868. return;
  28869. if (!path.isFunctionExpression() && !path.isClassExpression())
  28870. return;
  28871. if (this.binding.kind !== "local")
  28872. return;
  28873. path.node.id = t2.identifier(this.oldName);
  28874. this.binding.scope.parent.push({
  28875. id: t2.identifier(this.newName)
  28876. });
  28877. path.replaceWith(t2.assignmentExpression("=", t2.identifier(this.newName), path.node));
  28878. }
  28879. rename(block) {
  28880. const {
  28881. binding,
  28882. oldName,
  28883. newName
  28884. } = this;
  28885. const {
  28886. scope,
  28887. path
  28888. } = binding;
  28889. const parentDeclar = path.find((path2) => path2.isDeclaration() || path2.isFunctionExpression() || path2.isClassExpression());
  28890. if (parentDeclar) {
  28891. const bindingIds = parentDeclar.getOuterBindingIdentifiers();
  28892. if (bindingIds[oldName] === binding.identifier) {
  28893. this.maybeConvertFromExportDeclaration(parentDeclar);
  28894. }
  28895. }
  28896. const blockToTraverse = block || scope.block;
  28897. if ((blockToTraverse == null ? void 0 : blockToTraverse.type) === "SwitchStatement") {
  28898. blockToTraverse.cases.forEach((c) => {
  28899. scope.traverse(c, renameVisitor, this);
  28900. });
  28901. } else {
  28902. scope.traverse(blockToTraverse, renameVisitor, this);
  28903. }
  28904. if (!block) {
  28905. scope.removeOwnBinding(oldName);
  28906. scope.bindings[newName] = binding;
  28907. this.binding.identifier.name = newName;
  28908. }
  28909. if (parentDeclar) {
  28910. this.maybeConvertFromClassFunctionDeclaration(parentDeclar);
  28911. this.maybeConvertFromClassFunctionExpression(parentDeclar);
  28912. }
  28913. }
  28914. };
  28915. exports.default = Renamer;
  28916. function skipAllButComputedMethodKey(path) {
  28917. if (!path.isMethod() || !path.node.computed) {
  28918. path.skip();
  28919. return;
  28920. }
  28921. const keys2 = t2.VISITOR_KEYS[path.type];
  28922. for (const key of keys2) {
  28923. if (key !== "key")
  28924. path.skipKey(key);
  28925. }
  28926. }
  28927. }
  28928. });
  28929. // node_modules/globals/globals.json
  28930. var require_globals = __commonJS({
  28931. "node_modules/globals/globals.json"(exports, module) {
  28932. module.exports = {
  28933. builtin: {
  28934. Array: false,
  28935. ArrayBuffer: false,
  28936. Atomics: false,
  28937. BigInt: false,
  28938. BigInt64Array: false,
  28939. BigUint64Array: false,
  28940. Boolean: false,
  28941. constructor: false,
  28942. DataView: false,
  28943. Date: false,
  28944. decodeURI: false,
  28945. decodeURIComponent: false,
  28946. encodeURI: false,
  28947. encodeURIComponent: false,
  28948. Error: false,
  28949. escape: false,
  28950. eval: false,
  28951. EvalError: false,
  28952. Float32Array: false,
  28953. Float64Array: false,
  28954. Function: false,
  28955. globalThis: false,
  28956. hasOwnProperty: false,
  28957. Infinity: false,
  28958. Int16Array: false,
  28959. Int32Array: false,
  28960. Int8Array: false,
  28961. isFinite: false,
  28962. isNaN: false,
  28963. isPrototypeOf: false,
  28964. JSON: false,
  28965. Map: false,
  28966. Math: false,
  28967. NaN: false,
  28968. Number: false,
  28969. Object: false,
  28970. parseFloat: false,
  28971. parseInt: false,
  28972. Promise: false,
  28973. propertyIsEnumerable: false,
  28974. Proxy: false,
  28975. RangeError: false,
  28976. ReferenceError: false,
  28977. Reflect: false,
  28978. RegExp: false,
  28979. Set: false,
  28980. SharedArrayBuffer: false,
  28981. String: false,
  28982. Symbol: false,
  28983. SyntaxError: false,
  28984. toLocaleString: false,
  28985. toString: false,
  28986. TypeError: false,
  28987. Uint16Array: false,
  28988. Uint32Array: false,
  28989. Uint8Array: false,
  28990. Uint8ClampedArray: false,
  28991. undefined: false,
  28992. unescape: false,
  28993. URIError: false,
  28994. valueOf: false,
  28995. WeakMap: false,
  28996. WeakSet: false
  28997. },
  28998. es5: {
  28999. Array: false,
  29000. Boolean: false,
  29001. constructor: false,
  29002. Date: false,
  29003. decodeURI: false,
  29004. decodeURIComponent: false,
  29005. encodeURI: false,
  29006. encodeURIComponent: false,
  29007. Error: false,
  29008. escape: false,
  29009. eval: false,
  29010. EvalError: false,
  29011. Function: false,
  29012. hasOwnProperty: false,
  29013. Infinity: false,
  29014. isFinite: false,
  29015. isNaN: false,
  29016. isPrototypeOf: false,
  29017. JSON: false,
  29018. Math: false,
  29019. NaN: false,
  29020. Number: false,
  29021. Object: false,
  29022. parseFloat: false,
  29023. parseInt: false,
  29024. propertyIsEnumerable: false,
  29025. RangeError: false,
  29026. ReferenceError: false,
  29027. RegExp: false,
  29028. String: false,
  29029. SyntaxError: false,
  29030. toLocaleString: false,
  29031. toString: false,
  29032. TypeError: false,
  29033. undefined: false,
  29034. unescape: false,
  29035. URIError: false,
  29036. valueOf: false
  29037. },
  29038. es2015: {
  29039. Array: false,
  29040. ArrayBuffer: false,
  29041. Boolean: false,
  29042. constructor: false,
  29043. DataView: false,
  29044. Date: false,
  29045. decodeURI: false,
  29046. decodeURIComponent: false,
  29047. encodeURI: false,
  29048. encodeURIComponent: false,
  29049. Error: false,
  29050. escape: false,
  29051. eval: false,
  29052. EvalError: false,
  29053. Float32Array: false,
  29054. Float64Array: false,
  29055. Function: false,
  29056. hasOwnProperty: false,
  29057. Infinity: false,
  29058. Int16Array: false,
  29059. Int32Array: false,
  29060. Int8Array: false,
  29061. isFinite: false,
  29062. isNaN: false,
  29063. isPrototypeOf: false,
  29064. JSON: false,
  29065. Map: false,
  29066. Math: false,
  29067. NaN: false,
  29068. Number: false,
  29069. Object: false,
  29070. parseFloat: false,
  29071. parseInt: false,
  29072. Promise: false,
  29073. propertyIsEnumerable: false,
  29074. Proxy: false,
  29075. RangeError: false,
  29076. ReferenceError: false,
  29077. Reflect: false,
  29078. RegExp: false,
  29079. Set: false,
  29080. String: false,
  29081. Symbol: false,
  29082. SyntaxError: false,
  29083. toLocaleString: false,
  29084. toString: false,
  29085. TypeError: false,
  29086. Uint16Array: false,
  29087. Uint32Array: false,
  29088. Uint8Array: false,
  29089. Uint8ClampedArray: false,
  29090. undefined: false,
  29091. unescape: false,
  29092. URIError: false,
  29093. valueOf: false,
  29094. WeakMap: false,
  29095. WeakSet: false
  29096. },
  29097. es2017: {
  29098. Array: false,
  29099. ArrayBuffer: false,
  29100. Atomics: false,
  29101. Boolean: false,
  29102. constructor: false,
  29103. DataView: false,
  29104. Date: false,
  29105. decodeURI: false,
  29106. decodeURIComponent: false,
  29107. encodeURI: false,
  29108. encodeURIComponent: false,
  29109. Error: false,
  29110. escape: false,
  29111. eval: false,
  29112. EvalError: false,
  29113. Float32Array: false,
  29114. Float64Array: false,
  29115. Function: false,
  29116. hasOwnProperty: false,
  29117. Infinity: false,
  29118. Int16Array: false,
  29119. Int32Array: false,
  29120. Int8Array: false,
  29121. isFinite: false,
  29122. isNaN: false,
  29123. isPrototypeOf: false,
  29124. JSON: false,
  29125. Map: false,
  29126. Math: false,
  29127. NaN: false,
  29128. Number: false,
  29129. Object: false,
  29130. parseFloat: false,
  29131. parseInt: false,
  29132. Promise: false,
  29133. propertyIsEnumerable: false,
  29134. Proxy: false,
  29135. RangeError: false,
  29136. ReferenceError: false,
  29137. Reflect: false,
  29138. RegExp: false,
  29139. Set: false,
  29140. SharedArrayBuffer: false,
  29141. String: false,
  29142. Symbol: false,
  29143. SyntaxError: false,
  29144. toLocaleString: false,
  29145. toString: false,
  29146. TypeError: false,
  29147. Uint16Array: false,
  29148. Uint32Array: false,
  29149. Uint8Array: false,
  29150. Uint8ClampedArray: false,
  29151. undefined: false,
  29152. unescape: false,
  29153. URIError: false,
  29154. valueOf: false,
  29155. WeakMap: false,
  29156. WeakSet: false
  29157. },
  29158. browser: {
  29159. AbortController: false,
  29160. AbortSignal: false,
  29161. addEventListener: false,
  29162. alert: false,
  29163. AnalyserNode: false,
  29164. Animation: false,
  29165. AnimationEffectReadOnly: false,
  29166. AnimationEffectTiming: false,
  29167. AnimationEffectTimingReadOnly: false,
  29168. AnimationEvent: false,
  29169. AnimationPlaybackEvent: false,
  29170. AnimationTimeline: false,
  29171. applicationCache: false,
  29172. ApplicationCache: false,
  29173. ApplicationCacheErrorEvent: false,
  29174. atob: false,
  29175. Attr: false,
  29176. Audio: false,
  29177. AudioBuffer: false,
  29178. AudioBufferSourceNode: false,
  29179. AudioContext: false,
  29180. AudioDestinationNode: false,
  29181. AudioListener: false,
  29182. AudioNode: false,
  29183. AudioParam: false,
  29184. AudioProcessingEvent: false,
  29185. AudioScheduledSourceNode: false,
  29186. "AudioWorkletGlobalScope ": false,
  29187. AudioWorkletNode: false,
  29188. AudioWorkletProcessor: false,
  29189. BarProp: false,
  29190. BaseAudioContext: false,
  29191. BatteryManager: false,
  29192. BeforeUnloadEvent: false,
  29193. BiquadFilterNode: false,
  29194. Blob: false,
  29195. BlobEvent: false,
  29196. blur: false,
  29197. BroadcastChannel: false,
  29198. btoa: false,
  29199. BudgetService: false,
  29200. ByteLengthQueuingStrategy: false,
  29201. Cache: false,
  29202. caches: false,
  29203. CacheStorage: false,
  29204. cancelAnimationFrame: false,
  29205. cancelIdleCallback: false,
  29206. CanvasCaptureMediaStreamTrack: false,
  29207. CanvasGradient: false,
  29208. CanvasPattern: false,
  29209. CanvasRenderingContext2D: false,
  29210. ChannelMergerNode: false,
  29211. ChannelSplitterNode: false,
  29212. CharacterData: false,
  29213. clearInterval: false,
  29214. clearTimeout: false,
  29215. clientInformation: false,
  29216. ClipboardEvent: false,
  29217. close: false,
  29218. closed: false,
  29219. CloseEvent: false,
  29220. Comment: false,
  29221. CompositionEvent: false,
  29222. confirm: false,
  29223. console: false,
  29224. ConstantSourceNode: false,
  29225. ConvolverNode: false,
  29226. CountQueuingStrategy: false,
  29227. createImageBitmap: false,
  29228. Credential: false,
  29229. CredentialsContainer: false,
  29230. crypto: false,
  29231. Crypto: false,
  29232. CryptoKey: false,
  29233. CSS: false,
  29234. CSSConditionRule: false,
  29235. CSSFontFaceRule: false,
  29236. CSSGroupingRule: false,
  29237. CSSImportRule: false,
  29238. CSSKeyframeRule: false,
  29239. CSSKeyframesRule: false,
  29240. CSSMediaRule: false,
  29241. CSSNamespaceRule: false,
  29242. CSSPageRule: false,
  29243. CSSRule: false,
  29244. CSSRuleList: false,
  29245. CSSStyleDeclaration: false,
  29246. CSSStyleRule: false,
  29247. CSSStyleSheet: false,
  29248. CSSSupportsRule: false,
  29249. CustomElementRegistry: false,
  29250. customElements: false,
  29251. CustomEvent: false,
  29252. DataTransfer: false,
  29253. DataTransferItem: false,
  29254. DataTransferItemList: false,
  29255. defaultstatus: false,
  29256. defaultStatus: false,
  29257. DelayNode: false,
  29258. DeviceMotionEvent: false,
  29259. DeviceOrientationEvent: false,
  29260. devicePixelRatio: false,
  29261. dispatchEvent: false,
  29262. document: false,
  29263. Document: false,
  29264. DocumentFragment: false,
  29265. DocumentType: false,
  29266. DOMError: false,
  29267. DOMException: false,
  29268. DOMImplementation: false,
  29269. DOMMatrix: false,
  29270. DOMMatrixReadOnly: false,
  29271. DOMParser: false,
  29272. DOMPoint: false,
  29273. DOMPointReadOnly: false,
  29274. DOMQuad: false,
  29275. DOMRect: false,
  29276. DOMRectReadOnly: false,
  29277. DOMStringList: false,
  29278. DOMStringMap: false,
  29279. DOMTokenList: false,
  29280. DragEvent: false,
  29281. DynamicsCompressorNode: false,
  29282. Element: false,
  29283. ErrorEvent: false,
  29284. event: false,
  29285. Event: false,
  29286. EventSource: false,
  29287. EventTarget: false,
  29288. external: false,
  29289. fetch: false,
  29290. File: false,
  29291. FileList: false,
  29292. FileReader: false,
  29293. find: false,
  29294. focus: false,
  29295. FocusEvent: false,
  29296. FontFace: false,
  29297. FontFaceSetLoadEvent: false,
  29298. FormData: false,
  29299. frameElement: false,
  29300. frames: false,
  29301. GainNode: false,
  29302. Gamepad: false,
  29303. GamepadButton: false,
  29304. GamepadEvent: false,
  29305. getComputedStyle: false,
  29306. getSelection: false,
  29307. HashChangeEvent: false,
  29308. Headers: false,
  29309. history: false,
  29310. History: false,
  29311. HTMLAllCollection: false,
  29312. HTMLAnchorElement: false,
  29313. HTMLAreaElement: false,
  29314. HTMLAudioElement: false,
  29315. HTMLBaseElement: false,
  29316. HTMLBodyElement: false,
  29317. HTMLBRElement: false,
  29318. HTMLButtonElement: false,
  29319. HTMLCanvasElement: false,
  29320. HTMLCollection: false,
  29321. HTMLContentElement: false,
  29322. HTMLDataElement: false,
  29323. HTMLDataListElement: false,
  29324. HTMLDetailsElement: false,
  29325. HTMLDialogElement: false,
  29326. HTMLDirectoryElement: false,
  29327. HTMLDivElement: false,
  29328. HTMLDListElement: false,
  29329. HTMLDocument: false,
  29330. HTMLElement: false,
  29331. HTMLEmbedElement: false,
  29332. HTMLFieldSetElement: false,
  29333. HTMLFontElement: false,
  29334. HTMLFormControlsCollection: false,
  29335. HTMLFormElement: false,
  29336. HTMLFrameElement: false,
  29337. HTMLFrameSetElement: false,
  29338. HTMLHeadElement: false,
  29339. HTMLHeadingElement: false,
  29340. HTMLHRElement: false,
  29341. HTMLHtmlElement: false,
  29342. HTMLIFrameElement: false,
  29343. HTMLImageElement: false,
  29344. HTMLInputElement: false,
  29345. HTMLLabelElement: false,
  29346. HTMLLegendElement: false,
  29347. HTMLLIElement: false,
  29348. HTMLLinkElement: false,
  29349. HTMLMapElement: false,
  29350. HTMLMarqueeElement: false,
  29351. HTMLMediaElement: false,
  29352. HTMLMenuElement: false,
  29353. HTMLMetaElement: false,
  29354. HTMLMeterElement: false,
  29355. HTMLModElement: false,
  29356. HTMLObjectElement: false,
  29357. HTMLOListElement: false,
  29358. HTMLOptGroupElement: false,
  29359. HTMLOptionElement: false,
  29360. HTMLOptionsCollection: false,
  29361. HTMLOutputElement: false,
  29362. HTMLParagraphElement: false,
  29363. HTMLParamElement: false,
  29364. HTMLPictureElement: false,
  29365. HTMLPreElement: false,
  29366. HTMLProgressElement: false,
  29367. HTMLQuoteElement: false,
  29368. HTMLScriptElement: false,
  29369. HTMLSelectElement: false,
  29370. HTMLShadowElement: false,
  29371. HTMLSlotElement: false,
  29372. HTMLSourceElement: false,
  29373. HTMLSpanElement: false,
  29374. HTMLStyleElement: false,
  29375. HTMLTableCaptionElement: false,
  29376. HTMLTableCellElement: false,
  29377. HTMLTableColElement: false,
  29378. HTMLTableElement: false,
  29379. HTMLTableRowElement: false,
  29380. HTMLTableSectionElement: false,
  29381. HTMLTemplateElement: false,
  29382. HTMLTextAreaElement: false,
  29383. HTMLTimeElement: false,
  29384. HTMLTitleElement: false,
  29385. HTMLTrackElement: false,
  29386. HTMLUListElement: false,
  29387. HTMLUnknownElement: false,
  29388. HTMLVideoElement: false,
  29389. IDBCursor: false,
  29390. IDBCursorWithValue: false,
  29391. IDBDatabase: false,
  29392. IDBFactory: false,
  29393. IDBIndex: false,
  29394. IDBKeyRange: false,
  29395. IDBObjectStore: false,
  29396. IDBOpenDBRequest: false,
  29397. IDBRequest: false,
  29398. IDBTransaction: false,
  29399. IDBVersionChangeEvent: false,
  29400. IdleDeadline: false,
  29401. IIRFilterNode: false,
  29402. Image: false,
  29403. ImageBitmap: false,
  29404. ImageBitmapRenderingContext: false,
  29405. ImageCapture: false,
  29406. ImageData: false,
  29407. indexedDB: false,
  29408. innerHeight: false,
  29409. innerWidth: false,
  29410. InputEvent: false,
  29411. IntersectionObserver: false,
  29412. IntersectionObserverEntry: false,
  29413. Intl: false,
  29414. isSecureContext: false,
  29415. KeyboardEvent: false,
  29416. KeyframeEffect: false,
  29417. KeyframeEffectReadOnly: false,
  29418. length: false,
  29419. localStorage: false,
  29420. location: true,
  29421. Location: false,
  29422. locationbar: false,
  29423. matchMedia: false,
  29424. MediaDeviceInfo: false,
  29425. MediaDevices: false,
  29426. MediaElementAudioSourceNode: false,
  29427. MediaEncryptedEvent: false,
  29428. MediaError: false,
  29429. MediaKeyMessageEvent: false,
  29430. MediaKeySession: false,
  29431. MediaKeyStatusMap: false,
  29432. MediaKeySystemAccess: false,
  29433. MediaList: false,
  29434. MediaQueryList: false,
  29435. MediaQueryListEvent: false,
  29436. MediaRecorder: false,
  29437. MediaSettingsRange: false,
  29438. MediaSource: false,
  29439. MediaStream: false,
  29440. MediaStreamAudioDestinationNode: false,
  29441. MediaStreamAudioSourceNode: false,
  29442. MediaStreamEvent: false,
  29443. MediaStreamTrack: false,
  29444. MediaStreamTrackEvent: false,
  29445. menubar: false,
  29446. MessageChannel: false,
  29447. MessageEvent: false,
  29448. MessagePort: false,
  29449. MIDIAccess: false,
  29450. MIDIConnectionEvent: false,
  29451. MIDIInput: false,
  29452. MIDIInputMap: false,
  29453. MIDIMessageEvent: false,
  29454. MIDIOutput: false,
  29455. MIDIOutputMap: false,
  29456. MIDIPort: false,
  29457. MimeType: false,
  29458. MimeTypeArray: false,
  29459. MouseEvent: false,
  29460. moveBy: false,
  29461. moveTo: false,
  29462. MutationEvent: false,
  29463. MutationObserver: false,
  29464. MutationRecord: false,
  29465. name: false,
  29466. NamedNodeMap: false,
  29467. NavigationPreloadManager: false,
  29468. navigator: false,
  29469. Navigator: false,
  29470. NetworkInformation: false,
  29471. Node: false,
  29472. NodeFilter: false,
  29473. NodeIterator: false,
  29474. NodeList: false,
  29475. Notification: false,
  29476. OfflineAudioCompletionEvent: false,
  29477. OfflineAudioContext: false,
  29478. offscreenBuffering: false,
  29479. OffscreenCanvas: true,
  29480. onabort: true,
  29481. onafterprint: true,
  29482. onanimationend: true,
  29483. onanimationiteration: true,
  29484. onanimationstart: true,
  29485. onappinstalled: true,
  29486. onauxclick: true,
  29487. onbeforeinstallprompt: true,
  29488. onbeforeprint: true,
  29489. onbeforeunload: true,
  29490. onblur: true,
  29491. oncancel: true,
  29492. oncanplay: true,
  29493. oncanplaythrough: true,
  29494. onchange: true,
  29495. onclick: true,
  29496. onclose: true,
  29497. oncontextmenu: true,
  29498. oncuechange: true,
  29499. ondblclick: true,
  29500. ondevicemotion: true,
  29501. ondeviceorientation: true,
  29502. ondeviceorientationabsolute: true,
  29503. ondrag: true,
  29504. ondragend: true,
  29505. ondragenter: true,
  29506. ondragleave: true,
  29507. ondragover: true,
  29508. ondragstart: true,
  29509. ondrop: true,
  29510. ondurationchange: true,
  29511. onemptied: true,
  29512. onended: true,
  29513. onerror: true,
  29514. onfocus: true,
  29515. ongotpointercapture: true,
  29516. onhashchange: true,
  29517. oninput: true,
  29518. oninvalid: true,
  29519. onkeydown: true,
  29520. onkeypress: true,
  29521. onkeyup: true,
  29522. onlanguagechange: true,
  29523. onload: true,
  29524. onloadeddata: true,
  29525. onloadedmetadata: true,
  29526. onloadstart: true,
  29527. onlostpointercapture: true,
  29528. onmessage: true,
  29529. onmessageerror: true,
  29530. onmousedown: true,
  29531. onmouseenter: true,
  29532. onmouseleave: true,
  29533. onmousemove: true,
  29534. onmouseout: true,
  29535. onmouseover: true,
  29536. onmouseup: true,
  29537. onmousewheel: true,
  29538. onoffline: true,
  29539. ononline: true,
  29540. onpagehide: true,
  29541. onpageshow: true,
  29542. onpause: true,
  29543. onplay: true,
  29544. onplaying: true,
  29545. onpointercancel: true,
  29546. onpointerdown: true,
  29547. onpointerenter: true,
  29548. onpointerleave: true,
  29549. onpointermove: true,
  29550. onpointerout: true,
  29551. onpointerover: true,
  29552. onpointerup: true,
  29553. onpopstate: true,
  29554. onprogress: true,
  29555. onratechange: true,
  29556. onrejectionhandled: true,
  29557. onreset: true,
  29558. onresize: true,
  29559. onscroll: true,
  29560. onsearch: true,
  29561. onseeked: true,
  29562. onseeking: true,
  29563. onselect: true,
  29564. onstalled: true,
  29565. onstorage: true,
  29566. onsubmit: true,
  29567. onsuspend: true,
  29568. ontimeupdate: true,
  29569. ontoggle: true,
  29570. ontransitionend: true,
  29571. onunhandledrejection: true,
  29572. onunload: true,
  29573. onvolumechange: true,
  29574. onwaiting: true,
  29575. onwheel: true,
  29576. open: false,
  29577. openDatabase: false,
  29578. opener: false,
  29579. Option: false,
  29580. origin: false,
  29581. OscillatorNode: false,
  29582. outerHeight: false,
  29583. outerWidth: false,
  29584. PageTransitionEvent: false,
  29585. pageXOffset: false,
  29586. pageYOffset: false,
  29587. PannerNode: false,
  29588. parent: false,
  29589. Path2D: false,
  29590. PaymentAddress: false,
  29591. PaymentRequest: false,
  29592. PaymentRequestUpdateEvent: false,
  29593. PaymentResponse: false,
  29594. performance: false,
  29595. Performance: false,
  29596. PerformanceEntry: false,
  29597. PerformanceLongTaskTiming: false,
  29598. PerformanceMark: false,
  29599. PerformanceMeasure: false,
  29600. PerformanceNavigation: false,
  29601. PerformanceNavigationTiming: false,
  29602. PerformanceObserver: false,
  29603. PerformanceObserverEntryList: false,
  29604. PerformancePaintTiming: false,
  29605. PerformanceResourceTiming: false,
  29606. PerformanceTiming: false,
  29607. PeriodicWave: false,
  29608. Permissions: false,
  29609. PermissionStatus: false,
  29610. personalbar: false,
  29611. PhotoCapabilities: false,
  29612. Plugin: false,
  29613. PluginArray: false,
  29614. PointerEvent: false,
  29615. PopStateEvent: false,
  29616. postMessage: false,
  29617. Presentation: false,
  29618. PresentationAvailability: false,
  29619. PresentationConnection: false,
  29620. PresentationConnectionAvailableEvent: false,
  29621. PresentationConnectionCloseEvent: false,
  29622. PresentationConnectionList: false,
  29623. PresentationReceiver: false,
  29624. PresentationRequest: false,
  29625. print: false,
  29626. ProcessingInstruction: false,
  29627. ProgressEvent: false,
  29628. PromiseRejectionEvent: false,
  29629. prompt: false,
  29630. PushManager: false,
  29631. PushSubscription: false,
  29632. PushSubscriptionOptions: false,
  29633. queueMicrotask: false,
  29634. RadioNodeList: false,
  29635. Range: false,
  29636. ReadableStream: false,
  29637. registerProcessor: false,
  29638. RemotePlayback: false,
  29639. removeEventListener: false,
  29640. Request: false,
  29641. requestAnimationFrame: false,
  29642. requestIdleCallback: false,
  29643. resizeBy: false,
  29644. ResizeObserver: false,
  29645. ResizeObserverEntry: false,
  29646. resizeTo: false,
  29647. Response: false,
  29648. RTCCertificate: false,
  29649. RTCDataChannel: false,
  29650. RTCDataChannelEvent: false,
  29651. RTCDtlsTransport: false,
  29652. RTCIceCandidate: false,
  29653. RTCIceGatherer: false,
  29654. RTCIceTransport: false,
  29655. RTCPeerConnection: false,
  29656. RTCPeerConnectionIceEvent: false,
  29657. RTCRtpContributingSource: false,
  29658. RTCRtpReceiver: false,
  29659. RTCRtpSender: false,
  29660. RTCSctpTransport: false,
  29661. RTCSessionDescription: false,
  29662. RTCStatsReport: false,
  29663. RTCTrackEvent: false,
  29664. screen: false,
  29665. Screen: false,
  29666. screenLeft: false,
  29667. ScreenOrientation: false,
  29668. screenTop: false,
  29669. screenX: false,
  29670. screenY: false,
  29671. ScriptProcessorNode: false,
  29672. scroll: false,
  29673. scrollbars: false,
  29674. scrollBy: false,
  29675. scrollTo: false,
  29676. scrollX: false,
  29677. scrollY: false,
  29678. SecurityPolicyViolationEvent: false,
  29679. Selection: false,
  29680. self: false,
  29681. ServiceWorker: false,
  29682. ServiceWorkerContainer: false,
  29683. ServiceWorkerRegistration: false,
  29684. sessionStorage: false,
  29685. setInterval: false,
  29686. setTimeout: false,
  29687. ShadowRoot: false,
  29688. SharedWorker: false,
  29689. SourceBuffer: false,
  29690. SourceBufferList: false,
  29691. speechSynthesis: false,
  29692. SpeechSynthesisEvent: false,
  29693. SpeechSynthesisUtterance: false,
  29694. StaticRange: false,
  29695. status: false,
  29696. statusbar: false,
  29697. StereoPannerNode: false,
  29698. stop: false,
  29699. Storage: false,
  29700. StorageEvent: false,
  29701. StorageManager: false,
  29702. styleMedia: false,
  29703. StyleSheet: false,
  29704. StyleSheetList: false,
  29705. SubtleCrypto: false,
  29706. SVGAElement: false,
  29707. SVGAngle: false,
  29708. SVGAnimatedAngle: false,
  29709. SVGAnimatedBoolean: false,
  29710. SVGAnimatedEnumeration: false,
  29711. SVGAnimatedInteger: false,
  29712. SVGAnimatedLength: false,
  29713. SVGAnimatedLengthList: false,
  29714. SVGAnimatedNumber: false,
  29715. SVGAnimatedNumberList: false,
  29716. SVGAnimatedPreserveAspectRatio: false,
  29717. SVGAnimatedRect: false,
  29718. SVGAnimatedString: false,
  29719. SVGAnimatedTransformList: false,
  29720. SVGAnimateElement: false,
  29721. SVGAnimateMotionElement: false,
  29722. SVGAnimateTransformElement: false,
  29723. SVGAnimationElement: false,
  29724. SVGCircleElement: false,
  29725. SVGClipPathElement: false,
  29726. SVGComponentTransferFunctionElement: false,
  29727. SVGDefsElement: false,
  29728. SVGDescElement: false,
  29729. SVGDiscardElement: false,
  29730. SVGElement: false,
  29731. SVGEllipseElement: false,
  29732. SVGFEBlendElement: false,
  29733. SVGFEColorMatrixElement: false,
  29734. SVGFEComponentTransferElement: false,
  29735. SVGFECompositeElement: false,
  29736. SVGFEConvolveMatrixElement: false,
  29737. SVGFEDiffuseLightingElement: false,
  29738. SVGFEDisplacementMapElement: false,
  29739. SVGFEDistantLightElement: false,
  29740. SVGFEDropShadowElement: false,
  29741. SVGFEFloodElement: false,
  29742. SVGFEFuncAElement: false,
  29743. SVGFEFuncBElement: false,
  29744. SVGFEFuncGElement: false,
  29745. SVGFEFuncRElement: false,
  29746. SVGFEGaussianBlurElement: false,
  29747. SVGFEImageElement: false,
  29748. SVGFEMergeElement: false,
  29749. SVGFEMergeNodeElement: false,
  29750. SVGFEMorphologyElement: false,
  29751. SVGFEOffsetElement: false,
  29752. SVGFEPointLightElement: false,
  29753. SVGFESpecularLightingElement: false,
  29754. SVGFESpotLightElement: false,
  29755. SVGFETileElement: false,
  29756. SVGFETurbulenceElement: false,
  29757. SVGFilterElement: false,
  29758. SVGForeignObjectElement: false,
  29759. SVGGElement: false,
  29760. SVGGeometryElement: false,
  29761. SVGGradientElement: false,
  29762. SVGGraphicsElement: false,
  29763. SVGImageElement: false,
  29764. SVGLength: false,
  29765. SVGLengthList: false,
  29766. SVGLinearGradientElement: false,
  29767. SVGLineElement: false,
  29768. SVGMarkerElement: false,
  29769. SVGMaskElement: false,
  29770. SVGMatrix: false,
  29771. SVGMetadataElement: false,
  29772. SVGMPathElement: false,
  29773. SVGNumber: false,
  29774. SVGNumberList: false,
  29775. SVGPathElement: false,
  29776. SVGPatternElement: false,
  29777. SVGPoint: false,
  29778. SVGPointList: false,
  29779. SVGPolygonElement: false,
  29780. SVGPolylineElement: false,
  29781. SVGPreserveAspectRatio: false,
  29782. SVGRadialGradientElement: false,
  29783. SVGRect: false,
  29784. SVGRectElement: false,
  29785. SVGScriptElement: false,
  29786. SVGSetElement: false,
  29787. SVGStopElement: false,
  29788. SVGStringList: false,
  29789. SVGStyleElement: false,
  29790. SVGSVGElement: false,
  29791. SVGSwitchElement: false,
  29792. SVGSymbolElement: false,
  29793. SVGTextContentElement: false,
  29794. SVGTextElement: false,
  29795. SVGTextPathElement: false,
  29796. SVGTextPositioningElement: false,
  29797. SVGTitleElement: false,
  29798. SVGTransform: false,
  29799. SVGTransformList: false,
  29800. SVGTSpanElement: false,
  29801. SVGUnitTypes: false,
  29802. SVGUseElement: false,
  29803. SVGViewElement: false,
  29804. TaskAttributionTiming: false,
  29805. Text: false,
  29806. TextDecoder: false,
  29807. TextEncoder: false,
  29808. TextEvent: false,
  29809. TextMetrics: false,
  29810. TextTrack: false,
  29811. TextTrackCue: false,
  29812. TextTrackCueList: false,
  29813. TextTrackList: false,
  29814. TimeRanges: false,
  29815. toolbar: false,
  29816. top: false,
  29817. Touch: false,
  29818. TouchEvent: false,
  29819. TouchList: false,
  29820. TrackEvent: false,
  29821. TransitionEvent: false,
  29822. TreeWalker: false,
  29823. UIEvent: false,
  29824. URL: false,
  29825. URLSearchParams: false,
  29826. ValidityState: false,
  29827. visualViewport: false,
  29828. VisualViewport: false,
  29829. VTTCue: false,
  29830. WaveShaperNode: false,
  29831. WebAssembly: false,
  29832. WebGL2RenderingContext: false,
  29833. WebGLActiveInfo: false,
  29834. WebGLBuffer: false,
  29835. WebGLContextEvent: false,
  29836. WebGLFramebuffer: false,
  29837. WebGLProgram: false,
  29838. WebGLQuery: false,
  29839. WebGLRenderbuffer: false,
  29840. WebGLRenderingContext: false,
  29841. WebGLSampler: false,
  29842. WebGLShader: false,
  29843. WebGLShaderPrecisionFormat: false,
  29844. WebGLSync: false,
  29845. WebGLTexture: false,
  29846. WebGLTransformFeedback: false,
  29847. WebGLUniformLocation: false,
  29848. WebGLVertexArrayObject: false,
  29849. WebSocket: false,
  29850. WheelEvent: false,
  29851. window: false,
  29852. Window: false,
  29853. Worker: false,
  29854. WritableStream: false,
  29855. XMLDocument: false,
  29856. XMLHttpRequest: false,
  29857. XMLHttpRequestEventTarget: false,
  29858. XMLHttpRequestUpload: false,
  29859. XMLSerializer: false,
  29860. XPathEvaluator: false,
  29861. XPathExpression: false,
  29862. XPathResult: false,
  29863. XSLTProcessor: false
  29864. },
  29865. worker: {
  29866. addEventListener: false,
  29867. applicationCache: false,
  29868. atob: false,
  29869. Blob: false,
  29870. BroadcastChannel: false,
  29871. btoa: false,
  29872. Cache: false,
  29873. caches: false,
  29874. clearInterval: false,
  29875. clearTimeout: false,
  29876. close: true,
  29877. console: false,
  29878. fetch: false,
  29879. FileReaderSync: false,
  29880. FormData: false,
  29881. Headers: false,
  29882. IDBCursor: false,
  29883. IDBCursorWithValue: false,
  29884. IDBDatabase: false,
  29885. IDBFactory: false,
  29886. IDBIndex: false,
  29887. IDBKeyRange: false,
  29888. IDBObjectStore: false,
  29889. IDBOpenDBRequest: false,
  29890. IDBRequest: false,
  29891. IDBTransaction: false,
  29892. IDBVersionChangeEvent: false,
  29893. ImageData: false,
  29894. importScripts: true,
  29895. indexedDB: false,
  29896. location: false,
  29897. MessageChannel: false,
  29898. MessagePort: false,
  29899. name: false,
  29900. navigator: false,
  29901. Notification: false,
  29902. onclose: true,
  29903. onconnect: true,
  29904. onerror: true,
  29905. onlanguagechange: true,
  29906. onmessage: true,
  29907. onoffline: true,
  29908. ononline: true,
  29909. onrejectionhandled: true,
  29910. onunhandledrejection: true,
  29911. performance: false,
  29912. Performance: false,
  29913. PerformanceEntry: false,
  29914. PerformanceMark: false,
  29915. PerformanceMeasure: false,
  29916. PerformanceNavigation: false,
  29917. PerformanceResourceTiming: false,
  29918. PerformanceTiming: false,
  29919. postMessage: true,
  29920. Promise: false,
  29921. queueMicrotask: false,
  29922. removeEventListener: false,
  29923. Request: false,
  29924. Response: false,
  29925. self: true,
  29926. ServiceWorkerRegistration: false,
  29927. setInterval: false,
  29928. setTimeout: false,
  29929. TextDecoder: false,
  29930. TextEncoder: false,
  29931. URL: false,
  29932. URLSearchParams: false,
  29933. WebSocket: false,
  29934. Worker: false,
  29935. WorkerGlobalScope: false,
  29936. XMLHttpRequest: false
  29937. },
  29938. node: {
  29939. __dirname: false,
  29940. __filename: false,
  29941. Buffer: false,
  29942. clearImmediate: false,
  29943. clearInterval: false,
  29944. clearTimeout: false,
  29945. console: false,
  29946. exports: true,
  29947. global: false,
  29948. Intl: false,
  29949. module: false,
  29950. process: false,
  29951. queueMicrotask: false,
  29952. require: false,
  29953. setImmediate: false,
  29954. setInterval: false,
  29955. setTimeout: false,
  29956. TextDecoder: false,
  29957. TextEncoder: false,
  29958. URL: false,
  29959. URLSearchParams: false
  29960. },
  29961. commonjs: {
  29962. exports: true,
  29963. global: false,
  29964. module: false,
  29965. require: false
  29966. },
  29967. amd: {
  29968. define: false,
  29969. require: false
  29970. },
  29971. mocha: {
  29972. after: false,
  29973. afterEach: false,
  29974. before: false,
  29975. beforeEach: false,
  29976. context: false,
  29977. describe: false,
  29978. it: false,
  29979. mocha: false,
  29980. run: false,
  29981. setup: false,
  29982. specify: false,
  29983. suite: false,
  29984. suiteSetup: false,
  29985. suiteTeardown: false,
  29986. teardown: false,
  29987. test: false,
  29988. xcontext: false,
  29989. xdescribe: false,
  29990. xit: false,
  29991. xspecify: false
  29992. },
  29993. jasmine: {
  29994. afterAll: false,
  29995. afterEach: false,
  29996. beforeAll: false,
  29997. beforeEach: false,
  29998. describe: false,
  29999. expect: false,
  30000. fail: false,
  30001. fdescribe: false,
  30002. fit: false,
  30003. it: false,
  30004. jasmine: false,
  30005. pending: false,
  30006. runs: false,
  30007. spyOn: false,
  30008. spyOnProperty: false,
  30009. waits: false,
  30010. waitsFor: false,
  30011. xdescribe: false,
  30012. xit: false
  30013. },
  30014. jest: {
  30015. afterAll: false,
  30016. afterEach: false,
  30017. beforeAll: false,
  30018. beforeEach: false,
  30019. describe: false,
  30020. expect: false,
  30021. fdescribe: false,
  30022. fit: false,
  30023. it: false,
  30024. jest: false,
  30025. pit: false,
  30026. require: false,
  30027. test: false,
  30028. xdescribe: false,
  30029. xit: false,
  30030. xtest: false
  30031. },
  30032. qunit: {
  30033. asyncTest: false,
  30034. deepEqual: false,
  30035. equal: false,
  30036. expect: false,
  30037. module: false,
  30038. notDeepEqual: false,
  30039. notEqual: false,
  30040. notOk: false,
  30041. notPropEqual: false,
  30042. notStrictEqual: false,
  30043. ok: false,
  30044. propEqual: false,
  30045. QUnit: false,
  30046. raises: false,
  30047. start: false,
  30048. stop: false,
  30049. strictEqual: false,
  30050. test: false,
  30051. throws: false
  30052. },
  30053. phantomjs: {
  30054. console: true,
  30055. exports: true,
  30056. phantom: true,
  30057. require: true,
  30058. WebPage: true
  30059. },
  30060. couch: {
  30061. emit: false,
  30062. exports: false,
  30063. getRow: false,
  30064. log: false,
  30065. module: false,
  30066. provides: false,
  30067. require: false,
  30068. respond: false,
  30069. send: false,
  30070. start: false,
  30071. sum: false
  30072. },
  30073. rhino: {
  30074. defineClass: false,
  30075. deserialize: false,
  30076. gc: false,
  30077. help: false,
  30078. importClass: false,
  30079. importPackage: false,
  30080. java: false,
  30081. load: false,
  30082. loadClass: false,
  30083. Packages: false,
  30084. print: false,
  30085. quit: false,
  30086. readFile: false,
  30087. readUrl: false,
  30088. runCommand: false,
  30089. seal: false,
  30090. serialize: false,
  30091. spawn: false,
  30092. sync: false,
  30093. toint32: false,
  30094. version: false
  30095. },
  30096. nashorn: {
  30097. __DIR__: false,
  30098. __FILE__: false,
  30099. __LINE__: false,
  30100. com: false,
  30101. edu: false,
  30102. exit: false,
  30103. java: false,
  30104. Java: false,
  30105. javafx: false,
  30106. JavaImporter: false,
  30107. javax: false,
  30108. JSAdapter: false,
  30109. load: false,
  30110. loadWithNewGlobal: false,
  30111. org: false,
  30112. Packages: false,
  30113. print: false,
  30114. quit: false
  30115. },
  30116. wsh: {
  30117. ActiveXObject: true,
  30118. Enumerator: true,
  30119. GetObject: true,
  30120. ScriptEngine: true,
  30121. ScriptEngineBuildVersion: true,
  30122. ScriptEngineMajorVersion: true,
  30123. ScriptEngineMinorVersion: true,
  30124. VBArray: true,
  30125. WScript: true,
  30126. WSH: true,
  30127. XDomainRequest: true
  30128. },
  30129. jquery: {
  30130. $: false,
  30131. jQuery: false
  30132. },
  30133. yui: {
  30134. YAHOO: false,
  30135. YAHOO_config: false,
  30136. YUI: false,
  30137. YUI_config: false
  30138. },
  30139. shelljs: {
  30140. cat: false,
  30141. cd: false,
  30142. chmod: false,
  30143. config: false,
  30144. cp: false,
  30145. dirs: false,
  30146. echo: false,
  30147. env: false,
  30148. error: false,
  30149. exec: false,
  30150. exit: false,
  30151. find: false,
  30152. grep: false,
  30153. ln: false,
  30154. ls: false,
  30155. mkdir: false,
  30156. mv: false,
  30157. popd: false,
  30158. pushd: false,
  30159. pwd: false,
  30160. rm: false,
  30161. sed: false,
  30162. set: false,
  30163. target: false,
  30164. tempdir: false,
  30165. test: false,
  30166. touch: false,
  30167. which: false
  30168. },
  30169. prototypejs: {
  30170. $: false,
  30171. $$: false,
  30172. $A: false,
  30173. $break: false,
  30174. $continue: false,
  30175. $F: false,
  30176. $H: false,
  30177. $R: false,
  30178. $w: false,
  30179. Abstract: false,
  30180. Ajax: false,
  30181. Autocompleter: false,
  30182. Builder: false,
  30183. Class: false,
  30184. Control: false,
  30185. Draggable: false,
  30186. Draggables: false,
  30187. Droppables: false,
  30188. Effect: false,
  30189. Element: false,
  30190. Enumerable: false,
  30191. Event: false,
  30192. Field: false,
  30193. Form: false,
  30194. Hash: false,
  30195. Insertion: false,
  30196. ObjectRange: false,
  30197. PeriodicalExecuter: false,
  30198. Position: false,
  30199. Prototype: false,
  30200. Scriptaculous: false,
  30201. Selector: false,
  30202. Sortable: false,
  30203. SortableObserver: false,
  30204. Sound: false,
  30205. Template: false,
  30206. Toggle: false,
  30207. Try: false
  30208. },
  30209. meteor: {
  30210. _: false,
  30211. $: false,
  30212. Accounts: false,
  30213. AccountsClient: false,
  30214. AccountsCommon: false,
  30215. AccountsServer: false,
  30216. App: false,
  30217. Assets: false,
  30218. Blaze: false,
  30219. check: false,
  30220. Cordova: false,
  30221. DDP: false,
  30222. DDPRateLimiter: false,
  30223. DDPServer: false,
  30224. Deps: false,
  30225. EJSON: false,
  30226. Email: false,
  30227. HTTP: false,
  30228. Log: false,
  30229. Match: false,
  30230. Meteor: false,
  30231. Mongo: false,
  30232. MongoInternals: false,
  30233. Npm: false,
  30234. Package: false,
  30235. Plugin: false,
  30236. process: false,
  30237. Random: false,
  30238. ReactiveDict: false,
  30239. ReactiveVar: false,
  30240. Router: false,
  30241. ServiceConfiguration: false,
  30242. Session: false,
  30243. share: false,
  30244. Spacebars: false,
  30245. Template: false,
  30246. Tinytest: false,
  30247. Tracker: false,
  30248. UI: false,
  30249. Utils: false,
  30250. WebApp: false,
  30251. WebAppInternals: false
  30252. },
  30253. mongo: {
  30254. _isWindows: false,
  30255. _rand: false,
  30256. BulkWriteResult: false,
  30257. cat: false,
  30258. cd: false,
  30259. connect: false,
  30260. db: false,
  30261. getHostName: false,
  30262. getMemInfo: false,
  30263. hostname: false,
  30264. ISODate: false,
  30265. listFiles: false,
  30266. load: false,
  30267. ls: false,
  30268. md5sumFile: false,
  30269. mkdir: false,
  30270. Mongo: false,
  30271. NumberInt: false,
  30272. NumberLong: false,
  30273. ObjectId: false,
  30274. PlanCache: false,
  30275. print: false,
  30276. printjson: false,
  30277. pwd: false,
  30278. quit: false,
  30279. removeFile: false,
  30280. rs: false,
  30281. sh: false,
  30282. UUID: false,
  30283. version: false,
  30284. WriteResult: false
  30285. },
  30286. applescript: {
  30287. $: false,
  30288. Application: false,
  30289. Automation: false,
  30290. console: false,
  30291. delay: false,
  30292. Library: false,
  30293. ObjC: false,
  30294. ObjectSpecifier: false,
  30295. Path: false,
  30296. Progress: false,
  30297. Ref: false
  30298. },
  30299. serviceworker: {
  30300. addEventListener: false,
  30301. applicationCache: false,
  30302. atob: false,
  30303. Blob: false,
  30304. BroadcastChannel: false,
  30305. btoa: false,
  30306. Cache: false,
  30307. caches: false,
  30308. CacheStorage: false,
  30309. clearInterval: false,
  30310. clearTimeout: false,
  30311. Client: false,
  30312. clients: false,
  30313. Clients: false,
  30314. close: true,
  30315. console: false,
  30316. ExtendableEvent: false,
  30317. ExtendableMessageEvent: false,
  30318. fetch: false,
  30319. FetchEvent: false,
  30320. FileReaderSync: false,
  30321. FormData: false,
  30322. Headers: false,
  30323. IDBCursor: false,
  30324. IDBCursorWithValue: false,
  30325. IDBDatabase: false,
  30326. IDBFactory: false,
  30327. IDBIndex: false,
  30328. IDBKeyRange: false,
  30329. IDBObjectStore: false,
  30330. IDBOpenDBRequest: false,
  30331. IDBRequest: false,
  30332. IDBTransaction: false,
  30333. IDBVersionChangeEvent: false,
  30334. ImageData: false,
  30335. importScripts: false,
  30336. indexedDB: false,
  30337. location: false,
  30338. MessageChannel: false,
  30339. MessagePort: false,
  30340. name: false,
  30341. navigator: false,
  30342. Notification: false,
  30343. onclose: true,
  30344. onconnect: true,
  30345. onerror: true,
  30346. onfetch: true,
  30347. oninstall: true,
  30348. onlanguagechange: true,
  30349. onmessage: true,
  30350. onmessageerror: true,
  30351. onnotificationclick: true,
  30352. onnotificationclose: true,
  30353. onoffline: true,
  30354. ononline: true,
  30355. onpush: true,
  30356. onpushsubscriptionchange: true,
  30357. onrejectionhandled: true,
  30358. onsync: true,
  30359. onunhandledrejection: true,
  30360. performance: false,
  30361. Performance: false,
  30362. PerformanceEntry: false,
  30363. PerformanceMark: false,
  30364. PerformanceMeasure: false,
  30365. PerformanceNavigation: false,
  30366. PerformanceResourceTiming: false,
  30367. PerformanceTiming: false,
  30368. postMessage: true,
  30369. Promise: false,
  30370. queueMicrotask: false,
  30371. registration: false,
  30372. removeEventListener: false,
  30373. Request: false,
  30374. Response: false,
  30375. self: false,
  30376. ServiceWorker: false,
  30377. ServiceWorkerContainer: false,
  30378. ServiceWorkerGlobalScope: false,
  30379. ServiceWorkerMessageEvent: false,
  30380. ServiceWorkerRegistration: false,
  30381. setInterval: false,
  30382. setTimeout: false,
  30383. skipWaiting: false,
  30384. TextDecoder: false,
  30385. TextEncoder: false,
  30386. URL: false,
  30387. URLSearchParams: false,
  30388. WebSocket: false,
  30389. WindowClient: false,
  30390. Worker: false,
  30391. WorkerGlobalScope: false,
  30392. XMLHttpRequest: false
  30393. },
  30394. atomtest: {
  30395. advanceClock: false,
  30396. fakeClearInterval: false,
  30397. fakeClearTimeout: false,
  30398. fakeSetInterval: false,
  30399. fakeSetTimeout: false,
  30400. resetTimeouts: false,
  30401. waitsForPromise: false
  30402. },
  30403. embertest: {
  30404. andThen: false,
  30405. click: false,
  30406. currentPath: false,
  30407. currentRouteName: false,
  30408. currentURL: false,
  30409. fillIn: false,
  30410. find: false,
  30411. findAll: false,
  30412. findWithAssert: false,
  30413. keyEvent: false,
  30414. pauseTest: false,
  30415. resumeTest: false,
  30416. triggerEvent: false,
  30417. visit: false,
  30418. wait: false
  30419. },
  30420. protractor: {
  30421. $: false,
  30422. $$: false,
  30423. browser: false,
  30424. by: false,
  30425. By: false,
  30426. DartObject: false,
  30427. element: false,
  30428. protractor: false
  30429. },
  30430. "shared-node-browser": {
  30431. clearInterval: false,
  30432. clearTimeout: false,
  30433. console: false,
  30434. setInterval: false,
  30435. setTimeout: false,
  30436. URL: false,
  30437. URLSearchParams: false
  30438. },
  30439. webextensions: {
  30440. browser: false,
  30441. chrome: false,
  30442. opr: false
  30443. },
  30444. greasemonkey: {
  30445. cloneInto: false,
  30446. createObjectIn: false,
  30447. exportFunction: false,
  30448. GM: false,
  30449. GM_addStyle: false,
  30450. GM_deleteValue: false,
  30451. GM_getResourceText: false,
  30452. GM_getResourceURL: false,
  30453. GM_getValue: false,
  30454. GM_info: false,
  30455. GM_listValues: false,
  30456. GM_log: false,
  30457. GM_openInTab: false,
  30458. GM_registerMenuCommand: false,
  30459. GM_setClipboard: false,
  30460. GM_setValue: false,
  30461. GM_xmlhttpRequest: false,
  30462. unsafeWindow: false
  30463. },
  30464. devtools: {
  30465. $: false,
  30466. $_: false,
  30467. $$: false,
  30468. $0: false,
  30469. $1: false,
  30470. $2: false,
  30471. $3: false,
  30472. $4: false,
  30473. $x: false,
  30474. chrome: false,
  30475. clear: false,
  30476. copy: false,
  30477. debug: false,
  30478. dir: false,
  30479. dirxml: false,
  30480. getEventListeners: false,
  30481. inspect: false,
  30482. keys: false,
  30483. monitor: false,
  30484. monitorEvents: false,
  30485. profile: false,
  30486. profileEnd: false,
  30487. queryObjects: false,
  30488. table: false,
  30489. undebug: false,
  30490. unmonitor: false,
  30491. unmonitorEvents: false,
  30492. values: false
  30493. }
  30494. };
  30495. }
  30496. });
  30497. // node_modules/globals/index.js
  30498. var require_globals2 = __commonJS({
  30499. "node_modules/globals/index.js"(exports, module) {
  30500. "use strict";
  30501. module.exports = require_globals();
  30502. }
  30503. });
  30504. // node_modules/estree-to-babel/node_modules/@babel/traverse/lib/cache.js
  30505. var require_cache = __commonJS({
  30506. "node_modules/estree-to-babel/node_modules/@babel/traverse/lib/cache.js"(exports) {
  30507. "use strict";
  30508. Object.defineProperty(exports, "__esModule", {
  30509. value: true
  30510. });
  30511. exports.clear = clear;
  30512. exports.clearPath = clearPath;
  30513. exports.clearScope = clearScope;
  30514. exports.scope = exports.path = void 0;
  30515. var path = /* @__PURE__ */ new WeakMap();
  30516. exports.path = path;
  30517. var scope = /* @__PURE__ */ new WeakMap();
  30518. exports.scope = scope;
  30519. function clear() {
  30520. clearPath();
  30521. clearScope();
  30522. }
  30523. function clearPath() {
  30524. exports.path = path = /* @__PURE__ */ new WeakMap();
  30525. }
  30526. function clearScope() {
  30527. exports.scope = scope = /* @__PURE__ */ new WeakMap();
  30528. }
  30529. }
  30530. });
  30531. // node_modules/estree-to-babel/node_modules/@babel/traverse/lib/scope/index.js
  30532. var require_scope = __commonJS({
  30533. "node_modules/estree-to-babel/node_modules/@babel/traverse/lib/scope/index.js"(exports) {
  30534. "use strict";
  30535. Object.defineProperty(exports, "__esModule", {
  30536. value: true
  30537. });
  30538. exports.default = void 0;
  30539. var _renamer = require_renamer();
  30540. var _index = require_lib14();
  30541. var _binding = require_binding();
  30542. var _globals = require_globals2();
  30543. var t2 = require_lib4();
  30544. var _cache = require_cache();
  30545. function gatherNodeParts(node, parts) {
  30546. switch (node == null ? void 0 : node.type) {
  30547. default:
  30548. if (t2.isModuleDeclaration(node)) {
  30549. if ((t2.isExportAllDeclaration(node) || t2.isExportNamedDeclaration(node) || t2.isImportDeclaration(node)) && node.source) {
  30550. gatherNodeParts(node.source, parts);
  30551. } else if ((t2.isExportNamedDeclaration(node) || t2.isImportDeclaration(node)) && node.specifiers && node.specifiers.length) {
  30552. for (const e of node.specifiers)
  30553. gatherNodeParts(e, parts);
  30554. } else if ((t2.isExportDefaultDeclaration(node) || t2.isExportNamedDeclaration(node)) && node.declaration) {
  30555. gatherNodeParts(node.declaration, parts);
  30556. }
  30557. } else if (t2.isModuleSpecifier(node)) {
  30558. gatherNodeParts(node.local, parts);
  30559. } else if (t2.isLiteral(node)) {
  30560. parts.push(node.value);
  30561. }
  30562. break;
  30563. case "MemberExpression":
  30564. case "OptionalMemberExpression":
  30565. case "JSXMemberExpression":
  30566. gatherNodeParts(node.object, parts);
  30567. gatherNodeParts(node.property, parts);
  30568. break;
  30569. case "Identifier":
  30570. case "JSXIdentifier":
  30571. parts.push(node.name);
  30572. break;
  30573. case "CallExpression":
  30574. case "OptionalCallExpression":
  30575. case "NewExpression":
  30576. gatherNodeParts(node.callee, parts);
  30577. break;
  30578. case "ObjectExpression":
  30579. case "ObjectPattern":
  30580. for (const e of node.properties) {
  30581. gatherNodeParts(e, parts);
  30582. }
  30583. break;
  30584. case "SpreadElement":
  30585. case "RestElement":
  30586. gatherNodeParts(node.argument, parts);
  30587. break;
  30588. case "ObjectProperty":
  30589. case "ObjectMethod":
  30590. case "ClassProperty":
  30591. case "ClassMethod":
  30592. case "ClassPrivateProperty":
  30593. case "ClassPrivateMethod":
  30594. gatherNodeParts(node.key, parts);
  30595. break;
  30596. case "ThisExpression":
  30597. parts.push("this");
  30598. break;
  30599. case "Super":
  30600. parts.push("super");
  30601. break;
  30602. case "Import":
  30603. parts.push("import");
  30604. break;
  30605. case "DoExpression":
  30606. parts.push("do");
  30607. break;
  30608. case "YieldExpression":
  30609. parts.push("yield");
  30610. gatherNodeParts(node.argument, parts);
  30611. break;
  30612. case "AwaitExpression":
  30613. parts.push("await");
  30614. gatherNodeParts(node.argument, parts);
  30615. break;
  30616. case "AssignmentExpression":
  30617. gatherNodeParts(node.left, parts);
  30618. break;
  30619. case "VariableDeclarator":
  30620. gatherNodeParts(node.id, parts);
  30621. break;
  30622. case "FunctionExpression":
  30623. case "FunctionDeclaration":
  30624. case "ClassExpression":
  30625. case "ClassDeclaration":
  30626. gatherNodeParts(node.id, parts);
  30627. break;
  30628. case "PrivateName":
  30629. gatherNodeParts(node.id, parts);
  30630. break;
  30631. case "ParenthesizedExpression":
  30632. gatherNodeParts(node.expression, parts);
  30633. break;
  30634. case "UnaryExpression":
  30635. case "UpdateExpression":
  30636. gatherNodeParts(node.argument, parts);
  30637. break;
  30638. case "MetaProperty":
  30639. gatherNodeParts(node.meta, parts);
  30640. gatherNodeParts(node.property, parts);
  30641. break;
  30642. case "JSXElement":
  30643. gatherNodeParts(node.openingElement, parts);
  30644. break;
  30645. case "JSXOpeningElement":
  30646. parts.push(node.name);
  30647. break;
  30648. case "JSXFragment":
  30649. gatherNodeParts(node.openingFragment, parts);
  30650. break;
  30651. case "JSXOpeningFragment":
  30652. parts.push("Fragment");
  30653. break;
  30654. case "JSXNamespacedName":
  30655. gatherNodeParts(node.namespace, parts);
  30656. gatherNodeParts(node.name, parts);
  30657. break;
  30658. }
  30659. }
  30660. var collectorVisitor = {
  30661. For(path) {
  30662. for (const key of t2.FOR_INIT_KEYS) {
  30663. const declar = path.get(key);
  30664. if (declar.isVar()) {
  30665. const parentScope = path.scope.getFunctionParent() || path.scope.getProgramParent();
  30666. parentScope.registerBinding("var", declar);
  30667. }
  30668. }
  30669. },
  30670. Declaration(path) {
  30671. if (path.isBlockScoped())
  30672. return;
  30673. if (path.isExportDeclaration())
  30674. return;
  30675. const parent = path.scope.getFunctionParent() || path.scope.getProgramParent();
  30676. parent.registerDeclaration(path);
  30677. },
  30678. ReferencedIdentifier(path, state) {
  30679. state.references.push(path);
  30680. },
  30681. ForXStatement(path, state) {
  30682. const left = path.get("left");
  30683. if (left.isPattern() || left.isIdentifier()) {
  30684. state.constantViolations.push(path);
  30685. }
  30686. },
  30687. ExportDeclaration: {
  30688. exit(path) {
  30689. const {
  30690. node,
  30691. scope
  30692. } = path;
  30693. if (t2.isExportAllDeclaration(node))
  30694. return;
  30695. const declar = node.declaration;
  30696. if (t2.isClassDeclaration(declar) || t2.isFunctionDeclaration(declar)) {
  30697. const id = declar.id;
  30698. if (!id)
  30699. return;
  30700. const binding = scope.getBinding(id.name);
  30701. if (binding)
  30702. binding.reference(path);
  30703. } else if (t2.isVariableDeclaration(declar)) {
  30704. for (const decl of declar.declarations) {
  30705. for (const name2 of Object.keys(t2.getBindingIdentifiers(decl))) {
  30706. const binding = scope.getBinding(name2);
  30707. if (binding)
  30708. binding.reference(path);
  30709. }
  30710. }
  30711. }
  30712. }
  30713. },
  30714. LabeledStatement(path) {
  30715. path.scope.getBlockParent().registerDeclaration(path);
  30716. },
  30717. AssignmentExpression(path, state) {
  30718. state.assignments.push(path);
  30719. },
  30720. UpdateExpression(path, state) {
  30721. state.constantViolations.push(path);
  30722. },
  30723. UnaryExpression(path, state) {
  30724. if (path.node.operator === "delete") {
  30725. state.constantViolations.push(path);
  30726. }
  30727. },
  30728. BlockScoped(path) {
  30729. let scope = path.scope;
  30730. if (scope.path === path)
  30731. scope = scope.parent;
  30732. const parent = scope.getBlockParent();
  30733. parent.registerDeclaration(path);
  30734. if (path.isClassDeclaration() && path.node.id) {
  30735. const id = path.node.id;
  30736. const name2 = id.name;
  30737. path.scope.bindings[name2] = path.scope.parent.getBinding(name2);
  30738. }
  30739. },
  30740. CatchClause(path) {
  30741. path.scope.registerBinding("let", path);
  30742. },
  30743. Function(path) {
  30744. if (path.isFunctionExpression() && path.has("id") && !path.get("id").node[t2.NOT_LOCAL_BINDING]) {
  30745. path.scope.registerBinding("local", path.get("id"), path);
  30746. }
  30747. const params = path.get("params");
  30748. for (const param of params) {
  30749. path.scope.registerBinding("param", param);
  30750. }
  30751. },
  30752. ClassExpression(path) {
  30753. if (path.has("id") && !path.get("id").node[t2.NOT_LOCAL_BINDING]) {
  30754. path.scope.registerBinding("local", path);
  30755. }
  30756. }
  30757. };
  30758. var uid = 0;
  30759. var Scope4 = class {
  30760. constructor(path) {
  30761. this.uid = void 0;
  30762. this.path = void 0;
  30763. this.block = void 0;
  30764. this.labels = void 0;
  30765. this.inited = void 0;
  30766. this.bindings = void 0;
  30767. this.references = void 0;
  30768. this.globals = void 0;
  30769. this.uids = void 0;
  30770. this.data = void 0;
  30771. this.crawling = void 0;
  30772. const {
  30773. node
  30774. } = path;
  30775. const cached = _cache.scope.get(node);
  30776. if ((cached == null ? void 0 : cached.path) === path) {
  30777. return cached;
  30778. }
  30779. _cache.scope.set(node, this);
  30780. this.uid = uid++;
  30781. this.block = node;
  30782. this.path = path;
  30783. this.labels = /* @__PURE__ */ new Map();
  30784. this.inited = false;
  30785. }
  30786. get parent() {
  30787. var _parent;
  30788. let parent, path = this.path;
  30789. do {
  30790. const isKey = path.key === "key";
  30791. path = path.parentPath;
  30792. if (isKey && path.isMethod())
  30793. path = path.parentPath;
  30794. if (path && path.isScope())
  30795. parent = path;
  30796. } while (path && !parent);
  30797. return (_parent = parent) == null ? void 0 : _parent.scope;
  30798. }
  30799. get parentBlock() {
  30800. return this.path.parent;
  30801. }
  30802. get hub() {
  30803. return this.path.hub;
  30804. }
  30805. traverse(node, opts, state) {
  30806. (0, _index.default)(node, opts, this, state, this.path);
  30807. }
  30808. generateDeclaredUidIdentifier(name2) {
  30809. const id = this.generateUidIdentifier(name2);
  30810. this.push({
  30811. id
  30812. });
  30813. return t2.cloneNode(id);
  30814. }
  30815. generateUidIdentifier(name2) {
  30816. return t2.identifier(this.generateUid(name2));
  30817. }
  30818. generateUid(name2 = "temp") {
  30819. name2 = t2.toIdentifier(name2).replace(/^_+/, "").replace(/[0-9]+$/g, "");
  30820. let uid2;
  30821. let i = 1;
  30822. do {
  30823. uid2 = this._generateUid(name2, i);
  30824. i++;
  30825. } while (this.hasLabel(uid2) || this.hasBinding(uid2) || this.hasGlobal(uid2) || this.hasReference(uid2));
  30826. const program = this.getProgramParent();
  30827. program.references[uid2] = true;
  30828. program.uids[uid2] = true;
  30829. return uid2;
  30830. }
  30831. _generateUid(name2, i) {
  30832. let id = name2;
  30833. if (i > 1)
  30834. id += i;
  30835. return `_${id}`;
  30836. }
  30837. generateUidBasedOnNode(node, defaultName) {
  30838. const parts = [];
  30839. gatherNodeParts(node, parts);
  30840. let id = parts.join("$");
  30841. id = id.replace(/^_/, "") || defaultName || "ref";
  30842. return this.generateUid(id.slice(0, 20));
  30843. }
  30844. generateUidIdentifierBasedOnNode(node, defaultName) {
  30845. return t2.identifier(this.generateUidBasedOnNode(node, defaultName));
  30846. }
  30847. isStatic(node) {
  30848. if (t2.isThisExpression(node) || t2.isSuper(node)) {
  30849. return true;
  30850. }
  30851. if (t2.isIdentifier(node)) {
  30852. const binding = this.getBinding(node.name);
  30853. if (binding) {
  30854. return binding.constant;
  30855. } else {
  30856. return this.hasBinding(node.name);
  30857. }
  30858. }
  30859. return false;
  30860. }
  30861. maybeGenerateMemoised(node, dontPush) {
  30862. if (this.isStatic(node)) {
  30863. return null;
  30864. } else {
  30865. const id = this.generateUidIdentifierBasedOnNode(node);
  30866. if (!dontPush) {
  30867. this.push({
  30868. id
  30869. });
  30870. return t2.cloneNode(id);
  30871. }
  30872. return id;
  30873. }
  30874. }
  30875. checkBlockScopedCollisions(local, kind, name2, id) {
  30876. if (kind === "param")
  30877. return;
  30878. if (local.kind === "local")
  30879. return;
  30880. const duplicate = kind === "let" || local.kind === "let" || local.kind === "const" || local.kind === "module" || local.kind === "param" && (kind === "let" || kind === "const");
  30881. if (duplicate) {
  30882. throw this.hub.buildError(id, `Duplicate declaration "${name2}"`, TypeError);
  30883. }
  30884. }
  30885. rename(oldName, newName, block) {
  30886. const binding = this.getBinding(oldName);
  30887. if (binding) {
  30888. newName = newName || this.generateUidIdentifier(oldName).name;
  30889. return new _renamer.default(binding, oldName, newName).rename(block);
  30890. }
  30891. }
  30892. _renameFromMap(map, oldName, newName, value) {
  30893. if (map[oldName]) {
  30894. map[newName] = value;
  30895. map[oldName] = null;
  30896. }
  30897. }
  30898. dump() {
  30899. const sep = "-".repeat(60);
  30900. console.log(sep);
  30901. let scope = this;
  30902. do {
  30903. console.log("#", scope.block.type);
  30904. for (const name2 of Object.keys(scope.bindings)) {
  30905. const binding = scope.bindings[name2];
  30906. console.log(" -", name2, {
  30907. constant: binding.constant,
  30908. references: binding.references,
  30909. violations: binding.constantViolations.length,
  30910. kind: binding.kind
  30911. });
  30912. }
  30913. } while (scope = scope.parent);
  30914. console.log(sep);
  30915. }
  30916. toArray(node, i, arrayLikeIsIterable) {
  30917. if (t2.isIdentifier(node)) {
  30918. const binding = this.getBinding(node.name);
  30919. if (binding != null && binding.constant && binding.path.isGenericType("Array")) {
  30920. return node;
  30921. }
  30922. }
  30923. if (t2.isArrayExpression(node)) {
  30924. return node;
  30925. }
  30926. if (t2.isIdentifier(node, {
  30927. name: "arguments"
  30928. })) {
  30929. return t2.callExpression(t2.memberExpression(t2.memberExpression(t2.memberExpression(t2.identifier("Array"), t2.identifier("prototype")), t2.identifier("slice")), t2.identifier("call")), [node]);
  30930. }
  30931. let helperName;
  30932. const args = [node];
  30933. if (i === true) {
  30934. helperName = "toConsumableArray";
  30935. } else if (i) {
  30936. args.push(t2.numericLiteral(i));
  30937. helperName = "slicedToArray";
  30938. } else {
  30939. helperName = "toArray";
  30940. }
  30941. if (arrayLikeIsIterable) {
  30942. args.unshift(this.hub.addHelper(helperName));
  30943. helperName = "maybeArrayLike";
  30944. }
  30945. return t2.callExpression(this.hub.addHelper(helperName), args);
  30946. }
  30947. hasLabel(name2) {
  30948. return !!this.getLabel(name2);
  30949. }
  30950. getLabel(name2) {
  30951. return this.labels.get(name2);
  30952. }
  30953. registerLabel(path) {
  30954. this.labels.set(path.node.label.name, path);
  30955. }
  30956. registerDeclaration(path) {
  30957. if (path.isLabeledStatement()) {
  30958. this.registerLabel(path);
  30959. } else if (path.isFunctionDeclaration()) {
  30960. this.registerBinding("hoisted", path.get("id"), path);
  30961. } else if (path.isVariableDeclaration()) {
  30962. const declarations = path.get("declarations");
  30963. for (const declar of declarations) {
  30964. this.registerBinding(path.node.kind, declar);
  30965. }
  30966. } else if (path.isClassDeclaration()) {
  30967. this.registerBinding("let", path);
  30968. } else if (path.isImportDeclaration()) {
  30969. const specifiers = path.get("specifiers");
  30970. for (const specifier of specifiers) {
  30971. this.registerBinding("module", specifier);
  30972. }
  30973. } else if (path.isExportDeclaration()) {
  30974. const declar = path.get("declaration");
  30975. if (declar.isClassDeclaration() || declar.isFunctionDeclaration() || declar.isVariableDeclaration()) {
  30976. this.registerDeclaration(declar);
  30977. }
  30978. } else {
  30979. this.registerBinding("unknown", path);
  30980. }
  30981. }
  30982. buildUndefinedNode() {
  30983. return t2.unaryExpression("void", t2.numericLiteral(0), true);
  30984. }
  30985. registerConstantViolation(path) {
  30986. const ids = path.getBindingIdentifiers();
  30987. for (const name2 of Object.keys(ids)) {
  30988. const binding = this.getBinding(name2);
  30989. if (binding)
  30990. binding.reassign(path);
  30991. }
  30992. }
  30993. registerBinding(kind, path, bindingPath = path) {
  30994. if (!kind)
  30995. throw new ReferenceError("no `kind`");
  30996. if (path.isVariableDeclaration()) {
  30997. const declarators = path.get("declarations");
  30998. for (const declar of declarators) {
  30999. this.registerBinding(kind, declar);
  31000. }
  31001. return;
  31002. }
  31003. const parent = this.getProgramParent();
  31004. const ids = path.getOuterBindingIdentifiers(true);
  31005. for (const name2 of Object.keys(ids)) {
  31006. parent.references[name2] = true;
  31007. for (const id of ids[name2]) {
  31008. const local = this.getOwnBinding(name2);
  31009. if (local) {
  31010. if (local.identifier === id)
  31011. continue;
  31012. this.checkBlockScopedCollisions(local, kind, name2, id);
  31013. }
  31014. if (local) {
  31015. this.registerConstantViolation(bindingPath);
  31016. } else {
  31017. this.bindings[name2] = new _binding.default({
  31018. identifier: id,
  31019. scope: this,
  31020. path: bindingPath,
  31021. kind
  31022. });
  31023. }
  31024. }
  31025. }
  31026. }
  31027. addGlobal(node) {
  31028. this.globals[node.name] = node;
  31029. }
  31030. hasUid(name2) {
  31031. let scope = this;
  31032. do {
  31033. if (scope.uids[name2])
  31034. return true;
  31035. } while (scope = scope.parent);
  31036. return false;
  31037. }
  31038. hasGlobal(name2) {
  31039. let scope = this;
  31040. do {
  31041. if (scope.globals[name2])
  31042. return true;
  31043. } while (scope = scope.parent);
  31044. return false;
  31045. }
  31046. hasReference(name2) {
  31047. return !!this.getProgramParent().references[name2];
  31048. }
  31049. isPure(node, constantsOnly) {
  31050. if (t2.isIdentifier(node)) {
  31051. const binding = this.getBinding(node.name);
  31052. if (!binding)
  31053. return false;
  31054. if (constantsOnly)
  31055. return binding.constant;
  31056. return true;
  31057. } else if (t2.isClass(node)) {
  31058. if (node.superClass && !this.isPure(node.superClass, constantsOnly)) {
  31059. return false;
  31060. }
  31061. return this.isPure(node.body, constantsOnly);
  31062. } else if (t2.isClassBody(node)) {
  31063. for (const method of node.body) {
  31064. if (!this.isPure(method, constantsOnly))
  31065. return false;
  31066. }
  31067. return true;
  31068. } else if (t2.isBinary(node)) {
  31069. return this.isPure(node.left, constantsOnly) && this.isPure(node.right, constantsOnly);
  31070. } else if (t2.isArrayExpression(node)) {
  31071. for (const elem of node.elements) {
  31072. if (!this.isPure(elem, constantsOnly))
  31073. return false;
  31074. }
  31075. return true;
  31076. } else if (t2.isObjectExpression(node)) {
  31077. for (const prop of node.properties) {
  31078. if (!this.isPure(prop, constantsOnly))
  31079. return false;
  31080. }
  31081. return true;
  31082. } else if (t2.isMethod(node)) {
  31083. if (node.computed && !this.isPure(node.key, constantsOnly))
  31084. return false;
  31085. if (node.kind === "get" || node.kind === "set")
  31086. return false;
  31087. return true;
  31088. } else if (t2.isProperty(node)) {
  31089. if (node.computed && !this.isPure(node.key, constantsOnly))
  31090. return false;
  31091. return this.isPure(node.value, constantsOnly);
  31092. } else if (t2.isUnaryExpression(node)) {
  31093. return this.isPure(node.argument, constantsOnly);
  31094. } else if (t2.isTaggedTemplateExpression(node)) {
  31095. return t2.matchesPattern(node.tag, "String.raw") && !this.hasBinding("String", true) && this.isPure(node.quasi, constantsOnly);
  31096. } else if (t2.isTemplateLiteral(node)) {
  31097. for (const expression of node.expressions) {
  31098. if (!this.isPure(expression, constantsOnly))
  31099. return false;
  31100. }
  31101. return true;
  31102. } else {
  31103. return t2.isPureish(node);
  31104. }
  31105. }
  31106. setData(key, val) {
  31107. return this.data[key] = val;
  31108. }
  31109. getData(key) {
  31110. let scope = this;
  31111. do {
  31112. const data2 = scope.data[key];
  31113. if (data2 != null)
  31114. return data2;
  31115. } while (scope = scope.parent);
  31116. }
  31117. removeData(key) {
  31118. let scope = this;
  31119. do {
  31120. const data2 = scope.data[key];
  31121. if (data2 != null)
  31122. scope.data[key] = null;
  31123. } while (scope = scope.parent);
  31124. }
  31125. init() {
  31126. if (!this.inited) {
  31127. this.inited = true;
  31128. this.crawl();
  31129. }
  31130. }
  31131. crawl() {
  31132. const path = this.path;
  31133. this.references = /* @__PURE__ */ Object.create(null);
  31134. this.bindings = /* @__PURE__ */ Object.create(null);
  31135. this.globals = /* @__PURE__ */ Object.create(null);
  31136. this.uids = /* @__PURE__ */ Object.create(null);
  31137. this.data = /* @__PURE__ */ Object.create(null);
  31138. const programParent = this.getProgramParent();
  31139. if (programParent.crawling)
  31140. return;
  31141. const state = {
  31142. references: [],
  31143. constantViolations: [],
  31144. assignments: []
  31145. };
  31146. this.crawling = true;
  31147. if (path.type !== "Program" && collectorVisitor._exploded) {
  31148. for (const visit4 of collectorVisitor.enter) {
  31149. visit4(path, state);
  31150. }
  31151. const typeVisitors = collectorVisitor[path.type];
  31152. if (typeVisitors) {
  31153. for (const visit4 of typeVisitors.enter) {
  31154. visit4(path, state);
  31155. }
  31156. }
  31157. }
  31158. path.traverse(collectorVisitor, state);
  31159. this.crawling = false;
  31160. for (const path2 of state.assignments) {
  31161. const ids = path2.getBindingIdentifiers();
  31162. for (const name2 of Object.keys(ids)) {
  31163. if (path2.scope.getBinding(name2))
  31164. continue;
  31165. programParent.addGlobal(ids[name2]);
  31166. }
  31167. path2.scope.registerConstantViolation(path2);
  31168. }
  31169. for (const ref2 of state.references) {
  31170. const binding = ref2.scope.getBinding(ref2.node.name);
  31171. if (binding) {
  31172. binding.reference(ref2);
  31173. } else {
  31174. programParent.addGlobal(ref2.node);
  31175. }
  31176. }
  31177. for (const path2 of state.constantViolations) {
  31178. path2.scope.registerConstantViolation(path2);
  31179. }
  31180. }
  31181. push(opts) {
  31182. let path = this.path;
  31183. if (!path.isBlockStatement() && !path.isProgram()) {
  31184. path = this.getBlockParent().path;
  31185. }
  31186. if (path.isSwitchStatement()) {
  31187. path = (this.getFunctionParent() || this.getProgramParent()).path;
  31188. }
  31189. if (path.isLoop() || path.isCatchClause() || path.isFunction()) {
  31190. path.ensureBlock();
  31191. path = path.get("body");
  31192. }
  31193. const unique = opts.unique;
  31194. const kind = opts.kind || "var";
  31195. const blockHoist = opts._blockHoist == null ? 2 : opts._blockHoist;
  31196. const dataKey = `declaration:${kind}:${blockHoist}`;
  31197. let declarPath = !unique && path.getData(dataKey);
  31198. if (!declarPath) {
  31199. const declar = t2.variableDeclaration(kind, []);
  31200. declar._blockHoist = blockHoist;
  31201. [declarPath] = path.unshiftContainer("body", [declar]);
  31202. if (!unique)
  31203. path.setData(dataKey, declarPath);
  31204. }
  31205. const declarator = t2.variableDeclarator(opts.id, opts.init);
  31206. declarPath.node.declarations.push(declarator);
  31207. this.registerBinding(kind, declarPath.get("declarations").pop());
  31208. }
  31209. getProgramParent() {
  31210. let scope = this;
  31211. do {
  31212. if (scope.path.isProgram()) {
  31213. return scope;
  31214. }
  31215. } while (scope = scope.parent);
  31216. throw new Error("Couldn't find a Program");
  31217. }
  31218. getFunctionParent() {
  31219. let scope = this;
  31220. do {
  31221. if (scope.path.isFunctionParent()) {
  31222. return scope;
  31223. }
  31224. } while (scope = scope.parent);
  31225. return null;
  31226. }
  31227. getBlockParent() {
  31228. let scope = this;
  31229. do {
  31230. if (scope.path.isBlockParent()) {
  31231. return scope;
  31232. }
  31233. } while (scope = scope.parent);
  31234. throw new Error("We couldn't find a BlockStatement, For, Switch, Function, Loop or Program...");
  31235. }
  31236. getAllBindings() {
  31237. const ids = /* @__PURE__ */ Object.create(null);
  31238. let scope = this;
  31239. do {
  31240. for (const key of Object.keys(scope.bindings)) {
  31241. if (key in ids === false) {
  31242. ids[key] = scope.bindings[key];
  31243. }
  31244. }
  31245. scope = scope.parent;
  31246. } while (scope);
  31247. return ids;
  31248. }
  31249. getAllBindingsOfKind(...kinds) {
  31250. const ids = /* @__PURE__ */ Object.create(null);
  31251. for (const kind of kinds) {
  31252. let scope = this;
  31253. do {
  31254. for (const name2 of Object.keys(scope.bindings)) {
  31255. const binding = scope.bindings[name2];
  31256. if (binding.kind === kind)
  31257. ids[name2] = binding;
  31258. }
  31259. scope = scope.parent;
  31260. } while (scope);
  31261. }
  31262. return ids;
  31263. }
  31264. bindingIdentifierEquals(name2, node) {
  31265. return this.getBindingIdentifier(name2) === node;
  31266. }
  31267. getBinding(name2) {
  31268. let scope = this;
  31269. let previousPath;
  31270. do {
  31271. const binding = scope.getOwnBinding(name2);
  31272. if (binding) {
  31273. var _previousPath;
  31274. if ((_previousPath = previousPath) != null && _previousPath.isPattern() && binding.kind !== "param") {
  31275. } else {
  31276. return binding;
  31277. }
  31278. }
  31279. previousPath = scope.path;
  31280. } while (scope = scope.parent);
  31281. }
  31282. getOwnBinding(name2) {
  31283. return this.bindings[name2];
  31284. }
  31285. getBindingIdentifier(name2) {
  31286. var _this$getBinding;
  31287. return (_this$getBinding = this.getBinding(name2)) == null ? void 0 : _this$getBinding.identifier;
  31288. }
  31289. getOwnBindingIdentifier(name2) {
  31290. const binding = this.bindings[name2];
  31291. return binding == null ? void 0 : binding.identifier;
  31292. }
  31293. hasOwnBinding(name2) {
  31294. return !!this.getOwnBinding(name2);
  31295. }
  31296. hasBinding(name2, noGlobals) {
  31297. if (!name2)
  31298. return false;
  31299. if (this.hasOwnBinding(name2))
  31300. return true;
  31301. if (this.parentHasBinding(name2, noGlobals))
  31302. return true;
  31303. if (this.hasUid(name2))
  31304. return true;
  31305. if (!noGlobals && Scope4.globals.includes(name2))
  31306. return true;
  31307. if (!noGlobals && Scope4.contextVariables.includes(name2))
  31308. return true;
  31309. return false;
  31310. }
  31311. parentHasBinding(name2, noGlobals) {
  31312. var _this$parent;
  31313. return (_this$parent = this.parent) == null ? void 0 : _this$parent.hasBinding(name2, noGlobals);
  31314. }
  31315. moveBindingTo(name2, scope) {
  31316. const info = this.getBinding(name2);
  31317. if (info) {
  31318. info.scope.removeOwnBinding(name2);
  31319. info.scope = scope;
  31320. scope.bindings[name2] = info;
  31321. }
  31322. }
  31323. removeOwnBinding(name2) {
  31324. delete this.bindings[name2];
  31325. }
  31326. removeBinding(name2) {
  31327. var _this$getBinding2;
  31328. (_this$getBinding2 = this.getBinding(name2)) == null ? void 0 : _this$getBinding2.scope.removeOwnBinding(name2);
  31329. let scope = this;
  31330. do {
  31331. if (scope.uids[name2]) {
  31332. scope.uids[name2] = false;
  31333. }
  31334. } while (scope = scope.parent);
  31335. }
  31336. };
  31337. exports.default = Scope4;
  31338. Scope4.globals = Object.keys(_globals.builtin);
  31339. Scope4.contextVariables = ["arguments", "undefined", "Infinity", "NaN"];
  31340. }
  31341. });
  31342. // node_modules/source-map/lib/base64.js
  31343. var require_base64 = __commonJS({
  31344. "node_modules/source-map/lib/base64.js"(exports) {
  31345. var intToCharMap = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");
  31346. exports.encode = function(number2) {
  31347. if (0 <= number2 && number2 < intToCharMap.length) {
  31348. return intToCharMap[number2];
  31349. }
  31350. throw new TypeError("Must be between 0 and 63: " + number2);
  31351. };
  31352. exports.decode = function(charCode) {
  31353. var bigA = 65;
  31354. var bigZ = 90;
  31355. var littleA = 97;
  31356. var littleZ = 122;
  31357. var zero = 48;
  31358. var nine = 57;
  31359. var plus = 43;
  31360. var slash = 47;
  31361. var littleOffset = 26;
  31362. var numberOffset = 52;
  31363. if (bigA <= charCode && charCode <= bigZ) {
  31364. return charCode - bigA;
  31365. }
  31366. if (littleA <= charCode && charCode <= littleZ) {
  31367. return charCode - littleA + littleOffset;
  31368. }
  31369. if (zero <= charCode && charCode <= nine) {
  31370. return charCode - zero + numberOffset;
  31371. }
  31372. if (charCode == plus) {
  31373. return 62;
  31374. }
  31375. if (charCode == slash) {
  31376. return 63;
  31377. }
  31378. return -1;
  31379. };
  31380. }
  31381. });
  31382. // node_modules/source-map/lib/base64-vlq.js
  31383. var require_base64_vlq = __commonJS({
  31384. "node_modules/source-map/lib/base64-vlq.js"(exports) {
  31385. var base64 = require_base64();
  31386. var VLQ_BASE_SHIFT = 5;
  31387. var VLQ_BASE = 1 << VLQ_BASE_SHIFT;
  31388. var VLQ_BASE_MASK = VLQ_BASE - 1;
  31389. var VLQ_CONTINUATION_BIT = VLQ_BASE;
  31390. function toVLQSigned(aValue) {
  31391. return aValue < 0 ? (-aValue << 1) + 1 : (aValue << 1) + 0;
  31392. }
  31393. function fromVLQSigned(aValue) {
  31394. var isNegative = (aValue & 1) === 1;
  31395. var shifted = aValue >> 1;
  31396. return isNegative ? -shifted : shifted;
  31397. }
  31398. exports.encode = function base64VLQ_encode(aValue) {
  31399. var encoded = "";
  31400. var digit;
  31401. var vlq = toVLQSigned(aValue);
  31402. do {
  31403. digit = vlq & VLQ_BASE_MASK;
  31404. vlq >>>= VLQ_BASE_SHIFT;
  31405. if (vlq > 0) {
  31406. digit |= VLQ_CONTINUATION_BIT;
  31407. }
  31408. encoded += base64.encode(digit);
  31409. } while (vlq > 0);
  31410. return encoded;
  31411. };
  31412. exports.decode = function base64VLQ_decode(aStr, aIndex, aOutParam) {
  31413. var strLen = aStr.length;
  31414. var result = 0;
  31415. var shift = 0;
  31416. var continuation, digit;
  31417. do {
  31418. if (aIndex >= strLen) {
  31419. throw new Error("Expected more digits in base 64 VLQ value.");
  31420. }
  31421. digit = base64.decode(aStr.charCodeAt(aIndex++));
  31422. if (digit === -1) {
  31423. throw new Error("Invalid base64 digit: " + aStr.charAt(aIndex - 1));
  31424. }
  31425. continuation = !!(digit & VLQ_CONTINUATION_BIT);
  31426. digit &= VLQ_BASE_MASK;
  31427. result = result + (digit << shift);
  31428. shift += VLQ_BASE_SHIFT;
  31429. } while (continuation);
  31430. aOutParam.value = fromVLQSigned(result);
  31431. aOutParam.rest = aIndex;
  31432. };
  31433. }
  31434. });
  31435. // node_modules/source-map/lib/util.js
  31436. var require_util = __commonJS({
  31437. "node_modules/source-map/lib/util.js"(exports) {
  31438. function getArg(aArgs, aName, aDefaultValue) {
  31439. if (aName in aArgs) {
  31440. return aArgs[aName];
  31441. } else if (arguments.length === 3) {
  31442. return aDefaultValue;
  31443. } else {
  31444. throw new Error('"' + aName + '" is a required argument.');
  31445. }
  31446. }
  31447. exports.getArg = getArg;
  31448. var urlRegexp = /^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.]*)(?::(\d+))?(\S*)$/;
  31449. var dataUrlRegexp = /^data:.+\,.+$/;
  31450. function urlParse(aUrl) {
  31451. var match = aUrl.match(urlRegexp);
  31452. if (!match) {
  31453. return null;
  31454. }
  31455. return {
  31456. scheme: match[1],
  31457. auth: match[2],
  31458. host: match[3],
  31459. port: match[4],
  31460. path: match[5]
  31461. };
  31462. }
  31463. exports.urlParse = urlParse;
  31464. function urlGenerate(aParsedUrl) {
  31465. var url = "";
  31466. if (aParsedUrl.scheme) {
  31467. url += aParsedUrl.scheme + ":";
  31468. }
  31469. url += "//";
  31470. if (aParsedUrl.auth) {
  31471. url += aParsedUrl.auth + "@";
  31472. }
  31473. if (aParsedUrl.host) {
  31474. url += aParsedUrl.host;
  31475. }
  31476. if (aParsedUrl.port) {
  31477. url += ":" + aParsedUrl.port;
  31478. }
  31479. if (aParsedUrl.path) {
  31480. url += aParsedUrl.path;
  31481. }
  31482. return url;
  31483. }
  31484. exports.urlGenerate = urlGenerate;
  31485. function normalize6(aPath) {
  31486. var path = aPath;
  31487. var url = urlParse(aPath);
  31488. if (url) {
  31489. if (!url.path) {
  31490. return aPath;
  31491. }
  31492. path = url.path;
  31493. }
  31494. var isAbsolute = exports.isAbsolute(path);
  31495. var parts = path.split(/\/+/);
  31496. for (var part, up = 0, i = parts.length - 1; i >= 0; i--) {
  31497. part = parts[i];
  31498. if (part === ".") {
  31499. parts.splice(i, 1);
  31500. } else if (part === "..") {
  31501. up++;
  31502. } else if (up > 0) {
  31503. if (part === "") {
  31504. parts.splice(i + 1, up);
  31505. up = 0;
  31506. } else {
  31507. parts.splice(i, 2);
  31508. up--;
  31509. }
  31510. }
  31511. }
  31512. path = parts.join("/");
  31513. if (path === "") {
  31514. path = isAbsolute ? "/" : ".";
  31515. }
  31516. if (url) {
  31517. url.path = path;
  31518. return urlGenerate(url);
  31519. }
  31520. return path;
  31521. }
  31522. exports.normalize = normalize6;
  31523. function join(aRoot, aPath) {
  31524. if (aRoot === "") {
  31525. aRoot = ".";
  31526. }
  31527. if (aPath === "") {
  31528. aPath = ".";
  31529. }
  31530. var aPathUrl = urlParse(aPath);
  31531. var aRootUrl = urlParse(aRoot);
  31532. if (aRootUrl) {
  31533. aRoot = aRootUrl.path || "/";
  31534. }
  31535. if (aPathUrl && !aPathUrl.scheme) {
  31536. if (aRootUrl) {
  31537. aPathUrl.scheme = aRootUrl.scheme;
  31538. }
  31539. return urlGenerate(aPathUrl);
  31540. }
  31541. if (aPathUrl || aPath.match(dataUrlRegexp)) {
  31542. return aPath;
  31543. }
  31544. if (aRootUrl && !aRootUrl.host && !aRootUrl.path) {
  31545. aRootUrl.host = aPath;
  31546. return urlGenerate(aRootUrl);
  31547. }
  31548. var joined = aPath.charAt(0) === "/" ? aPath : normalize6(aRoot.replace(/\/+$/, "") + "/" + aPath);
  31549. if (aRootUrl) {
  31550. aRootUrl.path = joined;
  31551. return urlGenerate(aRootUrl);
  31552. }
  31553. return joined;
  31554. }
  31555. exports.join = join;
  31556. exports.isAbsolute = function(aPath) {
  31557. return aPath.charAt(0) === "/" || !!aPath.match(urlRegexp);
  31558. };
  31559. function relative(aRoot, aPath) {
  31560. if (aRoot === "") {
  31561. aRoot = ".";
  31562. }
  31563. aRoot = aRoot.replace(/\/$/, "");
  31564. var level = 0;
  31565. while (aPath.indexOf(aRoot + "/") !== 0) {
  31566. var index2 = aRoot.lastIndexOf("/");
  31567. if (index2 < 0) {
  31568. return aPath;
  31569. }
  31570. aRoot = aRoot.slice(0, index2);
  31571. if (aRoot.match(/^([^\/]+:\/)?\/*$/)) {
  31572. return aPath;
  31573. }
  31574. ++level;
  31575. }
  31576. return Array(level + 1).join("../") + aPath.substr(aRoot.length + 1);
  31577. }
  31578. exports.relative = relative;
  31579. var supportsNullProto = function() {
  31580. var obj = /* @__PURE__ */ Object.create(null);
  31581. return !("__proto__" in obj);
  31582. }();
  31583. function identity(s) {
  31584. return s;
  31585. }
  31586. function toSetString(aStr) {
  31587. if (isProtoString(aStr)) {
  31588. return "$" + aStr;
  31589. }
  31590. return aStr;
  31591. }
  31592. exports.toSetString = supportsNullProto ? identity : toSetString;
  31593. function fromSetString(aStr) {
  31594. if (isProtoString(aStr)) {
  31595. return aStr.slice(1);
  31596. }
  31597. return aStr;
  31598. }
  31599. exports.fromSetString = supportsNullProto ? identity : fromSetString;
  31600. function isProtoString(s) {
  31601. if (!s) {
  31602. return false;
  31603. }
  31604. var length = s.length;
  31605. if (length < 9) {
  31606. return false;
  31607. }
  31608. if (s.charCodeAt(length - 1) !== 95 || s.charCodeAt(length - 2) !== 95 || s.charCodeAt(length - 3) !== 111 || s.charCodeAt(length - 4) !== 116 || s.charCodeAt(length - 5) !== 111 || s.charCodeAt(length - 6) !== 114 || s.charCodeAt(length - 7) !== 112 || s.charCodeAt(length - 8) !== 95 || s.charCodeAt(length - 9) !== 95) {
  31609. return false;
  31610. }
  31611. for (var i = length - 10; i >= 0; i--) {
  31612. if (s.charCodeAt(i) !== 36) {
  31613. return false;
  31614. }
  31615. }
  31616. return true;
  31617. }
  31618. function compareByOriginalPositions(mappingA, mappingB, onlyCompareOriginal) {
  31619. var cmp = mappingA.source - mappingB.source;
  31620. if (cmp !== 0) {
  31621. return cmp;
  31622. }
  31623. cmp = mappingA.originalLine - mappingB.originalLine;
  31624. if (cmp !== 0) {
  31625. return cmp;
  31626. }
  31627. cmp = mappingA.originalColumn - mappingB.originalColumn;
  31628. if (cmp !== 0 || onlyCompareOriginal) {
  31629. return cmp;
  31630. }
  31631. cmp = mappingA.generatedColumn - mappingB.generatedColumn;
  31632. if (cmp !== 0) {
  31633. return cmp;
  31634. }
  31635. cmp = mappingA.generatedLine - mappingB.generatedLine;
  31636. if (cmp !== 0) {
  31637. return cmp;
  31638. }
  31639. return mappingA.name - mappingB.name;
  31640. }
  31641. exports.compareByOriginalPositions = compareByOriginalPositions;
  31642. function compareByGeneratedPositionsDeflated(mappingA, mappingB, onlyCompareGenerated) {
  31643. var cmp = mappingA.generatedLine - mappingB.generatedLine;
  31644. if (cmp !== 0) {
  31645. return cmp;
  31646. }
  31647. cmp = mappingA.generatedColumn - mappingB.generatedColumn;
  31648. if (cmp !== 0 || onlyCompareGenerated) {
  31649. return cmp;
  31650. }
  31651. cmp = mappingA.source - mappingB.source;
  31652. if (cmp !== 0) {
  31653. return cmp;
  31654. }
  31655. cmp = mappingA.originalLine - mappingB.originalLine;
  31656. if (cmp !== 0) {
  31657. return cmp;
  31658. }
  31659. cmp = mappingA.originalColumn - mappingB.originalColumn;
  31660. if (cmp !== 0) {
  31661. return cmp;
  31662. }
  31663. return mappingA.name - mappingB.name;
  31664. }
  31665. exports.compareByGeneratedPositionsDeflated = compareByGeneratedPositionsDeflated;
  31666. function strcmp(aStr1, aStr2) {
  31667. if (aStr1 === aStr2) {
  31668. return 0;
  31669. }
  31670. if (aStr1 > aStr2) {
  31671. return 1;
  31672. }
  31673. return -1;
  31674. }
  31675. function compareByGeneratedPositionsInflated(mappingA, mappingB) {
  31676. var cmp = mappingA.generatedLine - mappingB.generatedLine;
  31677. if (cmp !== 0) {
  31678. return cmp;
  31679. }
  31680. cmp = mappingA.generatedColumn - mappingB.generatedColumn;
  31681. if (cmp !== 0) {
  31682. return cmp;
  31683. }
  31684. cmp = strcmp(mappingA.source, mappingB.source);
  31685. if (cmp !== 0) {
  31686. return cmp;
  31687. }
  31688. cmp = mappingA.originalLine - mappingB.originalLine;
  31689. if (cmp !== 0) {
  31690. return cmp;
  31691. }
  31692. cmp = mappingA.originalColumn - mappingB.originalColumn;
  31693. if (cmp !== 0) {
  31694. return cmp;
  31695. }
  31696. return strcmp(mappingA.name, mappingB.name);
  31697. }
  31698. exports.compareByGeneratedPositionsInflated = compareByGeneratedPositionsInflated;
  31699. }
  31700. });
  31701. // node_modules/source-map/lib/array-set.js
  31702. var require_array_set = __commonJS({
  31703. "node_modules/source-map/lib/array-set.js"(exports) {
  31704. var util = require_util();
  31705. var has = Object.prototype.hasOwnProperty;
  31706. var hasNativeMap = typeof Map !== "undefined";
  31707. function ArraySet() {
  31708. this._array = [];
  31709. this._set = hasNativeMap ? /* @__PURE__ */ new Map() : /* @__PURE__ */ Object.create(null);
  31710. }
  31711. ArraySet.fromArray = function ArraySet_fromArray(aArray, aAllowDuplicates) {
  31712. var set = new ArraySet();
  31713. for (var i = 0, len = aArray.length; i < len; i++) {
  31714. set.add(aArray[i], aAllowDuplicates);
  31715. }
  31716. return set;
  31717. };
  31718. ArraySet.prototype.size = function ArraySet_size() {
  31719. return hasNativeMap ? this._set.size : Object.getOwnPropertyNames(this._set).length;
  31720. };
  31721. ArraySet.prototype.add = function ArraySet_add(aStr, aAllowDuplicates) {
  31722. var sStr = hasNativeMap ? aStr : util.toSetString(aStr);
  31723. var isDuplicate = hasNativeMap ? this.has(aStr) : has.call(this._set, sStr);
  31724. var idx = this._array.length;
  31725. if (!isDuplicate || aAllowDuplicates) {
  31726. this._array.push(aStr);
  31727. }
  31728. if (!isDuplicate) {
  31729. if (hasNativeMap) {
  31730. this._set.set(aStr, idx);
  31731. } else {
  31732. this._set[sStr] = idx;
  31733. }
  31734. }
  31735. };
  31736. ArraySet.prototype.has = function ArraySet_has(aStr) {
  31737. if (hasNativeMap) {
  31738. return this._set.has(aStr);
  31739. } else {
  31740. var sStr = util.toSetString(aStr);
  31741. return has.call(this._set, sStr);
  31742. }
  31743. };
  31744. ArraySet.prototype.indexOf = function ArraySet_indexOf(aStr) {
  31745. if (hasNativeMap) {
  31746. var idx = this._set.get(aStr);
  31747. if (idx >= 0) {
  31748. return idx;
  31749. }
  31750. } else {
  31751. var sStr = util.toSetString(aStr);
  31752. if (has.call(this._set, sStr)) {
  31753. return this._set[sStr];
  31754. }
  31755. }
  31756. throw new Error('"' + aStr + '" is not in the set.');
  31757. };
  31758. ArraySet.prototype.at = function ArraySet_at(aIdx) {
  31759. if (aIdx >= 0 && aIdx < this._array.length) {
  31760. return this._array[aIdx];
  31761. }
  31762. throw new Error("No element indexed by " + aIdx);
  31763. };
  31764. ArraySet.prototype.toArray = function ArraySet_toArray() {
  31765. return this._array.slice();
  31766. };
  31767. exports.ArraySet = ArraySet;
  31768. }
  31769. });
  31770. // node_modules/source-map/lib/mapping-list.js
  31771. var require_mapping_list = __commonJS({
  31772. "node_modules/source-map/lib/mapping-list.js"(exports) {
  31773. var util = require_util();
  31774. function generatedPositionAfter(mappingA, mappingB) {
  31775. var lineA = mappingA.generatedLine;
  31776. var lineB = mappingB.generatedLine;
  31777. var columnA = mappingA.generatedColumn;
  31778. var columnB = mappingB.generatedColumn;
  31779. return lineB > lineA || lineB == lineA && columnB >= columnA || util.compareByGeneratedPositionsInflated(mappingA, mappingB) <= 0;
  31780. }
  31781. function MappingList() {
  31782. this._array = [];
  31783. this._sorted = true;
  31784. this._last = { generatedLine: -1, generatedColumn: 0 };
  31785. }
  31786. MappingList.prototype.unsortedForEach = function MappingList_forEach(aCallback, aThisArg) {
  31787. this._array.forEach(aCallback, aThisArg);
  31788. };
  31789. MappingList.prototype.add = function MappingList_add(aMapping) {
  31790. if (generatedPositionAfter(this._last, aMapping)) {
  31791. this._last = aMapping;
  31792. this._array.push(aMapping);
  31793. } else {
  31794. this._sorted = false;
  31795. this._array.push(aMapping);
  31796. }
  31797. };
  31798. MappingList.prototype.toArray = function MappingList_toArray() {
  31799. if (!this._sorted) {
  31800. this._array.sort(util.compareByGeneratedPositionsInflated);
  31801. this._sorted = true;
  31802. }
  31803. return this._array;
  31804. };
  31805. exports.MappingList = MappingList;
  31806. }
  31807. });
  31808. // node_modules/source-map/lib/source-map-generator.js
  31809. var require_source_map_generator = __commonJS({
  31810. "node_modules/source-map/lib/source-map-generator.js"(exports) {
  31811. var base64VLQ = require_base64_vlq();
  31812. var util = require_util();
  31813. var ArraySet = require_array_set().ArraySet;
  31814. var MappingList = require_mapping_list().MappingList;
  31815. function SourceMapGenerator(aArgs) {
  31816. if (!aArgs) {
  31817. aArgs = {};
  31818. }
  31819. this._file = util.getArg(aArgs, "file", null);
  31820. this._sourceRoot = util.getArg(aArgs, "sourceRoot", null);
  31821. this._skipValidation = util.getArg(aArgs, "skipValidation", false);
  31822. this._sources = new ArraySet();
  31823. this._names = new ArraySet();
  31824. this._mappings = new MappingList();
  31825. this._sourcesContents = null;
  31826. }
  31827. SourceMapGenerator.prototype._version = 3;
  31828. SourceMapGenerator.fromSourceMap = function SourceMapGenerator_fromSourceMap(aSourceMapConsumer) {
  31829. var sourceRoot = aSourceMapConsumer.sourceRoot;
  31830. var generator = new SourceMapGenerator({
  31831. file: aSourceMapConsumer.file,
  31832. sourceRoot
  31833. });
  31834. aSourceMapConsumer.eachMapping(function(mapping) {
  31835. var newMapping = {
  31836. generated: {
  31837. line: mapping.generatedLine,
  31838. column: mapping.generatedColumn
  31839. }
  31840. };
  31841. if (mapping.source != null) {
  31842. newMapping.source = mapping.source;
  31843. if (sourceRoot != null) {
  31844. newMapping.source = util.relative(sourceRoot, newMapping.source);
  31845. }
  31846. newMapping.original = {
  31847. line: mapping.originalLine,
  31848. column: mapping.originalColumn
  31849. };
  31850. if (mapping.name != null) {
  31851. newMapping.name = mapping.name;
  31852. }
  31853. }
  31854. generator.addMapping(newMapping);
  31855. });
  31856. aSourceMapConsumer.sources.forEach(function(sourceFile) {
  31857. var content3 = aSourceMapConsumer.sourceContentFor(sourceFile);
  31858. if (content3 != null) {
  31859. generator.setSourceContent(sourceFile, content3);
  31860. }
  31861. });
  31862. return generator;
  31863. };
  31864. SourceMapGenerator.prototype.addMapping = function SourceMapGenerator_addMapping(aArgs) {
  31865. var generated2 = util.getArg(aArgs, "generated");
  31866. var original = util.getArg(aArgs, "original", null);
  31867. var source = util.getArg(aArgs, "source", null);
  31868. var name2 = util.getArg(aArgs, "name", null);
  31869. if (!this._skipValidation) {
  31870. this._validateMapping(generated2, original, source, name2);
  31871. }
  31872. if (source != null) {
  31873. source = String(source);
  31874. if (!this._sources.has(source)) {
  31875. this._sources.add(source);
  31876. }
  31877. }
  31878. if (name2 != null) {
  31879. name2 = String(name2);
  31880. if (!this._names.has(name2)) {
  31881. this._names.add(name2);
  31882. }
  31883. }
  31884. this._mappings.add({
  31885. generatedLine: generated2.line,
  31886. generatedColumn: generated2.column,
  31887. originalLine: original != null && original.line,
  31888. originalColumn: original != null && original.column,
  31889. source,
  31890. name: name2
  31891. });
  31892. };
  31893. SourceMapGenerator.prototype.setSourceContent = function SourceMapGenerator_setSourceContent(aSourceFile, aSourceContent) {
  31894. var source = aSourceFile;
  31895. if (this._sourceRoot != null) {
  31896. source = util.relative(this._sourceRoot, source);
  31897. }
  31898. if (aSourceContent != null) {
  31899. if (!this._sourcesContents) {
  31900. this._sourcesContents = /* @__PURE__ */ Object.create(null);
  31901. }
  31902. this._sourcesContents[util.toSetString(source)] = aSourceContent;
  31903. } else if (this._sourcesContents) {
  31904. delete this._sourcesContents[util.toSetString(source)];
  31905. if (Object.keys(this._sourcesContents).length === 0) {
  31906. this._sourcesContents = null;
  31907. }
  31908. }
  31909. };
  31910. SourceMapGenerator.prototype.applySourceMap = function SourceMapGenerator_applySourceMap(aSourceMapConsumer, aSourceFile, aSourceMapPath) {
  31911. var sourceFile = aSourceFile;
  31912. if (aSourceFile == null) {
  31913. if (aSourceMapConsumer.file == null) {
  31914. throw new Error(
  31915. `SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, or the source map's "file" property. Both were omitted.`
  31916. );
  31917. }
  31918. sourceFile = aSourceMapConsumer.file;
  31919. }
  31920. var sourceRoot = this._sourceRoot;
  31921. if (sourceRoot != null) {
  31922. sourceFile = util.relative(sourceRoot, sourceFile);
  31923. }
  31924. var newSources = new ArraySet();
  31925. var newNames = new ArraySet();
  31926. this._mappings.unsortedForEach(function(mapping) {
  31927. if (mapping.source === sourceFile && mapping.originalLine != null) {
  31928. var original = aSourceMapConsumer.originalPositionFor({
  31929. line: mapping.originalLine,
  31930. column: mapping.originalColumn
  31931. });
  31932. if (original.source != null) {
  31933. mapping.source = original.source;
  31934. if (aSourceMapPath != null) {
  31935. mapping.source = util.join(aSourceMapPath, mapping.source);
  31936. }
  31937. if (sourceRoot != null) {
  31938. mapping.source = util.relative(sourceRoot, mapping.source);
  31939. }
  31940. mapping.originalLine = original.line;
  31941. mapping.originalColumn = original.column;
  31942. if (original.name != null) {
  31943. mapping.name = original.name;
  31944. }
  31945. }
  31946. }
  31947. var source = mapping.source;
  31948. if (source != null && !newSources.has(source)) {
  31949. newSources.add(source);
  31950. }
  31951. var name2 = mapping.name;
  31952. if (name2 != null && !newNames.has(name2)) {
  31953. newNames.add(name2);
  31954. }
  31955. }, this);
  31956. this._sources = newSources;
  31957. this._names = newNames;
  31958. aSourceMapConsumer.sources.forEach(function(sourceFile2) {
  31959. var content3 = aSourceMapConsumer.sourceContentFor(sourceFile2);
  31960. if (content3 != null) {
  31961. if (aSourceMapPath != null) {
  31962. sourceFile2 = util.join(aSourceMapPath, sourceFile2);
  31963. }
  31964. if (sourceRoot != null) {
  31965. sourceFile2 = util.relative(sourceRoot, sourceFile2);
  31966. }
  31967. this.setSourceContent(sourceFile2, content3);
  31968. }
  31969. }, this);
  31970. };
  31971. SourceMapGenerator.prototype._validateMapping = function SourceMapGenerator_validateMapping(aGenerated, aOriginal, aSource, aName) {
  31972. if (aOriginal && typeof aOriginal.line !== "number" && typeof aOriginal.column !== "number") {
  31973. throw new Error(
  31974. "original.line and original.column are not numbers -- you probably meant to omit the original mapping entirely and only map the generated position. If so, pass null for the original mapping instead of an object with empty or null values."
  31975. );
  31976. }
  31977. if (aGenerated && "line" in aGenerated && "column" in aGenerated && aGenerated.line > 0 && aGenerated.column >= 0 && !aOriginal && !aSource && !aName) {
  31978. return;
  31979. } else if (aGenerated && "line" in aGenerated && "column" in aGenerated && aOriginal && "line" in aOriginal && "column" in aOriginal && aGenerated.line > 0 && aGenerated.column >= 0 && aOriginal.line > 0 && aOriginal.column >= 0 && aSource) {
  31980. return;
  31981. } else {
  31982. throw new Error("Invalid mapping: " + JSON.stringify({
  31983. generated: aGenerated,
  31984. source: aSource,
  31985. original: aOriginal,
  31986. name: aName
  31987. }));
  31988. }
  31989. };
  31990. SourceMapGenerator.prototype._serializeMappings = function SourceMapGenerator_serializeMappings() {
  31991. var previousGeneratedColumn = 0;
  31992. var previousGeneratedLine = 1;
  31993. var previousOriginalColumn = 0;
  31994. var previousOriginalLine = 0;
  31995. var previousName = 0;
  31996. var previousSource = 0;
  31997. var result = "";
  31998. var next;
  31999. var mapping;
  32000. var nameIdx;
  32001. var sourceIdx;
  32002. var mappings = this._mappings.toArray();
  32003. for (var i = 0, len = mappings.length; i < len; i++) {
  32004. mapping = mappings[i];
  32005. next = "";
  32006. if (mapping.generatedLine !== previousGeneratedLine) {
  32007. previousGeneratedColumn = 0;
  32008. while (mapping.generatedLine !== previousGeneratedLine) {
  32009. next += ";";
  32010. previousGeneratedLine++;
  32011. }
  32012. } else {
  32013. if (i > 0) {
  32014. if (!util.compareByGeneratedPositionsInflated(mapping, mappings[i - 1])) {
  32015. continue;
  32016. }
  32017. next += ",";
  32018. }
  32019. }
  32020. next += base64VLQ.encode(mapping.generatedColumn - previousGeneratedColumn);
  32021. previousGeneratedColumn = mapping.generatedColumn;
  32022. if (mapping.source != null) {
  32023. sourceIdx = this._sources.indexOf(mapping.source);
  32024. next += base64VLQ.encode(sourceIdx - previousSource);
  32025. previousSource = sourceIdx;
  32026. next += base64VLQ.encode(mapping.originalLine - 1 - previousOriginalLine);
  32027. previousOriginalLine = mapping.originalLine - 1;
  32028. next += base64VLQ.encode(mapping.originalColumn - previousOriginalColumn);
  32029. previousOriginalColumn = mapping.originalColumn;
  32030. if (mapping.name != null) {
  32031. nameIdx = this._names.indexOf(mapping.name);
  32032. next += base64VLQ.encode(nameIdx - previousName);
  32033. previousName = nameIdx;
  32034. }
  32035. }
  32036. result += next;
  32037. }
  32038. return result;
  32039. };
  32040. SourceMapGenerator.prototype._generateSourcesContent = function SourceMapGenerator_generateSourcesContent(aSources, aSourceRoot) {
  32041. return aSources.map(function(source) {
  32042. if (!this._sourcesContents) {
  32043. return null;
  32044. }
  32045. if (aSourceRoot != null) {
  32046. source = util.relative(aSourceRoot, source);
  32047. }
  32048. var key = util.toSetString(source);
  32049. return Object.prototype.hasOwnProperty.call(this._sourcesContents, key) ? this._sourcesContents[key] : null;
  32050. }, this);
  32051. };
  32052. SourceMapGenerator.prototype.toJSON = function SourceMapGenerator_toJSON() {
  32053. var map = {
  32054. version: this._version,
  32055. sources: this._sources.toArray(),
  32056. names: this._names.toArray(),
  32057. mappings: this._serializeMappings()
  32058. };
  32059. if (this._file != null) {
  32060. map.file = this._file;
  32061. }
  32062. if (this._sourceRoot != null) {
  32063. map.sourceRoot = this._sourceRoot;
  32064. }
  32065. if (this._sourcesContents) {
  32066. map.sourcesContent = this._generateSourcesContent(map.sources, map.sourceRoot);
  32067. }
  32068. return map;
  32069. };
  32070. SourceMapGenerator.prototype.toString = function SourceMapGenerator_toString() {
  32071. return JSON.stringify(this.toJSON());
  32072. };
  32073. exports.SourceMapGenerator = SourceMapGenerator;
  32074. }
  32075. });
  32076. // node_modules/source-map/lib/binary-search.js
  32077. var require_binary_search = __commonJS({
  32078. "node_modules/source-map/lib/binary-search.js"(exports) {
  32079. exports.GREATEST_LOWER_BOUND = 1;
  32080. exports.LEAST_UPPER_BOUND = 2;
  32081. function recursiveSearch(aLow, aHigh, aNeedle, aHaystack, aCompare, aBias) {
  32082. var mid = Math.floor((aHigh - aLow) / 2) + aLow;
  32083. var cmp = aCompare(aNeedle, aHaystack[mid], true);
  32084. if (cmp === 0) {
  32085. return mid;
  32086. } else if (cmp > 0) {
  32087. if (aHigh - mid > 1) {
  32088. return recursiveSearch(mid, aHigh, aNeedle, aHaystack, aCompare, aBias);
  32089. }
  32090. if (aBias == exports.LEAST_UPPER_BOUND) {
  32091. return aHigh < aHaystack.length ? aHigh : -1;
  32092. } else {
  32093. return mid;
  32094. }
  32095. } else {
  32096. if (mid - aLow > 1) {
  32097. return recursiveSearch(aLow, mid, aNeedle, aHaystack, aCompare, aBias);
  32098. }
  32099. if (aBias == exports.LEAST_UPPER_BOUND) {
  32100. return mid;
  32101. } else {
  32102. return aLow < 0 ? -1 : aLow;
  32103. }
  32104. }
  32105. }
  32106. exports.search = function search2(aNeedle, aHaystack, aCompare, aBias) {
  32107. if (aHaystack.length === 0) {
  32108. return -1;
  32109. }
  32110. var index2 = recursiveSearch(
  32111. -1,
  32112. aHaystack.length,
  32113. aNeedle,
  32114. aHaystack,
  32115. aCompare,
  32116. aBias || exports.GREATEST_LOWER_BOUND
  32117. );
  32118. if (index2 < 0) {
  32119. return -1;
  32120. }
  32121. while (index2 - 1 >= 0) {
  32122. if (aCompare(aHaystack[index2], aHaystack[index2 - 1], true) !== 0) {
  32123. break;
  32124. }
  32125. --index2;
  32126. }
  32127. return index2;
  32128. };
  32129. }
  32130. });
  32131. // node_modules/source-map/lib/quick-sort.js
  32132. var require_quick_sort = __commonJS({
  32133. "node_modules/source-map/lib/quick-sort.js"(exports) {
  32134. function swap(ary, x, y) {
  32135. var temp = ary[x];
  32136. ary[x] = ary[y];
  32137. ary[y] = temp;
  32138. }
  32139. function randomIntInRange(low, high) {
  32140. return Math.round(low + Math.random() * (high - low));
  32141. }
  32142. function doQuickSort(ary, comparator, p, r) {
  32143. if (p < r) {
  32144. var pivotIndex = randomIntInRange(p, r);
  32145. var i = p - 1;
  32146. swap(ary, pivotIndex, r);
  32147. var pivot = ary[r];
  32148. for (var j = p; j < r; j++) {
  32149. if (comparator(ary[j], pivot) <= 0) {
  32150. i += 1;
  32151. swap(ary, i, j);
  32152. }
  32153. }
  32154. swap(ary, i + 1, j);
  32155. var q = i + 1;
  32156. doQuickSort(ary, comparator, p, q - 1);
  32157. doQuickSort(ary, comparator, q + 1, r);
  32158. }
  32159. }
  32160. exports.quickSort = function(ary, comparator) {
  32161. doQuickSort(ary, comparator, 0, ary.length - 1);
  32162. };
  32163. }
  32164. });
  32165. // node_modules/source-map/lib/source-map-consumer.js
  32166. var require_source_map_consumer = __commonJS({
  32167. "node_modules/source-map/lib/source-map-consumer.js"(exports) {
  32168. var util = require_util();
  32169. var binarySearch = require_binary_search();
  32170. var ArraySet = require_array_set().ArraySet;
  32171. var base64VLQ = require_base64_vlq();
  32172. var quickSort = require_quick_sort().quickSort;
  32173. function SourceMapConsumer(aSourceMap) {
  32174. var sourceMap = aSourceMap;
  32175. if (typeof aSourceMap === "string") {
  32176. sourceMap = JSON.parse(aSourceMap.replace(/^\)\]\}'/, ""));
  32177. }
  32178. return sourceMap.sections != null ? new IndexedSourceMapConsumer(sourceMap) : new BasicSourceMapConsumer(sourceMap);
  32179. }
  32180. SourceMapConsumer.fromSourceMap = function(aSourceMap) {
  32181. return BasicSourceMapConsumer.fromSourceMap(aSourceMap);
  32182. };
  32183. SourceMapConsumer.prototype._version = 3;
  32184. SourceMapConsumer.prototype.__generatedMappings = null;
  32185. Object.defineProperty(SourceMapConsumer.prototype, "_generatedMappings", {
  32186. get: function() {
  32187. if (!this.__generatedMappings) {
  32188. this._parseMappings(this._mappings, this.sourceRoot);
  32189. }
  32190. return this.__generatedMappings;
  32191. }
  32192. });
  32193. SourceMapConsumer.prototype.__originalMappings = null;
  32194. Object.defineProperty(SourceMapConsumer.prototype, "_originalMappings", {
  32195. get: function() {
  32196. if (!this.__originalMappings) {
  32197. this._parseMappings(this._mappings, this.sourceRoot);
  32198. }
  32199. return this.__originalMappings;
  32200. }
  32201. });
  32202. SourceMapConsumer.prototype._charIsMappingSeparator = function SourceMapConsumer_charIsMappingSeparator(aStr, index2) {
  32203. var c = aStr.charAt(index2);
  32204. return c === ";" || c === ",";
  32205. };
  32206. SourceMapConsumer.prototype._parseMappings = function SourceMapConsumer_parseMappings(aStr, aSourceRoot) {
  32207. throw new Error("Subclasses must implement _parseMappings");
  32208. };
  32209. SourceMapConsumer.GENERATED_ORDER = 1;
  32210. SourceMapConsumer.ORIGINAL_ORDER = 2;
  32211. SourceMapConsumer.GREATEST_LOWER_BOUND = 1;
  32212. SourceMapConsumer.LEAST_UPPER_BOUND = 2;
  32213. SourceMapConsumer.prototype.eachMapping = function SourceMapConsumer_eachMapping(aCallback, aContext, aOrder) {
  32214. var context = aContext || null;
  32215. var order2 = aOrder || SourceMapConsumer.GENERATED_ORDER;
  32216. var mappings;
  32217. switch (order2) {
  32218. case SourceMapConsumer.GENERATED_ORDER:
  32219. mappings = this._generatedMappings;
  32220. break;
  32221. case SourceMapConsumer.ORIGINAL_ORDER:
  32222. mappings = this._originalMappings;
  32223. break;
  32224. default:
  32225. throw new Error("Unknown order of iteration.");
  32226. }
  32227. var sourceRoot = this.sourceRoot;
  32228. mappings.map(function(mapping) {
  32229. var source = mapping.source === null ? null : this._sources.at(mapping.source);
  32230. if (source != null && sourceRoot != null) {
  32231. source = util.join(sourceRoot, source);
  32232. }
  32233. return {
  32234. source,
  32235. generatedLine: mapping.generatedLine,
  32236. generatedColumn: mapping.generatedColumn,
  32237. originalLine: mapping.originalLine,
  32238. originalColumn: mapping.originalColumn,
  32239. name: mapping.name === null ? null : this._names.at(mapping.name)
  32240. };
  32241. }, this).forEach(aCallback, context);
  32242. };
  32243. SourceMapConsumer.prototype.allGeneratedPositionsFor = function SourceMapConsumer_allGeneratedPositionsFor(aArgs) {
  32244. var line = util.getArg(aArgs, "line");
  32245. var needle = {
  32246. source: util.getArg(aArgs, "source"),
  32247. originalLine: line,
  32248. originalColumn: util.getArg(aArgs, "column", 0)
  32249. };
  32250. if (this.sourceRoot != null) {
  32251. needle.source = util.relative(this.sourceRoot, needle.source);
  32252. }
  32253. if (!this._sources.has(needle.source)) {
  32254. return [];
  32255. }
  32256. needle.source = this._sources.indexOf(needle.source);
  32257. var mappings = [];
  32258. var index2 = this._findMapping(
  32259. needle,
  32260. this._originalMappings,
  32261. "originalLine",
  32262. "originalColumn",
  32263. util.compareByOriginalPositions,
  32264. binarySearch.LEAST_UPPER_BOUND
  32265. );
  32266. if (index2 >= 0) {
  32267. var mapping = this._originalMappings[index2];
  32268. if (aArgs.column === void 0) {
  32269. var originalLine = mapping.originalLine;
  32270. while (mapping && mapping.originalLine === originalLine) {
  32271. mappings.push({
  32272. line: util.getArg(mapping, "generatedLine", null),
  32273. column: util.getArg(mapping, "generatedColumn", null),
  32274. lastColumn: util.getArg(mapping, "lastGeneratedColumn", null)
  32275. });
  32276. mapping = this._originalMappings[++index2];
  32277. }
  32278. } else {
  32279. var originalColumn = mapping.originalColumn;
  32280. while (mapping && mapping.originalLine === line && mapping.originalColumn == originalColumn) {
  32281. mappings.push({
  32282. line: util.getArg(mapping, "generatedLine", null),
  32283. column: util.getArg(mapping, "generatedColumn", null),
  32284. lastColumn: util.getArg(mapping, "lastGeneratedColumn", null)
  32285. });
  32286. mapping = this._originalMappings[++index2];
  32287. }
  32288. }
  32289. }
  32290. return mappings;
  32291. };
  32292. exports.SourceMapConsumer = SourceMapConsumer;
  32293. function BasicSourceMapConsumer(aSourceMap) {
  32294. var sourceMap = aSourceMap;
  32295. if (typeof aSourceMap === "string") {
  32296. sourceMap = JSON.parse(aSourceMap.replace(/^\)\]\}'/, ""));
  32297. }
  32298. var version2 = util.getArg(sourceMap, "version");
  32299. var sources = util.getArg(sourceMap, "sources");
  32300. var names = util.getArg(sourceMap, "names", []);
  32301. var sourceRoot = util.getArg(sourceMap, "sourceRoot", null);
  32302. var sourcesContent = util.getArg(sourceMap, "sourcesContent", null);
  32303. var mappings = util.getArg(sourceMap, "mappings");
  32304. var file = util.getArg(sourceMap, "file", null);
  32305. if (version2 != this._version) {
  32306. throw new Error("Unsupported version: " + version2);
  32307. }
  32308. sources = sources.map(String).map(util.normalize).map(function(source) {
  32309. return sourceRoot && util.isAbsolute(sourceRoot) && util.isAbsolute(source) ? util.relative(sourceRoot, source) : source;
  32310. });
  32311. this._names = ArraySet.fromArray(names.map(String), true);
  32312. this._sources = ArraySet.fromArray(sources, true);
  32313. this.sourceRoot = sourceRoot;
  32314. this.sourcesContent = sourcesContent;
  32315. this._mappings = mappings;
  32316. this.file = file;
  32317. }
  32318. BasicSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype);
  32319. BasicSourceMapConsumer.prototype.consumer = SourceMapConsumer;
  32320. BasicSourceMapConsumer.fromSourceMap = function SourceMapConsumer_fromSourceMap(aSourceMap) {
  32321. var smc = Object.create(BasicSourceMapConsumer.prototype);
  32322. var names = smc._names = ArraySet.fromArray(aSourceMap._names.toArray(), true);
  32323. var sources = smc._sources = ArraySet.fromArray(aSourceMap._sources.toArray(), true);
  32324. smc.sourceRoot = aSourceMap._sourceRoot;
  32325. smc.sourcesContent = aSourceMap._generateSourcesContent(
  32326. smc._sources.toArray(),
  32327. smc.sourceRoot
  32328. );
  32329. smc.file = aSourceMap._file;
  32330. var generatedMappings = aSourceMap._mappings.toArray().slice();
  32331. var destGeneratedMappings = smc.__generatedMappings = [];
  32332. var destOriginalMappings = smc.__originalMappings = [];
  32333. for (var i = 0, length = generatedMappings.length; i < length; i++) {
  32334. var srcMapping = generatedMappings[i];
  32335. var destMapping = new Mapping();
  32336. destMapping.generatedLine = srcMapping.generatedLine;
  32337. destMapping.generatedColumn = srcMapping.generatedColumn;
  32338. if (srcMapping.source) {
  32339. destMapping.source = sources.indexOf(srcMapping.source);
  32340. destMapping.originalLine = srcMapping.originalLine;
  32341. destMapping.originalColumn = srcMapping.originalColumn;
  32342. if (srcMapping.name) {
  32343. destMapping.name = names.indexOf(srcMapping.name);
  32344. }
  32345. destOriginalMappings.push(destMapping);
  32346. }
  32347. destGeneratedMappings.push(destMapping);
  32348. }
  32349. quickSort(smc.__originalMappings, util.compareByOriginalPositions);
  32350. return smc;
  32351. };
  32352. BasicSourceMapConsumer.prototype._version = 3;
  32353. Object.defineProperty(BasicSourceMapConsumer.prototype, "sources", {
  32354. get: function() {
  32355. return this._sources.toArray().map(function(s) {
  32356. return this.sourceRoot != null ? util.join(this.sourceRoot, s) : s;
  32357. }, this);
  32358. }
  32359. });
  32360. function Mapping() {
  32361. this.generatedLine = 0;
  32362. this.generatedColumn = 0;
  32363. this.source = null;
  32364. this.originalLine = null;
  32365. this.originalColumn = null;
  32366. this.name = null;
  32367. }
  32368. BasicSourceMapConsumer.prototype._parseMappings = function SourceMapConsumer_parseMappings(aStr, aSourceRoot) {
  32369. var generatedLine = 1;
  32370. var previousGeneratedColumn = 0;
  32371. var previousOriginalLine = 0;
  32372. var previousOriginalColumn = 0;
  32373. var previousSource = 0;
  32374. var previousName = 0;
  32375. var length = aStr.length;
  32376. var index2 = 0;
  32377. var cachedSegments = {};
  32378. var temp = {};
  32379. var originalMappings = [];
  32380. var generatedMappings = [];
  32381. var mapping, str, segment, end, value;
  32382. while (index2 < length) {
  32383. if (aStr.charAt(index2) === ";") {
  32384. generatedLine++;
  32385. index2++;
  32386. previousGeneratedColumn = 0;
  32387. } else if (aStr.charAt(index2) === ",") {
  32388. index2++;
  32389. } else {
  32390. mapping = new Mapping();
  32391. mapping.generatedLine = generatedLine;
  32392. for (end = index2; end < length; end++) {
  32393. if (this._charIsMappingSeparator(aStr, end)) {
  32394. break;
  32395. }
  32396. }
  32397. str = aStr.slice(index2, end);
  32398. segment = cachedSegments[str];
  32399. if (segment) {
  32400. index2 += str.length;
  32401. } else {
  32402. segment = [];
  32403. while (index2 < end) {
  32404. base64VLQ.decode(aStr, index2, temp);
  32405. value = temp.value;
  32406. index2 = temp.rest;
  32407. segment.push(value);
  32408. }
  32409. if (segment.length === 2) {
  32410. throw new Error("Found a source, but no line and column");
  32411. }
  32412. if (segment.length === 3) {
  32413. throw new Error("Found a source and line, but no column");
  32414. }
  32415. cachedSegments[str] = segment;
  32416. }
  32417. mapping.generatedColumn = previousGeneratedColumn + segment[0];
  32418. previousGeneratedColumn = mapping.generatedColumn;
  32419. if (segment.length > 1) {
  32420. mapping.source = previousSource + segment[1];
  32421. previousSource += segment[1];
  32422. mapping.originalLine = previousOriginalLine + segment[2];
  32423. previousOriginalLine = mapping.originalLine;
  32424. mapping.originalLine += 1;
  32425. mapping.originalColumn = previousOriginalColumn + segment[3];
  32426. previousOriginalColumn = mapping.originalColumn;
  32427. if (segment.length > 4) {
  32428. mapping.name = previousName + segment[4];
  32429. previousName += segment[4];
  32430. }
  32431. }
  32432. generatedMappings.push(mapping);
  32433. if (typeof mapping.originalLine === "number") {
  32434. originalMappings.push(mapping);
  32435. }
  32436. }
  32437. }
  32438. quickSort(generatedMappings, util.compareByGeneratedPositionsDeflated);
  32439. this.__generatedMappings = generatedMappings;
  32440. quickSort(originalMappings, util.compareByOriginalPositions);
  32441. this.__originalMappings = originalMappings;
  32442. };
  32443. BasicSourceMapConsumer.prototype._findMapping = function SourceMapConsumer_findMapping(aNeedle, aMappings, aLineName, aColumnName, aComparator, aBias) {
  32444. if (aNeedle[aLineName] <= 0) {
  32445. throw new TypeError("Line must be greater than or equal to 1, got " + aNeedle[aLineName]);
  32446. }
  32447. if (aNeedle[aColumnName] < 0) {
  32448. throw new TypeError("Column must be greater than or equal to 0, got " + aNeedle[aColumnName]);
  32449. }
  32450. return binarySearch.search(aNeedle, aMappings, aComparator, aBias);
  32451. };
  32452. BasicSourceMapConsumer.prototype.computeColumnSpans = function SourceMapConsumer_computeColumnSpans() {
  32453. for (var index2 = 0; index2 < this._generatedMappings.length; ++index2) {
  32454. var mapping = this._generatedMappings[index2];
  32455. if (index2 + 1 < this._generatedMappings.length) {
  32456. var nextMapping = this._generatedMappings[index2 + 1];
  32457. if (mapping.generatedLine === nextMapping.generatedLine) {
  32458. mapping.lastGeneratedColumn = nextMapping.generatedColumn - 1;
  32459. continue;
  32460. }
  32461. }
  32462. mapping.lastGeneratedColumn = Infinity;
  32463. }
  32464. };
  32465. BasicSourceMapConsumer.prototype.originalPositionFor = function SourceMapConsumer_originalPositionFor(aArgs) {
  32466. var needle = {
  32467. generatedLine: util.getArg(aArgs, "line"),
  32468. generatedColumn: util.getArg(aArgs, "column")
  32469. };
  32470. var index2 = this._findMapping(
  32471. needle,
  32472. this._generatedMappings,
  32473. "generatedLine",
  32474. "generatedColumn",
  32475. util.compareByGeneratedPositionsDeflated,
  32476. util.getArg(aArgs, "bias", SourceMapConsumer.GREATEST_LOWER_BOUND)
  32477. );
  32478. if (index2 >= 0) {
  32479. var mapping = this._generatedMappings[index2];
  32480. if (mapping.generatedLine === needle.generatedLine) {
  32481. var source = util.getArg(mapping, "source", null);
  32482. if (source !== null) {
  32483. source = this._sources.at(source);
  32484. if (this.sourceRoot != null) {
  32485. source = util.join(this.sourceRoot, source);
  32486. }
  32487. }
  32488. var name2 = util.getArg(mapping, "name", null);
  32489. if (name2 !== null) {
  32490. name2 = this._names.at(name2);
  32491. }
  32492. return {
  32493. source,
  32494. line: util.getArg(mapping, "originalLine", null),
  32495. column: util.getArg(mapping, "originalColumn", null),
  32496. name: name2
  32497. };
  32498. }
  32499. }
  32500. return {
  32501. source: null,
  32502. line: null,
  32503. column: null,
  32504. name: null
  32505. };
  32506. };
  32507. BasicSourceMapConsumer.prototype.hasContentsOfAllSources = function BasicSourceMapConsumer_hasContentsOfAllSources() {
  32508. if (!this.sourcesContent) {
  32509. return false;
  32510. }
  32511. return this.sourcesContent.length >= this._sources.size() && !this.sourcesContent.some(function(sc) {
  32512. return sc == null;
  32513. });
  32514. };
  32515. BasicSourceMapConsumer.prototype.sourceContentFor = function SourceMapConsumer_sourceContentFor(aSource, nullOnMissing) {
  32516. if (!this.sourcesContent) {
  32517. return null;
  32518. }
  32519. if (this.sourceRoot != null) {
  32520. aSource = util.relative(this.sourceRoot, aSource);
  32521. }
  32522. if (this._sources.has(aSource)) {
  32523. return this.sourcesContent[this._sources.indexOf(aSource)];
  32524. }
  32525. var url;
  32526. if (this.sourceRoot != null && (url = util.urlParse(this.sourceRoot))) {
  32527. var fileUriAbsPath = aSource.replace(/^file:\/\//, "");
  32528. if (url.scheme == "file" && this._sources.has(fileUriAbsPath)) {
  32529. return this.sourcesContent[this._sources.indexOf(fileUriAbsPath)];
  32530. }
  32531. if ((!url.path || url.path == "/") && this._sources.has("/" + aSource)) {
  32532. return this.sourcesContent[this._sources.indexOf("/" + aSource)];
  32533. }
  32534. }
  32535. if (nullOnMissing) {
  32536. return null;
  32537. } else {
  32538. throw new Error('"' + aSource + '" is not in the SourceMap.');
  32539. }
  32540. };
  32541. BasicSourceMapConsumer.prototype.generatedPositionFor = function SourceMapConsumer_generatedPositionFor(aArgs) {
  32542. var source = util.getArg(aArgs, "source");
  32543. if (this.sourceRoot != null) {
  32544. source = util.relative(this.sourceRoot, source);
  32545. }
  32546. if (!this._sources.has(source)) {
  32547. return {
  32548. line: null,
  32549. column: null,
  32550. lastColumn: null
  32551. };
  32552. }
  32553. source = this._sources.indexOf(source);
  32554. var needle = {
  32555. source,
  32556. originalLine: util.getArg(aArgs, "line"),
  32557. originalColumn: util.getArg(aArgs, "column")
  32558. };
  32559. var index2 = this._findMapping(
  32560. needle,
  32561. this._originalMappings,
  32562. "originalLine",
  32563. "originalColumn",
  32564. util.compareByOriginalPositions,
  32565. util.getArg(aArgs, "bias", SourceMapConsumer.GREATEST_LOWER_BOUND)
  32566. );
  32567. if (index2 >= 0) {
  32568. var mapping = this._originalMappings[index2];
  32569. if (mapping.source === needle.source) {
  32570. return {
  32571. line: util.getArg(mapping, "generatedLine", null),
  32572. column: util.getArg(mapping, "generatedColumn", null),
  32573. lastColumn: util.getArg(mapping, "lastGeneratedColumn", null)
  32574. };
  32575. }
  32576. }
  32577. return {
  32578. line: null,
  32579. column: null,
  32580. lastColumn: null
  32581. };
  32582. };
  32583. exports.BasicSourceMapConsumer = BasicSourceMapConsumer;
  32584. function IndexedSourceMapConsumer(aSourceMap) {
  32585. var sourceMap = aSourceMap;
  32586. if (typeof aSourceMap === "string") {
  32587. sourceMap = JSON.parse(aSourceMap.replace(/^\)\]\}'/, ""));
  32588. }
  32589. var version2 = util.getArg(sourceMap, "version");
  32590. var sections = util.getArg(sourceMap, "sections");
  32591. if (version2 != this._version) {
  32592. throw new Error("Unsupported version: " + version2);
  32593. }
  32594. this._sources = new ArraySet();
  32595. this._names = new ArraySet();
  32596. var lastOffset = {
  32597. line: -1,
  32598. column: 0
  32599. };
  32600. this._sections = sections.map(function(s) {
  32601. if (s.url) {
  32602. throw new Error("Support for url field in sections not implemented.");
  32603. }
  32604. var offset2 = util.getArg(s, "offset");
  32605. var offsetLine = util.getArg(offset2, "line");
  32606. var offsetColumn = util.getArg(offset2, "column");
  32607. if (offsetLine < lastOffset.line || offsetLine === lastOffset.line && offsetColumn < lastOffset.column) {
  32608. throw new Error("Section offsets must be ordered and non-overlapping.");
  32609. }
  32610. lastOffset = offset2;
  32611. return {
  32612. generatedOffset: {
  32613. generatedLine: offsetLine + 1,
  32614. generatedColumn: offsetColumn + 1
  32615. },
  32616. consumer: new SourceMapConsumer(util.getArg(s, "map"))
  32617. };
  32618. });
  32619. }
  32620. IndexedSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype);
  32621. IndexedSourceMapConsumer.prototype.constructor = SourceMapConsumer;
  32622. IndexedSourceMapConsumer.prototype._version = 3;
  32623. Object.defineProperty(IndexedSourceMapConsumer.prototype, "sources", {
  32624. get: function() {
  32625. var sources = [];
  32626. for (var i = 0; i < this._sections.length; i++) {
  32627. for (var j = 0; j < this._sections[i].consumer.sources.length; j++) {
  32628. sources.push(this._sections[i].consumer.sources[j]);
  32629. }
  32630. }
  32631. return sources;
  32632. }
  32633. });
  32634. IndexedSourceMapConsumer.prototype.originalPositionFor = function IndexedSourceMapConsumer_originalPositionFor(aArgs) {
  32635. var needle = {
  32636. generatedLine: util.getArg(aArgs, "line"),
  32637. generatedColumn: util.getArg(aArgs, "column")
  32638. };
  32639. var sectionIndex = binarySearch.search(
  32640. needle,
  32641. this._sections,
  32642. function(needle2, section2) {
  32643. var cmp = needle2.generatedLine - section2.generatedOffset.generatedLine;
  32644. if (cmp) {
  32645. return cmp;
  32646. }
  32647. return needle2.generatedColumn - section2.generatedOffset.generatedColumn;
  32648. }
  32649. );
  32650. var section = this._sections[sectionIndex];
  32651. if (!section) {
  32652. return {
  32653. source: null,
  32654. line: null,
  32655. column: null,
  32656. name: null
  32657. };
  32658. }
  32659. return section.consumer.originalPositionFor({
  32660. line: needle.generatedLine - (section.generatedOffset.generatedLine - 1),
  32661. column: needle.generatedColumn - (section.generatedOffset.generatedLine === needle.generatedLine ? section.generatedOffset.generatedColumn - 1 : 0),
  32662. bias: aArgs.bias
  32663. });
  32664. };
  32665. IndexedSourceMapConsumer.prototype.hasContentsOfAllSources = function IndexedSourceMapConsumer_hasContentsOfAllSources() {
  32666. return this._sections.every(function(s) {
  32667. return s.consumer.hasContentsOfAllSources();
  32668. });
  32669. };
  32670. IndexedSourceMapConsumer.prototype.sourceContentFor = function IndexedSourceMapConsumer_sourceContentFor(aSource, nullOnMissing) {
  32671. for (var i = 0; i < this._sections.length; i++) {
  32672. var section = this._sections[i];
  32673. var content3 = section.consumer.sourceContentFor(aSource, true);
  32674. if (content3) {
  32675. return content3;
  32676. }
  32677. }
  32678. if (nullOnMissing) {
  32679. return null;
  32680. } else {
  32681. throw new Error('"' + aSource + '" is not in the SourceMap.');
  32682. }
  32683. };
  32684. IndexedSourceMapConsumer.prototype.generatedPositionFor = function IndexedSourceMapConsumer_generatedPositionFor(aArgs) {
  32685. for (var i = 0; i < this._sections.length; i++) {
  32686. var section = this._sections[i];
  32687. if (section.consumer.sources.indexOf(util.getArg(aArgs, "source")) === -1) {
  32688. continue;
  32689. }
  32690. var generatedPosition = section.consumer.generatedPositionFor(aArgs);
  32691. if (generatedPosition) {
  32692. var ret = {
  32693. line: generatedPosition.line + (section.generatedOffset.generatedLine - 1),
  32694. column: generatedPosition.column + (section.generatedOffset.generatedLine === generatedPosition.line ? section.generatedOffset.generatedColumn - 1 : 0)
  32695. };
  32696. return ret;
  32697. }
  32698. }
  32699. return {
  32700. line: null,
  32701. column: null
  32702. };
  32703. };
  32704. IndexedSourceMapConsumer.prototype._parseMappings = function IndexedSourceMapConsumer_parseMappings(aStr, aSourceRoot) {
  32705. this.__generatedMappings = [];
  32706. this.__originalMappings = [];
  32707. for (var i = 0; i < this._sections.length; i++) {
  32708. var section = this._sections[i];
  32709. var sectionMappings = section.consumer._generatedMappings;
  32710. for (var j = 0; j < sectionMappings.length; j++) {
  32711. var mapping = sectionMappings[j];
  32712. var source = section.consumer._sources.at(mapping.source);
  32713. if (section.consumer.sourceRoot !== null) {
  32714. source = util.join(section.consumer.sourceRoot, source);
  32715. }
  32716. this._sources.add(source);
  32717. source = this._sources.indexOf(source);
  32718. var name2 = section.consumer._names.at(mapping.name);
  32719. this._names.add(name2);
  32720. name2 = this._names.indexOf(name2);
  32721. var adjustedMapping = {
  32722. source,
  32723. generatedLine: mapping.generatedLine + (section.generatedOffset.generatedLine - 1),
  32724. generatedColumn: mapping.generatedColumn + (section.generatedOffset.generatedLine === mapping.generatedLine ? section.generatedOffset.generatedColumn - 1 : 0),
  32725. originalLine: mapping.originalLine,
  32726. originalColumn: mapping.originalColumn,
  32727. name: name2
  32728. };
  32729. this.__generatedMappings.push(adjustedMapping);
  32730. if (typeof adjustedMapping.originalLine === "number") {
  32731. this.__originalMappings.push(adjustedMapping);
  32732. }
  32733. }
  32734. }
  32735. quickSort(this.__generatedMappings, util.compareByGeneratedPositionsDeflated);
  32736. quickSort(this.__originalMappings, util.compareByOriginalPositions);
  32737. };
  32738. exports.IndexedSourceMapConsumer = IndexedSourceMapConsumer;
  32739. }
  32740. });
  32741. // node_modules/source-map/lib/source-node.js
  32742. var require_source_node = __commonJS({
  32743. "node_modules/source-map/lib/source-node.js"(exports) {
  32744. var SourceMapGenerator = require_source_map_generator().SourceMapGenerator;
  32745. var util = require_util();
  32746. var REGEX_NEWLINE = /(\r?\n)/;
  32747. var NEWLINE_CODE = 10;
  32748. var isSourceNode = "$$$isSourceNode$$$";
  32749. function SourceNode(aLine, aColumn, aSource, aChunks, aName) {
  32750. this.children = [];
  32751. this.sourceContents = {};
  32752. this.line = aLine == null ? null : aLine;
  32753. this.column = aColumn == null ? null : aColumn;
  32754. this.source = aSource == null ? null : aSource;
  32755. this.name = aName == null ? null : aName;
  32756. this[isSourceNode] = true;
  32757. if (aChunks != null)
  32758. this.add(aChunks);
  32759. }
  32760. SourceNode.fromStringWithSourceMap = function SourceNode_fromStringWithSourceMap(aGeneratedCode, aSourceMapConsumer, aRelativePath) {
  32761. var node = new SourceNode();
  32762. var remainingLines = aGeneratedCode.split(REGEX_NEWLINE);
  32763. var remainingLinesIndex = 0;
  32764. var shiftNextLine = function() {
  32765. var lineContents = getNextLine();
  32766. var newLine = getNextLine() || "";
  32767. return lineContents + newLine;
  32768. function getNextLine() {
  32769. return remainingLinesIndex < remainingLines.length ? remainingLines[remainingLinesIndex++] : void 0;
  32770. }
  32771. };
  32772. var lastGeneratedLine = 1, lastGeneratedColumn = 0;
  32773. var lastMapping = null;
  32774. aSourceMapConsumer.eachMapping(function(mapping) {
  32775. if (lastMapping !== null) {
  32776. if (lastGeneratedLine < mapping.generatedLine) {
  32777. addMappingWithCode(lastMapping, shiftNextLine());
  32778. lastGeneratedLine++;
  32779. lastGeneratedColumn = 0;
  32780. } else {
  32781. var nextLine = remainingLines[remainingLinesIndex];
  32782. var code2 = nextLine.substr(0, mapping.generatedColumn - lastGeneratedColumn);
  32783. remainingLines[remainingLinesIndex] = nextLine.substr(mapping.generatedColumn - lastGeneratedColumn);
  32784. lastGeneratedColumn = mapping.generatedColumn;
  32785. addMappingWithCode(lastMapping, code2);
  32786. lastMapping = mapping;
  32787. return;
  32788. }
  32789. }
  32790. while (lastGeneratedLine < mapping.generatedLine) {
  32791. node.add(shiftNextLine());
  32792. lastGeneratedLine++;
  32793. }
  32794. if (lastGeneratedColumn < mapping.generatedColumn) {
  32795. var nextLine = remainingLines[remainingLinesIndex];
  32796. node.add(nextLine.substr(0, mapping.generatedColumn));
  32797. remainingLines[remainingLinesIndex] = nextLine.substr(mapping.generatedColumn);
  32798. lastGeneratedColumn = mapping.generatedColumn;
  32799. }
  32800. lastMapping = mapping;
  32801. }, this);
  32802. if (remainingLinesIndex < remainingLines.length) {
  32803. if (lastMapping) {
  32804. addMappingWithCode(lastMapping, shiftNextLine());
  32805. }
  32806. node.add(remainingLines.splice(remainingLinesIndex).join(""));
  32807. }
  32808. aSourceMapConsumer.sources.forEach(function(sourceFile) {
  32809. var content3 = aSourceMapConsumer.sourceContentFor(sourceFile);
  32810. if (content3 != null) {
  32811. if (aRelativePath != null) {
  32812. sourceFile = util.join(aRelativePath, sourceFile);
  32813. }
  32814. node.setSourceContent(sourceFile, content3);
  32815. }
  32816. });
  32817. return node;
  32818. function addMappingWithCode(mapping, code2) {
  32819. if (mapping === null || mapping.source === void 0) {
  32820. node.add(code2);
  32821. } else {
  32822. var source = aRelativePath ? util.join(aRelativePath, mapping.source) : mapping.source;
  32823. node.add(new SourceNode(
  32824. mapping.originalLine,
  32825. mapping.originalColumn,
  32826. source,
  32827. code2,
  32828. mapping.name
  32829. ));
  32830. }
  32831. }
  32832. };
  32833. SourceNode.prototype.add = function SourceNode_add(aChunk) {
  32834. if (Array.isArray(aChunk)) {
  32835. aChunk.forEach(function(chunk) {
  32836. this.add(chunk);
  32837. }, this);
  32838. } else if (aChunk[isSourceNode] || typeof aChunk === "string") {
  32839. if (aChunk) {
  32840. this.children.push(aChunk);
  32841. }
  32842. } else {
  32843. throw new TypeError(
  32844. "Expected a SourceNode, string, or an array of SourceNodes and strings. Got " + aChunk
  32845. );
  32846. }
  32847. return this;
  32848. };
  32849. SourceNode.prototype.prepend = function SourceNode_prepend(aChunk) {
  32850. if (Array.isArray(aChunk)) {
  32851. for (var i = aChunk.length - 1; i >= 0; i--) {
  32852. this.prepend(aChunk[i]);
  32853. }
  32854. } else if (aChunk[isSourceNode] || typeof aChunk === "string") {
  32855. this.children.unshift(aChunk);
  32856. } else {
  32857. throw new TypeError(
  32858. "Expected a SourceNode, string, or an array of SourceNodes and strings. Got " + aChunk
  32859. );
  32860. }
  32861. return this;
  32862. };
  32863. SourceNode.prototype.walk = function SourceNode_walk(aFn) {
  32864. var chunk;
  32865. for (var i = 0, len = this.children.length; i < len; i++) {
  32866. chunk = this.children[i];
  32867. if (chunk[isSourceNode]) {
  32868. chunk.walk(aFn);
  32869. } else {
  32870. if (chunk !== "") {
  32871. aFn(chunk, {
  32872. source: this.source,
  32873. line: this.line,
  32874. column: this.column,
  32875. name: this.name
  32876. });
  32877. }
  32878. }
  32879. }
  32880. };
  32881. SourceNode.prototype.join = function SourceNode_join(aSep) {
  32882. var newChildren;
  32883. var i;
  32884. var len = this.children.length;
  32885. if (len > 0) {
  32886. newChildren = [];
  32887. for (i = 0; i < len - 1; i++) {
  32888. newChildren.push(this.children[i]);
  32889. newChildren.push(aSep);
  32890. }
  32891. newChildren.push(this.children[i]);
  32892. this.children = newChildren;
  32893. }
  32894. return this;
  32895. };
  32896. SourceNode.prototype.replaceRight = function SourceNode_replaceRight(aPattern, aReplacement) {
  32897. var lastChild = this.children[this.children.length - 1];
  32898. if (lastChild[isSourceNode]) {
  32899. lastChild.replaceRight(aPattern, aReplacement);
  32900. } else if (typeof lastChild === "string") {
  32901. this.children[this.children.length - 1] = lastChild.replace(aPattern, aReplacement);
  32902. } else {
  32903. this.children.push("".replace(aPattern, aReplacement));
  32904. }
  32905. return this;
  32906. };
  32907. SourceNode.prototype.setSourceContent = function SourceNode_setSourceContent(aSourceFile, aSourceContent) {
  32908. this.sourceContents[util.toSetString(aSourceFile)] = aSourceContent;
  32909. };
  32910. SourceNode.prototype.walkSourceContents = function SourceNode_walkSourceContents(aFn) {
  32911. for (var i = 0, len = this.children.length; i < len; i++) {
  32912. if (this.children[i][isSourceNode]) {
  32913. this.children[i].walkSourceContents(aFn);
  32914. }
  32915. }
  32916. var sources = Object.keys(this.sourceContents);
  32917. for (var i = 0, len = sources.length; i < len; i++) {
  32918. aFn(util.fromSetString(sources[i]), this.sourceContents[sources[i]]);
  32919. }
  32920. };
  32921. SourceNode.prototype.toString = function SourceNode_toString() {
  32922. var str = "";
  32923. this.walk(function(chunk) {
  32924. str += chunk;
  32925. });
  32926. return str;
  32927. };
  32928. SourceNode.prototype.toStringWithSourceMap = function SourceNode_toStringWithSourceMap(aArgs) {
  32929. var generated2 = {
  32930. code: "",
  32931. line: 1,
  32932. column: 0
  32933. };
  32934. var map = new SourceMapGenerator(aArgs);
  32935. var sourceMappingActive = false;
  32936. var lastOriginalSource = null;
  32937. var lastOriginalLine = null;
  32938. var lastOriginalColumn = null;
  32939. var lastOriginalName = null;
  32940. this.walk(function(chunk, original) {
  32941. generated2.code += chunk;
  32942. if (original.source !== null && original.line !== null && original.column !== null) {
  32943. if (lastOriginalSource !== original.source || lastOriginalLine !== original.line || lastOriginalColumn !== original.column || lastOriginalName !== original.name) {
  32944. map.addMapping({
  32945. source: original.source,
  32946. original: {
  32947. line: original.line,
  32948. column: original.column
  32949. },
  32950. generated: {
  32951. line: generated2.line,
  32952. column: generated2.column
  32953. },
  32954. name: original.name
  32955. });
  32956. }
  32957. lastOriginalSource = original.source;
  32958. lastOriginalLine = original.line;
  32959. lastOriginalColumn = original.column;
  32960. lastOriginalName = original.name;
  32961. sourceMappingActive = true;
  32962. } else if (sourceMappingActive) {
  32963. map.addMapping({
  32964. generated: {
  32965. line: generated2.line,
  32966. column: generated2.column
  32967. }
  32968. });
  32969. lastOriginalSource = null;
  32970. sourceMappingActive = false;
  32971. }
  32972. for (var idx = 0, length = chunk.length; idx < length; idx++) {
  32973. if (chunk.charCodeAt(idx) === NEWLINE_CODE) {
  32974. generated2.line++;
  32975. generated2.column = 0;
  32976. if (idx + 1 === length) {
  32977. lastOriginalSource = null;
  32978. sourceMappingActive = false;
  32979. } else if (sourceMappingActive) {
  32980. map.addMapping({
  32981. source: original.source,
  32982. original: {
  32983. line: original.line,
  32984. column: original.column
  32985. },
  32986. generated: {
  32987. line: generated2.line,
  32988. column: generated2.column
  32989. },
  32990. name: original.name
  32991. });
  32992. }
  32993. } else {
  32994. generated2.column++;
  32995. }
  32996. }
  32997. });
  32998. this.walkSourceContents(function(sourceFile, sourceContent) {
  32999. map.setSourceContent(sourceFile, sourceContent);
  33000. });
  33001. return { code: generated2.code, map };
  33002. };
  33003. exports.SourceNode = SourceNode;
  33004. }
  33005. });
  33006. // node_modules/source-map/source-map.js
  33007. var require_source_map = __commonJS({
  33008. "node_modules/source-map/source-map.js"(exports) {
  33009. exports.SourceMapGenerator = require_source_map_generator().SourceMapGenerator;
  33010. exports.SourceMapConsumer = require_source_map_consumer().SourceMapConsumer;
  33011. exports.SourceNode = require_source_node().SourceNode;
  33012. }
  33013. });
  33014. // node_modules/estree-to-babel/node_modules/@babel/generator/lib/source-map.js
  33015. var require_source_map2 = __commonJS({
  33016. "node_modules/estree-to-babel/node_modules/@babel/generator/lib/source-map.js"(exports) {
  33017. "use strict";
  33018. Object.defineProperty(exports, "__esModule", {
  33019. value: true
  33020. });
  33021. exports.default = void 0;
  33022. var _sourceMap = require_source_map();
  33023. var SourceMap = class {
  33024. constructor(opts, code2) {
  33025. this._cachedMap = void 0;
  33026. this._code = void 0;
  33027. this._opts = void 0;
  33028. this._rawMappings = void 0;
  33029. this._lastGenLine = void 0;
  33030. this._lastSourceLine = void 0;
  33031. this._lastSourceColumn = void 0;
  33032. this._cachedMap = null;
  33033. this._code = code2;
  33034. this._opts = opts;
  33035. this._rawMappings = [];
  33036. }
  33037. get() {
  33038. if (!this._cachedMap) {
  33039. const map = this._cachedMap = new _sourceMap.SourceMapGenerator({
  33040. sourceRoot: this._opts.sourceRoot
  33041. });
  33042. const code2 = this._code;
  33043. if (typeof code2 === "string") {
  33044. map.setSourceContent(this._opts.sourceFileName.replace(/\\/g, "/"), code2);
  33045. } else if (typeof code2 === "object") {
  33046. Object.keys(code2).forEach((sourceFileName) => {
  33047. map.setSourceContent(sourceFileName.replace(/\\/g, "/"), code2[sourceFileName]);
  33048. });
  33049. }
  33050. this._rawMappings.forEach((mapping) => map.addMapping(mapping), map);
  33051. }
  33052. return this._cachedMap.toJSON();
  33053. }
  33054. getRawMappings() {
  33055. return this._rawMappings.slice();
  33056. }
  33057. mark(generatedLine, generatedColumn, line, column, identifierName, filename, force) {
  33058. if (this._lastGenLine !== generatedLine && line === null)
  33059. return;
  33060. if (!force && this._lastGenLine === generatedLine && this._lastSourceLine === line && this._lastSourceColumn === column) {
  33061. return;
  33062. }
  33063. this._cachedMap = null;
  33064. this._lastGenLine = generatedLine;
  33065. this._lastSourceLine = line;
  33066. this._lastSourceColumn = column;
  33067. this._rawMappings.push({
  33068. name: identifierName || void 0,
  33069. generated: {
  33070. line: generatedLine,
  33071. column: generatedColumn
  33072. },
  33073. source: line == null ? void 0 : (filename || this._opts.sourceFileName).replace(/\\/g, "/"),
  33074. original: line == null ? void 0 : {
  33075. line,
  33076. column
  33077. }
  33078. });
  33079. }
  33080. };
  33081. exports.default = SourceMap;
  33082. }
  33083. });
  33084. // node_modules/estree-to-babel/node_modules/@babel/generator/lib/buffer.js
  33085. var require_buffer = __commonJS({
  33086. "node_modules/estree-to-babel/node_modules/@babel/generator/lib/buffer.js"(exports) {
  33087. "use strict";
  33088. Object.defineProperty(exports, "__esModule", {
  33089. value: true
  33090. });
  33091. exports.default = void 0;
  33092. var SPACES_RE = /^[ \t]+$/;
  33093. var Buffer2 = class {
  33094. constructor(map) {
  33095. this._map = null;
  33096. this._buf = [];
  33097. this._last = "";
  33098. this._queue = [];
  33099. this._position = {
  33100. line: 1,
  33101. column: 0
  33102. };
  33103. this._sourcePosition = {
  33104. identifierName: null,
  33105. line: null,
  33106. column: null,
  33107. filename: null
  33108. };
  33109. this._disallowedPop = null;
  33110. this._map = map;
  33111. }
  33112. get() {
  33113. this._flush();
  33114. const map = this._map;
  33115. const result = {
  33116. code: this._buf.join("").trimRight(),
  33117. map: null,
  33118. rawMappings: map == null ? void 0 : map.getRawMappings()
  33119. };
  33120. if (map) {
  33121. Object.defineProperty(result, "map", {
  33122. configurable: true,
  33123. enumerable: true,
  33124. get() {
  33125. return this.map = map.get();
  33126. },
  33127. set(value) {
  33128. Object.defineProperty(this, "map", {
  33129. value,
  33130. writable: true
  33131. });
  33132. }
  33133. });
  33134. }
  33135. return result;
  33136. }
  33137. append(str) {
  33138. this._flush();
  33139. const {
  33140. line,
  33141. column,
  33142. filename,
  33143. identifierName,
  33144. force
  33145. } = this._sourcePosition;
  33146. this._append(str, line, column, identifierName, filename, force);
  33147. }
  33148. queue(str) {
  33149. if (str === "\n") {
  33150. while (this._queue.length > 0 && SPACES_RE.test(this._queue[0][0])) {
  33151. this._queue.shift();
  33152. }
  33153. }
  33154. const {
  33155. line,
  33156. column,
  33157. filename,
  33158. identifierName,
  33159. force
  33160. } = this._sourcePosition;
  33161. this._queue.unshift([str, line, column, identifierName, filename, force]);
  33162. }
  33163. _flush() {
  33164. let item;
  33165. while (item = this._queue.pop()) {
  33166. this._append(...item);
  33167. }
  33168. }
  33169. _append(str, line, column, identifierName, filename, force) {
  33170. this._buf.push(str);
  33171. this._last = str[str.length - 1];
  33172. let i = str.indexOf("\n");
  33173. let last = 0;
  33174. if (i !== 0) {
  33175. this._mark(line, column, identifierName, filename, force);
  33176. }
  33177. while (i !== -1) {
  33178. this._position.line++;
  33179. this._position.column = 0;
  33180. last = i + 1;
  33181. if (last < str.length) {
  33182. this._mark(++line, 0, identifierName, filename, force);
  33183. }
  33184. i = str.indexOf("\n", last);
  33185. }
  33186. this._position.column += str.length - last;
  33187. }
  33188. _mark(line, column, identifierName, filename, force) {
  33189. var _this$_map;
  33190. (_this$_map = this._map) == null ? void 0 : _this$_map.mark(this._position.line, this._position.column, line, column, identifierName, filename, force);
  33191. }
  33192. removeTrailingNewline() {
  33193. if (this._queue.length > 0 && this._queue[0][0] === "\n") {
  33194. this._queue.shift();
  33195. }
  33196. }
  33197. removeLastSemicolon() {
  33198. if (this._queue.length > 0 && this._queue[0][0] === ";") {
  33199. this._queue.shift();
  33200. }
  33201. }
  33202. endsWith(suffix) {
  33203. if (suffix.length === 1) {
  33204. let last;
  33205. if (this._queue.length > 0) {
  33206. const str = this._queue[0][0];
  33207. last = str[str.length - 1];
  33208. } else {
  33209. last = this._last;
  33210. }
  33211. return last === suffix;
  33212. }
  33213. const end = this._last + this._queue.reduce((acc, item) => item[0] + acc, "");
  33214. if (suffix.length <= end.length) {
  33215. return end.slice(-suffix.length) === suffix;
  33216. }
  33217. return false;
  33218. }
  33219. hasContent() {
  33220. return this._queue.length > 0 || !!this._last;
  33221. }
  33222. exactSource(loc, cb) {
  33223. this.source("start", loc, true);
  33224. cb();
  33225. this.source("end", loc);
  33226. this._disallowPop("start", loc);
  33227. }
  33228. source(prop, loc, force) {
  33229. if (prop && !loc)
  33230. return;
  33231. this._normalizePosition(prop, loc, this._sourcePosition, force);
  33232. }
  33233. withSource(prop, loc, cb) {
  33234. if (!this._map)
  33235. return cb();
  33236. const originalLine = this._sourcePosition.line;
  33237. const originalColumn = this._sourcePosition.column;
  33238. const originalFilename = this._sourcePosition.filename;
  33239. const originalIdentifierName = this._sourcePosition.identifierName;
  33240. this.source(prop, loc);
  33241. cb();
  33242. if ((!this._sourcePosition.force || this._sourcePosition.line !== originalLine || this._sourcePosition.column !== originalColumn || this._sourcePosition.filename !== originalFilename) && (!this._disallowedPop || this._disallowedPop.line !== originalLine || this._disallowedPop.column !== originalColumn || this._disallowedPop.filename !== originalFilename)) {
  33243. this._sourcePosition.line = originalLine;
  33244. this._sourcePosition.column = originalColumn;
  33245. this._sourcePosition.filename = originalFilename;
  33246. this._sourcePosition.identifierName = originalIdentifierName;
  33247. this._sourcePosition.force = false;
  33248. this._disallowedPop = null;
  33249. }
  33250. }
  33251. _disallowPop(prop, loc) {
  33252. if (prop && !loc)
  33253. return;
  33254. this._disallowedPop = this._normalizePosition(prop, loc);
  33255. }
  33256. _normalizePosition(prop, loc, targetObj, force) {
  33257. const pos = loc ? loc[prop] : null;
  33258. if (targetObj === void 0) {
  33259. targetObj = {
  33260. identifierName: null,
  33261. line: null,
  33262. column: null,
  33263. filename: null,
  33264. force: false
  33265. };
  33266. }
  33267. const origLine = targetObj.line;
  33268. const origColumn = targetObj.column;
  33269. const origFilename = targetObj.filename;
  33270. targetObj.identifierName = prop === "start" && (loc == null ? void 0 : loc.identifierName) || null;
  33271. targetObj.line = pos == null ? void 0 : pos.line;
  33272. targetObj.column = pos == null ? void 0 : pos.column;
  33273. targetObj.filename = loc == null ? void 0 : loc.filename;
  33274. if (force || targetObj.line !== origLine || targetObj.column !== origColumn || targetObj.filename !== origFilename) {
  33275. targetObj.force = force;
  33276. }
  33277. return targetObj;
  33278. }
  33279. getCurrentColumn() {
  33280. const extra = this._queue.reduce((acc, item) => item[0] + acc, "");
  33281. const lastIndex = extra.lastIndexOf("\n");
  33282. return lastIndex === -1 ? this._position.column + extra.length : extra.length - 1 - lastIndex;
  33283. }
  33284. getCurrentLine() {
  33285. const extra = this._queue.reduce((acc, item) => item[0] + acc, "");
  33286. let count = 0;
  33287. for (let i = 0; i < extra.length; i++) {
  33288. if (extra[i] === "\n")
  33289. count++;
  33290. }
  33291. return this._position.line + count;
  33292. }
  33293. };
  33294. exports.default = Buffer2;
  33295. }
  33296. });
  33297. // node_modules/estree-to-babel/node_modules/@babel/generator/lib/node/whitespace.js
  33298. var require_whitespace = __commonJS({
  33299. "node_modules/estree-to-babel/node_modules/@babel/generator/lib/node/whitespace.js"(exports) {
  33300. "use strict";
  33301. Object.defineProperty(exports, "__esModule", {
  33302. value: true
  33303. });
  33304. exports.list = exports.nodes = void 0;
  33305. var t2 = require_lib4();
  33306. function crawl(node, state = {}) {
  33307. if (t2.isMemberExpression(node) || t2.isOptionalMemberExpression(node)) {
  33308. crawl(node.object, state);
  33309. if (node.computed)
  33310. crawl(node.property, state);
  33311. } else if (t2.isBinary(node) || t2.isAssignmentExpression(node)) {
  33312. crawl(node.left, state);
  33313. crawl(node.right, state);
  33314. } else if (t2.isCallExpression(node) || t2.isOptionalCallExpression(node)) {
  33315. state.hasCall = true;
  33316. crawl(node.callee, state);
  33317. } else if (t2.isFunction(node)) {
  33318. state.hasFunction = true;
  33319. } else if (t2.isIdentifier(node)) {
  33320. state.hasHelper = state.hasHelper || isHelper(node.callee);
  33321. }
  33322. return state;
  33323. }
  33324. function isHelper(node) {
  33325. if (t2.isMemberExpression(node)) {
  33326. return isHelper(node.object) || isHelper(node.property);
  33327. } else if (t2.isIdentifier(node)) {
  33328. return node.name === "require" || node.name[0] === "_";
  33329. } else if (t2.isCallExpression(node)) {
  33330. return isHelper(node.callee);
  33331. } else if (t2.isBinary(node) || t2.isAssignmentExpression(node)) {
  33332. return t2.isIdentifier(node.left) && isHelper(node.left) || isHelper(node.right);
  33333. } else {
  33334. return false;
  33335. }
  33336. }
  33337. function isType(node) {
  33338. return t2.isLiteral(node) || t2.isObjectExpression(node) || t2.isArrayExpression(node) || t2.isIdentifier(node) || t2.isMemberExpression(node);
  33339. }
  33340. var nodes = {
  33341. AssignmentExpression(node) {
  33342. const state = crawl(node.right);
  33343. if (state.hasCall && state.hasHelper || state.hasFunction) {
  33344. return {
  33345. before: state.hasFunction,
  33346. after: true
  33347. };
  33348. }
  33349. },
  33350. SwitchCase(node, parent) {
  33351. return {
  33352. before: !!node.consequent.length || parent.cases[0] === node,
  33353. after: !node.consequent.length && parent.cases[parent.cases.length - 1] === node
  33354. };
  33355. },
  33356. LogicalExpression(node) {
  33357. if (t2.isFunction(node.left) || t2.isFunction(node.right)) {
  33358. return {
  33359. after: true
  33360. };
  33361. }
  33362. },
  33363. Literal(node) {
  33364. if (t2.isStringLiteral(node) && node.value === "use strict") {
  33365. return {
  33366. after: true
  33367. };
  33368. }
  33369. },
  33370. CallExpression(node) {
  33371. if (t2.isFunction(node.callee) || isHelper(node)) {
  33372. return {
  33373. before: true,
  33374. after: true
  33375. };
  33376. }
  33377. },
  33378. OptionalCallExpression(node) {
  33379. if (t2.isFunction(node.callee)) {
  33380. return {
  33381. before: true,
  33382. after: true
  33383. };
  33384. }
  33385. },
  33386. VariableDeclaration(node) {
  33387. for (let i = 0; i < node.declarations.length; i++) {
  33388. const declar = node.declarations[i];
  33389. let enabled = isHelper(declar.id) && !isType(declar.init);
  33390. if (!enabled) {
  33391. const state = crawl(declar.init);
  33392. enabled = isHelper(declar.init) && state.hasCall || state.hasFunction;
  33393. }
  33394. if (enabled) {
  33395. return {
  33396. before: true,
  33397. after: true
  33398. };
  33399. }
  33400. }
  33401. },
  33402. IfStatement(node) {
  33403. if (t2.isBlockStatement(node.consequent)) {
  33404. return {
  33405. before: true,
  33406. after: true
  33407. };
  33408. }
  33409. }
  33410. };
  33411. exports.nodes = nodes;
  33412. nodes.ObjectProperty = nodes.ObjectTypeProperty = nodes.ObjectMethod = function(node, parent) {
  33413. if (parent.properties[0] === node) {
  33414. return {
  33415. before: true
  33416. };
  33417. }
  33418. };
  33419. nodes.ObjectTypeCallProperty = function(node, parent) {
  33420. var _parent$properties;
  33421. if (parent.callProperties[0] === node && !((_parent$properties = parent.properties) != null && _parent$properties.length)) {
  33422. return {
  33423. before: true
  33424. };
  33425. }
  33426. };
  33427. nodes.ObjectTypeIndexer = function(node, parent) {
  33428. var _parent$properties2, _parent$callPropertie;
  33429. if (parent.indexers[0] === node && !((_parent$properties2 = parent.properties) != null && _parent$properties2.length) && !((_parent$callPropertie = parent.callProperties) != null && _parent$callPropertie.length)) {
  33430. return {
  33431. before: true
  33432. };
  33433. }
  33434. };
  33435. nodes.ObjectTypeInternalSlot = function(node, parent) {
  33436. var _parent$properties3, _parent$callPropertie2, _parent$indexers;
  33437. if (parent.internalSlots[0] === node && !((_parent$properties3 = parent.properties) != null && _parent$properties3.length) && !((_parent$callPropertie2 = parent.callProperties) != null && _parent$callPropertie2.length) && !((_parent$indexers = parent.indexers) != null && _parent$indexers.length)) {
  33438. return {
  33439. before: true
  33440. };
  33441. }
  33442. };
  33443. var list3 = {
  33444. VariableDeclaration(node) {
  33445. return node.declarations.map((decl) => decl.init);
  33446. },
  33447. ArrayExpression(node) {
  33448. return node.elements;
  33449. },
  33450. ObjectExpression(node) {
  33451. return node.properties;
  33452. }
  33453. };
  33454. exports.list = list3;
  33455. [["Function", true], ["Class", true], ["Loop", true], ["LabeledStatement", true], ["SwitchStatement", true], ["TryStatement", true]].forEach(function([type, amounts]) {
  33456. if (typeof amounts === "boolean") {
  33457. amounts = {
  33458. after: amounts,
  33459. before: amounts
  33460. };
  33461. }
  33462. [type].concat(t2.FLIPPED_ALIAS_KEYS[type] || []).forEach(function(type2) {
  33463. nodes[type2] = function() {
  33464. return amounts;
  33465. };
  33466. });
  33467. });
  33468. }
  33469. });
  33470. // node_modules/estree-to-babel/node_modules/@babel/generator/lib/node/parentheses.js
  33471. var require_parentheses = __commonJS({
  33472. "node_modules/estree-to-babel/node_modules/@babel/generator/lib/node/parentheses.js"(exports) {
  33473. "use strict";
  33474. Object.defineProperty(exports, "__esModule", {
  33475. value: true
  33476. });
  33477. exports.NullableTypeAnnotation = NullableTypeAnnotation;
  33478. exports.FunctionTypeAnnotation = FunctionTypeAnnotation;
  33479. exports.UpdateExpression = UpdateExpression;
  33480. exports.ObjectExpression = ObjectExpression;
  33481. exports.DoExpression = DoExpression;
  33482. exports.Binary = Binary;
  33483. exports.IntersectionTypeAnnotation = exports.UnionTypeAnnotation = UnionTypeAnnotation;
  33484. exports.OptionalIndexedAccessType = OptionalIndexedAccessType;
  33485. exports.TSAsExpression = TSAsExpression;
  33486. exports.TSTypeAssertion = TSTypeAssertion;
  33487. exports.TSIntersectionType = exports.TSUnionType = TSUnionType;
  33488. exports.TSInferType = TSInferType;
  33489. exports.BinaryExpression = BinaryExpression2;
  33490. exports.SequenceExpression = SequenceExpression;
  33491. exports.AwaitExpression = exports.YieldExpression = YieldExpression;
  33492. exports.ClassExpression = ClassExpression;
  33493. exports.UnaryLike = UnaryLike;
  33494. exports.FunctionExpression = FunctionExpression;
  33495. exports.ArrowFunctionExpression = ArrowFunctionExpression;
  33496. exports.ConditionalExpression = ConditionalExpression;
  33497. exports.OptionalCallExpression = exports.OptionalMemberExpression = OptionalMemberExpression;
  33498. exports.AssignmentExpression = AssignmentExpression;
  33499. exports.LogicalExpression = LogicalExpression;
  33500. exports.Identifier = Identifier;
  33501. var t2 = require_lib4();
  33502. var PRECEDENCE = {
  33503. "||": 0,
  33504. "??": 0,
  33505. "&&": 1,
  33506. "|": 2,
  33507. "^": 3,
  33508. "&": 4,
  33509. "==": 5,
  33510. "===": 5,
  33511. "!=": 5,
  33512. "!==": 5,
  33513. "<": 6,
  33514. ">": 6,
  33515. "<=": 6,
  33516. ">=": 6,
  33517. in: 6,
  33518. instanceof: 6,
  33519. ">>": 7,
  33520. "<<": 7,
  33521. ">>>": 7,
  33522. "+": 8,
  33523. "-": 8,
  33524. "*": 9,
  33525. "/": 9,
  33526. "%": 9,
  33527. "**": 10
  33528. };
  33529. var isClassExtendsClause = (node, parent) => (t2.isClassDeclaration(parent) || t2.isClassExpression(parent)) && parent.superClass === node;
  33530. var hasPostfixPart = (node, parent) => (t2.isMemberExpression(parent) || t2.isOptionalMemberExpression(parent)) && parent.object === node || (t2.isCallExpression(parent) || t2.isOptionalCallExpression(parent) || t2.isNewExpression(parent)) && parent.callee === node || t2.isTaggedTemplateExpression(parent) && parent.tag === node || t2.isTSNonNullExpression(parent);
  33531. function NullableTypeAnnotation(node, parent) {
  33532. return t2.isArrayTypeAnnotation(parent);
  33533. }
  33534. function FunctionTypeAnnotation(node, parent, printStack) {
  33535. return t2.isUnionTypeAnnotation(parent) || t2.isIntersectionTypeAnnotation(parent) || t2.isArrayTypeAnnotation(parent) || t2.isTypeAnnotation(parent) && t2.isArrowFunctionExpression(printStack[printStack.length - 3]);
  33536. }
  33537. function UpdateExpression(node, parent) {
  33538. return hasPostfixPart(node, parent) || isClassExtendsClause(node, parent);
  33539. }
  33540. function ObjectExpression(node, parent, printStack) {
  33541. return isFirstInContext(printStack, {
  33542. expressionStatement: true,
  33543. arrowBody: true
  33544. });
  33545. }
  33546. function DoExpression(node, parent, printStack) {
  33547. return !node.async && isFirstInContext(printStack, {
  33548. expressionStatement: true
  33549. });
  33550. }
  33551. function Binary(node, parent) {
  33552. if (node.operator === "**" && t2.isBinaryExpression(parent, {
  33553. operator: "**"
  33554. })) {
  33555. return parent.left === node;
  33556. }
  33557. if (isClassExtendsClause(node, parent)) {
  33558. return true;
  33559. }
  33560. if (hasPostfixPart(node, parent) || t2.isUnaryLike(parent) || t2.isAwaitExpression(parent)) {
  33561. return true;
  33562. }
  33563. if (t2.isBinary(parent)) {
  33564. const parentOp = parent.operator;
  33565. const parentPos = PRECEDENCE[parentOp];
  33566. const nodeOp = node.operator;
  33567. const nodePos = PRECEDENCE[nodeOp];
  33568. if (parentPos === nodePos && parent.right === node && !t2.isLogicalExpression(parent) || parentPos > nodePos) {
  33569. return true;
  33570. }
  33571. }
  33572. }
  33573. function UnionTypeAnnotation(node, parent) {
  33574. return t2.isArrayTypeAnnotation(parent) || t2.isNullableTypeAnnotation(parent) || t2.isIntersectionTypeAnnotation(parent) || t2.isUnionTypeAnnotation(parent);
  33575. }
  33576. function OptionalIndexedAccessType(node, parent) {
  33577. return t2.isIndexedAccessType(parent, {
  33578. objectType: node
  33579. });
  33580. }
  33581. function TSAsExpression() {
  33582. return true;
  33583. }
  33584. function TSTypeAssertion() {
  33585. return true;
  33586. }
  33587. function TSUnionType(node, parent) {
  33588. return t2.isTSArrayType(parent) || t2.isTSOptionalType(parent) || t2.isTSIntersectionType(parent) || t2.isTSUnionType(parent) || t2.isTSRestType(parent);
  33589. }
  33590. function TSInferType(node, parent) {
  33591. return t2.isTSArrayType(parent) || t2.isTSOptionalType(parent);
  33592. }
  33593. function BinaryExpression2(node, parent) {
  33594. return node.operator === "in" && (t2.isVariableDeclarator(parent) || t2.isFor(parent));
  33595. }
  33596. function SequenceExpression(node, parent) {
  33597. if (t2.isForStatement(parent) || t2.isThrowStatement(parent) || t2.isReturnStatement(parent) || t2.isIfStatement(parent) && parent.test === node || t2.isWhileStatement(parent) && parent.test === node || t2.isForInStatement(parent) && parent.right === node || t2.isSwitchStatement(parent) && parent.discriminant === node || t2.isExpressionStatement(parent) && parent.expression === node) {
  33598. return false;
  33599. }
  33600. return true;
  33601. }
  33602. function YieldExpression(node, parent) {
  33603. return t2.isBinary(parent) || t2.isUnaryLike(parent) || hasPostfixPart(node, parent) || t2.isAwaitExpression(parent) && t2.isYieldExpression(node) || t2.isConditionalExpression(parent) && node === parent.test || isClassExtendsClause(node, parent);
  33604. }
  33605. function ClassExpression(node, parent, printStack) {
  33606. return isFirstInContext(printStack, {
  33607. expressionStatement: true,
  33608. exportDefault: true
  33609. });
  33610. }
  33611. function UnaryLike(node, parent) {
  33612. return hasPostfixPart(node, parent) || t2.isBinaryExpression(parent, {
  33613. operator: "**",
  33614. left: node
  33615. }) || isClassExtendsClause(node, parent);
  33616. }
  33617. function FunctionExpression(node, parent, printStack) {
  33618. return isFirstInContext(printStack, {
  33619. expressionStatement: true,
  33620. exportDefault: true
  33621. });
  33622. }
  33623. function ArrowFunctionExpression(node, parent) {
  33624. return t2.isExportDeclaration(parent) || ConditionalExpression(node, parent);
  33625. }
  33626. function ConditionalExpression(node, parent) {
  33627. if (t2.isUnaryLike(parent) || t2.isBinary(parent) || t2.isConditionalExpression(parent, {
  33628. test: node
  33629. }) || t2.isAwaitExpression(parent) || t2.isTSTypeAssertion(parent) || t2.isTSAsExpression(parent)) {
  33630. return true;
  33631. }
  33632. return UnaryLike(node, parent);
  33633. }
  33634. function OptionalMemberExpression(node, parent) {
  33635. return t2.isCallExpression(parent, {
  33636. callee: node
  33637. }) || t2.isMemberExpression(parent, {
  33638. object: node
  33639. });
  33640. }
  33641. function AssignmentExpression(node, parent) {
  33642. if (t2.isObjectPattern(node.left)) {
  33643. return true;
  33644. } else {
  33645. return ConditionalExpression(node, parent);
  33646. }
  33647. }
  33648. function LogicalExpression(node, parent) {
  33649. switch (node.operator) {
  33650. case "||":
  33651. if (!t2.isLogicalExpression(parent))
  33652. return false;
  33653. return parent.operator === "??" || parent.operator === "&&";
  33654. case "&&":
  33655. return t2.isLogicalExpression(parent, {
  33656. operator: "??"
  33657. });
  33658. case "??":
  33659. return t2.isLogicalExpression(parent) && parent.operator !== "??";
  33660. }
  33661. }
  33662. function Identifier(node, parent, printStack) {
  33663. if (node.name === "let") {
  33664. const isFollowedByBracket = t2.isMemberExpression(parent, {
  33665. object: node,
  33666. computed: true
  33667. }) || t2.isOptionalMemberExpression(parent, {
  33668. object: node,
  33669. computed: true,
  33670. optional: false
  33671. });
  33672. return isFirstInContext(printStack, {
  33673. expressionStatement: isFollowedByBracket,
  33674. forHead: isFollowedByBracket,
  33675. forInHead: isFollowedByBracket,
  33676. forOfHead: true
  33677. });
  33678. }
  33679. return node.name === "async" && t2.isForOfStatement(parent) && node === parent.left;
  33680. }
  33681. function isFirstInContext(printStack, {
  33682. expressionStatement = false,
  33683. arrowBody = false,
  33684. exportDefault = false,
  33685. forHead = false,
  33686. forInHead = false,
  33687. forOfHead = false
  33688. }) {
  33689. let i = printStack.length - 1;
  33690. let node = printStack[i];
  33691. i--;
  33692. let parent = printStack[i];
  33693. while (i >= 0) {
  33694. if (expressionStatement && t2.isExpressionStatement(parent, {
  33695. expression: node
  33696. }) || exportDefault && t2.isExportDefaultDeclaration(parent, {
  33697. declaration: node
  33698. }) || arrowBody && t2.isArrowFunctionExpression(parent, {
  33699. body: node
  33700. }) || forHead && t2.isForStatement(parent, {
  33701. init: node
  33702. }) || forInHead && t2.isForInStatement(parent, {
  33703. left: node
  33704. }) || forOfHead && t2.isForOfStatement(parent, {
  33705. left: node
  33706. })) {
  33707. return true;
  33708. }
  33709. if (hasPostfixPart(node, parent) && !t2.isNewExpression(parent) || t2.isSequenceExpression(parent) && parent.expressions[0] === node || t2.isConditional(parent, {
  33710. test: node
  33711. }) || t2.isBinary(parent, {
  33712. left: node
  33713. }) || t2.isAssignmentExpression(parent, {
  33714. left: node
  33715. })) {
  33716. node = parent;
  33717. i--;
  33718. parent = printStack[i];
  33719. } else {
  33720. return false;
  33721. }
  33722. }
  33723. return false;
  33724. }
  33725. }
  33726. });
  33727. // node_modules/estree-to-babel/node_modules/@babel/generator/lib/node/index.js
  33728. var require_node2 = __commonJS({
  33729. "node_modules/estree-to-babel/node_modules/@babel/generator/lib/node/index.js"(exports) {
  33730. "use strict";
  33731. Object.defineProperty(exports, "__esModule", {
  33732. value: true
  33733. });
  33734. exports.needsWhitespace = needsWhitespace;
  33735. exports.needsWhitespaceBefore = needsWhitespaceBefore;
  33736. exports.needsWhitespaceAfter = needsWhitespaceAfter;
  33737. exports.needsParens = needsParens;
  33738. var whitespace2 = require_whitespace();
  33739. var parens = require_parentheses();
  33740. var t2 = require_lib4();
  33741. function expandAliases(obj) {
  33742. const newObj = {};
  33743. function add(type, func) {
  33744. const fn = newObj[type];
  33745. newObj[type] = fn ? function(node, parent, stack) {
  33746. const result = fn(node, parent, stack);
  33747. return result == null ? func(node, parent, stack) : result;
  33748. } : func;
  33749. }
  33750. for (const type of Object.keys(obj)) {
  33751. const aliases = t2.FLIPPED_ALIAS_KEYS[type];
  33752. if (aliases) {
  33753. for (const alias of aliases) {
  33754. add(alias, obj[type]);
  33755. }
  33756. } else {
  33757. add(type, obj[type]);
  33758. }
  33759. }
  33760. return newObj;
  33761. }
  33762. var expandedParens = expandAliases(parens);
  33763. var expandedWhitespaceNodes = expandAliases(whitespace2.nodes);
  33764. var expandedWhitespaceList = expandAliases(whitespace2.list);
  33765. function find2(obj, node, parent, printStack) {
  33766. const fn = obj[node.type];
  33767. return fn ? fn(node, parent, printStack) : null;
  33768. }
  33769. function isOrHasCallExpression(node) {
  33770. if (t2.isCallExpression(node)) {
  33771. return true;
  33772. }
  33773. return t2.isMemberExpression(node) && isOrHasCallExpression(node.object);
  33774. }
  33775. function needsWhitespace(node, parent, type) {
  33776. if (!node)
  33777. return 0;
  33778. if (t2.isExpressionStatement(node)) {
  33779. node = node.expression;
  33780. }
  33781. let linesInfo = find2(expandedWhitespaceNodes, node, parent);
  33782. if (!linesInfo) {
  33783. const items = find2(expandedWhitespaceList, node, parent);
  33784. if (items) {
  33785. for (let i = 0; i < items.length; i++) {
  33786. linesInfo = needsWhitespace(items[i], node, type);
  33787. if (linesInfo)
  33788. break;
  33789. }
  33790. }
  33791. }
  33792. if (typeof linesInfo === "object" && linesInfo !== null) {
  33793. return linesInfo[type] || 0;
  33794. }
  33795. return 0;
  33796. }
  33797. function needsWhitespaceBefore(node, parent) {
  33798. return needsWhitespace(node, parent, "before");
  33799. }
  33800. function needsWhitespaceAfter(node, parent) {
  33801. return needsWhitespace(node, parent, "after");
  33802. }
  33803. function needsParens(node, parent, printStack) {
  33804. if (!parent)
  33805. return false;
  33806. if (t2.isNewExpression(parent) && parent.callee === node) {
  33807. if (isOrHasCallExpression(node))
  33808. return true;
  33809. }
  33810. return find2(expandedParens, node, parent, printStack);
  33811. }
  33812. }
  33813. });
  33814. // node_modules/estree-to-babel/node_modules/@babel/generator/lib/generators/template-literals.js
  33815. var require_template_literals = __commonJS({
  33816. "node_modules/estree-to-babel/node_modules/@babel/generator/lib/generators/template-literals.js"(exports) {
  33817. "use strict";
  33818. Object.defineProperty(exports, "__esModule", {
  33819. value: true
  33820. });
  33821. exports.TaggedTemplateExpression = TaggedTemplateExpression;
  33822. exports.TemplateElement = TemplateElement;
  33823. exports.TemplateLiteral = TemplateLiteral;
  33824. var t2 = require_lib4();
  33825. function TaggedTemplateExpression(node) {
  33826. this.print(node.tag, node);
  33827. this.print(node.typeParameters, node);
  33828. this.print(node.quasi, node);
  33829. }
  33830. function TemplateElement(node, parent) {
  33831. const isFirst = parent.quasis[0] === node;
  33832. const isLast = parent.quasis[parent.quasis.length - 1] === node;
  33833. const value = (isFirst ? "`" : "}") + node.value.raw + (isLast ? "`" : "${");
  33834. this.token(value);
  33835. }
  33836. function TemplateLiteral(node) {
  33837. const quasis = node.quasis;
  33838. for (let i = 0; i < quasis.length; i++) {
  33839. this.print(quasis[i], node);
  33840. if (i + 1 < quasis.length) {
  33841. this.print(node.expressions[i], node);
  33842. }
  33843. }
  33844. }
  33845. }
  33846. });
  33847. // node_modules/estree-to-babel/node_modules/@babel/generator/lib/generators/expressions.js
  33848. var require_expressions = __commonJS({
  33849. "node_modules/estree-to-babel/node_modules/@babel/generator/lib/generators/expressions.js"(exports) {
  33850. "use strict";
  33851. Object.defineProperty(exports, "__esModule", {
  33852. value: true
  33853. });
  33854. exports.UnaryExpression = UnaryExpression;
  33855. exports.DoExpression = DoExpression;
  33856. exports.ParenthesizedExpression = ParenthesizedExpression;
  33857. exports.UpdateExpression = UpdateExpression;
  33858. exports.ConditionalExpression = ConditionalExpression;
  33859. exports.NewExpression = NewExpression;
  33860. exports.SequenceExpression = SequenceExpression;
  33861. exports.ThisExpression = ThisExpression;
  33862. exports.Super = Super;
  33863. exports.Decorator = Decorator;
  33864. exports.OptionalMemberExpression = OptionalMemberExpression;
  33865. exports.OptionalCallExpression = OptionalCallExpression;
  33866. exports.CallExpression = CallExpression;
  33867. exports.Import = Import;
  33868. exports.EmptyStatement = EmptyStatement;
  33869. exports.ExpressionStatement = ExpressionStatement;
  33870. exports.AssignmentPattern = AssignmentPattern;
  33871. exports.LogicalExpression = exports.BinaryExpression = exports.AssignmentExpression = AssignmentExpression;
  33872. exports.BindExpression = BindExpression;
  33873. exports.MemberExpression = MemberExpression;
  33874. exports.MetaProperty = MetaProperty;
  33875. exports.PrivateName = PrivateName;
  33876. exports.V8IntrinsicIdentifier = V8IntrinsicIdentifier;
  33877. exports.ModuleExpression = ModuleExpression;
  33878. exports.AwaitExpression = exports.YieldExpression = void 0;
  33879. var t2 = require_lib4();
  33880. var n = require_node2();
  33881. function UnaryExpression(node) {
  33882. if (node.operator === "void" || node.operator === "delete" || node.operator === "typeof" || node.operator === "throw") {
  33883. this.word(node.operator);
  33884. this.space();
  33885. } else {
  33886. this.token(node.operator);
  33887. }
  33888. this.print(node.argument, node);
  33889. }
  33890. function DoExpression(node) {
  33891. if (node.async) {
  33892. this.word("async");
  33893. this.space();
  33894. }
  33895. this.word("do");
  33896. this.space();
  33897. this.print(node.body, node);
  33898. }
  33899. function ParenthesizedExpression(node) {
  33900. this.token("(");
  33901. this.print(node.expression, node);
  33902. this.token(")");
  33903. }
  33904. function UpdateExpression(node) {
  33905. if (node.prefix) {
  33906. this.token(node.operator);
  33907. this.print(node.argument, node);
  33908. } else {
  33909. this.startTerminatorless(true);
  33910. this.print(node.argument, node);
  33911. this.endTerminatorless();
  33912. this.token(node.operator);
  33913. }
  33914. }
  33915. function ConditionalExpression(node) {
  33916. this.print(node.test, node);
  33917. this.space();
  33918. this.token("?");
  33919. this.space();
  33920. this.print(node.consequent, node);
  33921. this.space();
  33922. this.token(":");
  33923. this.space();
  33924. this.print(node.alternate, node);
  33925. }
  33926. function NewExpression(node, parent) {
  33927. this.word("new");
  33928. this.space();
  33929. this.print(node.callee, node);
  33930. if (this.format.minified && node.arguments.length === 0 && !node.optional && !t2.isCallExpression(parent, {
  33931. callee: node
  33932. }) && !t2.isMemberExpression(parent) && !t2.isNewExpression(parent)) {
  33933. return;
  33934. }
  33935. this.print(node.typeArguments, node);
  33936. this.print(node.typeParameters, node);
  33937. if (node.optional) {
  33938. this.token("?.");
  33939. }
  33940. this.token("(");
  33941. this.printList(node.arguments, node);
  33942. this.token(")");
  33943. }
  33944. function SequenceExpression(node) {
  33945. this.printList(node.expressions, node);
  33946. }
  33947. function ThisExpression() {
  33948. this.word("this");
  33949. }
  33950. function Super() {
  33951. this.word("super");
  33952. }
  33953. function Decorator(node) {
  33954. this.token("@");
  33955. this.print(node.expression, node);
  33956. this.newline();
  33957. }
  33958. function OptionalMemberExpression(node) {
  33959. this.print(node.object, node);
  33960. if (!node.computed && t2.isMemberExpression(node.property)) {
  33961. throw new TypeError("Got a MemberExpression for MemberExpression property");
  33962. }
  33963. let computed = node.computed;
  33964. if (t2.isLiteral(node.property) && typeof node.property.value === "number") {
  33965. computed = true;
  33966. }
  33967. if (node.optional) {
  33968. this.token("?.");
  33969. }
  33970. if (computed) {
  33971. this.token("[");
  33972. this.print(node.property, node);
  33973. this.token("]");
  33974. } else {
  33975. if (!node.optional) {
  33976. this.token(".");
  33977. }
  33978. this.print(node.property, node);
  33979. }
  33980. }
  33981. function OptionalCallExpression(node) {
  33982. this.print(node.callee, node);
  33983. this.print(node.typeArguments, node);
  33984. this.print(node.typeParameters, node);
  33985. if (node.optional) {
  33986. this.token("?.");
  33987. }
  33988. this.token("(");
  33989. this.printList(node.arguments, node);
  33990. this.token(")");
  33991. }
  33992. function CallExpression(node) {
  33993. this.print(node.callee, node);
  33994. this.print(node.typeArguments, node);
  33995. this.print(node.typeParameters, node);
  33996. this.token("(");
  33997. this.printList(node.arguments, node);
  33998. this.token(")");
  33999. }
  34000. function Import() {
  34001. this.word("import");
  34002. }
  34003. function buildYieldAwait(keyword) {
  34004. return function(node) {
  34005. this.word(keyword);
  34006. if (node.delegate) {
  34007. this.token("*");
  34008. }
  34009. if (node.argument) {
  34010. this.space();
  34011. const terminatorState = this.startTerminatorless();
  34012. this.print(node.argument, node);
  34013. this.endTerminatorless(terminatorState);
  34014. }
  34015. };
  34016. }
  34017. var YieldExpression = buildYieldAwait("yield");
  34018. exports.YieldExpression = YieldExpression;
  34019. var AwaitExpression = buildYieldAwait("await");
  34020. exports.AwaitExpression = AwaitExpression;
  34021. function EmptyStatement() {
  34022. this.semicolon(true);
  34023. }
  34024. function ExpressionStatement(node) {
  34025. this.print(node.expression, node);
  34026. this.semicolon();
  34027. }
  34028. function AssignmentPattern(node) {
  34029. this.print(node.left, node);
  34030. if (node.left.optional)
  34031. this.token("?");
  34032. this.print(node.left.typeAnnotation, node);
  34033. this.space();
  34034. this.token("=");
  34035. this.space();
  34036. this.print(node.right, node);
  34037. }
  34038. function AssignmentExpression(node, parent) {
  34039. const parens = this.inForStatementInitCounter && node.operator === "in" && !n.needsParens(node, parent);
  34040. if (parens) {
  34041. this.token("(");
  34042. }
  34043. this.print(node.left, node);
  34044. this.space();
  34045. if (node.operator === "in" || node.operator === "instanceof") {
  34046. this.word(node.operator);
  34047. } else {
  34048. this.token(node.operator);
  34049. }
  34050. this.space();
  34051. this.print(node.right, node);
  34052. if (parens) {
  34053. this.token(")");
  34054. }
  34055. }
  34056. function BindExpression(node) {
  34057. this.print(node.object, node);
  34058. this.token("::");
  34059. this.print(node.callee, node);
  34060. }
  34061. function MemberExpression(node) {
  34062. this.print(node.object, node);
  34063. if (!node.computed && t2.isMemberExpression(node.property)) {
  34064. throw new TypeError("Got a MemberExpression for MemberExpression property");
  34065. }
  34066. let computed = node.computed;
  34067. if (t2.isLiteral(node.property) && typeof node.property.value === "number") {
  34068. computed = true;
  34069. }
  34070. if (computed) {
  34071. this.token("[");
  34072. this.print(node.property, node);
  34073. this.token("]");
  34074. } else {
  34075. this.token(".");
  34076. this.print(node.property, node);
  34077. }
  34078. }
  34079. function MetaProperty(node) {
  34080. this.print(node.meta, node);
  34081. this.token(".");
  34082. this.print(node.property, node);
  34083. }
  34084. function PrivateName(node) {
  34085. this.token("#");
  34086. this.print(node.id, node);
  34087. }
  34088. function V8IntrinsicIdentifier(node) {
  34089. this.token("%");
  34090. this.word(node.name);
  34091. }
  34092. function ModuleExpression(node) {
  34093. this.word("module");
  34094. this.space();
  34095. this.token("{");
  34096. if (node.body.body.length === 0) {
  34097. this.token("}");
  34098. } else {
  34099. this.newline();
  34100. this.printSequence(node.body.body, node, {
  34101. indent: true
  34102. });
  34103. this.rightBrace();
  34104. }
  34105. }
  34106. }
  34107. });
  34108. // node_modules/estree-to-babel/node_modules/@babel/generator/lib/generators/statements.js
  34109. var require_statements = __commonJS({
  34110. "node_modules/estree-to-babel/node_modules/@babel/generator/lib/generators/statements.js"(exports) {
  34111. "use strict";
  34112. Object.defineProperty(exports, "__esModule", {
  34113. value: true
  34114. });
  34115. exports.WithStatement = WithStatement;
  34116. exports.IfStatement = IfStatement;
  34117. exports.ForStatement = ForStatement;
  34118. exports.WhileStatement = WhileStatement;
  34119. exports.DoWhileStatement = DoWhileStatement;
  34120. exports.LabeledStatement = LabeledStatement;
  34121. exports.TryStatement = TryStatement;
  34122. exports.CatchClause = CatchClause;
  34123. exports.SwitchStatement = SwitchStatement;
  34124. exports.SwitchCase = SwitchCase;
  34125. exports.DebuggerStatement = DebuggerStatement;
  34126. exports.VariableDeclaration = VariableDeclaration;
  34127. exports.VariableDeclarator = VariableDeclarator;
  34128. exports.ThrowStatement = exports.BreakStatement = exports.ReturnStatement = exports.ContinueStatement = exports.ForOfStatement = exports.ForInStatement = void 0;
  34129. var t2 = require_lib4();
  34130. function WithStatement(node) {
  34131. this.word("with");
  34132. this.space();
  34133. this.token("(");
  34134. this.print(node.object, node);
  34135. this.token(")");
  34136. this.printBlock(node);
  34137. }
  34138. function IfStatement(node) {
  34139. this.word("if");
  34140. this.space();
  34141. this.token("(");
  34142. this.print(node.test, node);
  34143. this.token(")");
  34144. this.space();
  34145. const needsBlock = node.alternate && t2.isIfStatement(getLastStatement(node.consequent));
  34146. if (needsBlock) {
  34147. this.token("{");
  34148. this.newline();
  34149. this.indent();
  34150. }
  34151. this.printAndIndentOnComments(node.consequent, node);
  34152. if (needsBlock) {
  34153. this.dedent();
  34154. this.newline();
  34155. this.token("}");
  34156. }
  34157. if (node.alternate) {
  34158. if (this.endsWith("}"))
  34159. this.space();
  34160. this.word("else");
  34161. this.space();
  34162. this.printAndIndentOnComments(node.alternate, node);
  34163. }
  34164. }
  34165. function getLastStatement(statement) {
  34166. if (!t2.isStatement(statement.body))
  34167. return statement;
  34168. return getLastStatement(statement.body);
  34169. }
  34170. function ForStatement(node) {
  34171. this.word("for");
  34172. this.space();
  34173. this.token("(");
  34174. this.inForStatementInitCounter++;
  34175. this.print(node.init, node);
  34176. this.inForStatementInitCounter--;
  34177. this.token(";");
  34178. if (node.test) {
  34179. this.space();
  34180. this.print(node.test, node);
  34181. }
  34182. this.token(";");
  34183. if (node.update) {
  34184. this.space();
  34185. this.print(node.update, node);
  34186. }
  34187. this.token(")");
  34188. this.printBlock(node);
  34189. }
  34190. function WhileStatement(node) {
  34191. this.word("while");
  34192. this.space();
  34193. this.token("(");
  34194. this.print(node.test, node);
  34195. this.token(")");
  34196. this.printBlock(node);
  34197. }
  34198. var buildForXStatement = function(op) {
  34199. return function(node) {
  34200. this.word("for");
  34201. this.space();
  34202. if (op === "of" && node.await) {
  34203. this.word("await");
  34204. this.space();
  34205. }
  34206. this.token("(");
  34207. this.print(node.left, node);
  34208. this.space();
  34209. this.word(op);
  34210. this.space();
  34211. this.print(node.right, node);
  34212. this.token(")");
  34213. this.printBlock(node);
  34214. };
  34215. };
  34216. var ForInStatement2 = buildForXStatement("in");
  34217. exports.ForInStatement = ForInStatement2;
  34218. var ForOfStatement = buildForXStatement("of");
  34219. exports.ForOfStatement = ForOfStatement;
  34220. function DoWhileStatement(node) {
  34221. this.word("do");
  34222. this.space();
  34223. this.print(node.body, node);
  34224. this.space();
  34225. this.word("while");
  34226. this.space();
  34227. this.token("(");
  34228. this.print(node.test, node);
  34229. this.token(")");
  34230. this.semicolon();
  34231. }
  34232. function buildLabelStatement(prefix, key = "label") {
  34233. return function(node) {
  34234. this.word(prefix);
  34235. const label = node[key];
  34236. if (label) {
  34237. this.space();
  34238. const isLabel = key == "label";
  34239. const terminatorState = this.startTerminatorless(isLabel);
  34240. this.print(label, node);
  34241. this.endTerminatorless(terminatorState);
  34242. }
  34243. this.semicolon();
  34244. };
  34245. }
  34246. var ContinueStatement = buildLabelStatement("continue");
  34247. exports.ContinueStatement = ContinueStatement;
  34248. var ReturnStatement = buildLabelStatement("return", "argument");
  34249. exports.ReturnStatement = ReturnStatement;
  34250. var BreakStatement = buildLabelStatement("break");
  34251. exports.BreakStatement = BreakStatement;
  34252. var ThrowStatement = buildLabelStatement("throw", "argument");
  34253. exports.ThrowStatement = ThrowStatement;
  34254. function LabeledStatement(node) {
  34255. this.print(node.label, node);
  34256. this.token(":");
  34257. this.space();
  34258. this.print(node.body, node);
  34259. }
  34260. function TryStatement(node) {
  34261. this.word("try");
  34262. this.space();
  34263. this.print(node.block, node);
  34264. this.space();
  34265. if (node.handlers) {
  34266. this.print(node.handlers[0], node);
  34267. } else {
  34268. this.print(node.handler, node);
  34269. }
  34270. if (node.finalizer) {
  34271. this.space();
  34272. this.word("finally");
  34273. this.space();
  34274. this.print(node.finalizer, node);
  34275. }
  34276. }
  34277. function CatchClause(node) {
  34278. this.word("catch");
  34279. this.space();
  34280. if (node.param) {
  34281. this.token("(");
  34282. this.print(node.param, node);
  34283. this.print(node.param.typeAnnotation, node);
  34284. this.token(")");
  34285. this.space();
  34286. }
  34287. this.print(node.body, node);
  34288. }
  34289. function SwitchStatement(node) {
  34290. this.word("switch");
  34291. this.space();
  34292. this.token("(");
  34293. this.print(node.discriminant, node);
  34294. this.token(")");
  34295. this.space();
  34296. this.token("{");
  34297. this.printSequence(node.cases, node, {
  34298. indent: true,
  34299. addNewlines(leading, cas) {
  34300. if (!leading && node.cases[node.cases.length - 1] === cas)
  34301. return -1;
  34302. }
  34303. });
  34304. this.token("}");
  34305. }
  34306. function SwitchCase(node) {
  34307. if (node.test) {
  34308. this.word("case");
  34309. this.space();
  34310. this.print(node.test, node);
  34311. this.token(":");
  34312. } else {
  34313. this.word("default");
  34314. this.token(":");
  34315. }
  34316. if (node.consequent.length) {
  34317. this.newline();
  34318. this.printSequence(node.consequent, node, {
  34319. indent: true
  34320. });
  34321. }
  34322. }
  34323. function DebuggerStatement() {
  34324. this.word("debugger");
  34325. this.semicolon();
  34326. }
  34327. function variableDeclarationIndent() {
  34328. this.token(",");
  34329. this.newline();
  34330. if (this.endsWith("\n"))
  34331. for (let i = 0; i < 4; i++)
  34332. this.space(true);
  34333. }
  34334. function constDeclarationIndent() {
  34335. this.token(",");
  34336. this.newline();
  34337. if (this.endsWith("\n"))
  34338. for (let i = 0; i < 6; i++)
  34339. this.space(true);
  34340. }
  34341. function VariableDeclaration(node, parent) {
  34342. if (node.declare) {
  34343. this.word("declare");
  34344. this.space();
  34345. }
  34346. this.word(node.kind);
  34347. this.space();
  34348. let hasInits = false;
  34349. if (!t2.isFor(parent)) {
  34350. for (const declar of node.declarations) {
  34351. if (declar.init) {
  34352. hasInits = true;
  34353. }
  34354. }
  34355. }
  34356. let separator;
  34357. if (hasInits) {
  34358. separator = node.kind === "const" ? constDeclarationIndent : variableDeclarationIndent;
  34359. }
  34360. this.printList(node.declarations, node, {
  34361. separator
  34362. });
  34363. if (t2.isFor(parent)) {
  34364. if (t2.isForStatement(parent)) {
  34365. if (parent.init === node)
  34366. return;
  34367. } else {
  34368. if (parent.left === node)
  34369. return;
  34370. }
  34371. }
  34372. this.semicolon();
  34373. }
  34374. function VariableDeclarator(node) {
  34375. this.print(node.id, node);
  34376. if (node.definite)
  34377. this.token("!");
  34378. this.print(node.id.typeAnnotation, node);
  34379. if (node.init) {
  34380. this.space();
  34381. this.token("=");
  34382. this.space();
  34383. this.print(node.init, node);
  34384. }
  34385. }
  34386. }
  34387. });
  34388. // node_modules/estree-to-babel/node_modules/@babel/generator/lib/generators/classes.js
  34389. var require_classes = __commonJS({
  34390. "node_modules/estree-to-babel/node_modules/@babel/generator/lib/generators/classes.js"(exports) {
  34391. "use strict";
  34392. Object.defineProperty(exports, "__esModule", {
  34393. value: true
  34394. });
  34395. exports.ClassExpression = exports.ClassDeclaration = ClassDeclaration;
  34396. exports.ClassBody = ClassBody;
  34397. exports.ClassProperty = ClassProperty;
  34398. exports.ClassPrivateProperty = ClassPrivateProperty;
  34399. exports.ClassMethod = ClassMethod;
  34400. exports.ClassPrivateMethod = ClassPrivateMethod;
  34401. exports._classMethodHead = _classMethodHead;
  34402. exports.StaticBlock = StaticBlock;
  34403. var t2 = require_lib4();
  34404. function ClassDeclaration(node, parent) {
  34405. if (!this.format.decoratorsBeforeExport || !t2.isExportDefaultDeclaration(parent) && !t2.isExportNamedDeclaration(parent)) {
  34406. this.printJoin(node.decorators, node);
  34407. }
  34408. if (node.declare) {
  34409. this.word("declare");
  34410. this.space();
  34411. }
  34412. if (node.abstract) {
  34413. this.word("abstract");
  34414. this.space();
  34415. }
  34416. this.word("class");
  34417. if (node.id) {
  34418. this.space();
  34419. this.print(node.id, node);
  34420. }
  34421. this.print(node.typeParameters, node);
  34422. if (node.superClass) {
  34423. this.space();
  34424. this.word("extends");
  34425. this.space();
  34426. this.print(node.superClass, node);
  34427. this.print(node.superTypeParameters, node);
  34428. }
  34429. if (node.implements) {
  34430. this.space();
  34431. this.word("implements");
  34432. this.space();
  34433. this.printList(node.implements, node);
  34434. }
  34435. this.space();
  34436. this.print(node.body, node);
  34437. }
  34438. function ClassBody(node) {
  34439. this.token("{");
  34440. this.printInnerComments(node);
  34441. if (node.body.length === 0) {
  34442. this.token("}");
  34443. } else {
  34444. this.newline();
  34445. this.indent();
  34446. this.printSequence(node.body, node);
  34447. this.dedent();
  34448. if (!this.endsWith("\n"))
  34449. this.newline();
  34450. this.rightBrace();
  34451. }
  34452. }
  34453. function ClassProperty(node) {
  34454. this.printJoin(node.decorators, node);
  34455. this.source("end", node.key.loc);
  34456. this.tsPrintClassMemberModifiers(node, true);
  34457. if (node.computed) {
  34458. this.token("[");
  34459. this.print(node.key, node);
  34460. this.token("]");
  34461. } else {
  34462. this._variance(node);
  34463. this.print(node.key, node);
  34464. }
  34465. if (node.optional) {
  34466. this.token("?");
  34467. }
  34468. if (node.definite) {
  34469. this.token("!");
  34470. }
  34471. this.print(node.typeAnnotation, node);
  34472. if (node.value) {
  34473. this.space();
  34474. this.token("=");
  34475. this.space();
  34476. this.print(node.value, node);
  34477. }
  34478. this.semicolon();
  34479. }
  34480. function ClassPrivateProperty(node) {
  34481. this.printJoin(node.decorators, node);
  34482. if (node.static) {
  34483. this.word("static");
  34484. this.space();
  34485. }
  34486. this.print(node.key, node);
  34487. this.print(node.typeAnnotation, node);
  34488. if (node.value) {
  34489. this.space();
  34490. this.token("=");
  34491. this.space();
  34492. this.print(node.value, node);
  34493. }
  34494. this.semicolon();
  34495. }
  34496. function ClassMethod(node) {
  34497. this._classMethodHead(node);
  34498. this.space();
  34499. this.print(node.body, node);
  34500. }
  34501. function ClassPrivateMethod(node) {
  34502. this._classMethodHead(node);
  34503. this.space();
  34504. this.print(node.body, node);
  34505. }
  34506. function _classMethodHead(node) {
  34507. this.printJoin(node.decorators, node);
  34508. this.source("end", node.key.loc);
  34509. this.tsPrintClassMemberModifiers(node, false);
  34510. this._methodHead(node);
  34511. }
  34512. function StaticBlock(node) {
  34513. this.word("static");
  34514. this.space();
  34515. this.token("{");
  34516. if (node.body.length === 0) {
  34517. this.token("}");
  34518. } else {
  34519. this.newline();
  34520. this.printSequence(node.body, node, {
  34521. indent: true
  34522. });
  34523. this.rightBrace();
  34524. }
  34525. }
  34526. }
  34527. });
  34528. // node_modules/estree-to-babel/node_modules/@babel/generator/lib/generators/methods.js
  34529. var require_methods = __commonJS({
  34530. "node_modules/estree-to-babel/node_modules/@babel/generator/lib/generators/methods.js"(exports) {
  34531. "use strict";
  34532. Object.defineProperty(exports, "__esModule", {
  34533. value: true
  34534. });
  34535. exports._params = _params;
  34536. exports._parameters = _parameters;
  34537. exports._param = _param;
  34538. exports._methodHead = _methodHead;
  34539. exports._predicate = _predicate;
  34540. exports._functionHead = _functionHead;
  34541. exports.FunctionDeclaration = exports.FunctionExpression = FunctionExpression;
  34542. exports.ArrowFunctionExpression = ArrowFunctionExpression;
  34543. var t2 = require_lib4();
  34544. function _params(node) {
  34545. this.print(node.typeParameters, node);
  34546. this.token("(");
  34547. this._parameters(node.params, node);
  34548. this.token(")");
  34549. this.print(node.returnType, node);
  34550. }
  34551. function _parameters(parameters, parent) {
  34552. for (let i = 0; i < parameters.length; i++) {
  34553. this._param(parameters[i], parent);
  34554. if (i < parameters.length - 1) {
  34555. this.token(",");
  34556. this.space();
  34557. }
  34558. }
  34559. }
  34560. function _param(parameter, parent) {
  34561. this.printJoin(parameter.decorators, parameter);
  34562. this.print(parameter, parent);
  34563. if (parameter.optional)
  34564. this.token("?");
  34565. this.print(parameter.typeAnnotation, parameter);
  34566. }
  34567. function _methodHead(node) {
  34568. const kind = node.kind;
  34569. const key = node.key;
  34570. if (kind === "get" || kind === "set") {
  34571. this.word(kind);
  34572. this.space();
  34573. }
  34574. if (node.async) {
  34575. this._catchUp("start", key.loc);
  34576. this.word("async");
  34577. this.space();
  34578. }
  34579. if (kind === "method" || kind === "init") {
  34580. if (node.generator) {
  34581. this.token("*");
  34582. }
  34583. }
  34584. if (node.computed) {
  34585. this.token("[");
  34586. this.print(key, node);
  34587. this.token("]");
  34588. } else {
  34589. this.print(key, node);
  34590. }
  34591. if (node.optional) {
  34592. this.token("?");
  34593. }
  34594. this._params(node);
  34595. }
  34596. function _predicate(node) {
  34597. if (node.predicate) {
  34598. if (!node.returnType) {
  34599. this.token(":");
  34600. }
  34601. this.space();
  34602. this.print(node.predicate, node);
  34603. }
  34604. }
  34605. function _functionHead(node) {
  34606. if (node.async) {
  34607. this.word("async");
  34608. this.space();
  34609. }
  34610. this.word("function");
  34611. if (node.generator)
  34612. this.token("*");
  34613. this.space();
  34614. if (node.id) {
  34615. this.print(node.id, node);
  34616. }
  34617. this._params(node);
  34618. this._predicate(node);
  34619. }
  34620. function FunctionExpression(node) {
  34621. this._functionHead(node);
  34622. this.space();
  34623. this.print(node.body, node);
  34624. }
  34625. function ArrowFunctionExpression(node) {
  34626. if (node.async) {
  34627. this.word("async");
  34628. this.space();
  34629. }
  34630. const firstParam = node.params[0];
  34631. if (!this.format.retainLines && !this.format.auxiliaryCommentBefore && !this.format.auxiliaryCommentAfter && node.params.length === 1 && t2.isIdentifier(firstParam) && !hasTypesOrComments(node, firstParam)) {
  34632. this.print(firstParam, node);
  34633. } else {
  34634. this._params(node);
  34635. }
  34636. this._predicate(node);
  34637. this.space();
  34638. this.token("=>");
  34639. this.space();
  34640. this.print(node.body, node);
  34641. }
  34642. function hasTypesOrComments(node, param) {
  34643. var _param$leadingComment, _param$trailingCommen;
  34644. return !!(node.typeParameters || node.returnType || node.predicate || param.typeAnnotation || param.optional || (_param$leadingComment = param.leadingComments) != null && _param$leadingComment.length || (_param$trailingCommen = param.trailingComments) != null && _param$trailingCommen.length);
  34645. }
  34646. }
  34647. });
  34648. // node_modules/estree-to-babel/node_modules/@babel/generator/lib/generators/modules.js
  34649. var require_modules = __commonJS({
  34650. "node_modules/estree-to-babel/node_modules/@babel/generator/lib/generators/modules.js"(exports) {
  34651. "use strict";
  34652. Object.defineProperty(exports, "__esModule", {
  34653. value: true
  34654. });
  34655. exports.ImportSpecifier = ImportSpecifier;
  34656. exports.ImportDefaultSpecifier = ImportDefaultSpecifier;
  34657. exports.ExportDefaultSpecifier = ExportDefaultSpecifier;
  34658. exports.ExportSpecifier = ExportSpecifier;
  34659. exports.ExportNamespaceSpecifier = ExportNamespaceSpecifier;
  34660. exports.ExportAllDeclaration = ExportAllDeclaration;
  34661. exports.ExportNamedDeclaration = ExportNamedDeclaration;
  34662. exports.ExportDefaultDeclaration = ExportDefaultDeclaration;
  34663. exports.ImportDeclaration = ImportDeclaration;
  34664. exports.ImportAttribute = ImportAttribute;
  34665. exports.ImportNamespaceSpecifier = ImportNamespaceSpecifier;
  34666. var t2 = require_lib4();
  34667. function ImportSpecifier(node) {
  34668. if (node.importKind === "type" || node.importKind === "typeof") {
  34669. this.word(node.importKind);
  34670. this.space();
  34671. }
  34672. this.print(node.imported, node);
  34673. if (node.local && node.local.name !== node.imported.name) {
  34674. this.space();
  34675. this.word("as");
  34676. this.space();
  34677. this.print(node.local, node);
  34678. }
  34679. }
  34680. function ImportDefaultSpecifier(node) {
  34681. this.print(node.local, node);
  34682. }
  34683. function ExportDefaultSpecifier(node) {
  34684. this.print(node.exported, node);
  34685. }
  34686. function ExportSpecifier(node) {
  34687. this.print(node.local, node);
  34688. if (node.exported && node.local.name !== node.exported.name) {
  34689. this.space();
  34690. this.word("as");
  34691. this.space();
  34692. this.print(node.exported, node);
  34693. }
  34694. }
  34695. function ExportNamespaceSpecifier(node) {
  34696. this.token("*");
  34697. this.space();
  34698. this.word("as");
  34699. this.space();
  34700. this.print(node.exported, node);
  34701. }
  34702. function ExportAllDeclaration(node) {
  34703. this.word("export");
  34704. this.space();
  34705. if (node.exportKind === "type") {
  34706. this.word("type");
  34707. this.space();
  34708. }
  34709. this.token("*");
  34710. this.space();
  34711. this.word("from");
  34712. this.space();
  34713. this.print(node.source, node);
  34714. this.printAssertions(node);
  34715. this.semicolon();
  34716. }
  34717. function ExportNamedDeclaration(node) {
  34718. if (this.format.decoratorsBeforeExport && t2.isClassDeclaration(node.declaration)) {
  34719. this.printJoin(node.declaration.decorators, node);
  34720. }
  34721. this.word("export");
  34722. this.space();
  34723. ExportDeclaration.apply(this, arguments);
  34724. }
  34725. function ExportDefaultDeclaration(node) {
  34726. if (this.format.decoratorsBeforeExport && t2.isClassDeclaration(node.declaration)) {
  34727. this.printJoin(node.declaration.decorators, node);
  34728. }
  34729. this.word("export");
  34730. this.space();
  34731. this.word("default");
  34732. this.space();
  34733. ExportDeclaration.apply(this, arguments);
  34734. }
  34735. function ExportDeclaration(node) {
  34736. if (node.declaration) {
  34737. const declar = node.declaration;
  34738. this.print(declar, node);
  34739. if (!t2.isStatement(declar))
  34740. this.semicolon();
  34741. } else {
  34742. if (node.exportKind === "type") {
  34743. this.word("type");
  34744. this.space();
  34745. }
  34746. const specifiers = node.specifiers.slice(0);
  34747. let hasSpecial = false;
  34748. for (; ; ) {
  34749. const first = specifiers[0];
  34750. if (t2.isExportDefaultSpecifier(first) || t2.isExportNamespaceSpecifier(first)) {
  34751. hasSpecial = true;
  34752. this.print(specifiers.shift(), node);
  34753. if (specifiers.length) {
  34754. this.token(",");
  34755. this.space();
  34756. }
  34757. } else {
  34758. break;
  34759. }
  34760. }
  34761. if (specifiers.length || !specifiers.length && !hasSpecial) {
  34762. this.token("{");
  34763. if (specifiers.length) {
  34764. this.space();
  34765. this.printList(specifiers, node);
  34766. this.space();
  34767. }
  34768. this.token("}");
  34769. }
  34770. if (node.source) {
  34771. this.space();
  34772. this.word("from");
  34773. this.space();
  34774. this.print(node.source, node);
  34775. this.printAssertions(node);
  34776. }
  34777. this.semicolon();
  34778. }
  34779. }
  34780. function ImportDeclaration(node) {
  34781. this.word("import");
  34782. this.space();
  34783. if (node.importKind === "type" || node.importKind === "typeof") {
  34784. this.word(node.importKind);
  34785. this.space();
  34786. }
  34787. const specifiers = node.specifiers.slice(0);
  34788. if (specifiers != null && specifiers.length) {
  34789. for (; ; ) {
  34790. const first = specifiers[0];
  34791. if (t2.isImportDefaultSpecifier(first) || t2.isImportNamespaceSpecifier(first)) {
  34792. this.print(specifiers.shift(), node);
  34793. if (specifiers.length) {
  34794. this.token(",");
  34795. this.space();
  34796. }
  34797. } else {
  34798. break;
  34799. }
  34800. }
  34801. if (specifiers.length) {
  34802. this.token("{");
  34803. this.space();
  34804. this.printList(specifiers, node);
  34805. this.space();
  34806. this.token("}");
  34807. }
  34808. this.space();
  34809. this.word("from");
  34810. this.space();
  34811. }
  34812. this.print(node.source, node);
  34813. this.printAssertions(node);
  34814. {
  34815. var _node$attributes;
  34816. if ((_node$attributes = node.attributes) != null && _node$attributes.length) {
  34817. this.space();
  34818. this.word("with");
  34819. this.space();
  34820. this.printList(node.attributes, node);
  34821. }
  34822. }
  34823. this.semicolon();
  34824. }
  34825. function ImportAttribute(node) {
  34826. this.print(node.key);
  34827. this.token(":");
  34828. this.space();
  34829. this.print(node.value);
  34830. }
  34831. function ImportNamespaceSpecifier(node) {
  34832. this.token("*");
  34833. this.space();
  34834. this.word("as");
  34835. this.space();
  34836. this.print(node.local, node);
  34837. }
  34838. }
  34839. });
  34840. // node_modules/jsesc/jsesc.js
  34841. var require_jsesc = __commonJS({
  34842. "node_modules/jsesc/jsesc.js"(exports, module) {
  34843. "use strict";
  34844. var object = {};
  34845. var hasOwnProperty3 = object.hasOwnProperty;
  34846. var forOwn = (object2, callback) => {
  34847. for (const key in object2) {
  34848. if (hasOwnProperty3.call(object2, key)) {
  34849. callback(key, object2[key]);
  34850. }
  34851. }
  34852. };
  34853. var extend3 = (destination, source) => {
  34854. if (!source) {
  34855. return destination;
  34856. }
  34857. forOwn(source, (key, value) => {
  34858. destination[key] = value;
  34859. });
  34860. return destination;
  34861. };
  34862. var forEach = (array, callback) => {
  34863. const length = array.length;
  34864. let index2 = -1;
  34865. while (++index2 < length) {
  34866. callback(array[index2]);
  34867. }
  34868. };
  34869. var toString3 = object.toString;
  34870. var isArray2 = Array.isArray;
  34871. var isBuffer2 = Buffer.isBuffer;
  34872. var isObject = (value) => {
  34873. return toString3.call(value) == "[object Object]";
  34874. };
  34875. var isString = (value) => {
  34876. return typeof value == "string" || toString3.call(value) == "[object String]";
  34877. };
  34878. var isNumber = (value) => {
  34879. return typeof value == "number" || toString3.call(value) == "[object Number]";
  34880. };
  34881. var isFunction = (value) => {
  34882. return typeof value == "function";
  34883. };
  34884. var isMap = (value) => {
  34885. return toString3.call(value) == "[object Map]";
  34886. };
  34887. var isSet = (value) => {
  34888. return toString3.call(value) == "[object Set]";
  34889. };
  34890. var singleEscapes = {
  34891. '"': '\\"',
  34892. "'": "\\'",
  34893. "\\": "\\\\",
  34894. "\b": "\\b",
  34895. "\f": "\\f",
  34896. "\n": "\\n",
  34897. "\r": "\\r",
  34898. " ": "\\t"
  34899. };
  34900. var regexSingleEscape = /["'\\\b\f\n\r\t]/;
  34901. var regexDigit = /[0-9]/;
  34902. var regexWhitelist = /[ !#-&\(-\[\]-_a-~]/;
  34903. var jsesc = (argument, options) => {
  34904. const increaseIndentation = () => {
  34905. oldIndent = indent;
  34906. ++options.indentLevel;
  34907. indent = options.indent.repeat(options.indentLevel);
  34908. };
  34909. const defaults = {
  34910. "escapeEverything": false,
  34911. "minimal": false,
  34912. "isScriptContext": false,
  34913. "quotes": "single",
  34914. "wrap": false,
  34915. "es6": false,
  34916. "json": false,
  34917. "compact": true,
  34918. "lowercaseHex": false,
  34919. "numbers": "decimal",
  34920. "indent": " ",
  34921. "indentLevel": 0,
  34922. "__inline1__": false,
  34923. "__inline2__": false
  34924. };
  34925. const json = options && options.json;
  34926. if (json) {
  34927. defaults.quotes = "double";
  34928. defaults.wrap = true;
  34929. }
  34930. options = extend3(defaults, options);
  34931. if (options.quotes != "single" && options.quotes != "double" && options.quotes != "backtick") {
  34932. options.quotes = "single";
  34933. }
  34934. const quote = options.quotes == "double" ? '"' : options.quotes == "backtick" ? "`" : "'";
  34935. const compact = options.compact;
  34936. const lowercaseHex = options.lowercaseHex;
  34937. let indent = options.indent.repeat(options.indentLevel);
  34938. let oldIndent = "";
  34939. const inline1 = options.__inline1__;
  34940. const inline2 = options.__inline2__;
  34941. const newLine = compact ? "" : "\n";
  34942. let result;
  34943. let isEmpty = true;
  34944. const useBinNumbers = options.numbers == "binary";
  34945. const useOctNumbers = options.numbers == "octal";
  34946. const useDecNumbers = options.numbers == "decimal";
  34947. const useHexNumbers = options.numbers == "hexadecimal";
  34948. if (json && argument && isFunction(argument.toJSON)) {
  34949. argument = argument.toJSON();
  34950. }
  34951. if (!isString(argument)) {
  34952. if (isMap(argument)) {
  34953. if (argument.size == 0) {
  34954. return "new Map()";
  34955. }
  34956. if (!compact) {
  34957. options.__inline1__ = true;
  34958. options.__inline2__ = false;
  34959. }
  34960. return "new Map(" + jsesc(Array.from(argument), options) + ")";
  34961. }
  34962. if (isSet(argument)) {
  34963. if (argument.size == 0) {
  34964. return "new Set()";
  34965. }
  34966. return "new Set(" + jsesc(Array.from(argument), options) + ")";
  34967. }
  34968. if (isBuffer2(argument)) {
  34969. if (argument.length == 0) {
  34970. return "Buffer.from([])";
  34971. }
  34972. return "Buffer.from(" + jsesc(Array.from(argument), options) + ")";
  34973. }
  34974. if (isArray2(argument)) {
  34975. result = [];
  34976. options.wrap = true;
  34977. if (inline1) {
  34978. options.__inline1__ = false;
  34979. options.__inline2__ = true;
  34980. }
  34981. if (!inline2) {
  34982. increaseIndentation();
  34983. }
  34984. forEach(argument, (value) => {
  34985. isEmpty = false;
  34986. if (inline2) {
  34987. options.__inline2__ = false;
  34988. }
  34989. result.push(
  34990. (compact || inline2 ? "" : indent) + jsesc(value, options)
  34991. );
  34992. });
  34993. if (isEmpty) {
  34994. return "[]";
  34995. }
  34996. if (inline2) {
  34997. return "[" + result.join(", ") + "]";
  34998. }
  34999. return "[" + newLine + result.join("," + newLine) + newLine + (compact ? "" : oldIndent) + "]";
  35000. } else if (isNumber(argument)) {
  35001. if (json) {
  35002. return JSON.stringify(argument);
  35003. }
  35004. if (useDecNumbers) {
  35005. return String(argument);
  35006. }
  35007. if (useHexNumbers) {
  35008. let hexadecimal = argument.toString(16);
  35009. if (!lowercaseHex) {
  35010. hexadecimal = hexadecimal.toUpperCase();
  35011. }
  35012. return "0x" + hexadecimal;
  35013. }
  35014. if (useBinNumbers) {
  35015. return "0b" + argument.toString(2);
  35016. }
  35017. if (useOctNumbers) {
  35018. return "0o" + argument.toString(8);
  35019. }
  35020. } else if (!isObject(argument)) {
  35021. if (json) {
  35022. return JSON.stringify(argument) || "null";
  35023. }
  35024. return String(argument);
  35025. } else {
  35026. result = [];
  35027. options.wrap = true;
  35028. increaseIndentation();
  35029. forOwn(argument, (key, value) => {
  35030. isEmpty = false;
  35031. result.push(
  35032. (compact ? "" : indent) + jsesc(key, options) + ":" + (compact ? "" : " ") + jsesc(value, options)
  35033. );
  35034. });
  35035. if (isEmpty) {
  35036. return "{}";
  35037. }
  35038. return "{" + newLine + result.join("," + newLine) + newLine + (compact ? "" : oldIndent) + "}";
  35039. }
  35040. }
  35041. const string3 = argument;
  35042. let index2 = -1;
  35043. const length = string3.length;
  35044. result = "";
  35045. while (++index2 < length) {
  35046. const character = string3.charAt(index2);
  35047. if (options.es6) {
  35048. const first = string3.charCodeAt(index2);
  35049. if (first >= 55296 && first <= 56319 && length > index2 + 1) {
  35050. const second = string3.charCodeAt(index2 + 1);
  35051. if (second >= 56320 && second <= 57343) {
  35052. const codePoint = (first - 55296) * 1024 + second - 56320 + 65536;
  35053. let hexadecimal2 = codePoint.toString(16);
  35054. if (!lowercaseHex) {
  35055. hexadecimal2 = hexadecimal2.toUpperCase();
  35056. }
  35057. result += "\\u{" + hexadecimal2 + "}";
  35058. ++index2;
  35059. continue;
  35060. }
  35061. }
  35062. }
  35063. if (!options.escapeEverything) {
  35064. if (regexWhitelist.test(character)) {
  35065. result += character;
  35066. continue;
  35067. }
  35068. if (character == '"') {
  35069. result += quote == character ? '\\"' : character;
  35070. continue;
  35071. }
  35072. if (character == "`") {
  35073. result += quote == character ? "\\`" : character;
  35074. continue;
  35075. }
  35076. if (character == "'") {
  35077. result += quote == character ? "\\'" : character;
  35078. continue;
  35079. }
  35080. }
  35081. if (character == "\0" && !json && !regexDigit.test(string3.charAt(index2 + 1))) {
  35082. result += "\\0";
  35083. continue;
  35084. }
  35085. if (regexSingleEscape.test(character)) {
  35086. result += singleEscapes[character];
  35087. continue;
  35088. }
  35089. const charCode = character.charCodeAt(0);
  35090. if (options.minimal && charCode != 8232 && charCode != 8233) {
  35091. result += character;
  35092. continue;
  35093. }
  35094. let hexadecimal = charCode.toString(16);
  35095. if (!lowercaseHex) {
  35096. hexadecimal = hexadecimal.toUpperCase();
  35097. }
  35098. const longhand = hexadecimal.length > 2 || json;
  35099. const escaped = "\\" + (longhand ? "u" : "x") + ("0000" + hexadecimal).slice(longhand ? -4 : -2);
  35100. result += escaped;
  35101. continue;
  35102. }
  35103. if (options.wrap) {
  35104. result = quote + result + quote;
  35105. }
  35106. if (quote == "`") {
  35107. result = result.replace(/\$\{/g, "\\${");
  35108. }
  35109. if (options.isScriptContext) {
  35110. return result.replace(/<\/(script|style)/gi, "<\\/$1").replace(/<!--/g, json ? "\\u003C!--" : "\\x3C!--");
  35111. }
  35112. return result;
  35113. };
  35114. jsesc.version = "2.5.2";
  35115. module.exports = jsesc;
  35116. }
  35117. });
  35118. // node_modules/estree-to-babel/node_modules/@babel/generator/lib/generators/types.js
  35119. var require_types = __commonJS({
  35120. "node_modules/estree-to-babel/node_modules/@babel/generator/lib/generators/types.js"(exports) {
  35121. "use strict";
  35122. Object.defineProperty(exports, "__esModule", {
  35123. value: true
  35124. });
  35125. exports.Identifier = Identifier;
  35126. exports.ArgumentPlaceholder = ArgumentPlaceholder;
  35127. exports.SpreadElement = exports.RestElement = RestElement2;
  35128. exports.ObjectPattern = exports.ObjectExpression = ObjectExpression;
  35129. exports.ObjectMethod = ObjectMethod;
  35130. exports.ObjectProperty = ObjectProperty;
  35131. exports.ArrayPattern = exports.ArrayExpression = ArrayExpression2;
  35132. exports.RecordExpression = RecordExpression;
  35133. exports.TupleExpression = TupleExpression;
  35134. exports.RegExpLiteral = RegExpLiteral;
  35135. exports.BooleanLiteral = BooleanLiteral;
  35136. exports.NullLiteral = NullLiteral;
  35137. exports.NumericLiteral = NumericLiteral;
  35138. exports.StringLiteral = StringLiteral;
  35139. exports.BigIntLiteral = BigIntLiteral;
  35140. exports.DecimalLiteral = DecimalLiteral;
  35141. exports.PipelineTopicExpression = PipelineTopicExpression;
  35142. exports.PipelineBareFunction = PipelineBareFunction;
  35143. exports.PipelinePrimaryTopicReference = PipelinePrimaryTopicReference;
  35144. var t2 = require_lib4();
  35145. var _jsesc = require_jsesc();
  35146. function Identifier(node) {
  35147. this.exactSource(node.loc, () => {
  35148. this.word(node.name);
  35149. });
  35150. }
  35151. function ArgumentPlaceholder() {
  35152. this.token("?");
  35153. }
  35154. function RestElement2(node) {
  35155. this.token("...");
  35156. this.print(node.argument, node);
  35157. }
  35158. function ObjectExpression(node) {
  35159. const props = node.properties;
  35160. this.token("{");
  35161. this.printInnerComments(node);
  35162. if (props.length) {
  35163. this.space();
  35164. this.printList(props, node, {
  35165. indent: true,
  35166. statement: true
  35167. });
  35168. this.space();
  35169. }
  35170. this.token("}");
  35171. }
  35172. function ObjectMethod(node) {
  35173. this.printJoin(node.decorators, node);
  35174. this._methodHead(node);
  35175. this.space();
  35176. this.print(node.body, node);
  35177. }
  35178. function ObjectProperty(node) {
  35179. this.printJoin(node.decorators, node);
  35180. if (node.computed) {
  35181. this.token("[");
  35182. this.print(node.key, node);
  35183. this.token("]");
  35184. } else {
  35185. if (t2.isAssignmentPattern(node.value) && t2.isIdentifier(node.key) && node.key.name === node.value.left.name) {
  35186. this.print(node.value, node);
  35187. return;
  35188. }
  35189. this.print(node.key, node);
  35190. if (node.shorthand && t2.isIdentifier(node.key) && t2.isIdentifier(node.value) && node.key.name === node.value.name) {
  35191. return;
  35192. }
  35193. }
  35194. this.token(":");
  35195. this.space();
  35196. this.print(node.value, node);
  35197. }
  35198. function ArrayExpression2(node) {
  35199. const elems = node.elements;
  35200. const len = elems.length;
  35201. this.token("[");
  35202. this.printInnerComments(node);
  35203. for (let i = 0; i < elems.length; i++) {
  35204. const elem = elems[i];
  35205. if (elem) {
  35206. if (i > 0)
  35207. this.space();
  35208. this.print(elem, node);
  35209. if (i < len - 1)
  35210. this.token(",");
  35211. } else {
  35212. this.token(",");
  35213. }
  35214. }
  35215. this.token("]");
  35216. }
  35217. function RecordExpression(node) {
  35218. const props = node.properties;
  35219. let startToken;
  35220. let endToken;
  35221. if (this.format.recordAndTupleSyntaxType === "bar") {
  35222. startToken = "{|";
  35223. endToken = "|}";
  35224. } else if (this.format.recordAndTupleSyntaxType === "hash") {
  35225. startToken = "#{";
  35226. endToken = "}";
  35227. } else {
  35228. throw new Error(`The "recordAndTupleSyntaxType" generator option must be "bar" or "hash" (${JSON.stringify(this.format.recordAndTupleSyntaxType)} received).`);
  35229. }
  35230. this.token(startToken);
  35231. this.printInnerComments(node);
  35232. if (props.length) {
  35233. this.space();
  35234. this.printList(props, node, {
  35235. indent: true,
  35236. statement: true
  35237. });
  35238. this.space();
  35239. }
  35240. this.token(endToken);
  35241. }
  35242. function TupleExpression(node) {
  35243. const elems = node.elements;
  35244. const len = elems.length;
  35245. let startToken;
  35246. let endToken;
  35247. if (this.format.recordAndTupleSyntaxType === "bar") {
  35248. startToken = "[|";
  35249. endToken = "|]";
  35250. } else if (this.format.recordAndTupleSyntaxType === "hash") {
  35251. startToken = "#[";
  35252. endToken = "]";
  35253. } else {
  35254. throw new Error(`${this.format.recordAndTupleSyntaxType} is not a valid recordAndTuple syntax type`);
  35255. }
  35256. this.token(startToken);
  35257. this.printInnerComments(node);
  35258. for (let i = 0; i < elems.length; i++) {
  35259. const elem = elems[i];
  35260. if (elem) {
  35261. if (i > 0)
  35262. this.space();
  35263. this.print(elem, node);
  35264. if (i < len - 1)
  35265. this.token(",");
  35266. }
  35267. }
  35268. this.token(endToken);
  35269. }
  35270. function RegExpLiteral(node) {
  35271. this.word(`/${node.pattern}/${node.flags}`);
  35272. }
  35273. function BooleanLiteral(node) {
  35274. this.word(node.value ? "true" : "false");
  35275. }
  35276. function NullLiteral() {
  35277. this.word("null");
  35278. }
  35279. function NumericLiteral(node) {
  35280. const raw = this.getPossibleRaw(node);
  35281. const opts = this.format.jsescOption;
  35282. const value = node.value + "";
  35283. if (opts.numbers) {
  35284. this.number(_jsesc(node.value, opts));
  35285. } else if (raw == null) {
  35286. this.number(value);
  35287. } else if (this.format.minified) {
  35288. this.number(raw.length < value.length ? raw : value);
  35289. } else {
  35290. this.number(raw);
  35291. }
  35292. }
  35293. function StringLiteral(node) {
  35294. const raw = this.getPossibleRaw(node);
  35295. if (!this.format.minified && raw != null) {
  35296. this.token(raw);
  35297. return;
  35298. }
  35299. const val = _jsesc(node.value, Object.assign(this.format.jsescOption, this.format.jsonCompatibleStrings && {
  35300. json: true
  35301. }));
  35302. return this.token(val);
  35303. }
  35304. function BigIntLiteral(node) {
  35305. const raw = this.getPossibleRaw(node);
  35306. if (!this.format.minified && raw != null) {
  35307. this.word(raw);
  35308. return;
  35309. }
  35310. this.word(node.value + "n");
  35311. }
  35312. function DecimalLiteral(node) {
  35313. const raw = this.getPossibleRaw(node);
  35314. if (!this.format.minified && raw != null) {
  35315. this.word(raw);
  35316. return;
  35317. }
  35318. this.word(node.value + "m");
  35319. }
  35320. function PipelineTopicExpression(node) {
  35321. this.print(node.expression, node);
  35322. }
  35323. function PipelineBareFunction(node) {
  35324. this.print(node.callee, node);
  35325. }
  35326. function PipelinePrimaryTopicReference() {
  35327. this.token("#");
  35328. }
  35329. }
  35330. });
  35331. // node_modules/estree-to-babel/node_modules/@babel/generator/lib/generators/flow.js
  35332. var require_flow3 = __commonJS({
  35333. "node_modules/estree-to-babel/node_modules/@babel/generator/lib/generators/flow.js"(exports) {
  35334. "use strict";
  35335. Object.defineProperty(exports, "__esModule", {
  35336. value: true
  35337. });
  35338. exports.AnyTypeAnnotation = AnyTypeAnnotation;
  35339. exports.ArrayTypeAnnotation = ArrayTypeAnnotation;
  35340. exports.BooleanTypeAnnotation = BooleanTypeAnnotation;
  35341. exports.BooleanLiteralTypeAnnotation = BooleanLiteralTypeAnnotation;
  35342. exports.NullLiteralTypeAnnotation = NullLiteralTypeAnnotation;
  35343. exports.DeclareClass = DeclareClass;
  35344. exports.DeclareFunction = DeclareFunction;
  35345. exports.InferredPredicate = InferredPredicate;
  35346. exports.DeclaredPredicate = DeclaredPredicate;
  35347. exports.DeclareInterface = DeclareInterface;
  35348. exports.DeclareModule = DeclareModule;
  35349. exports.DeclareModuleExports = DeclareModuleExports;
  35350. exports.DeclareTypeAlias = DeclareTypeAlias;
  35351. exports.DeclareOpaqueType = DeclareOpaqueType;
  35352. exports.DeclareVariable = DeclareVariable;
  35353. exports.DeclareExportDeclaration = DeclareExportDeclaration;
  35354. exports.DeclareExportAllDeclaration = DeclareExportAllDeclaration;
  35355. exports.EnumDeclaration = EnumDeclaration;
  35356. exports.EnumBooleanBody = EnumBooleanBody;
  35357. exports.EnumNumberBody = EnumNumberBody;
  35358. exports.EnumStringBody = EnumStringBody;
  35359. exports.EnumSymbolBody = EnumSymbolBody;
  35360. exports.EnumDefaultedMember = EnumDefaultedMember;
  35361. exports.EnumBooleanMember = EnumBooleanMember;
  35362. exports.EnumNumberMember = EnumNumberMember;
  35363. exports.EnumStringMember = EnumStringMember;
  35364. exports.ExistsTypeAnnotation = ExistsTypeAnnotation;
  35365. exports.FunctionTypeAnnotation = FunctionTypeAnnotation;
  35366. exports.FunctionTypeParam = FunctionTypeParam;
  35367. exports.GenericTypeAnnotation = exports.ClassImplements = exports.InterfaceExtends = InterfaceExtends;
  35368. exports._interfaceish = _interfaceish;
  35369. exports._variance = _variance;
  35370. exports.InterfaceDeclaration = InterfaceDeclaration;
  35371. exports.InterfaceTypeAnnotation = InterfaceTypeAnnotation;
  35372. exports.IntersectionTypeAnnotation = IntersectionTypeAnnotation;
  35373. exports.MixedTypeAnnotation = MixedTypeAnnotation;
  35374. exports.EmptyTypeAnnotation = EmptyTypeAnnotation;
  35375. exports.NullableTypeAnnotation = NullableTypeAnnotation;
  35376. exports.NumberTypeAnnotation = NumberTypeAnnotation;
  35377. exports.StringTypeAnnotation = StringTypeAnnotation;
  35378. exports.ThisTypeAnnotation = ThisTypeAnnotation;
  35379. exports.TupleTypeAnnotation = TupleTypeAnnotation;
  35380. exports.TypeofTypeAnnotation = TypeofTypeAnnotation;
  35381. exports.TypeAlias = TypeAlias;
  35382. exports.TypeAnnotation = TypeAnnotation;
  35383. exports.TypeParameterDeclaration = exports.TypeParameterInstantiation = TypeParameterInstantiation;
  35384. exports.TypeParameter = TypeParameter;
  35385. exports.OpaqueType = OpaqueType;
  35386. exports.ObjectTypeAnnotation = ObjectTypeAnnotation;
  35387. exports.ObjectTypeInternalSlot = ObjectTypeInternalSlot;
  35388. exports.ObjectTypeCallProperty = ObjectTypeCallProperty;
  35389. exports.ObjectTypeIndexer = ObjectTypeIndexer;
  35390. exports.ObjectTypeProperty = ObjectTypeProperty;
  35391. exports.ObjectTypeSpreadProperty = ObjectTypeSpreadProperty;
  35392. exports.QualifiedTypeIdentifier = QualifiedTypeIdentifier;
  35393. exports.SymbolTypeAnnotation = SymbolTypeAnnotation;
  35394. exports.UnionTypeAnnotation = UnionTypeAnnotation;
  35395. exports.TypeCastExpression = TypeCastExpression;
  35396. exports.Variance = Variance;
  35397. exports.VoidTypeAnnotation = VoidTypeAnnotation;
  35398. exports.IndexedAccessType = IndexedAccessType;
  35399. exports.OptionalIndexedAccessType = OptionalIndexedAccessType;
  35400. Object.defineProperty(exports, "NumberLiteralTypeAnnotation", {
  35401. enumerable: true,
  35402. get: function() {
  35403. return _types2.NumericLiteral;
  35404. }
  35405. });
  35406. Object.defineProperty(exports, "StringLiteralTypeAnnotation", {
  35407. enumerable: true,
  35408. get: function() {
  35409. return _types2.StringLiteral;
  35410. }
  35411. });
  35412. var t2 = require_lib4();
  35413. var _modules = require_modules();
  35414. var _types2 = require_types();
  35415. function AnyTypeAnnotation() {
  35416. this.word("any");
  35417. }
  35418. function ArrayTypeAnnotation(node) {
  35419. this.print(node.elementType, node);
  35420. this.token("[");
  35421. this.token("]");
  35422. }
  35423. function BooleanTypeAnnotation() {
  35424. this.word("boolean");
  35425. }
  35426. function BooleanLiteralTypeAnnotation(node) {
  35427. this.word(node.value ? "true" : "false");
  35428. }
  35429. function NullLiteralTypeAnnotation() {
  35430. this.word("null");
  35431. }
  35432. function DeclareClass(node, parent) {
  35433. if (!t2.isDeclareExportDeclaration(parent)) {
  35434. this.word("declare");
  35435. this.space();
  35436. }
  35437. this.word("class");
  35438. this.space();
  35439. this._interfaceish(node);
  35440. }
  35441. function DeclareFunction(node, parent) {
  35442. if (!t2.isDeclareExportDeclaration(parent)) {
  35443. this.word("declare");
  35444. this.space();
  35445. }
  35446. this.word("function");
  35447. this.space();
  35448. this.print(node.id, node);
  35449. this.print(node.id.typeAnnotation.typeAnnotation, node);
  35450. if (node.predicate) {
  35451. this.space();
  35452. this.print(node.predicate, node);
  35453. }
  35454. this.semicolon();
  35455. }
  35456. function InferredPredicate() {
  35457. this.token("%");
  35458. this.word("checks");
  35459. }
  35460. function DeclaredPredicate(node) {
  35461. this.token("%");
  35462. this.word("checks");
  35463. this.token("(");
  35464. this.print(node.value, node);
  35465. this.token(")");
  35466. }
  35467. function DeclareInterface(node) {
  35468. this.word("declare");
  35469. this.space();
  35470. this.InterfaceDeclaration(node);
  35471. }
  35472. function DeclareModule(node) {
  35473. this.word("declare");
  35474. this.space();
  35475. this.word("module");
  35476. this.space();
  35477. this.print(node.id, node);
  35478. this.space();
  35479. this.print(node.body, node);
  35480. }
  35481. function DeclareModuleExports(node) {
  35482. this.word("declare");
  35483. this.space();
  35484. this.word("module");
  35485. this.token(".");
  35486. this.word("exports");
  35487. this.print(node.typeAnnotation, node);
  35488. }
  35489. function DeclareTypeAlias(node) {
  35490. this.word("declare");
  35491. this.space();
  35492. this.TypeAlias(node);
  35493. }
  35494. function DeclareOpaqueType(node, parent) {
  35495. if (!t2.isDeclareExportDeclaration(parent)) {
  35496. this.word("declare");
  35497. this.space();
  35498. }
  35499. this.OpaqueType(node);
  35500. }
  35501. function DeclareVariable(node, parent) {
  35502. if (!t2.isDeclareExportDeclaration(parent)) {
  35503. this.word("declare");
  35504. this.space();
  35505. }
  35506. this.word("var");
  35507. this.space();
  35508. this.print(node.id, node);
  35509. this.print(node.id.typeAnnotation, node);
  35510. this.semicolon();
  35511. }
  35512. function DeclareExportDeclaration(node) {
  35513. this.word("declare");
  35514. this.space();
  35515. this.word("export");
  35516. this.space();
  35517. if (node.default) {
  35518. this.word("default");
  35519. this.space();
  35520. }
  35521. FlowExportDeclaration.apply(this, arguments);
  35522. }
  35523. function DeclareExportAllDeclaration() {
  35524. this.word("declare");
  35525. this.space();
  35526. _modules.ExportAllDeclaration.apply(this, arguments);
  35527. }
  35528. function EnumDeclaration(node) {
  35529. const {
  35530. id,
  35531. body
  35532. } = node;
  35533. this.word("enum");
  35534. this.space();
  35535. this.print(id, node);
  35536. this.print(body, node);
  35537. }
  35538. function enumExplicitType(context, name2, hasExplicitType) {
  35539. if (hasExplicitType) {
  35540. context.space();
  35541. context.word("of");
  35542. context.space();
  35543. context.word(name2);
  35544. }
  35545. context.space();
  35546. }
  35547. function enumBody(context, node) {
  35548. const {
  35549. members
  35550. } = node;
  35551. context.token("{");
  35552. context.indent();
  35553. context.newline();
  35554. for (const member of members) {
  35555. context.print(member, node);
  35556. context.newline();
  35557. }
  35558. if (node.hasUnknownMembers) {
  35559. context.token("...");
  35560. context.newline();
  35561. }
  35562. context.dedent();
  35563. context.token("}");
  35564. }
  35565. function EnumBooleanBody(node) {
  35566. const {
  35567. explicitType
  35568. } = node;
  35569. enumExplicitType(this, "boolean", explicitType);
  35570. enumBody(this, node);
  35571. }
  35572. function EnumNumberBody(node) {
  35573. const {
  35574. explicitType
  35575. } = node;
  35576. enumExplicitType(this, "number", explicitType);
  35577. enumBody(this, node);
  35578. }
  35579. function EnumStringBody(node) {
  35580. const {
  35581. explicitType
  35582. } = node;
  35583. enumExplicitType(this, "string", explicitType);
  35584. enumBody(this, node);
  35585. }
  35586. function EnumSymbolBody(node) {
  35587. enumExplicitType(this, "symbol", true);
  35588. enumBody(this, node);
  35589. }
  35590. function EnumDefaultedMember(node) {
  35591. const {
  35592. id
  35593. } = node;
  35594. this.print(id, node);
  35595. this.token(",");
  35596. }
  35597. function enumInitializedMember(context, node) {
  35598. const {
  35599. id,
  35600. init
  35601. } = node;
  35602. context.print(id, node);
  35603. context.space();
  35604. context.token("=");
  35605. context.space();
  35606. context.print(init, node);
  35607. context.token(",");
  35608. }
  35609. function EnumBooleanMember(node) {
  35610. enumInitializedMember(this, node);
  35611. }
  35612. function EnumNumberMember(node) {
  35613. enumInitializedMember(this, node);
  35614. }
  35615. function EnumStringMember(node) {
  35616. enumInitializedMember(this, node);
  35617. }
  35618. function FlowExportDeclaration(node) {
  35619. if (node.declaration) {
  35620. const declar = node.declaration;
  35621. this.print(declar, node);
  35622. if (!t2.isStatement(declar))
  35623. this.semicolon();
  35624. } else {
  35625. this.token("{");
  35626. if (node.specifiers.length) {
  35627. this.space();
  35628. this.printList(node.specifiers, node);
  35629. this.space();
  35630. }
  35631. this.token("}");
  35632. if (node.source) {
  35633. this.space();
  35634. this.word("from");
  35635. this.space();
  35636. this.print(node.source, node);
  35637. }
  35638. this.semicolon();
  35639. }
  35640. }
  35641. function ExistsTypeAnnotation() {
  35642. this.token("*");
  35643. }
  35644. function FunctionTypeAnnotation(node, parent) {
  35645. this.print(node.typeParameters, node);
  35646. this.token("(");
  35647. if (node.this) {
  35648. this.word("this");
  35649. this.token(":");
  35650. this.space();
  35651. this.print(node.this.typeAnnotation, node);
  35652. if (node.params.length || node.rest) {
  35653. this.token(",");
  35654. this.space();
  35655. }
  35656. }
  35657. this.printList(node.params, node);
  35658. if (node.rest) {
  35659. if (node.params.length) {
  35660. this.token(",");
  35661. this.space();
  35662. }
  35663. this.token("...");
  35664. this.print(node.rest, node);
  35665. }
  35666. this.token(")");
  35667. if (parent.type === "ObjectTypeCallProperty" || parent.type === "DeclareFunction" || parent.type === "ObjectTypeProperty" && parent.method) {
  35668. this.token(":");
  35669. } else {
  35670. this.space();
  35671. this.token("=>");
  35672. }
  35673. this.space();
  35674. this.print(node.returnType, node);
  35675. }
  35676. function FunctionTypeParam(node) {
  35677. this.print(node.name, node);
  35678. if (node.optional)
  35679. this.token("?");
  35680. if (node.name) {
  35681. this.token(":");
  35682. this.space();
  35683. }
  35684. this.print(node.typeAnnotation, node);
  35685. }
  35686. function InterfaceExtends(node) {
  35687. this.print(node.id, node);
  35688. this.print(node.typeParameters, node);
  35689. }
  35690. function _interfaceish(node) {
  35691. var _node$extends;
  35692. this.print(node.id, node);
  35693. this.print(node.typeParameters, node);
  35694. if ((_node$extends = node.extends) != null && _node$extends.length) {
  35695. this.space();
  35696. this.word("extends");
  35697. this.space();
  35698. this.printList(node.extends, node);
  35699. }
  35700. if (node.mixins && node.mixins.length) {
  35701. this.space();
  35702. this.word("mixins");
  35703. this.space();
  35704. this.printList(node.mixins, node);
  35705. }
  35706. if (node.implements && node.implements.length) {
  35707. this.space();
  35708. this.word("implements");
  35709. this.space();
  35710. this.printList(node.implements, node);
  35711. }
  35712. this.space();
  35713. this.print(node.body, node);
  35714. }
  35715. function _variance(node) {
  35716. if (node.variance) {
  35717. if (node.variance.kind === "plus") {
  35718. this.token("+");
  35719. } else if (node.variance.kind === "minus") {
  35720. this.token("-");
  35721. }
  35722. }
  35723. }
  35724. function InterfaceDeclaration(node) {
  35725. this.word("interface");
  35726. this.space();
  35727. this._interfaceish(node);
  35728. }
  35729. function andSeparator() {
  35730. this.space();
  35731. this.token("&");
  35732. this.space();
  35733. }
  35734. function InterfaceTypeAnnotation(node) {
  35735. this.word("interface");
  35736. if (node.extends && node.extends.length) {
  35737. this.space();
  35738. this.word("extends");
  35739. this.space();
  35740. this.printList(node.extends, node);
  35741. }
  35742. this.space();
  35743. this.print(node.body, node);
  35744. }
  35745. function IntersectionTypeAnnotation(node) {
  35746. this.printJoin(node.types, node, {
  35747. separator: andSeparator
  35748. });
  35749. }
  35750. function MixedTypeAnnotation() {
  35751. this.word("mixed");
  35752. }
  35753. function EmptyTypeAnnotation() {
  35754. this.word("empty");
  35755. }
  35756. function NullableTypeAnnotation(node) {
  35757. this.token("?");
  35758. this.print(node.typeAnnotation, node);
  35759. }
  35760. function NumberTypeAnnotation() {
  35761. this.word("number");
  35762. }
  35763. function StringTypeAnnotation() {
  35764. this.word("string");
  35765. }
  35766. function ThisTypeAnnotation() {
  35767. this.word("this");
  35768. }
  35769. function TupleTypeAnnotation(node) {
  35770. this.token("[");
  35771. this.printList(node.types, node);
  35772. this.token("]");
  35773. }
  35774. function TypeofTypeAnnotation(node) {
  35775. this.word("typeof");
  35776. this.space();
  35777. this.print(node.argument, node);
  35778. }
  35779. function TypeAlias(node) {
  35780. this.word("type");
  35781. this.space();
  35782. this.print(node.id, node);
  35783. this.print(node.typeParameters, node);
  35784. this.space();
  35785. this.token("=");
  35786. this.space();
  35787. this.print(node.right, node);
  35788. this.semicolon();
  35789. }
  35790. function TypeAnnotation(node) {
  35791. this.token(":");
  35792. this.space();
  35793. if (node.optional)
  35794. this.token("?");
  35795. this.print(node.typeAnnotation, node);
  35796. }
  35797. function TypeParameterInstantiation(node) {
  35798. this.token("<");
  35799. this.printList(node.params, node, {});
  35800. this.token(">");
  35801. }
  35802. function TypeParameter(node) {
  35803. this._variance(node);
  35804. this.word(node.name);
  35805. if (node.bound) {
  35806. this.print(node.bound, node);
  35807. }
  35808. if (node.default) {
  35809. this.space();
  35810. this.token("=");
  35811. this.space();
  35812. this.print(node.default, node);
  35813. }
  35814. }
  35815. function OpaqueType(node) {
  35816. this.word("opaque");
  35817. this.space();
  35818. this.word("type");
  35819. this.space();
  35820. this.print(node.id, node);
  35821. this.print(node.typeParameters, node);
  35822. if (node.supertype) {
  35823. this.token(":");
  35824. this.space();
  35825. this.print(node.supertype, node);
  35826. }
  35827. if (node.impltype) {
  35828. this.space();
  35829. this.token("=");
  35830. this.space();
  35831. this.print(node.impltype, node);
  35832. }
  35833. this.semicolon();
  35834. }
  35835. function ObjectTypeAnnotation(node) {
  35836. if (node.exact) {
  35837. this.token("{|");
  35838. } else {
  35839. this.token("{");
  35840. }
  35841. const props = [...node.properties, ...node.callProperties || [], ...node.indexers || [], ...node.internalSlots || []];
  35842. if (props.length) {
  35843. this.space();
  35844. this.printJoin(props, node, {
  35845. addNewlines(leading) {
  35846. if (leading && !props[0])
  35847. return 1;
  35848. },
  35849. indent: true,
  35850. statement: true,
  35851. iterator: () => {
  35852. if (props.length !== 1 || node.inexact) {
  35853. this.token(",");
  35854. this.space();
  35855. }
  35856. }
  35857. });
  35858. this.space();
  35859. }
  35860. if (node.inexact) {
  35861. this.indent();
  35862. this.token("...");
  35863. if (props.length) {
  35864. this.newline();
  35865. }
  35866. this.dedent();
  35867. }
  35868. if (node.exact) {
  35869. this.token("|}");
  35870. } else {
  35871. this.token("}");
  35872. }
  35873. }
  35874. function ObjectTypeInternalSlot(node) {
  35875. if (node.static) {
  35876. this.word("static");
  35877. this.space();
  35878. }
  35879. this.token("[");
  35880. this.token("[");
  35881. this.print(node.id, node);
  35882. this.token("]");
  35883. this.token("]");
  35884. if (node.optional)
  35885. this.token("?");
  35886. if (!node.method) {
  35887. this.token(":");
  35888. this.space();
  35889. }
  35890. this.print(node.value, node);
  35891. }
  35892. function ObjectTypeCallProperty(node) {
  35893. if (node.static) {
  35894. this.word("static");
  35895. this.space();
  35896. }
  35897. this.print(node.value, node);
  35898. }
  35899. function ObjectTypeIndexer(node) {
  35900. if (node.static) {
  35901. this.word("static");
  35902. this.space();
  35903. }
  35904. this._variance(node);
  35905. this.token("[");
  35906. if (node.id) {
  35907. this.print(node.id, node);
  35908. this.token(":");
  35909. this.space();
  35910. }
  35911. this.print(node.key, node);
  35912. this.token("]");
  35913. this.token(":");
  35914. this.space();
  35915. this.print(node.value, node);
  35916. }
  35917. function ObjectTypeProperty(node) {
  35918. if (node.proto) {
  35919. this.word("proto");
  35920. this.space();
  35921. }
  35922. if (node.static) {
  35923. this.word("static");
  35924. this.space();
  35925. }
  35926. if (node.kind === "get" || node.kind === "set") {
  35927. this.word(node.kind);
  35928. this.space();
  35929. }
  35930. this._variance(node);
  35931. this.print(node.key, node);
  35932. if (node.optional)
  35933. this.token("?");
  35934. if (!node.method) {
  35935. this.token(":");
  35936. this.space();
  35937. }
  35938. this.print(node.value, node);
  35939. }
  35940. function ObjectTypeSpreadProperty(node) {
  35941. this.token("...");
  35942. this.print(node.argument, node);
  35943. }
  35944. function QualifiedTypeIdentifier(node) {
  35945. this.print(node.qualification, node);
  35946. this.token(".");
  35947. this.print(node.id, node);
  35948. }
  35949. function SymbolTypeAnnotation() {
  35950. this.word("symbol");
  35951. }
  35952. function orSeparator() {
  35953. this.space();
  35954. this.token("|");
  35955. this.space();
  35956. }
  35957. function UnionTypeAnnotation(node) {
  35958. this.printJoin(node.types, node, {
  35959. separator: orSeparator
  35960. });
  35961. }
  35962. function TypeCastExpression(node) {
  35963. this.token("(");
  35964. this.print(node.expression, node);
  35965. this.print(node.typeAnnotation, node);
  35966. this.token(")");
  35967. }
  35968. function Variance(node) {
  35969. if (node.kind === "plus") {
  35970. this.token("+");
  35971. } else {
  35972. this.token("-");
  35973. }
  35974. }
  35975. function VoidTypeAnnotation() {
  35976. this.word("void");
  35977. }
  35978. function IndexedAccessType(node) {
  35979. this.print(node.objectType, node);
  35980. this.token("[");
  35981. this.print(node.indexType, node);
  35982. this.token("]");
  35983. }
  35984. function OptionalIndexedAccessType(node) {
  35985. this.print(node.objectType, node);
  35986. if (node.optional) {
  35987. this.token("?.");
  35988. }
  35989. this.token("[");
  35990. this.print(node.indexType, node);
  35991. this.token("]");
  35992. }
  35993. }
  35994. });
  35995. // node_modules/estree-to-babel/node_modules/@babel/generator/lib/generators/base.js
  35996. var require_base = __commonJS({
  35997. "node_modules/estree-to-babel/node_modules/@babel/generator/lib/generators/base.js"(exports) {
  35998. "use strict";
  35999. Object.defineProperty(exports, "__esModule", {
  36000. value: true
  36001. });
  36002. exports.File = File;
  36003. exports.Program = Program;
  36004. exports.BlockStatement = BlockStatement2;
  36005. exports.Directive = Directive;
  36006. exports.DirectiveLiteral = DirectiveLiteral;
  36007. exports.InterpreterDirective = InterpreterDirective;
  36008. exports.Placeholder = Placeholder;
  36009. var t2 = require_lib4();
  36010. function File(node) {
  36011. if (node.program) {
  36012. this.print(node.program.interpreter, node);
  36013. }
  36014. this.print(node.program, node);
  36015. }
  36016. function Program(node) {
  36017. this.printInnerComments(node, false);
  36018. this.printSequence(node.directives, node);
  36019. if (node.directives && node.directives.length)
  36020. this.newline();
  36021. this.printSequence(node.body, node);
  36022. }
  36023. function BlockStatement2(node) {
  36024. var _node$directives;
  36025. this.token("{");
  36026. this.printInnerComments(node);
  36027. const hasDirectives = (_node$directives = node.directives) == null ? void 0 : _node$directives.length;
  36028. if (node.body.length || hasDirectives) {
  36029. this.newline();
  36030. this.printSequence(node.directives, node, {
  36031. indent: true
  36032. });
  36033. if (hasDirectives)
  36034. this.newline();
  36035. this.printSequence(node.body, node, {
  36036. indent: true
  36037. });
  36038. this.removeTrailingNewline();
  36039. this.source("end", node.loc);
  36040. if (!this.endsWith("\n"))
  36041. this.newline();
  36042. this.rightBrace();
  36043. } else {
  36044. this.source("end", node.loc);
  36045. this.token("}");
  36046. }
  36047. }
  36048. function Directive(node) {
  36049. this.print(node.value, node);
  36050. this.semicolon();
  36051. }
  36052. var unescapedSingleQuoteRE = /(?:^|[^\\])(?:\\\\)*'/;
  36053. var unescapedDoubleQuoteRE = /(?:^|[^\\])(?:\\\\)*"/;
  36054. function DirectiveLiteral(node) {
  36055. const raw = this.getPossibleRaw(node);
  36056. if (raw != null) {
  36057. this.token(raw);
  36058. return;
  36059. }
  36060. const {
  36061. value
  36062. } = node;
  36063. if (!unescapedDoubleQuoteRE.test(value)) {
  36064. this.token(`"${value}"`);
  36065. } else if (!unescapedSingleQuoteRE.test(value)) {
  36066. this.token(`'${value}'`);
  36067. } else {
  36068. throw new Error("Malformed AST: it is not possible to print a directive containing both unescaped single and double quotes.");
  36069. }
  36070. }
  36071. function InterpreterDirective(node) {
  36072. this.token(`#!${node.value}
  36073. `);
  36074. }
  36075. function Placeholder(node) {
  36076. this.token("%%");
  36077. this.print(node.name);
  36078. this.token("%%");
  36079. if (node.expectedNode === "Statement") {
  36080. this.semicolon();
  36081. }
  36082. }
  36083. }
  36084. });
  36085. // node_modules/estree-to-babel/node_modules/@babel/generator/lib/generators/jsx.js
  36086. var require_jsx3 = __commonJS({
  36087. "node_modules/estree-to-babel/node_modules/@babel/generator/lib/generators/jsx.js"(exports) {
  36088. "use strict";
  36089. Object.defineProperty(exports, "__esModule", {
  36090. value: true
  36091. });
  36092. exports.JSXAttribute = JSXAttribute2;
  36093. exports.JSXIdentifier = JSXIdentifier2;
  36094. exports.JSXNamespacedName = JSXNamespacedName2;
  36095. exports.JSXMemberExpression = JSXMemberExpression2;
  36096. exports.JSXSpreadAttribute = JSXSpreadAttribute2;
  36097. exports.JSXExpressionContainer = JSXExpressionContainer2;
  36098. exports.JSXSpreadChild = JSXSpreadChild;
  36099. exports.JSXText = JSXText2;
  36100. exports.JSXElement = JSXElement2;
  36101. exports.JSXOpeningElement = JSXOpeningElement2;
  36102. exports.JSXClosingElement = JSXClosingElement2;
  36103. exports.JSXEmptyExpression = JSXEmptyExpression2;
  36104. exports.JSXFragment = JSXFragment2;
  36105. exports.JSXOpeningFragment = JSXOpeningFragment2;
  36106. exports.JSXClosingFragment = JSXClosingFragment2;
  36107. var t2 = require_lib4();
  36108. function JSXAttribute2(node) {
  36109. this.print(node.name, node);
  36110. if (node.value) {
  36111. this.token("=");
  36112. this.print(node.value, node);
  36113. }
  36114. }
  36115. function JSXIdentifier2(node) {
  36116. this.word(node.name);
  36117. }
  36118. function JSXNamespacedName2(node) {
  36119. this.print(node.namespace, node);
  36120. this.token(":");
  36121. this.print(node.name, node);
  36122. }
  36123. function JSXMemberExpression2(node) {
  36124. this.print(node.object, node);
  36125. this.token(".");
  36126. this.print(node.property, node);
  36127. }
  36128. function JSXSpreadAttribute2(node) {
  36129. this.token("{");
  36130. this.token("...");
  36131. this.print(node.argument, node);
  36132. this.token("}");
  36133. }
  36134. function JSXExpressionContainer2(node) {
  36135. this.token("{");
  36136. this.print(node.expression, node);
  36137. this.token("}");
  36138. }
  36139. function JSXSpreadChild(node) {
  36140. this.token("{");
  36141. this.token("...");
  36142. this.print(node.expression, node);
  36143. this.token("}");
  36144. }
  36145. function JSXText2(node) {
  36146. const raw = this.getPossibleRaw(node);
  36147. if (raw != null) {
  36148. this.token(raw);
  36149. } else {
  36150. this.token(node.value);
  36151. }
  36152. }
  36153. function JSXElement2(node) {
  36154. const open = node.openingElement;
  36155. this.print(open, node);
  36156. if (open.selfClosing)
  36157. return;
  36158. this.indent();
  36159. for (const child of node.children) {
  36160. this.print(child, node);
  36161. }
  36162. this.dedent();
  36163. this.print(node.closingElement, node);
  36164. }
  36165. function spaceSeparator() {
  36166. this.space();
  36167. }
  36168. function JSXOpeningElement2(node) {
  36169. this.token("<");
  36170. this.print(node.name, node);
  36171. this.print(node.typeParameters, node);
  36172. if (node.attributes.length > 0) {
  36173. this.space();
  36174. this.printJoin(node.attributes, node, {
  36175. separator: spaceSeparator
  36176. });
  36177. }
  36178. if (node.selfClosing) {
  36179. this.space();
  36180. this.token("/>");
  36181. } else {
  36182. this.token(">");
  36183. }
  36184. }
  36185. function JSXClosingElement2(node) {
  36186. this.token("</");
  36187. this.print(node.name, node);
  36188. this.token(">");
  36189. }
  36190. function JSXEmptyExpression2(node) {
  36191. this.printInnerComments(node);
  36192. }
  36193. function JSXFragment2(node) {
  36194. this.print(node.openingFragment, node);
  36195. this.indent();
  36196. for (const child of node.children) {
  36197. this.print(child, node);
  36198. }
  36199. this.dedent();
  36200. this.print(node.closingFragment, node);
  36201. }
  36202. function JSXOpeningFragment2() {
  36203. this.token("<");
  36204. this.token(">");
  36205. }
  36206. function JSXClosingFragment2() {
  36207. this.token("</");
  36208. this.token(">");
  36209. }
  36210. }
  36211. });
  36212. // node_modules/estree-to-babel/node_modules/@babel/generator/lib/generators/typescript.js
  36213. var require_typescript3 = __commonJS({
  36214. "node_modules/estree-to-babel/node_modules/@babel/generator/lib/generators/typescript.js"(exports) {
  36215. "use strict";
  36216. Object.defineProperty(exports, "__esModule", {
  36217. value: true
  36218. });
  36219. exports.TSTypeAnnotation = TSTypeAnnotation;
  36220. exports.TSTypeParameterDeclaration = exports.TSTypeParameterInstantiation = TSTypeParameterInstantiation;
  36221. exports.TSTypeParameter = TSTypeParameter;
  36222. exports.TSParameterProperty = TSParameterProperty;
  36223. exports.TSDeclareFunction = TSDeclareFunction;
  36224. exports.TSDeclareMethod = TSDeclareMethod;
  36225. exports.TSQualifiedName = TSQualifiedName;
  36226. exports.TSCallSignatureDeclaration = TSCallSignatureDeclaration;
  36227. exports.TSConstructSignatureDeclaration = TSConstructSignatureDeclaration;
  36228. exports.TSPropertySignature = TSPropertySignature;
  36229. exports.tsPrintPropertyOrMethodName = tsPrintPropertyOrMethodName;
  36230. exports.TSMethodSignature = TSMethodSignature;
  36231. exports.TSIndexSignature = TSIndexSignature;
  36232. exports.TSAnyKeyword = TSAnyKeyword;
  36233. exports.TSBigIntKeyword = TSBigIntKeyword;
  36234. exports.TSUnknownKeyword = TSUnknownKeyword;
  36235. exports.TSNumberKeyword = TSNumberKeyword;
  36236. exports.TSObjectKeyword = TSObjectKeyword;
  36237. exports.TSBooleanKeyword = TSBooleanKeyword;
  36238. exports.TSStringKeyword = TSStringKeyword;
  36239. exports.TSSymbolKeyword = TSSymbolKeyword;
  36240. exports.TSVoidKeyword = TSVoidKeyword;
  36241. exports.TSUndefinedKeyword = TSUndefinedKeyword;
  36242. exports.TSNullKeyword = TSNullKeyword;
  36243. exports.TSNeverKeyword = TSNeverKeyword;
  36244. exports.TSIntrinsicKeyword = TSIntrinsicKeyword;
  36245. exports.TSThisType = TSThisType;
  36246. exports.TSFunctionType = TSFunctionType;
  36247. exports.TSConstructorType = TSConstructorType;
  36248. exports.tsPrintFunctionOrConstructorType = tsPrintFunctionOrConstructorType;
  36249. exports.TSTypeReference = TSTypeReference;
  36250. exports.TSTypePredicate = TSTypePredicate;
  36251. exports.TSTypeQuery = TSTypeQuery;
  36252. exports.TSTypeLiteral = TSTypeLiteral;
  36253. exports.tsPrintTypeLiteralOrInterfaceBody = tsPrintTypeLiteralOrInterfaceBody;
  36254. exports.tsPrintBraced = tsPrintBraced;
  36255. exports.TSArrayType = TSArrayType;
  36256. exports.TSTupleType = TSTupleType;
  36257. exports.TSOptionalType = TSOptionalType;
  36258. exports.TSRestType = TSRestType;
  36259. exports.TSNamedTupleMember = TSNamedTupleMember;
  36260. exports.TSUnionType = TSUnionType;
  36261. exports.TSIntersectionType = TSIntersectionType;
  36262. exports.tsPrintUnionOrIntersectionType = tsPrintUnionOrIntersectionType;
  36263. exports.TSConditionalType = TSConditionalType;
  36264. exports.TSInferType = TSInferType;
  36265. exports.TSParenthesizedType = TSParenthesizedType;
  36266. exports.TSTypeOperator = TSTypeOperator;
  36267. exports.TSIndexedAccessType = TSIndexedAccessType;
  36268. exports.TSMappedType = TSMappedType;
  36269. exports.TSLiteralType = TSLiteralType;
  36270. exports.TSExpressionWithTypeArguments = TSExpressionWithTypeArguments;
  36271. exports.TSInterfaceDeclaration = TSInterfaceDeclaration;
  36272. exports.TSInterfaceBody = TSInterfaceBody;
  36273. exports.TSTypeAliasDeclaration = TSTypeAliasDeclaration;
  36274. exports.TSAsExpression = TSAsExpression;
  36275. exports.TSTypeAssertion = TSTypeAssertion;
  36276. exports.TSEnumDeclaration = TSEnumDeclaration;
  36277. exports.TSEnumMember = TSEnumMember;
  36278. exports.TSModuleDeclaration = TSModuleDeclaration;
  36279. exports.TSModuleBlock = TSModuleBlock;
  36280. exports.TSImportType = TSImportType;
  36281. exports.TSImportEqualsDeclaration = TSImportEqualsDeclaration;
  36282. exports.TSExternalModuleReference = TSExternalModuleReference;
  36283. exports.TSNonNullExpression = TSNonNullExpression;
  36284. exports.TSExportAssignment = TSExportAssignment;
  36285. exports.TSNamespaceExportDeclaration = TSNamespaceExportDeclaration;
  36286. exports.tsPrintSignatureDeclarationBase = tsPrintSignatureDeclarationBase;
  36287. exports.tsPrintClassMemberModifiers = tsPrintClassMemberModifiers;
  36288. var t2 = require_lib4();
  36289. function TSTypeAnnotation(node) {
  36290. this.token(":");
  36291. this.space();
  36292. if (node.optional)
  36293. this.token("?");
  36294. this.print(node.typeAnnotation, node);
  36295. }
  36296. function TSTypeParameterInstantiation(node) {
  36297. this.token("<");
  36298. this.printList(node.params, node, {});
  36299. this.token(">");
  36300. }
  36301. function TSTypeParameter(node) {
  36302. this.word(node.name);
  36303. if (node.constraint) {
  36304. this.space();
  36305. this.word("extends");
  36306. this.space();
  36307. this.print(node.constraint, node);
  36308. }
  36309. if (node.default) {
  36310. this.space();
  36311. this.token("=");
  36312. this.space();
  36313. this.print(node.default, node);
  36314. }
  36315. }
  36316. function TSParameterProperty(node) {
  36317. if (node.accessibility) {
  36318. this.word(node.accessibility);
  36319. this.space();
  36320. }
  36321. if (node.readonly) {
  36322. this.word("readonly");
  36323. this.space();
  36324. }
  36325. this._param(node.parameter);
  36326. }
  36327. function TSDeclareFunction(node) {
  36328. if (node.declare) {
  36329. this.word("declare");
  36330. this.space();
  36331. }
  36332. this._functionHead(node);
  36333. this.token(";");
  36334. }
  36335. function TSDeclareMethod(node) {
  36336. this._classMethodHead(node);
  36337. this.token(";");
  36338. }
  36339. function TSQualifiedName(node) {
  36340. this.print(node.left, node);
  36341. this.token(".");
  36342. this.print(node.right, node);
  36343. }
  36344. function TSCallSignatureDeclaration(node) {
  36345. this.tsPrintSignatureDeclarationBase(node);
  36346. this.token(";");
  36347. }
  36348. function TSConstructSignatureDeclaration(node) {
  36349. this.word("new");
  36350. this.space();
  36351. this.tsPrintSignatureDeclarationBase(node);
  36352. this.token(";");
  36353. }
  36354. function TSPropertySignature(node) {
  36355. const {
  36356. readonly,
  36357. initializer
  36358. } = node;
  36359. if (readonly) {
  36360. this.word("readonly");
  36361. this.space();
  36362. }
  36363. this.tsPrintPropertyOrMethodName(node);
  36364. this.print(node.typeAnnotation, node);
  36365. if (initializer) {
  36366. this.space();
  36367. this.token("=");
  36368. this.space();
  36369. this.print(initializer, node);
  36370. }
  36371. this.token(";");
  36372. }
  36373. function tsPrintPropertyOrMethodName(node) {
  36374. if (node.computed) {
  36375. this.token("[");
  36376. }
  36377. this.print(node.key, node);
  36378. if (node.computed) {
  36379. this.token("]");
  36380. }
  36381. if (node.optional) {
  36382. this.token("?");
  36383. }
  36384. }
  36385. function TSMethodSignature(node) {
  36386. const {
  36387. kind
  36388. } = node;
  36389. if (kind === "set" || kind === "get") {
  36390. this.word(kind);
  36391. this.space();
  36392. }
  36393. this.tsPrintPropertyOrMethodName(node);
  36394. this.tsPrintSignatureDeclarationBase(node);
  36395. this.token(";");
  36396. }
  36397. function TSIndexSignature(node) {
  36398. const {
  36399. readonly,
  36400. static: isStatic
  36401. } = node;
  36402. if (isStatic) {
  36403. this.word("static");
  36404. this.space();
  36405. }
  36406. if (readonly) {
  36407. this.word("readonly");
  36408. this.space();
  36409. }
  36410. this.token("[");
  36411. this._parameters(node.parameters, node);
  36412. this.token("]");
  36413. this.print(node.typeAnnotation, node);
  36414. this.token(";");
  36415. }
  36416. function TSAnyKeyword() {
  36417. this.word("any");
  36418. }
  36419. function TSBigIntKeyword() {
  36420. this.word("bigint");
  36421. }
  36422. function TSUnknownKeyword() {
  36423. this.word("unknown");
  36424. }
  36425. function TSNumberKeyword() {
  36426. this.word("number");
  36427. }
  36428. function TSObjectKeyword() {
  36429. this.word("object");
  36430. }
  36431. function TSBooleanKeyword() {
  36432. this.word("boolean");
  36433. }
  36434. function TSStringKeyword() {
  36435. this.word("string");
  36436. }
  36437. function TSSymbolKeyword() {
  36438. this.word("symbol");
  36439. }
  36440. function TSVoidKeyword() {
  36441. this.word("void");
  36442. }
  36443. function TSUndefinedKeyword() {
  36444. this.word("undefined");
  36445. }
  36446. function TSNullKeyword() {
  36447. this.word("null");
  36448. }
  36449. function TSNeverKeyword() {
  36450. this.word("never");
  36451. }
  36452. function TSIntrinsicKeyword() {
  36453. this.word("intrinsic");
  36454. }
  36455. function TSThisType() {
  36456. this.word("this");
  36457. }
  36458. function TSFunctionType(node) {
  36459. this.tsPrintFunctionOrConstructorType(node);
  36460. }
  36461. function TSConstructorType(node) {
  36462. if (node.abstract) {
  36463. this.word("abstract");
  36464. this.space();
  36465. }
  36466. this.word("new");
  36467. this.space();
  36468. this.tsPrintFunctionOrConstructorType(node);
  36469. }
  36470. function tsPrintFunctionOrConstructorType(node) {
  36471. const {
  36472. typeParameters,
  36473. parameters
  36474. } = node;
  36475. this.print(typeParameters, node);
  36476. this.token("(");
  36477. this._parameters(parameters, node);
  36478. this.token(")");
  36479. this.space();
  36480. this.token("=>");
  36481. this.space();
  36482. this.print(node.typeAnnotation.typeAnnotation, node);
  36483. }
  36484. function TSTypeReference(node) {
  36485. this.print(node.typeName, node);
  36486. this.print(node.typeParameters, node);
  36487. }
  36488. function TSTypePredicate(node) {
  36489. if (node.asserts) {
  36490. this.word("asserts");
  36491. this.space();
  36492. }
  36493. this.print(node.parameterName);
  36494. if (node.typeAnnotation) {
  36495. this.space();
  36496. this.word("is");
  36497. this.space();
  36498. this.print(node.typeAnnotation.typeAnnotation);
  36499. }
  36500. }
  36501. function TSTypeQuery(node) {
  36502. this.word("typeof");
  36503. this.space();
  36504. this.print(node.exprName);
  36505. }
  36506. function TSTypeLiteral(node) {
  36507. this.tsPrintTypeLiteralOrInterfaceBody(node.members, node);
  36508. }
  36509. function tsPrintTypeLiteralOrInterfaceBody(members, node) {
  36510. this.tsPrintBraced(members, node);
  36511. }
  36512. function tsPrintBraced(members, node) {
  36513. this.token("{");
  36514. if (members.length) {
  36515. this.indent();
  36516. this.newline();
  36517. for (const member of members) {
  36518. this.print(member, node);
  36519. this.newline();
  36520. }
  36521. this.dedent();
  36522. this.rightBrace();
  36523. } else {
  36524. this.token("}");
  36525. }
  36526. }
  36527. function TSArrayType(node) {
  36528. this.print(node.elementType, node);
  36529. this.token("[]");
  36530. }
  36531. function TSTupleType(node) {
  36532. this.token("[");
  36533. this.printList(node.elementTypes, node);
  36534. this.token("]");
  36535. }
  36536. function TSOptionalType(node) {
  36537. this.print(node.typeAnnotation, node);
  36538. this.token("?");
  36539. }
  36540. function TSRestType(node) {
  36541. this.token("...");
  36542. this.print(node.typeAnnotation, node);
  36543. }
  36544. function TSNamedTupleMember(node) {
  36545. this.print(node.label, node);
  36546. if (node.optional)
  36547. this.token("?");
  36548. this.token(":");
  36549. this.space();
  36550. this.print(node.elementType, node);
  36551. }
  36552. function TSUnionType(node) {
  36553. this.tsPrintUnionOrIntersectionType(node, "|");
  36554. }
  36555. function TSIntersectionType(node) {
  36556. this.tsPrintUnionOrIntersectionType(node, "&");
  36557. }
  36558. function tsPrintUnionOrIntersectionType(node, sep) {
  36559. this.printJoin(node.types, node, {
  36560. separator() {
  36561. this.space();
  36562. this.token(sep);
  36563. this.space();
  36564. }
  36565. });
  36566. }
  36567. function TSConditionalType(node) {
  36568. this.print(node.checkType);
  36569. this.space();
  36570. this.word("extends");
  36571. this.space();
  36572. this.print(node.extendsType);
  36573. this.space();
  36574. this.token("?");
  36575. this.space();
  36576. this.print(node.trueType);
  36577. this.space();
  36578. this.token(":");
  36579. this.space();
  36580. this.print(node.falseType);
  36581. }
  36582. function TSInferType(node) {
  36583. this.token("infer");
  36584. this.space();
  36585. this.print(node.typeParameter);
  36586. }
  36587. function TSParenthesizedType(node) {
  36588. this.token("(");
  36589. this.print(node.typeAnnotation, node);
  36590. this.token(")");
  36591. }
  36592. function TSTypeOperator(node) {
  36593. this.word(node.operator);
  36594. this.space();
  36595. this.print(node.typeAnnotation, node);
  36596. }
  36597. function TSIndexedAccessType(node) {
  36598. this.print(node.objectType, node);
  36599. this.token("[");
  36600. this.print(node.indexType, node);
  36601. this.token("]");
  36602. }
  36603. function TSMappedType(node) {
  36604. const {
  36605. nameType,
  36606. optional,
  36607. readonly,
  36608. typeParameter
  36609. } = node;
  36610. this.token("{");
  36611. this.space();
  36612. if (readonly) {
  36613. tokenIfPlusMinus(this, readonly);
  36614. this.word("readonly");
  36615. this.space();
  36616. }
  36617. this.token("[");
  36618. this.word(typeParameter.name);
  36619. this.space();
  36620. this.word("in");
  36621. this.space();
  36622. this.print(typeParameter.constraint, typeParameter);
  36623. if (nameType) {
  36624. this.space();
  36625. this.word("as");
  36626. this.space();
  36627. this.print(nameType, node);
  36628. }
  36629. this.token("]");
  36630. if (optional) {
  36631. tokenIfPlusMinus(this, optional);
  36632. this.token("?");
  36633. }
  36634. this.token(":");
  36635. this.space();
  36636. this.print(node.typeAnnotation, node);
  36637. this.space();
  36638. this.token("}");
  36639. }
  36640. function tokenIfPlusMinus(self2, tok) {
  36641. if (tok !== true) {
  36642. self2.token(tok);
  36643. }
  36644. }
  36645. function TSLiteralType(node) {
  36646. this.print(node.literal, node);
  36647. }
  36648. function TSExpressionWithTypeArguments(node) {
  36649. this.print(node.expression, node);
  36650. this.print(node.typeParameters, node);
  36651. }
  36652. function TSInterfaceDeclaration(node) {
  36653. const {
  36654. declare,
  36655. id,
  36656. typeParameters,
  36657. extends: extendz,
  36658. body
  36659. } = node;
  36660. if (declare) {
  36661. this.word("declare");
  36662. this.space();
  36663. }
  36664. this.word("interface");
  36665. this.space();
  36666. this.print(id, node);
  36667. this.print(typeParameters, node);
  36668. if (extendz != null && extendz.length) {
  36669. this.space();
  36670. this.word("extends");
  36671. this.space();
  36672. this.printList(extendz, node);
  36673. }
  36674. this.space();
  36675. this.print(body, node);
  36676. }
  36677. function TSInterfaceBody(node) {
  36678. this.tsPrintTypeLiteralOrInterfaceBody(node.body, node);
  36679. }
  36680. function TSTypeAliasDeclaration(node) {
  36681. const {
  36682. declare,
  36683. id,
  36684. typeParameters,
  36685. typeAnnotation
  36686. } = node;
  36687. if (declare) {
  36688. this.word("declare");
  36689. this.space();
  36690. }
  36691. this.word("type");
  36692. this.space();
  36693. this.print(id, node);
  36694. this.print(typeParameters, node);
  36695. this.space();
  36696. this.token("=");
  36697. this.space();
  36698. this.print(typeAnnotation, node);
  36699. this.token(";");
  36700. }
  36701. function TSAsExpression(node) {
  36702. const {
  36703. expression,
  36704. typeAnnotation
  36705. } = node;
  36706. this.print(expression, node);
  36707. this.space();
  36708. this.word("as");
  36709. this.space();
  36710. this.print(typeAnnotation, node);
  36711. }
  36712. function TSTypeAssertion(node) {
  36713. const {
  36714. typeAnnotation,
  36715. expression
  36716. } = node;
  36717. this.token("<");
  36718. this.print(typeAnnotation, node);
  36719. this.token(">");
  36720. this.space();
  36721. this.print(expression, node);
  36722. }
  36723. function TSEnumDeclaration(node) {
  36724. const {
  36725. declare,
  36726. const: isConst,
  36727. id,
  36728. members
  36729. } = node;
  36730. if (declare) {
  36731. this.word("declare");
  36732. this.space();
  36733. }
  36734. if (isConst) {
  36735. this.word("const");
  36736. this.space();
  36737. }
  36738. this.word("enum");
  36739. this.space();
  36740. this.print(id, node);
  36741. this.space();
  36742. this.tsPrintBraced(members, node);
  36743. }
  36744. function TSEnumMember(node) {
  36745. const {
  36746. id,
  36747. initializer
  36748. } = node;
  36749. this.print(id, node);
  36750. if (initializer) {
  36751. this.space();
  36752. this.token("=");
  36753. this.space();
  36754. this.print(initializer, node);
  36755. }
  36756. this.token(",");
  36757. }
  36758. function TSModuleDeclaration(node) {
  36759. const {
  36760. declare,
  36761. id
  36762. } = node;
  36763. if (declare) {
  36764. this.word("declare");
  36765. this.space();
  36766. }
  36767. if (!node.global) {
  36768. this.word(id.type === "Identifier" ? "namespace" : "module");
  36769. this.space();
  36770. }
  36771. this.print(id, node);
  36772. if (!node.body) {
  36773. this.token(";");
  36774. return;
  36775. }
  36776. let body = node.body;
  36777. while (body.type === "TSModuleDeclaration") {
  36778. this.token(".");
  36779. this.print(body.id, body);
  36780. body = body.body;
  36781. }
  36782. this.space();
  36783. this.print(body, node);
  36784. }
  36785. function TSModuleBlock(node) {
  36786. this.tsPrintBraced(node.body, node);
  36787. }
  36788. function TSImportType(node) {
  36789. const {
  36790. argument,
  36791. qualifier,
  36792. typeParameters
  36793. } = node;
  36794. this.word("import");
  36795. this.token("(");
  36796. this.print(argument, node);
  36797. this.token(")");
  36798. if (qualifier) {
  36799. this.token(".");
  36800. this.print(qualifier, node);
  36801. }
  36802. if (typeParameters) {
  36803. this.print(typeParameters, node);
  36804. }
  36805. }
  36806. function TSImportEqualsDeclaration(node) {
  36807. const {
  36808. isExport,
  36809. id,
  36810. moduleReference
  36811. } = node;
  36812. if (isExport) {
  36813. this.word("export");
  36814. this.space();
  36815. }
  36816. this.word("import");
  36817. this.space();
  36818. this.print(id, node);
  36819. this.space();
  36820. this.token("=");
  36821. this.space();
  36822. this.print(moduleReference, node);
  36823. this.token(";");
  36824. }
  36825. function TSExternalModuleReference(node) {
  36826. this.token("require(");
  36827. this.print(node.expression, node);
  36828. this.token(")");
  36829. }
  36830. function TSNonNullExpression(node) {
  36831. this.print(node.expression, node);
  36832. this.token("!");
  36833. }
  36834. function TSExportAssignment(node) {
  36835. this.word("export");
  36836. this.space();
  36837. this.token("=");
  36838. this.space();
  36839. this.print(node.expression, node);
  36840. this.token(";");
  36841. }
  36842. function TSNamespaceExportDeclaration(node) {
  36843. this.word("export");
  36844. this.space();
  36845. this.word("as");
  36846. this.space();
  36847. this.word("namespace");
  36848. this.space();
  36849. this.print(node.id, node);
  36850. }
  36851. function tsPrintSignatureDeclarationBase(node) {
  36852. const {
  36853. typeParameters,
  36854. parameters
  36855. } = node;
  36856. this.print(typeParameters, node);
  36857. this.token("(");
  36858. this._parameters(parameters, node);
  36859. this.token(")");
  36860. this.print(node.typeAnnotation, node);
  36861. }
  36862. function tsPrintClassMemberModifiers(node, isField) {
  36863. if (isField && node.declare) {
  36864. this.word("declare");
  36865. this.space();
  36866. }
  36867. if (node.accessibility) {
  36868. this.word(node.accessibility);
  36869. this.space();
  36870. }
  36871. if (node.static) {
  36872. this.word("static");
  36873. this.space();
  36874. }
  36875. if (node.override) {
  36876. this.word("override");
  36877. this.space();
  36878. }
  36879. if (node.abstract) {
  36880. this.word("abstract");
  36881. this.space();
  36882. }
  36883. if (isField && node.readonly) {
  36884. this.word("readonly");
  36885. this.space();
  36886. }
  36887. }
  36888. }
  36889. });
  36890. // node_modules/estree-to-babel/node_modules/@babel/generator/lib/generators/index.js
  36891. var require_generators = __commonJS({
  36892. "node_modules/estree-to-babel/node_modules/@babel/generator/lib/generators/index.js"(exports) {
  36893. "use strict";
  36894. Object.defineProperty(exports, "__esModule", {
  36895. value: true
  36896. });
  36897. var _templateLiterals = require_template_literals();
  36898. Object.keys(_templateLiterals).forEach(function(key) {
  36899. if (key === "default" || key === "__esModule")
  36900. return;
  36901. if (key in exports && exports[key] === _templateLiterals[key])
  36902. return;
  36903. Object.defineProperty(exports, key, {
  36904. enumerable: true,
  36905. get: function() {
  36906. return _templateLiterals[key];
  36907. }
  36908. });
  36909. });
  36910. var _expressions = require_expressions();
  36911. Object.keys(_expressions).forEach(function(key) {
  36912. if (key === "default" || key === "__esModule")
  36913. return;
  36914. if (key in exports && exports[key] === _expressions[key])
  36915. return;
  36916. Object.defineProperty(exports, key, {
  36917. enumerable: true,
  36918. get: function() {
  36919. return _expressions[key];
  36920. }
  36921. });
  36922. });
  36923. var _statements = require_statements();
  36924. Object.keys(_statements).forEach(function(key) {
  36925. if (key === "default" || key === "__esModule")
  36926. return;
  36927. if (key in exports && exports[key] === _statements[key])
  36928. return;
  36929. Object.defineProperty(exports, key, {
  36930. enumerable: true,
  36931. get: function() {
  36932. return _statements[key];
  36933. }
  36934. });
  36935. });
  36936. var _classes = require_classes();
  36937. Object.keys(_classes).forEach(function(key) {
  36938. if (key === "default" || key === "__esModule")
  36939. return;
  36940. if (key in exports && exports[key] === _classes[key])
  36941. return;
  36942. Object.defineProperty(exports, key, {
  36943. enumerable: true,
  36944. get: function() {
  36945. return _classes[key];
  36946. }
  36947. });
  36948. });
  36949. var _methods = require_methods();
  36950. Object.keys(_methods).forEach(function(key) {
  36951. if (key === "default" || key === "__esModule")
  36952. return;
  36953. if (key in exports && exports[key] === _methods[key])
  36954. return;
  36955. Object.defineProperty(exports, key, {
  36956. enumerable: true,
  36957. get: function() {
  36958. return _methods[key];
  36959. }
  36960. });
  36961. });
  36962. var _modules = require_modules();
  36963. Object.keys(_modules).forEach(function(key) {
  36964. if (key === "default" || key === "__esModule")
  36965. return;
  36966. if (key in exports && exports[key] === _modules[key])
  36967. return;
  36968. Object.defineProperty(exports, key, {
  36969. enumerable: true,
  36970. get: function() {
  36971. return _modules[key];
  36972. }
  36973. });
  36974. });
  36975. var _types = require_types();
  36976. Object.keys(_types).forEach(function(key) {
  36977. if (key === "default" || key === "__esModule")
  36978. return;
  36979. if (key in exports && exports[key] === _types[key])
  36980. return;
  36981. Object.defineProperty(exports, key, {
  36982. enumerable: true,
  36983. get: function() {
  36984. return _types[key];
  36985. }
  36986. });
  36987. });
  36988. var _flow = require_flow3();
  36989. Object.keys(_flow).forEach(function(key) {
  36990. if (key === "default" || key === "__esModule")
  36991. return;
  36992. if (key in exports && exports[key] === _flow[key])
  36993. return;
  36994. Object.defineProperty(exports, key, {
  36995. enumerable: true,
  36996. get: function() {
  36997. return _flow[key];
  36998. }
  36999. });
  37000. });
  37001. var _base = require_base();
  37002. Object.keys(_base).forEach(function(key) {
  37003. if (key === "default" || key === "__esModule")
  37004. return;
  37005. if (key in exports && exports[key] === _base[key])
  37006. return;
  37007. Object.defineProperty(exports, key, {
  37008. enumerable: true,
  37009. get: function() {
  37010. return _base[key];
  37011. }
  37012. });
  37013. });
  37014. var _jsx = require_jsx3();
  37015. Object.keys(_jsx).forEach(function(key) {
  37016. if (key === "default" || key === "__esModule")
  37017. return;
  37018. if (key in exports && exports[key] === _jsx[key])
  37019. return;
  37020. Object.defineProperty(exports, key, {
  37021. enumerable: true,
  37022. get: function() {
  37023. return _jsx[key];
  37024. }
  37025. });
  37026. });
  37027. var _typescript = require_typescript3();
  37028. Object.keys(_typescript).forEach(function(key) {
  37029. if (key === "default" || key === "__esModule")
  37030. return;
  37031. if (key in exports && exports[key] === _typescript[key])
  37032. return;
  37033. Object.defineProperty(exports, key, {
  37034. enumerable: true,
  37035. get: function() {
  37036. return _typescript[key];
  37037. }
  37038. });
  37039. });
  37040. }
  37041. });
  37042. // node_modules/estree-to-babel/node_modules/@babel/generator/lib/printer.js
  37043. var require_printer = __commonJS({
  37044. "node_modules/estree-to-babel/node_modules/@babel/generator/lib/printer.js"(exports) {
  37045. "use strict";
  37046. Object.defineProperty(exports, "__esModule", {
  37047. value: true
  37048. });
  37049. exports.default = void 0;
  37050. var _buffer = require_buffer();
  37051. var n = require_node2();
  37052. var t2 = require_lib4();
  37053. var generatorFunctions = require_generators();
  37054. var SCIENTIFIC_NOTATION = /e/i;
  37055. var ZERO_DECIMAL_INTEGER = /\.0+$/;
  37056. var NON_DECIMAL_LITERAL = /^0[box]/;
  37057. var PURE_ANNOTATION_RE = /^\s*[@#]__PURE__\s*$/;
  37058. var Printer = class {
  37059. constructor(format, map) {
  37060. this.inForStatementInitCounter = 0;
  37061. this._printStack = [];
  37062. this._indent = 0;
  37063. this._insideAux = false;
  37064. this._parenPushNewlineState = null;
  37065. this._noLineTerminator = false;
  37066. this._printAuxAfterOnNextUserNode = false;
  37067. this._printedComments = /* @__PURE__ */ new WeakSet();
  37068. this._endsWithInteger = false;
  37069. this._endsWithWord = false;
  37070. this.format = format;
  37071. this._buf = new _buffer.default(map);
  37072. }
  37073. generate(ast) {
  37074. this.print(ast);
  37075. this._maybeAddAuxComment();
  37076. return this._buf.get();
  37077. }
  37078. indent() {
  37079. if (this.format.compact || this.format.concise)
  37080. return;
  37081. this._indent++;
  37082. }
  37083. dedent() {
  37084. if (this.format.compact || this.format.concise)
  37085. return;
  37086. this._indent--;
  37087. }
  37088. semicolon(force = false) {
  37089. this._maybeAddAuxComment();
  37090. this._append(";", !force);
  37091. }
  37092. rightBrace() {
  37093. if (this.format.minified) {
  37094. this._buf.removeLastSemicolon();
  37095. }
  37096. this.token("}");
  37097. }
  37098. space(force = false) {
  37099. if (this.format.compact)
  37100. return;
  37101. if (this._buf.hasContent() && !this.endsWith(" ") && !this.endsWith("\n") || force) {
  37102. this._space();
  37103. }
  37104. }
  37105. word(str) {
  37106. if (this._endsWithWord || this.endsWith("/") && str.indexOf("/") === 0) {
  37107. this._space();
  37108. }
  37109. this._maybeAddAuxComment();
  37110. this._append(str);
  37111. this._endsWithWord = true;
  37112. }
  37113. number(str) {
  37114. this.word(str);
  37115. this._endsWithInteger = Number.isInteger(+str) && !NON_DECIMAL_LITERAL.test(str) && !SCIENTIFIC_NOTATION.test(str) && !ZERO_DECIMAL_INTEGER.test(str) && str[str.length - 1] !== ".";
  37116. }
  37117. token(str) {
  37118. if (str === "--" && this.endsWith("!") || str[0] === "+" && this.endsWith("+") || str[0] === "-" && this.endsWith("-") || str[0] === "." && this._endsWithInteger) {
  37119. this._space();
  37120. }
  37121. this._maybeAddAuxComment();
  37122. this._append(str);
  37123. }
  37124. newline(i) {
  37125. if (this.format.retainLines || this.format.compact)
  37126. return;
  37127. if (this.format.concise) {
  37128. this.space();
  37129. return;
  37130. }
  37131. if (this.endsWith("\n\n"))
  37132. return;
  37133. if (typeof i !== "number")
  37134. i = 1;
  37135. i = Math.min(2, i);
  37136. if (this.endsWith("{\n") || this.endsWith(":\n"))
  37137. i--;
  37138. if (i <= 0)
  37139. return;
  37140. for (let j = 0; j < i; j++) {
  37141. this._newline();
  37142. }
  37143. }
  37144. endsWith(str) {
  37145. return this._buf.endsWith(str);
  37146. }
  37147. removeTrailingNewline() {
  37148. this._buf.removeTrailingNewline();
  37149. }
  37150. exactSource(loc, cb) {
  37151. this._catchUp("start", loc);
  37152. this._buf.exactSource(loc, cb);
  37153. }
  37154. source(prop, loc) {
  37155. this._catchUp(prop, loc);
  37156. this._buf.source(prop, loc);
  37157. }
  37158. withSource(prop, loc, cb) {
  37159. this._catchUp(prop, loc);
  37160. this._buf.withSource(prop, loc, cb);
  37161. }
  37162. _space() {
  37163. this._append(" ", true);
  37164. }
  37165. _newline() {
  37166. this._append("\n", true);
  37167. }
  37168. _append(str, queue = false) {
  37169. this._maybeAddParen(str);
  37170. this._maybeIndent(str);
  37171. if (queue)
  37172. this._buf.queue(str);
  37173. else
  37174. this._buf.append(str);
  37175. this._endsWithWord = false;
  37176. this._endsWithInteger = false;
  37177. }
  37178. _maybeIndent(str) {
  37179. if (this._indent && this.endsWith("\n") && str[0] !== "\n") {
  37180. this._buf.queue(this._getIndent());
  37181. }
  37182. }
  37183. _maybeAddParen(str) {
  37184. const parenPushNewlineState = this._parenPushNewlineState;
  37185. if (!parenPushNewlineState)
  37186. return;
  37187. let i;
  37188. for (i = 0; i < str.length && str[i] === " "; i++)
  37189. continue;
  37190. if (i === str.length) {
  37191. return;
  37192. }
  37193. const cha = str[i];
  37194. if (cha !== "\n") {
  37195. if (cha !== "/" || i + 1 === str.length) {
  37196. this._parenPushNewlineState = null;
  37197. return;
  37198. }
  37199. const chaPost = str[i + 1];
  37200. if (chaPost === "*") {
  37201. if (PURE_ANNOTATION_RE.test(str.slice(i + 2, str.length - 2))) {
  37202. return;
  37203. }
  37204. } else if (chaPost !== "/") {
  37205. this._parenPushNewlineState = null;
  37206. return;
  37207. }
  37208. }
  37209. this.token("(");
  37210. this.indent();
  37211. parenPushNewlineState.printed = true;
  37212. }
  37213. _catchUp(prop, loc) {
  37214. if (!this.format.retainLines)
  37215. return;
  37216. const pos = loc ? loc[prop] : null;
  37217. if ((pos == null ? void 0 : pos.line) != null) {
  37218. const count = pos.line - this._buf.getCurrentLine();
  37219. for (let i = 0; i < count; i++) {
  37220. this._newline();
  37221. }
  37222. }
  37223. }
  37224. _getIndent() {
  37225. return this.format.indent.style.repeat(this._indent);
  37226. }
  37227. startTerminatorless(isLabel = false) {
  37228. if (isLabel) {
  37229. this._noLineTerminator = true;
  37230. return null;
  37231. } else {
  37232. return this._parenPushNewlineState = {
  37233. printed: false
  37234. };
  37235. }
  37236. }
  37237. endTerminatorless(state) {
  37238. this._noLineTerminator = false;
  37239. if (state != null && state.printed) {
  37240. this.dedent();
  37241. this.newline();
  37242. this.token(")");
  37243. }
  37244. }
  37245. print(node, parent) {
  37246. if (!node)
  37247. return;
  37248. const oldConcise = this.format.concise;
  37249. if (node._compact) {
  37250. this.format.concise = true;
  37251. }
  37252. const printMethod = this[node.type];
  37253. if (!printMethod) {
  37254. throw new ReferenceError(`unknown node of type ${JSON.stringify(node.type)} with constructor ${JSON.stringify(node == null ? void 0 : node.constructor.name)}`);
  37255. }
  37256. this._printStack.push(node);
  37257. const oldInAux = this._insideAux;
  37258. this._insideAux = !node.loc;
  37259. this._maybeAddAuxComment(this._insideAux && !oldInAux);
  37260. let needsParens = n.needsParens(node, parent, this._printStack);
  37261. if (this.format.retainFunctionParens && node.type === "FunctionExpression" && node.extra && node.extra.parenthesized) {
  37262. needsParens = true;
  37263. }
  37264. if (needsParens)
  37265. this.token("(");
  37266. this._printLeadingComments(node);
  37267. const loc = t2.isProgram(node) || t2.isFile(node) ? null : node.loc;
  37268. this.withSource("start", loc, () => {
  37269. printMethod.call(this, node, parent);
  37270. });
  37271. this._printTrailingComments(node);
  37272. if (needsParens)
  37273. this.token(")");
  37274. this._printStack.pop();
  37275. this.format.concise = oldConcise;
  37276. this._insideAux = oldInAux;
  37277. }
  37278. _maybeAddAuxComment(enteredPositionlessNode) {
  37279. if (enteredPositionlessNode)
  37280. this._printAuxBeforeComment();
  37281. if (!this._insideAux)
  37282. this._printAuxAfterComment();
  37283. }
  37284. _printAuxBeforeComment() {
  37285. if (this._printAuxAfterOnNextUserNode)
  37286. return;
  37287. this._printAuxAfterOnNextUserNode = true;
  37288. const comment2 = this.format.auxiliaryCommentBefore;
  37289. if (comment2) {
  37290. this._printComment({
  37291. type: "CommentBlock",
  37292. value: comment2
  37293. });
  37294. }
  37295. }
  37296. _printAuxAfterComment() {
  37297. if (!this._printAuxAfterOnNextUserNode)
  37298. return;
  37299. this._printAuxAfterOnNextUserNode = false;
  37300. const comment2 = this.format.auxiliaryCommentAfter;
  37301. if (comment2) {
  37302. this._printComment({
  37303. type: "CommentBlock",
  37304. value: comment2
  37305. });
  37306. }
  37307. }
  37308. getPossibleRaw(node) {
  37309. const extra = node.extra;
  37310. if (extra && extra.raw != null && extra.rawValue != null && node.value === extra.rawValue) {
  37311. return extra.raw;
  37312. }
  37313. }
  37314. printJoin(nodes, parent, opts = {}) {
  37315. if (!(nodes != null && nodes.length))
  37316. return;
  37317. if (opts.indent)
  37318. this.indent();
  37319. const newlineOpts = {
  37320. addNewlines: opts.addNewlines
  37321. };
  37322. for (let i = 0; i < nodes.length; i++) {
  37323. const node = nodes[i];
  37324. if (!node)
  37325. continue;
  37326. if (opts.statement)
  37327. this._printNewline(true, node, parent, newlineOpts);
  37328. this.print(node, parent);
  37329. if (opts.iterator) {
  37330. opts.iterator(node, i);
  37331. }
  37332. if (opts.separator && i < nodes.length - 1) {
  37333. opts.separator.call(this);
  37334. }
  37335. if (opts.statement)
  37336. this._printNewline(false, node, parent, newlineOpts);
  37337. }
  37338. if (opts.indent)
  37339. this.dedent();
  37340. }
  37341. printAndIndentOnComments(node, parent) {
  37342. const indent = node.leadingComments && node.leadingComments.length > 0;
  37343. if (indent)
  37344. this.indent();
  37345. this.print(node, parent);
  37346. if (indent)
  37347. this.dedent();
  37348. }
  37349. printBlock(parent) {
  37350. const node = parent.body;
  37351. if (!t2.isEmptyStatement(node)) {
  37352. this.space();
  37353. }
  37354. this.print(node, parent);
  37355. }
  37356. _printTrailingComments(node) {
  37357. this._printComments(this._getComments(false, node));
  37358. }
  37359. _printLeadingComments(node) {
  37360. this._printComments(this._getComments(true, node), true);
  37361. }
  37362. printInnerComments(node, indent = true) {
  37363. var _node$innerComments;
  37364. if (!((_node$innerComments = node.innerComments) != null && _node$innerComments.length))
  37365. return;
  37366. if (indent)
  37367. this.indent();
  37368. this._printComments(node.innerComments);
  37369. if (indent)
  37370. this.dedent();
  37371. }
  37372. printSequence(nodes, parent, opts = {}) {
  37373. opts.statement = true;
  37374. return this.printJoin(nodes, parent, opts);
  37375. }
  37376. printList(items, parent, opts = {}) {
  37377. if (opts.separator == null) {
  37378. opts.separator = commaSeparator;
  37379. }
  37380. return this.printJoin(items, parent, opts);
  37381. }
  37382. _printNewline(leading, node, parent, opts) {
  37383. if (this.format.retainLines || this.format.compact)
  37384. return;
  37385. if (this.format.concise) {
  37386. this.space();
  37387. return;
  37388. }
  37389. let lines = 0;
  37390. if (this._buf.hasContent()) {
  37391. if (!leading)
  37392. lines++;
  37393. if (opts.addNewlines)
  37394. lines += opts.addNewlines(leading, node) || 0;
  37395. const needs = leading ? n.needsWhitespaceBefore : n.needsWhitespaceAfter;
  37396. if (needs(node, parent))
  37397. lines++;
  37398. }
  37399. this.newline(lines);
  37400. }
  37401. _getComments(leading, node) {
  37402. return node && (leading ? node.leadingComments : node.trailingComments) || [];
  37403. }
  37404. _printComment(comment2, skipNewLines) {
  37405. if (!this.format.shouldPrintComment(comment2.value))
  37406. return;
  37407. if (comment2.ignore)
  37408. return;
  37409. if (this._printedComments.has(comment2))
  37410. return;
  37411. this._printedComments.add(comment2);
  37412. const isBlockComment = comment2.type === "CommentBlock";
  37413. const printNewLines = isBlockComment && !skipNewLines && !this._noLineTerminator;
  37414. if (printNewLines && this._buf.hasContent())
  37415. this.newline(1);
  37416. if (!this.endsWith("[") && !this.endsWith("{"))
  37417. this.space();
  37418. let val = !isBlockComment && !this._noLineTerminator ? `//${comment2.value}
  37419. ` : `/*${comment2.value}*/`;
  37420. if (isBlockComment && this.format.indent.adjustMultilineComment) {
  37421. var _comment$loc;
  37422. const offset2 = (_comment$loc = comment2.loc) == null ? void 0 : _comment$loc.start.column;
  37423. if (offset2) {
  37424. const newlineRegex = new RegExp("\\n\\s{1," + offset2 + "}", "g");
  37425. val = val.replace(newlineRegex, "\n");
  37426. }
  37427. const indentSize = Math.max(this._getIndent().length, this.format.retainLines ? 0 : this._buf.getCurrentColumn());
  37428. val = val.replace(/\n(?!$)/g, `
  37429. ${" ".repeat(indentSize)}`);
  37430. }
  37431. if (this.endsWith("/"))
  37432. this._space();
  37433. this.withSource("start", comment2.loc, () => {
  37434. this._append(val);
  37435. });
  37436. if (printNewLines)
  37437. this.newline(1);
  37438. }
  37439. _printComments(comments, inlinePureAnnotation) {
  37440. if (!(comments != null && comments.length))
  37441. return;
  37442. if (inlinePureAnnotation && comments.length === 1 && PURE_ANNOTATION_RE.test(comments[0].value)) {
  37443. this._printComment(comments[0], this._buf.hasContent() && !this.endsWith("\n"));
  37444. } else {
  37445. for (const comment2 of comments) {
  37446. this._printComment(comment2);
  37447. }
  37448. }
  37449. }
  37450. printAssertions(node) {
  37451. var _node$assertions;
  37452. if ((_node$assertions = node.assertions) != null && _node$assertions.length) {
  37453. this.space();
  37454. this.word("assert");
  37455. this.space();
  37456. this.token("{");
  37457. this.space();
  37458. this.printList(node.assertions, node);
  37459. this.space();
  37460. this.token("}");
  37461. }
  37462. }
  37463. };
  37464. Object.assign(Printer.prototype, generatorFunctions);
  37465. {
  37466. Printer.prototype.Noop = function Noop() {
  37467. };
  37468. }
  37469. var _default = Printer;
  37470. exports.default = _default;
  37471. function commaSeparator() {
  37472. this.token(",");
  37473. this.space();
  37474. }
  37475. }
  37476. });
  37477. // node_modules/estree-to-babel/node_modules/@babel/generator/lib/index.js
  37478. var require_lib6 = __commonJS({
  37479. "node_modules/estree-to-babel/node_modules/@babel/generator/lib/index.js"(exports) {
  37480. "use strict";
  37481. Object.defineProperty(exports, "__esModule", {
  37482. value: true
  37483. });
  37484. exports.default = generate2;
  37485. exports.CodeGenerator = void 0;
  37486. var _sourceMap = require_source_map2();
  37487. var _printer = require_printer();
  37488. var Generator = class extends _printer.default {
  37489. constructor(ast, opts = {}, code2) {
  37490. const format = normalizeOptions(code2, opts);
  37491. const map = opts.sourceMaps ? new _sourceMap.default(opts, code2) : null;
  37492. super(format, map);
  37493. this.ast = void 0;
  37494. this.ast = ast;
  37495. }
  37496. generate() {
  37497. return super.generate(this.ast);
  37498. }
  37499. };
  37500. function normalizeOptions(code2, opts) {
  37501. const format = {
  37502. auxiliaryCommentBefore: opts.auxiliaryCommentBefore,
  37503. auxiliaryCommentAfter: opts.auxiliaryCommentAfter,
  37504. shouldPrintComment: opts.shouldPrintComment,
  37505. retainLines: opts.retainLines,
  37506. retainFunctionParens: opts.retainFunctionParens,
  37507. comments: opts.comments == null || opts.comments,
  37508. compact: opts.compact,
  37509. minified: opts.minified,
  37510. concise: opts.concise,
  37511. indent: {
  37512. adjustMultilineComment: true,
  37513. style: " ",
  37514. base: 0
  37515. },
  37516. decoratorsBeforeExport: !!opts.decoratorsBeforeExport,
  37517. jsescOption: Object.assign({
  37518. quotes: "double",
  37519. wrap: true,
  37520. minimal: false
  37521. }, opts.jsescOption),
  37522. recordAndTupleSyntaxType: opts.recordAndTupleSyntaxType
  37523. };
  37524. {
  37525. format.jsonCompatibleStrings = opts.jsonCompatibleStrings;
  37526. }
  37527. if (format.minified) {
  37528. format.compact = true;
  37529. format.shouldPrintComment = format.shouldPrintComment || (() => format.comments);
  37530. } else {
  37531. format.shouldPrintComment = format.shouldPrintComment || ((value) => format.comments || value.indexOf("@license") >= 0 || value.indexOf("@preserve") >= 0);
  37532. }
  37533. if (format.compact === "auto") {
  37534. format.compact = code2.length > 5e5;
  37535. if (format.compact) {
  37536. console.error(`[BABEL] Note: The code generator has deoptimised the styling of ${opts.filename} as it exceeds the max of ${"500KB"}.`);
  37537. }
  37538. }
  37539. if (format.compact) {
  37540. format.indent.adjustMultilineComment = false;
  37541. }
  37542. return format;
  37543. }
  37544. var CodeGenerator = class {
  37545. constructor(ast, opts, code2) {
  37546. this._generator = void 0;
  37547. this._generator = new Generator(ast, opts, code2);
  37548. }
  37549. generate() {
  37550. return this._generator.generate();
  37551. }
  37552. };
  37553. exports.CodeGenerator = CodeGenerator;
  37554. function generate2(ast, opts, code2) {
  37555. const gen = new Generator(ast, opts, code2);
  37556. return gen.generate();
  37557. }
  37558. }
  37559. });
  37560. // node_modules/estree-to-babel/node_modules/@babel/traverse/lib/path/ancestry.js
  37561. var require_ancestry = __commonJS({
  37562. "node_modules/estree-to-babel/node_modules/@babel/traverse/lib/path/ancestry.js"(exports) {
  37563. "use strict";
  37564. Object.defineProperty(exports, "__esModule", {
  37565. value: true
  37566. });
  37567. exports.findParent = findParent;
  37568. exports.find = find2;
  37569. exports.getFunctionParent = getFunctionParent;
  37570. exports.getStatementParent = getStatementParent;
  37571. exports.getEarliestCommonAncestorFrom = getEarliestCommonAncestorFrom;
  37572. exports.getDeepestCommonAncestorFrom = getDeepestCommonAncestorFrom;
  37573. exports.getAncestry = getAncestry;
  37574. exports.isAncestor = isAncestor;
  37575. exports.isDescendant = isDescendant;
  37576. exports.inType = inType;
  37577. var t2 = require_lib4();
  37578. var _index = require_path();
  37579. function findParent(callback) {
  37580. let path = this;
  37581. while (path = path.parentPath) {
  37582. if (callback(path))
  37583. return path;
  37584. }
  37585. return null;
  37586. }
  37587. function find2(callback) {
  37588. let path = this;
  37589. do {
  37590. if (callback(path))
  37591. return path;
  37592. } while (path = path.parentPath);
  37593. return null;
  37594. }
  37595. function getFunctionParent() {
  37596. return this.findParent((p) => p.isFunction());
  37597. }
  37598. function getStatementParent() {
  37599. let path = this;
  37600. do {
  37601. if (!path.parentPath || Array.isArray(path.container) && path.isStatement()) {
  37602. break;
  37603. } else {
  37604. path = path.parentPath;
  37605. }
  37606. } while (path);
  37607. if (path && (path.isProgram() || path.isFile())) {
  37608. throw new Error("File/Program node, we can't possibly find a statement parent to this");
  37609. }
  37610. return path;
  37611. }
  37612. function getEarliestCommonAncestorFrom(paths) {
  37613. return this.getDeepestCommonAncestorFrom(paths, function(deepest, i, ancestries) {
  37614. let earliest;
  37615. const keys2 = t2.VISITOR_KEYS[deepest.type];
  37616. for (const ancestry of ancestries) {
  37617. const path = ancestry[i + 1];
  37618. if (!earliest) {
  37619. earliest = path;
  37620. continue;
  37621. }
  37622. if (path.listKey && earliest.listKey === path.listKey) {
  37623. if (path.key < earliest.key) {
  37624. earliest = path;
  37625. continue;
  37626. }
  37627. }
  37628. const earliestKeyIndex = keys2.indexOf(earliest.parentKey);
  37629. const currentKeyIndex = keys2.indexOf(path.parentKey);
  37630. if (earliestKeyIndex > currentKeyIndex) {
  37631. earliest = path;
  37632. }
  37633. }
  37634. return earliest;
  37635. });
  37636. }
  37637. function getDeepestCommonAncestorFrom(paths, filter) {
  37638. if (!paths.length) {
  37639. return this;
  37640. }
  37641. if (paths.length === 1) {
  37642. return paths[0];
  37643. }
  37644. let minDepth = Infinity;
  37645. let lastCommonIndex, lastCommon;
  37646. const ancestries = paths.map((path) => {
  37647. const ancestry = [];
  37648. do {
  37649. ancestry.unshift(path);
  37650. } while ((path = path.parentPath) && path !== this);
  37651. if (ancestry.length < minDepth) {
  37652. minDepth = ancestry.length;
  37653. }
  37654. return ancestry;
  37655. });
  37656. const first = ancestries[0];
  37657. depthLoop:
  37658. for (let i = 0; i < minDepth; i++) {
  37659. const shouldMatch = first[i];
  37660. for (const ancestry of ancestries) {
  37661. if (ancestry[i] !== shouldMatch) {
  37662. break depthLoop;
  37663. }
  37664. }
  37665. lastCommonIndex = i;
  37666. lastCommon = shouldMatch;
  37667. }
  37668. if (lastCommon) {
  37669. if (filter) {
  37670. return filter(lastCommon, lastCommonIndex, ancestries);
  37671. } else {
  37672. return lastCommon;
  37673. }
  37674. } else {
  37675. throw new Error("Couldn't find intersection");
  37676. }
  37677. }
  37678. function getAncestry() {
  37679. let path = this;
  37680. const paths = [];
  37681. do {
  37682. paths.push(path);
  37683. } while (path = path.parentPath);
  37684. return paths;
  37685. }
  37686. function isAncestor(maybeDescendant) {
  37687. return maybeDescendant.isDescendant(this);
  37688. }
  37689. function isDescendant(maybeAncestor) {
  37690. return !!this.findParent((parent) => parent === maybeAncestor);
  37691. }
  37692. function inType(...candidateTypes) {
  37693. let path = this;
  37694. while (path) {
  37695. for (const type of candidateTypes) {
  37696. if (path.node.type === type)
  37697. return true;
  37698. }
  37699. path = path.parentPath;
  37700. }
  37701. return false;
  37702. }
  37703. }
  37704. });
  37705. // node_modules/estree-to-babel/node_modules/@babel/traverse/lib/path/inference/inferer-reference.js
  37706. var require_inferer_reference = __commonJS({
  37707. "node_modules/estree-to-babel/node_modules/@babel/traverse/lib/path/inference/inferer-reference.js"(exports) {
  37708. "use strict";
  37709. Object.defineProperty(exports, "__esModule", {
  37710. value: true
  37711. });
  37712. exports.default = _default;
  37713. var t2 = require_lib4();
  37714. function _default(node) {
  37715. if (!this.isReferenced())
  37716. return;
  37717. const binding = this.scope.getBinding(node.name);
  37718. if (binding) {
  37719. if (binding.identifier.typeAnnotation) {
  37720. return binding.identifier.typeAnnotation;
  37721. } else {
  37722. return getTypeAnnotationBindingConstantViolations(binding, this, node.name);
  37723. }
  37724. }
  37725. if (node.name === "undefined") {
  37726. return t2.voidTypeAnnotation();
  37727. } else if (node.name === "NaN" || node.name === "Infinity") {
  37728. return t2.numberTypeAnnotation();
  37729. } else if (node.name === "arguments") {
  37730. }
  37731. }
  37732. function getTypeAnnotationBindingConstantViolations(binding, path, name2) {
  37733. const types2 = [];
  37734. const functionConstantViolations = [];
  37735. let constantViolations = getConstantViolationsBefore(binding, path, functionConstantViolations);
  37736. const testType = getConditionalAnnotation(binding, path, name2);
  37737. if (testType) {
  37738. const testConstantViolations = getConstantViolationsBefore(binding, testType.ifStatement);
  37739. constantViolations = constantViolations.filter((path2) => testConstantViolations.indexOf(path2) < 0);
  37740. types2.push(testType.typeAnnotation);
  37741. }
  37742. if (constantViolations.length) {
  37743. constantViolations = constantViolations.concat(functionConstantViolations);
  37744. for (const violation of constantViolations) {
  37745. types2.push(violation.getTypeAnnotation());
  37746. }
  37747. }
  37748. if (!types2.length) {
  37749. return;
  37750. }
  37751. if (t2.isTSTypeAnnotation(types2[0]) && t2.createTSUnionType) {
  37752. return t2.createTSUnionType(types2);
  37753. }
  37754. if (t2.createFlowUnionType) {
  37755. return t2.createFlowUnionType(types2);
  37756. }
  37757. return t2.createUnionTypeAnnotation(types2);
  37758. }
  37759. function getConstantViolationsBefore(binding, path, functions) {
  37760. const violations = binding.constantViolations.slice();
  37761. violations.unshift(binding.path);
  37762. return violations.filter((violation) => {
  37763. violation = violation.resolve();
  37764. const status = violation._guessExecutionStatusRelativeTo(path);
  37765. if (functions && status === "unknown")
  37766. functions.push(violation);
  37767. return status === "before";
  37768. });
  37769. }
  37770. function inferAnnotationFromBinaryExpression(name2, path) {
  37771. const operator = path.node.operator;
  37772. const right = path.get("right").resolve();
  37773. const left = path.get("left").resolve();
  37774. let target;
  37775. if (left.isIdentifier({
  37776. name: name2
  37777. })) {
  37778. target = right;
  37779. } else if (right.isIdentifier({
  37780. name: name2
  37781. })) {
  37782. target = left;
  37783. }
  37784. if (target) {
  37785. if (operator === "===") {
  37786. return target.getTypeAnnotation();
  37787. }
  37788. if (t2.BOOLEAN_NUMBER_BINARY_OPERATORS.indexOf(operator) >= 0) {
  37789. return t2.numberTypeAnnotation();
  37790. }
  37791. return;
  37792. }
  37793. if (operator !== "===" && operator !== "==")
  37794. return;
  37795. let typeofPath;
  37796. let typePath;
  37797. if (left.isUnaryExpression({
  37798. operator: "typeof"
  37799. })) {
  37800. typeofPath = left;
  37801. typePath = right;
  37802. } else if (right.isUnaryExpression({
  37803. operator: "typeof"
  37804. })) {
  37805. typeofPath = right;
  37806. typePath = left;
  37807. }
  37808. if (!typeofPath)
  37809. return;
  37810. if (!typeofPath.get("argument").isIdentifier({
  37811. name: name2
  37812. }))
  37813. return;
  37814. typePath = typePath.resolve();
  37815. if (!typePath.isLiteral())
  37816. return;
  37817. const typeValue = typePath.node.value;
  37818. if (typeof typeValue !== "string")
  37819. return;
  37820. return t2.createTypeAnnotationBasedOnTypeof(typeValue);
  37821. }
  37822. function getParentConditionalPath(binding, path, name2) {
  37823. let parentPath;
  37824. while (parentPath = path.parentPath) {
  37825. if (parentPath.isIfStatement() || parentPath.isConditionalExpression()) {
  37826. if (path.key === "test") {
  37827. return;
  37828. }
  37829. return parentPath;
  37830. }
  37831. if (parentPath.isFunction()) {
  37832. if (parentPath.parentPath.scope.getBinding(name2) !== binding)
  37833. return;
  37834. }
  37835. path = parentPath;
  37836. }
  37837. }
  37838. function getConditionalAnnotation(binding, path, name2) {
  37839. const ifStatement = getParentConditionalPath(binding, path, name2);
  37840. if (!ifStatement)
  37841. return;
  37842. const test = ifStatement.get("test");
  37843. const paths = [test];
  37844. const types2 = [];
  37845. for (let i = 0; i < paths.length; i++) {
  37846. const path2 = paths[i];
  37847. if (path2.isLogicalExpression()) {
  37848. if (path2.node.operator === "&&") {
  37849. paths.push(path2.get("left"));
  37850. paths.push(path2.get("right"));
  37851. }
  37852. } else if (path2.isBinaryExpression()) {
  37853. const type = inferAnnotationFromBinaryExpression(name2, path2);
  37854. if (type)
  37855. types2.push(type);
  37856. }
  37857. }
  37858. if (types2.length) {
  37859. if (t2.isTSTypeAnnotation(types2[0]) && t2.createTSUnionType) {
  37860. return {
  37861. typeAnnotation: t2.createTSUnionType(types2),
  37862. ifStatement
  37863. };
  37864. }
  37865. if (t2.createFlowUnionType) {
  37866. return {
  37867. typeAnnotation: t2.createFlowUnionType(types2),
  37868. ifStatement
  37869. };
  37870. }
  37871. return {
  37872. typeAnnotation: t2.createUnionTypeAnnotation(types2),
  37873. ifStatement
  37874. };
  37875. }
  37876. return getConditionalAnnotation(ifStatement, name2);
  37877. }
  37878. }
  37879. });
  37880. // node_modules/estree-to-babel/node_modules/@babel/traverse/lib/path/inference/inferers.js
  37881. var require_inferers = __commonJS({
  37882. "node_modules/estree-to-babel/node_modules/@babel/traverse/lib/path/inference/inferers.js"(exports) {
  37883. "use strict";
  37884. Object.defineProperty(exports, "__esModule", {
  37885. value: true
  37886. });
  37887. exports.VariableDeclarator = VariableDeclarator;
  37888. exports.TypeCastExpression = TypeCastExpression;
  37889. exports.NewExpression = NewExpression;
  37890. exports.TemplateLiteral = TemplateLiteral;
  37891. exports.UnaryExpression = UnaryExpression;
  37892. exports.BinaryExpression = BinaryExpression2;
  37893. exports.LogicalExpression = LogicalExpression;
  37894. exports.ConditionalExpression = ConditionalExpression;
  37895. exports.SequenceExpression = SequenceExpression;
  37896. exports.ParenthesizedExpression = ParenthesizedExpression;
  37897. exports.AssignmentExpression = AssignmentExpression;
  37898. exports.UpdateExpression = UpdateExpression;
  37899. exports.StringLiteral = StringLiteral;
  37900. exports.NumericLiteral = NumericLiteral;
  37901. exports.BooleanLiteral = BooleanLiteral;
  37902. exports.NullLiteral = NullLiteral;
  37903. exports.RegExpLiteral = RegExpLiteral;
  37904. exports.ObjectExpression = ObjectExpression;
  37905. exports.ArrayExpression = ArrayExpression2;
  37906. exports.RestElement = RestElement2;
  37907. exports.ClassDeclaration = exports.ClassExpression = exports.FunctionDeclaration = exports.ArrowFunctionExpression = exports.FunctionExpression = Func;
  37908. exports.CallExpression = CallExpression;
  37909. exports.TaggedTemplateExpression = TaggedTemplateExpression;
  37910. Object.defineProperty(exports, "Identifier", {
  37911. enumerable: true,
  37912. get: function() {
  37913. return _infererReference.default;
  37914. }
  37915. });
  37916. var t2 = require_lib4();
  37917. var _infererReference = require_inferer_reference();
  37918. function VariableDeclarator() {
  37919. var _type;
  37920. const id = this.get("id");
  37921. if (!id.isIdentifier())
  37922. return;
  37923. const init = this.get("init");
  37924. let type = init.getTypeAnnotation();
  37925. if (((_type = type) == null ? void 0 : _type.type) === "AnyTypeAnnotation") {
  37926. if (init.isCallExpression() && init.get("callee").isIdentifier({
  37927. name: "Array"
  37928. }) && !init.scope.hasBinding("Array", true)) {
  37929. type = ArrayExpression2();
  37930. }
  37931. }
  37932. return type;
  37933. }
  37934. function TypeCastExpression(node) {
  37935. return node.typeAnnotation;
  37936. }
  37937. TypeCastExpression.validParent = true;
  37938. function NewExpression(node) {
  37939. if (this.get("callee").isIdentifier()) {
  37940. return t2.genericTypeAnnotation(node.callee);
  37941. }
  37942. }
  37943. function TemplateLiteral() {
  37944. return t2.stringTypeAnnotation();
  37945. }
  37946. function UnaryExpression(node) {
  37947. const operator = node.operator;
  37948. if (operator === "void") {
  37949. return t2.voidTypeAnnotation();
  37950. } else if (t2.NUMBER_UNARY_OPERATORS.indexOf(operator) >= 0) {
  37951. return t2.numberTypeAnnotation();
  37952. } else if (t2.STRING_UNARY_OPERATORS.indexOf(operator) >= 0) {
  37953. return t2.stringTypeAnnotation();
  37954. } else if (t2.BOOLEAN_UNARY_OPERATORS.indexOf(operator) >= 0) {
  37955. return t2.booleanTypeAnnotation();
  37956. }
  37957. }
  37958. function BinaryExpression2(node) {
  37959. const operator = node.operator;
  37960. if (t2.NUMBER_BINARY_OPERATORS.indexOf(operator) >= 0) {
  37961. return t2.numberTypeAnnotation();
  37962. } else if (t2.BOOLEAN_BINARY_OPERATORS.indexOf(operator) >= 0) {
  37963. return t2.booleanTypeAnnotation();
  37964. } else if (operator === "+") {
  37965. const right = this.get("right");
  37966. const left = this.get("left");
  37967. if (left.isBaseType("number") && right.isBaseType("number")) {
  37968. return t2.numberTypeAnnotation();
  37969. } else if (left.isBaseType("string") || right.isBaseType("string")) {
  37970. return t2.stringTypeAnnotation();
  37971. }
  37972. return t2.unionTypeAnnotation([t2.stringTypeAnnotation(), t2.numberTypeAnnotation()]);
  37973. }
  37974. }
  37975. function LogicalExpression() {
  37976. const argumentTypes = [this.get("left").getTypeAnnotation(), this.get("right").getTypeAnnotation()];
  37977. if (t2.isTSTypeAnnotation(argumentTypes[0]) && t2.createTSUnionType) {
  37978. return t2.createTSUnionType(argumentTypes);
  37979. }
  37980. if (t2.createFlowUnionType) {
  37981. return t2.createFlowUnionType(argumentTypes);
  37982. }
  37983. return t2.createUnionTypeAnnotation(argumentTypes);
  37984. }
  37985. function ConditionalExpression() {
  37986. const argumentTypes = [this.get("consequent").getTypeAnnotation(), this.get("alternate").getTypeAnnotation()];
  37987. if (t2.isTSTypeAnnotation(argumentTypes[0]) && t2.createTSUnionType) {
  37988. return t2.createTSUnionType(argumentTypes);
  37989. }
  37990. if (t2.createFlowUnionType) {
  37991. return t2.createFlowUnionType(argumentTypes);
  37992. }
  37993. return t2.createUnionTypeAnnotation(argumentTypes);
  37994. }
  37995. function SequenceExpression() {
  37996. return this.get("expressions").pop().getTypeAnnotation();
  37997. }
  37998. function ParenthesizedExpression() {
  37999. return this.get("expression").getTypeAnnotation();
  38000. }
  38001. function AssignmentExpression() {
  38002. return this.get("right").getTypeAnnotation();
  38003. }
  38004. function UpdateExpression(node) {
  38005. const operator = node.operator;
  38006. if (operator === "++" || operator === "--") {
  38007. return t2.numberTypeAnnotation();
  38008. }
  38009. }
  38010. function StringLiteral() {
  38011. return t2.stringTypeAnnotation();
  38012. }
  38013. function NumericLiteral() {
  38014. return t2.numberTypeAnnotation();
  38015. }
  38016. function BooleanLiteral() {
  38017. return t2.booleanTypeAnnotation();
  38018. }
  38019. function NullLiteral() {
  38020. return t2.nullLiteralTypeAnnotation();
  38021. }
  38022. function RegExpLiteral() {
  38023. return t2.genericTypeAnnotation(t2.identifier("RegExp"));
  38024. }
  38025. function ObjectExpression() {
  38026. return t2.genericTypeAnnotation(t2.identifier("Object"));
  38027. }
  38028. function ArrayExpression2() {
  38029. return t2.genericTypeAnnotation(t2.identifier("Array"));
  38030. }
  38031. function RestElement2() {
  38032. return ArrayExpression2();
  38033. }
  38034. RestElement2.validParent = true;
  38035. function Func() {
  38036. return t2.genericTypeAnnotation(t2.identifier("Function"));
  38037. }
  38038. var isArrayFrom = t2.buildMatchMemberExpression("Array.from");
  38039. var isObjectKeys = t2.buildMatchMemberExpression("Object.keys");
  38040. var isObjectValues = t2.buildMatchMemberExpression("Object.values");
  38041. var isObjectEntries = t2.buildMatchMemberExpression("Object.entries");
  38042. function CallExpression() {
  38043. const {
  38044. callee
  38045. } = this.node;
  38046. if (isObjectKeys(callee)) {
  38047. return t2.arrayTypeAnnotation(t2.stringTypeAnnotation());
  38048. } else if (isArrayFrom(callee) || isObjectValues(callee)) {
  38049. return t2.arrayTypeAnnotation(t2.anyTypeAnnotation());
  38050. } else if (isObjectEntries(callee)) {
  38051. return t2.arrayTypeAnnotation(t2.tupleTypeAnnotation([t2.stringTypeAnnotation(), t2.anyTypeAnnotation()]));
  38052. }
  38053. return resolveCall(this.get("callee"));
  38054. }
  38055. function TaggedTemplateExpression() {
  38056. return resolveCall(this.get("tag"));
  38057. }
  38058. function resolveCall(callee) {
  38059. callee = callee.resolve();
  38060. if (callee.isFunction()) {
  38061. if (callee.is("async")) {
  38062. if (callee.is("generator")) {
  38063. return t2.genericTypeAnnotation(t2.identifier("AsyncIterator"));
  38064. } else {
  38065. return t2.genericTypeAnnotation(t2.identifier("Promise"));
  38066. }
  38067. } else {
  38068. if (callee.node.returnType) {
  38069. return callee.node.returnType;
  38070. } else {
  38071. }
  38072. }
  38073. }
  38074. }
  38075. }
  38076. });
  38077. // node_modules/estree-to-babel/node_modules/@babel/traverse/lib/path/inference/index.js
  38078. var require_inference = __commonJS({
  38079. "node_modules/estree-to-babel/node_modules/@babel/traverse/lib/path/inference/index.js"(exports) {
  38080. "use strict";
  38081. Object.defineProperty(exports, "__esModule", {
  38082. value: true
  38083. });
  38084. exports.getTypeAnnotation = getTypeAnnotation;
  38085. exports._getTypeAnnotation = _getTypeAnnotation;
  38086. exports.isBaseType = isBaseType;
  38087. exports.couldBeBaseType = couldBeBaseType;
  38088. exports.baseTypeStrictlyMatches = baseTypeStrictlyMatches;
  38089. exports.isGenericType = isGenericType;
  38090. var inferers = require_inferers();
  38091. var t2 = require_lib4();
  38092. function getTypeAnnotation() {
  38093. if (this.typeAnnotation)
  38094. return this.typeAnnotation;
  38095. let type = this._getTypeAnnotation() || t2.anyTypeAnnotation();
  38096. if (t2.isTypeAnnotation(type))
  38097. type = type.typeAnnotation;
  38098. return this.typeAnnotation = type;
  38099. }
  38100. var typeAnnotationInferringNodes = /* @__PURE__ */ new WeakSet();
  38101. function _getTypeAnnotation() {
  38102. const node = this.node;
  38103. if (!node) {
  38104. if (this.key === "init" && this.parentPath.isVariableDeclarator()) {
  38105. const declar = this.parentPath.parentPath;
  38106. const declarParent = declar.parentPath;
  38107. if (declar.key === "left" && declarParent.isForInStatement()) {
  38108. return t2.stringTypeAnnotation();
  38109. }
  38110. if (declar.key === "left" && declarParent.isForOfStatement()) {
  38111. return t2.anyTypeAnnotation();
  38112. }
  38113. return t2.voidTypeAnnotation();
  38114. } else {
  38115. return;
  38116. }
  38117. }
  38118. if (node.typeAnnotation) {
  38119. return node.typeAnnotation;
  38120. }
  38121. if (typeAnnotationInferringNodes.has(node)) {
  38122. return;
  38123. }
  38124. typeAnnotationInferringNodes.add(node);
  38125. try {
  38126. var _inferer;
  38127. let inferer = inferers[node.type];
  38128. if (inferer) {
  38129. return inferer.call(this, node);
  38130. }
  38131. inferer = inferers[this.parentPath.type];
  38132. if ((_inferer = inferer) != null && _inferer.validParent) {
  38133. return this.parentPath.getTypeAnnotation();
  38134. }
  38135. } finally {
  38136. typeAnnotationInferringNodes.delete(node);
  38137. }
  38138. }
  38139. function isBaseType(baseName, soft) {
  38140. return _isBaseType(baseName, this.getTypeAnnotation(), soft);
  38141. }
  38142. function _isBaseType(baseName, type, soft) {
  38143. if (baseName === "string") {
  38144. return t2.isStringTypeAnnotation(type);
  38145. } else if (baseName === "number") {
  38146. return t2.isNumberTypeAnnotation(type);
  38147. } else if (baseName === "boolean") {
  38148. return t2.isBooleanTypeAnnotation(type);
  38149. } else if (baseName === "any") {
  38150. return t2.isAnyTypeAnnotation(type);
  38151. } else if (baseName === "mixed") {
  38152. return t2.isMixedTypeAnnotation(type);
  38153. } else if (baseName === "empty") {
  38154. return t2.isEmptyTypeAnnotation(type);
  38155. } else if (baseName === "void") {
  38156. return t2.isVoidTypeAnnotation(type);
  38157. } else {
  38158. if (soft) {
  38159. return false;
  38160. } else {
  38161. throw new Error(`Unknown base type ${baseName}`);
  38162. }
  38163. }
  38164. }
  38165. function couldBeBaseType(name2) {
  38166. const type = this.getTypeAnnotation();
  38167. if (t2.isAnyTypeAnnotation(type))
  38168. return true;
  38169. if (t2.isUnionTypeAnnotation(type)) {
  38170. for (const type2 of type.types) {
  38171. if (t2.isAnyTypeAnnotation(type2) || _isBaseType(name2, type2, true)) {
  38172. return true;
  38173. }
  38174. }
  38175. return false;
  38176. } else {
  38177. return _isBaseType(name2, type, true);
  38178. }
  38179. }
  38180. function baseTypeStrictlyMatches(rightArg) {
  38181. const left = this.getTypeAnnotation();
  38182. const right = rightArg.getTypeAnnotation();
  38183. if (!t2.isAnyTypeAnnotation(left) && t2.isFlowBaseAnnotation(left)) {
  38184. return right.type === left.type;
  38185. }
  38186. return false;
  38187. }
  38188. function isGenericType(genericName) {
  38189. const type = this.getTypeAnnotation();
  38190. return t2.isGenericTypeAnnotation(type) && t2.isIdentifier(type.id, {
  38191. name: genericName
  38192. });
  38193. }
  38194. }
  38195. });
  38196. // node_modules/@babel/highlight/node_modules/@babel/helper-validator-identifier/lib/identifier.js
  38197. var require_identifier3 = __commonJS({
  38198. "node_modules/@babel/highlight/node_modules/@babel/helper-validator-identifier/lib/identifier.js"(exports) {
  38199. "use strict";
  38200. Object.defineProperty(exports, "__esModule", {
  38201. value: true
  38202. });
  38203. exports.isIdentifierStart = isIdentifierStart2;
  38204. exports.isIdentifierChar = isIdentifierChar2;
  38205. exports.isIdentifierName = isIdentifierName;
  38206. var nonASCIIidentifierStartChars2 = "\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u08A0-\u08B4\u08B6-\u08C7\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1878\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309B-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u31BF\u31F0-\u31FF\u3400-\u4DBF\u4E00-\u9FFC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7BF\uA7C2-\uA7CA\uA7F5-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC";
  38207. var nonASCIIidentifierChars2 = "\u200C\u200D\xB7\u0300-\u036F\u0387\u0483-\u0487\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u0669\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u06F0-\u06F9\u0711\u0730-\u074A\u07A6-\u07B0\u07C0-\u07C9\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u08D3-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0966-\u096F\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u09E6-\u09EF\u09FE\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A66-\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0AE6-\u0AEF\u0AFA-\u0AFF\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B55-\u0B57\u0B62\u0B63\u0B66-\u0B6F\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0BE6-\u0BEF\u0C00-\u0C04\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C66-\u0C6F\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0CE6-\u0CEF\u0D00-\u0D03\u0D3B\u0D3C\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D66-\u0D6F\u0D81-\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0E50-\u0E59\u0EB1\u0EB4-\u0EBC\u0EC8-\u0ECD\u0ED0-\u0ED9\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1040-\u1049\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F-\u109D\u135D-\u135F\u1369-\u1371\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u18A9\u1920-\u192B\u1930-\u193B\u1946-\u194F\u19D0-\u19DA\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AB0-\u1ABD\u1ABF\u1AC0\u1B00-\u1B04\u1B34-\u1B44\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BB0-\u1BB9\u1BE6-\u1BF3\u1C24-\u1C37\u1C40-\u1C49\u1C50-\u1C59\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF4\u1CF7-\u1CF9\u1DC0-\u1DF9\u1DFB-\u1DFF\u203F\u2040\u2054\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA620-\uA629\uA66F\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA82C\uA880\uA881\uA8B4-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F1\uA8FF-\uA909\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9D0-\uA9D9\uA9E5\uA9F0-\uA9F9\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA50-\uAA59\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uABF0-\uABF9\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFF10-\uFF19\uFF3F";
  38208. var nonASCIIidentifierStart2 = new RegExp("[" + nonASCIIidentifierStartChars2 + "]");
  38209. var nonASCIIidentifier2 = new RegExp("[" + nonASCIIidentifierStartChars2 + nonASCIIidentifierChars2 + "]");
  38210. nonASCIIidentifierStartChars2 = nonASCIIidentifierChars2 = null;
  38211. var astralIdentifierStartCodes2 = [0, 11, 2, 25, 2, 18, 2, 1, 2, 14, 3, 13, 35, 122, 70, 52, 268, 28, 4, 48, 48, 31, 14, 29, 6, 37, 11, 29, 3, 35, 5, 7, 2, 4, 43, 157, 19, 35, 5, 35, 5, 39, 9, 51, 157, 310, 10, 21, 11, 7, 153, 5, 3, 0, 2, 43, 2, 1, 4, 0, 3, 22, 11, 22, 10, 30, 66, 18, 2, 1, 11, 21, 11, 25, 71, 55, 7, 1, 65, 0, 16, 3, 2, 2, 2, 28, 43, 28, 4, 28, 36, 7, 2, 27, 28, 53, 11, 21, 11, 18, 14, 17, 111, 72, 56, 50, 14, 50, 14, 35, 349, 41, 7, 1, 79, 28, 11, 0, 9, 21, 107, 20, 28, 22, 13, 52, 76, 44, 33, 24, 27, 35, 30, 0, 3, 0, 9, 34, 4, 0, 13, 47, 15, 3, 22, 0, 2, 0, 36, 17, 2, 24, 85, 6, 2, 0, 2, 3, 2, 14, 2, 9, 8, 46, 39, 7, 3, 1, 3, 21, 2, 6, 2, 1, 2, 4, 4, 0, 19, 0, 13, 4, 159, 52, 19, 3, 21, 2, 31, 47, 21, 1, 2, 0, 185, 46, 42, 3, 37, 47, 21, 0, 60, 42, 14, 0, 72, 26, 230, 43, 117, 63, 32, 7, 3, 0, 3, 7, 2, 1, 2, 23, 16, 0, 2, 0, 95, 7, 3, 38, 17, 0, 2, 0, 29, 0, 11, 39, 8, 0, 22, 0, 12, 45, 20, 0, 35, 56, 264, 8, 2, 36, 18, 0, 50, 29, 113, 6, 2, 1, 2, 37, 22, 0, 26, 5, 2, 1, 2, 31, 15, 0, 328, 18, 190, 0, 80, 921, 103, 110, 18, 195, 2749, 1070, 4050, 582, 8634, 568, 8, 30, 114, 29, 19, 47, 17, 3, 32, 20, 6, 18, 689, 63, 129, 74, 6, 0, 67, 12, 65, 1, 2, 0, 29, 6135, 9, 1237, 43, 8, 8952, 286, 50, 2, 18, 3, 9, 395, 2309, 106, 6, 12, 4, 8, 8, 9, 5991, 84, 2, 70, 2, 1, 3, 0, 3, 1, 3, 3, 2, 11, 2, 0, 2, 6, 2, 64, 2, 3, 3, 7, 2, 6, 2, 27, 2, 3, 2, 4, 2, 0, 4, 6, 2, 339, 3, 24, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 7, 2357, 44, 11, 6, 17, 0, 370, 43, 1301, 196, 60, 67, 8, 0, 1205, 3, 2, 26, 2, 1, 2, 0, 3, 0, 2, 9, 2, 3, 2, 0, 2, 0, 7, 0, 5, 0, 2, 0, 2, 0, 2, 2, 2, 1, 2, 0, 3, 0, 2, 0, 2, 0, 2, 0, 2, 0, 2, 1, 2, 0, 3, 3, 2, 6, 2, 3, 2, 3, 2, 0, 2, 9, 2, 16, 6, 2, 2, 4, 2, 16, 4421, 42717, 35, 4148, 12, 221, 3, 5761, 15, 7472, 3104, 541, 1507, 4938];
  38212. var astralIdentifierCodes2 = [509, 0, 227, 0, 150, 4, 294, 9, 1368, 2, 2, 1, 6, 3, 41, 2, 5, 0, 166, 1, 574, 3, 9, 9, 370, 1, 154, 10, 176, 2, 54, 14, 32, 9, 16, 3, 46, 10, 54, 9, 7, 2, 37, 13, 2, 9, 6, 1, 45, 0, 13, 2, 49, 13, 9, 3, 2, 11, 83, 11, 7, 0, 161, 11, 6, 9, 7, 3, 56, 1, 2, 6, 3, 1, 3, 2, 10, 0, 11, 1, 3, 6, 4, 4, 193, 17, 10, 9, 5, 0, 82, 19, 13, 9, 214, 6, 3, 8, 28, 1, 83, 16, 16, 9, 82, 12, 9, 9, 84, 14, 5, 9, 243, 14, 166, 9, 71, 5, 2, 1, 3, 3, 2, 0, 2, 1, 13, 9, 120, 6, 3, 6, 4, 0, 29, 9, 41, 6, 2, 3, 9, 0, 10, 10, 47, 15, 406, 7, 2, 7, 17, 9, 57, 21, 2, 13, 123, 5, 4, 0, 2, 1, 2, 6, 2, 0, 9, 9, 49, 4, 2, 1, 2, 4, 9, 9, 330, 3, 19306, 9, 135, 4, 60, 6, 26, 9, 1014, 0, 2, 54, 8, 3, 82, 0, 12, 1, 19628, 1, 5319, 4, 4, 5, 9, 7, 3, 6, 31, 3, 149, 2, 1418, 49, 513, 54, 5, 49, 9, 0, 15, 0, 23, 4, 2, 14, 1361, 6, 2, 16, 3, 6, 2, 1, 2, 4, 262, 6, 10, 9, 419, 13, 1495, 6, 110, 6, 6, 9, 4759, 9, 787719, 239];
  38213. function isInAstralSet2(code2, set) {
  38214. let pos = 65536;
  38215. for (let i = 0, length = set.length; i < length; i += 2) {
  38216. pos += set[i];
  38217. if (pos > code2)
  38218. return false;
  38219. pos += set[i + 1];
  38220. if (pos >= code2)
  38221. return true;
  38222. }
  38223. return false;
  38224. }
  38225. function isIdentifierStart2(code2) {
  38226. if (code2 < 65)
  38227. return code2 === 36;
  38228. if (code2 <= 90)
  38229. return true;
  38230. if (code2 < 97)
  38231. return code2 === 95;
  38232. if (code2 <= 122)
  38233. return true;
  38234. if (code2 <= 65535) {
  38235. return code2 >= 170 && nonASCIIidentifierStart2.test(String.fromCharCode(code2));
  38236. }
  38237. return isInAstralSet2(code2, astralIdentifierStartCodes2);
  38238. }
  38239. function isIdentifierChar2(code2) {
  38240. if (code2 < 48)
  38241. return code2 === 36;
  38242. if (code2 < 58)
  38243. return true;
  38244. if (code2 < 65)
  38245. return false;
  38246. if (code2 <= 90)
  38247. return true;
  38248. if (code2 < 97)
  38249. return code2 === 95;
  38250. if (code2 <= 122)
  38251. return true;
  38252. if (code2 <= 65535) {
  38253. return code2 >= 170 && nonASCIIidentifier2.test(String.fromCharCode(code2));
  38254. }
  38255. return isInAstralSet2(code2, astralIdentifierStartCodes2) || isInAstralSet2(code2, astralIdentifierCodes2);
  38256. }
  38257. function isIdentifierName(name2) {
  38258. let isFirst = true;
  38259. for (let i = 0; i < name2.length; i++) {
  38260. let cp = name2.charCodeAt(i);
  38261. if ((cp & 64512) === 55296 && i + 1 < name2.length) {
  38262. const trail = name2.charCodeAt(++i);
  38263. if ((trail & 64512) === 56320) {
  38264. cp = 65536 + ((cp & 1023) << 10) + (trail & 1023);
  38265. }
  38266. }
  38267. if (isFirst) {
  38268. isFirst = false;
  38269. if (!isIdentifierStart2(cp)) {
  38270. return false;
  38271. }
  38272. } else if (!isIdentifierChar2(cp)) {
  38273. return false;
  38274. }
  38275. }
  38276. return !isFirst;
  38277. }
  38278. }
  38279. });
  38280. // node_modules/@babel/highlight/node_modules/@babel/helper-validator-identifier/lib/keyword.js
  38281. var require_keyword3 = __commonJS({
  38282. "node_modules/@babel/highlight/node_modules/@babel/helper-validator-identifier/lib/keyword.js"(exports) {
  38283. "use strict";
  38284. Object.defineProperty(exports, "__esModule", {
  38285. value: true
  38286. });
  38287. exports.isReservedWord = isReservedWord;
  38288. exports.isStrictReservedWord = isStrictReservedWord;
  38289. exports.isStrictBindOnlyReservedWord = isStrictBindOnlyReservedWord;
  38290. exports.isStrictBindReservedWord = isStrictBindReservedWord;
  38291. exports.isKeyword = isKeyword;
  38292. var reservedWords2 = {
  38293. keyword: ["break", "case", "catch", "continue", "debugger", "default", "do", "else", "finally", "for", "function", "if", "return", "switch", "throw", "try", "var", "const", "while", "with", "new", "this", "super", "class", "extends", "export", "import", "null", "true", "false", "in", "instanceof", "typeof", "void", "delete"],
  38294. strict: ["implements", "interface", "let", "package", "private", "protected", "public", "static", "yield"],
  38295. strictBind: ["eval", "arguments"]
  38296. };
  38297. var keywords2 = new Set(reservedWords2.keyword);
  38298. var reservedWordsStrictSet = new Set(reservedWords2.strict);
  38299. var reservedWordsStrictBindSet = new Set(reservedWords2.strictBind);
  38300. function isReservedWord(word, inModule) {
  38301. return inModule && word === "await" || word === "enum";
  38302. }
  38303. function isStrictReservedWord(word, inModule) {
  38304. return isReservedWord(word, inModule) || reservedWordsStrictSet.has(word);
  38305. }
  38306. function isStrictBindOnlyReservedWord(word) {
  38307. return reservedWordsStrictBindSet.has(word);
  38308. }
  38309. function isStrictBindReservedWord(word, inModule) {
  38310. return isStrictReservedWord(word, inModule) || isStrictBindOnlyReservedWord(word);
  38311. }
  38312. function isKeyword(word) {
  38313. return keywords2.has(word);
  38314. }
  38315. }
  38316. });
  38317. // node_modules/@babel/highlight/node_modules/@babel/helper-validator-identifier/lib/index.js
  38318. var require_lib7 = __commonJS({
  38319. "node_modules/@babel/highlight/node_modules/@babel/helper-validator-identifier/lib/index.js"(exports) {
  38320. "use strict";
  38321. Object.defineProperty(exports, "__esModule", {
  38322. value: true
  38323. });
  38324. Object.defineProperty(exports, "isIdentifierName", {
  38325. enumerable: true,
  38326. get: function() {
  38327. return _identifier.isIdentifierName;
  38328. }
  38329. });
  38330. Object.defineProperty(exports, "isIdentifierChar", {
  38331. enumerable: true,
  38332. get: function() {
  38333. return _identifier.isIdentifierChar;
  38334. }
  38335. });
  38336. Object.defineProperty(exports, "isIdentifierStart", {
  38337. enumerable: true,
  38338. get: function() {
  38339. return _identifier.isIdentifierStart;
  38340. }
  38341. });
  38342. Object.defineProperty(exports, "isReservedWord", {
  38343. enumerable: true,
  38344. get: function() {
  38345. return _keyword.isReservedWord;
  38346. }
  38347. });
  38348. Object.defineProperty(exports, "isStrictBindOnlyReservedWord", {
  38349. enumerable: true,
  38350. get: function() {
  38351. return _keyword.isStrictBindOnlyReservedWord;
  38352. }
  38353. });
  38354. Object.defineProperty(exports, "isStrictBindReservedWord", {
  38355. enumerable: true,
  38356. get: function() {
  38357. return _keyword.isStrictBindReservedWord;
  38358. }
  38359. });
  38360. Object.defineProperty(exports, "isStrictReservedWord", {
  38361. enumerable: true,
  38362. get: function() {
  38363. return _keyword.isStrictReservedWord;
  38364. }
  38365. });
  38366. Object.defineProperty(exports, "isKeyword", {
  38367. enumerable: true,
  38368. get: function() {
  38369. return _keyword.isKeyword;
  38370. }
  38371. });
  38372. var _identifier = require_identifier3();
  38373. var _keyword = require_keyword3();
  38374. }
  38375. });
  38376. // node_modules/js-tokens/index.js
  38377. var require_js_tokens = __commonJS({
  38378. "node_modules/js-tokens/index.js"(exports) {
  38379. Object.defineProperty(exports, "__esModule", {
  38380. value: true
  38381. });
  38382. exports.default = /((['"])(?:(?!\2|\\).|\\(?:\r\n|[\s\S]))*(\2)?|`(?:[^`\\$]|\\[\s\S]|\$(?!\{)|\$\{(?:[^{}]|\{[^}]*\}?)*\}?)*(`)?)|(\/\/.*)|(\/\*(?:[^*]|\*(?!\/))*(\*\/)?)|(\/(?!\*)(?:\[(?:(?![\]\\]).|\\.)*\]|(?![\/\]\\]).|\\.)+\/(?:(?!\s*(?:\b|[\u0080-\uFFFF$\\'"~({]|[+\-!](?!=)|\.?\d))|[gmiyus]{1,6}\b(?![\u0080-\uFFFF$\\]|\s*(?:[+\-*%&|^<>!=?({]|\/(?![\/*])))))|(0[xX][\da-fA-F]+|0[oO][0-7]+|0[bB][01]+|(?:\d*\.\d+|\d+\.?)(?:[eE][+-]?\d+)?)|((?!\d)(?:(?!\s)[$\w\u0080-\uFFFF]|\\u[\da-fA-F]{4}|\\u\{[\da-fA-F]+\})+)|(--|\+\+|&&|\|\||=>|\.{3}|(?:[+\-\/%&|^]|\*{1,2}|<{1,2}|>{1,3}|!=?|={1,2})=?|[?~.,:;[\](){}])|(\s+)|(^$|[\s\S])/g;
  38383. exports.matchToToken = function(match) {
  38384. var token = { type: "invalid", value: match[0], closed: void 0 };
  38385. if (match[1])
  38386. token.type = "string", token.closed = !!(match[3] || match[4]);
  38387. else if (match[5])
  38388. token.type = "comment";
  38389. else if (match[6])
  38390. token.type = "comment", token.closed = !!match[7];
  38391. else if (match[8])
  38392. token.type = "regex";
  38393. else if (match[9])
  38394. token.type = "number";
  38395. else if (match[10])
  38396. token.type = "name";
  38397. else if (match[11])
  38398. token.type = "punctuator";
  38399. else if (match[12])
  38400. token.type = "whitespace";
  38401. return token;
  38402. };
  38403. }
  38404. });
  38405. // node_modules/escape-string-regexp/index.js
  38406. var require_escape_string_regexp = __commonJS({
  38407. "node_modules/escape-string-regexp/index.js"(exports, module) {
  38408. "use strict";
  38409. var matchOperatorsRe = /[|\\{}()[\]^$+*?.]/g;
  38410. module.exports = function(str) {
  38411. if (typeof str !== "string") {
  38412. throw new TypeError("Expected a string");
  38413. }
  38414. return str.replace(matchOperatorsRe, "\\$&");
  38415. };
  38416. }
  38417. });
  38418. // node_modules/@babel/highlight/node_modules/color-name/index.js
  38419. var require_color_name = __commonJS({
  38420. "node_modules/@babel/highlight/node_modules/color-name/index.js"(exports, module) {
  38421. "use strict";
  38422. module.exports = {
  38423. "aliceblue": [240, 248, 255],
  38424. "antiquewhite": [250, 235, 215],
  38425. "aqua": [0, 255, 255],
  38426. "aquamarine": [127, 255, 212],
  38427. "azure": [240, 255, 255],
  38428. "beige": [245, 245, 220],
  38429. "bisque": [255, 228, 196],
  38430. "black": [0, 0, 0],
  38431. "blanchedalmond": [255, 235, 205],
  38432. "blue": [0, 0, 255],
  38433. "blueviolet": [138, 43, 226],
  38434. "brown": [165, 42, 42],
  38435. "burlywood": [222, 184, 135],
  38436. "cadetblue": [95, 158, 160],
  38437. "chartreuse": [127, 255, 0],
  38438. "chocolate": [210, 105, 30],
  38439. "coral": [255, 127, 80],
  38440. "cornflowerblue": [100, 149, 237],
  38441. "cornsilk": [255, 248, 220],
  38442. "crimson": [220, 20, 60],
  38443. "cyan": [0, 255, 255],
  38444. "darkblue": [0, 0, 139],
  38445. "darkcyan": [0, 139, 139],
  38446. "darkgoldenrod": [184, 134, 11],
  38447. "darkgray": [169, 169, 169],
  38448. "darkgreen": [0, 100, 0],
  38449. "darkgrey": [169, 169, 169],
  38450. "darkkhaki": [189, 183, 107],
  38451. "darkmagenta": [139, 0, 139],
  38452. "darkolivegreen": [85, 107, 47],
  38453. "darkorange": [255, 140, 0],
  38454. "darkorchid": [153, 50, 204],
  38455. "darkred": [139, 0, 0],
  38456. "darksalmon": [233, 150, 122],
  38457. "darkseagreen": [143, 188, 143],
  38458. "darkslateblue": [72, 61, 139],
  38459. "darkslategray": [47, 79, 79],
  38460. "darkslategrey": [47, 79, 79],
  38461. "darkturquoise": [0, 206, 209],
  38462. "darkviolet": [148, 0, 211],
  38463. "deeppink": [255, 20, 147],
  38464. "deepskyblue": [0, 191, 255],
  38465. "dimgray": [105, 105, 105],
  38466. "dimgrey": [105, 105, 105],
  38467. "dodgerblue": [30, 144, 255],
  38468. "firebrick": [178, 34, 34],
  38469. "floralwhite": [255, 250, 240],
  38470. "forestgreen": [34, 139, 34],
  38471. "fuchsia": [255, 0, 255],
  38472. "gainsboro": [220, 220, 220],
  38473. "ghostwhite": [248, 248, 255],
  38474. "gold": [255, 215, 0],
  38475. "goldenrod": [218, 165, 32],
  38476. "gray": [128, 128, 128],
  38477. "green": [0, 128, 0],
  38478. "greenyellow": [173, 255, 47],
  38479. "grey": [128, 128, 128],
  38480. "honeydew": [240, 255, 240],
  38481. "hotpink": [255, 105, 180],
  38482. "indianred": [205, 92, 92],
  38483. "indigo": [75, 0, 130],
  38484. "ivory": [255, 255, 240],
  38485. "khaki": [240, 230, 140],
  38486. "lavender": [230, 230, 250],
  38487. "lavenderblush": [255, 240, 245],
  38488. "lawngreen": [124, 252, 0],
  38489. "lemonchiffon": [255, 250, 205],
  38490. "lightblue": [173, 216, 230],
  38491. "lightcoral": [240, 128, 128],
  38492. "lightcyan": [224, 255, 255],
  38493. "lightgoldenrodyellow": [250, 250, 210],
  38494. "lightgray": [211, 211, 211],
  38495. "lightgreen": [144, 238, 144],
  38496. "lightgrey": [211, 211, 211],
  38497. "lightpink": [255, 182, 193],
  38498. "lightsalmon": [255, 160, 122],
  38499. "lightseagreen": [32, 178, 170],
  38500. "lightskyblue": [135, 206, 250],
  38501. "lightslategray": [119, 136, 153],
  38502. "lightslategrey": [119, 136, 153],
  38503. "lightsteelblue": [176, 196, 222],
  38504. "lightyellow": [255, 255, 224],
  38505. "lime": [0, 255, 0],
  38506. "limegreen": [50, 205, 50],
  38507. "linen": [250, 240, 230],
  38508. "magenta": [255, 0, 255],
  38509. "maroon": [128, 0, 0],
  38510. "mediumaquamarine": [102, 205, 170],
  38511. "mediumblue": [0, 0, 205],
  38512. "mediumorchid": [186, 85, 211],
  38513. "mediumpurple": [147, 112, 219],
  38514. "mediumseagreen": [60, 179, 113],
  38515. "mediumslateblue": [123, 104, 238],
  38516. "mediumspringgreen": [0, 250, 154],
  38517. "mediumturquoise": [72, 209, 204],
  38518. "mediumvioletred": [199, 21, 133],
  38519. "midnightblue": [25, 25, 112],
  38520. "mintcream": [245, 255, 250],
  38521. "mistyrose": [255, 228, 225],
  38522. "moccasin": [255, 228, 181],
  38523. "navajowhite": [255, 222, 173],
  38524. "navy": [0, 0, 128],
  38525. "oldlace": [253, 245, 230],
  38526. "olive": [128, 128, 0],
  38527. "olivedrab": [107, 142, 35],
  38528. "orange": [255, 165, 0],
  38529. "orangered": [255, 69, 0],
  38530. "orchid": [218, 112, 214],
  38531. "palegoldenrod": [238, 232, 170],
  38532. "palegreen": [152, 251, 152],
  38533. "paleturquoise": [175, 238, 238],
  38534. "palevioletred": [219, 112, 147],
  38535. "papayawhip": [255, 239, 213],
  38536. "peachpuff": [255, 218, 185],
  38537. "peru": [205, 133, 63],
  38538. "pink": [255, 192, 203],
  38539. "plum": [221, 160, 221],
  38540. "powderblue": [176, 224, 230],
  38541. "purple": [128, 0, 128],
  38542. "rebeccapurple": [102, 51, 153],
  38543. "red": [255, 0, 0],
  38544. "rosybrown": [188, 143, 143],
  38545. "royalblue": [65, 105, 225],
  38546. "saddlebrown": [139, 69, 19],
  38547. "salmon": [250, 128, 114],
  38548. "sandybrown": [244, 164, 96],
  38549. "seagreen": [46, 139, 87],
  38550. "seashell": [255, 245, 238],
  38551. "sienna": [160, 82, 45],
  38552. "silver": [192, 192, 192],
  38553. "skyblue": [135, 206, 235],
  38554. "slateblue": [106, 90, 205],
  38555. "slategray": [112, 128, 144],
  38556. "slategrey": [112, 128, 144],
  38557. "snow": [255, 250, 250],
  38558. "springgreen": [0, 255, 127],
  38559. "steelblue": [70, 130, 180],
  38560. "tan": [210, 180, 140],
  38561. "teal": [0, 128, 128],
  38562. "thistle": [216, 191, 216],
  38563. "tomato": [255, 99, 71],
  38564. "turquoise": [64, 224, 208],
  38565. "violet": [238, 130, 238],
  38566. "wheat": [245, 222, 179],
  38567. "white": [255, 255, 255],
  38568. "whitesmoke": [245, 245, 245],
  38569. "yellow": [255, 255, 0],
  38570. "yellowgreen": [154, 205, 50]
  38571. };
  38572. }
  38573. });
  38574. // node_modules/@babel/highlight/node_modules/color-convert/conversions.js
  38575. var require_conversions = __commonJS({
  38576. "node_modules/@babel/highlight/node_modules/color-convert/conversions.js"(exports, module) {
  38577. var cssKeywords = require_color_name();
  38578. var reverseKeywords = {};
  38579. for (key in cssKeywords) {
  38580. if (cssKeywords.hasOwnProperty(key)) {
  38581. reverseKeywords[cssKeywords[key]] = key;
  38582. }
  38583. }
  38584. var key;
  38585. var convert2 = module.exports = {
  38586. rgb: { channels: 3, labels: "rgb" },
  38587. hsl: { channels: 3, labels: "hsl" },
  38588. hsv: { channels: 3, labels: "hsv" },
  38589. hwb: { channels: 3, labels: "hwb" },
  38590. cmyk: { channels: 4, labels: "cmyk" },
  38591. xyz: { channels: 3, labels: "xyz" },
  38592. lab: { channels: 3, labels: "lab" },
  38593. lch: { channels: 3, labels: "lch" },
  38594. hex: { channels: 1, labels: ["hex"] },
  38595. keyword: { channels: 1, labels: ["keyword"] },
  38596. ansi16: { channels: 1, labels: ["ansi16"] },
  38597. ansi256: { channels: 1, labels: ["ansi256"] },
  38598. hcg: { channels: 3, labels: ["h", "c", "g"] },
  38599. apple: { channels: 3, labels: ["r16", "g16", "b16"] },
  38600. gray: { channels: 1, labels: ["gray"] }
  38601. };
  38602. for (model in convert2) {
  38603. if (convert2.hasOwnProperty(model)) {
  38604. if (!("channels" in convert2[model])) {
  38605. throw new Error("missing channels property: " + model);
  38606. }
  38607. if (!("labels" in convert2[model])) {
  38608. throw new Error("missing channel labels property: " + model);
  38609. }
  38610. if (convert2[model].labels.length !== convert2[model].channels) {
  38611. throw new Error("channel and label counts mismatch: " + model);
  38612. }
  38613. channels = convert2[model].channels;
  38614. labels = convert2[model].labels;
  38615. delete convert2[model].channels;
  38616. delete convert2[model].labels;
  38617. Object.defineProperty(convert2[model], "channels", { value: channels });
  38618. Object.defineProperty(convert2[model], "labels", { value: labels });
  38619. }
  38620. }
  38621. var channels;
  38622. var labels;
  38623. var model;
  38624. convert2.rgb.hsl = function(rgb) {
  38625. var r = rgb[0] / 255;
  38626. var g = rgb[1] / 255;
  38627. var b = rgb[2] / 255;
  38628. var min = Math.min(r, g, b);
  38629. var max = Math.max(r, g, b);
  38630. var delta = max - min;
  38631. var h;
  38632. var s;
  38633. var l;
  38634. if (max === min) {
  38635. h = 0;
  38636. } else if (r === max) {
  38637. h = (g - b) / delta;
  38638. } else if (g === max) {
  38639. h = 2 + (b - r) / delta;
  38640. } else if (b === max) {
  38641. h = 4 + (r - g) / delta;
  38642. }
  38643. h = Math.min(h * 60, 360);
  38644. if (h < 0) {
  38645. h += 360;
  38646. }
  38647. l = (min + max) / 2;
  38648. if (max === min) {
  38649. s = 0;
  38650. } else if (l <= 0.5) {
  38651. s = delta / (max + min);
  38652. } else {
  38653. s = delta / (2 - max - min);
  38654. }
  38655. return [h, s * 100, l * 100];
  38656. };
  38657. convert2.rgb.hsv = function(rgb) {
  38658. var rdif;
  38659. var gdif;
  38660. var bdif;
  38661. var h;
  38662. var s;
  38663. var r = rgb[0] / 255;
  38664. var g = rgb[1] / 255;
  38665. var b = rgb[2] / 255;
  38666. var v = Math.max(r, g, b);
  38667. var diff = v - Math.min(r, g, b);
  38668. var diffc = function(c) {
  38669. return (v - c) / 6 / diff + 1 / 2;
  38670. };
  38671. if (diff === 0) {
  38672. h = s = 0;
  38673. } else {
  38674. s = diff / v;
  38675. rdif = diffc(r);
  38676. gdif = diffc(g);
  38677. bdif = diffc(b);
  38678. if (r === v) {
  38679. h = bdif - gdif;
  38680. } else if (g === v) {
  38681. h = 1 / 3 + rdif - bdif;
  38682. } else if (b === v) {
  38683. h = 2 / 3 + gdif - rdif;
  38684. }
  38685. if (h < 0) {
  38686. h += 1;
  38687. } else if (h > 1) {
  38688. h -= 1;
  38689. }
  38690. }
  38691. return [
  38692. h * 360,
  38693. s * 100,
  38694. v * 100
  38695. ];
  38696. };
  38697. convert2.rgb.hwb = function(rgb) {
  38698. var r = rgb[0];
  38699. var g = rgb[1];
  38700. var b = rgb[2];
  38701. var h = convert2.rgb.hsl(rgb)[0];
  38702. var w = 1 / 255 * Math.min(r, Math.min(g, b));
  38703. b = 1 - 1 / 255 * Math.max(r, Math.max(g, b));
  38704. return [h, w * 100, b * 100];
  38705. };
  38706. convert2.rgb.cmyk = function(rgb) {
  38707. var r = rgb[0] / 255;
  38708. var g = rgb[1] / 255;
  38709. var b = rgb[2] / 255;
  38710. var c;
  38711. var m;
  38712. var y;
  38713. var k;
  38714. k = Math.min(1 - r, 1 - g, 1 - b);
  38715. c = (1 - r - k) / (1 - k) || 0;
  38716. m = (1 - g - k) / (1 - k) || 0;
  38717. y = (1 - b - k) / (1 - k) || 0;
  38718. return [c * 100, m * 100, y * 100, k * 100];
  38719. };
  38720. function comparativeDistance(x, y) {
  38721. return Math.pow(x[0] - y[0], 2) + Math.pow(x[1] - y[1], 2) + Math.pow(x[2] - y[2], 2);
  38722. }
  38723. convert2.rgb.keyword = function(rgb) {
  38724. var reversed = reverseKeywords[rgb];
  38725. if (reversed) {
  38726. return reversed;
  38727. }
  38728. var currentClosestDistance = Infinity;
  38729. var currentClosestKeyword;
  38730. for (var keyword in cssKeywords) {
  38731. if (cssKeywords.hasOwnProperty(keyword)) {
  38732. var value = cssKeywords[keyword];
  38733. var distance = comparativeDistance(rgb, value);
  38734. if (distance < currentClosestDistance) {
  38735. currentClosestDistance = distance;
  38736. currentClosestKeyword = keyword;
  38737. }
  38738. }
  38739. }
  38740. return currentClosestKeyword;
  38741. };
  38742. convert2.keyword.rgb = function(keyword) {
  38743. return cssKeywords[keyword];
  38744. };
  38745. convert2.rgb.xyz = function(rgb) {
  38746. var r = rgb[0] / 255;
  38747. var g = rgb[1] / 255;
  38748. var b = rgb[2] / 255;
  38749. r = r > 0.04045 ? Math.pow((r + 0.055) / 1.055, 2.4) : r / 12.92;
  38750. g = g > 0.04045 ? Math.pow((g + 0.055) / 1.055, 2.4) : g / 12.92;
  38751. b = b > 0.04045 ? Math.pow((b + 0.055) / 1.055, 2.4) : b / 12.92;
  38752. var x = r * 0.4124 + g * 0.3576 + b * 0.1805;
  38753. var y = r * 0.2126 + g * 0.7152 + b * 0.0722;
  38754. var z = r * 0.0193 + g * 0.1192 + b * 0.9505;
  38755. return [x * 100, y * 100, z * 100];
  38756. };
  38757. convert2.rgb.lab = function(rgb) {
  38758. var xyz = convert2.rgb.xyz(rgb);
  38759. var x = xyz[0];
  38760. var y = xyz[1];
  38761. var z = xyz[2];
  38762. var l;
  38763. var a;
  38764. var b;
  38765. x /= 95.047;
  38766. y /= 100;
  38767. z /= 108.883;
  38768. x = x > 8856e-6 ? Math.pow(x, 1 / 3) : 7.787 * x + 16 / 116;
  38769. y = y > 8856e-6 ? Math.pow(y, 1 / 3) : 7.787 * y + 16 / 116;
  38770. z = z > 8856e-6 ? Math.pow(z, 1 / 3) : 7.787 * z + 16 / 116;
  38771. l = 116 * y - 16;
  38772. a = 500 * (x - y);
  38773. b = 200 * (y - z);
  38774. return [l, a, b];
  38775. };
  38776. convert2.hsl.rgb = function(hsl) {
  38777. var h = hsl[0] / 360;
  38778. var s = hsl[1] / 100;
  38779. var l = hsl[2] / 100;
  38780. var t1;
  38781. var t2;
  38782. var t3;
  38783. var rgb;
  38784. var val;
  38785. if (s === 0) {
  38786. val = l * 255;
  38787. return [val, val, val];
  38788. }
  38789. if (l < 0.5) {
  38790. t2 = l * (1 + s);
  38791. } else {
  38792. t2 = l + s - l * s;
  38793. }
  38794. t1 = 2 * l - t2;
  38795. rgb = [0, 0, 0];
  38796. for (var i = 0; i < 3; i++) {
  38797. t3 = h + 1 / 3 * -(i - 1);
  38798. if (t3 < 0) {
  38799. t3++;
  38800. }
  38801. if (t3 > 1) {
  38802. t3--;
  38803. }
  38804. if (6 * t3 < 1) {
  38805. val = t1 + (t2 - t1) * 6 * t3;
  38806. } else if (2 * t3 < 1) {
  38807. val = t2;
  38808. } else if (3 * t3 < 2) {
  38809. val = t1 + (t2 - t1) * (2 / 3 - t3) * 6;
  38810. } else {
  38811. val = t1;
  38812. }
  38813. rgb[i] = val * 255;
  38814. }
  38815. return rgb;
  38816. };
  38817. convert2.hsl.hsv = function(hsl) {
  38818. var h = hsl[0];
  38819. var s = hsl[1] / 100;
  38820. var l = hsl[2] / 100;
  38821. var smin = s;
  38822. var lmin = Math.max(l, 0.01);
  38823. var sv;
  38824. var v;
  38825. l *= 2;
  38826. s *= l <= 1 ? l : 2 - l;
  38827. smin *= lmin <= 1 ? lmin : 2 - lmin;
  38828. v = (l + s) / 2;
  38829. sv = l === 0 ? 2 * smin / (lmin + smin) : 2 * s / (l + s);
  38830. return [h, sv * 100, v * 100];
  38831. };
  38832. convert2.hsv.rgb = function(hsv) {
  38833. var h = hsv[0] / 60;
  38834. var s = hsv[1] / 100;
  38835. var v = hsv[2] / 100;
  38836. var hi = Math.floor(h) % 6;
  38837. var f = h - Math.floor(h);
  38838. var p = 255 * v * (1 - s);
  38839. var q = 255 * v * (1 - s * f);
  38840. var t2 = 255 * v * (1 - s * (1 - f));
  38841. v *= 255;
  38842. switch (hi) {
  38843. case 0:
  38844. return [v, t2, p];
  38845. case 1:
  38846. return [q, v, p];
  38847. case 2:
  38848. return [p, v, t2];
  38849. case 3:
  38850. return [p, q, v];
  38851. case 4:
  38852. return [t2, p, v];
  38853. case 5:
  38854. return [v, p, q];
  38855. }
  38856. };
  38857. convert2.hsv.hsl = function(hsv) {
  38858. var h = hsv[0];
  38859. var s = hsv[1] / 100;
  38860. var v = hsv[2] / 100;
  38861. var vmin = Math.max(v, 0.01);
  38862. var lmin;
  38863. var sl;
  38864. var l;
  38865. l = (2 - s) * v;
  38866. lmin = (2 - s) * vmin;
  38867. sl = s * vmin;
  38868. sl /= lmin <= 1 ? lmin : 2 - lmin;
  38869. sl = sl || 0;
  38870. l /= 2;
  38871. return [h, sl * 100, l * 100];
  38872. };
  38873. convert2.hwb.rgb = function(hwb) {
  38874. var h = hwb[0] / 360;
  38875. var wh = hwb[1] / 100;
  38876. var bl = hwb[2] / 100;
  38877. var ratio = wh + bl;
  38878. var i;
  38879. var v;
  38880. var f;
  38881. var n;
  38882. if (ratio > 1) {
  38883. wh /= ratio;
  38884. bl /= ratio;
  38885. }
  38886. i = Math.floor(6 * h);
  38887. v = 1 - bl;
  38888. f = 6 * h - i;
  38889. if ((i & 1) !== 0) {
  38890. f = 1 - f;
  38891. }
  38892. n = wh + f * (v - wh);
  38893. var r;
  38894. var g;
  38895. var b;
  38896. switch (i) {
  38897. default:
  38898. case 6:
  38899. case 0:
  38900. r = v;
  38901. g = n;
  38902. b = wh;
  38903. break;
  38904. case 1:
  38905. r = n;
  38906. g = v;
  38907. b = wh;
  38908. break;
  38909. case 2:
  38910. r = wh;
  38911. g = v;
  38912. b = n;
  38913. break;
  38914. case 3:
  38915. r = wh;
  38916. g = n;
  38917. b = v;
  38918. break;
  38919. case 4:
  38920. r = n;
  38921. g = wh;
  38922. b = v;
  38923. break;
  38924. case 5:
  38925. r = v;
  38926. g = wh;
  38927. b = n;
  38928. break;
  38929. }
  38930. return [r * 255, g * 255, b * 255];
  38931. };
  38932. convert2.cmyk.rgb = function(cmyk) {
  38933. var c = cmyk[0] / 100;
  38934. var m = cmyk[1] / 100;
  38935. var y = cmyk[2] / 100;
  38936. var k = cmyk[3] / 100;
  38937. var r;
  38938. var g;
  38939. var b;
  38940. r = 1 - Math.min(1, c * (1 - k) + k);
  38941. g = 1 - Math.min(1, m * (1 - k) + k);
  38942. b = 1 - Math.min(1, y * (1 - k) + k);
  38943. return [r * 255, g * 255, b * 255];
  38944. };
  38945. convert2.xyz.rgb = function(xyz) {
  38946. var x = xyz[0] / 100;
  38947. var y = xyz[1] / 100;
  38948. var z = xyz[2] / 100;
  38949. var r;
  38950. var g;
  38951. var b;
  38952. r = x * 3.2406 + y * -1.5372 + z * -0.4986;
  38953. g = x * -0.9689 + y * 1.8758 + z * 0.0415;
  38954. b = x * 0.0557 + y * -0.204 + z * 1.057;
  38955. r = r > 31308e-7 ? 1.055 * Math.pow(r, 1 / 2.4) - 0.055 : r * 12.92;
  38956. g = g > 31308e-7 ? 1.055 * Math.pow(g, 1 / 2.4) - 0.055 : g * 12.92;
  38957. b = b > 31308e-7 ? 1.055 * Math.pow(b, 1 / 2.4) - 0.055 : b * 12.92;
  38958. r = Math.min(Math.max(0, r), 1);
  38959. g = Math.min(Math.max(0, g), 1);
  38960. b = Math.min(Math.max(0, b), 1);
  38961. return [r * 255, g * 255, b * 255];
  38962. };
  38963. convert2.xyz.lab = function(xyz) {
  38964. var x = xyz[0];
  38965. var y = xyz[1];
  38966. var z = xyz[2];
  38967. var l;
  38968. var a;
  38969. var b;
  38970. x /= 95.047;
  38971. y /= 100;
  38972. z /= 108.883;
  38973. x = x > 8856e-6 ? Math.pow(x, 1 / 3) : 7.787 * x + 16 / 116;
  38974. y = y > 8856e-6 ? Math.pow(y, 1 / 3) : 7.787 * y + 16 / 116;
  38975. z = z > 8856e-6 ? Math.pow(z, 1 / 3) : 7.787 * z + 16 / 116;
  38976. l = 116 * y - 16;
  38977. a = 500 * (x - y);
  38978. b = 200 * (y - z);
  38979. return [l, a, b];
  38980. };
  38981. convert2.lab.xyz = function(lab) {
  38982. var l = lab[0];
  38983. var a = lab[1];
  38984. var b = lab[2];
  38985. var x;
  38986. var y;
  38987. var z;
  38988. y = (l + 16) / 116;
  38989. x = a / 500 + y;
  38990. z = y - b / 200;
  38991. var y2 = Math.pow(y, 3);
  38992. var x2 = Math.pow(x, 3);
  38993. var z2 = Math.pow(z, 3);
  38994. y = y2 > 8856e-6 ? y2 : (y - 16 / 116) / 7.787;
  38995. x = x2 > 8856e-6 ? x2 : (x - 16 / 116) / 7.787;
  38996. z = z2 > 8856e-6 ? z2 : (z - 16 / 116) / 7.787;
  38997. x *= 95.047;
  38998. y *= 100;
  38999. z *= 108.883;
  39000. return [x, y, z];
  39001. };
  39002. convert2.lab.lch = function(lab) {
  39003. var l = lab[0];
  39004. var a = lab[1];
  39005. var b = lab[2];
  39006. var hr;
  39007. var h;
  39008. var c;
  39009. hr = Math.atan2(b, a);
  39010. h = hr * 360 / 2 / Math.PI;
  39011. if (h < 0) {
  39012. h += 360;
  39013. }
  39014. c = Math.sqrt(a * a + b * b);
  39015. return [l, c, h];
  39016. };
  39017. convert2.lch.lab = function(lch) {
  39018. var l = lch[0];
  39019. var c = lch[1];
  39020. var h = lch[2];
  39021. var a;
  39022. var b;
  39023. var hr;
  39024. hr = h / 360 * 2 * Math.PI;
  39025. a = c * Math.cos(hr);
  39026. b = c * Math.sin(hr);
  39027. return [l, a, b];
  39028. };
  39029. convert2.rgb.ansi16 = function(args) {
  39030. var r = args[0];
  39031. var g = args[1];
  39032. var b = args[2];
  39033. var value = 1 in arguments ? arguments[1] : convert2.rgb.hsv(args)[2];
  39034. value = Math.round(value / 50);
  39035. if (value === 0) {
  39036. return 30;
  39037. }
  39038. var ansi = 30 + (Math.round(b / 255) << 2 | Math.round(g / 255) << 1 | Math.round(r / 255));
  39039. if (value === 2) {
  39040. ansi += 60;
  39041. }
  39042. return ansi;
  39043. };
  39044. convert2.hsv.ansi16 = function(args) {
  39045. return convert2.rgb.ansi16(convert2.hsv.rgb(args), args[2]);
  39046. };
  39047. convert2.rgb.ansi256 = function(args) {
  39048. var r = args[0];
  39049. var g = args[1];
  39050. var b = args[2];
  39051. if (r === g && g === b) {
  39052. if (r < 8) {
  39053. return 16;
  39054. }
  39055. if (r > 248) {
  39056. return 231;
  39057. }
  39058. return Math.round((r - 8) / 247 * 24) + 232;
  39059. }
  39060. var ansi = 16 + 36 * Math.round(r / 255 * 5) + 6 * Math.round(g / 255 * 5) + Math.round(b / 255 * 5);
  39061. return ansi;
  39062. };
  39063. convert2.ansi16.rgb = function(args) {
  39064. var color4 = args % 10;
  39065. if (color4 === 0 || color4 === 7) {
  39066. if (args > 50) {
  39067. color4 += 3.5;
  39068. }
  39069. color4 = color4 / 10.5 * 255;
  39070. return [color4, color4, color4];
  39071. }
  39072. var mult = (~~(args > 50) + 1) * 0.5;
  39073. var r = (color4 & 1) * mult * 255;
  39074. var g = (color4 >> 1 & 1) * mult * 255;
  39075. var b = (color4 >> 2 & 1) * mult * 255;
  39076. return [r, g, b];
  39077. };
  39078. convert2.ansi256.rgb = function(args) {
  39079. if (args >= 232) {
  39080. var c = (args - 232) * 10 + 8;
  39081. return [c, c, c];
  39082. }
  39083. args -= 16;
  39084. var rem;
  39085. var r = Math.floor(args / 36) / 5 * 255;
  39086. var g = Math.floor((rem = args % 36) / 6) / 5 * 255;
  39087. var b = rem % 6 / 5 * 255;
  39088. return [r, g, b];
  39089. };
  39090. convert2.rgb.hex = function(args) {
  39091. var integer = ((Math.round(args[0]) & 255) << 16) + ((Math.round(args[1]) & 255) << 8) + (Math.round(args[2]) & 255);
  39092. var string3 = integer.toString(16).toUpperCase();
  39093. return "000000".substring(string3.length) + string3;
  39094. };
  39095. convert2.hex.rgb = function(args) {
  39096. var match = args.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);
  39097. if (!match) {
  39098. return [0, 0, 0];
  39099. }
  39100. var colorString = match[0];
  39101. if (match[0].length === 3) {
  39102. colorString = colorString.split("").map(function(char) {
  39103. return char + char;
  39104. }).join("");
  39105. }
  39106. var integer = parseInt(colorString, 16);
  39107. var r = integer >> 16 & 255;
  39108. var g = integer >> 8 & 255;
  39109. var b = integer & 255;
  39110. return [r, g, b];
  39111. };
  39112. convert2.rgb.hcg = function(rgb) {
  39113. var r = rgb[0] / 255;
  39114. var g = rgb[1] / 255;
  39115. var b = rgb[2] / 255;
  39116. var max = Math.max(Math.max(r, g), b);
  39117. var min = Math.min(Math.min(r, g), b);
  39118. var chroma = max - min;
  39119. var grayscale;
  39120. var hue;
  39121. if (chroma < 1) {
  39122. grayscale = min / (1 - chroma);
  39123. } else {
  39124. grayscale = 0;
  39125. }
  39126. if (chroma <= 0) {
  39127. hue = 0;
  39128. } else if (max === r) {
  39129. hue = (g - b) / chroma % 6;
  39130. } else if (max === g) {
  39131. hue = 2 + (b - r) / chroma;
  39132. } else {
  39133. hue = 4 + (r - g) / chroma + 4;
  39134. }
  39135. hue /= 6;
  39136. hue %= 1;
  39137. return [hue * 360, chroma * 100, grayscale * 100];
  39138. };
  39139. convert2.hsl.hcg = function(hsl) {
  39140. var s = hsl[1] / 100;
  39141. var l = hsl[2] / 100;
  39142. var c = 1;
  39143. var f = 0;
  39144. if (l < 0.5) {
  39145. c = 2 * s * l;
  39146. } else {
  39147. c = 2 * s * (1 - l);
  39148. }
  39149. if (c < 1) {
  39150. f = (l - 0.5 * c) / (1 - c);
  39151. }
  39152. return [hsl[0], c * 100, f * 100];
  39153. };
  39154. convert2.hsv.hcg = function(hsv) {
  39155. var s = hsv[1] / 100;
  39156. var v = hsv[2] / 100;
  39157. var c = s * v;
  39158. var f = 0;
  39159. if (c < 1) {
  39160. f = (v - c) / (1 - c);
  39161. }
  39162. return [hsv[0], c * 100, f * 100];
  39163. };
  39164. convert2.hcg.rgb = function(hcg) {
  39165. var h = hcg[0] / 360;
  39166. var c = hcg[1] / 100;
  39167. var g = hcg[2] / 100;
  39168. if (c === 0) {
  39169. return [g * 255, g * 255, g * 255];
  39170. }
  39171. var pure = [0, 0, 0];
  39172. var hi = h % 1 * 6;
  39173. var v = hi % 1;
  39174. var w = 1 - v;
  39175. var mg = 0;
  39176. switch (Math.floor(hi)) {
  39177. case 0:
  39178. pure[0] = 1;
  39179. pure[1] = v;
  39180. pure[2] = 0;
  39181. break;
  39182. case 1:
  39183. pure[0] = w;
  39184. pure[1] = 1;
  39185. pure[2] = 0;
  39186. break;
  39187. case 2:
  39188. pure[0] = 0;
  39189. pure[1] = 1;
  39190. pure[2] = v;
  39191. break;
  39192. case 3:
  39193. pure[0] = 0;
  39194. pure[1] = w;
  39195. pure[2] = 1;
  39196. break;
  39197. case 4:
  39198. pure[0] = v;
  39199. pure[1] = 0;
  39200. pure[2] = 1;
  39201. break;
  39202. default:
  39203. pure[0] = 1;
  39204. pure[1] = 0;
  39205. pure[2] = w;
  39206. }
  39207. mg = (1 - c) * g;
  39208. return [
  39209. (c * pure[0] + mg) * 255,
  39210. (c * pure[1] + mg) * 255,
  39211. (c * pure[2] + mg) * 255
  39212. ];
  39213. };
  39214. convert2.hcg.hsv = function(hcg) {
  39215. var c = hcg[1] / 100;
  39216. var g = hcg[2] / 100;
  39217. var v = c + g * (1 - c);
  39218. var f = 0;
  39219. if (v > 0) {
  39220. f = c / v;
  39221. }
  39222. return [hcg[0], f * 100, v * 100];
  39223. };
  39224. convert2.hcg.hsl = function(hcg) {
  39225. var c = hcg[1] / 100;
  39226. var g = hcg[2] / 100;
  39227. var l = g * (1 - c) + 0.5 * c;
  39228. var s = 0;
  39229. if (l > 0 && l < 0.5) {
  39230. s = c / (2 * l);
  39231. } else if (l >= 0.5 && l < 1) {
  39232. s = c / (2 * (1 - l));
  39233. }
  39234. return [hcg[0], s * 100, l * 100];
  39235. };
  39236. convert2.hcg.hwb = function(hcg) {
  39237. var c = hcg[1] / 100;
  39238. var g = hcg[2] / 100;
  39239. var v = c + g * (1 - c);
  39240. return [hcg[0], (v - c) * 100, (1 - v) * 100];
  39241. };
  39242. convert2.hwb.hcg = function(hwb) {
  39243. var w = hwb[1] / 100;
  39244. var b = hwb[2] / 100;
  39245. var v = 1 - b;
  39246. var c = v - w;
  39247. var g = 0;
  39248. if (c < 1) {
  39249. g = (v - c) / (1 - c);
  39250. }
  39251. return [hwb[0], c * 100, g * 100];
  39252. };
  39253. convert2.apple.rgb = function(apple) {
  39254. return [apple[0] / 65535 * 255, apple[1] / 65535 * 255, apple[2] / 65535 * 255];
  39255. };
  39256. convert2.rgb.apple = function(rgb) {
  39257. return [rgb[0] / 255 * 65535, rgb[1] / 255 * 65535, rgb[2] / 255 * 65535];
  39258. };
  39259. convert2.gray.rgb = function(args) {
  39260. return [args[0] / 100 * 255, args[0] / 100 * 255, args[0] / 100 * 255];
  39261. };
  39262. convert2.gray.hsl = convert2.gray.hsv = function(args) {
  39263. return [0, 0, args[0]];
  39264. };
  39265. convert2.gray.hwb = function(gray) {
  39266. return [0, 100, gray[0]];
  39267. };
  39268. convert2.gray.cmyk = function(gray) {
  39269. return [0, 0, 0, gray[0]];
  39270. };
  39271. convert2.gray.lab = function(gray) {
  39272. return [gray[0], 0, 0];
  39273. };
  39274. convert2.gray.hex = function(gray) {
  39275. var val = Math.round(gray[0] / 100 * 255) & 255;
  39276. var integer = (val << 16) + (val << 8) + val;
  39277. var string3 = integer.toString(16).toUpperCase();
  39278. return "000000".substring(string3.length) + string3;
  39279. };
  39280. convert2.rgb.gray = function(rgb) {
  39281. var val = (rgb[0] + rgb[1] + rgb[2]) / 3;
  39282. return [val / 255 * 100];
  39283. };
  39284. }
  39285. });
  39286. // node_modules/@babel/highlight/node_modules/color-convert/route.js
  39287. var require_route = __commonJS({
  39288. "node_modules/@babel/highlight/node_modules/color-convert/route.js"(exports, module) {
  39289. var conversions = require_conversions();
  39290. function buildGraph() {
  39291. var graph = {};
  39292. var models = Object.keys(conversions);
  39293. for (var len = models.length, i = 0; i < len; i++) {
  39294. graph[models[i]] = {
  39295. distance: -1,
  39296. parent: null
  39297. };
  39298. }
  39299. return graph;
  39300. }
  39301. function deriveBFS(fromModel) {
  39302. var graph = buildGraph();
  39303. var queue = [fromModel];
  39304. graph[fromModel].distance = 0;
  39305. while (queue.length) {
  39306. var current2 = queue.pop();
  39307. var adjacents = Object.keys(conversions[current2]);
  39308. for (var len = adjacents.length, i = 0; i < len; i++) {
  39309. var adjacent = adjacents[i];
  39310. var node = graph[adjacent];
  39311. if (node.distance === -1) {
  39312. node.distance = graph[current2].distance + 1;
  39313. node.parent = current2;
  39314. queue.unshift(adjacent);
  39315. }
  39316. }
  39317. }
  39318. return graph;
  39319. }
  39320. function link2(from, to) {
  39321. return function(args) {
  39322. return to(from(args));
  39323. };
  39324. }
  39325. function wrapConversion(toModel, graph) {
  39326. var path = [graph[toModel].parent, toModel];
  39327. var fn = conversions[graph[toModel].parent][toModel];
  39328. var cur = graph[toModel].parent;
  39329. while (graph[cur].parent) {
  39330. path.unshift(graph[cur].parent);
  39331. fn = link2(conversions[graph[cur].parent][cur], fn);
  39332. cur = graph[cur].parent;
  39333. }
  39334. fn.conversion = path;
  39335. return fn;
  39336. }
  39337. module.exports = function(fromModel) {
  39338. var graph = deriveBFS(fromModel);
  39339. var conversion = {};
  39340. var models = Object.keys(graph);
  39341. for (var len = models.length, i = 0; i < len; i++) {
  39342. var toModel = models[i];
  39343. var node = graph[toModel];
  39344. if (node.parent === null) {
  39345. continue;
  39346. }
  39347. conversion[toModel] = wrapConversion(toModel, graph);
  39348. }
  39349. return conversion;
  39350. };
  39351. }
  39352. });
  39353. // node_modules/@babel/highlight/node_modules/color-convert/index.js
  39354. var require_color_convert = __commonJS({
  39355. "node_modules/@babel/highlight/node_modules/color-convert/index.js"(exports, module) {
  39356. var conversions = require_conversions();
  39357. var route = require_route();
  39358. var convert2 = {};
  39359. var models = Object.keys(conversions);
  39360. function wrapRaw(fn) {
  39361. var wrappedFn = function(args) {
  39362. if (args === void 0 || args === null) {
  39363. return args;
  39364. }
  39365. if (arguments.length > 1) {
  39366. args = Array.prototype.slice.call(arguments);
  39367. }
  39368. return fn(args);
  39369. };
  39370. if ("conversion" in fn) {
  39371. wrappedFn.conversion = fn.conversion;
  39372. }
  39373. return wrappedFn;
  39374. }
  39375. function wrapRounded(fn) {
  39376. var wrappedFn = function(args) {
  39377. if (args === void 0 || args === null) {
  39378. return args;
  39379. }
  39380. if (arguments.length > 1) {
  39381. args = Array.prototype.slice.call(arguments);
  39382. }
  39383. var result = fn(args);
  39384. if (typeof result === "object") {
  39385. for (var len = result.length, i = 0; i < len; i++) {
  39386. result[i] = Math.round(result[i]);
  39387. }
  39388. }
  39389. return result;
  39390. };
  39391. if ("conversion" in fn) {
  39392. wrappedFn.conversion = fn.conversion;
  39393. }
  39394. return wrappedFn;
  39395. }
  39396. models.forEach(function(fromModel) {
  39397. convert2[fromModel] = {};
  39398. Object.defineProperty(convert2[fromModel], "channels", { value: conversions[fromModel].channels });
  39399. Object.defineProperty(convert2[fromModel], "labels", { value: conversions[fromModel].labels });
  39400. var routes = route(fromModel);
  39401. var routeModels = Object.keys(routes);
  39402. routeModels.forEach(function(toModel) {
  39403. var fn = routes[toModel];
  39404. convert2[fromModel][toModel] = wrapRounded(fn);
  39405. convert2[fromModel][toModel].raw = wrapRaw(fn);
  39406. });
  39407. });
  39408. module.exports = convert2;
  39409. }
  39410. });
  39411. // node_modules/@babel/highlight/node_modules/ansi-styles/index.js
  39412. var require_ansi_styles = __commonJS({
  39413. "node_modules/@babel/highlight/node_modules/ansi-styles/index.js"(exports, module) {
  39414. "use strict";
  39415. var colorConvert = require_color_convert();
  39416. var wrapAnsi16 = (fn, offset2) => function() {
  39417. const code2 = fn.apply(colorConvert, arguments);
  39418. return `\x1B[${code2 + offset2}m`;
  39419. };
  39420. var wrapAnsi256 = (fn, offset2) => function() {
  39421. const code2 = fn.apply(colorConvert, arguments);
  39422. return `\x1B[${38 + offset2};5;${code2}m`;
  39423. };
  39424. var wrapAnsi16m = (fn, offset2) => function() {
  39425. const rgb = fn.apply(colorConvert, arguments);
  39426. return `\x1B[${38 + offset2};2;${rgb[0]};${rgb[1]};${rgb[2]}m`;
  39427. };
  39428. function assembleStyles() {
  39429. const codes = /* @__PURE__ */ new Map();
  39430. const styles = {
  39431. modifier: {
  39432. reset: [0, 0],
  39433. bold: [1, 22],
  39434. dim: [2, 22],
  39435. italic: [3, 23],
  39436. underline: [4, 24],
  39437. inverse: [7, 27],
  39438. hidden: [8, 28],
  39439. strikethrough: [9, 29]
  39440. },
  39441. color: {
  39442. black: [30, 39],
  39443. red: [31, 39],
  39444. green: [32, 39],
  39445. yellow: [33, 39],
  39446. blue: [34, 39],
  39447. magenta: [35, 39],
  39448. cyan: [36, 39],
  39449. white: [37, 39],
  39450. gray: [90, 39],
  39451. redBright: [91, 39],
  39452. greenBright: [92, 39],
  39453. yellowBright: [93, 39],
  39454. blueBright: [94, 39],
  39455. magentaBright: [95, 39],
  39456. cyanBright: [96, 39],
  39457. whiteBright: [97, 39]
  39458. },
  39459. bgColor: {
  39460. bgBlack: [40, 49],
  39461. bgRed: [41, 49],
  39462. bgGreen: [42, 49],
  39463. bgYellow: [43, 49],
  39464. bgBlue: [44, 49],
  39465. bgMagenta: [45, 49],
  39466. bgCyan: [46, 49],
  39467. bgWhite: [47, 49],
  39468. bgBlackBright: [100, 49],
  39469. bgRedBright: [101, 49],
  39470. bgGreenBright: [102, 49],
  39471. bgYellowBright: [103, 49],
  39472. bgBlueBright: [104, 49],
  39473. bgMagentaBright: [105, 49],
  39474. bgCyanBright: [106, 49],
  39475. bgWhiteBright: [107, 49]
  39476. }
  39477. };
  39478. styles.color.grey = styles.color.gray;
  39479. for (const groupName of Object.keys(styles)) {
  39480. const group = styles[groupName];
  39481. for (const styleName of Object.keys(group)) {
  39482. const style2 = group[styleName];
  39483. styles[styleName] = {
  39484. open: `\x1B[${style2[0]}m`,
  39485. close: `\x1B[${style2[1]}m`
  39486. };
  39487. group[styleName] = styles[styleName];
  39488. codes.set(style2[0], style2[1]);
  39489. }
  39490. Object.defineProperty(styles, groupName, {
  39491. value: group,
  39492. enumerable: false
  39493. });
  39494. Object.defineProperty(styles, "codes", {
  39495. value: codes,
  39496. enumerable: false
  39497. });
  39498. }
  39499. const ansi2ansi = (n) => n;
  39500. const rgb2rgb = (r, g, b) => [r, g, b];
  39501. styles.color.close = "\x1B[39m";
  39502. styles.bgColor.close = "\x1B[49m";
  39503. styles.color.ansi = {
  39504. ansi: wrapAnsi16(ansi2ansi, 0)
  39505. };
  39506. styles.color.ansi256 = {
  39507. ansi256: wrapAnsi256(ansi2ansi, 0)
  39508. };
  39509. styles.color.ansi16m = {
  39510. rgb: wrapAnsi16m(rgb2rgb, 0)
  39511. };
  39512. styles.bgColor.ansi = {
  39513. ansi: wrapAnsi16(ansi2ansi, 10)
  39514. };
  39515. styles.bgColor.ansi256 = {
  39516. ansi256: wrapAnsi256(ansi2ansi, 10)
  39517. };
  39518. styles.bgColor.ansi16m = {
  39519. rgb: wrapAnsi16m(rgb2rgb, 10)
  39520. };
  39521. for (let key of Object.keys(colorConvert)) {
  39522. if (typeof colorConvert[key] !== "object") {
  39523. continue;
  39524. }
  39525. const suite = colorConvert[key];
  39526. if (key === "ansi16") {
  39527. key = "ansi";
  39528. }
  39529. if ("ansi16" in suite) {
  39530. styles.color.ansi[key] = wrapAnsi16(suite.ansi16, 0);
  39531. styles.bgColor.ansi[key] = wrapAnsi16(suite.ansi16, 10);
  39532. }
  39533. if ("ansi256" in suite) {
  39534. styles.color.ansi256[key] = wrapAnsi256(suite.ansi256, 0);
  39535. styles.bgColor.ansi256[key] = wrapAnsi256(suite.ansi256, 10);
  39536. }
  39537. if ("rgb" in suite) {
  39538. styles.color.ansi16m[key] = wrapAnsi16m(suite.rgb, 0);
  39539. styles.bgColor.ansi16m[key] = wrapAnsi16m(suite.rgb, 10);
  39540. }
  39541. }
  39542. return styles;
  39543. }
  39544. Object.defineProperty(module, "exports", {
  39545. enumerable: true,
  39546. get: assembleStyles
  39547. });
  39548. }
  39549. });
  39550. // node_modules/@babel/highlight/node_modules/has-flag/index.js
  39551. var require_has_flag2 = __commonJS({
  39552. "node_modules/@babel/highlight/node_modules/has-flag/index.js"(exports, module) {
  39553. "use strict";
  39554. module.exports = (flag, argv) => {
  39555. argv = argv || process.argv;
  39556. const prefix = flag.startsWith("-") ? "" : flag.length === 1 ? "-" : "--";
  39557. const pos = argv.indexOf(prefix + flag);
  39558. const terminatorPos = argv.indexOf("--");
  39559. return pos !== -1 && (terminatorPos === -1 ? true : pos < terminatorPos);
  39560. };
  39561. }
  39562. });
  39563. // node_modules/@babel/highlight/node_modules/supports-color/index.js
  39564. var require_supports_color2 = __commonJS({
  39565. "node_modules/@babel/highlight/node_modules/supports-color/index.js"(exports, module) {
  39566. "use strict";
  39567. var os = __require("os");
  39568. var hasFlag = require_has_flag2();
  39569. var env = process.env;
  39570. var forceColor;
  39571. if (hasFlag("no-color") || hasFlag("no-colors") || hasFlag("color=false")) {
  39572. forceColor = false;
  39573. } else if (hasFlag("color") || hasFlag("colors") || hasFlag("color=true") || hasFlag("color=always")) {
  39574. forceColor = true;
  39575. }
  39576. if ("FORCE_COLOR" in env) {
  39577. forceColor = env.FORCE_COLOR.length === 0 || parseInt(env.FORCE_COLOR, 10) !== 0;
  39578. }
  39579. function translateLevel(level) {
  39580. if (level === 0) {
  39581. return false;
  39582. }
  39583. return {
  39584. level,
  39585. hasBasic: true,
  39586. has256: level >= 2,
  39587. has16m: level >= 3
  39588. };
  39589. }
  39590. function supportsColor(stream) {
  39591. if (forceColor === false) {
  39592. return 0;
  39593. }
  39594. if (hasFlag("color=16m") || hasFlag("color=full") || hasFlag("color=truecolor")) {
  39595. return 3;
  39596. }
  39597. if (hasFlag("color=256")) {
  39598. return 2;
  39599. }
  39600. if (stream && !stream.isTTY && forceColor !== true) {
  39601. return 0;
  39602. }
  39603. const min = forceColor ? 1 : 0;
  39604. if (process.platform === "win32") {
  39605. const osRelease = os.release().split(".");
  39606. if (Number(process.versions.node.split(".")[0]) >= 8 && Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) {
  39607. return Number(osRelease[2]) >= 14931 ? 3 : 2;
  39608. }
  39609. return 1;
  39610. }
  39611. if ("CI" in env) {
  39612. if (["TRAVIS", "CIRCLECI", "APPVEYOR", "GITLAB_CI"].some((sign) => sign in env) || env.CI_NAME === "codeship") {
  39613. return 1;
  39614. }
  39615. return min;
  39616. }
  39617. if ("TEAMCITY_VERSION" in env) {
  39618. return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env.TEAMCITY_VERSION) ? 1 : 0;
  39619. }
  39620. if (env.COLORTERM === "truecolor") {
  39621. return 3;
  39622. }
  39623. if ("TERM_PROGRAM" in env) {
  39624. const version2 = parseInt((env.TERM_PROGRAM_VERSION || "").split(".")[0], 10);
  39625. switch (env.TERM_PROGRAM) {
  39626. case "iTerm.app":
  39627. return version2 >= 3 ? 3 : 2;
  39628. case "Apple_Terminal":
  39629. return 2;
  39630. }
  39631. }
  39632. if (/-256(color)?$/i.test(env.TERM)) {
  39633. return 2;
  39634. }
  39635. if (/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(env.TERM)) {
  39636. return 1;
  39637. }
  39638. if ("COLORTERM" in env) {
  39639. return 1;
  39640. }
  39641. if (env.TERM === "dumb") {
  39642. return min;
  39643. }
  39644. return min;
  39645. }
  39646. function getSupportLevel(stream) {
  39647. const level = supportsColor(stream);
  39648. return translateLevel(level);
  39649. }
  39650. module.exports = {
  39651. supportsColor: getSupportLevel,
  39652. stdout: getSupportLevel(process.stdout),
  39653. stderr: getSupportLevel(process.stderr)
  39654. };
  39655. }
  39656. });
  39657. // node_modules/@babel/highlight/node_modules/chalk/templates.js
  39658. var require_templates = __commonJS({
  39659. "node_modules/@babel/highlight/node_modules/chalk/templates.js"(exports, module) {
  39660. "use strict";
  39661. var TEMPLATE_REGEX = /(?:\\(u[a-f\d]{4}|x[a-f\d]{2}|.))|(?:\{(~)?(\w+(?:\([^)]*\))?(?:\.\w+(?:\([^)]*\))?)*)(?:[ \t]|(?=\r?\n)))|(\})|((?:.|[\r\n\f])+?)/gi;
  39662. var STYLE_REGEX = /(?:^|\.)(\w+)(?:\(([^)]*)\))?/g;
  39663. var STRING_REGEX = /^(['"])((?:\\.|(?!\1)[^\\])*)\1$/;
  39664. var ESCAPE_REGEX = /\\(u[a-f\d]{4}|x[a-f\d]{2}|.)|([^\\])/gi;
  39665. var ESCAPES = /* @__PURE__ */ new Map([
  39666. ["n", "\n"],
  39667. ["r", "\r"],
  39668. ["t", " "],
  39669. ["b", "\b"],
  39670. ["f", "\f"],
  39671. ["v", "\v"],
  39672. ["0", "\0"],
  39673. ["\\", "\\"],
  39674. ["e", "\x1B"],
  39675. ["a", "\x07"]
  39676. ]);
  39677. function unescape(c) {
  39678. if (c[0] === "u" && c.length === 5 || c[0] === "x" && c.length === 3) {
  39679. return String.fromCharCode(parseInt(c.slice(1), 16));
  39680. }
  39681. return ESCAPES.get(c) || c;
  39682. }
  39683. function parseArguments(name2, args) {
  39684. const results = [];
  39685. const chunks = args.trim().split(/\s*,\s*/g);
  39686. let matches;
  39687. for (const chunk of chunks) {
  39688. if (!isNaN(chunk)) {
  39689. results.push(Number(chunk));
  39690. } else if (matches = chunk.match(STRING_REGEX)) {
  39691. results.push(matches[2].replace(ESCAPE_REGEX, (m, escape, chr) => escape ? unescape(escape) : chr));
  39692. } else {
  39693. throw new Error(`Invalid Chalk template style argument: ${chunk} (in style '${name2}')`);
  39694. }
  39695. }
  39696. return results;
  39697. }
  39698. function parseStyle2(style2) {
  39699. STYLE_REGEX.lastIndex = 0;
  39700. const results = [];
  39701. let matches;
  39702. while ((matches = STYLE_REGEX.exec(style2)) !== null) {
  39703. const name2 = matches[1];
  39704. if (matches[2]) {
  39705. const args = parseArguments(name2, matches[2]);
  39706. results.push([name2].concat(args));
  39707. } else {
  39708. results.push([name2]);
  39709. }
  39710. }
  39711. return results;
  39712. }
  39713. function buildStyle(chalk, styles) {
  39714. const enabled = {};
  39715. for (const layer of styles) {
  39716. for (const style2 of layer.styles) {
  39717. enabled[style2[0]] = layer.inverse ? null : style2.slice(1);
  39718. }
  39719. }
  39720. let current2 = chalk;
  39721. for (const styleName of Object.keys(enabled)) {
  39722. if (Array.isArray(enabled[styleName])) {
  39723. if (!(styleName in current2)) {
  39724. throw new Error(`Unknown Chalk style: ${styleName}`);
  39725. }
  39726. if (enabled[styleName].length > 0) {
  39727. current2 = current2[styleName].apply(current2, enabled[styleName]);
  39728. } else {
  39729. current2 = current2[styleName];
  39730. }
  39731. }
  39732. }
  39733. return current2;
  39734. }
  39735. module.exports = (chalk, tmp) => {
  39736. const styles = [];
  39737. const chunks = [];
  39738. let chunk = [];
  39739. tmp.replace(TEMPLATE_REGEX, (m, escapeChar, inverse, style2, close, chr) => {
  39740. if (escapeChar) {
  39741. chunk.push(unescape(escapeChar));
  39742. } else if (style2) {
  39743. const str = chunk.join("");
  39744. chunk = [];
  39745. chunks.push(styles.length === 0 ? str : buildStyle(chalk, styles)(str));
  39746. styles.push({ inverse, styles: parseStyle2(style2) });
  39747. } else if (close) {
  39748. if (styles.length === 0) {
  39749. throw new Error("Found extraneous } in Chalk template literal");
  39750. }
  39751. chunks.push(buildStyle(chalk, styles)(chunk.join("")));
  39752. chunk = [];
  39753. styles.pop();
  39754. } else {
  39755. chunk.push(chr);
  39756. }
  39757. });
  39758. chunks.push(chunk.join(""));
  39759. if (styles.length > 0) {
  39760. const errMsg = `Chalk template literal is missing ${styles.length} closing bracket${styles.length === 1 ? "" : "s"} (\`}\`)`;
  39761. throw new Error(errMsg);
  39762. }
  39763. return chunks.join("");
  39764. };
  39765. }
  39766. });
  39767. // node_modules/@babel/highlight/node_modules/chalk/index.js
  39768. var require_chalk = __commonJS({
  39769. "node_modules/@babel/highlight/node_modules/chalk/index.js"(exports, module) {
  39770. "use strict";
  39771. var escapeStringRegexp = require_escape_string_regexp();
  39772. var ansiStyles = require_ansi_styles();
  39773. var stdoutColor = require_supports_color2().stdout;
  39774. var template = require_templates();
  39775. var isSimpleWindowsTerm = process.platform === "win32" && !(process.env.TERM || "").toLowerCase().startsWith("xterm");
  39776. var levelMapping = ["ansi", "ansi", "ansi256", "ansi16m"];
  39777. var skipModels = /* @__PURE__ */ new Set(["gray"]);
  39778. var styles = /* @__PURE__ */ Object.create(null);
  39779. function applyOptions(obj, options) {
  39780. options = options || {};
  39781. const scLevel = stdoutColor ? stdoutColor.level : 0;
  39782. obj.level = options.level === void 0 ? scLevel : options.level;
  39783. obj.enabled = "enabled" in options ? options.enabled : obj.level > 0;
  39784. }
  39785. function Chalk(options) {
  39786. if (!this || !(this instanceof Chalk) || this.template) {
  39787. const chalk = {};
  39788. applyOptions(chalk, options);
  39789. chalk.template = function() {
  39790. const args = [].slice.call(arguments);
  39791. return chalkTag.apply(null, [chalk.template].concat(args));
  39792. };
  39793. Object.setPrototypeOf(chalk, Chalk.prototype);
  39794. Object.setPrototypeOf(chalk.template, chalk);
  39795. chalk.template.constructor = Chalk;
  39796. return chalk.template;
  39797. }
  39798. applyOptions(this, options);
  39799. }
  39800. if (isSimpleWindowsTerm) {
  39801. ansiStyles.blue.open = "\x1B[94m";
  39802. }
  39803. for (const key of Object.keys(ansiStyles)) {
  39804. ansiStyles[key].closeRe = new RegExp(escapeStringRegexp(ansiStyles[key].close), "g");
  39805. styles[key] = {
  39806. get() {
  39807. const codes = ansiStyles[key];
  39808. return build.call(this, this._styles ? this._styles.concat(codes) : [codes], this._empty, key);
  39809. }
  39810. };
  39811. }
  39812. styles.visible = {
  39813. get() {
  39814. return build.call(this, this._styles || [], true, "visible");
  39815. }
  39816. };
  39817. ansiStyles.color.closeRe = new RegExp(escapeStringRegexp(ansiStyles.color.close), "g");
  39818. for (const model of Object.keys(ansiStyles.color.ansi)) {
  39819. if (skipModels.has(model)) {
  39820. continue;
  39821. }
  39822. styles[model] = {
  39823. get() {
  39824. const level = this.level;
  39825. return function() {
  39826. const open = ansiStyles.color[levelMapping[level]][model].apply(null, arguments);
  39827. const codes = {
  39828. open,
  39829. close: ansiStyles.color.close,
  39830. closeRe: ansiStyles.color.closeRe
  39831. };
  39832. return build.call(this, this._styles ? this._styles.concat(codes) : [codes], this._empty, model);
  39833. };
  39834. }
  39835. };
  39836. }
  39837. ansiStyles.bgColor.closeRe = new RegExp(escapeStringRegexp(ansiStyles.bgColor.close), "g");
  39838. for (const model of Object.keys(ansiStyles.bgColor.ansi)) {
  39839. if (skipModels.has(model)) {
  39840. continue;
  39841. }
  39842. const bgModel = "bg" + model[0].toUpperCase() + model.slice(1);
  39843. styles[bgModel] = {
  39844. get() {
  39845. const level = this.level;
  39846. return function() {
  39847. const open = ansiStyles.bgColor[levelMapping[level]][model].apply(null, arguments);
  39848. const codes = {
  39849. open,
  39850. close: ansiStyles.bgColor.close,
  39851. closeRe: ansiStyles.bgColor.closeRe
  39852. };
  39853. return build.call(this, this._styles ? this._styles.concat(codes) : [codes], this._empty, model);
  39854. };
  39855. }
  39856. };
  39857. }
  39858. var proto = Object.defineProperties(() => {
  39859. }, styles);
  39860. function build(_styles, _empty, key) {
  39861. const builder = function() {
  39862. return applyStyle.apply(builder, arguments);
  39863. };
  39864. builder._styles = _styles;
  39865. builder._empty = _empty;
  39866. const self2 = this;
  39867. Object.defineProperty(builder, "level", {
  39868. enumerable: true,
  39869. get() {
  39870. return self2.level;
  39871. },
  39872. set(level) {
  39873. self2.level = level;
  39874. }
  39875. });
  39876. Object.defineProperty(builder, "enabled", {
  39877. enumerable: true,
  39878. get() {
  39879. return self2.enabled;
  39880. },
  39881. set(enabled) {
  39882. self2.enabled = enabled;
  39883. }
  39884. });
  39885. builder.hasGrey = this.hasGrey || key === "gray" || key === "grey";
  39886. builder.__proto__ = proto;
  39887. return builder;
  39888. }
  39889. function applyStyle() {
  39890. const args = arguments;
  39891. const argsLen = args.length;
  39892. let str = String(arguments[0]);
  39893. if (argsLen === 0) {
  39894. return "";
  39895. }
  39896. if (argsLen > 1) {
  39897. for (let a = 1; a < argsLen; a++) {
  39898. str += " " + args[a];
  39899. }
  39900. }
  39901. if (!this.enabled || this.level <= 0 || !str) {
  39902. return this._empty ? "" : str;
  39903. }
  39904. const originalDim = ansiStyles.dim.open;
  39905. if (isSimpleWindowsTerm && this.hasGrey) {
  39906. ansiStyles.dim.open = "";
  39907. }
  39908. for (const code2 of this._styles.slice().reverse()) {
  39909. str = code2.open + str.replace(code2.closeRe, code2.open) + code2.close;
  39910. str = str.replace(/\r?\n/g, `${code2.close}$&${code2.open}`);
  39911. }
  39912. ansiStyles.dim.open = originalDim;
  39913. return str;
  39914. }
  39915. function chalkTag(chalk, strings) {
  39916. if (!Array.isArray(strings)) {
  39917. return [].slice.call(arguments, 1).join(" ");
  39918. }
  39919. const args = [].slice.call(arguments, 2);
  39920. const parts = [strings.raw[0]];
  39921. for (let i = 1; i < strings.length; i++) {
  39922. parts.push(String(args[i - 1]).replace(/[{}\\]/g, "\\$&"));
  39923. parts.push(String(strings.raw[i]));
  39924. }
  39925. return template(chalk, parts.join(""));
  39926. }
  39927. Object.defineProperties(Chalk.prototype, styles);
  39928. module.exports = Chalk();
  39929. module.exports.supportsColor = stdoutColor;
  39930. module.exports.default = module.exports;
  39931. }
  39932. });
  39933. // node_modules/@babel/highlight/lib/index.js
  39934. var require_lib8 = __commonJS({
  39935. "node_modules/@babel/highlight/lib/index.js"(exports) {
  39936. "use strict";
  39937. Object.defineProperty(exports, "__esModule", {
  39938. value: true
  39939. });
  39940. exports.shouldHighlight = shouldHighlight;
  39941. exports.getChalk = getChalk;
  39942. exports.default = highlight;
  39943. var _helperValidatorIdentifier = require_lib7();
  39944. var jsTokens = require_js_tokens();
  39945. var Chalk = require_chalk();
  39946. var sometimesKeywords = /* @__PURE__ */ new Set(["as", "async", "from", "get", "of", "set"]);
  39947. function getDefs(chalk) {
  39948. return {
  39949. keyword: chalk.cyan,
  39950. capitalized: chalk.yellow,
  39951. jsxIdentifier: chalk.yellow,
  39952. punctuator: chalk.yellow,
  39953. number: chalk.magenta,
  39954. string: chalk.green,
  39955. regex: chalk.magenta,
  39956. comment: chalk.grey,
  39957. invalid: chalk.white.bgRed.bold
  39958. };
  39959. }
  39960. var NEWLINE = /\r\n|[\n\r\u2028\u2029]/;
  39961. var BRACKET = /^[()[\]{}]$/;
  39962. var tokenize;
  39963. {
  39964. const JSX_TAG = /^[a-z][\w-]*$/i;
  39965. const getTokenType = function(token, offset2, text5) {
  39966. if (token.type === "name") {
  39967. if ((0, _helperValidatorIdentifier.isKeyword)(token.value) || (0, _helperValidatorIdentifier.isStrictReservedWord)(token.value, true) || sometimesKeywords.has(token.value)) {
  39968. return "keyword";
  39969. }
  39970. if (JSX_TAG.test(token.value) && (text5[offset2 - 1] === "<" || text5.substr(offset2 - 2, 2) == "</")) {
  39971. return "jsxIdentifier";
  39972. }
  39973. if (token.value[0] !== token.value[0].toLowerCase()) {
  39974. return "capitalized";
  39975. }
  39976. }
  39977. if (token.type === "punctuator" && BRACKET.test(token.value)) {
  39978. return "bracket";
  39979. }
  39980. if (token.type === "invalid" && (token.value === "@" || token.value === "#")) {
  39981. return "punctuator";
  39982. }
  39983. return token.type;
  39984. };
  39985. tokenize = function* (text5) {
  39986. let match;
  39987. while (match = jsTokens.default.exec(text5)) {
  39988. const token = jsTokens.matchToToken(match);
  39989. yield {
  39990. type: getTokenType(token, match.index, text5),
  39991. value: token.value
  39992. };
  39993. }
  39994. };
  39995. }
  39996. function highlightTokens(defs, text5) {
  39997. let highlighted = "";
  39998. for (const {
  39999. type,
  40000. value
  40001. } of tokenize(text5)) {
  40002. const colorize = defs[type];
  40003. if (colorize) {
  40004. highlighted += value.split(NEWLINE).map((str) => colorize(str)).join("\n");
  40005. } else {
  40006. highlighted += value;
  40007. }
  40008. }
  40009. return highlighted;
  40010. }
  40011. function shouldHighlight(options) {
  40012. return !!Chalk.supportsColor || options.forceColor;
  40013. }
  40014. function getChalk(options) {
  40015. return options.forceColor ? new Chalk.constructor({
  40016. enabled: true,
  40017. level: 1
  40018. }) : Chalk;
  40019. }
  40020. function highlight(code2, options = {}) {
  40021. if (shouldHighlight(options)) {
  40022. const chalk = getChalk(options);
  40023. const defs = getDefs(chalk);
  40024. return highlightTokens(defs, code2);
  40025. } else {
  40026. return code2;
  40027. }
  40028. }
  40029. }
  40030. });
  40031. // node_modules/@babel/code-frame/lib/index.js
  40032. var require_lib9 = __commonJS({
  40033. "node_modules/@babel/code-frame/lib/index.js"(exports) {
  40034. "use strict";
  40035. Object.defineProperty(exports, "__esModule", {
  40036. value: true
  40037. });
  40038. exports.codeFrameColumns = codeFrameColumns;
  40039. exports.default = _default;
  40040. var _highlight = _interopRequireWildcard(require_lib8());
  40041. function _getRequireWildcardCache() {
  40042. if (typeof WeakMap !== "function")
  40043. return null;
  40044. var cache = /* @__PURE__ */ new WeakMap();
  40045. _getRequireWildcardCache = function() {
  40046. return cache;
  40047. };
  40048. return cache;
  40049. }
  40050. function _interopRequireWildcard(obj) {
  40051. if (obj && obj.__esModule) {
  40052. return obj;
  40053. }
  40054. if (obj === null || typeof obj !== "object" && typeof obj !== "function") {
  40055. return { default: obj };
  40056. }
  40057. var cache = _getRequireWildcardCache();
  40058. if (cache && cache.has(obj)) {
  40059. return cache.get(obj);
  40060. }
  40061. var newObj = {};
  40062. var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;
  40063. for (var key in obj) {
  40064. if (Object.prototype.hasOwnProperty.call(obj, key)) {
  40065. var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null;
  40066. if (desc && (desc.get || desc.set)) {
  40067. Object.defineProperty(newObj, key, desc);
  40068. } else {
  40069. newObj[key] = obj[key];
  40070. }
  40071. }
  40072. }
  40073. newObj.default = obj;
  40074. if (cache) {
  40075. cache.set(obj, newObj);
  40076. }
  40077. return newObj;
  40078. }
  40079. var deprecationWarningShown = false;
  40080. function getDefs(chalk) {
  40081. return {
  40082. gutter: chalk.grey,
  40083. marker: chalk.red.bold,
  40084. message: chalk.red.bold
  40085. };
  40086. }
  40087. var NEWLINE = /\r\n|[\n\r\u2028\u2029]/;
  40088. function getMarkerLines(loc, source, opts) {
  40089. const startLoc = Object.assign({
  40090. column: 0,
  40091. line: -1
  40092. }, loc.start);
  40093. const endLoc = Object.assign({}, startLoc, loc.end);
  40094. const {
  40095. linesAbove = 2,
  40096. linesBelow = 3
  40097. } = opts || {};
  40098. const startLine = startLoc.line;
  40099. const startColumn = startLoc.column;
  40100. const endLine = endLoc.line;
  40101. const endColumn = endLoc.column;
  40102. let start3 = Math.max(startLine - (linesAbove + 1), 0);
  40103. let end = Math.min(source.length, endLine + linesBelow);
  40104. if (startLine === -1) {
  40105. start3 = 0;
  40106. }
  40107. if (endLine === -1) {
  40108. end = source.length;
  40109. }
  40110. const lineDiff = endLine - startLine;
  40111. const markerLines = {};
  40112. if (lineDiff) {
  40113. for (let i = 0; i <= lineDiff; i++) {
  40114. const lineNumber = i + startLine;
  40115. if (!startColumn) {
  40116. markerLines[lineNumber] = true;
  40117. } else if (i === 0) {
  40118. const sourceLength = source[lineNumber - 1].length;
  40119. markerLines[lineNumber] = [startColumn, sourceLength - startColumn + 1];
  40120. } else if (i === lineDiff) {
  40121. markerLines[lineNumber] = [0, endColumn];
  40122. } else {
  40123. const sourceLength = source[lineNumber - i].length;
  40124. markerLines[lineNumber] = [0, sourceLength];
  40125. }
  40126. }
  40127. } else {
  40128. if (startColumn === endColumn) {
  40129. if (startColumn) {
  40130. markerLines[startLine] = [startColumn, 0];
  40131. } else {
  40132. markerLines[startLine] = true;
  40133. }
  40134. } else {
  40135. markerLines[startLine] = [startColumn, endColumn - startColumn];
  40136. }
  40137. }
  40138. return {
  40139. start: start3,
  40140. end,
  40141. markerLines
  40142. };
  40143. }
  40144. function codeFrameColumns(rawLines, loc, opts = {}) {
  40145. const highlighted = (opts.highlightCode || opts.forceColor) && (0, _highlight.shouldHighlight)(opts);
  40146. const chalk = (0, _highlight.getChalk)(opts);
  40147. const defs = getDefs(chalk);
  40148. const maybeHighlight = (chalkFn, string3) => {
  40149. return highlighted ? chalkFn(string3) : string3;
  40150. };
  40151. const lines = rawLines.split(NEWLINE);
  40152. const {
  40153. start: start3,
  40154. end,
  40155. markerLines
  40156. } = getMarkerLines(loc, lines, opts);
  40157. const hasColumns = loc.start && typeof loc.start.column === "number";
  40158. const numberMaxWidth = String(end).length;
  40159. const highlightedLines = highlighted ? (0, _highlight.default)(rawLines, opts) : rawLines;
  40160. let frame = highlightedLines.split(NEWLINE).slice(start3, end).map((line, index2) => {
  40161. const number2 = start3 + 1 + index2;
  40162. const paddedNumber = ` ${number2}`.slice(-numberMaxWidth);
  40163. const gutter = ` ${paddedNumber} |`;
  40164. const hasMarker = markerLines[number2];
  40165. const lastMarkerLine = !markerLines[number2 + 1];
  40166. if (hasMarker) {
  40167. let markerLine = "";
  40168. if (Array.isArray(hasMarker)) {
  40169. const markerSpacing = line.slice(0, Math.max(hasMarker[0] - 1, 0)).replace(/[^\t]/g, " ");
  40170. const numberOfMarkers = hasMarker[1] || 1;
  40171. markerLine = ["\n ", maybeHighlight(defs.gutter, gutter.replace(/\d/g, " ")), " ", markerSpacing, maybeHighlight(defs.marker, "^").repeat(numberOfMarkers)].join("");
  40172. if (lastMarkerLine && opts.message) {
  40173. markerLine += " " + maybeHighlight(defs.message, opts.message);
  40174. }
  40175. }
  40176. return [maybeHighlight(defs.marker, ">"), maybeHighlight(defs.gutter, gutter), line.length > 0 ? ` ${line}` : "", markerLine].join("");
  40177. } else {
  40178. return ` ${maybeHighlight(defs.gutter, gutter)}${line.length > 0 ? ` ${line}` : ""}`;
  40179. }
  40180. }).join("\n");
  40181. if (opts.message && !hasColumns) {
  40182. frame = `${" ".repeat(numberMaxWidth + 1)}${opts.message}
  40183. ${frame}`;
  40184. }
  40185. if (highlighted) {
  40186. return chalk.reset(frame);
  40187. } else {
  40188. return frame;
  40189. }
  40190. }
  40191. function _default(rawLines, lineNumber, colNumber, opts = {}) {
  40192. if (!deprecationWarningShown) {
  40193. deprecationWarningShown = true;
  40194. const message = "Passing lineNumber and colNumber is deprecated to @babel/code-frame. Please use `codeFrameColumns`.";
  40195. if (process.emitWarning) {
  40196. process.emitWarning(message, "DeprecationWarning");
  40197. } else {
  40198. const deprecationError = new Error(message);
  40199. deprecationError.name = "DeprecationWarning";
  40200. console.warn(new Error(message));
  40201. }
  40202. }
  40203. colNumber = Math.max(colNumber, 0);
  40204. const location = {
  40205. start: {
  40206. column: colNumber,
  40207. line: lineNumber
  40208. }
  40209. };
  40210. return codeFrameColumns(rawLines, location, opts);
  40211. }
  40212. }
  40213. });
  40214. // node_modules/estree-to-babel/node_modules/@babel/parser/lib/index.js
  40215. var require_lib10 = __commonJS({
  40216. "node_modules/estree-to-babel/node_modules/@babel/parser/lib/index.js"(exports) {
  40217. "use strict";
  40218. Object.defineProperty(exports, "__esModule", { value: true });
  40219. var beforeExpr2 = true;
  40220. var startsExpr2 = true;
  40221. var isLoop = true;
  40222. var isAssign = true;
  40223. var prefix = true;
  40224. var postfix = true;
  40225. var TokenType3 = class {
  40226. constructor(label, conf = {}) {
  40227. this.label = void 0;
  40228. this.keyword = void 0;
  40229. this.beforeExpr = void 0;
  40230. this.startsExpr = void 0;
  40231. this.rightAssociative = void 0;
  40232. this.isLoop = void 0;
  40233. this.isAssign = void 0;
  40234. this.prefix = void 0;
  40235. this.postfix = void 0;
  40236. this.binop = void 0;
  40237. this.updateContext = void 0;
  40238. this.label = label;
  40239. this.keyword = conf.keyword;
  40240. this.beforeExpr = !!conf.beforeExpr;
  40241. this.startsExpr = !!conf.startsExpr;
  40242. this.rightAssociative = !!conf.rightAssociative;
  40243. this.isLoop = !!conf.isLoop;
  40244. this.isAssign = !!conf.isAssign;
  40245. this.prefix = !!conf.prefix;
  40246. this.postfix = !!conf.postfix;
  40247. this.binop = conf.binop != null ? conf.binop : null;
  40248. this.updateContext = null;
  40249. }
  40250. };
  40251. var keywords$12 = /* @__PURE__ */ new Map();
  40252. function createKeyword(name2, options = {}) {
  40253. options.keyword = name2;
  40254. const token = new TokenType3(name2, options);
  40255. keywords$12.set(name2, token);
  40256. return token;
  40257. }
  40258. function createBinop(name2, binop2) {
  40259. return new TokenType3(name2, {
  40260. beforeExpr: beforeExpr2,
  40261. binop: binop2
  40262. });
  40263. }
  40264. var types$12 = {
  40265. num: new TokenType3("num", {
  40266. startsExpr: startsExpr2
  40267. }),
  40268. bigint: new TokenType3("bigint", {
  40269. startsExpr: startsExpr2
  40270. }),
  40271. decimal: new TokenType3("decimal", {
  40272. startsExpr: startsExpr2
  40273. }),
  40274. regexp: new TokenType3("regexp", {
  40275. startsExpr: startsExpr2
  40276. }),
  40277. string: new TokenType3("string", {
  40278. startsExpr: startsExpr2
  40279. }),
  40280. name: new TokenType3("name", {
  40281. startsExpr: startsExpr2
  40282. }),
  40283. privateName: new TokenType3("#name", {
  40284. startsExpr: startsExpr2
  40285. }),
  40286. eof: new TokenType3("eof"),
  40287. bracketL: new TokenType3("[", {
  40288. beforeExpr: beforeExpr2,
  40289. startsExpr: startsExpr2
  40290. }),
  40291. bracketHashL: new TokenType3("#[", {
  40292. beforeExpr: beforeExpr2,
  40293. startsExpr: startsExpr2
  40294. }),
  40295. bracketBarL: new TokenType3("[|", {
  40296. beforeExpr: beforeExpr2,
  40297. startsExpr: startsExpr2
  40298. }),
  40299. bracketR: new TokenType3("]"),
  40300. bracketBarR: new TokenType3("|]"),
  40301. braceL: new TokenType3("{", {
  40302. beforeExpr: beforeExpr2,
  40303. startsExpr: startsExpr2
  40304. }),
  40305. braceBarL: new TokenType3("{|", {
  40306. beforeExpr: beforeExpr2,
  40307. startsExpr: startsExpr2
  40308. }),
  40309. braceHashL: new TokenType3("#{", {
  40310. beforeExpr: beforeExpr2,
  40311. startsExpr: startsExpr2
  40312. }),
  40313. braceR: new TokenType3("}"),
  40314. braceBarR: new TokenType3("|}"),
  40315. parenL: new TokenType3("(", {
  40316. beforeExpr: beforeExpr2,
  40317. startsExpr: startsExpr2
  40318. }),
  40319. parenR: new TokenType3(")"),
  40320. comma: new TokenType3(",", {
  40321. beforeExpr: beforeExpr2
  40322. }),
  40323. semi: new TokenType3(";", {
  40324. beforeExpr: beforeExpr2
  40325. }),
  40326. colon: new TokenType3(":", {
  40327. beforeExpr: beforeExpr2
  40328. }),
  40329. doubleColon: new TokenType3("::", {
  40330. beforeExpr: beforeExpr2
  40331. }),
  40332. dot: new TokenType3("."),
  40333. question: new TokenType3("?", {
  40334. beforeExpr: beforeExpr2
  40335. }),
  40336. questionDot: new TokenType3("?."),
  40337. arrow: new TokenType3("=>", {
  40338. beforeExpr: beforeExpr2
  40339. }),
  40340. template: new TokenType3("template"),
  40341. ellipsis: new TokenType3("...", {
  40342. beforeExpr: beforeExpr2
  40343. }),
  40344. backQuote: new TokenType3("`", {
  40345. startsExpr: startsExpr2
  40346. }),
  40347. dollarBraceL: new TokenType3("${", {
  40348. beforeExpr: beforeExpr2,
  40349. startsExpr: startsExpr2
  40350. }),
  40351. at: new TokenType3("@"),
  40352. hash: new TokenType3("#", {
  40353. startsExpr: startsExpr2
  40354. }),
  40355. interpreterDirective: new TokenType3("#!..."),
  40356. eq: new TokenType3("=", {
  40357. beforeExpr: beforeExpr2,
  40358. isAssign
  40359. }),
  40360. assign: new TokenType3("_=", {
  40361. beforeExpr: beforeExpr2,
  40362. isAssign
  40363. }),
  40364. incDec: new TokenType3("++/--", {
  40365. prefix,
  40366. postfix,
  40367. startsExpr: startsExpr2
  40368. }),
  40369. bang: new TokenType3("!", {
  40370. beforeExpr: beforeExpr2,
  40371. prefix,
  40372. startsExpr: startsExpr2
  40373. }),
  40374. tilde: new TokenType3("~", {
  40375. beforeExpr: beforeExpr2,
  40376. prefix,
  40377. startsExpr: startsExpr2
  40378. }),
  40379. pipeline: createBinop("|>", 0),
  40380. nullishCoalescing: createBinop("??", 1),
  40381. logicalOR: createBinop("||", 1),
  40382. logicalAND: createBinop("&&", 2),
  40383. bitwiseOR: createBinop("|", 3),
  40384. bitwiseXOR: createBinop("^", 4),
  40385. bitwiseAND: createBinop("&", 5),
  40386. equality: createBinop("==/!=/===/!==", 6),
  40387. relational: createBinop("</>/<=/>=", 7),
  40388. bitShift: createBinop("<</>>/>>>", 8),
  40389. plusMin: new TokenType3("+/-", {
  40390. beforeExpr: beforeExpr2,
  40391. binop: 9,
  40392. prefix,
  40393. startsExpr: startsExpr2
  40394. }),
  40395. modulo: new TokenType3("%", {
  40396. beforeExpr: beforeExpr2,
  40397. binop: 10,
  40398. startsExpr: startsExpr2
  40399. }),
  40400. star: new TokenType3("*", {
  40401. binop: 10
  40402. }),
  40403. slash: createBinop("/", 10),
  40404. exponent: new TokenType3("**", {
  40405. beforeExpr: beforeExpr2,
  40406. binop: 11,
  40407. rightAssociative: true
  40408. }),
  40409. _break: createKeyword("break"),
  40410. _case: createKeyword("case", {
  40411. beforeExpr: beforeExpr2
  40412. }),
  40413. _catch: createKeyword("catch"),
  40414. _continue: createKeyword("continue"),
  40415. _debugger: createKeyword("debugger"),
  40416. _default: createKeyword("default", {
  40417. beforeExpr: beforeExpr2
  40418. }),
  40419. _do: createKeyword("do", {
  40420. isLoop,
  40421. beforeExpr: beforeExpr2
  40422. }),
  40423. _else: createKeyword("else", {
  40424. beforeExpr: beforeExpr2
  40425. }),
  40426. _finally: createKeyword("finally"),
  40427. _for: createKeyword("for", {
  40428. isLoop
  40429. }),
  40430. _function: createKeyword("function", {
  40431. startsExpr: startsExpr2
  40432. }),
  40433. _if: createKeyword("if"),
  40434. _return: createKeyword("return", {
  40435. beforeExpr: beforeExpr2
  40436. }),
  40437. _switch: createKeyword("switch"),
  40438. _throw: createKeyword("throw", {
  40439. beforeExpr: beforeExpr2,
  40440. prefix,
  40441. startsExpr: startsExpr2
  40442. }),
  40443. _try: createKeyword("try"),
  40444. _var: createKeyword("var"),
  40445. _const: createKeyword("const"),
  40446. _while: createKeyword("while", {
  40447. isLoop
  40448. }),
  40449. _with: createKeyword("with"),
  40450. _new: createKeyword("new", {
  40451. beforeExpr: beforeExpr2,
  40452. startsExpr: startsExpr2
  40453. }),
  40454. _this: createKeyword("this", {
  40455. startsExpr: startsExpr2
  40456. }),
  40457. _super: createKeyword("super", {
  40458. startsExpr: startsExpr2
  40459. }),
  40460. _class: createKeyword("class", {
  40461. startsExpr: startsExpr2
  40462. }),
  40463. _extends: createKeyword("extends", {
  40464. beforeExpr: beforeExpr2
  40465. }),
  40466. _export: createKeyword("export"),
  40467. _import: createKeyword("import", {
  40468. startsExpr: startsExpr2
  40469. }),
  40470. _null: createKeyword("null", {
  40471. startsExpr: startsExpr2
  40472. }),
  40473. _true: createKeyword("true", {
  40474. startsExpr: startsExpr2
  40475. }),
  40476. _false: createKeyword("false", {
  40477. startsExpr: startsExpr2
  40478. }),
  40479. _in: createKeyword("in", {
  40480. beforeExpr: beforeExpr2,
  40481. binop: 7
  40482. }),
  40483. _instanceof: createKeyword("instanceof", {
  40484. beforeExpr: beforeExpr2,
  40485. binop: 7
  40486. }),
  40487. _typeof: createKeyword("typeof", {
  40488. beforeExpr: beforeExpr2,
  40489. prefix,
  40490. startsExpr: startsExpr2
  40491. }),
  40492. _void: createKeyword("void", {
  40493. beforeExpr: beforeExpr2,
  40494. prefix,
  40495. startsExpr: startsExpr2
  40496. }),
  40497. _delete: createKeyword("delete", {
  40498. beforeExpr: beforeExpr2,
  40499. prefix,
  40500. startsExpr: startsExpr2
  40501. })
  40502. };
  40503. var lineBreak2 = /\r\n?|[\n\u2028\u2029]/;
  40504. var lineBreakG2 = new RegExp(lineBreak2.source, "g");
  40505. function isNewLine2(code2) {
  40506. switch (code2) {
  40507. case 10:
  40508. case 13:
  40509. case 8232:
  40510. case 8233:
  40511. return true;
  40512. default:
  40513. return false;
  40514. }
  40515. }
  40516. var skipWhiteSpace2 = /(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g;
  40517. function isWhitespace(code2) {
  40518. switch (code2) {
  40519. case 9:
  40520. case 11:
  40521. case 12:
  40522. case 32:
  40523. case 160:
  40524. case 5760:
  40525. case 8192:
  40526. case 8193:
  40527. case 8194:
  40528. case 8195:
  40529. case 8196:
  40530. case 8197:
  40531. case 8198:
  40532. case 8199:
  40533. case 8200:
  40534. case 8201:
  40535. case 8202:
  40536. case 8239:
  40537. case 8287:
  40538. case 12288:
  40539. case 65279:
  40540. return true;
  40541. default:
  40542. return false;
  40543. }
  40544. }
  40545. var Position3 = class {
  40546. constructor(line, col) {
  40547. this.line = void 0;
  40548. this.column = void 0;
  40549. this.line = line;
  40550. this.column = col;
  40551. }
  40552. };
  40553. var SourceLocation3 = class {
  40554. constructor(start3, end) {
  40555. this.start = void 0;
  40556. this.end = void 0;
  40557. this.filename = void 0;
  40558. this.identifierName = void 0;
  40559. this.start = start3;
  40560. this.end = end;
  40561. }
  40562. };
  40563. function getLineInfo2(input, offset2) {
  40564. let line = 1;
  40565. let lineStart = 0;
  40566. let match;
  40567. lineBreakG2.lastIndex = 0;
  40568. while ((match = lineBreakG2.exec(input)) && match.index < offset2) {
  40569. line++;
  40570. lineStart = lineBreakG2.lastIndex;
  40571. }
  40572. return new Position3(line, offset2 - lineStart);
  40573. }
  40574. var BaseParser = class {
  40575. constructor() {
  40576. this.sawUnambiguousESM = false;
  40577. this.ambiguousScriptDifferentAst = false;
  40578. }
  40579. hasPlugin(name2) {
  40580. return this.plugins.has(name2);
  40581. }
  40582. getPluginOption(plugin2, name2) {
  40583. if (this.hasPlugin(plugin2))
  40584. return this.plugins.get(plugin2)[name2];
  40585. }
  40586. };
  40587. function last(stack) {
  40588. return stack[stack.length - 1];
  40589. }
  40590. var CommentsParser = class extends BaseParser {
  40591. addComment(comment2) {
  40592. if (this.filename)
  40593. comment2.loc.filename = this.filename;
  40594. this.state.trailingComments.push(comment2);
  40595. this.state.leadingComments.push(comment2);
  40596. }
  40597. adjustCommentsAfterTrailingComma(node, elements, takeAllComments) {
  40598. if (this.state.leadingComments.length === 0) {
  40599. return;
  40600. }
  40601. let lastElement = null;
  40602. let i = elements.length;
  40603. while (lastElement === null && i > 0) {
  40604. lastElement = elements[--i];
  40605. }
  40606. if (lastElement === null) {
  40607. return;
  40608. }
  40609. for (let j = 0; j < this.state.leadingComments.length; j++) {
  40610. if (this.state.leadingComments[j].end < this.state.commentPreviousNode.end) {
  40611. this.state.leadingComments.splice(j, 1);
  40612. j--;
  40613. }
  40614. }
  40615. const newTrailingComments = [];
  40616. for (let i2 = 0; i2 < this.state.leadingComments.length; i2++) {
  40617. const leadingComment = this.state.leadingComments[i2];
  40618. if (leadingComment.end < node.end) {
  40619. newTrailingComments.push(leadingComment);
  40620. if (!takeAllComments) {
  40621. this.state.leadingComments.splice(i2, 1);
  40622. i2--;
  40623. }
  40624. } else {
  40625. if (node.trailingComments === void 0) {
  40626. node.trailingComments = [];
  40627. }
  40628. node.trailingComments.push(leadingComment);
  40629. }
  40630. }
  40631. if (takeAllComments)
  40632. this.state.leadingComments = [];
  40633. if (newTrailingComments.length > 0) {
  40634. lastElement.trailingComments = newTrailingComments;
  40635. } else if (lastElement.trailingComments !== void 0) {
  40636. lastElement.trailingComments = [];
  40637. }
  40638. }
  40639. processComment(node) {
  40640. if (node.type === "Program" && node.body.length > 0)
  40641. return;
  40642. const stack = this.state.commentStack;
  40643. let firstChild, lastChild, trailingComments, i, j;
  40644. if (this.state.trailingComments.length > 0) {
  40645. if (this.state.trailingComments[0].start >= node.end) {
  40646. trailingComments = this.state.trailingComments;
  40647. this.state.trailingComments = [];
  40648. } else {
  40649. this.state.trailingComments.length = 0;
  40650. }
  40651. } else if (stack.length > 0) {
  40652. const lastInStack = last(stack);
  40653. if (lastInStack.trailingComments && lastInStack.trailingComments[0].start >= node.end) {
  40654. trailingComments = lastInStack.trailingComments;
  40655. delete lastInStack.trailingComments;
  40656. }
  40657. }
  40658. if (stack.length > 0 && last(stack).start >= node.start) {
  40659. firstChild = stack.pop();
  40660. }
  40661. while (stack.length > 0 && last(stack).start >= node.start) {
  40662. lastChild = stack.pop();
  40663. }
  40664. if (!lastChild && firstChild)
  40665. lastChild = firstChild;
  40666. if (firstChild) {
  40667. switch (node.type) {
  40668. case "ObjectExpression":
  40669. this.adjustCommentsAfterTrailingComma(node, node.properties);
  40670. break;
  40671. case "ObjectPattern":
  40672. this.adjustCommentsAfterTrailingComma(node, node.properties, true);
  40673. break;
  40674. case "CallExpression":
  40675. this.adjustCommentsAfterTrailingComma(node, node.arguments);
  40676. break;
  40677. case "ArrayExpression":
  40678. this.adjustCommentsAfterTrailingComma(node, node.elements);
  40679. break;
  40680. case "ArrayPattern":
  40681. this.adjustCommentsAfterTrailingComma(node, node.elements, true);
  40682. break;
  40683. }
  40684. } else if (this.state.commentPreviousNode && (this.state.commentPreviousNode.type === "ImportSpecifier" && node.type !== "ImportSpecifier" || this.state.commentPreviousNode.type === "ExportSpecifier" && node.type !== "ExportSpecifier")) {
  40685. this.adjustCommentsAfterTrailingComma(node, [this.state.commentPreviousNode]);
  40686. }
  40687. if (lastChild) {
  40688. if (lastChild.leadingComments) {
  40689. if (lastChild !== node && lastChild.leadingComments.length > 0 && last(lastChild.leadingComments).end <= node.start) {
  40690. node.leadingComments = lastChild.leadingComments;
  40691. delete lastChild.leadingComments;
  40692. } else {
  40693. for (i = lastChild.leadingComments.length - 2; i >= 0; --i) {
  40694. if (lastChild.leadingComments[i].end <= node.start) {
  40695. node.leadingComments = lastChild.leadingComments.splice(0, i + 1);
  40696. break;
  40697. }
  40698. }
  40699. }
  40700. }
  40701. } else if (this.state.leadingComments.length > 0) {
  40702. if (last(this.state.leadingComments).end <= node.start) {
  40703. if (this.state.commentPreviousNode) {
  40704. for (j = 0; j < this.state.leadingComments.length; j++) {
  40705. if (this.state.leadingComments[j].end < this.state.commentPreviousNode.end) {
  40706. this.state.leadingComments.splice(j, 1);
  40707. j--;
  40708. }
  40709. }
  40710. }
  40711. if (this.state.leadingComments.length > 0) {
  40712. node.leadingComments = this.state.leadingComments;
  40713. this.state.leadingComments = [];
  40714. }
  40715. } else {
  40716. for (i = 0; i < this.state.leadingComments.length; i++) {
  40717. if (this.state.leadingComments[i].end > node.start) {
  40718. break;
  40719. }
  40720. }
  40721. const leadingComments = this.state.leadingComments.slice(0, i);
  40722. if (leadingComments.length) {
  40723. node.leadingComments = leadingComments;
  40724. }
  40725. trailingComments = this.state.leadingComments.slice(i);
  40726. if (trailingComments.length === 0) {
  40727. trailingComments = null;
  40728. }
  40729. }
  40730. }
  40731. this.state.commentPreviousNode = node;
  40732. if (trailingComments) {
  40733. if (trailingComments.length && trailingComments[0].start >= node.start && last(trailingComments).end <= node.end) {
  40734. node.innerComments = trailingComments;
  40735. } else {
  40736. const firstTrailingCommentIndex = trailingComments.findIndex((comment2) => comment2.end >= node.end);
  40737. if (firstTrailingCommentIndex > 0) {
  40738. node.innerComments = trailingComments.slice(0, firstTrailingCommentIndex);
  40739. node.trailingComments = trailingComments.slice(firstTrailingCommentIndex);
  40740. } else {
  40741. node.trailingComments = trailingComments;
  40742. }
  40743. }
  40744. }
  40745. stack.push(node);
  40746. }
  40747. };
  40748. var ErrorCodes = Object.freeze({
  40749. SyntaxError: "BABEL_PARSER_SYNTAX_ERROR",
  40750. SourceTypeModuleError: "BABEL_PARSER_SOURCETYPE_MODULE_REQUIRED"
  40751. });
  40752. var ErrorMessages = makeErrorTemplates({
  40753. AccessorIsGenerator: "A %0ter cannot be a generator.",
  40754. ArgumentsInClass: "'arguments' is only allowed in functions and class methods.",
  40755. AsyncFunctionInSingleStatementContext: "Async functions can only be declared at the top level or inside a block.",
  40756. AwaitBindingIdentifier: "Can not use 'await' as identifier inside an async function.",
  40757. AwaitBindingIdentifierInStaticBlock: "Can not use 'await' as identifier inside a static block.",
  40758. AwaitExpressionFormalParameter: "'await' is not allowed in async function parameters.",
  40759. AwaitNotInAsyncContext: "'await' is only allowed within async functions and at the top levels of modules.",
  40760. AwaitNotInAsyncFunction: "'await' is only allowed within async functions.",
  40761. BadGetterArity: "A 'get' accesor must not have any formal parameters.",
  40762. BadSetterArity: "A 'set' accesor must have exactly one formal parameter.",
  40763. BadSetterRestParameter: "A 'set' accesor function argument must not be a rest parameter.",
  40764. ConstructorClassField: "Classes may not have a field named 'constructor'.",
  40765. ConstructorClassPrivateField: "Classes may not have a private field named '#constructor'.",
  40766. ConstructorIsAccessor: "Class constructor may not be an accessor.",
  40767. ConstructorIsAsync: "Constructor can't be an async function.",
  40768. ConstructorIsGenerator: "Constructor can't be a generator.",
  40769. DeclarationMissingInitializer: "'%0' require an initialization value.",
  40770. DecoratorBeforeExport: "Decorators must be placed *before* the 'export' keyword. You can set the 'decoratorsBeforeExport' option to false to use the 'export @decorator class {}' syntax.",
  40771. DecoratorConstructor: "Decorators can't be used with a constructor. Did you mean '@dec class { ... }'?",
  40772. DecoratorExportClass: "Using the export keyword between a decorator and a class is not allowed. Please use `export @dec class` instead.",
  40773. DecoratorSemicolon: "Decorators must not be followed by a semicolon.",
  40774. DecoratorStaticBlock: "Decorators can't be used with a static block.",
  40775. DeletePrivateField: "Deleting a private field is not allowed.",
  40776. DestructureNamedImport: "ES2015 named imports do not destructure. Use another statement for destructuring after the import.",
  40777. DuplicateConstructor: "Duplicate constructor in the same class.",
  40778. DuplicateDefaultExport: "Only one default export allowed per module.",
  40779. DuplicateExport: "`%0` has already been exported. Exported identifiers must be unique.",
  40780. DuplicateProto: "Redefinition of __proto__ property.",
  40781. DuplicateRegExpFlags: "Duplicate regular expression flag.",
  40782. ElementAfterRest: "Rest element must be last element.",
  40783. EscapedCharNotAnIdentifier: "Invalid Unicode escape.",
  40784. ExportBindingIsString: "A string literal cannot be used as an exported binding without `from`.\n- Did you mean `export { '%0' as '%1' } from 'some-module'`?",
  40785. ExportDefaultFromAsIdentifier: "'from' is not allowed as an identifier after 'export default'.",
  40786. ForInOfLoopInitializer: "'%0' loop variable declaration may not have an initializer.",
  40787. ForOfAsync: "The left-hand side of a for-of loop may not be 'async'.",
  40788. ForOfLet: "The left-hand side of a for-of loop may not start with 'let'.",
  40789. GeneratorInSingleStatementContext: "Generators can only be declared at the top level or inside a block.",
  40790. IllegalBreakContinue: "Unsyntactic %0.",
  40791. IllegalLanguageModeDirective: "Illegal 'use strict' directive in function with non-simple parameter list.",
  40792. IllegalReturn: "'return' outside of function.",
  40793. ImportBindingIsString: 'A string literal cannot be used as an imported binding.\n- Did you mean `import { "%0" as foo }`?',
  40794. ImportCallArgumentTrailingComma: "Trailing comma is disallowed inside import(...) arguments.",
  40795. ImportCallArity: "`import()` requires exactly %0.",
  40796. ImportCallNotNewExpression: "Cannot use new with import(...).",
  40797. ImportCallSpreadArgument: "`...` is not allowed in `import()`.",
  40798. InvalidBigIntLiteral: "Invalid BigIntLiteral.",
  40799. InvalidCodePoint: "Code point out of bounds.",
  40800. InvalidDecimal: "Invalid decimal.",
  40801. InvalidDigit: "Expected number in radix %0.",
  40802. InvalidEscapeSequence: "Bad character escape sequence.",
  40803. InvalidEscapeSequenceTemplate: "Invalid escape sequence in template.",
  40804. InvalidEscapedReservedWord: "Escape sequence in keyword %0.",
  40805. InvalidIdentifier: "Invalid identifier %0.",
  40806. InvalidLhs: "Invalid left-hand side in %0.",
  40807. InvalidLhsBinding: "Binding invalid left-hand side in %0.",
  40808. InvalidNumber: "Invalid number.",
  40809. InvalidOrMissingExponent: "Floating-point numbers require a valid exponent after the 'e'.",
  40810. InvalidOrUnexpectedToken: "Unexpected character '%0'.",
  40811. InvalidParenthesizedAssignment: "Invalid parenthesized assignment pattern.",
  40812. InvalidPrivateFieldResolution: "Private name #%0 is not defined.",
  40813. InvalidPropertyBindingPattern: "Binding member expression.",
  40814. InvalidRecordProperty: "Only properties and spread elements are allowed in record definitions.",
  40815. InvalidRestAssignmentPattern: "Invalid rest operator's argument.",
  40816. LabelRedeclaration: "Label '%0' is already declared.",
  40817. LetInLexicalBinding: "'let' is not allowed to be used as a name in 'let' or 'const' declarations.",
  40818. LineTerminatorBeforeArrow: "No line break is allowed before '=>'.",
  40819. MalformedRegExpFlags: "Invalid regular expression flag.",
  40820. MissingClassName: "A class name is required.",
  40821. MissingEqInAssignment: "Only '=' operator can be used for specifying default value.",
  40822. MissingSemicolon: "Missing semicolon.",
  40823. MissingUnicodeEscape: "Expecting Unicode escape sequence \\uXXXX.",
  40824. MixingCoalesceWithLogical: "Nullish coalescing operator(??) requires parens when mixing with logical operators.",
  40825. ModuleAttributeDifferentFromType: "The only accepted module attribute is `type`.",
  40826. ModuleAttributeInvalidValue: "Only string literals are allowed as module attribute values.",
  40827. ModuleAttributesWithDuplicateKeys: 'Duplicate key "%0" is not allowed in module attributes.',
  40828. ModuleExportNameHasLoneSurrogate: "An export name cannot include a lone surrogate, found '\\u%0'.",
  40829. ModuleExportUndefined: "Export '%0' is not defined.",
  40830. MultipleDefaultsInSwitch: "Multiple default clauses.",
  40831. NewlineAfterThrow: "Illegal newline after throw.",
  40832. NoCatchOrFinally: "Missing catch or finally clause.",
  40833. NumberIdentifier: "Identifier directly after number.",
  40834. NumericSeparatorInEscapeSequence: "Numeric separators are not allowed inside unicode escape sequences or hex escape sequences.",
  40835. ObsoleteAwaitStar: "'await*' has been removed from the async functions proposal. Use Promise.all() instead.",
  40836. OptionalChainingNoNew: "Constructors in/after an Optional Chain are not allowed.",
  40837. OptionalChainingNoTemplate: "Tagged Template Literals are not allowed in optionalChain.",
  40838. OverrideOnConstructor: "'override' modifier cannot appear on a constructor declaration.",
  40839. ParamDupe: "Argument name clash.",
  40840. PatternHasAccessor: "Object pattern can't contain getter or setter.",
  40841. PatternHasMethod: "Object pattern can't contain methods.",
  40842. PipelineBodyNoArrow: 'Unexpected arrow "=>" after pipeline body; arrow function in pipeline body must be parenthesized.',
  40843. PipelineBodySequenceExpression: "Pipeline body may not be a comma-separated sequence expression.",
  40844. PipelineHeadSequenceExpression: "Pipeline head should not be a comma-separated sequence expression.",
  40845. PipelineTopicUnused: "Pipeline is in topic style but does not use topic reference.",
  40846. PrimaryTopicNotAllowed: "Topic reference was used in a lexical context without topic binding.",
  40847. PrimaryTopicRequiresSmartPipeline: "Primary Topic Reference found but pipelineOperator not passed 'smart' for 'proposal' option.",
  40848. PrivateInExpectedIn: "Private names are only allowed in property accesses (`obj.#%0`) or in `in` expressions (`#%0 in obj`).",
  40849. PrivateNameRedeclaration: "Duplicate private name #%0.",
  40850. RecordExpressionBarIncorrectEndSyntaxType: "Record expressions ending with '|}' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'bar'.",
  40851. RecordExpressionBarIncorrectStartSyntaxType: "Record expressions starting with '{|' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'bar'.",
  40852. RecordExpressionHashIncorrectStartSyntaxType: "Record expressions starting with '#{' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'hash'.",
  40853. RecordNoProto: "'__proto__' is not allowed in Record expressions.",
  40854. RestTrailingComma: "Unexpected trailing comma after rest element.",
  40855. SloppyFunction: "In non-strict mode code, functions can only be declared at top level, inside a block, or as the body of an if statement.",
  40856. StaticPrototype: "Classes may not have static property named prototype.",
  40857. StrictDelete: "Deleting local variable in strict mode.",
  40858. StrictEvalArguments: "Assigning to '%0' in strict mode.",
  40859. StrictEvalArgumentsBinding: "Binding '%0' in strict mode.",
  40860. StrictFunction: "In strict mode code, functions can only be declared at top level or inside a block.",
  40861. StrictNumericEscape: "The only valid numeric escape in strict mode is '\\0'.",
  40862. StrictOctalLiteral: "Legacy octal literals are not allowed in strict mode.",
  40863. StrictWith: "'with' in strict mode.",
  40864. SuperNotAllowed: "`super()` is only valid inside a class constructor of a subclass. Maybe a typo in the method name ('constructor') or not extending another class?",
  40865. SuperPrivateField: "Private fields can't be accessed on super.",
  40866. TrailingDecorator: "Decorators must be attached to a class element.",
  40867. TupleExpressionBarIncorrectEndSyntaxType: "Tuple expressions ending with '|]' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'bar'.",
  40868. TupleExpressionBarIncorrectStartSyntaxType: "Tuple expressions starting with '[|' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'bar'.",
  40869. TupleExpressionHashIncorrectStartSyntaxType: "Tuple expressions starting with '#[' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'hash'.",
  40870. UnexpectedArgumentPlaceholder: "Unexpected argument placeholder.",
  40871. UnexpectedAwaitAfterPipelineBody: 'Unexpected "await" after pipeline body; await must have parentheses in minimal proposal.',
  40872. UnexpectedDigitAfterHash: "Unexpected digit after hash token.",
  40873. UnexpectedImportExport: "'import' and 'export' may only appear at the top level.",
  40874. UnexpectedKeyword: "Unexpected keyword '%0'.",
  40875. UnexpectedLeadingDecorator: "Leading decorators must be attached to a class declaration.",
  40876. UnexpectedLexicalDeclaration: "Lexical declaration cannot appear in a single-statement context.",
  40877. UnexpectedNewTarget: "`new.target` can only be used in functions or class properties.",
  40878. UnexpectedNumericSeparator: "A numeric separator is only allowed between two digits.",
  40879. UnexpectedPrivateField: "Private names can only be used as the name of a class element (i.e. class C { #p = 42; #m() {} } )\n or a property of member expression (i.e. this.#p).",
  40880. UnexpectedReservedWord: "Unexpected reserved word '%0'.",
  40881. UnexpectedSuper: "'super' is only allowed in object methods and classes.",
  40882. UnexpectedToken: "Unexpected token '%0'.",
  40883. UnexpectedTokenUnaryExponentiation: "Illegal expression. Wrap left hand side or entire exponentiation in parentheses.",
  40884. UnsupportedBind: "Binding should be performed on object property.",
  40885. UnsupportedDecoratorExport: "A decorated export must export a class declaration.",
  40886. UnsupportedDefaultExport: "Only expressions, functions or classes are allowed as the `default` export.",
  40887. UnsupportedImport: "`import` can only be used in `import()` or `import.meta`.",
  40888. UnsupportedMetaProperty: "The only valid meta property for %0 is %0.%1.",
  40889. UnsupportedParameterDecorator: "Decorators cannot be used to decorate parameters.",
  40890. UnsupportedPropertyDecorator: "Decorators cannot be used to decorate object literal properties.",
  40891. UnsupportedSuper: "'super' can only be used with function calls (i.e. super()) or in property accesses (i.e. super.prop or super[prop]).",
  40892. UnterminatedComment: "Unterminated comment.",
  40893. UnterminatedRegExp: "Unterminated regular expression.",
  40894. UnterminatedString: "Unterminated string constant.",
  40895. UnterminatedTemplate: "Unterminated template.",
  40896. VarRedeclaration: "Identifier '%0' has already been declared.",
  40897. YieldBindingIdentifier: "Can not use 'yield' as identifier inside a generator.",
  40898. YieldInParameter: "Yield expression is not allowed in formal parameters.",
  40899. ZeroDigitNumericSeparator: "Numeric separator can not be used after leading 0."
  40900. }, ErrorCodes.SyntaxError);
  40901. var SourceTypeModuleErrorMessages = makeErrorTemplates({
  40902. ImportMetaOutsideModule: `import.meta may appear only with 'sourceType: "module"'`,
  40903. ImportOutsideModule: `'import' and 'export' may appear only with 'sourceType: "module"'`
  40904. }, ErrorCodes.SourceTypeModuleError);
  40905. function makeErrorTemplates(messages2, code2) {
  40906. const templates = {};
  40907. Object.keys(messages2).forEach((reasonCode) => {
  40908. templates[reasonCode] = Object.freeze({
  40909. code: code2,
  40910. reasonCode,
  40911. template: messages2[reasonCode]
  40912. });
  40913. });
  40914. return Object.freeze(templates);
  40915. }
  40916. var ParserError = class extends CommentsParser {
  40917. getLocationForPosition(pos) {
  40918. let loc;
  40919. if (pos === this.state.start)
  40920. loc = this.state.startLoc;
  40921. else if (pos === this.state.lastTokStart)
  40922. loc = this.state.lastTokStartLoc;
  40923. else if (pos === this.state.end)
  40924. loc = this.state.endLoc;
  40925. else if (pos === this.state.lastTokEnd)
  40926. loc = this.state.lastTokEndLoc;
  40927. else
  40928. loc = getLineInfo2(this.input, pos);
  40929. return loc;
  40930. }
  40931. raise(pos, {
  40932. code: code2,
  40933. reasonCode,
  40934. template
  40935. }, ...params) {
  40936. return this.raiseWithData(pos, {
  40937. code: code2,
  40938. reasonCode
  40939. }, template, ...params);
  40940. }
  40941. raiseOverwrite(pos, {
  40942. code: code2,
  40943. template
  40944. }, ...params) {
  40945. const loc = this.getLocationForPosition(pos);
  40946. const message = template.replace(/%(\d+)/g, (_, i) => params[i]) + ` (${loc.line}:${loc.column})`;
  40947. if (this.options.errorRecovery) {
  40948. const errors = this.state.errors;
  40949. for (let i = errors.length - 1; i >= 0; i--) {
  40950. const error = errors[i];
  40951. if (error.pos === pos) {
  40952. return Object.assign(error, {
  40953. message
  40954. });
  40955. } else if (error.pos < pos) {
  40956. break;
  40957. }
  40958. }
  40959. }
  40960. return this._raise({
  40961. code: code2,
  40962. loc,
  40963. pos
  40964. }, message);
  40965. }
  40966. raiseWithData(pos, data2, errorTemplate, ...params) {
  40967. const loc = this.getLocationForPosition(pos);
  40968. const message = errorTemplate.replace(/%(\d+)/g, (_, i) => params[i]) + ` (${loc.line}:${loc.column})`;
  40969. return this._raise(Object.assign({
  40970. loc,
  40971. pos
  40972. }, data2), message);
  40973. }
  40974. _raise(errorContext, message) {
  40975. const err = new SyntaxError(message);
  40976. Object.assign(err, errorContext);
  40977. if (this.options.errorRecovery) {
  40978. if (!this.isLookahead)
  40979. this.state.errors.push(err);
  40980. return err;
  40981. } else {
  40982. throw err;
  40983. }
  40984. }
  40985. };
  40986. var estree = (superClass) => class extends superClass {
  40987. parseRegExpLiteral({
  40988. pattern,
  40989. flags
  40990. }) {
  40991. let regex2 = null;
  40992. try {
  40993. regex2 = new RegExp(pattern, flags);
  40994. } catch (e) {
  40995. }
  40996. const node = this.estreeParseLiteral(regex2);
  40997. node.regex = {
  40998. pattern,
  40999. flags
  41000. };
  41001. return node;
  41002. }
  41003. parseBigIntLiteral(value) {
  41004. let bigInt;
  41005. try {
  41006. bigInt = BigInt(value);
  41007. } catch (_unused) {
  41008. bigInt = null;
  41009. }
  41010. const node = this.estreeParseLiteral(bigInt);
  41011. node.bigint = String(node.value || value);
  41012. return node;
  41013. }
  41014. parseDecimalLiteral(value) {
  41015. const decimal = null;
  41016. const node = this.estreeParseLiteral(decimal);
  41017. node.decimal = String(node.value || value);
  41018. return node;
  41019. }
  41020. estreeParseLiteral(value) {
  41021. return this.parseLiteral(value, "Literal");
  41022. }
  41023. parseStringLiteral(value) {
  41024. return this.estreeParseLiteral(value);
  41025. }
  41026. parseNumericLiteral(value) {
  41027. return this.estreeParseLiteral(value);
  41028. }
  41029. parseNullLiteral() {
  41030. return this.estreeParseLiteral(null);
  41031. }
  41032. parseBooleanLiteral(value) {
  41033. return this.estreeParseLiteral(value);
  41034. }
  41035. directiveToStmt(directive) {
  41036. const directiveLiteral = directive.value;
  41037. const stmt = this.startNodeAt(directive.start, directive.loc.start);
  41038. const expression = this.startNodeAt(directiveLiteral.start, directiveLiteral.loc.start);
  41039. expression.value = directiveLiteral.extra.expressionValue;
  41040. expression.raw = directiveLiteral.extra.raw;
  41041. stmt.expression = this.finishNodeAt(expression, "Literal", directiveLiteral.end, directiveLiteral.loc.end);
  41042. stmt.directive = directiveLiteral.extra.raw.slice(1, -1);
  41043. return this.finishNodeAt(stmt, "ExpressionStatement", directive.end, directive.loc.end);
  41044. }
  41045. initFunction(node, isAsync) {
  41046. super.initFunction(node, isAsync);
  41047. node.expression = false;
  41048. }
  41049. checkDeclaration(node) {
  41050. if (node != null && this.isObjectProperty(node)) {
  41051. this.checkDeclaration(node.value);
  41052. } else {
  41053. super.checkDeclaration(node);
  41054. }
  41055. }
  41056. getObjectOrClassMethodParams(method) {
  41057. return method.value.params;
  41058. }
  41059. isValidDirective(stmt) {
  41060. var _stmt$expression$extr;
  41061. return stmt.type === "ExpressionStatement" && stmt.expression.type === "Literal" && typeof stmt.expression.value === "string" && !((_stmt$expression$extr = stmt.expression.extra) != null && _stmt$expression$extr.parenthesized);
  41062. }
  41063. stmtToDirective(stmt) {
  41064. const directive = super.stmtToDirective(stmt);
  41065. const value = stmt.expression.value;
  41066. this.addExtra(directive.value, "expressionValue", value);
  41067. return directive;
  41068. }
  41069. parseBlockBody(node, ...args) {
  41070. super.parseBlockBody(node, ...args);
  41071. const directiveStatements = node.directives.map((d) => this.directiveToStmt(d));
  41072. node.body = directiveStatements.concat(node.body);
  41073. delete node.directives;
  41074. }
  41075. pushClassMethod(classBody, method, isGenerator, isAsync, isConstructor, allowsDirectSuper) {
  41076. this.parseMethod(method, isGenerator, isAsync, isConstructor, allowsDirectSuper, "ClassMethod", true);
  41077. if (method.typeParameters) {
  41078. method.value.typeParameters = method.typeParameters;
  41079. delete method.typeParameters;
  41080. }
  41081. classBody.body.push(method);
  41082. }
  41083. parseMaybePrivateName(...args) {
  41084. const node = super.parseMaybePrivateName(...args);
  41085. if (node.type === "PrivateName" && this.getPluginOption("estree", "classFeatures")) {
  41086. return this.convertPrivateNameToPrivateIdentifier(node);
  41087. }
  41088. return node;
  41089. }
  41090. convertPrivateNameToPrivateIdentifier(node) {
  41091. const name2 = super.getPrivateNameSV(node);
  41092. node = node;
  41093. delete node.id;
  41094. node.name = name2;
  41095. node.type = "PrivateIdentifier";
  41096. return node;
  41097. }
  41098. isPrivateName(node) {
  41099. if (!this.getPluginOption("estree", "classFeatures")) {
  41100. return super.isPrivateName(node);
  41101. }
  41102. return node.type === "PrivateIdentifier";
  41103. }
  41104. getPrivateNameSV(node) {
  41105. if (!this.getPluginOption("estree", "classFeatures")) {
  41106. return super.getPrivateNameSV(node);
  41107. }
  41108. return node.name;
  41109. }
  41110. parseLiteral(value, type) {
  41111. const node = super.parseLiteral(value, type);
  41112. node.raw = node.extra.raw;
  41113. delete node.extra;
  41114. return node;
  41115. }
  41116. parseFunctionBody(node, allowExpression, isMethod = false) {
  41117. super.parseFunctionBody(node, allowExpression, isMethod);
  41118. node.expression = node.body.type !== "BlockStatement";
  41119. }
  41120. parseMethod(node, isGenerator, isAsync, isConstructor, allowDirectSuper, type, inClassScope = false) {
  41121. let funcNode = this.startNode();
  41122. funcNode.kind = node.kind;
  41123. funcNode = super.parseMethod(funcNode, isGenerator, isAsync, isConstructor, allowDirectSuper, type, inClassScope);
  41124. funcNode.type = "FunctionExpression";
  41125. delete funcNode.kind;
  41126. node.value = funcNode;
  41127. if (type === "ClassPrivateMethod") {
  41128. node.computed = false;
  41129. }
  41130. type = "MethodDefinition";
  41131. return this.finishNode(node, type);
  41132. }
  41133. parseClassProperty(...args) {
  41134. const propertyNode = super.parseClassProperty(...args);
  41135. if (this.getPluginOption("estree", "classFeatures")) {
  41136. propertyNode.type = "PropertyDefinition";
  41137. }
  41138. return propertyNode;
  41139. }
  41140. parseClassPrivateProperty(...args) {
  41141. const propertyNode = super.parseClassPrivateProperty(...args);
  41142. if (this.getPluginOption("estree", "classFeatures")) {
  41143. propertyNode.type = "PropertyDefinition";
  41144. propertyNode.computed = false;
  41145. }
  41146. return propertyNode;
  41147. }
  41148. parseObjectMethod(prop, isGenerator, isAsync, isPattern, isAccessor) {
  41149. const node = super.parseObjectMethod(prop, isGenerator, isAsync, isPattern, isAccessor);
  41150. if (node) {
  41151. node.type = "Property";
  41152. if (node.kind === "method")
  41153. node.kind = "init";
  41154. node.shorthand = false;
  41155. }
  41156. return node;
  41157. }
  41158. parseObjectProperty(prop, startPos, startLoc, isPattern, refExpressionErrors) {
  41159. const node = super.parseObjectProperty(prop, startPos, startLoc, isPattern, refExpressionErrors);
  41160. if (node) {
  41161. node.kind = "init";
  41162. node.type = "Property";
  41163. }
  41164. return node;
  41165. }
  41166. toAssignable(node, isLHS = false) {
  41167. if (node != null && this.isObjectProperty(node)) {
  41168. this.toAssignable(node.value, isLHS);
  41169. return node;
  41170. }
  41171. return super.toAssignable(node, isLHS);
  41172. }
  41173. toAssignableObjectExpressionProp(prop, ...args) {
  41174. if (prop.kind === "get" || prop.kind === "set") {
  41175. this.raise(prop.key.start, ErrorMessages.PatternHasAccessor);
  41176. } else if (prop.method) {
  41177. this.raise(prop.key.start, ErrorMessages.PatternHasMethod);
  41178. } else {
  41179. super.toAssignableObjectExpressionProp(prop, ...args);
  41180. }
  41181. }
  41182. finishCallExpression(node, optional) {
  41183. super.finishCallExpression(node, optional);
  41184. if (node.callee.type === "Import") {
  41185. node.type = "ImportExpression";
  41186. node.source = node.arguments[0];
  41187. if (this.hasPlugin("importAssertions")) {
  41188. var _node$arguments$;
  41189. node.attributes = (_node$arguments$ = node.arguments[1]) != null ? _node$arguments$ : null;
  41190. }
  41191. delete node.arguments;
  41192. delete node.callee;
  41193. }
  41194. return node;
  41195. }
  41196. toReferencedArguments(node) {
  41197. if (node.type === "ImportExpression") {
  41198. return;
  41199. }
  41200. super.toReferencedArguments(node);
  41201. }
  41202. parseExport(node) {
  41203. super.parseExport(node);
  41204. switch (node.type) {
  41205. case "ExportAllDeclaration":
  41206. node.exported = null;
  41207. break;
  41208. case "ExportNamedDeclaration":
  41209. if (node.specifiers.length === 1 && node.specifiers[0].type === "ExportNamespaceSpecifier") {
  41210. node.type = "ExportAllDeclaration";
  41211. node.exported = node.specifiers[0].exported;
  41212. delete node.specifiers;
  41213. }
  41214. break;
  41215. }
  41216. return node;
  41217. }
  41218. parseSubscript(base2, startPos, startLoc, noCalls, state) {
  41219. const node = super.parseSubscript(base2, startPos, startLoc, noCalls, state);
  41220. if (state.optionalChainMember) {
  41221. if (node.type === "OptionalMemberExpression" || node.type === "OptionalCallExpression") {
  41222. node.type = node.type.substring(8);
  41223. }
  41224. if (state.stop) {
  41225. const chain = this.startNodeAtNode(node);
  41226. chain.expression = node;
  41227. return this.finishNode(chain, "ChainExpression");
  41228. }
  41229. } else if (node.type === "MemberExpression" || node.type === "CallExpression") {
  41230. node.optional = false;
  41231. }
  41232. return node;
  41233. }
  41234. hasPropertyAsPrivateName(node) {
  41235. if (node.type === "ChainExpression") {
  41236. node = node.expression;
  41237. }
  41238. return super.hasPropertyAsPrivateName(node);
  41239. }
  41240. isOptionalChain(node) {
  41241. return node.type === "ChainExpression";
  41242. }
  41243. isObjectProperty(node) {
  41244. return node.type === "Property" && node.kind === "init" && !node.method;
  41245. }
  41246. isObjectMethod(node) {
  41247. return node.method || node.kind === "get" || node.kind === "set";
  41248. }
  41249. };
  41250. var TokContext3 = class {
  41251. constructor(token, isExpr, preserveSpace) {
  41252. this.token = void 0;
  41253. this.isExpr = void 0;
  41254. this.preserveSpace = void 0;
  41255. this.token = token;
  41256. this.isExpr = !!isExpr;
  41257. this.preserveSpace = !!preserveSpace;
  41258. }
  41259. };
  41260. var types2 = {
  41261. braceStatement: new TokContext3("{", false),
  41262. braceExpression: new TokContext3("{", true),
  41263. recordExpression: new TokContext3("#{", true),
  41264. templateQuasi: new TokContext3("${", false),
  41265. parenStatement: new TokContext3("(", false),
  41266. parenExpression: new TokContext3("(", true),
  41267. template: new TokContext3("`", true, true),
  41268. functionExpression: new TokContext3("function", true),
  41269. functionStatement: new TokContext3("function", false)
  41270. };
  41271. types$12.parenR.updateContext = types$12.braceR.updateContext = function() {
  41272. if (this.state.context.length === 1) {
  41273. this.state.exprAllowed = true;
  41274. return;
  41275. }
  41276. let out = this.state.context.pop();
  41277. if (out === types2.braceStatement && this.curContext().token === "function") {
  41278. out = this.state.context.pop();
  41279. }
  41280. this.state.exprAllowed = !out.isExpr;
  41281. };
  41282. types$12.name.updateContext = function(prevType) {
  41283. let allowed = false;
  41284. if (prevType !== types$12.dot) {
  41285. if (this.state.value === "of" && !this.state.exprAllowed && prevType !== types$12._function && prevType !== types$12._class) {
  41286. allowed = true;
  41287. }
  41288. }
  41289. this.state.exprAllowed = allowed;
  41290. };
  41291. types$12.braceL.updateContext = function(prevType) {
  41292. this.state.context.push(this.braceIsBlock(prevType) ? types2.braceStatement : types2.braceExpression);
  41293. this.state.exprAllowed = true;
  41294. };
  41295. types$12.dollarBraceL.updateContext = function() {
  41296. this.state.context.push(types2.templateQuasi);
  41297. this.state.exprAllowed = true;
  41298. };
  41299. types$12.parenL.updateContext = function(prevType) {
  41300. const statementParens = prevType === types$12._if || prevType === types$12._for || prevType === types$12._with || prevType === types$12._while;
  41301. this.state.context.push(statementParens ? types2.parenStatement : types2.parenExpression);
  41302. this.state.exprAllowed = true;
  41303. };
  41304. types$12.incDec.updateContext = function() {
  41305. };
  41306. types$12._function.updateContext = types$12._class.updateContext = function(prevType) {
  41307. if (prevType.beforeExpr && prevType !== types$12.semi && prevType !== types$12._else && !(prevType === types$12._return && this.hasPrecedingLineBreak()) && !((prevType === types$12.colon || prevType === types$12.braceL) && this.curContext() === types2.b_stat)) {
  41308. this.state.context.push(types2.functionExpression);
  41309. } else {
  41310. this.state.context.push(types2.functionStatement);
  41311. }
  41312. this.state.exprAllowed = false;
  41313. };
  41314. types$12.backQuote.updateContext = function() {
  41315. if (this.curContext() === types2.template) {
  41316. this.state.context.pop();
  41317. } else {
  41318. this.state.context.push(types2.template);
  41319. }
  41320. this.state.exprAllowed = false;
  41321. };
  41322. types$12.braceHashL.updateContext = function() {
  41323. this.state.context.push(types2.recordExpression);
  41324. this.state.exprAllowed = true;
  41325. };
  41326. var nonASCIIidentifierStartChars2 = "\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u08A0-\u08B4\u08B6-\u08C7\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1878\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309B-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u31BF\u31F0-\u31FF\u3400-\u4DBF\u4E00-\u9FFC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7BF\uA7C2-\uA7CA\uA7F5-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC";
  41327. var nonASCIIidentifierChars2 = "\u200C\u200D\xB7\u0300-\u036F\u0387\u0483-\u0487\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u0669\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u06F0-\u06F9\u0711\u0730-\u074A\u07A6-\u07B0\u07C0-\u07C9\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u08D3-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0966-\u096F\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u09E6-\u09EF\u09FE\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A66-\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0AE6-\u0AEF\u0AFA-\u0AFF\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B55-\u0B57\u0B62\u0B63\u0B66-\u0B6F\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0BE6-\u0BEF\u0C00-\u0C04\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C66-\u0C6F\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0CE6-\u0CEF\u0D00-\u0D03\u0D3B\u0D3C\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D66-\u0D6F\u0D81-\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0E50-\u0E59\u0EB1\u0EB4-\u0EBC\u0EC8-\u0ECD\u0ED0-\u0ED9\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1040-\u1049\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F-\u109D\u135D-\u135F\u1369-\u1371\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u18A9\u1920-\u192B\u1930-\u193B\u1946-\u194F\u19D0-\u19DA\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AB0-\u1ABD\u1ABF\u1AC0\u1B00-\u1B04\u1B34-\u1B44\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BB0-\u1BB9\u1BE6-\u1BF3\u1C24-\u1C37\u1C40-\u1C49\u1C50-\u1C59\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF4\u1CF7-\u1CF9\u1DC0-\u1DF9\u1DFB-\u1DFF\u203F\u2040\u2054\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA620-\uA629\uA66F\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA82C\uA880\uA881\uA8B4-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F1\uA8FF-\uA909\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9D0-\uA9D9\uA9E5\uA9F0-\uA9F9\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA50-\uAA59\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uABF0-\uABF9\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFF10-\uFF19\uFF3F";
  41328. var nonASCIIidentifierStart2 = new RegExp("[" + nonASCIIidentifierStartChars2 + "]");
  41329. var nonASCIIidentifier2 = new RegExp("[" + nonASCIIidentifierStartChars2 + nonASCIIidentifierChars2 + "]");
  41330. nonASCIIidentifierStartChars2 = nonASCIIidentifierChars2 = null;
  41331. var astralIdentifierStartCodes2 = [0, 11, 2, 25, 2, 18, 2, 1, 2, 14, 3, 13, 35, 122, 70, 52, 268, 28, 4, 48, 48, 31, 14, 29, 6, 37, 11, 29, 3, 35, 5, 7, 2, 4, 43, 157, 19, 35, 5, 35, 5, 39, 9, 51, 157, 310, 10, 21, 11, 7, 153, 5, 3, 0, 2, 43, 2, 1, 4, 0, 3, 22, 11, 22, 10, 30, 66, 18, 2, 1, 11, 21, 11, 25, 71, 55, 7, 1, 65, 0, 16, 3, 2, 2, 2, 28, 43, 28, 4, 28, 36, 7, 2, 27, 28, 53, 11, 21, 11, 18, 14, 17, 111, 72, 56, 50, 14, 50, 14, 35, 349, 41, 7, 1, 79, 28, 11, 0, 9, 21, 107, 20, 28, 22, 13, 52, 76, 44, 33, 24, 27, 35, 30, 0, 3, 0, 9, 34, 4, 0, 13, 47, 15, 3, 22, 0, 2, 0, 36, 17, 2, 24, 85, 6, 2, 0, 2, 3, 2, 14, 2, 9, 8, 46, 39, 7, 3, 1, 3, 21, 2, 6, 2, 1, 2, 4, 4, 0, 19, 0, 13, 4, 159, 52, 19, 3, 21, 2, 31, 47, 21, 1, 2, 0, 185, 46, 42, 3, 37, 47, 21, 0, 60, 42, 14, 0, 72, 26, 230, 43, 117, 63, 32, 7, 3, 0, 3, 7, 2, 1, 2, 23, 16, 0, 2, 0, 95, 7, 3, 38, 17, 0, 2, 0, 29, 0, 11, 39, 8, 0, 22, 0, 12, 45, 20, 0, 35, 56, 264, 8, 2, 36, 18, 0, 50, 29, 113, 6, 2, 1, 2, 37, 22, 0, 26, 5, 2, 1, 2, 31, 15, 0, 328, 18, 190, 0, 80, 921, 103, 110, 18, 195, 2749, 1070, 4050, 582, 8634, 568, 8, 30, 114, 29, 19, 47, 17, 3, 32, 20, 6, 18, 689, 63, 129, 74, 6, 0, 67, 12, 65, 1, 2, 0, 29, 6135, 9, 1237, 43, 8, 8952, 286, 50, 2, 18, 3, 9, 395, 2309, 106, 6, 12, 4, 8, 8, 9, 5991, 84, 2, 70, 2, 1, 3, 0, 3, 1, 3, 3, 2, 11, 2, 0, 2, 6, 2, 64, 2, 3, 3, 7, 2, 6, 2, 27, 2, 3, 2, 4, 2, 0, 4, 6, 2, 339, 3, 24, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 7, 2357, 44, 11, 6, 17, 0, 370, 43, 1301, 196, 60, 67, 8, 0, 1205, 3, 2, 26, 2, 1, 2, 0, 3, 0, 2, 9, 2, 3, 2, 0, 2, 0, 7, 0, 5, 0, 2, 0, 2, 0, 2, 2, 2, 1, 2, 0, 3, 0, 2, 0, 2, 0, 2, 0, 2, 0, 2, 1, 2, 0, 3, 3, 2, 6, 2, 3, 2, 3, 2, 0, 2, 9, 2, 16, 6, 2, 2, 4, 2, 16, 4421, 42717, 35, 4148, 12, 221, 3, 5761, 15, 7472, 3104, 541, 1507, 4938];
  41332. var astralIdentifierCodes2 = [509, 0, 227, 0, 150, 4, 294, 9, 1368, 2, 2, 1, 6, 3, 41, 2, 5, 0, 166, 1, 574, 3, 9, 9, 370, 1, 154, 10, 176, 2, 54, 14, 32, 9, 16, 3, 46, 10, 54, 9, 7, 2, 37, 13, 2, 9, 6, 1, 45, 0, 13, 2, 49, 13, 9, 3, 2, 11, 83, 11, 7, 0, 161, 11, 6, 9, 7, 3, 56, 1, 2, 6, 3, 1, 3, 2, 10, 0, 11, 1, 3, 6, 4, 4, 193, 17, 10, 9, 5, 0, 82, 19, 13, 9, 214, 6, 3, 8, 28, 1, 83, 16, 16, 9, 82, 12, 9, 9, 84, 14, 5, 9, 243, 14, 166, 9, 71, 5, 2, 1, 3, 3, 2, 0, 2, 1, 13, 9, 120, 6, 3, 6, 4, 0, 29, 9, 41, 6, 2, 3, 9, 0, 10, 10, 47, 15, 406, 7, 2, 7, 17, 9, 57, 21, 2, 13, 123, 5, 4, 0, 2, 1, 2, 6, 2, 0, 9, 9, 49, 4, 2, 1, 2, 4, 9, 9, 330, 3, 19306, 9, 135, 4, 60, 6, 26, 9, 1014, 0, 2, 54, 8, 3, 82, 0, 12, 1, 19628, 1, 5319, 4, 4, 5, 9, 7, 3, 6, 31, 3, 149, 2, 1418, 49, 513, 54, 5, 49, 9, 0, 15, 0, 23, 4, 2, 14, 1361, 6, 2, 16, 3, 6, 2, 1, 2, 4, 262, 6, 10, 9, 419, 13, 1495, 6, 110, 6, 6, 9, 4759, 9, 787719, 239];
  41333. function isInAstralSet2(code2, set) {
  41334. let pos = 65536;
  41335. for (let i = 0, length = set.length; i < length; i += 2) {
  41336. pos += set[i];
  41337. if (pos > code2)
  41338. return false;
  41339. pos += set[i + 1];
  41340. if (pos >= code2)
  41341. return true;
  41342. }
  41343. return false;
  41344. }
  41345. function isIdentifierStart2(code2) {
  41346. if (code2 < 65)
  41347. return code2 === 36;
  41348. if (code2 <= 90)
  41349. return true;
  41350. if (code2 < 97)
  41351. return code2 === 95;
  41352. if (code2 <= 122)
  41353. return true;
  41354. if (code2 <= 65535) {
  41355. return code2 >= 170 && nonASCIIidentifierStart2.test(String.fromCharCode(code2));
  41356. }
  41357. return isInAstralSet2(code2, astralIdentifierStartCodes2);
  41358. }
  41359. function isIdentifierChar2(code2) {
  41360. if (code2 < 48)
  41361. return code2 === 36;
  41362. if (code2 < 58)
  41363. return true;
  41364. if (code2 < 65)
  41365. return false;
  41366. if (code2 <= 90)
  41367. return true;
  41368. if (code2 < 97)
  41369. return code2 === 95;
  41370. if (code2 <= 122)
  41371. return true;
  41372. if (code2 <= 65535) {
  41373. return code2 >= 170 && nonASCIIidentifier2.test(String.fromCharCode(code2));
  41374. }
  41375. return isInAstralSet2(code2, astralIdentifierStartCodes2) || isInAstralSet2(code2, astralIdentifierCodes2);
  41376. }
  41377. var reservedWords2 = {
  41378. keyword: ["break", "case", "catch", "continue", "debugger", "default", "do", "else", "finally", "for", "function", "if", "return", "switch", "throw", "try", "var", "const", "while", "with", "new", "this", "super", "class", "extends", "export", "import", "null", "true", "false", "in", "instanceof", "typeof", "void", "delete"],
  41379. strict: ["implements", "interface", "let", "package", "private", "protected", "public", "static", "yield"],
  41380. strictBind: ["eval", "arguments"]
  41381. };
  41382. var keywords2 = new Set(reservedWords2.keyword);
  41383. var reservedWordsStrictSet = new Set(reservedWords2.strict);
  41384. var reservedWordsStrictBindSet = new Set(reservedWords2.strictBind);
  41385. function isReservedWord(word, inModule) {
  41386. return inModule && word === "await" || word === "enum";
  41387. }
  41388. function isStrictReservedWord(word, inModule) {
  41389. return isReservedWord(word, inModule) || reservedWordsStrictSet.has(word);
  41390. }
  41391. function isStrictBindOnlyReservedWord(word) {
  41392. return reservedWordsStrictBindSet.has(word);
  41393. }
  41394. function isStrictBindReservedWord(word, inModule) {
  41395. return isStrictReservedWord(word, inModule) || isStrictBindOnlyReservedWord(word);
  41396. }
  41397. function isKeyword(word) {
  41398. return keywords2.has(word);
  41399. }
  41400. function isIteratorStart(current2, next) {
  41401. return current2 === 64 && next === 64;
  41402. }
  41403. var SCOPE_OTHER = 0;
  41404. var SCOPE_PROGRAM = 1;
  41405. var SCOPE_FUNCTION2 = 2;
  41406. var SCOPE_ARROW2 = 4;
  41407. var SCOPE_SIMPLE_CATCH2 = 8;
  41408. var SCOPE_SUPER2 = 16;
  41409. var SCOPE_DIRECT_SUPER2 = 32;
  41410. var SCOPE_CLASS = 64;
  41411. var SCOPE_STATIC_BLOCK = 128;
  41412. var SCOPE_TS_MODULE = 256;
  41413. var SCOPE_VAR2 = SCOPE_PROGRAM | SCOPE_FUNCTION2 | SCOPE_TS_MODULE;
  41414. var BIND_KIND_VALUE = 1;
  41415. var BIND_KIND_TYPE = 2;
  41416. var BIND_SCOPE_VAR = 4;
  41417. var BIND_SCOPE_LEXICAL = 8;
  41418. var BIND_SCOPE_FUNCTION = 16;
  41419. var BIND_FLAGS_NONE = 64;
  41420. var BIND_FLAGS_CLASS = 128;
  41421. var BIND_FLAGS_TS_ENUM = 256;
  41422. var BIND_FLAGS_TS_CONST_ENUM = 512;
  41423. var BIND_FLAGS_TS_EXPORT_ONLY = 1024;
  41424. var BIND_FLAGS_FLOW_DECLARE_FN = 2048;
  41425. var BIND_CLASS = BIND_KIND_VALUE | BIND_KIND_TYPE | BIND_SCOPE_LEXICAL | BIND_FLAGS_CLASS;
  41426. var BIND_LEXICAL2 = BIND_KIND_VALUE | 0 | BIND_SCOPE_LEXICAL | 0;
  41427. var BIND_VAR2 = BIND_KIND_VALUE | 0 | BIND_SCOPE_VAR | 0;
  41428. var BIND_FUNCTION2 = BIND_KIND_VALUE | 0 | BIND_SCOPE_FUNCTION | 0;
  41429. var BIND_TS_INTERFACE = 0 | BIND_KIND_TYPE | 0 | BIND_FLAGS_CLASS;
  41430. var BIND_TS_TYPE = 0 | BIND_KIND_TYPE | 0 | 0;
  41431. var BIND_TS_ENUM = BIND_KIND_VALUE | BIND_KIND_TYPE | BIND_SCOPE_LEXICAL | BIND_FLAGS_TS_ENUM;
  41432. var BIND_TS_AMBIENT = 0 | 0 | 0 | BIND_FLAGS_TS_EXPORT_ONLY;
  41433. var BIND_NONE2 = 0 | 0 | 0 | BIND_FLAGS_NONE;
  41434. var BIND_OUTSIDE2 = BIND_KIND_VALUE | 0 | 0 | BIND_FLAGS_NONE;
  41435. var BIND_TS_CONST_ENUM = BIND_TS_ENUM | BIND_FLAGS_TS_CONST_ENUM;
  41436. var BIND_TS_NAMESPACE = 0 | 0 | 0 | BIND_FLAGS_TS_EXPORT_ONLY;
  41437. var BIND_FLOW_DECLARE_FN = BIND_FLAGS_FLOW_DECLARE_FN;
  41438. var CLASS_ELEMENT_FLAG_STATIC = 4;
  41439. var CLASS_ELEMENT_KIND_GETTER = 2;
  41440. var CLASS_ELEMENT_KIND_SETTER = 1;
  41441. var CLASS_ELEMENT_KIND_ACCESSOR = CLASS_ELEMENT_KIND_GETTER | CLASS_ELEMENT_KIND_SETTER;
  41442. var CLASS_ELEMENT_STATIC_GETTER = CLASS_ELEMENT_KIND_GETTER | CLASS_ELEMENT_FLAG_STATIC;
  41443. var CLASS_ELEMENT_STATIC_SETTER = CLASS_ELEMENT_KIND_SETTER | CLASS_ELEMENT_FLAG_STATIC;
  41444. var CLASS_ELEMENT_INSTANCE_GETTER = CLASS_ELEMENT_KIND_GETTER;
  41445. var CLASS_ELEMENT_INSTANCE_SETTER = CLASS_ELEMENT_KIND_SETTER;
  41446. var CLASS_ELEMENT_OTHER = 0;
  41447. var Scope4 = class {
  41448. constructor(flags) {
  41449. this.flags = void 0;
  41450. this.var = [];
  41451. this.lexical = [];
  41452. this.functions = [];
  41453. this.flags = flags;
  41454. }
  41455. };
  41456. var ScopeHandler = class {
  41457. constructor(raise2, inModule) {
  41458. this.scopeStack = [];
  41459. this.undefinedExports = /* @__PURE__ */ new Map();
  41460. this.undefinedPrivateNames = /* @__PURE__ */ new Map();
  41461. this.raise = raise2;
  41462. this.inModule = inModule;
  41463. }
  41464. get inFunction() {
  41465. return (this.currentVarScope().flags & SCOPE_FUNCTION2) > 0;
  41466. }
  41467. get allowSuper() {
  41468. return (this.currentThisScope().flags & SCOPE_SUPER2) > 0;
  41469. }
  41470. get allowDirectSuper() {
  41471. return (this.currentThisScope().flags & SCOPE_DIRECT_SUPER2) > 0;
  41472. }
  41473. get inClass() {
  41474. return (this.currentThisScope().flags & SCOPE_CLASS) > 0;
  41475. }
  41476. get inStaticBlock() {
  41477. return (this.currentThisScope().flags & SCOPE_STATIC_BLOCK) > 0;
  41478. }
  41479. get inNonArrowFunction() {
  41480. return (this.currentThisScope().flags & SCOPE_FUNCTION2) > 0;
  41481. }
  41482. get treatFunctionsAsVar() {
  41483. return this.treatFunctionsAsVarInScope(this.currentScope());
  41484. }
  41485. createScope(flags) {
  41486. return new Scope4(flags);
  41487. }
  41488. enter(flags) {
  41489. this.scopeStack.push(this.createScope(flags));
  41490. }
  41491. exit() {
  41492. this.scopeStack.pop();
  41493. }
  41494. treatFunctionsAsVarInScope(scope) {
  41495. return !!(scope.flags & SCOPE_FUNCTION2 || !this.inModule && scope.flags & SCOPE_PROGRAM);
  41496. }
  41497. declareName(name2, bindingType, pos) {
  41498. let scope = this.currentScope();
  41499. if (bindingType & BIND_SCOPE_LEXICAL || bindingType & BIND_SCOPE_FUNCTION) {
  41500. this.checkRedeclarationInScope(scope, name2, bindingType, pos);
  41501. if (bindingType & BIND_SCOPE_FUNCTION) {
  41502. scope.functions.push(name2);
  41503. } else {
  41504. scope.lexical.push(name2);
  41505. }
  41506. if (bindingType & BIND_SCOPE_LEXICAL) {
  41507. this.maybeExportDefined(scope, name2);
  41508. }
  41509. } else if (bindingType & BIND_SCOPE_VAR) {
  41510. for (let i = this.scopeStack.length - 1; i >= 0; --i) {
  41511. scope = this.scopeStack[i];
  41512. this.checkRedeclarationInScope(scope, name2, bindingType, pos);
  41513. scope.var.push(name2);
  41514. this.maybeExportDefined(scope, name2);
  41515. if (scope.flags & SCOPE_VAR2)
  41516. break;
  41517. }
  41518. }
  41519. if (this.inModule && scope.flags & SCOPE_PROGRAM) {
  41520. this.undefinedExports.delete(name2);
  41521. }
  41522. }
  41523. maybeExportDefined(scope, name2) {
  41524. if (this.inModule && scope.flags & SCOPE_PROGRAM) {
  41525. this.undefinedExports.delete(name2);
  41526. }
  41527. }
  41528. checkRedeclarationInScope(scope, name2, bindingType, pos) {
  41529. if (this.isRedeclaredInScope(scope, name2, bindingType)) {
  41530. this.raise(pos, ErrorMessages.VarRedeclaration, name2);
  41531. }
  41532. }
  41533. isRedeclaredInScope(scope, name2, bindingType) {
  41534. if (!(bindingType & BIND_KIND_VALUE))
  41535. return false;
  41536. if (bindingType & BIND_SCOPE_LEXICAL) {
  41537. return scope.lexical.indexOf(name2) > -1 || scope.functions.indexOf(name2) > -1 || scope.var.indexOf(name2) > -1;
  41538. }
  41539. if (bindingType & BIND_SCOPE_FUNCTION) {
  41540. return scope.lexical.indexOf(name2) > -1 || !this.treatFunctionsAsVarInScope(scope) && scope.var.indexOf(name2) > -1;
  41541. }
  41542. return scope.lexical.indexOf(name2) > -1 && !(scope.flags & SCOPE_SIMPLE_CATCH2 && scope.lexical[0] === name2) || !this.treatFunctionsAsVarInScope(scope) && scope.functions.indexOf(name2) > -1;
  41543. }
  41544. checkLocalExport(id) {
  41545. if (this.scopeStack[0].lexical.indexOf(id.name) === -1 && this.scopeStack[0].var.indexOf(id.name) === -1 && this.scopeStack[0].functions.indexOf(id.name) === -1) {
  41546. this.undefinedExports.set(id.name, id.start);
  41547. }
  41548. }
  41549. currentScope() {
  41550. return this.scopeStack[this.scopeStack.length - 1];
  41551. }
  41552. currentVarScope() {
  41553. for (let i = this.scopeStack.length - 1; ; i--) {
  41554. const scope = this.scopeStack[i];
  41555. if (scope.flags & SCOPE_VAR2) {
  41556. return scope;
  41557. }
  41558. }
  41559. }
  41560. currentThisScope() {
  41561. for (let i = this.scopeStack.length - 1; ; i--) {
  41562. const scope = this.scopeStack[i];
  41563. if ((scope.flags & SCOPE_VAR2 || scope.flags & SCOPE_CLASS) && !(scope.flags & SCOPE_ARROW2)) {
  41564. return scope;
  41565. }
  41566. }
  41567. }
  41568. };
  41569. var FlowScope = class extends Scope4 {
  41570. constructor(...args) {
  41571. super(...args);
  41572. this.declareFunctions = [];
  41573. }
  41574. };
  41575. var FlowScopeHandler = class extends ScopeHandler {
  41576. createScope(flags) {
  41577. return new FlowScope(flags);
  41578. }
  41579. declareName(name2, bindingType, pos) {
  41580. const scope = this.currentScope();
  41581. if (bindingType & BIND_FLAGS_FLOW_DECLARE_FN) {
  41582. this.checkRedeclarationInScope(scope, name2, bindingType, pos);
  41583. this.maybeExportDefined(scope, name2);
  41584. scope.declareFunctions.push(name2);
  41585. return;
  41586. }
  41587. super.declareName(...arguments);
  41588. }
  41589. isRedeclaredInScope(scope, name2, bindingType) {
  41590. if (super.isRedeclaredInScope(...arguments))
  41591. return true;
  41592. if (bindingType & BIND_FLAGS_FLOW_DECLARE_FN) {
  41593. return !scope.declareFunctions.includes(name2) && (scope.lexical.includes(name2) || scope.functions.includes(name2));
  41594. }
  41595. return false;
  41596. }
  41597. checkLocalExport(id) {
  41598. if (this.scopeStack[0].declareFunctions.indexOf(id.name) === -1) {
  41599. super.checkLocalExport(id);
  41600. }
  41601. }
  41602. };
  41603. var reservedTypes = /* @__PURE__ */ new Set(["_", "any", "bool", "boolean", "empty", "extends", "false", "interface", "mixed", "null", "number", "static", "string", "true", "typeof", "void"]);
  41604. var FlowErrors = makeErrorTemplates({
  41605. AmbiguousConditionalArrow: "Ambiguous expression: wrap the arrow functions in parentheses to disambiguate.",
  41606. AmbiguousDeclareModuleKind: "Found both `declare module.exports` and `declare export` in the same module. Modules can only have 1 since they are either an ES module or they are a CommonJS module.",
  41607. AssignReservedType: "Cannot overwrite reserved type %0.",
  41608. DeclareClassElement: "The `declare` modifier can only appear on class fields.",
  41609. DeclareClassFieldInitializer: "Initializers are not allowed in fields with the `declare` modifier.",
  41610. DuplicateDeclareModuleExports: "Duplicate `declare module.exports` statement.",
  41611. EnumBooleanMemberNotInitialized: "Boolean enum members need to be initialized. Use either `%0 = true,` or `%0 = false,` in enum `%1`.",
  41612. EnumDuplicateMemberName: "Enum member names need to be unique, but the name `%0` has already been used before in enum `%1`.",
  41613. EnumInconsistentMemberValues: "Enum `%0` has inconsistent member initializers. Either use no initializers, or consistently use literals (either booleans, numbers, or strings) for all member initializers.",
  41614. EnumInvalidExplicitType: "Enum type `%1` is not valid. Use one of `boolean`, `number`, `string`, or `symbol` in enum `%0`.",
  41615. EnumInvalidExplicitTypeUnknownSupplied: "Supplied enum type is not valid. Use one of `boolean`, `number`, `string`, or `symbol` in enum `%0`.",
  41616. EnumInvalidMemberInitializerPrimaryType: "Enum `%0` has type `%2`, so the initializer of `%1` needs to be a %2 literal.",
  41617. EnumInvalidMemberInitializerSymbolType: "Symbol enum members cannot be initialized. Use `%1,` in enum `%0`.",
  41618. EnumInvalidMemberInitializerUnknownType: "The enum member initializer for `%1` needs to be a literal (either a boolean, number, or string) in enum `%0`.",
  41619. EnumInvalidMemberName: "Enum member names cannot start with lowercase 'a' through 'z'. Instead of using `%0`, consider using `%1`, in enum `%2`.",
  41620. EnumNumberMemberNotInitialized: "Number enum members need to be initialized, e.g. `%1 = 1` in enum `%0`.",
  41621. EnumStringMemberInconsistentlyInitailized: "String enum members need to consistently either all use initializers, or use no initializers, in enum `%0`.",
  41622. GetterMayNotHaveThisParam: "A getter cannot have a `this` parameter.",
  41623. ImportTypeShorthandOnlyInPureImport: "The `type` and `typeof` keywords on named imports can only be used on regular `import` statements. It cannot be used with `import type` or `import typeof` statements.",
  41624. InexactInsideExact: "Explicit inexact syntax cannot appear inside an explicit exact object type.",
  41625. InexactInsideNonObject: "Explicit inexact syntax cannot appear in class or interface definitions.",
  41626. InexactVariance: "Explicit inexact syntax cannot have variance.",
  41627. InvalidNonTypeImportInDeclareModule: "Imports within a `declare module` body must always be `import type` or `import typeof`.",
  41628. MissingTypeParamDefault: "Type parameter declaration needs a default, since a preceding type parameter declaration has a default.",
  41629. NestedDeclareModule: "`declare module` cannot be used inside another `declare module`.",
  41630. NestedFlowComment: "Cannot have a flow comment inside another flow comment.",
  41631. OptionalBindingPattern: "A binding pattern parameter cannot be optional in an implementation signature.",
  41632. SetterMayNotHaveThisParam: "A setter cannot have a `this` parameter.",
  41633. SpreadVariance: "Spread properties cannot have variance.",
  41634. ThisParamAnnotationRequired: "A type annotation is required for the `this` parameter.",
  41635. ThisParamBannedInConstructor: "Constructors cannot have a `this` parameter; constructors don't bind `this` like other functions.",
  41636. ThisParamMayNotBeOptional: "The `this` parameter cannot be optional.",
  41637. ThisParamMustBeFirst: "The `this` parameter must be the first function parameter.",
  41638. ThisParamNoDefault: "The `this` parameter may not have a default value.",
  41639. TypeBeforeInitializer: "Type annotations must come before default assignments, e.g. instead of `age = 25: number` use `age: number = 25`.",
  41640. TypeCastInPattern: "The type cast expression is expected to be wrapped with parenthesis.",
  41641. UnexpectedExplicitInexactInObject: "Explicit inexact syntax must appear at the end of an inexact object.",
  41642. UnexpectedReservedType: "Unexpected reserved type %0.",
  41643. UnexpectedReservedUnderscore: "`_` is only allowed as a type argument to call or new.",
  41644. UnexpectedSpaceBetweenModuloChecks: "Spaces between `%` and `checks` are not allowed here.",
  41645. UnexpectedSpreadType: "Spread operator cannot appear in class or interface definitions.",
  41646. UnexpectedSubtractionOperand: 'Unexpected token, expected "number" or "bigint".',
  41647. UnexpectedTokenAfterTypeParameter: "Expected an arrow function after this type parameter declaration.",
  41648. UnexpectedTypeParameterBeforeAsyncArrowFunction: "Type parameters must come after the async keyword, e.g. instead of `<T> async () => {}`, use `async <T>() => {}`.",
  41649. UnsupportedDeclareExportKind: "`declare export %0` is not supported. Use `%1` instead.",
  41650. UnsupportedStatementInDeclareModule: "Only declares and type imports are allowed inside declare module.",
  41651. UnterminatedFlowComment: "Unterminated flow-comment."
  41652. }, ErrorCodes.SyntaxError);
  41653. function isEsModuleType(bodyElement) {
  41654. return bodyElement.type === "DeclareExportAllDeclaration" || bodyElement.type === "DeclareExportDeclaration" && (!bodyElement.declaration || bodyElement.declaration.type !== "TypeAlias" && bodyElement.declaration.type !== "InterfaceDeclaration");
  41655. }
  41656. function hasTypeImportKind(node) {
  41657. return node.importKind === "type" || node.importKind === "typeof";
  41658. }
  41659. function isMaybeDefaultImport(state) {
  41660. return (state.type === types$12.name || !!state.type.keyword) && state.value !== "from";
  41661. }
  41662. var exportSuggestions = {
  41663. const: "declare export var",
  41664. let: "declare export var",
  41665. type: "export type",
  41666. interface: "export interface"
  41667. };
  41668. function partition(list3, test) {
  41669. const list1 = [];
  41670. const list22 = [];
  41671. for (let i = 0; i < list3.length; i++) {
  41672. (test(list3[i], i, list3) ? list1 : list22).push(list3[i]);
  41673. }
  41674. return [list1, list22];
  41675. }
  41676. var FLOW_PRAGMA_REGEX = /\*?\s*@((?:no)?flow)\b/;
  41677. var flow3 = (superClass) => class extends superClass {
  41678. constructor(...args) {
  41679. super(...args);
  41680. this.flowPragma = void 0;
  41681. }
  41682. getScopeHandler() {
  41683. return FlowScopeHandler;
  41684. }
  41685. shouldParseTypes() {
  41686. return this.getPluginOption("flow", "all") || this.flowPragma === "flow";
  41687. }
  41688. shouldParseEnums() {
  41689. return !!this.getPluginOption("flow", "enums");
  41690. }
  41691. finishToken(type, val) {
  41692. if (type !== types$12.string && type !== types$12.semi && type !== types$12.interpreterDirective) {
  41693. if (this.flowPragma === void 0) {
  41694. this.flowPragma = null;
  41695. }
  41696. }
  41697. return super.finishToken(type, val);
  41698. }
  41699. addComment(comment2) {
  41700. if (this.flowPragma === void 0) {
  41701. const matches = FLOW_PRAGMA_REGEX.exec(comment2.value);
  41702. if (!matches)
  41703. ;
  41704. else if (matches[1] === "flow") {
  41705. this.flowPragma = "flow";
  41706. } else if (matches[1] === "noflow") {
  41707. this.flowPragma = "noflow";
  41708. } else {
  41709. throw new Error("Unexpected flow pragma");
  41710. }
  41711. }
  41712. return super.addComment(comment2);
  41713. }
  41714. flowParseTypeInitialiser(tok) {
  41715. const oldInType = this.state.inType;
  41716. this.state.inType = true;
  41717. this.expect(tok || types$12.colon);
  41718. const type = this.flowParseType();
  41719. this.state.inType = oldInType;
  41720. return type;
  41721. }
  41722. flowParsePredicate() {
  41723. const node = this.startNode();
  41724. const moduloPos = this.state.start;
  41725. this.next();
  41726. this.expectContextual("checks");
  41727. if (this.state.lastTokStart > moduloPos + 1) {
  41728. this.raise(moduloPos, FlowErrors.UnexpectedSpaceBetweenModuloChecks);
  41729. }
  41730. if (this.eat(types$12.parenL)) {
  41731. node.value = this.parseExpression();
  41732. this.expect(types$12.parenR);
  41733. return this.finishNode(node, "DeclaredPredicate");
  41734. } else {
  41735. return this.finishNode(node, "InferredPredicate");
  41736. }
  41737. }
  41738. flowParseTypeAndPredicateInitialiser() {
  41739. const oldInType = this.state.inType;
  41740. this.state.inType = true;
  41741. this.expect(types$12.colon);
  41742. let type = null;
  41743. let predicate = null;
  41744. if (this.match(types$12.modulo)) {
  41745. this.state.inType = oldInType;
  41746. predicate = this.flowParsePredicate();
  41747. } else {
  41748. type = this.flowParseType();
  41749. this.state.inType = oldInType;
  41750. if (this.match(types$12.modulo)) {
  41751. predicate = this.flowParsePredicate();
  41752. }
  41753. }
  41754. return [type, predicate];
  41755. }
  41756. flowParseDeclareClass(node) {
  41757. this.next();
  41758. this.flowParseInterfaceish(node, true);
  41759. return this.finishNode(node, "DeclareClass");
  41760. }
  41761. flowParseDeclareFunction(node) {
  41762. this.next();
  41763. const id = node.id = this.parseIdentifier();
  41764. const typeNode = this.startNode();
  41765. const typeContainer = this.startNode();
  41766. if (this.isRelational("<")) {
  41767. typeNode.typeParameters = this.flowParseTypeParameterDeclaration();
  41768. } else {
  41769. typeNode.typeParameters = null;
  41770. }
  41771. this.expect(types$12.parenL);
  41772. const tmp = this.flowParseFunctionTypeParams();
  41773. typeNode.params = tmp.params;
  41774. typeNode.rest = tmp.rest;
  41775. typeNode.this = tmp._this;
  41776. this.expect(types$12.parenR);
  41777. [typeNode.returnType, node.predicate] = this.flowParseTypeAndPredicateInitialiser();
  41778. typeContainer.typeAnnotation = this.finishNode(typeNode, "FunctionTypeAnnotation");
  41779. id.typeAnnotation = this.finishNode(typeContainer, "TypeAnnotation");
  41780. this.resetEndLocation(id);
  41781. this.semicolon();
  41782. this.scope.declareName(node.id.name, BIND_FLOW_DECLARE_FN, node.id.start);
  41783. return this.finishNode(node, "DeclareFunction");
  41784. }
  41785. flowParseDeclare(node, insideModule) {
  41786. if (this.match(types$12._class)) {
  41787. return this.flowParseDeclareClass(node);
  41788. } else if (this.match(types$12._function)) {
  41789. return this.flowParseDeclareFunction(node);
  41790. } else if (this.match(types$12._var)) {
  41791. return this.flowParseDeclareVariable(node);
  41792. } else if (this.eatContextual("module")) {
  41793. if (this.match(types$12.dot)) {
  41794. return this.flowParseDeclareModuleExports(node);
  41795. } else {
  41796. if (insideModule) {
  41797. this.raise(this.state.lastTokStart, FlowErrors.NestedDeclareModule);
  41798. }
  41799. return this.flowParseDeclareModule(node);
  41800. }
  41801. } else if (this.isContextual("type")) {
  41802. return this.flowParseDeclareTypeAlias(node);
  41803. } else if (this.isContextual("opaque")) {
  41804. return this.flowParseDeclareOpaqueType(node);
  41805. } else if (this.isContextual("interface")) {
  41806. return this.flowParseDeclareInterface(node);
  41807. } else if (this.match(types$12._export)) {
  41808. return this.flowParseDeclareExportDeclaration(node, insideModule);
  41809. } else {
  41810. throw this.unexpected();
  41811. }
  41812. }
  41813. flowParseDeclareVariable(node) {
  41814. this.next();
  41815. node.id = this.flowParseTypeAnnotatableIdentifier(true);
  41816. this.scope.declareName(node.id.name, BIND_VAR2, node.id.start);
  41817. this.semicolon();
  41818. return this.finishNode(node, "DeclareVariable");
  41819. }
  41820. flowParseDeclareModule(node) {
  41821. this.scope.enter(SCOPE_OTHER);
  41822. if (this.match(types$12.string)) {
  41823. node.id = this.parseExprAtom();
  41824. } else {
  41825. node.id = this.parseIdentifier();
  41826. }
  41827. const bodyNode = node.body = this.startNode();
  41828. const body = bodyNode.body = [];
  41829. this.expect(types$12.braceL);
  41830. while (!this.match(types$12.braceR)) {
  41831. let bodyNode2 = this.startNode();
  41832. if (this.match(types$12._import)) {
  41833. this.next();
  41834. if (!this.isContextual("type") && !this.match(types$12._typeof)) {
  41835. this.raise(this.state.lastTokStart, FlowErrors.InvalidNonTypeImportInDeclareModule);
  41836. }
  41837. this.parseImport(bodyNode2);
  41838. } else {
  41839. this.expectContextual("declare", FlowErrors.UnsupportedStatementInDeclareModule);
  41840. bodyNode2 = this.flowParseDeclare(bodyNode2, true);
  41841. }
  41842. body.push(bodyNode2);
  41843. }
  41844. this.scope.exit();
  41845. this.expect(types$12.braceR);
  41846. this.finishNode(bodyNode, "BlockStatement");
  41847. let kind = null;
  41848. let hasModuleExport = false;
  41849. body.forEach((bodyElement) => {
  41850. if (isEsModuleType(bodyElement)) {
  41851. if (kind === "CommonJS") {
  41852. this.raise(bodyElement.start, FlowErrors.AmbiguousDeclareModuleKind);
  41853. }
  41854. kind = "ES";
  41855. } else if (bodyElement.type === "DeclareModuleExports") {
  41856. if (hasModuleExport) {
  41857. this.raise(bodyElement.start, FlowErrors.DuplicateDeclareModuleExports);
  41858. }
  41859. if (kind === "ES") {
  41860. this.raise(bodyElement.start, FlowErrors.AmbiguousDeclareModuleKind);
  41861. }
  41862. kind = "CommonJS";
  41863. hasModuleExport = true;
  41864. }
  41865. });
  41866. node.kind = kind || "CommonJS";
  41867. return this.finishNode(node, "DeclareModule");
  41868. }
  41869. flowParseDeclareExportDeclaration(node, insideModule) {
  41870. this.expect(types$12._export);
  41871. if (this.eat(types$12._default)) {
  41872. if (this.match(types$12._function) || this.match(types$12._class)) {
  41873. node.declaration = this.flowParseDeclare(this.startNode());
  41874. } else {
  41875. node.declaration = this.flowParseType();
  41876. this.semicolon();
  41877. }
  41878. node.default = true;
  41879. return this.finishNode(node, "DeclareExportDeclaration");
  41880. } else {
  41881. if (this.match(types$12._const) || this.isLet() || (this.isContextual("type") || this.isContextual("interface")) && !insideModule) {
  41882. const label = this.state.value;
  41883. const suggestion = exportSuggestions[label];
  41884. throw this.raise(this.state.start, FlowErrors.UnsupportedDeclareExportKind, label, suggestion);
  41885. }
  41886. if (this.match(types$12._var) || this.match(types$12._function) || this.match(types$12._class) || this.isContextual("opaque")) {
  41887. node.declaration = this.flowParseDeclare(this.startNode());
  41888. node.default = false;
  41889. return this.finishNode(node, "DeclareExportDeclaration");
  41890. } else if (this.match(types$12.star) || this.match(types$12.braceL) || this.isContextual("interface") || this.isContextual("type") || this.isContextual("opaque")) {
  41891. node = this.parseExport(node);
  41892. if (node.type === "ExportNamedDeclaration") {
  41893. node.type = "ExportDeclaration";
  41894. node.default = false;
  41895. delete node.exportKind;
  41896. }
  41897. node.type = "Declare" + node.type;
  41898. return node;
  41899. }
  41900. }
  41901. throw this.unexpected();
  41902. }
  41903. flowParseDeclareModuleExports(node) {
  41904. this.next();
  41905. this.expectContextual("exports");
  41906. node.typeAnnotation = this.flowParseTypeAnnotation();
  41907. this.semicolon();
  41908. return this.finishNode(node, "DeclareModuleExports");
  41909. }
  41910. flowParseDeclareTypeAlias(node) {
  41911. this.next();
  41912. this.flowParseTypeAlias(node);
  41913. node.type = "DeclareTypeAlias";
  41914. return node;
  41915. }
  41916. flowParseDeclareOpaqueType(node) {
  41917. this.next();
  41918. this.flowParseOpaqueType(node, true);
  41919. node.type = "DeclareOpaqueType";
  41920. return node;
  41921. }
  41922. flowParseDeclareInterface(node) {
  41923. this.next();
  41924. this.flowParseInterfaceish(node);
  41925. return this.finishNode(node, "DeclareInterface");
  41926. }
  41927. flowParseInterfaceish(node, isClass = false) {
  41928. node.id = this.flowParseRestrictedIdentifier(!isClass, true);
  41929. this.scope.declareName(node.id.name, isClass ? BIND_FUNCTION2 : BIND_LEXICAL2, node.id.start);
  41930. if (this.isRelational("<")) {
  41931. node.typeParameters = this.flowParseTypeParameterDeclaration();
  41932. } else {
  41933. node.typeParameters = null;
  41934. }
  41935. node.extends = [];
  41936. node.implements = [];
  41937. node.mixins = [];
  41938. if (this.eat(types$12._extends)) {
  41939. do {
  41940. node.extends.push(this.flowParseInterfaceExtends());
  41941. } while (!isClass && this.eat(types$12.comma));
  41942. }
  41943. if (this.isContextual("mixins")) {
  41944. this.next();
  41945. do {
  41946. node.mixins.push(this.flowParseInterfaceExtends());
  41947. } while (this.eat(types$12.comma));
  41948. }
  41949. if (this.isContextual("implements")) {
  41950. this.next();
  41951. do {
  41952. node.implements.push(this.flowParseInterfaceExtends());
  41953. } while (this.eat(types$12.comma));
  41954. }
  41955. node.body = this.flowParseObjectType({
  41956. allowStatic: isClass,
  41957. allowExact: false,
  41958. allowSpread: false,
  41959. allowProto: isClass,
  41960. allowInexact: false
  41961. });
  41962. }
  41963. flowParseInterfaceExtends() {
  41964. const node = this.startNode();
  41965. node.id = this.flowParseQualifiedTypeIdentifier();
  41966. if (this.isRelational("<")) {
  41967. node.typeParameters = this.flowParseTypeParameterInstantiation();
  41968. } else {
  41969. node.typeParameters = null;
  41970. }
  41971. return this.finishNode(node, "InterfaceExtends");
  41972. }
  41973. flowParseInterface(node) {
  41974. this.flowParseInterfaceish(node);
  41975. return this.finishNode(node, "InterfaceDeclaration");
  41976. }
  41977. checkNotUnderscore(word) {
  41978. if (word === "_") {
  41979. this.raise(this.state.start, FlowErrors.UnexpectedReservedUnderscore);
  41980. }
  41981. }
  41982. checkReservedType(word, startLoc, declaration) {
  41983. if (!reservedTypes.has(word))
  41984. return;
  41985. this.raise(startLoc, declaration ? FlowErrors.AssignReservedType : FlowErrors.UnexpectedReservedType, word);
  41986. }
  41987. flowParseRestrictedIdentifier(liberal, declaration) {
  41988. this.checkReservedType(this.state.value, this.state.start, declaration);
  41989. return this.parseIdentifier(liberal);
  41990. }
  41991. flowParseTypeAlias(node) {
  41992. node.id = this.flowParseRestrictedIdentifier(false, true);
  41993. this.scope.declareName(node.id.name, BIND_LEXICAL2, node.id.start);
  41994. if (this.isRelational("<")) {
  41995. node.typeParameters = this.flowParseTypeParameterDeclaration();
  41996. } else {
  41997. node.typeParameters = null;
  41998. }
  41999. node.right = this.flowParseTypeInitialiser(types$12.eq);
  42000. this.semicolon();
  42001. return this.finishNode(node, "TypeAlias");
  42002. }
  42003. flowParseOpaqueType(node, declare) {
  42004. this.expectContextual("type");
  42005. node.id = this.flowParseRestrictedIdentifier(true, true);
  42006. this.scope.declareName(node.id.name, BIND_LEXICAL2, node.id.start);
  42007. if (this.isRelational("<")) {
  42008. node.typeParameters = this.flowParseTypeParameterDeclaration();
  42009. } else {
  42010. node.typeParameters = null;
  42011. }
  42012. node.supertype = null;
  42013. if (this.match(types$12.colon)) {
  42014. node.supertype = this.flowParseTypeInitialiser(types$12.colon);
  42015. }
  42016. node.impltype = null;
  42017. if (!declare) {
  42018. node.impltype = this.flowParseTypeInitialiser(types$12.eq);
  42019. }
  42020. this.semicolon();
  42021. return this.finishNode(node, "OpaqueType");
  42022. }
  42023. flowParseTypeParameter(requireDefault = false) {
  42024. const nodeStart = this.state.start;
  42025. const node = this.startNode();
  42026. const variance = this.flowParseVariance();
  42027. const ident = this.flowParseTypeAnnotatableIdentifier();
  42028. node.name = ident.name;
  42029. node.variance = variance;
  42030. node.bound = ident.typeAnnotation;
  42031. if (this.match(types$12.eq)) {
  42032. this.eat(types$12.eq);
  42033. node.default = this.flowParseType();
  42034. } else {
  42035. if (requireDefault) {
  42036. this.raise(nodeStart, FlowErrors.MissingTypeParamDefault);
  42037. }
  42038. }
  42039. return this.finishNode(node, "TypeParameter");
  42040. }
  42041. flowParseTypeParameterDeclaration() {
  42042. const oldInType = this.state.inType;
  42043. const node = this.startNode();
  42044. node.params = [];
  42045. this.state.inType = true;
  42046. if (this.isRelational("<") || this.match(types$12.jsxTagStart)) {
  42047. this.next();
  42048. } else {
  42049. this.unexpected();
  42050. }
  42051. let defaultRequired = false;
  42052. do {
  42053. const typeParameter = this.flowParseTypeParameter(defaultRequired);
  42054. node.params.push(typeParameter);
  42055. if (typeParameter.default) {
  42056. defaultRequired = true;
  42057. }
  42058. if (!this.isRelational(">")) {
  42059. this.expect(types$12.comma);
  42060. }
  42061. } while (!this.isRelational(">"));
  42062. this.expectRelational(">");
  42063. this.state.inType = oldInType;
  42064. return this.finishNode(node, "TypeParameterDeclaration");
  42065. }
  42066. flowParseTypeParameterInstantiation() {
  42067. const node = this.startNode();
  42068. const oldInType = this.state.inType;
  42069. node.params = [];
  42070. this.state.inType = true;
  42071. this.expectRelational("<");
  42072. const oldNoAnonFunctionType = this.state.noAnonFunctionType;
  42073. this.state.noAnonFunctionType = false;
  42074. while (!this.isRelational(">")) {
  42075. node.params.push(this.flowParseType());
  42076. if (!this.isRelational(">")) {
  42077. this.expect(types$12.comma);
  42078. }
  42079. }
  42080. this.state.noAnonFunctionType = oldNoAnonFunctionType;
  42081. this.expectRelational(">");
  42082. this.state.inType = oldInType;
  42083. return this.finishNode(node, "TypeParameterInstantiation");
  42084. }
  42085. flowParseTypeParameterInstantiationCallOrNew() {
  42086. const node = this.startNode();
  42087. const oldInType = this.state.inType;
  42088. node.params = [];
  42089. this.state.inType = true;
  42090. this.expectRelational("<");
  42091. while (!this.isRelational(">")) {
  42092. node.params.push(this.flowParseTypeOrImplicitInstantiation());
  42093. if (!this.isRelational(">")) {
  42094. this.expect(types$12.comma);
  42095. }
  42096. }
  42097. this.expectRelational(">");
  42098. this.state.inType = oldInType;
  42099. return this.finishNode(node, "TypeParameterInstantiation");
  42100. }
  42101. flowParseInterfaceType() {
  42102. const node = this.startNode();
  42103. this.expectContextual("interface");
  42104. node.extends = [];
  42105. if (this.eat(types$12._extends)) {
  42106. do {
  42107. node.extends.push(this.flowParseInterfaceExtends());
  42108. } while (this.eat(types$12.comma));
  42109. }
  42110. node.body = this.flowParseObjectType({
  42111. allowStatic: false,
  42112. allowExact: false,
  42113. allowSpread: false,
  42114. allowProto: false,
  42115. allowInexact: false
  42116. });
  42117. return this.finishNode(node, "InterfaceTypeAnnotation");
  42118. }
  42119. flowParseObjectPropertyKey() {
  42120. return this.match(types$12.num) || this.match(types$12.string) ? this.parseExprAtom() : this.parseIdentifier(true);
  42121. }
  42122. flowParseObjectTypeIndexer(node, isStatic, variance) {
  42123. node.static = isStatic;
  42124. if (this.lookahead().type === types$12.colon) {
  42125. node.id = this.flowParseObjectPropertyKey();
  42126. node.key = this.flowParseTypeInitialiser();
  42127. } else {
  42128. node.id = null;
  42129. node.key = this.flowParseType();
  42130. }
  42131. this.expect(types$12.bracketR);
  42132. node.value = this.flowParseTypeInitialiser();
  42133. node.variance = variance;
  42134. return this.finishNode(node, "ObjectTypeIndexer");
  42135. }
  42136. flowParseObjectTypeInternalSlot(node, isStatic) {
  42137. node.static = isStatic;
  42138. node.id = this.flowParseObjectPropertyKey();
  42139. this.expect(types$12.bracketR);
  42140. this.expect(types$12.bracketR);
  42141. if (this.isRelational("<") || this.match(types$12.parenL)) {
  42142. node.method = true;
  42143. node.optional = false;
  42144. node.value = this.flowParseObjectTypeMethodish(this.startNodeAt(node.start, node.loc.start));
  42145. } else {
  42146. node.method = false;
  42147. if (this.eat(types$12.question)) {
  42148. node.optional = true;
  42149. }
  42150. node.value = this.flowParseTypeInitialiser();
  42151. }
  42152. return this.finishNode(node, "ObjectTypeInternalSlot");
  42153. }
  42154. flowParseObjectTypeMethodish(node) {
  42155. node.params = [];
  42156. node.rest = null;
  42157. node.typeParameters = null;
  42158. node.this = null;
  42159. if (this.isRelational("<")) {
  42160. node.typeParameters = this.flowParseTypeParameterDeclaration();
  42161. }
  42162. this.expect(types$12.parenL);
  42163. if (this.match(types$12._this)) {
  42164. node.this = this.flowParseFunctionTypeParam(true);
  42165. node.this.name = null;
  42166. if (!this.match(types$12.parenR)) {
  42167. this.expect(types$12.comma);
  42168. }
  42169. }
  42170. while (!this.match(types$12.parenR) && !this.match(types$12.ellipsis)) {
  42171. node.params.push(this.flowParseFunctionTypeParam(false));
  42172. if (!this.match(types$12.parenR)) {
  42173. this.expect(types$12.comma);
  42174. }
  42175. }
  42176. if (this.eat(types$12.ellipsis)) {
  42177. node.rest = this.flowParseFunctionTypeParam(false);
  42178. }
  42179. this.expect(types$12.parenR);
  42180. node.returnType = this.flowParseTypeInitialiser();
  42181. return this.finishNode(node, "FunctionTypeAnnotation");
  42182. }
  42183. flowParseObjectTypeCallProperty(node, isStatic) {
  42184. const valueNode = this.startNode();
  42185. node.static = isStatic;
  42186. node.value = this.flowParseObjectTypeMethodish(valueNode);
  42187. return this.finishNode(node, "ObjectTypeCallProperty");
  42188. }
  42189. flowParseObjectType({
  42190. allowStatic,
  42191. allowExact,
  42192. allowSpread,
  42193. allowProto,
  42194. allowInexact
  42195. }) {
  42196. const oldInType = this.state.inType;
  42197. this.state.inType = true;
  42198. const nodeStart = this.startNode();
  42199. nodeStart.callProperties = [];
  42200. nodeStart.properties = [];
  42201. nodeStart.indexers = [];
  42202. nodeStart.internalSlots = [];
  42203. let endDelim;
  42204. let exact;
  42205. let inexact = false;
  42206. if (allowExact && this.match(types$12.braceBarL)) {
  42207. this.expect(types$12.braceBarL);
  42208. endDelim = types$12.braceBarR;
  42209. exact = true;
  42210. } else {
  42211. this.expect(types$12.braceL);
  42212. endDelim = types$12.braceR;
  42213. exact = false;
  42214. }
  42215. nodeStart.exact = exact;
  42216. while (!this.match(endDelim)) {
  42217. let isStatic = false;
  42218. let protoStart = null;
  42219. let inexactStart = null;
  42220. const node = this.startNode();
  42221. if (allowProto && this.isContextual("proto")) {
  42222. const lookahead2 = this.lookahead();
  42223. if (lookahead2.type !== types$12.colon && lookahead2.type !== types$12.question) {
  42224. this.next();
  42225. protoStart = this.state.start;
  42226. allowStatic = false;
  42227. }
  42228. }
  42229. if (allowStatic && this.isContextual("static")) {
  42230. const lookahead2 = this.lookahead();
  42231. if (lookahead2.type !== types$12.colon && lookahead2.type !== types$12.question) {
  42232. this.next();
  42233. isStatic = true;
  42234. }
  42235. }
  42236. const variance = this.flowParseVariance();
  42237. if (this.eat(types$12.bracketL)) {
  42238. if (protoStart != null) {
  42239. this.unexpected(protoStart);
  42240. }
  42241. if (this.eat(types$12.bracketL)) {
  42242. if (variance) {
  42243. this.unexpected(variance.start);
  42244. }
  42245. nodeStart.internalSlots.push(this.flowParseObjectTypeInternalSlot(node, isStatic));
  42246. } else {
  42247. nodeStart.indexers.push(this.flowParseObjectTypeIndexer(node, isStatic, variance));
  42248. }
  42249. } else if (this.match(types$12.parenL) || this.isRelational("<")) {
  42250. if (protoStart != null) {
  42251. this.unexpected(protoStart);
  42252. }
  42253. if (variance) {
  42254. this.unexpected(variance.start);
  42255. }
  42256. nodeStart.callProperties.push(this.flowParseObjectTypeCallProperty(node, isStatic));
  42257. } else {
  42258. let kind = "init";
  42259. if (this.isContextual("get") || this.isContextual("set")) {
  42260. const lookahead2 = this.lookahead();
  42261. if (lookahead2.type === types$12.name || lookahead2.type === types$12.string || lookahead2.type === types$12.num) {
  42262. kind = this.state.value;
  42263. this.next();
  42264. }
  42265. }
  42266. const propOrInexact = this.flowParseObjectTypeProperty(node, isStatic, protoStart, variance, kind, allowSpread, allowInexact != null ? allowInexact : !exact);
  42267. if (propOrInexact === null) {
  42268. inexact = true;
  42269. inexactStart = this.state.lastTokStart;
  42270. } else {
  42271. nodeStart.properties.push(propOrInexact);
  42272. }
  42273. }
  42274. this.flowObjectTypeSemicolon();
  42275. if (inexactStart && !this.match(types$12.braceR) && !this.match(types$12.braceBarR)) {
  42276. this.raise(inexactStart, FlowErrors.UnexpectedExplicitInexactInObject);
  42277. }
  42278. }
  42279. this.expect(endDelim);
  42280. if (allowSpread) {
  42281. nodeStart.inexact = inexact;
  42282. }
  42283. const out = this.finishNode(nodeStart, "ObjectTypeAnnotation");
  42284. this.state.inType = oldInType;
  42285. return out;
  42286. }
  42287. flowParseObjectTypeProperty(node, isStatic, protoStart, variance, kind, allowSpread, allowInexact) {
  42288. if (this.eat(types$12.ellipsis)) {
  42289. const isInexactToken = this.match(types$12.comma) || this.match(types$12.semi) || this.match(types$12.braceR) || this.match(types$12.braceBarR);
  42290. if (isInexactToken) {
  42291. if (!allowSpread) {
  42292. this.raise(this.state.lastTokStart, FlowErrors.InexactInsideNonObject);
  42293. } else if (!allowInexact) {
  42294. this.raise(this.state.lastTokStart, FlowErrors.InexactInsideExact);
  42295. }
  42296. if (variance) {
  42297. this.raise(variance.start, FlowErrors.InexactVariance);
  42298. }
  42299. return null;
  42300. }
  42301. if (!allowSpread) {
  42302. this.raise(this.state.lastTokStart, FlowErrors.UnexpectedSpreadType);
  42303. }
  42304. if (protoStart != null) {
  42305. this.unexpected(protoStart);
  42306. }
  42307. if (variance) {
  42308. this.raise(variance.start, FlowErrors.SpreadVariance);
  42309. }
  42310. node.argument = this.flowParseType();
  42311. return this.finishNode(node, "ObjectTypeSpreadProperty");
  42312. } else {
  42313. node.key = this.flowParseObjectPropertyKey();
  42314. node.static = isStatic;
  42315. node.proto = protoStart != null;
  42316. node.kind = kind;
  42317. let optional = false;
  42318. if (this.isRelational("<") || this.match(types$12.parenL)) {
  42319. node.method = true;
  42320. if (protoStart != null) {
  42321. this.unexpected(protoStart);
  42322. }
  42323. if (variance) {
  42324. this.unexpected(variance.start);
  42325. }
  42326. node.value = this.flowParseObjectTypeMethodish(this.startNodeAt(node.start, node.loc.start));
  42327. if (kind === "get" || kind === "set") {
  42328. this.flowCheckGetterSetterParams(node);
  42329. }
  42330. if (!allowSpread && node.key.name === "constructor" && node.value.this) {
  42331. this.raise(node.value.this.start, FlowErrors.ThisParamBannedInConstructor);
  42332. }
  42333. } else {
  42334. if (kind !== "init")
  42335. this.unexpected();
  42336. node.method = false;
  42337. if (this.eat(types$12.question)) {
  42338. optional = true;
  42339. }
  42340. node.value = this.flowParseTypeInitialiser();
  42341. node.variance = variance;
  42342. }
  42343. node.optional = optional;
  42344. return this.finishNode(node, "ObjectTypeProperty");
  42345. }
  42346. }
  42347. flowCheckGetterSetterParams(property) {
  42348. const paramCount = property.kind === "get" ? 0 : 1;
  42349. const start3 = property.start;
  42350. const length = property.value.params.length + (property.value.rest ? 1 : 0);
  42351. if (property.value.this) {
  42352. this.raise(property.value.this.start, property.kind === "get" ? FlowErrors.GetterMayNotHaveThisParam : FlowErrors.SetterMayNotHaveThisParam);
  42353. }
  42354. if (length !== paramCount) {
  42355. if (property.kind === "get") {
  42356. this.raise(start3, ErrorMessages.BadGetterArity);
  42357. } else {
  42358. this.raise(start3, ErrorMessages.BadSetterArity);
  42359. }
  42360. }
  42361. if (property.kind === "set" && property.value.rest) {
  42362. this.raise(start3, ErrorMessages.BadSetterRestParameter);
  42363. }
  42364. }
  42365. flowObjectTypeSemicolon() {
  42366. if (!this.eat(types$12.semi) && !this.eat(types$12.comma) && !this.match(types$12.braceR) && !this.match(types$12.braceBarR)) {
  42367. this.unexpected();
  42368. }
  42369. }
  42370. flowParseQualifiedTypeIdentifier(startPos, startLoc, id) {
  42371. startPos = startPos || this.state.start;
  42372. startLoc = startLoc || this.state.startLoc;
  42373. let node = id || this.flowParseRestrictedIdentifier(true);
  42374. while (this.eat(types$12.dot)) {
  42375. const node2 = this.startNodeAt(startPos, startLoc);
  42376. node2.qualification = node;
  42377. node2.id = this.flowParseRestrictedIdentifier(true);
  42378. node = this.finishNode(node2, "QualifiedTypeIdentifier");
  42379. }
  42380. return node;
  42381. }
  42382. flowParseGenericType(startPos, startLoc, id) {
  42383. const node = this.startNodeAt(startPos, startLoc);
  42384. node.typeParameters = null;
  42385. node.id = this.flowParseQualifiedTypeIdentifier(startPos, startLoc, id);
  42386. if (this.isRelational("<")) {
  42387. node.typeParameters = this.flowParseTypeParameterInstantiation();
  42388. }
  42389. return this.finishNode(node, "GenericTypeAnnotation");
  42390. }
  42391. flowParseTypeofType() {
  42392. const node = this.startNode();
  42393. this.expect(types$12._typeof);
  42394. node.argument = this.flowParsePrimaryType();
  42395. return this.finishNode(node, "TypeofTypeAnnotation");
  42396. }
  42397. flowParseTupleType() {
  42398. const node = this.startNode();
  42399. node.types = [];
  42400. this.expect(types$12.bracketL);
  42401. while (this.state.pos < this.length && !this.match(types$12.bracketR)) {
  42402. node.types.push(this.flowParseType());
  42403. if (this.match(types$12.bracketR))
  42404. break;
  42405. this.expect(types$12.comma);
  42406. }
  42407. this.expect(types$12.bracketR);
  42408. return this.finishNode(node, "TupleTypeAnnotation");
  42409. }
  42410. flowParseFunctionTypeParam(first) {
  42411. let name2 = null;
  42412. let optional = false;
  42413. let typeAnnotation = null;
  42414. const node = this.startNode();
  42415. const lh = this.lookahead();
  42416. const isThis = this.state.type === types$12._this;
  42417. if (lh.type === types$12.colon || lh.type === types$12.question) {
  42418. if (isThis && !first) {
  42419. this.raise(node.start, FlowErrors.ThisParamMustBeFirst);
  42420. }
  42421. name2 = this.parseIdentifier(isThis);
  42422. if (this.eat(types$12.question)) {
  42423. optional = true;
  42424. if (isThis) {
  42425. this.raise(node.start, FlowErrors.ThisParamMayNotBeOptional);
  42426. }
  42427. }
  42428. typeAnnotation = this.flowParseTypeInitialiser();
  42429. } else {
  42430. typeAnnotation = this.flowParseType();
  42431. }
  42432. node.name = name2;
  42433. node.optional = optional;
  42434. node.typeAnnotation = typeAnnotation;
  42435. return this.finishNode(node, "FunctionTypeParam");
  42436. }
  42437. reinterpretTypeAsFunctionTypeParam(type) {
  42438. const node = this.startNodeAt(type.start, type.loc.start);
  42439. node.name = null;
  42440. node.optional = false;
  42441. node.typeAnnotation = type;
  42442. return this.finishNode(node, "FunctionTypeParam");
  42443. }
  42444. flowParseFunctionTypeParams(params = []) {
  42445. let rest = null;
  42446. let _this = null;
  42447. if (this.match(types$12._this)) {
  42448. _this = this.flowParseFunctionTypeParam(true);
  42449. _this.name = null;
  42450. if (!this.match(types$12.parenR)) {
  42451. this.expect(types$12.comma);
  42452. }
  42453. }
  42454. while (!this.match(types$12.parenR) && !this.match(types$12.ellipsis)) {
  42455. params.push(this.flowParseFunctionTypeParam(false));
  42456. if (!this.match(types$12.parenR)) {
  42457. this.expect(types$12.comma);
  42458. }
  42459. }
  42460. if (this.eat(types$12.ellipsis)) {
  42461. rest = this.flowParseFunctionTypeParam(false);
  42462. }
  42463. return {
  42464. params,
  42465. rest,
  42466. _this
  42467. };
  42468. }
  42469. flowIdentToTypeAnnotation(startPos, startLoc, node, id) {
  42470. switch (id.name) {
  42471. case "any":
  42472. return this.finishNode(node, "AnyTypeAnnotation");
  42473. case "bool":
  42474. case "boolean":
  42475. return this.finishNode(node, "BooleanTypeAnnotation");
  42476. case "mixed":
  42477. return this.finishNode(node, "MixedTypeAnnotation");
  42478. case "empty":
  42479. return this.finishNode(node, "EmptyTypeAnnotation");
  42480. case "number":
  42481. return this.finishNode(node, "NumberTypeAnnotation");
  42482. case "string":
  42483. return this.finishNode(node, "StringTypeAnnotation");
  42484. case "symbol":
  42485. return this.finishNode(node, "SymbolTypeAnnotation");
  42486. default:
  42487. this.checkNotUnderscore(id.name);
  42488. return this.flowParseGenericType(startPos, startLoc, id);
  42489. }
  42490. }
  42491. flowParsePrimaryType() {
  42492. const startPos = this.state.start;
  42493. const startLoc = this.state.startLoc;
  42494. const node = this.startNode();
  42495. let tmp;
  42496. let type;
  42497. let isGroupedType = false;
  42498. const oldNoAnonFunctionType = this.state.noAnonFunctionType;
  42499. switch (this.state.type) {
  42500. case types$12.name:
  42501. if (this.isContextual("interface")) {
  42502. return this.flowParseInterfaceType();
  42503. }
  42504. return this.flowIdentToTypeAnnotation(startPos, startLoc, node, this.parseIdentifier());
  42505. case types$12.braceL:
  42506. return this.flowParseObjectType({
  42507. allowStatic: false,
  42508. allowExact: false,
  42509. allowSpread: true,
  42510. allowProto: false,
  42511. allowInexact: true
  42512. });
  42513. case types$12.braceBarL:
  42514. return this.flowParseObjectType({
  42515. allowStatic: false,
  42516. allowExact: true,
  42517. allowSpread: true,
  42518. allowProto: false,
  42519. allowInexact: false
  42520. });
  42521. case types$12.bracketL:
  42522. this.state.noAnonFunctionType = false;
  42523. type = this.flowParseTupleType();
  42524. this.state.noAnonFunctionType = oldNoAnonFunctionType;
  42525. return type;
  42526. case types$12.relational:
  42527. if (this.state.value === "<") {
  42528. node.typeParameters = this.flowParseTypeParameterDeclaration();
  42529. this.expect(types$12.parenL);
  42530. tmp = this.flowParseFunctionTypeParams();
  42531. node.params = tmp.params;
  42532. node.rest = tmp.rest;
  42533. node.this = tmp._this;
  42534. this.expect(types$12.parenR);
  42535. this.expect(types$12.arrow);
  42536. node.returnType = this.flowParseType();
  42537. return this.finishNode(node, "FunctionTypeAnnotation");
  42538. }
  42539. break;
  42540. case types$12.parenL:
  42541. this.next();
  42542. if (!this.match(types$12.parenR) && !this.match(types$12.ellipsis)) {
  42543. if (this.match(types$12.name) || this.match(types$12._this)) {
  42544. const token = this.lookahead().type;
  42545. isGroupedType = token !== types$12.question && token !== types$12.colon;
  42546. } else {
  42547. isGroupedType = true;
  42548. }
  42549. }
  42550. if (isGroupedType) {
  42551. this.state.noAnonFunctionType = false;
  42552. type = this.flowParseType();
  42553. this.state.noAnonFunctionType = oldNoAnonFunctionType;
  42554. if (this.state.noAnonFunctionType || !(this.match(types$12.comma) || this.match(types$12.parenR) && this.lookahead().type === types$12.arrow)) {
  42555. this.expect(types$12.parenR);
  42556. return type;
  42557. } else {
  42558. this.eat(types$12.comma);
  42559. }
  42560. }
  42561. if (type) {
  42562. tmp = this.flowParseFunctionTypeParams([this.reinterpretTypeAsFunctionTypeParam(type)]);
  42563. } else {
  42564. tmp = this.flowParseFunctionTypeParams();
  42565. }
  42566. node.params = tmp.params;
  42567. node.rest = tmp.rest;
  42568. node.this = tmp._this;
  42569. this.expect(types$12.parenR);
  42570. this.expect(types$12.arrow);
  42571. node.returnType = this.flowParseType();
  42572. node.typeParameters = null;
  42573. return this.finishNode(node, "FunctionTypeAnnotation");
  42574. case types$12.string:
  42575. return this.parseLiteral(this.state.value, "StringLiteralTypeAnnotation");
  42576. case types$12._true:
  42577. case types$12._false:
  42578. node.value = this.match(types$12._true);
  42579. this.next();
  42580. return this.finishNode(node, "BooleanLiteralTypeAnnotation");
  42581. case types$12.plusMin:
  42582. if (this.state.value === "-") {
  42583. this.next();
  42584. if (this.match(types$12.num)) {
  42585. return this.parseLiteralAtNode(-this.state.value, "NumberLiteralTypeAnnotation", node);
  42586. }
  42587. if (this.match(types$12.bigint)) {
  42588. return this.parseLiteralAtNode(-this.state.value, "BigIntLiteralTypeAnnotation", node);
  42589. }
  42590. throw this.raise(this.state.start, FlowErrors.UnexpectedSubtractionOperand);
  42591. }
  42592. throw this.unexpected();
  42593. case types$12.num:
  42594. return this.parseLiteral(this.state.value, "NumberLiteralTypeAnnotation");
  42595. case types$12.bigint:
  42596. return this.parseLiteral(this.state.value, "BigIntLiteralTypeAnnotation");
  42597. case types$12._void:
  42598. this.next();
  42599. return this.finishNode(node, "VoidTypeAnnotation");
  42600. case types$12._null:
  42601. this.next();
  42602. return this.finishNode(node, "NullLiteralTypeAnnotation");
  42603. case types$12._this:
  42604. this.next();
  42605. return this.finishNode(node, "ThisTypeAnnotation");
  42606. case types$12.star:
  42607. this.next();
  42608. return this.finishNode(node, "ExistsTypeAnnotation");
  42609. default:
  42610. if (this.state.type.keyword === "typeof") {
  42611. return this.flowParseTypeofType();
  42612. } else if (this.state.type.keyword) {
  42613. const label = this.state.type.label;
  42614. this.next();
  42615. return super.createIdentifier(node, label);
  42616. }
  42617. }
  42618. throw this.unexpected();
  42619. }
  42620. flowParsePostfixType() {
  42621. const startPos = this.state.start;
  42622. const startLoc = this.state.startLoc;
  42623. let type = this.flowParsePrimaryType();
  42624. let seenOptionalIndexedAccess = false;
  42625. while ((this.match(types$12.bracketL) || this.match(types$12.questionDot)) && !this.canInsertSemicolon()) {
  42626. const node = this.startNodeAt(startPos, startLoc);
  42627. const optional = this.eat(types$12.questionDot);
  42628. seenOptionalIndexedAccess = seenOptionalIndexedAccess || optional;
  42629. this.expect(types$12.bracketL);
  42630. if (!optional && this.match(types$12.bracketR)) {
  42631. node.elementType = type;
  42632. this.next();
  42633. type = this.finishNode(node, "ArrayTypeAnnotation");
  42634. } else {
  42635. node.objectType = type;
  42636. node.indexType = this.flowParseType();
  42637. this.expect(types$12.bracketR);
  42638. if (seenOptionalIndexedAccess) {
  42639. node.optional = optional;
  42640. type = this.finishNode(node, "OptionalIndexedAccessType");
  42641. } else {
  42642. type = this.finishNode(node, "IndexedAccessType");
  42643. }
  42644. }
  42645. }
  42646. return type;
  42647. }
  42648. flowParsePrefixType() {
  42649. const node = this.startNode();
  42650. if (this.eat(types$12.question)) {
  42651. node.typeAnnotation = this.flowParsePrefixType();
  42652. return this.finishNode(node, "NullableTypeAnnotation");
  42653. } else {
  42654. return this.flowParsePostfixType();
  42655. }
  42656. }
  42657. flowParseAnonFunctionWithoutParens() {
  42658. const param = this.flowParsePrefixType();
  42659. if (!this.state.noAnonFunctionType && this.eat(types$12.arrow)) {
  42660. const node = this.startNodeAt(param.start, param.loc.start);
  42661. node.params = [this.reinterpretTypeAsFunctionTypeParam(param)];
  42662. node.rest = null;
  42663. node.this = null;
  42664. node.returnType = this.flowParseType();
  42665. node.typeParameters = null;
  42666. return this.finishNode(node, "FunctionTypeAnnotation");
  42667. }
  42668. return param;
  42669. }
  42670. flowParseIntersectionType() {
  42671. const node = this.startNode();
  42672. this.eat(types$12.bitwiseAND);
  42673. const type = this.flowParseAnonFunctionWithoutParens();
  42674. node.types = [type];
  42675. while (this.eat(types$12.bitwiseAND)) {
  42676. node.types.push(this.flowParseAnonFunctionWithoutParens());
  42677. }
  42678. return node.types.length === 1 ? type : this.finishNode(node, "IntersectionTypeAnnotation");
  42679. }
  42680. flowParseUnionType() {
  42681. const node = this.startNode();
  42682. this.eat(types$12.bitwiseOR);
  42683. const type = this.flowParseIntersectionType();
  42684. node.types = [type];
  42685. while (this.eat(types$12.bitwiseOR)) {
  42686. node.types.push(this.flowParseIntersectionType());
  42687. }
  42688. return node.types.length === 1 ? type : this.finishNode(node, "UnionTypeAnnotation");
  42689. }
  42690. flowParseType() {
  42691. const oldInType = this.state.inType;
  42692. this.state.inType = true;
  42693. const type = this.flowParseUnionType();
  42694. this.state.inType = oldInType;
  42695. this.state.exprAllowed = this.state.exprAllowed || this.state.noAnonFunctionType;
  42696. return type;
  42697. }
  42698. flowParseTypeOrImplicitInstantiation() {
  42699. if (this.state.type === types$12.name && this.state.value === "_") {
  42700. const startPos = this.state.start;
  42701. const startLoc = this.state.startLoc;
  42702. const node = this.parseIdentifier();
  42703. return this.flowParseGenericType(startPos, startLoc, node);
  42704. } else {
  42705. return this.flowParseType();
  42706. }
  42707. }
  42708. flowParseTypeAnnotation() {
  42709. const node = this.startNode();
  42710. node.typeAnnotation = this.flowParseTypeInitialiser();
  42711. return this.finishNode(node, "TypeAnnotation");
  42712. }
  42713. flowParseTypeAnnotatableIdentifier(allowPrimitiveOverride) {
  42714. const ident = allowPrimitiveOverride ? this.parseIdentifier() : this.flowParseRestrictedIdentifier();
  42715. if (this.match(types$12.colon)) {
  42716. ident.typeAnnotation = this.flowParseTypeAnnotation();
  42717. this.resetEndLocation(ident);
  42718. }
  42719. return ident;
  42720. }
  42721. typeCastToParameter(node) {
  42722. node.expression.typeAnnotation = node.typeAnnotation;
  42723. this.resetEndLocation(node.expression, node.typeAnnotation.end, node.typeAnnotation.loc.end);
  42724. return node.expression;
  42725. }
  42726. flowParseVariance() {
  42727. let variance = null;
  42728. if (this.match(types$12.plusMin)) {
  42729. variance = this.startNode();
  42730. if (this.state.value === "+") {
  42731. variance.kind = "plus";
  42732. } else {
  42733. variance.kind = "minus";
  42734. }
  42735. this.next();
  42736. this.finishNode(variance, "Variance");
  42737. }
  42738. return variance;
  42739. }
  42740. parseFunctionBody(node, allowExpressionBody, isMethod = false) {
  42741. if (allowExpressionBody) {
  42742. return this.forwardNoArrowParamsConversionAt(node, () => super.parseFunctionBody(node, true, isMethod));
  42743. }
  42744. return super.parseFunctionBody(node, false, isMethod);
  42745. }
  42746. parseFunctionBodyAndFinish(node, type, isMethod = false) {
  42747. if (this.match(types$12.colon)) {
  42748. const typeNode = this.startNode();
  42749. [typeNode.typeAnnotation, node.predicate] = this.flowParseTypeAndPredicateInitialiser();
  42750. node.returnType = typeNode.typeAnnotation ? this.finishNode(typeNode, "TypeAnnotation") : null;
  42751. }
  42752. super.parseFunctionBodyAndFinish(node, type, isMethod);
  42753. }
  42754. parseStatement(context, topLevel) {
  42755. if (this.state.strict && this.match(types$12.name) && this.state.value === "interface") {
  42756. const lookahead2 = this.lookahead();
  42757. if (lookahead2.type === types$12.name || isKeyword(lookahead2.value)) {
  42758. const node = this.startNode();
  42759. this.next();
  42760. return this.flowParseInterface(node);
  42761. }
  42762. } else if (this.shouldParseEnums() && this.isContextual("enum")) {
  42763. const node = this.startNode();
  42764. this.next();
  42765. return this.flowParseEnumDeclaration(node);
  42766. }
  42767. const stmt = super.parseStatement(context, topLevel);
  42768. if (this.flowPragma === void 0 && !this.isValidDirective(stmt)) {
  42769. this.flowPragma = null;
  42770. }
  42771. return stmt;
  42772. }
  42773. parseExpressionStatement(node, expr) {
  42774. if (expr.type === "Identifier") {
  42775. if (expr.name === "declare") {
  42776. if (this.match(types$12._class) || this.match(types$12.name) || this.match(types$12._function) || this.match(types$12._var) || this.match(types$12._export)) {
  42777. return this.flowParseDeclare(node);
  42778. }
  42779. } else if (this.match(types$12.name)) {
  42780. if (expr.name === "interface") {
  42781. return this.flowParseInterface(node);
  42782. } else if (expr.name === "type") {
  42783. return this.flowParseTypeAlias(node);
  42784. } else if (expr.name === "opaque") {
  42785. return this.flowParseOpaqueType(node, false);
  42786. }
  42787. }
  42788. }
  42789. return super.parseExpressionStatement(node, expr);
  42790. }
  42791. shouldParseExportDeclaration() {
  42792. return this.isContextual("type") || this.isContextual("interface") || this.isContextual("opaque") || this.shouldParseEnums() && this.isContextual("enum") || super.shouldParseExportDeclaration();
  42793. }
  42794. isExportDefaultSpecifier() {
  42795. if (this.match(types$12.name) && (this.state.value === "type" || this.state.value === "interface" || this.state.value === "opaque" || this.shouldParseEnums() && this.state.value === "enum")) {
  42796. return false;
  42797. }
  42798. return super.isExportDefaultSpecifier();
  42799. }
  42800. parseExportDefaultExpression() {
  42801. if (this.shouldParseEnums() && this.isContextual("enum")) {
  42802. const node = this.startNode();
  42803. this.next();
  42804. return this.flowParseEnumDeclaration(node);
  42805. }
  42806. return super.parseExportDefaultExpression();
  42807. }
  42808. parseConditional(expr, startPos, startLoc, refNeedsArrowPos) {
  42809. if (!this.match(types$12.question))
  42810. return expr;
  42811. if (refNeedsArrowPos) {
  42812. const result = this.tryParse(() => super.parseConditional(expr, startPos, startLoc));
  42813. if (!result.node) {
  42814. refNeedsArrowPos.start = result.error.pos || this.state.start;
  42815. return expr;
  42816. }
  42817. if (result.error)
  42818. this.state = result.failState;
  42819. return result.node;
  42820. }
  42821. this.expect(types$12.question);
  42822. const state = this.state.clone();
  42823. const originalNoArrowAt = this.state.noArrowAt;
  42824. const node = this.startNodeAt(startPos, startLoc);
  42825. let {
  42826. consequent,
  42827. failed
  42828. } = this.tryParseConditionalConsequent();
  42829. let [valid2, invalid2] = this.getArrowLikeExpressions(consequent);
  42830. if (failed || invalid2.length > 0) {
  42831. const noArrowAt = [...originalNoArrowAt];
  42832. if (invalid2.length > 0) {
  42833. this.state = state;
  42834. this.state.noArrowAt = noArrowAt;
  42835. for (let i = 0; i < invalid2.length; i++) {
  42836. noArrowAt.push(invalid2[i].start);
  42837. }
  42838. ({
  42839. consequent,
  42840. failed
  42841. } = this.tryParseConditionalConsequent());
  42842. [valid2, invalid2] = this.getArrowLikeExpressions(consequent);
  42843. }
  42844. if (failed && valid2.length > 1) {
  42845. this.raise(state.start, FlowErrors.AmbiguousConditionalArrow);
  42846. }
  42847. if (failed && valid2.length === 1) {
  42848. this.state = state;
  42849. this.state.noArrowAt = noArrowAt.concat(valid2[0].start);
  42850. ({
  42851. consequent,
  42852. failed
  42853. } = this.tryParseConditionalConsequent());
  42854. }
  42855. }
  42856. this.getArrowLikeExpressions(consequent, true);
  42857. this.state.noArrowAt = originalNoArrowAt;
  42858. this.expect(types$12.colon);
  42859. node.test = expr;
  42860. node.consequent = consequent;
  42861. node.alternate = this.forwardNoArrowParamsConversionAt(node, () => this.parseMaybeAssign(void 0, void 0, void 0));
  42862. return this.finishNode(node, "ConditionalExpression");
  42863. }
  42864. tryParseConditionalConsequent() {
  42865. this.state.noArrowParamsConversionAt.push(this.state.start);
  42866. const consequent = this.parseMaybeAssignAllowIn();
  42867. const failed = !this.match(types$12.colon);
  42868. this.state.noArrowParamsConversionAt.pop();
  42869. return {
  42870. consequent,
  42871. failed
  42872. };
  42873. }
  42874. getArrowLikeExpressions(node, disallowInvalid) {
  42875. const stack = [node];
  42876. const arrows = [];
  42877. while (stack.length !== 0) {
  42878. const node2 = stack.pop();
  42879. if (node2.type === "ArrowFunctionExpression") {
  42880. if (node2.typeParameters || !node2.returnType) {
  42881. this.finishArrowValidation(node2);
  42882. } else {
  42883. arrows.push(node2);
  42884. }
  42885. stack.push(node2.body);
  42886. } else if (node2.type === "ConditionalExpression") {
  42887. stack.push(node2.consequent);
  42888. stack.push(node2.alternate);
  42889. }
  42890. }
  42891. if (disallowInvalid) {
  42892. arrows.forEach((node2) => this.finishArrowValidation(node2));
  42893. return [arrows, []];
  42894. }
  42895. return partition(arrows, (node2) => node2.params.every((param) => this.isAssignable(param, true)));
  42896. }
  42897. finishArrowValidation(node) {
  42898. var _node$extra;
  42899. this.toAssignableList(node.params, (_node$extra = node.extra) == null ? void 0 : _node$extra.trailingComma, false);
  42900. this.scope.enter(SCOPE_FUNCTION2 | SCOPE_ARROW2);
  42901. super.checkParams(node, false, true);
  42902. this.scope.exit();
  42903. }
  42904. forwardNoArrowParamsConversionAt(node, parse5) {
  42905. let result;
  42906. if (this.state.noArrowParamsConversionAt.indexOf(node.start) !== -1) {
  42907. this.state.noArrowParamsConversionAt.push(this.state.start);
  42908. result = parse5();
  42909. this.state.noArrowParamsConversionAt.pop();
  42910. } else {
  42911. result = parse5();
  42912. }
  42913. return result;
  42914. }
  42915. parseParenItem(node, startPos, startLoc) {
  42916. node = super.parseParenItem(node, startPos, startLoc);
  42917. if (this.eat(types$12.question)) {
  42918. node.optional = true;
  42919. this.resetEndLocation(node);
  42920. }
  42921. if (this.match(types$12.colon)) {
  42922. const typeCastNode = this.startNodeAt(startPos, startLoc);
  42923. typeCastNode.expression = node;
  42924. typeCastNode.typeAnnotation = this.flowParseTypeAnnotation();
  42925. return this.finishNode(typeCastNode, "TypeCastExpression");
  42926. }
  42927. return node;
  42928. }
  42929. assertModuleNodeAllowed(node) {
  42930. if (node.type === "ImportDeclaration" && (node.importKind === "type" || node.importKind === "typeof") || node.type === "ExportNamedDeclaration" && node.exportKind === "type" || node.type === "ExportAllDeclaration" && node.exportKind === "type") {
  42931. return;
  42932. }
  42933. super.assertModuleNodeAllowed(node);
  42934. }
  42935. parseExport(node) {
  42936. const decl = super.parseExport(node);
  42937. if (decl.type === "ExportNamedDeclaration" || decl.type === "ExportAllDeclaration") {
  42938. decl.exportKind = decl.exportKind || "value";
  42939. }
  42940. return decl;
  42941. }
  42942. parseExportDeclaration(node) {
  42943. if (this.isContextual("type")) {
  42944. node.exportKind = "type";
  42945. const declarationNode = this.startNode();
  42946. this.next();
  42947. if (this.match(types$12.braceL)) {
  42948. node.specifiers = this.parseExportSpecifiers();
  42949. this.parseExportFrom(node);
  42950. return null;
  42951. } else {
  42952. return this.flowParseTypeAlias(declarationNode);
  42953. }
  42954. } else if (this.isContextual("opaque")) {
  42955. node.exportKind = "type";
  42956. const declarationNode = this.startNode();
  42957. this.next();
  42958. return this.flowParseOpaqueType(declarationNode, false);
  42959. } else if (this.isContextual("interface")) {
  42960. node.exportKind = "type";
  42961. const declarationNode = this.startNode();
  42962. this.next();
  42963. return this.flowParseInterface(declarationNode);
  42964. } else if (this.shouldParseEnums() && this.isContextual("enum")) {
  42965. node.exportKind = "value";
  42966. const declarationNode = this.startNode();
  42967. this.next();
  42968. return this.flowParseEnumDeclaration(declarationNode);
  42969. } else {
  42970. return super.parseExportDeclaration(node);
  42971. }
  42972. }
  42973. eatExportStar(node) {
  42974. if (super.eatExportStar(...arguments))
  42975. return true;
  42976. if (this.isContextual("type") && this.lookahead().type === types$12.star) {
  42977. node.exportKind = "type";
  42978. this.next();
  42979. this.next();
  42980. return true;
  42981. }
  42982. return false;
  42983. }
  42984. maybeParseExportNamespaceSpecifier(node) {
  42985. const pos = this.state.start;
  42986. const hasNamespace = super.maybeParseExportNamespaceSpecifier(node);
  42987. if (hasNamespace && node.exportKind === "type") {
  42988. this.unexpected(pos);
  42989. }
  42990. return hasNamespace;
  42991. }
  42992. parseClassId(node, isStatement, optionalId) {
  42993. super.parseClassId(node, isStatement, optionalId);
  42994. if (this.isRelational("<")) {
  42995. node.typeParameters = this.flowParseTypeParameterDeclaration();
  42996. }
  42997. }
  42998. parseClassMember(classBody, member, state) {
  42999. const pos = this.state.start;
  43000. if (this.isContextual("declare")) {
  43001. if (this.parseClassMemberFromModifier(classBody, member)) {
  43002. return;
  43003. }
  43004. member.declare = true;
  43005. }
  43006. super.parseClassMember(classBody, member, state);
  43007. if (member.declare) {
  43008. if (member.type !== "ClassProperty" && member.type !== "ClassPrivateProperty" && member.type !== "PropertyDefinition") {
  43009. this.raise(pos, FlowErrors.DeclareClassElement);
  43010. } else if (member.value) {
  43011. this.raise(member.value.start, FlowErrors.DeclareClassFieldInitializer);
  43012. }
  43013. }
  43014. }
  43015. isIterator(word) {
  43016. return word === "iterator" || word === "asyncIterator";
  43017. }
  43018. readIterator() {
  43019. const word = super.readWord1();
  43020. const fullWord = "@@" + word;
  43021. if (!this.isIterator(word) || !this.state.inType) {
  43022. this.raise(this.state.pos, ErrorMessages.InvalidIdentifier, fullWord);
  43023. }
  43024. this.finishToken(types$12.name, fullWord);
  43025. }
  43026. getTokenFromCode(code2) {
  43027. const next = this.input.charCodeAt(this.state.pos + 1);
  43028. if (code2 === 123 && next === 124) {
  43029. return this.finishOp(types$12.braceBarL, 2);
  43030. } else if (this.state.inType && (code2 === 62 || code2 === 60)) {
  43031. return this.finishOp(types$12.relational, 1);
  43032. } else if (this.state.inType && code2 === 63) {
  43033. if (next === 46) {
  43034. return this.finishOp(types$12.questionDot, 2);
  43035. }
  43036. return this.finishOp(types$12.question, 1);
  43037. } else if (isIteratorStart(code2, next)) {
  43038. this.state.pos += 2;
  43039. return this.readIterator();
  43040. } else {
  43041. return super.getTokenFromCode(code2);
  43042. }
  43043. }
  43044. isAssignable(node, isBinding) {
  43045. switch (node.type) {
  43046. case "Identifier":
  43047. case "ObjectPattern":
  43048. case "ArrayPattern":
  43049. case "AssignmentPattern":
  43050. return true;
  43051. case "ObjectExpression": {
  43052. const last2 = node.properties.length - 1;
  43053. return node.properties.every((prop, i) => {
  43054. return prop.type !== "ObjectMethod" && (i === last2 || prop.type === "SpreadElement") && this.isAssignable(prop);
  43055. });
  43056. }
  43057. case "ObjectProperty":
  43058. return this.isAssignable(node.value);
  43059. case "SpreadElement":
  43060. return this.isAssignable(node.argument);
  43061. case "ArrayExpression":
  43062. return node.elements.every((element2) => this.isAssignable(element2));
  43063. case "AssignmentExpression":
  43064. return node.operator === "=";
  43065. case "ParenthesizedExpression":
  43066. case "TypeCastExpression":
  43067. return this.isAssignable(node.expression);
  43068. case "MemberExpression":
  43069. case "OptionalMemberExpression":
  43070. return !isBinding;
  43071. default:
  43072. return false;
  43073. }
  43074. }
  43075. toAssignable(node, isLHS = false) {
  43076. if (node.type === "TypeCastExpression") {
  43077. return super.toAssignable(this.typeCastToParameter(node), isLHS);
  43078. } else {
  43079. return super.toAssignable(node, isLHS);
  43080. }
  43081. }
  43082. toAssignableList(exprList, trailingCommaPos, isLHS) {
  43083. for (let i = 0; i < exprList.length; i++) {
  43084. const expr = exprList[i];
  43085. if ((expr == null ? void 0 : expr.type) === "TypeCastExpression") {
  43086. exprList[i] = this.typeCastToParameter(expr);
  43087. }
  43088. }
  43089. return super.toAssignableList(exprList, trailingCommaPos, isLHS);
  43090. }
  43091. toReferencedList(exprList, isParenthesizedExpr) {
  43092. for (let i = 0; i < exprList.length; i++) {
  43093. var _expr$extra;
  43094. const expr = exprList[i];
  43095. if (expr && expr.type === "TypeCastExpression" && !((_expr$extra = expr.extra) != null && _expr$extra.parenthesized) && (exprList.length > 1 || !isParenthesizedExpr)) {
  43096. this.raise(expr.typeAnnotation.start, FlowErrors.TypeCastInPattern);
  43097. }
  43098. }
  43099. return exprList;
  43100. }
  43101. parseArrayLike(close, canBePattern, isTuple, refExpressionErrors) {
  43102. const node = super.parseArrayLike(close, canBePattern, isTuple, refExpressionErrors);
  43103. if (canBePattern && !this.state.maybeInArrowParameters) {
  43104. this.toReferencedList(node.elements);
  43105. }
  43106. return node;
  43107. }
  43108. checkLVal(expr, ...args) {
  43109. if (expr.type !== "TypeCastExpression") {
  43110. return super.checkLVal(expr, ...args);
  43111. }
  43112. }
  43113. parseClassProperty(node) {
  43114. if (this.match(types$12.colon)) {
  43115. node.typeAnnotation = this.flowParseTypeAnnotation();
  43116. }
  43117. return super.parseClassProperty(node);
  43118. }
  43119. parseClassPrivateProperty(node) {
  43120. if (this.match(types$12.colon)) {
  43121. node.typeAnnotation = this.flowParseTypeAnnotation();
  43122. }
  43123. return super.parseClassPrivateProperty(node);
  43124. }
  43125. isClassMethod() {
  43126. return this.isRelational("<") || super.isClassMethod();
  43127. }
  43128. isClassProperty() {
  43129. return this.match(types$12.colon) || super.isClassProperty();
  43130. }
  43131. isNonstaticConstructor(method) {
  43132. return !this.match(types$12.colon) && super.isNonstaticConstructor(method);
  43133. }
  43134. pushClassMethod(classBody, method, isGenerator, isAsync, isConstructor, allowsDirectSuper) {
  43135. if (method.variance) {
  43136. this.unexpected(method.variance.start);
  43137. }
  43138. delete method.variance;
  43139. if (this.isRelational("<")) {
  43140. method.typeParameters = this.flowParseTypeParameterDeclaration();
  43141. }
  43142. super.pushClassMethod(classBody, method, isGenerator, isAsync, isConstructor, allowsDirectSuper);
  43143. if (method.params && isConstructor) {
  43144. const params = method.params;
  43145. if (params.length > 0 && this.isThisParam(params[0])) {
  43146. this.raise(method.start, FlowErrors.ThisParamBannedInConstructor);
  43147. }
  43148. } else if (method.type === "MethodDefinition" && isConstructor && method.value.params) {
  43149. const params = method.value.params;
  43150. if (params.length > 0 && this.isThisParam(params[0])) {
  43151. this.raise(method.start, FlowErrors.ThisParamBannedInConstructor);
  43152. }
  43153. }
  43154. }
  43155. pushClassPrivateMethod(classBody, method, isGenerator, isAsync) {
  43156. if (method.variance) {
  43157. this.unexpected(method.variance.start);
  43158. }
  43159. delete method.variance;
  43160. if (this.isRelational("<")) {
  43161. method.typeParameters = this.flowParseTypeParameterDeclaration();
  43162. }
  43163. super.pushClassPrivateMethod(classBody, method, isGenerator, isAsync);
  43164. }
  43165. parseClassSuper(node) {
  43166. super.parseClassSuper(node);
  43167. if (node.superClass && this.isRelational("<")) {
  43168. node.superTypeParameters = this.flowParseTypeParameterInstantiation();
  43169. }
  43170. if (this.isContextual("implements")) {
  43171. this.next();
  43172. const implemented = node.implements = [];
  43173. do {
  43174. const node2 = this.startNode();
  43175. node2.id = this.flowParseRestrictedIdentifier(true);
  43176. if (this.isRelational("<")) {
  43177. node2.typeParameters = this.flowParseTypeParameterInstantiation();
  43178. } else {
  43179. node2.typeParameters = null;
  43180. }
  43181. implemented.push(this.finishNode(node2, "ClassImplements"));
  43182. } while (this.eat(types$12.comma));
  43183. }
  43184. }
  43185. checkGetterSetterParams(method) {
  43186. super.checkGetterSetterParams(method);
  43187. const params = this.getObjectOrClassMethodParams(method);
  43188. if (params.length > 0) {
  43189. const param = params[0];
  43190. if (this.isThisParam(param) && method.kind === "get") {
  43191. this.raise(param.start, FlowErrors.GetterMayNotHaveThisParam);
  43192. } else if (this.isThisParam(param)) {
  43193. this.raise(param.start, FlowErrors.SetterMayNotHaveThisParam);
  43194. }
  43195. }
  43196. }
  43197. parsePropertyName(node, isPrivateNameAllowed) {
  43198. const variance = this.flowParseVariance();
  43199. const key = super.parsePropertyName(node, isPrivateNameAllowed);
  43200. node.variance = variance;
  43201. return key;
  43202. }
  43203. parseObjPropValue(prop, startPos, startLoc, isGenerator, isAsync, isPattern, isAccessor, refExpressionErrors) {
  43204. if (prop.variance) {
  43205. this.unexpected(prop.variance.start);
  43206. }
  43207. delete prop.variance;
  43208. let typeParameters;
  43209. if (this.isRelational("<") && !isAccessor) {
  43210. typeParameters = this.flowParseTypeParameterDeclaration();
  43211. if (!this.match(types$12.parenL))
  43212. this.unexpected();
  43213. }
  43214. super.parseObjPropValue(prop, startPos, startLoc, isGenerator, isAsync, isPattern, isAccessor, refExpressionErrors);
  43215. if (typeParameters) {
  43216. (prop.value || prop).typeParameters = typeParameters;
  43217. }
  43218. }
  43219. parseAssignableListItemTypes(param) {
  43220. if (this.eat(types$12.question)) {
  43221. if (param.type !== "Identifier") {
  43222. this.raise(param.start, FlowErrors.OptionalBindingPattern);
  43223. }
  43224. if (this.isThisParam(param)) {
  43225. this.raise(param.start, FlowErrors.ThisParamMayNotBeOptional);
  43226. }
  43227. param.optional = true;
  43228. }
  43229. if (this.match(types$12.colon)) {
  43230. param.typeAnnotation = this.flowParseTypeAnnotation();
  43231. } else if (this.isThisParam(param)) {
  43232. this.raise(param.start, FlowErrors.ThisParamAnnotationRequired);
  43233. }
  43234. if (this.match(types$12.eq) && this.isThisParam(param)) {
  43235. this.raise(param.start, FlowErrors.ThisParamNoDefault);
  43236. }
  43237. this.resetEndLocation(param);
  43238. return param;
  43239. }
  43240. parseMaybeDefault(startPos, startLoc, left) {
  43241. const node = super.parseMaybeDefault(startPos, startLoc, left);
  43242. if (node.type === "AssignmentPattern" && node.typeAnnotation && node.right.start < node.typeAnnotation.start) {
  43243. this.raise(node.typeAnnotation.start, FlowErrors.TypeBeforeInitializer);
  43244. }
  43245. return node;
  43246. }
  43247. shouldParseDefaultImport(node) {
  43248. if (!hasTypeImportKind(node)) {
  43249. return super.shouldParseDefaultImport(node);
  43250. }
  43251. return isMaybeDefaultImport(this.state);
  43252. }
  43253. parseImportSpecifierLocal(node, specifier, type, contextDescription) {
  43254. specifier.local = hasTypeImportKind(node) ? this.flowParseRestrictedIdentifier(true, true) : this.parseIdentifier();
  43255. this.checkLVal(specifier.local, contextDescription, BIND_LEXICAL2);
  43256. node.specifiers.push(this.finishNode(specifier, type));
  43257. }
  43258. maybeParseDefaultImportSpecifier(node) {
  43259. node.importKind = "value";
  43260. let kind = null;
  43261. if (this.match(types$12._typeof)) {
  43262. kind = "typeof";
  43263. } else if (this.isContextual("type")) {
  43264. kind = "type";
  43265. }
  43266. if (kind) {
  43267. const lh = this.lookahead();
  43268. if (kind === "type" && lh.type === types$12.star) {
  43269. this.unexpected(lh.start);
  43270. }
  43271. if (isMaybeDefaultImport(lh) || lh.type === types$12.braceL || lh.type === types$12.star) {
  43272. this.next();
  43273. node.importKind = kind;
  43274. }
  43275. }
  43276. return super.maybeParseDefaultImportSpecifier(node);
  43277. }
  43278. parseImportSpecifier(node) {
  43279. const specifier = this.startNode();
  43280. const firstIdentIsString = this.match(types$12.string);
  43281. const firstIdent = this.parseModuleExportName();
  43282. let specifierTypeKind = null;
  43283. if (firstIdent.type === "Identifier") {
  43284. if (firstIdent.name === "type") {
  43285. specifierTypeKind = "type";
  43286. } else if (firstIdent.name === "typeof") {
  43287. specifierTypeKind = "typeof";
  43288. }
  43289. }
  43290. let isBinding = false;
  43291. if (this.isContextual("as") && !this.isLookaheadContextual("as")) {
  43292. const as_ident = this.parseIdentifier(true);
  43293. if (specifierTypeKind !== null && !this.match(types$12.name) && !this.state.type.keyword) {
  43294. specifier.imported = as_ident;
  43295. specifier.importKind = specifierTypeKind;
  43296. specifier.local = as_ident.__clone();
  43297. } else {
  43298. specifier.imported = firstIdent;
  43299. specifier.importKind = null;
  43300. specifier.local = this.parseIdentifier();
  43301. }
  43302. } else if (specifierTypeKind !== null && (this.match(types$12.name) || this.state.type.keyword)) {
  43303. specifier.imported = this.parseIdentifier(true);
  43304. specifier.importKind = specifierTypeKind;
  43305. if (this.eatContextual("as")) {
  43306. specifier.local = this.parseIdentifier();
  43307. } else {
  43308. isBinding = true;
  43309. specifier.local = specifier.imported.__clone();
  43310. }
  43311. } else {
  43312. if (firstIdentIsString) {
  43313. throw this.raise(specifier.start, ErrorMessages.ImportBindingIsString, firstIdent.value);
  43314. }
  43315. isBinding = true;
  43316. specifier.imported = firstIdent;
  43317. specifier.importKind = null;
  43318. specifier.local = specifier.imported.__clone();
  43319. }
  43320. const nodeIsTypeImport = hasTypeImportKind(node);
  43321. const specifierIsTypeImport = hasTypeImportKind(specifier);
  43322. if (nodeIsTypeImport && specifierIsTypeImport) {
  43323. this.raise(specifier.start, FlowErrors.ImportTypeShorthandOnlyInPureImport);
  43324. }
  43325. if (nodeIsTypeImport || specifierIsTypeImport) {
  43326. this.checkReservedType(specifier.local.name, specifier.local.start, true);
  43327. }
  43328. if (isBinding && !nodeIsTypeImport && !specifierIsTypeImport) {
  43329. this.checkReservedWord(specifier.local.name, specifier.start, true, true);
  43330. }
  43331. this.checkLVal(specifier.local, "import specifier", BIND_LEXICAL2);
  43332. node.specifiers.push(this.finishNode(specifier, "ImportSpecifier"));
  43333. }
  43334. parseBindingAtom() {
  43335. switch (this.state.type) {
  43336. case types$12._this:
  43337. return this.parseIdentifier(true);
  43338. default:
  43339. return super.parseBindingAtom();
  43340. }
  43341. }
  43342. parseFunctionParams(node, allowModifiers) {
  43343. const kind = node.kind;
  43344. if (kind !== "get" && kind !== "set" && this.isRelational("<")) {
  43345. node.typeParameters = this.flowParseTypeParameterDeclaration();
  43346. }
  43347. super.parseFunctionParams(node, allowModifiers);
  43348. }
  43349. parseVarId(decl, kind) {
  43350. super.parseVarId(decl, kind);
  43351. if (this.match(types$12.colon)) {
  43352. decl.id.typeAnnotation = this.flowParseTypeAnnotation();
  43353. this.resetEndLocation(decl.id);
  43354. }
  43355. }
  43356. parseAsyncArrowFromCallExpression(node, call) {
  43357. if (this.match(types$12.colon)) {
  43358. const oldNoAnonFunctionType = this.state.noAnonFunctionType;
  43359. this.state.noAnonFunctionType = true;
  43360. node.returnType = this.flowParseTypeAnnotation();
  43361. this.state.noAnonFunctionType = oldNoAnonFunctionType;
  43362. }
  43363. return super.parseAsyncArrowFromCallExpression(node, call);
  43364. }
  43365. shouldParseAsyncArrow() {
  43366. return this.match(types$12.colon) || super.shouldParseAsyncArrow();
  43367. }
  43368. parseMaybeAssign(refExpressionErrors, afterLeftParse, refNeedsArrowPos) {
  43369. var _jsx;
  43370. let state = null;
  43371. let jsx2;
  43372. if (this.hasPlugin("jsx") && (this.match(types$12.jsxTagStart) || this.isRelational("<"))) {
  43373. state = this.state.clone();
  43374. jsx2 = this.tryParse(() => super.parseMaybeAssign(refExpressionErrors, afterLeftParse, refNeedsArrowPos), state);
  43375. if (!jsx2.error)
  43376. return jsx2.node;
  43377. const {
  43378. context
  43379. } = this.state;
  43380. if (context[context.length - 1] === types2.j_oTag) {
  43381. context.length -= 2;
  43382. } else if (context[context.length - 1] === types2.j_expr) {
  43383. context.length -= 1;
  43384. }
  43385. }
  43386. if ((_jsx = jsx2) != null && _jsx.error || this.isRelational("<")) {
  43387. var _jsx2, _jsx3;
  43388. state = state || this.state.clone();
  43389. let typeParameters;
  43390. const arrow = this.tryParse((abort) => {
  43391. var _arrowExpression$extr;
  43392. typeParameters = this.flowParseTypeParameterDeclaration();
  43393. const arrowExpression2 = this.forwardNoArrowParamsConversionAt(typeParameters, () => {
  43394. const result = super.parseMaybeAssign(refExpressionErrors, afterLeftParse, refNeedsArrowPos);
  43395. this.resetStartLocationFromNode(result, typeParameters);
  43396. return result;
  43397. });
  43398. if (arrowExpression2.type !== "ArrowFunctionExpression" && (_arrowExpression$extr = arrowExpression2.extra) != null && _arrowExpression$extr.parenthesized) {
  43399. abort();
  43400. }
  43401. const expr = this.maybeUnwrapTypeCastExpression(arrowExpression2);
  43402. expr.typeParameters = typeParameters;
  43403. this.resetStartLocationFromNode(expr, typeParameters);
  43404. return arrowExpression2;
  43405. }, state);
  43406. let arrowExpression = null;
  43407. if (arrow.node && this.maybeUnwrapTypeCastExpression(arrow.node).type === "ArrowFunctionExpression") {
  43408. if (!arrow.error && !arrow.aborted) {
  43409. if (arrow.node.async) {
  43410. this.raise(typeParameters.start, FlowErrors.UnexpectedTypeParameterBeforeAsyncArrowFunction);
  43411. }
  43412. return arrow.node;
  43413. }
  43414. arrowExpression = arrow.node;
  43415. }
  43416. if ((_jsx2 = jsx2) != null && _jsx2.node) {
  43417. this.state = jsx2.failState;
  43418. return jsx2.node;
  43419. }
  43420. if (arrowExpression) {
  43421. this.state = arrow.failState;
  43422. return arrowExpression;
  43423. }
  43424. if ((_jsx3 = jsx2) != null && _jsx3.thrown)
  43425. throw jsx2.error;
  43426. if (arrow.thrown)
  43427. throw arrow.error;
  43428. throw this.raise(typeParameters.start, FlowErrors.UnexpectedTokenAfterTypeParameter);
  43429. }
  43430. return super.parseMaybeAssign(refExpressionErrors, afterLeftParse, refNeedsArrowPos);
  43431. }
  43432. parseArrow(node) {
  43433. if (this.match(types$12.colon)) {
  43434. const result = this.tryParse(() => {
  43435. const oldNoAnonFunctionType = this.state.noAnonFunctionType;
  43436. this.state.noAnonFunctionType = true;
  43437. const typeNode = this.startNode();
  43438. [typeNode.typeAnnotation, node.predicate] = this.flowParseTypeAndPredicateInitialiser();
  43439. this.state.noAnonFunctionType = oldNoAnonFunctionType;
  43440. if (this.canInsertSemicolon())
  43441. this.unexpected();
  43442. if (!this.match(types$12.arrow))
  43443. this.unexpected();
  43444. return typeNode;
  43445. });
  43446. if (result.thrown)
  43447. return null;
  43448. if (result.error)
  43449. this.state = result.failState;
  43450. node.returnType = result.node.typeAnnotation ? this.finishNode(result.node, "TypeAnnotation") : null;
  43451. }
  43452. return super.parseArrow(node);
  43453. }
  43454. shouldParseArrow() {
  43455. return this.match(types$12.colon) || super.shouldParseArrow();
  43456. }
  43457. setArrowFunctionParameters(node, params) {
  43458. if (this.state.noArrowParamsConversionAt.indexOf(node.start) !== -1) {
  43459. node.params = params;
  43460. } else {
  43461. super.setArrowFunctionParameters(node, params);
  43462. }
  43463. }
  43464. checkParams(node, allowDuplicates, isArrowFunction) {
  43465. if (isArrowFunction && this.state.noArrowParamsConversionAt.indexOf(node.start) !== -1) {
  43466. return;
  43467. }
  43468. for (let i = 0; i < node.params.length; i++) {
  43469. if (this.isThisParam(node.params[i]) && i > 0) {
  43470. this.raise(node.params[i].start, FlowErrors.ThisParamMustBeFirst);
  43471. }
  43472. }
  43473. return super.checkParams(...arguments);
  43474. }
  43475. parseParenAndDistinguishExpression(canBeArrow) {
  43476. return super.parseParenAndDistinguishExpression(canBeArrow && this.state.noArrowAt.indexOf(this.state.start) === -1);
  43477. }
  43478. parseSubscripts(base2, startPos, startLoc, noCalls) {
  43479. if (base2.type === "Identifier" && base2.name === "async" && this.state.noArrowAt.indexOf(startPos) !== -1) {
  43480. this.next();
  43481. const node = this.startNodeAt(startPos, startLoc);
  43482. node.callee = base2;
  43483. node.arguments = this.parseCallExpressionArguments(types$12.parenR, false);
  43484. base2 = this.finishNode(node, "CallExpression");
  43485. } else if (base2.type === "Identifier" && base2.name === "async" && this.isRelational("<")) {
  43486. const state = this.state.clone();
  43487. const arrow = this.tryParse((abort) => this.parseAsyncArrowWithTypeParameters(startPos, startLoc) || abort(), state);
  43488. if (!arrow.error && !arrow.aborted)
  43489. return arrow.node;
  43490. const result = this.tryParse(() => super.parseSubscripts(base2, startPos, startLoc, noCalls), state);
  43491. if (result.node && !result.error)
  43492. return result.node;
  43493. if (arrow.node) {
  43494. this.state = arrow.failState;
  43495. return arrow.node;
  43496. }
  43497. if (result.node) {
  43498. this.state = result.failState;
  43499. return result.node;
  43500. }
  43501. throw arrow.error || result.error;
  43502. }
  43503. return super.parseSubscripts(base2, startPos, startLoc, noCalls);
  43504. }
  43505. parseSubscript(base2, startPos, startLoc, noCalls, subscriptState) {
  43506. if (this.match(types$12.questionDot) && this.isLookaheadToken_lt()) {
  43507. subscriptState.optionalChainMember = true;
  43508. if (noCalls) {
  43509. subscriptState.stop = true;
  43510. return base2;
  43511. }
  43512. this.next();
  43513. const node = this.startNodeAt(startPos, startLoc);
  43514. node.callee = base2;
  43515. node.typeArguments = this.flowParseTypeParameterInstantiation();
  43516. this.expect(types$12.parenL);
  43517. node.arguments = this.parseCallExpressionArguments(types$12.parenR, false);
  43518. node.optional = true;
  43519. return this.finishCallExpression(node, true);
  43520. } else if (!noCalls && this.shouldParseTypes() && this.isRelational("<")) {
  43521. const node = this.startNodeAt(startPos, startLoc);
  43522. node.callee = base2;
  43523. const result = this.tryParse(() => {
  43524. node.typeArguments = this.flowParseTypeParameterInstantiationCallOrNew();
  43525. this.expect(types$12.parenL);
  43526. node.arguments = this.parseCallExpressionArguments(types$12.parenR, false);
  43527. if (subscriptState.optionalChainMember)
  43528. node.optional = false;
  43529. return this.finishCallExpression(node, subscriptState.optionalChainMember);
  43530. });
  43531. if (result.node) {
  43532. if (result.error)
  43533. this.state = result.failState;
  43534. return result.node;
  43535. }
  43536. }
  43537. return super.parseSubscript(base2, startPos, startLoc, noCalls, subscriptState);
  43538. }
  43539. parseNewArguments(node) {
  43540. let targs = null;
  43541. if (this.shouldParseTypes() && this.isRelational("<")) {
  43542. targs = this.tryParse(() => this.flowParseTypeParameterInstantiationCallOrNew()).node;
  43543. }
  43544. node.typeArguments = targs;
  43545. super.parseNewArguments(node);
  43546. }
  43547. parseAsyncArrowWithTypeParameters(startPos, startLoc) {
  43548. const node = this.startNodeAt(startPos, startLoc);
  43549. this.parseFunctionParams(node);
  43550. if (!this.parseArrow(node))
  43551. return;
  43552. return this.parseArrowExpression(node, void 0, true);
  43553. }
  43554. readToken_mult_modulo(code2) {
  43555. const next = this.input.charCodeAt(this.state.pos + 1);
  43556. if (code2 === 42 && next === 47 && this.state.hasFlowComment) {
  43557. this.state.hasFlowComment = false;
  43558. this.state.pos += 2;
  43559. this.nextToken();
  43560. return;
  43561. }
  43562. super.readToken_mult_modulo(code2);
  43563. }
  43564. readToken_pipe_amp(code2) {
  43565. const next = this.input.charCodeAt(this.state.pos + 1);
  43566. if (code2 === 124 && next === 125) {
  43567. this.finishOp(types$12.braceBarR, 2);
  43568. return;
  43569. }
  43570. super.readToken_pipe_amp(code2);
  43571. }
  43572. parseTopLevel(file, program) {
  43573. const fileNode = super.parseTopLevel(file, program);
  43574. if (this.state.hasFlowComment) {
  43575. this.raise(this.state.pos, FlowErrors.UnterminatedFlowComment);
  43576. }
  43577. return fileNode;
  43578. }
  43579. skipBlockComment() {
  43580. if (this.hasPlugin("flowComments") && this.skipFlowComment()) {
  43581. if (this.state.hasFlowComment) {
  43582. this.unexpected(null, FlowErrors.NestedFlowComment);
  43583. }
  43584. this.hasFlowCommentCompletion();
  43585. this.state.pos += this.skipFlowComment();
  43586. this.state.hasFlowComment = true;
  43587. return;
  43588. }
  43589. if (this.state.hasFlowComment) {
  43590. const end = this.input.indexOf("*-/", this.state.pos += 2);
  43591. if (end === -1) {
  43592. throw this.raise(this.state.pos - 2, ErrorMessages.UnterminatedComment);
  43593. }
  43594. this.state.pos = end + 3;
  43595. return;
  43596. }
  43597. super.skipBlockComment();
  43598. }
  43599. skipFlowComment() {
  43600. const {
  43601. pos
  43602. } = this.state;
  43603. let shiftToFirstNonWhiteSpace = 2;
  43604. while ([32, 9].includes(this.input.charCodeAt(pos + shiftToFirstNonWhiteSpace))) {
  43605. shiftToFirstNonWhiteSpace++;
  43606. }
  43607. const ch2 = this.input.charCodeAt(shiftToFirstNonWhiteSpace + pos);
  43608. const ch3 = this.input.charCodeAt(shiftToFirstNonWhiteSpace + pos + 1);
  43609. if (ch2 === 58 && ch3 === 58) {
  43610. return shiftToFirstNonWhiteSpace + 2;
  43611. }
  43612. if (this.input.slice(shiftToFirstNonWhiteSpace + pos, shiftToFirstNonWhiteSpace + pos + 12) === "flow-include") {
  43613. return shiftToFirstNonWhiteSpace + 12;
  43614. }
  43615. if (ch2 === 58 && ch3 !== 58) {
  43616. return shiftToFirstNonWhiteSpace;
  43617. }
  43618. return false;
  43619. }
  43620. hasFlowCommentCompletion() {
  43621. const end = this.input.indexOf("*/", this.state.pos);
  43622. if (end === -1) {
  43623. throw this.raise(this.state.pos, ErrorMessages.UnterminatedComment);
  43624. }
  43625. }
  43626. flowEnumErrorBooleanMemberNotInitialized(pos, {
  43627. enumName,
  43628. memberName
  43629. }) {
  43630. this.raise(pos, FlowErrors.EnumBooleanMemberNotInitialized, memberName, enumName);
  43631. }
  43632. flowEnumErrorInvalidMemberName(pos, {
  43633. enumName,
  43634. memberName
  43635. }) {
  43636. const suggestion = memberName[0].toUpperCase() + memberName.slice(1);
  43637. this.raise(pos, FlowErrors.EnumInvalidMemberName, memberName, suggestion, enumName);
  43638. }
  43639. flowEnumErrorDuplicateMemberName(pos, {
  43640. enumName,
  43641. memberName
  43642. }) {
  43643. this.raise(pos, FlowErrors.EnumDuplicateMemberName, memberName, enumName);
  43644. }
  43645. flowEnumErrorInconsistentMemberValues(pos, {
  43646. enumName
  43647. }) {
  43648. this.raise(pos, FlowErrors.EnumInconsistentMemberValues, enumName);
  43649. }
  43650. flowEnumErrorInvalidExplicitType(pos, {
  43651. enumName,
  43652. suppliedType
  43653. }) {
  43654. return this.raise(pos, suppliedType === null ? FlowErrors.EnumInvalidExplicitTypeUnknownSupplied : FlowErrors.EnumInvalidExplicitType, enumName, suppliedType);
  43655. }
  43656. flowEnumErrorInvalidMemberInitializer(pos, {
  43657. enumName,
  43658. explicitType,
  43659. memberName
  43660. }) {
  43661. let message = null;
  43662. switch (explicitType) {
  43663. case "boolean":
  43664. case "number":
  43665. case "string":
  43666. message = FlowErrors.EnumInvalidMemberInitializerPrimaryType;
  43667. break;
  43668. case "symbol":
  43669. message = FlowErrors.EnumInvalidMemberInitializerSymbolType;
  43670. break;
  43671. default:
  43672. message = FlowErrors.EnumInvalidMemberInitializerUnknownType;
  43673. }
  43674. return this.raise(pos, message, enumName, memberName, explicitType);
  43675. }
  43676. flowEnumErrorNumberMemberNotInitialized(pos, {
  43677. enumName,
  43678. memberName
  43679. }) {
  43680. this.raise(pos, FlowErrors.EnumNumberMemberNotInitialized, enumName, memberName);
  43681. }
  43682. flowEnumErrorStringMemberInconsistentlyInitailized(pos, {
  43683. enumName
  43684. }) {
  43685. this.raise(pos, FlowErrors.EnumStringMemberInconsistentlyInitailized, enumName);
  43686. }
  43687. flowEnumMemberInit() {
  43688. const startPos = this.state.start;
  43689. const endOfInit = () => this.match(types$12.comma) || this.match(types$12.braceR);
  43690. switch (this.state.type) {
  43691. case types$12.num: {
  43692. const literal2 = this.parseNumericLiteral(this.state.value);
  43693. if (endOfInit()) {
  43694. return {
  43695. type: "number",
  43696. pos: literal2.start,
  43697. value: literal2
  43698. };
  43699. }
  43700. return {
  43701. type: "invalid",
  43702. pos: startPos
  43703. };
  43704. }
  43705. case types$12.string: {
  43706. const literal2 = this.parseStringLiteral(this.state.value);
  43707. if (endOfInit()) {
  43708. return {
  43709. type: "string",
  43710. pos: literal2.start,
  43711. value: literal2
  43712. };
  43713. }
  43714. return {
  43715. type: "invalid",
  43716. pos: startPos
  43717. };
  43718. }
  43719. case types$12._true:
  43720. case types$12._false: {
  43721. const literal2 = this.parseBooleanLiteral(this.match(types$12._true));
  43722. if (endOfInit()) {
  43723. return {
  43724. type: "boolean",
  43725. pos: literal2.start,
  43726. value: literal2
  43727. };
  43728. }
  43729. return {
  43730. type: "invalid",
  43731. pos: startPos
  43732. };
  43733. }
  43734. default:
  43735. return {
  43736. type: "invalid",
  43737. pos: startPos
  43738. };
  43739. }
  43740. }
  43741. flowEnumMemberRaw() {
  43742. const pos = this.state.start;
  43743. const id = this.parseIdentifier(true);
  43744. const init = this.eat(types$12.eq) ? this.flowEnumMemberInit() : {
  43745. type: "none",
  43746. pos
  43747. };
  43748. return {
  43749. id,
  43750. init
  43751. };
  43752. }
  43753. flowEnumCheckExplicitTypeMismatch(pos, context, expectedType) {
  43754. const {
  43755. explicitType
  43756. } = context;
  43757. if (explicitType === null) {
  43758. return;
  43759. }
  43760. if (explicitType !== expectedType) {
  43761. this.flowEnumErrorInvalidMemberInitializer(pos, context);
  43762. }
  43763. }
  43764. flowEnumMembers({
  43765. enumName,
  43766. explicitType
  43767. }) {
  43768. const seenNames = /* @__PURE__ */ new Set();
  43769. const members = {
  43770. booleanMembers: [],
  43771. numberMembers: [],
  43772. stringMembers: [],
  43773. defaultedMembers: []
  43774. };
  43775. let hasUnknownMembers = false;
  43776. while (!this.match(types$12.braceR)) {
  43777. if (this.eat(types$12.ellipsis)) {
  43778. hasUnknownMembers = true;
  43779. break;
  43780. }
  43781. const memberNode = this.startNode();
  43782. const {
  43783. id,
  43784. init
  43785. } = this.flowEnumMemberRaw();
  43786. const memberName = id.name;
  43787. if (memberName === "") {
  43788. continue;
  43789. }
  43790. if (/^[a-z]/.test(memberName)) {
  43791. this.flowEnumErrorInvalidMemberName(id.start, {
  43792. enumName,
  43793. memberName
  43794. });
  43795. }
  43796. if (seenNames.has(memberName)) {
  43797. this.flowEnumErrorDuplicateMemberName(id.start, {
  43798. enumName,
  43799. memberName
  43800. });
  43801. }
  43802. seenNames.add(memberName);
  43803. const context = {
  43804. enumName,
  43805. explicitType,
  43806. memberName
  43807. };
  43808. memberNode.id = id;
  43809. switch (init.type) {
  43810. case "boolean": {
  43811. this.flowEnumCheckExplicitTypeMismatch(init.pos, context, "boolean");
  43812. memberNode.init = init.value;
  43813. members.booleanMembers.push(this.finishNode(memberNode, "EnumBooleanMember"));
  43814. break;
  43815. }
  43816. case "number": {
  43817. this.flowEnumCheckExplicitTypeMismatch(init.pos, context, "number");
  43818. memberNode.init = init.value;
  43819. members.numberMembers.push(this.finishNode(memberNode, "EnumNumberMember"));
  43820. break;
  43821. }
  43822. case "string": {
  43823. this.flowEnumCheckExplicitTypeMismatch(init.pos, context, "string");
  43824. memberNode.init = init.value;
  43825. members.stringMembers.push(this.finishNode(memberNode, "EnumStringMember"));
  43826. break;
  43827. }
  43828. case "invalid": {
  43829. throw this.flowEnumErrorInvalidMemberInitializer(init.pos, context);
  43830. }
  43831. case "none": {
  43832. switch (explicitType) {
  43833. case "boolean":
  43834. this.flowEnumErrorBooleanMemberNotInitialized(init.pos, context);
  43835. break;
  43836. case "number":
  43837. this.flowEnumErrorNumberMemberNotInitialized(init.pos, context);
  43838. break;
  43839. default:
  43840. members.defaultedMembers.push(this.finishNode(memberNode, "EnumDefaultedMember"));
  43841. }
  43842. }
  43843. }
  43844. if (!this.match(types$12.braceR)) {
  43845. this.expect(types$12.comma);
  43846. }
  43847. }
  43848. return {
  43849. members,
  43850. hasUnknownMembers
  43851. };
  43852. }
  43853. flowEnumStringMembers(initializedMembers, defaultedMembers, {
  43854. enumName
  43855. }) {
  43856. if (initializedMembers.length === 0) {
  43857. return defaultedMembers;
  43858. } else if (defaultedMembers.length === 0) {
  43859. return initializedMembers;
  43860. } else if (defaultedMembers.length > initializedMembers.length) {
  43861. for (const member of initializedMembers) {
  43862. this.flowEnumErrorStringMemberInconsistentlyInitailized(member.start, {
  43863. enumName
  43864. });
  43865. }
  43866. return defaultedMembers;
  43867. } else {
  43868. for (const member of defaultedMembers) {
  43869. this.flowEnumErrorStringMemberInconsistentlyInitailized(member.start, {
  43870. enumName
  43871. });
  43872. }
  43873. return initializedMembers;
  43874. }
  43875. }
  43876. flowEnumParseExplicitType({
  43877. enumName
  43878. }) {
  43879. if (this.eatContextual("of")) {
  43880. if (!this.match(types$12.name)) {
  43881. throw this.flowEnumErrorInvalidExplicitType(this.state.start, {
  43882. enumName,
  43883. suppliedType: null
  43884. });
  43885. }
  43886. const {
  43887. value
  43888. } = this.state;
  43889. this.next();
  43890. if (value !== "boolean" && value !== "number" && value !== "string" && value !== "symbol") {
  43891. this.flowEnumErrorInvalidExplicitType(this.state.start, {
  43892. enumName,
  43893. suppliedType: value
  43894. });
  43895. }
  43896. return value;
  43897. }
  43898. return null;
  43899. }
  43900. flowEnumBody(node, {
  43901. enumName,
  43902. nameLoc
  43903. }) {
  43904. const explicitType = this.flowEnumParseExplicitType({
  43905. enumName
  43906. });
  43907. this.expect(types$12.braceL);
  43908. const {
  43909. members,
  43910. hasUnknownMembers
  43911. } = this.flowEnumMembers({
  43912. enumName,
  43913. explicitType
  43914. });
  43915. node.hasUnknownMembers = hasUnknownMembers;
  43916. switch (explicitType) {
  43917. case "boolean":
  43918. node.explicitType = true;
  43919. node.members = members.booleanMembers;
  43920. this.expect(types$12.braceR);
  43921. return this.finishNode(node, "EnumBooleanBody");
  43922. case "number":
  43923. node.explicitType = true;
  43924. node.members = members.numberMembers;
  43925. this.expect(types$12.braceR);
  43926. return this.finishNode(node, "EnumNumberBody");
  43927. case "string":
  43928. node.explicitType = true;
  43929. node.members = this.flowEnumStringMembers(members.stringMembers, members.defaultedMembers, {
  43930. enumName
  43931. });
  43932. this.expect(types$12.braceR);
  43933. return this.finishNode(node, "EnumStringBody");
  43934. case "symbol":
  43935. node.members = members.defaultedMembers;
  43936. this.expect(types$12.braceR);
  43937. return this.finishNode(node, "EnumSymbolBody");
  43938. default: {
  43939. const empty3 = () => {
  43940. node.members = [];
  43941. this.expect(types$12.braceR);
  43942. return this.finishNode(node, "EnumStringBody");
  43943. };
  43944. node.explicitType = false;
  43945. const boolsLen = members.booleanMembers.length;
  43946. const numsLen = members.numberMembers.length;
  43947. const strsLen = members.stringMembers.length;
  43948. const defaultedLen = members.defaultedMembers.length;
  43949. if (!boolsLen && !numsLen && !strsLen && !defaultedLen) {
  43950. return empty3();
  43951. } else if (!boolsLen && !numsLen) {
  43952. node.members = this.flowEnumStringMembers(members.stringMembers, members.defaultedMembers, {
  43953. enumName
  43954. });
  43955. this.expect(types$12.braceR);
  43956. return this.finishNode(node, "EnumStringBody");
  43957. } else if (!numsLen && !strsLen && boolsLen >= defaultedLen) {
  43958. for (const member of members.defaultedMembers) {
  43959. this.flowEnumErrorBooleanMemberNotInitialized(member.start, {
  43960. enumName,
  43961. memberName: member.id.name
  43962. });
  43963. }
  43964. node.members = members.booleanMembers;
  43965. this.expect(types$12.braceR);
  43966. return this.finishNode(node, "EnumBooleanBody");
  43967. } else if (!boolsLen && !strsLen && numsLen >= defaultedLen) {
  43968. for (const member of members.defaultedMembers) {
  43969. this.flowEnumErrorNumberMemberNotInitialized(member.start, {
  43970. enumName,
  43971. memberName: member.id.name
  43972. });
  43973. }
  43974. node.members = members.numberMembers;
  43975. this.expect(types$12.braceR);
  43976. return this.finishNode(node, "EnumNumberBody");
  43977. } else {
  43978. this.flowEnumErrorInconsistentMemberValues(nameLoc, {
  43979. enumName
  43980. });
  43981. return empty3();
  43982. }
  43983. }
  43984. }
  43985. }
  43986. flowParseEnumDeclaration(node) {
  43987. const id = this.parseIdentifier();
  43988. node.id = id;
  43989. node.body = this.flowEnumBody(this.startNode(), {
  43990. enumName: id.name,
  43991. nameLoc: id.start
  43992. });
  43993. return this.finishNode(node, "EnumDeclaration");
  43994. }
  43995. updateContext(prevType) {
  43996. if (this.match(types$12.name) && this.state.value === "of" && prevType === types$12.name && this.input.slice(this.state.lastTokStart, this.state.lastTokEnd) === "interface") {
  43997. this.state.exprAllowed = false;
  43998. } else {
  43999. super.updateContext(prevType);
  44000. }
  44001. }
  44002. isLookaheadToken_lt() {
  44003. const next = this.nextTokenStart();
  44004. if (this.input.charCodeAt(next) === 60) {
  44005. const afterNext = this.input.charCodeAt(next + 1);
  44006. return afterNext !== 60 && afterNext !== 61;
  44007. }
  44008. return false;
  44009. }
  44010. maybeUnwrapTypeCastExpression(node) {
  44011. return node.type === "TypeCastExpression" ? node.expression : node;
  44012. }
  44013. };
  44014. var entities = {
  44015. quot: '"',
  44016. amp: "&",
  44017. apos: "'",
  44018. lt: "<",
  44019. gt: ">",
  44020. nbsp: "\xA0",
  44021. iexcl: "\xA1",
  44022. cent: "\xA2",
  44023. pound: "\xA3",
  44024. curren: "\xA4",
  44025. yen: "\xA5",
  44026. brvbar: "\xA6",
  44027. sect: "\xA7",
  44028. uml: "\xA8",
  44029. copy: "\xA9",
  44030. ordf: "\xAA",
  44031. laquo: "\xAB",
  44032. not: "\xAC",
  44033. shy: "\xAD",
  44034. reg: "\xAE",
  44035. macr: "\xAF",
  44036. deg: "\xB0",
  44037. plusmn: "\xB1",
  44038. sup2: "\xB2",
  44039. sup3: "\xB3",
  44040. acute: "\xB4",
  44041. micro: "\xB5",
  44042. para: "\xB6",
  44043. middot: "\xB7",
  44044. cedil: "\xB8",
  44045. sup1: "\xB9",
  44046. ordm: "\xBA",
  44047. raquo: "\xBB",
  44048. frac14: "\xBC",
  44049. frac12: "\xBD",
  44050. frac34: "\xBE",
  44051. iquest: "\xBF",
  44052. Agrave: "\xC0",
  44053. Aacute: "\xC1",
  44054. Acirc: "\xC2",
  44055. Atilde: "\xC3",
  44056. Auml: "\xC4",
  44057. Aring: "\xC5",
  44058. AElig: "\xC6",
  44059. Ccedil: "\xC7",
  44060. Egrave: "\xC8",
  44061. Eacute: "\xC9",
  44062. Ecirc: "\xCA",
  44063. Euml: "\xCB",
  44064. Igrave: "\xCC",
  44065. Iacute: "\xCD",
  44066. Icirc: "\xCE",
  44067. Iuml: "\xCF",
  44068. ETH: "\xD0",
  44069. Ntilde: "\xD1",
  44070. Ograve: "\xD2",
  44071. Oacute: "\xD3",
  44072. Ocirc: "\xD4",
  44073. Otilde: "\xD5",
  44074. Ouml: "\xD6",
  44075. times: "\xD7",
  44076. Oslash: "\xD8",
  44077. Ugrave: "\xD9",
  44078. Uacute: "\xDA",
  44079. Ucirc: "\xDB",
  44080. Uuml: "\xDC",
  44081. Yacute: "\xDD",
  44082. THORN: "\xDE",
  44083. szlig: "\xDF",
  44084. agrave: "\xE0",
  44085. aacute: "\xE1",
  44086. acirc: "\xE2",
  44087. atilde: "\xE3",
  44088. auml: "\xE4",
  44089. aring: "\xE5",
  44090. aelig: "\xE6",
  44091. ccedil: "\xE7",
  44092. egrave: "\xE8",
  44093. eacute: "\xE9",
  44094. ecirc: "\xEA",
  44095. euml: "\xEB",
  44096. igrave: "\xEC",
  44097. iacute: "\xED",
  44098. icirc: "\xEE",
  44099. iuml: "\xEF",
  44100. eth: "\xF0",
  44101. ntilde: "\xF1",
  44102. ograve: "\xF2",
  44103. oacute: "\xF3",
  44104. ocirc: "\xF4",
  44105. otilde: "\xF5",
  44106. ouml: "\xF6",
  44107. divide: "\xF7",
  44108. oslash: "\xF8",
  44109. ugrave: "\xF9",
  44110. uacute: "\xFA",
  44111. ucirc: "\xFB",
  44112. uuml: "\xFC",
  44113. yacute: "\xFD",
  44114. thorn: "\xFE",
  44115. yuml: "\xFF",
  44116. OElig: "\u0152",
  44117. oelig: "\u0153",
  44118. Scaron: "\u0160",
  44119. scaron: "\u0161",
  44120. Yuml: "\u0178",
  44121. fnof: "\u0192",
  44122. circ: "\u02C6",
  44123. tilde: "\u02DC",
  44124. Alpha: "\u0391",
  44125. Beta: "\u0392",
  44126. Gamma: "\u0393",
  44127. Delta: "\u0394",
  44128. Epsilon: "\u0395",
  44129. Zeta: "\u0396",
  44130. Eta: "\u0397",
  44131. Theta: "\u0398",
  44132. Iota: "\u0399",
  44133. Kappa: "\u039A",
  44134. Lambda: "\u039B",
  44135. Mu: "\u039C",
  44136. Nu: "\u039D",
  44137. Xi: "\u039E",
  44138. Omicron: "\u039F",
  44139. Pi: "\u03A0",
  44140. Rho: "\u03A1",
  44141. Sigma: "\u03A3",
  44142. Tau: "\u03A4",
  44143. Upsilon: "\u03A5",
  44144. Phi: "\u03A6",
  44145. Chi: "\u03A7",
  44146. Psi: "\u03A8",
  44147. Omega: "\u03A9",
  44148. alpha: "\u03B1",
  44149. beta: "\u03B2",
  44150. gamma: "\u03B3",
  44151. delta: "\u03B4",
  44152. epsilon: "\u03B5",
  44153. zeta: "\u03B6",
  44154. eta: "\u03B7",
  44155. theta: "\u03B8",
  44156. iota: "\u03B9",
  44157. kappa: "\u03BA",
  44158. lambda: "\u03BB",
  44159. mu: "\u03BC",
  44160. nu: "\u03BD",
  44161. xi: "\u03BE",
  44162. omicron: "\u03BF",
  44163. pi: "\u03C0",
  44164. rho: "\u03C1",
  44165. sigmaf: "\u03C2",
  44166. sigma: "\u03C3",
  44167. tau: "\u03C4",
  44168. upsilon: "\u03C5",
  44169. phi: "\u03C6",
  44170. chi: "\u03C7",
  44171. psi: "\u03C8",
  44172. omega: "\u03C9",
  44173. thetasym: "\u03D1",
  44174. upsih: "\u03D2",
  44175. piv: "\u03D6",
  44176. ensp: "\u2002",
  44177. emsp: "\u2003",
  44178. thinsp: "\u2009",
  44179. zwnj: "\u200C",
  44180. zwj: "\u200D",
  44181. lrm: "\u200E",
  44182. rlm: "\u200F",
  44183. ndash: "\u2013",
  44184. mdash: "\u2014",
  44185. lsquo: "\u2018",
  44186. rsquo: "\u2019",
  44187. sbquo: "\u201A",
  44188. ldquo: "\u201C",
  44189. rdquo: "\u201D",
  44190. bdquo: "\u201E",
  44191. dagger: "\u2020",
  44192. Dagger: "\u2021",
  44193. bull: "\u2022",
  44194. hellip: "\u2026",
  44195. permil: "\u2030",
  44196. prime: "\u2032",
  44197. Prime: "\u2033",
  44198. lsaquo: "\u2039",
  44199. rsaquo: "\u203A",
  44200. oline: "\u203E",
  44201. frasl: "\u2044",
  44202. euro: "\u20AC",
  44203. image: "\u2111",
  44204. weierp: "\u2118",
  44205. real: "\u211C",
  44206. trade: "\u2122",
  44207. alefsym: "\u2135",
  44208. larr: "\u2190",
  44209. uarr: "\u2191",
  44210. rarr: "\u2192",
  44211. darr: "\u2193",
  44212. harr: "\u2194",
  44213. crarr: "\u21B5",
  44214. lArr: "\u21D0",
  44215. uArr: "\u21D1",
  44216. rArr: "\u21D2",
  44217. dArr: "\u21D3",
  44218. hArr: "\u21D4",
  44219. forall: "\u2200",
  44220. part: "\u2202",
  44221. exist: "\u2203",
  44222. empty: "\u2205",
  44223. nabla: "\u2207",
  44224. isin: "\u2208",
  44225. notin: "\u2209",
  44226. ni: "\u220B",
  44227. prod: "\u220F",
  44228. sum: "\u2211",
  44229. minus: "\u2212",
  44230. lowast: "\u2217",
  44231. radic: "\u221A",
  44232. prop: "\u221D",
  44233. infin: "\u221E",
  44234. ang: "\u2220",
  44235. and: "\u2227",
  44236. or: "\u2228",
  44237. cap: "\u2229",
  44238. cup: "\u222A",
  44239. int: "\u222B",
  44240. there4: "\u2234",
  44241. sim: "\u223C",
  44242. cong: "\u2245",
  44243. asymp: "\u2248",
  44244. ne: "\u2260",
  44245. equiv: "\u2261",
  44246. le: "\u2264",
  44247. ge: "\u2265",
  44248. sub: "\u2282",
  44249. sup: "\u2283",
  44250. nsub: "\u2284",
  44251. sube: "\u2286",
  44252. supe: "\u2287",
  44253. oplus: "\u2295",
  44254. otimes: "\u2297",
  44255. perp: "\u22A5",
  44256. sdot: "\u22C5",
  44257. lceil: "\u2308",
  44258. rceil: "\u2309",
  44259. lfloor: "\u230A",
  44260. rfloor: "\u230B",
  44261. lang: "\u2329",
  44262. rang: "\u232A",
  44263. loz: "\u25CA",
  44264. spades: "\u2660",
  44265. clubs: "\u2663",
  44266. hearts: "\u2665",
  44267. diams: "\u2666"
  44268. };
  44269. var State2 = class {
  44270. constructor() {
  44271. this.strict = void 0;
  44272. this.curLine = void 0;
  44273. this.startLoc = void 0;
  44274. this.endLoc = void 0;
  44275. this.errors = [];
  44276. this.potentialArrowAt = -1;
  44277. this.noArrowAt = [];
  44278. this.noArrowParamsConversionAt = [];
  44279. this.maybeInArrowParameters = false;
  44280. this.inPipeline = false;
  44281. this.inType = false;
  44282. this.noAnonFunctionType = false;
  44283. this.inPropertyName = false;
  44284. this.hasFlowComment = false;
  44285. this.isAmbientContext = false;
  44286. this.inAbstractClass = false;
  44287. this.topicContext = {
  44288. maxNumOfResolvableTopics: 0,
  44289. maxTopicIndex: null
  44290. };
  44291. this.soloAwait = false;
  44292. this.inFSharpPipelineDirectBody = false;
  44293. this.labels = [];
  44294. this.decoratorStack = [[]];
  44295. this.comments = [];
  44296. this.trailingComments = [];
  44297. this.leadingComments = [];
  44298. this.commentStack = [];
  44299. this.commentPreviousNode = null;
  44300. this.pos = 0;
  44301. this.lineStart = 0;
  44302. this.type = types$12.eof;
  44303. this.value = null;
  44304. this.start = 0;
  44305. this.end = 0;
  44306. this.lastTokEndLoc = null;
  44307. this.lastTokStartLoc = null;
  44308. this.lastTokStart = 0;
  44309. this.lastTokEnd = 0;
  44310. this.context = [types2.braceStatement];
  44311. this.exprAllowed = true;
  44312. this.containsEsc = false;
  44313. this.strictErrors = /* @__PURE__ */ new Map();
  44314. this.exportedIdentifiers = [];
  44315. this.tokensLength = 0;
  44316. }
  44317. init(options) {
  44318. this.strict = options.strictMode === false ? false : options.sourceType === "module";
  44319. this.curLine = options.startLine;
  44320. this.startLoc = this.endLoc = this.curPosition();
  44321. }
  44322. curPosition() {
  44323. return new Position3(this.curLine, this.pos - this.lineStart);
  44324. }
  44325. clone(skipArrays) {
  44326. const state = new State2();
  44327. const keys2 = Object.keys(this);
  44328. for (let i = 0, length = keys2.length; i < length; i++) {
  44329. const key = keys2[i];
  44330. let val = this[key];
  44331. if (!skipArrays && Array.isArray(val)) {
  44332. val = val.slice();
  44333. }
  44334. state[key] = val;
  44335. }
  44336. return state;
  44337. }
  44338. };
  44339. var HEX_NUMBER = /^[\da-fA-F]+$/;
  44340. var DECIMAL_NUMBER = /^\d+$/;
  44341. var JsxErrors = makeErrorTemplates({
  44342. AttributeIsEmpty: "JSX attributes must only be assigned a non-empty expression.",
  44343. MissingClosingTagElement: "Expected corresponding JSX closing tag for <%0>.",
  44344. MissingClosingTagFragment: "Expected corresponding JSX closing tag for <>.",
  44345. UnexpectedSequenceExpression: "Sequence expressions cannot be directly nested inside JSX. Did you mean to wrap it in parentheses (...)?",
  44346. UnsupportedJsxValue: "JSX value should be either an expression or a quoted JSX text.",
  44347. UnterminatedJsxContent: "Unterminated JSX contents.",
  44348. UnwrappedAdjacentJSXElements: "Adjacent JSX elements must be wrapped in an enclosing tag. Did you want a JSX fragment <>...</>?"
  44349. }, ErrorCodes.SyntaxError);
  44350. types2.j_oTag = new TokContext3("<tag", false);
  44351. types2.j_cTag = new TokContext3("</tag", false);
  44352. types2.j_expr = new TokContext3("<tag>...</tag>", true, true);
  44353. types$12.jsxName = new TokenType3("jsxName");
  44354. types$12.jsxText = new TokenType3("jsxText", {
  44355. beforeExpr: true
  44356. });
  44357. types$12.jsxTagStart = new TokenType3("jsxTagStart", {
  44358. startsExpr: true
  44359. });
  44360. types$12.jsxTagEnd = new TokenType3("jsxTagEnd");
  44361. types$12.jsxTagStart.updateContext = function() {
  44362. this.state.context.push(types2.j_expr);
  44363. this.state.context.push(types2.j_oTag);
  44364. this.state.exprAllowed = false;
  44365. };
  44366. types$12.jsxTagEnd.updateContext = function(prevType) {
  44367. const out = this.state.context.pop();
  44368. if (out === types2.j_oTag && prevType === types$12.slash || out === types2.j_cTag) {
  44369. this.state.context.pop();
  44370. this.state.exprAllowed = this.curContext() === types2.j_expr;
  44371. } else {
  44372. this.state.exprAllowed = true;
  44373. }
  44374. };
  44375. function isFragment(object) {
  44376. return object ? object.type === "JSXOpeningFragment" || object.type === "JSXClosingFragment" : false;
  44377. }
  44378. function getQualifiedJSXName(object) {
  44379. if (object.type === "JSXIdentifier") {
  44380. return object.name;
  44381. }
  44382. if (object.type === "JSXNamespacedName") {
  44383. return object.namespace.name + ":" + object.name.name;
  44384. }
  44385. if (object.type === "JSXMemberExpression") {
  44386. return getQualifiedJSXName(object.object) + "." + getQualifiedJSXName(object.property);
  44387. }
  44388. throw new Error("Node had unexpected type: " + object.type);
  44389. }
  44390. var jsx = (superClass) => class extends superClass {
  44391. jsxReadToken() {
  44392. let out = "";
  44393. let chunkStart = this.state.pos;
  44394. for (; ; ) {
  44395. if (this.state.pos >= this.length) {
  44396. throw this.raise(this.state.start, JsxErrors.UnterminatedJsxContent);
  44397. }
  44398. const ch = this.input.charCodeAt(this.state.pos);
  44399. switch (ch) {
  44400. case 60:
  44401. case 123:
  44402. if (this.state.pos === this.state.start) {
  44403. if (ch === 60 && this.state.exprAllowed) {
  44404. ++this.state.pos;
  44405. return this.finishToken(types$12.jsxTagStart);
  44406. }
  44407. return super.getTokenFromCode(ch);
  44408. }
  44409. out += this.input.slice(chunkStart, this.state.pos);
  44410. return this.finishToken(types$12.jsxText, out);
  44411. case 38:
  44412. out += this.input.slice(chunkStart, this.state.pos);
  44413. out += this.jsxReadEntity();
  44414. chunkStart = this.state.pos;
  44415. break;
  44416. case 62:
  44417. case 125:
  44418. default:
  44419. if (isNewLine2(ch)) {
  44420. out += this.input.slice(chunkStart, this.state.pos);
  44421. out += this.jsxReadNewLine(true);
  44422. chunkStart = this.state.pos;
  44423. } else {
  44424. ++this.state.pos;
  44425. }
  44426. }
  44427. }
  44428. }
  44429. jsxReadNewLine(normalizeCRLF) {
  44430. const ch = this.input.charCodeAt(this.state.pos);
  44431. let out;
  44432. ++this.state.pos;
  44433. if (ch === 13 && this.input.charCodeAt(this.state.pos) === 10) {
  44434. ++this.state.pos;
  44435. out = normalizeCRLF ? "\n" : "\r\n";
  44436. } else {
  44437. out = String.fromCharCode(ch);
  44438. }
  44439. ++this.state.curLine;
  44440. this.state.lineStart = this.state.pos;
  44441. return out;
  44442. }
  44443. jsxReadString(quote) {
  44444. let out = "";
  44445. let chunkStart = ++this.state.pos;
  44446. for (; ; ) {
  44447. if (this.state.pos >= this.length) {
  44448. throw this.raise(this.state.start, ErrorMessages.UnterminatedString);
  44449. }
  44450. const ch = this.input.charCodeAt(this.state.pos);
  44451. if (ch === quote)
  44452. break;
  44453. if (ch === 38) {
  44454. out += this.input.slice(chunkStart, this.state.pos);
  44455. out += this.jsxReadEntity();
  44456. chunkStart = this.state.pos;
  44457. } else if (isNewLine2(ch)) {
  44458. out += this.input.slice(chunkStart, this.state.pos);
  44459. out += this.jsxReadNewLine(false);
  44460. chunkStart = this.state.pos;
  44461. } else {
  44462. ++this.state.pos;
  44463. }
  44464. }
  44465. out += this.input.slice(chunkStart, this.state.pos++);
  44466. return this.finishToken(types$12.string, out);
  44467. }
  44468. jsxReadEntity() {
  44469. let str = "";
  44470. let count = 0;
  44471. let entity;
  44472. let ch = this.input[this.state.pos];
  44473. const startPos = ++this.state.pos;
  44474. while (this.state.pos < this.length && count++ < 10) {
  44475. ch = this.input[this.state.pos++];
  44476. if (ch === ";") {
  44477. if (str[0] === "#") {
  44478. if (str[1] === "x") {
  44479. str = str.substr(2);
  44480. if (HEX_NUMBER.test(str)) {
  44481. entity = String.fromCodePoint(parseInt(str, 16));
  44482. }
  44483. } else {
  44484. str = str.substr(1);
  44485. if (DECIMAL_NUMBER.test(str)) {
  44486. entity = String.fromCodePoint(parseInt(str, 10));
  44487. }
  44488. }
  44489. } else {
  44490. entity = entities[str];
  44491. }
  44492. break;
  44493. }
  44494. str += ch;
  44495. }
  44496. if (!entity) {
  44497. this.state.pos = startPos;
  44498. return "&";
  44499. }
  44500. return entity;
  44501. }
  44502. jsxReadWord() {
  44503. let ch;
  44504. const start3 = this.state.pos;
  44505. do {
  44506. ch = this.input.charCodeAt(++this.state.pos);
  44507. } while (isIdentifierChar2(ch) || ch === 45);
  44508. return this.finishToken(types$12.jsxName, this.input.slice(start3, this.state.pos));
  44509. }
  44510. jsxParseIdentifier() {
  44511. const node = this.startNode();
  44512. if (this.match(types$12.jsxName)) {
  44513. node.name = this.state.value;
  44514. } else if (this.state.type.keyword) {
  44515. node.name = this.state.type.keyword;
  44516. } else {
  44517. this.unexpected();
  44518. }
  44519. this.next();
  44520. return this.finishNode(node, "JSXIdentifier");
  44521. }
  44522. jsxParseNamespacedName() {
  44523. const startPos = this.state.start;
  44524. const startLoc = this.state.startLoc;
  44525. const name2 = this.jsxParseIdentifier();
  44526. if (!this.eat(types$12.colon))
  44527. return name2;
  44528. const node = this.startNodeAt(startPos, startLoc);
  44529. node.namespace = name2;
  44530. node.name = this.jsxParseIdentifier();
  44531. return this.finishNode(node, "JSXNamespacedName");
  44532. }
  44533. jsxParseElementName() {
  44534. const startPos = this.state.start;
  44535. const startLoc = this.state.startLoc;
  44536. let node = this.jsxParseNamespacedName();
  44537. if (node.type === "JSXNamespacedName") {
  44538. return node;
  44539. }
  44540. while (this.eat(types$12.dot)) {
  44541. const newNode = this.startNodeAt(startPos, startLoc);
  44542. newNode.object = node;
  44543. newNode.property = this.jsxParseIdentifier();
  44544. node = this.finishNode(newNode, "JSXMemberExpression");
  44545. }
  44546. return node;
  44547. }
  44548. jsxParseAttributeValue() {
  44549. let node;
  44550. switch (this.state.type) {
  44551. case types$12.braceL:
  44552. node = this.startNode();
  44553. this.next();
  44554. node = this.jsxParseExpressionContainer(node);
  44555. if (node.expression.type === "JSXEmptyExpression") {
  44556. this.raise(node.start, JsxErrors.AttributeIsEmpty);
  44557. }
  44558. return node;
  44559. case types$12.jsxTagStart:
  44560. case types$12.string:
  44561. return this.parseExprAtom();
  44562. default:
  44563. throw this.raise(this.state.start, JsxErrors.UnsupportedJsxValue);
  44564. }
  44565. }
  44566. jsxParseEmptyExpression() {
  44567. const node = this.startNodeAt(this.state.lastTokEnd, this.state.lastTokEndLoc);
  44568. return this.finishNodeAt(node, "JSXEmptyExpression", this.state.start, this.state.startLoc);
  44569. }
  44570. jsxParseSpreadChild(node) {
  44571. this.next();
  44572. node.expression = this.parseExpression();
  44573. this.expect(types$12.braceR);
  44574. return this.finishNode(node, "JSXSpreadChild");
  44575. }
  44576. jsxParseExpressionContainer(node) {
  44577. if (this.match(types$12.braceR)) {
  44578. node.expression = this.jsxParseEmptyExpression();
  44579. } else {
  44580. const expression = this.parseExpression();
  44581. node.expression = expression;
  44582. }
  44583. this.expect(types$12.braceR);
  44584. return this.finishNode(node, "JSXExpressionContainer");
  44585. }
  44586. jsxParseAttribute() {
  44587. const node = this.startNode();
  44588. if (this.eat(types$12.braceL)) {
  44589. this.expect(types$12.ellipsis);
  44590. node.argument = this.parseMaybeAssignAllowIn();
  44591. this.expect(types$12.braceR);
  44592. return this.finishNode(node, "JSXSpreadAttribute");
  44593. }
  44594. node.name = this.jsxParseNamespacedName();
  44595. node.value = this.eat(types$12.eq) ? this.jsxParseAttributeValue() : null;
  44596. return this.finishNode(node, "JSXAttribute");
  44597. }
  44598. jsxParseOpeningElementAt(startPos, startLoc) {
  44599. const node = this.startNodeAt(startPos, startLoc);
  44600. if (this.match(types$12.jsxTagEnd)) {
  44601. this.expect(types$12.jsxTagEnd);
  44602. return this.finishNode(node, "JSXOpeningFragment");
  44603. }
  44604. node.name = this.jsxParseElementName();
  44605. return this.jsxParseOpeningElementAfterName(node);
  44606. }
  44607. jsxParseOpeningElementAfterName(node) {
  44608. const attributes = [];
  44609. while (!this.match(types$12.slash) && !this.match(types$12.jsxTagEnd)) {
  44610. attributes.push(this.jsxParseAttribute());
  44611. }
  44612. node.attributes = attributes;
  44613. node.selfClosing = this.eat(types$12.slash);
  44614. this.expect(types$12.jsxTagEnd);
  44615. return this.finishNode(node, "JSXOpeningElement");
  44616. }
  44617. jsxParseClosingElementAt(startPos, startLoc) {
  44618. const node = this.startNodeAt(startPos, startLoc);
  44619. if (this.match(types$12.jsxTagEnd)) {
  44620. this.expect(types$12.jsxTagEnd);
  44621. return this.finishNode(node, "JSXClosingFragment");
  44622. }
  44623. node.name = this.jsxParseElementName();
  44624. this.expect(types$12.jsxTagEnd);
  44625. return this.finishNode(node, "JSXClosingElement");
  44626. }
  44627. jsxParseElementAt(startPos, startLoc) {
  44628. const node = this.startNodeAt(startPos, startLoc);
  44629. const children = [];
  44630. const openingElement = this.jsxParseOpeningElementAt(startPos, startLoc);
  44631. let closingElement = null;
  44632. if (!openingElement.selfClosing) {
  44633. contents:
  44634. for (; ; ) {
  44635. switch (this.state.type) {
  44636. case types$12.jsxTagStart:
  44637. startPos = this.state.start;
  44638. startLoc = this.state.startLoc;
  44639. this.next();
  44640. if (this.eat(types$12.slash)) {
  44641. closingElement = this.jsxParseClosingElementAt(startPos, startLoc);
  44642. break contents;
  44643. }
  44644. children.push(this.jsxParseElementAt(startPos, startLoc));
  44645. break;
  44646. case types$12.jsxText:
  44647. children.push(this.parseExprAtom());
  44648. break;
  44649. case types$12.braceL: {
  44650. const node2 = this.startNode();
  44651. this.next();
  44652. if (this.match(types$12.ellipsis)) {
  44653. children.push(this.jsxParseSpreadChild(node2));
  44654. } else {
  44655. children.push(this.jsxParseExpressionContainer(node2));
  44656. }
  44657. break;
  44658. }
  44659. default:
  44660. throw this.unexpected();
  44661. }
  44662. }
  44663. if (isFragment(openingElement) && !isFragment(closingElement)) {
  44664. this.raise(closingElement.start, JsxErrors.MissingClosingTagFragment);
  44665. } else if (!isFragment(openingElement) && isFragment(closingElement)) {
  44666. this.raise(closingElement.start, JsxErrors.MissingClosingTagElement, getQualifiedJSXName(openingElement.name));
  44667. } else if (!isFragment(openingElement) && !isFragment(closingElement)) {
  44668. if (getQualifiedJSXName(closingElement.name) !== getQualifiedJSXName(openingElement.name)) {
  44669. this.raise(closingElement.start, JsxErrors.MissingClosingTagElement, getQualifiedJSXName(openingElement.name));
  44670. }
  44671. }
  44672. }
  44673. if (isFragment(openingElement)) {
  44674. node.openingFragment = openingElement;
  44675. node.closingFragment = closingElement;
  44676. } else {
  44677. node.openingElement = openingElement;
  44678. node.closingElement = closingElement;
  44679. }
  44680. node.children = children;
  44681. if (this.isRelational("<")) {
  44682. throw this.raise(this.state.start, JsxErrors.UnwrappedAdjacentJSXElements);
  44683. }
  44684. return isFragment(openingElement) ? this.finishNode(node, "JSXFragment") : this.finishNode(node, "JSXElement");
  44685. }
  44686. jsxParseElement() {
  44687. const startPos = this.state.start;
  44688. const startLoc = this.state.startLoc;
  44689. this.next();
  44690. return this.jsxParseElementAt(startPos, startLoc);
  44691. }
  44692. parseExprAtom(refExpressionErrors) {
  44693. if (this.match(types$12.jsxText)) {
  44694. return this.parseLiteral(this.state.value, "JSXText");
  44695. } else if (this.match(types$12.jsxTagStart)) {
  44696. return this.jsxParseElement();
  44697. } else if (this.isRelational("<") && this.input.charCodeAt(this.state.pos) !== 33) {
  44698. this.finishToken(types$12.jsxTagStart);
  44699. return this.jsxParseElement();
  44700. } else {
  44701. return super.parseExprAtom(refExpressionErrors);
  44702. }
  44703. }
  44704. createLookaheadState(state) {
  44705. const lookaheadState = super.createLookaheadState(state);
  44706. lookaheadState.inPropertyName = state.inPropertyName;
  44707. return lookaheadState;
  44708. }
  44709. getTokenFromCode(code2) {
  44710. if (this.state.inPropertyName)
  44711. return super.getTokenFromCode(code2);
  44712. const context = this.curContext();
  44713. if (context === types2.j_expr) {
  44714. return this.jsxReadToken();
  44715. }
  44716. if (context === types2.j_oTag || context === types2.j_cTag) {
  44717. if (isIdentifierStart2(code2)) {
  44718. return this.jsxReadWord();
  44719. }
  44720. if (code2 === 62) {
  44721. ++this.state.pos;
  44722. return this.finishToken(types$12.jsxTagEnd);
  44723. }
  44724. if ((code2 === 34 || code2 === 39) && context === types2.j_oTag) {
  44725. return this.jsxReadString(code2);
  44726. }
  44727. }
  44728. if (code2 === 60 && this.state.exprAllowed && this.input.charCodeAt(this.state.pos + 1) !== 33) {
  44729. ++this.state.pos;
  44730. return this.finishToken(types$12.jsxTagStart);
  44731. }
  44732. return super.getTokenFromCode(code2);
  44733. }
  44734. updateContext(prevType) {
  44735. if (this.match(types$12.braceL)) {
  44736. const curContext = this.curContext();
  44737. if (curContext === types2.j_oTag) {
  44738. this.state.context.push(types2.braceExpression);
  44739. } else if (curContext === types2.j_expr) {
  44740. this.state.context.push(types2.templateQuasi);
  44741. } else {
  44742. super.updateContext(prevType);
  44743. }
  44744. this.state.exprAllowed = true;
  44745. } else if (this.match(types$12.slash) && prevType === types$12.jsxTagStart) {
  44746. this.state.context.length -= 2;
  44747. this.state.context.push(types2.j_cTag);
  44748. this.state.exprAllowed = false;
  44749. } else {
  44750. return super.updateContext(prevType);
  44751. }
  44752. }
  44753. };
  44754. var TypeScriptScope = class extends Scope4 {
  44755. constructor(...args) {
  44756. super(...args);
  44757. this.types = [];
  44758. this.enums = [];
  44759. this.constEnums = [];
  44760. this.classes = [];
  44761. this.exportOnlyBindings = [];
  44762. }
  44763. };
  44764. var TypeScriptScopeHandler = class extends ScopeHandler {
  44765. createScope(flags) {
  44766. return new TypeScriptScope(flags);
  44767. }
  44768. declareName(name2, bindingType, pos) {
  44769. const scope = this.currentScope();
  44770. if (bindingType & BIND_FLAGS_TS_EXPORT_ONLY) {
  44771. this.maybeExportDefined(scope, name2);
  44772. scope.exportOnlyBindings.push(name2);
  44773. return;
  44774. }
  44775. super.declareName(...arguments);
  44776. if (bindingType & BIND_KIND_TYPE) {
  44777. if (!(bindingType & BIND_KIND_VALUE)) {
  44778. this.checkRedeclarationInScope(scope, name2, bindingType, pos);
  44779. this.maybeExportDefined(scope, name2);
  44780. }
  44781. scope.types.push(name2);
  44782. }
  44783. if (bindingType & BIND_FLAGS_TS_ENUM)
  44784. scope.enums.push(name2);
  44785. if (bindingType & BIND_FLAGS_TS_CONST_ENUM)
  44786. scope.constEnums.push(name2);
  44787. if (bindingType & BIND_FLAGS_CLASS)
  44788. scope.classes.push(name2);
  44789. }
  44790. isRedeclaredInScope(scope, name2, bindingType) {
  44791. if (scope.enums.indexOf(name2) > -1) {
  44792. if (bindingType & BIND_FLAGS_TS_ENUM) {
  44793. const isConst = !!(bindingType & BIND_FLAGS_TS_CONST_ENUM);
  44794. const wasConst = scope.constEnums.indexOf(name2) > -1;
  44795. return isConst !== wasConst;
  44796. }
  44797. return true;
  44798. }
  44799. if (bindingType & BIND_FLAGS_CLASS && scope.classes.indexOf(name2) > -1) {
  44800. if (scope.lexical.indexOf(name2) > -1) {
  44801. return !!(bindingType & BIND_KIND_VALUE);
  44802. } else {
  44803. return false;
  44804. }
  44805. }
  44806. if (bindingType & BIND_KIND_TYPE && scope.types.indexOf(name2) > -1) {
  44807. return true;
  44808. }
  44809. return super.isRedeclaredInScope(...arguments);
  44810. }
  44811. checkLocalExport(id) {
  44812. if (this.scopeStack[0].types.indexOf(id.name) === -1 && this.scopeStack[0].exportOnlyBindings.indexOf(id.name) === -1) {
  44813. super.checkLocalExport(id);
  44814. }
  44815. }
  44816. };
  44817. var PARAM = 0;
  44818. var PARAM_YIELD = 1;
  44819. var PARAM_AWAIT = 2;
  44820. var PARAM_RETURN = 4;
  44821. var PARAM_IN = 8;
  44822. var ProductionParameterHandler = class {
  44823. constructor() {
  44824. this.stacks = [];
  44825. }
  44826. enter(flags) {
  44827. this.stacks.push(flags);
  44828. }
  44829. exit() {
  44830. this.stacks.pop();
  44831. }
  44832. currentFlags() {
  44833. return this.stacks[this.stacks.length - 1];
  44834. }
  44835. get hasAwait() {
  44836. return (this.currentFlags() & PARAM_AWAIT) > 0;
  44837. }
  44838. get hasYield() {
  44839. return (this.currentFlags() & PARAM_YIELD) > 0;
  44840. }
  44841. get hasReturn() {
  44842. return (this.currentFlags() & PARAM_RETURN) > 0;
  44843. }
  44844. get hasIn() {
  44845. return (this.currentFlags() & PARAM_IN) > 0;
  44846. }
  44847. };
  44848. function functionFlags2(isAsync, isGenerator) {
  44849. return (isAsync ? PARAM_AWAIT : 0) | (isGenerator ? PARAM_YIELD : 0);
  44850. }
  44851. function nonNull(x) {
  44852. if (x == null) {
  44853. throw new Error(`Unexpected ${x} value.`);
  44854. }
  44855. return x;
  44856. }
  44857. function assert(x) {
  44858. if (!x) {
  44859. throw new Error("Assert fail");
  44860. }
  44861. }
  44862. var TSErrors = makeErrorTemplates({
  44863. AbstractMethodHasImplementation: "Method '%0' cannot have an implementation because it is marked abstract.",
  44864. AccesorCannotDeclareThisParameter: "'get' and 'set' accessors cannot declare 'this' parameters.",
  44865. AccesorCannotHaveTypeParameters: "An accessor cannot have type parameters.",
  44866. ClassMethodHasDeclare: "Class methods cannot have the 'declare' modifier.",
  44867. ClassMethodHasReadonly: "Class methods cannot have the 'readonly' modifier.",
  44868. ConstructorHasTypeParameters: "Type parameters cannot appear on a constructor declaration.",
  44869. DeclareAccessor: "'declare' is not allowed in %0ters.",
  44870. DeclareClassFieldHasInitializer: "Initializers are not allowed in ambient contexts.",
  44871. DeclareFunctionHasImplementation: "An implementation cannot be declared in ambient contexts.",
  44872. DuplicateAccessibilityModifier: "Accessibility modifier already seen.",
  44873. DuplicateModifier: "Duplicate modifier: '%0'.",
  44874. EmptyHeritageClauseType: "'%0' list cannot be empty.",
  44875. EmptyTypeArguments: "Type argument list cannot be empty.",
  44876. EmptyTypeParameters: "Type parameter list cannot be empty.",
  44877. ExpectedAmbientAfterExportDeclare: "'export declare' must be followed by an ambient declaration.",
  44878. ImportAliasHasImportType: "An import alias can not use 'import type'.",
  44879. IncompatibleModifiers: "'%0' modifier cannot be used with '%1' modifier.",
  44880. IndexSignatureHasAbstract: "Index signatures cannot have the 'abstract' modifier.",
  44881. IndexSignatureHasAccessibility: "Index signatures cannot have an accessibility modifier ('%0').",
  44882. IndexSignatureHasDeclare: "Index signatures cannot have the 'declare' modifier.",
  44883. IndexSignatureHasOverride: "'override' modifier cannot appear on an index signature.",
  44884. IndexSignatureHasStatic: "Index signatures cannot have the 'static' modifier.",
  44885. InvalidModifierOnTypeMember: "'%0' modifier cannot appear on a type member.",
  44886. InvalidModifiersOrder: "'%0' modifier must precede '%1' modifier.",
  44887. InvalidTupleMemberLabel: "Tuple members must be labeled with a simple identifier.",
  44888. MixedLabeledAndUnlabeledElements: "Tuple members must all have names or all not have names.",
  44889. NonAbstractClassHasAbstractMethod: "Abstract methods can only appear within an abstract class.",
  44890. NonClassMethodPropertyHasAbstractModifer: "'abstract' modifier can only appear on a class, method, or property declaration.",
  44891. OptionalTypeBeforeRequired: "A required element cannot follow an optional element.",
  44892. OverrideNotInSubClass: "This member cannot have an 'override' modifier because its containing class does not extend another class.",
  44893. PatternIsOptional: "A binding pattern parameter cannot be optional in an implementation signature.",
  44894. PrivateElementHasAbstract: "Private elements cannot have the 'abstract' modifier.",
  44895. PrivateElementHasAccessibility: "Private elements cannot have an accessibility modifier ('%0').",
  44896. ReadonlyForMethodSignature: "'readonly' modifier can only appear on a property declaration or index signature.",
  44897. SetAccesorCannotHaveOptionalParameter: "A 'set' accessor cannot have an optional parameter.",
  44898. SetAccesorCannotHaveRestParameter: "A 'set' accessor cannot have rest parameter.",
  44899. SetAccesorCannotHaveReturnType: "A 'set' accessor cannot have a return type annotation.",
  44900. StaticBlockCannotHaveModifier: "Static class blocks cannot have any modifier.",
  44901. TypeAnnotationAfterAssign: "Type annotations must come before default assignments, e.g. instead of `age = 25: number` use `age: number = 25`.",
  44902. TypeImportCannotSpecifyDefaultAndNamed: "A type-only import can specify a default import or named bindings, but not both.",
  44903. UnexpectedParameterModifier: "A parameter property is only allowed in a constructor implementation.",
  44904. UnexpectedReadonly: "'readonly' type modifier is only permitted on array and tuple literal types.",
  44905. UnexpectedTypeAnnotation: "Did not expect a type annotation here.",
  44906. UnexpectedTypeCastInParameter: "Unexpected type cast in parameter position.",
  44907. UnsupportedImportTypeArgument: "Argument in a type import must be a string literal.",
  44908. UnsupportedParameterPropertyKind: "A parameter property may not be declared using a binding pattern.",
  44909. UnsupportedSignatureParameterKind: "Name in a signature must be an Identifier, ObjectPattern or ArrayPattern, instead got %0."
  44910. }, ErrorCodes.SyntaxError);
  44911. function keywordTypeFromName(value) {
  44912. switch (value) {
  44913. case "any":
  44914. return "TSAnyKeyword";
  44915. case "boolean":
  44916. return "TSBooleanKeyword";
  44917. case "bigint":
  44918. return "TSBigIntKeyword";
  44919. case "never":
  44920. return "TSNeverKeyword";
  44921. case "number":
  44922. return "TSNumberKeyword";
  44923. case "object":
  44924. return "TSObjectKeyword";
  44925. case "string":
  44926. return "TSStringKeyword";
  44927. case "symbol":
  44928. return "TSSymbolKeyword";
  44929. case "undefined":
  44930. return "TSUndefinedKeyword";
  44931. case "unknown":
  44932. return "TSUnknownKeyword";
  44933. default:
  44934. return void 0;
  44935. }
  44936. }
  44937. function tsIsAccessModifier(modifier) {
  44938. return modifier === "private" || modifier === "public" || modifier === "protected";
  44939. }
  44940. var typescript = (superClass) => class extends superClass {
  44941. getScopeHandler() {
  44942. return TypeScriptScopeHandler;
  44943. }
  44944. tsIsIdentifier() {
  44945. return this.match(types$12.name);
  44946. }
  44947. tsTokenCanFollowModifier() {
  44948. return (this.match(types$12.bracketL) || this.match(types$12.braceL) || this.match(types$12.star) || this.match(types$12.ellipsis) || this.match(types$12.privateName) || this.isLiteralPropertyName()) && !this.hasPrecedingLineBreak();
  44949. }
  44950. tsNextTokenCanFollowModifier() {
  44951. this.next();
  44952. return this.tsTokenCanFollowModifier();
  44953. }
  44954. tsParseModifier(allowedModifiers) {
  44955. if (!this.match(types$12.name)) {
  44956. return void 0;
  44957. }
  44958. const modifier = this.state.value;
  44959. if (allowedModifiers.indexOf(modifier) !== -1 && this.tsTryParse(this.tsNextTokenCanFollowModifier.bind(this))) {
  44960. return modifier;
  44961. }
  44962. return void 0;
  44963. }
  44964. tsParseModifiers(modified, allowedModifiers, disallowedModifiers, errorTemplate) {
  44965. const enforceOrder = (pos, modifier, before, after) => {
  44966. if (modifier === before && modified[after]) {
  44967. this.raise(pos, TSErrors.InvalidModifiersOrder, before, after);
  44968. }
  44969. };
  44970. const incompatible = (pos, modifier, mod1, mod2) => {
  44971. if (modified[mod1] && modifier === mod2 || modified[mod2] && modifier === mod1) {
  44972. this.raise(pos, TSErrors.IncompatibleModifiers, mod1, mod2);
  44973. }
  44974. };
  44975. for (; ; ) {
  44976. const startPos = this.state.start;
  44977. const modifier = this.tsParseModifier(allowedModifiers.concat(disallowedModifiers != null ? disallowedModifiers : []));
  44978. if (!modifier)
  44979. break;
  44980. if (tsIsAccessModifier(modifier)) {
  44981. if (modified.accessibility) {
  44982. this.raise(startPos, TSErrors.DuplicateAccessibilityModifier);
  44983. } else {
  44984. enforceOrder(startPos, modifier, modifier, "override");
  44985. enforceOrder(startPos, modifier, modifier, "static");
  44986. modified.accessibility = modifier;
  44987. }
  44988. } else {
  44989. if (Object.hasOwnProperty.call(modified, modifier)) {
  44990. this.raise(startPos, TSErrors.DuplicateModifier, modifier);
  44991. } else {
  44992. enforceOrder(startPos, modifier, "static", "readonly");
  44993. enforceOrder(startPos, modifier, "static", "override");
  44994. enforceOrder(startPos, modifier, "override", "readonly");
  44995. enforceOrder(startPos, modifier, "abstract", "override");
  44996. incompatible(startPos, modifier, "declare", "override");
  44997. incompatible(startPos, modifier, "static", "abstract");
  44998. }
  44999. modified[modifier] = true;
  45000. }
  45001. if (disallowedModifiers != null && disallowedModifiers.includes(modifier)) {
  45002. this.raise(startPos, errorTemplate, modifier);
  45003. }
  45004. }
  45005. }
  45006. tsIsListTerminator(kind) {
  45007. switch (kind) {
  45008. case "EnumMembers":
  45009. case "TypeMembers":
  45010. return this.match(types$12.braceR);
  45011. case "HeritageClauseElement":
  45012. return this.match(types$12.braceL);
  45013. case "TupleElementTypes":
  45014. return this.match(types$12.bracketR);
  45015. case "TypeParametersOrArguments":
  45016. return this.isRelational(">");
  45017. }
  45018. throw new Error("Unreachable");
  45019. }
  45020. tsParseList(kind, parseElement) {
  45021. const result = [];
  45022. while (!this.tsIsListTerminator(kind)) {
  45023. result.push(parseElement());
  45024. }
  45025. return result;
  45026. }
  45027. tsParseDelimitedList(kind, parseElement) {
  45028. return nonNull(this.tsParseDelimitedListWorker(kind, parseElement, true));
  45029. }
  45030. tsParseDelimitedListWorker(kind, parseElement, expectSuccess) {
  45031. const result = [];
  45032. for (; ; ) {
  45033. if (this.tsIsListTerminator(kind)) {
  45034. break;
  45035. }
  45036. const element2 = parseElement();
  45037. if (element2 == null) {
  45038. return void 0;
  45039. }
  45040. result.push(element2);
  45041. if (this.eat(types$12.comma)) {
  45042. continue;
  45043. }
  45044. if (this.tsIsListTerminator(kind)) {
  45045. break;
  45046. }
  45047. if (expectSuccess) {
  45048. this.expect(types$12.comma);
  45049. }
  45050. return void 0;
  45051. }
  45052. return result;
  45053. }
  45054. tsParseBracketedList(kind, parseElement, bracket, skipFirstToken) {
  45055. if (!skipFirstToken) {
  45056. if (bracket) {
  45057. this.expect(types$12.bracketL);
  45058. } else {
  45059. this.expectRelational("<");
  45060. }
  45061. }
  45062. const result = this.tsParseDelimitedList(kind, parseElement);
  45063. if (bracket) {
  45064. this.expect(types$12.bracketR);
  45065. } else {
  45066. this.expectRelational(">");
  45067. }
  45068. return result;
  45069. }
  45070. tsParseImportType() {
  45071. const node = this.startNode();
  45072. this.expect(types$12._import);
  45073. this.expect(types$12.parenL);
  45074. if (!this.match(types$12.string)) {
  45075. this.raise(this.state.start, TSErrors.UnsupportedImportTypeArgument);
  45076. }
  45077. node.argument = this.parseExprAtom();
  45078. this.expect(types$12.parenR);
  45079. if (this.eat(types$12.dot)) {
  45080. node.qualifier = this.tsParseEntityName(true);
  45081. }
  45082. if (this.isRelational("<")) {
  45083. node.typeParameters = this.tsParseTypeArguments();
  45084. }
  45085. return this.finishNode(node, "TSImportType");
  45086. }
  45087. tsParseEntityName(allowReservedWords) {
  45088. let entity = this.parseIdentifier();
  45089. while (this.eat(types$12.dot)) {
  45090. const node = this.startNodeAtNode(entity);
  45091. node.left = entity;
  45092. node.right = this.parseIdentifier(allowReservedWords);
  45093. entity = this.finishNode(node, "TSQualifiedName");
  45094. }
  45095. return entity;
  45096. }
  45097. tsParseTypeReference() {
  45098. const node = this.startNode();
  45099. node.typeName = this.tsParseEntityName(false);
  45100. if (!this.hasPrecedingLineBreak() && this.isRelational("<")) {
  45101. node.typeParameters = this.tsParseTypeArguments();
  45102. }
  45103. return this.finishNode(node, "TSTypeReference");
  45104. }
  45105. tsParseThisTypePredicate(lhs) {
  45106. this.next();
  45107. const node = this.startNodeAtNode(lhs);
  45108. node.parameterName = lhs;
  45109. node.typeAnnotation = this.tsParseTypeAnnotation(false);
  45110. node.asserts = false;
  45111. return this.finishNode(node, "TSTypePredicate");
  45112. }
  45113. tsParseThisTypeNode() {
  45114. const node = this.startNode();
  45115. this.next();
  45116. return this.finishNode(node, "TSThisType");
  45117. }
  45118. tsParseTypeQuery() {
  45119. const node = this.startNode();
  45120. this.expect(types$12._typeof);
  45121. if (this.match(types$12._import)) {
  45122. node.exprName = this.tsParseImportType();
  45123. } else {
  45124. node.exprName = this.tsParseEntityName(true);
  45125. }
  45126. return this.finishNode(node, "TSTypeQuery");
  45127. }
  45128. tsParseTypeParameter() {
  45129. const node = this.startNode();
  45130. node.name = this.parseIdentifierName(node.start);
  45131. node.constraint = this.tsEatThenParseType(types$12._extends);
  45132. node.default = this.tsEatThenParseType(types$12.eq);
  45133. return this.finishNode(node, "TSTypeParameter");
  45134. }
  45135. tsTryParseTypeParameters() {
  45136. if (this.isRelational("<")) {
  45137. return this.tsParseTypeParameters();
  45138. }
  45139. }
  45140. tsParseTypeParameters() {
  45141. const node = this.startNode();
  45142. if (this.isRelational("<") || this.match(types$12.jsxTagStart)) {
  45143. this.next();
  45144. } else {
  45145. this.unexpected();
  45146. }
  45147. node.params = this.tsParseBracketedList("TypeParametersOrArguments", this.tsParseTypeParameter.bind(this), false, true);
  45148. if (node.params.length === 0) {
  45149. this.raise(node.start, TSErrors.EmptyTypeParameters);
  45150. }
  45151. return this.finishNode(node, "TSTypeParameterDeclaration");
  45152. }
  45153. tsTryNextParseConstantContext() {
  45154. if (this.lookahead().type === types$12._const) {
  45155. this.next();
  45156. return this.tsParseTypeReference();
  45157. }
  45158. return null;
  45159. }
  45160. tsFillSignature(returnToken, signature) {
  45161. const returnTokenRequired = returnToken === types$12.arrow;
  45162. signature.typeParameters = this.tsTryParseTypeParameters();
  45163. this.expect(types$12.parenL);
  45164. signature.parameters = this.tsParseBindingListForSignature();
  45165. if (returnTokenRequired) {
  45166. signature.typeAnnotation = this.tsParseTypeOrTypePredicateAnnotation(returnToken);
  45167. } else if (this.match(returnToken)) {
  45168. signature.typeAnnotation = this.tsParseTypeOrTypePredicateAnnotation(returnToken);
  45169. }
  45170. }
  45171. tsParseBindingListForSignature() {
  45172. return this.parseBindingList(types$12.parenR, 41).map((pattern) => {
  45173. if (pattern.type !== "Identifier" && pattern.type !== "RestElement" && pattern.type !== "ObjectPattern" && pattern.type !== "ArrayPattern") {
  45174. this.raise(pattern.start, TSErrors.UnsupportedSignatureParameterKind, pattern.type);
  45175. }
  45176. return pattern;
  45177. });
  45178. }
  45179. tsParseTypeMemberSemicolon() {
  45180. if (!this.eat(types$12.comma) && !this.isLineTerminator()) {
  45181. this.expect(types$12.semi);
  45182. }
  45183. }
  45184. tsParseSignatureMember(kind, node) {
  45185. this.tsFillSignature(types$12.colon, node);
  45186. this.tsParseTypeMemberSemicolon();
  45187. return this.finishNode(node, kind);
  45188. }
  45189. tsIsUnambiguouslyIndexSignature() {
  45190. this.next();
  45191. return this.eat(types$12.name) && this.match(types$12.colon);
  45192. }
  45193. tsTryParseIndexSignature(node) {
  45194. if (!(this.match(types$12.bracketL) && this.tsLookAhead(this.tsIsUnambiguouslyIndexSignature.bind(this)))) {
  45195. return void 0;
  45196. }
  45197. this.expect(types$12.bracketL);
  45198. const id = this.parseIdentifier();
  45199. id.typeAnnotation = this.tsParseTypeAnnotation();
  45200. this.resetEndLocation(id);
  45201. this.expect(types$12.bracketR);
  45202. node.parameters = [id];
  45203. const type = this.tsTryParseTypeAnnotation();
  45204. if (type)
  45205. node.typeAnnotation = type;
  45206. this.tsParseTypeMemberSemicolon();
  45207. return this.finishNode(node, "TSIndexSignature");
  45208. }
  45209. tsParsePropertyOrMethodSignature(node, readonly) {
  45210. if (this.eat(types$12.question))
  45211. node.optional = true;
  45212. const nodeAny = node;
  45213. if (this.match(types$12.parenL) || this.isRelational("<")) {
  45214. if (readonly) {
  45215. this.raise(node.start, TSErrors.ReadonlyForMethodSignature);
  45216. }
  45217. const method = nodeAny;
  45218. if (method.kind && this.isRelational("<")) {
  45219. this.raise(this.state.pos, TSErrors.AccesorCannotHaveTypeParameters);
  45220. }
  45221. this.tsFillSignature(types$12.colon, method);
  45222. this.tsParseTypeMemberSemicolon();
  45223. if (method.kind === "get") {
  45224. if (method.parameters.length > 0) {
  45225. this.raise(this.state.pos, ErrorMessages.BadGetterArity);
  45226. if (this.isThisParam(method.parameters[0])) {
  45227. this.raise(this.state.pos, TSErrors.AccesorCannotDeclareThisParameter);
  45228. }
  45229. }
  45230. } else if (method.kind === "set") {
  45231. if (method.parameters.length !== 1) {
  45232. this.raise(this.state.pos, ErrorMessages.BadSetterArity);
  45233. } else {
  45234. const firstParameter = method.parameters[0];
  45235. if (this.isThisParam(firstParameter)) {
  45236. this.raise(this.state.pos, TSErrors.AccesorCannotDeclareThisParameter);
  45237. }
  45238. if (firstParameter.type === "Identifier" && firstParameter.optional) {
  45239. this.raise(this.state.pos, TSErrors.SetAccesorCannotHaveOptionalParameter);
  45240. }
  45241. if (firstParameter.type === "RestElement") {
  45242. this.raise(this.state.pos, TSErrors.SetAccesorCannotHaveRestParameter);
  45243. }
  45244. }
  45245. if (method.typeAnnotation) {
  45246. this.raise(method.typeAnnotation.start, TSErrors.SetAccesorCannotHaveReturnType);
  45247. }
  45248. } else {
  45249. method.kind = "method";
  45250. }
  45251. return this.finishNode(method, "TSMethodSignature");
  45252. } else {
  45253. const property = nodeAny;
  45254. if (readonly)
  45255. property.readonly = true;
  45256. const type = this.tsTryParseTypeAnnotation();
  45257. if (type)
  45258. property.typeAnnotation = type;
  45259. this.tsParseTypeMemberSemicolon();
  45260. return this.finishNode(property, "TSPropertySignature");
  45261. }
  45262. }
  45263. tsParseTypeMember() {
  45264. const node = this.startNode();
  45265. if (this.match(types$12.parenL) || this.isRelational("<")) {
  45266. return this.tsParseSignatureMember("TSCallSignatureDeclaration", node);
  45267. }
  45268. if (this.match(types$12._new)) {
  45269. const id = this.startNode();
  45270. this.next();
  45271. if (this.match(types$12.parenL) || this.isRelational("<")) {
  45272. return this.tsParseSignatureMember("TSConstructSignatureDeclaration", node);
  45273. } else {
  45274. node.key = this.createIdentifier(id, "new");
  45275. return this.tsParsePropertyOrMethodSignature(node, false);
  45276. }
  45277. }
  45278. this.tsParseModifiers(node, ["readonly"], ["declare", "abstract", "private", "protected", "public", "static", "override"], TSErrors.InvalidModifierOnTypeMember);
  45279. const idx = this.tsTryParseIndexSignature(node);
  45280. if (idx) {
  45281. return idx;
  45282. }
  45283. this.parsePropertyName(node, false);
  45284. if (!node.computed && node.key.type === "Identifier" && (node.key.name === "get" || node.key.name === "set") && this.tsTokenCanFollowModifier()) {
  45285. node.kind = node.key.name;
  45286. this.parsePropertyName(node, false);
  45287. }
  45288. return this.tsParsePropertyOrMethodSignature(node, !!node.readonly);
  45289. }
  45290. tsParseTypeLiteral() {
  45291. const node = this.startNode();
  45292. node.members = this.tsParseObjectTypeMembers();
  45293. return this.finishNode(node, "TSTypeLiteral");
  45294. }
  45295. tsParseObjectTypeMembers() {
  45296. this.expect(types$12.braceL);
  45297. const members = this.tsParseList("TypeMembers", this.tsParseTypeMember.bind(this));
  45298. this.expect(types$12.braceR);
  45299. return members;
  45300. }
  45301. tsIsStartOfMappedType() {
  45302. this.next();
  45303. if (this.eat(types$12.plusMin)) {
  45304. return this.isContextual("readonly");
  45305. }
  45306. if (this.isContextual("readonly")) {
  45307. this.next();
  45308. }
  45309. if (!this.match(types$12.bracketL)) {
  45310. return false;
  45311. }
  45312. this.next();
  45313. if (!this.tsIsIdentifier()) {
  45314. return false;
  45315. }
  45316. this.next();
  45317. return this.match(types$12._in);
  45318. }
  45319. tsParseMappedTypeParameter() {
  45320. const node = this.startNode();
  45321. node.name = this.parseIdentifierName(node.start);
  45322. node.constraint = this.tsExpectThenParseType(types$12._in);
  45323. return this.finishNode(node, "TSTypeParameter");
  45324. }
  45325. tsParseMappedType() {
  45326. const node = this.startNode();
  45327. this.expect(types$12.braceL);
  45328. if (this.match(types$12.plusMin)) {
  45329. node.readonly = this.state.value;
  45330. this.next();
  45331. this.expectContextual("readonly");
  45332. } else if (this.eatContextual("readonly")) {
  45333. node.readonly = true;
  45334. }
  45335. this.expect(types$12.bracketL);
  45336. node.typeParameter = this.tsParseMappedTypeParameter();
  45337. node.nameType = this.eatContextual("as") ? this.tsParseType() : null;
  45338. this.expect(types$12.bracketR);
  45339. if (this.match(types$12.plusMin)) {
  45340. node.optional = this.state.value;
  45341. this.next();
  45342. this.expect(types$12.question);
  45343. } else if (this.eat(types$12.question)) {
  45344. node.optional = true;
  45345. }
  45346. node.typeAnnotation = this.tsTryParseType();
  45347. this.semicolon();
  45348. this.expect(types$12.braceR);
  45349. return this.finishNode(node, "TSMappedType");
  45350. }
  45351. tsParseTupleType() {
  45352. const node = this.startNode();
  45353. node.elementTypes = this.tsParseBracketedList("TupleElementTypes", this.tsParseTupleElementType.bind(this), true, false);
  45354. let seenOptionalElement = false;
  45355. let labeledElements = null;
  45356. node.elementTypes.forEach((elementNode) => {
  45357. var _labeledElements;
  45358. let {
  45359. type
  45360. } = elementNode;
  45361. if (seenOptionalElement && type !== "TSRestType" && type !== "TSOptionalType" && !(type === "TSNamedTupleMember" && elementNode.optional)) {
  45362. this.raise(elementNode.start, TSErrors.OptionalTypeBeforeRequired);
  45363. }
  45364. seenOptionalElement = seenOptionalElement || type === "TSNamedTupleMember" && elementNode.optional || type === "TSOptionalType";
  45365. if (type === "TSRestType") {
  45366. elementNode = elementNode.typeAnnotation;
  45367. type = elementNode.type;
  45368. }
  45369. const isLabeled = type === "TSNamedTupleMember";
  45370. labeledElements = (_labeledElements = labeledElements) != null ? _labeledElements : isLabeled;
  45371. if (labeledElements !== isLabeled) {
  45372. this.raise(elementNode.start, TSErrors.MixedLabeledAndUnlabeledElements);
  45373. }
  45374. });
  45375. return this.finishNode(node, "TSTupleType");
  45376. }
  45377. tsParseTupleElementType() {
  45378. const {
  45379. start: startPos,
  45380. startLoc
  45381. } = this.state;
  45382. const rest = this.eat(types$12.ellipsis);
  45383. let type = this.tsParseType();
  45384. const optional = this.eat(types$12.question);
  45385. const labeled = this.eat(types$12.colon);
  45386. if (labeled) {
  45387. const labeledNode = this.startNodeAtNode(type);
  45388. labeledNode.optional = optional;
  45389. if (type.type === "TSTypeReference" && !type.typeParameters && type.typeName.type === "Identifier") {
  45390. labeledNode.label = type.typeName;
  45391. } else {
  45392. this.raise(type.start, TSErrors.InvalidTupleMemberLabel);
  45393. labeledNode.label = type;
  45394. }
  45395. labeledNode.elementType = this.tsParseType();
  45396. type = this.finishNode(labeledNode, "TSNamedTupleMember");
  45397. } else if (optional) {
  45398. const optionalTypeNode = this.startNodeAtNode(type);
  45399. optionalTypeNode.typeAnnotation = type;
  45400. type = this.finishNode(optionalTypeNode, "TSOptionalType");
  45401. }
  45402. if (rest) {
  45403. const restNode = this.startNodeAt(startPos, startLoc);
  45404. restNode.typeAnnotation = type;
  45405. type = this.finishNode(restNode, "TSRestType");
  45406. }
  45407. return type;
  45408. }
  45409. tsParseParenthesizedType() {
  45410. const node = this.startNode();
  45411. this.expect(types$12.parenL);
  45412. node.typeAnnotation = this.tsParseType();
  45413. this.expect(types$12.parenR);
  45414. return this.finishNode(node, "TSParenthesizedType");
  45415. }
  45416. tsParseFunctionOrConstructorType(type, abstract) {
  45417. const node = this.startNode();
  45418. if (type === "TSConstructorType") {
  45419. node.abstract = !!abstract;
  45420. if (abstract)
  45421. this.next();
  45422. this.next();
  45423. }
  45424. this.tsFillSignature(types$12.arrow, node);
  45425. return this.finishNode(node, type);
  45426. }
  45427. tsParseLiteralTypeNode() {
  45428. const node = this.startNode();
  45429. node.literal = (() => {
  45430. switch (this.state.type) {
  45431. case types$12.num:
  45432. case types$12.bigint:
  45433. case types$12.string:
  45434. case types$12._true:
  45435. case types$12._false:
  45436. return this.parseExprAtom();
  45437. default:
  45438. throw this.unexpected();
  45439. }
  45440. })();
  45441. return this.finishNode(node, "TSLiteralType");
  45442. }
  45443. tsParseTemplateLiteralType() {
  45444. const node = this.startNode();
  45445. node.literal = this.parseTemplate(false);
  45446. return this.finishNode(node, "TSLiteralType");
  45447. }
  45448. parseTemplateSubstitution() {
  45449. if (this.state.inType)
  45450. return this.tsParseType();
  45451. return super.parseTemplateSubstitution();
  45452. }
  45453. tsParseThisTypeOrThisTypePredicate() {
  45454. const thisKeyword = this.tsParseThisTypeNode();
  45455. if (this.isContextual("is") && !this.hasPrecedingLineBreak()) {
  45456. return this.tsParseThisTypePredicate(thisKeyword);
  45457. } else {
  45458. return thisKeyword;
  45459. }
  45460. }
  45461. tsParseNonArrayType() {
  45462. switch (this.state.type) {
  45463. case types$12.name:
  45464. case types$12._void:
  45465. case types$12._null: {
  45466. const type = this.match(types$12._void) ? "TSVoidKeyword" : this.match(types$12._null) ? "TSNullKeyword" : keywordTypeFromName(this.state.value);
  45467. if (type !== void 0 && this.lookaheadCharCode() !== 46) {
  45468. const node = this.startNode();
  45469. this.next();
  45470. return this.finishNode(node, type);
  45471. }
  45472. return this.tsParseTypeReference();
  45473. }
  45474. case types$12.string:
  45475. case types$12.num:
  45476. case types$12.bigint:
  45477. case types$12._true:
  45478. case types$12._false:
  45479. return this.tsParseLiteralTypeNode();
  45480. case types$12.plusMin:
  45481. if (this.state.value === "-") {
  45482. const node = this.startNode();
  45483. const nextToken = this.lookahead();
  45484. if (nextToken.type !== types$12.num && nextToken.type !== types$12.bigint) {
  45485. throw this.unexpected();
  45486. }
  45487. node.literal = this.parseMaybeUnary();
  45488. return this.finishNode(node, "TSLiteralType");
  45489. }
  45490. break;
  45491. case types$12._this:
  45492. return this.tsParseThisTypeOrThisTypePredicate();
  45493. case types$12._typeof:
  45494. return this.tsParseTypeQuery();
  45495. case types$12._import:
  45496. return this.tsParseImportType();
  45497. case types$12.braceL:
  45498. return this.tsLookAhead(this.tsIsStartOfMappedType.bind(this)) ? this.tsParseMappedType() : this.tsParseTypeLiteral();
  45499. case types$12.bracketL:
  45500. return this.tsParseTupleType();
  45501. case types$12.parenL:
  45502. return this.tsParseParenthesizedType();
  45503. case types$12.backQuote:
  45504. return this.tsParseTemplateLiteralType();
  45505. }
  45506. throw this.unexpected();
  45507. }
  45508. tsParseArrayTypeOrHigher() {
  45509. let type = this.tsParseNonArrayType();
  45510. while (!this.hasPrecedingLineBreak() && this.eat(types$12.bracketL)) {
  45511. if (this.match(types$12.bracketR)) {
  45512. const node = this.startNodeAtNode(type);
  45513. node.elementType = type;
  45514. this.expect(types$12.bracketR);
  45515. type = this.finishNode(node, "TSArrayType");
  45516. } else {
  45517. const node = this.startNodeAtNode(type);
  45518. node.objectType = type;
  45519. node.indexType = this.tsParseType();
  45520. this.expect(types$12.bracketR);
  45521. type = this.finishNode(node, "TSIndexedAccessType");
  45522. }
  45523. }
  45524. return type;
  45525. }
  45526. tsParseTypeOperator(operator) {
  45527. const node = this.startNode();
  45528. this.expectContextual(operator);
  45529. node.operator = operator;
  45530. node.typeAnnotation = this.tsParseTypeOperatorOrHigher();
  45531. if (operator === "readonly") {
  45532. this.tsCheckTypeAnnotationForReadOnly(node);
  45533. }
  45534. return this.finishNode(node, "TSTypeOperator");
  45535. }
  45536. tsCheckTypeAnnotationForReadOnly(node) {
  45537. switch (node.typeAnnotation.type) {
  45538. case "TSTupleType":
  45539. case "TSArrayType":
  45540. return;
  45541. default:
  45542. this.raise(node.start, TSErrors.UnexpectedReadonly);
  45543. }
  45544. }
  45545. tsParseInferType() {
  45546. const node = this.startNode();
  45547. this.expectContextual("infer");
  45548. const typeParameter = this.startNode();
  45549. typeParameter.name = this.parseIdentifierName(typeParameter.start);
  45550. node.typeParameter = this.finishNode(typeParameter, "TSTypeParameter");
  45551. return this.finishNode(node, "TSInferType");
  45552. }
  45553. tsParseTypeOperatorOrHigher() {
  45554. const operator = ["keyof", "unique", "readonly"].find((kw2) => this.isContextual(kw2));
  45555. return operator ? this.tsParseTypeOperator(operator) : this.isContextual("infer") ? this.tsParseInferType() : this.tsParseArrayTypeOrHigher();
  45556. }
  45557. tsParseUnionOrIntersectionType(kind, parseConstituentType, operator) {
  45558. const node = this.startNode();
  45559. const hasLeadingOperator = this.eat(operator);
  45560. const types3 = [];
  45561. do {
  45562. types3.push(parseConstituentType());
  45563. } while (this.eat(operator));
  45564. if (types3.length === 1 && !hasLeadingOperator) {
  45565. return types3[0];
  45566. }
  45567. node.types = types3;
  45568. return this.finishNode(node, kind);
  45569. }
  45570. tsParseIntersectionTypeOrHigher() {
  45571. return this.tsParseUnionOrIntersectionType("TSIntersectionType", this.tsParseTypeOperatorOrHigher.bind(this), types$12.bitwiseAND);
  45572. }
  45573. tsParseUnionTypeOrHigher() {
  45574. return this.tsParseUnionOrIntersectionType("TSUnionType", this.tsParseIntersectionTypeOrHigher.bind(this), types$12.bitwiseOR);
  45575. }
  45576. tsIsStartOfFunctionType() {
  45577. if (this.isRelational("<")) {
  45578. return true;
  45579. }
  45580. return this.match(types$12.parenL) && this.tsLookAhead(this.tsIsUnambiguouslyStartOfFunctionType.bind(this));
  45581. }
  45582. tsSkipParameterStart() {
  45583. if (this.match(types$12.name) || this.match(types$12._this)) {
  45584. this.next();
  45585. return true;
  45586. }
  45587. if (this.match(types$12.braceL)) {
  45588. let braceStackCounter = 1;
  45589. this.next();
  45590. while (braceStackCounter > 0) {
  45591. if (this.match(types$12.braceL)) {
  45592. ++braceStackCounter;
  45593. } else if (this.match(types$12.braceR)) {
  45594. --braceStackCounter;
  45595. }
  45596. this.next();
  45597. }
  45598. return true;
  45599. }
  45600. if (this.match(types$12.bracketL)) {
  45601. let braceStackCounter = 1;
  45602. this.next();
  45603. while (braceStackCounter > 0) {
  45604. if (this.match(types$12.bracketL)) {
  45605. ++braceStackCounter;
  45606. } else if (this.match(types$12.bracketR)) {
  45607. --braceStackCounter;
  45608. }
  45609. this.next();
  45610. }
  45611. return true;
  45612. }
  45613. return false;
  45614. }
  45615. tsIsUnambiguouslyStartOfFunctionType() {
  45616. this.next();
  45617. if (this.match(types$12.parenR) || this.match(types$12.ellipsis)) {
  45618. return true;
  45619. }
  45620. if (this.tsSkipParameterStart()) {
  45621. if (this.match(types$12.colon) || this.match(types$12.comma) || this.match(types$12.question) || this.match(types$12.eq)) {
  45622. return true;
  45623. }
  45624. if (this.match(types$12.parenR)) {
  45625. this.next();
  45626. if (this.match(types$12.arrow)) {
  45627. return true;
  45628. }
  45629. }
  45630. }
  45631. return false;
  45632. }
  45633. tsParseTypeOrTypePredicateAnnotation(returnToken) {
  45634. return this.tsInType(() => {
  45635. const t2 = this.startNode();
  45636. this.expect(returnToken);
  45637. const node = this.startNode();
  45638. const asserts = !!this.tsTryParse(this.tsParseTypePredicateAsserts.bind(this));
  45639. if (asserts && this.match(types$12._this)) {
  45640. let thisTypePredicate = this.tsParseThisTypeOrThisTypePredicate();
  45641. if (thisTypePredicate.type === "TSThisType") {
  45642. node.parameterName = thisTypePredicate;
  45643. node.asserts = true;
  45644. node.typeAnnotation = null;
  45645. thisTypePredicate = this.finishNode(node, "TSTypePredicate");
  45646. } else {
  45647. this.resetStartLocationFromNode(thisTypePredicate, node);
  45648. thisTypePredicate.asserts = true;
  45649. }
  45650. t2.typeAnnotation = thisTypePredicate;
  45651. return this.finishNode(t2, "TSTypeAnnotation");
  45652. }
  45653. const typePredicateVariable = this.tsIsIdentifier() && this.tsTryParse(this.tsParseTypePredicatePrefix.bind(this));
  45654. if (!typePredicateVariable) {
  45655. if (!asserts) {
  45656. return this.tsParseTypeAnnotation(false, t2);
  45657. }
  45658. node.parameterName = this.parseIdentifier();
  45659. node.asserts = asserts;
  45660. node.typeAnnotation = null;
  45661. t2.typeAnnotation = this.finishNode(node, "TSTypePredicate");
  45662. return this.finishNode(t2, "TSTypeAnnotation");
  45663. }
  45664. const type = this.tsParseTypeAnnotation(false);
  45665. node.parameterName = typePredicateVariable;
  45666. node.typeAnnotation = type;
  45667. node.asserts = asserts;
  45668. t2.typeAnnotation = this.finishNode(node, "TSTypePredicate");
  45669. return this.finishNode(t2, "TSTypeAnnotation");
  45670. });
  45671. }
  45672. tsTryParseTypeOrTypePredicateAnnotation() {
  45673. return this.match(types$12.colon) ? this.tsParseTypeOrTypePredicateAnnotation(types$12.colon) : void 0;
  45674. }
  45675. tsTryParseTypeAnnotation() {
  45676. return this.match(types$12.colon) ? this.tsParseTypeAnnotation() : void 0;
  45677. }
  45678. tsTryParseType() {
  45679. return this.tsEatThenParseType(types$12.colon);
  45680. }
  45681. tsParseTypePredicatePrefix() {
  45682. const id = this.parseIdentifier();
  45683. if (this.isContextual("is") && !this.hasPrecedingLineBreak()) {
  45684. this.next();
  45685. return id;
  45686. }
  45687. }
  45688. tsParseTypePredicateAsserts() {
  45689. if (!this.match(types$12.name) || this.state.value !== "asserts" || this.hasPrecedingLineBreak()) {
  45690. return false;
  45691. }
  45692. const containsEsc = this.state.containsEsc;
  45693. this.next();
  45694. if (!this.match(types$12.name) && !this.match(types$12._this)) {
  45695. return false;
  45696. }
  45697. if (containsEsc) {
  45698. this.raise(this.state.lastTokStart, ErrorMessages.InvalidEscapedReservedWord, "asserts");
  45699. }
  45700. return true;
  45701. }
  45702. tsParseTypeAnnotation(eatColon = true, t2 = this.startNode()) {
  45703. this.tsInType(() => {
  45704. if (eatColon)
  45705. this.expect(types$12.colon);
  45706. t2.typeAnnotation = this.tsParseType();
  45707. });
  45708. return this.finishNode(t2, "TSTypeAnnotation");
  45709. }
  45710. tsParseType() {
  45711. assert(this.state.inType);
  45712. const type = this.tsParseNonConditionalType();
  45713. if (this.hasPrecedingLineBreak() || !this.eat(types$12._extends)) {
  45714. return type;
  45715. }
  45716. const node = this.startNodeAtNode(type);
  45717. node.checkType = type;
  45718. node.extendsType = this.tsParseNonConditionalType();
  45719. this.expect(types$12.question);
  45720. node.trueType = this.tsParseType();
  45721. this.expect(types$12.colon);
  45722. node.falseType = this.tsParseType();
  45723. return this.finishNode(node, "TSConditionalType");
  45724. }
  45725. isAbstractConstructorSignature() {
  45726. return this.isContextual("abstract") && this.lookahead().type === types$12._new;
  45727. }
  45728. tsParseNonConditionalType() {
  45729. if (this.tsIsStartOfFunctionType()) {
  45730. return this.tsParseFunctionOrConstructorType("TSFunctionType");
  45731. }
  45732. if (this.match(types$12._new)) {
  45733. return this.tsParseFunctionOrConstructorType("TSConstructorType");
  45734. } else if (this.isAbstractConstructorSignature()) {
  45735. return this.tsParseFunctionOrConstructorType("TSConstructorType", true);
  45736. }
  45737. return this.tsParseUnionTypeOrHigher();
  45738. }
  45739. tsParseTypeAssertion() {
  45740. const node = this.startNode();
  45741. const _const = this.tsTryNextParseConstantContext();
  45742. node.typeAnnotation = _const || this.tsNextThenParseType();
  45743. this.expectRelational(">");
  45744. node.expression = this.parseMaybeUnary();
  45745. return this.finishNode(node, "TSTypeAssertion");
  45746. }
  45747. tsParseHeritageClause(descriptor) {
  45748. const originalStart = this.state.start;
  45749. const delimitedList = this.tsParseDelimitedList("HeritageClauseElement", this.tsParseExpressionWithTypeArguments.bind(this));
  45750. if (!delimitedList.length) {
  45751. this.raise(originalStart, TSErrors.EmptyHeritageClauseType, descriptor);
  45752. }
  45753. return delimitedList;
  45754. }
  45755. tsParseExpressionWithTypeArguments() {
  45756. const node = this.startNode();
  45757. node.expression = this.tsParseEntityName(false);
  45758. if (this.isRelational("<")) {
  45759. node.typeParameters = this.tsParseTypeArguments();
  45760. }
  45761. return this.finishNode(node, "TSExpressionWithTypeArguments");
  45762. }
  45763. tsParseInterfaceDeclaration(node) {
  45764. node.id = this.parseIdentifier();
  45765. this.checkLVal(node.id, "typescript interface declaration", BIND_TS_INTERFACE);
  45766. node.typeParameters = this.tsTryParseTypeParameters();
  45767. if (this.eat(types$12._extends)) {
  45768. node.extends = this.tsParseHeritageClause("extends");
  45769. }
  45770. const body = this.startNode();
  45771. body.body = this.tsInType(this.tsParseObjectTypeMembers.bind(this));
  45772. node.body = this.finishNode(body, "TSInterfaceBody");
  45773. return this.finishNode(node, "TSInterfaceDeclaration");
  45774. }
  45775. tsParseTypeAliasDeclaration(node) {
  45776. node.id = this.parseIdentifier();
  45777. this.checkLVal(node.id, "typescript type alias", BIND_TS_TYPE);
  45778. node.typeParameters = this.tsTryParseTypeParameters();
  45779. node.typeAnnotation = this.tsInType(() => {
  45780. this.expect(types$12.eq);
  45781. if (this.isContextual("intrinsic") && this.lookahead().type !== types$12.dot) {
  45782. const node2 = this.startNode();
  45783. this.next();
  45784. return this.finishNode(node2, "TSIntrinsicKeyword");
  45785. }
  45786. return this.tsParseType();
  45787. });
  45788. this.semicolon();
  45789. return this.finishNode(node, "TSTypeAliasDeclaration");
  45790. }
  45791. tsInNoContext(cb) {
  45792. const oldContext = this.state.context;
  45793. this.state.context = [oldContext[0]];
  45794. try {
  45795. return cb();
  45796. } finally {
  45797. this.state.context = oldContext;
  45798. }
  45799. }
  45800. tsInType(cb) {
  45801. const oldInType = this.state.inType;
  45802. this.state.inType = true;
  45803. try {
  45804. return cb();
  45805. } finally {
  45806. this.state.inType = oldInType;
  45807. }
  45808. }
  45809. tsEatThenParseType(token) {
  45810. return !this.match(token) ? void 0 : this.tsNextThenParseType();
  45811. }
  45812. tsExpectThenParseType(token) {
  45813. return this.tsDoThenParseType(() => this.expect(token));
  45814. }
  45815. tsNextThenParseType() {
  45816. return this.tsDoThenParseType(() => this.next());
  45817. }
  45818. tsDoThenParseType(cb) {
  45819. return this.tsInType(() => {
  45820. cb();
  45821. return this.tsParseType();
  45822. });
  45823. }
  45824. tsParseEnumMember() {
  45825. const node = this.startNode();
  45826. node.id = this.match(types$12.string) ? this.parseExprAtom() : this.parseIdentifier(true);
  45827. if (this.eat(types$12.eq)) {
  45828. node.initializer = this.parseMaybeAssignAllowIn();
  45829. }
  45830. return this.finishNode(node, "TSEnumMember");
  45831. }
  45832. tsParseEnumDeclaration(node, isConst) {
  45833. if (isConst)
  45834. node.const = true;
  45835. node.id = this.parseIdentifier();
  45836. this.checkLVal(node.id, "typescript enum declaration", isConst ? BIND_TS_CONST_ENUM : BIND_TS_ENUM);
  45837. this.expect(types$12.braceL);
  45838. node.members = this.tsParseDelimitedList("EnumMembers", this.tsParseEnumMember.bind(this));
  45839. this.expect(types$12.braceR);
  45840. return this.finishNode(node, "TSEnumDeclaration");
  45841. }
  45842. tsParseModuleBlock() {
  45843. const node = this.startNode();
  45844. this.scope.enter(SCOPE_OTHER);
  45845. this.expect(types$12.braceL);
  45846. this.parseBlockOrModuleBlockBody(node.body = [], void 0, true, types$12.braceR);
  45847. this.scope.exit();
  45848. return this.finishNode(node, "TSModuleBlock");
  45849. }
  45850. tsParseModuleOrNamespaceDeclaration(node, nested = false) {
  45851. node.id = this.parseIdentifier();
  45852. if (!nested) {
  45853. this.checkLVal(node.id, "module or namespace declaration", BIND_TS_NAMESPACE);
  45854. }
  45855. if (this.eat(types$12.dot)) {
  45856. const inner = this.startNode();
  45857. this.tsParseModuleOrNamespaceDeclaration(inner, true);
  45858. node.body = inner;
  45859. } else {
  45860. this.scope.enter(SCOPE_TS_MODULE);
  45861. this.prodParam.enter(PARAM);
  45862. node.body = this.tsParseModuleBlock();
  45863. this.prodParam.exit();
  45864. this.scope.exit();
  45865. }
  45866. return this.finishNode(node, "TSModuleDeclaration");
  45867. }
  45868. tsParseAmbientExternalModuleDeclaration(node) {
  45869. if (this.isContextual("global")) {
  45870. node.global = true;
  45871. node.id = this.parseIdentifier();
  45872. } else if (this.match(types$12.string)) {
  45873. node.id = this.parseExprAtom();
  45874. } else {
  45875. this.unexpected();
  45876. }
  45877. if (this.match(types$12.braceL)) {
  45878. this.scope.enter(SCOPE_TS_MODULE);
  45879. this.prodParam.enter(PARAM);
  45880. node.body = this.tsParseModuleBlock();
  45881. this.prodParam.exit();
  45882. this.scope.exit();
  45883. } else {
  45884. this.semicolon();
  45885. }
  45886. return this.finishNode(node, "TSModuleDeclaration");
  45887. }
  45888. tsParseImportEqualsDeclaration(node, isExport) {
  45889. node.isExport = isExport || false;
  45890. node.id = this.parseIdentifier();
  45891. this.checkLVal(node.id, "import equals declaration", BIND_LEXICAL2);
  45892. this.expect(types$12.eq);
  45893. const moduleReference = this.tsParseModuleReference();
  45894. if (node.importKind === "type" && moduleReference.type !== "TSExternalModuleReference") {
  45895. this.raise(moduleReference.start, TSErrors.ImportAliasHasImportType);
  45896. }
  45897. node.moduleReference = moduleReference;
  45898. this.semicolon();
  45899. return this.finishNode(node, "TSImportEqualsDeclaration");
  45900. }
  45901. tsIsExternalModuleReference() {
  45902. return this.isContextual("require") && this.lookaheadCharCode() === 40;
  45903. }
  45904. tsParseModuleReference() {
  45905. return this.tsIsExternalModuleReference() ? this.tsParseExternalModuleReference() : this.tsParseEntityName(false);
  45906. }
  45907. tsParseExternalModuleReference() {
  45908. const node = this.startNode();
  45909. this.expectContextual("require");
  45910. this.expect(types$12.parenL);
  45911. if (!this.match(types$12.string)) {
  45912. throw this.unexpected();
  45913. }
  45914. node.expression = this.parseExprAtom();
  45915. this.expect(types$12.parenR);
  45916. return this.finishNode(node, "TSExternalModuleReference");
  45917. }
  45918. tsLookAhead(f) {
  45919. const state = this.state.clone();
  45920. const res = f();
  45921. this.state = state;
  45922. return res;
  45923. }
  45924. tsTryParseAndCatch(f) {
  45925. const result = this.tryParse((abort) => f() || abort());
  45926. if (result.aborted || !result.node)
  45927. return void 0;
  45928. if (result.error)
  45929. this.state = result.failState;
  45930. return result.node;
  45931. }
  45932. tsTryParse(f) {
  45933. const state = this.state.clone();
  45934. const result = f();
  45935. if (result !== void 0 && result !== false) {
  45936. return result;
  45937. } else {
  45938. this.state = state;
  45939. return void 0;
  45940. }
  45941. }
  45942. tsTryParseDeclare(nany) {
  45943. if (this.isLineTerminator()) {
  45944. return;
  45945. }
  45946. let starttype = this.state.type;
  45947. let kind;
  45948. if (this.isContextual("let")) {
  45949. starttype = types$12._var;
  45950. kind = "let";
  45951. }
  45952. return this.tsInAmbientContext(() => {
  45953. switch (starttype) {
  45954. case types$12._function:
  45955. nany.declare = true;
  45956. return this.parseFunctionStatement(nany, false, true);
  45957. case types$12._class:
  45958. nany.declare = true;
  45959. return this.parseClass(nany, true, false);
  45960. case types$12._const:
  45961. if (this.match(types$12._const) && this.isLookaheadContextual("enum")) {
  45962. this.expect(types$12._const);
  45963. this.expectContextual("enum");
  45964. return this.tsParseEnumDeclaration(nany, true);
  45965. }
  45966. case types$12._var:
  45967. kind = kind || this.state.value;
  45968. return this.parseVarStatement(nany, kind);
  45969. case types$12.name: {
  45970. const value = this.state.value;
  45971. if (value === "global") {
  45972. return this.tsParseAmbientExternalModuleDeclaration(nany);
  45973. } else {
  45974. return this.tsParseDeclaration(nany, value, true);
  45975. }
  45976. }
  45977. }
  45978. });
  45979. }
  45980. tsTryParseExportDeclaration() {
  45981. return this.tsParseDeclaration(this.startNode(), this.state.value, true);
  45982. }
  45983. tsParseExpressionStatement(node, expr) {
  45984. switch (expr.name) {
  45985. case "declare": {
  45986. const declaration = this.tsTryParseDeclare(node);
  45987. if (declaration) {
  45988. declaration.declare = true;
  45989. return declaration;
  45990. }
  45991. break;
  45992. }
  45993. case "global":
  45994. if (this.match(types$12.braceL)) {
  45995. this.scope.enter(SCOPE_TS_MODULE);
  45996. this.prodParam.enter(PARAM);
  45997. const mod = node;
  45998. mod.global = true;
  45999. mod.id = expr;
  46000. mod.body = this.tsParseModuleBlock();
  46001. this.scope.exit();
  46002. this.prodParam.exit();
  46003. return this.finishNode(mod, "TSModuleDeclaration");
  46004. }
  46005. break;
  46006. default:
  46007. return this.tsParseDeclaration(node, expr.name, false);
  46008. }
  46009. }
  46010. tsParseDeclaration(node, value, next) {
  46011. switch (value) {
  46012. case "abstract":
  46013. if (this.tsCheckLineTerminator(next) && (this.match(types$12._class) || this.match(types$12.name))) {
  46014. return this.tsParseAbstractDeclaration(node);
  46015. }
  46016. break;
  46017. case "enum":
  46018. if (next || this.match(types$12.name)) {
  46019. if (next)
  46020. this.next();
  46021. return this.tsParseEnumDeclaration(node, false);
  46022. }
  46023. break;
  46024. case "interface":
  46025. if (this.tsCheckLineTerminator(next) && this.match(types$12.name)) {
  46026. return this.tsParseInterfaceDeclaration(node);
  46027. }
  46028. break;
  46029. case "module":
  46030. if (this.tsCheckLineTerminator(next)) {
  46031. if (this.match(types$12.string)) {
  46032. return this.tsParseAmbientExternalModuleDeclaration(node);
  46033. } else if (this.match(types$12.name)) {
  46034. return this.tsParseModuleOrNamespaceDeclaration(node);
  46035. }
  46036. }
  46037. break;
  46038. case "namespace":
  46039. if (this.tsCheckLineTerminator(next) && this.match(types$12.name)) {
  46040. return this.tsParseModuleOrNamespaceDeclaration(node);
  46041. }
  46042. break;
  46043. case "type":
  46044. if (this.tsCheckLineTerminator(next) && this.match(types$12.name)) {
  46045. return this.tsParseTypeAliasDeclaration(node);
  46046. }
  46047. break;
  46048. }
  46049. }
  46050. tsCheckLineTerminator(next) {
  46051. if (next) {
  46052. if (this.hasFollowingLineBreak())
  46053. return false;
  46054. this.next();
  46055. return true;
  46056. }
  46057. return !this.isLineTerminator();
  46058. }
  46059. tsTryParseGenericAsyncArrowFunction(startPos, startLoc) {
  46060. if (!this.isRelational("<")) {
  46061. return void 0;
  46062. }
  46063. const oldMaybeInArrowParameters = this.state.maybeInArrowParameters;
  46064. this.state.maybeInArrowParameters = true;
  46065. const res = this.tsTryParseAndCatch(() => {
  46066. const node = this.startNodeAt(startPos, startLoc);
  46067. node.typeParameters = this.tsParseTypeParameters();
  46068. super.parseFunctionParams(node);
  46069. node.returnType = this.tsTryParseTypeOrTypePredicateAnnotation();
  46070. this.expect(types$12.arrow);
  46071. return node;
  46072. });
  46073. this.state.maybeInArrowParameters = oldMaybeInArrowParameters;
  46074. if (!res) {
  46075. return void 0;
  46076. }
  46077. return this.parseArrowExpression(res, null, true);
  46078. }
  46079. tsParseTypeArguments() {
  46080. const node = this.startNode();
  46081. node.params = this.tsInType(() => this.tsInNoContext(() => {
  46082. this.expectRelational("<");
  46083. return this.tsParseDelimitedList("TypeParametersOrArguments", this.tsParseType.bind(this));
  46084. }));
  46085. if (node.params.length === 0) {
  46086. this.raise(node.start, TSErrors.EmptyTypeArguments);
  46087. }
  46088. this.state.exprAllowed = false;
  46089. this.expectRelational(">");
  46090. return this.finishNode(node, "TSTypeParameterInstantiation");
  46091. }
  46092. tsIsDeclarationStart() {
  46093. if (this.match(types$12.name)) {
  46094. switch (this.state.value) {
  46095. case "abstract":
  46096. case "declare":
  46097. case "enum":
  46098. case "interface":
  46099. case "module":
  46100. case "namespace":
  46101. case "type":
  46102. return true;
  46103. }
  46104. }
  46105. return false;
  46106. }
  46107. isExportDefaultSpecifier() {
  46108. if (this.tsIsDeclarationStart())
  46109. return false;
  46110. return super.isExportDefaultSpecifier();
  46111. }
  46112. parseAssignableListItem(allowModifiers, decorators) {
  46113. const startPos = this.state.start;
  46114. const startLoc = this.state.startLoc;
  46115. let accessibility;
  46116. let readonly = false;
  46117. if (allowModifiers !== void 0) {
  46118. accessibility = this.parseAccessModifier();
  46119. readonly = !!this.tsParseModifier(["readonly"]);
  46120. if (allowModifiers === false && (accessibility || readonly)) {
  46121. this.raise(startPos, TSErrors.UnexpectedParameterModifier);
  46122. }
  46123. }
  46124. const left = this.parseMaybeDefault();
  46125. this.parseAssignableListItemTypes(left);
  46126. const elt = this.parseMaybeDefault(left.start, left.loc.start, left);
  46127. if (accessibility || readonly) {
  46128. const pp2 = this.startNodeAt(startPos, startLoc);
  46129. if (decorators.length) {
  46130. pp2.decorators = decorators;
  46131. }
  46132. if (accessibility)
  46133. pp2.accessibility = accessibility;
  46134. if (readonly)
  46135. pp2.readonly = readonly;
  46136. if (elt.type !== "Identifier" && elt.type !== "AssignmentPattern") {
  46137. this.raise(pp2.start, TSErrors.UnsupportedParameterPropertyKind);
  46138. }
  46139. pp2.parameter = elt;
  46140. return this.finishNode(pp2, "TSParameterProperty");
  46141. }
  46142. if (decorators.length) {
  46143. left.decorators = decorators;
  46144. }
  46145. return elt;
  46146. }
  46147. parseFunctionBodyAndFinish(node, type, isMethod = false) {
  46148. if (this.match(types$12.colon)) {
  46149. node.returnType = this.tsParseTypeOrTypePredicateAnnotation(types$12.colon);
  46150. }
  46151. const bodilessType = type === "FunctionDeclaration" ? "TSDeclareFunction" : type === "ClassMethod" ? "TSDeclareMethod" : void 0;
  46152. if (bodilessType && !this.match(types$12.braceL) && this.isLineTerminator()) {
  46153. this.finishNode(node, bodilessType);
  46154. return;
  46155. }
  46156. if (bodilessType === "TSDeclareFunction" && this.state.isAmbientContext) {
  46157. this.raise(node.start, TSErrors.DeclareFunctionHasImplementation);
  46158. if (node.declare) {
  46159. super.parseFunctionBodyAndFinish(node, bodilessType, isMethod);
  46160. return;
  46161. }
  46162. }
  46163. super.parseFunctionBodyAndFinish(node, type, isMethod);
  46164. }
  46165. registerFunctionStatementId(node) {
  46166. if (!node.body && node.id) {
  46167. this.checkLVal(node.id, "function name", BIND_TS_AMBIENT);
  46168. } else {
  46169. super.registerFunctionStatementId(...arguments);
  46170. }
  46171. }
  46172. tsCheckForInvalidTypeCasts(items) {
  46173. items.forEach((node) => {
  46174. if ((node == null ? void 0 : node.type) === "TSTypeCastExpression") {
  46175. this.raise(node.typeAnnotation.start, TSErrors.UnexpectedTypeAnnotation);
  46176. }
  46177. });
  46178. }
  46179. toReferencedList(exprList, isInParens) {
  46180. this.tsCheckForInvalidTypeCasts(exprList);
  46181. return exprList;
  46182. }
  46183. parseArrayLike(...args) {
  46184. const node = super.parseArrayLike(...args);
  46185. if (node.type === "ArrayExpression") {
  46186. this.tsCheckForInvalidTypeCasts(node.elements);
  46187. }
  46188. return node;
  46189. }
  46190. parseSubscript(base2, startPos, startLoc, noCalls, state) {
  46191. if (!this.hasPrecedingLineBreak() && this.match(types$12.bang)) {
  46192. this.state.exprAllowed = false;
  46193. this.next();
  46194. const nonNullExpression = this.startNodeAt(startPos, startLoc);
  46195. nonNullExpression.expression = base2;
  46196. return this.finishNode(nonNullExpression, "TSNonNullExpression");
  46197. }
  46198. if (this.isRelational("<")) {
  46199. const result = this.tsTryParseAndCatch(() => {
  46200. if (!noCalls && this.atPossibleAsyncArrow(base2)) {
  46201. const asyncArrowFn = this.tsTryParseGenericAsyncArrowFunction(startPos, startLoc);
  46202. if (asyncArrowFn) {
  46203. return asyncArrowFn;
  46204. }
  46205. }
  46206. const node = this.startNodeAt(startPos, startLoc);
  46207. node.callee = base2;
  46208. const typeArguments = this.tsParseTypeArguments();
  46209. if (typeArguments) {
  46210. if (!noCalls && this.eat(types$12.parenL)) {
  46211. node.arguments = this.parseCallExpressionArguments(types$12.parenR, false);
  46212. this.tsCheckForInvalidTypeCasts(node.arguments);
  46213. node.typeParameters = typeArguments;
  46214. if (state.optionalChainMember) {
  46215. node.optional = false;
  46216. }
  46217. return this.finishCallExpression(node, state.optionalChainMember);
  46218. } else if (this.match(types$12.backQuote)) {
  46219. const result2 = this.parseTaggedTemplateExpression(base2, startPos, startLoc, state);
  46220. result2.typeParameters = typeArguments;
  46221. return result2;
  46222. }
  46223. }
  46224. this.unexpected();
  46225. });
  46226. if (result)
  46227. return result;
  46228. }
  46229. return super.parseSubscript(base2, startPos, startLoc, noCalls, state);
  46230. }
  46231. parseNewArguments(node) {
  46232. if (this.isRelational("<")) {
  46233. const typeParameters = this.tsTryParseAndCatch(() => {
  46234. const args = this.tsParseTypeArguments();
  46235. if (!this.match(types$12.parenL))
  46236. this.unexpected();
  46237. return args;
  46238. });
  46239. if (typeParameters) {
  46240. node.typeParameters = typeParameters;
  46241. }
  46242. }
  46243. super.parseNewArguments(node);
  46244. }
  46245. parseExprOp(left, leftStartPos, leftStartLoc, minPrec) {
  46246. if (nonNull(types$12._in.binop) > minPrec && !this.hasPrecedingLineBreak() && this.isContextual("as")) {
  46247. const node = this.startNodeAt(leftStartPos, leftStartLoc);
  46248. node.expression = left;
  46249. const _const = this.tsTryNextParseConstantContext();
  46250. if (_const) {
  46251. node.typeAnnotation = _const;
  46252. } else {
  46253. node.typeAnnotation = this.tsNextThenParseType();
  46254. }
  46255. this.finishNode(node, "TSAsExpression");
  46256. this.reScan_lt_gt();
  46257. return this.parseExprOp(node, leftStartPos, leftStartLoc, minPrec);
  46258. }
  46259. return super.parseExprOp(left, leftStartPos, leftStartLoc, minPrec);
  46260. }
  46261. checkReservedWord(word, startLoc, checkKeywords, isBinding) {
  46262. }
  46263. checkDuplicateExports() {
  46264. }
  46265. parseImport(node) {
  46266. node.importKind = "value";
  46267. if (this.match(types$12.name) || this.match(types$12.star) || this.match(types$12.braceL)) {
  46268. let ahead = this.lookahead();
  46269. if (this.isContextual("type") && ahead.type !== types$12.comma && !(ahead.type === types$12.name && ahead.value === "from") && ahead.type !== types$12.eq) {
  46270. node.importKind = "type";
  46271. this.next();
  46272. ahead = this.lookahead();
  46273. }
  46274. if (this.match(types$12.name) && ahead.type === types$12.eq) {
  46275. return this.tsParseImportEqualsDeclaration(node);
  46276. }
  46277. }
  46278. const importNode = super.parseImport(node);
  46279. if (importNode.importKind === "type" && importNode.specifiers.length > 1 && importNode.specifiers[0].type === "ImportDefaultSpecifier") {
  46280. this.raise(importNode.start, TSErrors.TypeImportCannotSpecifyDefaultAndNamed);
  46281. }
  46282. return importNode;
  46283. }
  46284. parseExport(node) {
  46285. if (this.match(types$12._import)) {
  46286. this.next();
  46287. if (this.isContextual("type") && this.lookaheadCharCode() !== 61) {
  46288. node.importKind = "type";
  46289. this.next();
  46290. } else {
  46291. node.importKind = "value";
  46292. }
  46293. return this.tsParseImportEqualsDeclaration(node, true);
  46294. } else if (this.eat(types$12.eq)) {
  46295. const assign = node;
  46296. assign.expression = this.parseExpression();
  46297. this.semicolon();
  46298. return this.finishNode(assign, "TSExportAssignment");
  46299. } else if (this.eatContextual("as")) {
  46300. const decl = node;
  46301. this.expectContextual("namespace");
  46302. decl.id = this.parseIdentifier();
  46303. this.semicolon();
  46304. return this.finishNode(decl, "TSNamespaceExportDeclaration");
  46305. } else {
  46306. if (this.isContextual("type") && this.lookahead().type === types$12.braceL) {
  46307. this.next();
  46308. node.exportKind = "type";
  46309. } else {
  46310. node.exportKind = "value";
  46311. }
  46312. return super.parseExport(node);
  46313. }
  46314. }
  46315. isAbstractClass() {
  46316. return this.isContextual("abstract") && this.lookahead().type === types$12._class;
  46317. }
  46318. parseExportDefaultExpression() {
  46319. if (this.isAbstractClass()) {
  46320. const cls = this.startNode();
  46321. this.next();
  46322. cls.abstract = true;
  46323. this.parseClass(cls, true, true);
  46324. return cls;
  46325. }
  46326. if (this.state.value === "interface") {
  46327. const result = this.tsParseDeclaration(this.startNode(), this.state.value, true);
  46328. if (result)
  46329. return result;
  46330. }
  46331. return super.parseExportDefaultExpression();
  46332. }
  46333. parseStatementContent(context, topLevel) {
  46334. if (this.state.type === types$12._const) {
  46335. const ahead = this.lookahead();
  46336. if (ahead.type === types$12.name && ahead.value === "enum") {
  46337. const node = this.startNode();
  46338. this.expect(types$12._const);
  46339. this.expectContextual("enum");
  46340. return this.tsParseEnumDeclaration(node, true);
  46341. }
  46342. }
  46343. return super.parseStatementContent(context, topLevel);
  46344. }
  46345. parseAccessModifier() {
  46346. return this.tsParseModifier(["public", "protected", "private"]);
  46347. }
  46348. tsHasSomeModifiers(member, modifiers) {
  46349. return modifiers.some((modifier) => {
  46350. if (tsIsAccessModifier(modifier)) {
  46351. return member.accessibility === modifier;
  46352. }
  46353. return !!member[modifier];
  46354. });
  46355. }
  46356. parseClassMember(classBody, member, state) {
  46357. const invalidModifersForStaticBlocks = ["declare", "private", "public", "protected", "override", "abstract", "readonly"];
  46358. this.tsParseModifiers(member, invalidModifersForStaticBlocks.concat(["static"]));
  46359. const callParseClassMemberWithIsStatic = () => {
  46360. const isStatic = !!member.static;
  46361. if (isStatic && this.eat(types$12.braceL)) {
  46362. if (this.tsHasSomeModifiers(member, invalidModifersForStaticBlocks)) {
  46363. this.raise(this.state.pos, TSErrors.StaticBlockCannotHaveModifier);
  46364. }
  46365. this.parseClassStaticBlock(classBody, member);
  46366. } else {
  46367. this.parseClassMemberWithIsStatic(classBody, member, state, isStatic);
  46368. }
  46369. };
  46370. if (member.declare) {
  46371. this.tsInAmbientContext(callParseClassMemberWithIsStatic);
  46372. } else {
  46373. callParseClassMemberWithIsStatic();
  46374. }
  46375. }
  46376. parseClassMemberWithIsStatic(classBody, member, state, isStatic) {
  46377. const idx = this.tsTryParseIndexSignature(member);
  46378. if (idx) {
  46379. classBody.body.push(idx);
  46380. if (member.abstract) {
  46381. this.raise(member.start, TSErrors.IndexSignatureHasAbstract);
  46382. }
  46383. if (member.accessibility) {
  46384. this.raise(member.start, TSErrors.IndexSignatureHasAccessibility, member.accessibility);
  46385. }
  46386. if (member.declare) {
  46387. this.raise(member.start, TSErrors.IndexSignatureHasDeclare);
  46388. }
  46389. if (member.override) {
  46390. this.raise(member.start, TSErrors.IndexSignatureHasOverride);
  46391. }
  46392. return;
  46393. }
  46394. if (!this.state.inAbstractClass && member.abstract) {
  46395. this.raise(member.start, TSErrors.NonAbstractClassHasAbstractMethod);
  46396. }
  46397. if (member.override) {
  46398. if (!state.hadSuperClass) {
  46399. this.raise(member.start, TSErrors.OverrideNotInSubClass);
  46400. }
  46401. }
  46402. super.parseClassMemberWithIsStatic(classBody, member, state, isStatic);
  46403. }
  46404. parsePostMemberNameModifiers(methodOrProp) {
  46405. const optional = this.eat(types$12.question);
  46406. if (optional)
  46407. methodOrProp.optional = true;
  46408. if (methodOrProp.readonly && this.match(types$12.parenL)) {
  46409. this.raise(methodOrProp.start, TSErrors.ClassMethodHasReadonly);
  46410. }
  46411. if (methodOrProp.declare && this.match(types$12.parenL)) {
  46412. this.raise(methodOrProp.start, TSErrors.ClassMethodHasDeclare);
  46413. }
  46414. }
  46415. parseExpressionStatement(node, expr) {
  46416. const decl = expr.type === "Identifier" ? this.tsParseExpressionStatement(node, expr) : void 0;
  46417. return decl || super.parseExpressionStatement(node, expr);
  46418. }
  46419. shouldParseExportDeclaration() {
  46420. if (this.tsIsDeclarationStart())
  46421. return true;
  46422. return super.shouldParseExportDeclaration();
  46423. }
  46424. parseConditional(expr, startPos, startLoc, refNeedsArrowPos) {
  46425. if (!refNeedsArrowPos || !this.match(types$12.question)) {
  46426. return super.parseConditional(expr, startPos, startLoc, refNeedsArrowPos);
  46427. }
  46428. const result = this.tryParse(() => super.parseConditional(expr, startPos, startLoc));
  46429. if (!result.node) {
  46430. refNeedsArrowPos.start = result.error.pos || this.state.start;
  46431. return expr;
  46432. }
  46433. if (result.error)
  46434. this.state = result.failState;
  46435. return result.node;
  46436. }
  46437. parseParenItem(node, startPos, startLoc) {
  46438. node = super.parseParenItem(node, startPos, startLoc);
  46439. if (this.eat(types$12.question)) {
  46440. node.optional = true;
  46441. this.resetEndLocation(node);
  46442. }
  46443. if (this.match(types$12.colon)) {
  46444. const typeCastNode = this.startNodeAt(startPos, startLoc);
  46445. typeCastNode.expression = node;
  46446. typeCastNode.typeAnnotation = this.tsParseTypeAnnotation();
  46447. return this.finishNode(typeCastNode, "TSTypeCastExpression");
  46448. }
  46449. return node;
  46450. }
  46451. parseExportDeclaration(node) {
  46452. const startPos = this.state.start;
  46453. const startLoc = this.state.startLoc;
  46454. const isDeclare = this.eatContextual("declare");
  46455. if (isDeclare && (this.isContextual("declare") || !this.shouldParseExportDeclaration())) {
  46456. throw this.raise(this.state.start, TSErrors.ExpectedAmbientAfterExportDeclare);
  46457. }
  46458. let declaration;
  46459. if (this.match(types$12.name)) {
  46460. declaration = this.tsTryParseExportDeclaration();
  46461. }
  46462. if (!declaration) {
  46463. declaration = super.parseExportDeclaration(node);
  46464. }
  46465. if (declaration && (declaration.type === "TSInterfaceDeclaration" || declaration.type === "TSTypeAliasDeclaration" || isDeclare)) {
  46466. node.exportKind = "type";
  46467. }
  46468. if (declaration && isDeclare) {
  46469. this.resetStartLocation(declaration, startPos, startLoc);
  46470. declaration.declare = true;
  46471. }
  46472. return declaration;
  46473. }
  46474. parseClassId(node, isStatement, optionalId) {
  46475. if ((!isStatement || optionalId) && this.isContextual("implements")) {
  46476. return;
  46477. }
  46478. super.parseClassId(node, isStatement, optionalId, node.declare ? BIND_TS_AMBIENT : BIND_CLASS);
  46479. const typeParameters = this.tsTryParseTypeParameters();
  46480. if (typeParameters)
  46481. node.typeParameters = typeParameters;
  46482. }
  46483. parseClassPropertyAnnotation(node) {
  46484. if (!node.optional && this.eat(types$12.bang)) {
  46485. node.definite = true;
  46486. }
  46487. const type = this.tsTryParseTypeAnnotation();
  46488. if (type)
  46489. node.typeAnnotation = type;
  46490. }
  46491. parseClassProperty(node) {
  46492. this.parseClassPropertyAnnotation(node);
  46493. if (this.state.isAmbientContext && this.match(types$12.eq)) {
  46494. this.raise(this.state.start, TSErrors.DeclareClassFieldHasInitializer);
  46495. }
  46496. return super.parseClassProperty(node);
  46497. }
  46498. parseClassPrivateProperty(node) {
  46499. if (node.abstract) {
  46500. this.raise(node.start, TSErrors.PrivateElementHasAbstract);
  46501. }
  46502. if (node.accessibility) {
  46503. this.raise(node.start, TSErrors.PrivateElementHasAccessibility, node.accessibility);
  46504. }
  46505. this.parseClassPropertyAnnotation(node);
  46506. return super.parseClassPrivateProperty(node);
  46507. }
  46508. pushClassMethod(classBody, method, isGenerator, isAsync, isConstructor, allowsDirectSuper) {
  46509. const typeParameters = this.tsTryParseTypeParameters();
  46510. if (typeParameters && isConstructor) {
  46511. this.raise(typeParameters.start, TSErrors.ConstructorHasTypeParameters);
  46512. }
  46513. if (method.declare && (method.kind === "get" || method.kind === "set")) {
  46514. this.raise(method.start, TSErrors.DeclareAccessor, method.kind);
  46515. }
  46516. if (typeParameters)
  46517. method.typeParameters = typeParameters;
  46518. super.pushClassMethod(classBody, method, isGenerator, isAsync, isConstructor, allowsDirectSuper);
  46519. }
  46520. pushClassPrivateMethod(classBody, method, isGenerator, isAsync) {
  46521. const typeParameters = this.tsTryParseTypeParameters();
  46522. if (typeParameters)
  46523. method.typeParameters = typeParameters;
  46524. super.pushClassPrivateMethod(classBody, method, isGenerator, isAsync);
  46525. }
  46526. parseClassSuper(node) {
  46527. super.parseClassSuper(node);
  46528. if (node.superClass && this.isRelational("<")) {
  46529. node.superTypeParameters = this.tsParseTypeArguments();
  46530. }
  46531. if (this.eatContextual("implements")) {
  46532. node.implements = this.tsParseHeritageClause("implements");
  46533. }
  46534. }
  46535. parseObjPropValue(prop, ...args) {
  46536. const typeParameters = this.tsTryParseTypeParameters();
  46537. if (typeParameters)
  46538. prop.typeParameters = typeParameters;
  46539. super.parseObjPropValue(prop, ...args);
  46540. }
  46541. parseFunctionParams(node, allowModifiers) {
  46542. const typeParameters = this.tsTryParseTypeParameters();
  46543. if (typeParameters)
  46544. node.typeParameters = typeParameters;
  46545. super.parseFunctionParams(node, allowModifiers);
  46546. }
  46547. parseVarId(decl, kind) {
  46548. super.parseVarId(decl, kind);
  46549. if (decl.id.type === "Identifier" && this.eat(types$12.bang)) {
  46550. decl.definite = true;
  46551. }
  46552. const type = this.tsTryParseTypeAnnotation();
  46553. if (type) {
  46554. decl.id.typeAnnotation = type;
  46555. this.resetEndLocation(decl.id);
  46556. }
  46557. }
  46558. parseAsyncArrowFromCallExpression(node, call) {
  46559. if (this.match(types$12.colon)) {
  46560. node.returnType = this.tsParseTypeAnnotation();
  46561. }
  46562. return super.parseAsyncArrowFromCallExpression(node, call);
  46563. }
  46564. parseMaybeAssign(...args) {
  46565. var _jsx, _jsx2, _typeCast, _jsx3, _typeCast2, _jsx4, _typeCast3;
  46566. let state;
  46567. let jsx2;
  46568. let typeCast;
  46569. if (this.hasPlugin("jsx") && (this.match(types$12.jsxTagStart) || this.isRelational("<"))) {
  46570. state = this.state.clone();
  46571. jsx2 = this.tryParse(() => super.parseMaybeAssign(...args), state);
  46572. if (!jsx2.error)
  46573. return jsx2.node;
  46574. const {
  46575. context
  46576. } = this.state;
  46577. if (context[context.length - 1] === types2.j_oTag) {
  46578. context.length -= 2;
  46579. } else if (context[context.length - 1] === types2.j_expr) {
  46580. context.length -= 1;
  46581. }
  46582. }
  46583. if (!((_jsx = jsx2) != null && _jsx.error) && !this.isRelational("<")) {
  46584. return super.parseMaybeAssign(...args);
  46585. }
  46586. let typeParameters;
  46587. state = state || this.state.clone();
  46588. const arrow = this.tryParse((abort) => {
  46589. var _expr$extra, _typeParameters;
  46590. typeParameters = this.tsParseTypeParameters();
  46591. const expr = super.parseMaybeAssign(...args);
  46592. if (expr.type !== "ArrowFunctionExpression" || (_expr$extra = expr.extra) != null && _expr$extra.parenthesized) {
  46593. abort();
  46594. }
  46595. if (((_typeParameters = typeParameters) == null ? void 0 : _typeParameters.params.length) !== 0) {
  46596. this.resetStartLocationFromNode(expr, typeParameters);
  46597. }
  46598. expr.typeParameters = typeParameters;
  46599. return expr;
  46600. }, state);
  46601. if (!arrow.error && !arrow.aborted)
  46602. return arrow.node;
  46603. if (!jsx2) {
  46604. assert(!this.hasPlugin("jsx"));
  46605. typeCast = this.tryParse(() => super.parseMaybeAssign(...args), state);
  46606. if (!typeCast.error)
  46607. return typeCast.node;
  46608. }
  46609. if ((_jsx2 = jsx2) != null && _jsx2.node) {
  46610. this.state = jsx2.failState;
  46611. return jsx2.node;
  46612. }
  46613. if (arrow.node) {
  46614. this.state = arrow.failState;
  46615. return arrow.node;
  46616. }
  46617. if ((_typeCast = typeCast) != null && _typeCast.node) {
  46618. this.state = typeCast.failState;
  46619. return typeCast.node;
  46620. }
  46621. if ((_jsx3 = jsx2) != null && _jsx3.thrown)
  46622. throw jsx2.error;
  46623. if (arrow.thrown)
  46624. throw arrow.error;
  46625. if ((_typeCast2 = typeCast) != null && _typeCast2.thrown)
  46626. throw typeCast.error;
  46627. throw ((_jsx4 = jsx2) == null ? void 0 : _jsx4.error) || arrow.error || ((_typeCast3 = typeCast) == null ? void 0 : _typeCast3.error);
  46628. }
  46629. parseMaybeUnary(refExpressionErrors) {
  46630. if (!this.hasPlugin("jsx") && this.isRelational("<")) {
  46631. return this.tsParseTypeAssertion();
  46632. } else {
  46633. return super.parseMaybeUnary(refExpressionErrors);
  46634. }
  46635. }
  46636. parseArrow(node) {
  46637. if (this.match(types$12.colon)) {
  46638. const result = this.tryParse((abort) => {
  46639. const returnType = this.tsParseTypeOrTypePredicateAnnotation(types$12.colon);
  46640. if (this.canInsertSemicolon() || !this.match(types$12.arrow))
  46641. abort();
  46642. return returnType;
  46643. });
  46644. if (result.aborted)
  46645. return;
  46646. if (!result.thrown) {
  46647. if (result.error)
  46648. this.state = result.failState;
  46649. node.returnType = result.node;
  46650. }
  46651. }
  46652. return super.parseArrow(node);
  46653. }
  46654. parseAssignableListItemTypes(param) {
  46655. if (this.eat(types$12.question)) {
  46656. if (param.type !== "Identifier" && !this.state.isAmbientContext && !this.state.inType) {
  46657. this.raise(param.start, TSErrors.PatternIsOptional);
  46658. }
  46659. param.optional = true;
  46660. }
  46661. const type = this.tsTryParseTypeAnnotation();
  46662. if (type)
  46663. param.typeAnnotation = type;
  46664. this.resetEndLocation(param);
  46665. return param;
  46666. }
  46667. toAssignable(node, isLHS = false) {
  46668. switch (node.type) {
  46669. case "TSTypeCastExpression":
  46670. return super.toAssignable(this.typeCastToParameter(node), isLHS);
  46671. case "TSParameterProperty":
  46672. return super.toAssignable(node, isLHS);
  46673. case "ParenthesizedExpression":
  46674. return this.toAssignableParenthesizedExpression(node, isLHS);
  46675. case "TSAsExpression":
  46676. case "TSNonNullExpression":
  46677. case "TSTypeAssertion":
  46678. node.expression = this.toAssignable(node.expression, isLHS);
  46679. return node;
  46680. default:
  46681. return super.toAssignable(node, isLHS);
  46682. }
  46683. }
  46684. toAssignableParenthesizedExpression(node, isLHS) {
  46685. switch (node.expression.type) {
  46686. case "TSAsExpression":
  46687. case "TSNonNullExpression":
  46688. case "TSTypeAssertion":
  46689. case "ParenthesizedExpression":
  46690. node.expression = this.toAssignable(node.expression, isLHS);
  46691. return node;
  46692. default:
  46693. return super.toAssignable(node, isLHS);
  46694. }
  46695. }
  46696. checkLVal(expr, contextDescription, ...args) {
  46697. var _expr$extra2;
  46698. switch (expr.type) {
  46699. case "TSTypeCastExpression":
  46700. return;
  46701. case "TSParameterProperty":
  46702. this.checkLVal(expr.parameter, "parameter property", ...args);
  46703. return;
  46704. case "TSAsExpression":
  46705. case "TSTypeAssertion":
  46706. if (!args[0] && contextDescription !== "parenthesized expression" && !((_expr$extra2 = expr.extra) != null && _expr$extra2.parenthesized)) {
  46707. this.raise(expr.start, ErrorMessages.InvalidLhs, contextDescription);
  46708. break;
  46709. }
  46710. this.checkLVal(expr.expression, "parenthesized expression", ...args);
  46711. return;
  46712. case "TSNonNullExpression":
  46713. this.checkLVal(expr.expression, contextDescription, ...args);
  46714. return;
  46715. default:
  46716. super.checkLVal(expr, contextDescription, ...args);
  46717. return;
  46718. }
  46719. }
  46720. parseBindingAtom() {
  46721. switch (this.state.type) {
  46722. case types$12._this:
  46723. return this.parseIdentifier(true);
  46724. default:
  46725. return super.parseBindingAtom();
  46726. }
  46727. }
  46728. parseMaybeDecoratorArguments(expr) {
  46729. if (this.isRelational("<")) {
  46730. const typeArguments = this.tsParseTypeArguments();
  46731. if (this.match(types$12.parenL)) {
  46732. const call = super.parseMaybeDecoratorArguments(expr);
  46733. call.typeParameters = typeArguments;
  46734. return call;
  46735. }
  46736. this.unexpected(this.state.start, types$12.parenL);
  46737. }
  46738. return super.parseMaybeDecoratorArguments(expr);
  46739. }
  46740. checkCommaAfterRest(close) {
  46741. if (this.state.isAmbientContext && this.match(types$12.comma) && this.lookaheadCharCode() === close) {
  46742. this.next();
  46743. } else {
  46744. super.checkCommaAfterRest(close);
  46745. }
  46746. }
  46747. isClassMethod() {
  46748. return this.isRelational("<") || super.isClassMethod();
  46749. }
  46750. isClassProperty() {
  46751. return this.match(types$12.bang) || this.match(types$12.colon) || super.isClassProperty();
  46752. }
  46753. parseMaybeDefault(...args) {
  46754. const node = super.parseMaybeDefault(...args);
  46755. if (node.type === "AssignmentPattern" && node.typeAnnotation && node.right.start < node.typeAnnotation.start) {
  46756. this.raise(node.typeAnnotation.start, TSErrors.TypeAnnotationAfterAssign);
  46757. }
  46758. return node;
  46759. }
  46760. getTokenFromCode(code2) {
  46761. if (this.state.inType && (code2 === 62 || code2 === 60)) {
  46762. return this.finishOp(types$12.relational, 1);
  46763. } else {
  46764. return super.getTokenFromCode(code2);
  46765. }
  46766. }
  46767. reScan_lt_gt() {
  46768. if (this.match(types$12.relational)) {
  46769. const code2 = this.input.charCodeAt(this.state.start);
  46770. if (code2 === 60 || code2 === 62) {
  46771. this.state.pos -= 1;
  46772. this.readToken_lt_gt(code2);
  46773. }
  46774. }
  46775. }
  46776. toAssignableList(exprList) {
  46777. for (let i = 0; i < exprList.length; i++) {
  46778. const expr = exprList[i];
  46779. if (!expr)
  46780. continue;
  46781. switch (expr.type) {
  46782. case "TSTypeCastExpression":
  46783. exprList[i] = this.typeCastToParameter(expr);
  46784. break;
  46785. case "TSAsExpression":
  46786. case "TSTypeAssertion":
  46787. if (!this.state.maybeInArrowParameters) {
  46788. exprList[i] = this.typeCastToParameter(expr);
  46789. } else {
  46790. this.raise(expr.start, TSErrors.UnexpectedTypeCastInParameter);
  46791. }
  46792. break;
  46793. }
  46794. }
  46795. return super.toAssignableList(...arguments);
  46796. }
  46797. typeCastToParameter(node) {
  46798. node.expression.typeAnnotation = node.typeAnnotation;
  46799. this.resetEndLocation(node.expression, node.typeAnnotation.end, node.typeAnnotation.loc.end);
  46800. return node.expression;
  46801. }
  46802. shouldParseArrow() {
  46803. return this.match(types$12.colon) || super.shouldParseArrow();
  46804. }
  46805. shouldParseAsyncArrow() {
  46806. return this.match(types$12.colon) || super.shouldParseAsyncArrow();
  46807. }
  46808. canHaveLeadingDecorator() {
  46809. return super.canHaveLeadingDecorator() || this.isAbstractClass();
  46810. }
  46811. jsxParseOpeningElementAfterName(node) {
  46812. if (this.isRelational("<")) {
  46813. const typeArguments = this.tsTryParseAndCatch(() => this.tsParseTypeArguments());
  46814. if (typeArguments)
  46815. node.typeParameters = typeArguments;
  46816. }
  46817. return super.jsxParseOpeningElementAfterName(node);
  46818. }
  46819. getGetterSetterExpectedParamCount(method) {
  46820. const baseCount = super.getGetterSetterExpectedParamCount(method);
  46821. const params = this.getObjectOrClassMethodParams(method);
  46822. const firstParam = params[0];
  46823. const hasContextParam = firstParam && this.isThisParam(firstParam);
  46824. return hasContextParam ? baseCount + 1 : baseCount;
  46825. }
  46826. parseCatchClauseParam() {
  46827. const param = super.parseCatchClauseParam();
  46828. const type = this.tsTryParseTypeAnnotation();
  46829. if (type) {
  46830. param.typeAnnotation = type;
  46831. this.resetEndLocation(param);
  46832. }
  46833. return param;
  46834. }
  46835. tsInAmbientContext(cb) {
  46836. const oldIsAmbientContext = this.state.isAmbientContext;
  46837. this.state.isAmbientContext = true;
  46838. try {
  46839. return cb();
  46840. } finally {
  46841. this.state.isAmbientContext = oldIsAmbientContext;
  46842. }
  46843. }
  46844. parseClass(node, ...args) {
  46845. const oldInAbstractClass = this.state.inAbstractClass;
  46846. this.state.inAbstractClass = !!node.abstract;
  46847. try {
  46848. return super.parseClass(node, ...args);
  46849. } finally {
  46850. this.state.inAbstractClass = oldInAbstractClass;
  46851. }
  46852. }
  46853. tsParseAbstractDeclaration(node) {
  46854. if (this.match(types$12._class)) {
  46855. node.abstract = true;
  46856. return this.parseClass(node, true, false);
  46857. } else if (this.isContextual("interface")) {
  46858. if (!this.hasFollowingLineBreak()) {
  46859. node.abstract = true;
  46860. this.raise(node.start, TSErrors.NonClassMethodPropertyHasAbstractModifer);
  46861. this.next();
  46862. return this.tsParseInterfaceDeclaration(node);
  46863. }
  46864. } else {
  46865. this.unexpected(null, types$12._class);
  46866. }
  46867. }
  46868. parseMethod(...args) {
  46869. const method = super.parseMethod(...args);
  46870. if (method.abstract) {
  46871. const hasBody = this.hasPlugin("estree") ? !!method.value.body : !!method.body;
  46872. if (hasBody) {
  46873. const {
  46874. key
  46875. } = method;
  46876. this.raise(method.start, TSErrors.AbstractMethodHasImplementation, key.type === "Identifier" ? key.name : `[${this.input.slice(key.start, key.end)}]`);
  46877. }
  46878. }
  46879. return method;
  46880. }
  46881. shouldParseAsAmbientContext() {
  46882. return !!this.getPluginOption("typescript", "dts");
  46883. }
  46884. parse() {
  46885. if (this.shouldParseAsAmbientContext()) {
  46886. this.state.isAmbientContext = true;
  46887. }
  46888. return super.parse();
  46889. }
  46890. getExpression() {
  46891. if (this.shouldParseAsAmbientContext()) {
  46892. this.state.isAmbientContext = true;
  46893. }
  46894. return super.getExpression();
  46895. }
  46896. };
  46897. types$12.placeholder = new TokenType3("%%", {
  46898. startsExpr: true
  46899. });
  46900. var PlaceHolderErrors = makeErrorTemplates({
  46901. ClassNameIsRequired: "A class name is required."
  46902. }, ErrorCodes.SyntaxError);
  46903. var placeholders = (superClass) => class extends superClass {
  46904. parsePlaceholder(expectedNode) {
  46905. if (this.match(types$12.placeholder)) {
  46906. const node = this.startNode();
  46907. this.next();
  46908. this.assertNoSpace("Unexpected space in placeholder.");
  46909. node.name = super.parseIdentifier(true);
  46910. this.assertNoSpace("Unexpected space in placeholder.");
  46911. this.expect(types$12.placeholder);
  46912. return this.finishPlaceholder(node, expectedNode);
  46913. }
  46914. }
  46915. finishPlaceholder(node, expectedNode) {
  46916. const isFinished = !!(node.expectedNode && node.type === "Placeholder");
  46917. node.expectedNode = expectedNode;
  46918. return isFinished ? node : this.finishNode(node, "Placeholder");
  46919. }
  46920. getTokenFromCode(code2) {
  46921. if (code2 === 37 && this.input.charCodeAt(this.state.pos + 1) === 37) {
  46922. return this.finishOp(types$12.placeholder, 2);
  46923. }
  46924. return super.getTokenFromCode(...arguments);
  46925. }
  46926. parseExprAtom() {
  46927. return this.parsePlaceholder("Expression") || super.parseExprAtom(...arguments);
  46928. }
  46929. parseIdentifier() {
  46930. return this.parsePlaceholder("Identifier") || super.parseIdentifier(...arguments);
  46931. }
  46932. checkReservedWord(word) {
  46933. if (word !== void 0)
  46934. super.checkReservedWord(...arguments);
  46935. }
  46936. parseBindingAtom() {
  46937. return this.parsePlaceholder("Pattern") || super.parseBindingAtom(...arguments);
  46938. }
  46939. checkLVal(expr) {
  46940. if (expr.type !== "Placeholder")
  46941. super.checkLVal(...arguments);
  46942. }
  46943. toAssignable(node) {
  46944. if (node && node.type === "Placeholder" && node.expectedNode === "Expression") {
  46945. node.expectedNode = "Pattern";
  46946. return node;
  46947. }
  46948. return super.toAssignable(...arguments);
  46949. }
  46950. isLet(context) {
  46951. if (super.isLet(context)) {
  46952. return true;
  46953. }
  46954. if (!this.isContextual("let")) {
  46955. return false;
  46956. }
  46957. if (context)
  46958. return false;
  46959. const nextToken = this.lookahead();
  46960. if (nextToken.type === types$12.placeholder) {
  46961. return true;
  46962. }
  46963. return false;
  46964. }
  46965. verifyBreakContinue(node) {
  46966. if (node.label && node.label.type === "Placeholder")
  46967. return;
  46968. super.verifyBreakContinue(...arguments);
  46969. }
  46970. parseExpressionStatement(node, expr) {
  46971. if (expr.type !== "Placeholder" || expr.extra && expr.extra.parenthesized) {
  46972. return super.parseExpressionStatement(...arguments);
  46973. }
  46974. if (this.match(types$12.colon)) {
  46975. const stmt = node;
  46976. stmt.label = this.finishPlaceholder(expr, "Identifier");
  46977. this.next();
  46978. stmt.body = this.parseStatement("label");
  46979. return this.finishNode(stmt, "LabeledStatement");
  46980. }
  46981. this.semicolon();
  46982. node.name = expr.name;
  46983. return this.finishPlaceholder(node, "Statement");
  46984. }
  46985. parseBlock() {
  46986. return this.parsePlaceholder("BlockStatement") || super.parseBlock(...arguments);
  46987. }
  46988. parseFunctionId() {
  46989. return this.parsePlaceholder("Identifier") || super.parseFunctionId(...arguments);
  46990. }
  46991. parseClass(node, isStatement, optionalId) {
  46992. const type = isStatement ? "ClassDeclaration" : "ClassExpression";
  46993. this.next();
  46994. this.takeDecorators(node);
  46995. const oldStrict = this.state.strict;
  46996. const placeholder = this.parsePlaceholder("Identifier");
  46997. if (placeholder) {
  46998. if (this.match(types$12._extends) || this.match(types$12.placeholder) || this.match(types$12.braceL)) {
  46999. node.id = placeholder;
  47000. } else if (optionalId || !isStatement) {
  47001. node.id = null;
  47002. node.body = this.finishPlaceholder(placeholder, "ClassBody");
  47003. return this.finishNode(node, type);
  47004. } else {
  47005. this.unexpected(null, PlaceHolderErrors.ClassNameIsRequired);
  47006. }
  47007. } else {
  47008. this.parseClassId(node, isStatement, optionalId);
  47009. }
  47010. this.parseClassSuper(node);
  47011. node.body = this.parsePlaceholder("ClassBody") || this.parseClassBody(!!node.superClass, oldStrict);
  47012. return this.finishNode(node, type);
  47013. }
  47014. parseExport(node) {
  47015. const placeholder = this.parsePlaceholder("Identifier");
  47016. if (!placeholder)
  47017. return super.parseExport(...arguments);
  47018. if (!this.isContextual("from") && !this.match(types$12.comma)) {
  47019. node.specifiers = [];
  47020. node.source = null;
  47021. node.declaration = this.finishPlaceholder(placeholder, "Declaration");
  47022. return this.finishNode(node, "ExportNamedDeclaration");
  47023. }
  47024. this.expectPlugin("exportDefaultFrom");
  47025. const specifier = this.startNode();
  47026. specifier.exported = placeholder;
  47027. node.specifiers = [this.finishNode(specifier, "ExportDefaultSpecifier")];
  47028. return super.parseExport(node);
  47029. }
  47030. isExportDefaultSpecifier() {
  47031. if (this.match(types$12._default)) {
  47032. const next = this.nextTokenStart();
  47033. if (this.isUnparsedContextual(next, "from")) {
  47034. if (this.input.startsWith(types$12.placeholder.label, this.nextTokenStartSince(next + 4))) {
  47035. return true;
  47036. }
  47037. }
  47038. }
  47039. return super.isExportDefaultSpecifier();
  47040. }
  47041. maybeParseExportDefaultSpecifier(node) {
  47042. if (node.specifiers && node.specifiers.length > 0) {
  47043. return true;
  47044. }
  47045. return super.maybeParseExportDefaultSpecifier(...arguments);
  47046. }
  47047. checkExport(node) {
  47048. const {
  47049. specifiers
  47050. } = node;
  47051. if (specifiers != null && specifiers.length) {
  47052. node.specifiers = specifiers.filter((node2) => node2.exported.type === "Placeholder");
  47053. }
  47054. super.checkExport(node);
  47055. node.specifiers = specifiers;
  47056. }
  47057. parseImport(node) {
  47058. const placeholder = this.parsePlaceholder("Identifier");
  47059. if (!placeholder)
  47060. return super.parseImport(...arguments);
  47061. node.specifiers = [];
  47062. if (!this.isContextual("from") && !this.match(types$12.comma)) {
  47063. node.source = this.finishPlaceholder(placeholder, "StringLiteral");
  47064. this.semicolon();
  47065. return this.finishNode(node, "ImportDeclaration");
  47066. }
  47067. const specifier = this.startNodeAtNode(placeholder);
  47068. specifier.local = placeholder;
  47069. this.finishNode(specifier, "ImportDefaultSpecifier");
  47070. node.specifiers.push(specifier);
  47071. if (this.eat(types$12.comma)) {
  47072. const hasStarImport = this.maybeParseStarImportSpecifier(node);
  47073. if (!hasStarImport)
  47074. this.parseNamedImportSpecifiers(node);
  47075. }
  47076. this.expectContextual("from");
  47077. node.source = this.parseImportSource();
  47078. this.semicolon();
  47079. return this.finishNode(node, "ImportDeclaration");
  47080. }
  47081. parseImportSource() {
  47082. return this.parsePlaceholder("StringLiteral") || super.parseImportSource(...arguments);
  47083. }
  47084. };
  47085. var v8intrinsic = (superClass) => class extends superClass {
  47086. parseV8Intrinsic() {
  47087. if (this.match(types$12.modulo)) {
  47088. const v8IntrinsicStart = this.state.start;
  47089. const node = this.startNode();
  47090. this.eat(types$12.modulo);
  47091. if (this.match(types$12.name)) {
  47092. const name2 = this.parseIdentifierName(this.state.start);
  47093. const identifier = this.createIdentifier(node, name2);
  47094. identifier.type = "V8IntrinsicIdentifier";
  47095. if (this.match(types$12.parenL)) {
  47096. return identifier;
  47097. }
  47098. }
  47099. this.unexpected(v8IntrinsicStart);
  47100. }
  47101. }
  47102. parseExprAtom() {
  47103. return this.parseV8Intrinsic() || super.parseExprAtom(...arguments);
  47104. }
  47105. };
  47106. function hasPlugin(plugins, name2) {
  47107. return plugins.some((plugin2) => {
  47108. if (Array.isArray(plugin2)) {
  47109. return plugin2[0] === name2;
  47110. } else {
  47111. return plugin2 === name2;
  47112. }
  47113. });
  47114. }
  47115. function getPluginOption(plugins, name2, option) {
  47116. const plugin2 = plugins.find((plugin3) => {
  47117. if (Array.isArray(plugin3)) {
  47118. return plugin3[0] === name2;
  47119. } else {
  47120. return plugin3 === name2;
  47121. }
  47122. });
  47123. if (plugin2 && Array.isArray(plugin2)) {
  47124. return plugin2[1][option];
  47125. }
  47126. return null;
  47127. }
  47128. var PIPELINE_PROPOSALS = ["minimal", "smart", "fsharp"];
  47129. var RECORD_AND_TUPLE_SYNTAX_TYPES = ["hash", "bar"];
  47130. function validatePlugins(plugins) {
  47131. if (hasPlugin(plugins, "decorators")) {
  47132. if (hasPlugin(plugins, "decorators-legacy")) {
  47133. throw new Error("Cannot use the decorators and decorators-legacy plugin together");
  47134. }
  47135. const decoratorsBeforeExport = getPluginOption(plugins, "decorators", "decoratorsBeforeExport");
  47136. if (decoratorsBeforeExport == null) {
  47137. throw new Error("The 'decorators' plugin requires a 'decoratorsBeforeExport' option, whose value must be a boolean. If you are migrating from Babylon/Babel 6 or want to use the old decorators proposal, you should use the 'decorators-legacy' plugin instead of 'decorators'.");
  47138. } else if (typeof decoratorsBeforeExport !== "boolean") {
  47139. throw new Error("'decoratorsBeforeExport' must be a boolean.");
  47140. }
  47141. }
  47142. if (hasPlugin(plugins, "flow") && hasPlugin(plugins, "typescript")) {
  47143. throw new Error("Cannot combine flow and typescript plugins.");
  47144. }
  47145. if (hasPlugin(plugins, "placeholders") && hasPlugin(plugins, "v8intrinsic")) {
  47146. throw new Error("Cannot combine placeholders and v8intrinsic plugins.");
  47147. }
  47148. if (hasPlugin(plugins, "pipelineOperator") && !PIPELINE_PROPOSALS.includes(getPluginOption(plugins, "pipelineOperator", "proposal"))) {
  47149. throw new Error("'pipelineOperator' requires 'proposal' option whose value should be one of: " + PIPELINE_PROPOSALS.map((p) => `'${p}'`).join(", "));
  47150. }
  47151. if (hasPlugin(plugins, "moduleAttributes")) {
  47152. {
  47153. if (hasPlugin(plugins, "importAssertions")) {
  47154. throw new Error("Cannot combine importAssertions and moduleAttributes plugins.");
  47155. }
  47156. const moduleAttributesVerionPluginOption = getPluginOption(plugins, "moduleAttributes", "version");
  47157. if (moduleAttributesVerionPluginOption !== "may-2020") {
  47158. throw new Error("The 'moduleAttributes' plugin requires a 'version' option, representing the last proposal update. Currently, the only supported value is 'may-2020'.");
  47159. }
  47160. }
  47161. }
  47162. if (hasPlugin(plugins, "recordAndTuple") && !RECORD_AND_TUPLE_SYNTAX_TYPES.includes(getPluginOption(plugins, "recordAndTuple", "syntaxType"))) {
  47163. throw new Error("'recordAndTuple' requires 'syntaxType' option whose value should be one of: " + RECORD_AND_TUPLE_SYNTAX_TYPES.map((p) => `'${p}'`).join(", "));
  47164. }
  47165. if (hasPlugin(plugins, "asyncDoExpressions") && !hasPlugin(plugins, "doExpressions")) {
  47166. const error = new Error("'asyncDoExpressions' requires 'doExpressions', please add 'doExpressions' to parser plugins.");
  47167. error.missingPlugins = "doExpressions";
  47168. throw error;
  47169. }
  47170. }
  47171. var mixinPlugins = {
  47172. estree,
  47173. jsx,
  47174. flow: flow3,
  47175. typescript,
  47176. v8intrinsic,
  47177. placeholders
  47178. };
  47179. var mixinPluginNames = Object.keys(mixinPlugins);
  47180. var defaultOptions2 = {
  47181. sourceType: "script",
  47182. sourceFilename: void 0,
  47183. startLine: 1,
  47184. allowAwaitOutsideFunction: false,
  47185. allowReturnOutsideFunction: false,
  47186. allowImportExportEverywhere: false,
  47187. allowSuperOutsideMethod: false,
  47188. allowUndeclaredExports: false,
  47189. plugins: [],
  47190. strictMode: null,
  47191. ranges: false,
  47192. tokens: false,
  47193. createParenthesizedExpressions: false,
  47194. errorRecovery: false
  47195. };
  47196. function getOptions2(opts) {
  47197. const options = {};
  47198. for (const key of Object.keys(defaultOptions2)) {
  47199. options[key] = opts && opts[key] != null ? opts[key] : defaultOptions2[key];
  47200. }
  47201. return options;
  47202. }
  47203. var _isDigit = function isDigit(code2) {
  47204. return code2 >= 48 && code2 <= 57;
  47205. };
  47206. var VALID_REGEX_FLAGS = /* @__PURE__ */ new Set(["g", "m", "s", "i", "y", "u"]);
  47207. var forbiddenNumericSeparatorSiblings = {
  47208. decBinOct: [46, 66, 69, 79, 95, 98, 101, 111],
  47209. hex: [46, 88, 95, 120]
  47210. };
  47211. var allowedNumericSeparatorSiblings = {};
  47212. allowedNumericSeparatorSiblings.bin = [48, 49];
  47213. allowedNumericSeparatorSiblings.oct = [...allowedNumericSeparatorSiblings.bin, 50, 51, 52, 53, 54, 55];
  47214. allowedNumericSeparatorSiblings.dec = [...allowedNumericSeparatorSiblings.oct, 56, 57];
  47215. allowedNumericSeparatorSiblings.hex = [...allowedNumericSeparatorSiblings.dec, 65, 66, 67, 68, 69, 70, 97, 98, 99, 100, 101, 102];
  47216. var Token3 = class {
  47217. constructor(state) {
  47218. this.type = state.type;
  47219. this.value = state.value;
  47220. this.start = state.start;
  47221. this.end = state.end;
  47222. this.loc = new SourceLocation3(state.startLoc, state.endLoc);
  47223. }
  47224. };
  47225. var Tokenizer = class extends ParserError {
  47226. constructor(options, input) {
  47227. super();
  47228. this.isLookahead = void 0;
  47229. this.tokens = [];
  47230. this.state = new State2();
  47231. this.state.init(options);
  47232. this.input = input;
  47233. this.length = input.length;
  47234. this.isLookahead = false;
  47235. }
  47236. pushToken(token) {
  47237. this.tokens.length = this.state.tokensLength;
  47238. this.tokens.push(token);
  47239. ++this.state.tokensLength;
  47240. }
  47241. next() {
  47242. this.checkKeywordEscapes();
  47243. if (this.options.tokens) {
  47244. this.pushToken(new Token3(this.state));
  47245. }
  47246. this.state.lastTokEnd = this.state.end;
  47247. this.state.lastTokStart = this.state.start;
  47248. this.state.lastTokEndLoc = this.state.endLoc;
  47249. this.state.lastTokStartLoc = this.state.startLoc;
  47250. this.nextToken();
  47251. }
  47252. eat(type) {
  47253. if (this.match(type)) {
  47254. this.next();
  47255. return true;
  47256. } else {
  47257. return false;
  47258. }
  47259. }
  47260. match(type) {
  47261. return this.state.type === type;
  47262. }
  47263. createLookaheadState(state) {
  47264. return {
  47265. pos: state.pos,
  47266. value: null,
  47267. type: state.type,
  47268. start: state.start,
  47269. end: state.end,
  47270. lastTokEnd: state.end,
  47271. context: [this.curContext()],
  47272. exprAllowed: state.exprAllowed,
  47273. inType: state.inType
  47274. };
  47275. }
  47276. lookahead() {
  47277. const old = this.state;
  47278. this.state = this.createLookaheadState(old);
  47279. this.isLookahead = true;
  47280. this.nextToken();
  47281. this.isLookahead = false;
  47282. const curr = this.state;
  47283. this.state = old;
  47284. return curr;
  47285. }
  47286. nextTokenStart() {
  47287. return this.nextTokenStartSince(this.state.pos);
  47288. }
  47289. nextTokenStartSince(pos) {
  47290. skipWhiteSpace2.lastIndex = pos;
  47291. const skip = skipWhiteSpace2.exec(this.input);
  47292. return pos + skip[0].length;
  47293. }
  47294. lookaheadCharCode() {
  47295. return this.input.charCodeAt(this.nextTokenStart());
  47296. }
  47297. codePointAtPos(pos) {
  47298. let cp = this.input.charCodeAt(pos);
  47299. if ((cp & 64512) === 55296 && ++pos < this.input.length) {
  47300. const trail = this.input.charCodeAt(pos);
  47301. if ((trail & 64512) === 56320) {
  47302. cp = 65536 + ((cp & 1023) << 10) + (trail & 1023);
  47303. }
  47304. }
  47305. return cp;
  47306. }
  47307. setStrict(strict) {
  47308. this.state.strict = strict;
  47309. if (strict) {
  47310. this.state.strictErrors.forEach((message, pos) => this.raise(pos, message));
  47311. this.state.strictErrors.clear();
  47312. }
  47313. }
  47314. curContext() {
  47315. return this.state.context[this.state.context.length - 1];
  47316. }
  47317. nextToken() {
  47318. const curContext = this.curContext();
  47319. if (!curContext.preserveSpace)
  47320. this.skipSpace();
  47321. this.state.start = this.state.pos;
  47322. if (!this.isLookahead)
  47323. this.state.startLoc = this.state.curPosition();
  47324. if (this.state.pos >= this.length) {
  47325. this.finishToken(types$12.eof);
  47326. return;
  47327. }
  47328. if (curContext === types2.template) {
  47329. this.readTmplToken();
  47330. } else {
  47331. this.getTokenFromCode(this.codePointAtPos(this.state.pos));
  47332. }
  47333. }
  47334. pushComment(block, text5, start3, end, startLoc, endLoc) {
  47335. const comment2 = {
  47336. type: block ? "CommentBlock" : "CommentLine",
  47337. value: text5,
  47338. start: start3,
  47339. end,
  47340. loc: new SourceLocation3(startLoc, endLoc)
  47341. };
  47342. if (this.options.tokens)
  47343. this.pushToken(comment2);
  47344. this.state.comments.push(comment2);
  47345. this.addComment(comment2);
  47346. }
  47347. skipBlockComment() {
  47348. let startLoc;
  47349. if (!this.isLookahead)
  47350. startLoc = this.state.curPosition();
  47351. const start3 = this.state.pos;
  47352. const end = this.input.indexOf("*/", this.state.pos + 2);
  47353. if (end === -1)
  47354. throw this.raise(start3, ErrorMessages.UnterminatedComment);
  47355. this.state.pos = end + 2;
  47356. lineBreakG2.lastIndex = start3;
  47357. let match;
  47358. while ((match = lineBreakG2.exec(this.input)) && match.index < this.state.pos) {
  47359. ++this.state.curLine;
  47360. this.state.lineStart = match.index + match[0].length;
  47361. }
  47362. if (this.isLookahead)
  47363. return;
  47364. this.pushComment(true, this.input.slice(start3 + 2, end), start3, this.state.pos, startLoc, this.state.curPosition());
  47365. }
  47366. skipLineComment(startSkip) {
  47367. const start3 = this.state.pos;
  47368. let startLoc;
  47369. if (!this.isLookahead)
  47370. startLoc = this.state.curPosition();
  47371. let ch = this.input.charCodeAt(this.state.pos += startSkip);
  47372. if (this.state.pos < this.length) {
  47373. while (!isNewLine2(ch) && ++this.state.pos < this.length) {
  47374. ch = this.input.charCodeAt(this.state.pos);
  47375. }
  47376. }
  47377. if (this.isLookahead)
  47378. return;
  47379. this.pushComment(false, this.input.slice(start3 + startSkip, this.state.pos), start3, this.state.pos, startLoc, this.state.curPosition());
  47380. }
  47381. skipSpace() {
  47382. loop:
  47383. while (this.state.pos < this.length) {
  47384. const ch = this.input.charCodeAt(this.state.pos);
  47385. switch (ch) {
  47386. case 32:
  47387. case 160:
  47388. case 9:
  47389. ++this.state.pos;
  47390. break;
  47391. case 13:
  47392. if (this.input.charCodeAt(this.state.pos + 1) === 10) {
  47393. ++this.state.pos;
  47394. }
  47395. case 10:
  47396. case 8232:
  47397. case 8233:
  47398. ++this.state.pos;
  47399. ++this.state.curLine;
  47400. this.state.lineStart = this.state.pos;
  47401. break;
  47402. case 47:
  47403. switch (this.input.charCodeAt(this.state.pos + 1)) {
  47404. case 42:
  47405. this.skipBlockComment();
  47406. break;
  47407. case 47:
  47408. this.skipLineComment(2);
  47409. break;
  47410. default:
  47411. break loop;
  47412. }
  47413. break;
  47414. default:
  47415. if (isWhitespace(ch)) {
  47416. ++this.state.pos;
  47417. } else {
  47418. break loop;
  47419. }
  47420. }
  47421. }
  47422. }
  47423. finishToken(type, val) {
  47424. this.state.end = this.state.pos;
  47425. const prevType = this.state.type;
  47426. this.state.type = type;
  47427. this.state.value = val;
  47428. if (!this.isLookahead) {
  47429. this.state.endLoc = this.state.curPosition();
  47430. this.updateContext(prevType);
  47431. }
  47432. }
  47433. readToken_numberSign() {
  47434. if (this.state.pos === 0 && this.readToken_interpreter()) {
  47435. return;
  47436. }
  47437. const nextPos = this.state.pos + 1;
  47438. const next = this.codePointAtPos(nextPos);
  47439. if (next >= 48 && next <= 57) {
  47440. throw this.raise(this.state.pos, ErrorMessages.UnexpectedDigitAfterHash);
  47441. }
  47442. if (next === 123 || next === 91 && this.hasPlugin("recordAndTuple")) {
  47443. this.expectPlugin("recordAndTuple");
  47444. if (this.getPluginOption("recordAndTuple", "syntaxType") !== "hash") {
  47445. throw this.raise(this.state.pos, next === 123 ? ErrorMessages.RecordExpressionHashIncorrectStartSyntaxType : ErrorMessages.TupleExpressionHashIncorrectStartSyntaxType);
  47446. }
  47447. if (next === 123) {
  47448. this.finishToken(types$12.braceHashL);
  47449. } else {
  47450. this.finishToken(types$12.bracketHashL);
  47451. }
  47452. this.state.pos += 2;
  47453. } else if (isIdentifierStart2(next)) {
  47454. ++this.state.pos;
  47455. this.finishToken(types$12.privateName, this.readWord1(next));
  47456. } else if (next === 92) {
  47457. ++this.state.pos;
  47458. this.finishToken(types$12.privateName, this.readWord1());
  47459. } else {
  47460. this.finishOp(types$12.hash, 1);
  47461. }
  47462. }
  47463. readToken_dot() {
  47464. const next = this.input.charCodeAt(this.state.pos + 1);
  47465. if (next >= 48 && next <= 57) {
  47466. this.readNumber(true);
  47467. return;
  47468. }
  47469. if (next === 46 && this.input.charCodeAt(this.state.pos + 2) === 46) {
  47470. this.state.pos += 3;
  47471. this.finishToken(types$12.ellipsis);
  47472. } else {
  47473. ++this.state.pos;
  47474. this.finishToken(types$12.dot);
  47475. }
  47476. }
  47477. readToken_slash() {
  47478. if (this.state.exprAllowed && !this.state.inType) {
  47479. ++this.state.pos;
  47480. this.readRegexp();
  47481. return;
  47482. }
  47483. const next = this.input.charCodeAt(this.state.pos + 1);
  47484. if (next === 61) {
  47485. this.finishOp(types$12.assign, 2);
  47486. } else {
  47487. this.finishOp(types$12.slash, 1);
  47488. }
  47489. }
  47490. readToken_interpreter() {
  47491. if (this.state.pos !== 0 || this.length < 2)
  47492. return false;
  47493. let ch = this.input.charCodeAt(this.state.pos + 1);
  47494. if (ch !== 33)
  47495. return false;
  47496. const start3 = this.state.pos;
  47497. this.state.pos += 1;
  47498. while (!isNewLine2(ch) && ++this.state.pos < this.length) {
  47499. ch = this.input.charCodeAt(this.state.pos);
  47500. }
  47501. const value = this.input.slice(start3 + 2, this.state.pos);
  47502. this.finishToken(types$12.interpreterDirective, value);
  47503. return true;
  47504. }
  47505. readToken_mult_modulo(code2) {
  47506. let type = code2 === 42 ? types$12.star : types$12.modulo;
  47507. let width = 1;
  47508. let next = this.input.charCodeAt(this.state.pos + 1);
  47509. const exprAllowed = this.state.exprAllowed;
  47510. if (code2 === 42 && next === 42) {
  47511. width++;
  47512. next = this.input.charCodeAt(this.state.pos + 2);
  47513. type = types$12.exponent;
  47514. }
  47515. if (next === 61 && !exprAllowed) {
  47516. width++;
  47517. type = types$12.assign;
  47518. }
  47519. this.finishOp(type, width);
  47520. }
  47521. readToken_pipe_amp(code2) {
  47522. const next = this.input.charCodeAt(this.state.pos + 1);
  47523. if (next === code2) {
  47524. if (this.input.charCodeAt(this.state.pos + 2) === 61) {
  47525. this.finishOp(types$12.assign, 3);
  47526. } else {
  47527. this.finishOp(code2 === 124 ? types$12.logicalOR : types$12.logicalAND, 2);
  47528. }
  47529. return;
  47530. }
  47531. if (code2 === 124) {
  47532. if (next === 62) {
  47533. this.finishOp(types$12.pipeline, 2);
  47534. return;
  47535. }
  47536. if (this.hasPlugin("recordAndTuple") && next === 125) {
  47537. if (this.getPluginOption("recordAndTuple", "syntaxType") !== "bar") {
  47538. throw this.raise(this.state.pos, ErrorMessages.RecordExpressionBarIncorrectEndSyntaxType);
  47539. }
  47540. this.finishOp(types$12.braceBarR, 2);
  47541. return;
  47542. }
  47543. if (this.hasPlugin("recordAndTuple") && next === 93) {
  47544. if (this.getPluginOption("recordAndTuple", "syntaxType") !== "bar") {
  47545. throw this.raise(this.state.pos, ErrorMessages.TupleExpressionBarIncorrectEndSyntaxType);
  47546. }
  47547. this.finishOp(types$12.bracketBarR, 2);
  47548. return;
  47549. }
  47550. }
  47551. if (next === 61) {
  47552. this.finishOp(types$12.assign, 2);
  47553. return;
  47554. }
  47555. this.finishOp(code2 === 124 ? types$12.bitwiseOR : types$12.bitwiseAND, 1);
  47556. }
  47557. readToken_caret() {
  47558. const next = this.input.charCodeAt(this.state.pos + 1);
  47559. if (next === 61) {
  47560. this.finishOp(types$12.assign, 2);
  47561. } else {
  47562. this.finishOp(types$12.bitwiseXOR, 1);
  47563. }
  47564. }
  47565. readToken_plus_min(code2) {
  47566. const next = this.input.charCodeAt(this.state.pos + 1);
  47567. if (next === code2) {
  47568. if (next === 45 && !this.inModule && this.input.charCodeAt(this.state.pos + 2) === 62 && (this.state.lastTokEnd === 0 || this.hasPrecedingLineBreak())) {
  47569. this.skipLineComment(3);
  47570. this.skipSpace();
  47571. this.nextToken();
  47572. return;
  47573. }
  47574. this.finishOp(types$12.incDec, 2);
  47575. return;
  47576. }
  47577. if (next === 61) {
  47578. this.finishOp(types$12.assign, 2);
  47579. } else {
  47580. this.finishOp(types$12.plusMin, 1);
  47581. }
  47582. }
  47583. readToken_lt_gt(code2) {
  47584. const next = this.input.charCodeAt(this.state.pos + 1);
  47585. let size = 1;
  47586. if (next === code2) {
  47587. size = code2 === 62 && this.input.charCodeAt(this.state.pos + 2) === 62 ? 3 : 2;
  47588. if (this.input.charCodeAt(this.state.pos + size) === 61) {
  47589. this.finishOp(types$12.assign, size + 1);
  47590. return;
  47591. }
  47592. this.finishOp(types$12.bitShift, size);
  47593. return;
  47594. }
  47595. if (next === 33 && code2 === 60 && !this.inModule && this.input.charCodeAt(this.state.pos + 2) === 45 && this.input.charCodeAt(this.state.pos + 3) === 45) {
  47596. this.skipLineComment(4);
  47597. this.skipSpace();
  47598. this.nextToken();
  47599. return;
  47600. }
  47601. if (next === 61) {
  47602. size = 2;
  47603. }
  47604. this.finishOp(types$12.relational, size);
  47605. }
  47606. readToken_eq_excl(code2) {
  47607. const next = this.input.charCodeAt(this.state.pos + 1);
  47608. if (next === 61) {
  47609. this.finishOp(types$12.equality, this.input.charCodeAt(this.state.pos + 2) === 61 ? 3 : 2);
  47610. return;
  47611. }
  47612. if (code2 === 61 && next === 62) {
  47613. this.state.pos += 2;
  47614. this.finishToken(types$12.arrow);
  47615. return;
  47616. }
  47617. this.finishOp(code2 === 61 ? types$12.eq : types$12.bang, 1);
  47618. }
  47619. readToken_question() {
  47620. const next = this.input.charCodeAt(this.state.pos + 1);
  47621. const next2 = this.input.charCodeAt(this.state.pos + 2);
  47622. if (next === 63) {
  47623. if (next2 === 61) {
  47624. this.finishOp(types$12.assign, 3);
  47625. } else {
  47626. this.finishOp(types$12.nullishCoalescing, 2);
  47627. }
  47628. } else if (next === 46 && !(next2 >= 48 && next2 <= 57)) {
  47629. this.state.pos += 2;
  47630. this.finishToken(types$12.questionDot);
  47631. } else {
  47632. ++this.state.pos;
  47633. this.finishToken(types$12.question);
  47634. }
  47635. }
  47636. getTokenFromCode(code2) {
  47637. switch (code2) {
  47638. case 46:
  47639. this.readToken_dot();
  47640. return;
  47641. case 40:
  47642. ++this.state.pos;
  47643. this.finishToken(types$12.parenL);
  47644. return;
  47645. case 41:
  47646. ++this.state.pos;
  47647. this.finishToken(types$12.parenR);
  47648. return;
  47649. case 59:
  47650. ++this.state.pos;
  47651. this.finishToken(types$12.semi);
  47652. return;
  47653. case 44:
  47654. ++this.state.pos;
  47655. this.finishToken(types$12.comma);
  47656. return;
  47657. case 91:
  47658. if (this.hasPlugin("recordAndTuple") && this.input.charCodeAt(this.state.pos + 1) === 124) {
  47659. if (this.getPluginOption("recordAndTuple", "syntaxType") !== "bar") {
  47660. throw this.raise(this.state.pos, ErrorMessages.TupleExpressionBarIncorrectStartSyntaxType);
  47661. }
  47662. this.finishToken(types$12.bracketBarL);
  47663. this.state.pos += 2;
  47664. } else {
  47665. ++this.state.pos;
  47666. this.finishToken(types$12.bracketL);
  47667. }
  47668. return;
  47669. case 93:
  47670. ++this.state.pos;
  47671. this.finishToken(types$12.bracketR);
  47672. return;
  47673. case 123:
  47674. if (this.hasPlugin("recordAndTuple") && this.input.charCodeAt(this.state.pos + 1) === 124) {
  47675. if (this.getPluginOption("recordAndTuple", "syntaxType") !== "bar") {
  47676. throw this.raise(this.state.pos, ErrorMessages.RecordExpressionBarIncorrectStartSyntaxType);
  47677. }
  47678. this.finishToken(types$12.braceBarL);
  47679. this.state.pos += 2;
  47680. } else {
  47681. ++this.state.pos;
  47682. this.finishToken(types$12.braceL);
  47683. }
  47684. return;
  47685. case 125:
  47686. ++this.state.pos;
  47687. this.finishToken(types$12.braceR);
  47688. return;
  47689. case 58:
  47690. if (this.hasPlugin("functionBind") && this.input.charCodeAt(this.state.pos + 1) === 58) {
  47691. this.finishOp(types$12.doubleColon, 2);
  47692. } else {
  47693. ++this.state.pos;
  47694. this.finishToken(types$12.colon);
  47695. }
  47696. return;
  47697. case 63:
  47698. this.readToken_question();
  47699. return;
  47700. case 96:
  47701. ++this.state.pos;
  47702. this.finishToken(types$12.backQuote);
  47703. return;
  47704. case 48: {
  47705. const next = this.input.charCodeAt(this.state.pos + 1);
  47706. if (next === 120 || next === 88) {
  47707. this.readRadixNumber(16);
  47708. return;
  47709. }
  47710. if (next === 111 || next === 79) {
  47711. this.readRadixNumber(8);
  47712. return;
  47713. }
  47714. if (next === 98 || next === 66) {
  47715. this.readRadixNumber(2);
  47716. return;
  47717. }
  47718. }
  47719. case 49:
  47720. case 50:
  47721. case 51:
  47722. case 52:
  47723. case 53:
  47724. case 54:
  47725. case 55:
  47726. case 56:
  47727. case 57:
  47728. this.readNumber(false);
  47729. return;
  47730. case 34:
  47731. case 39:
  47732. this.readString(code2);
  47733. return;
  47734. case 47:
  47735. this.readToken_slash();
  47736. return;
  47737. case 37:
  47738. case 42:
  47739. this.readToken_mult_modulo(code2);
  47740. return;
  47741. case 124:
  47742. case 38:
  47743. this.readToken_pipe_amp(code2);
  47744. return;
  47745. case 94:
  47746. this.readToken_caret();
  47747. return;
  47748. case 43:
  47749. case 45:
  47750. this.readToken_plus_min(code2);
  47751. return;
  47752. case 60:
  47753. case 62:
  47754. this.readToken_lt_gt(code2);
  47755. return;
  47756. case 61:
  47757. case 33:
  47758. this.readToken_eq_excl(code2);
  47759. return;
  47760. case 126:
  47761. this.finishOp(types$12.tilde, 1);
  47762. return;
  47763. case 64:
  47764. ++this.state.pos;
  47765. this.finishToken(types$12.at);
  47766. return;
  47767. case 35:
  47768. this.readToken_numberSign();
  47769. return;
  47770. case 92:
  47771. this.readWord();
  47772. return;
  47773. default:
  47774. if (isIdentifierStart2(code2)) {
  47775. this.readWord(code2);
  47776. return;
  47777. }
  47778. }
  47779. throw this.raise(this.state.pos, ErrorMessages.InvalidOrUnexpectedToken, String.fromCodePoint(code2));
  47780. }
  47781. finishOp(type, size) {
  47782. const str = this.input.slice(this.state.pos, this.state.pos + size);
  47783. this.state.pos += size;
  47784. this.finishToken(type, str);
  47785. }
  47786. readRegexp() {
  47787. const start3 = this.state.pos;
  47788. let escaped, inClass;
  47789. for (; ; ) {
  47790. if (this.state.pos >= this.length) {
  47791. throw this.raise(start3, ErrorMessages.UnterminatedRegExp);
  47792. }
  47793. const ch = this.input.charAt(this.state.pos);
  47794. if (lineBreak2.test(ch)) {
  47795. throw this.raise(start3, ErrorMessages.UnterminatedRegExp);
  47796. }
  47797. if (escaped) {
  47798. escaped = false;
  47799. } else {
  47800. if (ch === "[") {
  47801. inClass = true;
  47802. } else if (ch === "]" && inClass) {
  47803. inClass = false;
  47804. } else if (ch === "/" && !inClass) {
  47805. break;
  47806. }
  47807. escaped = ch === "\\";
  47808. }
  47809. ++this.state.pos;
  47810. }
  47811. const content3 = this.input.slice(start3, this.state.pos);
  47812. ++this.state.pos;
  47813. let mods = "";
  47814. while (this.state.pos < this.length) {
  47815. const char = this.input[this.state.pos];
  47816. const charCode = this.codePointAtPos(this.state.pos);
  47817. if (VALID_REGEX_FLAGS.has(char)) {
  47818. if (mods.indexOf(char) > -1) {
  47819. this.raise(this.state.pos + 1, ErrorMessages.DuplicateRegExpFlags);
  47820. }
  47821. } else if (isIdentifierChar2(charCode) || charCode === 92) {
  47822. this.raise(this.state.pos + 1, ErrorMessages.MalformedRegExpFlags);
  47823. } else {
  47824. break;
  47825. }
  47826. ++this.state.pos;
  47827. mods += char;
  47828. }
  47829. this.finishToken(types$12.regexp, {
  47830. pattern: content3,
  47831. flags: mods
  47832. });
  47833. }
  47834. readInt(radix, len, forceLen, allowNumSeparator = true) {
  47835. const start3 = this.state.pos;
  47836. const forbiddenSiblings = radix === 16 ? forbiddenNumericSeparatorSiblings.hex : forbiddenNumericSeparatorSiblings.decBinOct;
  47837. const allowedSiblings = radix === 16 ? allowedNumericSeparatorSiblings.hex : radix === 10 ? allowedNumericSeparatorSiblings.dec : radix === 8 ? allowedNumericSeparatorSiblings.oct : allowedNumericSeparatorSiblings.bin;
  47838. let invalid2 = false;
  47839. let total = 0;
  47840. for (let i = 0, e = len == null ? Infinity : len; i < e; ++i) {
  47841. const code2 = this.input.charCodeAt(this.state.pos);
  47842. let val;
  47843. if (code2 === 95) {
  47844. const prev = this.input.charCodeAt(this.state.pos - 1);
  47845. const next = this.input.charCodeAt(this.state.pos + 1);
  47846. if (allowedSiblings.indexOf(next) === -1) {
  47847. this.raise(this.state.pos, ErrorMessages.UnexpectedNumericSeparator);
  47848. } else if (forbiddenSiblings.indexOf(prev) > -1 || forbiddenSiblings.indexOf(next) > -1 || Number.isNaN(next)) {
  47849. this.raise(this.state.pos, ErrorMessages.UnexpectedNumericSeparator);
  47850. }
  47851. if (!allowNumSeparator) {
  47852. this.raise(this.state.pos, ErrorMessages.NumericSeparatorInEscapeSequence);
  47853. }
  47854. ++this.state.pos;
  47855. continue;
  47856. }
  47857. if (code2 >= 97) {
  47858. val = code2 - 97 + 10;
  47859. } else if (code2 >= 65) {
  47860. val = code2 - 65 + 10;
  47861. } else if (_isDigit(code2)) {
  47862. val = code2 - 48;
  47863. } else {
  47864. val = Infinity;
  47865. }
  47866. if (val >= radix) {
  47867. if (this.options.errorRecovery && val <= 9) {
  47868. val = 0;
  47869. this.raise(this.state.start + i + 2, ErrorMessages.InvalidDigit, radix);
  47870. } else if (forceLen) {
  47871. val = 0;
  47872. invalid2 = true;
  47873. } else {
  47874. break;
  47875. }
  47876. }
  47877. ++this.state.pos;
  47878. total = total * radix + val;
  47879. }
  47880. if (this.state.pos === start3 || len != null && this.state.pos - start3 !== len || invalid2) {
  47881. return null;
  47882. }
  47883. return total;
  47884. }
  47885. readRadixNumber(radix) {
  47886. const start3 = this.state.pos;
  47887. let isBigInt = false;
  47888. this.state.pos += 2;
  47889. const val = this.readInt(radix);
  47890. if (val == null) {
  47891. this.raise(this.state.start + 2, ErrorMessages.InvalidDigit, radix);
  47892. }
  47893. const next = this.input.charCodeAt(this.state.pos);
  47894. if (next === 110) {
  47895. ++this.state.pos;
  47896. isBigInt = true;
  47897. } else if (next === 109) {
  47898. throw this.raise(start3, ErrorMessages.InvalidDecimal);
  47899. }
  47900. if (isIdentifierStart2(this.codePointAtPos(this.state.pos))) {
  47901. throw this.raise(this.state.pos, ErrorMessages.NumberIdentifier);
  47902. }
  47903. if (isBigInt) {
  47904. const str = this.input.slice(start3, this.state.pos).replace(/[_n]/g, "");
  47905. this.finishToken(types$12.bigint, str);
  47906. return;
  47907. }
  47908. this.finishToken(types$12.num, val);
  47909. }
  47910. readNumber(startsWithDot) {
  47911. const start3 = this.state.pos;
  47912. let isFloat = false;
  47913. let isBigInt = false;
  47914. let isDecimal2 = false;
  47915. let hasExponent = false;
  47916. let isOctal = false;
  47917. if (!startsWithDot && this.readInt(10) === null) {
  47918. this.raise(start3, ErrorMessages.InvalidNumber);
  47919. }
  47920. const hasLeadingZero = this.state.pos - start3 >= 2 && this.input.charCodeAt(start3) === 48;
  47921. if (hasLeadingZero) {
  47922. const integer = this.input.slice(start3, this.state.pos);
  47923. this.recordStrictModeErrors(start3, ErrorMessages.StrictOctalLiteral);
  47924. if (!this.state.strict) {
  47925. const underscorePos = integer.indexOf("_");
  47926. if (underscorePos > 0) {
  47927. this.raise(underscorePos + start3, ErrorMessages.ZeroDigitNumericSeparator);
  47928. }
  47929. }
  47930. isOctal = hasLeadingZero && !/[89]/.test(integer);
  47931. }
  47932. let next = this.input.charCodeAt(this.state.pos);
  47933. if (next === 46 && !isOctal) {
  47934. ++this.state.pos;
  47935. this.readInt(10);
  47936. isFloat = true;
  47937. next = this.input.charCodeAt(this.state.pos);
  47938. }
  47939. if ((next === 69 || next === 101) && !isOctal) {
  47940. next = this.input.charCodeAt(++this.state.pos);
  47941. if (next === 43 || next === 45) {
  47942. ++this.state.pos;
  47943. }
  47944. if (this.readInt(10) === null) {
  47945. this.raise(start3, ErrorMessages.InvalidOrMissingExponent);
  47946. }
  47947. isFloat = true;
  47948. hasExponent = true;
  47949. next = this.input.charCodeAt(this.state.pos);
  47950. }
  47951. if (next === 110) {
  47952. if (isFloat || hasLeadingZero) {
  47953. this.raise(start3, ErrorMessages.InvalidBigIntLiteral);
  47954. }
  47955. ++this.state.pos;
  47956. isBigInt = true;
  47957. }
  47958. if (next === 109) {
  47959. this.expectPlugin("decimal", this.state.pos);
  47960. if (hasExponent || hasLeadingZero) {
  47961. this.raise(start3, ErrorMessages.InvalidDecimal);
  47962. }
  47963. ++this.state.pos;
  47964. isDecimal2 = true;
  47965. }
  47966. if (isIdentifierStart2(this.codePointAtPos(this.state.pos))) {
  47967. throw this.raise(this.state.pos, ErrorMessages.NumberIdentifier);
  47968. }
  47969. const str = this.input.slice(start3, this.state.pos).replace(/[_mn]/g, "");
  47970. if (isBigInt) {
  47971. this.finishToken(types$12.bigint, str);
  47972. return;
  47973. }
  47974. if (isDecimal2) {
  47975. this.finishToken(types$12.decimal, str);
  47976. return;
  47977. }
  47978. const val = isOctal ? parseInt(str, 8) : parseFloat(str);
  47979. this.finishToken(types$12.num, val);
  47980. }
  47981. readCodePoint(throwOnInvalid) {
  47982. const ch = this.input.charCodeAt(this.state.pos);
  47983. let code2;
  47984. if (ch === 123) {
  47985. const codePos = ++this.state.pos;
  47986. code2 = this.readHexChar(this.input.indexOf("}", this.state.pos) - this.state.pos, true, throwOnInvalid);
  47987. ++this.state.pos;
  47988. if (code2 !== null && code2 > 1114111) {
  47989. if (throwOnInvalid) {
  47990. this.raise(codePos, ErrorMessages.InvalidCodePoint);
  47991. } else {
  47992. return null;
  47993. }
  47994. }
  47995. } else {
  47996. code2 = this.readHexChar(4, false, throwOnInvalid);
  47997. }
  47998. return code2;
  47999. }
  48000. readString(quote) {
  48001. let out = "", chunkStart = ++this.state.pos;
  48002. for (; ; ) {
  48003. if (this.state.pos >= this.length) {
  48004. throw this.raise(this.state.start, ErrorMessages.UnterminatedString);
  48005. }
  48006. const ch = this.input.charCodeAt(this.state.pos);
  48007. if (ch === quote)
  48008. break;
  48009. if (ch === 92) {
  48010. out += this.input.slice(chunkStart, this.state.pos);
  48011. out += this.readEscapedChar(false);
  48012. chunkStart = this.state.pos;
  48013. } else if (ch === 8232 || ch === 8233) {
  48014. ++this.state.pos;
  48015. ++this.state.curLine;
  48016. this.state.lineStart = this.state.pos;
  48017. } else if (isNewLine2(ch)) {
  48018. throw this.raise(this.state.start, ErrorMessages.UnterminatedString);
  48019. } else {
  48020. ++this.state.pos;
  48021. }
  48022. }
  48023. out += this.input.slice(chunkStart, this.state.pos++);
  48024. this.finishToken(types$12.string, out);
  48025. }
  48026. readTmplToken() {
  48027. let out = "", chunkStart = this.state.pos, containsInvalid = false;
  48028. for (; ; ) {
  48029. if (this.state.pos >= this.length) {
  48030. throw this.raise(this.state.start, ErrorMessages.UnterminatedTemplate);
  48031. }
  48032. const ch = this.input.charCodeAt(this.state.pos);
  48033. if (ch === 96 || ch === 36 && this.input.charCodeAt(this.state.pos + 1) === 123) {
  48034. if (this.state.pos === this.state.start && this.match(types$12.template)) {
  48035. if (ch === 36) {
  48036. this.state.pos += 2;
  48037. this.finishToken(types$12.dollarBraceL);
  48038. return;
  48039. } else {
  48040. ++this.state.pos;
  48041. this.finishToken(types$12.backQuote);
  48042. return;
  48043. }
  48044. }
  48045. out += this.input.slice(chunkStart, this.state.pos);
  48046. this.finishToken(types$12.template, containsInvalid ? null : out);
  48047. return;
  48048. }
  48049. if (ch === 92) {
  48050. out += this.input.slice(chunkStart, this.state.pos);
  48051. const escaped = this.readEscapedChar(true);
  48052. if (escaped === null) {
  48053. containsInvalid = true;
  48054. } else {
  48055. out += escaped;
  48056. }
  48057. chunkStart = this.state.pos;
  48058. } else if (isNewLine2(ch)) {
  48059. out += this.input.slice(chunkStart, this.state.pos);
  48060. ++this.state.pos;
  48061. switch (ch) {
  48062. case 13:
  48063. if (this.input.charCodeAt(this.state.pos) === 10) {
  48064. ++this.state.pos;
  48065. }
  48066. case 10:
  48067. out += "\n";
  48068. break;
  48069. default:
  48070. out += String.fromCharCode(ch);
  48071. break;
  48072. }
  48073. ++this.state.curLine;
  48074. this.state.lineStart = this.state.pos;
  48075. chunkStart = this.state.pos;
  48076. } else {
  48077. ++this.state.pos;
  48078. }
  48079. }
  48080. }
  48081. recordStrictModeErrors(pos, message) {
  48082. if (this.state.strict && !this.state.strictErrors.has(pos)) {
  48083. this.raise(pos, message);
  48084. } else {
  48085. this.state.strictErrors.set(pos, message);
  48086. }
  48087. }
  48088. readEscapedChar(inTemplate) {
  48089. const throwOnInvalid = !inTemplate;
  48090. const ch = this.input.charCodeAt(++this.state.pos);
  48091. ++this.state.pos;
  48092. switch (ch) {
  48093. case 110:
  48094. return "\n";
  48095. case 114:
  48096. return "\r";
  48097. case 120: {
  48098. const code2 = this.readHexChar(2, false, throwOnInvalid);
  48099. return code2 === null ? null : String.fromCharCode(code2);
  48100. }
  48101. case 117: {
  48102. const code2 = this.readCodePoint(throwOnInvalid);
  48103. return code2 === null ? null : String.fromCodePoint(code2);
  48104. }
  48105. case 116:
  48106. return " ";
  48107. case 98:
  48108. return "\b";
  48109. case 118:
  48110. return "\v";
  48111. case 102:
  48112. return "\f";
  48113. case 13:
  48114. if (this.input.charCodeAt(this.state.pos) === 10) {
  48115. ++this.state.pos;
  48116. }
  48117. case 10:
  48118. this.state.lineStart = this.state.pos;
  48119. ++this.state.curLine;
  48120. case 8232:
  48121. case 8233:
  48122. return "";
  48123. case 56:
  48124. case 57:
  48125. if (inTemplate) {
  48126. return null;
  48127. } else {
  48128. this.recordStrictModeErrors(this.state.pos - 1, ErrorMessages.StrictNumericEscape);
  48129. }
  48130. default:
  48131. if (ch >= 48 && ch <= 55) {
  48132. const codePos = this.state.pos - 1;
  48133. const match = this.input.substr(this.state.pos - 1, 3).match(/^[0-7]+/);
  48134. let octalStr = match[0];
  48135. let octal = parseInt(octalStr, 8);
  48136. if (octal > 255) {
  48137. octalStr = octalStr.slice(0, -1);
  48138. octal = parseInt(octalStr, 8);
  48139. }
  48140. this.state.pos += octalStr.length - 1;
  48141. const next = this.input.charCodeAt(this.state.pos);
  48142. if (octalStr !== "0" || next === 56 || next === 57) {
  48143. if (inTemplate) {
  48144. return null;
  48145. } else {
  48146. this.recordStrictModeErrors(codePos, ErrorMessages.StrictNumericEscape);
  48147. }
  48148. }
  48149. return String.fromCharCode(octal);
  48150. }
  48151. return String.fromCharCode(ch);
  48152. }
  48153. }
  48154. readHexChar(len, forceLen, throwOnInvalid) {
  48155. const codePos = this.state.pos;
  48156. const n = this.readInt(16, len, forceLen, false);
  48157. if (n === null) {
  48158. if (throwOnInvalid) {
  48159. this.raise(codePos, ErrorMessages.InvalidEscapeSequence);
  48160. } else {
  48161. this.state.pos = codePos - 1;
  48162. }
  48163. }
  48164. return n;
  48165. }
  48166. readWord1(firstCode) {
  48167. this.state.containsEsc = false;
  48168. let word = "";
  48169. const start3 = this.state.pos;
  48170. let chunkStart = this.state.pos;
  48171. if (firstCode !== void 0) {
  48172. this.state.pos += firstCode <= 65535 ? 1 : 2;
  48173. }
  48174. while (this.state.pos < this.length) {
  48175. const ch = this.codePointAtPos(this.state.pos);
  48176. if (isIdentifierChar2(ch)) {
  48177. this.state.pos += ch <= 65535 ? 1 : 2;
  48178. } else if (ch === 92) {
  48179. this.state.containsEsc = true;
  48180. word += this.input.slice(chunkStart, this.state.pos);
  48181. const escStart = this.state.pos;
  48182. const identifierCheck = this.state.pos === start3 ? isIdentifierStart2 : isIdentifierChar2;
  48183. if (this.input.charCodeAt(++this.state.pos) !== 117) {
  48184. this.raise(this.state.pos, ErrorMessages.MissingUnicodeEscape);
  48185. chunkStart = this.state.pos - 1;
  48186. continue;
  48187. }
  48188. ++this.state.pos;
  48189. const esc = this.readCodePoint(true);
  48190. if (esc !== null) {
  48191. if (!identifierCheck(esc)) {
  48192. this.raise(escStart, ErrorMessages.EscapedCharNotAnIdentifier);
  48193. }
  48194. word += String.fromCodePoint(esc);
  48195. }
  48196. chunkStart = this.state.pos;
  48197. } else {
  48198. break;
  48199. }
  48200. }
  48201. return word + this.input.slice(chunkStart, this.state.pos);
  48202. }
  48203. readWord(firstCode) {
  48204. const word = this.readWord1(firstCode);
  48205. const type = keywords$12.get(word) || types$12.name;
  48206. this.finishToken(type, word);
  48207. }
  48208. checkKeywordEscapes() {
  48209. const kw2 = this.state.type.keyword;
  48210. if (kw2 && this.state.containsEsc) {
  48211. this.raise(this.state.start, ErrorMessages.InvalidEscapedReservedWord, kw2);
  48212. }
  48213. }
  48214. braceIsBlock(prevType) {
  48215. const parent = this.curContext();
  48216. if (parent === types2.functionExpression || parent === types2.functionStatement) {
  48217. return true;
  48218. }
  48219. if (prevType === types$12.colon && (parent === types2.braceStatement || parent === types2.braceExpression)) {
  48220. return !parent.isExpr;
  48221. }
  48222. if (prevType === types$12._return || prevType === types$12.name && this.state.exprAllowed) {
  48223. return this.hasPrecedingLineBreak();
  48224. }
  48225. if (prevType === types$12._else || prevType === types$12.semi || prevType === types$12.eof || prevType === types$12.parenR || prevType === types$12.arrow) {
  48226. return true;
  48227. }
  48228. if (prevType === types$12.braceL) {
  48229. return parent === types2.braceStatement;
  48230. }
  48231. if (prevType === types$12._var || prevType === types$12._const || prevType === types$12.name) {
  48232. return false;
  48233. }
  48234. if (prevType === types$12.relational) {
  48235. return true;
  48236. }
  48237. return !this.state.exprAllowed;
  48238. }
  48239. updateContext(prevType) {
  48240. const type = this.state.type;
  48241. let update;
  48242. if (type.keyword && (prevType === types$12.dot || prevType === types$12.questionDot)) {
  48243. this.state.exprAllowed = false;
  48244. } else if (update = type.updateContext) {
  48245. update.call(this, prevType);
  48246. } else {
  48247. this.state.exprAllowed = type.beforeExpr;
  48248. }
  48249. }
  48250. };
  48251. var ClassScope = class {
  48252. constructor() {
  48253. this.privateNames = /* @__PURE__ */ new Set();
  48254. this.loneAccessors = /* @__PURE__ */ new Map();
  48255. this.undefinedPrivateNames = /* @__PURE__ */ new Map();
  48256. }
  48257. };
  48258. var ClassScopeHandler = class {
  48259. constructor(raise2) {
  48260. this.stack = [];
  48261. this.undefinedPrivateNames = /* @__PURE__ */ new Map();
  48262. this.raise = raise2;
  48263. }
  48264. current() {
  48265. return this.stack[this.stack.length - 1];
  48266. }
  48267. enter() {
  48268. this.stack.push(new ClassScope());
  48269. }
  48270. exit() {
  48271. const oldClassScope = this.stack.pop();
  48272. const current2 = this.current();
  48273. for (const [name2, pos] of Array.from(oldClassScope.undefinedPrivateNames)) {
  48274. if (current2) {
  48275. if (!current2.undefinedPrivateNames.has(name2)) {
  48276. current2.undefinedPrivateNames.set(name2, pos);
  48277. }
  48278. } else {
  48279. this.raise(pos, ErrorMessages.InvalidPrivateFieldResolution, name2);
  48280. }
  48281. }
  48282. }
  48283. declarePrivateName(name2, elementType, pos) {
  48284. const classScope = this.current();
  48285. let redefined = classScope.privateNames.has(name2);
  48286. if (elementType & CLASS_ELEMENT_KIND_ACCESSOR) {
  48287. const accessor = redefined && classScope.loneAccessors.get(name2);
  48288. if (accessor) {
  48289. const oldStatic = accessor & CLASS_ELEMENT_FLAG_STATIC;
  48290. const newStatic = elementType & CLASS_ELEMENT_FLAG_STATIC;
  48291. const oldKind = accessor & CLASS_ELEMENT_KIND_ACCESSOR;
  48292. const newKind = elementType & CLASS_ELEMENT_KIND_ACCESSOR;
  48293. redefined = oldKind === newKind || oldStatic !== newStatic;
  48294. if (!redefined)
  48295. classScope.loneAccessors.delete(name2);
  48296. } else if (!redefined) {
  48297. classScope.loneAccessors.set(name2, elementType);
  48298. }
  48299. }
  48300. if (redefined) {
  48301. this.raise(pos, ErrorMessages.PrivateNameRedeclaration, name2);
  48302. }
  48303. classScope.privateNames.add(name2);
  48304. classScope.undefinedPrivateNames.delete(name2);
  48305. }
  48306. usePrivateName(name2, pos) {
  48307. let classScope;
  48308. for (classScope of this.stack) {
  48309. if (classScope.privateNames.has(name2))
  48310. return;
  48311. }
  48312. if (classScope) {
  48313. classScope.undefinedPrivateNames.set(name2, pos);
  48314. } else {
  48315. this.raise(pos, ErrorMessages.InvalidPrivateFieldResolution, name2);
  48316. }
  48317. }
  48318. };
  48319. var kExpression = 0;
  48320. var kMaybeArrowParameterDeclaration = 1;
  48321. var kMaybeAsyncArrowParameterDeclaration = 2;
  48322. var kParameterDeclaration = 3;
  48323. var ExpressionScope = class {
  48324. constructor(type = kExpression) {
  48325. this.type = void 0;
  48326. this.type = type;
  48327. }
  48328. canBeArrowParameterDeclaration() {
  48329. return this.type === kMaybeAsyncArrowParameterDeclaration || this.type === kMaybeArrowParameterDeclaration;
  48330. }
  48331. isCertainlyParameterDeclaration() {
  48332. return this.type === kParameterDeclaration;
  48333. }
  48334. };
  48335. var ArrowHeadParsingScope = class extends ExpressionScope {
  48336. constructor(type) {
  48337. super(type);
  48338. this.errors = /* @__PURE__ */ new Map();
  48339. }
  48340. recordDeclarationError(pos, template) {
  48341. this.errors.set(pos, template);
  48342. }
  48343. clearDeclarationError(pos) {
  48344. this.errors.delete(pos);
  48345. }
  48346. iterateErrors(iterator) {
  48347. this.errors.forEach(iterator);
  48348. }
  48349. };
  48350. var ExpressionScopeHandler = class {
  48351. constructor(raise2) {
  48352. this.stack = [new ExpressionScope()];
  48353. this.raise = raise2;
  48354. }
  48355. enter(scope) {
  48356. this.stack.push(scope);
  48357. }
  48358. exit() {
  48359. this.stack.pop();
  48360. }
  48361. recordParameterInitializerError(pos, template) {
  48362. const {
  48363. stack
  48364. } = this;
  48365. let i = stack.length - 1;
  48366. let scope = stack[i];
  48367. while (!scope.isCertainlyParameterDeclaration()) {
  48368. if (scope.canBeArrowParameterDeclaration()) {
  48369. scope.recordDeclarationError(pos, template);
  48370. } else {
  48371. return;
  48372. }
  48373. scope = stack[--i];
  48374. }
  48375. this.raise(pos, template);
  48376. }
  48377. recordParenthesizedIdentifierError(pos, template) {
  48378. const {
  48379. stack
  48380. } = this;
  48381. const scope = stack[stack.length - 1];
  48382. if (scope.isCertainlyParameterDeclaration()) {
  48383. this.raise(pos, template);
  48384. } else if (scope.canBeArrowParameterDeclaration()) {
  48385. scope.recordDeclarationError(pos, template);
  48386. } else {
  48387. return;
  48388. }
  48389. }
  48390. recordAsyncArrowParametersError(pos, template) {
  48391. const {
  48392. stack
  48393. } = this;
  48394. let i = stack.length - 1;
  48395. let scope = stack[i];
  48396. while (scope.canBeArrowParameterDeclaration()) {
  48397. if (scope.type === kMaybeAsyncArrowParameterDeclaration) {
  48398. scope.recordDeclarationError(pos, template);
  48399. }
  48400. scope = stack[--i];
  48401. }
  48402. }
  48403. validateAsPattern() {
  48404. const {
  48405. stack
  48406. } = this;
  48407. const currentScope = stack[stack.length - 1];
  48408. if (!currentScope.canBeArrowParameterDeclaration())
  48409. return;
  48410. currentScope.iterateErrors((template, pos) => {
  48411. this.raise(pos, template);
  48412. let i = stack.length - 2;
  48413. let scope = stack[i];
  48414. while (scope.canBeArrowParameterDeclaration()) {
  48415. scope.clearDeclarationError(pos);
  48416. scope = stack[--i];
  48417. }
  48418. });
  48419. }
  48420. };
  48421. function newParameterDeclarationScope() {
  48422. return new ExpressionScope(kParameterDeclaration);
  48423. }
  48424. function newArrowHeadScope() {
  48425. return new ArrowHeadParsingScope(kMaybeArrowParameterDeclaration);
  48426. }
  48427. function newAsyncArrowScope() {
  48428. return new ArrowHeadParsingScope(kMaybeAsyncArrowParameterDeclaration);
  48429. }
  48430. function newExpressionScope() {
  48431. return new ExpressionScope();
  48432. }
  48433. var UtilParser = class extends Tokenizer {
  48434. addExtra(node, key, val) {
  48435. if (!node)
  48436. return;
  48437. const extra = node.extra = node.extra || {};
  48438. extra[key] = val;
  48439. }
  48440. isRelational(op) {
  48441. return this.match(types$12.relational) && this.state.value === op;
  48442. }
  48443. expectRelational(op) {
  48444. if (this.isRelational(op)) {
  48445. this.next();
  48446. } else {
  48447. this.unexpected(null, types$12.relational);
  48448. }
  48449. }
  48450. isContextual(name2) {
  48451. return this.match(types$12.name) && this.state.value === name2 && !this.state.containsEsc;
  48452. }
  48453. isUnparsedContextual(nameStart, name2) {
  48454. const nameEnd = nameStart + name2.length;
  48455. if (this.input.slice(nameStart, nameEnd) === name2) {
  48456. const nextCh = this.input.charCodeAt(nameEnd);
  48457. return !(isIdentifierChar2(nextCh) || (nextCh & 64512) === 55296);
  48458. }
  48459. return false;
  48460. }
  48461. isLookaheadContextual(name2) {
  48462. const next = this.nextTokenStart();
  48463. return this.isUnparsedContextual(next, name2);
  48464. }
  48465. eatContextual(name2) {
  48466. return this.isContextual(name2) && this.eat(types$12.name);
  48467. }
  48468. expectContextual(name2, template) {
  48469. if (!this.eatContextual(name2))
  48470. this.unexpected(null, template);
  48471. }
  48472. canInsertSemicolon() {
  48473. return this.match(types$12.eof) || this.match(types$12.braceR) || this.hasPrecedingLineBreak();
  48474. }
  48475. hasPrecedingLineBreak() {
  48476. return lineBreak2.test(this.input.slice(this.state.lastTokEnd, this.state.start));
  48477. }
  48478. hasFollowingLineBreak() {
  48479. return lineBreak2.test(this.input.slice(this.state.end, this.nextTokenStart()));
  48480. }
  48481. isLineTerminator() {
  48482. return this.eat(types$12.semi) || this.canInsertSemicolon();
  48483. }
  48484. semicolon(allowAsi = true) {
  48485. if (allowAsi ? this.isLineTerminator() : this.eat(types$12.semi))
  48486. return;
  48487. this.raise(this.state.lastTokEnd, ErrorMessages.MissingSemicolon);
  48488. }
  48489. expect(type, pos) {
  48490. this.eat(type) || this.unexpected(pos, type);
  48491. }
  48492. assertNoSpace(message = "Unexpected space.") {
  48493. if (this.state.start > this.state.lastTokEnd) {
  48494. this.raise(this.state.lastTokEnd, {
  48495. code: ErrorCodes.SyntaxError,
  48496. reasonCode: "UnexpectedSpace",
  48497. template: message
  48498. });
  48499. }
  48500. }
  48501. unexpected(pos, messageOrType = {
  48502. code: ErrorCodes.SyntaxError,
  48503. reasonCode: "UnexpectedToken",
  48504. template: "Unexpected token"
  48505. }) {
  48506. if (messageOrType instanceof TokenType3) {
  48507. messageOrType = {
  48508. code: ErrorCodes.SyntaxError,
  48509. reasonCode: "UnexpectedToken",
  48510. template: `Unexpected token, expected "${messageOrType.label}"`
  48511. };
  48512. }
  48513. throw this.raise(pos != null ? pos : this.state.start, messageOrType);
  48514. }
  48515. expectPlugin(name2, pos) {
  48516. if (!this.hasPlugin(name2)) {
  48517. throw this.raiseWithData(pos != null ? pos : this.state.start, {
  48518. missingPlugin: [name2]
  48519. }, `This experimental syntax requires enabling the parser plugin: '${name2}'`);
  48520. }
  48521. return true;
  48522. }
  48523. expectOnePlugin(names, pos) {
  48524. if (!names.some((n) => this.hasPlugin(n))) {
  48525. throw this.raiseWithData(pos != null ? pos : this.state.start, {
  48526. missingPlugin: names
  48527. }, `This experimental syntax requires enabling one of the following parser plugin(s): '${names.join(", ")}'`);
  48528. }
  48529. }
  48530. tryParse(fn, oldState = this.state.clone()) {
  48531. const abortSignal = {
  48532. node: null
  48533. };
  48534. try {
  48535. const node = fn((node2 = null) => {
  48536. abortSignal.node = node2;
  48537. throw abortSignal;
  48538. });
  48539. if (this.state.errors.length > oldState.errors.length) {
  48540. const failState = this.state;
  48541. this.state = oldState;
  48542. this.state.tokensLength = failState.tokensLength;
  48543. return {
  48544. node,
  48545. error: failState.errors[oldState.errors.length],
  48546. thrown: false,
  48547. aborted: false,
  48548. failState
  48549. };
  48550. }
  48551. return {
  48552. node,
  48553. error: null,
  48554. thrown: false,
  48555. aborted: false,
  48556. failState: null
  48557. };
  48558. } catch (error) {
  48559. const failState = this.state;
  48560. this.state = oldState;
  48561. if (error instanceof SyntaxError) {
  48562. return {
  48563. node: null,
  48564. error,
  48565. thrown: true,
  48566. aborted: false,
  48567. failState
  48568. };
  48569. }
  48570. if (error === abortSignal) {
  48571. return {
  48572. node: abortSignal.node,
  48573. error: null,
  48574. thrown: false,
  48575. aborted: true,
  48576. failState
  48577. };
  48578. }
  48579. throw error;
  48580. }
  48581. }
  48582. checkExpressionErrors(refExpressionErrors, andThrow) {
  48583. if (!refExpressionErrors)
  48584. return false;
  48585. const {
  48586. shorthandAssign,
  48587. doubleProto
  48588. } = refExpressionErrors;
  48589. if (!andThrow)
  48590. return shorthandAssign >= 0 || doubleProto >= 0;
  48591. if (shorthandAssign >= 0) {
  48592. this.unexpected(shorthandAssign);
  48593. }
  48594. if (doubleProto >= 0) {
  48595. this.raise(doubleProto, ErrorMessages.DuplicateProto);
  48596. }
  48597. }
  48598. isLiteralPropertyName() {
  48599. return this.match(types$12.name) || !!this.state.type.keyword || this.match(types$12.string) || this.match(types$12.num) || this.match(types$12.bigint) || this.match(types$12.decimal);
  48600. }
  48601. isPrivateName(node) {
  48602. return node.type === "PrivateName";
  48603. }
  48604. getPrivateNameSV(node) {
  48605. return node.id.name;
  48606. }
  48607. hasPropertyAsPrivateName(node) {
  48608. return (node.type === "MemberExpression" || node.type === "OptionalMemberExpression") && this.isPrivateName(node.property);
  48609. }
  48610. isOptionalChain(node) {
  48611. return node.type === "OptionalMemberExpression" || node.type === "OptionalCallExpression";
  48612. }
  48613. isObjectProperty(node) {
  48614. return node.type === "ObjectProperty";
  48615. }
  48616. isObjectMethod(node) {
  48617. return node.type === "ObjectMethod";
  48618. }
  48619. initializeScopes(inModule = this.options.sourceType === "module") {
  48620. const oldLabels = this.state.labels;
  48621. this.state.labels = [];
  48622. const oldExportedIdentifiers = this.state.exportedIdentifiers;
  48623. this.state.exportedIdentifiers = [];
  48624. const oldInModule = this.inModule;
  48625. this.inModule = inModule;
  48626. const oldScope = this.scope;
  48627. const ScopeHandler2 = this.getScopeHandler();
  48628. this.scope = new ScopeHandler2(this.raise.bind(this), this.inModule);
  48629. const oldProdParam = this.prodParam;
  48630. this.prodParam = new ProductionParameterHandler();
  48631. const oldClassScope = this.classScope;
  48632. this.classScope = new ClassScopeHandler(this.raise.bind(this));
  48633. const oldExpressionScope = this.expressionScope;
  48634. this.expressionScope = new ExpressionScopeHandler(this.raise.bind(this));
  48635. return () => {
  48636. this.state.labels = oldLabels;
  48637. this.state.exportedIdentifiers = oldExportedIdentifiers;
  48638. this.inModule = oldInModule;
  48639. this.scope = oldScope;
  48640. this.prodParam = oldProdParam;
  48641. this.classScope = oldClassScope;
  48642. this.expressionScope = oldExpressionScope;
  48643. };
  48644. }
  48645. enterInitialScopes() {
  48646. let paramFlags = PARAM;
  48647. if (this.hasPlugin("topLevelAwait") && this.inModule) {
  48648. paramFlags |= PARAM_AWAIT;
  48649. }
  48650. this.scope.enter(SCOPE_PROGRAM);
  48651. this.prodParam.enter(paramFlags);
  48652. }
  48653. };
  48654. var ExpressionErrors = class {
  48655. constructor() {
  48656. this.shorthandAssign = -1;
  48657. this.doubleProto = -1;
  48658. }
  48659. };
  48660. var Node3 = class {
  48661. constructor(parser, pos, loc) {
  48662. this.type = void 0;
  48663. this.start = void 0;
  48664. this.end = void 0;
  48665. this.loc = void 0;
  48666. this.range = void 0;
  48667. this.leadingComments = void 0;
  48668. this.trailingComments = void 0;
  48669. this.innerComments = void 0;
  48670. this.extra = void 0;
  48671. this.type = "";
  48672. this.start = pos;
  48673. this.end = 0;
  48674. this.loc = new SourceLocation3(loc);
  48675. if (parser != null && parser.options.ranges)
  48676. this.range = [pos, 0];
  48677. if (parser != null && parser.filename)
  48678. this.loc.filename = parser.filename;
  48679. }
  48680. __clone() {
  48681. const newNode = new Node3();
  48682. const keys2 = Object.keys(this);
  48683. for (let i = 0, length = keys2.length; i < length; i++) {
  48684. const key = keys2[i];
  48685. if (key !== "leadingComments" && key !== "trailingComments" && key !== "innerComments") {
  48686. newNode[key] = this[key];
  48687. }
  48688. }
  48689. return newNode;
  48690. }
  48691. };
  48692. var NodeUtils = class extends UtilParser {
  48693. startNode() {
  48694. return new Node3(this, this.state.start, this.state.startLoc);
  48695. }
  48696. startNodeAt(pos, loc) {
  48697. return new Node3(this, pos, loc);
  48698. }
  48699. startNodeAtNode(type) {
  48700. return this.startNodeAt(type.start, type.loc.start);
  48701. }
  48702. finishNode(node, type) {
  48703. return this.finishNodeAt(node, type, this.state.lastTokEnd, this.state.lastTokEndLoc);
  48704. }
  48705. finishNodeAt(node, type, pos, loc) {
  48706. node.type = type;
  48707. node.end = pos;
  48708. node.loc.end = loc;
  48709. if (this.options.ranges)
  48710. node.range[1] = pos;
  48711. this.processComment(node);
  48712. return node;
  48713. }
  48714. resetStartLocation(node, start3, startLoc) {
  48715. node.start = start3;
  48716. node.loc.start = startLoc;
  48717. if (this.options.ranges)
  48718. node.range[0] = start3;
  48719. }
  48720. resetEndLocation(node, end = this.state.lastTokEnd, endLoc = this.state.lastTokEndLoc) {
  48721. node.end = end;
  48722. node.loc.end = endLoc;
  48723. if (this.options.ranges)
  48724. node.range[1] = end;
  48725. }
  48726. resetStartLocationFromNode(node, locationNode) {
  48727. this.resetStartLocation(node, locationNode.start, locationNode.loc.start);
  48728. }
  48729. };
  48730. var unwrapParenthesizedExpression = (node) => {
  48731. return node.type === "ParenthesizedExpression" ? unwrapParenthesizedExpression(node.expression) : node;
  48732. };
  48733. var LValParser = class extends NodeUtils {
  48734. toAssignable(node, isLHS = false) {
  48735. var _node$extra, _node$extra3;
  48736. let parenthesized = void 0;
  48737. if (node.type === "ParenthesizedExpression" || (_node$extra = node.extra) != null && _node$extra.parenthesized) {
  48738. parenthesized = unwrapParenthesizedExpression(node);
  48739. if (isLHS) {
  48740. if (parenthesized.type === "Identifier") {
  48741. this.expressionScope.recordParenthesizedIdentifierError(node.start, ErrorMessages.InvalidParenthesizedAssignment);
  48742. } else if (parenthesized.type !== "MemberExpression") {
  48743. this.raise(node.start, ErrorMessages.InvalidParenthesizedAssignment);
  48744. }
  48745. } else {
  48746. this.raise(node.start, ErrorMessages.InvalidParenthesizedAssignment);
  48747. }
  48748. }
  48749. switch (node.type) {
  48750. case "Identifier":
  48751. case "ObjectPattern":
  48752. case "ArrayPattern":
  48753. case "AssignmentPattern":
  48754. break;
  48755. case "ObjectExpression":
  48756. node.type = "ObjectPattern";
  48757. for (let i = 0, length = node.properties.length, last2 = length - 1; i < length; i++) {
  48758. var _node$extra2;
  48759. const prop = node.properties[i];
  48760. const isLast = i === last2;
  48761. this.toAssignableObjectExpressionProp(prop, isLast, isLHS);
  48762. if (isLast && prop.type === "RestElement" && (_node$extra2 = node.extra) != null && _node$extra2.trailingComma) {
  48763. this.raiseRestNotLast(node.extra.trailingComma);
  48764. }
  48765. }
  48766. break;
  48767. case "ObjectProperty":
  48768. this.toAssignable(node.value, isLHS);
  48769. break;
  48770. case "SpreadElement": {
  48771. this.checkToRestConversion(node);
  48772. node.type = "RestElement";
  48773. const arg = node.argument;
  48774. this.toAssignable(arg, isLHS);
  48775. break;
  48776. }
  48777. case "ArrayExpression":
  48778. node.type = "ArrayPattern";
  48779. this.toAssignableList(node.elements, (_node$extra3 = node.extra) == null ? void 0 : _node$extra3.trailingComma, isLHS);
  48780. break;
  48781. case "AssignmentExpression":
  48782. if (node.operator !== "=") {
  48783. this.raise(node.left.end, ErrorMessages.MissingEqInAssignment);
  48784. }
  48785. node.type = "AssignmentPattern";
  48786. delete node.operator;
  48787. this.toAssignable(node.left, isLHS);
  48788. break;
  48789. case "ParenthesizedExpression":
  48790. this.toAssignable(parenthesized, isLHS);
  48791. break;
  48792. }
  48793. return node;
  48794. }
  48795. toAssignableObjectExpressionProp(prop, isLast, isLHS) {
  48796. if (prop.type === "ObjectMethod") {
  48797. const error = prop.kind === "get" || prop.kind === "set" ? ErrorMessages.PatternHasAccessor : ErrorMessages.PatternHasMethod;
  48798. this.raise(prop.key.start, error);
  48799. } else if (prop.type === "SpreadElement" && !isLast) {
  48800. this.raiseRestNotLast(prop.start);
  48801. } else {
  48802. this.toAssignable(prop, isLHS);
  48803. }
  48804. }
  48805. toAssignableList(exprList, trailingCommaPos, isLHS) {
  48806. let end = exprList.length;
  48807. if (end) {
  48808. const last2 = exprList[end - 1];
  48809. if ((last2 == null ? void 0 : last2.type) === "RestElement") {
  48810. --end;
  48811. } else if ((last2 == null ? void 0 : last2.type) === "SpreadElement") {
  48812. last2.type = "RestElement";
  48813. let arg = last2.argument;
  48814. this.toAssignable(arg, isLHS);
  48815. arg = unwrapParenthesizedExpression(arg);
  48816. if (arg.type !== "Identifier" && arg.type !== "MemberExpression" && arg.type !== "ArrayPattern" && arg.type !== "ObjectPattern") {
  48817. this.unexpected(arg.start);
  48818. }
  48819. if (trailingCommaPos) {
  48820. this.raiseTrailingCommaAfterRest(trailingCommaPos);
  48821. }
  48822. --end;
  48823. }
  48824. }
  48825. for (let i = 0; i < end; i++) {
  48826. const elt = exprList[i];
  48827. if (elt) {
  48828. this.toAssignable(elt, isLHS);
  48829. if (elt.type === "RestElement") {
  48830. this.raiseRestNotLast(elt.start);
  48831. }
  48832. }
  48833. }
  48834. return exprList;
  48835. }
  48836. toReferencedList(exprList, isParenthesizedExpr) {
  48837. return exprList;
  48838. }
  48839. toReferencedListDeep(exprList, isParenthesizedExpr) {
  48840. this.toReferencedList(exprList, isParenthesizedExpr);
  48841. for (const expr of exprList) {
  48842. if ((expr == null ? void 0 : expr.type) === "ArrayExpression") {
  48843. this.toReferencedListDeep(expr.elements);
  48844. }
  48845. }
  48846. }
  48847. parseSpread(refExpressionErrors, refNeedsArrowPos) {
  48848. const node = this.startNode();
  48849. this.next();
  48850. node.argument = this.parseMaybeAssignAllowIn(refExpressionErrors, void 0, refNeedsArrowPos);
  48851. return this.finishNode(node, "SpreadElement");
  48852. }
  48853. parseRestBinding() {
  48854. const node = this.startNode();
  48855. this.next();
  48856. node.argument = this.parseBindingAtom();
  48857. return this.finishNode(node, "RestElement");
  48858. }
  48859. parseBindingAtom() {
  48860. switch (this.state.type) {
  48861. case types$12.bracketL: {
  48862. const node = this.startNode();
  48863. this.next();
  48864. node.elements = this.parseBindingList(types$12.bracketR, 93, true);
  48865. return this.finishNode(node, "ArrayPattern");
  48866. }
  48867. case types$12.braceL:
  48868. return this.parseObjectLike(types$12.braceR, true);
  48869. }
  48870. return this.parseIdentifier();
  48871. }
  48872. parseBindingList(close, closeCharCode, allowEmpty, allowModifiers) {
  48873. const elts = [];
  48874. let first = true;
  48875. while (!this.eat(close)) {
  48876. if (first) {
  48877. first = false;
  48878. } else {
  48879. this.expect(types$12.comma);
  48880. }
  48881. if (allowEmpty && this.match(types$12.comma)) {
  48882. elts.push(null);
  48883. } else if (this.eat(close)) {
  48884. break;
  48885. } else if (this.match(types$12.ellipsis)) {
  48886. elts.push(this.parseAssignableListItemTypes(this.parseRestBinding()));
  48887. this.checkCommaAfterRest(closeCharCode);
  48888. this.expect(close);
  48889. break;
  48890. } else {
  48891. const decorators = [];
  48892. if (this.match(types$12.at) && this.hasPlugin("decorators")) {
  48893. this.raise(this.state.start, ErrorMessages.UnsupportedParameterDecorator);
  48894. }
  48895. while (this.match(types$12.at)) {
  48896. decorators.push(this.parseDecorator());
  48897. }
  48898. elts.push(this.parseAssignableListItem(allowModifiers, decorators));
  48899. }
  48900. }
  48901. return elts;
  48902. }
  48903. parseAssignableListItem(allowModifiers, decorators) {
  48904. const left = this.parseMaybeDefault();
  48905. this.parseAssignableListItemTypes(left);
  48906. const elt = this.parseMaybeDefault(left.start, left.loc.start, left);
  48907. if (decorators.length) {
  48908. left.decorators = decorators;
  48909. }
  48910. return elt;
  48911. }
  48912. parseAssignableListItemTypes(param) {
  48913. return param;
  48914. }
  48915. parseMaybeDefault(startPos, startLoc, left) {
  48916. var _startLoc, _startPos, _left;
  48917. startLoc = (_startLoc = startLoc) != null ? _startLoc : this.state.startLoc;
  48918. startPos = (_startPos = startPos) != null ? _startPos : this.state.start;
  48919. left = (_left = left) != null ? _left : this.parseBindingAtom();
  48920. if (!this.eat(types$12.eq))
  48921. return left;
  48922. const node = this.startNodeAt(startPos, startLoc);
  48923. node.left = left;
  48924. node.right = this.parseMaybeAssignAllowIn();
  48925. return this.finishNode(node, "AssignmentPattern");
  48926. }
  48927. checkLVal(expr, contextDescription, bindingType = BIND_NONE2, checkClashes, disallowLetBinding, strictModeChanged = false) {
  48928. switch (expr.type) {
  48929. case "Identifier": {
  48930. const {
  48931. name: name2
  48932. } = expr;
  48933. if (this.state.strict && (strictModeChanged ? isStrictBindReservedWord(name2, this.inModule) : isStrictBindOnlyReservedWord(name2))) {
  48934. this.raise(expr.start, bindingType === BIND_NONE2 ? ErrorMessages.StrictEvalArguments : ErrorMessages.StrictEvalArgumentsBinding, name2);
  48935. }
  48936. if (checkClashes) {
  48937. if (checkClashes.has(name2)) {
  48938. this.raise(expr.start, ErrorMessages.ParamDupe);
  48939. } else {
  48940. checkClashes.add(name2);
  48941. }
  48942. }
  48943. if (disallowLetBinding && name2 === "let") {
  48944. this.raise(expr.start, ErrorMessages.LetInLexicalBinding);
  48945. }
  48946. if (!(bindingType & BIND_NONE2)) {
  48947. this.scope.declareName(name2, bindingType, expr.start);
  48948. }
  48949. break;
  48950. }
  48951. case "MemberExpression":
  48952. if (bindingType !== BIND_NONE2) {
  48953. this.raise(expr.start, ErrorMessages.InvalidPropertyBindingPattern);
  48954. }
  48955. break;
  48956. case "ObjectPattern":
  48957. for (let prop of expr.properties) {
  48958. if (this.isObjectProperty(prop))
  48959. prop = prop.value;
  48960. else if (this.isObjectMethod(prop))
  48961. continue;
  48962. this.checkLVal(prop, "object destructuring pattern", bindingType, checkClashes, disallowLetBinding);
  48963. }
  48964. break;
  48965. case "ArrayPattern":
  48966. for (const elem of expr.elements) {
  48967. if (elem) {
  48968. this.checkLVal(elem, "array destructuring pattern", bindingType, checkClashes, disallowLetBinding);
  48969. }
  48970. }
  48971. break;
  48972. case "AssignmentPattern":
  48973. this.checkLVal(expr.left, "assignment pattern", bindingType, checkClashes);
  48974. break;
  48975. case "RestElement":
  48976. this.checkLVal(expr.argument, "rest element", bindingType, checkClashes);
  48977. break;
  48978. case "ParenthesizedExpression":
  48979. this.checkLVal(expr.expression, "parenthesized expression", bindingType, checkClashes);
  48980. break;
  48981. default: {
  48982. this.raise(expr.start, bindingType === BIND_NONE2 ? ErrorMessages.InvalidLhs : ErrorMessages.InvalidLhsBinding, contextDescription);
  48983. }
  48984. }
  48985. }
  48986. checkToRestConversion(node) {
  48987. if (node.argument.type !== "Identifier" && node.argument.type !== "MemberExpression") {
  48988. this.raise(node.argument.start, ErrorMessages.InvalidRestAssignmentPattern);
  48989. }
  48990. }
  48991. checkCommaAfterRest(close) {
  48992. if (this.match(types$12.comma)) {
  48993. if (this.lookaheadCharCode() === close) {
  48994. this.raiseTrailingCommaAfterRest(this.state.start);
  48995. } else {
  48996. this.raiseRestNotLast(this.state.start);
  48997. }
  48998. }
  48999. }
  49000. raiseRestNotLast(pos) {
  49001. throw this.raise(pos, ErrorMessages.ElementAfterRest);
  49002. }
  49003. raiseTrailingCommaAfterRest(pos) {
  49004. this.raise(pos, ErrorMessages.RestTrailingComma);
  49005. }
  49006. };
  49007. var ExpressionParser = class extends LValParser {
  49008. checkProto(prop, isRecord, protoRef, refExpressionErrors) {
  49009. if (prop.type === "SpreadElement" || this.isObjectMethod(prop) || prop.computed || prop.shorthand) {
  49010. return;
  49011. }
  49012. const key = prop.key;
  49013. const name2 = key.type === "Identifier" ? key.name : key.value;
  49014. if (name2 === "__proto__") {
  49015. if (isRecord) {
  49016. this.raise(key.start, ErrorMessages.RecordNoProto);
  49017. return;
  49018. }
  49019. if (protoRef.used) {
  49020. if (refExpressionErrors) {
  49021. if (refExpressionErrors.doubleProto === -1) {
  49022. refExpressionErrors.doubleProto = key.start;
  49023. }
  49024. } else {
  49025. this.raise(key.start, ErrorMessages.DuplicateProto);
  49026. }
  49027. }
  49028. protoRef.used = true;
  49029. }
  49030. }
  49031. shouldExitDescending(expr, potentialArrowAt) {
  49032. return expr.type === "ArrowFunctionExpression" && expr.start === potentialArrowAt;
  49033. }
  49034. getExpression() {
  49035. let paramFlags = PARAM;
  49036. if (this.hasPlugin("topLevelAwait") && this.inModule) {
  49037. paramFlags |= PARAM_AWAIT;
  49038. }
  49039. this.scope.enter(SCOPE_PROGRAM);
  49040. this.prodParam.enter(paramFlags);
  49041. this.nextToken();
  49042. const expr = this.parseExpression();
  49043. if (!this.match(types$12.eof)) {
  49044. this.unexpected();
  49045. }
  49046. expr.comments = this.state.comments;
  49047. expr.errors = this.state.errors;
  49048. if (this.options.tokens) {
  49049. expr.tokens = this.tokens;
  49050. }
  49051. return expr;
  49052. }
  49053. parseExpression(disallowIn, refExpressionErrors) {
  49054. if (disallowIn) {
  49055. return this.disallowInAnd(() => this.parseExpressionBase(refExpressionErrors));
  49056. }
  49057. return this.allowInAnd(() => this.parseExpressionBase(refExpressionErrors));
  49058. }
  49059. parseExpressionBase(refExpressionErrors) {
  49060. const startPos = this.state.start;
  49061. const startLoc = this.state.startLoc;
  49062. const expr = this.parseMaybeAssign(refExpressionErrors);
  49063. if (this.match(types$12.comma)) {
  49064. const node = this.startNodeAt(startPos, startLoc);
  49065. node.expressions = [expr];
  49066. while (this.eat(types$12.comma)) {
  49067. node.expressions.push(this.parseMaybeAssign(refExpressionErrors));
  49068. }
  49069. this.toReferencedList(node.expressions);
  49070. return this.finishNode(node, "SequenceExpression");
  49071. }
  49072. return expr;
  49073. }
  49074. parseMaybeAssignDisallowIn(refExpressionErrors, afterLeftParse, refNeedsArrowPos) {
  49075. return this.disallowInAnd(() => this.parseMaybeAssign(refExpressionErrors, afterLeftParse, refNeedsArrowPos));
  49076. }
  49077. parseMaybeAssignAllowIn(refExpressionErrors, afterLeftParse, refNeedsArrowPos) {
  49078. return this.allowInAnd(() => this.parseMaybeAssign(refExpressionErrors, afterLeftParse, refNeedsArrowPos));
  49079. }
  49080. parseMaybeAssign(refExpressionErrors, afterLeftParse, refNeedsArrowPos) {
  49081. const startPos = this.state.start;
  49082. const startLoc = this.state.startLoc;
  49083. if (this.isContextual("yield")) {
  49084. if (this.prodParam.hasYield) {
  49085. this.state.exprAllowed = true;
  49086. let left2 = this.parseYield();
  49087. if (afterLeftParse) {
  49088. left2 = afterLeftParse.call(this, left2, startPos, startLoc);
  49089. }
  49090. return left2;
  49091. }
  49092. }
  49093. let ownExpressionErrors;
  49094. if (refExpressionErrors) {
  49095. ownExpressionErrors = false;
  49096. } else {
  49097. refExpressionErrors = new ExpressionErrors();
  49098. ownExpressionErrors = true;
  49099. }
  49100. if (this.match(types$12.parenL) || this.match(types$12.name)) {
  49101. this.state.potentialArrowAt = this.state.start;
  49102. }
  49103. let left = this.parseMaybeConditional(refExpressionErrors, refNeedsArrowPos);
  49104. if (afterLeftParse) {
  49105. left = afterLeftParse.call(this, left, startPos, startLoc);
  49106. }
  49107. if (this.state.type.isAssign) {
  49108. const node = this.startNodeAt(startPos, startLoc);
  49109. const operator = this.state.value;
  49110. node.operator = operator;
  49111. if (this.match(types$12.eq)) {
  49112. node.left = this.toAssignable(left, true);
  49113. refExpressionErrors.doubleProto = -1;
  49114. } else {
  49115. node.left = left;
  49116. }
  49117. if (refExpressionErrors.shorthandAssign >= node.left.start) {
  49118. refExpressionErrors.shorthandAssign = -1;
  49119. }
  49120. this.checkLVal(left, "assignment expression");
  49121. this.next();
  49122. node.right = this.parseMaybeAssign();
  49123. return this.finishNode(node, "AssignmentExpression");
  49124. } else if (ownExpressionErrors) {
  49125. this.checkExpressionErrors(refExpressionErrors, true);
  49126. }
  49127. return left;
  49128. }
  49129. parseMaybeConditional(refExpressionErrors, refNeedsArrowPos) {
  49130. const startPos = this.state.start;
  49131. const startLoc = this.state.startLoc;
  49132. const potentialArrowAt = this.state.potentialArrowAt;
  49133. const expr = this.parseExprOps(refExpressionErrors);
  49134. if (this.shouldExitDescending(expr, potentialArrowAt)) {
  49135. return expr;
  49136. }
  49137. return this.parseConditional(expr, startPos, startLoc, refNeedsArrowPos);
  49138. }
  49139. parseConditional(expr, startPos, startLoc, refNeedsArrowPos) {
  49140. if (this.eat(types$12.question)) {
  49141. const node = this.startNodeAt(startPos, startLoc);
  49142. node.test = expr;
  49143. node.consequent = this.parseMaybeAssignAllowIn();
  49144. this.expect(types$12.colon);
  49145. node.alternate = this.parseMaybeAssign();
  49146. return this.finishNode(node, "ConditionalExpression");
  49147. }
  49148. return expr;
  49149. }
  49150. parseExprOps(refExpressionErrors) {
  49151. const startPos = this.state.start;
  49152. const startLoc = this.state.startLoc;
  49153. const potentialArrowAt = this.state.potentialArrowAt;
  49154. const expr = this.parseMaybeUnary(refExpressionErrors);
  49155. if (this.shouldExitDescending(expr, potentialArrowAt)) {
  49156. return expr;
  49157. }
  49158. return this.parseExprOp(expr, startPos, startLoc, -1);
  49159. }
  49160. parseExprOp(left, leftStartPos, leftStartLoc, minPrec) {
  49161. let prec = this.state.type.binop;
  49162. if (prec != null && (this.prodParam.hasIn || !this.match(types$12._in))) {
  49163. if (prec > minPrec) {
  49164. const op = this.state.type;
  49165. if (op === types$12.pipeline) {
  49166. this.expectPlugin("pipelineOperator");
  49167. if (this.state.inFSharpPipelineDirectBody) {
  49168. return left;
  49169. }
  49170. this.state.inPipeline = true;
  49171. this.checkPipelineAtInfixOperator(left, leftStartPos);
  49172. }
  49173. const node = this.startNodeAt(leftStartPos, leftStartLoc);
  49174. node.left = left;
  49175. node.operator = this.state.value;
  49176. const logical = op === types$12.logicalOR || op === types$12.logicalAND;
  49177. const coalesce = op === types$12.nullishCoalescing;
  49178. if (coalesce) {
  49179. prec = types$12.logicalAND.binop;
  49180. }
  49181. this.next();
  49182. if (op === types$12.pipeline && this.getPluginOption("pipelineOperator", "proposal") === "minimal") {
  49183. if (this.match(types$12.name) && this.state.value === "await" && this.prodParam.hasAwait) {
  49184. throw this.raise(this.state.start, ErrorMessages.UnexpectedAwaitAfterPipelineBody);
  49185. }
  49186. }
  49187. node.right = this.parseExprOpRightExpr(op, prec);
  49188. this.finishNode(node, logical || coalesce ? "LogicalExpression" : "BinaryExpression");
  49189. const nextOp = this.state.type;
  49190. if (coalesce && (nextOp === types$12.logicalOR || nextOp === types$12.logicalAND) || logical && nextOp === types$12.nullishCoalescing) {
  49191. throw this.raise(this.state.start, ErrorMessages.MixingCoalesceWithLogical);
  49192. }
  49193. return this.parseExprOp(node, leftStartPos, leftStartLoc, minPrec);
  49194. }
  49195. }
  49196. return left;
  49197. }
  49198. parseExprOpRightExpr(op, prec) {
  49199. const startPos = this.state.start;
  49200. const startLoc = this.state.startLoc;
  49201. switch (op) {
  49202. case types$12.pipeline:
  49203. switch (this.getPluginOption("pipelineOperator", "proposal")) {
  49204. case "smart":
  49205. return this.withTopicPermittingContext(() => {
  49206. return this.parseSmartPipelineBody(this.parseExprOpBaseRightExpr(op, prec), startPos, startLoc);
  49207. });
  49208. case "fsharp":
  49209. return this.withSoloAwaitPermittingContext(() => {
  49210. return this.parseFSharpPipelineBody(prec);
  49211. });
  49212. }
  49213. default:
  49214. return this.parseExprOpBaseRightExpr(op, prec);
  49215. }
  49216. }
  49217. parseExprOpBaseRightExpr(op, prec) {
  49218. const startPos = this.state.start;
  49219. const startLoc = this.state.startLoc;
  49220. return this.parseExprOp(this.parseMaybeUnary(), startPos, startLoc, op.rightAssociative ? prec - 1 : prec);
  49221. }
  49222. checkExponentialAfterUnary(node) {
  49223. if (this.match(types$12.exponent)) {
  49224. this.raise(node.argument.start, ErrorMessages.UnexpectedTokenUnaryExponentiation);
  49225. }
  49226. }
  49227. parseMaybeUnary(refExpressionErrors, sawUnary) {
  49228. const startPos = this.state.start;
  49229. const startLoc = this.state.startLoc;
  49230. const isAwait = this.isContextual("await");
  49231. if (isAwait && this.isAwaitAllowed()) {
  49232. this.next();
  49233. const expr2 = this.parseAwait(startPos, startLoc);
  49234. if (!sawUnary)
  49235. this.checkExponentialAfterUnary(expr2);
  49236. return expr2;
  49237. }
  49238. if (this.isContextual("module") && this.lookaheadCharCode() === 123 && !this.hasFollowingLineBreak()) {
  49239. return this.parseModuleExpression();
  49240. }
  49241. const update = this.match(types$12.incDec);
  49242. const node = this.startNode();
  49243. if (this.state.type.prefix) {
  49244. node.operator = this.state.value;
  49245. node.prefix = true;
  49246. if (this.match(types$12._throw)) {
  49247. this.expectPlugin("throwExpressions");
  49248. }
  49249. const isDelete = this.match(types$12._delete);
  49250. this.next();
  49251. node.argument = this.parseMaybeUnary(null, true);
  49252. this.checkExpressionErrors(refExpressionErrors, true);
  49253. if (this.state.strict && isDelete) {
  49254. const arg = node.argument;
  49255. if (arg.type === "Identifier") {
  49256. this.raise(node.start, ErrorMessages.StrictDelete);
  49257. } else if (this.hasPropertyAsPrivateName(arg)) {
  49258. this.raise(node.start, ErrorMessages.DeletePrivateField);
  49259. }
  49260. }
  49261. if (!update) {
  49262. if (!sawUnary)
  49263. this.checkExponentialAfterUnary(node);
  49264. return this.finishNode(node, "UnaryExpression");
  49265. }
  49266. }
  49267. const expr = this.parseUpdate(node, update, refExpressionErrors);
  49268. if (isAwait) {
  49269. const startsExpr3 = this.hasPlugin("v8intrinsic") ? this.state.type.startsExpr : this.state.type.startsExpr && !this.match(types$12.modulo);
  49270. if (startsExpr3 && !this.isAmbiguousAwait()) {
  49271. this.raiseOverwrite(startPos, this.hasPlugin("topLevelAwait") ? ErrorMessages.AwaitNotInAsyncContext : ErrorMessages.AwaitNotInAsyncFunction);
  49272. return this.parseAwait(startPos, startLoc);
  49273. }
  49274. }
  49275. return expr;
  49276. }
  49277. parseUpdate(node, update, refExpressionErrors) {
  49278. if (update) {
  49279. this.checkLVal(node.argument, "prefix operation");
  49280. return this.finishNode(node, "UpdateExpression");
  49281. }
  49282. const startPos = this.state.start;
  49283. const startLoc = this.state.startLoc;
  49284. let expr = this.parseExprSubscripts(refExpressionErrors);
  49285. if (this.checkExpressionErrors(refExpressionErrors, false))
  49286. return expr;
  49287. while (this.state.type.postfix && !this.canInsertSemicolon()) {
  49288. const node2 = this.startNodeAt(startPos, startLoc);
  49289. node2.operator = this.state.value;
  49290. node2.prefix = false;
  49291. node2.argument = expr;
  49292. this.checkLVal(expr, "postfix operation");
  49293. this.next();
  49294. expr = this.finishNode(node2, "UpdateExpression");
  49295. }
  49296. return expr;
  49297. }
  49298. parseExprSubscripts(refExpressionErrors) {
  49299. const startPos = this.state.start;
  49300. const startLoc = this.state.startLoc;
  49301. const potentialArrowAt = this.state.potentialArrowAt;
  49302. const expr = this.parseExprAtom(refExpressionErrors);
  49303. if (this.shouldExitDescending(expr, potentialArrowAt)) {
  49304. return expr;
  49305. }
  49306. return this.parseSubscripts(expr, startPos, startLoc);
  49307. }
  49308. parseSubscripts(base2, startPos, startLoc, noCalls) {
  49309. const state = {
  49310. optionalChainMember: false,
  49311. maybeAsyncArrow: this.atPossibleAsyncArrow(base2),
  49312. stop: false
  49313. };
  49314. do {
  49315. base2 = this.parseSubscript(base2, startPos, startLoc, noCalls, state);
  49316. state.maybeAsyncArrow = false;
  49317. } while (!state.stop);
  49318. return base2;
  49319. }
  49320. parseSubscript(base2, startPos, startLoc, noCalls, state) {
  49321. if (!noCalls && this.eat(types$12.doubleColon)) {
  49322. return this.parseBind(base2, startPos, startLoc, noCalls, state);
  49323. } else if (this.match(types$12.backQuote)) {
  49324. return this.parseTaggedTemplateExpression(base2, startPos, startLoc, state);
  49325. }
  49326. let optional = false;
  49327. if (this.match(types$12.questionDot)) {
  49328. if (noCalls && this.lookaheadCharCode() === 40) {
  49329. state.stop = true;
  49330. return base2;
  49331. }
  49332. state.optionalChainMember = optional = true;
  49333. this.next();
  49334. }
  49335. if (!noCalls && this.match(types$12.parenL)) {
  49336. return this.parseCoverCallAndAsyncArrowHead(base2, startPos, startLoc, state, optional);
  49337. } else if (optional || this.match(types$12.bracketL) || this.eat(types$12.dot)) {
  49338. return this.parseMember(base2, startPos, startLoc, state, optional);
  49339. } else {
  49340. state.stop = true;
  49341. return base2;
  49342. }
  49343. }
  49344. parseMember(base2, startPos, startLoc, state, optional) {
  49345. const node = this.startNodeAt(startPos, startLoc);
  49346. const computed = this.eat(types$12.bracketL);
  49347. node.object = base2;
  49348. node.computed = computed;
  49349. const privateName = !computed && this.match(types$12.privateName) && this.state.value;
  49350. const property = computed ? this.parseExpression() : privateName ? this.parsePrivateName() : this.parseIdentifier(true);
  49351. if (privateName !== false) {
  49352. if (node.object.type === "Super") {
  49353. this.raise(startPos, ErrorMessages.SuperPrivateField);
  49354. }
  49355. this.classScope.usePrivateName(privateName, property.start);
  49356. }
  49357. node.property = property;
  49358. if (computed) {
  49359. this.expect(types$12.bracketR);
  49360. }
  49361. if (state.optionalChainMember) {
  49362. node.optional = optional;
  49363. return this.finishNode(node, "OptionalMemberExpression");
  49364. } else {
  49365. return this.finishNode(node, "MemberExpression");
  49366. }
  49367. }
  49368. parseBind(base2, startPos, startLoc, noCalls, state) {
  49369. const node = this.startNodeAt(startPos, startLoc);
  49370. node.object = base2;
  49371. node.callee = this.parseNoCallExpr();
  49372. state.stop = true;
  49373. return this.parseSubscripts(this.finishNode(node, "BindExpression"), startPos, startLoc, noCalls);
  49374. }
  49375. parseCoverCallAndAsyncArrowHead(base2, startPos, startLoc, state, optional) {
  49376. const oldMaybeInArrowParameters = this.state.maybeInArrowParameters;
  49377. this.state.maybeInArrowParameters = true;
  49378. this.next();
  49379. let node = this.startNodeAt(startPos, startLoc);
  49380. node.callee = base2;
  49381. if (state.maybeAsyncArrow) {
  49382. this.expressionScope.enter(newAsyncArrowScope());
  49383. }
  49384. if (state.optionalChainMember) {
  49385. node.optional = optional;
  49386. }
  49387. if (optional) {
  49388. node.arguments = this.parseCallExpressionArguments(types$12.parenR, false);
  49389. } else {
  49390. node.arguments = this.parseCallExpressionArguments(types$12.parenR, state.maybeAsyncArrow, base2.type === "Import", base2.type !== "Super", node);
  49391. }
  49392. this.finishCallExpression(node, state.optionalChainMember);
  49393. if (state.maybeAsyncArrow && this.shouldParseAsyncArrow() && !optional) {
  49394. state.stop = true;
  49395. this.expressionScope.validateAsPattern();
  49396. this.expressionScope.exit();
  49397. node = this.parseAsyncArrowFromCallExpression(this.startNodeAt(startPos, startLoc), node);
  49398. } else {
  49399. if (state.maybeAsyncArrow) {
  49400. this.expressionScope.exit();
  49401. }
  49402. this.toReferencedArguments(node);
  49403. }
  49404. this.state.maybeInArrowParameters = oldMaybeInArrowParameters;
  49405. return node;
  49406. }
  49407. toReferencedArguments(node, isParenthesizedExpr) {
  49408. this.toReferencedListDeep(node.arguments, isParenthesizedExpr);
  49409. }
  49410. parseTaggedTemplateExpression(base2, startPos, startLoc, state) {
  49411. const node = this.startNodeAt(startPos, startLoc);
  49412. node.tag = base2;
  49413. node.quasi = this.parseTemplate(true);
  49414. if (state.optionalChainMember) {
  49415. this.raise(startPos, ErrorMessages.OptionalChainingNoTemplate);
  49416. }
  49417. return this.finishNode(node, "TaggedTemplateExpression");
  49418. }
  49419. atPossibleAsyncArrow(base2) {
  49420. return base2.type === "Identifier" && base2.name === "async" && this.state.lastTokEnd === base2.end && !this.canInsertSemicolon() && base2.end - base2.start === 5 && base2.start === this.state.potentialArrowAt;
  49421. }
  49422. finishCallExpression(node, optional) {
  49423. if (node.callee.type === "Import") {
  49424. if (node.arguments.length === 2) {
  49425. {
  49426. if (!this.hasPlugin("moduleAttributes")) {
  49427. this.expectPlugin("importAssertions");
  49428. }
  49429. }
  49430. }
  49431. if (node.arguments.length === 0 || node.arguments.length > 2) {
  49432. this.raise(node.start, ErrorMessages.ImportCallArity, this.hasPlugin("importAssertions") || this.hasPlugin("moduleAttributes") ? "one or two arguments" : "one argument");
  49433. } else {
  49434. for (const arg of node.arguments) {
  49435. if (arg.type === "SpreadElement") {
  49436. this.raise(arg.start, ErrorMessages.ImportCallSpreadArgument);
  49437. }
  49438. }
  49439. }
  49440. }
  49441. return this.finishNode(node, optional ? "OptionalCallExpression" : "CallExpression");
  49442. }
  49443. parseCallExpressionArguments(close, possibleAsyncArrow, dynamicImport, allowPlaceholder, nodeForExtra) {
  49444. const elts = [];
  49445. let first = true;
  49446. const oldInFSharpPipelineDirectBody = this.state.inFSharpPipelineDirectBody;
  49447. this.state.inFSharpPipelineDirectBody = false;
  49448. while (!this.eat(close)) {
  49449. if (first) {
  49450. first = false;
  49451. } else {
  49452. this.expect(types$12.comma);
  49453. if (this.match(close)) {
  49454. if (dynamicImport && !this.hasPlugin("importAssertions") && !this.hasPlugin("moduleAttributes")) {
  49455. this.raise(this.state.lastTokStart, ErrorMessages.ImportCallArgumentTrailingComma);
  49456. }
  49457. if (nodeForExtra) {
  49458. this.addExtra(nodeForExtra, "trailingComma", this.state.lastTokStart);
  49459. }
  49460. this.next();
  49461. break;
  49462. }
  49463. }
  49464. elts.push(this.parseExprListItem(false, possibleAsyncArrow ? new ExpressionErrors() : void 0, possibleAsyncArrow ? {
  49465. start: 0
  49466. } : void 0, allowPlaceholder));
  49467. }
  49468. this.state.inFSharpPipelineDirectBody = oldInFSharpPipelineDirectBody;
  49469. return elts;
  49470. }
  49471. shouldParseAsyncArrow() {
  49472. return this.match(types$12.arrow) && !this.canInsertSemicolon();
  49473. }
  49474. parseAsyncArrowFromCallExpression(node, call) {
  49475. var _call$extra;
  49476. this.expect(types$12.arrow);
  49477. this.parseArrowExpression(node, call.arguments, true, (_call$extra = call.extra) == null ? void 0 : _call$extra.trailingComma);
  49478. return node;
  49479. }
  49480. parseNoCallExpr() {
  49481. const startPos = this.state.start;
  49482. const startLoc = this.state.startLoc;
  49483. return this.parseSubscripts(this.parseExprAtom(), startPos, startLoc, true);
  49484. }
  49485. parseExprAtom(refExpressionErrors) {
  49486. if (this.state.type === types$12.slash)
  49487. this.readRegexp();
  49488. const canBeArrow = this.state.potentialArrowAt === this.state.start;
  49489. let node;
  49490. switch (this.state.type) {
  49491. case types$12._super:
  49492. return this.parseSuper();
  49493. case types$12._import:
  49494. node = this.startNode();
  49495. this.next();
  49496. if (this.match(types$12.dot)) {
  49497. return this.parseImportMetaProperty(node);
  49498. }
  49499. if (!this.match(types$12.parenL)) {
  49500. this.raise(this.state.lastTokStart, ErrorMessages.UnsupportedImport);
  49501. }
  49502. return this.finishNode(node, "Import");
  49503. case types$12._this:
  49504. node = this.startNode();
  49505. this.next();
  49506. return this.finishNode(node, "ThisExpression");
  49507. case types$12.name: {
  49508. const containsEsc = this.state.containsEsc;
  49509. const id = this.parseIdentifier();
  49510. if (!containsEsc && id.name === "async" && !this.canInsertSemicolon()) {
  49511. if (this.match(types$12._function)) {
  49512. const last2 = this.state.context.length - 1;
  49513. if (this.state.context[last2] !== types2.functionStatement) {
  49514. throw new Error("Internal error");
  49515. }
  49516. this.state.context[last2] = types2.functionExpression;
  49517. this.next();
  49518. return this.parseFunction(this.startNodeAtNode(id), void 0, true);
  49519. } else if (this.match(types$12.name)) {
  49520. if (this.lookaheadCharCode() === 61) {
  49521. return this.parseAsyncArrowUnaryFunction(id);
  49522. } else {
  49523. return id;
  49524. }
  49525. } else if (this.match(types$12._do)) {
  49526. return this.parseDo(true);
  49527. }
  49528. }
  49529. if (canBeArrow && this.match(types$12.arrow) && !this.canInsertSemicolon()) {
  49530. this.next();
  49531. return this.parseArrowExpression(this.startNodeAtNode(id), [id], false);
  49532. }
  49533. return id;
  49534. }
  49535. case types$12._do: {
  49536. return this.parseDo(false);
  49537. }
  49538. case types$12.regexp: {
  49539. return this.parseRegExpLiteral(this.state.value);
  49540. }
  49541. case types$12.num:
  49542. return this.parseNumericLiteral(this.state.value);
  49543. case types$12.bigint:
  49544. return this.parseBigIntLiteral(this.state.value);
  49545. case types$12.decimal:
  49546. return this.parseDecimalLiteral(this.state.value);
  49547. case types$12.string:
  49548. return this.parseStringLiteral(this.state.value);
  49549. case types$12._null:
  49550. return this.parseNullLiteral();
  49551. case types$12._true:
  49552. return this.parseBooleanLiteral(true);
  49553. case types$12._false:
  49554. return this.parseBooleanLiteral(false);
  49555. case types$12.parenL:
  49556. return this.parseParenAndDistinguishExpression(canBeArrow);
  49557. case types$12.bracketBarL:
  49558. case types$12.bracketHashL: {
  49559. return this.parseArrayLike(this.state.type === types$12.bracketBarL ? types$12.bracketBarR : types$12.bracketR, false, true, refExpressionErrors);
  49560. }
  49561. case types$12.bracketL: {
  49562. return this.parseArrayLike(types$12.bracketR, true, false, refExpressionErrors);
  49563. }
  49564. case types$12.braceBarL:
  49565. case types$12.braceHashL: {
  49566. return this.parseObjectLike(this.state.type === types$12.braceBarL ? types$12.braceBarR : types$12.braceR, false, true, refExpressionErrors);
  49567. }
  49568. case types$12.braceL: {
  49569. return this.parseObjectLike(types$12.braceR, false, false, refExpressionErrors);
  49570. }
  49571. case types$12._function:
  49572. return this.parseFunctionOrFunctionSent();
  49573. case types$12.at:
  49574. this.parseDecorators();
  49575. case types$12._class:
  49576. node = this.startNode();
  49577. this.takeDecorators(node);
  49578. return this.parseClass(node, false);
  49579. case types$12._new:
  49580. return this.parseNewOrNewTarget();
  49581. case types$12.backQuote:
  49582. return this.parseTemplate(false);
  49583. case types$12.doubleColon: {
  49584. node = this.startNode();
  49585. this.next();
  49586. node.object = null;
  49587. const callee = node.callee = this.parseNoCallExpr();
  49588. if (callee.type === "MemberExpression") {
  49589. return this.finishNode(node, "BindExpression");
  49590. } else {
  49591. throw this.raise(callee.start, ErrorMessages.UnsupportedBind);
  49592. }
  49593. }
  49594. case types$12.privateName: {
  49595. const start3 = this.state.start;
  49596. const value = this.state.value;
  49597. node = this.parsePrivateName();
  49598. if (this.match(types$12._in)) {
  49599. this.expectPlugin("privateIn");
  49600. this.classScope.usePrivateName(value, node.start);
  49601. } else if (this.hasPlugin("privateIn")) {
  49602. this.raise(this.state.start, ErrorMessages.PrivateInExpectedIn, value);
  49603. } else {
  49604. throw this.unexpected(start3);
  49605. }
  49606. return node;
  49607. }
  49608. case types$12.hash: {
  49609. if (this.state.inPipeline) {
  49610. node = this.startNode();
  49611. if (this.getPluginOption("pipelineOperator", "proposal") !== "smart") {
  49612. this.raise(node.start, ErrorMessages.PrimaryTopicRequiresSmartPipeline);
  49613. }
  49614. this.next();
  49615. if (!this.primaryTopicReferenceIsAllowedInCurrentTopicContext()) {
  49616. this.raise(node.start, ErrorMessages.PrimaryTopicNotAllowed);
  49617. }
  49618. this.registerTopicReference();
  49619. return this.finishNode(node, "PipelinePrimaryTopicReference");
  49620. }
  49621. }
  49622. case types$12.relational: {
  49623. if (this.state.value === "<") {
  49624. const lookaheadCh = this.input.codePointAt(this.nextTokenStart());
  49625. if (isIdentifierStart2(lookaheadCh) || lookaheadCh === 62) {
  49626. this.expectOnePlugin(["jsx", "flow", "typescript"]);
  49627. }
  49628. }
  49629. }
  49630. default:
  49631. throw this.unexpected();
  49632. }
  49633. }
  49634. parseAsyncArrowUnaryFunction(id) {
  49635. const node = this.startNodeAtNode(id);
  49636. this.prodParam.enter(functionFlags2(true, this.prodParam.hasYield));
  49637. const params = [this.parseIdentifier()];
  49638. this.prodParam.exit();
  49639. if (this.hasPrecedingLineBreak()) {
  49640. this.raise(this.state.pos, ErrorMessages.LineTerminatorBeforeArrow);
  49641. }
  49642. this.expect(types$12.arrow);
  49643. this.parseArrowExpression(node, params, true);
  49644. return node;
  49645. }
  49646. parseDo(isAsync) {
  49647. this.expectPlugin("doExpressions");
  49648. if (isAsync) {
  49649. this.expectPlugin("asyncDoExpressions");
  49650. }
  49651. const node = this.startNode();
  49652. node.async = isAsync;
  49653. this.next();
  49654. const oldLabels = this.state.labels;
  49655. this.state.labels = [];
  49656. if (isAsync) {
  49657. this.prodParam.enter(PARAM_AWAIT);
  49658. node.body = this.parseBlock();
  49659. this.prodParam.exit();
  49660. } else {
  49661. node.body = this.parseBlock();
  49662. }
  49663. this.state.labels = oldLabels;
  49664. return this.finishNode(node, "DoExpression");
  49665. }
  49666. parseSuper() {
  49667. const node = this.startNode();
  49668. this.next();
  49669. if (this.match(types$12.parenL) && !this.scope.allowDirectSuper && !this.options.allowSuperOutsideMethod) {
  49670. this.raise(node.start, ErrorMessages.SuperNotAllowed);
  49671. } else if (!this.scope.allowSuper && !this.options.allowSuperOutsideMethod) {
  49672. this.raise(node.start, ErrorMessages.UnexpectedSuper);
  49673. }
  49674. if (!this.match(types$12.parenL) && !this.match(types$12.bracketL) && !this.match(types$12.dot)) {
  49675. this.raise(node.start, ErrorMessages.UnsupportedSuper);
  49676. }
  49677. return this.finishNode(node, "Super");
  49678. }
  49679. parseMaybePrivateName(isPrivateNameAllowed) {
  49680. const isPrivate = this.match(types$12.privateName);
  49681. if (isPrivate) {
  49682. if (!isPrivateNameAllowed) {
  49683. this.raise(this.state.start + 1, ErrorMessages.UnexpectedPrivateField);
  49684. }
  49685. return this.parsePrivateName();
  49686. } else {
  49687. return this.parseIdentifier(true);
  49688. }
  49689. }
  49690. parsePrivateName() {
  49691. const node = this.startNode();
  49692. const id = this.startNodeAt(this.state.start + 1, new Position3(this.state.curLine, this.state.start + 1 - this.state.lineStart));
  49693. const name2 = this.state.value;
  49694. this.next();
  49695. node.id = this.createIdentifier(id, name2);
  49696. return this.finishNode(node, "PrivateName");
  49697. }
  49698. parseFunctionOrFunctionSent() {
  49699. const node = this.startNode();
  49700. this.next();
  49701. if (this.prodParam.hasYield && this.match(types$12.dot)) {
  49702. const meta = this.createIdentifier(this.startNodeAtNode(node), "function");
  49703. this.next();
  49704. return this.parseMetaProperty(node, meta, "sent");
  49705. }
  49706. return this.parseFunction(node);
  49707. }
  49708. parseMetaProperty(node, meta, propertyName) {
  49709. node.meta = meta;
  49710. if (meta.name === "function" && propertyName === "sent") {
  49711. if (this.isContextual(propertyName)) {
  49712. this.expectPlugin("functionSent");
  49713. } else if (!this.hasPlugin("functionSent")) {
  49714. this.unexpected();
  49715. }
  49716. }
  49717. const containsEsc = this.state.containsEsc;
  49718. node.property = this.parseIdentifier(true);
  49719. if (node.property.name !== propertyName || containsEsc) {
  49720. this.raise(node.property.start, ErrorMessages.UnsupportedMetaProperty, meta.name, propertyName);
  49721. }
  49722. return this.finishNode(node, "MetaProperty");
  49723. }
  49724. parseImportMetaProperty(node) {
  49725. const id = this.createIdentifier(this.startNodeAtNode(node), "import");
  49726. this.next();
  49727. if (this.isContextual("meta")) {
  49728. if (!this.inModule) {
  49729. this.raise(id.start, SourceTypeModuleErrorMessages.ImportMetaOutsideModule);
  49730. }
  49731. this.sawUnambiguousESM = true;
  49732. }
  49733. return this.parseMetaProperty(node, id, "meta");
  49734. }
  49735. parseLiteralAtNode(value, type, node) {
  49736. this.addExtra(node, "rawValue", value);
  49737. this.addExtra(node, "raw", this.input.slice(node.start, this.state.end));
  49738. node.value = value;
  49739. this.next();
  49740. return this.finishNode(node, type);
  49741. }
  49742. parseLiteral(value, type) {
  49743. const node = this.startNode();
  49744. return this.parseLiteralAtNode(value, type, node);
  49745. }
  49746. parseStringLiteral(value) {
  49747. return this.parseLiteral(value, "StringLiteral");
  49748. }
  49749. parseNumericLiteral(value) {
  49750. return this.parseLiteral(value, "NumericLiteral");
  49751. }
  49752. parseBigIntLiteral(value) {
  49753. return this.parseLiteral(value, "BigIntLiteral");
  49754. }
  49755. parseDecimalLiteral(value) {
  49756. return this.parseLiteral(value, "DecimalLiteral");
  49757. }
  49758. parseRegExpLiteral(value) {
  49759. const node = this.parseLiteral(value.value, "RegExpLiteral");
  49760. node.pattern = value.pattern;
  49761. node.flags = value.flags;
  49762. return node;
  49763. }
  49764. parseBooleanLiteral(value) {
  49765. const node = this.startNode();
  49766. node.value = value;
  49767. this.next();
  49768. return this.finishNode(node, "BooleanLiteral");
  49769. }
  49770. parseNullLiteral() {
  49771. const node = this.startNode();
  49772. this.next();
  49773. return this.finishNode(node, "NullLiteral");
  49774. }
  49775. parseParenAndDistinguishExpression(canBeArrow) {
  49776. const startPos = this.state.start;
  49777. const startLoc = this.state.startLoc;
  49778. let val;
  49779. this.next();
  49780. this.expressionScope.enter(newArrowHeadScope());
  49781. const oldMaybeInArrowParameters = this.state.maybeInArrowParameters;
  49782. const oldInFSharpPipelineDirectBody = this.state.inFSharpPipelineDirectBody;
  49783. this.state.maybeInArrowParameters = true;
  49784. this.state.inFSharpPipelineDirectBody = false;
  49785. const innerStartPos = this.state.start;
  49786. const innerStartLoc = this.state.startLoc;
  49787. const exprList = [];
  49788. const refExpressionErrors = new ExpressionErrors();
  49789. const refNeedsArrowPos = {
  49790. start: 0
  49791. };
  49792. let first = true;
  49793. let spreadStart;
  49794. let optionalCommaStart;
  49795. while (!this.match(types$12.parenR)) {
  49796. if (first) {
  49797. first = false;
  49798. } else {
  49799. this.expect(types$12.comma, refNeedsArrowPos.start || null);
  49800. if (this.match(types$12.parenR)) {
  49801. optionalCommaStart = this.state.start;
  49802. break;
  49803. }
  49804. }
  49805. if (this.match(types$12.ellipsis)) {
  49806. const spreadNodeStartPos = this.state.start;
  49807. const spreadNodeStartLoc = this.state.startLoc;
  49808. spreadStart = this.state.start;
  49809. exprList.push(this.parseParenItem(this.parseRestBinding(), spreadNodeStartPos, spreadNodeStartLoc));
  49810. this.checkCommaAfterRest(41);
  49811. break;
  49812. } else {
  49813. exprList.push(this.parseMaybeAssignAllowIn(refExpressionErrors, this.parseParenItem, refNeedsArrowPos));
  49814. }
  49815. }
  49816. const innerEndPos = this.state.lastTokEnd;
  49817. const innerEndLoc = this.state.lastTokEndLoc;
  49818. this.expect(types$12.parenR);
  49819. this.state.maybeInArrowParameters = oldMaybeInArrowParameters;
  49820. this.state.inFSharpPipelineDirectBody = oldInFSharpPipelineDirectBody;
  49821. let arrowNode = this.startNodeAt(startPos, startLoc);
  49822. if (canBeArrow && this.shouldParseArrow() && (arrowNode = this.parseArrow(arrowNode))) {
  49823. this.expressionScope.validateAsPattern();
  49824. this.expressionScope.exit();
  49825. this.parseArrowExpression(arrowNode, exprList, false);
  49826. return arrowNode;
  49827. }
  49828. this.expressionScope.exit();
  49829. if (!exprList.length) {
  49830. this.unexpected(this.state.lastTokStart);
  49831. }
  49832. if (optionalCommaStart)
  49833. this.unexpected(optionalCommaStart);
  49834. if (spreadStart)
  49835. this.unexpected(spreadStart);
  49836. this.checkExpressionErrors(refExpressionErrors, true);
  49837. if (refNeedsArrowPos.start)
  49838. this.unexpected(refNeedsArrowPos.start);
  49839. this.toReferencedListDeep(exprList, true);
  49840. if (exprList.length > 1) {
  49841. val = this.startNodeAt(innerStartPos, innerStartLoc);
  49842. val.expressions = exprList;
  49843. this.finishNodeAt(val, "SequenceExpression", innerEndPos, innerEndLoc);
  49844. } else {
  49845. val = exprList[0];
  49846. }
  49847. if (!this.options.createParenthesizedExpressions) {
  49848. this.addExtra(val, "parenthesized", true);
  49849. this.addExtra(val, "parenStart", startPos);
  49850. return val;
  49851. }
  49852. const parenExpression = this.startNodeAt(startPos, startLoc);
  49853. parenExpression.expression = val;
  49854. this.finishNode(parenExpression, "ParenthesizedExpression");
  49855. return parenExpression;
  49856. }
  49857. shouldParseArrow() {
  49858. return !this.canInsertSemicolon();
  49859. }
  49860. parseArrow(node) {
  49861. if (this.eat(types$12.arrow)) {
  49862. return node;
  49863. }
  49864. }
  49865. parseParenItem(node, startPos, startLoc) {
  49866. return node;
  49867. }
  49868. parseNewOrNewTarget() {
  49869. const node = this.startNode();
  49870. this.next();
  49871. if (this.match(types$12.dot)) {
  49872. const meta = this.createIdentifier(this.startNodeAtNode(node), "new");
  49873. this.next();
  49874. const metaProp = this.parseMetaProperty(node, meta, "target");
  49875. if (!this.scope.inNonArrowFunction && !this.scope.inClass) {
  49876. this.raise(metaProp.start, ErrorMessages.UnexpectedNewTarget);
  49877. }
  49878. return metaProp;
  49879. }
  49880. return this.parseNew(node);
  49881. }
  49882. parseNew(node) {
  49883. node.callee = this.parseNoCallExpr();
  49884. if (node.callee.type === "Import") {
  49885. this.raise(node.callee.start, ErrorMessages.ImportCallNotNewExpression);
  49886. } else if (this.isOptionalChain(node.callee)) {
  49887. this.raise(this.state.lastTokEnd, ErrorMessages.OptionalChainingNoNew);
  49888. } else if (this.eat(types$12.questionDot)) {
  49889. this.raise(this.state.start, ErrorMessages.OptionalChainingNoNew);
  49890. }
  49891. this.parseNewArguments(node);
  49892. return this.finishNode(node, "NewExpression");
  49893. }
  49894. parseNewArguments(node) {
  49895. if (this.eat(types$12.parenL)) {
  49896. const args = this.parseExprList(types$12.parenR);
  49897. this.toReferencedList(args);
  49898. node.arguments = args;
  49899. } else {
  49900. node.arguments = [];
  49901. }
  49902. }
  49903. parseTemplateElement(isTagged) {
  49904. const elem = this.startNode();
  49905. if (this.state.value === null) {
  49906. if (!isTagged) {
  49907. this.raise(this.state.start + 1, ErrorMessages.InvalidEscapeSequenceTemplate);
  49908. }
  49909. }
  49910. elem.value = {
  49911. raw: this.input.slice(this.state.start, this.state.end).replace(/\r\n?/g, "\n"),
  49912. cooked: this.state.value
  49913. };
  49914. this.next();
  49915. elem.tail = this.match(types$12.backQuote);
  49916. return this.finishNode(elem, "TemplateElement");
  49917. }
  49918. parseTemplate(isTagged) {
  49919. const node = this.startNode();
  49920. this.next();
  49921. node.expressions = [];
  49922. let curElt = this.parseTemplateElement(isTagged);
  49923. node.quasis = [curElt];
  49924. while (!curElt.tail) {
  49925. this.expect(types$12.dollarBraceL);
  49926. node.expressions.push(this.parseTemplateSubstitution());
  49927. this.expect(types$12.braceR);
  49928. node.quasis.push(curElt = this.parseTemplateElement(isTagged));
  49929. }
  49930. this.next();
  49931. return this.finishNode(node, "TemplateLiteral");
  49932. }
  49933. parseTemplateSubstitution() {
  49934. return this.parseExpression();
  49935. }
  49936. parseObjectLike(close, isPattern, isRecord, refExpressionErrors) {
  49937. if (isRecord) {
  49938. this.expectPlugin("recordAndTuple");
  49939. }
  49940. const oldInFSharpPipelineDirectBody = this.state.inFSharpPipelineDirectBody;
  49941. this.state.inFSharpPipelineDirectBody = false;
  49942. const propHash = /* @__PURE__ */ Object.create(null);
  49943. let first = true;
  49944. const node = this.startNode();
  49945. node.properties = [];
  49946. this.next();
  49947. while (!this.match(close)) {
  49948. if (first) {
  49949. first = false;
  49950. } else {
  49951. this.expect(types$12.comma);
  49952. if (this.match(close)) {
  49953. this.addExtra(node, "trailingComma", this.state.lastTokStart);
  49954. break;
  49955. }
  49956. }
  49957. const prop = this.parsePropertyDefinition(isPattern, refExpressionErrors);
  49958. if (!isPattern) {
  49959. this.checkProto(prop, isRecord, propHash, refExpressionErrors);
  49960. }
  49961. if (isRecord && !this.isObjectProperty(prop) && prop.type !== "SpreadElement") {
  49962. this.raise(prop.start, ErrorMessages.InvalidRecordProperty);
  49963. }
  49964. if (prop.shorthand) {
  49965. this.addExtra(prop, "shorthand", true);
  49966. }
  49967. node.properties.push(prop);
  49968. }
  49969. this.state.exprAllowed = false;
  49970. this.next();
  49971. this.state.inFSharpPipelineDirectBody = oldInFSharpPipelineDirectBody;
  49972. let type = "ObjectExpression";
  49973. if (isPattern) {
  49974. type = "ObjectPattern";
  49975. } else if (isRecord) {
  49976. type = "RecordExpression";
  49977. }
  49978. return this.finishNode(node, type);
  49979. }
  49980. maybeAsyncOrAccessorProp(prop) {
  49981. return !prop.computed && prop.key.type === "Identifier" && (this.isLiteralPropertyName() || this.match(types$12.bracketL) || this.match(types$12.star));
  49982. }
  49983. parsePropertyDefinition(isPattern, refExpressionErrors) {
  49984. let decorators = [];
  49985. if (this.match(types$12.at)) {
  49986. if (this.hasPlugin("decorators")) {
  49987. this.raise(this.state.start, ErrorMessages.UnsupportedPropertyDecorator);
  49988. }
  49989. while (this.match(types$12.at)) {
  49990. decorators.push(this.parseDecorator());
  49991. }
  49992. }
  49993. const prop = this.startNode();
  49994. let isGenerator = false;
  49995. let isAsync = false;
  49996. let isAccessor = false;
  49997. let startPos;
  49998. let startLoc;
  49999. if (this.match(types$12.ellipsis)) {
  50000. if (decorators.length)
  50001. this.unexpected();
  50002. if (isPattern) {
  50003. this.next();
  50004. prop.argument = this.parseIdentifier();
  50005. this.checkCommaAfterRest(125);
  50006. return this.finishNode(prop, "RestElement");
  50007. }
  50008. return this.parseSpread();
  50009. }
  50010. if (decorators.length) {
  50011. prop.decorators = decorators;
  50012. decorators = [];
  50013. }
  50014. prop.method = false;
  50015. if (isPattern || refExpressionErrors) {
  50016. startPos = this.state.start;
  50017. startLoc = this.state.startLoc;
  50018. }
  50019. if (!isPattern) {
  50020. isGenerator = this.eat(types$12.star);
  50021. }
  50022. const containsEsc = this.state.containsEsc;
  50023. const key = this.parsePropertyName(prop, false);
  50024. if (!isPattern && !isGenerator && !containsEsc && this.maybeAsyncOrAccessorProp(prop)) {
  50025. const keyName = key.name;
  50026. if (keyName === "async" && !this.hasPrecedingLineBreak()) {
  50027. isAsync = true;
  50028. isGenerator = this.eat(types$12.star);
  50029. this.parsePropertyName(prop, false);
  50030. }
  50031. if (keyName === "get" || keyName === "set") {
  50032. isAccessor = true;
  50033. prop.kind = keyName;
  50034. if (this.match(types$12.star)) {
  50035. isGenerator = true;
  50036. this.raise(this.state.pos, ErrorMessages.AccessorIsGenerator, keyName);
  50037. this.next();
  50038. }
  50039. this.parsePropertyName(prop, false);
  50040. }
  50041. }
  50042. this.parseObjPropValue(prop, startPos, startLoc, isGenerator, isAsync, isPattern, isAccessor, refExpressionErrors);
  50043. return prop;
  50044. }
  50045. getGetterSetterExpectedParamCount(method) {
  50046. return method.kind === "get" ? 0 : 1;
  50047. }
  50048. getObjectOrClassMethodParams(method) {
  50049. return method.params;
  50050. }
  50051. checkGetterSetterParams(method) {
  50052. var _params;
  50053. const paramCount = this.getGetterSetterExpectedParamCount(method);
  50054. const params = this.getObjectOrClassMethodParams(method);
  50055. const start3 = method.start;
  50056. if (params.length !== paramCount) {
  50057. if (method.kind === "get") {
  50058. this.raise(start3, ErrorMessages.BadGetterArity);
  50059. } else {
  50060. this.raise(start3, ErrorMessages.BadSetterArity);
  50061. }
  50062. }
  50063. if (method.kind === "set" && ((_params = params[params.length - 1]) == null ? void 0 : _params.type) === "RestElement") {
  50064. this.raise(start3, ErrorMessages.BadSetterRestParameter);
  50065. }
  50066. }
  50067. parseObjectMethod(prop, isGenerator, isAsync, isPattern, isAccessor) {
  50068. if (isAccessor) {
  50069. this.parseMethod(prop, isGenerator, false, false, false, "ObjectMethod");
  50070. this.checkGetterSetterParams(prop);
  50071. return prop;
  50072. }
  50073. if (isAsync || isGenerator || this.match(types$12.parenL)) {
  50074. if (isPattern)
  50075. this.unexpected();
  50076. prop.kind = "method";
  50077. prop.method = true;
  50078. return this.parseMethod(prop, isGenerator, isAsync, false, false, "ObjectMethod");
  50079. }
  50080. }
  50081. parseObjectProperty(prop, startPos, startLoc, isPattern, refExpressionErrors) {
  50082. prop.shorthand = false;
  50083. if (this.eat(types$12.colon)) {
  50084. prop.value = isPattern ? this.parseMaybeDefault(this.state.start, this.state.startLoc) : this.parseMaybeAssignAllowIn(refExpressionErrors);
  50085. return this.finishNode(prop, "ObjectProperty");
  50086. }
  50087. if (!prop.computed && prop.key.type === "Identifier") {
  50088. this.checkReservedWord(prop.key.name, prop.key.start, true, false);
  50089. if (isPattern) {
  50090. prop.value = this.parseMaybeDefault(startPos, startLoc, prop.key.__clone());
  50091. } else if (this.match(types$12.eq) && refExpressionErrors) {
  50092. if (refExpressionErrors.shorthandAssign === -1) {
  50093. refExpressionErrors.shorthandAssign = this.state.start;
  50094. }
  50095. prop.value = this.parseMaybeDefault(startPos, startLoc, prop.key.__clone());
  50096. } else {
  50097. prop.value = prop.key.__clone();
  50098. }
  50099. prop.shorthand = true;
  50100. return this.finishNode(prop, "ObjectProperty");
  50101. }
  50102. }
  50103. parseObjPropValue(prop, startPos, startLoc, isGenerator, isAsync, isPattern, isAccessor, refExpressionErrors) {
  50104. const node = this.parseObjectMethod(prop, isGenerator, isAsync, isPattern, isAccessor) || this.parseObjectProperty(prop, startPos, startLoc, isPattern, refExpressionErrors);
  50105. if (!node)
  50106. this.unexpected();
  50107. return node;
  50108. }
  50109. parsePropertyName(prop, isPrivateNameAllowed) {
  50110. if (this.eat(types$12.bracketL)) {
  50111. prop.computed = true;
  50112. prop.key = this.parseMaybeAssignAllowIn();
  50113. this.expect(types$12.bracketR);
  50114. } else {
  50115. const oldInPropertyName = this.state.inPropertyName;
  50116. this.state.inPropertyName = true;
  50117. const type = this.state.type;
  50118. prop.key = type === types$12.num || type === types$12.string || type === types$12.bigint || type === types$12.decimal ? this.parseExprAtom() : this.parseMaybePrivateName(isPrivateNameAllowed);
  50119. if (type !== types$12.privateName) {
  50120. prop.computed = false;
  50121. }
  50122. this.state.inPropertyName = oldInPropertyName;
  50123. }
  50124. return prop.key;
  50125. }
  50126. initFunction(node, isAsync) {
  50127. node.id = null;
  50128. node.generator = false;
  50129. node.async = !!isAsync;
  50130. }
  50131. parseMethod(node, isGenerator, isAsync, isConstructor, allowDirectSuper, type, inClassScope = false) {
  50132. this.initFunction(node, isAsync);
  50133. node.generator = !!isGenerator;
  50134. const allowModifiers = isConstructor;
  50135. this.scope.enter(SCOPE_FUNCTION2 | SCOPE_SUPER2 | (inClassScope ? SCOPE_CLASS : 0) | (allowDirectSuper ? SCOPE_DIRECT_SUPER2 : 0));
  50136. this.prodParam.enter(functionFlags2(isAsync, node.generator));
  50137. this.parseFunctionParams(node, allowModifiers);
  50138. this.parseFunctionBodyAndFinish(node, type, true);
  50139. this.prodParam.exit();
  50140. this.scope.exit();
  50141. return node;
  50142. }
  50143. parseArrayLike(close, canBePattern, isTuple, refExpressionErrors) {
  50144. if (isTuple) {
  50145. this.expectPlugin("recordAndTuple");
  50146. }
  50147. const oldInFSharpPipelineDirectBody = this.state.inFSharpPipelineDirectBody;
  50148. this.state.inFSharpPipelineDirectBody = false;
  50149. const node = this.startNode();
  50150. this.next();
  50151. node.elements = this.parseExprList(close, !isTuple, refExpressionErrors, node);
  50152. this.state.inFSharpPipelineDirectBody = oldInFSharpPipelineDirectBody;
  50153. return this.finishNode(node, isTuple ? "TupleExpression" : "ArrayExpression");
  50154. }
  50155. parseArrowExpression(node, params, isAsync, trailingCommaPos) {
  50156. this.scope.enter(SCOPE_FUNCTION2 | SCOPE_ARROW2);
  50157. let flags = functionFlags2(isAsync, false);
  50158. if (!this.match(types$12.bracketL) && this.prodParam.hasIn) {
  50159. flags |= PARAM_IN;
  50160. }
  50161. this.prodParam.enter(flags);
  50162. this.initFunction(node, isAsync);
  50163. const oldMaybeInArrowParameters = this.state.maybeInArrowParameters;
  50164. if (params) {
  50165. this.state.maybeInArrowParameters = true;
  50166. this.setArrowFunctionParameters(node, params, trailingCommaPos);
  50167. }
  50168. this.state.maybeInArrowParameters = false;
  50169. this.parseFunctionBody(node, true);
  50170. this.prodParam.exit();
  50171. this.scope.exit();
  50172. this.state.maybeInArrowParameters = oldMaybeInArrowParameters;
  50173. return this.finishNode(node, "ArrowFunctionExpression");
  50174. }
  50175. setArrowFunctionParameters(node, params, trailingCommaPos) {
  50176. node.params = this.toAssignableList(params, trailingCommaPos, false);
  50177. }
  50178. parseFunctionBodyAndFinish(node, type, isMethod = false) {
  50179. this.parseFunctionBody(node, false, isMethod);
  50180. this.finishNode(node, type);
  50181. }
  50182. parseFunctionBody(node, allowExpression, isMethod = false) {
  50183. const isExpression = allowExpression && !this.match(types$12.braceL);
  50184. this.expressionScope.enter(newExpressionScope());
  50185. if (isExpression) {
  50186. node.body = this.parseMaybeAssign();
  50187. this.checkParams(node, false, allowExpression, false);
  50188. } else {
  50189. const oldStrict = this.state.strict;
  50190. const oldLabels = this.state.labels;
  50191. this.state.labels = [];
  50192. this.prodParam.enter(this.prodParam.currentFlags() | PARAM_RETURN);
  50193. node.body = this.parseBlock(true, false, (hasStrictModeDirective) => {
  50194. const nonSimple = !this.isSimpleParamList(node.params);
  50195. if (hasStrictModeDirective && nonSimple) {
  50196. const errorPos = (node.kind === "method" || node.kind === "constructor") && !!node.key ? node.key.end : node.start;
  50197. this.raise(errorPos, ErrorMessages.IllegalLanguageModeDirective);
  50198. }
  50199. const strictModeChanged = !oldStrict && this.state.strict;
  50200. this.checkParams(node, !this.state.strict && !allowExpression && !isMethod && !nonSimple, allowExpression, strictModeChanged);
  50201. if (this.state.strict && node.id) {
  50202. this.checkLVal(node.id, "function name", BIND_OUTSIDE2, void 0, void 0, strictModeChanged);
  50203. }
  50204. });
  50205. this.prodParam.exit();
  50206. this.expressionScope.exit();
  50207. this.state.labels = oldLabels;
  50208. }
  50209. }
  50210. isSimpleParamList(params) {
  50211. for (let i = 0, len = params.length; i < len; i++) {
  50212. if (params[i].type !== "Identifier")
  50213. return false;
  50214. }
  50215. return true;
  50216. }
  50217. checkParams(node, allowDuplicates, isArrowFunction, strictModeChanged = true) {
  50218. const checkClashes = /* @__PURE__ */ new Set();
  50219. for (const param of node.params) {
  50220. this.checkLVal(param, "function parameter list", BIND_VAR2, allowDuplicates ? null : checkClashes, void 0, strictModeChanged);
  50221. }
  50222. }
  50223. parseExprList(close, allowEmpty, refExpressionErrors, nodeForExtra) {
  50224. const elts = [];
  50225. let first = true;
  50226. while (!this.eat(close)) {
  50227. if (first) {
  50228. first = false;
  50229. } else {
  50230. this.expect(types$12.comma);
  50231. if (this.match(close)) {
  50232. if (nodeForExtra) {
  50233. this.addExtra(nodeForExtra, "trailingComma", this.state.lastTokStart);
  50234. }
  50235. this.next();
  50236. break;
  50237. }
  50238. }
  50239. elts.push(this.parseExprListItem(allowEmpty, refExpressionErrors));
  50240. }
  50241. return elts;
  50242. }
  50243. parseExprListItem(allowEmpty, refExpressionErrors, refNeedsArrowPos, allowPlaceholder) {
  50244. let elt;
  50245. if (this.match(types$12.comma)) {
  50246. if (!allowEmpty) {
  50247. this.raise(this.state.pos, ErrorMessages.UnexpectedToken, ",");
  50248. }
  50249. elt = null;
  50250. } else if (this.match(types$12.ellipsis)) {
  50251. const spreadNodeStartPos = this.state.start;
  50252. const spreadNodeStartLoc = this.state.startLoc;
  50253. elt = this.parseParenItem(this.parseSpread(refExpressionErrors, refNeedsArrowPos), spreadNodeStartPos, spreadNodeStartLoc);
  50254. } else if (this.match(types$12.question)) {
  50255. this.expectPlugin("partialApplication");
  50256. if (!allowPlaceholder) {
  50257. this.raise(this.state.start, ErrorMessages.UnexpectedArgumentPlaceholder);
  50258. }
  50259. const node = this.startNode();
  50260. this.next();
  50261. elt = this.finishNode(node, "ArgumentPlaceholder");
  50262. } else {
  50263. elt = this.parseMaybeAssignAllowIn(refExpressionErrors, this.parseParenItem, refNeedsArrowPos);
  50264. }
  50265. return elt;
  50266. }
  50267. parseIdentifier(liberal) {
  50268. const node = this.startNode();
  50269. const name2 = this.parseIdentifierName(node.start, liberal);
  50270. return this.createIdentifier(node, name2);
  50271. }
  50272. createIdentifier(node, name2) {
  50273. node.name = name2;
  50274. node.loc.identifierName = name2;
  50275. return this.finishNode(node, "Identifier");
  50276. }
  50277. parseIdentifierName(pos, liberal) {
  50278. let name2;
  50279. const {
  50280. start: start3,
  50281. type
  50282. } = this.state;
  50283. if (type === types$12.name) {
  50284. name2 = this.state.value;
  50285. } else if (type.keyword) {
  50286. name2 = type.keyword;
  50287. const curContext = this.curContext();
  50288. if ((type === types$12._class || type === types$12._function) && (curContext === types2.functionStatement || curContext === types2.functionExpression)) {
  50289. this.state.context.pop();
  50290. }
  50291. } else {
  50292. throw this.unexpected();
  50293. }
  50294. if (liberal) {
  50295. this.state.type = types$12.name;
  50296. } else {
  50297. this.checkReservedWord(name2, start3, !!type.keyword, false);
  50298. }
  50299. this.next();
  50300. return name2;
  50301. }
  50302. checkReservedWord(word, startLoc, checkKeywords, isBinding) {
  50303. if (this.prodParam.hasYield && word === "yield") {
  50304. this.raise(startLoc, ErrorMessages.YieldBindingIdentifier);
  50305. return;
  50306. }
  50307. if (word === "await") {
  50308. if (this.prodParam.hasAwait) {
  50309. this.raise(startLoc, ErrorMessages.AwaitBindingIdentifier);
  50310. return;
  50311. } else if (this.scope.inStaticBlock && !this.scope.inNonArrowFunction) {
  50312. this.raise(startLoc, ErrorMessages.AwaitBindingIdentifierInStaticBlock);
  50313. return;
  50314. } else {
  50315. this.expressionScope.recordAsyncArrowParametersError(startLoc, ErrorMessages.AwaitBindingIdentifier);
  50316. }
  50317. }
  50318. if (this.scope.inClass && !this.scope.inNonArrowFunction && word === "arguments") {
  50319. this.raise(startLoc, ErrorMessages.ArgumentsInClass);
  50320. return;
  50321. }
  50322. if (checkKeywords && isKeyword(word)) {
  50323. this.raise(startLoc, ErrorMessages.UnexpectedKeyword, word);
  50324. return;
  50325. }
  50326. const reservedTest = !this.state.strict ? isReservedWord : isBinding ? isStrictBindReservedWord : isStrictReservedWord;
  50327. if (reservedTest(word, this.inModule)) {
  50328. this.raise(startLoc, ErrorMessages.UnexpectedReservedWord, word);
  50329. }
  50330. }
  50331. isAwaitAllowed() {
  50332. if (this.prodParam.hasAwait)
  50333. return true;
  50334. if (this.options.allowAwaitOutsideFunction && !this.scope.inFunction) {
  50335. return true;
  50336. }
  50337. return false;
  50338. }
  50339. parseAwait(startPos, startLoc) {
  50340. const node = this.startNodeAt(startPos, startLoc);
  50341. this.expressionScope.recordParameterInitializerError(node.start, ErrorMessages.AwaitExpressionFormalParameter);
  50342. if (this.eat(types$12.star)) {
  50343. this.raise(node.start, ErrorMessages.ObsoleteAwaitStar);
  50344. }
  50345. if (!this.scope.inFunction && !this.options.allowAwaitOutsideFunction) {
  50346. if (this.isAmbiguousAwait()) {
  50347. this.ambiguousScriptDifferentAst = true;
  50348. } else {
  50349. this.sawUnambiguousESM = true;
  50350. }
  50351. }
  50352. if (!this.state.soloAwait) {
  50353. node.argument = this.parseMaybeUnary(null, true);
  50354. }
  50355. return this.finishNode(node, "AwaitExpression");
  50356. }
  50357. isAmbiguousAwait() {
  50358. return this.hasPrecedingLineBreak() || this.match(types$12.plusMin) || this.match(types$12.parenL) || this.match(types$12.bracketL) || this.match(types$12.backQuote) || this.match(types$12.regexp) || this.match(types$12.slash) || this.hasPlugin("v8intrinsic") && this.match(types$12.modulo);
  50359. }
  50360. parseYield() {
  50361. const node = this.startNode();
  50362. this.expressionScope.recordParameterInitializerError(node.start, ErrorMessages.YieldInParameter);
  50363. this.next();
  50364. if (this.match(types$12.semi) || !this.match(types$12.star) && !this.state.type.startsExpr || this.hasPrecedingLineBreak()) {
  50365. node.delegate = false;
  50366. node.argument = null;
  50367. } else {
  50368. node.delegate = this.eat(types$12.star);
  50369. node.argument = this.parseMaybeAssign();
  50370. }
  50371. return this.finishNode(node, "YieldExpression");
  50372. }
  50373. checkPipelineAtInfixOperator(left, leftStartPos) {
  50374. if (this.getPluginOption("pipelineOperator", "proposal") === "smart") {
  50375. if (left.type === "SequenceExpression") {
  50376. this.raise(leftStartPos, ErrorMessages.PipelineHeadSequenceExpression);
  50377. }
  50378. }
  50379. }
  50380. parseSmartPipelineBody(childExpression, startPos, startLoc) {
  50381. this.checkSmartPipelineBodyEarlyErrors(childExpression, startPos);
  50382. return this.parseSmartPipelineBodyInStyle(childExpression, startPos, startLoc);
  50383. }
  50384. checkSmartPipelineBodyEarlyErrors(childExpression, startPos) {
  50385. if (this.match(types$12.arrow)) {
  50386. throw this.raise(this.state.start, ErrorMessages.PipelineBodyNoArrow);
  50387. } else if (childExpression.type === "SequenceExpression") {
  50388. this.raise(startPos, ErrorMessages.PipelineBodySequenceExpression);
  50389. }
  50390. }
  50391. parseSmartPipelineBodyInStyle(childExpression, startPos, startLoc) {
  50392. const bodyNode = this.startNodeAt(startPos, startLoc);
  50393. const isSimpleReference = this.isSimpleReference(childExpression);
  50394. if (isSimpleReference) {
  50395. bodyNode.callee = childExpression;
  50396. } else {
  50397. if (!this.topicReferenceWasUsedInCurrentTopicContext()) {
  50398. this.raise(startPos, ErrorMessages.PipelineTopicUnused);
  50399. }
  50400. bodyNode.expression = childExpression;
  50401. }
  50402. return this.finishNode(bodyNode, isSimpleReference ? "PipelineBareFunction" : "PipelineTopicExpression");
  50403. }
  50404. isSimpleReference(expression) {
  50405. switch (expression.type) {
  50406. case "MemberExpression":
  50407. return !expression.computed && this.isSimpleReference(expression.object);
  50408. case "Identifier":
  50409. return true;
  50410. default:
  50411. return false;
  50412. }
  50413. }
  50414. withTopicPermittingContext(callback) {
  50415. const outerContextTopicState = this.state.topicContext;
  50416. this.state.topicContext = {
  50417. maxNumOfResolvableTopics: 1,
  50418. maxTopicIndex: null
  50419. };
  50420. try {
  50421. return callback();
  50422. } finally {
  50423. this.state.topicContext = outerContextTopicState;
  50424. }
  50425. }
  50426. withTopicForbiddingContext(callback) {
  50427. const outerContextTopicState = this.state.topicContext;
  50428. this.state.topicContext = {
  50429. maxNumOfResolvableTopics: 0,
  50430. maxTopicIndex: null
  50431. };
  50432. try {
  50433. return callback();
  50434. } finally {
  50435. this.state.topicContext = outerContextTopicState;
  50436. }
  50437. }
  50438. withSoloAwaitPermittingContext(callback) {
  50439. const outerContextSoloAwaitState = this.state.soloAwait;
  50440. this.state.soloAwait = true;
  50441. try {
  50442. return callback();
  50443. } finally {
  50444. this.state.soloAwait = outerContextSoloAwaitState;
  50445. }
  50446. }
  50447. allowInAnd(callback) {
  50448. const flags = this.prodParam.currentFlags();
  50449. const prodParamToSet = PARAM_IN & ~flags;
  50450. if (prodParamToSet) {
  50451. this.prodParam.enter(flags | PARAM_IN);
  50452. try {
  50453. return callback();
  50454. } finally {
  50455. this.prodParam.exit();
  50456. }
  50457. }
  50458. return callback();
  50459. }
  50460. disallowInAnd(callback) {
  50461. const flags = this.prodParam.currentFlags();
  50462. const prodParamToClear = PARAM_IN & flags;
  50463. if (prodParamToClear) {
  50464. this.prodParam.enter(flags & ~PARAM_IN);
  50465. try {
  50466. return callback();
  50467. } finally {
  50468. this.prodParam.exit();
  50469. }
  50470. }
  50471. return callback();
  50472. }
  50473. registerTopicReference() {
  50474. this.state.topicContext.maxTopicIndex = 0;
  50475. }
  50476. primaryTopicReferenceIsAllowedInCurrentTopicContext() {
  50477. return this.state.topicContext.maxNumOfResolvableTopics >= 1;
  50478. }
  50479. topicReferenceWasUsedInCurrentTopicContext() {
  50480. return this.state.topicContext.maxTopicIndex != null && this.state.topicContext.maxTopicIndex >= 0;
  50481. }
  50482. parseFSharpPipelineBody(prec) {
  50483. const startPos = this.state.start;
  50484. const startLoc = this.state.startLoc;
  50485. this.state.potentialArrowAt = this.state.start;
  50486. const oldInFSharpPipelineDirectBody = this.state.inFSharpPipelineDirectBody;
  50487. this.state.inFSharpPipelineDirectBody = true;
  50488. const ret = this.parseExprOp(this.parseMaybeUnary(), startPos, startLoc, prec);
  50489. this.state.inFSharpPipelineDirectBody = oldInFSharpPipelineDirectBody;
  50490. return ret;
  50491. }
  50492. parseModuleExpression() {
  50493. this.expectPlugin("moduleBlocks");
  50494. const node = this.startNode();
  50495. this.next();
  50496. this.eat(types$12.braceL);
  50497. const revertScopes = this.initializeScopes(true);
  50498. this.enterInitialScopes();
  50499. const program = this.startNode();
  50500. try {
  50501. node.body = this.parseProgram(program, types$12.braceR, "module");
  50502. } finally {
  50503. revertScopes();
  50504. }
  50505. this.eat(types$12.braceR);
  50506. return this.finishNode(node, "ModuleExpression");
  50507. }
  50508. };
  50509. var loopLabel2 = {
  50510. kind: "loop"
  50511. };
  50512. var switchLabel2 = {
  50513. kind: "switch"
  50514. };
  50515. var FUNC_NO_FLAGS = 0;
  50516. var FUNC_STATEMENT2 = 1;
  50517. var FUNC_HANGING_STATEMENT2 = 2;
  50518. var FUNC_NULLABLE_ID2 = 4;
  50519. var loneSurrogate2 = /[\uD800-\uDFFF]/u;
  50520. var keywordRelationalOperator2 = /in(?:stanceof)?/y;
  50521. function babel7CompatTokens(tokens) {
  50522. {
  50523. for (let i = 0; i < tokens.length; i++) {
  50524. const token = tokens[i];
  50525. if (token.type === types$12.privateName) {
  50526. const {
  50527. loc,
  50528. start: start3,
  50529. value,
  50530. end
  50531. } = token;
  50532. const hashEndPos = start3 + 1;
  50533. const hashEndLoc = new Position3(loc.start.line, loc.start.column + 1);
  50534. tokens.splice(i, 1, new Token3({
  50535. type: types$12.hash,
  50536. value: "#",
  50537. start: start3,
  50538. end: hashEndPos,
  50539. startLoc: loc.start,
  50540. endLoc: hashEndLoc
  50541. }), new Token3({
  50542. type: types$12.name,
  50543. value,
  50544. start: hashEndPos,
  50545. end,
  50546. startLoc: hashEndLoc,
  50547. endLoc: loc.end
  50548. }));
  50549. }
  50550. }
  50551. }
  50552. return tokens;
  50553. }
  50554. var StatementParser = class extends ExpressionParser {
  50555. parseTopLevel(file, program) {
  50556. file.program = this.parseProgram(program);
  50557. file.comments = this.state.comments;
  50558. if (this.options.tokens)
  50559. file.tokens = babel7CompatTokens(this.tokens);
  50560. return this.finishNode(file, "File");
  50561. }
  50562. parseProgram(program, end = types$12.eof, sourceType = this.options.sourceType) {
  50563. program.sourceType = sourceType;
  50564. program.interpreter = this.parseInterpreterDirective();
  50565. this.parseBlockBody(program, true, true, end);
  50566. if (this.inModule && !this.options.allowUndeclaredExports && this.scope.undefinedExports.size > 0) {
  50567. for (const [name2] of Array.from(this.scope.undefinedExports)) {
  50568. const pos = this.scope.undefinedExports.get(name2);
  50569. this.raise(pos, ErrorMessages.ModuleExportUndefined, name2);
  50570. }
  50571. }
  50572. return this.finishNode(program, "Program");
  50573. }
  50574. stmtToDirective(stmt) {
  50575. const expr = stmt.expression;
  50576. const directiveLiteral = this.startNodeAt(expr.start, expr.loc.start);
  50577. const directive = this.startNodeAt(stmt.start, stmt.loc.start);
  50578. const raw = this.input.slice(expr.start, expr.end);
  50579. const val = directiveLiteral.value = raw.slice(1, -1);
  50580. this.addExtra(directiveLiteral, "raw", raw);
  50581. this.addExtra(directiveLiteral, "rawValue", val);
  50582. directive.value = this.finishNodeAt(directiveLiteral, "DirectiveLiteral", expr.end, expr.loc.end);
  50583. return this.finishNodeAt(directive, "Directive", stmt.end, stmt.loc.end);
  50584. }
  50585. parseInterpreterDirective() {
  50586. if (!this.match(types$12.interpreterDirective)) {
  50587. return null;
  50588. }
  50589. const node = this.startNode();
  50590. node.value = this.state.value;
  50591. this.next();
  50592. return this.finishNode(node, "InterpreterDirective");
  50593. }
  50594. isLet(context) {
  50595. if (!this.isContextual("let")) {
  50596. return false;
  50597. }
  50598. return this.isLetKeyword(context);
  50599. }
  50600. isLetKeyword(context) {
  50601. const next = this.nextTokenStart();
  50602. const nextCh = this.codePointAtPos(next);
  50603. if (nextCh === 92 || nextCh === 91) {
  50604. return true;
  50605. }
  50606. if (context)
  50607. return false;
  50608. if (nextCh === 123)
  50609. return true;
  50610. if (isIdentifierStart2(nextCh)) {
  50611. keywordRelationalOperator2.lastIndex = next;
  50612. const matched = keywordRelationalOperator2.exec(this.input);
  50613. if (matched !== null) {
  50614. const endCh = this.codePointAtPos(next + matched[0].length);
  50615. if (!isIdentifierChar2(endCh) && endCh !== 92) {
  50616. return false;
  50617. }
  50618. }
  50619. return true;
  50620. }
  50621. return false;
  50622. }
  50623. parseStatement(context, topLevel) {
  50624. if (this.match(types$12.at)) {
  50625. this.parseDecorators(true);
  50626. }
  50627. return this.parseStatementContent(context, topLevel);
  50628. }
  50629. parseStatementContent(context, topLevel) {
  50630. let starttype = this.state.type;
  50631. const node = this.startNode();
  50632. let kind;
  50633. if (this.isLet(context)) {
  50634. starttype = types$12._var;
  50635. kind = "let";
  50636. }
  50637. switch (starttype) {
  50638. case types$12._break:
  50639. case types$12._continue:
  50640. return this.parseBreakContinueStatement(node, starttype.keyword);
  50641. case types$12._debugger:
  50642. return this.parseDebuggerStatement(node);
  50643. case types$12._do:
  50644. return this.parseDoStatement(node);
  50645. case types$12._for:
  50646. return this.parseForStatement(node);
  50647. case types$12._function:
  50648. if (this.lookaheadCharCode() === 46)
  50649. break;
  50650. if (context) {
  50651. if (this.state.strict) {
  50652. this.raise(this.state.start, ErrorMessages.StrictFunction);
  50653. } else if (context !== "if" && context !== "label") {
  50654. this.raise(this.state.start, ErrorMessages.SloppyFunction);
  50655. }
  50656. }
  50657. return this.parseFunctionStatement(node, false, !context);
  50658. case types$12._class:
  50659. if (context)
  50660. this.unexpected();
  50661. return this.parseClass(node, true);
  50662. case types$12._if:
  50663. return this.parseIfStatement(node);
  50664. case types$12._return:
  50665. return this.parseReturnStatement(node);
  50666. case types$12._switch:
  50667. return this.parseSwitchStatement(node);
  50668. case types$12._throw:
  50669. return this.parseThrowStatement(node);
  50670. case types$12._try:
  50671. return this.parseTryStatement(node);
  50672. case types$12._const:
  50673. case types$12._var:
  50674. kind = kind || this.state.value;
  50675. if (context && kind !== "var") {
  50676. this.raise(this.state.start, ErrorMessages.UnexpectedLexicalDeclaration);
  50677. }
  50678. return this.parseVarStatement(node, kind);
  50679. case types$12._while:
  50680. return this.parseWhileStatement(node);
  50681. case types$12._with:
  50682. return this.parseWithStatement(node);
  50683. case types$12.braceL:
  50684. return this.parseBlock();
  50685. case types$12.semi:
  50686. return this.parseEmptyStatement(node);
  50687. case types$12._import: {
  50688. const nextTokenCharCode = this.lookaheadCharCode();
  50689. if (nextTokenCharCode === 40 || nextTokenCharCode === 46) {
  50690. break;
  50691. }
  50692. }
  50693. case types$12._export: {
  50694. if (!this.options.allowImportExportEverywhere && !topLevel) {
  50695. this.raise(this.state.start, ErrorMessages.UnexpectedImportExport);
  50696. }
  50697. this.next();
  50698. let result;
  50699. if (starttype === types$12._import) {
  50700. result = this.parseImport(node);
  50701. if (result.type === "ImportDeclaration" && (!result.importKind || result.importKind === "value")) {
  50702. this.sawUnambiguousESM = true;
  50703. }
  50704. } else {
  50705. result = this.parseExport(node);
  50706. if (result.type === "ExportNamedDeclaration" && (!result.exportKind || result.exportKind === "value") || result.type === "ExportAllDeclaration" && (!result.exportKind || result.exportKind === "value") || result.type === "ExportDefaultDeclaration") {
  50707. this.sawUnambiguousESM = true;
  50708. }
  50709. }
  50710. this.assertModuleNodeAllowed(node);
  50711. return result;
  50712. }
  50713. default: {
  50714. if (this.isAsyncFunction()) {
  50715. if (context) {
  50716. this.raise(this.state.start, ErrorMessages.AsyncFunctionInSingleStatementContext);
  50717. }
  50718. this.next();
  50719. return this.parseFunctionStatement(node, true, !context);
  50720. }
  50721. }
  50722. }
  50723. const maybeName = this.state.value;
  50724. const expr = this.parseExpression();
  50725. if (starttype === types$12.name && expr.type === "Identifier" && this.eat(types$12.colon)) {
  50726. return this.parseLabeledStatement(node, maybeName, expr, context);
  50727. } else {
  50728. return this.parseExpressionStatement(node, expr);
  50729. }
  50730. }
  50731. assertModuleNodeAllowed(node) {
  50732. if (!this.options.allowImportExportEverywhere && !this.inModule) {
  50733. this.raise(node.start, SourceTypeModuleErrorMessages.ImportOutsideModule);
  50734. }
  50735. }
  50736. takeDecorators(node) {
  50737. const decorators = this.state.decoratorStack[this.state.decoratorStack.length - 1];
  50738. if (decorators.length) {
  50739. node.decorators = decorators;
  50740. this.resetStartLocationFromNode(node, decorators[0]);
  50741. this.state.decoratorStack[this.state.decoratorStack.length - 1] = [];
  50742. }
  50743. }
  50744. canHaveLeadingDecorator() {
  50745. return this.match(types$12._class);
  50746. }
  50747. parseDecorators(allowExport) {
  50748. const currentContextDecorators = this.state.decoratorStack[this.state.decoratorStack.length - 1];
  50749. while (this.match(types$12.at)) {
  50750. const decorator = this.parseDecorator();
  50751. currentContextDecorators.push(decorator);
  50752. }
  50753. if (this.match(types$12._export)) {
  50754. if (!allowExport) {
  50755. this.unexpected();
  50756. }
  50757. if (this.hasPlugin("decorators") && !this.getPluginOption("decorators", "decoratorsBeforeExport")) {
  50758. this.raise(this.state.start, ErrorMessages.DecoratorExportClass);
  50759. }
  50760. } else if (!this.canHaveLeadingDecorator()) {
  50761. throw this.raise(this.state.start, ErrorMessages.UnexpectedLeadingDecorator);
  50762. }
  50763. }
  50764. parseDecorator() {
  50765. this.expectOnePlugin(["decorators-legacy", "decorators"]);
  50766. const node = this.startNode();
  50767. this.next();
  50768. if (this.hasPlugin("decorators")) {
  50769. this.state.decoratorStack.push([]);
  50770. const startPos = this.state.start;
  50771. const startLoc = this.state.startLoc;
  50772. let expr;
  50773. if (this.eat(types$12.parenL)) {
  50774. expr = this.parseExpression();
  50775. this.expect(types$12.parenR);
  50776. } else {
  50777. expr = this.parseIdentifier(false);
  50778. while (this.eat(types$12.dot)) {
  50779. const node2 = this.startNodeAt(startPos, startLoc);
  50780. node2.object = expr;
  50781. node2.property = this.parseIdentifier(true);
  50782. node2.computed = false;
  50783. expr = this.finishNode(node2, "MemberExpression");
  50784. }
  50785. }
  50786. node.expression = this.parseMaybeDecoratorArguments(expr);
  50787. this.state.decoratorStack.pop();
  50788. } else {
  50789. node.expression = this.parseExprSubscripts();
  50790. }
  50791. return this.finishNode(node, "Decorator");
  50792. }
  50793. parseMaybeDecoratorArguments(expr) {
  50794. if (this.eat(types$12.parenL)) {
  50795. const node = this.startNodeAtNode(expr);
  50796. node.callee = expr;
  50797. node.arguments = this.parseCallExpressionArguments(types$12.parenR, false);
  50798. this.toReferencedList(node.arguments);
  50799. return this.finishNode(node, "CallExpression");
  50800. }
  50801. return expr;
  50802. }
  50803. parseBreakContinueStatement(node, keyword) {
  50804. const isBreak = keyword === "break";
  50805. this.next();
  50806. if (this.isLineTerminator()) {
  50807. node.label = null;
  50808. } else {
  50809. node.label = this.parseIdentifier();
  50810. this.semicolon();
  50811. }
  50812. this.verifyBreakContinue(node, keyword);
  50813. return this.finishNode(node, isBreak ? "BreakStatement" : "ContinueStatement");
  50814. }
  50815. verifyBreakContinue(node, keyword) {
  50816. const isBreak = keyword === "break";
  50817. let i;
  50818. for (i = 0; i < this.state.labels.length; ++i) {
  50819. const lab = this.state.labels[i];
  50820. if (node.label == null || lab.name === node.label.name) {
  50821. if (lab.kind != null && (isBreak || lab.kind === "loop"))
  50822. break;
  50823. if (node.label && isBreak)
  50824. break;
  50825. }
  50826. }
  50827. if (i === this.state.labels.length) {
  50828. this.raise(node.start, ErrorMessages.IllegalBreakContinue, keyword);
  50829. }
  50830. }
  50831. parseDebuggerStatement(node) {
  50832. this.next();
  50833. this.semicolon();
  50834. return this.finishNode(node, "DebuggerStatement");
  50835. }
  50836. parseHeaderExpression() {
  50837. this.expect(types$12.parenL);
  50838. const val = this.parseExpression();
  50839. this.expect(types$12.parenR);
  50840. return val;
  50841. }
  50842. parseDoStatement(node) {
  50843. this.next();
  50844. this.state.labels.push(loopLabel2);
  50845. node.body = this.withTopicForbiddingContext(() => this.parseStatement("do"));
  50846. this.state.labels.pop();
  50847. this.expect(types$12._while);
  50848. node.test = this.parseHeaderExpression();
  50849. this.eat(types$12.semi);
  50850. return this.finishNode(node, "DoWhileStatement");
  50851. }
  50852. parseForStatement(node) {
  50853. this.next();
  50854. this.state.labels.push(loopLabel2);
  50855. let awaitAt = -1;
  50856. if (this.isAwaitAllowed() && this.eatContextual("await")) {
  50857. awaitAt = this.state.lastTokStart;
  50858. }
  50859. this.scope.enter(SCOPE_OTHER);
  50860. this.expect(types$12.parenL);
  50861. if (this.match(types$12.semi)) {
  50862. if (awaitAt > -1) {
  50863. this.unexpected(awaitAt);
  50864. }
  50865. return this.parseFor(node, null);
  50866. }
  50867. const startsWithLet = this.isContextual("let");
  50868. const isLet = startsWithLet && this.isLetKeyword();
  50869. if (this.match(types$12._var) || this.match(types$12._const) || isLet) {
  50870. const init2 = this.startNode();
  50871. const kind = isLet ? "let" : this.state.value;
  50872. this.next();
  50873. this.parseVar(init2, true, kind);
  50874. this.finishNode(init2, "VariableDeclaration");
  50875. if ((this.match(types$12._in) || this.isContextual("of")) && init2.declarations.length === 1) {
  50876. return this.parseForIn(node, init2, awaitAt);
  50877. }
  50878. if (awaitAt > -1) {
  50879. this.unexpected(awaitAt);
  50880. }
  50881. return this.parseFor(node, init2);
  50882. }
  50883. const startsWithUnescapedName = this.match(types$12.name) && !this.state.containsEsc;
  50884. const refExpressionErrors = new ExpressionErrors();
  50885. const init = this.parseExpression(true, refExpressionErrors);
  50886. const isForOf = this.isContextual("of");
  50887. if (isForOf) {
  50888. if (startsWithLet) {
  50889. this.raise(init.start, ErrorMessages.ForOfLet);
  50890. } else if (awaitAt === -1 && startsWithUnescapedName && init.type === "Identifier" && init.name === "async") {
  50891. this.raise(init.start, ErrorMessages.ForOfAsync);
  50892. }
  50893. }
  50894. if (isForOf || this.match(types$12._in)) {
  50895. this.toAssignable(init, true);
  50896. const description = isForOf ? "for-of statement" : "for-in statement";
  50897. this.checkLVal(init, description);
  50898. return this.parseForIn(node, init, awaitAt);
  50899. } else {
  50900. this.checkExpressionErrors(refExpressionErrors, true);
  50901. }
  50902. if (awaitAt > -1) {
  50903. this.unexpected(awaitAt);
  50904. }
  50905. return this.parseFor(node, init);
  50906. }
  50907. parseFunctionStatement(node, isAsync, declarationPosition) {
  50908. this.next();
  50909. return this.parseFunction(node, FUNC_STATEMENT2 | (declarationPosition ? 0 : FUNC_HANGING_STATEMENT2), isAsync);
  50910. }
  50911. parseIfStatement(node) {
  50912. this.next();
  50913. node.test = this.parseHeaderExpression();
  50914. node.consequent = this.parseStatement("if");
  50915. node.alternate = this.eat(types$12._else) ? this.parseStatement("if") : null;
  50916. return this.finishNode(node, "IfStatement");
  50917. }
  50918. parseReturnStatement(node) {
  50919. if (!this.prodParam.hasReturn && !this.options.allowReturnOutsideFunction) {
  50920. this.raise(this.state.start, ErrorMessages.IllegalReturn);
  50921. }
  50922. this.next();
  50923. if (this.isLineTerminator()) {
  50924. node.argument = null;
  50925. } else {
  50926. node.argument = this.parseExpression();
  50927. this.semicolon();
  50928. }
  50929. return this.finishNode(node, "ReturnStatement");
  50930. }
  50931. parseSwitchStatement(node) {
  50932. this.next();
  50933. node.discriminant = this.parseHeaderExpression();
  50934. const cases = node.cases = [];
  50935. this.expect(types$12.braceL);
  50936. this.state.labels.push(switchLabel2);
  50937. this.scope.enter(SCOPE_OTHER);
  50938. let cur;
  50939. for (let sawDefault; !this.match(types$12.braceR); ) {
  50940. if (this.match(types$12._case) || this.match(types$12._default)) {
  50941. const isCase = this.match(types$12._case);
  50942. if (cur)
  50943. this.finishNode(cur, "SwitchCase");
  50944. cases.push(cur = this.startNode());
  50945. cur.consequent = [];
  50946. this.next();
  50947. if (isCase) {
  50948. cur.test = this.parseExpression();
  50949. } else {
  50950. if (sawDefault) {
  50951. this.raise(this.state.lastTokStart, ErrorMessages.MultipleDefaultsInSwitch);
  50952. }
  50953. sawDefault = true;
  50954. cur.test = null;
  50955. }
  50956. this.expect(types$12.colon);
  50957. } else {
  50958. if (cur) {
  50959. cur.consequent.push(this.parseStatement(null));
  50960. } else {
  50961. this.unexpected();
  50962. }
  50963. }
  50964. }
  50965. this.scope.exit();
  50966. if (cur)
  50967. this.finishNode(cur, "SwitchCase");
  50968. this.next();
  50969. this.state.labels.pop();
  50970. return this.finishNode(node, "SwitchStatement");
  50971. }
  50972. parseThrowStatement(node) {
  50973. this.next();
  50974. if (this.hasPrecedingLineBreak()) {
  50975. this.raise(this.state.lastTokEnd, ErrorMessages.NewlineAfterThrow);
  50976. }
  50977. node.argument = this.parseExpression();
  50978. this.semicolon();
  50979. return this.finishNode(node, "ThrowStatement");
  50980. }
  50981. parseCatchClauseParam() {
  50982. const param = this.parseBindingAtom();
  50983. const simple = param.type === "Identifier";
  50984. this.scope.enter(simple ? SCOPE_SIMPLE_CATCH2 : 0);
  50985. this.checkLVal(param, "catch clause", BIND_LEXICAL2);
  50986. return param;
  50987. }
  50988. parseTryStatement(node) {
  50989. this.next();
  50990. node.block = this.parseBlock();
  50991. node.handler = null;
  50992. if (this.match(types$12._catch)) {
  50993. const clause = this.startNode();
  50994. this.next();
  50995. if (this.match(types$12.parenL)) {
  50996. this.expect(types$12.parenL);
  50997. clause.param = this.parseCatchClauseParam();
  50998. this.expect(types$12.parenR);
  50999. } else {
  51000. clause.param = null;
  51001. this.scope.enter(SCOPE_OTHER);
  51002. }
  51003. clause.body = this.withTopicForbiddingContext(() => this.parseBlock(false, false));
  51004. this.scope.exit();
  51005. node.handler = this.finishNode(clause, "CatchClause");
  51006. }
  51007. node.finalizer = this.eat(types$12._finally) ? this.parseBlock() : null;
  51008. if (!node.handler && !node.finalizer) {
  51009. this.raise(node.start, ErrorMessages.NoCatchOrFinally);
  51010. }
  51011. return this.finishNode(node, "TryStatement");
  51012. }
  51013. parseVarStatement(node, kind) {
  51014. this.next();
  51015. this.parseVar(node, false, kind);
  51016. this.semicolon();
  51017. return this.finishNode(node, "VariableDeclaration");
  51018. }
  51019. parseWhileStatement(node) {
  51020. this.next();
  51021. node.test = this.parseHeaderExpression();
  51022. this.state.labels.push(loopLabel2);
  51023. node.body = this.withTopicForbiddingContext(() => this.parseStatement("while"));
  51024. this.state.labels.pop();
  51025. return this.finishNode(node, "WhileStatement");
  51026. }
  51027. parseWithStatement(node) {
  51028. if (this.state.strict) {
  51029. this.raise(this.state.start, ErrorMessages.StrictWith);
  51030. }
  51031. this.next();
  51032. node.object = this.parseHeaderExpression();
  51033. node.body = this.withTopicForbiddingContext(() => this.parseStatement("with"));
  51034. return this.finishNode(node, "WithStatement");
  51035. }
  51036. parseEmptyStatement(node) {
  51037. this.next();
  51038. return this.finishNode(node, "EmptyStatement");
  51039. }
  51040. parseLabeledStatement(node, maybeName, expr, context) {
  51041. for (const label of this.state.labels) {
  51042. if (label.name === maybeName) {
  51043. this.raise(expr.start, ErrorMessages.LabelRedeclaration, maybeName);
  51044. }
  51045. }
  51046. const kind = this.state.type.isLoop ? "loop" : this.match(types$12._switch) ? "switch" : null;
  51047. for (let i = this.state.labels.length - 1; i >= 0; i--) {
  51048. const label = this.state.labels[i];
  51049. if (label.statementStart === node.start) {
  51050. label.statementStart = this.state.start;
  51051. label.kind = kind;
  51052. } else {
  51053. break;
  51054. }
  51055. }
  51056. this.state.labels.push({
  51057. name: maybeName,
  51058. kind,
  51059. statementStart: this.state.start
  51060. });
  51061. node.body = this.parseStatement(context ? context.indexOf("label") === -1 ? context + "label" : context : "label");
  51062. this.state.labels.pop();
  51063. node.label = expr;
  51064. return this.finishNode(node, "LabeledStatement");
  51065. }
  51066. parseExpressionStatement(node, expr) {
  51067. node.expression = expr;
  51068. this.semicolon();
  51069. return this.finishNode(node, "ExpressionStatement");
  51070. }
  51071. parseBlock(allowDirectives = false, createNewLexicalScope = true, afterBlockParse) {
  51072. const node = this.startNode();
  51073. if (allowDirectives) {
  51074. this.state.strictErrors.clear();
  51075. }
  51076. this.expect(types$12.braceL);
  51077. if (createNewLexicalScope) {
  51078. this.scope.enter(SCOPE_OTHER);
  51079. }
  51080. this.parseBlockBody(node, allowDirectives, false, types$12.braceR, afterBlockParse);
  51081. if (createNewLexicalScope) {
  51082. this.scope.exit();
  51083. }
  51084. return this.finishNode(node, "BlockStatement");
  51085. }
  51086. isValidDirective(stmt) {
  51087. return stmt.type === "ExpressionStatement" && stmt.expression.type === "StringLiteral" && !stmt.expression.extra.parenthesized;
  51088. }
  51089. parseBlockBody(node, allowDirectives, topLevel, end, afterBlockParse) {
  51090. const body = node.body = [];
  51091. const directives = node.directives = [];
  51092. this.parseBlockOrModuleBlockBody(body, allowDirectives ? directives : void 0, topLevel, end, afterBlockParse);
  51093. }
  51094. parseBlockOrModuleBlockBody(body, directives, topLevel, end, afterBlockParse) {
  51095. const oldStrict = this.state.strict;
  51096. let hasStrictModeDirective = false;
  51097. let parsedNonDirective = false;
  51098. while (!this.match(end)) {
  51099. const stmt = this.parseStatement(null, topLevel);
  51100. if (directives && !parsedNonDirective) {
  51101. if (this.isValidDirective(stmt)) {
  51102. const directive = this.stmtToDirective(stmt);
  51103. directives.push(directive);
  51104. if (!hasStrictModeDirective && directive.value.value === "use strict") {
  51105. hasStrictModeDirective = true;
  51106. this.setStrict(true);
  51107. }
  51108. continue;
  51109. }
  51110. parsedNonDirective = true;
  51111. this.state.strictErrors.clear();
  51112. }
  51113. body.push(stmt);
  51114. }
  51115. if (afterBlockParse) {
  51116. afterBlockParse.call(this, hasStrictModeDirective);
  51117. }
  51118. if (!oldStrict) {
  51119. this.setStrict(false);
  51120. }
  51121. this.next();
  51122. }
  51123. parseFor(node, init) {
  51124. node.init = init;
  51125. this.semicolon(false);
  51126. node.test = this.match(types$12.semi) ? null : this.parseExpression();
  51127. this.semicolon(false);
  51128. node.update = this.match(types$12.parenR) ? null : this.parseExpression();
  51129. this.expect(types$12.parenR);
  51130. node.body = this.withTopicForbiddingContext(() => this.parseStatement("for"));
  51131. this.scope.exit();
  51132. this.state.labels.pop();
  51133. return this.finishNode(node, "ForStatement");
  51134. }
  51135. parseForIn(node, init, awaitAt) {
  51136. const isForIn = this.match(types$12._in);
  51137. this.next();
  51138. if (isForIn) {
  51139. if (awaitAt > -1)
  51140. this.unexpected(awaitAt);
  51141. } else {
  51142. node.await = awaitAt > -1;
  51143. }
  51144. if (init.type === "VariableDeclaration" && init.declarations[0].init != null && (!isForIn || this.state.strict || init.kind !== "var" || init.declarations[0].id.type !== "Identifier")) {
  51145. this.raise(init.start, ErrorMessages.ForInOfLoopInitializer, isForIn ? "for-in" : "for-of");
  51146. } else if (init.type === "AssignmentPattern") {
  51147. this.raise(init.start, ErrorMessages.InvalidLhs, "for-loop");
  51148. }
  51149. node.left = init;
  51150. node.right = isForIn ? this.parseExpression() : this.parseMaybeAssignAllowIn();
  51151. this.expect(types$12.parenR);
  51152. node.body = this.withTopicForbiddingContext(() => this.parseStatement("for"));
  51153. this.scope.exit();
  51154. this.state.labels.pop();
  51155. return this.finishNode(node, isForIn ? "ForInStatement" : "ForOfStatement");
  51156. }
  51157. parseVar(node, isFor, kind) {
  51158. const declarations = node.declarations = [];
  51159. const isTypescript = this.hasPlugin("typescript");
  51160. node.kind = kind;
  51161. for (; ; ) {
  51162. const decl = this.startNode();
  51163. this.parseVarId(decl, kind);
  51164. if (this.eat(types$12.eq)) {
  51165. decl.init = isFor ? this.parseMaybeAssignDisallowIn() : this.parseMaybeAssignAllowIn();
  51166. } else {
  51167. if (kind === "const" && !(this.match(types$12._in) || this.isContextual("of"))) {
  51168. if (!isTypescript) {
  51169. this.raise(this.state.lastTokEnd, ErrorMessages.DeclarationMissingInitializer, "Const declarations");
  51170. }
  51171. } else if (decl.id.type !== "Identifier" && !(isFor && (this.match(types$12._in) || this.isContextual("of")))) {
  51172. this.raise(this.state.lastTokEnd, ErrorMessages.DeclarationMissingInitializer, "Complex binding patterns");
  51173. }
  51174. decl.init = null;
  51175. }
  51176. declarations.push(this.finishNode(decl, "VariableDeclarator"));
  51177. if (!this.eat(types$12.comma))
  51178. break;
  51179. }
  51180. return node;
  51181. }
  51182. parseVarId(decl, kind) {
  51183. decl.id = this.parseBindingAtom();
  51184. this.checkLVal(decl.id, "variable declaration", kind === "var" ? BIND_VAR2 : BIND_LEXICAL2, void 0, kind !== "var");
  51185. }
  51186. parseFunction(node, statement = FUNC_NO_FLAGS, isAsync = false) {
  51187. const isStatement = statement & FUNC_STATEMENT2;
  51188. const isHangingStatement = statement & FUNC_HANGING_STATEMENT2;
  51189. const requireId = !!isStatement && !(statement & FUNC_NULLABLE_ID2);
  51190. this.initFunction(node, isAsync);
  51191. if (this.match(types$12.star) && isHangingStatement) {
  51192. this.raise(this.state.start, ErrorMessages.GeneratorInSingleStatementContext);
  51193. }
  51194. node.generator = this.eat(types$12.star);
  51195. if (isStatement) {
  51196. node.id = this.parseFunctionId(requireId);
  51197. }
  51198. const oldMaybeInArrowParameters = this.state.maybeInArrowParameters;
  51199. this.state.maybeInArrowParameters = false;
  51200. this.scope.enter(SCOPE_FUNCTION2);
  51201. this.prodParam.enter(functionFlags2(isAsync, node.generator));
  51202. if (!isStatement) {
  51203. node.id = this.parseFunctionId();
  51204. }
  51205. this.parseFunctionParams(node, false);
  51206. this.withTopicForbiddingContext(() => {
  51207. this.parseFunctionBodyAndFinish(node, isStatement ? "FunctionDeclaration" : "FunctionExpression");
  51208. });
  51209. this.prodParam.exit();
  51210. this.scope.exit();
  51211. if (isStatement && !isHangingStatement) {
  51212. this.registerFunctionStatementId(node);
  51213. }
  51214. this.state.maybeInArrowParameters = oldMaybeInArrowParameters;
  51215. return node;
  51216. }
  51217. parseFunctionId(requireId) {
  51218. return requireId || this.match(types$12.name) ? this.parseIdentifier() : null;
  51219. }
  51220. parseFunctionParams(node, allowModifiers) {
  51221. this.expect(types$12.parenL);
  51222. this.expressionScope.enter(newParameterDeclarationScope());
  51223. node.params = this.parseBindingList(types$12.parenR, 41, false, allowModifiers);
  51224. this.expressionScope.exit();
  51225. }
  51226. registerFunctionStatementId(node) {
  51227. if (!node.id)
  51228. return;
  51229. this.scope.declareName(node.id.name, this.state.strict || node.generator || node.async ? this.scope.treatFunctionsAsVar ? BIND_VAR2 : BIND_LEXICAL2 : BIND_FUNCTION2, node.id.start);
  51230. }
  51231. parseClass(node, isStatement, optionalId) {
  51232. this.next();
  51233. this.takeDecorators(node);
  51234. const oldStrict = this.state.strict;
  51235. this.state.strict = true;
  51236. this.parseClassId(node, isStatement, optionalId);
  51237. this.parseClassSuper(node);
  51238. node.body = this.parseClassBody(!!node.superClass, oldStrict);
  51239. return this.finishNode(node, isStatement ? "ClassDeclaration" : "ClassExpression");
  51240. }
  51241. isClassProperty() {
  51242. return this.match(types$12.eq) || this.match(types$12.semi) || this.match(types$12.braceR);
  51243. }
  51244. isClassMethod() {
  51245. return this.match(types$12.parenL);
  51246. }
  51247. isNonstaticConstructor(method) {
  51248. return !method.computed && !method.static && (method.key.name === "constructor" || method.key.value === "constructor");
  51249. }
  51250. parseClassBody(hadSuperClass, oldStrict) {
  51251. this.classScope.enter();
  51252. const state = {
  51253. hadConstructor: false,
  51254. hadSuperClass
  51255. };
  51256. let decorators = [];
  51257. const classBody = this.startNode();
  51258. classBody.body = [];
  51259. this.expect(types$12.braceL);
  51260. this.withTopicForbiddingContext(() => {
  51261. while (!this.match(types$12.braceR)) {
  51262. if (this.eat(types$12.semi)) {
  51263. if (decorators.length > 0) {
  51264. throw this.raise(this.state.lastTokEnd, ErrorMessages.DecoratorSemicolon);
  51265. }
  51266. continue;
  51267. }
  51268. if (this.match(types$12.at)) {
  51269. decorators.push(this.parseDecorator());
  51270. continue;
  51271. }
  51272. const member = this.startNode();
  51273. if (decorators.length) {
  51274. member.decorators = decorators;
  51275. this.resetStartLocationFromNode(member, decorators[0]);
  51276. decorators = [];
  51277. }
  51278. this.parseClassMember(classBody, member, state);
  51279. if (member.kind === "constructor" && member.decorators && member.decorators.length > 0) {
  51280. this.raise(member.start, ErrorMessages.DecoratorConstructor);
  51281. }
  51282. }
  51283. });
  51284. this.state.strict = oldStrict;
  51285. this.next();
  51286. if (decorators.length) {
  51287. throw this.raise(this.state.start, ErrorMessages.TrailingDecorator);
  51288. }
  51289. this.classScope.exit();
  51290. return this.finishNode(classBody, "ClassBody");
  51291. }
  51292. parseClassMemberFromModifier(classBody, member) {
  51293. const key = this.parseIdentifier(true);
  51294. if (this.isClassMethod()) {
  51295. const method = member;
  51296. method.kind = "method";
  51297. method.computed = false;
  51298. method.key = key;
  51299. method.static = false;
  51300. this.pushClassMethod(classBody, method, false, false, false, false);
  51301. return true;
  51302. } else if (this.isClassProperty()) {
  51303. const prop = member;
  51304. prop.computed = false;
  51305. prop.key = key;
  51306. prop.static = false;
  51307. classBody.body.push(this.parseClassProperty(prop));
  51308. return true;
  51309. }
  51310. return false;
  51311. }
  51312. parseClassMember(classBody, member, state) {
  51313. const isStatic = this.isContextual("static");
  51314. if (isStatic) {
  51315. if (this.parseClassMemberFromModifier(classBody, member)) {
  51316. return;
  51317. }
  51318. if (this.eat(types$12.braceL)) {
  51319. this.parseClassStaticBlock(classBody, member);
  51320. return;
  51321. }
  51322. }
  51323. this.parseClassMemberWithIsStatic(classBody, member, state, isStatic);
  51324. }
  51325. parseClassMemberWithIsStatic(classBody, member, state, isStatic) {
  51326. const publicMethod = member;
  51327. const privateMethod = member;
  51328. const publicProp = member;
  51329. const privateProp = member;
  51330. const method = publicMethod;
  51331. const publicMember = publicMethod;
  51332. member.static = isStatic;
  51333. if (this.eat(types$12.star)) {
  51334. method.kind = "method";
  51335. const isPrivateName = this.match(types$12.privateName);
  51336. this.parseClassElementName(method);
  51337. if (isPrivateName) {
  51338. this.pushClassPrivateMethod(classBody, privateMethod, true, false);
  51339. return;
  51340. }
  51341. if (this.isNonstaticConstructor(publicMethod)) {
  51342. this.raise(publicMethod.key.start, ErrorMessages.ConstructorIsGenerator);
  51343. }
  51344. this.pushClassMethod(classBody, publicMethod, true, false, false, false);
  51345. return;
  51346. }
  51347. const containsEsc = this.state.containsEsc;
  51348. const isPrivate = this.match(types$12.privateName);
  51349. const key = this.parseClassElementName(member);
  51350. const isSimple = key.type === "Identifier";
  51351. const maybeQuestionTokenStart = this.state.start;
  51352. this.parsePostMemberNameModifiers(publicMember);
  51353. if (this.isClassMethod()) {
  51354. method.kind = "method";
  51355. if (isPrivate) {
  51356. this.pushClassPrivateMethod(classBody, privateMethod, false, false);
  51357. return;
  51358. }
  51359. const isConstructor = this.isNonstaticConstructor(publicMethod);
  51360. let allowsDirectSuper = false;
  51361. if (isConstructor) {
  51362. publicMethod.kind = "constructor";
  51363. if (state.hadConstructor && !this.hasPlugin("typescript")) {
  51364. this.raise(key.start, ErrorMessages.DuplicateConstructor);
  51365. }
  51366. if (isConstructor && this.hasPlugin("typescript") && member.override) {
  51367. this.raise(key.start, ErrorMessages.OverrideOnConstructor);
  51368. }
  51369. state.hadConstructor = true;
  51370. allowsDirectSuper = state.hadSuperClass;
  51371. }
  51372. this.pushClassMethod(classBody, publicMethod, false, false, isConstructor, allowsDirectSuper);
  51373. } else if (this.isClassProperty()) {
  51374. if (isPrivate) {
  51375. this.pushClassPrivateProperty(classBody, privateProp);
  51376. } else {
  51377. this.pushClassProperty(classBody, publicProp);
  51378. }
  51379. } else if (isSimple && key.name === "async" && !containsEsc && !this.isLineTerminator()) {
  51380. const isGenerator = this.eat(types$12.star);
  51381. if (publicMember.optional) {
  51382. this.unexpected(maybeQuestionTokenStart);
  51383. }
  51384. method.kind = "method";
  51385. const isPrivate2 = this.match(types$12.privateName);
  51386. this.parseClassElementName(method);
  51387. this.parsePostMemberNameModifiers(publicMember);
  51388. if (isPrivate2) {
  51389. this.pushClassPrivateMethod(classBody, privateMethod, isGenerator, true);
  51390. } else {
  51391. if (this.isNonstaticConstructor(publicMethod)) {
  51392. this.raise(publicMethod.key.start, ErrorMessages.ConstructorIsAsync);
  51393. }
  51394. this.pushClassMethod(classBody, publicMethod, isGenerator, true, false, false);
  51395. }
  51396. } else if (isSimple && (key.name === "get" || key.name === "set") && !containsEsc && !(this.match(types$12.star) && this.isLineTerminator())) {
  51397. method.kind = key.name;
  51398. const isPrivate2 = this.match(types$12.privateName);
  51399. this.parseClassElementName(publicMethod);
  51400. if (isPrivate2) {
  51401. this.pushClassPrivateMethod(classBody, privateMethod, false, false);
  51402. } else {
  51403. if (this.isNonstaticConstructor(publicMethod)) {
  51404. this.raise(publicMethod.key.start, ErrorMessages.ConstructorIsAccessor);
  51405. }
  51406. this.pushClassMethod(classBody, publicMethod, false, false, false, false);
  51407. }
  51408. this.checkGetterSetterParams(publicMethod);
  51409. } else if (this.isLineTerminator()) {
  51410. if (isPrivate) {
  51411. this.pushClassPrivateProperty(classBody, privateProp);
  51412. } else {
  51413. this.pushClassProperty(classBody, publicProp);
  51414. }
  51415. } else {
  51416. this.unexpected();
  51417. }
  51418. }
  51419. parseClassElementName(member) {
  51420. const {
  51421. type,
  51422. value,
  51423. start: start3
  51424. } = this.state;
  51425. if ((type === types$12.name || type === types$12.string) && member.static && value === "prototype") {
  51426. this.raise(start3, ErrorMessages.StaticPrototype);
  51427. }
  51428. if (type === types$12.privateName && value === "constructor") {
  51429. this.raise(start3, ErrorMessages.ConstructorClassPrivateField);
  51430. }
  51431. return this.parsePropertyName(member, true);
  51432. }
  51433. parseClassStaticBlock(classBody, member) {
  51434. var _member$decorators;
  51435. this.expectPlugin("classStaticBlock", member.start);
  51436. this.scope.enter(SCOPE_CLASS | SCOPE_STATIC_BLOCK | SCOPE_SUPER2);
  51437. const oldLabels = this.state.labels;
  51438. this.state.labels = [];
  51439. this.prodParam.enter(PARAM);
  51440. const body = member.body = [];
  51441. this.parseBlockOrModuleBlockBody(body, void 0, false, types$12.braceR);
  51442. this.prodParam.exit();
  51443. this.scope.exit();
  51444. this.state.labels = oldLabels;
  51445. classBody.body.push(this.finishNode(member, "StaticBlock"));
  51446. if ((_member$decorators = member.decorators) != null && _member$decorators.length) {
  51447. this.raise(member.start, ErrorMessages.DecoratorStaticBlock);
  51448. }
  51449. }
  51450. pushClassProperty(classBody, prop) {
  51451. if (!prop.computed && (prop.key.name === "constructor" || prop.key.value === "constructor")) {
  51452. this.raise(prop.key.start, ErrorMessages.ConstructorClassField);
  51453. }
  51454. classBody.body.push(this.parseClassProperty(prop));
  51455. }
  51456. pushClassPrivateProperty(classBody, prop) {
  51457. const node = this.parseClassPrivateProperty(prop);
  51458. classBody.body.push(node);
  51459. this.classScope.declarePrivateName(this.getPrivateNameSV(node.key), CLASS_ELEMENT_OTHER, node.key.start);
  51460. }
  51461. pushClassMethod(classBody, method, isGenerator, isAsync, isConstructor, allowsDirectSuper) {
  51462. classBody.body.push(this.parseMethod(method, isGenerator, isAsync, isConstructor, allowsDirectSuper, "ClassMethod", true));
  51463. }
  51464. pushClassPrivateMethod(classBody, method, isGenerator, isAsync) {
  51465. const node = this.parseMethod(method, isGenerator, isAsync, false, false, "ClassPrivateMethod", true);
  51466. classBody.body.push(node);
  51467. const kind = node.kind === "get" ? node.static ? CLASS_ELEMENT_STATIC_GETTER : CLASS_ELEMENT_INSTANCE_GETTER : node.kind === "set" ? node.static ? CLASS_ELEMENT_STATIC_SETTER : CLASS_ELEMENT_INSTANCE_SETTER : CLASS_ELEMENT_OTHER;
  51468. this.classScope.declarePrivateName(this.getPrivateNameSV(node.key), kind, node.key.start);
  51469. }
  51470. parsePostMemberNameModifiers(methodOrProp) {
  51471. }
  51472. parseClassPrivateProperty(node) {
  51473. this.parseInitializer(node);
  51474. this.semicolon();
  51475. return this.finishNode(node, "ClassPrivateProperty");
  51476. }
  51477. parseClassProperty(node) {
  51478. this.parseInitializer(node);
  51479. this.semicolon();
  51480. return this.finishNode(node, "ClassProperty");
  51481. }
  51482. parseInitializer(node) {
  51483. this.scope.enter(SCOPE_CLASS | SCOPE_SUPER2);
  51484. this.expressionScope.enter(newExpressionScope());
  51485. this.prodParam.enter(PARAM);
  51486. node.value = this.eat(types$12.eq) ? this.parseMaybeAssignAllowIn() : null;
  51487. this.expressionScope.exit();
  51488. this.prodParam.exit();
  51489. this.scope.exit();
  51490. }
  51491. parseClassId(node, isStatement, optionalId, bindingType = BIND_CLASS) {
  51492. if (this.match(types$12.name)) {
  51493. node.id = this.parseIdentifier();
  51494. if (isStatement) {
  51495. this.checkLVal(node.id, "class name", bindingType);
  51496. }
  51497. } else {
  51498. if (optionalId || !isStatement) {
  51499. node.id = null;
  51500. } else {
  51501. this.unexpected(null, ErrorMessages.MissingClassName);
  51502. }
  51503. }
  51504. }
  51505. parseClassSuper(node) {
  51506. node.superClass = this.eat(types$12._extends) ? this.parseExprSubscripts() : null;
  51507. }
  51508. parseExport(node) {
  51509. const hasDefault = this.maybeParseExportDefaultSpecifier(node);
  51510. const parseAfterDefault = !hasDefault || this.eat(types$12.comma);
  51511. const hasStar = parseAfterDefault && this.eatExportStar(node);
  51512. const hasNamespace = hasStar && this.maybeParseExportNamespaceSpecifier(node);
  51513. const parseAfterNamespace = parseAfterDefault && (!hasNamespace || this.eat(types$12.comma));
  51514. const isFromRequired = hasDefault || hasStar;
  51515. if (hasStar && !hasNamespace) {
  51516. if (hasDefault)
  51517. this.unexpected();
  51518. this.parseExportFrom(node, true);
  51519. return this.finishNode(node, "ExportAllDeclaration");
  51520. }
  51521. const hasSpecifiers = this.maybeParseExportNamedSpecifiers(node);
  51522. if (hasDefault && parseAfterDefault && !hasStar && !hasSpecifiers || hasNamespace && parseAfterNamespace && !hasSpecifiers) {
  51523. throw this.unexpected(null, types$12.braceL);
  51524. }
  51525. let hasDeclaration;
  51526. if (isFromRequired || hasSpecifiers) {
  51527. hasDeclaration = false;
  51528. this.parseExportFrom(node, isFromRequired);
  51529. } else {
  51530. hasDeclaration = this.maybeParseExportDeclaration(node);
  51531. }
  51532. if (isFromRequired || hasSpecifiers || hasDeclaration) {
  51533. this.checkExport(node, true, false, !!node.source);
  51534. return this.finishNode(node, "ExportNamedDeclaration");
  51535. }
  51536. if (this.eat(types$12._default)) {
  51537. node.declaration = this.parseExportDefaultExpression();
  51538. this.checkExport(node, true, true);
  51539. return this.finishNode(node, "ExportDefaultDeclaration");
  51540. }
  51541. throw this.unexpected(null, types$12.braceL);
  51542. }
  51543. eatExportStar(node) {
  51544. return this.eat(types$12.star);
  51545. }
  51546. maybeParseExportDefaultSpecifier(node) {
  51547. if (this.isExportDefaultSpecifier()) {
  51548. this.expectPlugin("exportDefaultFrom");
  51549. const specifier = this.startNode();
  51550. specifier.exported = this.parseIdentifier(true);
  51551. node.specifiers = [this.finishNode(specifier, "ExportDefaultSpecifier")];
  51552. return true;
  51553. }
  51554. return false;
  51555. }
  51556. maybeParseExportNamespaceSpecifier(node) {
  51557. if (this.isContextual("as")) {
  51558. if (!node.specifiers)
  51559. node.specifiers = [];
  51560. const specifier = this.startNodeAt(this.state.lastTokStart, this.state.lastTokStartLoc);
  51561. this.next();
  51562. specifier.exported = this.parseModuleExportName();
  51563. node.specifiers.push(this.finishNode(specifier, "ExportNamespaceSpecifier"));
  51564. return true;
  51565. }
  51566. return false;
  51567. }
  51568. maybeParseExportNamedSpecifiers(node) {
  51569. if (this.match(types$12.braceL)) {
  51570. if (!node.specifiers)
  51571. node.specifiers = [];
  51572. node.specifiers.push(...this.parseExportSpecifiers());
  51573. node.source = null;
  51574. node.declaration = null;
  51575. return true;
  51576. }
  51577. return false;
  51578. }
  51579. maybeParseExportDeclaration(node) {
  51580. if (this.shouldParseExportDeclaration()) {
  51581. node.specifiers = [];
  51582. node.source = null;
  51583. node.declaration = this.parseExportDeclaration(node);
  51584. return true;
  51585. }
  51586. return false;
  51587. }
  51588. isAsyncFunction() {
  51589. if (!this.isContextual("async"))
  51590. return false;
  51591. const next = this.nextTokenStart();
  51592. return !lineBreak2.test(this.input.slice(this.state.pos, next)) && this.isUnparsedContextual(next, "function");
  51593. }
  51594. parseExportDefaultExpression() {
  51595. const expr = this.startNode();
  51596. const isAsync = this.isAsyncFunction();
  51597. if (this.match(types$12._function) || isAsync) {
  51598. this.next();
  51599. if (isAsync) {
  51600. this.next();
  51601. }
  51602. return this.parseFunction(expr, FUNC_STATEMENT2 | FUNC_NULLABLE_ID2, isAsync);
  51603. } else if (this.match(types$12._class)) {
  51604. return this.parseClass(expr, true, true);
  51605. } else if (this.match(types$12.at)) {
  51606. if (this.hasPlugin("decorators") && this.getPluginOption("decorators", "decoratorsBeforeExport")) {
  51607. this.raise(this.state.start, ErrorMessages.DecoratorBeforeExport);
  51608. }
  51609. this.parseDecorators(false);
  51610. return this.parseClass(expr, true, true);
  51611. } else if (this.match(types$12._const) || this.match(types$12._var) || this.isLet()) {
  51612. throw this.raise(this.state.start, ErrorMessages.UnsupportedDefaultExport);
  51613. } else {
  51614. const res = this.parseMaybeAssignAllowIn();
  51615. this.semicolon();
  51616. return res;
  51617. }
  51618. }
  51619. parseExportDeclaration(node) {
  51620. return this.parseStatement(null);
  51621. }
  51622. isExportDefaultSpecifier() {
  51623. if (this.match(types$12.name)) {
  51624. const value = this.state.value;
  51625. if (value === "async" && !this.state.containsEsc || value === "let") {
  51626. return false;
  51627. }
  51628. if ((value === "type" || value === "interface") && !this.state.containsEsc) {
  51629. const l = this.lookahead();
  51630. if (l.type === types$12.name && l.value !== "from" || l.type === types$12.braceL) {
  51631. this.expectOnePlugin(["flow", "typescript"]);
  51632. return false;
  51633. }
  51634. }
  51635. } else if (!this.match(types$12._default)) {
  51636. return false;
  51637. }
  51638. const next = this.nextTokenStart();
  51639. const hasFrom = this.isUnparsedContextual(next, "from");
  51640. if (this.input.charCodeAt(next) === 44 || this.match(types$12.name) && hasFrom) {
  51641. return true;
  51642. }
  51643. if (this.match(types$12._default) && hasFrom) {
  51644. const nextAfterFrom = this.input.charCodeAt(this.nextTokenStartSince(next + 4));
  51645. return nextAfterFrom === 34 || nextAfterFrom === 39;
  51646. }
  51647. return false;
  51648. }
  51649. parseExportFrom(node, expect) {
  51650. if (this.eatContextual("from")) {
  51651. node.source = this.parseImportSource();
  51652. this.checkExport(node);
  51653. const assertions = this.maybeParseImportAssertions();
  51654. if (assertions) {
  51655. node.assertions = assertions;
  51656. }
  51657. } else {
  51658. if (expect) {
  51659. this.unexpected();
  51660. } else {
  51661. node.source = null;
  51662. }
  51663. }
  51664. this.semicolon();
  51665. }
  51666. shouldParseExportDeclaration() {
  51667. if (this.match(types$12.at)) {
  51668. this.expectOnePlugin(["decorators", "decorators-legacy"]);
  51669. if (this.hasPlugin("decorators")) {
  51670. if (this.getPluginOption("decorators", "decoratorsBeforeExport")) {
  51671. this.unexpected(this.state.start, ErrorMessages.DecoratorBeforeExport);
  51672. } else {
  51673. return true;
  51674. }
  51675. }
  51676. }
  51677. return this.state.type.keyword === "var" || this.state.type.keyword === "const" || this.state.type.keyword === "function" || this.state.type.keyword === "class" || this.isLet() || this.isAsyncFunction();
  51678. }
  51679. checkExport(node, checkNames, isDefault, isFrom) {
  51680. if (checkNames) {
  51681. if (isDefault) {
  51682. this.checkDuplicateExports(node, "default");
  51683. if (this.hasPlugin("exportDefaultFrom")) {
  51684. var _declaration$extra;
  51685. const declaration = node.declaration;
  51686. if (declaration.type === "Identifier" && declaration.name === "from" && declaration.end - declaration.start === 4 && !((_declaration$extra = declaration.extra) != null && _declaration$extra.parenthesized)) {
  51687. this.raise(declaration.start, ErrorMessages.ExportDefaultFromAsIdentifier);
  51688. }
  51689. }
  51690. } else if (node.specifiers && node.specifiers.length) {
  51691. for (const specifier of node.specifiers) {
  51692. const {
  51693. exported
  51694. } = specifier;
  51695. const exportedName = exported.type === "Identifier" ? exported.name : exported.value;
  51696. this.checkDuplicateExports(specifier, exportedName);
  51697. if (!isFrom && specifier.local) {
  51698. const {
  51699. local
  51700. } = specifier;
  51701. if (local.type !== "Identifier") {
  51702. this.raise(specifier.start, ErrorMessages.ExportBindingIsString, local.value, exportedName);
  51703. } else {
  51704. this.checkReservedWord(local.name, local.start, true, false);
  51705. this.scope.checkLocalExport(local);
  51706. }
  51707. }
  51708. }
  51709. } else if (node.declaration) {
  51710. if (node.declaration.type === "FunctionDeclaration" || node.declaration.type === "ClassDeclaration") {
  51711. const id = node.declaration.id;
  51712. if (!id)
  51713. throw new Error("Assertion failure");
  51714. this.checkDuplicateExports(node, id.name);
  51715. } else if (node.declaration.type === "VariableDeclaration") {
  51716. for (const declaration of node.declaration.declarations) {
  51717. this.checkDeclaration(declaration.id);
  51718. }
  51719. }
  51720. }
  51721. }
  51722. const currentContextDecorators = this.state.decoratorStack[this.state.decoratorStack.length - 1];
  51723. if (currentContextDecorators.length) {
  51724. throw this.raise(node.start, ErrorMessages.UnsupportedDecoratorExport);
  51725. }
  51726. }
  51727. checkDeclaration(node) {
  51728. if (node.type === "Identifier") {
  51729. this.checkDuplicateExports(node, node.name);
  51730. } else if (node.type === "ObjectPattern") {
  51731. for (const prop of node.properties) {
  51732. this.checkDeclaration(prop);
  51733. }
  51734. } else if (node.type === "ArrayPattern") {
  51735. for (const elem of node.elements) {
  51736. if (elem) {
  51737. this.checkDeclaration(elem);
  51738. }
  51739. }
  51740. } else if (node.type === "ObjectProperty") {
  51741. this.checkDeclaration(node.value);
  51742. } else if (node.type === "RestElement") {
  51743. this.checkDeclaration(node.argument);
  51744. } else if (node.type === "AssignmentPattern") {
  51745. this.checkDeclaration(node.left);
  51746. }
  51747. }
  51748. checkDuplicateExports(node, name2) {
  51749. if (this.state.exportedIdentifiers.indexOf(name2) > -1) {
  51750. this.raise(node.start, name2 === "default" ? ErrorMessages.DuplicateDefaultExport : ErrorMessages.DuplicateExport, name2);
  51751. }
  51752. this.state.exportedIdentifiers.push(name2);
  51753. }
  51754. parseExportSpecifiers() {
  51755. const nodes = [];
  51756. let first = true;
  51757. this.expect(types$12.braceL);
  51758. while (!this.eat(types$12.braceR)) {
  51759. if (first) {
  51760. first = false;
  51761. } else {
  51762. this.expect(types$12.comma);
  51763. if (this.eat(types$12.braceR))
  51764. break;
  51765. }
  51766. const node = this.startNode();
  51767. node.local = this.parseModuleExportName();
  51768. node.exported = this.eatContextual("as") ? this.parseModuleExportName() : node.local.__clone();
  51769. nodes.push(this.finishNode(node, "ExportSpecifier"));
  51770. }
  51771. return nodes;
  51772. }
  51773. parseModuleExportName() {
  51774. if (this.match(types$12.string)) {
  51775. const result = this.parseStringLiteral(this.state.value);
  51776. const surrogate = result.value.match(loneSurrogate2);
  51777. if (surrogate) {
  51778. this.raise(result.start, ErrorMessages.ModuleExportNameHasLoneSurrogate, surrogate[0].charCodeAt(0).toString(16));
  51779. }
  51780. return result;
  51781. }
  51782. return this.parseIdentifier(true);
  51783. }
  51784. parseImport(node) {
  51785. node.specifiers = [];
  51786. if (!this.match(types$12.string)) {
  51787. const hasDefault = this.maybeParseDefaultImportSpecifier(node);
  51788. const parseNext = !hasDefault || this.eat(types$12.comma);
  51789. const hasStar = parseNext && this.maybeParseStarImportSpecifier(node);
  51790. if (parseNext && !hasStar)
  51791. this.parseNamedImportSpecifiers(node);
  51792. this.expectContextual("from");
  51793. }
  51794. node.source = this.parseImportSource();
  51795. const assertions = this.maybeParseImportAssertions();
  51796. if (assertions) {
  51797. node.assertions = assertions;
  51798. } else {
  51799. const attributes = this.maybeParseModuleAttributes();
  51800. if (attributes) {
  51801. node.attributes = attributes;
  51802. }
  51803. }
  51804. this.semicolon();
  51805. return this.finishNode(node, "ImportDeclaration");
  51806. }
  51807. parseImportSource() {
  51808. if (!this.match(types$12.string))
  51809. this.unexpected();
  51810. return this.parseExprAtom();
  51811. }
  51812. shouldParseDefaultImport(node) {
  51813. return this.match(types$12.name);
  51814. }
  51815. parseImportSpecifierLocal(node, specifier, type, contextDescription) {
  51816. specifier.local = this.parseIdentifier();
  51817. this.checkLVal(specifier.local, contextDescription, BIND_LEXICAL2);
  51818. node.specifiers.push(this.finishNode(specifier, type));
  51819. }
  51820. parseAssertEntries() {
  51821. const attrs = [];
  51822. const attrNames = /* @__PURE__ */ new Set();
  51823. do {
  51824. if (this.match(types$12.braceR)) {
  51825. break;
  51826. }
  51827. const node = this.startNode();
  51828. const keyName = this.state.value;
  51829. if (this.match(types$12.string)) {
  51830. node.key = this.parseStringLiteral(keyName);
  51831. } else {
  51832. node.key = this.parseIdentifier(true);
  51833. }
  51834. this.expect(types$12.colon);
  51835. if (keyName !== "type") {
  51836. this.raise(node.key.start, ErrorMessages.ModuleAttributeDifferentFromType, keyName);
  51837. }
  51838. if (attrNames.has(keyName)) {
  51839. this.raise(node.key.start, ErrorMessages.ModuleAttributesWithDuplicateKeys, keyName);
  51840. }
  51841. attrNames.add(keyName);
  51842. if (!this.match(types$12.string)) {
  51843. throw this.unexpected(this.state.start, ErrorMessages.ModuleAttributeInvalidValue);
  51844. }
  51845. node.value = this.parseStringLiteral(this.state.value);
  51846. this.finishNode(node, "ImportAttribute");
  51847. attrs.push(node);
  51848. } while (this.eat(types$12.comma));
  51849. return attrs;
  51850. }
  51851. maybeParseModuleAttributes() {
  51852. if (this.match(types$12._with) && !this.hasPrecedingLineBreak()) {
  51853. this.expectPlugin("moduleAttributes");
  51854. this.next();
  51855. } else {
  51856. if (this.hasPlugin("moduleAttributes"))
  51857. return [];
  51858. return null;
  51859. }
  51860. const attrs = [];
  51861. const attributes = /* @__PURE__ */ new Set();
  51862. do {
  51863. const node = this.startNode();
  51864. node.key = this.parseIdentifier(true);
  51865. if (node.key.name !== "type") {
  51866. this.raise(node.key.start, ErrorMessages.ModuleAttributeDifferentFromType, node.key.name);
  51867. }
  51868. if (attributes.has(node.key.name)) {
  51869. this.raise(node.key.start, ErrorMessages.ModuleAttributesWithDuplicateKeys, node.key.name);
  51870. }
  51871. attributes.add(node.key.name);
  51872. this.expect(types$12.colon);
  51873. if (!this.match(types$12.string)) {
  51874. throw this.unexpected(this.state.start, ErrorMessages.ModuleAttributeInvalidValue);
  51875. }
  51876. node.value = this.parseStringLiteral(this.state.value);
  51877. this.finishNode(node, "ImportAttribute");
  51878. attrs.push(node);
  51879. } while (this.eat(types$12.comma));
  51880. return attrs;
  51881. }
  51882. maybeParseImportAssertions() {
  51883. if (this.isContextual("assert") && !this.hasPrecedingLineBreak()) {
  51884. this.expectPlugin("importAssertions");
  51885. this.next();
  51886. } else {
  51887. if (this.hasPlugin("importAssertions"))
  51888. return [];
  51889. return null;
  51890. }
  51891. this.eat(types$12.braceL);
  51892. const attrs = this.parseAssertEntries();
  51893. this.eat(types$12.braceR);
  51894. return attrs;
  51895. }
  51896. maybeParseDefaultImportSpecifier(node) {
  51897. if (this.shouldParseDefaultImport(node)) {
  51898. this.parseImportSpecifierLocal(node, this.startNode(), "ImportDefaultSpecifier", "default import specifier");
  51899. return true;
  51900. }
  51901. return false;
  51902. }
  51903. maybeParseStarImportSpecifier(node) {
  51904. if (this.match(types$12.star)) {
  51905. const specifier = this.startNode();
  51906. this.next();
  51907. this.expectContextual("as");
  51908. this.parseImportSpecifierLocal(node, specifier, "ImportNamespaceSpecifier", "import namespace specifier");
  51909. return true;
  51910. }
  51911. return false;
  51912. }
  51913. parseNamedImportSpecifiers(node) {
  51914. let first = true;
  51915. this.expect(types$12.braceL);
  51916. while (!this.eat(types$12.braceR)) {
  51917. if (first) {
  51918. first = false;
  51919. } else {
  51920. if (this.eat(types$12.colon)) {
  51921. throw this.raise(this.state.start, ErrorMessages.DestructureNamedImport);
  51922. }
  51923. this.expect(types$12.comma);
  51924. if (this.eat(types$12.braceR))
  51925. break;
  51926. }
  51927. this.parseImportSpecifier(node);
  51928. }
  51929. }
  51930. parseImportSpecifier(node) {
  51931. const specifier = this.startNode();
  51932. const importedIsString = this.match(types$12.string);
  51933. specifier.imported = this.parseModuleExportName();
  51934. if (this.eatContextual("as")) {
  51935. specifier.local = this.parseIdentifier();
  51936. } else {
  51937. const {
  51938. imported
  51939. } = specifier;
  51940. if (importedIsString) {
  51941. throw this.raise(specifier.start, ErrorMessages.ImportBindingIsString, imported.value);
  51942. }
  51943. this.checkReservedWord(imported.name, specifier.start, true, true);
  51944. specifier.local = imported.__clone();
  51945. }
  51946. this.checkLVal(specifier.local, "import specifier", BIND_LEXICAL2);
  51947. node.specifiers.push(this.finishNode(specifier, "ImportSpecifier"));
  51948. }
  51949. isThisParam(param) {
  51950. return param.type === "Identifier" && param.name === "this";
  51951. }
  51952. };
  51953. var Parser3 = class extends StatementParser {
  51954. constructor(options, input) {
  51955. options = getOptions2(options);
  51956. super(options, input);
  51957. this.options = options;
  51958. this.initializeScopes();
  51959. this.plugins = pluginsMap(this.options.plugins);
  51960. this.filename = options.sourceFilename;
  51961. }
  51962. getScopeHandler() {
  51963. return ScopeHandler;
  51964. }
  51965. parse() {
  51966. this.enterInitialScopes();
  51967. const file = this.startNode();
  51968. const program = this.startNode();
  51969. this.nextToken();
  51970. file.errors = null;
  51971. this.parseTopLevel(file, program);
  51972. file.errors = this.state.errors;
  51973. return file;
  51974. }
  51975. };
  51976. function pluginsMap(plugins) {
  51977. const pluginMap = /* @__PURE__ */ new Map();
  51978. for (const plugin2 of plugins) {
  51979. const [name2, options] = Array.isArray(plugin2) ? plugin2 : [plugin2, {}];
  51980. if (!pluginMap.has(name2))
  51981. pluginMap.set(name2, options || {});
  51982. }
  51983. return pluginMap;
  51984. }
  51985. function parse4(input, options) {
  51986. var _options;
  51987. if (((_options = options) == null ? void 0 : _options.sourceType) === "unambiguous") {
  51988. options = Object.assign({}, options);
  51989. try {
  51990. options.sourceType = "module";
  51991. const parser = getParser(options, input);
  51992. const ast = parser.parse();
  51993. if (parser.sawUnambiguousESM) {
  51994. return ast;
  51995. }
  51996. if (parser.ambiguousScriptDifferentAst) {
  51997. try {
  51998. options.sourceType = "script";
  51999. return getParser(options, input).parse();
  52000. } catch (_unused) {
  52001. }
  52002. } else {
  52003. ast.program.sourceType = "script";
  52004. }
  52005. return ast;
  52006. } catch (moduleError) {
  52007. try {
  52008. options.sourceType = "script";
  52009. return getParser(options, input).parse();
  52010. } catch (_unused2) {
  52011. }
  52012. throw moduleError;
  52013. }
  52014. } else {
  52015. return getParser(options, input).parse();
  52016. }
  52017. }
  52018. function parseExpression(input, options) {
  52019. const parser = getParser(options, input);
  52020. if (parser.options.strictMode) {
  52021. parser.state.strict = true;
  52022. }
  52023. return parser.getExpression();
  52024. }
  52025. function getParser(options, input) {
  52026. let cls = Parser3;
  52027. if (options != null && options.plugins) {
  52028. validatePlugins(options.plugins);
  52029. cls = getParserClass(options.plugins);
  52030. }
  52031. return new cls(options, input);
  52032. }
  52033. var parserClassCache = {};
  52034. function getParserClass(pluginsFromOptions) {
  52035. const pluginList = mixinPluginNames.filter((name2) => hasPlugin(pluginsFromOptions, name2));
  52036. const key = pluginList.join("/");
  52037. let cls = parserClassCache[key];
  52038. if (!cls) {
  52039. cls = Parser3;
  52040. for (const plugin2 of pluginList) {
  52041. cls = mixinPlugins[plugin2](cls);
  52042. }
  52043. parserClassCache[key] = cls;
  52044. }
  52045. return cls;
  52046. }
  52047. exports.parse = parse4;
  52048. exports.parseExpression = parseExpression;
  52049. exports.tokTypes = types$12;
  52050. }
  52051. });
  52052. // node_modules/estree-to-babel/node_modules/@babel/traverse/lib/path/replacement.js
  52053. var require_replacement = __commonJS({
  52054. "node_modules/estree-to-babel/node_modules/@babel/traverse/lib/path/replacement.js"(exports) {
  52055. "use strict";
  52056. Object.defineProperty(exports, "__esModule", {
  52057. value: true
  52058. });
  52059. exports.replaceWithMultiple = replaceWithMultiple;
  52060. exports.replaceWithSourceString = replaceWithSourceString;
  52061. exports.replaceWith = replaceWith;
  52062. exports._replaceWith = _replaceWith;
  52063. exports.replaceExpressionWithStatements = replaceExpressionWithStatements;
  52064. exports.replaceInline = replaceInline;
  52065. var _codeFrame = require_lib9();
  52066. var _index = require_lib14();
  52067. var _index2 = require_path();
  52068. var _cache = require_cache();
  52069. var _parser = require_lib10();
  52070. var t2 = require_lib4();
  52071. var hoistVariablesVisitor = {
  52072. Function(path) {
  52073. path.skip();
  52074. },
  52075. VariableDeclaration(path) {
  52076. if (path.node.kind !== "var")
  52077. return;
  52078. const bindings = path.getBindingIdentifiers();
  52079. for (const key of Object.keys(bindings)) {
  52080. path.scope.push({
  52081. id: bindings[key]
  52082. });
  52083. }
  52084. const exprs = [];
  52085. for (const declar of path.node.declarations) {
  52086. if (declar.init) {
  52087. exprs.push(t2.expressionStatement(t2.assignmentExpression("=", declar.id, declar.init)));
  52088. }
  52089. }
  52090. path.replaceWithMultiple(exprs);
  52091. }
  52092. };
  52093. function replaceWithMultiple(nodes) {
  52094. var _pathCache$get;
  52095. this.resync();
  52096. nodes = this._verifyNodeList(nodes);
  52097. t2.inheritLeadingComments(nodes[0], this.node);
  52098. t2.inheritTrailingComments(nodes[nodes.length - 1], this.node);
  52099. (_pathCache$get = _cache.path.get(this.parent)) == null ? void 0 : _pathCache$get.delete(this.node);
  52100. this.node = this.container[this.key] = null;
  52101. const paths = this.insertAfter(nodes);
  52102. if (this.node) {
  52103. this.requeue();
  52104. } else {
  52105. this.remove();
  52106. }
  52107. return paths;
  52108. }
  52109. function replaceWithSourceString(replacement) {
  52110. this.resync();
  52111. try {
  52112. replacement = `(${replacement})`;
  52113. replacement = (0, _parser.parse)(replacement);
  52114. } catch (err) {
  52115. const loc = err.loc;
  52116. if (loc) {
  52117. err.message += " - make sure this is an expression.\n" + (0, _codeFrame.codeFrameColumns)(replacement, {
  52118. start: {
  52119. line: loc.line,
  52120. column: loc.column + 1
  52121. }
  52122. });
  52123. err.code = "BABEL_REPLACE_SOURCE_ERROR";
  52124. }
  52125. throw err;
  52126. }
  52127. replacement = replacement.program.body[0].expression;
  52128. _index.default.removeProperties(replacement);
  52129. return this.replaceWith(replacement);
  52130. }
  52131. function replaceWith(replacement) {
  52132. this.resync();
  52133. if (this.removed) {
  52134. throw new Error("You can't replace this node, we've already removed it");
  52135. }
  52136. if (replacement instanceof _index2.default) {
  52137. replacement = replacement.node;
  52138. }
  52139. if (!replacement) {
  52140. throw new Error("You passed `path.replaceWith()` a falsy node, use `path.remove()` instead");
  52141. }
  52142. if (this.node === replacement) {
  52143. return [this];
  52144. }
  52145. if (this.isProgram() && !t2.isProgram(replacement)) {
  52146. throw new Error("You can only replace a Program root node with another Program node");
  52147. }
  52148. if (Array.isArray(replacement)) {
  52149. throw new Error("Don't use `path.replaceWith()` with an array of nodes, use `path.replaceWithMultiple()`");
  52150. }
  52151. if (typeof replacement === "string") {
  52152. throw new Error("Don't use `path.replaceWith()` with a source string, use `path.replaceWithSourceString()`");
  52153. }
  52154. let nodePath = "";
  52155. if (this.isNodeType("Statement") && t2.isExpression(replacement)) {
  52156. if (!this.canHaveVariableDeclarationOrExpression() && !this.canSwapBetweenExpressionAndStatement(replacement) && !this.parentPath.isExportDefaultDeclaration()) {
  52157. replacement = t2.expressionStatement(replacement);
  52158. nodePath = "expression";
  52159. }
  52160. }
  52161. if (this.isNodeType("Expression") && t2.isStatement(replacement)) {
  52162. if (!this.canHaveVariableDeclarationOrExpression() && !this.canSwapBetweenExpressionAndStatement(replacement)) {
  52163. return this.replaceExpressionWithStatements([replacement]);
  52164. }
  52165. }
  52166. const oldNode = this.node;
  52167. if (oldNode) {
  52168. t2.inheritsComments(replacement, oldNode);
  52169. t2.removeComments(oldNode);
  52170. }
  52171. this._replaceWith(replacement);
  52172. this.type = replacement.type;
  52173. this.setScope();
  52174. this.requeue();
  52175. return [nodePath ? this.get(nodePath) : this];
  52176. }
  52177. function _replaceWith(node) {
  52178. var _pathCache$get2;
  52179. if (!this.container) {
  52180. throw new ReferenceError("Container is falsy");
  52181. }
  52182. if (this.inList) {
  52183. t2.validate(this.parent, this.key, [node]);
  52184. } else {
  52185. t2.validate(this.parent, this.key, node);
  52186. }
  52187. this.debug(`Replace with ${node == null ? void 0 : node.type}`);
  52188. (_pathCache$get2 = _cache.path.get(this.parent)) == null ? void 0 : _pathCache$get2.set(node, this).delete(this.node);
  52189. this.node = this.container[this.key] = node;
  52190. }
  52191. function replaceExpressionWithStatements(nodes) {
  52192. this.resync();
  52193. const toSequenceExpression = t2.toSequenceExpression(nodes, this.scope);
  52194. if (toSequenceExpression) {
  52195. return this.replaceWith(toSequenceExpression)[0].get("expressions");
  52196. }
  52197. const functionParent = this.getFunctionParent();
  52198. const isParentAsync = functionParent == null ? void 0 : functionParent.is("async");
  52199. const isParentGenerator = functionParent == null ? void 0 : functionParent.is("generator");
  52200. const container = t2.arrowFunctionExpression([], t2.blockStatement(nodes));
  52201. this.replaceWith(t2.callExpression(container, []));
  52202. this.traverse(hoistVariablesVisitor);
  52203. const completionRecords = this.get("callee").getCompletionRecords();
  52204. for (const path of completionRecords) {
  52205. if (!path.isExpressionStatement())
  52206. continue;
  52207. const loop = path.findParent((path2) => path2.isLoop());
  52208. if (loop) {
  52209. let uid = loop.getData("expressionReplacementReturnUid");
  52210. if (!uid) {
  52211. const callee2 = this.get("callee");
  52212. uid = callee2.scope.generateDeclaredUidIdentifier("ret");
  52213. callee2.get("body").pushContainer("body", t2.returnStatement(t2.cloneNode(uid)));
  52214. loop.setData("expressionReplacementReturnUid", uid);
  52215. } else {
  52216. uid = t2.identifier(uid.name);
  52217. }
  52218. path.get("expression").replaceWith(t2.assignmentExpression("=", t2.cloneNode(uid), path.node.expression));
  52219. } else {
  52220. path.replaceWith(t2.returnStatement(path.node.expression));
  52221. }
  52222. }
  52223. const callee = this.get("callee");
  52224. callee.arrowFunctionToExpression();
  52225. const needToAwaitFunction = isParentAsync && _index.default.hasType(this.get("callee.body").node, "AwaitExpression", t2.FUNCTION_TYPES);
  52226. const needToYieldFunction = isParentGenerator && _index.default.hasType(this.get("callee.body").node, "YieldExpression", t2.FUNCTION_TYPES);
  52227. if (needToAwaitFunction) {
  52228. callee.set("async", true);
  52229. if (!needToYieldFunction) {
  52230. this.replaceWith(t2.awaitExpression(this.node));
  52231. }
  52232. }
  52233. if (needToYieldFunction) {
  52234. callee.set("generator", true);
  52235. this.replaceWith(t2.yieldExpression(this.node, true));
  52236. }
  52237. return callee.get("body.body");
  52238. }
  52239. function replaceInline(nodes) {
  52240. this.resync();
  52241. if (Array.isArray(nodes)) {
  52242. if (Array.isArray(this.container)) {
  52243. nodes = this._verifyNodeList(nodes);
  52244. const paths = this._containerInsertAfter(nodes);
  52245. this.remove();
  52246. return paths;
  52247. } else {
  52248. return this.replaceWithMultiple(nodes);
  52249. }
  52250. } else {
  52251. return this.replaceWith(nodes);
  52252. }
  52253. }
  52254. }
  52255. });
  52256. // node_modules/estree-to-babel/node_modules/@babel/traverse/lib/path/evaluation.js
  52257. var require_evaluation = __commonJS({
  52258. "node_modules/estree-to-babel/node_modules/@babel/traverse/lib/path/evaluation.js"(exports) {
  52259. "use strict";
  52260. Object.defineProperty(exports, "__esModule", {
  52261. value: true
  52262. });
  52263. exports.evaluateTruthy = evaluateTruthy;
  52264. exports.evaluate = evaluate;
  52265. var VALID_CALLEES = ["String", "Number", "Math"];
  52266. var INVALID_METHODS = ["random"];
  52267. function evaluateTruthy() {
  52268. const res = this.evaluate();
  52269. if (res.confident)
  52270. return !!res.value;
  52271. }
  52272. function deopt(path, state) {
  52273. if (!state.confident)
  52274. return;
  52275. state.deoptPath = path;
  52276. state.confident = false;
  52277. }
  52278. function evaluateCached(path, state) {
  52279. const {
  52280. node
  52281. } = path;
  52282. const {
  52283. seen
  52284. } = state;
  52285. if (seen.has(node)) {
  52286. const existing = seen.get(node);
  52287. if (existing.resolved) {
  52288. return existing.value;
  52289. } else {
  52290. deopt(path, state);
  52291. return;
  52292. }
  52293. } else {
  52294. const item = {
  52295. resolved: false
  52296. };
  52297. seen.set(node, item);
  52298. const val = _evaluate(path, state);
  52299. if (state.confident) {
  52300. item.resolved = true;
  52301. item.value = val;
  52302. }
  52303. return val;
  52304. }
  52305. }
  52306. function _evaluate(path, state) {
  52307. if (!state.confident)
  52308. return;
  52309. if (path.isSequenceExpression()) {
  52310. const exprs = path.get("expressions");
  52311. return evaluateCached(exprs[exprs.length - 1], state);
  52312. }
  52313. if (path.isStringLiteral() || path.isNumericLiteral() || path.isBooleanLiteral()) {
  52314. return path.node.value;
  52315. }
  52316. if (path.isNullLiteral()) {
  52317. return null;
  52318. }
  52319. if (path.isTemplateLiteral()) {
  52320. return evaluateQuasis(path, path.node.quasis, state);
  52321. }
  52322. if (path.isTaggedTemplateExpression() && path.get("tag").isMemberExpression()) {
  52323. const object = path.get("tag.object");
  52324. const {
  52325. node: {
  52326. name: name2
  52327. }
  52328. } = object;
  52329. const property = path.get("tag.property");
  52330. if (object.isIdentifier() && name2 === "String" && !path.scope.getBinding(name2) && property.isIdentifier() && property.node.name === "raw") {
  52331. return evaluateQuasis(path, path.node.quasi.quasis, state, true);
  52332. }
  52333. }
  52334. if (path.isConditionalExpression()) {
  52335. const testResult = evaluateCached(path.get("test"), state);
  52336. if (!state.confident)
  52337. return;
  52338. if (testResult) {
  52339. return evaluateCached(path.get("consequent"), state);
  52340. } else {
  52341. return evaluateCached(path.get("alternate"), state);
  52342. }
  52343. }
  52344. if (path.isExpressionWrapper()) {
  52345. return evaluateCached(path.get("expression"), state);
  52346. }
  52347. if (path.isMemberExpression() && !path.parentPath.isCallExpression({
  52348. callee: path.node
  52349. })) {
  52350. const property = path.get("property");
  52351. const object = path.get("object");
  52352. if (object.isLiteral() && property.isIdentifier()) {
  52353. const value = object.node.value;
  52354. const type = typeof value;
  52355. if (type === "number" || type === "string") {
  52356. return value[property.node.name];
  52357. }
  52358. }
  52359. }
  52360. if (path.isReferencedIdentifier()) {
  52361. const binding = path.scope.getBinding(path.node.name);
  52362. if (binding && binding.constantViolations.length > 0) {
  52363. return deopt(binding.path, state);
  52364. }
  52365. if (binding && path.node.start < binding.path.node.end) {
  52366. return deopt(binding.path, state);
  52367. }
  52368. if (binding != null && binding.hasValue) {
  52369. return binding.value;
  52370. } else {
  52371. if (path.node.name === "undefined") {
  52372. return binding ? deopt(binding.path, state) : void 0;
  52373. } else if (path.node.name === "Infinity") {
  52374. return binding ? deopt(binding.path, state) : Infinity;
  52375. } else if (path.node.name === "NaN") {
  52376. return binding ? deopt(binding.path, state) : NaN;
  52377. }
  52378. const resolved = path.resolve();
  52379. if (resolved === path) {
  52380. return deopt(path, state);
  52381. } else {
  52382. return evaluateCached(resolved, state);
  52383. }
  52384. }
  52385. }
  52386. if (path.isUnaryExpression({
  52387. prefix: true
  52388. })) {
  52389. if (path.node.operator === "void") {
  52390. return void 0;
  52391. }
  52392. const argument = path.get("argument");
  52393. if (path.node.operator === "typeof" && (argument.isFunction() || argument.isClass())) {
  52394. return "function";
  52395. }
  52396. const arg = evaluateCached(argument, state);
  52397. if (!state.confident)
  52398. return;
  52399. switch (path.node.operator) {
  52400. case "!":
  52401. return !arg;
  52402. case "+":
  52403. return +arg;
  52404. case "-":
  52405. return -arg;
  52406. case "~":
  52407. return ~arg;
  52408. case "typeof":
  52409. return typeof arg;
  52410. }
  52411. }
  52412. if (path.isArrayExpression()) {
  52413. const arr = [];
  52414. const elems = path.get("elements");
  52415. for (const elem of elems) {
  52416. const elemValue = elem.evaluate();
  52417. if (elemValue.confident) {
  52418. arr.push(elemValue.value);
  52419. } else {
  52420. return deopt(elemValue.deopt, state);
  52421. }
  52422. }
  52423. return arr;
  52424. }
  52425. if (path.isObjectExpression()) {
  52426. const obj = {};
  52427. const props = path.get("properties");
  52428. for (const prop of props) {
  52429. if (prop.isObjectMethod() || prop.isSpreadElement()) {
  52430. return deopt(prop, state);
  52431. }
  52432. const keyPath = prop.get("key");
  52433. let key = keyPath;
  52434. if (prop.node.computed) {
  52435. key = key.evaluate();
  52436. if (!key.confident) {
  52437. return deopt(key.deopt, state);
  52438. }
  52439. key = key.value;
  52440. } else if (key.isIdentifier()) {
  52441. key = key.node.name;
  52442. } else {
  52443. key = key.node.value;
  52444. }
  52445. const valuePath = prop.get("value");
  52446. let value = valuePath.evaluate();
  52447. if (!value.confident) {
  52448. return deopt(value.deopt, state);
  52449. }
  52450. value = value.value;
  52451. obj[key] = value;
  52452. }
  52453. return obj;
  52454. }
  52455. if (path.isLogicalExpression()) {
  52456. const wasConfident = state.confident;
  52457. const left = evaluateCached(path.get("left"), state);
  52458. const leftConfident = state.confident;
  52459. state.confident = wasConfident;
  52460. const right = evaluateCached(path.get("right"), state);
  52461. const rightConfident = state.confident;
  52462. switch (path.node.operator) {
  52463. case "||":
  52464. state.confident = leftConfident && (!!left || rightConfident);
  52465. if (!state.confident)
  52466. return;
  52467. return left || right;
  52468. case "&&":
  52469. state.confident = leftConfident && (!left || rightConfident);
  52470. if (!state.confident)
  52471. return;
  52472. return left && right;
  52473. }
  52474. }
  52475. if (path.isBinaryExpression()) {
  52476. const left = evaluateCached(path.get("left"), state);
  52477. if (!state.confident)
  52478. return;
  52479. const right = evaluateCached(path.get("right"), state);
  52480. if (!state.confident)
  52481. return;
  52482. switch (path.node.operator) {
  52483. case "-":
  52484. return left - right;
  52485. case "+":
  52486. return left + right;
  52487. case "/":
  52488. return left / right;
  52489. case "*":
  52490. return left * right;
  52491. case "%":
  52492. return left % right;
  52493. case "**":
  52494. return Math.pow(left, right);
  52495. case "<":
  52496. return left < right;
  52497. case ">":
  52498. return left > right;
  52499. case "<=":
  52500. return left <= right;
  52501. case ">=":
  52502. return left >= right;
  52503. case "==":
  52504. return left == right;
  52505. case "!=":
  52506. return left != right;
  52507. case "===":
  52508. return left === right;
  52509. case "!==":
  52510. return left !== right;
  52511. case "|":
  52512. return left | right;
  52513. case "&":
  52514. return left & right;
  52515. case "^":
  52516. return left ^ right;
  52517. case "<<":
  52518. return left << right;
  52519. case ">>":
  52520. return left >> right;
  52521. case ">>>":
  52522. return left >>> right;
  52523. }
  52524. }
  52525. if (path.isCallExpression()) {
  52526. const callee = path.get("callee");
  52527. let context;
  52528. let func;
  52529. if (callee.isIdentifier() && !path.scope.getBinding(callee.node.name) && VALID_CALLEES.indexOf(callee.node.name) >= 0) {
  52530. func = global[callee.node.name];
  52531. }
  52532. if (callee.isMemberExpression()) {
  52533. const object = callee.get("object");
  52534. const property = callee.get("property");
  52535. if (object.isIdentifier() && property.isIdentifier() && VALID_CALLEES.indexOf(object.node.name) >= 0 && INVALID_METHODS.indexOf(property.node.name) < 0) {
  52536. context = global[object.node.name];
  52537. func = context[property.node.name];
  52538. }
  52539. if (object.isLiteral() && property.isIdentifier()) {
  52540. const type = typeof object.node.value;
  52541. if (type === "string" || type === "number") {
  52542. context = object.node.value;
  52543. func = context[property.node.name];
  52544. }
  52545. }
  52546. }
  52547. if (func) {
  52548. const args = path.get("arguments").map((arg) => evaluateCached(arg, state));
  52549. if (!state.confident)
  52550. return;
  52551. return func.apply(context, args);
  52552. }
  52553. }
  52554. deopt(path, state);
  52555. }
  52556. function evaluateQuasis(path, quasis, state, raw = false) {
  52557. let str = "";
  52558. let i = 0;
  52559. const exprs = path.get("expressions");
  52560. for (const elem of quasis) {
  52561. if (!state.confident)
  52562. break;
  52563. str += raw ? elem.value.raw : elem.value.cooked;
  52564. const expr = exprs[i++];
  52565. if (expr)
  52566. str += String(evaluateCached(expr, state));
  52567. }
  52568. if (!state.confident)
  52569. return;
  52570. return str;
  52571. }
  52572. function evaluate() {
  52573. const state = {
  52574. confident: true,
  52575. deoptPath: null,
  52576. seen: /* @__PURE__ */ new Map()
  52577. };
  52578. let value = evaluateCached(this, state);
  52579. if (!state.confident)
  52580. value = void 0;
  52581. return {
  52582. confident: state.confident,
  52583. deopt: state.deoptPath,
  52584. value
  52585. };
  52586. }
  52587. }
  52588. });
  52589. // node_modules/estree-to-babel/node_modules/@babel/helper-get-function-arity/lib/index.js
  52590. var require_lib11 = __commonJS({
  52591. "node_modules/estree-to-babel/node_modules/@babel/helper-get-function-arity/lib/index.js"(exports) {
  52592. "use strict";
  52593. Object.defineProperty(exports, "__esModule", {
  52594. value: true
  52595. });
  52596. exports.default = _default;
  52597. var t2 = _interopRequireWildcard(require_lib4());
  52598. function _getRequireWildcardCache() {
  52599. if (typeof WeakMap !== "function")
  52600. return null;
  52601. var cache = /* @__PURE__ */ new WeakMap();
  52602. _getRequireWildcardCache = function() {
  52603. return cache;
  52604. };
  52605. return cache;
  52606. }
  52607. function _interopRequireWildcard(obj) {
  52608. if (obj && obj.__esModule) {
  52609. return obj;
  52610. }
  52611. if (obj === null || typeof obj !== "object" && typeof obj !== "function") {
  52612. return { default: obj };
  52613. }
  52614. var cache = _getRequireWildcardCache();
  52615. if (cache && cache.has(obj)) {
  52616. return cache.get(obj);
  52617. }
  52618. var newObj = {};
  52619. var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;
  52620. for (var key in obj) {
  52621. if (Object.prototype.hasOwnProperty.call(obj, key)) {
  52622. var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null;
  52623. if (desc && (desc.get || desc.set)) {
  52624. Object.defineProperty(newObj, key, desc);
  52625. } else {
  52626. newObj[key] = obj[key];
  52627. }
  52628. }
  52629. }
  52630. newObj.default = obj;
  52631. if (cache) {
  52632. cache.set(obj, newObj);
  52633. }
  52634. return newObj;
  52635. }
  52636. function _default(node) {
  52637. const params = node.params;
  52638. for (let i = 0; i < params.length; i++) {
  52639. const param = params[i];
  52640. if (t2.isAssignmentPattern(param) || t2.isRestElement(param)) {
  52641. return i;
  52642. }
  52643. }
  52644. return params.length;
  52645. }
  52646. }
  52647. });
  52648. // node_modules/estree-to-babel/node_modules/@babel/template/lib/formatters.js
  52649. var require_formatters = __commonJS({
  52650. "node_modules/estree-to-babel/node_modules/@babel/template/lib/formatters.js"(exports) {
  52651. "use strict";
  52652. Object.defineProperty(exports, "__esModule", {
  52653. value: true
  52654. });
  52655. exports.program = exports.expression = exports.statement = exports.statements = exports.smart = void 0;
  52656. var t2 = _interopRequireWildcard(require_lib4());
  52657. function _getRequireWildcardCache() {
  52658. if (typeof WeakMap !== "function")
  52659. return null;
  52660. var cache = /* @__PURE__ */ new WeakMap();
  52661. _getRequireWildcardCache = function() {
  52662. return cache;
  52663. };
  52664. return cache;
  52665. }
  52666. function _interopRequireWildcard(obj) {
  52667. if (obj && obj.__esModule) {
  52668. return obj;
  52669. }
  52670. if (obj === null || typeof obj !== "object" && typeof obj !== "function") {
  52671. return { default: obj };
  52672. }
  52673. var cache = _getRequireWildcardCache();
  52674. if (cache && cache.has(obj)) {
  52675. return cache.get(obj);
  52676. }
  52677. var newObj = {};
  52678. var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;
  52679. for (var key in obj) {
  52680. if (Object.prototype.hasOwnProperty.call(obj, key)) {
  52681. var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null;
  52682. if (desc && (desc.get || desc.set)) {
  52683. Object.defineProperty(newObj, key, desc);
  52684. } else {
  52685. newObj[key] = obj[key];
  52686. }
  52687. }
  52688. }
  52689. newObj.default = obj;
  52690. if (cache) {
  52691. cache.set(obj, newObj);
  52692. }
  52693. return newObj;
  52694. }
  52695. function makeStatementFormatter(fn) {
  52696. return {
  52697. code: (str) => `/* @babel/template */;
  52698. ${str}`,
  52699. validate: () => {
  52700. },
  52701. unwrap: (ast) => {
  52702. return fn(ast.program.body.slice(1));
  52703. }
  52704. };
  52705. }
  52706. var smart = makeStatementFormatter((body) => {
  52707. if (body.length > 1) {
  52708. return body;
  52709. } else {
  52710. return body[0];
  52711. }
  52712. });
  52713. exports.smart = smart;
  52714. var statements = makeStatementFormatter((body) => body);
  52715. exports.statements = statements;
  52716. var statement = makeStatementFormatter((body) => {
  52717. if (body.length === 0) {
  52718. throw new Error("Found nothing to return.");
  52719. }
  52720. if (body.length > 1) {
  52721. throw new Error("Found multiple statements but wanted one");
  52722. }
  52723. return body[0];
  52724. });
  52725. exports.statement = statement;
  52726. var expression = {
  52727. code: (str) => `(
  52728. ${str}
  52729. )`,
  52730. validate: (ast) => {
  52731. if (ast.program.body.length > 1) {
  52732. throw new Error("Found multiple statements but wanted one");
  52733. }
  52734. if (expression.unwrap(ast).start === 0) {
  52735. throw new Error("Parse result included parens.");
  52736. }
  52737. },
  52738. unwrap: ({
  52739. program: program2
  52740. }) => {
  52741. const [stmt] = program2.body;
  52742. t2.assertExpressionStatement(stmt);
  52743. return stmt.expression;
  52744. }
  52745. };
  52746. exports.expression = expression;
  52747. var program = {
  52748. code: (str) => str,
  52749. validate: () => {
  52750. },
  52751. unwrap: (ast) => ast.program
  52752. };
  52753. exports.program = program;
  52754. }
  52755. });
  52756. // node_modules/estree-to-babel/node_modules/@babel/template/lib/options.js
  52757. var require_options = __commonJS({
  52758. "node_modules/estree-to-babel/node_modules/@babel/template/lib/options.js"(exports) {
  52759. "use strict";
  52760. Object.defineProperty(exports, "__esModule", {
  52761. value: true
  52762. });
  52763. exports.merge = merge2;
  52764. exports.validate = validate;
  52765. exports.normalizeReplacements = normalizeReplacements;
  52766. function _objectWithoutPropertiesLoose(source, excluded) {
  52767. if (source == null)
  52768. return {};
  52769. var target = {};
  52770. var sourceKeys = Object.keys(source);
  52771. var key, i;
  52772. for (i = 0; i < sourceKeys.length; i++) {
  52773. key = sourceKeys[i];
  52774. if (excluded.indexOf(key) >= 0)
  52775. continue;
  52776. target[key] = source[key];
  52777. }
  52778. return target;
  52779. }
  52780. function merge2(a, b) {
  52781. const {
  52782. placeholderWhitelist = a.placeholderWhitelist,
  52783. placeholderPattern = a.placeholderPattern,
  52784. preserveComments = a.preserveComments,
  52785. syntacticPlaceholders = a.syntacticPlaceholders
  52786. } = b;
  52787. return {
  52788. parser: Object.assign({}, a.parser, b.parser),
  52789. placeholderWhitelist,
  52790. placeholderPattern,
  52791. preserveComments,
  52792. syntacticPlaceholders
  52793. };
  52794. }
  52795. function validate(opts) {
  52796. if (opts != null && typeof opts !== "object") {
  52797. throw new Error("Unknown template options.");
  52798. }
  52799. const _ref = opts || {}, {
  52800. placeholderWhitelist,
  52801. placeholderPattern,
  52802. preserveComments,
  52803. syntacticPlaceholders
  52804. } = _ref, parser = _objectWithoutPropertiesLoose(_ref, ["placeholderWhitelist", "placeholderPattern", "preserveComments", "syntacticPlaceholders"]);
  52805. if (placeholderWhitelist != null && !(placeholderWhitelist instanceof Set)) {
  52806. throw new Error("'.placeholderWhitelist' must be a Set, null, or undefined");
  52807. }
  52808. if (placeholderPattern != null && !(placeholderPattern instanceof RegExp) && placeholderPattern !== false) {
  52809. throw new Error("'.placeholderPattern' must be a RegExp, false, null, or undefined");
  52810. }
  52811. if (preserveComments != null && typeof preserveComments !== "boolean") {
  52812. throw new Error("'.preserveComments' must be a boolean, null, or undefined");
  52813. }
  52814. if (syntacticPlaceholders != null && typeof syntacticPlaceholders !== "boolean") {
  52815. throw new Error("'.syntacticPlaceholders' must be a boolean, null, or undefined");
  52816. }
  52817. if (syntacticPlaceholders === true && (placeholderWhitelist != null || placeholderPattern != null)) {
  52818. throw new Error("'.placeholderWhitelist' and '.placeholderPattern' aren't compatible with '.syntacticPlaceholders: true'");
  52819. }
  52820. return {
  52821. parser,
  52822. placeholderWhitelist: placeholderWhitelist || void 0,
  52823. placeholderPattern: placeholderPattern == null ? void 0 : placeholderPattern,
  52824. preserveComments: preserveComments == null ? void 0 : preserveComments,
  52825. syntacticPlaceholders: syntacticPlaceholders == null ? void 0 : syntacticPlaceholders
  52826. };
  52827. }
  52828. function normalizeReplacements(replacements) {
  52829. if (Array.isArray(replacements)) {
  52830. return replacements.reduce((acc, replacement, i) => {
  52831. acc["$" + i] = replacement;
  52832. return acc;
  52833. }, {});
  52834. } else if (typeof replacements === "object" || replacements == null) {
  52835. return replacements || void 0;
  52836. }
  52837. throw new Error("Template replacements must be an array, object, null, or undefined");
  52838. }
  52839. }
  52840. });
  52841. // node_modules/estree-to-babel/node_modules/@babel/template/lib/parse.js
  52842. var require_parse = __commonJS({
  52843. "node_modules/estree-to-babel/node_modules/@babel/template/lib/parse.js"(exports) {
  52844. "use strict";
  52845. Object.defineProperty(exports, "__esModule", {
  52846. value: true
  52847. });
  52848. exports.default = parseAndBuildMetadata;
  52849. var t2 = _interopRequireWildcard(require_lib4());
  52850. var _parser = require_lib10();
  52851. var _codeFrame = require_lib9();
  52852. function _getRequireWildcardCache() {
  52853. if (typeof WeakMap !== "function")
  52854. return null;
  52855. var cache = /* @__PURE__ */ new WeakMap();
  52856. _getRequireWildcardCache = function() {
  52857. return cache;
  52858. };
  52859. return cache;
  52860. }
  52861. function _interopRequireWildcard(obj) {
  52862. if (obj && obj.__esModule) {
  52863. return obj;
  52864. }
  52865. if (obj === null || typeof obj !== "object" && typeof obj !== "function") {
  52866. return { default: obj };
  52867. }
  52868. var cache = _getRequireWildcardCache();
  52869. if (cache && cache.has(obj)) {
  52870. return cache.get(obj);
  52871. }
  52872. var newObj = {};
  52873. var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;
  52874. for (var key in obj) {
  52875. if (Object.prototype.hasOwnProperty.call(obj, key)) {
  52876. var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null;
  52877. if (desc && (desc.get || desc.set)) {
  52878. Object.defineProperty(newObj, key, desc);
  52879. } else {
  52880. newObj[key] = obj[key];
  52881. }
  52882. }
  52883. }
  52884. newObj.default = obj;
  52885. if (cache) {
  52886. cache.set(obj, newObj);
  52887. }
  52888. return newObj;
  52889. }
  52890. var PATTERN = /^[_$A-Z0-9]+$/;
  52891. function parseAndBuildMetadata(formatter, code2, opts) {
  52892. const {
  52893. placeholderWhitelist,
  52894. placeholderPattern,
  52895. preserveComments,
  52896. syntacticPlaceholders
  52897. } = opts;
  52898. const ast = parseWithCodeFrame(code2, opts.parser, syntacticPlaceholders);
  52899. t2.removePropertiesDeep(ast, {
  52900. preserveComments
  52901. });
  52902. formatter.validate(ast);
  52903. const syntactic = {
  52904. placeholders: [],
  52905. placeholderNames: /* @__PURE__ */ new Set()
  52906. };
  52907. const legacy = {
  52908. placeholders: [],
  52909. placeholderNames: /* @__PURE__ */ new Set()
  52910. };
  52911. const isLegacyRef = {
  52912. value: void 0
  52913. };
  52914. t2.traverse(ast, placeholderVisitorHandler, {
  52915. syntactic,
  52916. legacy,
  52917. isLegacyRef,
  52918. placeholderWhitelist,
  52919. placeholderPattern,
  52920. syntacticPlaceholders
  52921. });
  52922. return Object.assign({
  52923. ast
  52924. }, isLegacyRef.value ? legacy : syntactic);
  52925. }
  52926. function placeholderVisitorHandler(node, ancestors, state) {
  52927. var _state$placeholderWhi;
  52928. let name2;
  52929. if (t2.isPlaceholder(node)) {
  52930. if (state.syntacticPlaceholders === false) {
  52931. throw new Error("%%foo%%-style placeholders can't be used when '.syntacticPlaceholders' is false.");
  52932. } else {
  52933. name2 = node.name.name;
  52934. state.isLegacyRef.value = false;
  52935. }
  52936. } else if (state.isLegacyRef.value === false || state.syntacticPlaceholders) {
  52937. return;
  52938. } else if (t2.isIdentifier(node) || t2.isJSXIdentifier(node)) {
  52939. name2 = node.name;
  52940. state.isLegacyRef.value = true;
  52941. } else if (t2.isStringLiteral(node)) {
  52942. name2 = node.value;
  52943. state.isLegacyRef.value = true;
  52944. } else {
  52945. return;
  52946. }
  52947. if (!state.isLegacyRef.value && (state.placeholderPattern != null || state.placeholderWhitelist != null)) {
  52948. throw new Error("'.placeholderWhitelist' and '.placeholderPattern' aren't compatible with '.syntacticPlaceholders: true'");
  52949. }
  52950. if (state.isLegacyRef.value && (state.placeholderPattern === false || !(state.placeholderPattern || PATTERN).test(name2)) && !((_state$placeholderWhi = state.placeholderWhitelist) == null ? void 0 : _state$placeholderWhi.has(name2))) {
  52951. return;
  52952. }
  52953. ancestors = ancestors.slice();
  52954. const {
  52955. node: parent,
  52956. key
  52957. } = ancestors[ancestors.length - 1];
  52958. let type;
  52959. if (t2.isStringLiteral(node) || t2.isPlaceholder(node, {
  52960. expectedNode: "StringLiteral"
  52961. })) {
  52962. type = "string";
  52963. } else if (t2.isNewExpression(parent) && key === "arguments" || t2.isCallExpression(parent) && key === "arguments" || t2.isFunction(parent) && key === "params") {
  52964. type = "param";
  52965. } else if (t2.isExpressionStatement(parent) && !t2.isPlaceholder(node)) {
  52966. type = "statement";
  52967. ancestors = ancestors.slice(0, -1);
  52968. } else if (t2.isStatement(node) && t2.isPlaceholder(node)) {
  52969. type = "statement";
  52970. } else {
  52971. type = "other";
  52972. }
  52973. const {
  52974. placeholders,
  52975. placeholderNames
  52976. } = state.isLegacyRef.value ? state.legacy : state.syntactic;
  52977. placeholders.push({
  52978. name: name2,
  52979. type,
  52980. resolve: (ast) => resolveAncestors(ast, ancestors),
  52981. isDuplicate: placeholderNames.has(name2)
  52982. });
  52983. placeholderNames.add(name2);
  52984. }
  52985. function resolveAncestors(ast, ancestors) {
  52986. let parent = ast;
  52987. for (let i = 0; i < ancestors.length - 1; i++) {
  52988. const {
  52989. key: key2,
  52990. index: index3
  52991. } = ancestors[i];
  52992. if (index3 === void 0) {
  52993. parent = parent[key2];
  52994. } else {
  52995. parent = parent[key2][index3];
  52996. }
  52997. }
  52998. const {
  52999. key,
  53000. index: index2
  53001. } = ancestors[ancestors.length - 1];
  53002. return {
  53003. parent,
  53004. key,
  53005. index: index2
  53006. };
  53007. }
  53008. function parseWithCodeFrame(code2, parserOpts, syntacticPlaceholders) {
  53009. const plugins = (parserOpts.plugins || []).slice();
  53010. if (syntacticPlaceholders !== false) {
  53011. plugins.push("placeholders");
  53012. }
  53013. parserOpts = Object.assign({
  53014. allowReturnOutsideFunction: true,
  53015. allowSuperOutsideMethod: true,
  53016. sourceType: "module"
  53017. }, parserOpts, {
  53018. plugins
  53019. });
  53020. try {
  53021. return (0, _parser.parse)(code2, parserOpts);
  53022. } catch (err) {
  53023. const loc = err.loc;
  53024. if (loc) {
  53025. err.message += "\n" + (0, _codeFrame.codeFrameColumns)(code2, {
  53026. start: loc
  53027. });
  53028. err.code = "BABEL_TEMPLATE_PARSE_ERROR";
  53029. }
  53030. throw err;
  53031. }
  53032. }
  53033. }
  53034. });
  53035. // node_modules/estree-to-babel/node_modules/@babel/template/lib/populate.js
  53036. var require_populate = __commonJS({
  53037. "node_modules/estree-to-babel/node_modules/@babel/template/lib/populate.js"(exports) {
  53038. "use strict";
  53039. Object.defineProperty(exports, "__esModule", {
  53040. value: true
  53041. });
  53042. exports.default = populatePlaceholders;
  53043. var t2 = _interopRequireWildcard(require_lib4());
  53044. function _getRequireWildcardCache() {
  53045. if (typeof WeakMap !== "function")
  53046. return null;
  53047. var cache = /* @__PURE__ */ new WeakMap();
  53048. _getRequireWildcardCache = function() {
  53049. return cache;
  53050. };
  53051. return cache;
  53052. }
  53053. function _interopRequireWildcard(obj) {
  53054. if (obj && obj.__esModule) {
  53055. return obj;
  53056. }
  53057. if (obj === null || typeof obj !== "object" && typeof obj !== "function") {
  53058. return { default: obj };
  53059. }
  53060. var cache = _getRequireWildcardCache();
  53061. if (cache && cache.has(obj)) {
  53062. return cache.get(obj);
  53063. }
  53064. var newObj = {};
  53065. var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;
  53066. for (var key in obj) {
  53067. if (Object.prototype.hasOwnProperty.call(obj, key)) {
  53068. var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null;
  53069. if (desc && (desc.get || desc.set)) {
  53070. Object.defineProperty(newObj, key, desc);
  53071. } else {
  53072. newObj[key] = obj[key];
  53073. }
  53074. }
  53075. }
  53076. newObj.default = obj;
  53077. if (cache) {
  53078. cache.set(obj, newObj);
  53079. }
  53080. return newObj;
  53081. }
  53082. function populatePlaceholders(metadata, replacements) {
  53083. const ast = t2.cloneNode(metadata.ast);
  53084. if (replacements) {
  53085. metadata.placeholders.forEach((placeholder) => {
  53086. if (!Object.prototype.hasOwnProperty.call(replacements, placeholder.name)) {
  53087. const placeholderName = placeholder.name;
  53088. throw new Error(`Error: No substitution given for "${placeholderName}". If this is not meant to be a
  53089. placeholder you may want to consider passing one of the following options to @babel/template:
  53090. - { placeholderPattern: false, placeholderWhitelist: new Set(['${placeholderName}'])}
  53091. - { placeholderPattern: /^${placeholderName}$/ }`);
  53092. }
  53093. });
  53094. Object.keys(replacements).forEach((key) => {
  53095. if (!metadata.placeholderNames.has(key)) {
  53096. throw new Error(`Unknown substitution "${key}" given`);
  53097. }
  53098. });
  53099. }
  53100. metadata.placeholders.slice().reverse().forEach((placeholder) => {
  53101. try {
  53102. applyReplacement(placeholder, ast, replacements && replacements[placeholder.name] || null);
  53103. } catch (e) {
  53104. e.message = `@babel/template placeholder "${placeholder.name}": ${e.message}`;
  53105. throw e;
  53106. }
  53107. });
  53108. return ast;
  53109. }
  53110. function applyReplacement(placeholder, ast, replacement) {
  53111. if (placeholder.isDuplicate) {
  53112. if (Array.isArray(replacement)) {
  53113. replacement = replacement.map((node) => t2.cloneNode(node));
  53114. } else if (typeof replacement === "object") {
  53115. replacement = t2.cloneNode(replacement);
  53116. }
  53117. }
  53118. const {
  53119. parent,
  53120. key,
  53121. index: index2
  53122. } = placeholder.resolve(ast);
  53123. if (placeholder.type === "string") {
  53124. if (typeof replacement === "string") {
  53125. replacement = t2.stringLiteral(replacement);
  53126. }
  53127. if (!replacement || !t2.isStringLiteral(replacement)) {
  53128. throw new Error("Expected string substitution");
  53129. }
  53130. } else if (placeholder.type === "statement") {
  53131. if (index2 === void 0) {
  53132. if (!replacement) {
  53133. replacement = t2.emptyStatement();
  53134. } else if (Array.isArray(replacement)) {
  53135. replacement = t2.blockStatement(replacement);
  53136. } else if (typeof replacement === "string") {
  53137. replacement = t2.expressionStatement(t2.identifier(replacement));
  53138. } else if (!t2.isStatement(replacement)) {
  53139. replacement = t2.expressionStatement(replacement);
  53140. }
  53141. } else {
  53142. if (replacement && !Array.isArray(replacement)) {
  53143. if (typeof replacement === "string") {
  53144. replacement = t2.identifier(replacement);
  53145. }
  53146. if (!t2.isStatement(replacement)) {
  53147. replacement = t2.expressionStatement(replacement);
  53148. }
  53149. }
  53150. }
  53151. } else if (placeholder.type === "param") {
  53152. if (typeof replacement === "string") {
  53153. replacement = t2.identifier(replacement);
  53154. }
  53155. if (index2 === void 0)
  53156. throw new Error("Assertion failure.");
  53157. } else {
  53158. if (typeof replacement === "string") {
  53159. replacement = t2.identifier(replacement);
  53160. }
  53161. if (Array.isArray(replacement)) {
  53162. throw new Error("Cannot replace single expression with an array.");
  53163. }
  53164. }
  53165. if (index2 === void 0) {
  53166. t2.validate(parent, key, replacement);
  53167. parent[key] = replacement;
  53168. } else {
  53169. const items = parent[key].slice();
  53170. if (placeholder.type === "statement" || placeholder.type === "param") {
  53171. if (replacement == null) {
  53172. items.splice(index2, 1);
  53173. } else if (Array.isArray(replacement)) {
  53174. items.splice(index2, 1, ...replacement);
  53175. } else {
  53176. items[index2] = replacement;
  53177. }
  53178. } else {
  53179. items[index2] = replacement;
  53180. }
  53181. t2.validate(parent, key, items);
  53182. parent[key] = items;
  53183. }
  53184. }
  53185. }
  53186. });
  53187. // node_modules/estree-to-babel/node_modules/@babel/template/lib/string.js
  53188. var require_string = __commonJS({
  53189. "node_modules/estree-to-babel/node_modules/@babel/template/lib/string.js"(exports) {
  53190. "use strict";
  53191. Object.defineProperty(exports, "__esModule", {
  53192. value: true
  53193. });
  53194. exports.default = stringTemplate;
  53195. var _options = require_options();
  53196. var _parse = _interopRequireDefault(require_parse());
  53197. var _populate = _interopRequireDefault(require_populate());
  53198. function _interopRequireDefault(obj) {
  53199. return obj && obj.__esModule ? obj : { default: obj };
  53200. }
  53201. function stringTemplate(formatter, code2, opts) {
  53202. code2 = formatter.code(code2);
  53203. let metadata;
  53204. return (arg) => {
  53205. const replacements = (0, _options.normalizeReplacements)(arg);
  53206. if (!metadata)
  53207. metadata = (0, _parse.default)(formatter, code2, opts);
  53208. return formatter.unwrap((0, _populate.default)(metadata, replacements));
  53209. };
  53210. }
  53211. }
  53212. });
  53213. // node_modules/estree-to-babel/node_modules/@babel/template/lib/literal.js
  53214. var require_literal = __commonJS({
  53215. "node_modules/estree-to-babel/node_modules/@babel/template/lib/literal.js"(exports) {
  53216. "use strict";
  53217. Object.defineProperty(exports, "__esModule", {
  53218. value: true
  53219. });
  53220. exports.default = literalTemplate;
  53221. var _options = require_options();
  53222. var _parse = _interopRequireDefault(require_parse());
  53223. var _populate = _interopRequireDefault(require_populate());
  53224. function _interopRequireDefault(obj) {
  53225. return obj && obj.__esModule ? obj : { default: obj };
  53226. }
  53227. function literalTemplate(formatter, tpl, opts) {
  53228. const {
  53229. metadata,
  53230. names
  53231. } = buildLiteralData(formatter, tpl, opts);
  53232. return (arg) => {
  53233. const defaultReplacements = {};
  53234. arg.forEach((replacement, i) => {
  53235. defaultReplacements[names[i]] = replacement;
  53236. });
  53237. return (arg2) => {
  53238. const replacements = (0, _options.normalizeReplacements)(arg2);
  53239. if (replacements) {
  53240. Object.keys(replacements).forEach((key) => {
  53241. if (Object.prototype.hasOwnProperty.call(defaultReplacements, key)) {
  53242. throw new Error("Unexpected replacement overlap.");
  53243. }
  53244. });
  53245. }
  53246. return formatter.unwrap((0, _populate.default)(metadata, replacements ? Object.assign(replacements, defaultReplacements) : defaultReplacements));
  53247. };
  53248. };
  53249. }
  53250. function buildLiteralData(formatter, tpl, opts) {
  53251. let names;
  53252. let nameSet;
  53253. let metadata;
  53254. let prefix = "";
  53255. do {
  53256. prefix += "$";
  53257. const result = buildTemplateCode(tpl, prefix);
  53258. names = result.names;
  53259. nameSet = new Set(names);
  53260. metadata = (0, _parse.default)(formatter, formatter.code(result.code), {
  53261. parser: opts.parser,
  53262. placeholderWhitelist: new Set(result.names.concat(opts.placeholderWhitelist ? Array.from(opts.placeholderWhitelist) : [])),
  53263. placeholderPattern: opts.placeholderPattern,
  53264. preserveComments: opts.preserveComments,
  53265. syntacticPlaceholders: opts.syntacticPlaceholders
  53266. });
  53267. } while (metadata.placeholders.some((placeholder) => placeholder.isDuplicate && nameSet.has(placeholder.name)));
  53268. return {
  53269. metadata,
  53270. names
  53271. };
  53272. }
  53273. function buildTemplateCode(tpl, prefix) {
  53274. const names = [];
  53275. let code2 = tpl[0];
  53276. for (let i = 1; i < tpl.length; i++) {
  53277. const value = `${prefix}${i - 1}`;
  53278. names.push(value);
  53279. code2 += value + tpl[i];
  53280. }
  53281. return {
  53282. names,
  53283. code: code2
  53284. };
  53285. }
  53286. }
  53287. });
  53288. // node_modules/estree-to-babel/node_modules/@babel/template/lib/builder.js
  53289. var require_builder3 = __commonJS({
  53290. "node_modules/estree-to-babel/node_modules/@babel/template/lib/builder.js"(exports) {
  53291. "use strict";
  53292. Object.defineProperty(exports, "__esModule", {
  53293. value: true
  53294. });
  53295. exports.default = createTemplateBuilder;
  53296. var _options = require_options();
  53297. var _string = _interopRequireDefault(require_string());
  53298. var _literal = _interopRequireDefault(require_literal());
  53299. function _interopRequireDefault(obj) {
  53300. return obj && obj.__esModule ? obj : { default: obj };
  53301. }
  53302. var NO_PLACEHOLDER = (0, _options.validate)({
  53303. placeholderPattern: false
  53304. });
  53305. function createTemplateBuilder(formatter, defaultOpts) {
  53306. const templateFnCache = /* @__PURE__ */ new WeakMap();
  53307. const templateAstCache = /* @__PURE__ */ new WeakMap();
  53308. const cachedOpts = defaultOpts || (0, _options.validate)(null);
  53309. return Object.assign((tpl, ...args) => {
  53310. if (typeof tpl === "string") {
  53311. if (args.length > 1)
  53312. throw new Error("Unexpected extra params.");
  53313. return extendedTrace((0, _string.default)(formatter, tpl, (0, _options.merge)(cachedOpts, (0, _options.validate)(args[0]))));
  53314. } else if (Array.isArray(tpl)) {
  53315. let builder = templateFnCache.get(tpl);
  53316. if (!builder) {
  53317. builder = (0, _literal.default)(formatter, tpl, cachedOpts);
  53318. templateFnCache.set(tpl, builder);
  53319. }
  53320. return extendedTrace(builder(args));
  53321. } else if (typeof tpl === "object" && tpl) {
  53322. if (args.length > 0)
  53323. throw new Error("Unexpected extra params.");
  53324. return createTemplateBuilder(formatter, (0, _options.merge)(cachedOpts, (0, _options.validate)(tpl)));
  53325. }
  53326. throw new Error(`Unexpected template param ${typeof tpl}`);
  53327. }, {
  53328. ast: (tpl, ...args) => {
  53329. if (typeof tpl === "string") {
  53330. if (args.length > 1)
  53331. throw new Error("Unexpected extra params.");
  53332. return (0, _string.default)(formatter, tpl, (0, _options.merge)((0, _options.merge)(cachedOpts, (0, _options.validate)(args[0])), NO_PLACEHOLDER))();
  53333. } else if (Array.isArray(tpl)) {
  53334. let builder = templateAstCache.get(tpl);
  53335. if (!builder) {
  53336. builder = (0, _literal.default)(formatter, tpl, (0, _options.merge)(cachedOpts, NO_PLACEHOLDER));
  53337. templateAstCache.set(tpl, builder);
  53338. }
  53339. return builder(args)();
  53340. }
  53341. throw new Error(`Unexpected template param ${typeof tpl}`);
  53342. }
  53343. });
  53344. }
  53345. function extendedTrace(fn) {
  53346. let rootStack = "";
  53347. try {
  53348. throw new Error();
  53349. } catch (error) {
  53350. if (error.stack) {
  53351. rootStack = error.stack.split("\n").slice(3).join("\n");
  53352. }
  53353. }
  53354. return (arg) => {
  53355. try {
  53356. return fn(arg);
  53357. } catch (err) {
  53358. err.stack += `
  53359. =============
  53360. ${rootStack}`;
  53361. throw err;
  53362. }
  53363. };
  53364. }
  53365. }
  53366. });
  53367. // node_modules/estree-to-babel/node_modules/@babel/template/lib/index.js
  53368. var require_lib12 = __commonJS({
  53369. "node_modules/estree-to-babel/node_modules/@babel/template/lib/index.js"(exports) {
  53370. "use strict";
  53371. Object.defineProperty(exports, "__esModule", {
  53372. value: true
  53373. });
  53374. exports.default = exports.program = exports.expression = exports.statements = exports.statement = exports.smart = void 0;
  53375. var formatters = _interopRequireWildcard(require_formatters());
  53376. var _builder = _interopRequireDefault(require_builder3());
  53377. function _interopRequireDefault(obj) {
  53378. return obj && obj.__esModule ? obj : { default: obj };
  53379. }
  53380. function _getRequireWildcardCache() {
  53381. if (typeof WeakMap !== "function")
  53382. return null;
  53383. var cache = /* @__PURE__ */ new WeakMap();
  53384. _getRequireWildcardCache = function() {
  53385. return cache;
  53386. };
  53387. return cache;
  53388. }
  53389. function _interopRequireWildcard(obj) {
  53390. if (obj && obj.__esModule) {
  53391. return obj;
  53392. }
  53393. if (obj === null || typeof obj !== "object" && typeof obj !== "function") {
  53394. return { default: obj };
  53395. }
  53396. var cache = _getRequireWildcardCache();
  53397. if (cache && cache.has(obj)) {
  53398. return cache.get(obj);
  53399. }
  53400. var newObj = {};
  53401. var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;
  53402. for (var key in obj) {
  53403. if (Object.prototype.hasOwnProperty.call(obj, key)) {
  53404. var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null;
  53405. if (desc && (desc.get || desc.set)) {
  53406. Object.defineProperty(newObj, key, desc);
  53407. } else {
  53408. newObj[key] = obj[key];
  53409. }
  53410. }
  53411. }
  53412. newObj.default = obj;
  53413. if (cache) {
  53414. cache.set(obj, newObj);
  53415. }
  53416. return newObj;
  53417. }
  53418. var smart = (0, _builder.default)(formatters.smart);
  53419. exports.smart = smart;
  53420. var statement = (0, _builder.default)(formatters.statement);
  53421. exports.statement = statement;
  53422. var statements = (0, _builder.default)(formatters.statements);
  53423. exports.statements = statements;
  53424. var expression = (0, _builder.default)(formatters.expression);
  53425. exports.expression = expression;
  53426. var program = (0, _builder.default)(formatters.program);
  53427. exports.program = program;
  53428. var _default = Object.assign(smart.bind(void 0), {
  53429. smart,
  53430. statement,
  53431. statements,
  53432. expression,
  53433. program,
  53434. ast: smart.ast
  53435. });
  53436. exports.default = _default;
  53437. }
  53438. });
  53439. // node_modules/estree-to-babel/node_modules/@babel/helper-function-name/lib/index.js
  53440. var require_lib13 = __commonJS({
  53441. "node_modules/estree-to-babel/node_modules/@babel/helper-function-name/lib/index.js"(exports) {
  53442. "use strict";
  53443. Object.defineProperty(exports, "__esModule", {
  53444. value: true
  53445. });
  53446. exports.default = _default;
  53447. var _helperGetFunctionArity = require_lib11();
  53448. var _template = require_lib12();
  53449. var t2 = require_lib4();
  53450. var buildPropertyMethodAssignmentWrapper = (0, _template.default)(`
  53451. (function (FUNCTION_KEY) {
  53452. function FUNCTION_ID() {
  53453. return FUNCTION_KEY.apply(this, arguments);
  53454. }
  53455. FUNCTION_ID.toString = function () {
  53456. return FUNCTION_KEY.toString();
  53457. }
  53458. return FUNCTION_ID;
  53459. })(FUNCTION)
  53460. `);
  53461. var buildGeneratorPropertyMethodAssignmentWrapper = (0, _template.default)(`
  53462. (function (FUNCTION_KEY) {
  53463. function* FUNCTION_ID() {
  53464. return yield* FUNCTION_KEY.apply(this, arguments);
  53465. }
  53466. FUNCTION_ID.toString = function () {
  53467. return FUNCTION_KEY.toString();
  53468. };
  53469. return FUNCTION_ID;
  53470. })(FUNCTION)
  53471. `);
  53472. var visitor = {
  53473. "ReferencedIdentifier|BindingIdentifier"(path, state) {
  53474. if (path.node.name !== state.name)
  53475. return;
  53476. const localDeclar = path.scope.getBindingIdentifier(state.name);
  53477. if (localDeclar !== state.outerDeclar)
  53478. return;
  53479. state.selfReference = true;
  53480. path.stop();
  53481. }
  53482. };
  53483. function getNameFromLiteralId(id) {
  53484. if (t2.isNullLiteral(id)) {
  53485. return "null";
  53486. }
  53487. if (t2.isRegExpLiteral(id)) {
  53488. return `_${id.pattern}_${id.flags}`;
  53489. }
  53490. if (t2.isTemplateLiteral(id)) {
  53491. return id.quasis.map((quasi) => quasi.value.raw).join("");
  53492. }
  53493. if (id.value !== void 0) {
  53494. return id.value + "";
  53495. }
  53496. return "";
  53497. }
  53498. function wrap3(state, method, id, scope) {
  53499. if (state.selfReference) {
  53500. if (scope.hasBinding(id.name) && !scope.hasGlobal(id.name)) {
  53501. scope.rename(id.name);
  53502. } else {
  53503. if (!t2.isFunction(method))
  53504. return;
  53505. let build = buildPropertyMethodAssignmentWrapper;
  53506. if (method.generator) {
  53507. build = buildGeneratorPropertyMethodAssignmentWrapper;
  53508. }
  53509. const template = build({
  53510. FUNCTION: method,
  53511. FUNCTION_ID: id,
  53512. FUNCTION_KEY: scope.generateUidIdentifier(id.name)
  53513. }).expression;
  53514. const params = template.callee.body.body[0].params;
  53515. for (let i = 0, len = (0, _helperGetFunctionArity.default)(method); i < len; i++) {
  53516. params.push(scope.generateUidIdentifier("x"));
  53517. }
  53518. return template;
  53519. }
  53520. }
  53521. method.id = id;
  53522. scope.getProgramParent().references[id.name] = true;
  53523. }
  53524. function visit4(node, name2, scope) {
  53525. const state = {
  53526. selfAssignment: false,
  53527. selfReference: false,
  53528. outerDeclar: scope.getBindingIdentifier(name2),
  53529. references: [],
  53530. name: name2
  53531. };
  53532. const binding = scope.getOwnBinding(name2);
  53533. if (binding) {
  53534. if (binding.kind === "param") {
  53535. state.selfReference = true;
  53536. } else {
  53537. }
  53538. } else if (state.outerDeclar || scope.hasGlobal(name2)) {
  53539. scope.traverse(node, visitor, state);
  53540. }
  53541. return state;
  53542. }
  53543. function _default({
  53544. node,
  53545. parent,
  53546. scope,
  53547. id
  53548. }, localBinding = false) {
  53549. if (node.id)
  53550. return;
  53551. if ((t2.isObjectProperty(parent) || t2.isObjectMethod(parent, {
  53552. kind: "method"
  53553. })) && (!parent.computed || t2.isLiteral(parent.key))) {
  53554. id = parent.key;
  53555. } else if (t2.isVariableDeclarator(parent)) {
  53556. id = parent.id;
  53557. if (t2.isIdentifier(id) && !localBinding) {
  53558. const binding = scope.parent.getBinding(id.name);
  53559. if (binding && binding.constant && scope.getBinding(id.name) === binding) {
  53560. node.id = t2.cloneNode(id);
  53561. node.id[t2.NOT_LOCAL_BINDING] = true;
  53562. return;
  53563. }
  53564. }
  53565. } else if (t2.isAssignmentExpression(parent, {
  53566. operator: "="
  53567. })) {
  53568. id = parent.left;
  53569. } else if (!id) {
  53570. return;
  53571. }
  53572. let name2;
  53573. if (id && t2.isLiteral(id)) {
  53574. name2 = getNameFromLiteralId(id);
  53575. } else if (id && t2.isIdentifier(id)) {
  53576. name2 = id.name;
  53577. }
  53578. if (name2 === void 0) {
  53579. return;
  53580. }
  53581. name2 = t2.toBindingIdentifierName(name2);
  53582. id = t2.identifier(name2);
  53583. id[t2.NOT_LOCAL_BINDING] = true;
  53584. const state = visit4(node, name2, scope);
  53585. return wrap3(state, node, id, scope) || node;
  53586. }
  53587. }
  53588. });
  53589. // node_modules/estree-to-babel/node_modules/@babel/traverse/lib/path/conversion.js
  53590. var require_conversion = __commonJS({
  53591. "node_modules/estree-to-babel/node_modules/@babel/traverse/lib/path/conversion.js"(exports) {
  53592. "use strict";
  53593. Object.defineProperty(exports, "__esModule", {
  53594. value: true
  53595. });
  53596. exports.toComputedKey = toComputedKey;
  53597. exports.ensureBlock = ensureBlock;
  53598. exports.arrowFunctionToShadowed = arrowFunctionToShadowed;
  53599. exports.unwrapFunctionEnvironment = unwrapFunctionEnvironment;
  53600. exports.arrowFunctionToExpression = arrowFunctionToExpression;
  53601. var t2 = require_lib4();
  53602. var _helperFunctionName = require_lib13();
  53603. function toComputedKey() {
  53604. let key;
  53605. if (this.isMemberExpression()) {
  53606. key = this.node.property;
  53607. } else if (this.isProperty() || this.isMethod()) {
  53608. key = this.node.key;
  53609. } else {
  53610. throw new ReferenceError("todo");
  53611. }
  53612. if (!this.node.computed) {
  53613. if (t2.isIdentifier(key))
  53614. key = t2.stringLiteral(key.name);
  53615. }
  53616. return key;
  53617. }
  53618. function ensureBlock() {
  53619. const body = this.get("body");
  53620. const bodyNode = body.node;
  53621. if (Array.isArray(body)) {
  53622. throw new Error("Can't convert array path to a block statement");
  53623. }
  53624. if (!bodyNode) {
  53625. throw new Error("Can't convert node without a body");
  53626. }
  53627. if (body.isBlockStatement()) {
  53628. return bodyNode;
  53629. }
  53630. const statements = [];
  53631. let stringPath = "body";
  53632. let key;
  53633. let listKey;
  53634. if (body.isStatement()) {
  53635. listKey = "body";
  53636. key = 0;
  53637. statements.push(body.node);
  53638. } else {
  53639. stringPath += ".body.0";
  53640. if (this.isFunction()) {
  53641. key = "argument";
  53642. statements.push(t2.returnStatement(body.node));
  53643. } else {
  53644. key = "expression";
  53645. statements.push(t2.expressionStatement(body.node));
  53646. }
  53647. }
  53648. this.node.body = t2.blockStatement(statements);
  53649. const parentPath = this.get(stringPath);
  53650. body.setup(parentPath, listKey ? parentPath.node[listKey] : parentPath.node, listKey, key);
  53651. return this.node;
  53652. }
  53653. function arrowFunctionToShadowed() {
  53654. if (!this.isArrowFunctionExpression())
  53655. return;
  53656. this.arrowFunctionToExpression();
  53657. }
  53658. function unwrapFunctionEnvironment() {
  53659. if (!this.isArrowFunctionExpression() && !this.isFunctionExpression() && !this.isFunctionDeclaration()) {
  53660. throw this.buildCodeFrameError("Can only unwrap the environment of a function.");
  53661. }
  53662. hoistFunctionEnvironment(this);
  53663. }
  53664. function arrowFunctionToExpression({
  53665. allowInsertArrow = true,
  53666. specCompliant = false,
  53667. noNewArrows = !specCompliant
  53668. } = {}) {
  53669. if (!this.isArrowFunctionExpression()) {
  53670. throw this.buildCodeFrameError("Cannot convert non-arrow function to a function expression.");
  53671. }
  53672. const thisBinding = hoistFunctionEnvironment(this, noNewArrows, allowInsertArrow);
  53673. this.ensureBlock();
  53674. this.node.type = "FunctionExpression";
  53675. if (!noNewArrows) {
  53676. const checkBinding = thisBinding ? null : this.parentPath.scope.generateUidIdentifier("arrowCheckId");
  53677. if (checkBinding) {
  53678. this.parentPath.scope.push({
  53679. id: checkBinding,
  53680. init: t2.objectExpression([])
  53681. });
  53682. }
  53683. this.get("body").unshiftContainer("body", t2.expressionStatement(t2.callExpression(this.hub.addHelper("newArrowCheck"), [t2.thisExpression(), checkBinding ? t2.identifier(checkBinding.name) : t2.identifier(thisBinding)])));
  53684. this.replaceWith(t2.callExpression(t2.memberExpression((0, _helperFunctionName.default)(this, true) || this.node, t2.identifier("bind")), [checkBinding ? t2.identifier(checkBinding.name) : t2.thisExpression()]));
  53685. }
  53686. }
  53687. function hoistFunctionEnvironment(fnPath, noNewArrows = true, allowInsertArrow = true) {
  53688. const thisEnvFn = fnPath.findParent((p) => {
  53689. return p.isFunction() && !p.isArrowFunctionExpression() || p.isProgram() || p.isClassProperty({
  53690. static: false
  53691. });
  53692. });
  53693. const inConstructor = (thisEnvFn == null ? void 0 : thisEnvFn.node.kind) === "constructor";
  53694. if (thisEnvFn.isClassProperty()) {
  53695. throw fnPath.buildCodeFrameError("Unable to transform arrow inside class property");
  53696. }
  53697. const {
  53698. thisPaths,
  53699. argumentsPaths,
  53700. newTargetPaths,
  53701. superProps,
  53702. superCalls
  53703. } = getScopeInformation(fnPath);
  53704. if (inConstructor && superCalls.length > 0) {
  53705. if (!allowInsertArrow) {
  53706. throw superCalls[0].buildCodeFrameError("Unable to handle nested super() usage in arrow");
  53707. }
  53708. const allSuperCalls = [];
  53709. thisEnvFn.traverse({
  53710. Function(child) {
  53711. if (child.isArrowFunctionExpression())
  53712. return;
  53713. child.skip();
  53714. },
  53715. ClassProperty(child) {
  53716. child.skip();
  53717. },
  53718. CallExpression(child) {
  53719. if (!child.get("callee").isSuper())
  53720. return;
  53721. allSuperCalls.push(child);
  53722. }
  53723. });
  53724. const superBinding = getSuperBinding(thisEnvFn);
  53725. allSuperCalls.forEach((superCall) => {
  53726. const callee = t2.identifier(superBinding);
  53727. callee.loc = superCall.node.callee.loc;
  53728. superCall.get("callee").replaceWith(callee);
  53729. });
  53730. }
  53731. if (argumentsPaths.length > 0) {
  53732. const argumentsBinding = getBinding(thisEnvFn, "arguments", () => t2.identifier("arguments"));
  53733. argumentsPaths.forEach((argumentsChild) => {
  53734. const argsRef = t2.identifier(argumentsBinding);
  53735. argsRef.loc = argumentsChild.node.loc;
  53736. argumentsChild.replaceWith(argsRef);
  53737. });
  53738. }
  53739. if (newTargetPaths.length > 0) {
  53740. const newTargetBinding = getBinding(thisEnvFn, "newtarget", () => t2.metaProperty(t2.identifier("new"), t2.identifier("target")));
  53741. newTargetPaths.forEach((targetChild) => {
  53742. const targetRef = t2.identifier(newTargetBinding);
  53743. targetRef.loc = targetChild.node.loc;
  53744. targetChild.replaceWith(targetRef);
  53745. });
  53746. }
  53747. if (superProps.length > 0) {
  53748. if (!allowInsertArrow) {
  53749. throw superProps[0].buildCodeFrameError("Unable to handle nested super.prop usage");
  53750. }
  53751. const flatSuperProps = superProps.reduce((acc, superProp) => acc.concat(standardizeSuperProperty(superProp)), []);
  53752. flatSuperProps.forEach((superProp) => {
  53753. const key = superProp.node.computed ? "" : superProp.get("property").node.name;
  53754. const isAssignment = superProp.parentPath.isAssignmentExpression({
  53755. left: superProp.node
  53756. });
  53757. const isCall = superProp.parentPath.isCallExpression({
  53758. callee: superProp.node
  53759. });
  53760. const superBinding = getSuperPropBinding(thisEnvFn, isAssignment, key);
  53761. const args = [];
  53762. if (superProp.node.computed) {
  53763. args.push(superProp.get("property").node);
  53764. }
  53765. if (isAssignment) {
  53766. const value = superProp.parentPath.node.right;
  53767. args.push(value);
  53768. }
  53769. const call = t2.callExpression(t2.identifier(superBinding), args);
  53770. if (isCall) {
  53771. superProp.parentPath.unshiftContainer("arguments", t2.thisExpression());
  53772. superProp.replaceWith(t2.memberExpression(call, t2.identifier("call")));
  53773. thisPaths.push(superProp.parentPath.get("arguments.0"));
  53774. } else if (isAssignment) {
  53775. superProp.parentPath.replaceWith(call);
  53776. } else {
  53777. superProp.replaceWith(call);
  53778. }
  53779. });
  53780. }
  53781. let thisBinding;
  53782. if (thisPaths.length > 0 || !noNewArrows) {
  53783. thisBinding = getThisBinding(thisEnvFn, inConstructor);
  53784. if (noNewArrows || inConstructor && hasSuperClass(thisEnvFn)) {
  53785. thisPaths.forEach((thisChild) => {
  53786. const thisRef = thisChild.isJSX() ? t2.jsxIdentifier(thisBinding) : t2.identifier(thisBinding);
  53787. thisRef.loc = thisChild.node.loc;
  53788. thisChild.replaceWith(thisRef);
  53789. });
  53790. if (!noNewArrows)
  53791. thisBinding = null;
  53792. }
  53793. }
  53794. return thisBinding;
  53795. }
  53796. function standardizeSuperProperty(superProp) {
  53797. if (superProp.parentPath.isAssignmentExpression() && superProp.parentPath.node.operator !== "=") {
  53798. const assignmentPath = superProp.parentPath;
  53799. const op = assignmentPath.node.operator.slice(0, -1);
  53800. const value = assignmentPath.node.right;
  53801. assignmentPath.node.operator = "=";
  53802. if (superProp.node.computed) {
  53803. const tmp = superProp.scope.generateDeclaredUidIdentifier("tmp");
  53804. assignmentPath.get("left").replaceWith(t2.memberExpression(superProp.node.object, t2.assignmentExpression("=", tmp, superProp.node.property), true));
  53805. assignmentPath.get("right").replaceWith(t2.binaryExpression(op, t2.memberExpression(superProp.node.object, t2.identifier(tmp.name), true), value));
  53806. } else {
  53807. assignmentPath.get("left").replaceWith(t2.memberExpression(superProp.node.object, superProp.node.property));
  53808. assignmentPath.get("right").replaceWith(t2.binaryExpression(op, t2.memberExpression(superProp.node.object, t2.identifier(superProp.node.property.name)), value));
  53809. }
  53810. return [assignmentPath.get("left"), assignmentPath.get("right").get("left")];
  53811. } else if (superProp.parentPath.isUpdateExpression()) {
  53812. const updateExpr = superProp.parentPath;
  53813. const tmp = superProp.scope.generateDeclaredUidIdentifier("tmp");
  53814. const computedKey = superProp.node.computed ? superProp.scope.generateDeclaredUidIdentifier("prop") : null;
  53815. const parts = [t2.assignmentExpression("=", tmp, t2.memberExpression(superProp.node.object, computedKey ? t2.assignmentExpression("=", computedKey, superProp.node.property) : superProp.node.property, superProp.node.computed)), t2.assignmentExpression("=", t2.memberExpression(superProp.node.object, computedKey ? t2.identifier(computedKey.name) : superProp.node.property, superProp.node.computed), t2.binaryExpression("+", t2.identifier(tmp.name), t2.numericLiteral(1)))];
  53816. if (!superProp.parentPath.node.prefix) {
  53817. parts.push(t2.identifier(tmp.name));
  53818. }
  53819. updateExpr.replaceWith(t2.sequenceExpression(parts));
  53820. const left = updateExpr.get("expressions.0.right");
  53821. const right = updateExpr.get("expressions.1.left");
  53822. return [left, right];
  53823. }
  53824. return [superProp];
  53825. }
  53826. function hasSuperClass(thisEnvFn) {
  53827. return thisEnvFn.isClassMethod() && !!thisEnvFn.parentPath.parentPath.node.superClass;
  53828. }
  53829. function getThisBinding(thisEnvFn, inConstructor) {
  53830. return getBinding(thisEnvFn, "this", (thisBinding) => {
  53831. if (!inConstructor || !hasSuperClass(thisEnvFn))
  53832. return t2.thisExpression();
  53833. const supers = /* @__PURE__ */ new WeakSet();
  53834. thisEnvFn.traverse({
  53835. Function(child) {
  53836. if (child.isArrowFunctionExpression())
  53837. return;
  53838. child.skip();
  53839. },
  53840. ClassProperty(child) {
  53841. child.skip();
  53842. },
  53843. CallExpression(child) {
  53844. if (!child.get("callee").isSuper())
  53845. return;
  53846. if (supers.has(child.node))
  53847. return;
  53848. supers.add(child.node);
  53849. child.replaceWithMultiple([child.node, t2.assignmentExpression("=", t2.identifier(thisBinding), t2.identifier("this"))]);
  53850. }
  53851. });
  53852. });
  53853. }
  53854. function getSuperBinding(thisEnvFn) {
  53855. return getBinding(thisEnvFn, "supercall", () => {
  53856. const argsBinding = thisEnvFn.scope.generateUidIdentifier("args");
  53857. return t2.arrowFunctionExpression([t2.restElement(argsBinding)], t2.callExpression(t2.super(), [t2.spreadElement(t2.identifier(argsBinding.name))]));
  53858. });
  53859. }
  53860. function getSuperPropBinding(thisEnvFn, isAssignment, propName) {
  53861. const op = isAssignment ? "set" : "get";
  53862. return getBinding(thisEnvFn, `superprop_${op}:${propName || ""}`, () => {
  53863. const argsList = [];
  53864. let fnBody;
  53865. if (propName) {
  53866. fnBody = t2.memberExpression(t2.super(), t2.identifier(propName));
  53867. } else {
  53868. const method = thisEnvFn.scope.generateUidIdentifier("prop");
  53869. argsList.unshift(method);
  53870. fnBody = t2.memberExpression(t2.super(), t2.identifier(method.name), true);
  53871. }
  53872. if (isAssignment) {
  53873. const valueIdent = thisEnvFn.scope.generateUidIdentifier("value");
  53874. argsList.push(valueIdent);
  53875. fnBody = t2.assignmentExpression("=", fnBody, t2.identifier(valueIdent.name));
  53876. }
  53877. return t2.arrowFunctionExpression(argsList, fnBody);
  53878. });
  53879. }
  53880. function getBinding(thisEnvFn, key, init) {
  53881. const cacheKey = "binding:" + key;
  53882. let data2 = thisEnvFn.getData(cacheKey);
  53883. if (!data2) {
  53884. const id = thisEnvFn.scope.generateUidIdentifier(key);
  53885. data2 = id.name;
  53886. thisEnvFn.setData(cacheKey, data2);
  53887. thisEnvFn.scope.push({
  53888. id,
  53889. init: init(data2)
  53890. });
  53891. }
  53892. return data2;
  53893. }
  53894. function getScopeInformation(fnPath) {
  53895. const thisPaths = [];
  53896. const argumentsPaths = [];
  53897. const newTargetPaths = [];
  53898. const superProps = [];
  53899. const superCalls = [];
  53900. fnPath.traverse({
  53901. ClassProperty(child) {
  53902. child.skip();
  53903. },
  53904. Function(child) {
  53905. if (child.isArrowFunctionExpression())
  53906. return;
  53907. child.skip();
  53908. },
  53909. ThisExpression(child) {
  53910. thisPaths.push(child);
  53911. },
  53912. JSXIdentifier(child) {
  53913. if (child.node.name !== "this")
  53914. return;
  53915. if (!child.parentPath.isJSXMemberExpression({
  53916. object: child.node
  53917. }) && !child.parentPath.isJSXOpeningElement({
  53918. name: child.node
  53919. })) {
  53920. return;
  53921. }
  53922. thisPaths.push(child);
  53923. },
  53924. CallExpression(child) {
  53925. if (child.get("callee").isSuper())
  53926. superCalls.push(child);
  53927. },
  53928. MemberExpression(child) {
  53929. if (child.get("object").isSuper())
  53930. superProps.push(child);
  53931. },
  53932. ReferencedIdentifier(child) {
  53933. if (child.node.name !== "arguments")
  53934. return;
  53935. argumentsPaths.push(child);
  53936. },
  53937. MetaProperty(child) {
  53938. if (!child.get("meta").isIdentifier({
  53939. name: "new"
  53940. }))
  53941. return;
  53942. if (!child.get("property").isIdentifier({
  53943. name: "target"
  53944. }))
  53945. return;
  53946. newTargetPaths.push(child);
  53947. }
  53948. });
  53949. return {
  53950. thisPaths,
  53951. argumentsPaths,
  53952. newTargetPaths,
  53953. superProps,
  53954. superCalls
  53955. };
  53956. }
  53957. }
  53958. });
  53959. // node_modules/estree-to-babel/node_modules/@babel/traverse/lib/path/introspection.js
  53960. var require_introspection = __commonJS({
  53961. "node_modules/estree-to-babel/node_modules/@babel/traverse/lib/path/introspection.js"(exports) {
  53962. "use strict";
  53963. Object.defineProperty(exports, "__esModule", {
  53964. value: true
  53965. });
  53966. exports.matchesPattern = matchesPattern;
  53967. exports.has = has;
  53968. exports.isStatic = isStatic;
  53969. exports.isnt = isnt;
  53970. exports.equals = equals;
  53971. exports.isNodeType = isNodeType;
  53972. exports.canHaveVariableDeclarationOrExpression = canHaveVariableDeclarationOrExpression;
  53973. exports.canSwapBetweenExpressionAndStatement = canSwapBetweenExpressionAndStatement;
  53974. exports.isCompletionRecord = isCompletionRecord;
  53975. exports.isStatementOrBlock = isStatementOrBlock;
  53976. exports.referencesImport = referencesImport;
  53977. exports.getSource = getSource;
  53978. exports.willIMaybeExecuteBefore = willIMaybeExecuteBefore;
  53979. exports._guessExecutionStatusRelativeTo = _guessExecutionStatusRelativeTo;
  53980. exports._guessExecutionStatusRelativeToDifferentFunctions = _guessExecutionStatusRelativeToDifferentFunctions;
  53981. exports.resolve = resolve;
  53982. exports._resolve = _resolve;
  53983. exports.isConstantExpression = isConstantExpression;
  53984. exports.isInStrictMode = isInStrictMode;
  53985. exports.is = void 0;
  53986. var t2 = require_lib4();
  53987. function matchesPattern(pattern, allowPartial) {
  53988. return t2.matchesPattern(this.node, pattern, allowPartial);
  53989. }
  53990. function has(key) {
  53991. const val = this.node && this.node[key];
  53992. if (val && Array.isArray(val)) {
  53993. return !!val.length;
  53994. } else {
  53995. return !!val;
  53996. }
  53997. }
  53998. function isStatic() {
  53999. return this.scope.isStatic(this.node);
  54000. }
  54001. var is = has;
  54002. exports.is = is;
  54003. function isnt(key) {
  54004. return !this.has(key);
  54005. }
  54006. function equals(key, value) {
  54007. return this.node[key] === value;
  54008. }
  54009. function isNodeType(type) {
  54010. return t2.isType(this.type, type);
  54011. }
  54012. function canHaveVariableDeclarationOrExpression() {
  54013. return (this.key === "init" || this.key === "left") && this.parentPath.isFor();
  54014. }
  54015. function canSwapBetweenExpressionAndStatement(replacement) {
  54016. if (this.key !== "body" || !this.parentPath.isArrowFunctionExpression()) {
  54017. return false;
  54018. }
  54019. if (this.isExpression()) {
  54020. return t2.isBlockStatement(replacement);
  54021. } else if (this.isBlockStatement()) {
  54022. return t2.isExpression(replacement);
  54023. }
  54024. return false;
  54025. }
  54026. function isCompletionRecord(allowInsideFunction) {
  54027. let path = this;
  54028. let first = true;
  54029. do {
  54030. const container = path.container;
  54031. if (path.isFunction() && !first) {
  54032. return !!allowInsideFunction;
  54033. }
  54034. first = false;
  54035. if (Array.isArray(container) && path.key !== container.length - 1) {
  54036. return false;
  54037. }
  54038. } while ((path = path.parentPath) && !path.isProgram());
  54039. return true;
  54040. }
  54041. function isStatementOrBlock() {
  54042. if (this.parentPath.isLabeledStatement() || t2.isBlockStatement(this.container)) {
  54043. return false;
  54044. } else {
  54045. return t2.STATEMENT_OR_BLOCK_KEYS.includes(this.key);
  54046. }
  54047. }
  54048. function referencesImport(moduleSource, importName) {
  54049. if (!this.isReferencedIdentifier()) {
  54050. if ((this.isMemberExpression() || this.isOptionalMemberExpression()) && (this.node.computed ? t2.isStringLiteral(this.node.property, {
  54051. value: importName
  54052. }) : this.node.property.name === importName)) {
  54053. const object = this.get("object");
  54054. return object.isReferencedIdentifier() && object.referencesImport(moduleSource, "*");
  54055. }
  54056. return false;
  54057. }
  54058. const binding = this.scope.getBinding(this.node.name);
  54059. if (!binding || binding.kind !== "module")
  54060. return false;
  54061. const path = binding.path;
  54062. const parent = path.parentPath;
  54063. if (!parent.isImportDeclaration())
  54064. return false;
  54065. if (parent.node.source.value === moduleSource) {
  54066. if (!importName)
  54067. return true;
  54068. } else {
  54069. return false;
  54070. }
  54071. if (path.isImportDefaultSpecifier() && importName === "default") {
  54072. return true;
  54073. }
  54074. if (path.isImportNamespaceSpecifier() && importName === "*") {
  54075. return true;
  54076. }
  54077. if (path.isImportSpecifier() && t2.isIdentifier(path.node.imported, {
  54078. name: importName
  54079. })) {
  54080. return true;
  54081. }
  54082. return false;
  54083. }
  54084. function getSource() {
  54085. const node = this.node;
  54086. if (node.end) {
  54087. const code2 = this.hub.getCode();
  54088. if (code2)
  54089. return code2.slice(node.start, node.end);
  54090. }
  54091. return "";
  54092. }
  54093. function willIMaybeExecuteBefore(target) {
  54094. return this._guessExecutionStatusRelativeTo(target) !== "after";
  54095. }
  54096. function getOuterFunction(path) {
  54097. return (path.scope.getFunctionParent() || path.scope.getProgramParent()).path;
  54098. }
  54099. function isExecutionUncertain(type, key) {
  54100. switch (type) {
  54101. case "LogicalExpression":
  54102. return key === "right";
  54103. case "ConditionalExpression":
  54104. case "IfStatement":
  54105. return key === "consequent" || key === "alternate";
  54106. case "WhileStatement":
  54107. case "DoWhileStatement":
  54108. case "ForInStatement":
  54109. case "ForOfStatement":
  54110. return key === "body";
  54111. case "ForStatement":
  54112. return key === "body" || key === "update";
  54113. case "SwitchStatement":
  54114. return key === "cases";
  54115. case "TryStatement":
  54116. return key === "handler";
  54117. case "AssignmentPattern":
  54118. return key === "right";
  54119. case "OptionalMemberExpression":
  54120. return key === "property";
  54121. case "OptionalCallExpression":
  54122. return key === "arguments";
  54123. default:
  54124. return false;
  54125. }
  54126. }
  54127. function isExecutionUncertainInList(paths, maxIndex) {
  54128. for (let i = 0; i < maxIndex; i++) {
  54129. const path = paths[i];
  54130. if (isExecutionUncertain(path.parent.type, path.parentKey)) {
  54131. return true;
  54132. }
  54133. }
  54134. return false;
  54135. }
  54136. function _guessExecutionStatusRelativeTo(target) {
  54137. const funcParent = {
  54138. this: getOuterFunction(this),
  54139. target: getOuterFunction(target)
  54140. };
  54141. if (funcParent.target.node !== funcParent.this.node) {
  54142. return this._guessExecutionStatusRelativeToDifferentFunctions(funcParent.target);
  54143. }
  54144. const paths = {
  54145. target: target.getAncestry(),
  54146. this: this.getAncestry()
  54147. };
  54148. if (paths.target.indexOf(this) >= 0)
  54149. return "after";
  54150. if (paths.this.indexOf(target) >= 0)
  54151. return "before";
  54152. let commonPath;
  54153. const commonIndex = {
  54154. target: 0,
  54155. this: 0
  54156. };
  54157. while (!commonPath && commonIndex.this < paths.this.length) {
  54158. const path = paths.this[commonIndex.this];
  54159. commonIndex.target = paths.target.indexOf(path);
  54160. if (commonIndex.target >= 0) {
  54161. commonPath = path;
  54162. } else {
  54163. commonIndex.this++;
  54164. }
  54165. }
  54166. if (!commonPath) {
  54167. throw new Error("Internal Babel error - The two compared nodes don't appear to belong to the same program.");
  54168. }
  54169. if (isExecutionUncertainInList(paths.this, commonIndex.this - 1) || isExecutionUncertainInList(paths.target, commonIndex.target - 1)) {
  54170. return "unknown";
  54171. }
  54172. const divergence = {
  54173. this: paths.this[commonIndex.this - 1],
  54174. target: paths.target[commonIndex.target - 1]
  54175. };
  54176. if (divergence.target.listKey && divergence.this.listKey && divergence.target.container === divergence.this.container) {
  54177. return divergence.target.key > divergence.this.key ? "before" : "after";
  54178. }
  54179. const keys2 = t2.VISITOR_KEYS[commonPath.type];
  54180. const keyPosition = {
  54181. this: keys2.indexOf(divergence.this.parentKey),
  54182. target: keys2.indexOf(divergence.target.parentKey)
  54183. };
  54184. return keyPosition.target > keyPosition.this ? "before" : "after";
  54185. }
  54186. var executionOrderCheckedNodes = /* @__PURE__ */ new WeakSet();
  54187. function _guessExecutionStatusRelativeToDifferentFunctions(target) {
  54188. if (!target.isFunctionDeclaration() || target.parentPath.isExportDeclaration()) {
  54189. return "unknown";
  54190. }
  54191. const binding = target.scope.getBinding(target.node.id.name);
  54192. if (!binding.references)
  54193. return "before";
  54194. const referencePaths = binding.referencePaths;
  54195. let allStatus;
  54196. for (const path of referencePaths) {
  54197. const childOfFunction = !!path.find((path2) => path2.node === target.node);
  54198. if (childOfFunction)
  54199. continue;
  54200. if (path.key !== "callee" || !path.parentPath.isCallExpression()) {
  54201. return "unknown";
  54202. }
  54203. if (executionOrderCheckedNodes.has(path.node))
  54204. continue;
  54205. executionOrderCheckedNodes.add(path.node);
  54206. const status = this._guessExecutionStatusRelativeTo(path);
  54207. executionOrderCheckedNodes.delete(path.node);
  54208. if (allStatus && allStatus !== status) {
  54209. return "unknown";
  54210. } else {
  54211. allStatus = status;
  54212. }
  54213. }
  54214. return allStatus;
  54215. }
  54216. function resolve(dangerous, resolved) {
  54217. return this._resolve(dangerous, resolved) || this;
  54218. }
  54219. function _resolve(dangerous, resolved) {
  54220. if (resolved && resolved.indexOf(this) >= 0)
  54221. return;
  54222. resolved = resolved || [];
  54223. resolved.push(this);
  54224. if (this.isVariableDeclarator()) {
  54225. if (this.get("id").isIdentifier()) {
  54226. return this.get("init").resolve(dangerous, resolved);
  54227. } else {
  54228. }
  54229. } else if (this.isReferencedIdentifier()) {
  54230. const binding = this.scope.getBinding(this.node.name);
  54231. if (!binding)
  54232. return;
  54233. if (!binding.constant)
  54234. return;
  54235. if (binding.kind === "module")
  54236. return;
  54237. if (binding.path !== this) {
  54238. const ret = binding.path.resolve(dangerous, resolved);
  54239. if (this.find((parent) => parent.node === ret.node))
  54240. return;
  54241. return ret;
  54242. }
  54243. } else if (this.isTypeCastExpression()) {
  54244. return this.get("expression").resolve(dangerous, resolved);
  54245. } else if (dangerous && this.isMemberExpression()) {
  54246. const targetKey = this.toComputedKey();
  54247. if (!t2.isLiteral(targetKey))
  54248. return;
  54249. const targetName = targetKey.value;
  54250. const target = this.get("object").resolve(dangerous, resolved);
  54251. if (target.isObjectExpression()) {
  54252. const props = target.get("properties");
  54253. for (const prop of props) {
  54254. if (!prop.isProperty())
  54255. continue;
  54256. const key = prop.get("key");
  54257. let match = prop.isnt("computed") && key.isIdentifier({
  54258. name: targetName
  54259. });
  54260. match = match || key.isLiteral({
  54261. value: targetName
  54262. });
  54263. if (match)
  54264. return prop.get("value").resolve(dangerous, resolved);
  54265. }
  54266. } else if (target.isArrayExpression() && !isNaN(+targetName)) {
  54267. const elems = target.get("elements");
  54268. const elem = elems[targetName];
  54269. if (elem)
  54270. return elem.resolve(dangerous, resolved);
  54271. }
  54272. }
  54273. }
  54274. function isConstantExpression() {
  54275. if (this.isIdentifier()) {
  54276. const binding = this.scope.getBinding(this.node.name);
  54277. if (!binding)
  54278. return false;
  54279. return binding.constant;
  54280. }
  54281. if (this.isLiteral()) {
  54282. if (this.isRegExpLiteral()) {
  54283. return false;
  54284. }
  54285. if (this.isTemplateLiteral()) {
  54286. return this.get("expressions").every((expression) => expression.isConstantExpression());
  54287. }
  54288. return true;
  54289. }
  54290. if (this.isUnaryExpression()) {
  54291. if (this.node.operator !== "void") {
  54292. return false;
  54293. }
  54294. return this.get("argument").isConstantExpression();
  54295. }
  54296. if (this.isBinaryExpression()) {
  54297. return this.get("left").isConstantExpression() && this.get("right").isConstantExpression();
  54298. }
  54299. return false;
  54300. }
  54301. function isInStrictMode() {
  54302. const start3 = this.isProgram() ? this : this.parentPath;
  54303. const strictParent = start3.find((path) => {
  54304. if (path.isProgram({
  54305. sourceType: "module"
  54306. }))
  54307. return true;
  54308. if (path.isClass())
  54309. return true;
  54310. if (!path.isProgram() && !path.isFunction())
  54311. return false;
  54312. if (path.isArrowFunctionExpression() && !path.get("body").isBlockStatement()) {
  54313. return false;
  54314. }
  54315. const body = path.isFunction() ? path.node.body : path.node;
  54316. for (const directive of body.directives) {
  54317. if (directive.value.value === "use strict") {
  54318. return true;
  54319. }
  54320. }
  54321. });
  54322. return !!strictParent;
  54323. }
  54324. }
  54325. });
  54326. // node_modules/estree-to-babel/node_modules/@babel/traverse/lib/path/context.js
  54327. var require_context = __commonJS({
  54328. "node_modules/estree-to-babel/node_modules/@babel/traverse/lib/path/context.js"(exports) {
  54329. "use strict";
  54330. Object.defineProperty(exports, "__esModule", {
  54331. value: true
  54332. });
  54333. exports.call = call;
  54334. exports._call = _call;
  54335. exports.isBlacklisted = exports.isDenylisted = isDenylisted;
  54336. exports.visit = visit4;
  54337. exports.skip = skip;
  54338. exports.skipKey = skipKey;
  54339. exports.stop = stop;
  54340. exports.setScope = setScope;
  54341. exports.setContext = setContext;
  54342. exports.resync = resync;
  54343. exports._resyncParent = _resyncParent;
  54344. exports._resyncKey = _resyncKey;
  54345. exports._resyncList = _resyncList;
  54346. exports._resyncRemoved = _resyncRemoved;
  54347. exports.popContext = popContext;
  54348. exports.pushContext = pushContext;
  54349. exports.setup = setup;
  54350. exports.setKey = setKey;
  54351. exports.requeue = requeue;
  54352. exports._getQueueContexts = _getQueueContexts;
  54353. var _index = require_lib14();
  54354. var _index2 = require_path();
  54355. function call(key) {
  54356. const opts = this.opts;
  54357. this.debug(key);
  54358. if (this.node) {
  54359. if (this._call(opts[key]))
  54360. return true;
  54361. }
  54362. if (this.node) {
  54363. return this._call(opts[this.node.type] && opts[this.node.type][key]);
  54364. }
  54365. return false;
  54366. }
  54367. function _call(fns) {
  54368. if (!fns)
  54369. return false;
  54370. for (const fn of fns) {
  54371. if (!fn)
  54372. continue;
  54373. const node = this.node;
  54374. if (!node)
  54375. return true;
  54376. const ret = fn.call(this.state, this, this.state);
  54377. if (ret && typeof ret === "object" && typeof ret.then === "function") {
  54378. throw new Error(`You appear to be using a plugin with an async traversal visitor, which your current version of Babel does not support. If you're using a published plugin, you may need to upgrade your @babel/core version.`);
  54379. }
  54380. if (ret) {
  54381. throw new Error(`Unexpected return value from visitor method ${fn}`);
  54382. }
  54383. if (this.node !== node)
  54384. return true;
  54385. if (this._traverseFlags > 0)
  54386. return true;
  54387. }
  54388. return false;
  54389. }
  54390. function isDenylisted() {
  54391. var _this$opts$denylist;
  54392. const denylist = (_this$opts$denylist = this.opts.denylist) != null ? _this$opts$denylist : this.opts.blacklist;
  54393. return denylist && denylist.indexOf(this.node.type) > -1;
  54394. }
  54395. function visit4() {
  54396. if (!this.node) {
  54397. return false;
  54398. }
  54399. if (this.isDenylisted()) {
  54400. return false;
  54401. }
  54402. if (this.opts.shouldSkip && this.opts.shouldSkip(this)) {
  54403. return false;
  54404. }
  54405. if (this.shouldSkip || this.call("enter") || this.shouldSkip) {
  54406. this.debug("Skip...");
  54407. return this.shouldStop;
  54408. }
  54409. this.debug("Recursing into...");
  54410. _index.default.node(this.node, this.opts, this.scope, this.state, this, this.skipKeys);
  54411. this.call("exit");
  54412. return this.shouldStop;
  54413. }
  54414. function skip() {
  54415. this.shouldSkip = true;
  54416. }
  54417. function skipKey(key) {
  54418. if (this.skipKeys == null) {
  54419. this.skipKeys = {};
  54420. }
  54421. this.skipKeys[key] = true;
  54422. }
  54423. function stop() {
  54424. this._traverseFlags |= _index2.SHOULD_SKIP | _index2.SHOULD_STOP;
  54425. }
  54426. function setScope() {
  54427. if (this.opts && this.opts.noScope)
  54428. return;
  54429. let path = this.parentPath;
  54430. if (this.key === "key" && path.isMethod())
  54431. path = path.parentPath;
  54432. let target;
  54433. while (path && !target) {
  54434. if (path.opts && path.opts.noScope)
  54435. return;
  54436. target = path.scope;
  54437. path = path.parentPath;
  54438. }
  54439. this.scope = this.getScope(target);
  54440. if (this.scope)
  54441. this.scope.init();
  54442. }
  54443. function setContext(context) {
  54444. if (this.skipKeys != null) {
  54445. this.skipKeys = {};
  54446. }
  54447. this._traverseFlags = 0;
  54448. if (context) {
  54449. this.context = context;
  54450. this.state = context.state;
  54451. this.opts = context.opts;
  54452. }
  54453. this.setScope();
  54454. return this;
  54455. }
  54456. function resync() {
  54457. if (this.removed)
  54458. return;
  54459. this._resyncParent();
  54460. this._resyncList();
  54461. this._resyncKey();
  54462. }
  54463. function _resyncParent() {
  54464. if (this.parentPath) {
  54465. this.parent = this.parentPath.node;
  54466. }
  54467. }
  54468. function _resyncKey() {
  54469. if (!this.container)
  54470. return;
  54471. if (this.node === this.container[this.key])
  54472. return;
  54473. if (Array.isArray(this.container)) {
  54474. for (let i = 0; i < this.container.length; i++) {
  54475. if (this.container[i] === this.node) {
  54476. return this.setKey(i);
  54477. }
  54478. }
  54479. } else {
  54480. for (const key of Object.keys(this.container)) {
  54481. if (this.container[key] === this.node) {
  54482. return this.setKey(key);
  54483. }
  54484. }
  54485. }
  54486. this.key = null;
  54487. }
  54488. function _resyncList() {
  54489. if (!this.parent || !this.inList)
  54490. return;
  54491. const newContainer = this.parent[this.listKey];
  54492. if (this.container === newContainer)
  54493. return;
  54494. this.container = newContainer || null;
  54495. }
  54496. function _resyncRemoved() {
  54497. if (this.key == null || !this.container || this.container[this.key] !== this.node) {
  54498. this._markRemoved();
  54499. }
  54500. }
  54501. function popContext() {
  54502. this.contexts.pop();
  54503. if (this.contexts.length > 0) {
  54504. this.setContext(this.contexts[this.contexts.length - 1]);
  54505. } else {
  54506. this.setContext(void 0);
  54507. }
  54508. }
  54509. function pushContext(context) {
  54510. this.contexts.push(context);
  54511. this.setContext(context);
  54512. }
  54513. function setup(parentPath, container, listKey, key) {
  54514. this.listKey = listKey;
  54515. this.container = container;
  54516. this.parentPath = parentPath || this.parentPath;
  54517. this.setKey(key);
  54518. }
  54519. function setKey(key) {
  54520. var _this$node;
  54521. this.key = key;
  54522. this.node = this.container[this.key];
  54523. this.type = (_this$node = this.node) == null ? void 0 : _this$node.type;
  54524. }
  54525. function requeue(pathToQueue = this) {
  54526. if (pathToQueue.removed)
  54527. return;
  54528. ;
  54529. const contexts = this.contexts;
  54530. for (const context of contexts) {
  54531. context.maybeQueue(pathToQueue);
  54532. }
  54533. }
  54534. function _getQueueContexts() {
  54535. let path = this;
  54536. let contexts = this.contexts;
  54537. while (!contexts.length) {
  54538. path = path.parentPath;
  54539. if (!path)
  54540. break;
  54541. contexts = path.contexts;
  54542. }
  54543. return contexts;
  54544. }
  54545. }
  54546. });
  54547. // node_modules/estree-to-babel/node_modules/@babel/traverse/lib/path/lib/removal-hooks.js
  54548. var require_removal_hooks = __commonJS({
  54549. "node_modules/estree-to-babel/node_modules/@babel/traverse/lib/path/lib/removal-hooks.js"(exports) {
  54550. "use strict";
  54551. Object.defineProperty(exports, "__esModule", {
  54552. value: true
  54553. });
  54554. exports.hooks = void 0;
  54555. var hooks = [function(self2, parent) {
  54556. const removeParent = self2.key === "test" && (parent.isWhile() || parent.isSwitchCase()) || self2.key === "declaration" && parent.isExportDeclaration() || self2.key === "body" && parent.isLabeledStatement() || self2.listKey === "declarations" && parent.isVariableDeclaration() && parent.node.declarations.length === 1 || self2.key === "expression" && parent.isExpressionStatement();
  54557. if (removeParent) {
  54558. parent.remove();
  54559. return true;
  54560. }
  54561. }, function(self2, parent) {
  54562. if (parent.isSequenceExpression() && parent.node.expressions.length === 1) {
  54563. parent.replaceWith(parent.node.expressions[0]);
  54564. return true;
  54565. }
  54566. }, function(self2, parent) {
  54567. if (parent.isBinary()) {
  54568. if (self2.key === "left") {
  54569. parent.replaceWith(parent.node.right);
  54570. } else {
  54571. parent.replaceWith(parent.node.left);
  54572. }
  54573. return true;
  54574. }
  54575. }, function(self2, parent) {
  54576. if (parent.isIfStatement() && (self2.key === "consequent" || self2.key === "alternate") || self2.key === "body" && (parent.isLoop() || parent.isArrowFunctionExpression())) {
  54577. self2.replaceWith({
  54578. type: "BlockStatement",
  54579. body: []
  54580. });
  54581. return true;
  54582. }
  54583. }];
  54584. exports.hooks = hooks;
  54585. }
  54586. });
  54587. // node_modules/estree-to-babel/node_modules/@babel/traverse/lib/path/removal.js
  54588. var require_removal = __commonJS({
  54589. "node_modules/estree-to-babel/node_modules/@babel/traverse/lib/path/removal.js"(exports) {
  54590. "use strict";
  54591. Object.defineProperty(exports, "__esModule", {
  54592. value: true
  54593. });
  54594. exports.remove = remove;
  54595. exports._removeFromScope = _removeFromScope;
  54596. exports._callRemovalHooks = _callRemovalHooks;
  54597. exports._remove = _remove;
  54598. exports._markRemoved = _markRemoved;
  54599. exports._assertUnremoved = _assertUnremoved;
  54600. var _removalHooks = require_removal_hooks();
  54601. var _cache = require_cache();
  54602. var _index = require_path();
  54603. function remove() {
  54604. var _this$opts;
  54605. this._assertUnremoved();
  54606. this.resync();
  54607. if (!((_this$opts = this.opts) != null && _this$opts.noScope)) {
  54608. this._removeFromScope();
  54609. }
  54610. if (this._callRemovalHooks()) {
  54611. this._markRemoved();
  54612. return;
  54613. }
  54614. this.shareCommentsWithSiblings();
  54615. this._remove();
  54616. this._markRemoved();
  54617. }
  54618. function _removeFromScope() {
  54619. const bindings = this.getBindingIdentifiers();
  54620. Object.keys(bindings).forEach((name2) => this.scope.removeBinding(name2));
  54621. }
  54622. function _callRemovalHooks() {
  54623. for (const fn of _removalHooks.hooks) {
  54624. if (fn(this, this.parentPath))
  54625. return true;
  54626. }
  54627. }
  54628. function _remove() {
  54629. if (Array.isArray(this.container)) {
  54630. this.container.splice(this.key, 1);
  54631. this.updateSiblingKeys(this.key, -1);
  54632. } else {
  54633. this._replaceWith(null);
  54634. }
  54635. }
  54636. function _markRemoved() {
  54637. this._traverseFlags |= _index.SHOULD_SKIP | _index.REMOVED;
  54638. if (this.parent)
  54639. _cache.path.get(this.parent).delete(this.node);
  54640. this.node = null;
  54641. }
  54642. function _assertUnremoved() {
  54643. if (this.removed) {
  54644. throw this.buildCodeFrameError("NodePath has been removed so is read-only.");
  54645. }
  54646. }
  54647. }
  54648. });
  54649. // node_modules/estree-to-babel/node_modules/@babel/traverse/lib/path/lib/hoister.js
  54650. var require_hoister = __commonJS({
  54651. "node_modules/estree-to-babel/node_modules/@babel/traverse/lib/path/lib/hoister.js"(exports) {
  54652. "use strict";
  54653. Object.defineProperty(exports, "__esModule", {
  54654. value: true
  54655. });
  54656. exports.default = void 0;
  54657. var t2 = require_lib4();
  54658. var referenceVisitor = {
  54659. ReferencedIdentifier(path, state) {
  54660. if (path.isJSXIdentifier() && t2.react.isCompatTag(path.node.name) && !path.parentPath.isJSXMemberExpression()) {
  54661. return;
  54662. }
  54663. if (path.node.name === "this") {
  54664. let scope = path.scope;
  54665. do {
  54666. if (scope.path.isFunction() && !scope.path.isArrowFunctionExpression()) {
  54667. break;
  54668. }
  54669. } while (scope = scope.parent);
  54670. if (scope)
  54671. state.breakOnScopePaths.push(scope.path);
  54672. }
  54673. const binding = path.scope.getBinding(path.node.name);
  54674. if (!binding)
  54675. return;
  54676. for (const violation of binding.constantViolations) {
  54677. if (violation.scope !== binding.path.scope) {
  54678. state.mutableBinding = true;
  54679. path.stop();
  54680. return;
  54681. }
  54682. }
  54683. if (binding !== state.scope.getBinding(path.node.name))
  54684. return;
  54685. state.bindings[path.node.name] = binding;
  54686. }
  54687. };
  54688. var PathHoister = class {
  54689. constructor(path, scope) {
  54690. this.breakOnScopePaths = void 0;
  54691. this.bindings = void 0;
  54692. this.mutableBinding = void 0;
  54693. this.scopes = void 0;
  54694. this.scope = void 0;
  54695. this.path = void 0;
  54696. this.attachAfter = void 0;
  54697. this.breakOnScopePaths = [];
  54698. this.bindings = {};
  54699. this.mutableBinding = false;
  54700. this.scopes = [];
  54701. this.scope = scope;
  54702. this.path = path;
  54703. this.attachAfter = false;
  54704. }
  54705. isCompatibleScope(scope) {
  54706. for (const key of Object.keys(this.bindings)) {
  54707. const binding = this.bindings[key];
  54708. if (!scope.bindingIdentifierEquals(key, binding.identifier)) {
  54709. return false;
  54710. }
  54711. }
  54712. return true;
  54713. }
  54714. getCompatibleScopes() {
  54715. let scope = this.path.scope;
  54716. do {
  54717. if (this.isCompatibleScope(scope)) {
  54718. this.scopes.push(scope);
  54719. } else {
  54720. break;
  54721. }
  54722. if (this.breakOnScopePaths.indexOf(scope.path) >= 0) {
  54723. break;
  54724. }
  54725. } while (scope = scope.parent);
  54726. }
  54727. getAttachmentPath() {
  54728. let path = this._getAttachmentPath();
  54729. if (!path)
  54730. return;
  54731. let targetScope = path.scope;
  54732. if (targetScope.path === path) {
  54733. targetScope = path.scope.parent;
  54734. }
  54735. if (targetScope.path.isProgram() || targetScope.path.isFunction()) {
  54736. for (const name2 of Object.keys(this.bindings)) {
  54737. if (!targetScope.hasOwnBinding(name2))
  54738. continue;
  54739. const binding = this.bindings[name2];
  54740. if (binding.kind === "param" || binding.path.parentKey === "params") {
  54741. continue;
  54742. }
  54743. const bindingParentPath = this.getAttachmentParentForPath(binding.path);
  54744. if (bindingParentPath.key >= path.key) {
  54745. this.attachAfter = true;
  54746. path = binding.path;
  54747. for (const violationPath of binding.constantViolations) {
  54748. if (this.getAttachmentParentForPath(violationPath).key > path.key) {
  54749. path = violationPath;
  54750. }
  54751. }
  54752. }
  54753. }
  54754. }
  54755. return path;
  54756. }
  54757. _getAttachmentPath() {
  54758. const scopes = this.scopes;
  54759. const scope = scopes.pop();
  54760. if (!scope)
  54761. return;
  54762. if (scope.path.isFunction()) {
  54763. if (this.hasOwnParamBindings(scope)) {
  54764. if (this.scope === scope)
  54765. return;
  54766. const bodies = scope.path.get("body").get("body");
  54767. for (let i = 0; i < bodies.length; i++) {
  54768. if (bodies[i].node._blockHoist)
  54769. continue;
  54770. return bodies[i];
  54771. }
  54772. } else {
  54773. return this.getNextScopeAttachmentParent();
  54774. }
  54775. } else if (scope.path.isProgram()) {
  54776. return this.getNextScopeAttachmentParent();
  54777. }
  54778. }
  54779. getNextScopeAttachmentParent() {
  54780. const scope = this.scopes.pop();
  54781. if (scope)
  54782. return this.getAttachmentParentForPath(scope.path);
  54783. }
  54784. getAttachmentParentForPath(path) {
  54785. do {
  54786. if (!path.parentPath || Array.isArray(path.container) && path.isStatement()) {
  54787. return path;
  54788. }
  54789. } while (path = path.parentPath);
  54790. }
  54791. hasOwnParamBindings(scope) {
  54792. for (const name2 of Object.keys(this.bindings)) {
  54793. if (!scope.hasOwnBinding(name2))
  54794. continue;
  54795. const binding = this.bindings[name2];
  54796. if (binding.kind === "param" && binding.constant)
  54797. return true;
  54798. }
  54799. return false;
  54800. }
  54801. run() {
  54802. this.path.traverse(referenceVisitor, this);
  54803. if (this.mutableBinding)
  54804. return;
  54805. this.getCompatibleScopes();
  54806. const attachTo = this.getAttachmentPath();
  54807. if (!attachTo)
  54808. return;
  54809. if (attachTo.getFunctionParent() === this.path.getFunctionParent())
  54810. return;
  54811. let uid = attachTo.scope.generateUidIdentifier("ref");
  54812. const declarator = t2.variableDeclarator(uid, this.path.node);
  54813. const insertFn = this.attachAfter ? "insertAfter" : "insertBefore";
  54814. const [attached] = attachTo[insertFn]([attachTo.isVariableDeclarator() ? declarator : t2.variableDeclaration("var", [declarator])]);
  54815. const parent = this.path.parentPath;
  54816. if (parent.isJSXElement() && this.path.container === parent.node.children) {
  54817. uid = t2.jsxExpressionContainer(uid);
  54818. }
  54819. this.path.replaceWith(t2.cloneNode(uid));
  54820. return attachTo.isVariableDeclarator() ? attached.get("init") : attached.get("declarations.0.init");
  54821. }
  54822. };
  54823. exports.default = PathHoister;
  54824. }
  54825. });
  54826. // node_modules/estree-to-babel/node_modules/@babel/traverse/lib/path/modification.js
  54827. var require_modification = __commonJS({
  54828. "node_modules/estree-to-babel/node_modules/@babel/traverse/lib/path/modification.js"(exports) {
  54829. "use strict";
  54830. Object.defineProperty(exports, "__esModule", {
  54831. value: true
  54832. });
  54833. exports.insertBefore = insertBefore;
  54834. exports._containerInsert = _containerInsert;
  54835. exports._containerInsertBefore = _containerInsertBefore;
  54836. exports._containerInsertAfter = _containerInsertAfter;
  54837. exports.insertAfter = insertAfter;
  54838. exports.updateSiblingKeys = updateSiblingKeys;
  54839. exports._verifyNodeList = _verifyNodeList;
  54840. exports.unshiftContainer = unshiftContainer;
  54841. exports.pushContainer = pushContainer;
  54842. exports.hoist = hoist;
  54843. var _cache = require_cache();
  54844. var _hoister = require_hoister();
  54845. var _index = require_path();
  54846. var t2 = require_lib4();
  54847. function insertBefore(nodes_) {
  54848. this._assertUnremoved();
  54849. const nodes = this._verifyNodeList(nodes_);
  54850. const {
  54851. parentPath
  54852. } = this;
  54853. if (parentPath.isExpressionStatement() || parentPath.isLabeledStatement() || parentPath.isExportNamedDeclaration() || parentPath.isExportDefaultDeclaration() && this.isDeclaration()) {
  54854. return parentPath.insertBefore(nodes);
  54855. } else if (this.isNodeType("Expression") && !this.isJSXElement() || parentPath.isForStatement() && this.key === "init") {
  54856. if (this.node)
  54857. nodes.push(this.node);
  54858. return this.replaceExpressionWithStatements(nodes);
  54859. } else if (Array.isArray(this.container)) {
  54860. return this._containerInsertBefore(nodes);
  54861. } else if (this.isStatementOrBlock()) {
  54862. const node = this.node;
  54863. const shouldInsertCurrentNode = node && (!this.isExpressionStatement() || node.expression != null);
  54864. this.replaceWith(t2.blockStatement(shouldInsertCurrentNode ? [node] : []));
  54865. return this.unshiftContainer("body", nodes);
  54866. } else {
  54867. throw new Error("We don't know what to do with this node type. We were previously a Statement but we can't fit in here?");
  54868. }
  54869. }
  54870. function _containerInsert(from, nodes) {
  54871. this.updateSiblingKeys(from, nodes.length);
  54872. const paths = [];
  54873. this.container.splice(from, 0, ...nodes);
  54874. for (let i = 0; i < nodes.length; i++) {
  54875. const to = from + i;
  54876. const path = this.getSibling(to);
  54877. paths.push(path);
  54878. if (this.context && this.context.queue) {
  54879. path.pushContext(this.context);
  54880. }
  54881. }
  54882. const contexts = this._getQueueContexts();
  54883. for (const path of paths) {
  54884. path.setScope();
  54885. path.debug("Inserted.");
  54886. for (const context of contexts) {
  54887. context.maybeQueue(path, true);
  54888. }
  54889. }
  54890. return paths;
  54891. }
  54892. function _containerInsertBefore(nodes) {
  54893. return this._containerInsert(this.key, nodes);
  54894. }
  54895. function _containerInsertAfter(nodes) {
  54896. return this._containerInsert(this.key + 1, nodes);
  54897. }
  54898. function insertAfter(nodes_) {
  54899. this._assertUnremoved();
  54900. const nodes = this._verifyNodeList(nodes_);
  54901. const {
  54902. parentPath
  54903. } = this;
  54904. if (parentPath.isExpressionStatement() || parentPath.isLabeledStatement() || parentPath.isExportNamedDeclaration() || parentPath.isExportDefaultDeclaration() && this.isDeclaration()) {
  54905. return parentPath.insertAfter(nodes.map((node) => {
  54906. return t2.isExpression(node) ? t2.expressionStatement(node) : node;
  54907. }));
  54908. } else if (this.isNodeType("Expression") && !this.isJSXElement() && !parentPath.isJSXElement() || parentPath.isForStatement() && this.key === "init") {
  54909. if (this.node) {
  54910. const node = this.node;
  54911. let {
  54912. scope
  54913. } = this;
  54914. if (scope.path.isPattern()) {
  54915. t2.assertExpression(node);
  54916. this.replaceWith(t2.callExpression(t2.arrowFunctionExpression([], node), []));
  54917. this.get("callee.body").insertAfter(nodes);
  54918. return [this];
  54919. }
  54920. if (parentPath.isMethod({
  54921. computed: true,
  54922. key: node
  54923. })) {
  54924. scope = scope.parent;
  54925. }
  54926. const temp = scope.generateDeclaredUidIdentifier();
  54927. nodes.unshift(t2.expressionStatement(t2.assignmentExpression("=", t2.cloneNode(temp), node)));
  54928. nodes.push(t2.expressionStatement(t2.cloneNode(temp)));
  54929. }
  54930. return this.replaceExpressionWithStatements(nodes);
  54931. } else if (Array.isArray(this.container)) {
  54932. return this._containerInsertAfter(nodes);
  54933. } else if (this.isStatementOrBlock()) {
  54934. const node = this.node;
  54935. const shouldInsertCurrentNode = node && (!this.isExpressionStatement() || node.expression != null);
  54936. this.replaceWith(t2.blockStatement(shouldInsertCurrentNode ? [node] : []));
  54937. return this.pushContainer("body", nodes);
  54938. } else {
  54939. throw new Error("We don't know what to do with this node type. We were previously a Statement but we can't fit in here?");
  54940. }
  54941. }
  54942. function updateSiblingKeys(fromIndex, incrementBy) {
  54943. if (!this.parent)
  54944. return;
  54945. const paths = _cache.path.get(this.parent);
  54946. for (const [, path] of paths) {
  54947. if (path.key >= fromIndex) {
  54948. path.key += incrementBy;
  54949. }
  54950. }
  54951. }
  54952. function _verifyNodeList(nodes) {
  54953. if (!nodes) {
  54954. return [];
  54955. }
  54956. if (!Array.isArray(nodes)) {
  54957. nodes = [nodes];
  54958. }
  54959. for (let i = 0; i < nodes.length; i++) {
  54960. const node = nodes[i];
  54961. let msg;
  54962. if (!node) {
  54963. msg = "has falsy node";
  54964. } else if (typeof node !== "object") {
  54965. msg = "contains a non-object node";
  54966. } else if (!node.type) {
  54967. msg = "without a type";
  54968. } else if (node instanceof _index.default) {
  54969. msg = "has a NodePath when it expected a raw object";
  54970. }
  54971. if (msg) {
  54972. const type = Array.isArray(node) ? "array" : typeof node;
  54973. throw new Error(`Node list ${msg} with the index of ${i} and type of ${type}`);
  54974. }
  54975. }
  54976. return nodes;
  54977. }
  54978. function unshiftContainer(listKey, nodes) {
  54979. this._assertUnremoved();
  54980. nodes = this._verifyNodeList(nodes);
  54981. const path = _index.default.get({
  54982. parentPath: this,
  54983. parent: this.node,
  54984. container: this.node[listKey],
  54985. listKey,
  54986. key: 0
  54987. }).setContext(this.context);
  54988. return path._containerInsertBefore(nodes);
  54989. }
  54990. function pushContainer(listKey, nodes) {
  54991. this._assertUnremoved();
  54992. const verifiedNodes = this._verifyNodeList(nodes);
  54993. const container = this.node[listKey];
  54994. const path = _index.default.get({
  54995. parentPath: this,
  54996. parent: this.node,
  54997. container,
  54998. listKey,
  54999. key: container.length
  55000. }).setContext(this.context);
  55001. return path.replaceWithMultiple(verifiedNodes);
  55002. }
  55003. function hoist(scope = this.scope) {
  55004. const hoister = new _hoister.default(this, scope);
  55005. return hoister.run();
  55006. }
  55007. }
  55008. });
  55009. // node_modules/estree-to-babel/node_modules/@babel/traverse/lib/path/family.js
  55010. var require_family = __commonJS({
  55011. "node_modules/estree-to-babel/node_modules/@babel/traverse/lib/path/family.js"(exports) {
  55012. "use strict";
  55013. Object.defineProperty(exports, "__esModule", {
  55014. value: true
  55015. });
  55016. exports.getOpposite = getOpposite;
  55017. exports.getCompletionRecords = getCompletionRecords;
  55018. exports.getSibling = getSibling;
  55019. exports.getPrevSibling = getPrevSibling;
  55020. exports.getNextSibling = getNextSibling;
  55021. exports.getAllNextSiblings = getAllNextSiblings;
  55022. exports.getAllPrevSiblings = getAllPrevSiblings;
  55023. exports.get = get;
  55024. exports._getKey = _getKey;
  55025. exports._getPattern = _getPattern;
  55026. exports.getBindingIdentifiers = getBindingIdentifiers;
  55027. exports.getOuterBindingIdentifiers = getOuterBindingIdentifiers;
  55028. exports.getBindingIdentifierPaths = getBindingIdentifierPaths;
  55029. exports.getOuterBindingIdentifierPaths = getOuterBindingIdentifierPaths;
  55030. var _index = require_path();
  55031. var t2 = require_lib4();
  55032. var NORMAL_COMPLETION = 0;
  55033. var BREAK_COMPLETION = 1;
  55034. function NormalCompletion(path) {
  55035. return {
  55036. type: NORMAL_COMPLETION,
  55037. path
  55038. };
  55039. }
  55040. function BreakCompletion(path) {
  55041. return {
  55042. type: BREAK_COMPLETION,
  55043. path
  55044. };
  55045. }
  55046. function getOpposite() {
  55047. if (this.key === "left") {
  55048. return this.getSibling("right");
  55049. } else if (this.key === "right") {
  55050. return this.getSibling("left");
  55051. }
  55052. return null;
  55053. }
  55054. function addCompletionRecords(path, records, context) {
  55055. if (path)
  55056. return records.concat(_getCompletionRecords(path, context));
  55057. return records;
  55058. }
  55059. function completionRecordForSwitch(cases, records, context) {
  55060. let lastNormalCompletions = [];
  55061. for (let i = 0; i < cases.length; i++) {
  55062. const casePath = cases[i];
  55063. const caseCompletions = _getCompletionRecords(casePath, context);
  55064. const normalCompletions = [];
  55065. const breakCompletions = [];
  55066. for (const c of caseCompletions) {
  55067. if (c.type === NORMAL_COMPLETION) {
  55068. normalCompletions.push(c);
  55069. }
  55070. if (c.type === BREAK_COMPLETION) {
  55071. breakCompletions.push(c);
  55072. }
  55073. }
  55074. if (normalCompletions.length) {
  55075. lastNormalCompletions = normalCompletions;
  55076. }
  55077. records = records.concat(breakCompletions);
  55078. }
  55079. records = records.concat(lastNormalCompletions);
  55080. return records;
  55081. }
  55082. function normalCompletionToBreak(completions) {
  55083. completions.forEach((c) => {
  55084. c.type = BREAK_COMPLETION;
  55085. });
  55086. }
  55087. function replaceBreakStatementInBreakCompletion(completions, reachable) {
  55088. completions.forEach((c) => {
  55089. if (c.path.isBreakStatement({
  55090. label: null
  55091. })) {
  55092. if (reachable) {
  55093. c.path.replaceWith(t2.unaryExpression("void", t2.numericLiteral(0)));
  55094. } else {
  55095. c.path.remove();
  55096. }
  55097. }
  55098. });
  55099. }
  55100. function getStatementListCompletion(paths, context) {
  55101. let completions = [];
  55102. if (context.canHaveBreak) {
  55103. let lastNormalCompletions = [];
  55104. for (let i = 0; i < paths.length; i++) {
  55105. const path = paths[i];
  55106. const newContext = Object.assign({}, context, {
  55107. inCaseClause: false
  55108. });
  55109. if (path.isBlockStatement() && (context.inCaseClause || context.shouldPopulateBreak)) {
  55110. newContext.shouldPopulateBreak = true;
  55111. } else {
  55112. newContext.shouldPopulateBreak = false;
  55113. }
  55114. const statementCompletions = _getCompletionRecords(path, newContext);
  55115. if (statementCompletions.length > 0 && statementCompletions.every((c) => c.type === BREAK_COMPLETION)) {
  55116. if (lastNormalCompletions.length > 0 && statementCompletions.every((c) => c.path.isBreakStatement({
  55117. label: null
  55118. }))) {
  55119. normalCompletionToBreak(lastNormalCompletions);
  55120. completions = completions.concat(lastNormalCompletions);
  55121. if (lastNormalCompletions.some((c) => c.path.isDeclaration())) {
  55122. completions = completions.concat(statementCompletions);
  55123. replaceBreakStatementInBreakCompletion(statementCompletions, true);
  55124. }
  55125. replaceBreakStatementInBreakCompletion(statementCompletions, false);
  55126. } else {
  55127. completions = completions.concat(statementCompletions);
  55128. if (!context.shouldPopulateBreak) {
  55129. replaceBreakStatementInBreakCompletion(statementCompletions, true);
  55130. }
  55131. }
  55132. break;
  55133. }
  55134. if (i === paths.length - 1) {
  55135. completions = completions.concat(statementCompletions);
  55136. } else {
  55137. completions = completions.concat(statementCompletions.filter((c) => c.type === BREAK_COMPLETION));
  55138. lastNormalCompletions = statementCompletions.filter((c) => c.type === NORMAL_COMPLETION);
  55139. }
  55140. }
  55141. } else if (paths.length) {
  55142. completions = completions.concat(_getCompletionRecords(paths[paths.length - 1], context));
  55143. }
  55144. return completions;
  55145. }
  55146. function _getCompletionRecords(path, context) {
  55147. let records = [];
  55148. if (path.isIfStatement()) {
  55149. records = addCompletionRecords(path.get("consequent"), records, context);
  55150. records = addCompletionRecords(path.get("alternate"), records, context);
  55151. } else if (path.isDoExpression() || path.isFor() || path.isWhile() || path.isLabeledStatement()) {
  55152. records = addCompletionRecords(path.get("body"), records, context);
  55153. } else if (path.isProgram() || path.isBlockStatement()) {
  55154. records = records.concat(getStatementListCompletion(path.get("body"), context));
  55155. } else if (path.isFunction()) {
  55156. return _getCompletionRecords(path.get("body"), context);
  55157. } else if (path.isTryStatement()) {
  55158. records = addCompletionRecords(path.get("block"), records, context);
  55159. records = addCompletionRecords(path.get("handler"), records, context);
  55160. } else if (path.isCatchClause()) {
  55161. records = addCompletionRecords(path.get("body"), records, context);
  55162. } else if (path.isSwitchStatement()) {
  55163. records = completionRecordForSwitch(path.get("cases"), records, context);
  55164. } else if (path.isSwitchCase()) {
  55165. records = records.concat(getStatementListCompletion(path.get("consequent"), {
  55166. canHaveBreak: true,
  55167. shouldPopulateBreak: false,
  55168. inCaseClause: true
  55169. }));
  55170. } else if (path.isBreakStatement()) {
  55171. records.push(BreakCompletion(path));
  55172. } else {
  55173. records.push(NormalCompletion(path));
  55174. }
  55175. return records;
  55176. }
  55177. function getCompletionRecords() {
  55178. const records = _getCompletionRecords(this, {
  55179. canHaveBreak: false,
  55180. shouldPopulateBreak: false,
  55181. inCaseClause: false
  55182. });
  55183. return records.map((r) => r.path);
  55184. }
  55185. function getSibling(key) {
  55186. return _index.default.get({
  55187. parentPath: this.parentPath,
  55188. parent: this.parent,
  55189. container: this.container,
  55190. listKey: this.listKey,
  55191. key
  55192. }).setContext(this.context);
  55193. }
  55194. function getPrevSibling() {
  55195. return this.getSibling(this.key - 1);
  55196. }
  55197. function getNextSibling() {
  55198. return this.getSibling(this.key + 1);
  55199. }
  55200. function getAllNextSiblings() {
  55201. let _key = this.key;
  55202. let sibling = this.getSibling(++_key);
  55203. const siblings = [];
  55204. while (sibling.node) {
  55205. siblings.push(sibling);
  55206. sibling = this.getSibling(++_key);
  55207. }
  55208. return siblings;
  55209. }
  55210. function getAllPrevSiblings() {
  55211. let _key = this.key;
  55212. let sibling = this.getSibling(--_key);
  55213. const siblings = [];
  55214. while (sibling.node) {
  55215. siblings.push(sibling);
  55216. sibling = this.getSibling(--_key);
  55217. }
  55218. return siblings;
  55219. }
  55220. function get(key, context = true) {
  55221. if (context === true)
  55222. context = this.context;
  55223. const parts = key.split(".");
  55224. if (parts.length === 1) {
  55225. return this._getKey(key, context);
  55226. } else {
  55227. return this._getPattern(parts, context);
  55228. }
  55229. }
  55230. function _getKey(key, context) {
  55231. const node = this.node;
  55232. const container = node[key];
  55233. if (Array.isArray(container)) {
  55234. return container.map((_, i) => {
  55235. return _index.default.get({
  55236. listKey: key,
  55237. parentPath: this,
  55238. parent: node,
  55239. container,
  55240. key: i
  55241. }).setContext(context);
  55242. });
  55243. } else {
  55244. return _index.default.get({
  55245. parentPath: this,
  55246. parent: node,
  55247. container: node,
  55248. key
  55249. }).setContext(context);
  55250. }
  55251. }
  55252. function _getPattern(parts, context) {
  55253. let path = this;
  55254. for (const part of parts) {
  55255. if (part === ".") {
  55256. path = path.parentPath;
  55257. } else {
  55258. if (Array.isArray(path)) {
  55259. path = path[part];
  55260. } else {
  55261. path = path.get(part, context);
  55262. }
  55263. }
  55264. }
  55265. return path;
  55266. }
  55267. function getBindingIdentifiers(duplicates) {
  55268. return t2.getBindingIdentifiers(this.node, duplicates);
  55269. }
  55270. function getOuterBindingIdentifiers(duplicates) {
  55271. return t2.getOuterBindingIdentifiers(this.node, duplicates);
  55272. }
  55273. function getBindingIdentifierPaths(duplicates = false, outerOnly = false) {
  55274. const path = this;
  55275. let search2 = [].concat(path);
  55276. const ids = /* @__PURE__ */ Object.create(null);
  55277. while (search2.length) {
  55278. const id = search2.shift();
  55279. if (!id)
  55280. continue;
  55281. if (!id.node)
  55282. continue;
  55283. const keys2 = t2.getBindingIdentifiers.keys[id.node.type];
  55284. if (id.isIdentifier()) {
  55285. if (duplicates) {
  55286. const _ids = ids[id.node.name] = ids[id.node.name] || [];
  55287. _ids.push(id);
  55288. } else {
  55289. ids[id.node.name] = id;
  55290. }
  55291. continue;
  55292. }
  55293. if (id.isExportDeclaration()) {
  55294. const declaration = id.get("declaration");
  55295. if (declaration.isDeclaration()) {
  55296. search2.push(declaration);
  55297. }
  55298. continue;
  55299. }
  55300. if (outerOnly) {
  55301. if (id.isFunctionDeclaration()) {
  55302. search2.push(id.get("id"));
  55303. continue;
  55304. }
  55305. if (id.isFunctionExpression()) {
  55306. continue;
  55307. }
  55308. }
  55309. if (keys2) {
  55310. for (let i = 0; i < keys2.length; i++) {
  55311. const key = keys2[i];
  55312. const child = id.get(key);
  55313. if (Array.isArray(child) || child.node) {
  55314. search2 = search2.concat(child);
  55315. }
  55316. }
  55317. }
  55318. }
  55319. return ids;
  55320. }
  55321. function getOuterBindingIdentifierPaths(duplicates) {
  55322. return this.getBindingIdentifierPaths(duplicates, true);
  55323. }
  55324. }
  55325. });
  55326. // node_modules/estree-to-babel/node_modules/@babel/traverse/lib/path/comments.js
  55327. var require_comments = __commonJS({
  55328. "node_modules/estree-to-babel/node_modules/@babel/traverse/lib/path/comments.js"(exports) {
  55329. "use strict";
  55330. Object.defineProperty(exports, "__esModule", {
  55331. value: true
  55332. });
  55333. exports.shareCommentsWithSiblings = shareCommentsWithSiblings;
  55334. exports.addComment = addComment;
  55335. exports.addComments = addComments;
  55336. var t2 = require_lib4();
  55337. function shareCommentsWithSiblings() {
  55338. if (typeof this.key === "string")
  55339. return;
  55340. const node = this.node;
  55341. if (!node)
  55342. return;
  55343. const trailing = node.trailingComments;
  55344. const leading = node.leadingComments;
  55345. if (!trailing && !leading)
  55346. return;
  55347. const prev = this.getSibling(this.key - 1);
  55348. const next = this.getSibling(this.key + 1);
  55349. const hasPrev = Boolean(prev.node);
  55350. const hasNext = Boolean(next.node);
  55351. if (hasPrev && !hasNext) {
  55352. prev.addComments("trailing", trailing);
  55353. } else if (hasNext && !hasPrev) {
  55354. next.addComments("leading", leading);
  55355. }
  55356. }
  55357. function addComment(type, content3, line) {
  55358. t2.addComment(this.node, type, content3, line);
  55359. }
  55360. function addComments(type, comments) {
  55361. t2.addComments(this.node, type, comments);
  55362. }
  55363. }
  55364. });
  55365. // node_modules/estree-to-babel/node_modules/@babel/traverse/lib/path/index.js
  55366. var require_path = __commonJS({
  55367. "node_modules/estree-to-babel/node_modules/@babel/traverse/lib/path/index.js"(exports) {
  55368. "use strict";
  55369. Object.defineProperty(exports, "__esModule", {
  55370. value: true
  55371. });
  55372. exports.default = exports.SHOULD_SKIP = exports.SHOULD_STOP = exports.REMOVED = void 0;
  55373. var virtualTypes = require_virtual_types();
  55374. var _debug = require_src();
  55375. var _index = require_lib14();
  55376. var _scope = require_scope();
  55377. var t2 = require_lib4();
  55378. var _cache = require_cache();
  55379. var _generator = require_lib6();
  55380. var NodePath_ancestry = require_ancestry();
  55381. var NodePath_inference = require_inference();
  55382. var NodePath_replacement = require_replacement();
  55383. var NodePath_evaluation = require_evaluation();
  55384. var NodePath_conversion = require_conversion();
  55385. var NodePath_introspection = require_introspection();
  55386. var NodePath_context = require_context();
  55387. var NodePath_removal = require_removal();
  55388. var NodePath_modification = require_modification();
  55389. var NodePath_family = require_family();
  55390. var NodePath_comments = require_comments();
  55391. var debug = _debug("babel");
  55392. var REMOVED = 1 << 0;
  55393. exports.REMOVED = REMOVED;
  55394. var SHOULD_STOP = 1 << 1;
  55395. exports.SHOULD_STOP = SHOULD_STOP;
  55396. var SHOULD_SKIP = 1 << 2;
  55397. exports.SHOULD_SKIP = SHOULD_SKIP;
  55398. var NodePath = class {
  55399. constructor(hub, parent) {
  55400. this.contexts = [];
  55401. this.state = null;
  55402. this.opts = null;
  55403. this._traverseFlags = 0;
  55404. this.skipKeys = null;
  55405. this.parentPath = null;
  55406. this.container = null;
  55407. this.listKey = null;
  55408. this.key = null;
  55409. this.node = null;
  55410. this.type = null;
  55411. this.parent = parent;
  55412. this.hub = hub;
  55413. this.data = null;
  55414. this.context = null;
  55415. this.scope = null;
  55416. }
  55417. static get({
  55418. hub,
  55419. parentPath,
  55420. parent,
  55421. container,
  55422. listKey,
  55423. key
  55424. }) {
  55425. if (!hub && parentPath) {
  55426. hub = parentPath.hub;
  55427. }
  55428. if (!parent) {
  55429. throw new Error("To get a node path the parent needs to exist");
  55430. }
  55431. const targetNode = container[key];
  55432. let paths = _cache.path.get(parent);
  55433. if (!paths) {
  55434. paths = /* @__PURE__ */ new Map();
  55435. _cache.path.set(parent, paths);
  55436. }
  55437. let path = paths.get(targetNode);
  55438. if (!path) {
  55439. path = new NodePath(hub, parent);
  55440. if (targetNode)
  55441. paths.set(targetNode, path);
  55442. }
  55443. path.setup(parentPath, container, listKey, key);
  55444. return path;
  55445. }
  55446. getScope(scope) {
  55447. return this.isScope() ? new _scope.default(this) : scope;
  55448. }
  55449. setData(key, val) {
  55450. if (this.data == null) {
  55451. this.data = /* @__PURE__ */ Object.create(null);
  55452. }
  55453. return this.data[key] = val;
  55454. }
  55455. getData(key, def) {
  55456. if (this.data == null) {
  55457. this.data = /* @__PURE__ */ Object.create(null);
  55458. }
  55459. let val = this.data[key];
  55460. if (val === void 0 && def !== void 0)
  55461. val = this.data[key] = def;
  55462. return val;
  55463. }
  55464. buildCodeFrameError(msg, Error2 = SyntaxError) {
  55465. return this.hub.buildError(this.node, msg, Error2);
  55466. }
  55467. traverse(visitor, state) {
  55468. (0, _index.default)(this.node, visitor, this.scope, state, this);
  55469. }
  55470. set(key, node) {
  55471. t2.validate(this.node, key, node);
  55472. this.node[key] = node;
  55473. }
  55474. getPathLocation() {
  55475. const parts = [];
  55476. let path = this;
  55477. do {
  55478. let key = path.key;
  55479. if (path.inList)
  55480. key = `${path.listKey}[${key}]`;
  55481. parts.unshift(key);
  55482. } while (path = path.parentPath);
  55483. return parts.join(".");
  55484. }
  55485. debug(message) {
  55486. if (!debug.enabled)
  55487. return;
  55488. debug(`${this.getPathLocation()} ${this.type}: ${message}`);
  55489. }
  55490. toString() {
  55491. return (0, _generator.default)(this.node).code;
  55492. }
  55493. get inList() {
  55494. return !!this.listKey;
  55495. }
  55496. set inList(inList) {
  55497. if (!inList) {
  55498. this.listKey = null;
  55499. }
  55500. }
  55501. get parentKey() {
  55502. return this.listKey || this.key;
  55503. }
  55504. get shouldSkip() {
  55505. return !!(this._traverseFlags & SHOULD_SKIP);
  55506. }
  55507. set shouldSkip(v) {
  55508. if (v) {
  55509. this._traverseFlags |= SHOULD_SKIP;
  55510. } else {
  55511. this._traverseFlags &= ~SHOULD_SKIP;
  55512. }
  55513. }
  55514. get shouldStop() {
  55515. return !!(this._traverseFlags & SHOULD_STOP);
  55516. }
  55517. set shouldStop(v) {
  55518. if (v) {
  55519. this._traverseFlags |= SHOULD_STOP;
  55520. } else {
  55521. this._traverseFlags &= ~SHOULD_STOP;
  55522. }
  55523. }
  55524. get removed() {
  55525. return !!(this._traverseFlags & REMOVED);
  55526. }
  55527. set removed(v) {
  55528. if (v) {
  55529. this._traverseFlags |= REMOVED;
  55530. } else {
  55531. this._traverseFlags &= ~REMOVED;
  55532. }
  55533. }
  55534. };
  55535. Object.assign(NodePath.prototype, NodePath_ancestry, NodePath_inference, NodePath_replacement, NodePath_evaluation, NodePath_conversion, NodePath_introspection, NodePath_context, NodePath_removal, NodePath_modification, NodePath_family, NodePath_comments);
  55536. for (const type of t2.TYPES) {
  55537. const typeKey = `is${type}`;
  55538. const fn = t2[typeKey];
  55539. NodePath.prototype[typeKey] = function(opts) {
  55540. return fn(this.node, opts);
  55541. };
  55542. NodePath.prototype[`assert${type}`] = function(opts) {
  55543. if (!fn(this.node, opts)) {
  55544. throw new TypeError(`Expected node path of type ${type}`);
  55545. }
  55546. };
  55547. }
  55548. for (const type of Object.keys(virtualTypes)) {
  55549. if (type[0] === "_")
  55550. continue;
  55551. if (t2.TYPES.indexOf(type) < 0)
  55552. t2.TYPES.push(type);
  55553. const virtualType = virtualTypes[type];
  55554. NodePath.prototype[`is${type}`] = function(opts) {
  55555. return virtualType.checkPath(this, opts);
  55556. };
  55557. }
  55558. var _default = NodePath;
  55559. exports.default = _default;
  55560. }
  55561. });
  55562. // node_modules/estree-to-babel/node_modules/@babel/traverse/lib/context.js
  55563. var require_context2 = __commonJS({
  55564. "node_modules/estree-to-babel/node_modules/@babel/traverse/lib/context.js"(exports) {
  55565. "use strict";
  55566. Object.defineProperty(exports, "__esModule", {
  55567. value: true
  55568. });
  55569. exports.default = void 0;
  55570. var _path = require_path();
  55571. var t2 = require_lib4();
  55572. var testing = process.env.NODE_ENV === "test";
  55573. var TraversalContext = class {
  55574. constructor(scope, opts, state, parentPath) {
  55575. this.queue = null;
  55576. this.priorityQueue = null;
  55577. this.parentPath = parentPath;
  55578. this.scope = scope;
  55579. this.state = state;
  55580. this.opts = opts;
  55581. }
  55582. shouldVisit(node) {
  55583. const opts = this.opts;
  55584. if (opts.enter || opts.exit)
  55585. return true;
  55586. if (opts[node.type])
  55587. return true;
  55588. const keys2 = t2.VISITOR_KEYS[node.type];
  55589. if (!(keys2 != null && keys2.length))
  55590. return false;
  55591. for (const key of keys2) {
  55592. if (node[key])
  55593. return true;
  55594. }
  55595. return false;
  55596. }
  55597. create(node, obj, key, listKey) {
  55598. return _path.default.get({
  55599. parentPath: this.parentPath,
  55600. parent: node,
  55601. container: obj,
  55602. key,
  55603. listKey
  55604. });
  55605. }
  55606. maybeQueue(path, notPriority) {
  55607. if (this.trap) {
  55608. throw new Error("Infinite cycle detected");
  55609. }
  55610. if (this.queue) {
  55611. if (notPriority) {
  55612. this.queue.push(path);
  55613. } else {
  55614. this.priorityQueue.push(path);
  55615. }
  55616. }
  55617. }
  55618. visitMultiple(container, parent, listKey) {
  55619. if (container.length === 0)
  55620. return false;
  55621. const queue = [];
  55622. for (let key = 0; key < container.length; key++) {
  55623. const node = container[key];
  55624. if (node && this.shouldVisit(node)) {
  55625. queue.push(this.create(parent, container, key, listKey));
  55626. }
  55627. }
  55628. return this.visitQueue(queue);
  55629. }
  55630. visitSingle(node, key) {
  55631. if (this.shouldVisit(node[key])) {
  55632. return this.visitQueue([this.create(node, node, key)]);
  55633. } else {
  55634. return false;
  55635. }
  55636. }
  55637. visitQueue(queue) {
  55638. this.queue = queue;
  55639. this.priorityQueue = [];
  55640. const visited = /* @__PURE__ */ new WeakSet();
  55641. let stop = false;
  55642. for (const path of queue) {
  55643. path.resync();
  55644. if (path.contexts.length === 0 || path.contexts[path.contexts.length - 1] !== this) {
  55645. path.pushContext(this);
  55646. }
  55647. if (path.key === null)
  55648. continue;
  55649. if (testing && queue.length >= 1e4) {
  55650. this.trap = true;
  55651. }
  55652. const {
  55653. node
  55654. } = path;
  55655. if (visited.has(node))
  55656. continue;
  55657. if (node)
  55658. visited.add(node);
  55659. if (path.visit()) {
  55660. stop = true;
  55661. break;
  55662. }
  55663. if (this.priorityQueue.length) {
  55664. stop = this.visitQueue(this.priorityQueue);
  55665. this.priorityQueue = [];
  55666. this.queue = queue;
  55667. if (stop)
  55668. break;
  55669. }
  55670. }
  55671. for (const path of queue) {
  55672. path.popContext();
  55673. }
  55674. this.queue = null;
  55675. return stop;
  55676. }
  55677. visit(node, key) {
  55678. const nodes = node[key];
  55679. if (!nodes)
  55680. return false;
  55681. if (Array.isArray(nodes)) {
  55682. return this.visitMultiple(nodes, node, key);
  55683. } else {
  55684. return this.visitSingle(node, key);
  55685. }
  55686. }
  55687. };
  55688. exports.default = TraversalContext;
  55689. }
  55690. });
  55691. // node_modules/estree-to-babel/node_modules/@babel/traverse/lib/visitors.js
  55692. var require_visitors = __commonJS({
  55693. "node_modules/estree-to-babel/node_modules/@babel/traverse/lib/visitors.js"(exports) {
  55694. "use strict";
  55695. Object.defineProperty(exports, "__esModule", {
  55696. value: true
  55697. });
  55698. exports.explode = explode;
  55699. exports.verify = verify;
  55700. exports.merge = merge2;
  55701. var virtualTypes = require_virtual_types();
  55702. var t2 = require_lib4();
  55703. function explode(visitor) {
  55704. if (visitor._exploded)
  55705. return visitor;
  55706. visitor._exploded = true;
  55707. for (const nodeType of Object.keys(visitor)) {
  55708. if (shouldIgnoreKey(nodeType))
  55709. continue;
  55710. const parts = nodeType.split("|");
  55711. if (parts.length === 1)
  55712. continue;
  55713. const fns = visitor[nodeType];
  55714. delete visitor[nodeType];
  55715. for (const part of parts) {
  55716. visitor[part] = fns;
  55717. }
  55718. }
  55719. verify(visitor);
  55720. delete visitor.__esModule;
  55721. ensureEntranceObjects(visitor);
  55722. ensureCallbackArrays(visitor);
  55723. for (const nodeType of Object.keys(visitor)) {
  55724. if (shouldIgnoreKey(nodeType))
  55725. continue;
  55726. const wrapper = virtualTypes[nodeType];
  55727. if (!wrapper)
  55728. continue;
  55729. const fns = visitor[nodeType];
  55730. for (const type of Object.keys(fns)) {
  55731. fns[type] = wrapCheck(wrapper, fns[type]);
  55732. }
  55733. delete visitor[nodeType];
  55734. if (wrapper.types) {
  55735. for (const type of wrapper.types) {
  55736. if (visitor[type]) {
  55737. mergePair(visitor[type], fns);
  55738. } else {
  55739. visitor[type] = fns;
  55740. }
  55741. }
  55742. } else {
  55743. mergePair(visitor, fns);
  55744. }
  55745. }
  55746. for (const nodeType of Object.keys(visitor)) {
  55747. if (shouldIgnoreKey(nodeType))
  55748. continue;
  55749. const fns = visitor[nodeType];
  55750. let aliases = t2.FLIPPED_ALIAS_KEYS[nodeType];
  55751. const deprecatedKey = t2.DEPRECATED_KEYS[nodeType];
  55752. if (deprecatedKey) {
  55753. console.trace(`Visitor defined for ${nodeType} but it has been renamed to ${deprecatedKey}`);
  55754. aliases = [deprecatedKey];
  55755. }
  55756. if (!aliases)
  55757. continue;
  55758. delete visitor[nodeType];
  55759. for (const alias of aliases) {
  55760. const existing = visitor[alias];
  55761. if (existing) {
  55762. mergePair(existing, fns);
  55763. } else {
  55764. visitor[alias] = Object.assign({}, fns);
  55765. }
  55766. }
  55767. }
  55768. for (const nodeType of Object.keys(visitor)) {
  55769. if (shouldIgnoreKey(nodeType))
  55770. continue;
  55771. ensureCallbackArrays(visitor[nodeType]);
  55772. }
  55773. return visitor;
  55774. }
  55775. function verify(visitor) {
  55776. if (visitor._verified)
  55777. return;
  55778. if (typeof visitor === "function") {
  55779. throw new Error("You passed `traverse()` a function when it expected a visitor object, are you sure you didn't mean `{ enter: Function }`?");
  55780. }
  55781. for (const nodeType of Object.keys(visitor)) {
  55782. if (nodeType === "enter" || nodeType === "exit") {
  55783. validateVisitorMethods(nodeType, visitor[nodeType]);
  55784. }
  55785. if (shouldIgnoreKey(nodeType))
  55786. continue;
  55787. if (t2.TYPES.indexOf(nodeType) < 0) {
  55788. throw new Error(`You gave us a visitor for the node type ${nodeType} but it's not a valid type`);
  55789. }
  55790. const visitors = visitor[nodeType];
  55791. if (typeof visitors === "object") {
  55792. for (const visitorKey of Object.keys(visitors)) {
  55793. if (visitorKey === "enter" || visitorKey === "exit") {
  55794. validateVisitorMethods(`${nodeType}.${visitorKey}`, visitors[visitorKey]);
  55795. } else {
  55796. throw new Error(`You passed \`traverse()\` a visitor object with the property ${nodeType} that has the invalid property ${visitorKey}`);
  55797. }
  55798. }
  55799. }
  55800. }
  55801. visitor._verified = true;
  55802. }
  55803. function validateVisitorMethods(path, val) {
  55804. const fns = [].concat(val);
  55805. for (const fn of fns) {
  55806. if (typeof fn !== "function") {
  55807. throw new TypeError(`Non-function found defined in ${path} with type ${typeof fn}`);
  55808. }
  55809. }
  55810. }
  55811. function merge2(visitors, states = [], wrapper) {
  55812. const rootVisitor = {};
  55813. for (let i = 0; i < visitors.length; i++) {
  55814. const visitor = visitors[i];
  55815. const state = states[i];
  55816. explode(visitor);
  55817. for (const type of Object.keys(visitor)) {
  55818. let visitorType = visitor[type];
  55819. if (state || wrapper) {
  55820. visitorType = wrapWithStateOrWrapper(visitorType, state, wrapper);
  55821. }
  55822. const nodeVisitor = rootVisitor[type] = rootVisitor[type] || {};
  55823. mergePair(nodeVisitor, visitorType);
  55824. }
  55825. }
  55826. return rootVisitor;
  55827. }
  55828. function wrapWithStateOrWrapper(oldVisitor, state, wrapper) {
  55829. const newVisitor = {};
  55830. for (const key of Object.keys(oldVisitor)) {
  55831. let fns = oldVisitor[key];
  55832. if (!Array.isArray(fns))
  55833. continue;
  55834. fns = fns.map(function(fn) {
  55835. let newFn = fn;
  55836. if (state) {
  55837. newFn = function(path) {
  55838. return fn.call(state, path, state);
  55839. };
  55840. }
  55841. if (wrapper) {
  55842. newFn = wrapper(state.key, key, newFn);
  55843. }
  55844. if (newFn !== fn) {
  55845. newFn.toString = () => fn.toString();
  55846. }
  55847. return newFn;
  55848. });
  55849. newVisitor[key] = fns;
  55850. }
  55851. return newVisitor;
  55852. }
  55853. function ensureEntranceObjects(obj) {
  55854. for (const key of Object.keys(obj)) {
  55855. if (shouldIgnoreKey(key))
  55856. continue;
  55857. const fns = obj[key];
  55858. if (typeof fns === "function") {
  55859. obj[key] = {
  55860. enter: fns
  55861. };
  55862. }
  55863. }
  55864. }
  55865. function ensureCallbackArrays(obj) {
  55866. if (obj.enter && !Array.isArray(obj.enter))
  55867. obj.enter = [obj.enter];
  55868. if (obj.exit && !Array.isArray(obj.exit))
  55869. obj.exit = [obj.exit];
  55870. }
  55871. function wrapCheck(wrapper, fn) {
  55872. const newFn = function(path) {
  55873. if (wrapper.checkPath(path)) {
  55874. return fn.apply(this, arguments);
  55875. }
  55876. };
  55877. newFn.toString = () => fn.toString();
  55878. return newFn;
  55879. }
  55880. function shouldIgnoreKey(key) {
  55881. if (key[0] === "_")
  55882. return true;
  55883. if (key === "enter" || key === "exit" || key === "shouldSkip")
  55884. return true;
  55885. if (key === "denylist" || key === "noScope" || key === "skipKeys" || key === "blacklist") {
  55886. return true;
  55887. }
  55888. return false;
  55889. }
  55890. function mergePair(dest, src) {
  55891. for (const key of Object.keys(src)) {
  55892. dest[key] = [].concat(dest[key] || [], src[key]);
  55893. }
  55894. }
  55895. }
  55896. });
  55897. // node_modules/estree-to-babel/node_modules/@babel/traverse/lib/hub.js
  55898. var require_hub = __commonJS({
  55899. "node_modules/estree-to-babel/node_modules/@babel/traverse/lib/hub.js"(exports) {
  55900. "use strict";
  55901. Object.defineProperty(exports, "__esModule", {
  55902. value: true
  55903. });
  55904. exports.default = void 0;
  55905. var Hub = class {
  55906. getCode() {
  55907. }
  55908. getScope() {
  55909. }
  55910. addHelper() {
  55911. throw new Error("Helpers are not supported by the default hub.");
  55912. }
  55913. buildError(node, msg, Error2 = TypeError) {
  55914. return new Error2(msg);
  55915. }
  55916. };
  55917. exports.default = Hub;
  55918. }
  55919. });
  55920. // node_modules/estree-to-babel/node_modules/@babel/traverse/lib/index.js
  55921. var require_lib14 = __commonJS({
  55922. "node_modules/estree-to-babel/node_modules/@babel/traverse/lib/index.js"(exports) {
  55923. "use strict";
  55924. Object.defineProperty(exports, "__esModule", {
  55925. value: true
  55926. });
  55927. Object.defineProperty(exports, "NodePath", {
  55928. enumerable: true,
  55929. get: function() {
  55930. return _path.default;
  55931. }
  55932. });
  55933. Object.defineProperty(exports, "Scope", {
  55934. enumerable: true,
  55935. get: function() {
  55936. return _scope.default;
  55937. }
  55938. });
  55939. Object.defineProperty(exports, "Hub", {
  55940. enumerable: true,
  55941. get: function() {
  55942. return _hub.default;
  55943. }
  55944. });
  55945. exports.visitors = exports.default = void 0;
  55946. var _context = require_context2();
  55947. var visitors = require_visitors();
  55948. exports.visitors = visitors;
  55949. var t2 = require_lib4();
  55950. var cache = require_cache();
  55951. var _path = require_path();
  55952. var _scope = require_scope();
  55953. var _hub = require_hub();
  55954. function traverse(parent, opts = {}, scope, state, parentPath) {
  55955. if (!parent)
  55956. return;
  55957. if (!opts.noScope && !scope) {
  55958. if (parent.type !== "Program" && parent.type !== "File") {
  55959. throw new Error(`You must pass a scope and parentPath unless traversing a Program/File. Instead of that you tried to traverse a ${parent.type} node without passing scope and parentPath.`);
  55960. }
  55961. }
  55962. if (!t2.VISITOR_KEYS[parent.type]) {
  55963. return;
  55964. }
  55965. visitors.explode(opts);
  55966. traverse.node(parent, opts, scope, state, parentPath);
  55967. }
  55968. var _default = traverse;
  55969. exports.default = _default;
  55970. traverse.visitors = visitors;
  55971. traverse.verify = visitors.verify;
  55972. traverse.explode = visitors.explode;
  55973. traverse.cheap = function(node, enter) {
  55974. return t2.traverseFast(node, enter);
  55975. };
  55976. traverse.node = function(node, opts, scope, state, parentPath, skipKeys) {
  55977. const keys2 = t2.VISITOR_KEYS[node.type];
  55978. if (!keys2)
  55979. return;
  55980. const context = new _context.default(scope, opts, state, parentPath);
  55981. for (const key of keys2) {
  55982. if (skipKeys && skipKeys[key])
  55983. continue;
  55984. if (context.visit(node, key))
  55985. return;
  55986. }
  55987. };
  55988. traverse.clearNode = function(node, opts) {
  55989. t2.removeProperties(node, opts);
  55990. cache.path.delete(node);
  55991. };
  55992. traverse.removeProperties = function(tree, opts) {
  55993. t2.traverseFast(tree, traverse.clearNode, opts);
  55994. return tree;
  55995. };
  55996. function hasDenylistedType(path, state) {
  55997. if (path.node.type === state.type) {
  55998. state.has = true;
  55999. path.stop();
  56000. }
  56001. }
  56002. traverse.hasType = function(tree, type, denylistTypes) {
  56003. if (denylistTypes != null && denylistTypes.includes(tree.type))
  56004. return false;
  56005. if (tree.type === type)
  56006. return true;
  56007. const state = {
  56008. has: false,
  56009. type
  56010. };
  56011. traverse(tree, {
  56012. noScope: true,
  56013. denylist: denylistTypes,
  56014. enter: hasDenylistedType
  56015. }, null, state);
  56016. return state.has;
  56017. };
  56018. traverse.cache = cache;
  56019. }
  56020. });
  56021. // node_modules/estree-to-babel/lib/traverse-object-expression.js
  56022. var require_traverse_object_expression = __commonJS({
  56023. "node_modules/estree-to-babel/lib/traverse-object-expression.js"(exports, module) {
  56024. "use strict";
  56025. var { assign } = Object;
  56026. var {
  56027. isFunctionExpression,
  56028. ObjectMethod
  56029. } = require_lib4();
  56030. module.exports = (propertiesPaths) => {
  56031. for (const propPath of propertiesPaths) {
  56032. const {
  56033. computed,
  56034. key,
  56035. value
  56036. } = propPath.node;
  56037. if (isFunctionExpression(value)) {
  56038. propPath.replaceWith(ObjectMethod("method", key, value.params, value.body, computed));
  56039. assign(propPath.node, {
  56040. id: null,
  56041. method: true,
  56042. generator: value.generator,
  56043. loc: getObjectMethodLoc(key, value),
  56044. async: value.async,
  56045. type: "ObjectMethod"
  56046. });
  56047. }
  56048. }
  56049. };
  56050. function getObjectMethodLoc(key, value) {
  56051. return {
  56052. start: key.loc.start,
  56053. end: value.loc.end
  56054. };
  56055. }
  56056. }
  56057. });
  56058. // node_modules/estree-to-babel/lib/set-class-method.js
  56059. var require_set_class_method = __commonJS({
  56060. "node_modules/estree-to-babel/lib/set-class-method.js"(exports, module) {
  56061. "use strict";
  56062. var {
  56063. isPrivateName,
  56064. classPrivateMethod,
  56065. classMethod
  56066. } = require_lib4();
  56067. var { assign } = Object;
  56068. module.exports = (path) => {
  56069. const { node } = path;
  56070. const {
  56071. key,
  56072. kind,
  56073. computed,
  56074. loc
  56075. } = node;
  56076. const {
  56077. body,
  56078. params,
  56079. expression,
  56080. generator
  56081. } = node.value;
  56082. const method = getClassMethod({
  56083. kind,
  56084. key,
  56085. params,
  56086. body,
  56087. computed,
  56088. nodeStatic: node.static
  56089. });
  56090. path.replaceWith(method);
  56091. assign(path.node, {
  56092. loc,
  56093. expression,
  56094. generator
  56095. });
  56096. };
  56097. function getClassMethod({ kind, key, params, body, computed, nodeStatic }) {
  56098. if (isPrivateName(key))
  56099. return classPrivateMethod(
  56100. kind,
  56101. key,
  56102. params,
  56103. body,
  56104. computed
  56105. );
  56106. return classMethod(
  56107. kind,
  56108. key,
  56109. params,
  56110. body,
  56111. computed,
  56112. nodeStatic
  56113. );
  56114. }
  56115. }
  56116. });
  56117. // node_modules/estree-to-babel/lib/set-class-private-property.js
  56118. var require_set_class_private_property = __commonJS({
  56119. "node_modules/estree-to-babel/lib/set-class-private-property.js"(exports, module) {
  56120. "use strict";
  56121. module.exports = (path) => {
  56122. path.node.type = "ClassPrivateProperty";
  56123. };
  56124. }
  56125. });
  56126. // node_modules/estree-to-babel/lib/set-class-private-name.js
  56127. var require_set_class_private_name = __commonJS({
  56128. "node_modules/estree-to-babel/lib/set-class-private-name.js"(exports, module) {
  56129. "use strict";
  56130. var { Identifier } = require_lib4();
  56131. module.exports = (path) => {
  56132. const { node } = path;
  56133. if (!node.name)
  56134. return;
  56135. node.id = Identifier(node.name);
  56136. delete node.name;
  56137. };
  56138. }
  56139. });
  56140. // node_modules/estree-to-babel/lib/set-literal.js
  56141. var require_set_literal = __commonJS({
  56142. "node_modules/estree-to-babel/lib/set-literal.js"(exports, module) {
  56143. "use strict";
  56144. var isString = (a) => typeof a === "string";
  56145. var isNumber = (a) => typeof a === "number";
  56146. var isNull = (a) => a === null;
  56147. var isBool = (a) => typeof a === "boolean";
  56148. module.exports = (node) => {
  56149. const { type, value } = node;
  56150. if (type !== "Literal")
  56151. return;
  56152. if (isNull(value)) {
  56153. node.type = "NullLiteral";
  56154. return;
  56155. }
  56156. if (isString(value)) {
  56157. node.type = "StringLiteral";
  56158. return;
  56159. }
  56160. if (isNumber(value)) {
  56161. node.type = "NumericLiteral";
  56162. return;
  56163. }
  56164. if (isBool(value)) {
  56165. node.type = "BooleanLiteral";
  56166. return;
  56167. }
  56168. if (node.regex) {
  56169. transformRegExp(node);
  56170. return;
  56171. }
  56172. };
  56173. function transformRegExp(node) {
  56174. node.type = "RegExpLiteral";
  56175. for (const key of Object.keys(node.regex)) {
  56176. node[key] = node.regex[key];
  56177. }
  56178. delete node.regex;
  56179. }
  56180. }
  56181. });
  56182. // node_modules/estree-to-babel/lib/convert-import-to-call.js
  56183. var require_convert_import_to_call = __commonJS({
  56184. "node_modules/estree-to-babel/lib/convert-import-to-call.js"(exports, module) {
  56185. "use strict";
  56186. var {
  56187. CallExpression,
  56188. Identifier
  56189. } = require_lib4();
  56190. var setLiteral = require_set_literal();
  56191. module.exports = (path) => {
  56192. const { source } = path.node;
  56193. setLiteral(source);
  56194. const callNode = CallExpression(Identifier("import"), [
  56195. source
  56196. ]);
  56197. path.replaceWith(callNode);
  56198. };
  56199. }
  56200. });
  56201. // node_modules/estree-to-babel/lib/convert-chain-expression.js
  56202. var require_convert_chain_expression = __commonJS({
  56203. "node_modules/estree-to-babel/lib/convert-chain-expression.js"(exports, module) {
  56204. "use strict";
  56205. module.exports = (path) => {
  56206. const expressionPath = path.get("expression");
  56207. const { expression } = path.node;
  56208. if (expressionPath.isCallExpression())
  56209. expression.stype = "OptionalCallExpression";
  56210. else
  56211. expression.type = "OptionalMemberExpression";
  56212. path.replaceWith(expression);
  56213. };
  56214. }
  56215. });
  56216. // node_modules/estree-to-babel/lib/convert-import-declaration.js
  56217. var require_convert_import_declaration = __commonJS({
  56218. "node_modules/estree-to-babel/lib/convert-import-declaration.js"(exports, module) {
  56219. "use strict";
  56220. module.exports = (path) => {
  56221. const { assertions = [] } = path.node;
  56222. path.node.assertions = assertions;
  56223. };
  56224. }
  56225. });
  56226. // node_modules/estree-to-babel/lib/convert-export-declaration.js
  56227. var require_convert_export_declaration = __commonJS({
  56228. "node_modules/estree-to-babel/lib/convert-export-declaration.js"(exports, module) {
  56229. "use strict";
  56230. var { assign } = Object;
  56231. module.exports = (path) => {
  56232. const { assertions = [] } = path.node;
  56233. assign(path.node, {
  56234. assertions
  56235. });
  56236. };
  56237. }
  56238. });
  56239. // node_modules/estree-to-babel/lib/ts.js
  56240. var require_ts = __commonJS({
  56241. "node_modules/estree-to-babel/lib/ts.js"(exports, module) {
  56242. "use strict";
  56243. module.exports.convertTSClassImplements = (path) => {
  56244. path.node.type = "TSExpressionWithTypeArguments";
  56245. };
  56246. module.exports.convertPropertyDefinition = (path) => {
  56247. const { node } = path;
  56248. if (node.key.type === "PrivateIdentifier") {
  56249. const { key } = node;
  56250. node.type = "ClassPrivateProperty";
  56251. node.key = createPrivateName(key);
  56252. return;
  56253. }
  56254. path.node.type = "ClassProperty";
  56255. };
  56256. module.exports.convertTSInterfaceHeritage = (path) => {
  56257. path.node.type = "TSExpressionWithTypeArguments";
  56258. let { expression } = path.node;
  56259. while (expression.type === "MemberExpression") {
  56260. const { object, property } = expression;
  56261. expression.type = "TSQualifiedName";
  56262. expression.left = object;
  56263. expression.right = property;
  56264. delete expression.object;
  56265. delete expression.property;
  56266. expression = object;
  56267. }
  56268. };
  56269. module.exports.convertPrivateIdentifier = (path) => {
  56270. path.replaceWith(createPrivateName(path.node));
  56271. };
  56272. module.exports.convertTSAbstractMethodDefinition = (path) => {
  56273. const { node } = path;
  56274. const {
  56275. generator,
  56276. async,
  56277. params,
  56278. id,
  56279. returnType
  56280. } = node.value;
  56281. const newNode = {
  56282. ...node,
  56283. abstract: true,
  56284. generator,
  56285. async,
  56286. params,
  56287. id,
  56288. returnType,
  56289. type: "TSDeclareMethod"
  56290. };
  56291. delete newNode.value;
  56292. path.replaceWith(newNode);
  56293. };
  56294. function createPrivateName(node) {
  56295. return {
  56296. type: "PrivateName",
  56297. id: {
  56298. ...node,
  56299. type: "Identifier"
  56300. }
  56301. };
  56302. }
  56303. }
  56304. });
  56305. // node_modules/estree-to-babel/lib/comments.js
  56306. var require_comments2 = __commonJS({
  56307. "node_modules/estree-to-babel/lib/comments.js"(exports, module) {
  56308. "use strict";
  56309. module.exports.convertNodeComments = (node) => {
  56310. const { comments } = node;
  56311. if (!comments)
  56312. return;
  56313. delete node.comments;
  56314. node.leadingComments = void 0;
  56315. node.trailingComments = void 0;
  56316. node.innerComments = void 0;
  56317. for (const comment2 of comments) {
  56318. const group = getCommentGroup(comment2);
  56319. if (!node[group])
  56320. node[group] = [];
  56321. delete comment2.leading;
  56322. delete comment2.trailing;
  56323. comment2.type = getCommentType(comment2);
  56324. node[group].push(comment2);
  56325. }
  56326. };
  56327. module.exports.convertProgramComments = (comments) => {
  56328. for (const comment2 of comments) {
  56329. comment2.type = getCommentType(comment2);
  56330. }
  56331. return comments;
  56332. };
  56333. function getCommentType({ type }) {
  56334. return `Comment${type}`;
  56335. }
  56336. function getCommentGroup({ trailing, leading }) {
  56337. if (trailing)
  56338. return "trailingComments";
  56339. if (leading)
  56340. return "leadingComments";
  56341. return "innerComments";
  56342. }
  56343. }
  56344. });
  56345. // node_modules/estree-to-babel/lib/get-ast.js
  56346. var require_get_ast = __commonJS({
  56347. "node_modules/estree-to-babel/lib/get-ast.js"(exports, module) {
  56348. "use strict";
  56349. var { convertProgramComments } = require_comments2();
  56350. module.exports = (node) => {
  56351. if (node.type === "File")
  56352. return node;
  56353. const {
  56354. comments = [],
  56355. tokens,
  56356. ...program
  56357. } = node;
  56358. const ast = {
  56359. type: "File",
  56360. program: {
  56361. ...program,
  56362. directives: []
  56363. },
  56364. comments: convertProgramComments(comments),
  56365. tokens
  56366. };
  56367. return ast;
  56368. };
  56369. }
  56370. });
  56371. // node_modules/estree-to-babel/lib/estree-to-babel.js
  56372. var require_estree_to_babel = __commonJS({
  56373. "node_modules/estree-to-babel/lib/estree-to-babel.js"(exports, module) {
  56374. "use strict";
  56375. var traverse = require_lib14().default;
  56376. var {
  56377. isObjectExpression,
  56378. isExportDeclaration
  56379. } = require_lib4();
  56380. var traverseObjectExpression = require_traverse_object_expression();
  56381. var setClassMethod = require_set_class_method();
  56382. var setClassPrivateProperty = require_set_class_private_property();
  56383. var setClassPrivateName = require_set_class_private_name();
  56384. var convertImportToCall = require_convert_import_to_call();
  56385. var convertChainExpression = require_convert_chain_expression();
  56386. var convertImportDeclaration = require_convert_import_declaration();
  56387. var convertExportDeclaration = require_convert_export_declaration();
  56388. var {
  56389. convertTSClassImplements,
  56390. convertTSInterfaceHeritage,
  56391. convertTSAbstractMethodDefinition,
  56392. convertPropertyDefinition,
  56393. convertPrivateIdentifier
  56394. } = require_ts();
  56395. var { convertNodeComments } = require_comments2();
  56396. var setLiteral = require_set_literal();
  56397. var getAST = require_get_ast();
  56398. module.exports = (node) => {
  56399. const ast = getAST(node);
  56400. traverse(ast, {
  56401. noScope: true,
  56402. enter(path) {
  56403. const { node: node2 } = path;
  56404. const { type } = node2;
  56405. if (/Literal$/.test(type)) {
  56406. setLiteral(node2);
  56407. return setEsprimaRaw(node2);
  56408. }
  56409. if (type === "Property")
  56410. return setObjectProperty(node2);
  56411. if (type === "MethodDefinition")
  56412. return setClassMethod(path);
  56413. if (type === "FieldDefinition")
  56414. return setClassPrivateProperty(path);
  56415. if (type === "PrivateName")
  56416. return setClassPrivateName(path);
  56417. if (type === "ImportExpression")
  56418. return convertImportToCall(path);
  56419. if (type === "ImportDeclaration")
  56420. return convertImportDeclaration(path);
  56421. if (isExportDeclaration(path))
  56422. return convertExportDeclaration(path);
  56423. if (type === "ChainExpression")
  56424. return convertChainExpression(path);
  56425. if (type === "TSAbstractMethodDefinition")
  56426. return convertTSAbstractMethodDefinition(path);
  56427. if (type === "TSInterfaceHeritage")
  56428. return convertTSInterfaceHeritage(path);
  56429. if (type === "PropertyDefinition")
  56430. return convertPropertyDefinition(path);
  56431. if (type === "PrivateIdentifier")
  56432. return convertPrivateIdentifier(path);
  56433. if (type === "TSClassImplements")
  56434. return convertTSClassImplements(path);
  56435. },
  56436. exit(path) {
  56437. const { node: node2 } = path;
  56438. convertNodeComments(node2);
  56439. if (isObjectExpression(node2))
  56440. return traverseObjectExpression(path.get("properties"));
  56441. }
  56442. });
  56443. return ast;
  56444. };
  56445. function setObjectProperty(node) {
  56446. node.type = "ObjectProperty";
  56447. }
  56448. function setEsprimaRaw(node) {
  56449. const { raw } = node;
  56450. node.raw = raw || node.extra?.raw;
  56451. node.extra = node.extra || {
  56452. raw
  56453. };
  56454. }
  56455. }
  56456. });
  56457. // node_modules/@babel/traverse/lib/path/lib/virtual-types.js
  56458. var require_virtual_types2 = __commonJS({
  56459. "node_modules/@babel/traverse/lib/path/lib/virtual-types.js"(exports) {
  56460. "use strict";
  56461. Object.defineProperty(exports, "__esModule", {
  56462. value: true
  56463. });
  56464. exports.ForAwaitStatement = exports.NumericLiteralTypeAnnotation = exports.ExistentialTypeParam = exports.SpreadProperty = exports.RestProperty = exports.Flow = exports.Pure = exports.Generated = exports.User = exports.Var = exports.BlockScoped = exports.Referenced = exports.Scope = exports.Expression = exports.Statement = exports.BindingIdentifier = exports.ReferencedMemberExpression = exports.ReferencedIdentifier = void 0;
  56465. var t2 = require_lib2();
  56466. var ReferencedIdentifier = {
  56467. types: ["Identifier", "JSXIdentifier"],
  56468. checkPath(path, opts) {
  56469. const {
  56470. node,
  56471. parent
  56472. } = path;
  56473. if (!t2.isIdentifier(node, opts) && !t2.isJSXMemberExpression(parent, opts)) {
  56474. if (t2.isJSXIdentifier(node, opts)) {
  56475. if (t2.react.isCompatTag(node.name))
  56476. return false;
  56477. } else {
  56478. return false;
  56479. }
  56480. }
  56481. return t2.isReferenced(node, parent, path.parentPath.parent);
  56482. }
  56483. };
  56484. exports.ReferencedIdentifier = ReferencedIdentifier;
  56485. var ReferencedMemberExpression = {
  56486. types: ["MemberExpression"],
  56487. checkPath({
  56488. node,
  56489. parent
  56490. }) {
  56491. return t2.isMemberExpression(node) && t2.isReferenced(node, parent);
  56492. }
  56493. };
  56494. exports.ReferencedMemberExpression = ReferencedMemberExpression;
  56495. var BindingIdentifier = {
  56496. types: ["Identifier"],
  56497. checkPath(path) {
  56498. const {
  56499. node,
  56500. parent
  56501. } = path;
  56502. const grandparent = path.parentPath.parent;
  56503. return t2.isIdentifier(node) && t2.isBinding(node, parent, grandparent);
  56504. }
  56505. };
  56506. exports.BindingIdentifier = BindingIdentifier;
  56507. var Statement = {
  56508. types: ["Statement"],
  56509. checkPath({
  56510. node,
  56511. parent
  56512. }) {
  56513. if (t2.isStatement(node)) {
  56514. if (t2.isVariableDeclaration(node)) {
  56515. if (t2.isForXStatement(parent, {
  56516. left: node
  56517. }))
  56518. return false;
  56519. if (t2.isForStatement(parent, {
  56520. init: node
  56521. }))
  56522. return false;
  56523. }
  56524. return true;
  56525. } else {
  56526. return false;
  56527. }
  56528. }
  56529. };
  56530. exports.Statement = Statement;
  56531. var Expression = {
  56532. types: ["Expression"],
  56533. checkPath(path) {
  56534. if (path.isIdentifier()) {
  56535. return path.isReferencedIdentifier();
  56536. } else {
  56537. return t2.isExpression(path.node);
  56538. }
  56539. }
  56540. };
  56541. exports.Expression = Expression;
  56542. var Scope4 = {
  56543. types: ["Scopable", "Pattern"],
  56544. checkPath(path) {
  56545. return t2.isScope(path.node, path.parent);
  56546. }
  56547. };
  56548. exports.Scope = Scope4;
  56549. var Referenced = {
  56550. checkPath(path) {
  56551. return t2.isReferenced(path.node, path.parent);
  56552. }
  56553. };
  56554. exports.Referenced = Referenced;
  56555. var BlockScoped = {
  56556. checkPath(path) {
  56557. return t2.isBlockScoped(path.node);
  56558. }
  56559. };
  56560. exports.BlockScoped = BlockScoped;
  56561. var Var = {
  56562. types: ["VariableDeclaration"],
  56563. checkPath(path) {
  56564. return t2.isVar(path.node);
  56565. }
  56566. };
  56567. exports.Var = Var;
  56568. var User = {
  56569. checkPath(path) {
  56570. return path.node && !!path.node.loc;
  56571. }
  56572. };
  56573. exports.User = User;
  56574. var Generated = {
  56575. checkPath(path) {
  56576. return !path.isUser();
  56577. }
  56578. };
  56579. exports.Generated = Generated;
  56580. var Pure = {
  56581. checkPath(path, opts) {
  56582. return path.scope.isPure(path.node, opts);
  56583. }
  56584. };
  56585. exports.Pure = Pure;
  56586. var Flow = {
  56587. types: ["Flow", "ImportDeclaration", "ExportDeclaration", "ImportSpecifier"],
  56588. checkPath({
  56589. node
  56590. }) {
  56591. if (t2.isFlow(node)) {
  56592. return true;
  56593. } else if (t2.isImportDeclaration(node)) {
  56594. return node.importKind === "type" || node.importKind === "typeof";
  56595. } else if (t2.isExportDeclaration(node)) {
  56596. return node.exportKind === "type";
  56597. } else if (t2.isImportSpecifier(node)) {
  56598. return node.importKind === "type" || node.importKind === "typeof";
  56599. } else {
  56600. return false;
  56601. }
  56602. }
  56603. };
  56604. exports.Flow = Flow;
  56605. var RestProperty = {
  56606. types: ["RestElement"],
  56607. checkPath(path) {
  56608. return path.parentPath && path.parentPath.isObjectPattern();
  56609. }
  56610. };
  56611. exports.RestProperty = RestProperty;
  56612. var SpreadProperty = {
  56613. types: ["RestElement"],
  56614. checkPath(path) {
  56615. return path.parentPath && path.parentPath.isObjectExpression();
  56616. }
  56617. };
  56618. exports.SpreadProperty = SpreadProperty;
  56619. var ExistentialTypeParam = {
  56620. types: ["ExistsTypeAnnotation"]
  56621. };
  56622. exports.ExistentialTypeParam = ExistentialTypeParam;
  56623. var NumericLiteralTypeAnnotation = {
  56624. types: ["NumberLiteralTypeAnnotation"]
  56625. };
  56626. exports.NumericLiteralTypeAnnotation = NumericLiteralTypeAnnotation;
  56627. var ForAwaitStatement = {
  56628. types: ["ForOfStatement"],
  56629. checkPath({
  56630. node
  56631. }) {
  56632. return node.await === true;
  56633. }
  56634. };
  56635. exports.ForAwaitStatement = ForAwaitStatement;
  56636. }
  56637. });
  56638. // node_modules/@babel/traverse/lib/scope/binding.js
  56639. var require_binding2 = __commonJS({
  56640. "node_modules/@babel/traverse/lib/scope/binding.js"(exports) {
  56641. "use strict";
  56642. Object.defineProperty(exports, "__esModule", {
  56643. value: true
  56644. });
  56645. exports.default = void 0;
  56646. var Binding = class {
  56647. constructor({
  56648. identifier,
  56649. scope,
  56650. path,
  56651. kind
  56652. }) {
  56653. this.identifier = void 0;
  56654. this.scope = void 0;
  56655. this.path = void 0;
  56656. this.kind = void 0;
  56657. this.constantViolations = [];
  56658. this.constant = true;
  56659. this.referencePaths = [];
  56660. this.referenced = false;
  56661. this.references = 0;
  56662. this.identifier = identifier;
  56663. this.scope = scope;
  56664. this.path = path;
  56665. this.kind = kind;
  56666. this.clearValue();
  56667. }
  56668. deoptValue() {
  56669. this.clearValue();
  56670. this.hasDeoptedValue = true;
  56671. }
  56672. setValue(value) {
  56673. if (this.hasDeoptedValue)
  56674. return;
  56675. this.hasValue = true;
  56676. this.value = value;
  56677. }
  56678. clearValue() {
  56679. this.hasDeoptedValue = false;
  56680. this.hasValue = false;
  56681. this.value = null;
  56682. }
  56683. reassign(path) {
  56684. this.constant = false;
  56685. if (this.constantViolations.indexOf(path) !== -1) {
  56686. return;
  56687. }
  56688. this.constantViolations.push(path);
  56689. }
  56690. reference(path) {
  56691. if (this.referencePaths.indexOf(path) !== -1) {
  56692. return;
  56693. }
  56694. this.referenced = true;
  56695. this.references++;
  56696. this.referencePaths.push(path);
  56697. }
  56698. dereference() {
  56699. this.references--;
  56700. this.referenced = !!this.references;
  56701. }
  56702. };
  56703. exports.default = Binding;
  56704. }
  56705. });
  56706. // node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/utils/shallowEqual.js
  56707. var require_shallowEqual3 = __commonJS({
  56708. "node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/utils/shallowEqual.js"(exports) {
  56709. "use strict";
  56710. Object.defineProperty(exports, "__esModule", {
  56711. value: true
  56712. });
  56713. exports.default = shallowEqual;
  56714. function shallowEqual(actual, expected) {
  56715. const keys2 = Object.keys(expected);
  56716. for (const key of keys2) {
  56717. if (actual[key] !== expected[key]) {
  56718. return false;
  56719. }
  56720. }
  56721. return true;
  56722. }
  56723. }
  56724. });
  56725. // node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/validators/generated/index.js
  56726. var require_generated11 = __commonJS({
  56727. "node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/validators/generated/index.js"(exports) {
  56728. "use strict";
  56729. Object.defineProperty(exports, "__esModule", {
  56730. value: true
  56731. });
  56732. exports.isArrayExpression = isArrayExpression;
  56733. exports.isAssignmentExpression = isAssignmentExpression;
  56734. exports.isBinaryExpression = isBinaryExpression;
  56735. exports.isInterpreterDirective = isInterpreterDirective;
  56736. exports.isDirective = isDirective;
  56737. exports.isDirectiveLiteral = isDirectiveLiteral;
  56738. exports.isBlockStatement = isBlockStatement;
  56739. exports.isBreakStatement = isBreakStatement;
  56740. exports.isCallExpression = isCallExpression;
  56741. exports.isCatchClause = isCatchClause;
  56742. exports.isConditionalExpression = isConditionalExpression;
  56743. exports.isContinueStatement = isContinueStatement;
  56744. exports.isDebuggerStatement = isDebuggerStatement;
  56745. exports.isDoWhileStatement = isDoWhileStatement;
  56746. exports.isEmptyStatement = isEmptyStatement;
  56747. exports.isExpressionStatement = isExpressionStatement2;
  56748. exports.isFile = isFile;
  56749. exports.isForInStatement = isForInStatement;
  56750. exports.isForStatement = isForStatement;
  56751. exports.isFunctionDeclaration = isFunctionDeclaration;
  56752. exports.isFunctionExpression = isFunctionExpression;
  56753. exports.isIdentifier = isIdentifier2;
  56754. exports.isIfStatement = isIfStatement;
  56755. exports.isLabeledStatement = isLabeledStatement;
  56756. exports.isStringLiteral = isStringLiteral2;
  56757. exports.isNumericLiteral = isNumericLiteral;
  56758. exports.isNullLiteral = isNullLiteral;
  56759. exports.isBooleanLiteral = isBooleanLiteral2;
  56760. exports.isRegExpLiteral = isRegExpLiteral;
  56761. exports.isLogicalExpression = isLogicalExpression;
  56762. exports.isMemberExpression = isMemberExpression;
  56763. exports.isNewExpression = isNewExpression;
  56764. exports.isProgram = isProgram;
  56765. exports.isObjectExpression = isObjectExpression;
  56766. exports.isObjectMethod = isObjectMethod;
  56767. exports.isObjectProperty = isObjectProperty;
  56768. exports.isRestElement = isRestElement;
  56769. exports.isReturnStatement = isReturnStatement;
  56770. exports.isSequenceExpression = isSequenceExpression;
  56771. exports.isParenthesizedExpression = isParenthesizedExpression;
  56772. exports.isSwitchCase = isSwitchCase;
  56773. exports.isSwitchStatement = isSwitchStatement;
  56774. exports.isThisExpression = isThisExpression;
  56775. exports.isThrowStatement = isThrowStatement;
  56776. exports.isTryStatement = isTryStatement;
  56777. exports.isUnaryExpression = isUnaryExpression;
  56778. exports.isUpdateExpression = isUpdateExpression;
  56779. exports.isVariableDeclaration = isVariableDeclaration;
  56780. exports.isVariableDeclarator = isVariableDeclarator;
  56781. exports.isWhileStatement = isWhileStatement;
  56782. exports.isWithStatement = isWithStatement;
  56783. exports.isAssignmentPattern = isAssignmentPattern;
  56784. exports.isArrayPattern = isArrayPattern;
  56785. exports.isArrowFunctionExpression = isArrowFunctionExpression;
  56786. exports.isClassBody = isClassBody;
  56787. exports.isClassExpression = isClassExpression;
  56788. exports.isClassDeclaration = isClassDeclaration;
  56789. exports.isExportAllDeclaration = isExportAllDeclaration;
  56790. exports.isExportDefaultDeclaration = isExportDefaultDeclaration;
  56791. exports.isExportNamedDeclaration = isExportNamedDeclaration;
  56792. exports.isExportSpecifier = isExportSpecifier;
  56793. exports.isForOfStatement = isForOfStatement;
  56794. exports.isImportDeclaration = isImportDeclaration;
  56795. exports.isImportDefaultSpecifier = isImportDefaultSpecifier;
  56796. exports.isImportNamespaceSpecifier = isImportNamespaceSpecifier;
  56797. exports.isImportSpecifier = isImportSpecifier;
  56798. exports.isMetaProperty = isMetaProperty;
  56799. exports.isClassMethod = isClassMethod;
  56800. exports.isObjectPattern = isObjectPattern;
  56801. exports.isSpreadElement = isSpreadElement;
  56802. exports.isSuper = isSuper;
  56803. exports.isTaggedTemplateExpression = isTaggedTemplateExpression;
  56804. exports.isTemplateElement = isTemplateElement;
  56805. exports.isTemplateLiteral = isTemplateLiteral;
  56806. exports.isYieldExpression = isYieldExpression;
  56807. exports.isAwaitExpression = isAwaitExpression;
  56808. exports.isImport = isImport;
  56809. exports.isBigIntLiteral = isBigIntLiteral;
  56810. exports.isExportNamespaceSpecifier = isExportNamespaceSpecifier;
  56811. exports.isOptionalMemberExpression = isOptionalMemberExpression;
  56812. exports.isOptionalCallExpression = isOptionalCallExpression;
  56813. exports.isAnyTypeAnnotation = isAnyTypeAnnotation;
  56814. exports.isArrayTypeAnnotation = isArrayTypeAnnotation;
  56815. exports.isBooleanTypeAnnotation = isBooleanTypeAnnotation;
  56816. exports.isBooleanLiteralTypeAnnotation = isBooleanLiteralTypeAnnotation;
  56817. exports.isNullLiteralTypeAnnotation = isNullLiteralTypeAnnotation;
  56818. exports.isClassImplements = isClassImplements;
  56819. exports.isDeclareClass = isDeclareClass;
  56820. exports.isDeclareFunction = isDeclareFunction;
  56821. exports.isDeclareInterface = isDeclareInterface;
  56822. exports.isDeclareModule = isDeclareModule;
  56823. exports.isDeclareModuleExports = isDeclareModuleExports;
  56824. exports.isDeclareTypeAlias = isDeclareTypeAlias;
  56825. exports.isDeclareOpaqueType = isDeclareOpaqueType;
  56826. exports.isDeclareVariable = isDeclareVariable;
  56827. exports.isDeclareExportDeclaration = isDeclareExportDeclaration;
  56828. exports.isDeclareExportAllDeclaration = isDeclareExportAllDeclaration;
  56829. exports.isDeclaredPredicate = isDeclaredPredicate;
  56830. exports.isExistsTypeAnnotation = isExistsTypeAnnotation;
  56831. exports.isFunctionTypeAnnotation = isFunctionTypeAnnotation;
  56832. exports.isFunctionTypeParam = isFunctionTypeParam;
  56833. exports.isGenericTypeAnnotation = isGenericTypeAnnotation;
  56834. exports.isInferredPredicate = isInferredPredicate;
  56835. exports.isInterfaceExtends = isInterfaceExtends;
  56836. exports.isInterfaceDeclaration = isInterfaceDeclaration;
  56837. exports.isInterfaceTypeAnnotation = isInterfaceTypeAnnotation;
  56838. exports.isIntersectionTypeAnnotation = isIntersectionTypeAnnotation;
  56839. exports.isMixedTypeAnnotation = isMixedTypeAnnotation;
  56840. exports.isEmptyTypeAnnotation = isEmptyTypeAnnotation;
  56841. exports.isNullableTypeAnnotation = isNullableTypeAnnotation;
  56842. exports.isNumberLiteralTypeAnnotation = isNumberLiteralTypeAnnotation;
  56843. exports.isNumberTypeAnnotation = isNumberTypeAnnotation;
  56844. exports.isObjectTypeAnnotation = isObjectTypeAnnotation;
  56845. exports.isObjectTypeInternalSlot = isObjectTypeInternalSlot;
  56846. exports.isObjectTypeCallProperty = isObjectTypeCallProperty;
  56847. exports.isObjectTypeIndexer = isObjectTypeIndexer;
  56848. exports.isObjectTypeProperty = isObjectTypeProperty;
  56849. exports.isObjectTypeSpreadProperty = isObjectTypeSpreadProperty;
  56850. exports.isOpaqueType = isOpaqueType;
  56851. exports.isQualifiedTypeIdentifier = isQualifiedTypeIdentifier;
  56852. exports.isStringLiteralTypeAnnotation = isStringLiteralTypeAnnotation;
  56853. exports.isStringTypeAnnotation = isStringTypeAnnotation;
  56854. exports.isSymbolTypeAnnotation = isSymbolTypeAnnotation;
  56855. exports.isThisTypeAnnotation = isThisTypeAnnotation;
  56856. exports.isTupleTypeAnnotation = isTupleTypeAnnotation;
  56857. exports.isTypeofTypeAnnotation = isTypeofTypeAnnotation;
  56858. exports.isTypeAlias = isTypeAlias;
  56859. exports.isTypeAnnotation = isTypeAnnotation;
  56860. exports.isTypeCastExpression = isTypeCastExpression;
  56861. exports.isTypeParameter = isTypeParameter;
  56862. exports.isTypeParameterDeclaration = isTypeParameterDeclaration;
  56863. exports.isTypeParameterInstantiation = isTypeParameterInstantiation;
  56864. exports.isUnionTypeAnnotation = isUnionTypeAnnotation;
  56865. exports.isVariance = isVariance;
  56866. exports.isVoidTypeAnnotation = isVoidTypeAnnotation;
  56867. exports.isEnumDeclaration = isEnumDeclaration;
  56868. exports.isEnumBooleanBody = isEnumBooleanBody;
  56869. exports.isEnumNumberBody = isEnumNumberBody;
  56870. exports.isEnumStringBody = isEnumStringBody;
  56871. exports.isEnumSymbolBody = isEnumSymbolBody;
  56872. exports.isEnumBooleanMember = isEnumBooleanMember;
  56873. exports.isEnumNumberMember = isEnumNumberMember;
  56874. exports.isEnumStringMember = isEnumStringMember;
  56875. exports.isEnumDefaultedMember = isEnumDefaultedMember;
  56876. exports.isIndexedAccessType = isIndexedAccessType;
  56877. exports.isOptionalIndexedAccessType = isOptionalIndexedAccessType;
  56878. exports.isJSXAttribute = isJSXAttribute;
  56879. exports.isJSXClosingElement = isJSXClosingElement;
  56880. exports.isJSXElement = isJSXElement2;
  56881. exports.isJSXEmptyExpression = isJSXEmptyExpression;
  56882. exports.isJSXExpressionContainer = isJSXExpressionContainer2;
  56883. exports.isJSXSpreadChild = isJSXSpreadChild;
  56884. exports.isJSXIdentifier = isJSXIdentifier2;
  56885. exports.isJSXMemberExpression = isJSXMemberExpression;
  56886. exports.isJSXNamespacedName = isJSXNamespacedName;
  56887. exports.isJSXOpeningElement = isJSXOpeningElement;
  56888. exports.isJSXSpreadAttribute = isJSXSpreadAttribute;
  56889. exports.isJSXText = isJSXText;
  56890. exports.isJSXFragment = isJSXFragment2;
  56891. exports.isJSXOpeningFragment = isJSXOpeningFragment;
  56892. exports.isJSXClosingFragment = isJSXClosingFragment;
  56893. exports.isNoop = isNoop;
  56894. exports.isPlaceholder = isPlaceholder;
  56895. exports.isV8IntrinsicIdentifier = isV8IntrinsicIdentifier;
  56896. exports.isArgumentPlaceholder = isArgumentPlaceholder;
  56897. exports.isBindExpression = isBindExpression;
  56898. exports.isClassProperty = isClassProperty;
  56899. exports.isPipelineTopicExpression = isPipelineTopicExpression;
  56900. exports.isPipelineBareFunction = isPipelineBareFunction;
  56901. exports.isPipelinePrimaryTopicReference = isPipelinePrimaryTopicReference;
  56902. exports.isClassPrivateProperty = isClassPrivateProperty;
  56903. exports.isClassPrivateMethod = isClassPrivateMethod;
  56904. exports.isImportAttribute = isImportAttribute;
  56905. exports.isDecorator = isDecorator;
  56906. exports.isDoExpression = isDoExpression;
  56907. exports.isExportDefaultSpecifier = isExportDefaultSpecifier;
  56908. exports.isPrivateName = isPrivateName;
  56909. exports.isRecordExpression = isRecordExpression;
  56910. exports.isTupleExpression = isTupleExpression;
  56911. exports.isDecimalLiteral = isDecimalLiteral;
  56912. exports.isStaticBlock = isStaticBlock;
  56913. exports.isModuleExpression = isModuleExpression;
  56914. exports.isTSParameterProperty = isTSParameterProperty;
  56915. exports.isTSDeclareFunction = isTSDeclareFunction;
  56916. exports.isTSDeclareMethod = isTSDeclareMethod;
  56917. exports.isTSQualifiedName = isTSQualifiedName;
  56918. exports.isTSCallSignatureDeclaration = isTSCallSignatureDeclaration;
  56919. exports.isTSConstructSignatureDeclaration = isTSConstructSignatureDeclaration;
  56920. exports.isTSPropertySignature = isTSPropertySignature;
  56921. exports.isTSMethodSignature = isTSMethodSignature;
  56922. exports.isTSIndexSignature = isTSIndexSignature;
  56923. exports.isTSAnyKeyword = isTSAnyKeyword;
  56924. exports.isTSBooleanKeyword = isTSBooleanKeyword;
  56925. exports.isTSBigIntKeyword = isTSBigIntKeyword;
  56926. exports.isTSIntrinsicKeyword = isTSIntrinsicKeyword;
  56927. exports.isTSNeverKeyword = isTSNeverKeyword;
  56928. exports.isTSNullKeyword = isTSNullKeyword;
  56929. exports.isTSNumberKeyword = isTSNumberKeyword;
  56930. exports.isTSObjectKeyword = isTSObjectKeyword;
  56931. exports.isTSStringKeyword = isTSStringKeyword;
  56932. exports.isTSSymbolKeyword = isTSSymbolKeyword;
  56933. exports.isTSUndefinedKeyword = isTSUndefinedKeyword;
  56934. exports.isTSUnknownKeyword = isTSUnknownKeyword;
  56935. exports.isTSVoidKeyword = isTSVoidKeyword;
  56936. exports.isTSThisType = isTSThisType;
  56937. exports.isTSFunctionType = isTSFunctionType;
  56938. exports.isTSConstructorType = isTSConstructorType;
  56939. exports.isTSTypeReference = isTSTypeReference;
  56940. exports.isTSTypePredicate = isTSTypePredicate;
  56941. exports.isTSTypeQuery = isTSTypeQuery;
  56942. exports.isTSTypeLiteral = isTSTypeLiteral;
  56943. exports.isTSArrayType = isTSArrayType;
  56944. exports.isTSTupleType = isTSTupleType;
  56945. exports.isTSOptionalType = isTSOptionalType;
  56946. exports.isTSRestType = isTSRestType;
  56947. exports.isTSNamedTupleMember = isTSNamedTupleMember;
  56948. exports.isTSUnionType = isTSUnionType;
  56949. exports.isTSIntersectionType = isTSIntersectionType;
  56950. exports.isTSConditionalType = isTSConditionalType;
  56951. exports.isTSInferType = isTSInferType;
  56952. exports.isTSParenthesizedType = isTSParenthesizedType;
  56953. exports.isTSTypeOperator = isTSTypeOperator;
  56954. exports.isTSIndexedAccessType = isTSIndexedAccessType;
  56955. exports.isTSMappedType = isTSMappedType;
  56956. exports.isTSLiteralType = isTSLiteralType;
  56957. exports.isTSExpressionWithTypeArguments = isTSExpressionWithTypeArguments;
  56958. exports.isTSInterfaceDeclaration = isTSInterfaceDeclaration;
  56959. exports.isTSInterfaceBody = isTSInterfaceBody;
  56960. exports.isTSTypeAliasDeclaration = isTSTypeAliasDeclaration;
  56961. exports.isTSAsExpression = isTSAsExpression;
  56962. exports.isTSTypeAssertion = isTSTypeAssertion;
  56963. exports.isTSEnumDeclaration = isTSEnumDeclaration;
  56964. exports.isTSEnumMember = isTSEnumMember;
  56965. exports.isTSModuleDeclaration = isTSModuleDeclaration;
  56966. exports.isTSModuleBlock = isTSModuleBlock;
  56967. exports.isTSImportType = isTSImportType;
  56968. exports.isTSImportEqualsDeclaration = isTSImportEqualsDeclaration;
  56969. exports.isTSExternalModuleReference = isTSExternalModuleReference;
  56970. exports.isTSNonNullExpression = isTSNonNullExpression;
  56971. exports.isTSExportAssignment = isTSExportAssignment;
  56972. exports.isTSNamespaceExportDeclaration = isTSNamespaceExportDeclaration;
  56973. exports.isTSTypeAnnotation = isTSTypeAnnotation;
  56974. exports.isTSTypeParameterInstantiation = isTSTypeParameterInstantiation;
  56975. exports.isTSTypeParameterDeclaration = isTSTypeParameterDeclaration;
  56976. exports.isTSTypeParameter = isTSTypeParameter;
  56977. exports.isExpression = isExpression;
  56978. exports.isBinary = isBinary;
  56979. exports.isScopable = isScopable;
  56980. exports.isBlockParent = isBlockParent;
  56981. exports.isBlock = isBlock;
  56982. exports.isStatement = isStatement;
  56983. exports.isTerminatorless = isTerminatorless;
  56984. exports.isCompletionStatement = isCompletionStatement;
  56985. exports.isConditional = isConditional;
  56986. exports.isLoop = isLoop;
  56987. exports.isWhile = isWhile;
  56988. exports.isExpressionWrapper = isExpressionWrapper;
  56989. exports.isFor = isFor;
  56990. exports.isForXStatement = isForXStatement;
  56991. exports.isFunction = isFunction;
  56992. exports.isFunctionParent = isFunctionParent;
  56993. exports.isPureish = isPureish;
  56994. exports.isDeclaration = isDeclaration2;
  56995. exports.isPatternLike = isPatternLike;
  56996. exports.isLVal = isLVal;
  56997. exports.isTSEntityName = isTSEntityName;
  56998. exports.isLiteral = isLiteral;
  56999. exports.isImmutable = isImmutable;
  57000. exports.isUserWhitespacable = isUserWhitespacable;
  57001. exports.isMethod = isMethod;
  57002. exports.isObjectMember = isObjectMember;
  57003. exports.isProperty = isProperty;
  57004. exports.isUnaryLike = isUnaryLike;
  57005. exports.isPattern = isPattern;
  57006. exports.isClass = isClass;
  57007. exports.isModuleDeclaration = isModuleDeclaration;
  57008. exports.isExportDeclaration = isExportDeclaration;
  57009. exports.isModuleSpecifier = isModuleSpecifier;
  57010. exports.isFlow = isFlow;
  57011. exports.isFlowType = isFlowType;
  57012. exports.isFlowBaseAnnotation = isFlowBaseAnnotation;
  57013. exports.isFlowDeclaration = isFlowDeclaration;
  57014. exports.isFlowPredicate = isFlowPredicate;
  57015. exports.isEnumBody = isEnumBody;
  57016. exports.isEnumMember = isEnumMember;
  57017. exports.isJSX = isJSX;
  57018. exports.isPrivate = isPrivate;
  57019. exports.isTSTypeElement = isTSTypeElement;
  57020. exports.isTSType = isTSType;
  57021. exports.isTSBaseType = isTSBaseType;
  57022. exports.isNumberLiteral = isNumberLiteral;
  57023. exports.isRegexLiteral = isRegexLiteral;
  57024. exports.isRestProperty = isRestProperty;
  57025. exports.isSpreadProperty = isSpreadProperty;
  57026. var _shallowEqual = require_shallowEqual3();
  57027. function isArrayExpression(node, opts) {
  57028. if (!node)
  57029. return false;
  57030. const nodeType = node.type;
  57031. if (nodeType === "ArrayExpression") {
  57032. if (typeof opts === "undefined") {
  57033. return true;
  57034. } else {
  57035. return (0, _shallowEqual.default)(node, opts);
  57036. }
  57037. }
  57038. return false;
  57039. }
  57040. function isAssignmentExpression(node, opts) {
  57041. if (!node)
  57042. return false;
  57043. const nodeType = node.type;
  57044. if (nodeType === "AssignmentExpression") {
  57045. if (typeof opts === "undefined") {
  57046. return true;
  57047. } else {
  57048. return (0, _shallowEqual.default)(node, opts);
  57049. }
  57050. }
  57051. return false;
  57052. }
  57053. function isBinaryExpression(node, opts) {
  57054. if (!node)
  57055. return false;
  57056. const nodeType = node.type;
  57057. if (nodeType === "BinaryExpression") {
  57058. if (typeof opts === "undefined") {
  57059. return true;
  57060. } else {
  57061. return (0, _shallowEqual.default)(node, opts);
  57062. }
  57063. }
  57064. return false;
  57065. }
  57066. function isInterpreterDirective(node, opts) {
  57067. if (!node)
  57068. return false;
  57069. const nodeType = node.type;
  57070. if (nodeType === "InterpreterDirective") {
  57071. if (typeof opts === "undefined") {
  57072. return true;
  57073. } else {
  57074. return (0, _shallowEqual.default)(node, opts);
  57075. }
  57076. }
  57077. return false;
  57078. }
  57079. function isDirective(node, opts) {
  57080. if (!node)
  57081. return false;
  57082. const nodeType = node.type;
  57083. if (nodeType === "Directive") {
  57084. if (typeof opts === "undefined") {
  57085. return true;
  57086. } else {
  57087. return (0, _shallowEqual.default)(node, opts);
  57088. }
  57089. }
  57090. return false;
  57091. }
  57092. function isDirectiveLiteral(node, opts) {
  57093. if (!node)
  57094. return false;
  57095. const nodeType = node.type;
  57096. if (nodeType === "DirectiveLiteral") {
  57097. if (typeof opts === "undefined") {
  57098. return true;
  57099. } else {
  57100. return (0, _shallowEqual.default)(node, opts);
  57101. }
  57102. }
  57103. return false;
  57104. }
  57105. function isBlockStatement(node, opts) {
  57106. if (!node)
  57107. return false;
  57108. const nodeType = node.type;
  57109. if (nodeType === "BlockStatement") {
  57110. if (typeof opts === "undefined") {
  57111. return true;
  57112. } else {
  57113. return (0, _shallowEqual.default)(node, opts);
  57114. }
  57115. }
  57116. return false;
  57117. }
  57118. function isBreakStatement(node, opts) {
  57119. if (!node)
  57120. return false;
  57121. const nodeType = node.type;
  57122. if (nodeType === "BreakStatement") {
  57123. if (typeof opts === "undefined") {
  57124. return true;
  57125. } else {
  57126. return (0, _shallowEqual.default)(node, opts);
  57127. }
  57128. }
  57129. return false;
  57130. }
  57131. function isCallExpression(node, opts) {
  57132. if (!node)
  57133. return false;
  57134. const nodeType = node.type;
  57135. if (nodeType === "CallExpression") {
  57136. if (typeof opts === "undefined") {
  57137. return true;
  57138. } else {
  57139. return (0, _shallowEqual.default)(node, opts);
  57140. }
  57141. }
  57142. return false;
  57143. }
  57144. function isCatchClause(node, opts) {
  57145. if (!node)
  57146. return false;
  57147. const nodeType = node.type;
  57148. if (nodeType === "CatchClause") {
  57149. if (typeof opts === "undefined") {
  57150. return true;
  57151. } else {
  57152. return (0, _shallowEqual.default)(node, opts);
  57153. }
  57154. }
  57155. return false;
  57156. }
  57157. function isConditionalExpression(node, opts) {
  57158. if (!node)
  57159. return false;
  57160. const nodeType = node.type;
  57161. if (nodeType === "ConditionalExpression") {
  57162. if (typeof opts === "undefined") {
  57163. return true;
  57164. } else {
  57165. return (0, _shallowEqual.default)(node, opts);
  57166. }
  57167. }
  57168. return false;
  57169. }
  57170. function isContinueStatement(node, opts) {
  57171. if (!node)
  57172. return false;
  57173. const nodeType = node.type;
  57174. if (nodeType === "ContinueStatement") {
  57175. if (typeof opts === "undefined") {
  57176. return true;
  57177. } else {
  57178. return (0, _shallowEqual.default)(node, opts);
  57179. }
  57180. }
  57181. return false;
  57182. }
  57183. function isDebuggerStatement(node, opts) {
  57184. if (!node)
  57185. return false;
  57186. const nodeType = node.type;
  57187. if (nodeType === "DebuggerStatement") {
  57188. if (typeof opts === "undefined") {
  57189. return true;
  57190. } else {
  57191. return (0, _shallowEqual.default)(node, opts);
  57192. }
  57193. }
  57194. return false;
  57195. }
  57196. function isDoWhileStatement(node, opts) {
  57197. if (!node)
  57198. return false;
  57199. const nodeType = node.type;
  57200. if (nodeType === "DoWhileStatement") {
  57201. if (typeof opts === "undefined") {
  57202. return true;
  57203. } else {
  57204. return (0, _shallowEqual.default)(node, opts);
  57205. }
  57206. }
  57207. return false;
  57208. }
  57209. function isEmptyStatement(node, opts) {
  57210. if (!node)
  57211. return false;
  57212. const nodeType = node.type;
  57213. if (nodeType === "EmptyStatement") {
  57214. if (typeof opts === "undefined") {
  57215. return true;
  57216. } else {
  57217. return (0, _shallowEqual.default)(node, opts);
  57218. }
  57219. }
  57220. return false;
  57221. }
  57222. function isExpressionStatement2(node, opts) {
  57223. if (!node)
  57224. return false;
  57225. const nodeType = node.type;
  57226. if (nodeType === "ExpressionStatement") {
  57227. if (typeof opts === "undefined") {
  57228. return true;
  57229. } else {
  57230. return (0, _shallowEqual.default)(node, opts);
  57231. }
  57232. }
  57233. return false;
  57234. }
  57235. function isFile(node, opts) {
  57236. if (!node)
  57237. return false;
  57238. const nodeType = node.type;
  57239. if (nodeType === "File") {
  57240. if (typeof opts === "undefined") {
  57241. return true;
  57242. } else {
  57243. return (0, _shallowEqual.default)(node, opts);
  57244. }
  57245. }
  57246. return false;
  57247. }
  57248. function isForInStatement(node, opts) {
  57249. if (!node)
  57250. return false;
  57251. const nodeType = node.type;
  57252. if (nodeType === "ForInStatement") {
  57253. if (typeof opts === "undefined") {
  57254. return true;
  57255. } else {
  57256. return (0, _shallowEqual.default)(node, opts);
  57257. }
  57258. }
  57259. return false;
  57260. }
  57261. function isForStatement(node, opts) {
  57262. if (!node)
  57263. return false;
  57264. const nodeType = node.type;
  57265. if (nodeType === "ForStatement") {
  57266. if (typeof opts === "undefined") {
  57267. return true;
  57268. } else {
  57269. return (0, _shallowEqual.default)(node, opts);
  57270. }
  57271. }
  57272. return false;
  57273. }
  57274. function isFunctionDeclaration(node, opts) {
  57275. if (!node)
  57276. return false;
  57277. const nodeType = node.type;
  57278. if (nodeType === "FunctionDeclaration") {
  57279. if (typeof opts === "undefined") {
  57280. return true;
  57281. } else {
  57282. return (0, _shallowEqual.default)(node, opts);
  57283. }
  57284. }
  57285. return false;
  57286. }
  57287. function isFunctionExpression(node, opts) {
  57288. if (!node)
  57289. return false;
  57290. const nodeType = node.type;
  57291. if (nodeType === "FunctionExpression") {
  57292. if (typeof opts === "undefined") {
  57293. return true;
  57294. } else {
  57295. return (0, _shallowEqual.default)(node, opts);
  57296. }
  57297. }
  57298. return false;
  57299. }
  57300. function isIdentifier2(node, opts) {
  57301. if (!node)
  57302. return false;
  57303. const nodeType = node.type;
  57304. if (nodeType === "Identifier") {
  57305. if (typeof opts === "undefined") {
  57306. return true;
  57307. } else {
  57308. return (0, _shallowEqual.default)(node, opts);
  57309. }
  57310. }
  57311. return false;
  57312. }
  57313. function isIfStatement(node, opts) {
  57314. if (!node)
  57315. return false;
  57316. const nodeType = node.type;
  57317. if (nodeType === "IfStatement") {
  57318. if (typeof opts === "undefined") {
  57319. return true;
  57320. } else {
  57321. return (0, _shallowEqual.default)(node, opts);
  57322. }
  57323. }
  57324. return false;
  57325. }
  57326. function isLabeledStatement(node, opts) {
  57327. if (!node)
  57328. return false;
  57329. const nodeType = node.type;
  57330. if (nodeType === "LabeledStatement") {
  57331. if (typeof opts === "undefined") {
  57332. return true;
  57333. } else {
  57334. return (0, _shallowEqual.default)(node, opts);
  57335. }
  57336. }
  57337. return false;
  57338. }
  57339. function isStringLiteral2(node, opts) {
  57340. if (!node)
  57341. return false;
  57342. const nodeType = node.type;
  57343. if (nodeType === "StringLiteral") {
  57344. if (typeof opts === "undefined") {
  57345. return true;
  57346. } else {
  57347. return (0, _shallowEqual.default)(node, opts);
  57348. }
  57349. }
  57350. return false;
  57351. }
  57352. function isNumericLiteral(node, opts) {
  57353. if (!node)
  57354. return false;
  57355. const nodeType = node.type;
  57356. if (nodeType === "NumericLiteral") {
  57357. if (typeof opts === "undefined") {
  57358. return true;
  57359. } else {
  57360. return (0, _shallowEqual.default)(node, opts);
  57361. }
  57362. }
  57363. return false;
  57364. }
  57365. function isNullLiteral(node, opts) {
  57366. if (!node)
  57367. return false;
  57368. const nodeType = node.type;
  57369. if (nodeType === "NullLiteral") {
  57370. if (typeof opts === "undefined") {
  57371. return true;
  57372. } else {
  57373. return (0, _shallowEqual.default)(node, opts);
  57374. }
  57375. }
  57376. return false;
  57377. }
  57378. function isBooleanLiteral2(node, opts) {
  57379. if (!node)
  57380. return false;
  57381. const nodeType = node.type;
  57382. if (nodeType === "BooleanLiteral") {
  57383. if (typeof opts === "undefined") {
  57384. return true;
  57385. } else {
  57386. return (0, _shallowEqual.default)(node, opts);
  57387. }
  57388. }
  57389. return false;
  57390. }
  57391. function isRegExpLiteral(node, opts) {
  57392. if (!node)
  57393. return false;
  57394. const nodeType = node.type;
  57395. if (nodeType === "RegExpLiteral") {
  57396. if (typeof opts === "undefined") {
  57397. return true;
  57398. } else {
  57399. return (0, _shallowEqual.default)(node, opts);
  57400. }
  57401. }
  57402. return false;
  57403. }
  57404. function isLogicalExpression(node, opts) {
  57405. if (!node)
  57406. return false;
  57407. const nodeType = node.type;
  57408. if (nodeType === "LogicalExpression") {
  57409. if (typeof opts === "undefined") {
  57410. return true;
  57411. } else {
  57412. return (0, _shallowEqual.default)(node, opts);
  57413. }
  57414. }
  57415. return false;
  57416. }
  57417. function isMemberExpression(node, opts) {
  57418. if (!node)
  57419. return false;
  57420. const nodeType = node.type;
  57421. if (nodeType === "MemberExpression") {
  57422. if (typeof opts === "undefined") {
  57423. return true;
  57424. } else {
  57425. return (0, _shallowEqual.default)(node, opts);
  57426. }
  57427. }
  57428. return false;
  57429. }
  57430. function isNewExpression(node, opts) {
  57431. if (!node)
  57432. return false;
  57433. const nodeType = node.type;
  57434. if (nodeType === "NewExpression") {
  57435. if (typeof opts === "undefined") {
  57436. return true;
  57437. } else {
  57438. return (0, _shallowEqual.default)(node, opts);
  57439. }
  57440. }
  57441. return false;
  57442. }
  57443. function isProgram(node, opts) {
  57444. if (!node)
  57445. return false;
  57446. const nodeType = node.type;
  57447. if (nodeType === "Program") {
  57448. if (typeof opts === "undefined") {
  57449. return true;
  57450. } else {
  57451. return (0, _shallowEqual.default)(node, opts);
  57452. }
  57453. }
  57454. return false;
  57455. }
  57456. function isObjectExpression(node, opts) {
  57457. if (!node)
  57458. return false;
  57459. const nodeType = node.type;
  57460. if (nodeType === "ObjectExpression") {
  57461. if (typeof opts === "undefined") {
  57462. return true;
  57463. } else {
  57464. return (0, _shallowEqual.default)(node, opts);
  57465. }
  57466. }
  57467. return false;
  57468. }
  57469. function isObjectMethod(node, opts) {
  57470. if (!node)
  57471. return false;
  57472. const nodeType = node.type;
  57473. if (nodeType === "ObjectMethod") {
  57474. if (typeof opts === "undefined") {
  57475. return true;
  57476. } else {
  57477. return (0, _shallowEqual.default)(node, opts);
  57478. }
  57479. }
  57480. return false;
  57481. }
  57482. function isObjectProperty(node, opts) {
  57483. if (!node)
  57484. return false;
  57485. const nodeType = node.type;
  57486. if (nodeType === "ObjectProperty") {
  57487. if (typeof opts === "undefined") {
  57488. return true;
  57489. } else {
  57490. return (0, _shallowEqual.default)(node, opts);
  57491. }
  57492. }
  57493. return false;
  57494. }
  57495. function isRestElement(node, opts) {
  57496. if (!node)
  57497. return false;
  57498. const nodeType = node.type;
  57499. if (nodeType === "RestElement") {
  57500. if (typeof opts === "undefined") {
  57501. return true;
  57502. } else {
  57503. return (0, _shallowEqual.default)(node, opts);
  57504. }
  57505. }
  57506. return false;
  57507. }
  57508. function isReturnStatement(node, opts) {
  57509. if (!node)
  57510. return false;
  57511. const nodeType = node.type;
  57512. if (nodeType === "ReturnStatement") {
  57513. if (typeof opts === "undefined") {
  57514. return true;
  57515. } else {
  57516. return (0, _shallowEqual.default)(node, opts);
  57517. }
  57518. }
  57519. return false;
  57520. }
  57521. function isSequenceExpression(node, opts) {
  57522. if (!node)
  57523. return false;
  57524. const nodeType = node.type;
  57525. if (nodeType === "SequenceExpression") {
  57526. if (typeof opts === "undefined") {
  57527. return true;
  57528. } else {
  57529. return (0, _shallowEqual.default)(node, opts);
  57530. }
  57531. }
  57532. return false;
  57533. }
  57534. function isParenthesizedExpression(node, opts) {
  57535. if (!node)
  57536. return false;
  57537. const nodeType = node.type;
  57538. if (nodeType === "ParenthesizedExpression") {
  57539. if (typeof opts === "undefined") {
  57540. return true;
  57541. } else {
  57542. return (0, _shallowEqual.default)(node, opts);
  57543. }
  57544. }
  57545. return false;
  57546. }
  57547. function isSwitchCase(node, opts) {
  57548. if (!node)
  57549. return false;
  57550. const nodeType = node.type;
  57551. if (nodeType === "SwitchCase") {
  57552. if (typeof opts === "undefined") {
  57553. return true;
  57554. } else {
  57555. return (0, _shallowEqual.default)(node, opts);
  57556. }
  57557. }
  57558. return false;
  57559. }
  57560. function isSwitchStatement(node, opts) {
  57561. if (!node)
  57562. return false;
  57563. const nodeType = node.type;
  57564. if (nodeType === "SwitchStatement") {
  57565. if (typeof opts === "undefined") {
  57566. return true;
  57567. } else {
  57568. return (0, _shallowEqual.default)(node, opts);
  57569. }
  57570. }
  57571. return false;
  57572. }
  57573. function isThisExpression(node, opts) {
  57574. if (!node)
  57575. return false;
  57576. const nodeType = node.type;
  57577. if (nodeType === "ThisExpression") {
  57578. if (typeof opts === "undefined") {
  57579. return true;
  57580. } else {
  57581. return (0, _shallowEqual.default)(node, opts);
  57582. }
  57583. }
  57584. return false;
  57585. }
  57586. function isThrowStatement(node, opts) {
  57587. if (!node)
  57588. return false;
  57589. const nodeType = node.type;
  57590. if (nodeType === "ThrowStatement") {
  57591. if (typeof opts === "undefined") {
  57592. return true;
  57593. } else {
  57594. return (0, _shallowEqual.default)(node, opts);
  57595. }
  57596. }
  57597. return false;
  57598. }
  57599. function isTryStatement(node, opts) {
  57600. if (!node)
  57601. return false;
  57602. const nodeType = node.type;
  57603. if (nodeType === "TryStatement") {
  57604. if (typeof opts === "undefined") {
  57605. return true;
  57606. } else {
  57607. return (0, _shallowEqual.default)(node, opts);
  57608. }
  57609. }
  57610. return false;
  57611. }
  57612. function isUnaryExpression(node, opts) {
  57613. if (!node)
  57614. return false;
  57615. const nodeType = node.type;
  57616. if (nodeType === "UnaryExpression") {
  57617. if (typeof opts === "undefined") {
  57618. return true;
  57619. } else {
  57620. return (0, _shallowEqual.default)(node, opts);
  57621. }
  57622. }
  57623. return false;
  57624. }
  57625. function isUpdateExpression(node, opts) {
  57626. if (!node)
  57627. return false;
  57628. const nodeType = node.type;
  57629. if (nodeType === "UpdateExpression") {
  57630. if (typeof opts === "undefined") {
  57631. return true;
  57632. } else {
  57633. return (0, _shallowEqual.default)(node, opts);
  57634. }
  57635. }
  57636. return false;
  57637. }
  57638. function isVariableDeclaration(node, opts) {
  57639. if (!node)
  57640. return false;
  57641. const nodeType = node.type;
  57642. if (nodeType === "VariableDeclaration") {
  57643. if (typeof opts === "undefined") {
  57644. return true;
  57645. } else {
  57646. return (0, _shallowEqual.default)(node, opts);
  57647. }
  57648. }
  57649. return false;
  57650. }
  57651. function isVariableDeclarator(node, opts) {
  57652. if (!node)
  57653. return false;
  57654. const nodeType = node.type;
  57655. if (nodeType === "VariableDeclarator") {
  57656. if (typeof opts === "undefined") {
  57657. return true;
  57658. } else {
  57659. return (0, _shallowEqual.default)(node, opts);
  57660. }
  57661. }
  57662. return false;
  57663. }
  57664. function isWhileStatement(node, opts) {
  57665. if (!node)
  57666. return false;
  57667. const nodeType = node.type;
  57668. if (nodeType === "WhileStatement") {
  57669. if (typeof opts === "undefined") {
  57670. return true;
  57671. } else {
  57672. return (0, _shallowEqual.default)(node, opts);
  57673. }
  57674. }
  57675. return false;
  57676. }
  57677. function isWithStatement(node, opts) {
  57678. if (!node)
  57679. return false;
  57680. const nodeType = node.type;
  57681. if (nodeType === "WithStatement") {
  57682. if (typeof opts === "undefined") {
  57683. return true;
  57684. } else {
  57685. return (0, _shallowEqual.default)(node, opts);
  57686. }
  57687. }
  57688. return false;
  57689. }
  57690. function isAssignmentPattern(node, opts) {
  57691. if (!node)
  57692. return false;
  57693. const nodeType = node.type;
  57694. if (nodeType === "AssignmentPattern") {
  57695. if (typeof opts === "undefined") {
  57696. return true;
  57697. } else {
  57698. return (0, _shallowEqual.default)(node, opts);
  57699. }
  57700. }
  57701. return false;
  57702. }
  57703. function isArrayPattern(node, opts) {
  57704. if (!node)
  57705. return false;
  57706. const nodeType = node.type;
  57707. if (nodeType === "ArrayPattern") {
  57708. if (typeof opts === "undefined") {
  57709. return true;
  57710. } else {
  57711. return (0, _shallowEqual.default)(node, opts);
  57712. }
  57713. }
  57714. return false;
  57715. }
  57716. function isArrowFunctionExpression(node, opts) {
  57717. if (!node)
  57718. return false;
  57719. const nodeType = node.type;
  57720. if (nodeType === "ArrowFunctionExpression") {
  57721. if (typeof opts === "undefined") {
  57722. return true;
  57723. } else {
  57724. return (0, _shallowEqual.default)(node, opts);
  57725. }
  57726. }
  57727. return false;
  57728. }
  57729. function isClassBody(node, opts) {
  57730. if (!node)
  57731. return false;
  57732. const nodeType = node.type;
  57733. if (nodeType === "ClassBody") {
  57734. if (typeof opts === "undefined") {
  57735. return true;
  57736. } else {
  57737. return (0, _shallowEqual.default)(node, opts);
  57738. }
  57739. }
  57740. return false;
  57741. }
  57742. function isClassExpression(node, opts) {
  57743. if (!node)
  57744. return false;
  57745. const nodeType = node.type;
  57746. if (nodeType === "ClassExpression") {
  57747. if (typeof opts === "undefined") {
  57748. return true;
  57749. } else {
  57750. return (0, _shallowEqual.default)(node, opts);
  57751. }
  57752. }
  57753. return false;
  57754. }
  57755. function isClassDeclaration(node, opts) {
  57756. if (!node)
  57757. return false;
  57758. const nodeType = node.type;
  57759. if (nodeType === "ClassDeclaration") {
  57760. if (typeof opts === "undefined") {
  57761. return true;
  57762. } else {
  57763. return (0, _shallowEqual.default)(node, opts);
  57764. }
  57765. }
  57766. return false;
  57767. }
  57768. function isExportAllDeclaration(node, opts) {
  57769. if (!node)
  57770. return false;
  57771. const nodeType = node.type;
  57772. if (nodeType === "ExportAllDeclaration") {
  57773. if (typeof opts === "undefined") {
  57774. return true;
  57775. } else {
  57776. return (0, _shallowEqual.default)(node, opts);
  57777. }
  57778. }
  57779. return false;
  57780. }
  57781. function isExportDefaultDeclaration(node, opts) {
  57782. if (!node)
  57783. return false;
  57784. const nodeType = node.type;
  57785. if (nodeType === "ExportDefaultDeclaration") {
  57786. if (typeof opts === "undefined") {
  57787. return true;
  57788. } else {
  57789. return (0, _shallowEqual.default)(node, opts);
  57790. }
  57791. }
  57792. return false;
  57793. }
  57794. function isExportNamedDeclaration(node, opts) {
  57795. if (!node)
  57796. return false;
  57797. const nodeType = node.type;
  57798. if (nodeType === "ExportNamedDeclaration") {
  57799. if (typeof opts === "undefined") {
  57800. return true;
  57801. } else {
  57802. return (0, _shallowEqual.default)(node, opts);
  57803. }
  57804. }
  57805. return false;
  57806. }
  57807. function isExportSpecifier(node, opts) {
  57808. if (!node)
  57809. return false;
  57810. const nodeType = node.type;
  57811. if (nodeType === "ExportSpecifier") {
  57812. if (typeof opts === "undefined") {
  57813. return true;
  57814. } else {
  57815. return (0, _shallowEqual.default)(node, opts);
  57816. }
  57817. }
  57818. return false;
  57819. }
  57820. function isForOfStatement(node, opts) {
  57821. if (!node)
  57822. return false;
  57823. const nodeType = node.type;
  57824. if (nodeType === "ForOfStatement") {
  57825. if (typeof opts === "undefined") {
  57826. return true;
  57827. } else {
  57828. return (0, _shallowEqual.default)(node, opts);
  57829. }
  57830. }
  57831. return false;
  57832. }
  57833. function isImportDeclaration(node, opts) {
  57834. if (!node)
  57835. return false;
  57836. const nodeType = node.type;
  57837. if (nodeType === "ImportDeclaration") {
  57838. if (typeof opts === "undefined") {
  57839. return true;
  57840. } else {
  57841. return (0, _shallowEqual.default)(node, opts);
  57842. }
  57843. }
  57844. return false;
  57845. }
  57846. function isImportDefaultSpecifier(node, opts) {
  57847. if (!node)
  57848. return false;
  57849. const nodeType = node.type;
  57850. if (nodeType === "ImportDefaultSpecifier") {
  57851. if (typeof opts === "undefined") {
  57852. return true;
  57853. } else {
  57854. return (0, _shallowEqual.default)(node, opts);
  57855. }
  57856. }
  57857. return false;
  57858. }
  57859. function isImportNamespaceSpecifier(node, opts) {
  57860. if (!node)
  57861. return false;
  57862. const nodeType = node.type;
  57863. if (nodeType === "ImportNamespaceSpecifier") {
  57864. if (typeof opts === "undefined") {
  57865. return true;
  57866. } else {
  57867. return (0, _shallowEqual.default)(node, opts);
  57868. }
  57869. }
  57870. return false;
  57871. }
  57872. function isImportSpecifier(node, opts) {
  57873. if (!node)
  57874. return false;
  57875. const nodeType = node.type;
  57876. if (nodeType === "ImportSpecifier") {
  57877. if (typeof opts === "undefined") {
  57878. return true;
  57879. } else {
  57880. return (0, _shallowEqual.default)(node, opts);
  57881. }
  57882. }
  57883. return false;
  57884. }
  57885. function isMetaProperty(node, opts) {
  57886. if (!node)
  57887. return false;
  57888. const nodeType = node.type;
  57889. if (nodeType === "MetaProperty") {
  57890. if (typeof opts === "undefined") {
  57891. return true;
  57892. } else {
  57893. return (0, _shallowEqual.default)(node, opts);
  57894. }
  57895. }
  57896. return false;
  57897. }
  57898. function isClassMethod(node, opts) {
  57899. if (!node)
  57900. return false;
  57901. const nodeType = node.type;
  57902. if (nodeType === "ClassMethod") {
  57903. if (typeof opts === "undefined") {
  57904. return true;
  57905. } else {
  57906. return (0, _shallowEqual.default)(node, opts);
  57907. }
  57908. }
  57909. return false;
  57910. }
  57911. function isObjectPattern(node, opts) {
  57912. if (!node)
  57913. return false;
  57914. const nodeType = node.type;
  57915. if (nodeType === "ObjectPattern") {
  57916. if (typeof opts === "undefined") {
  57917. return true;
  57918. } else {
  57919. return (0, _shallowEqual.default)(node, opts);
  57920. }
  57921. }
  57922. return false;
  57923. }
  57924. function isSpreadElement(node, opts) {
  57925. if (!node)
  57926. return false;
  57927. const nodeType = node.type;
  57928. if (nodeType === "SpreadElement") {
  57929. if (typeof opts === "undefined") {
  57930. return true;
  57931. } else {
  57932. return (0, _shallowEqual.default)(node, opts);
  57933. }
  57934. }
  57935. return false;
  57936. }
  57937. function isSuper(node, opts) {
  57938. if (!node)
  57939. return false;
  57940. const nodeType = node.type;
  57941. if (nodeType === "Super") {
  57942. if (typeof opts === "undefined") {
  57943. return true;
  57944. } else {
  57945. return (0, _shallowEqual.default)(node, opts);
  57946. }
  57947. }
  57948. return false;
  57949. }
  57950. function isTaggedTemplateExpression(node, opts) {
  57951. if (!node)
  57952. return false;
  57953. const nodeType = node.type;
  57954. if (nodeType === "TaggedTemplateExpression") {
  57955. if (typeof opts === "undefined") {
  57956. return true;
  57957. } else {
  57958. return (0, _shallowEqual.default)(node, opts);
  57959. }
  57960. }
  57961. return false;
  57962. }
  57963. function isTemplateElement(node, opts) {
  57964. if (!node)
  57965. return false;
  57966. const nodeType = node.type;
  57967. if (nodeType === "TemplateElement") {
  57968. if (typeof opts === "undefined") {
  57969. return true;
  57970. } else {
  57971. return (0, _shallowEqual.default)(node, opts);
  57972. }
  57973. }
  57974. return false;
  57975. }
  57976. function isTemplateLiteral(node, opts) {
  57977. if (!node)
  57978. return false;
  57979. const nodeType = node.type;
  57980. if (nodeType === "TemplateLiteral") {
  57981. if (typeof opts === "undefined") {
  57982. return true;
  57983. } else {
  57984. return (0, _shallowEqual.default)(node, opts);
  57985. }
  57986. }
  57987. return false;
  57988. }
  57989. function isYieldExpression(node, opts) {
  57990. if (!node)
  57991. return false;
  57992. const nodeType = node.type;
  57993. if (nodeType === "YieldExpression") {
  57994. if (typeof opts === "undefined") {
  57995. return true;
  57996. } else {
  57997. return (0, _shallowEqual.default)(node, opts);
  57998. }
  57999. }
  58000. return false;
  58001. }
  58002. function isAwaitExpression(node, opts) {
  58003. if (!node)
  58004. return false;
  58005. const nodeType = node.type;
  58006. if (nodeType === "AwaitExpression") {
  58007. if (typeof opts === "undefined") {
  58008. return true;
  58009. } else {
  58010. return (0, _shallowEqual.default)(node, opts);
  58011. }
  58012. }
  58013. return false;
  58014. }
  58015. function isImport(node, opts) {
  58016. if (!node)
  58017. return false;
  58018. const nodeType = node.type;
  58019. if (nodeType === "Import") {
  58020. if (typeof opts === "undefined") {
  58021. return true;
  58022. } else {
  58023. return (0, _shallowEqual.default)(node, opts);
  58024. }
  58025. }
  58026. return false;
  58027. }
  58028. function isBigIntLiteral(node, opts) {
  58029. if (!node)
  58030. return false;
  58031. const nodeType = node.type;
  58032. if (nodeType === "BigIntLiteral") {
  58033. if (typeof opts === "undefined") {
  58034. return true;
  58035. } else {
  58036. return (0, _shallowEqual.default)(node, opts);
  58037. }
  58038. }
  58039. return false;
  58040. }
  58041. function isExportNamespaceSpecifier(node, opts) {
  58042. if (!node)
  58043. return false;
  58044. const nodeType = node.type;
  58045. if (nodeType === "ExportNamespaceSpecifier") {
  58046. if (typeof opts === "undefined") {
  58047. return true;
  58048. } else {
  58049. return (0, _shallowEqual.default)(node, opts);
  58050. }
  58051. }
  58052. return false;
  58053. }
  58054. function isOptionalMemberExpression(node, opts) {
  58055. if (!node)
  58056. return false;
  58057. const nodeType = node.type;
  58058. if (nodeType === "OptionalMemberExpression") {
  58059. if (typeof opts === "undefined") {
  58060. return true;
  58061. } else {
  58062. return (0, _shallowEqual.default)(node, opts);
  58063. }
  58064. }
  58065. return false;
  58066. }
  58067. function isOptionalCallExpression(node, opts) {
  58068. if (!node)
  58069. return false;
  58070. const nodeType = node.type;
  58071. if (nodeType === "OptionalCallExpression") {
  58072. if (typeof opts === "undefined") {
  58073. return true;
  58074. } else {
  58075. return (0, _shallowEqual.default)(node, opts);
  58076. }
  58077. }
  58078. return false;
  58079. }
  58080. function isAnyTypeAnnotation(node, opts) {
  58081. if (!node)
  58082. return false;
  58083. const nodeType = node.type;
  58084. if (nodeType === "AnyTypeAnnotation") {
  58085. if (typeof opts === "undefined") {
  58086. return true;
  58087. } else {
  58088. return (0, _shallowEqual.default)(node, opts);
  58089. }
  58090. }
  58091. return false;
  58092. }
  58093. function isArrayTypeAnnotation(node, opts) {
  58094. if (!node)
  58095. return false;
  58096. const nodeType = node.type;
  58097. if (nodeType === "ArrayTypeAnnotation") {
  58098. if (typeof opts === "undefined") {
  58099. return true;
  58100. } else {
  58101. return (0, _shallowEqual.default)(node, opts);
  58102. }
  58103. }
  58104. return false;
  58105. }
  58106. function isBooleanTypeAnnotation(node, opts) {
  58107. if (!node)
  58108. return false;
  58109. const nodeType = node.type;
  58110. if (nodeType === "BooleanTypeAnnotation") {
  58111. if (typeof opts === "undefined") {
  58112. return true;
  58113. } else {
  58114. return (0, _shallowEqual.default)(node, opts);
  58115. }
  58116. }
  58117. return false;
  58118. }
  58119. function isBooleanLiteralTypeAnnotation(node, opts) {
  58120. if (!node)
  58121. return false;
  58122. const nodeType = node.type;
  58123. if (nodeType === "BooleanLiteralTypeAnnotation") {
  58124. if (typeof opts === "undefined") {
  58125. return true;
  58126. } else {
  58127. return (0, _shallowEqual.default)(node, opts);
  58128. }
  58129. }
  58130. return false;
  58131. }
  58132. function isNullLiteralTypeAnnotation(node, opts) {
  58133. if (!node)
  58134. return false;
  58135. const nodeType = node.type;
  58136. if (nodeType === "NullLiteralTypeAnnotation") {
  58137. if (typeof opts === "undefined") {
  58138. return true;
  58139. } else {
  58140. return (0, _shallowEqual.default)(node, opts);
  58141. }
  58142. }
  58143. return false;
  58144. }
  58145. function isClassImplements(node, opts) {
  58146. if (!node)
  58147. return false;
  58148. const nodeType = node.type;
  58149. if (nodeType === "ClassImplements") {
  58150. if (typeof opts === "undefined") {
  58151. return true;
  58152. } else {
  58153. return (0, _shallowEqual.default)(node, opts);
  58154. }
  58155. }
  58156. return false;
  58157. }
  58158. function isDeclareClass(node, opts) {
  58159. if (!node)
  58160. return false;
  58161. const nodeType = node.type;
  58162. if (nodeType === "DeclareClass") {
  58163. if (typeof opts === "undefined") {
  58164. return true;
  58165. } else {
  58166. return (0, _shallowEqual.default)(node, opts);
  58167. }
  58168. }
  58169. return false;
  58170. }
  58171. function isDeclareFunction(node, opts) {
  58172. if (!node)
  58173. return false;
  58174. const nodeType = node.type;
  58175. if (nodeType === "DeclareFunction") {
  58176. if (typeof opts === "undefined") {
  58177. return true;
  58178. } else {
  58179. return (0, _shallowEqual.default)(node, opts);
  58180. }
  58181. }
  58182. return false;
  58183. }
  58184. function isDeclareInterface(node, opts) {
  58185. if (!node)
  58186. return false;
  58187. const nodeType = node.type;
  58188. if (nodeType === "DeclareInterface") {
  58189. if (typeof opts === "undefined") {
  58190. return true;
  58191. } else {
  58192. return (0, _shallowEqual.default)(node, opts);
  58193. }
  58194. }
  58195. return false;
  58196. }
  58197. function isDeclareModule(node, opts) {
  58198. if (!node)
  58199. return false;
  58200. const nodeType = node.type;
  58201. if (nodeType === "DeclareModule") {
  58202. if (typeof opts === "undefined") {
  58203. return true;
  58204. } else {
  58205. return (0, _shallowEqual.default)(node, opts);
  58206. }
  58207. }
  58208. return false;
  58209. }
  58210. function isDeclareModuleExports(node, opts) {
  58211. if (!node)
  58212. return false;
  58213. const nodeType = node.type;
  58214. if (nodeType === "DeclareModuleExports") {
  58215. if (typeof opts === "undefined") {
  58216. return true;
  58217. } else {
  58218. return (0, _shallowEqual.default)(node, opts);
  58219. }
  58220. }
  58221. return false;
  58222. }
  58223. function isDeclareTypeAlias(node, opts) {
  58224. if (!node)
  58225. return false;
  58226. const nodeType = node.type;
  58227. if (nodeType === "DeclareTypeAlias") {
  58228. if (typeof opts === "undefined") {
  58229. return true;
  58230. } else {
  58231. return (0, _shallowEqual.default)(node, opts);
  58232. }
  58233. }
  58234. return false;
  58235. }
  58236. function isDeclareOpaqueType(node, opts) {
  58237. if (!node)
  58238. return false;
  58239. const nodeType = node.type;
  58240. if (nodeType === "DeclareOpaqueType") {
  58241. if (typeof opts === "undefined") {
  58242. return true;
  58243. } else {
  58244. return (0, _shallowEqual.default)(node, opts);
  58245. }
  58246. }
  58247. return false;
  58248. }
  58249. function isDeclareVariable(node, opts) {
  58250. if (!node)
  58251. return false;
  58252. const nodeType = node.type;
  58253. if (nodeType === "DeclareVariable") {
  58254. if (typeof opts === "undefined") {
  58255. return true;
  58256. } else {
  58257. return (0, _shallowEqual.default)(node, opts);
  58258. }
  58259. }
  58260. return false;
  58261. }
  58262. function isDeclareExportDeclaration(node, opts) {
  58263. if (!node)
  58264. return false;
  58265. const nodeType = node.type;
  58266. if (nodeType === "DeclareExportDeclaration") {
  58267. if (typeof opts === "undefined") {
  58268. return true;
  58269. } else {
  58270. return (0, _shallowEqual.default)(node, opts);
  58271. }
  58272. }
  58273. return false;
  58274. }
  58275. function isDeclareExportAllDeclaration(node, opts) {
  58276. if (!node)
  58277. return false;
  58278. const nodeType = node.type;
  58279. if (nodeType === "DeclareExportAllDeclaration") {
  58280. if (typeof opts === "undefined") {
  58281. return true;
  58282. } else {
  58283. return (0, _shallowEqual.default)(node, opts);
  58284. }
  58285. }
  58286. return false;
  58287. }
  58288. function isDeclaredPredicate(node, opts) {
  58289. if (!node)
  58290. return false;
  58291. const nodeType = node.type;
  58292. if (nodeType === "DeclaredPredicate") {
  58293. if (typeof opts === "undefined") {
  58294. return true;
  58295. } else {
  58296. return (0, _shallowEqual.default)(node, opts);
  58297. }
  58298. }
  58299. return false;
  58300. }
  58301. function isExistsTypeAnnotation(node, opts) {
  58302. if (!node)
  58303. return false;
  58304. const nodeType = node.type;
  58305. if (nodeType === "ExistsTypeAnnotation") {
  58306. if (typeof opts === "undefined") {
  58307. return true;
  58308. } else {
  58309. return (0, _shallowEqual.default)(node, opts);
  58310. }
  58311. }
  58312. return false;
  58313. }
  58314. function isFunctionTypeAnnotation(node, opts) {
  58315. if (!node)
  58316. return false;
  58317. const nodeType = node.type;
  58318. if (nodeType === "FunctionTypeAnnotation") {
  58319. if (typeof opts === "undefined") {
  58320. return true;
  58321. } else {
  58322. return (0, _shallowEqual.default)(node, opts);
  58323. }
  58324. }
  58325. return false;
  58326. }
  58327. function isFunctionTypeParam(node, opts) {
  58328. if (!node)
  58329. return false;
  58330. const nodeType = node.type;
  58331. if (nodeType === "FunctionTypeParam") {
  58332. if (typeof opts === "undefined") {
  58333. return true;
  58334. } else {
  58335. return (0, _shallowEqual.default)(node, opts);
  58336. }
  58337. }
  58338. return false;
  58339. }
  58340. function isGenericTypeAnnotation(node, opts) {
  58341. if (!node)
  58342. return false;
  58343. const nodeType = node.type;
  58344. if (nodeType === "GenericTypeAnnotation") {
  58345. if (typeof opts === "undefined") {
  58346. return true;
  58347. } else {
  58348. return (0, _shallowEqual.default)(node, opts);
  58349. }
  58350. }
  58351. return false;
  58352. }
  58353. function isInferredPredicate(node, opts) {
  58354. if (!node)
  58355. return false;
  58356. const nodeType = node.type;
  58357. if (nodeType === "InferredPredicate") {
  58358. if (typeof opts === "undefined") {
  58359. return true;
  58360. } else {
  58361. return (0, _shallowEqual.default)(node, opts);
  58362. }
  58363. }
  58364. return false;
  58365. }
  58366. function isInterfaceExtends(node, opts) {
  58367. if (!node)
  58368. return false;
  58369. const nodeType = node.type;
  58370. if (nodeType === "InterfaceExtends") {
  58371. if (typeof opts === "undefined") {
  58372. return true;
  58373. } else {
  58374. return (0, _shallowEqual.default)(node, opts);
  58375. }
  58376. }
  58377. return false;
  58378. }
  58379. function isInterfaceDeclaration(node, opts) {
  58380. if (!node)
  58381. return false;
  58382. const nodeType = node.type;
  58383. if (nodeType === "InterfaceDeclaration") {
  58384. if (typeof opts === "undefined") {
  58385. return true;
  58386. } else {
  58387. return (0, _shallowEqual.default)(node, opts);
  58388. }
  58389. }
  58390. return false;
  58391. }
  58392. function isInterfaceTypeAnnotation(node, opts) {
  58393. if (!node)
  58394. return false;
  58395. const nodeType = node.type;
  58396. if (nodeType === "InterfaceTypeAnnotation") {
  58397. if (typeof opts === "undefined") {
  58398. return true;
  58399. } else {
  58400. return (0, _shallowEqual.default)(node, opts);
  58401. }
  58402. }
  58403. return false;
  58404. }
  58405. function isIntersectionTypeAnnotation(node, opts) {
  58406. if (!node)
  58407. return false;
  58408. const nodeType = node.type;
  58409. if (nodeType === "IntersectionTypeAnnotation") {
  58410. if (typeof opts === "undefined") {
  58411. return true;
  58412. } else {
  58413. return (0, _shallowEqual.default)(node, opts);
  58414. }
  58415. }
  58416. return false;
  58417. }
  58418. function isMixedTypeAnnotation(node, opts) {
  58419. if (!node)
  58420. return false;
  58421. const nodeType = node.type;
  58422. if (nodeType === "MixedTypeAnnotation") {
  58423. if (typeof opts === "undefined") {
  58424. return true;
  58425. } else {
  58426. return (0, _shallowEqual.default)(node, opts);
  58427. }
  58428. }
  58429. return false;
  58430. }
  58431. function isEmptyTypeAnnotation(node, opts) {
  58432. if (!node)
  58433. return false;
  58434. const nodeType = node.type;
  58435. if (nodeType === "EmptyTypeAnnotation") {
  58436. if (typeof opts === "undefined") {
  58437. return true;
  58438. } else {
  58439. return (0, _shallowEqual.default)(node, opts);
  58440. }
  58441. }
  58442. return false;
  58443. }
  58444. function isNullableTypeAnnotation(node, opts) {
  58445. if (!node)
  58446. return false;
  58447. const nodeType = node.type;
  58448. if (nodeType === "NullableTypeAnnotation") {
  58449. if (typeof opts === "undefined") {
  58450. return true;
  58451. } else {
  58452. return (0, _shallowEqual.default)(node, opts);
  58453. }
  58454. }
  58455. return false;
  58456. }
  58457. function isNumberLiteralTypeAnnotation(node, opts) {
  58458. if (!node)
  58459. return false;
  58460. const nodeType = node.type;
  58461. if (nodeType === "NumberLiteralTypeAnnotation") {
  58462. if (typeof opts === "undefined") {
  58463. return true;
  58464. } else {
  58465. return (0, _shallowEqual.default)(node, opts);
  58466. }
  58467. }
  58468. return false;
  58469. }
  58470. function isNumberTypeAnnotation(node, opts) {
  58471. if (!node)
  58472. return false;
  58473. const nodeType = node.type;
  58474. if (nodeType === "NumberTypeAnnotation") {
  58475. if (typeof opts === "undefined") {
  58476. return true;
  58477. } else {
  58478. return (0, _shallowEqual.default)(node, opts);
  58479. }
  58480. }
  58481. return false;
  58482. }
  58483. function isObjectTypeAnnotation(node, opts) {
  58484. if (!node)
  58485. return false;
  58486. const nodeType = node.type;
  58487. if (nodeType === "ObjectTypeAnnotation") {
  58488. if (typeof opts === "undefined") {
  58489. return true;
  58490. } else {
  58491. return (0, _shallowEqual.default)(node, opts);
  58492. }
  58493. }
  58494. return false;
  58495. }
  58496. function isObjectTypeInternalSlot(node, opts) {
  58497. if (!node)
  58498. return false;
  58499. const nodeType = node.type;
  58500. if (nodeType === "ObjectTypeInternalSlot") {
  58501. if (typeof opts === "undefined") {
  58502. return true;
  58503. } else {
  58504. return (0, _shallowEqual.default)(node, opts);
  58505. }
  58506. }
  58507. return false;
  58508. }
  58509. function isObjectTypeCallProperty(node, opts) {
  58510. if (!node)
  58511. return false;
  58512. const nodeType = node.type;
  58513. if (nodeType === "ObjectTypeCallProperty") {
  58514. if (typeof opts === "undefined") {
  58515. return true;
  58516. } else {
  58517. return (0, _shallowEqual.default)(node, opts);
  58518. }
  58519. }
  58520. return false;
  58521. }
  58522. function isObjectTypeIndexer(node, opts) {
  58523. if (!node)
  58524. return false;
  58525. const nodeType = node.type;
  58526. if (nodeType === "ObjectTypeIndexer") {
  58527. if (typeof opts === "undefined") {
  58528. return true;
  58529. } else {
  58530. return (0, _shallowEqual.default)(node, opts);
  58531. }
  58532. }
  58533. return false;
  58534. }
  58535. function isObjectTypeProperty(node, opts) {
  58536. if (!node)
  58537. return false;
  58538. const nodeType = node.type;
  58539. if (nodeType === "ObjectTypeProperty") {
  58540. if (typeof opts === "undefined") {
  58541. return true;
  58542. } else {
  58543. return (0, _shallowEqual.default)(node, opts);
  58544. }
  58545. }
  58546. return false;
  58547. }
  58548. function isObjectTypeSpreadProperty(node, opts) {
  58549. if (!node)
  58550. return false;
  58551. const nodeType = node.type;
  58552. if (nodeType === "ObjectTypeSpreadProperty") {
  58553. if (typeof opts === "undefined") {
  58554. return true;
  58555. } else {
  58556. return (0, _shallowEqual.default)(node, opts);
  58557. }
  58558. }
  58559. return false;
  58560. }
  58561. function isOpaqueType(node, opts) {
  58562. if (!node)
  58563. return false;
  58564. const nodeType = node.type;
  58565. if (nodeType === "OpaqueType") {
  58566. if (typeof opts === "undefined") {
  58567. return true;
  58568. } else {
  58569. return (0, _shallowEqual.default)(node, opts);
  58570. }
  58571. }
  58572. return false;
  58573. }
  58574. function isQualifiedTypeIdentifier(node, opts) {
  58575. if (!node)
  58576. return false;
  58577. const nodeType = node.type;
  58578. if (nodeType === "QualifiedTypeIdentifier") {
  58579. if (typeof opts === "undefined") {
  58580. return true;
  58581. } else {
  58582. return (0, _shallowEqual.default)(node, opts);
  58583. }
  58584. }
  58585. return false;
  58586. }
  58587. function isStringLiteralTypeAnnotation(node, opts) {
  58588. if (!node)
  58589. return false;
  58590. const nodeType = node.type;
  58591. if (nodeType === "StringLiteralTypeAnnotation") {
  58592. if (typeof opts === "undefined") {
  58593. return true;
  58594. } else {
  58595. return (0, _shallowEqual.default)(node, opts);
  58596. }
  58597. }
  58598. return false;
  58599. }
  58600. function isStringTypeAnnotation(node, opts) {
  58601. if (!node)
  58602. return false;
  58603. const nodeType = node.type;
  58604. if (nodeType === "StringTypeAnnotation") {
  58605. if (typeof opts === "undefined") {
  58606. return true;
  58607. } else {
  58608. return (0, _shallowEqual.default)(node, opts);
  58609. }
  58610. }
  58611. return false;
  58612. }
  58613. function isSymbolTypeAnnotation(node, opts) {
  58614. if (!node)
  58615. return false;
  58616. const nodeType = node.type;
  58617. if (nodeType === "SymbolTypeAnnotation") {
  58618. if (typeof opts === "undefined") {
  58619. return true;
  58620. } else {
  58621. return (0, _shallowEqual.default)(node, opts);
  58622. }
  58623. }
  58624. return false;
  58625. }
  58626. function isThisTypeAnnotation(node, opts) {
  58627. if (!node)
  58628. return false;
  58629. const nodeType = node.type;
  58630. if (nodeType === "ThisTypeAnnotation") {
  58631. if (typeof opts === "undefined") {
  58632. return true;
  58633. } else {
  58634. return (0, _shallowEqual.default)(node, opts);
  58635. }
  58636. }
  58637. return false;
  58638. }
  58639. function isTupleTypeAnnotation(node, opts) {
  58640. if (!node)
  58641. return false;
  58642. const nodeType = node.type;
  58643. if (nodeType === "TupleTypeAnnotation") {
  58644. if (typeof opts === "undefined") {
  58645. return true;
  58646. } else {
  58647. return (0, _shallowEqual.default)(node, opts);
  58648. }
  58649. }
  58650. return false;
  58651. }
  58652. function isTypeofTypeAnnotation(node, opts) {
  58653. if (!node)
  58654. return false;
  58655. const nodeType = node.type;
  58656. if (nodeType === "TypeofTypeAnnotation") {
  58657. if (typeof opts === "undefined") {
  58658. return true;
  58659. } else {
  58660. return (0, _shallowEqual.default)(node, opts);
  58661. }
  58662. }
  58663. return false;
  58664. }
  58665. function isTypeAlias(node, opts) {
  58666. if (!node)
  58667. return false;
  58668. const nodeType = node.type;
  58669. if (nodeType === "TypeAlias") {
  58670. if (typeof opts === "undefined") {
  58671. return true;
  58672. } else {
  58673. return (0, _shallowEqual.default)(node, opts);
  58674. }
  58675. }
  58676. return false;
  58677. }
  58678. function isTypeAnnotation(node, opts) {
  58679. if (!node)
  58680. return false;
  58681. const nodeType = node.type;
  58682. if (nodeType === "TypeAnnotation") {
  58683. if (typeof opts === "undefined") {
  58684. return true;
  58685. } else {
  58686. return (0, _shallowEqual.default)(node, opts);
  58687. }
  58688. }
  58689. return false;
  58690. }
  58691. function isTypeCastExpression(node, opts) {
  58692. if (!node)
  58693. return false;
  58694. const nodeType = node.type;
  58695. if (nodeType === "TypeCastExpression") {
  58696. if (typeof opts === "undefined") {
  58697. return true;
  58698. } else {
  58699. return (0, _shallowEqual.default)(node, opts);
  58700. }
  58701. }
  58702. return false;
  58703. }
  58704. function isTypeParameter(node, opts) {
  58705. if (!node)
  58706. return false;
  58707. const nodeType = node.type;
  58708. if (nodeType === "TypeParameter") {
  58709. if (typeof opts === "undefined") {
  58710. return true;
  58711. } else {
  58712. return (0, _shallowEqual.default)(node, opts);
  58713. }
  58714. }
  58715. return false;
  58716. }
  58717. function isTypeParameterDeclaration(node, opts) {
  58718. if (!node)
  58719. return false;
  58720. const nodeType = node.type;
  58721. if (nodeType === "TypeParameterDeclaration") {
  58722. if (typeof opts === "undefined") {
  58723. return true;
  58724. } else {
  58725. return (0, _shallowEqual.default)(node, opts);
  58726. }
  58727. }
  58728. return false;
  58729. }
  58730. function isTypeParameterInstantiation(node, opts) {
  58731. if (!node)
  58732. return false;
  58733. const nodeType = node.type;
  58734. if (nodeType === "TypeParameterInstantiation") {
  58735. if (typeof opts === "undefined") {
  58736. return true;
  58737. } else {
  58738. return (0, _shallowEqual.default)(node, opts);
  58739. }
  58740. }
  58741. return false;
  58742. }
  58743. function isUnionTypeAnnotation(node, opts) {
  58744. if (!node)
  58745. return false;
  58746. const nodeType = node.type;
  58747. if (nodeType === "UnionTypeAnnotation") {
  58748. if (typeof opts === "undefined") {
  58749. return true;
  58750. } else {
  58751. return (0, _shallowEqual.default)(node, opts);
  58752. }
  58753. }
  58754. return false;
  58755. }
  58756. function isVariance(node, opts) {
  58757. if (!node)
  58758. return false;
  58759. const nodeType = node.type;
  58760. if (nodeType === "Variance") {
  58761. if (typeof opts === "undefined") {
  58762. return true;
  58763. } else {
  58764. return (0, _shallowEqual.default)(node, opts);
  58765. }
  58766. }
  58767. return false;
  58768. }
  58769. function isVoidTypeAnnotation(node, opts) {
  58770. if (!node)
  58771. return false;
  58772. const nodeType = node.type;
  58773. if (nodeType === "VoidTypeAnnotation") {
  58774. if (typeof opts === "undefined") {
  58775. return true;
  58776. } else {
  58777. return (0, _shallowEqual.default)(node, opts);
  58778. }
  58779. }
  58780. return false;
  58781. }
  58782. function isEnumDeclaration(node, opts) {
  58783. if (!node)
  58784. return false;
  58785. const nodeType = node.type;
  58786. if (nodeType === "EnumDeclaration") {
  58787. if (typeof opts === "undefined") {
  58788. return true;
  58789. } else {
  58790. return (0, _shallowEqual.default)(node, opts);
  58791. }
  58792. }
  58793. return false;
  58794. }
  58795. function isEnumBooleanBody(node, opts) {
  58796. if (!node)
  58797. return false;
  58798. const nodeType = node.type;
  58799. if (nodeType === "EnumBooleanBody") {
  58800. if (typeof opts === "undefined") {
  58801. return true;
  58802. } else {
  58803. return (0, _shallowEqual.default)(node, opts);
  58804. }
  58805. }
  58806. return false;
  58807. }
  58808. function isEnumNumberBody(node, opts) {
  58809. if (!node)
  58810. return false;
  58811. const nodeType = node.type;
  58812. if (nodeType === "EnumNumberBody") {
  58813. if (typeof opts === "undefined") {
  58814. return true;
  58815. } else {
  58816. return (0, _shallowEqual.default)(node, opts);
  58817. }
  58818. }
  58819. return false;
  58820. }
  58821. function isEnumStringBody(node, opts) {
  58822. if (!node)
  58823. return false;
  58824. const nodeType = node.type;
  58825. if (nodeType === "EnumStringBody") {
  58826. if (typeof opts === "undefined") {
  58827. return true;
  58828. } else {
  58829. return (0, _shallowEqual.default)(node, opts);
  58830. }
  58831. }
  58832. return false;
  58833. }
  58834. function isEnumSymbolBody(node, opts) {
  58835. if (!node)
  58836. return false;
  58837. const nodeType = node.type;
  58838. if (nodeType === "EnumSymbolBody") {
  58839. if (typeof opts === "undefined") {
  58840. return true;
  58841. } else {
  58842. return (0, _shallowEqual.default)(node, opts);
  58843. }
  58844. }
  58845. return false;
  58846. }
  58847. function isEnumBooleanMember(node, opts) {
  58848. if (!node)
  58849. return false;
  58850. const nodeType = node.type;
  58851. if (nodeType === "EnumBooleanMember") {
  58852. if (typeof opts === "undefined") {
  58853. return true;
  58854. } else {
  58855. return (0, _shallowEqual.default)(node, opts);
  58856. }
  58857. }
  58858. return false;
  58859. }
  58860. function isEnumNumberMember(node, opts) {
  58861. if (!node)
  58862. return false;
  58863. const nodeType = node.type;
  58864. if (nodeType === "EnumNumberMember") {
  58865. if (typeof opts === "undefined") {
  58866. return true;
  58867. } else {
  58868. return (0, _shallowEqual.default)(node, opts);
  58869. }
  58870. }
  58871. return false;
  58872. }
  58873. function isEnumStringMember(node, opts) {
  58874. if (!node)
  58875. return false;
  58876. const nodeType = node.type;
  58877. if (nodeType === "EnumStringMember") {
  58878. if (typeof opts === "undefined") {
  58879. return true;
  58880. } else {
  58881. return (0, _shallowEqual.default)(node, opts);
  58882. }
  58883. }
  58884. return false;
  58885. }
  58886. function isEnumDefaultedMember(node, opts) {
  58887. if (!node)
  58888. return false;
  58889. const nodeType = node.type;
  58890. if (nodeType === "EnumDefaultedMember") {
  58891. if (typeof opts === "undefined") {
  58892. return true;
  58893. } else {
  58894. return (0, _shallowEqual.default)(node, opts);
  58895. }
  58896. }
  58897. return false;
  58898. }
  58899. function isIndexedAccessType(node, opts) {
  58900. if (!node)
  58901. return false;
  58902. const nodeType = node.type;
  58903. if (nodeType === "IndexedAccessType") {
  58904. if (typeof opts === "undefined") {
  58905. return true;
  58906. } else {
  58907. return (0, _shallowEqual.default)(node, opts);
  58908. }
  58909. }
  58910. return false;
  58911. }
  58912. function isOptionalIndexedAccessType(node, opts) {
  58913. if (!node)
  58914. return false;
  58915. const nodeType = node.type;
  58916. if (nodeType === "OptionalIndexedAccessType") {
  58917. if (typeof opts === "undefined") {
  58918. return true;
  58919. } else {
  58920. return (0, _shallowEqual.default)(node, opts);
  58921. }
  58922. }
  58923. return false;
  58924. }
  58925. function isJSXAttribute(node, opts) {
  58926. if (!node)
  58927. return false;
  58928. const nodeType = node.type;
  58929. if (nodeType === "JSXAttribute") {
  58930. if (typeof opts === "undefined") {
  58931. return true;
  58932. } else {
  58933. return (0, _shallowEqual.default)(node, opts);
  58934. }
  58935. }
  58936. return false;
  58937. }
  58938. function isJSXClosingElement(node, opts) {
  58939. if (!node)
  58940. return false;
  58941. const nodeType = node.type;
  58942. if (nodeType === "JSXClosingElement") {
  58943. if (typeof opts === "undefined") {
  58944. return true;
  58945. } else {
  58946. return (0, _shallowEqual.default)(node, opts);
  58947. }
  58948. }
  58949. return false;
  58950. }
  58951. function isJSXElement2(node, opts) {
  58952. if (!node)
  58953. return false;
  58954. const nodeType = node.type;
  58955. if (nodeType === "JSXElement") {
  58956. if (typeof opts === "undefined") {
  58957. return true;
  58958. } else {
  58959. return (0, _shallowEqual.default)(node, opts);
  58960. }
  58961. }
  58962. return false;
  58963. }
  58964. function isJSXEmptyExpression(node, opts) {
  58965. if (!node)
  58966. return false;
  58967. const nodeType = node.type;
  58968. if (nodeType === "JSXEmptyExpression") {
  58969. if (typeof opts === "undefined") {
  58970. return true;
  58971. } else {
  58972. return (0, _shallowEqual.default)(node, opts);
  58973. }
  58974. }
  58975. return false;
  58976. }
  58977. function isJSXExpressionContainer2(node, opts) {
  58978. if (!node)
  58979. return false;
  58980. const nodeType = node.type;
  58981. if (nodeType === "JSXExpressionContainer") {
  58982. if (typeof opts === "undefined") {
  58983. return true;
  58984. } else {
  58985. return (0, _shallowEqual.default)(node, opts);
  58986. }
  58987. }
  58988. return false;
  58989. }
  58990. function isJSXSpreadChild(node, opts) {
  58991. if (!node)
  58992. return false;
  58993. const nodeType = node.type;
  58994. if (nodeType === "JSXSpreadChild") {
  58995. if (typeof opts === "undefined") {
  58996. return true;
  58997. } else {
  58998. return (0, _shallowEqual.default)(node, opts);
  58999. }
  59000. }
  59001. return false;
  59002. }
  59003. function isJSXIdentifier2(node, opts) {
  59004. if (!node)
  59005. return false;
  59006. const nodeType = node.type;
  59007. if (nodeType === "JSXIdentifier") {
  59008. if (typeof opts === "undefined") {
  59009. return true;
  59010. } else {
  59011. return (0, _shallowEqual.default)(node, opts);
  59012. }
  59013. }
  59014. return false;
  59015. }
  59016. function isJSXMemberExpression(node, opts) {
  59017. if (!node)
  59018. return false;
  59019. const nodeType = node.type;
  59020. if (nodeType === "JSXMemberExpression") {
  59021. if (typeof opts === "undefined") {
  59022. return true;
  59023. } else {
  59024. return (0, _shallowEqual.default)(node, opts);
  59025. }
  59026. }
  59027. return false;
  59028. }
  59029. function isJSXNamespacedName(node, opts) {
  59030. if (!node)
  59031. return false;
  59032. const nodeType = node.type;
  59033. if (nodeType === "JSXNamespacedName") {
  59034. if (typeof opts === "undefined") {
  59035. return true;
  59036. } else {
  59037. return (0, _shallowEqual.default)(node, opts);
  59038. }
  59039. }
  59040. return false;
  59041. }
  59042. function isJSXOpeningElement(node, opts) {
  59043. if (!node)
  59044. return false;
  59045. const nodeType = node.type;
  59046. if (nodeType === "JSXOpeningElement") {
  59047. if (typeof opts === "undefined") {
  59048. return true;
  59049. } else {
  59050. return (0, _shallowEqual.default)(node, opts);
  59051. }
  59052. }
  59053. return false;
  59054. }
  59055. function isJSXSpreadAttribute(node, opts) {
  59056. if (!node)
  59057. return false;
  59058. const nodeType = node.type;
  59059. if (nodeType === "JSXSpreadAttribute") {
  59060. if (typeof opts === "undefined") {
  59061. return true;
  59062. } else {
  59063. return (0, _shallowEqual.default)(node, opts);
  59064. }
  59065. }
  59066. return false;
  59067. }
  59068. function isJSXText(node, opts) {
  59069. if (!node)
  59070. return false;
  59071. const nodeType = node.type;
  59072. if (nodeType === "JSXText") {
  59073. if (typeof opts === "undefined") {
  59074. return true;
  59075. } else {
  59076. return (0, _shallowEqual.default)(node, opts);
  59077. }
  59078. }
  59079. return false;
  59080. }
  59081. function isJSXFragment2(node, opts) {
  59082. if (!node)
  59083. return false;
  59084. const nodeType = node.type;
  59085. if (nodeType === "JSXFragment") {
  59086. if (typeof opts === "undefined") {
  59087. return true;
  59088. } else {
  59089. return (0, _shallowEqual.default)(node, opts);
  59090. }
  59091. }
  59092. return false;
  59093. }
  59094. function isJSXOpeningFragment(node, opts) {
  59095. if (!node)
  59096. return false;
  59097. const nodeType = node.type;
  59098. if (nodeType === "JSXOpeningFragment") {
  59099. if (typeof opts === "undefined") {
  59100. return true;
  59101. } else {
  59102. return (0, _shallowEqual.default)(node, opts);
  59103. }
  59104. }
  59105. return false;
  59106. }
  59107. function isJSXClosingFragment(node, opts) {
  59108. if (!node)
  59109. return false;
  59110. const nodeType = node.type;
  59111. if (nodeType === "JSXClosingFragment") {
  59112. if (typeof opts === "undefined") {
  59113. return true;
  59114. } else {
  59115. return (0, _shallowEqual.default)(node, opts);
  59116. }
  59117. }
  59118. return false;
  59119. }
  59120. function isNoop(node, opts) {
  59121. if (!node)
  59122. return false;
  59123. const nodeType = node.type;
  59124. if (nodeType === "Noop") {
  59125. if (typeof opts === "undefined") {
  59126. return true;
  59127. } else {
  59128. return (0, _shallowEqual.default)(node, opts);
  59129. }
  59130. }
  59131. return false;
  59132. }
  59133. function isPlaceholder(node, opts) {
  59134. if (!node)
  59135. return false;
  59136. const nodeType = node.type;
  59137. if (nodeType === "Placeholder") {
  59138. if (typeof opts === "undefined") {
  59139. return true;
  59140. } else {
  59141. return (0, _shallowEqual.default)(node, opts);
  59142. }
  59143. }
  59144. return false;
  59145. }
  59146. function isV8IntrinsicIdentifier(node, opts) {
  59147. if (!node)
  59148. return false;
  59149. const nodeType = node.type;
  59150. if (nodeType === "V8IntrinsicIdentifier") {
  59151. if (typeof opts === "undefined") {
  59152. return true;
  59153. } else {
  59154. return (0, _shallowEqual.default)(node, opts);
  59155. }
  59156. }
  59157. return false;
  59158. }
  59159. function isArgumentPlaceholder(node, opts) {
  59160. if (!node)
  59161. return false;
  59162. const nodeType = node.type;
  59163. if (nodeType === "ArgumentPlaceholder") {
  59164. if (typeof opts === "undefined") {
  59165. return true;
  59166. } else {
  59167. return (0, _shallowEqual.default)(node, opts);
  59168. }
  59169. }
  59170. return false;
  59171. }
  59172. function isBindExpression(node, opts) {
  59173. if (!node)
  59174. return false;
  59175. const nodeType = node.type;
  59176. if (nodeType === "BindExpression") {
  59177. if (typeof opts === "undefined") {
  59178. return true;
  59179. } else {
  59180. return (0, _shallowEqual.default)(node, opts);
  59181. }
  59182. }
  59183. return false;
  59184. }
  59185. function isClassProperty(node, opts) {
  59186. if (!node)
  59187. return false;
  59188. const nodeType = node.type;
  59189. if (nodeType === "ClassProperty") {
  59190. if (typeof opts === "undefined") {
  59191. return true;
  59192. } else {
  59193. return (0, _shallowEqual.default)(node, opts);
  59194. }
  59195. }
  59196. return false;
  59197. }
  59198. function isPipelineTopicExpression(node, opts) {
  59199. if (!node)
  59200. return false;
  59201. const nodeType = node.type;
  59202. if (nodeType === "PipelineTopicExpression") {
  59203. if (typeof opts === "undefined") {
  59204. return true;
  59205. } else {
  59206. return (0, _shallowEqual.default)(node, opts);
  59207. }
  59208. }
  59209. return false;
  59210. }
  59211. function isPipelineBareFunction(node, opts) {
  59212. if (!node)
  59213. return false;
  59214. const nodeType = node.type;
  59215. if (nodeType === "PipelineBareFunction") {
  59216. if (typeof opts === "undefined") {
  59217. return true;
  59218. } else {
  59219. return (0, _shallowEqual.default)(node, opts);
  59220. }
  59221. }
  59222. return false;
  59223. }
  59224. function isPipelinePrimaryTopicReference(node, opts) {
  59225. if (!node)
  59226. return false;
  59227. const nodeType = node.type;
  59228. if (nodeType === "PipelinePrimaryTopicReference") {
  59229. if (typeof opts === "undefined") {
  59230. return true;
  59231. } else {
  59232. return (0, _shallowEqual.default)(node, opts);
  59233. }
  59234. }
  59235. return false;
  59236. }
  59237. function isClassPrivateProperty(node, opts) {
  59238. if (!node)
  59239. return false;
  59240. const nodeType = node.type;
  59241. if (nodeType === "ClassPrivateProperty") {
  59242. if (typeof opts === "undefined") {
  59243. return true;
  59244. } else {
  59245. return (0, _shallowEqual.default)(node, opts);
  59246. }
  59247. }
  59248. return false;
  59249. }
  59250. function isClassPrivateMethod(node, opts) {
  59251. if (!node)
  59252. return false;
  59253. const nodeType = node.type;
  59254. if (nodeType === "ClassPrivateMethod") {
  59255. if (typeof opts === "undefined") {
  59256. return true;
  59257. } else {
  59258. return (0, _shallowEqual.default)(node, opts);
  59259. }
  59260. }
  59261. return false;
  59262. }
  59263. function isImportAttribute(node, opts) {
  59264. if (!node)
  59265. return false;
  59266. const nodeType = node.type;
  59267. if (nodeType === "ImportAttribute") {
  59268. if (typeof opts === "undefined") {
  59269. return true;
  59270. } else {
  59271. return (0, _shallowEqual.default)(node, opts);
  59272. }
  59273. }
  59274. return false;
  59275. }
  59276. function isDecorator(node, opts) {
  59277. if (!node)
  59278. return false;
  59279. const nodeType = node.type;
  59280. if (nodeType === "Decorator") {
  59281. if (typeof opts === "undefined") {
  59282. return true;
  59283. } else {
  59284. return (0, _shallowEqual.default)(node, opts);
  59285. }
  59286. }
  59287. return false;
  59288. }
  59289. function isDoExpression(node, opts) {
  59290. if (!node)
  59291. return false;
  59292. const nodeType = node.type;
  59293. if (nodeType === "DoExpression") {
  59294. if (typeof opts === "undefined") {
  59295. return true;
  59296. } else {
  59297. return (0, _shallowEqual.default)(node, opts);
  59298. }
  59299. }
  59300. return false;
  59301. }
  59302. function isExportDefaultSpecifier(node, opts) {
  59303. if (!node)
  59304. return false;
  59305. const nodeType = node.type;
  59306. if (nodeType === "ExportDefaultSpecifier") {
  59307. if (typeof opts === "undefined") {
  59308. return true;
  59309. } else {
  59310. return (0, _shallowEqual.default)(node, opts);
  59311. }
  59312. }
  59313. return false;
  59314. }
  59315. function isPrivateName(node, opts) {
  59316. if (!node)
  59317. return false;
  59318. const nodeType = node.type;
  59319. if (nodeType === "PrivateName") {
  59320. if (typeof opts === "undefined") {
  59321. return true;
  59322. } else {
  59323. return (0, _shallowEqual.default)(node, opts);
  59324. }
  59325. }
  59326. return false;
  59327. }
  59328. function isRecordExpression(node, opts) {
  59329. if (!node)
  59330. return false;
  59331. const nodeType = node.type;
  59332. if (nodeType === "RecordExpression") {
  59333. if (typeof opts === "undefined") {
  59334. return true;
  59335. } else {
  59336. return (0, _shallowEqual.default)(node, opts);
  59337. }
  59338. }
  59339. return false;
  59340. }
  59341. function isTupleExpression(node, opts) {
  59342. if (!node)
  59343. return false;
  59344. const nodeType = node.type;
  59345. if (nodeType === "TupleExpression") {
  59346. if (typeof opts === "undefined") {
  59347. return true;
  59348. } else {
  59349. return (0, _shallowEqual.default)(node, opts);
  59350. }
  59351. }
  59352. return false;
  59353. }
  59354. function isDecimalLiteral(node, opts) {
  59355. if (!node)
  59356. return false;
  59357. const nodeType = node.type;
  59358. if (nodeType === "DecimalLiteral") {
  59359. if (typeof opts === "undefined") {
  59360. return true;
  59361. } else {
  59362. return (0, _shallowEqual.default)(node, opts);
  59363. }
  59364. }
  59365. return false;
  59366. }
  59367. function isStaticBlock(node, opts) {
  59368. if (!node)
  59369. return false;
  59370. const nodeType = node.type;
  59371. if (nodeType === "StaticBlock") {
  59372. if (typeof opts === "undefined") {
  59373. return true;
  59374. } else {
  59375. return (0, _shallowEqual.default)(node, opts);
  59376. }
  59377. }
  59378. return false;
  59379. }
  59380. function isModuleExpression(node, opts) {
  59381. if (!node)
  59382. return false;
  59383. const nodeType = node.type;
  59384. if (nodeType === "ModuleExpression") {
  59385. if (typeof opts === "undefined") {
  59386. return true;
  59387. } else {
  59388. return (0, _shallowEqual.default)(node, opts);
  59389. }
  59390. }
  59391. return false;
  59392. }
  59393. function isTSParameterProperty(node, opts) {
  59394. if (!node)
  59395. return false;
  59396. const nodeType = node.type;
  59397. if (nodeType === "TSParameterProperty") {
  59398. if (typeof opts === "undefined") {
  59399. return true;
  59400. } else {
  59401. return (0, _shallowEqual.default)(node, opts);
  59402. }
  59403. }
  59404. return false;
  59405. }
  59406. function isTSDeclareFunction(node, opts) {
  59407. if (!node)
  59408. return false;
  59409. const nodeType = node.type;
  59410. if (nodeType === "TSDeclareFunction") {
  59411. if (typeof opts === "undefined") {
  59412. return true;
  59413. } else {
  59414. return (0, _shallowEqual.default)(node, opts);
  59415. }
  59416. }
  59417. return false;
  59418. }
  59419. function isTSDeclareMethod(node, opts) {
  59420. if (!node)
  59421. return false;
  59422. const nodeType = node.type;
  59423. if (nodeType === "TSDeclareMethod") {
  59424. if (typeof opts === "undefined") {
  59425. return true;
  59426. } else {
  59427. return (0, _shallowEqual.default)(node, opts);
  59428. }
  59429. }
  59430. return false;
  59431. }
  59432. function isTSQualifiedName(node, opts) {
  59433. if (!node)
  59434. return false;
  59435. const nodeType = node.type;
  59436. if (nodeType === "TSQualifiedName") {
  59437. if (typeof opts === "undefined") {
  59438. return true;
  59439. } else {
  59440. return (0, _shallowEqual.default)(node, opts);
  59441. }
  59442. }
  59443. return false;
  59444. }
  59445. function isTSCallSignatureDeclaration(node, opts) {
  59446. if (!node)
  59447. return false;
  59448. const nodeType = node.type;
  59449. if (nodeType === "TSCallSignatureDeclaration") {
  59450. if (typeof opts === "undefined") {
  59451. return true;
  59452. } else {
  59453. return (0, _shallowEqual.default)(node, opts);
  59454. }
  59455. }
  59456. return false;
  59457. }
  59458. function isTSConstructSignatureDeclaration(node, opts) {
  59459. if (!node)
  59460. return false;
  59461. const nodeType = node.type;
  59462. if (nodeType === "TSConstructSignatureDeclaration") {
  59463. if (typeof opts === "undefined") {
  59464. return true;
  59465. } else {
  59466. return (0, _shallowEqual.default)(node, opts);
  59467. }
  59468. }
  59469. return false;
  59470. }
  59471. function isTSPropertySignature(node, opts) {
  59472. if (!node)
  59473. return false;
  59474. const nodeType = node.type;
  59475. if (nodeType === "TSPropertySignature") {
  59476. if (typeof opts === "undefined") {
  59477. return true;
  59478. } else {
  59479. return (0, _shallowEqual.default)(node, opts);
  59480. }
  59481. }
  59482. return false;
  59483. }
  59484. function isTSMethodSignature(node, opts) {
  59485. if (!node)
  59486. return false;
  59487. const nodeType = node.type;
  59488. if (nodeType === "TSMethodSignature") {
  59489. if (typeof opts === "undefined") {
  59490. return true;
  59491. } else {
  59492. return (0, _shallowEqual.default)(node, opts);
  59493. }
  59494. }
  59495. return false;
  59496. }
  59497. function isTSIndexSignature(node, opts) {
  59498. if (!node)
  59499. return false;
  59500. const nodeType = node.type;
  59501. if (nodeType === "TSIndexSignature") {
  59502. if (typeof opts === "undefined") {
  59503. return true;
  59504. } else {
  59505. return (0, _shallowEqual.default)(node, opts);
  59506. }
  59507. }
  59508. return false;
  59509. }
  59510. function isTSAnyKeyword(node, opts) {
  59511. if (!node)
  59512. return false;
  59513. const nodeType = node.type;
  59514. if (nodeType === "TSAnyKeyword") {
  59515. if (typeof opts === "undefined") {
  59516. return true;
  59517. } else {
  59518. return (0, _shallowEqual.default)(node, opts);
  59519. }
  59520. }
  59521. return false;
  59522. }
  59523. function isTSBooleanKeyword(node, opts) {
  59524. if (!node)
  59525. return false;
  59526. const nodeType = node.type;
  59527. if (nodeType === "TSBooleanKeyword") {
  59528. if (typeof opts === "undefined") {
  59529. return true;
  59530. } else {
  59531. return (0, _shallowEqual.default)(node, opts);
  59532. }
  59533. }
  59534. return false;
  59535. }
  59536. function isTSBigIntKeyword(node, opts) {
  59537. if (!node)
  59538. return false;
  59539. const nodeType = node.type;
  59540. if (nodeType === "TSBigIntKeyword") {
  59541. if (typeof opts === "undefined") {
  59542. return true;
  59543. } else {
  59544. return (0, _shallowEqual.default)(node, opts);
  59545. }
  59546. }
  59547. return false;
  59548. }
  59549. function isTSIntrinsicKeyword(node, opts) {
  59550. if (!node)
  59551. return false;
  59552. const nodeType = node.type;
  59553. if (nodeType === "TSIntrinsicKeyword") {
  59554. if (typeof opts === "undefined") {
  59555. return true;
  59556. } else {
  59557. return (0, _shallowEqual.default)(node, opts);
  59558. }
  59559. }
  59560. return false;
  59561. }
  59562. function isTSNeverKeyword(node, opts) {
  59563. if (!node)
  59564. return false;
  59565. const nodeType = node.type;
  59566. if (nodeType === "TSNeverKeyword") {
  59567. if (typeof opts === "undefined") {
  59568. return true;
  59569. } else {
  59570. return (0, _shallowEqual.default)(node, opts);
  59571. }
  59572. }
  59573. return false;
  59574. }
  59575. function isTSNullKeyword(node, opts) {
  59576. if (!node)
  59577. return false;
  59578. const nodeType = node.type;
  59579. if (nodeType === "TSNullKeyword") {
  59580. if (typeof opts === "undefined") {
  59581. return true;
  59582. } else {
  59583. return (0, _shallowEqual.default)(node, opts);
  59584. }
  59585. }
  59586. return false;
  59587. }
  59588. function isTSNumberKeyword(node, opts) {
  59589. if (!node)
  59590. return false;
  59591. const nodeType = node.type;
  59592. if (nodeType === "TSNumberKeyword") {
  59593. if (typeof opts === "undefined") {
  59594. return true;
  59595. } else {
  59596. return (0, _shallowEqual.default)(node, opts);
  59597. }
  59598. }
  59599. return false;
  59600. }
  59601. function isTSObjectKeyword(node, opts) {
  59602. if (!node)
  59603. return false;
  59604. const nodeType = node.type;
  59605. if (nodeType === "TSObjectKeyword") {
  59606. if (typeof opts === "undefined") {
  59607. return true;
  59608. } else {
  59609. return (0, _shallowEqual.default)(node, opts);
  59610. }
  59611. }
  59612. return false;
  59613. }
  59614. function isTSStringKeyword(node, opts) {
  59615. if (!node)
  59616. return false;
  59617. const nodeType = node.type;
  59618. if (nodeType === "TSStringKeyword") {
  59619. if (typeof opts === "undefined") {
  59620. return true;
  59621. } else {
  59622. return (0, _shallowEqual.default)(node, opts);
  59623. }
  59624. }
  59625. return false;
  59626. }
  59627. function isTSSymbolKeyword(node, opts) {
  59628. if (!node)
  59629. return false;
  59630. const nodeType = node.type;
  59631. if (nodeType === "TSSymbolKeyword") {
  59632. if (typeof opts === "undefined") {
  59633. return true;
  59634. } else {
  59635. return (0, _shallowEqual.default)(node, opts);
  59636. }
  59637. }
  59638. return false;
  59639. }
  59640. function isTSUndefinedKeyword(node, opts) {
  59641. if (!node)
  59642. return false;
  59643. const nodeType = node.type;
  59644. if (nodeType === "TSUndefinedKeyword") {
  59645. if (typeof opts === "undefined") {
  59646. return true;
  59647. } else {
  59648. return (0, _shallowEqual.default)(node, opts);
  59649. }
  59650. }
  59651. return false;
  59652. }
  59653. function isTSUnknownKeyword(node, opts) {
  59654. if (!node)
  59655. return false;
  59656. const nodeType = node.type;
  59657. if (nodeType === "TSUnknownKeyword") {
  59658. if (typeof opts === "undefined") {
  59659. return true;
  59660. } else {
  59661. return (0, _shallowEqual.default)(node, opts);
  59662. }
  59663. }
  59664. return false;
  59665. }
  59666. function isTSVoidKeyword(node, opts) {
  59667. if (!node)
  59668. return false;
  59669. const nodeType = node.type;
  59670. if (nodeType === "TSVoidKeyword") {
  59671. if (typeof opts === "undefined") {
  59672. return true;
  59673. } else {
  59674. return (0, _shallowEqual.default)(node, opts);
  59675. }
  59676. }
  59677. return false;
  59678. }
  59679. function isTSThisType(node, opts) {
  59680. if (!node)
  59681. return false;
  59682. const nodeType = node.type;
  59683. if (nodeType === "TSThisType") {
  59684. if (typeof opts === "undefined") {
  59685. return true;
  59686. } else {
  59687. return (0, _shallowEqual.default)(node, opts);
  59688. }
  59689. }
  59690. return false;
  59691. }
  59692. function isTSFunctionType(node, opts) {
  59693. if (!node)
  59694. return false;
  59695. const nodeType = node.type;
  59696. if (nodeType === "TSFunctionType") {
  59697. if (typeof opts === "undefined") {
  59698. return true;
  59699. } else {
  59700. return (0, _shallowEqual.default)(node, opts);
  59701. }
  59702. }
  59703. return false;
  59704. }
  59705. function isTSConstructorType(node, opts) {
  59706. if (!node)
  59707. return false;
  59708. const nodeType = node.type;
  59709. if (nodeType === "TSConstructorType") {
  59710. if (typeof opts === "undefined") {
  59711. return true;
  59712. } else {
  59713. return (0, _shallowEqual.default)(node, opts);
  59714. }
  59715. }
  59716. return false;
  59717. }
  59718. function isTSTypeReference(node, opts) {
  59719. if (!node)
  59720. return false;
  59721. const nodeType = node.type;
  59722. if (nodeType === "TSTypeReference") {
  59723. if (typeof opts === "undefined") {
  59724. return true;
  59725. } else {
  59726. return (0, _shallowEqual.default)(node, opts);
  59727. }
  59728. }
  59729. return false;
  59730. }
  59731. function isTSTypePredicate(node, opts) {
  59732. if (!node)
  59733. return false;
  59734. const nodeType = node.type;
  59735. if (nodeType === "TSTypePredicate") {
  59736. if (typeof opts === "undefined") {
  59737. return true;
  59738. } else {
  59739. return (0, _shallowEqual.default)(node, opts);
  59740. }
  59741. }
  59742. return false;
  59743. }
  59744. function isTSTypeQuery(node, opts) {
  59745. if (!node)
  59746. return false;
  59747. const nodeType = node.type;
  59748. if (nodeType === "TSTypeQuery") {
  59749. if (typeof opts === "undefined") {
  59750. return true;
  59751. } else {
  59752. return (0, _shallowEqual.default)(node, opts);
  59753. }
  59754. }
  59755. return false;
  59756. }
  59757. function isTSTypeLiteral(node, opts) {
  59758. if (!node)
  59759. return false;
  59760. const nodeType = node.type;
  59761. if (nodeType === "TSTypeLiteral") {
  59762. if (typeof opts === "undefined") {
  59763. return true;
  59764. } else {
  59765. return (0, _shallowEqual.default)(node, opts);
  59766. }
  59767. }
  59768. return false;
  59769. }
  59770. function isTSArrayType(node, opts) {
  59771. if (!node)
  59772. return false;
  59773. const nodeType = node.type;
  59774. if (nodeType === "TSArrayType") {
  59775. if (typeof opts === "undefined") {
  59776. return true;
  59777. } else {
  59778. return (0, _shallowEqual.default)(node, opts);
  59779. }
  59780. }
  59781. return false;
  59782. }
  59783. function isTSTupleType(node, opts) {
  59784. if (!node)
  59785. return false;
  59786. const nodeType = node.type;
  59787. if (nodeType === "TSTupleType") {
  59788. if (typeof opts === "undefined") {
  59789. return true;
  59790. } else {
  59791. return (0, _shallowEqual.default)(node, opts);
  59792. }
  59793. }
  59794. return false;
  59795. }
  59796. function isTSOptionalType(node, opts) {
  59797. if (!node)
  59798. return false;
  59799. const nodeType = node.type;
  59800. if (nodeType === "TSOptionalType") {
  59801. if (typeof opts === "undefined") {
  59802. return true;
  59803. } else {
  59804. return (0, _shallowEqual.default)(node, opts);
  59805. }
  59806. }
  59807. return false;
  59808. }
  59809. function isTSRestType(node, opts) {
  59810. if (!node)
  59811. return false;
  59812. const nodeType = node.type;
  59813. if (nodeType === "TSRestType") {
  59814. if (typeof opts === "undefined") {
  59815. return true;
  59816. } else {
  59817. return (0, _shallowEqual.default)(node, opts);
  59818. }
  59819. }
  59820. return false;
  59821. }
  59822. function isTSNamedTupleMember(node, opts) {
  59823. if (!node)
  59824. return false;
  59825. const nodeType = node.type;
  59826. if (nodeType === "TSNamedTupleMember") {
  59827. if (typeof opts === "undefined") {
  59828. return true;
  59829. } else {
  59830. return (0, _shallowEqual.default)(node, opts);
  59831. }
  59832. }
  59833. return false;
  59834. }
  59835. function isTSUnionType(node, opts) {
  59836. if (!node)
  59837. return false;
  59838. const nodeType = node.type;
  59839. if (nodeType === "TSUnionType") {
  59840. if (typeof opts === "undefined") {
  59841. return true;
  59842. } else {
  59843. return (0, _shallowEqual.default)(node, opts);
  59844. }
  59845. }
  59846. return false;
  59847. }
  59848. function isTSIntersectionType(node, opts) {
  59849. if (!node)
  59850. return false;
  59851. const nodeType = node.type;
  59852. if (nodeType === "TSIntersectionType") {
  59853. if (typeof opts === "undefined") {
  59854. return true;
  59855. } else {
  59856. return (0, _shallowEqual.default)(node, opts);
  59857. }
  59858. }
  59859. return false;
  59860. }
  59861. function isTSConditionalType(node, opts) {
  59862. if (!node)
  59863. return false;
  59864. const nodeType = node.type;
  59865. if (nodeType === "TSConditionalType") {
  59866. if (typeof opts === "undefined") {
  59867. return true;
  59868. } else {
  59869. return (0, _shallowEqual.default)(node, opts);
  59870. }
  59871. }
  59872. return false;
  59873. }
  59874. function isTSInferType(node, opts) {
  59875. if (!node)
  59876. return false;
  59877. const nodeType = node.type;
  59878. if (nodeType === "TSInferType") {
  59879. if (typeof opts === "undefined") {
  59880. return true;
  59881. } else {
  59882. return (0, _shallowEqual.default)(node, opts);
  59883. }
  59884. }
  59885. return false;
  59886. }
  59887. function isTSParenthesizedType(node, opts) {
  59888. if (!node)
  59889. return false;
  59890. const nodeType = node.type;
  59891. if (nodeType === "TSParenthesizedType") {
  59892. if (typeof opts === "undefined") {
  59893. return true;
  59894. } else {
  59895. return (0, _shallowEqual.default)(node, opts);
  59896. }
  59897. }
  59898. return false;
  59899. }
  59900. function isTSTypeOperator(node, opts) {
  59901. if (!node)
  59902. return false;
  59903. const nodeType = node.type;
  59904. if (nodeType === "TSTypeOperator") {
  59905. if (typeof opts === "undefined") {
  59906. return true;
  59907. } else {
  59908. return (0, _shallowEqual.default)(node, opts);
  59909. }
  59910. }
  59911. return false;
  59912. }
  59913. function isTSIndexedAccessType(node, opts) {
  59914. if (!node)
  59915. return false;
  59916. const nodeType = node.type;
  59917. if (nodeType === "TSIndexedAccessType") {
  59918. if (typeof opts === "undefined") {
  59919. return true;
  59920. } else {
  59921. return (0, _shallowEqual.default)(node, opts);
  59922. }
  59923. }
  59924. return false;
  59925. }
  59926. function isTSMappedType(node, opts) {
  59927. if (!node)
  59928. return false;
  59929. const nodeType = node.type;
  59930. if (nodeType === "TSMappedType") {
  59931. if (typeof opts === "undefined") {
  59932. return true;
  59933. } else {
  59934. return (0, _shallowEqual.default)(node, opts);
  59935. }
  59936. }
  59937. return false;
  59938. }
  59939. function isTSLiteralType(node, opts) {
  59940. if (!node)
  59941. return false;
  59942. const nodeType = node.type;
  59943. if (nodeType === "TSLiteralType") {
  59944. if (typeof opts === "undefined") {
  59945. return true;
  59946. } else {
  59947. return (0, _shallowEqual.default)(node, opts);
  59948. }
  59949. }
  59950. return false;
  59951. }
  59952. function isTSExpressionWithTypeArguments(node, opts) {
  59953. if (!node)
  59954. return false;
  59955. const nodeType = node.type;
  59956. if (nodeType === "TSExpressionWithTypeArguments") {
  59957. if (typeof opts === "undefined") {
  59958. return true;
  59959. } else {
  59960. return (0, _shallowEqual.default)(node, opts);
  59961. }
  59962. }
  59963. return false;
  59964. }
  59965. function isTSInterfaceDeclaration(node, opts) {
  59966. if (!node)
  59967. return false;
  59968. const nodeType = node.type;
  59969. if (nodeType === "TSInterfaceDeclaration") {
  59970. if (typeof opts === "undefined") {
  59971. return true;
  59972. } else {
  59973. return (0, _shallowEqual.default)(node, opts);
  59974. }
  59975. }
  59976. return false;
  59977. }
  59978. function isTSInterfaceBody(node, opts) {
  59979. if (!node)
  59980. return false;
  59981. const nodeType = node.type;
  59982. if (nodeType === "TSInterfaceBody") {
  59983. if (typeof opts === "undefined") {
  59984. return true;
  59985. } else {
  59986. return (0, _shallowEqual.default)(node, opts);
  59987. }
  59988. }
  59989. return false;
  59990. }
  59991. function isTSTypeAliasDeclaration(node, opts) {
  59992. if (!node)
  59993. return false;
  59994. const nodeType = node.type;
  59995. if (nodeType === "TSTypeAliasDeclaration") {
  59996. if (typeof opts === "undefined") {
  59997. return true;
  59998. } else {
  59999. return (0, _shallowEqual.default)(node, opts);
  60000. }
  60001. }
  60002. return false;
  60003. }
  60004. function isTSAsExpression(node, opts) {
  60005. if (!node)
  60006. return false;
  60007. const nodeType = node.type;
  60008. if (nodeType === "TSAsExpression") {
  60009. if (typeof opts === "undefined") {
  60010. return true;
  60011. } else {
  60012. return (0, _shallowEqual.default)(node, opts);
  60013. }
  60014. }
  60015. return false;
  60016. }
  60017. function isTSTypeAssertion(node, opts) {
  60018. if (!node)
  60019. return false;
  60020. const nodeType = node.type;
  60021. if (nodeType === "TSTypeAssertion") {
  60022. if (typeof opts === "undefined") {
  60023. return true;
  60024. } else {
  60025. return (0, _shallowEqual.default)(node, opts);
  60026. }
  60027. }
  60028. return false;
  60029. }
  60030. function isTSEnumDeclaration(node, opts) {
  60031. if (!node)
  60032. return false;
  60033. const nodeType = node.type;
  60034. if (nodeType === "TSEnumDeclaration") {
  60035. if (typeof opts === "undefined") {
  60036. return true;
  60037. } else {
  60038. return (0, _shallowEqual.default)(node, opts);
  60039. }
  60040. }
  60041. return false;
  60042. }
  60043. function isTSEnumMember(node, opts) {
  60044. if (!node)
  60045. return false;
  60046. const nodeType = node.type;
  60047. if (nodeType === "TSEnumMember") {
  60048. if (typeof opts === "undefined") {
  60049. return true;
  60050. } else {
  60051. return (0, _shallowEqual.default)(node, opts);
  60052. }
  60053. }
  60054. return false;
  60055. }
  60056. function isTSModuleDeclaration(node, opts) {
  60057. if (!node)
  60058. return false;
  60059. const nodeType = node.type;
  60060. if (nodeType === "TSModuleDeclaration") {
  60061. if (typeof opts === "undefined") {
  60062. return true;
  60063. } else {
  60064. return (0, _shallowEqual.default)(node, opts);
  60065. }
  60066. }
  60067. return false;
  60068. }
  60069. function isTSModuleBlock(node, opts) {
  60070. if (!node)
  60071. return false;
  60072. const nodeType = node.type;
  60073. if (nodeType === "TSModuleBlock") {
  60074. if (typeof opts === "undefined") {
  60075. return true;
  60076. } else {
  60077. return (0, _shallowEqual.default)(node, opts);
  60078. }
  60079. }
  60080. return false;
  60081. }
  60082. function isTSImportType(node, opts) {
  60083. if (!node)
  60084. return false;
  60085. const nodeType = node.type;
  60086. if (nodeType === "TSImportType") {
  60087. if (typeof opts === "undefined") {
  60088. return true;
  60089. } else {
  60090. return (0, _shallowEqual.default)(node, opts);
  60091. }
  60092. }
  60093. return false;
  60094. }
  60095. function isTSImportEqualsDeclaration(node, opts) {
  60096. if (!node)
  60097. return false;
  60098. const nodeType = node.type;
  60099. if (nodeType === "TSImportEqualsDeclaration") {
  60100. if (typeof opts === "undefined") {
  60101. return true;
  60102. } else {
  60103. return (0, _shallowEqual.default)(node, opts);
  60104. }
  60105. }
  60106. return false;
  60107. }
  60108. function isTSExternalModuleReference(node, opts) {
  60109. if (!node)
  60110. return false;
  60111. const nodeType = node.type;
  60112. if (nodeType === "TSExternalModuleReference") {
  60113. if (typeof opts === "undefined") {
  60114. return true;
  60115. } else {
  60116. return (0, _shallowEqual.default)(node, opts);
  60117. }
  60118. }
  60119. return false;
  60120. }
  60121. function isTSNonNullExpression(node, opts) {
  60122. if (!node)
  60123. return false;
  60124. const nodeType = node.type;
  60125. if (nodeType === "TSNonNullExpression") {
  60126. if (typeof opts === "undefined") {
  60127. return true;
  60128. } else {
  60129. return (0, _shallowEqual.default)(node, opts);
  60130. }
  60131. }
  60132. return false;
  60133. }
  60134. function isTSExportAssignment(node, opts) {
  60135. if (!node)
  60136. return false;
  60137. const nodeType = node.type;
  60138. if (nodeType === "TSExportAssignment") {
  60139. if (typeof opts === "undefined") {
  60140. return true;
  60141. } else {
  60142. return (0, _shallowEqual.default)(node, opts);
  60143. }
  60144. }
  60145. return false;
  60146. }
  60147. function isTSNamespaceExportDeclaration(node, opts) {
  60148. if (!node)
  60149. return false;
  60150. const nodeType = node.type;
  60151. if (nodeType === "TSNamespaceExportDeclaration") {
  60152. if (typeof opts === "undefined") {
  60153. return true;
  60154. } else {
  60155. return (0, _shallowEqual.default)(node, opts);
  60156. }
  60157. }
  60158. return false;
  60159. }
  60160. function isTSTypeAnnotation(node, opts) {
  60161. if (!node)
  60162. return false;
  60163. const nodeType = node.type;
  60164. if (nodeType === "TSTypeAnnotation") {
  60165. if (typeof opts === "undefined") {
  60166. return true;
  60167. } else {
  60168. return (0, _shallowEqual.default)(node, opts);
  60169. }
  60170. }
  60171. return false;
  60172. }
  60173. function isTSTypeParameterInstantiation(node, opts) {
  60174. if (!node)
  60175. return false;
  60176. const nodeType = node.type;
  60177. if (nodeType === "TSTypeParameterInstantiation") {
  60178. if (typeof opts === "undefined") {
  60179. return true;
  60180. } else {
  60181. return (0, _shallowEqual.default)(node, opts);
  60182. }
  60183. }
  60184. return false;
  60185. }
  60186. function isTSTypeParameterDeclaration(node, opts) {
  60187. if (!node)
  60188. return false;
  60189. const nodeType = node.type;
  60190. if (nodeType === "TSTypeParameterDeclaration") {
  60191. if (typeof opts === "undefined") {
  60192. return true;
  60193. } else {
  60194. return (0, _shallowEqual.default)(node, opts);
  60195. }
  60196. }
  60197. return false;
  60198. }
  60199. function isTSTypeParameter(node, opts) {
  60200. if (!node)
  60201. return false;
  60202. const nodeType = node.type;
  60203. if (nodeType === "TSTypeParameter") {
  60204. if (typeof opts === "undefined") {
  60205. return true;
  60206. } else {
  60207. return (0, _shallowEqual.default)(node, opts);
  60208. }
  60209. }
  60210. return false;
  60211. }
  60212. function isExpression(node, opts) {
  60213. if (!node)
  60214. return false;
  60215. const nodeType = node.type;
  60216. if ("ArrayExpression" === nodeType || "AssignmentExpression" === nodeType || "BinaryExpression" === nodeType || "CallExpression" === nodeType || "ConditionalExpression" === nodeType || "FunctionExpression" === nodeType || "Identifier" === nodeType || "StringLiteral" === nodeType || "NumericLiteral" === nodeType || "NullLiteral" === nodeType || "BooleanLiteral" === nodeType || "RegExpLiteral" === nodeType || "LogicalExpression" === nodeType || "MemberExpression" === nodeType || "NewExpression" === nodeType || "ObjectExpression" === nodeType || "SequenceExpression" === nodeType || "ParenthesizedExpression" === nodeType || "ThisExpression" === nodeType || "UnaryExpression" === nodeType || "UpdateExpression" === nodeType || "ArrowFunctionExpression" === nodeType || "ClassExpression" === nodeType || "MetaProperty" === nodeType || "Super" === nodeType || "TaggedTemplateExpression" === nodeType || "TemplateLiteral" === nodeType || "YieldExpression" === nodeType || "AwaitExpression" === nodeType || "Import" === nodeType || "BigIntLiteral" === nodeType || "OptionalMemberExpression" === nodeType || "OptionalCallExpression" === nodeType || "TypeCastExpression" === nodeType || "JSXElement" === nodeType || "JSXFragment" === nodeType || "BindExpression" === nodeType || "PipelinePrimaryTopicReference" === nodeType || "DoExpression" === nodeType || "RecordExpression" === nodeType || "TupleExpression" === nodeType || "DecimalLiteral" === nodeType || "ModuleExpression" === nodeType || "TSAsExpression" === nodeType || "TSTypeAssertion" === nodeType || "TSNonNullExpression" === nodeType || nodeType === "Placeholder" && ("Expression" === node.expectedNode || "Identifier" === node.expectedNode || "StringLiteral" === node.expectedNode)) {
  60217. if (typeof opts === "undefined") {
  60218. return true;
  60219. } else {
  60220. return (0, _shallowEqual.default)(node, opts);
  60221. }
  60222. }
  60223. return false;
  60224. }
  60225. function isBinary(node, opts) {
  60226. if (!node)
  60227. return false;
  60228. const nodeType = node.type;
  60229. if ("BinaryExpression" === nodeType || "LogicalExpression" === nodeType) {
  60230. if (typeof opts === "undefined") {
  60231. return true;
  60232. } else {
  60233. return (0, _shallowEqual.default)(node, opts);
  60234. }
  60235. }
  60236. return false;
  60237. }
  60238. function isScopable(node, opts) {
  60239. if (!node)
  60240. return false;
  60241. const nodeType = node.type;
  60242. if ("BlockStatement" === nodeType || "CatchClause" === nodeType || "DoWhileStatement" === nodeType || "ForInStatement" === nodeType || "ForStatement" === nodeType || "FunctionDeclaration" === nodeType || "FunctionExpression" === nodeType || "Program" === nodeType || "ObjectMethod" === nodeType || "SwitchStatement" === nodeType || "WhileStatement" === nodeType || "ArrowFunctionExpression" === nodeType || "ClassExpression" === nodeType || "ClassDeclaration" === nodeType || "ForOfStatement" === nodeType || "ClassMethod" === nodeType || "ClassPrivateMethod" === nodeType || "StaticBlock" === nodeType || "TSModuleBlock" === nodeType || nodeType === "Placeholder" && "BlockStatement" === node.expectedNode) {
  60243. if (typeof opts === "undefined") {
  60244. return true;
  60245. } else {
  60246. return (0, _shallowEqual.default)(node, opts);
  60247. }
  60248. }
  60249. return false;
  60250. }
  60251. function isBlockParent(node, opts) {
  60252. if (!node)
  60253. return false;
  60254. const nodeType = node.type;
  60255. if ("BlockStatement" === nodeType || "CatchClause" === nodeType || "DoWhileStatement" === nodeType || "ForInStatement" === nodeType || "ForStatement" === nodeType || "FunctionDeclaration" === nodeType || "FunctionExpression" === nodeType || "Program" === nodeType || "ObjectMethod" === nodeType || "SwitchStatement" === nodeType || "WhileStatement" === nodeType || "ArrowFunctionExpression" === nodeType || "ForOfStatement" === nodeType || "ClassMethod" === nodeType || "ClassPrivateMethod" === nodeType || "StaticBlock" === nodeType || "TSModuleBlock" === nodeType || nodeType === "Placeholder" && "BlockStatement" === node.expectedNode) {
  60256. if (typeof opts === "undefined") {
  60257. return true;
  60258. } else {
  60259. return (0, _shallowEqual.default)(node, opts);
  60260. }
  60261. }
  60262. return false;
  60263. }
  60264. function isBlock(node, opts) {
  60265. if (!node)
  60266. return false;
  60267. const nodeType = node.type;
  60268. if ("BlockStatement" === nodeType || "Program" === nodeType || "TSModuleBlock" === nodeType || nodeType === "Placeholder" && "BlockStatement" === node.expectedNode) {
  60269. if (typeof opts === "undefined") {
  60270. return true;
  60271. } else {
  60272. return (0, _shallowEqual.default)(node, opts);
  60273. }
  60274. }
  60275. return false;
  60276. }
  60277. function isStatement(node, opts) {
  60278. if (!node)
  60279. return false;
  60280. const nodeType = node.type;
  60281. if ("BlockStatement" === nodeType || "BreakStatement" === nodeType || "ContinueStatement" === nodeType || "DebuggerStatement" === nodeType || "DoWhileStatement" === nodeType || "EmptyStatement" === nodeType || "ExpressionStatement" === nodeType || "ForInStatement" === nodeType || "ForStatement" === nodeType || "FunctionDeclaration" === nodeType || "IfStatement" === nodeType || "LabeledStatement" === nodeType || "ReturnStatement" === nodeType || "SwitchStatement" === nodeType || "ThrowStatement" === nodeType || "TryStatement" === nodeType || "VariableDeclaration" === nodeType || "WhileStatement" === nodeType || "WithStatement" === nodeType || "ClassDeclaration" === nodeType || "ExportAllDeclaration" === nodeType || "ExportDefaultDeclaration" === nodeType || "ExportNamedDeclaration" === nodeType || "ForOfStatement" === nodeType || "ImportDeclaration" === nodeType || "DeclareClass" === nodeType || "DeclareFunction" === nodeType || "DeclareInterface" === nodeType || "DeclareModule" === nodeType || "DeclareModuleExports" === nodeType || "DeclareTypeAlias" === nodeType || "DeclareOpaqueType" === nodeType || "DeclareVariable" === nodeType || "DeclareExportDeclaration" === nodeType || "DeclareExportAllDeclaration" === nodeType || "InterfaceDeclaration" === nodeType || "OpaqueType" === nodeType || "TypeAlias" === nodeType || "EnumDeclaration" === nodeType || "TSDeclareFunction" === nodeType || "TSInterfaceDeclaration" === nodeType || "TSTypeAliasDeclaration" === nodeType || "TSEnumDeclaration" === nodeType || "TSModuleDeclaration" === nodeType || "TSImportEqualsDeclaration" === nodeType || "TSExportAssignment" === nodeType || "TSNamespaceExportDeclaration" === nodeType || nodeType === "Placeholder" && ("Statement" === node.expectedNode || "Declaration" === node.expectedNode || "BlockStatement" === node.expectedNode)) {
  60282. if (typeof opts === "undefined") {
  60283. return true;
  60284. } else {
  60285. return (0, _shallowEqual.default)(node, opts);
  60286. }
  60287. }
  60288. return false;
  60289. }
  60290. function isTerminatorless(node, opts) {
  60291. if (!node)
  60292. return false;
  60293. const nodeType = node.type;
  60294. if ("BreakStatement" === nodeType || "ContinueStatement" === nodeType || "ReturnStatement" === nodeType || "ThrowStatement" === nodeType || "YieldExpression" === nodeType || "AwaitExpression" === nodeType) {
  60295. if (typeof opts === "undefined") {
  60296. return true;
  60297. } else {
  60298. return (0, _shallowEqual.default)(node, opts);
  60299. }
  60300. }
  60301. return false;
  60302. }
  60303. function isCompletionStatement(node, opts) {
  60304. if (!node)
  60305. return false;
  60306. const nodeType = node.type;
  60307. if ("BreakStatement" === nodeType || "ContinueStatement" === nodeType || "ReturnStatement" === nodeType || "ThrowStatement" === nodeType) {
  60308. if (typeof opts === "undefined") {
  60309. return true;
  60310. } else {
  60311. return (0, _shallowEqual.default)(node, opts);
  60312. }
  60313. }
  60314. return false;
  60315. }
  60316. function isConditional(node, opts) {
  60317. if (!node)
  60318. return false;
  60319. const nodeType = node.type;
  60320. if ("ConditionalExpression" === nodeType || "IfStatement" === nodeType) {
  60321. if (typeof opts === "undefined") {
  60322. return true;
  60323. } else {
  60324. return (0, _shallowEqual.default)(node, opts);
  60325. }
  60326. }
  60327. return false;
  60328. }
  60329. function isLoop(node, opts) {
  60330. if (!node)
  60331. return false;
  60332. const nodeType = node.type;
  60333. if ("DoWhileStatement" === nodeType || "ForInStatement" === nodeType || "ForStatement" === nodeType || "WhileStatement" === nodeType || "ForOfStatement" === nodeType) {
  60334. if (typeof opts === "undefined") {
  60335. return true;
  60336. } else {
  60337. return (0, _shallowEqual.default)(node, opts);
  60338. }
  60339. }
  60340. return false;
  60341. }
  60342. function isWhile(node, opts) {
  60343. if (!node)
  60344. return false;
  60345. const nodeType = node.type;
  60346. if ("DoWhileStatement" === nodeType || "WhileStatement" === nodeType) {
  60347. if (typeof opts === "undefined") {
  60348. return true;
  60349. } else {
  60350. return (0, _shallowEqual.default)(node, opts);
  60351. }
  60352. }
  60353. return false;
  60354. }
  60355. function isExpressionWrapper(node, opts) {
  60356. if (!node)
  60357. return false;
  60358. const nodeType = node.type;
  60359. if ("ExpressionStatement" === nodeType || "ParenthesizedExpression" === nodeType || "TypeCastExpression" === nodeType) {
  60360. if (typeof opts === "undefined") {
  60361. return true;
  60362. } else {
  60363. return (0, _shallowEqual.default)(node, opts);
  60364. }
  60365. }
  60366. return false;
  60367. }
  60368. function isFor(node, opts) {
  60369. if (!node)
  60370. return false;
  60371. const nodeType = node.type;
  60372. if ("ForInStatement" === nodeType || "ForStatement" === nodeType || "ForOfStatement" === nodeType) {
  60373. if (typeof opts === "undefined") {
  60374. return true;
  60375. } else {
  60376. return (0, _shallowEqual.default)(node, opts);
  60377. }
  60378. }
  60379. return false;
  60380. }
  60381. function isForXStatement(node, opts) {
  60382. if (!node)
  60383. return false;
  60384. const nodeType = node.type;
  60385. if ("ForInStatement" === nodeType || "ForOfStatement" === nodeType) {
  60386. if (typeof opts === "undefined") {
  60387. return true;
  60388. } else {
  60389. return (0, _shallowEqual.default)(node, opts);
  60390. }
  60391. }
  60392. return false;
  60393. }
  60394. function isFunction(node, opts) {
  60395. if (!node)
  60396. return false;
  60397. const nodeType = node.type;
  60398. if ("FunctionDeclaration" === nodeType || "FunctionExpression" === nodeType || "ObjectMethod" === nodeType || "ArrowFunctionExpression" === nodeType || "ClassMethod" === nodeType || "ClassPrivateMethod" === nodeType) {
  60399. if (typeof opts === "undefined") {
  60400. return true;
  60401. } else {
  60402. return (0, _shallowEqual.default)(node, opts);
  60403. }
  60404. }
  60405. return false;
  60406. }
  60407. function isFunctionParent(node, opts) {
  60408. if (!node)
  60409. return false;
  60410. const nodeType = node.type;
  60411. if ("FunctionDeclaration" === nodeType || "FunctionExpression" === nodeType || "ObjectMethod" === nodeType || "ArrowFunctionExpression" === nodeType || "ClassMethod" === nodeType || "ClassPrivateMethod" === nodeType) {
  60412. if (typeof opts === "undefined") {
  60413. return true;
  60414. } else {
  60415. return (0, _shallowEqual.default)(node, opts);
  60416. }
  60417. }
  60418. return false;
  60419. }
  60420. function isPureish(node, opts) {
  60421. if (!node)
  60422. return false;
  60423. const nodeType = node.type;
  60424. if ("FunctionDeclaration" === nodeType || "FunctionExpression" === nodeType || "StringLiteral" === nodeType || "NumericLiteral" === nodeType || "NullLiteral" === nodeType || "BooleanLiteral" === nodeType || "RegExpLiteral" === nodeType || "ArrowFunctionExpression" === nodeType || "BigIntLiteral" === nodeType || "DecimalLiteral" === nodeType || nodeType === "Placeholder" && "StringLiteral" === node.expectedNode) {
  60425. if (typeof opts === "undefined") {
  60426. return true;
  60427. } else {
  60428. return (0, _shallowEqual.default)(node, opts);
  60429. }
  60430. }
  60431. return false;
  60432. }
  60433. function isDeclaration2(node, opts) {
  60434. if (!node)
  60435. return false;
  60436. const nodeType = node.type;
  60437. if ("FunctionDeclaration" === nodeType || "VariableDeclaration" === nodeType || "ClassDeclaration" === nodeType || "ExportAllDeclaration" === nodeType || "ExportDefaultDeclaration" === nodeType || "ExportNamedDeclaration" === nodeType || "ImportDeclaration" === nodeType || "DeclareClass" === nodeType || "DeclareFunction" === nodeType || "DeclareInterface" === nodeType || "DeclareModule" === nodeType || "DeclareModuleExports" === nodeType || "DeclareTypeAlias" === nodeType || "DeclareOpaqueType" === nodeType || "DeclareVariable" === nodeType || "DeclareExportDeclaration" === nodeType || "DeclareExportAllDeclaration" === nodeType || "InterfaceDeclaration" === nodeType || "OpaqueType" === nodeType || "TypeAlias" === nodeType || "EnumDeclaration" === nodeType || "TSDeclareFunction" === nodeType || "TSInterfaceDeclaration" === nodeType || "TSTypeAliasDeclaration" === nodeType || "TSEnumDeclaration" === nodeType || "TSModuleDeclaration" === nodeType || nodeType === "Placeholder" && "Declaration" === node.expectedNode) {
  60438. if (typeof opts === "undefined") {
  60439. return true;
  60440. } else {
  60441. return (0, _shallowEqual.default)(node, opts);
  60442. }
  60443. }
  60444. return false;
  60445. }
  60446. function isPatternLike(node, opts) {
  60447. if (!node)
  60448. return false;
  60449. const nodeType = node.type;
  60450. if ("Identifier" === nodeType || "RestElement" === nodeType || "AssignmentPattern" === nodeType || "ArrayPattern" === nodeType || "ObjectPattern" === nodeType || nodeType === "Placeholder" && ("Pattern" === node.expectedNode || "Identifier" === node.expectedNode)) {
  60451. if (typeof opts === "undefined") {
  60452. return true;
  60453. } else {
  60454. return (0, _shallowEqual.default)(node, opts);
  60455. }
  60456. }
  60457. return false;
  60458. }
  60459. function isLVal(node, opts) {
  60460. if (!node)
  60461. return false;
  60462. const nodeType = node.type;
  60463. if ("Identifier" === nodeType || "MemberExpression" === nodeType || "RestElement" === nodeType || "AssignmentPattern" === nodeType || "ArrayPattern" === nodeType || "ObjectPattern" === nodeType || "TSParameterProperty" === nodeType || nodeType === "Placeholder" && ("Pattern" === node.expectedNode || "Identifier" === node.expectedNode)) {
  60464. if (typeof opts === "undefined") {
  60465. return true;
  60466. } else {
  60467. return (0, _shallowEqual.default)(node, opts);
  60468. }
  60469. }
  60470. return false;
  60471. }
  60472. function isTSEntityName(node, opts) {
  60473. if (!node)
  60474. return false;
  60475. const nodeType = node.type;
  60476. if ("Identifier" === nodeType || "TSQualifiedName" === nodeType || nodeType === "Placeholder" && "Identifier" === node.expectedNode) {
  60477. if (typeof opts === "undefined") {
  60478. return true;
  60479. } else {
  60480. return (0, _shallowEqual.default)(node, opts);
  60481. }
  60482. }
  60483. return false;
  60484. }
  60485. function isLiteral(node, opts) {
  60486. if (!node)
  60487. return false;
  60488. const nodeType = node.type;
  60489. if ("StringLiteral" === nodeType || "NumericLiteral" === nodeType || "NullLiteral" === nodeType || "BooleanLiteral" === nodeType || "RegExpLiteral" === nodeType || "TemplateLiteral" === nodeType || "BigIntLiteral" === nodeType || "DecimalLiteral" === nodeType || nodeType === "Placeholder" && "StringLiteral" === node.expectedNode) {
  60490. if (typeof opts === "undefined") {
  60491. return true;
  60492. } else {
  60493. return (0, _shallowEqual.default)(node, opts);
  60494. }
  60495. }
  60496. return false;
  60497. }
  60498. function isImmutable(node, opts) {
  60499. if (!node)
  60500. return false;
  60501. const nodeType = node.type;
  60502. if ("StringLiteral" === nodeType || "NumericLiteral" === nodeType || "NullLiteral" === nodeType || "BooleanLiteral" === nodeType || "BigIntLiteral" === nodeType || "JSXAttribute" === nodeType || "JSXClosingElement" === nodeType || "JSXElement" === nodeType || "JSXExpressionContainer" === nodeType || "JSXSpreadChild" === nodeType || "JSXOpeningElement" === nodeType || "JSXText" === nodeType || "JSXFragment" === nodeType || "JSXOpeningFragment" === nodeType || "JSXClosingFragment" === nodeType || "DecimalLiteral" === nodeType || nodeType === "Placeholder" && "StringLiteral" === node.expectedNode) {
  60503. if (typeof opts === "undefined") {
  60504. return true;
  60505. } else {
  60506. return (0, _shallowEqual.default)(node, opts);
  60507. }
  60508. }
  60509. return false;
  60510. }
  60511. function isUserWhitespacable(node, opts) {
  60512. if (!node)
  60513. return false;
  60514. const nodeType = node.type;
  60515. if ("ObjectMethod" === nodeType || "ObjectProperty" === nodeType || "ObjectTypeInternalSlot" === nodeType || "ObjectTypeCallProperty" === nodeType || "ObjectTypeIndexer" === nodeType || "ObjectTypeProperty" === nodeType || "ObjectTypeSpreadProperty" === nodeType) {
  60516. if (typeof opts === "undefined") {
  60517. return true;
  60518. } else {
  60519. return (0, _shallowEqual.default)(node, opts);
  60520. }
  60521. }
  60522. return false;
  60523. }
  60524. function isMethod(node, opts) {
  60525. if (!node)
  60526. return false;
  60527. const nodeType = node.type;
  60528. if ("ObjectMethod" === nodeType || "ClassMethod" === nodeType || "ClassPrivateMethod" === nodeType) {
  60529. if (typeof opts === "undefined") {
  60530. return true;
  60531. } else {
  60532. return (0, _shallowEqual.default)(node, opts);
  60533. }
  60534. }
  60535. return false;
  60536. }
  60537. function isObjectMember(node, opts) {
  60538. if (!node)
  60539. return false;
  60540. const nodeType = node.type;
  60541. if ("ObjectMethod" === nodeType || "ObjectProperty" === nodeType) {
  60542. if (typeof opts === "undefined") {
  60543. return true;
  60544. } else {
  60545. return (0, _shallowEqual.default)(node, opts);
  60546. }
  60547. }
  60548. return false;
  60549. }
  60550. function isProperty(node, opts) {
  60551. if (!node)
  60552. return false;
  60553. const nodeType = node.type;
  60554. if ("ObjectProperty" === nodeType || "ClassProperty" === nodeType || "ClassPrivateProperty" === nodeType) {
  60555. if (typeof opts === "undefined") {
  60556. return true;
  60557. } else {
  60558. return (0, _shallowEqual.default)(node, opts);
  60559. }
  60560. }
  60561. return false;
  60562. }
  60563. function isUnaryLike(node, opts) {
  60564. if (!node)
  60565. return false;
  60566. const nodeType = node.type;
  60567. if ("UnaryExpression" === nodeType || "SpreadElement" === nodeType) {
  60568. if (typeof opts === "undefined") {
  60569. return true;
  60570. } else {
  60571. return (0, _shallowEqual.default)(node, opts);
  60572. }
  60573. }
  60574. return false;
  60575. }
  60576. function isPattern(node, opts) {
  60577. if (!node)
  60578. return false;
  60579. const nodeType = node.type;
  60580. if ("AssignmentPattern" === nodeType || "ArrayPattern" === nodeType || "ObjectPattern" === nodeType || nodeType === "Placeholder" && "Pattern" === node.expectedNode) {
  60581. if (typeof opts === "undefined") {
  60582. return true;
  60583. } else {
  60584. return (0, _shallowEqual.default)(node, opts);
  60585. }
  60586. }
  60587. return false;
  60588. }
  60589. function isClass(node, opts) {
  60590. if (!node)
  60591. return false;
  60592. const nodeType = node.type;
  60593. if ("ClassExpression" === nodeType || "ClassDeclaration" === nodeType) {
  60594. if (typeof opts === "undefined") {
  60595. return true;
  60596. } else {
  60597. return (0, _shallowEqual.default)(node, opts);
  60598. }
  60599. }
  60600. return false;
  60601. }
  60602. function isModuleDeclaration(node, opts) {
  60603. if (!node)
  60604. return false;
  60605. const nodeType = node.type;
  60606. if ("ExportAllDeclaration" === nodeType || "ExportDefaultDeclaration" === nodeType || "ExportNamedDeclaration" === nodeType || "ImportDeclaration" === nodeType) {
  60607. if (typeof opts === "undefined") {
  60608. return true;
  60609. } else {
  60610. return (0, _shallowEqual.default)(node, opts);
  60611. }
  60612. }
  60613. return false;
  60614. }
  60615. function isExportDeclaration(node, opts) {
  60616. if (!node)
  60617. return false;
  60618. const nodeType = node.type;
  60619. if ("ExportAllDeclaration" === nodeType || "ExportDefaultDeclaration" === nodeType || "ExportNamedDeclaration" === nodeType) {
  60620. if (typeof opts === "undefined") {
  60621. return true;
  60622. } else {
  60623. return (0, _shallowEqual.default)(node, opts);
  60624. }
  60625. }
  60626. return false;
  60627. }
  60628. function isModuleSpecifier(node, opts) {
  60629. if (!node)
  60630. return false;
  60631. const nodeType = node.type;
  60632. if ("ExportSpecifier" === nodeType || "ImportDefaultSpecifier" === nodeType || "ImportNamespaceSpecifier" === nodeType || "ImportSpecifier" === nodeType || "ExportNamespaceSpecifier" === nodeType || "ExportDefaultSpecifier" === nodeType) {
  60633. if (typeof opts === "undefined") {
  60634. return true;
  60635. } else {
  60636. return (0, _shallowEqual.default)(node, opts);
  60637. }
  60638. }
  60639. return false;
  60640. }
  60641. function isFlow(node, opts) {
  60642. if (!node)
  60643. return false;
  60644. const nodeType = node.type;
  60645. if ("AnyTypeAnnotation" === nodeType || "ArrayTypeAnnotation" === nodeType || "BooleanTypeAnnotation" === nodeType || "BooleanLiteralTypeAnnotation" === nodeType || "NullLiteralTypeAnnotation" === nodeType || "ClassImplements" === nodeType || "DeclareClass" === nodeType || "DeclareFunction" === nodeType || "DeclareInterface" === nodeType || "DeclareModule" === nodeType || "DeclareModuleExports" === nodeType || "DeclareTypeAlias" === nodeType || "DeclareOpaqueType" === nodeType || "DeclareVariable" === nodeType || "DeclareExportDeclaration" === nodeType || "DeclareExportAllDeclaration" === nodeType || "DeclaredPredicate" === nodeType || "ExistsTypeAnnotation" === nodeType || "FunctionTypeAnnotation" === nodeType || "FunctionTypeParam" === nodeType || "GenericTypeAnnotation" === nodeType || "InferredPredicate" === nodeType || "InterfaceExtends" === nodeType || "InterfaceDeclaration" === nodeType || "InterfaceTypeAnnotation" === nodeType || "IntersectionTypeAnnotation" === nodeType || "MixedTypeAnnotation" === nodeType || "EmptyTypeAnnotation" === nodeType || "NullableTypeAnnotation" === nodeType || "NumberLiteralTypeAnnotation" === nodeType || "NumberTypeAnnotation" === nodeType || "ObjectTypeAnnotation" === nodeType || "ObjectTypeInternalSlot" === nodeType || "ObjectTypeCallProperty" === nodeType || "ObjectTypeIndexer" === nodeType || "ObjectTypeProperty" === nodeType || "ObjectTypeSpreadProperty" === nodeType || "OpaqueType" === nodeType || "QualifiedTypeIdentifier" === nodeType || "StringLiteralTypeAnnotation" === nodeType || "StringTypeAnnotation" === nodeType || "SymbolTypeAnnotation" === nodeType || "ThisTypeAnnotation" === nodeType || "TupleTypeAnnotation" === nodeType || "TypeofTypeAnnotation" === nodeType || "TypeAlias" === nodeType || "TypeAnnotation" === nodeType || "TypeCastExpression" === nodeType || "TypeParameter" === nodeType || "TypeParameterDeclaration" === nodeType || "TypeParameterInstantiation" === nodeType || "UnionTypeAnnotation" === nodeType || "Variance" === nodeType || "VoidTypeAnnotation" === nodeType || "IndexedAccessType" === nodeType || "OptionalIndexedAccessType" === nodeType) {
  60646. if (typeof opts === "undefined") {
  60647. return true;
  60648. } else {
  60649. return (0, _shallowEqual.default)(node, opts);
  60650. }
  60651. }
  60652. return false;
  60653. }
  60654. function isFlowType(node, opts) {
  60655. if (!node)
  60656. return false;
  60657. const nodeType = node.type;
  60658. if ("AnyTypeAnnotation" === nodeType || "ArrayTypeAnnotation" === nodeType || "BooleanTypeAnnotation" === nodeType || "BooleanLiteralTypeAnnotation" === nodeType || "NullLiteralTypeAnnotation" === nodeType || "ExistsTypeAnnotation" === nodeType || "FunctionTypeAnnotation" === nodeType || "GenericTypeAnnotation" === nodeType || "InterfaceTypeAnnotation" === nodeType || "IntersectionTypeAnnotation" === nodeType || "MixedTypeAnnotation" === nodeType || "EmptyTypeAnnotation" === nodeType || "NullableTypeAnnotation" === nodeType || "NumberLiteralTypeAnnotation" === nodeType || "NumberTypeAnnotation" === nodeType || "ObjectTypeAnnotation" === nodeType || "StringLiteralTypeAnnotation" === nodeType || "StringTypeAnnotation" === nodeType || "SymbolTypeAnnotation" === nodeType || "ThisTypeAnnotation" === nodeType || "TupleTypeAnnotation" === nodeType || "TypeofTypeAnnotation" === nodeType || "UnionTypeAnnotation" === nodeType || "VoidTypeAnnotation" === nodeType || "IndexedAccessType" === nodeType || "OptionalIndexedAccessType" === nodeType) {
  60659. if (typeof opts === "undefined") {
  60660. return true;
  60661. } else {
  60662. return (0, _shallowEqual.default)(node, opts);
  60663. }
  60664. }
  60665. return false;
  60666. }
  60667. function isFlowBaseAnnotation(node, opts) {
  60668. if (!node)
  60669. return false;
  60670. const nodeType = node.type;
  60671. if ("AnyTypeAnnotation" === nodeType || "BooleanTypeAnnotation" === nodeType || "NullLiteralTypeAnnotation" === nodeType || "MixedTypeAnnotation" === nodeType || "EmptyTypeAnnotation" === nodeType || "NumberTypeAnnotation" === nodeType || "StringTypeAnnotation" === nodeType || "SymbolTypeAnnotation" === nodeType || "ThisTypeAnnotation" === nodeType || "VoidTypeAnnotation" === nodeType) {
  60672. if (typeof opts === "undefined") {
  60673. return true;
  60674. } else {
  60675. return (0, _shallowEqual.default)(node, opts);
  60676. }
  60677. }
  60678. return false;
  60679. }
  60680. function isFlowDeclaration(node, opts) {
  60681. if (!node)
  60682. return false;
  60683. const nodeType = node.type;
  60684. if ("DeclareClass" === nodeType || "DeclareFunction" === nodeType || "DeclareInterface" === nodeType || "DeclareModule" === nodeType || "DeclareModuleExports" === nodeType || "DeclareTypeAlias" === nodeType || "DeclareOpaqueType" === nodeType || "DeclareVariable" === nodeType || "DeclareExportDeclaration" === nodeType || "DeclareExportAllDeclaration" === nodeType || "InterfaceDeclaration" === nodeType || "OpaqueType" === nodeType || "TypeAlias" === nodeType) {
  60685. if (typeof opts === "undefined") {
  60686. return true;
  60687. } else {
  60688. return (0, _shallowEqual.default)(node, opts);
  60689. }
  60690. }
  60691. return false;
  60692. }
  60693. function isFlowPredicate(node, opts) {
  60694. if (!node)
  60695. return false;
  60696. const nodeType = node.type;
  60697. if ("DeclaredPredicate" === nodeType || "InferredPredicate" === nodeType) {
  60698. if (typeof opts === "undefined") {
  60699. return true;
  60700. } else {
  60701. return (0, _shallowEqual.default)(node, opts);
  60702. }
  60703. }
  60704. return false;
  60705. }
  60706. function isEnumBody(node, opts) {
  60707. if (!node)
  60708. return false;
  60709. const nodeType = node.type;
  60710. if ("EnumBooleanBody" === nodeType || "EnumNumberBody" === nodeType || "EnumStringBody" === nodeType || "EnumSymbolBody" === nodeType) {
  60711. if (typeof opts === "undefined") {
  60712. return true;
  60713. } else {
  60714. return (0, _shallowEqual.default)(node, opts);
  60715. }
  60716. }
  60717. return false;
  60718. }
  60719. function isEnumMember(node, opts) {
  60720. if (!node)
  60721. return false;
  60722. const nodeType = node.type;
  60723. if ("EnumBooleanMember" === nodeType || "EnumNumberMember" === nodeType || "EnumStringMember" === nodeType || "EnumDefaultedMember" === nodeType) {
  60724. if (typeof opts === "undefined") {
  60725. return true;
  60726. } else {
  60727. return (0, _shallowEqual.default)(node, opts);
  60728. }
  60729. }
  60730. return false;
  60731. }
  60732. function isJSX(node, opts) {
  60733. if (!node)
  60734. return false;
  60735. const nodeType = node.type;
  60736. if ("JSXAttribute" === nodeType || "JSXClosingElement" === nodeType || "JSXElement" === nodeType || "JSXEmptyExpression" === nodeType || "JSXExpressionContainer" === nodeType || "JSXSpreadChild" === nodeType || "JSXIdentifier" === nodeType || "JSXMemberExpression" === nodeType || "JSXNamespacedName" === nodeType || "JSXOpeningElement" === nodeType || "JSXSpreadAttribute" === nodeType || "JSXText" === nodeType || "JSXFragment" === nodeType || "JSXOpeningFragment" === nodeType || "JSXClosingFragment" === nodeType) {
  60737. if (typeof opts === "undefined") {
  60738. return true;
  60739. } else {
  60740. return (0, _shallowEqual.default)(node, opts);
  60741. }
  60742. }
  60743. return false;
  60744. }
  60745. function isPrivate(node, opts) {
  60746. if (!node)
  60747. return false;
  60748. const nodeType = node.type;
  60749. if ("ClassPrivateProperty" === nodeType || "ClassPrivateMethod" === nodeType || "PrivateName" === nodeType) {
  60750. if (typeof opts === "undefined") {
  60751. return true;
  60752. } else {
  60753. return (0, _shallowEqual.default)(node, opts);
  60754. }
  60755. }
  60756. return false;
  60757. }
  60758. function isTSTypeElement(node, opts) {
  60759. if (!node)
  60760. return false;
  60761. const nodeType = node.type;
  60762. if ("TSCallSignatureDeclaration" === nodeType || "TSConstructSignatureDeclaration" === nodeType || "TSPropertySignature" === nodeType || "TSMethodSignature" === nodeType || "TSIndexSignature" === nodeType) {
  60763. if (typeof opts === "undefined") {
  60764. return true;
  60765. } else {
  60766. return (0, _shallowEqual.default)(node, opts);
  60767. }
  60768. }
  60769. return false;
  60770. }
  60771. function isTSType(node, opts) {
  60772. if (!node)
  60773. return false;
  60774. const nodeType = node.type;
  60775. if ("TSAnyKeyword" === nodeType || "TSBooleanKeyword" === nodeType || "TSBigIntKeyword" === nodeType || "TSIntrinsicKeyword" === nodeType || "TSNeverKeyword" === nodeType || "TSNullKeyword" === nodeType || "TSNumberKeyword" === nodeType || "TSObjectKeyword" === nodeType || "TSStringKeyword" === nodeType || "TSSymbolKeyword" === nodeType || "TSUndefinedKeyword" === nodeType || "TSUnknownKeyword" === nodeType || "TSVoidKeyword" === nodeType || "TSThisType" === nodeType || "TSFunctionType" === nodeType || "TSConstructorType" === nodeType || "TSTypeReference" === nodeType || "TSTypePredicate" === nodeType || "TSTypeQuery" === nodeType || "TSTypeLiteral" === nodeType || "TSArrayType" === nodeType || "TSTupleType" === nodeType || "TSOptionalType" === nodeType || "TSRestType" === nodeType || "TSUnionType" === nodeType || "TSIntersectionType" === nodeType || "TSConditionalType" === nodeType || "TSInferType" === nodeType || "TSParenthesizedType" === nodeType || "TSTypeOperator" === nodeType || "TSIndexedAccessType" === nodeType || "TSMappedType" === nodeType || "TSLiteralType" === nodeType || "TSExpressionWithTypeArguments" === nodeType || "TSImportType" === nodeType) {
  60776. if (typeof opts === "undefined") {
  60777. return true;
  60778. } else {
  60779. return (0, _shallowEqual.default)(node, opts);
  60780. }
  60781. }
  60782. return false;
  60783. }
  60784. function isTSBaseType(node, opts) {
  60785. if (!node)
  60786. return false;
  60787. const nodeType = node.type;
  60788. if ("TSAnyKeyword" === nodeType || "TSBooleanKeyword" === nodeType || "TSBigIntKeyword" === nodeType || "TSIntrinsicKeyword" === nodeType || "TSNeverKeyword" === nodeType || "TSNullKeyword" === nodeType || "TSNumberKeyword" === nodeType || "TSObjectKeyword" === nodeType || "TSStringKeyword" === nodeType || "TSSymbolKeyword" === nodeType || "TSUndefinedKeyword" === nodeType || "TSUnknownKeyword" === nodeType || "TSVoidKeyword" === nodeType || "TSThisType" === nodeType || "TSLiteralType" === nodeType) {
  60789. if (typeof opts === "undefined") {
  60790. return true;
  60791. } else {
  60792. return (0, _shallowEqual.default)(node, opts);
  60793. }
  60794. }
  60795. return false;
  60796. }
  60797. function isNumberLiteral(node, opts) {
  60798. console.trace("The node type NumberLiteral has been renamed to NumericLiteral");
  60799. if (!node)
  60800. return false;
  60801. const nodeType = node.type;
  60802. if (nodeType === "NumberLiteral") {
  60803. if (typeof opts === "undefined") {
  60804. return true;
  60805. } else {
  60806. return (0, _shallowEqual.default)(node, opts);
  60807. }
  60808. }
  60809. return false;
  60810. }
  60811. function isRegexLiteral(node, opts) {
  60812. console.trace("The node type RegexLiteral has been renamed to RegExpLiteral");
  60813. if (!node)
  60814. return false;
  60815. const nodeType = node.type;
  60816. if (nodeType === "RegexLiteral") {
  60817. if (typeof opts === "undefined") {
  60818. return true;
  60819. } else {
  60820. return (0, _shallowEqual.default)(node, opts);
  60821. }
  60822. }
  60823. return false;
  60824. }
  60825. function isRestProperty(node, opts) {
  60826. console.trace("The node type RestProperty has been renamed to RestElement");
  60827. if (!node)
  60828. return false;
  60829. const nodeType = node.type;
  60830. if (nodeType === "RestProperty") {
  60831. if (typeof opts === "undefined") {
  60832. return true;
  60833. } else {
  60834. return (0, _shallowEqual.default)(node, opts);
  60835. }
  60836. }
  60837. return false;
  60838. }
  60839. function isSpreadProperty(node, opts) {
  60840. console.trace("The node type SpreadProperty has been renamed to SpreadElement");
  60841. if (!node)
  60842. return false;
  60843. const nodeType = node.type;
  60844. if (nodeType === "SpreadProperty") {
  60845. if (typeof opts === "undefined") {
  60846. return true;
  60847. } else {
  60848. return (0, _shallowEqual.default)(node, opts);
  60849. }
  60850. }
  60851. return false;
  60852. }
  60853. }
  60854. });
  60855. // node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/validators/matchesPattern.js
  60856. var require_matchesPattern3 = __commonJS({
  60857. "node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/validators/matchesPattern.js"(exports) {
  60858. "use strict";
  60859. Object.defineProperty(exports, "__esModule", {
  60860. value: true
  60861. });
  60862. exports.default = matchesPattern;
  60863. var _generated = require_generated11();
  60864. function matchesPattern(member, match, allowPartial) {
  60865. if (!(0, _generated.isMemberExpression)(member))
  60866. return false;
  60867. const parts = Array.isArray(match) ? match : match.split(".");
  60868. const nodes = [];
  60869. let node;
  60870. for (node = member; (0, _generated.isMemberExpression)(node); node = node.object) {
  60871. nodes.push(node.property);
  60872. }
  60873. nodes.push(node);
  60874. if (nodes.length < parts.length)
  60875. return false;
  60876. if (!allowPartial && nodes.length > parts.length)
  60877. return false;
  60878. for (let i = 0, j = nodes.length - 1; i < parts.length; i++, j--) {
  60879. const node2 = nodes[j];
  60880. let value;
  60881. if ((0, _generated.isIdentifier)(node2)) {
  60882. value = node2.name;
  60883. } else if ((0, _generated.isStringLiteral)(node2)) {
  60884. value = node2.value;
  60885. } else if ((0, _generated.isThisExpression)(node2)) {
  60886. value = "this";
  60887. } else {
  60888. return false;
  60889. }
  60890. if (parts[i] !== value)
  60891. return false;
  60892. }
  60893. return true;
  60894. }
  60895. }
  60896. });
  60897. // node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/validators/buildMatchMemberExpression.js
  60898. var require_buildMatchMemberExpression3 = __commonJS({
  60899. "node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/validators/buildMatchMemberExpression.js"(exports) {
  60900. "use strict";
  60901. Object.defineProperty(exports, "__esModule", {
  60902. value: true
  60903. });
  60904. exports.default = buildMatchMemberExpression;
  60905. var _matchesPattern = require_matchesPattern3();
  60906. function buildMatchMemberExpression(match, allowPartial) {
  60907. const parts = match.split(".");
  60908. return (member) => (0, _matchesPattern.default)(member, parts, allowPartial);
  60909. }
  60910. }
  60911. });
  60912. // node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/validators/react/isReactComponent.js
  60913. var require_isReactComponent3 = __commonJS({
  60914. "node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/validators/react/isReactComponent.js"(exports) {
  60915. "use strict";
  60916. Object.defineProperty(exports, "__esModule", {
  60917. value: true
  60918. });
  60919. exports.default = void 0;
  60920. var _buildMatchMemberExpression = require_buildMatchMemberExpression3();
  60921. var isReactComponent = (0, _buildMatchMemberExpression.default)("React.Component");
  60922. var _default = isReactComponent;
  60923. exports.default = _default;
  60924. }
  60925. });
  60926. // node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/validators/react/isCompatTag.js
  60927. var require_isCompatTag3 = __commonJS({
  60928. "node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/validators/react/isCompatTag.js"(exports) {
  60929. "use strict";
  60930. Object.defineProperty(exports, "__esModule", {
  60931. value: true
  60932. });
  60933. exports.default = isCompatTag;
  60934. function isCompatTag(tagName) {
  60935. return !!tagName && /^[a-z]/.test(tagName);
  60936. }
  60937. }
  60938. });
  60939. // node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/validators/isType.js
  60940. var require_isType3 = __commonJS({
  60941. "node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/validators/isType.js"(exports) {
  60942. "use strict";
  60943. Object.defineProperty(exports, "__esModule", {
  60944. value: true
  60945. });
  60946. exports.default = isType;
  60947. var _definitions = require_definitions3();
  60948. function isType(nodeType, targetType) {
  60949. if (nodeType === targetType)
  60950. return true;
  60951. if (_definitions.ALIAS_KEYS[targetType])
  60952. return false;
  60953. const aliases = _definitions.FLIPPED_ALIAS_KEYS[targetType];
  60954. if (aliases) {
  60955. if (aliases[0] === nodeType)
  60956. return true;
  60957. for (const alias of aliases) {
  60958. if (nodeType === alias)
  60959. return true;
  60960. }
  60961. }
  60962. return false;
  60963. }
  60964. }
  60965. });
  60966. // node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/validators/isPlaceholderType.js
  60967. var require_isPlaceholderType3 = __commonJS({
  60968. "node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/validators/isPlaceholderType.js"(exports) {
  60969. "use strict";
  60970. Object.defineProperty(exports, "__esModule", {
  60971. value: true
  60972. });
  60973. exports.default = isPlaceholderType;
  60974. var _definitions = require_definitions3();
  60975. function isPlaceholderType(placeholderType, targetType) {
  60976. if (placeholderType === targetType)
  60977. return true;
  60978. const aliases = _definitions.PLACEHOLDERS_ALIAS[placeholderType];
  60979. if (aliases) {
  60980. for (const alias of aliases) {
  60981. if (targetType === alias)
  60982. return true;
  60983. }
  60984. }
  60985. return false;
  60986. }
  60987. }
  60988. });
  60989. // node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/validators/is.js
  60990. var require_is3 = __commonJS({
  60991. "node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/validators/is.js"(exports) {
  60992. "use strict";
  60993. Object.defineProperty(exports, "__esModule", {
  60994. value: true
  60995. });
  60996. exports.default = is;
  60997. var _shallowEqual = require_shallowEqual3();
  60998. var _isType = require_isType3();
  60999. var _isPlaceholderType = require_isPlaceholderType3();
  61000. var _definitions = require_definitions3();
  61001. function is(type, node, opts) {
  61002. if (!node)
  61003. return false;
  61004. const matches = (0, _isType.default)(node.type, type);
  61005. if (!matches) {
  61006. if (!opts && node.type === "Placeholder" && type in _definitions.FLIPPED_ALIAS_KEYS) {
  61007. return (0, _isPlaceholderType.default)(node.expectedNode, type);
  61008. }
  61009. return false;
  61010. }
  61011. if (typeof opts === "undefined") {
  61012. return true;
  61013. } else {
  61014. return (0, _shallowEqual.default)(node, opts);
  61015. }
  61016. }
  61017. }
  61018. });
  61019. // node_modules/@babel/helper-split-export-declaration/node_modules/@babel/helper-validator-identifier/lib/identifier.js
  61020. var require_identifier4 = __commonJS({
  61021. "node_modules/@babel/helper-split-export-declaration/node_modules/@babel/helper-validator-identifier/lib/identifier.js"(exports) {
  61022. "use strict";
  61023. Object.defineProperty(exports, "__esModule", {
  61024. value: true
  61025. });
  61026. exports.isIdentifierStart = isIdentifierStart2;
  61027. exports.isIdentifierChar = isIdentifierChar2;
  61028. exports.isIdentifierName = isIdentifierName;
  61029. var nonASCIIidentifierStartChars2 = "\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u08A0-\u08B4\u08B6-\u08C7\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1878\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309B-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u31BF\u31F0-\u31FF\u3400-\u4DBF\u4E00-\u9FFC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7BF\uA7C2-\uA7CA\uA7F5-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC";
  61030. var nonASCIIidentifierChars2 = "\u200C\u200D\xB7\u0300-\u036F\u0387\u0483-\u0487\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u0669\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u06F0-\u06F9\u0711\u0730-\u074A\u07A6-\u07B0\u07C0-\u07C9\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u08D3-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0966-\u096F\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u09E6-\u09EF\u09FE\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A66-\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0AE6-\u0AEF\u0AFA-\u0AFF\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B55-\u0B57\u0B62\u0B63\u0B66-\u0B6F\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0BE6-\u0BEF\u0C00-\u0C04\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C66-\u0C6F\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0CE6-\u0CEF\u0D00-\u0D03\u0D3B\u0D3C\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D66-\u0D6F\u0D81-\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0E50-\u0E59\u0EB1\u0EB4-\u0EBC\u0EC8-\u0ECD\u0ED0-\u0ED9\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1040-\u1049\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F-\u109D\u135D-\u135F\u1369-\u1371\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u18A9\u1920-\u192B\u1930-\u193B\u1946-\u194F\u19D0-\u19DA\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AB0-\u1ABD\u1ABF\u1AC0\u1B00-\u1B04\u1B34-\u1B44\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BB0-\u1BB9\u1BE6-\u1BF3\u1C24-\u1C37\u1C40-\u1C49\u1C50-\u1C59\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF4\u1CF7-\u1CF9\u1DC0-\u1DF9\u1DFB-\u1DFF\u203F\u2040\u2054\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA620-\uA629\uA66F\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA82C\uA880\uA881\uA8B4-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F1\uA8FF-\uA909\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9D0-\uA9D9\uA9E5\uA9F0-\uA9F9\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA50-\uAA59\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uABF0-\uABF9\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFF10-\uFF19\uFF3F";
  61031. var nonASCIIidentifierStart2 = new RegExp("[" + nonASCIIidentifierStartChars2 + "]");
  61032. var nonASCIIidentifier2 = new RegExp("[" + nonASCIIidentifierStartChars2 + nonASCIIidentifierChars2 + "]");
  61033. nonASCIIidentifierStartChars2 = nonASCIIidentifierChars2 = null;
  61034. var astralIdentifierStartCodes2 = [0, 11, 2, 25, 2, 18, 2, 1, 2, 14, 3, 13, 35, 122, 70, 52, 268, 28, 4, 48, 48, 31, 14, 29, 6, 37, 11, 29, 3, 35, 5, 7, 2, 4, 43, 157, 19, 35, 5, 35, 5, 39, 9, 51, 157, 310, 10, 21, 11, 7, 153, 5, 3, 0, 2, 43, 2, 1, 4, 0, 3, 22, 11, 22, 10, 30, 66, 18, 2, 1, 11, 21, 11, 25, 71, 55, 7, 1, 65, 0, 16, 3, 2, 2, 2, 28, 43, 28, 4, 28, 36, 7, 2, 27, 28, 53, 11, 21, 11, 18, 14, 17, 111, 72, 56, 50, 14, 50, 14, 35, 349, 41, 7, 1, 79, 28, 11, 0, 9, 21, 107, 20, 28, 22, 13, 52, 76, 44, 33, 24, 27, 35, 30, 0, 3, 0, 9, 34, 4, 0, 13, 47, 15, 3, 22, 0, 2, 0, 36, 17, 2, 24, 85, 6, 2, 0, 2, 3, 2, 14, 2, 9, 8, 46, 39, 7, 3, 1, 3, 21, 2, 6, 2, 1, 2, 4, 4, 0, 19, 0, 13, 4, 159, 52, 19, 3, 21, 2, 31, 47, 21, 1, 2, 0, 185, 46, 42, 3, 37, 47, 21, 0, 60, 42, 14, 0, 72, 26, 230, 43, 117, 63, 32, 7, 3, 0, 3, 7, 2, 1, 2, 23, 16, 0, 2, 0, 95, 7, 3, 38, 17, 0, 2, 0, 29, 0, 11, 39, 8, 0, 22, 0, 12, 45, 20, 0, 35, 56, 264, 8, 2, 36, 18, 0, 50, 29, 113, 6, 2, 1, 2, 37, 22, 0, 26, 5, 2, 1, 2, 31, 15, 0, 328, 18, 190, 0, 80, 921, 103, 110, 18, 195, 2749, 1070, 4050, 582, 8634, 568, 8, 30, 114, 29, 19, 47, 17, 3, 32, 20, 6, 18, 689, 63, 129, 74, 6, 0, 67, 12, 65, 1, 2, 0, 29, 6135, 9, 1237, 43, 8, 8952, 286, 50, 2, 18, 3, 9, 395, 2309, 106, 6, 12, 4, 8, 8, 9, 5991, 84, 2, 70, 2, 1, 3, 0, 3, 1, 3, 3, 2, 11, 2, 0, 2, 6, 2, 64, 2, 3, 3, 7, 2, 6, 2, 27, 2, 3, 2, 4, 2, 0, 4, 6, 2, 339, 3, 24, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 7, 2357, 44, 11, 6, 17, 0, 370, 43, 1301, 196, 60, 67, 8, 0, 1205, 3, 2, 26, 2, 1, 2, 0, 3, 0, 2, 9, 2, 3, 2, 0, 2, 0, 7, 0, 5, 0, 2, 0, 2, 0, 2, 2, 2, 1, 2, 0, 3, 0, 2, 0, 2, 0, 2, 0, 2, 0, 2, 1, 2, 0, 3, 3, 2, 6, 2, 3, 2, 3, 2, 0, 2, 9, 2, 16, 6, 2, 2, 4, 2, 16, 4421, 42717, 35, 4148, 12, 221, 3, 5761, 15, 7472, 3104, 541, 1507, 4938];
  61035. var astralIdentifierCodes2 = [509, 0, 227, 0, 150, 4, 294, 9, 1368, 2, 2, 1, 6, 3, 41, 2, 5, 0, 166, 1, 574, 3, 9, 9, 370, 1, 154, 10, 176, 2, 54, 14, 32, 9, 16, 3, 46, 10, 54, 9, 7, 2, 37, 13, 2, 9, 6, 1, 45, 0, 13, 2, 49, 13, 9, 3, 2, 11, 83, 11, 7, 0, 161, 11, 6, 9, 7, 3, 56, 1, 2, 6, 3, 1, 3, 2, 10, 0, 11, 1, 3, 6, 4, 4, 193, 17, 10, 9, 5, 0, 82, 19, 13, 9, 214, 6, 3, 8, 28, 1, 83, 16, 16, 9, 82, 12, 9, 9, 84, 14, 5, 9, 243, 14, 166, 9, 71, 5, 2, 1, 3, 3, 2, 0, 2, 1, 13, 9, 120, 6, 3, 6, 4, 0, 29, 9, 41, 6, 2, 3, 9, 0, 10, 10, 47, 15, 406, 7, 2, 7, 17, 9, 57, 21, 2, 13, 123, 5, 4, 0, 2, 1, 2, 6, 2, 0, 9, 9, 49, 4, 2, 1, 2, 4, 9, 9, 330, 3, 19306, 9, 135, 4, 60, 6, 26, 9, 1014, 0, 2, 54, 8, 3, 82, 0, 12, 1, 19628, 1, 5319, 4, 4, 5, 9, 7, 3, 6, 31, 3, 149, 2, 1418, 49, 513, 54, 5, 49, 9, 0, 15, 0, 23, 4, 2, 14, 1361, 6, 2, 16, 3, 6, 2, 1, 2, 4, 262, 6, 10, 9, 419, 13, 1495, 6, 110, 6, 6, 9, 4759, 9, 787719, 239];
  61036. function isInAstralSet2(code2, set) {
  61037. let pos = 65536;
  61038. for (let i = 0, length = set.length; i < length; i += 2) {
  61039. pos += set[i];
  61040. if (pos > code2)
  61041. return false;
  61042. pos += set[i + 1];
  61043. if (pos >= code2)
  61044. return true;
  61045. }
  61046. return false;
  61047. }
  61048. function isIdentifierStart2(code2) {
  61049. if (code2 < 65)
  61050. return code2 === 36;
  61051. if (code2 <= 90)
  61052. return true;
  61053. if (code2 < 97)
  61054. return code2 === 95;
  61055. if (code2 <= 122)
  61056. return true;
  61057. if (code2 <= 65535) {
  61058. return code2 >= 170 && nonASCIIidentifierStart2.test(String.fromCharCode(code2));
  61059. }
  61060. return isInAstralSet2(code2, astralIdentifierStartCodes2);
  61061. }
  61062. function isIdentifierChar2(code2) {
  61063. if (code2 < 48)
  61064. return code2 === 36;
  61065. if (code2 < 58)
  61066. return true;
  61067. if (code2 < 65)
  61068. return false;
  61069. if (code2 <= 90)
  61070. return true;
  61071. if (code2 < 97)
  61072. return code2 === 95;
  61073. if (code2 <= 122)
  61074. return true;
  61075. if (code2 <= 65535) {
  61076. return code2 >= 170 && nonASCIIidentifier2.test(String.fromCharCode(code2));
  61077. }
  61078. return isInAstralSet2(code2, astralIdentifierStartCodes2) || isInAstralSet2(code2, astralIdentifierCodes2);
  61079. }
  61080. function isIdentifierName(name2) {
  61081. let isFirst = true;
  61082. for (let i = 0; i < name2.length; i++) {
  61083. let cp = name2.charCodeAt(i);
  61084. if ((cp & 64512) === 55296 && i + 1 < name2.length) {
  61085. const trail = name2.charCodeAt(++i);
  61086. if ((trail & 64512) === 56320) {
  61087. cp = 65536 + ((cp & 1023) << 10) + (trail & 1023);
  61088. }
  61089. }
  61090. if (isFirst) {
  61091. isFirst = false;
  61092. if (!isIdentifierStart2(cp)) {
  61093. return false;
  61094. }
  61095. } else if (!isIdentifierChar2(cp)) {
  61096. return false;
  61097. }
  61098. }
  61099. return !isFirst;
  61100. }
  61101. }
  61102. });
  61103. // node_modules/@babel/helper-split-export-declaration/node_modules/@babel/helper-validator-identifier/lib/keyword.js
  61104. var require_keyword4 = __commonJS({
  61105. "node_modules/@babel/helper-split-export-declaration/node_modules/@babel/helper-validator-identifier/lib/keyword.js"(exports) {
  61106. "use strict";
  61107. Object.defineProperty(exports, "__esModule", {
  61108. value: true
  61109. });
  61110. exports.isReservedWord = isReservedWord;
  61111. exports.isStrictReservedWord = isStrictReservedWord;
  61112. exports.isStrictBindOnlyReservedWord = isStrictBindOnlyReservedWord;
  61113. exports.isStrictBindReservedWord = isStrictBindReservedWord;
  61114. exports.isKeyword = isKeyword;
  61115. var reservedWords2 = {
  61116. keyword: ["break", "case", "catch", "continue", "debugger", "default", "do", "else", "finally", "for", "function", "if", "return", "switch", "throw", "try", "var", "const", "while", "with", "new", "this", "super", "class", "extends", "export", "import", "null", "true", "false", "in", "instanceof", "typeof", "void", "delete"],
  61117. strict: ["implements", "interface", "let", "package", "private", "protected", "public", "static", "yield"],
  61118. strictBind: ["eval", "arguments"]
  61119. };
  61120. var keywords2 = new Set(reservedWords2.keyword);
  61121. var reservedWordsStrictSet = new Set(reservedWords2.strict);
  61122. var reservedWordsStrictBindSet = new Set(reservedWords2.strictBind);
  61123. function isReservedWord(word, inModule) {
  61124. return inModule && word === "await" || word === "enum";
  61125. }
  61126. function isStrictReservedWord(word, inModule) {
  61127. return isReservedWord(word, inModule) || reservedWordsStrictSet.has(word);
  61128. }
  61129. function isStrictBindOnlyReservedWord(word) {
  61130. return reservedWordsStrictBindSet.has(word);
  61131. }
  61132. function isStrictBindReservedWord(word, inModule) {
  61133. return isStrictReservedWord(word, inModule) || isStrictBindOnlyReservedWord(word);
  61134. }
  61135. function isKeyword(word) {
  61136. return keywords2.has(word);
  61137. }
  61138. }
  61139. });
  61140. // node_modules/@babel/helper-split-export-declaration/node_modules/@babel/helper-validator-identifier/lib/index.js
  61141. var require_lib15 = __commonJS({
  61142. "node_modules/@babel/helper-split-export-declaration/node_modules/@babel/helper-validator-identifier/lib/index.js"(exports) {
  61143. "use strict";
  61144. Object.defineProperty(exports, "__esModule", {
  61145. value: true
  61146. });
  61147. Object.defineProperty(exports, "isIdentifierName", {
  61148. enumerable: true,
  61149. get: function() {
  61150. return _identifier.isIdentifierName;
  61151. }
  61152. });
  61153. Object.defineProperty(exports, "isIdentifierChar", {
  61154. enumerable: true,
  61155. get: function() {
  61156. return _identifier.isIdentifierChar;
  61157. }
  61158. });
  61159. Object.defineProperty(exports, "isIdentifierStart", {
  61160. enumerable: true,
  61161. get: function() {
  61162. return _identifier.isIdentifierStart;
  61163. }
  61164. });
  61165. Object.defineProperty(exports, "isReservedWord", {
  61166. enumerable: true,
  61167. get: function() {
  61168. return _keyword.isReservedWord;
  61169. }
  61170. });
  61171. Object.defineProperty(exports, "isStrictBindOnlyReservedWord", {
  61172. enumerable: true,
  61173. get: function() {
  61174. return _keyword.isStrictBindOnlyReservedWord;
  61175. }
  61176. });
  61177. Object.defineProperty(exports, "isStrictBindReservedWord", {
  61178. enumerable: true,
  61179. get: function() {
  61180. return _keyword.isStrictBindReservedWord;
  61181. }
  61182. });
  61183. Object.defineProperty(exports, "isStrictReservedWord", {
  61184. enumerable: true,
  61185. get: function() {
  61186. return _keyword.isStrictReservedWord;
  61187. }
  61188. });
  61189. Object.defineProperty(exports, "isKeyword", {
  61190. enumerable: true,
  61191. get: function() {
  61192. return _keyword.isKeyword;
  61193. }
  61194. });
  61195. var _identifier = require_identifier4();
  61196. var _keyword = require_keyword4();
  61197. }
  61198. });
  61199. // node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/validators/isValidIdentifier.js
  61200. var require_isValidIdentifier3 = __commonJS({
  61201. "node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/validators/isValidIdentifier.js"(exports) {
  61202. "use strict";
  61203. Object.defineProperty(exports, "__esModule", {
  61204. value: true
  61205. });
  61206. exports.default = isValidIdentifier;
  61207. var _helperValidatorIdentifier = require_lib15();
  61208. function isValidIdentifier(name2, reserved = true) {
  61209. if (typeof name2 !== "string")
  61210. return false;
  61211. if (reserved) {
  61212. if ((0, _helperValidatorIdentifier.isKeyword)(name2) || (0, _helperValidatorIdentifier.isStrictReservedWord)(name2, true)) {
  61213. return false;
  61214. }
  61215. }
  61216. return (0, _helperValidatorIdentifier.isIdentifierName)(name2);
  61217. }
  61218. }
  61219. });
  61220. // node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/constants/index.js
  61221. var require_constants3 = __commonJS({
  61222. "node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/constants/index.js"(exports) {
  61223. "use strict";
  61224. Object.defineProperty(exports, "__esModule", {
  61225. value: true
  61226. });
  61227. exports.NOT_LOCAL_BINDING = exports.BLOCK_SCOPED_SYMBOL = exports.INHERIT_KEYS = exports.UNARY_OPERATORS = exports.STRING_UNARY_OPERATORS = exports.NUMBER_UNARY_OPERATORS = exports.BOOLEAN_UNARY_OPERATORS = exports.ASSIGNMENT_OPERATORS = exports.BINARY_OPERATORS = exports.NUMBER_BINARY_OPERATORS = exports.BOOLEAN_BINARY_OPERATORS = exports.COMPARISON_BINARY_OPERATORS = exports.EQUALITY_BINARY_OPERATORS = exports.BOOLEAN_NUMBER_BINARY_OPERATORS = exports.UPDATE_OPERATORS = exports.LOGICAL_OPERATORS = exports.COMMENT_KEYS = exports.FOR_INIT_KEYS = exports.FLATTENABLE_KEYS = exports.STATEMENT_OR_BLOCK_KEYS = void 0;
  61228. var STATEMENT_OR_BLOCK_KEYS = ["consequent", "body", "alternate"];
  61229. exports.STATEMENT_OR_BLOCK_KEYS = STATEMENT_OR_BLOCK_KEYS;
  61230. var FLATTENABLE_KEYS = ["body", "expressions"];
  61231. exports.FLATTENABLE_KEYS = FLATTENABLE_KEYS;
  61232. var FOR_INIT_KEYS = ["left", "init"];
  61233. exports.FOR_INIT_KEYS = FOR_INIT_KEYS;
  61234. var COMMENT_KEYS = ["leadingComments", "trailingComments", "innerComments"];
  61235. exports.COMMENT_KEYS = COMMENT_KEYS;
  61236. var LOGICAL_OPERATORS = ["||", "&&", "??"];
  61237. exports.LOGICAL_OPERATORS = LOGICAL_OPERATORS;
  61238. var UPDATE_OPERATORS = ["++", "--"];
  61239. exports.UPDATE_OPERATORS = UPDATE_OPERATORS;
  61240. var BOOLEAN_NUMBER_BINARY_OPERATORS = [">", "<", ">=", "<="];
  61241. exports.BOOLEAN_NUMBER_BINARY_OPERATORS = BOOLEAN_NUMBER_BINARY_OPERATORS;
  61242. var EQUALITY_BINARY_OPERATORS = ["==", "===", "!=", "!=="];
  61243. exports.EQUALITY_BINARY_OPERATORS = EQUALITY_BINARY_OPERATORS;
  61244. var COMPARISON_BINARY_OPERATORS = [...EQUALITY_BINARY_OPERATORS, "in", "instanceof"];
  61245. exports.COMPARISON_BINARY_OPERATORS = COMPARISON_BINARY_OPERATORS;
  61246. var BOOLEAN_BINARY_OPERATORS = [...COMPARISON_BINARY_OPERATORS, ...BOOLEAN_NUMBER_BINARY_OPERATORS];
  61247. exports.BOOLEAN_BINARY_OPERATORS = BOOLEAN_BINARY_OPERATORS;
  61248. var NUMBER_BINARY_OPERATORS = ["-", "/", "%", "*", "**", "&", "|", ">>", ">>>", "<<", "^"];
  61249. exports.NUMBER_BINARY_OPERATORS = NUMBER_BINARY_OPERATORS;
  61250. var BINARY_OPERATORS = ["+", ...NUMBER_BINARY_OPERATORS, ...BOOLEAN_BINARY_OPERATORS];
  61251. exports.BINARY_OPERATORS = BINARY_OPERATORS;
  61252. var ASSIGNMENT_OPERATORS = ["=", "+=", ...NUMBER_BINARY_OPERATORS.map((op) => op + "="), ...LOGICAL_OPERATORS.map((op) => op + "=")];
  61253. exports.ASSIGNMENT_OPERATORS = ASSIGNMENT_OPERATORS;
  61254. var BOOLEAN_UNARY_OPERATORS = ["delete", "!"];
  61255. exports.BOOLEAN_UNARY_OPERATORS = BOOLEAN_UNARY_OPERATORS;
  61256. var NUMBER_UNARY_OPERATORS = ["+", "-", "~"];
  61257. exports.NUMBER_UNARY_OPERATORS = NUMBER_UNARY_OPERATORS;
  61258. var STRING_UNARY_OPERATORS = ["typeof"];
  61259. exports.STRING_UNARY_OPERATORS = STRING_UNARY_OPERATORS;
  61260. var UNARY_OPERATORS = ["void", "throw", ...BOOLEAN_UNARY_OPERATORS, ...NUMBER_UNARY_OPERATORS, ...STRING_UNARY_OPERATORS];
  61261. exports.UNARY_OPERATORS = UNARY_OPERATORS;
  61262. var INHERIT_KEYS = {
  61263. optional: ["typeAnnotation", "typeParameters", "returnType"],
  61264. force: ["start", "loc", "end"]
  61265. };
  61266. exports.INHERIT_KEYS = INHERIT_KEYS;
  61267. var BLOCK_SCOPED_SYMBOL = Symbol.for("var used to be block scoped");
  61268. exports.BLOCK_SCOPED_SYMBOL = BLOCK_SCOPED_SYMBOL;
  61269. var NOT_LOCAL_BINDING = Symbol.for("should not be considered a local binding");
  61270. exports.NOT_LOCAL_BINDING = NOT_LOCAL_BINDING;
  61271. }
  61272. });
  61273. // node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/validators/validate.js
  61274. var require_validate3 = __commonJS({
  61275. "node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/validators/validate.js"(exports) {
  61276. "use strict";
  61277. Object.defineProperty(exports, "__esModule", {
  61278. value: true
  61279. });
  61280. exports.default = validate;
  61281. exports.validateField = validateField;
  61282. exports.validateChild = validateChild;
  61283. var _definitions = require_definitions3();
  61284. function validate(node, key, val) {
  61285. if (!node)
  61286. return;
  61287. const fields = _definitions.NODE_FIELDS[node.type];
  61288. if (!fields)
  61289. return;
  61290. const field = fields[key];
  61291. validateField(node, key, val, field);
  61292. validateChild(node, key, val);
  61293. }
  61294. function validateField(node, key, val, field) {
  61295. if (!(field != null && field.validate))
  61296. return;
  61297. if (field.optional && val == null)
  61298. return;
  61299. field.validate(node, key, val);
  61300. }
  61301. function validateChild(node, key, val) {
  61302. if (val == null)
  61303. return;
  61304. const validate2 = _definitions.NODE_PARENT_VALIDATIONS[val.type];
  61305. if (!validate2)
  61306. return;
  61307. validate2(node, key, val);
  61308. }
  61309. }
  61310. });
  61311. // node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/definitions/utils.js
  61312. var require_utils3 = __commonJS({
  61313. "node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/definitions/utils.js"(exports) {
  61314. "use strict";
  61315. Object.defineProperty(exports, "__esModule", {
  61316. value: true
  61317. });
  61318. exports.validate = validate;
  61319. exports.typeIs = typeIs;
  61320. exports.validateType = validateType;
  61321. exports.validateOptional = validateOptional;
  61322. exports.validateOptionalType = validateOptionalType;
  61323. exports.arrayOf = arrayOf;
  61324. exports.arrayOfType = arrayOfType;
  61325. exports.validateArrayOfType = validateArrayOfType;
  61326. exports.assertEach = assertEach;
  61327. exports.assertOneOf = assertOneOf;
  61328. exports.assertNodeType = assertNodeType;
  61329. exports.assertNodeOrValueType = assertNodeOrValueType;
  61330. exports.assertValueType = assertValueType;
  61331. exports.assertShape = assertShape;
  61332. exports.assertOptionalChainStart = assertOptionalChainStart;
  61333. exports.chain = chain;
  61334. exports.default = defineType;
  61335. exports.NODE_PARENT_VALIDATIONS = exports.DEPRECATED_KEYS = exports.BUILDER_KEYS = exports.NODE_FIELDS = exports.FLIPPED_ALIAS_KEYS = exports.ALIAS_KEYS = exports.VISITOR_KEYS = void 0;
  61336. var _is = require_is3();
  61337. var _validate = require_validate3();
  61338. var VISITOR_KEYS = {};
  61339. exports.VISITOR_KEYS = VISITOR_KEYS;
  61340. var ALIAS_KEYS = {};
  61341. exports.ALIAS_KEYS = ALIAS_KEYS;
  61342. var FLIPPED_ALIAS_KEYS = {};
  61343. exports.FLIPPED_ALIAS_KEYS = FLIPPED_ALIAS_KEYS;
  61344. var NODE_FIELDS = {};
  61345. exports.NODE_FIELDS = NODE_FIELDS;
  61346. var BUILDER_KEYS = {};
  61347. exports.BUILDER_KEYS = BUILDER_KEYS;
  61348. var DEPRECATED_KEYS = {};
  61349. exports.DEPRECATED_KEYS = DEPRECATED_KEYS;
  61350. var NODE_PARENT_VALIDATIONS = {};
  61351. exports.NODE_PARENT_VALIDATIONS = NODE_PARENT_VALIDATIONS;
  61352. function getType(val) {
  61353. if (Array.isArray(val)) {
  61354. return "array";
  61355. } else if (val === null) {
  61356. return "null";
  61357. } else {
  61358. return typeof val;
  61359. }
  61360. }
  61361. function validate(validate2) {
  61362. return {
  61363. validate: validate2
  61364. };
  61365. }
  61366. function typeIs(typeName) {
  61367. return typeof typeName === "string" ? assertNodeType(typeName) : assertNodeType(...typeName);
  61368. }
  61369. function validateType(typeName) {
  61370. return validate(typeIs(typeName));
  61371. }
  61372. function validateOptional(validate2) {
  61373. return {
  61374. validate: validate2,
  61375. optional: true
  61376. };
  61377. }
  61378. function validateOptionalType(typeName) {
  61379. return {
  61380. validate: typeIs(typeName),
  61381. optional: true
  61382. };
  61383. }
  61384. function arrayOf(elementType) {
  61385. return chain(assertValueType("array"), assertEach(elementType));
  61386. }
  61387. function arrayOfType(typeName) {
  61388. return arrayOf(typeIs(typeName));
  61389. }
  61390. function validateArrayOfType(typeName) {
  61391. return validate(arrayOfType(typeName));
  61392. }
  61393. function assertEach(callback) {
  61394. function validator(node, key, val) {
  61395. if (!Array.isArray(val))
  61396. return;
  61397. for (let i = 0; i < val.length; i++) {
  61398. const subkey = `${key}[${i}]`;
  61399. const v = val[i];
  61400. callback(node, subkey, v);
  61401. if (process.env.BABEL_TYPES_8_BREAKING)
  61402. (0, _validate.validateChild)(node, subkey, v);
  61403. }
  61404. }
  61405. validator.each = callback;
  61406. return validator;
  61407. }
  61408. function assertOneOf(...values) {
  61409. function validate2(node, key, val) {
  61410. if (values.indexOf(val) < 0) {
  61411. throw new TypeError(`Property ${key} expected value to be one of ${JSON.stringify(values)} but got ${JSON.stringify(val)}`);
  61412. }
  61413. }
  61414. validate2.oneOf = values;
  61415. return validate2;
  61416. }
  61417. function assertNodeType(...types2) {
  61418. function validate2(node, key, val) {
  61419. for (const type of types2) {
  61420. if ((0, _is.default)(type, val)) {
  61421. (0, _validate.validateChild)(node, key, val);
  61422. return;
  61423. }
  61424. }
  61425. throw new TypeError(`Property ${key} of ${node.type} expected node to be of a type ${JSON.stringify(types2)} but instead got ${JSON.stringify(val == null ? void 0 : val.type)}`);
  61426. }
  61427. validate2.oneOfNodeTypes = types2;
  61428. return validate2;
  61429. }
  61430. function assertNodeOrValueType(...types2) {
  61431. function validate2(node, key, val) {
  61432. for (const type of types2) {
  61433. if (getType(val) === type || (0, _is.default)(type, val)) {
  61434. (0, _validate.validateChild)(node, key, val);
  61435. return;
  61436. }
  61437. }
  61438. throw new TypeError(`Property ${key} of ${node.type} expected node to be of a type ${JSON.stringify(types2)} but instead got ${JSON.stringify(val == null ? void 0 : val.type)}`);
  61439. }
  61440. validate2.oneOfNodeOrValueTypes = types2;
  61441. return validate2;
  61442. }
  61443. function assertValueType(type) {
  61444. function validate2(node, key, val) {
  61445. const valid2 = getType(val) === type;
  61446. if (!valid2) {
  61447. throw new TypeError(`Property ${key} expected type of ${type} but got ${getType(val)}`);
  61448. }
  61449. }
  61450. validate2.type = type;
  61451. return validate2;
  61452. }
  61453. function assertShape(shape) {
  61454. function validate2(node, key, val) {
  61455. const errors = [];
  61456. for (const property of Object.keys(shape)) {
  61457. try {
  61458. (0, _validate.validateField)(node, property, val[property], shape[property]);
  61459. } catch (error) {
  61460. if (error instanceof TypeError) {
  61461. errors.push(error.message);
  61462. continue;
  61463. }
  61464. throw error;
  61465. }
  61466. }
  61467. if (errors.length) {
  61468. throw new TypeError(`Property ${key} of ${node.type} expected to have the following:
  61469. ${errors.join("\n")}`);
  61470. }
  61471. }
  61472. validate2.shapeOf = shape;
  61473. return validate2;
  61474. }
  61475. function assertOptionalChainStart() {
  61476. function validate2(node) {
  61477. var _current;
  61478. let current2 = node;
  61479. while (node) {
  61480. const {
  61481. type
  61482. } = current2;
  61483. if (type === "OptionalCallExpression") {
  61484. if (current2.optional)
  61485. return;
  61486. current2 = current2.callee;
  61487. continue;
  61488. }
  61489. if (type === "OptionalMemberExpression") {
  61490. if (current2.optional)
  61491. return;
  61492. current2 = current2.object;
  61493. continue;
  61494. }
  61495. break;
  61496. }
  61497. throw new TypeError(`Non-optional ${node.type} must chain from an optional OptionalMemberExpression or OptionalCallExpression. Found chain from ${(_current = current2) == null ? void 0 : _current.type}`);
  61498. }
  61499. return validate2;
  61500. }
  61501. function chain(...fns) {
  61502. function validate2(...args) {
  61503. for (const fn of fns) {
  61504. fn(...args);
  61505. }
  61506. }
  61507. validate2.chainOf = fns;
  61508. if (fns.length >= 2 && "type" in fns[0] && fns[0].type === "array" && !("each" in fns[1])) {
  61509. throw new Error(`An assertValueType("array") validator can only be followed by an assertEach(...) validator.`);
  61510. }
  61511. return validate2;
  61512. }
  61513. var validTypeOpts = ["aliases", "builder", "deprecatedAlias", "fields", "inherits", "visitor", "validate"];
  61514. var validFieldKeys = ["default", "optional", "validate"];
  61515. function defineType(type, opts = {}) {
  61516. const inherits = opts.inherits && store[opts.inherits] || {};
  61517. let fields = opts.fields;
  61518. if (!fields) {
  61519. fields = {};
  61520. if (inherits.fields) {
  61521. const keys2 = Object.getOwnPropertyNames(inherits.fields);
  61522. for (const key of keys2) {
  61523. const field = inherits.fields[key];
  61524. const def = field.default;
  61525. if (Array.isArray(def) ? def.length > 0 : def && typeof def === "object") {
  61526. throw new Error("field defaults can only be primitives or empty arrays currently");
  61527. }
  61528. fields[key] = {
  61529. default: Array.isArray(def) ? [] : def,
  61530. optional: field.optional,
  61531. validate: field.validate
  61532. };
  61533. }
  61534. }
  61535. }
  61536. const visitor = opts.visitor || inherits.visitor || [];
  61537. const aliases = opts.aliases || inherits.aliases || [];
  61538. const builder = opts.builder || inherits.builder || opts.visitor || [];
  61539. for (const k of Object.keys(opts)) {
  61540. if (validTypeOpts.indexOf(k) === -1) {
  61541. throw new Error(`Unknown type option "${k}" on ${type}`);
  61542. }
  61543. }
  61544. if (opts.deprecatedAlias) {
  61545. DEPRECATED_KEYS[opts.deprecatedAlias] = type;
  61546. }
  61547. for (const key of visitor.concat(builder)) {
  61548. fields[key] = fields[key] || {};
  61549. }
  61550. for (const key of Object.keys(fields)) {
  61551. const field = fields[key];
  61552. if (field.default !== void 0 && builder.indexOf(key) === -1) {
  61553. field.optional = true;
  61554. }
  61555. if (field.default === void 0) {
  61556. field.default = null;
  61557. } else if (!field.validate && field.default != null) {
  61558. field.validate = assertValueType(getType(field.default));
  61559. }
  61560. for (const k of Object.keys(field)) {
  61561. if (validFieldKeys.indexOf(k) === -1) {
  61562. throw new Error(`Unknown field key "${k}" on ${type}.${key}`);
  61563. }
  61564. }
  61565. }
  61566. VISITOR_KEYS[type] = opts.visitor = visitor;
  61567. BUILDER_KEYS[type] = opts.builder = builder;
  61568. NODE_FIELDS[type] = opts.fields = fields;
  61569. ALIAS_KEYS[type] = opts.aliases = aliases;
  61570. aliases.forEach((alias) => {
  61571. FLIPPED_ALIAS_KEYS[alias] = FLIPPED_ALIAS_KEYS[alias] || [];
  61572. FLIPPED_ALIAS_KEYS[alias].push(type);
  61573. });
  61574. if (opts.validate) {
  61575. NODE_PARENT_VALIDATIONS[type] = opts.validate;
  61576. }
  61577. store[type] = opts;
  61578. }
  61579. var store = {};
  61580. }
  61581. });
  61582. // node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/definitions/core.js
  61583. var require_core3 = __commonJS({
  61584. "node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/definitions/core.js"(exports) {
  61585. "use strict";
  61586. Object.defineProperty(exports, "__esModule", {
  61587. value: true
  61588. });
  61589. exports.classMethodOrDeclareMethodCommon = exports.classMethodOrPropertyCommon = exports.patternLikeCommon = exports.functionDeclarationCommon = exports.functionTypeAnnotationCommon = exports.functionCommon = void 0;
  61590. var _is = require_is3();
  61591. var _isValidIdentifier = require_isValidIdentifier3();
  61592. var _helperValidatorIdentifier = require_lib15();
  61593. var _constants = require_constants3();
  61594. var _utils = require_utils3();
  61595. (0, _utils.default)("ArrayExpression", {
  61596. fields: {
  61597. elements: {
  61598. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeOrValueType)("null", "Expression", "SpreadElement"))),
  61599. default: !process.env.BABEL_TYPES_8_BREAKING ? [] : void 0
  61600. }
  61601. },
  61602. visitor: ["elements"],
  61603. aliases: ["Expression"]
  61604. });
  61605. (0, _utils.default)("AssignmentExpression", {
  61606. fields: {
  61607. operator: {
  61608. validate: function() {
  61609. if (!process.env.BABEL_TYPES_8_BREAKING) {
  61610. return (0, _utils.assertValueType)("string");
  61611. }
  61612. const identifier = (0, _utils.assertOneOf)(..._constants.ASSIGNMENT_OPERATORS);
  61613. const pattern = (0, _utils.assertOneOf)("=");
  61614. return function(node, key, val) {
  61615. const validator = (0, _is.default)("Pattern", node.left) ? pattern : identifier;
  61616. validator(node, key, val);
  61617. };
  61618. }()
  61619. },
  61620. left: {
  61621. validate: !process.env.BABEL_TYPES_8_BREAKING ? (0, _utils.assertNodeType)("LVal") : (0, _utils.assertNodeType)("Identifier", "MemberExpression", "ArrayPattern", "ObjectPattern")
  61622. },
  61623. right: {
  61624. validate: (0, _utils.assertNodeType)("Expression")
  61625. }
  61626. },
  61627. builder: ["operator", "left", "right"],
  61628. visitor: ["left", "right"],
  61629. aliases: ["Expression"]
  61630. });
  61631. (0, _utils.default)("BinaryExpression", {
  61632. builder: ["operator", "left", "right"],
  61633. fields: {
  61634. operator: {
  61635. validate: (0, _utils.assertOneOf)(..._constants.BINARY_OPERATORS)
  61636. },
  61637. left: {
  61638. validate: function() {
  61639. const expression = (0, _utils.assertNodeType)("Expression");
  61640. const inOp = (0, _utils.assertNodeType)("Expression", "PrivateName");
  61641. const validator = function(node, key, val) {
  61642. const validator2 = node.operator === "in" ? inOp : expression;
  61643. validator2(node, key, val);
  61644. };
  61645. validator.oneOfNodeTypes = ["Expression", "PrivateName"];
  61646. return validator;
  61647. }()
  61648. },
  61649. right: {
  61650. validate: (0, _utils.assertNodeType)("Expression")
  61651. }
  61652. },
  61653. visitor: ["left", "right"],
  61654. aliases: ["Binary", "Expression"]
  61655. });
  61656. (0, _utils.default)("InterpreterDirective", {
  61657. builder: ["value"],
  61658. fields: {
  61659. value: {
  61660. validate: (0, _utils.assertValueType)("string")
  61661. }
  61662. }
  61663. });
  61664. (0, _utils.default)("Directive", {
  61665. visitor: ["value"],
  61666. fields: {
  61667. value: {
  61668. validate: (0, _utils.assertNodeType)("DirectiveLiteral")
  61669. }
  61670. }
  61671. });
  61672. (0, _utils.default)("DirectiveLiteral", {
  61673. builder: ["value"],
  61674. fields: {
  61675. value: {
  61676. validate: (0, _utils.assertValueType)("string")
  61677. }
  61678. }
  61679. });
  61680. (0, _utils.default)("BlockStatement", {
  61681. builder: ["body", "directives"],
  61682. visitor: ["directives", "body"],
  61683. fields: {
  61684. directives: {
  61685. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Directive"))),
  61686. default: []
  61687. },
  61688. body: {
  61689. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Statement")))
  61690. }
  61691. },
  61692. aliases: ["Scopable", "BlockParent", "Block", "Statement"]
  61693. });
  61694. (0, _utils.default)("BreakStatement", {
  61695. visitor: ["label"],
  61696. fields: {
  61697. label: {
  61698. validate: (0, _utils.assertNodeType)("Identifier"),
  61699. optional: true
  61700. }
  61701. },
  61702. aliases: ["Statement", "Terminatorless", "CompletionStatement"]
  61703. });
  61704. (0, _utils.default)("CallExpression", {
  61705. visitor: ["callee", "arguments", "typeParameters", "typeArguments"],
  61706. builder: ["callee", "arguments"],
  61707. aliases: ["Expression"],
  61708. fields: Object.assign({
  61709. callee: {
  61710. validate: (0, _utils.assertNodeType)("Expression", "V8IntrinsicIdentifier")
  61711. },
  61712. arguments: {
  61713. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Expression", "SpreadElement", "JSXNamespacedName", "ArgumentPlaceholder")))
  61714. }
  61715. }, !process.env.BABEL_TYPES_8_BREAKING ? {
  61716. optional: {
  61717. validate: (0, _utils.assertOneOf)(true, false),
  61718. optional: true
  61719. }
  61720. } : {}, {
  61721. typeArguments: {
  61722. validate: (0, _utils.assertNodeType)("TypeParameterInstantiation"),
  61723. optional: true
  61724. },
  61725. typeParameters: {
  61726. validate: (0, _utils.assertNodeType)("TSTypeParameterInstantiation"),
  61727. optional: true
  61728. }
  61729. })
  61730. });
  61731. (0, _utils.default)("CatchClause", {
  61732. visitor: ["param", "body"],
  61733. fields: {
  61734. param: {
  61735. validate: (0, _utils.assertNodeType)("Identifier", "ArrayPattern", "ObjectPattern"),
  61736. optional: true
  61737. },
  61738. body: {
  61739. validate: (0, _utils.assertNodeType)("BlockStatement")
  61740. }
  61741. },
  61742. aliases: ["Scopable", "BlockParent"]
  61743. });
  61744. (0, _utils.default)("ConditionalExpression", {
  61745. visitor: ["test", "consequent", "alternate"],
  61746. fields: {
  61747. test: {
  61748. validate: (0, _utils.assertNodeType)("Expression")
  61749. },
  61750. consequent: {
  61751. validate: (0, _utils.assertNodeType)("Expression")
  61752. },
  61753. alternate: {
  61754. validate: (0, _utils.assertNodeType)("Expression")
  61755. }
  61756. },
  61757. aliases: ["Expression", "Conditional"]
  61758. });
  61759. (0, _utils.default)("ContinueStatement", {
  61760. visitor: ["label"],
  61761. fields: {
  61762. label: {
  61763. validate: (0, _utils.assertNodeType)("Identifier"),
  61764. optional: true
  61765. }
  61766. },
  61767. aliases: ["Statement", "Terminatorless", "CompletionStatement"]
  61768. });
  61769. (0, _utils.default)("DebuggerStatement", {
  61770. aliases: ["Statement"]
  61771. });
  61772. (0, _utils.default)("DoWhileStatement", {
  61773. visitor: ["test", "body"],
  61774. fields: {
  61775. test: {
  61776. validate: (0, _utils.assertNodeType)("Expression")
  61777. },
  61778. body: {
  61779. validate: (0, _utils.assertNodeType)("Statement")
  61780. }
  61781. },
  61782. aliases: ["Statement", "BlockParent", "Loop", "While", "Scopable"]
  61783. });
  61784. (0, _utils.default)("EmptyStatement", {
  61785. aliases: ["Statement"]
  61786. });
  61787. (0, _utils.default)("ExpressionStatement", {
  61788. visitor: ["expression"],
  61789. fields: {
  61790. expression: {
  61791. validate: (0, _utils.assertNodeType)("Expression")
  61792. }
  61793. },
  61794. aliases: ["Statement", "ExpressionWrapper"]
  61795. });
  61796. (0, _utils.default)("File", {
  61797. builder: ["program", "comments", "tokens"],
  61798. visitor: ["program"],
  61799. fields: {
  61800. program: {
  61801. validate: (0, _utils.assertNodeType)("Program")
  61802. },
  61803. comments: {
  61804. validate: !process.env.BABEL_TYPES_8_BREAKING ? Object.assign(() => {
  61805. }, {
  61806. each: {
  61807. oneOfNodeTypes: ["CommentBlock", "CommentLine"]
  61808. }
  61809. }) : (0, _utils.assertEach)((0, _utils.assertNodeType)("CommentBlock", "CommentLine")),
  61810. optional: true
  61811. },
  61812. tokens: {
  61813. validate: (0, _utils.assertEach)(Object.assign(() => {
  61814. }, {
  61815. type: "any"
  61816. })),
  61817. optional: true
  61818. }
  61819. }
  61820. });
  61821. (0, _utils.default)("ForInStatement", {
  61822. visitor: ["left", "right", "body"],
  61823. aliases: ["Scopable", "Statement", "For", "BlockParent", "Loop", "ForXStatement"],
  61824. fields: {
  61825. left: {
  61826. validate: !process.env.BABEL_TYPES_8_BREAKING ? (0, _utils.assertNodeType)("VariableDeclaration", "LVal") : (0, _utils.assertNodeType)("VariableDeclaration", "Identifier", "MemberExpression", "ArrayPattern", "ObjectPattern")
  61827. },
  61828. right: {
  61829. validate: (0, _utils.assertNodeType)("Expression")
  61830. },
  61831. body: {
  61832. validate: (0, _utils.assertNodeType)("Statement")
  61833. }
  61834. }
  61835. });
  61836. (0, _utils.default)("ForStatement", {
  61837. visitor: ["init", "test", "update", "body"],
  61838. aliases: ["Scopable", "Statement", "For", "BlockParent", "Loop"],
  61839. fields: {
  61840. init: {
  61841. validate: (0, _utils.assertNodeType)("VariableDeclaration", "Expression"),
  61842. optional: true
  61843. },
  61844. test: {
  61845. validate: (0, _utils.assertNodeType)("Expression"),
  61846. optional: true
  61847. },
  61848. update: {
  61849. validate: (0, _utils.assertNodeType)("Expression"),
  61850. optional: true
  61851. },
  61852. body: {
  61853. validate: (0, _utils.assertNodeType)("Statement")
  61854. }
  61855. }
  61856. });
  61857. var functionCommon = {
  61858. params: {
  61859. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Identifier", "Pattern", "RestElement")))
  61860. },
  61861. generator: {
  61862. default: false
  61863. },
  61864. async: {
  61865. default: false
  61866. }
  61867. };
  61868. exports.functionCommon = functionCommon;
  61869. var functionTypeAnnotationCommon = {
  61870. returnType: {
  61871. validate: (0, _utils.assertNodeType)("TypeAnnotation", "TSTypeAnnotation", "Noop"),
  61872. optional: true
  61873. },
  61874. typeParameters: {
  61875. validate: (0, _utils.assertNodeType)("TypeParameterDeclaration", "TSTypeParameterDeclaration", "Noop"),
  61876. optional: true
  61877. }
  61878. };
  61879. exports.functionTypeAnnotationCommon = functionTypeAnnotationCommon;
  61880. var functionDeclarationCommon = Object.assign({}, functionCommon, {
  61881. declare: {
  61882. validate: (0, _utils.assertValueType)("boolean"),
  61883. optional: true
  61884. },
  61885. id: {
  61886. validate: (0, _utils.assertNodeType)("Identifier"),
  61887. optional: true
  61888. }
  61889. });
  61890. exports.functionDeclarationCommon = functionDeclarationCommon;
  61891. (0, _utils.default)("FunctionDeclaration", {
  61892. builder: ["id", "params", "body", "generator", "async"],
  61893. visitor: ["id", "params", "body", "returnType", "typeParameters"],
  61894. fields: Object.assign({}, functionDeclarationCommon, functionTypeAnnotationCommon, {
  61895. body: {
  61896. validate: (0, _utils.assertNodeType)("BlockStatement")
  61897. }
  61898. }),
  61899. aliases: ["Scopable", "Function", "BlockParent", "FunctionParent", "Statement", "Pureish", "Declaration"],
  61900. validate: function() {
  61901. if (!process.env.BABEL_TYPES_8_BREAKING)
  61902. return () => {
  61903. };
  61904. const identifier = (0, _utils.assertNodeType)("Identifier");
  61905. return function(parent, key, node) {
  61906. if (!(0, _is.default)("ExportDefaultDeclaration", parent)) {
  61907. identifier(node, "id", node.id);
  61908. }
  61909. };
  61910. }()
  61911. });
  61912. (0, _utils.default)("FunctionExpression", {
  61913. inherits: "FunctionDeclaration",
  61914. aliases: ["Scopable", "Function", "BlockParent", "FunctionParent", "Expression", "Pureish"],
  61915. fields: Object.assign({}, functionCommon, functionTypeAnnotationCommon, {
  61916. id: {
  61917. validate: (0, _utils.assertNodeType)("Identifier"),
  61918. optional: true
  61919. },
  61920. body: {
  61921. validate: (0, _utils.assertNodeType)("BlockStatement")
  61922. }
  61923. })
  61924. });
  61925. var patternLikeCommon = {
  61926. typeAnnotation: {
  61927. validate: (0, _utils.assertNodeType)("TypeAnnotation", "TSTypeAnnotation", "Noop"),
  61928. optional: true
  61929. },
  61930. decorators: {
  61931. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Decorator")))
  61932. }
  61933. };
  61934. exports.patternLikeCommon = patternLikeCommon;
  61935. (0, _utils.default)("Identifier", {
  61936. builder: ["name"],
  61937. visitor: ["typeAnnotation", "decorators"],
  61938. aliases: ["Expression", "PatternLike", "LVal", "TSEntityName"],
  61939. fields: Object.assign({}, patternLikeCommon, {
  61940. name: {
  61941. validate: (0, _utils.chain)((0, _utils.assertValueType)("string"), Object.assign(function(node, key, val) {
  61942. if (!process.env.BABEL_TYPES_8_BREAKING)
  61943. return;
  61944. if (!(0, _isValidIdentifier.default)(val, false)) {
  61945. throw new TypeError(`"${val}" is not a valid identifier name`);
  61946. }
  61947. }, {
  61948. type: "string"
  61949. }))
  61950. },
  61951. optional: {
  61952. validate: (0, _utils.assertValueType)("boolean"),
  61953. optional: true
  61954. }
  61955. }),
  61956. validate(parent, key, node) {
  61957. if (!process.env.BABEL_TYPES_8_BREAKING)
  61958. return;
  61959. const match = /\.(\w+)$/.exec(key);
  61960. if (!match)
  61961. return;
  61962. const [, parentKey] = match;
  61963. const nonComp = {
  61964. computed: false
  61965. };
  61966. if (parentKey === "property") {
  61967. if ((0, _is.default)("MemberExpression", parent, nonComp))
  61968. return;
  61969. if ((0, _is.default)("OptionalMemberExpression", parent, nonComp))
  61970. return;
  61971. } else if (parentKey === "key") {
  61972. if ((0, _is.default)("Property", parent, nonComp))
  61973. return;
  61974. if ((0, _is.default)("Method", parent, nonComp))
  61975. return;
  61976. } else if (parentKey === "exported") {
  61977. if ((0, _is.default)("ExportSpecifier", parent))
  61978. return;
  61979. } else if (parentKey === "imported") {
  61980. if ((0, _is.default)("ImportSpecifier", parent, {
  61981. imported: node
  61982. }))
  61983. return;
  61984. } else if (parentKey === "meta") {
  61985. if ((0, _is.default)("MetaProperty", parent, {
  61986. meta: node
  61987. }))
  61988. return;
  61989. }
  61990. if (((0, _helperValidatorIdentifier.isKeyword)(node.name) || (0, _helperValidatorIdentifier.isReservedWord)(node.name, false)) && node.name !== "this") {
  61991. throw new TypeError(`"${node.name}" is not a valid identifier`);
  61992. }
  61993. }
  61994. });
  61995. (0, _utils.default)("IfStatement", {
  61996. visitor: ["test", "consequent", "alternate"],
  61997. aliases: ["Statement", "Conditional"],
  61998. fields: {
  61999. test: {
  62000. validate: (0, _utils.assertNodeType)("Expression")
  62001. },
  62002. consequent: {
  62003. validate: (0, _utils.assertNodeType)("Statement")
  62004. },
  62005. alternate: {
  62006. optional: true,
  62007. validate: (0, _utils.assertNodeType)("Statement")
  62008. }
  62009. }
  62010. });
  62011. (0, _utils.default)("LabeledStatement", {
  62012. visitor: ["label", "body"],
  62013. aliases: ["Statement"],
  62014. fields: {
  62015. label: {
  62016. validate: (0, _utils.assertNodeType)("Identifier")
  62017. },
  62018. body: {
  62019. validate: (0, _utils.assertNodeType)("Statement")
  62020. }
  62021. }
  62022. });
  62023. (0, _utils.default)("StringLiteral", {
  62024. builder: ["value"],
  62025. fields: {
  62026. value: {
  62027. validate: (0, _utils.assertValueType)("string")
  62028. }
  62029. },
  62030. aliases: ["Expression", "Pureish", "Literal", "Immutable"]
  62031. });
  62032. (0, _utils.default)("NumericLiteral", {
  62033. builder: ["value"],
  62034. deprecatedAlias: "NumberLiteral",
  62035. fields: {
  62036. value: {
  62037. validate: (0, _utils.assertValueType)("number")
  62038. }
  62039. },
  62040. aliases: ["Expression", "Pureish", "Literal", "Immutable"]
  62041. });
  62042. (0, _utils.default)("NullLiteral", {
  62043. aliases: ["Expression", "Pureish", "Literal", "Immutable"]
  62044. });
  62045. (0, _utils.default)("BooleanLiteral", {
  62046. builder: ["value"],
  62047. fields: {
  62048. value: {
  62049. validate: (0, _utils.assertValueType)("boolean")
  62050. }
  62051. },
  62052. aliases: ["Expression", "Pureish", "Literal", "Immutable"]
  62053. });
  62054. (0, _utils.default)("RegExpLiteral", {
  62055. builder: ["pattern", "flags"],
  62056. deprecatedAlias: "RegexLiteral",
  62057. aliases: ["Expression", "Pureish", "Literal"],
  62058. fields: {
  62059. pattern: {
  62060. validate: (0, _utils.assertValueType)("string")
  62061. },
  62062. flags: {
  62063. validate: (0, _utils.chain)((0, _utils.assertValueType)("string"), Object.assign(function(node, key, val) {
  62064. if (!process.env.BABEL_TYPES_8_BREAKING)
  62065. return;
  62066. const invalid2 = /[^gimsuy]/.exec(val);
  62067. if (invalid2) {
  62068. throw new TypeError(`"${invalid2[0]}" is not a valid RegExp flag`);
  62069. }
  62070. }, {
  62071. type: "string"
  62072. })),
  62073. default: ""
  62074. }
  62075. }
  62076. });
  62077. (0, _utils.default)("LogicalExpression", {
  62078. builder: ["operator", "left", "right"],
  62079. visitor: ["left", "right"],
  62080. aliases: ["Binary", "Expression"],
  62081. fields: {
  62082. operator: {
  62083. validate: (0, _utils.assertOneOf)(..._constants.LOGICAL_OPERATORS)
  62084. },
  62085. left: {
  62086. validate: (0, _utils.assertNodeType)("Expression")
  62087. },
  62088. right: {
  62089. validate: (0, _utils.assertNodeType)("Expression")
  62090. }
  62091. }
  62092. });
  62093. (0, _utils.default)("MemberExpression", {
  62094. builder: ["object", "property", "computed", ...!process.env.BABEL_TYPES_8_BREAKING ? ["optional"] : []],
  62095. visitor: ["object", "property"],
  62096. aliases: ["Expression", "LVal"],
  62097. fields: Object.assign({
  62098. object: {
  62099. validate: (0, _utils.assertNodeType)("Expression")
  62100. },
  62101. property: {
  62102. validate: function() {
  62103. const normal = (0, _utils.assertNodeType)("Identifier", "PrivateName");
  62104. const computed = (0, _utils.assertNodeType)("Expression");
  62105. const validator = function(node, key, val) {
  62106. const validator2 = node.computed ? computed : normal;
  62107. validator2(node, key, val);
  62108. };
  62109. validator.oneOfNodeTypes = ["Expression", "Identifier", "PrivateName"];
  62110. return validator;
  62111. }()
  62112. },
  62113. computed: {
  62114. default: false
  62115. }
  62116. }, !process.env.BABEL_TYPES_8_BREAKING ? {
  62117. optional: {
  62118. validate: (0, _utils.assertOneOf)(true, false),
  62119. optional: true
  62120. }
  62121. } : {})
  62122. });
  62123. (0, _utils.default)("NewExpression", {
  62124. inherits: "CallExpression"
  62125. });
  62126. (0, _utils.default)("Program", {
  62127. visitor: ["directives", "body"],
  62128. builder: ["body", "directives", "sourceType", "interpreter"],
  62129. fields: {
  62130. sourceFile: {
  62131. validate: (0, _utils.assertValueType)("string")
  62132. },
  62133. sourceType: {
  62134. validate: (0, _utils.assertOneOf)("script", "module"),
  62135. default: "script"
  62136. },
  62137. interpreter: {
  62138. validate: (0, _utils.assertNodeType)("InterpreterDirective"),
  62139. default: null,
  62140. optional: true
  62141. },
  62142. directives: {
  62143. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Directive"))),
  62144. default: []
  62145. },
  62146. body: {
  62147. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Statement")))
  62148. }
  62149. },
  62150. aliases: ["Scopable", "BlockParent", "Block"]
  62151. });
  62152. (0, _utils.default)("ObjectExpression", {
  62153. visitor: ["properties"],
  62154. aliases: ["Expression"],
  62155. fields: {
  62156. properties: {
  62157. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("ObjectMethod", "ObjectProperty", "SpreadElement")))
  62158. }
  62159. }
  62160. });
  62161. (0, _utils.default)("ObjectMethod", {
  62162. builder: ["kind", "key", "params", "body", "computed", "generator", "async"],
  62163. fields: Object.assign({}, functionCommon, functionTypeAnnotationCommon, {
  62164. kind: Object.assign({
  62165. validate: (0, _utils.assertOneOf)("method", "get", "set")
  62166. }, !process.env.BABEL_TYPES_8_BREAKING ? {
  62167. default: "method"
  62168. } : {}),
  62169. computed: {
  62170. default: false
  62171. },
  62172. key: {
  62173. validate: function() {
  62174. const normal = (0, _utils.assertNodeType)("Identifier", "StringLiteral", "NumericLiteral");
  62175. const computed = (0, _utils.assertNodeType)("Expression");
  62176. const validator = function(node, key, val) {
  62177. const validator2 = node.computed ? computed : normal;
  62178. validator2(node, key, val);
  62179. };
  62180. validator.oneOfNodeTypes = ["Expression", "Identifier", "StringLiteral", "NumericLiteral"];
  62181. return validator;
  62182. }()
  62183. },
  62184. decorators: {
  62185. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Decorator"))),
  62186. optional: true
  62187. },
  62188. body: {
  62189. validate: (0, _utils.assertNodeType)("BlockStatement")
  62190. }
  62191. }),
  62192. visitor: ["key", "params", "body", "decorators", "returnType", "typeParameters"],
  62193. aliases: ["UserWhitespacable", "Function", "Scopable", "BlockParent", "FunctionParent", "Method", "ObjectMember"]
  62194. });
  62195. (0, _utils.default)("ObjectProperty", {
  62196. builder: ["key", "value", "computed", "shorthand", ...!process.env.BABEL_TYPES_8_BREAKING ? ["decorators"] : []],
  62197. fields: {
  62198. computed: {
  62199. default: false
  62200. },
  62201. key: {
  62202. validate: function() {
  62203. const normal = (0, _utils.assertNodeType)("Identifier", "StringLiteral", "NumericLiteral");
  62204. const computed = (0, _utils.assertNodeType)("Expression");
  62205. const validator = function(node, key, val) {
  62206. const validator2 = node.computed ? computed : normal;
  62207. validator2(node, key, val);
  62208. };
  62209. validator.oneOfNodeTypes = ["Expression", "Identifier", "StringLiteral", "NumericLiteral"];
  62210. return validator;
  62211. }()
  62212. },
  62213. value: {
  62214. validate: (0, _utils.assertNodeType)("Expression", "PatternLike")
  62215. },
  62216. shorthand: {
  62217. validate: (0, _utils.chain)((0, _utils.assertValueType)("boolean"), Object.assign(function(node, key, val) {
  62218. if (!process.env.BABEL_TYPES_8_BREAKING)
  62219. return;
  62220. if (val && node.computed) {
  62221. throw new TypeError("Property shorthand of ObjectProperty cannot be true if computed is true");
  62222. }
  62223. }, {
  62224. type: "boolean"
  62225. }), function(node, key, val) {
  62226. if (!process.env.BABEL_TYPES_8_BREAKING)
  62227. return;
  62228. if (val && !(0, _is.default)("Identifier", node.key)) {
  62229. throw new TypeError("Property shorthand of ObjectProperty cannot be true if key is not an Identifier");
  62230. }
  62231. }),
  62232. default: false
  62233. },
  62234. decorators: {
  62235. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Decorator"))),
  62236. optional: true
  62237. }
  62238. },
  62239. visitor: ["key", "value", "decorators"],
  62240. aliases: ["UserWhitespacable", "Property", "ObjectMember"],
  62241. validate: function() {
  62242. const pattern = (0, _utils.assertNodeType)("Identifier", "Pattern");
  62243. const expression = (0, _utils.assertNodeType)("Expression");
  62244. return function(parent, key, node) {
  62245. if (!process.env.BABEL_TYPES_8_BREAKING)
  62246. return;
  62247. const validator = (0, _is.default)("ObjectPattern", parent) ? pattern : expression;
  62248. validator(node, "value", node.value);
  62249. };
  62250. }()
  62251. });
  62252. (0, _utils.default)("RestElement", {
  62253. visitor: ["argument", "typeAnnotation"],
  62254. builder: ["argument"],
  62255. aliases: ["LVal", "PatternLike"],
  62256. deprecatedAlias: "RestProperty",
  62257. fields: Object.assign({}, patternLikeCommon, {
  62258. argument: {
  62259. validate: !process.env.BABEL_TYPES_8_BREAKING ? (0, _utils.assertNodeType)("LVal") : (0, _utils.assertNodeType)("Identifier", "Pattern", "MemberExpression")
  62260. }
  62261. }),
  62262. validate(parent, key) {
  62263. if (!process.env.BABEL_TYPES_8_BREAKING)
  62264. return;
  62265. const match = /(\w+)\[(\d+)\]/.exec(key);
  62266. if (!match)
  62267. throw new Error("Internal Babel error: malformed key.");
  62268. const [, listKey, index2] = match;
  62269. if (parent[listKey].length > index2 + 1) {
  62270. throw new TypeError(`RestElement must be last element of ${listKey}`);
  62271. }
  62272. }
  62273. });
  62274. (0, _utils.default)("ReturnStatement", {
  62275. visitor: ["argument"],
  62276. aliases: ["Statement", "Terminatorless", "CompletionStatement"],
  62277. fields: {
  62278. argument: {
  62279. validate: (0, _utils.assertNodeType)("Expression"),
  62280. optional: true
  62281. }
  62282. }
  62283. });
  62284. (0, _utils.default)("SequenceExpression", {
  62285. visitor: ["expressions"],
  62286. fields: {
  62287. expressions: {
  62288. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Expression")))
  62289. }
  62290. },
  62291. aliases: ["Expression"]
  62292. });
  62293. (0, _utils.default)("ParenthesizedExpression", {
  62294. visitor: ["expression"],
  62295. aliases: ["Expression", "ExpressionWrapper"],
  62296. fields: {
  62297. expression: {
  62298. validate: (0, _utils.assertNodeType)("Expression")
  62299. }
  62300. }
  62301. });
  62302. (0, _utils.default)("SwitchCase", {
  62303. visitor: ["test", "consequent"],
  62304. fields: {
  62305. test: {
  62306. validate: (0, _utils.assertNodeType)("Expression"),
  62307. optional: true
  62308. },
  62309. consequent: {
  62310. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Statement")))
  62311. }
  62312. }
  62313. });
  62314. (0, _utils.default)("SwitchStatement", {
  62315. visitor: ["discriminant", "cases"],
  62316. aliases: ["Statement", "BlockParent", "Scopable"],
  62317. fields: {
  62318. discriminant: {
  62319. validate: (0, _utils.assertNodeType)("Expression")
  62320. },
  62321. cases: {
  62322. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("SwitchCase")))
  62323. }
  62324. }
  62325. });
  62326. (0, _utils.default)("ThisExpression", {
  62327. aliases: ["Expression"]
  62328. });
  62329. (0, _utils.default)("ThrowStatement", {
  62330. visitor: ["argument"],
  62331. aliases: ["Statement", "Terminatorless", "CompletionStatement"],
  62332. fields: {
  62333. argument: {
  62334. validate: (0, _utils.assertNodeType)("Expression")
  62335. }
  62336. }
  62337. });
  62338. (0, _utils.default)("TryStatement", {
  62339. visitor: ["block", "handler", "finalizer"],
  62340. aliases: ["Statement"],
  62341. fields: {
  62342. block: {
  62343. validate: (0, _utils.chain)((0, _utils.assertNodeType)("BlockStatement"), Object.assign(function(node) {
  62344. if (!process.env.BABEL_TYPES_8_BREAKING)
  62345. return;
  62346. if (!node.handler && !node.finalizer) {
  62347. throw new TypeError("TryStatement expects either a handler or finalizer, or both");
  62348. }
  62349. }, {
  62350. oneOfNodeTypes: ["BlockStatement"]
  62351. }))
  62352. },
  62353. handler: {
  62354. optional: true,
  62355. validate: (0, _utils.assertNodeType)("CatchClause")
  62356. },
  62357. finalizer: {
  62358. optional: true,
  62359. validate: (0, _utils.assertNodeType)("BlockStatement")
  62360. }
  62361. }
  62362. });
  62363. (0, _utils.default)("UnaryExpression", {
  62364. builder: ["operator", "argument", "prefix"],
  62365. fields: {
  62366. prefix: {
  62367. default: true
  62368. },
  62369. argument: {
  62370. validate: (0, _utils.assertNodeType)("Expression")
  62371. },
  62372. operator: {
  62373. validate: (0, _utils.assertOneOf)(..._constants.UNARY_OPERATORS)
  62374. }
  62375. },
  62376. visitor: ["argument"],
  62377. aliases: ["UnaryLike", "Expression"]
  62378. });
  62379. (0, _utils.default)("UpdateExpression", {
  62380. builder: ["operator", "argument", "prefix"],
  62381. fields: {
  62382. prefix: {
  62383. default: false
  62384. },
  62385. argument: {
  62386. validate: !process.env.BABEL_TYPES_8_BREAKING ? (0, _utils.assertNodeType)("Expression") : (0, _utils.assertNodeType)("Identifier", "MemberExpression")
  62387. },
  62388. operator: {
  62389. validate: (0, _utils.assertOneOf)(..._constants.UPDATE_OPERATORS)
  62390. }
  62391. },
  62392. visitor: ["argument"],
  62393. aliases: ["Expression"]
  62394. });
  62395. (0, _utils.default)("VariableDeclaration", {
  62396. builder: ["kind", "declarations"],
  62397. visitor: ["declarations"],
  62398. aliases: ["Statement", "Declaration"],
  62399. fields: {
  62400. declare: {
  62401. validate: (0, _utils.assertValueType)("boolean"),
  62402. optional: true
  62403. },
  62404. kind: {
  62405. validate: (0, _utils.assertOneOf)("var", "let", "const")
  62406. },
  62407. declarations: {
  62408. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("VariableDeclarator")))
  62409. }
  62410. },
  62411. validate(parent, key, node) {
  62412. if (!process.env.BABEL_TYPES_8_BREAKING)
  62413. return;
  62414. if (!(0, _is.default)("ForXStatement", parent, {
  62415. left: node
  62416. }))
  62417. return;
  62418. if (node.declarations.length !== 1) {
  62419. throw new TypeError(`Exactly one VariableDeclarator is required in the VariableDeclaration of a ${parent.type}`);
  62420. }
  62421. }
  62422. });
  62423. (0, _utils.default)("VariableDeclarator", {
  62424. visitor: ["id", "init"],
  62425. fields: {
  62426. id: {
  62427. validate: function() {
  62428. if (!process.env.BABEL_TYPES_8_BREAKING) {
  62429. return (0, _utils.assertNodeType)("LVal");
  62430. }
  62431. const normal = (0, _utils.assertNodeType)("Identifier", "ArrayPattern", "ObjectPattern");
  62432. const without = (0, _utils.assertNodeType)("Identifier");
  62433. return function(node, key, val) {
  62434. const validator = node.init ? normal : without;
  62435. validator(node, key, val);
  62436. };
  62437. }()
  62438. },
  62439. definite: {
  62440. optional: true,
  62441. validate: (0, _utils.assertValueType)("boolean")
  62442. },
  62443. init: {
  62444. optional: true,
  62445. validate: (0, _utils.assertNodeType)("Expression")
  62446. }
  62447. }
  62448. });
  62449. (0, _utils.default)("WhileStatement", {
  62450. visitor: ["test", "body"],
  62451. aliases: ["Statement", "BlockParent", "Loop", "While", "Scopable"],
  62452. fields: {
  62453. test: {
  62454. validate: (0, _utils.assertNodeType)("Expression")
  62455. },
  62456. body: {
  62457. validate: (0, _utils.assertNodeType)("Statement")
  62458. }
  62459. }
  62460. });
  62461. (0, _utils.default)("WithStatement", {
  62462. visitor: ["object", "body"],
  62463. aliases: ["Statement"],
  62464. fields: {
  62465. object: {
  62466. validate: (0, _utils.assertNodeType)("Expression")
  62467. },
  62468. body: {
  62469. validate: (0, _utils.assertNodeType)("Statement")
  62470. }
  62471. }
  62472. });
  62473. (0, _utils.default)("AssignmentPattern", {
  62474. visitor: ["left", "right", "decorators"],
  62475. builder: ["left", "right"],
  62476. aliases: ["Pattern", "PatternLike", "LVal"],
  62477. fields: Object.assign({}, patternLikeCommon, {
  62478. left: {
  62479. validate: (0, _utils.assertNodeType)("Identifier", "ObjectPattern", "ArrayPattern", "MemberExpression")
  62480. },
  62481. right: {
  62482. validate: (0, _utils.assertNodeType)("Expression")
  62483. },
  62484. decorators: {
  62485. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Decorator"))),
  62486. optional: true
  62487. }
  62488. })
  62489. });
  62490. (0, _utils.default)("ArrayPattern", {
  62491. visitor: ["elements", "typeAnnotation"],
  62492. builder: ["elements"],
  62493. aliases: ["Pattern", "PatternLike", "LVal"],
  62494. fields: Object.assign({}, patternLikeCommon, {
  62495. elements: {
  62496. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeOrValueType)("null", "PatternLike")))
  62497. },
  62498. decorators: {
  62499. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Decorator"))),
  62500. optional: true
  62501. }
  62502. })
  62503. });
  62504. (0, _utils.default)("ArrowFunctionExpression", {
  62505. builder: ["params", "body", "async"],
  62506. visitor: ["params", "body", "returnType", "typeParameters"],
  62507. aliases: ["Scopable", "Function", "BlockParent", "FunctionParent", "Expression", "Pureish"],
  62508. fields: Object.assign({}, functionCommon, functionTypeAnnotationCommon, {
  62509. expression: {
  62510. validate: (0, _utils.assertValueType)("boolean")
  62511. },
  62512. body: {
  62513. validate: (0, _utils.assertNodeType)("BlockStatement", "Expression")
  62514. }
  62515. })
  62516. });
  62517. (0, _utils.default)("ClassBody", {
  62518. visitor: ["body"],
  62519. fields: {
  62520. body: {
  62521. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("ClassMethod", "ClassPrivateMethod", "ClassProperty", "ClassPrivateProperty", "TSDeclareMethod", "TSIndexSignature")))
  62522. }
  62523. }
  62524. });
  62525. (0, _utils.default)("ClassExpression", {
  62526. builder: ["id", "superClass", "body", "decorators"],
  62527. visitor: ["id", "body", "superClass", "mixins", "typeParameters", "superTypeParameters", "implements", "decorators"],
  62528. aliases: ["Scopable", "Class", "Expression"],
  62529. fields: {
  62530. id: {
  62531. validate: (0, _utils.assertNodeType)("Identifier"),
  62532. optional: true
  62533. },
  62534. typeParameters: {
  62535. validate: (0, _utils.assertNodeType)("TypeParameterDeclaration", "TSTypeParameterDeclaration", "Noop"),
  62536. optional: true
  62537. },
  62538. body: {
  62539. validate: (0, _utils.assertNodeType)("ClassBody")
  62540. },
  62541. superClass: {
  62542. optional: true,
  62543. validate: (0, _utils.assertNodeType)("Expression")
  62544. },
  62545. superTypeParameters: {
  62546. validate: (0, _utils.assertNodeType)("TypeParameterInstantiation", "TSTypeParameterInstantiation"),
  62547. optional: true
  62548. },
  62549. implements: {
  62550. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("TSExpressionWithTypeArguments", "ClassImplements"))),
  62551. optional: true
  62552. },
  62553. decorators: {
  62554. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Decorator"))),
  62555. optional: true
  62556. },
  62557. mixins: {
  62558. validate: (0, _utils.assertNodeType)("InterfaceExtends"),
  62559. optional: true
  62560. }
  62561. }
  62562. });
  62563. (0, _utils.default)("ClassDeclaration", {
  62564. inherits: "ClassExpression",
  62565. aliases: ["Scopable", "Class", "Statement", "Declaration"],
  62566. fields: {
  62567. id: {
  62568. validate: (0, _utils.assertNodeType)("Identifier")
  62569. },
  62570. typeParameters: {
  62571. validate: (0, _utils.assertNodeType)("TypeParameterDeclaration", "TSTypeParameterDeclaration", "Noop"),
  62572. optional: true
  62573. },
  62574. body: {
  62575. validate: (0, _utils.assertNodeType)("ClassBody")
  62576. },
  62577. superClass: {
  62578. optional: true,
  62579. validate: (0, _utils.assertNodeType)("Expression")
  62580. },
  62581. superTypeParameters: {
  62582. validate: (0, _utils.assertNodeType)("TypeParameterInstantiation", "TSTypeParameterInstantiation"),
  62583. optional: true
  62584. },
  62585. implements: {
  62586. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("TSExpressionWithTypeArguments", "ClassImplements"))),
  62587. optional: true
  62588. },
  62589. decorators: {
  62590. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Decorator"))),
  62591. optional: true
  62592. },
  62593. mixins: {
  62594. validate: (0, _utils.assertNodeType)("InterfaceExtends"),
  62595. optional: true
  62596. },
  62597. declare: {
  62598. validate: (0, _utils.assertValueType)("boolean"),
  62599. optional: true
  62600. },
  62601. abstract: {
  62602. validate: (0, _utils.assertValueType)("boolean"),
  62603. optional: true
  62604. }
  62605. },
  62606. validate: function() {
  62607. const identifier = (0, _utils.assertNodeType)("Identifier");
  62608. return function(parent, key, node) {
  62609. if (!process.env.BABEL_TYPES_8_BREAKING)
  62610. return;
  62611. if (!(0, _is.default)("ExportDefaultDeclaration", parent)) {
  62612. identifier(node, "id", node.id);
  62613. }
  62614. };
  62615. }()
  62616. });
  62617. (0, _utils.default)("ExportAllDeclaration", {
  62618. visitor: ["source"],
  62619. aliases: ["Statement", "Declaration", "ModuleDeclaration", "ExportDeclaration"],
  62620. fields: {
  62621. source: {
  62622. validate: (0, _utils.assertNodeType)("StringLiteral")
  62623. },
  62624. exportKind: (0, _utils.validateOptional)((0, _utils.assertOneOf)("type", "value")),
  62625. assertions: {
  62626. optional: true,
  62627. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("ImportAttribute")))
  62628. }
  62629. }
  62630. });
  62631. (0, _utils.default)("ExportDefaultDeclaration", {
  62632. visitor: ["declaration"],
  62633. aliases: ["Statement", "Declaration", "ModuleDeclaration", "ExportDeclaration"],
  62634. fields: {
  62635. declaration: {
  62636. validate: (0, _utils.assertNodeType)("FunctionDeclaration", "TSDeclareFunction", "ClassDeclaration", "Expression")
  62637. }
  62638. }
  62639. });
  62640. (0, _utils.default)("ExportNamedDeclaration", {
  62641. visitor: ["declaration", "specifiers", "source"],
  62642. aliases: ["Statement", "Declaration", "ModuleDeclaration", "ExportDeclaration"],
  62643. fields: {
  62644. declaration: {
  62645. optional: true,
  62646. validate: (0, _utils.chain)((0, _utils.assertNodeType)("Declaration"), Object.assign(function(node, key, val) {
  62647. if (!process.env.BABEL_TYPES_8_BREAKING)
  62648. return;
  62649. if (val && node.specifiers.length) {
  62650. throw new TypeError("Only declaration or specifiers is allowed on ExportNamedDeclaration");
  62651. }
  62652. }, {
  62653. oneOfNodeTypes: ["Declaration"]
  62654. }), function(node, key, val) {
  62655. if (!process.env.BABEL_TYPES_8_BREAKING)
  62656. return;
  62657. if (val && node.source) {
  62658. throw new TypeError("Cannot export a declaration from a source");
  62659. }
  62660. })
  62661. },
  62662. assertions: {
  62663. optional: true,
  62664. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("ImportAttribute")))
  62665. },
  62666. specifiers: {
  62667. default: [],
  62668. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)(function() {
  62669. const sourced = (0, _utils.assertNodeType)("ExportSpecifier", "ExportDefaultSpecifier", "ExportNamespaceSpecifier");
  62670. const sourceless = (0, _utils.assertNodeType)("ExportSpecifier");
  62671. if (!process.env.BABEL_TYPES_8_BREAKING)
  62672. return sourced;
  62673. return function(node, key, val) {
  62674. const validator = node.source ? sourced : sourceless;
  62675. validator(node, key, val);
  62676. };
  62677. }()))
  62678. },
  62679. source: {
  62680. validate: (0, _utils.assertNodeType)("StringLiteral"),
  62681. optional: true
  62682. },
  62683. exportKind: (0, _utils.validateOptional)((0, _utils.assertOneOf)("type", "value"))
  62684. }
  62685. });
  62686. (0, _utils.default)("ExportSpecifier", {
  62687. visitor: ["local", "exported"],
  62688. aliases: ["ModuleSpecifier"],
  62689. fields: {
  62690. local: {
  62691. validate: (0, _utils.assertNodeType)("Identifier")
  62692. },
  62693. exported: {
  62694. validate: (0, _utils.assertNodeType)("Identifier", "StringLiteral")
  62695. }
  62696. }
  62697. });
  62698. (0, _utils.default)("ForOfStatement", {
  62699. visitor: ["left", "right", "body"],
  62700. builder: ["left", "right", "body", "await"],
  62701. aliases: ["Scopable", "Statement", "For", "BlockParent", "Loop", "ForXStatement"],
  62702. fields: {
  62703. left: {
  62704. validate: function() {
  62705. if (!process.env.BABEL_TYPES_8_BREAKING) {
  62706. return (0, _utils.assertNodeType)("VariableDeclaration", "LVal");
  62707. }
  62708. const declaration = (0, _utils.assertNodeType)("VariableDeclaration");
  62709. const lval = (0, _utils.assertNodeType)("Identifier", "MemberExpression", "ArrayPattern", "ObjectPattern");
  62710. return function(node, key, val) {
  62711. if ((0, _is.default)("VariableDeclaration", val)) {
  62712. declaration(node, key, val);
  62713. } else {
  62714. lval(node, key, val);
  62715. }
  62716. };
  62717. }()
  62718. },
  62719. right: {
  62720. validate: (0, _utils.assertNodeType)("Expression")
  62721. },
  62722. body: {
  62723. validate: (0, _utils.assertNodeType)("Statement")
  62724. },
  62725. await: {
  62726. default: false
  62727. }
  62728. }
  62729. });
  62730. (0, _utils.default)("ImportDeclaration", {
  62731. visitor: ["specifiers", "source"],
  62732. aliases: ["Statement", "Declaration", "ModuleDeclaration"],
  62733. fields: {
  62734. assertions: {
  62735. optional: true,
  62736. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("ImportAttribute")))
  62737. },
  62738. specifiers: {
  62739. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("ImportSpecifier", "ImportDefaultSpecifier", "ImportNamespaceSpecifier")))
  62740. },
  62741. source: {
  62742. validate: (0, _utils.assertNodeType)("StringLiteral")
  62743. },
  62744. importKind: {
  62745. validate: (0, _utils.assertOneOf)("type", "typeof", "value"),
  62746. optional: true
  62747. }
  62748. }
  62749. });
  62750. (0, _utils.default)("ImportDefaultSpecifier", {
  62751. visitor: ["local"],
  62752. aliases: ["ModuleSpecifier"],
  62753. fields: {
  62754. local: {
  62755. validate: (0, _utils.assertNodeType)("Identifier")
  62756. }
  62757. }
  62758. });
  62759. (0, _utils.default)("ImportNamespaceSpecifier", {
  62760. visitor: ["local"],
  62761. aliases: ["ModuleSpecifier"],
  62762. fields: {
  62763. local: {
  62764. validate: (0, _utils.assertNodeType)("Identifier")
  62765. }
  62766. }
  62767. });
  62768. (0, _utils.default)("ImportSpecifier", {
  62769. visitor: ["local", "imported"],
  62770. aliases: ["ModuleSpecifier"],
  62771. fields: {
  62772. local: {
  62773. validate: (0, _utils.assertNodeType)("Identifier")
  62774. },
  62775. imported: {
  62776. validate: (0, _utils.assertNodeType)("Identifier", "StringLiteral")
  62777. },
  62778. importKind: {
  62779. validate: (0, _utils.assertOneOf)("type", "typeof"),
  62780. optional: true
  62781. }
  62782. }
  62783. });
  62784. (0, _utils.default)("MetaProperty", {
  62785. visitor: ["meta", "property"],
  62786. aliases: ["Expression"],
  62787. fields: {
  62788. meta: {
  62789. validate: (0, _utils.chain)((0, _utils.assertNodeType)("Identifier"), Object.assign(function(node, key, val) {
  62790. if (!process.env.BABEL_TYPES_8_BREAKING)
  62791. return;
  62792. let property;
  62793. switch (val.name) {
  62794. case "function":
  62795. property = "sent";
  62796. break;
  62797. case "new":
  62798. property = "target";
  62799. break;
  62800. case "import":
  62801. property = "meta";
  62802. break;
  62803. }
  62804. if (!(0, _is.default)("Identifier", node.property, {
  62805. name: property
  62806. })) {
  62807. throw new TypeError("Unrecognised MetaProperty");
  62808. }
  62809. }, {
  62810. oneOfNodeTypes: ["Identifier"]
  62811. }))
  62812. },
  62813. property: {
  62814. validate: (0, _utils.assertNodeType)("Identifier")
  62815. }
  62816. }
  62817. });
  62818. var classMethodOrPropertyCommon = {
  62819. abstract: {
  62820. validate: (0, _utils.assertValueType)("boolean"),
  62821. optional: true
  62822. },
  62823. accessibility: {
  62824. validate: (0, _utils.assertOneOf)("public", "private", "protected"),
  62825. optional: true
  62826. },
  62827. static: {
  62828. default: false
  62829. },
  62830. override: {
  62831. default: false
  62832. },
  62833. computed: {
  62834. default: false
  62835. },
  62836. optional: {
  62837. validate: (0, _utils.assertValueType)("boolean"),
  62838. optional: true
  62839. },
  62840. key: {
  62841. validate: (0, _utils.chain)(function() {
  62842. const normal = (0, _utils.assertNodeType)("Identifier", "StringLiteral", "NumericLiteral");
  62843. const computed = (0, _utils.assertNodeType)("Expression");
  62844. return function(node, key, val) {
  62845. const validator = node.computed ? computed : normal;
  62846. validator(node, key, val);
  62847. };
  62848. }(), (0, _utils.assertNodeType)("Identifier", "StringLiteral", "NumericLiteral", "Expression"))
  62849. }
  62850. };
  62851. exports.classMethodOrPropertyCommon = classMethodOrPropertyCommon;
  62852. var classMethodOrDeclareMethodCommon = Object.assign({}, functionCommon, classMethodOrPropertyCommon, {
  62853. params: {
  62854. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Identifier", "Pattern", "RestElement", "TSParameterProperty")))
  62855. },
  62856. kind: {
  62857. validate: (0, _utils.assertOneOf)("get", "set", "method", "constructor"),
  62858. default: "method"
  62859. },
  62860. access: {
  62861. validate: (0, _utils.chain)((0, _utils.assertValueType)("string"), (0, _utils.assertOneOf)("public", "private", "protected")),
  62862. optional: true
  62863. },
  62864. decorators: {
  62865. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Decorator"))),
  62866. optional: true
  62867. }
  62868. });
  62869. exports.classMethodOrDeclareMethodCommon = classMethodOrDeclareMethodCommon;
  62870. (0, _utils.default)("ClassMethod", {
  62871. aliases: ["Function", "Scopable", "BlockParent", "FunctionParent", "Method"],
  62872. builder: ["kind", "key", "params", "body", "computed", "static", "generator", "async"],
  62873. visitor: ["key", "params", "body", "decorators", "returnType", "typeParameters"],
  62874. fields: Object.assign({}, classMethodOrDeclareMethodCommon, functionTypeAnnotationCommon, {
  62875. body: {
  62876. validate: (0, _utils.assertNodeType)("BlockStatement")
  62877. }
  62878. })
  62879. });
  62880. (0, _utils.default)("ObjectPattern", {
  62881. visitor: ["properties", "typeAnnotation", "decorators"],
  62882. builder: ["properties"],
  62883. aliases: ["Pattern", "PatternLike", "LVal"],
  62884. fields: Object.assign({}, patternLikeCommon, {
  62885. properties: {
  62886. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("RestElement", "ObjectProperty")))
  62887. }
  62888. })
  62889. });
  62890. (0, _utils.default)("SpreadElement", {
  62891. visitor: ["argument"],
  62892. aliases: ["UnaryLike"],
  62893. deprecatedAlias: "SpreadProperty",
  62894. fields: {
  62895. argument: {
  62896. validate: (0, _utils.assertNodeType)("Expression")
  62897. }
  62898. }
  62899. });
  62900. (0, _utils.default)("Super", {
  62901. aliases: ["Expression"]
  62902. });
  62903. (0, _utils.default)("TaggedTemplateExpression", {
  62904. visitor: ["tag", "quasi"],
  62905. aliases: ["Expression"],
  62906. fields: {
  62907. tag: {
  62908. validate: (0, _utils.assertNodeType)("Expression")
  62909. },
  62910. quasi: {
  62911. validate: (0, _utils.assertNodeType)("TemplateLiteral")
  62912. },
  62913. typeParameters: {
  62914. validate: (0, _utils.assertNodeType)("TypeParameterInstantiation", "TSTypeParameterInstantiation"),
  62915. optional: true
  62916. }
  62917. }
  62918. });
  62919. (0, _utils.default)("TemplateElement", {
  62920. builder: ["value", "tail"],
  62921. fields: {
  62922. value: {
  62923. validate: (0, _utils.assertShape)({
  62924. raw: {
  62925. validate: (0, _utils.assertValueType)("string")
  62926. },
  62927. cooked: {
  62928. validate: (0, _utils.assertValueType)("string"),
  62929. optional: true
  62930. }
  62931. })
  62932. },
  62933. tail: {
  62934. default: false
  62935. }
  62936. }
  62937. });
  62938. (0, _utils.default)("TemplateLiteral", {
  62939. visitor: ["quasis", "expressions"],
  62940. aliases: ["Expression", "Literal"],
  62941. fields: {
  62942. quasis: {
  62943. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("TemplateElement")))
  62944. },
  62945. expressions: {
  62946. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Expression", "TSType")), function(node, key, val) {
  62947. if (node.quasis.length !== val.length + 1) {
  62948. throw new TypeError(`Number of ${node.type} quasis should be exactly one more than the number of expressions.
  62949. Expected ${val.length + 1} quasis but got ${node.quasis.length}`);
  62950. }
  62951. })
  62952. }
  62953. }
  62954. });
  62955. (0, _utils.default)("YieldExpression", {
  62956. builder: ["argument", "delegate"],
  62957. visitor: ["argument"],
  62958. aliases: ["Expression", "Terminatorless"],
  62959. fields: {
  62960. delegate: {
  62961. validate: (0, _utils.chain)((0, _utils.assertValueType)("boolean"), Object.assign(function(node, key, val) {
  62962. if (!process.env.BABEL_TYPES_8_BREAKING)
  62963. return;
  62964. if (val && !node.argument) {
  62965. throw new TypeError("Property delegate of YieldExpression cannot be true if there is no argument");
  62966. }
  62967. }, {
  62968. type: "boolean"
  62969. })),
  62970. default: false
  62971. },
  62972. argument: {
  62973. optional: true,
  62974. validate: (0, _utils.assertNodeType)("Expression")
  62975. }
  62976. }
  62977. });
  62978. (0, _utils.default)("AwaitExpression", {
  62979. builder: ["argument"],
  62980. visitor: ["argument"],
  62981. aliases: ["Expression", "Terminatorless"],
  62982. fields: {
  62983. argument: {
  62984. validate: (0, _utils.assertNodeType)("Expression")
  62985. }
  62986. }
  62987. });
  62988. (0, _utils.default)("Import", {
  62989. aliases: ["Expression"]
  62990. });
  62991. (0, _utils.default)("BigIntLiteral", {
  62992. builder: ["value"],
  62993. fields: {
  62994. value: {
  62995. validate: (0, _utils.assertValueType)("string")
  62996. }
  62997. },
  62998. aliases: ["Expression", "Pureish", "Literal", "Immutable"]
  62999. });
  63000. (0, _utils.default)("ExportNamespaceSpecifier", {
  63001. visitor: ["exported"],
  63002. aliases: ["ModuleSpecifier"],
  63003. fields: {
  63004. exported: {
  63005. validate: (0, _utils.assertNodeType)("Identifier")
  63006. }
  63007. }
  63008. });
  63009. (0, _utils.default)("OptionalMemberExpression", {
  63010. builder: ["object", "property", "computed", "optional"],
  63011. visitor: ["object", "property"],
  63012. aliases: ["Expression"],
  63013. fields: {
  63014. object: {
  63015. validate: (0, _utils.assertNodeType)("Expression")
  63016. },
  63017. property: {
  63018. validate: function() {
  63019. const normal = (0, _utils.assertNodeType)("Identifier");
  63020. const computed = (0, _utils.assertNodeType)("Expression");
  63021. const validator = function(node, key, val) {
  63022. const validator2 = node.computed ? computed : normal;
  63023. validator2(node, key, val);
  63024. };
  63025. validator.oneOfNodeTypes = ["Expression", "Identifier"];
  63026. return validator;
  63027. }()
  63028. },
  63029. computed: {
  63030. default: false
  63031. },
  63032. optional: {
  63033. validate: !process.env.BABEL_TYPES_8_BREAKING ? (0, _utils.assertValueType)("boolean") : (0, _utils.chain)((0, _utils.assertValueType)("boolean"), (0, _utils.assertOptionalChainStart)())
  63034. }
  63035. }
  63036. });
  63037. (0, _utils.default)("OptionalCallExpression", {
  63038. visitor: ["callee", "arguments", "typeParameters", "typeArguments"],
  63039. builder: ["callee", "arguments", "optional"],
  63040. aliases: ["Expression"],
  63041. fields: {
  63042. callee: {
  63043. validate: (0, _utils.assertNodeType)("Expression")
  63044. },
  63045. arguments: {
  63046. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Expression", "SpreadElement", "JSXNamespacedName", "ArgumentPlaceholder")))
  63047. },
  63048. optional: {
  63049. validate: !process.env.BABEL_TYPES_8_BREAKING ? (0, _utils.assertValueType)("boolean") : (0, _utils.chain)((0, _utils.assertValueType)("boolean"), (0, _utils.assertOptionalChainStart)())
  63050. },
  63051. typeArguments: {
  63052. validate: (0, _utils.assertNodeType)("TypeParameterInstantiation"),
  63053. optional: true
  63054. },
  63055. typeParameters: {
  63056. validate: (0, _utils.assertNodeType)("TSTypeParameterInstantiation"),
  63057. optional: true
  63058. }
  63059. }
  63060. });
  63061. }
  63062. });
  63063. // node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/definitions/flow.js
  63064. var require_flow4 = __commonJS({
  63065. "node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/definitions/flow.js"() {
  63066. "use strict";
  63067. var _utils = require_utils3();
  63068. var defineInterfaceishType = (name2, typeParameterType = "TypeParameterDeclaration") => {
  63069. (0, _utils.default)(name2, {
  63070. builder: ["id", "typeParameters", "extends", "body"],
  63071. visitor: ["id", "typeParameters", "extends", "mixins", "implements", "body"],
  63072. aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"],
  63073. fields: {
  63074. id: (0, _utils.validateType)("Identifier"),
  63075. typeParameters: (0, _utils.validateOptionalType)(typeParameterType),
  63076. extends: (0, _utils.validateOptional)((0, _utils.arrayOfType)("InterfaceExtends")),
  63077. mixins: (0, _utils.validateOptional)((0, _utils.arrayOfType)("InterfaceExtends")),
  63078. implements: (0, _utils.validateOptional)((0, _utils.arrayOfType)("ClassImplements")),
  63079. body: (0, _utils.validateType)("ObjectTypeAnnotation")
  63080. }
  63081. });
  63082. };
  63083. (0, _utils.default)("AnyTypeAnnotation", {
  63084. aliases: ["Flow", "FlowType", "FlowBaseAnnotation"]
  63085. });
  63086. (0, _utils.default)("ArrayTypeAnnotation", {
  63087. visitor: ["elementType"],
  63088. aliases: ["Flow", "FlowType"],
  63089. fields: {
  63090. elementType: (0, _utils.validateType)("FlowType")
  63091. }
  63092. });
  63093. (0, _utils.default)("BooleanTypeAnnotation", {
  63094. aliases: ["Flow", "FlowType", "FlowBaseAnnotation"]
  63095. });
  63096. (0, _utils.default)("BooleanLiteralTypeAnnotation", {
  63097. builder: ["value"],
  63098. aliases: ["Flow", "FlowType"],
  63099. fields: {
  63100. value: (0, _utils.validate)((0, _utils.assertValueType)("boolean"))
  63101. }
  63102. });
  63103. (0, _utils.default)("NullLiteralTypeAnnotation", {
  63104. aliases: ["Flow", "FlowType", "FlowBaseAnnotation"]
  63105. });
  63106. (0, _utils.default)("ClassImplements", {
  63107. visitor: ["id", "typeParameters"],
  63108. aliases: ["Flow"],
  63109. fields: {
  63110. id: (0, _utils.validateType)("Identifier"),
  63111. typeParameters: (0, _utils.validateOptionalType)("TypeParameterInstantiation")
  63112. }
  63113. });
  63114. defineInterfaceishType("DeclareClass");
  63115. (0, _utils.default)("DeclareFunction", {
  63116. visitor: ["id"],
  63117. aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"],
  63118. fields: {
  63119. id: (0, _utils.validateType)("Identifier"),
  63120. predicate: (0, _utils.validateOptionalType)("DeclaredPredicate")
  63121. }
  63122. });
  63123. defineInterfaceishType("DeclareInterface");
  63124. (0, _utils.default)("DeclareModule", {
  63125. builder: ["id", "body", "kind"],
  63126. visitor: ["id", "body"],
  63127. aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"],
  63128. fields: {
  63129. id: (0, _utils.validateType)(["Identifier", "StringLiteral"]),
  63130. body: (0, _utils.validateType)("BlockStatement"),
  63131. kind: (0, _utils.validateOptional)((0, _utils.assertOneOf)("CommonJS", "ES"))
  63132. }
  63133. });
  63134. (0, _utils.default)("DeclareModuleExports", {
  63135. visitor: ["typeAnnotation"],
  63136. aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"],
  63137. fields: {
  63138. typeAnnotation: (0, _utils.validateType)("TypeAnnotation")
  63139. }
  63140. });
  63141. (0, _utils.default)("DeclareTypeAlias", {
  63142. visitor: ["id", "typeParameters", "right"],
  63143. aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"],
  63144. fields: {
  63145. id: (0, _utils.validateType)("Identifier"),
  63146. typeParameters: (0, _utils.validateOptionalType)("TypeParameterDeclaration"),
  63147. right: (0, _utils.validateType)("FlowType")
  63148. }
  63149. });
  63150. (0, _utils.default)("DeclareOpaqueType", {
  63151. visitor: ["id", "typeParameters", "supertype"],
  63152. aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"],
  63153. fields: {
  63154. id: (0, _utils.validateType)("Identifier"),
  63155. typeParameters: (0, _utils.validateOptionalType)("TypeParameterDeclaration"),
  63156. supertype: (0, _utils.validateOptionalType)("FlowType")
  63157. }
  63158. });
  63159. (0, _utils.default)("DeclareVariable", {
  63160. visitor: ["id"],
  63161. aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"],
  63162. fields: {
  63163. id: (0, _utils.validateType)("Identifier")
  63164. }
  63165. });
  63166. (0, _utils.default)("DeclareExportDeclaration", {
  63167. visitor: ["declaration", "specifiers", "source"],
  63168. aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"],
  63169. fields: {
  63170. declaration: (0, _utils.validateOptionalType)("Flow"),
  63171. specifiers: (0, _utils.validateOptional)((0, _utils.arrayOfType)(["ExportSpecifier", "ExportNamespaceSpecifier"])),
  63172. source: (0, _utils.validateOptionalType)("StringLiteral"),
  63173. default: (0, _utils.validateOptional)((0, _utils.assertValueType)("boolean"))
  63174. }
  63175. });
  63176. (0, _utils.default)("DeclareExportAllDeclaration", {
  63177. visitor: ["source"],
  63178. aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"],
  63179. fields: {
  63180. source: (0, _utils.validateType)("StringLiteral"),
  63181. exportKind: (0, _utils.validateOptional)((0, _utils.assertOneOf)("type", "value"))
  63182. }
  63183. });
  63184. (0, _utils.default)("DeclaredPredicate", {
  63185. visitor: ["value"],
  63186. aliases: ["Flow", "FlowPredicate"],
  63187. fields: {
  63188. value: (0, _utils.validateType)("Flow")
  63189. }
  63190. });
  63191. (0, _utils.default)("ExistsTypeAnnotation", {
  63192. aliases: ["Flow", "FlowType"]
  63193. });
  63194. (0, _utils.default)("FunctionTypeAnnotation", {
  63195. visitor: ["typeParameters", "params", "rest", "returnType"],
  63196. aliases: ["Flow", "FlowType"],
  63197. fields: {
  63198. typeParameters: (0, _utils.validateOptionalType)("TypeParameterDeclaration"),
  63199. params: (0, _utils.validate)((0, _utils.arrayOfType)("FunctionTypeParam")),
  63200. rest: (0, _utils.validateOptionalType)("FunctionTypeParam"),
  63201. this: (0, _utils.validateOptionalType)("FunctionTypeParam"),
  63202. returnType: (0, _utils.validateType)("FlowType")
  63203. }
  63204. });
  63205. (0, _utils.default)("FunctionTypeParam", {
  63206. visitor: ["name", "typeAnnotation"],
  63207. aliases: ["Flow"],
  63208. fields: {
  63209. name: (0, _utils.validateOptionalType)("Identifier"),
  63210. typeAnnotation: (0, _utils.validateType)("FlowType"),
  63211. optional: (0, _utils.validateOptional)((0, _utils.assertValueType)("boolean"))
  63212. }
  63213. });
  63214. (0, _utils.default)("GenericTypeAnnotation", {
  63215. visitor: ["id", "typeParameters"],
  63216. aliases: ["Flow", "FlowType"],
  63217. fields: {
  63218. id: (0, _utils.validateType)(["Identifier", "QualifiedTypeIdentifier"]),
  63219. typeParameters: (0, _utils.validateOptionalType)("TypeParameterInstantiation")
  63220. }
  63221. });
  63222. (0, _utils.default)("InferredPredicate", {
  63223. aliases: ["Flow", "FlowPredicate"]
  63224. });
  63225. (0, _utils.default)("InterfaceExtends", {
  63226. visitor: ["id", "typeParameters"],
  63227. aliases: ["Flow"],
  63228. fields: {
  63229. id: (0, _utils.validateType)(["Identifier", "QualifiedTypeIdentifier"]),
  63230. typeParameters: (0, _utils.validateOptionalType)("TypeParameterInstantiation")
  63231. }
  63232. });
  63233. defineInterfaceishType("InterfaceDeclaration");
  63234. (0, _utils.default)("InterfaceTypeAnnotation", {
  63235. visitor: ["extends", "body"],
  63236. aliases: ["Flow", "FlowType"],
  63237. fields: {
  63238. extends: (0, _utils.validateOptional)((0, _utils.arrayOfType)("InterfaceExtends")),
  63239. body: (0, _utils.validateType)("ObjectTypeAnnotation")
  63240. }
  63241. });
  63242. (0, _utils.default)("IntersectionTypeAnnotation", {
  63243. visitor: ["types"],
  63244. aliases: ["Flow", "FlowType"],
  63245. fields: {
  63246. types: (0, _utils.validate)((0, _utils.arrayOfType)("FlowType"))
  63247. }
  63248. });
  63249. (0, _utils.default)("MixedTypeAnnotation", {
  63250. aliases: ["Flow", "FlowType", "FlowBaseAnnotation"]
  63251. });
  63252. (0, _utils.default)("EmptyTypeAnnotation", {
  63253. aliases: ["Flow", "FlowType", "FlowBaseAnnotation"]
  63254. });
  63255. (0, _utils.default)("NullableTypeAnnotation", {
  63256. visitor: ["typeAnnotation"],
  63257. aliases: ["Flow", "FlowType"],
  63258. fields: {
  63259. typeAnnotation: (0, _utils.validateType)("FlowType")
  63260. }
  63261. });
  63262. (0, _utils.default)("NumberLiteralTypeAnnotation", {
  63263. builder: ["value"],
  63264. aliases: ["Flow", "FlowType"],
  63265. fields: {
  63266. value: (0, _utils.validate)((0, _utils.assertValueType)("number"))
  63267. }
  63268. });
  63269. (0, _utils.default)("NumberTypeAnnotation", {
  63270. aliases: ["Flow", "FlowType", "FlowBaseAnnotation"]
  63271. });
  63272. (0, _utils.default)("ObjectTypeAnnotation", {
  63273. visitor: ["properties", "indexers", "callProperties", "internalSlots"],
  63274. aliases: ["Flow", "FlowType"],
  63275. builder: ["properties", "indexers", "callProperties", "internalSlots", "exact"],
  63276. fields: {
  63277. properties: (0, _utils.validate)((0, _utils.arrayOfType)(["ObjectTypeProperty", "ObjectTypeSpreadProperty"])),
  63278. indexers: (0, _utils.validateOptional)((0, _utils.arrayOfType)("ObjectTypeIndexer")),
  63279. callProperties: (0, _utils.validateOptional)((0, _utils.arrayOfType)("ObjectTypeCallProperty")),
  63280. internalSlots: (0, _utils.validateOptional)((0, _utils.arrayOfType)("ObjectTypeInternalSlot")),
  63281. exact: {
  63282. validate: (0, _utils.assertValueType)("boolean"),
  63283. default: false
  63284. },
  63285. inexact: (0, _utils.validateOptional)((0, _utils.assertValueType)("boolean"))
  63286. }
  63287. });
  63288. (0, _utils.default)("ObjectTypeInternalSlot", {
  63289. visitor: ["id", "value", "optional", "static", "method"],
  63290. aliases: ["Flow", "UserWhitespacable"],
  63291. fields: {
  63292. id: (0, _utils.validateType)("Identifier"),
  63293. value: (0, _utils.validateType)("FlowType"),
  63294. optional: (0, _utils.validate)((0, _utils.assertValueType)("boolean")),
  63295. static: (0, _utils.validate)((0, _utils.assertValueType)("boolean")),
  63296. method: (0, _utils.validate)((0, _utils.assertValueType)("boolean"))
  63297. }
  63298. });
  63299. (0, _utils.default)("ObjectTypeCallProperty", {
  63300. visitor: ["value"],
  63301. aliases: ["Flow", "UserWhitespacable"],
  63302. fields: {
  63303. value: (0, _utils.validateType)("FlowType"),
  63304. static: (0, _utils.validate)((0, _utils.assertValueType)("boolean"))
  63305. }
  63306. });
  63307. (0, _utils.default)("ObjectTypeIndexer", {
  63308. visitor: ["id", "key", "value", "variance"],
  63309. aliases: ["Flow", "UserWhitespacable"],
  63310. fields: {
  63311. id: (0, _utils.validateOptionalType)("Identifier"),
  63312. key: (0, _utils.validateType)("FlowType"),
  63313. value: (0, _utils.validateType)("FlowType"),
  63314. static: (0, _utils.validate)((0, _utils.assertValueType)("boolean")),
  63315. variance: (0, _utils.validateOptionalType)("Variance")
  63316. }
  63317. });
  63318. (0, _utils.default)("ObjectTypeProperty", {
  63319. visitor: ["key", "value", "variance"],
  63320. aliases: ["Flow", "UserWhitespacable"],
  63321. fields: {
  63322. key: (0, _utils.validateType)(["Identifier", "StringLiteral"]),
  63323. value: (0, _utils.validateType)("FlowType"),
  63324. kind: (0, _utils.validate)((0, _utils.assertOneOf)("init", "get", "set")),
  63325. static: (0, _utils.validate)((0, _utils.assertValueType)("boolean")),
  63326. proto: (0, _utils.validate)((0, _utils.assertValueType)("boolean")),
  63327. optional: (0, _utils.validate)((0, _utils.assertValueType)("boolean")),
  63328. variance: (0, _utils.validateOptionalType)("Variance"),
  63329. method: (0, _utils.validate)((0, _utils.assertValueType)("boolean"))
  63330. }
  63331. });
  63332. (0, _utils.default)("ObjectTypeSpreadProperty", {
  63333. visitor: ["argument"],
  63334. aliases: ["Flow", "UserWhitespacable"],
  63335. fields: {
  63336. argument: (0, _utils.validateType)("FlowType")
  63337. }
  63338. });
  63339. (0, _utils.default)("OpaqueType", {
  63340. visitor: ["id", "typeParameters", "supertype", "impltype"],
  63341. aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"],
  63342. fields: {
  63343. id: (0, _utils.validateType)("Identifier"),
  63344. typeParameters: (0, _utils.validateOptionalType)("TypeParameterDeclaration"),
  63345. supertype: (0, _utils.validateOptionalType)("FlowType"),
  63346. impltype: (0, _utils.validateType)("FlowType")
  63347. }
  63348. });
  63349. (0, _utils.default)("QualifiedTypeIdentifier", {
  63350. visitor: ["id", "qualification"],
  63351. aliases: ["Flow"],
  63352. fields: {
  63353. id: (0, _utils.validateType)("Identifier"),
  63354. qualification: (0, _utils.validateType)(["Identifier", "QualifiedTypeIdentifier"])
  63355. }
  63356. });
  63357. (0, _utils.default)("StringLiteralTypeAnnotation", {
  63358. builder: ["value"],
  63359. aliases: ["Flow", "FlowType"],
  63360. fields: {
  63361. value: (0, _utils.validate)((0, _utils.assertValueType)("string"))
  63362. }
  63363. });
  63364. (0, _utils.default)("StringTypeAnnotation", {
  63365. aliases: ["Flow", "FlowType", "FlowBaseAnnotation"]
  63366. });
  63367. (0, _utils.default)("SymbolTypeAnnotation", {
  63368. aliases: ["Flow", "FlowType", "FlowBaseAnnotation"]
  63369. });
  63370. (0, _utils.default)("ThisTypeAnnotation", {
  63371. aliases: ["Flow", "FlowType", "FlowBaseAnnotation"]
  63372. });
  63373. (0, _utils.default)("TupleTypeAnnotation", {
  63374. visitor: ["types"],
  63375. aliases: ["Flow", "FlowType"],
  63376. fields: {
  63377. types: (0, _utils.validate)((0, _utils.arrayOfType)("FlowType"))
  63378. }
  63379. });
  63380. (0, _utils.default)("TypeofTypeAnnotation", {
  63381. visitor: ["argument"],
  63382. aliases: ["Flow", "FlowType"],
  63383. fields: {
  63384. argument: (0, _utils.validateType)("FlowType")
  63385. }
  63386. });
  63387. (0, _utils.default)("TypeAlias", {
  63388. visitor: ["id", "typeParameters", "right"],
  63389. aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"],
  63390. fields: {
  63391. id: (0, _utils.validateType)("Identifier"),
  63392. typeParameters: (0, _utils.validateOptionalType)("TypeParameterDeclaration"),
  63393. right: (0, _utils.validateType)("FlowType")
  63394. }
  63395. });
  63396. (0, _utils.default)("TypeAnnotation", {
  63397. aliases: ["Flow"],
  63398. visitor: ["typeAnnotation"],
  63399. fields: {
  63400. typeAnnotation: (0, _utils.validateType)("FlowType")
  63401. }
  63402. });
  63403. (0, _utils.default)("TypeCastExpression", {
  63404. visitor: ["expression", "typeAnnotation"],
  63405. aliases: ["Flow", "ExpressionWrapper", "Expression"],
  63406. fields: {
  63407. expression: (0, _utils.validateType)("Expression"),
  63408. typeAnnotation: (0, _utils.validateType)("TypeAnnotation")
  63409. }
  63410. });
  63411. (0, _utils.default)("TypeParameter", {
  63412. aliases: ["Flow"],
  63413. visitor: ["bound", "default", "variance"],
  63414. fields: {
  63415. name: (0, _utils.validate)((0, _utils.assertValueType)("string")),
  63416. bound: (0, _utils.validateOptionalType)("TypeAnnotation"),
  63417. default: (0, _utils.validateOptionalType)("FlowType"),
  63418. variance: (0, _utils.validateOptionalType)("Variance")
  63419. }
  63420. });
  63421. (0, _utils.default)("TypeParameterDeclaration", {
  63422. aliases: ["Flow"],
  63423. visitor: ["params"],
  63424. fields: {
  63425. params: (0, _utils.validate)((0, _utils.arrayOfType)("TypeParameter"))
  63426. }
  63427. });
  63428. (0, _utils.default)("TypeParameterInstantiation", {
  63429. aliases: ["Flow"],
  63430. visitor: ["params"],
  63431. fields: {
  63432. params: (0, _utils.validate)((0, _utils.arrayOfType)("FlowType"))
  63433. }
  63434. });
  63435. (0, _utils.default)("UnionTypeAnnotation", {
  63436. visitor: ["types"],
  63437. aliases: ["Flow", "FlowType"],
  63438. fields: {
  63439. types: (0, _utils.validate)((0, _utils.arrayOfType)("FlowType"))
  63440. }
  63441. });
  63442. (0, _utils.default)("Variance", {
  63443. aliases: ["Flow"],
  63444. builder: ["kind"],
  63445. fields: {
  63446. kind: (0, _utils.validate)((0, _utils.assertOneOf)("minus", "plus"))
  63447. }
  63448. });
  63449. (0, _utils.default)("VoidTypeAnnotation", {
  63450. aliases: ["Flow", "FlowType", "FlowBaseAnnotation"]
  63451. });
  63452. (0, _utils.default)("EnumDeclaration", {
  63453. aliases: ["Statement", "Declaration"],
  63454. visitor: ["id", "body"],
  63455. fields: {
  63456. id: (0, _utils.validateType)("Identifier"),
  63457. body: (0, _utils.validateType)(["EnumBooleanBody", "EnumNumberBody", "EnumStringBody", "EnumSymbolBody"])
  63458. }
  63459. });
  63460. (0, _utils.default)("EnumBooleanBody", {
  63461. aliases: ["EnumBody"],
  63462. visitor: ["members"],
  63463. fields: {
  63464. explicitType: (0, _utils.validate)((0, _utils.assertValueType)("boolean")),
  63465. members: (0, _utils.validateArrayOfType)("EnumBooleanMember"),
  63466. hasUnknownMembers: (0, _utils.validate)((0, _utils.assertValueType)("boolean"))
  63467. }
  63468. });
  63469. (0, _utils.default)("EnumNumberBody", {
  63470. aliases: ["EnumBody"],
  63471. visitor: ["members"],
  63472. fields: {
  63473. explicitType: (0, _utils.validate)((0, _utils.assertValueType)("boolean")),
  63474. members: (0, _utils.validateArrayOfType)("EnumNumberMember"),
  63475. hasUnknownMembers: (0, _utils.validate)((0, _utils.assertValueType)("boolean"))
  63476. }
  63477. });
  63478. (0, _utils.default)("EnumStringBody", {
  63479. aliases: ["EnumBody"],
  63480. visitor: ["members"],
  63481. fields: {
  63482. explicitType: (0, _utils.validate)((0, _utils.assertValueType)("boolean")),
  63483. members: (0, _utils.validateArrayOfType)(["EnumStringMember", "EnumDefaultedMember"]),
  63484. hasUnknownMembers: (0, _utils.validate)((0, _utils.assertValueType)("boolean"))
  63485. }
  63486. });
  63487. (0, _utils.default)("EnumSymbolBody", {
  63488. aliases: ["EnumBody"],
  63489. visitor: ["members"],
  63490. fields: {
  63491. members: (0, _utils.validateArrayOfType)("EnumDefaultedMember"),
  63492. hasUnknownMembers: (0, _utils.validate)((0, _utils.assertValueType)("boolean"))
  63493. }
  63494. });
  63495. (0, _utils.default)("EnumBooleanMember", {
  63496. aliases: ["EnumMember"],
  63497. visitor: ["id"],
  63498. fields: {
  63499. id: (0, _utils.validateType)("Identifier"),
  63500. init: (0, _utils.validateType)("BooleanLiteral")
  63501. }
  63502. });
  63503. (0, _utils.default)("EnumNumberMember", {
  63504. aliases: ["EnumMember"],
  63505. visitor: ["id", "init"],
  63506. fields: {
  63507. id: (0, _utils.validateType)("Identifier"),
  63508. init: (0, _utils.validateType)("NumericLiteral")
  63509. }
  63510. });
  63511. (0, _utils.default)("EnumStringMember", {
  63512. aliases: ["EnumMember"],
  63513. visitor: ["id", "init"],
  63514. fields: {
  63515. id: (0, _utils.validateType)("Identifier"),
  63516. init: (0, _utils.validateType)("StringLiteral")
  63517. }
  63518. });
  63519. (0, _utils.default)("EnumDefaultedMember", {
  63520. aliases: ["EnumMember"],
  63521. visitor: ["id"],
  63522. fields: {
  63523. id: (0, _utils.validateType)("Identifier")
  63524. }
  63525. });
  63526. (0, _utils.default)("IndexedAccessType", {
  63527. visitor: ["objectType", "indexType"],
  63528. aliases: ["Flow", "FlowType"],
  63529. fields: {
  63530. objectType: (0, _utils.validateType)("FlowType"),
  63531. indexType: (0, _utils.validateType)("FlowType")
  63532. }
  63533. });
  63534. (0, _utils.default)("OptionalIndexedAccessType", {
  63535. visitor: ["objectType", "indexType"],
  63536. aliases: ["Flow", "FlowType"],
  63537. fields: {
  63538. objectType: (0, _utils.validateType)("FlowType"),
  63539. indexType: (0, _utils.validateType)("FlowType"),
  63540. optional: (0, _utils.validate)((0, _utils.assertValueType)("boolean"))
  63541. }
  63542. });
  63543. }
  63544. });
  63545. // node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/definitions/jsx.js
  63546. var require_jsx4 = __commonJS({
  63547. "node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/definitions/jsx.js"() {
  63548. "use strict";
  63549. var _utils = require_utils3();
  63550. (0, _utils.default)("JSXAttribute", {
  63551. visitor: ["name", "value"],
  63552. aliases: ["JSX", "Immutable"],
  63553. fields: {
  63554. name: {
  63555. validate: (0, _utils.assertNodeType)("JSXIdentifier", "JSXNamespacedName")
  63556. },
  63557. value: {
  63558. optional: true,
  63559. validate: (0, _utils.assertNodeType)("JSXElement", "JSXFragment", "StringLiteral", "JSXExpressionContainer")
  63560. }
  63561. }
  63562. });
  63563. (0, _utils.default)("JSXClosingElement", {
  63564. visitor: ["name"],
  63565. aliases: ["JSX", "Immutable"],
  63566. fields: {
  63567. name: {
  63568. validate: (0, _utils.assertNodeType)("JSXIdentifier", "JSXMemberExpression", "JSXNamespacedName")
  63569. }
  63570. }
  63571. });
  63572. (0, _utils.default)("JSXElement", {
  63573. builder: ["openingElement", "closingElement", "children", "selfClosing"],
  63574. visitor: ["openingElement", "children", "closingElement"],
  63575. aliases: ["JSX", "Immutable", "Expression"],
  63576. fields: {
  63577. openingElement: {
  63578. validate: (0, _utils.assertNodeType)("JSXOpeningElement")
  63579. },
  63580. closingElement: {
  63581. optional: true,
  63582. validate: (0, _utils.assertNodeType)("JSXClosingElement")
  63583. },
  63584. children: {
  63585. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("JSXText", "JSXExpressionContainer", "JSXSpreadChild", "JSXElement", "JSXFragment")))
  63586. },
  63587. selfClosing: {
  63588. validate: (0, _utils.assertValueType)("boolean"),
  63589. optional: true
  63590. }
  63591. }
  63592. });
  63593. (0, _utils.default)("JSXEmptyExpression", {
  63594. aliases: ["JSX"]
  63595. });
  63596. (0, _utils.default)("JSXExpressionContainer", {
  63597. visitor: ["expression"],
  63598. aliases: ["JSX", "Immutable"],
  63599. fields: {
  63600. expression: {
  63601. validate: (0, _utils.assertNodeType)("Expression", "JSXEmptyExpression")
  63602. }
  63603. }
  63604. });
  63605. (0, _utils.default)("JSXSpreadChild", {
  63606. visitor: ["expression"],
  63607. aliases: ["JSX", "Immutable"],
  63608. fields: {
  63609. expression: {
  63610. validate: (0, _utils.assertNodeType)("Expression")
  63611. }
  63612. }
  63613. });
  63614. (0, _utils.default)("JSXIdentifier", {
  63615. builder: ["name"],
  63616. aliases: ["JSX"],
  63617. fields: {
  63618. name: {
  63619. validate: (0, _utils.assertValueType)("string")
  63620. }
  63621. }
  63622. });
  63623. (0, _utils.default)("JSXMemberExpression", {
  63624. visitor: ["object", "property"],
  63625. aliases: ["JSX"],
  63626. fields: {
  63627. object: {
  63628. validate: (0, _utils.assertNodeType)("JSXMemberExpression", "JSXIdentifier")
  63629. },
  63630. property: {
  63631. validate: (0, _utils.assertNodeType)("JSXIdentifier")
  63632. }
  63633. }
  63634. });
  63635. (0, _utils.default)("JSXNamespacedName", {
  63636. visitor: ["namespace", "name"],
  63637. aliases: ["JSX"],
  63638. fields: {
  63639. namespace: {
  63640. validate: (0, _utils.assertNodeType)("JSXIdentifier")
  63641. },
  63642. name: {
  63643. validate: (0, _utils.assertNodeType)("JSXIdentifier")
  63644. }
  63645. }
  63646. });
  63647. (0, _utils.default)("JSXOpeningElement", {
  63648. builder: ["name", "attributes", "selfClosing"],
  63649. visitor: ["name", "attributes"],
  63650. aliases: ["JSX", "Immutable"],
  63651. fields: {
  63652. name: {
  63653. validate: (0, _utils.assertNodeType)("JSXIdentifier", "JSXMemberExpression", "JSXNamespacedName")
  63654. },
  63655. selfClosing: {
  63656. default: false
  63657. },
  63658. attributes: {
  63659. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("JSXAttribute", "JSXSpreadAttribute")))
  63660. },
  63661. typeParameters: {
  63662. validate: (0, _utils.assertNodeType)("TypeParameterInstantiation", "TSTypeParameterInstantiation"),
  63663. optional: true
  63664. }
  63665. }
  63666. });
  63667. (0, _utils.default)("JSXSpreadAttribute", {
  63668. visitor: ["argument"],
  63669. aliases: ["JSX"],
  63670. fields: {
  63671. argument: {
  63672. validate: (0, _utils.assertNodeType)("Expression")
  63673. }
  63674. }
  63675. });
  63676. (0, _utils.default)("JSXText", {
  63677. aliases: ["JSX", "Immutable"],
  63678. builder: ["value"],
  63679. fields: {
  63680. value: {
  63681. validate: (0, _utils.assertValueType)("string")
  63682. }
  63683. }
  63684. });
  63685. (0, _utils.default)("JSXFragment", {
  63686. builder: ["openingFragment", "closingFragment", "children"],
  63687. visitor: ["openingFragment", "children", "closingFragment"],
  63688. aliases: ["JSX", "Immutable", "Expression"],
  63689. fields: {
  63690. openingFragment: {
  63691. validate: (0, _utils.assertNodeType)("JSXOpeningFragment")
  63692. },
  63693. closingFragment: {
  63694. validate: (0, _utils.assertNodeType)("JSXClosingFragment")
  63695. },
  63696. children: {
  63697. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("JSXText", "JSXExpressionContainer", "JSXSpreadChild", "JSXElement", "JSXFragment")))
  63698. }
  63699. }
  63700. });
  63701. (0, _utils.default)("JSXOpeningFragment", {
  63702. aliases: ["JSX", "Immutable"]
  63703. });
  63704. (0, _utils.default)("JSXClosingFragment", {
  63705. aliases: ["JSX", "Immutable"]
  63706. });
  63707. }
  63708. });
  63709. // node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/definitions/placeholders.js
  63710. var require_placeholders3 = __commonJS({
  63711. "node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/definitions/placeholders.js"(exports) {
  63712. "use strict";
  63713. Object.defineProperty(exports, "__esModule", {
  63714. value: true
  63715. });
  63716. exports.PLACEHOLDERS_FLIPPED_ALIAS = exports.PLACEHOLDERS_ALIAS = exports.PLACEHOLDERS = void 0;
  63717. var _utils = require_utils3();
  63718. var PLACEHOLDERS = ["Identifier", "StringLiteral", "Expression", "Statement", "Declaration", "BlockStatement", "ClassBody", "Pattern"];
  63719. exports.PLACEHOLDERS = PLACEHOLDERS;
  63720. var PLACEHOLDERS_ALIAS = {
  63721. Declaration: ["Statement"],
  63722. Pattern: ["PatternLike", "LVal"]
  63723. };
  63724. exports.PLACEHOLDERS_ALIAS = PLACEHOLDERS_ALIAS;
  63725. for (const type of PLACEHOLDERS) {
  63726. const alias = _utils.ALIAS_KEYS[type];
  63727. if (alias != null && alias.length)
  63728. PLACEHOLDERS_ALIAS[type] = alias;
  63729. }
  63730. var PLACEHOLDERS_FLIPPED_ALIAS = {};
  63731. exports.PLACEHOLDERS_FLIPPED_ALIAS = PLACEHOLDERS_FLIPPED_ALIAS;
  63732. Object.keys(PLACEHOLDERS_ALIAS).forEach((type) => {
  63733. PLACEHOLDERS_ALIAS[type].forEach((alias) => {
  63734. if (!Object.hasOwnProperty.call(PLACEHOLDERS_FLIPPED_ALIAS, alias)) {
  63735. PLACEHOLDERS_FLIPPED_ALIAS[alias] = [];
  63736. }
  63737. PLACEHOLDERS_FLIPPED_ALIAS[alias].push(type);
  63738. });
  63739. });
  63740. }
  63741. });
  63742. // node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/definitions/misc.js
  63743. var require_misc3 = __commonJS({
  63744. "node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/definitions/misc.js"() {
  63745. "use strict";
  63746. var _utils = require_utils3();
  63747. var _placeholders = require_placeholders3();
  63748. {
  63749. (0, _utils.default)("Noop", {
  63750. visitor: []
  63751. });
  63752. }
  63753. (0, _utils.default)("Placeholder", {
  63754. visitor: [],
  63755. builder: ["expectedNode", "name"],
  63756. fields: {
  63757. name: {
  63758. validate: (0, _utils.assertNodeType)("Identifier")
  63759. },
  63760. expectedNode: {
  63761. validate: (0, _utils.assertOneOf)(..._placeholders.PLACEHOLDERS)
  63762. }
  63763. }
  63764. });
  63765. (0, _utils.default)("V8IntrinsicIdentifier", {
  63766. builder: ["name"],
  63767. fields: {
  63768. name: {
  63769. validate: (0, _utils.assertValueType)("string")
  63770. }
  63771. }
  63772. });
  63773. }
  63774. });
  63775. // node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/definitions/experimental.js
  63776. var require_experimental3 = __commonJS({
  63777. "node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/definitions/experimental.js"() {
  63778. "use strict";
  63779. var _utils = require_utils3();
  63780. var _core = require_core3();
  63781. (0, _utils.default)("ArgumentPlaceholder", {});
  63782. (0, _utils.default)("BindExpression", {
  63783. visitor: ["object", "callee"],
  63784. aliases: ["Expression"],
  63785. fields: !process.env.BABEL_TYPES_8_BREAKING ? {
  63786. object: {
  63787. validate: Object.assign(() => {
  63788. }, {
  63789. oneOfNodeTypes: ["Expression"]
  63790. })
  63791. },
  63792. callee: {
  63793. validate: Object.assign(() => {
  63794. }, {
  63795. oneOfNodeTypes: ["Expression"]
  63796. })
  63797. }
  63798. } : {
  63799. object: {
  63800. validate: (0, _utils.assertNodeType)("Expression")
  63801. },
  63802. callee: {
  63803. validate: (0, _utils.assertNodeType)("Expression")
  63804. }
  63805. }
  63806. });
  63807. (0, _utils.default)("ClassProperty", {
  63808. visitor: ["key", "value", "typeAnnotation", "decorators"],
  63809. builder: ["key", "value", "typeAnnotation", "decorators", "computed", "static"],
  63810. aliases: ["Property"],
  63811. fields: Object.assign({}, _core.classMethodOrPropertyCommon, {
  63812. value: {
  63813. validate: (0, _utils.assertNodeType)("Expression"),
  63814. optional: true
  63815. },
  63816. definite: {
  63817. validate: (0, _utils.assertValueType)("boolean"),
  63818. optional: true
  63819. },
  63820. typeAnnotation: {
  63821. validate: (0, _utils.assertNodeType)("TypeAnnotation", "TSTypeAnnotation", "Noop"),
  63822. optional: true
  63823. },
  63824. decorators: {
  63825. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Decorator"))),
  63826. optional: true
  63827. },
  63828. readonly: {
  63829. validate: (0, _utils.assertValueType)("boolean"),
  63830. optional: true
  63831. },
  63832. declare: {
  63833. validate: (0, _utils.assertValueType)("boolean"),
  63834. optional: true
  63835. }
  63836. })
  63837. });
  63838. (0, _utils.default)("PipelineTopicExpression", {
  63839. builder: ["expression"],
  63840. visitor: ["expression"],
  63841. fields: {
  63842. expression: {
  63843. validate: (0, _utils.assertNodeType)("Expression")
  63844. }
  63845. }
  63846. });
  63847. (0, _utils.default)("PipelineBareFunction", {
  63848. builder: ["callee"],
  63849. visitor: ["callee"],
  63850. fields: {
  63851. callee: {
  63852. validate: (0, _utils.assertNodeType)("Expression")
  63853. }
  63854. }
  63855. });
  63856. (0, _utils.default)("PipelinePrimaryTopicReference", {
  63857. aliases: ["Expression"]
  63858. });
  63859. (0, _utils.default)("ClassPrivateProperty", {
  63860. visitor: ["key", "value", "decorators"],
  63861. builder: ["key", "value", "decorators", "static"],
  63862. aliases: ["Property", "Private"],
  63863. fields: {
  63864. key: {
  63865. validate: (0, _utils.assertNodeType)("PrivateName")
  63866. },
  63867. value: {
  63868. validate: (0, _utils.assertNodeType)("Expression"),
  63869. optional: true
  63870. },
  63871. typeAnnotation: {
  63872. validate: (0, _utils.assertNodeType)("TypeAnnotation", "TSTypeAnnotation", "Noop"),
  63873. optional: true
  63874. },
  63875. decorators: {
  63876. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Decorator"))),
  63877. optional: true
  63878. }
  63879. }
  63880. });
  63881. (0, _utils.default)("ClassPrivateMethod", {
  63882. builder: ["kind", "key", "params", "body", "static"],
  63883. visitor: ["key", "params", "body", "decorators", "returnType", "typeParameters"],
  63884. aliases: ["Function", "Scopable", "BlockParent", "FunctionParent", "Method", "Private"],
  63885. fields: Object.assign({}, _core.classMethodOrDeclareMethodCommon, _core.functionTypeAnnotationCommon, {
  63886. key: {
  63887. validate: (0, _utils.assertNodeType)("PrivateName")
  63888. },
  63889. body: {
  63890. validate: (0, _utils.assertNodeType)("BlockStatement")
  63891. }
  63892. })
  63893. });
  63894. (0, _utils.default)("ImportAttribute", {
  63895. visitor: ["key", "value"],
  63896. fields: {
  63897. key: {
  63898. validate: (0, _utils.assertNodeType)("Identifier", "StringLiteral")
  63899. },
  63900. value: {
  63901. validate: (0, _utils.assertNodeType)("StringLiteral")
  63902. }
  63903. }
  63904. });
  63905. (0, _utils.default)("Decorator", {
  63906. visitor: ["expression"],
  63907. fields: {
  63908. expression: {
  63909. validate: (0, _utils.assertNodeType)("Expression")
  63910. }
  63911. }
  63912. });
  63913. (0, _utils.default)("DoExpression", {
  63914. visitor: ["body"],
  63915. builder: ["body", "async"],
  63916. aliases: ["Expression"],
  63917. fields: {
  63918. body: {
  63919. validate: (0, _utils.assertNodeType)("BlockStatement")
  63920. },
  63921. async: {
  63922. validate: (0, _utils.assertValueType)("boolean"),
  63923. default: false
  63924. }
  63925. }
  63926. });
  63927. (0, _utils.default)("ExportDefaultSpecifier", {
  63928. visitor: ["exported"],
  63929. aliases: ["ModuleSpecifier"],
  63930. fields: {
  63931. exported: {
  63932. validate: (0, _utils.assertNodeType)("Identifier")
  63933. }
  63934. }
  63935. });
  63936. (0, _utils.default)("PrivateName", {
  63937. visitor: ["id"],
  63938. aliases: ["Private"],
  63939. fields: {
  63940. id: {
  63941. validate: (0, _utils.assertNodeType)("Identifier")
  63942. }
  63943. }
  63944. });
  63945. (0, _utils.default)("RecordExpression", {
  63946. visitor: ["properties"],
  63947. aliases: ["Expression"],
  63948. fields: {
  63949. properties: {
  63950. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("ObjectProperty", "SpreadElement")))
  63951. }
  63952. }
  63953. });
  63954. (0, _utils.default)("TupleExpression", {
  63955. fields: {
  63956. elements: {
  63957. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Expression", "SpreadElement"))),
  63958. default: []
  63959. }
  63960. },
  63961. visitor: ["elements"],
  63962. aliases: ["Expression"]
  63963. });
  63964. (0, _utils.default)("DecimalLiteral", {
  63965. builder: ["value"],
  63966. fields: {
  63967. value: {
  63968. validate: (0, _utils.assertValueType)("string")
  63969. }
  63970. },
  63971. aliases: ["Expression", "Pureish", "Literal", "Immutable"]
  63972. });
  63973. (0, _utils.default)("StaticBlock", {
  63974. visitor: ["body"],
  63975. fields: {
  63976. body: {
  63977. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Statement")))
  63978. }
  63979. },
  63980. aliases: ["Scopable", "BlockParent"]
  63981. });
  63982. (0, _utils.default)("ModuleExpression", {
  63983. visitor: ["body"],
  63984. fields: {
  63985. body: {
  63986. validate: (0, _utils.assertNodeType)("Program")
  63987. }
  63988. },
  63989. aliases: ["Expression"]
  63990. });
  63991. }
  63992. });
  63993. // node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/definitions/typescript.js
  63994. var require_typescript4 = __commonJS({
  63995. "node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/definitions/typescript.js"() {
  63996. "use strict";
  63997. var _utils = require_utils3();
  63998. var _core = require_core3();
  63999. var bool = (0, _utils.assertValueType)("boolean");
  64000. var tSFunctionTypeAnnotationCommon = {
  64001. returnType: {
  64002. validate: (0, _utils.assertNodeType)("TSTypeAnnotation", "Noop"),
  64003. optional: true
  64004. },
  64005. typeParameters: {
  64006. validate: (0, _utils.assertNodeType)("TSTypeParameterDeclaration", "Noop"),
  64007. optional: true
  64008. }
  64009. };
  64010. (0, _utils.default)("TSParameterProperty", {
  64011. aliases: ["LVal"],
  64012. visitor: ["parameter"],
  64013. fields: {
  64014. accessibility: {
  64015. validate: (0, _utils.assertOneOf)("public", "private", "protected"),
  64016. optional: true
  64017. },
  64018. readonly: {
  64019. validate: (0, _utils.assertValueType)("boolean"),
  64020. optional: true
  64021. },
  64022. parameter: {
  64023. validate: (0, _utils.assertNodeType)("Identifier", "AssignmentPattern")
  64024. }
  64025. }
  64026. });
  64027. (0, _utils.default)("TSDeclareFunction", {
  64028. aliases: ["Statement", "Declaration"],
  64029. visitor: ["id", "typeParameters", "params", "returnType"],
  64030. fields: Object.assign({}, _core.functionDeclarationCommon, tSFunctionTypeAnnotationCommon)
  64031. });
  64032. (0, _utils.default)("TSDeclareMethod", {
  64033. visitor: ["decorators", "key", "typeParameters", "params", "returnType"],
  64034. fields: Object.assign({}, _core.classMethodOrDeclareMethodCommon, tSFunctionTypeAnnotationCommon)
  64035. });
  64036. (0, _utils.default)("TSQualifiedName", {
  64037. aliases: ["TSEntityName"],
  64038. visitor: ["left", "right"],
  64039. fields: {
  64040. left: (0, _utils.validateType)("TSEntityName"),
  64041. right: (0, _utils.validateType)("Identifier")
  64042. }
  64043. });
  64044. var signatureDeclarationCommon = {
  64045. typeParameters: (0, _utils.validateOptionalType)("TSTypeParameterDeclaration"),
  64046. parameters: (0, _utils.validateArrayOfType)(["Identifier", "RestElement"]),
  64047. typeAnnotation: (0, _utils.validateOptionalType)("TSTypeAnnotation")
  64048. };
  64049. var callConstructSignatureDeclaration = {
  64050. aliases: ["TSTypeElement"],
  64051. visitor: ["typeParameters", "parameters", "typeAnnotation"],
  64052. fields: signatureDeclarationCommon
  64053. };
  64054. (0, _utils.default)("TSCallSignatureDeclaration", callConstructSignatureDeclaration);
  64055. (0, _utils.default)("TSConstructSignatureDeclaration", callConstructSignatureDeclaration);
  64056. var namedTypeElementCommon = {
  64057. key: (0, _utils.validateType)("Expression"),
  64058. computed: (0, _utils.validate)(bool),
  64059. optional: (0, _utils.validateOptional)(bool)
  64060. };
  64061. (0, _utils.default)("TSPropertySignature", {
  64062. aliases: ["TSTypeElement"],
  64063. visitor: ["key", "typeAnnotation", "initializer"],
  64064. fields: Object.assign({}, namedTypeElementCommon, {
  64065. readonly: (0, _utils.validateOptional)(bool),
  64066. typeAnnotation: (0, _utils.validateOptionalType)("TSTypeAnnotation"),
  64067. initializer: (0, _utils.validateOptionalType)("Expression")
  64068. })
  64069. });
  64070. (0, _utils.default)("TSMethodSignature", {
  64071. aliases: ["TSTypeElement"],
  64072. visitor: ["key", "typeParameters", "parameters", "typeAnnotation"],
  64073. fields: Object.assign({}, signatureDeclarationCommon, namedTypeElementCommon, {
  64074. kind: {
  64075. validate: (0, _utils.assertOneOf)("method", "get", "set")
  64076. }
  64077. })
  64078. });
  64079. (0, _utils.default)("TSIndexSignature", {
  64080. aliases: ["TSTypeElement"],
  64081. visitor: ["parameters", "typeAnnotation"],
  64082. fields: {
  64083. readonly: (0, _utils.validateOptional)(bool),
  64084. static: (0, _utils.validateOptional)(bool),
  64085. parameters: (0, _utils.validateArrayOfType)("Identifier"),
  64086. typeAnnotation: (0, _utils.validateOptionalType)("TSTypeAnnotation")
  64087. }
  64088. });
  64089. var tsKeywordTypes = ["TSAnyKeyword", "TSBooleanKeyword", "TSBigIntKeyword", "TSIntrinsicKeyword", "TSNeverKeyword", "TSNullKeyword", "TSNumberKeyword", "TSObjectKeyword", "TSStringKeyword", "TSSymbolKeyword", "TSUndefinedKeyword", "TSUnknownKeyword", "TSVoidKeyword"];
  64090. for (const type of tsKeywordTypes) {
  64091. (0, _utils.default)(type, {
  64092. aliases: ["TSType", "TSBaseType"],
  64093. visitor: [],
  64094. fields: {}
  64095. });
  64096. }
  64097. (0, _utils.default)("TSThisType", {
  64098. aliases: ["TSType", "TSBaseType"],
  64099. visitor: [],
  64100. fields: {}
  64101. });
  64102. var fnOrCtrBase = {
  64103. aliases: ["TSType"],
  64104. visitor: ["typeParameters", "parameters", "typeAnnotation"]
  64105. };
  64106. (0, _utils.default)("TSFunctionType", Object.assign({}, fnOrCtrBase, {
  64107. fields: signatureDeclarationCommon
  64108. }));
  64109. (0, _utils.default)("TSConstructorType", Object.assign({}, fnOrCtrBase, {
  64110. fields: Object.assign({}, signatureDeclarationCommon, {
  64111. abstract: (0, _utils.validateOptional)(bool)
  64112. })
  64113. }));
  64114. (0, _utils.default)("TSTypeReference", {
  64115. aliases: ["TSType"],
  64116. visitor: ["typeName", "typeParameters"],
  64117. fields: {
  64118. typeName: (0, _utils.validateType)("TSEntityName"),
  64119. typeParameters: (0, _utils.validateOptionalType)("TSTypeParameterInstantiation")
  64120. }
  64121. });
  64122. (0, _utils.default)("TSTypePredicate", {
  64123. aliases: ["TSType"],
  64124. visitor: ["parameterName", "typeAnnotation"],
  64125. builder: ["parameterName", "typeAnnotation", "asserts"],
  64126. fields: {
  64127. parameterName: (0, _utils.validateType)(["Identifier", "TSThisType"]),
  64128. typeAnnotation: (0, _utils.validateOptionalType)("TSTypeAnnotation"),
  64129. asserts: (0, _utils.validateOptional)(bool)
  64130. }
  64131. });
  64132. (0, _utils.default)("TSTypeQuery", {
  64133. aliases: ["TSType"],
  64134. visitor: ["exprName"],
  64135. fields: {
  64136. exprName: (0, _utils.validateType)(["TSEntityName", "TSImportType"])
  64137. }
  64138. });
  64139. (0, _utils.default)("TSTypeLiteral", {
  64140. aliases: ["TSType"],
  64141. visitor: ["members"],
  64142. fields: {
  64143. members: (0, _utils.validateArrayOfType)("TSTypeElement")
  64144. }
  64145. });
  64146. (0, _utils.default)("TSArrayType", {
  64147. aliases: ["TSType"],
  64148. visitor: ["elementType"],
  64149. fields: {
  64150. elementType: (0, _utils.validateType)("TSType")
  64151. }
  64152. });
  64153. (0, _utils.default)("TSTupleType", {
  64154. aliases: ["TSType"],
  64155. visitor: ["elementTypes"],
  64156. fields: {
  64157. elementTypes: (0, _utils.validateArrayOfType)(["TSType", "TSNamedTupleMember"])
  64158. }
  64159. });
  64160. (0, _utils.default)("TSOptionalType", {
  64161. aliases: ["TSType"],
  64162. visitor: ["typeAnnotation"],
  64163. fields: {
  64164. typeAnnotation: (0, _utils.validateType)("TSType")
  64165. }
  64166. });
  64167. (0, _utils.default)("TSRestType", {
  64168. aliases: ["TSType"],
  64169. visitor: ["typeAnnotation"],
  64170. fields: {
  64171. typeAnnotation: (0, _utils.validateType)("TSType")
  64172. }
  64173. });
  64174. (0, _utils.default)("TSNamedTupleMember", {
  64175. visitor: ["label", "elementType"],
  64176. builder: ["label", "elementType", "optional"],
  64177. fields: {
  64178. label: (0, _utils.validateType)("Identifier"),
  64179. optional: {
  64180. validate: bool,
  64181. default: false
  64182. },
  64183. elementType: (0, _utils.validateType)("TSType")
  64184. }
  64185. });
  64186. var unionOrIntersection = {
  64187. aliases: ["TSType"],
  64188. visitor: ["types"],
  64189. fields: {
  64190. types: (0, _utils.validateArrayOfType)("TSType")
  64191. }
  64192. };
  64193. (0, _utils.default)("TSUnionType", unionOrIntersection);
  64194. (0, _utils.default)("TSIntersectionType", unionOrIntersection);
  64195. (0, _utils.default)("TSConditionalType", {
  64196. aliases: ["TSType"],
  64197. visitor: ["checkType", "extendsType", "trueType", "falseType"],
  64198. fields: {
  64199. checkType: (0, _utils.validateType)("TSType"),
  64200. extendsType: (0, _utils.validateType)("TSType"),
  64201. trueType: (0, _utils.validateType)("TSType"),
  64202. falseType: (0, _utils.validateType)("TSType")
  64203. }
  64204. });
  64205. (0, _utils.default)("TSInferType", {
  64206. aliases: ["TSType"],
  64207. visitor: ["typeParameter"],
  64208. fields: {
  64209. typeParameter: (0, _utils.validateType)("TSTypeParameter")
  64210. }
  64211. });
  64212. (0, _utils.default)("TSParenthesizedType", {
  64213. aliases: ["TSType"],
  64214. visitor: ["typeAnnotation"],
  64215. fields: {
  64216. typeAnnotation: (0, _utils.validateType)("TSType")
  64217. }
  64218. });
  64219. (0, _utils.default)("TSTypeOperator", {
  64220. aliases: ["TSType"],
  64221. visitor: ["typeAnnotation"],
  64222. fields: {
  64223. operator: (0, _utils.validate)((0, _utils.assertValueType)("string")),
  64224. typeAnnotation: (0, _utils.validateType)("TSType")
  64225. }
  64226. });
  64227. (0, _utils.default)("TSIndexedAccessType", {
  64228. aliases: ["TSType"],
  64229. visitor: ["objectType", "indexType"],
  64230. fields: {
  64231. objectType: (0, _utils.validateType)("TSType"),
  64232. indexType: (0, _utils.validateType)("TSType")
  64233. }
  64234. });
  64235. (0, _utils.default)("TSMappedType", {
  64236. aliases: ["TSType"],
  64237. visitor: ["typeParameter", "typeAnnotation", "nameType"],
  64238. fields: {
  64239. readonly: (0, _utils.validateOptional)(bool),
  64240. typeParameter: (0, _utils.validateType)("TSTypeParameter"),
  64241. optional: (0, _utils.validateOptional)(bool),
  64242. typeAnnotation: (0, _utils.validateOptionalType)("TSType"),
  64243. nameType: (0, _utils.validateOptionalType)("TSType")
  64244. }
  64245. });
  64246. (0, _utils.default)("TSLiteralType", {
  64247. aliases: ["TSType", "TSBaseType"],
  64248. visitor: ["literal"],
  64249. fields: {
  64250. literal: (0, _utils.validateType)(["NumericLiteral", "StringLiteral", "BooleanLiteral", "BigIntLiteral"])
  64251. }
  64252. });
  64253. (0, _utils.default)("TSExpressionWithTypeArguments", {
  64254. aliases: ["TSType"],
  64255. visitor: ["expression", "typeParameters"],
  64256. fields: {
  64257. expression: (0, _utils.validateType)("TSEntityName"),
  64258. typeParameters: (0, _utils.validateOptionalType)("TSTypeParameterInstantiation")
  64259. }
  64260. });
  64261. (0, _utils.default)("TSInterfaceDeclaration", {
  64262. aliases: ["Statement", "Declaration"],
  64263. visitor: ["id", "typeParameters", "extends", "body"],
  64264. fields: {
  64265. declare: (0, _utils.validateOptional)(bool),
  64266. id: (0, _utils.validateType)("Identifier"),
  64267. typeParameters: (0, _utils.validateOptionalType)("TSTypeParameterDeclaration"),
  64268. extends: (0, _utils.validateOptional)((0, _utils.arrayOfType)("TSExpressionWithTypeArguments")),
  64269. body: (0, _utils.validateType)("TSInterfaceBody")
  64270. }
  64271. });
  64272. (0, _utils.default)("TSInterfaceBody", {
  64273. visitor: ["body"],
  64274. fields: {
  64275. body: (0, _utils.validateArrayOfType)("TSTypeElement")
  64276. }
  64277. });
  64278. (0, _utils.default)("TSTypeAliasDeclaration", {
  64279. aliases: ["Statement", "Declaration"],
  64280. visitor: ["id", "typeParameters", "typeAnnotation"],
  64281. fields: {
  64282. declare: (0, _utils.validateOptional)(bool),
  64283. id: (0, _utils.validateType)("Identifier"),
  64284. typeParameters: (0, _utils.validateOptionalType)("TSTypeParameterDeclaration"),
  64285. typeAnnotation: (0, _utils.validateType)("TSType")
  64286. }
  64287. });
  64288. (0, _utils.default)("TSAsExpression", {
  64289. aliases: ["Expression"],
  64290. visitor: ["expression", "typeAnnotation"],
  64291. fields: {
  64292. expression: (0, _utils.validateType)("Expression"),
  64293. typeAnnotation: (0, _utils.validateType)("TSType")
  64294. }
  64295. });
  64296. (0, _utils.default)("TSTypeAssertion", {
  64297. aliases: ["Expression"],
  64298. visitor: ["typeAnnotation", "expression"],
  64299. fields: {
  64300. typeAnnotation: (0, _utils.validateType)("TSType"),
  64301. expression: (0, _utils.validateType)("Expression")
  64302. }
  64303. });
  64304. (0, _utils.default)("TSEnumDeclaration", {
  64305. aliases: ["Statement", "Declaration"],
  64306. visitor: ["id", "members"],
  64307. fields: {
  64308. declare: (0, _utils.validateOptional)(bool),
  64309. const: (0, _utils.validateOptional)(bool),
  64310. id: (0, _utils.validateType)("Identifier"),
  64311. members: (0, _utils.validateArrayOfType)("TSEnumMember"),
  64312. initializer: (0, _utils.validateOptionalType)("Expression")
  64313. }
  64314. });
  64315. (0, _utils.default)("TSEnumMember", {
  64316. visitor: ["id", "initializer"],
  64317. fields: {
  64318. id: (0, _utils.validateType)(["Identifier", "StringLiteral"]),
  64319. initializer: (0, _utils.validateOptionalType)("Expression")
  64320. }
  64321. });
  64322. (0, _utils.default)("TSModuleDeclaration", {
  64323. aliases: ["Statement", "Declaration"],
  64324. visitor: ["id", "body"],
  64325. fields: {
  64326. declare: (0, _utils.validateOptional)(bool),
  64327. global: (0, _utils.validateOptional)(bool),
  64328. id: (0, _utils.validateType)(["Identifier", "StringLiteral"]),
  64329. body: (0, _utils.validateType)(["TSModuleBlock", "TSModuleDeclaration"])
  64330. }
  64331. });
  64332. (0, _utils.default)("TSModuleBlock", {
  64333. aliases: ["Scopable", "Block", "BlockParent"],
  64334. visitor: ["body"],
  64335. fields: {
  64336. body: (0, _utils.validateArrayOfType)("Statement")
  64337. }
  64338. });
  64339. (0, _utils.default)("TSImportType", {
  64340. aliases: ["TSType"],
  64341. visitor: ["argument", "qualifier", "typeParameters"],
  64342. fields: {
  64343. argument: (0, _utils.validateType)("StringLiteral"),
  64344. qualifier: (0, _utils.validateOptionalType)("TSEntityName"),
  64345. typeParameters: (0, _utils.validateOptionalType)("TSTypeParameterInstantiation")
  64346. }
  64347. });
  64348. (0, _utils.default)("TSImportEqualsDeclaration", {
  64349. aliases: ["Statement"],
  64350. visitor: ["id", "moduleReference"],
  64351. fields: {
  64352. isExport: (0, _utils.validate)(bool),
  64353. id: (0, _utils.validateType)("Identifier"),
  64354. moduleReference: (0, _utils.validateType)(["TSEntityName", "TSExternalModuleReference"])
  64355. }
  64356. });
  64357. (0, _utils.default)("TSExternalModuleReference", {
  64358. visitor: ["expression"],
  64359. fields: {
  64360. expression: (0, _utils.validateType)("StringLiteral")
  64361. }
  64362. });
  64363. (0, _utils.default)("TSNonNullExpression", {
  64364. aliases: ["Expression"],
  64365. visitor: ["expression"],
  64366. fields: {
  64367. expression: (0, _utils.validateType)("Expression")
  64368. }
  64369. });
  64370. (0, _utils.default)("TSExportAssignment", {
  64371. aliases: ["Statement"],
  64372. visitor: ["expression"],
  64373. fields: {
  64374. expression: (0, _utils.validateType)("Expression")
  64375. }
  64376. });
  64377. (0, _utils.default)("TSNamespaceExportDeclaration", {
  64378. aliases: ["Statement"],
  64379. visitor: ["id"],
  64380. fields: {
  64381. id: (0, _utils.validateType)("Identifier")
  64382. }
  64383. });
  64384. (0, _utils.default)("TSTypeAnnotation", {
  64385. visitor: ["typeAnnotation"],
  64386. fields: {
  64387. typeAnnotation: {
  64388. validate: (0, _utils.assertNodeType)("TSType")
  64389. }
  64390. }
  64391. });
  64392. (0, _utils.default)("TSTypeParameterInstantiation", {
  64393. visitor: ["params"],
  64394. fields: {
  64395. params: {
  64396. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("TSType")))
  64397. }
  64398. }
  64399. });
  64400. (0, _utils.default)("TSTypeParameterDeclaration", {
  64401. visitor: ["params"],
  64402. fields: {
  64403. params: {
  64404. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("TSTypeParameter")))
  64405. }
  64406. }
  64407. });
  64408. (0, _utils.default)("TSTypeParameter", {
  64409. builder: ["constraint", "default", "name"],
  64410. visitor: ["constraint", "default"],
  64411. fields: {
  64412. name: {
  64413. validate: (0, _utils.assertValueType)("string")
  64414. },
  64415. constraint: {
  64416. validate: (0, _utils.assertNodeType)("TSType"),
  64417. optional: true
  64418. },
  64419. default: {
  64420. validate: (0, _utils.assertNodeType)("TSType"),
  64421. optional: true
  64422. }
  64423. }
  64424. });
  64425. }
  64426. });
  64427. // node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/definitions/index.js
  64428. var require_definitions3 = __commonJS({
  64429. "node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/definitions/index.js"(exports) {
  64430. "use strict";
  64431. Object.defineProperty(exports, "__esModule", {
  64432. value: true
  64433. });
  64434. Object.defineProperty(exports, "VISITOR_KEYS", {
  64435. enumerable: true,
  64436. get: function() {
  64437. return _utils.VISITOR_KEYS;
  64438. }
  64439. });
  64440. Object.defineProperty(exports, "ALIAS_KEYS", {
  64441. enumerable: true,
  64442. get: function() {
  64443. return _utils.ALIAS_KEYS;
  64444. }
  64445. });
  64446. Object.defineProperty(exports, "FLIPPED_ALIAS_KEYS", {
  64447. enumerable: true,
  64448. get: function() {
  64449. return _utils.FLIPPED_ALIAS_KEYS;
  64450. }
  64451. });
  64452. Object.defineProperty(exports, "NODE_FIELDS", {
  64453. enumerable: true,
  64454. get: function() {
  64455. return _utils.NODE_FIELDS;
  64456. }
  64457. });
  64458. Object.defineProperty(exports, "BUILDER_KEYS", {
  64459. enumerable: true,
  64460. get: function() {
  64461. return _utils.BUILDER_KEYS;
  64462. }
  64463. });
  64464. Object.defineProperty(exports, "DEPRECATED_KEYS", {
  64465. enumerable: true,
  64466. get: function() {
  64467. return _utils.DEPRECATED_KEYS;
  64468. }
  64469. });
  64470. Object.defineProperty(exports, "NODE_PARENT_VALIDATIONS", {
  64471. enumerable: true,
  64472. get: function() {
  64473. return _utils.NODE_PARENT_VALIDATIONS;
  64474. }
  64475. });
  64476. Object.defineProperty(exports, "PLACEHOLDERS", {
  64477. enumerable: true,
  64478. get: function() {
  64479. return _placeholders.PLACEHOLDERS;
  64480. }
  64481. });
  64482. Object.defineProperty(exports, "PLACEHOLDERS_ALIAS", {
  64483. enumerable: true,
  64484. get: function() {
  64485. return _placeholders.PLACEHOLDERS_ALIAS;
  64486. }
  64487. });
  64488. Object.defineProperty(exports, "PLACEHOLDERS_FLIPPED_ALIAS", {
  64489. enumerable: true,
  64490. get: function() {
  64491. return _placeholders.PLACEHOLDERS_FLIPPED_ALIAS;
  64492. }
  64493. });
  64494. exports.TYPES = void 0;
  64495. var _toFastProperties = require_to_fast_properties();
  64496. require_core3();
  64497. require_flow4();
  64498. require_jsx4();
  64499. require_misc3();
  64500. require_experimental3();
  64501. require_typescript4();
  64502. var _utils = require_utils3();
  64503. var _placeholders = require_placeholders3();
  64504. _toFastProperties(_utils.VISITOR_KEYS);
  64505. _toFastProperties(_utils.ALIAS_KEYS);
  64506. _toFastProperties(_utils.FLIPPED_ALIAS_KEYS);
  64507. _toFastProperties(_utils.NODE_FIELDS);
  64508. _toFastProperties(_utils.BUILDER_KEYS);
  64509. _toFastProperties(_utils.DEPRECATED_KEYS);
  64510. _toFastProperties(_placeholders.PLACEHOLDERS_ALIAS);
  64511. _toFastProperties(_placeholders.PLACEHOLDERS_FLIPPED_ALIAS);
  64512. var TYPES = Object.keys(_utils.VISITOR_KEYS).concat(Object.keys(_utils.FLIPPED_ALIAS_KEYS)).concat(Object.keys(_utils.DEPRECATED_KEYS));
  64513. exports.TYPES = TYPES;
  64514. }
  64515. });
  64516. // node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/builders/builder.js
  64517. var require_builder4 = __commonJS({
  64518. "node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/builders/builder.js"(exports) {
  64519. "use strict";
  64520. Object.defineProperty(exports, "__esModule", {
  64521. value: true
  64522. });
  64523. exports.default = builder;
  64524. var _definitions = require_definitions3();
  64525. var _validate = require_validate3();
  64526. function builder(type, ...args) {
  64527. const keys2 = _definitions.BUILDER_KEYS[type];
  64528. const countArgs = args.length;
  64529. if (countArgs > keys2.length) {
  64530. throw new Error(`${type}: Too many arguments passed. Received ${countArgs} but can receive no more than ${keys2.length}`);
  64531. }
  64532. const node = {
  64533. type
  64534. };
  64535. let i = 0;
  64536. keys2.forEach((key) => {
  64537. const field = _definitions.NODE_FIELDS[type][key];
  64538. let arg;
  64539. if (i < countArgs)
  64540. arg = args[i];
  64541. if (arg === void 0) {
  64542. arg = Array.isArray(field.default) ? [] : field.default;
  64543. }
  64544. node[key] = arg;
  64545. i++;
  64546. });
  64547. for (const key of Object.keys(node)) {
  64548. (0, _validate.default)(node, key, node[key]);
  64549. }
  64550. return node;
  64551. }
  64552. }
  64553. });
  64554. // node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/builders/generated/index.js
  64555. var require_generated12 = __commonJS({
  64556. "node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/builders/generated/index.js"(exports) {
  64557. "use strict";
  64558. Object.defineProperty(exports, "__esModule", {
  64559. value: true
  64560. });
  64561. exports.arrayExpression = arrayExpression;
  64562. exports.assignmentExpression = assignmentExpression;
  64563. exports.binaryExpression = binaryExpression;
  64564. exports.interpreterDirective = interpreterDirective;
  64565. exports.directive = directive;
  64566. exports.directiveLiteral = directiveLiteral;
  64567. exports.blockStatement = blockStatement;
  64568. exports.breakStatement = breakStatement;
  64569. exports.callExpression = callExpression;
  64570. exports.catchClause = catchClause;
  64571. exports.conditionalExpression = conditionalExpression;
  64572. exports.continueStatement = continueStatement;
  64573. exports.debuggerStatement = debuggerStatement;
  64574. exports.doWhileStatement = doWhileStatement;
  64575. exports.emptyStatement = emptyStatement;
  64576. exports.expressionStatement = expressionStatement;
  64577. exports.file = file;
  64578. exports.forInStatement = forInStatement;
  64579. exports.forStatement = forStatement;
  64580. exports.functionDeclaration = functionDeclaration;
  64581. exports.functionExpression = functionExpression;
  64582. exports.identifier = identifier;
  64583. exports.ifStatement = ifStatement;
  64584. exports.labeledStatement = labeledStatement;
  64585. exports.stringLiteral = stringLiteral;
  64586. exports.numericLiteral = numericLiteral;
  64587. exports.nullLiteral = nullLiteral;
  64588. exports.booleanLiteral = booleanLiteral;
  64589. exports.regExpLiteral = regExpLiteral;
  64590. exports.logicalExpression = logicalExpression;
  64591. exports.memberExpression = memberExpression;
  64592. exports.newExpression = newExpression;
  64593. exports.program = program;
  64594. exports.objectExpression = objectExpression;
  64595. exports.objectMethod = objectMethod;
  64596. exports.objectProperty = objectProperty;
  64597. exports.restElement = restElement;
  64598. exports.returnStatement = returnStatement;
  64599. exports.sequenceExpression = sequenceExpression;
  64600. exports.parenthesizedExpression = parenthesizedExpression;
  64601. exports.switchCase = switchCase;
  64602. exports.switchStatement = switchStatement;
  64603. exports.thisExpression = thisExpression;
  64604. exports.throwStatement = throwStatement;
  64605. exports.tryStatement = tryStatement;
  64606. exports.unaryExpression = unaryExpression;
  64607. exports.updateExpression = updateExpression;
  64608. exports.variableDeclaration = variableDeclaration;
  64609. exports.variableDeclarator = variableDeclarator;
  64610. exports.whileStatement = whileStatement;
  64611. exports.withStatement = withStatement;
  64612. exports.assignmentPattern = assignmentPattern;
  64613. exports.arrayPattern = arrayPattern;
  64614. exports.arrowFunctionExpression = arrowFunctionExpression;
  64615. exports.classBody = classBody;
  64616. exports.classExpression = classExpression;
  64617. exports.classDeclaration = classDeclaration;
  64618. exports.exportAllDeclaration = exportAllDeclaration;
  64619. exports.exportDefaultDeclaration = exportDefaultDeclaration;
  64620. exports.exportNamedDeclaration = exportNamedDeclaration;
  64621. exports.exportSpecifier = exportSpecifier;
  64622. exports.forOfStatement = forOfStatement;
  64623. exports.importDeclaration = importDeclaration;
  64624. exports.importDefaultSpecifier = importDefaultSpecifier;
  64625. exports.importNamespaceSpecifier = importNamespaceSpecifier;
  64626. exports.importSpecifier = importSpecifier;
  64627. exports.metaProperty = metaProperty;
  64628. exports.classMethod = classMethod;
  64629. exports.objectPattern = objectPattern;
  64630. exports.spreadElement = spreadElement;
  64631. exports.super = _super;
  64632. exports.taggedTemplateExpression = taggedTemplateExpression;
  64633. exports.templateElement = templateElement;
  64634. exports.templateLiteral = templateLiteral;
  64635. exports.yieldExpression = yieldExpression;
  64636. exports.awaitExpression = awaitExpression;
  64637. exports.import = _import;
  64638. exports.bigIntLiteral = bigIntLiteral;
  64639. exports.exportNamespaceSpecifier = exportNamespaceSpecifier;
  64640. exports.optionalMemberExpression = optionalMemberExpression;
  64641. exports.optionalCallExpression = optionalCallExpression;
  64642. exports.anyTypeAnnotation = anyTypeAnnotation;
  64643. exports.arrayTypeAnnotation = arrayTypeAnnotation;
  64644. exports.booleanTypeAnnotation = booleanTypeAnnotation;
  64645. exports.booleanLiteralTypeAnnotation = booleanLiteralTypeAnnotation;
  64646. exports.nullLiteralTypeAnnotation = nullLiteralTypeAnnotation;
  64647. exports.classImplements = classImplements;
  64648. exports.declareClass = declareClass;
  64649. exports.declareFunction = declareFunction;
  64650. exports.declareInterface = declareInterface;
  64651. exports.declareModule = declareModule;
  64652. exports.declareModuleExports = declareModuleExports;
  64653. exports.declareTypeAlias = declareTypeAlias;
  64654. exports.declareOpaqueType = declareOpaqueType;
  64655. exports.declareVariable = declareVariable;
  64656. exports.declareExportDeclaration = declareExportDeclaration;
  64657. exports.declareExportAllDeclaration = declareExportAllDeclaration;
  64658. exports.declaredPredicate = declaredPredicate;
  64659. exports.existsTypeAnnotation = existsTypeAnnotation;
  64660. exports.functionTypeAnnotation = functionTypeAnnotation;
  64661. exports.functionTypeParam = functionTypeParam;
  64662. exports.genericTypeAnnotation = genericTypeAnnotation;
  64663. exports.inferredPredicate = inferredPredicate;
  64664. exports.interfaceExtends = interfaceExtends;
  64665. exports.interfaceDeclaration = interfaceDeclaration;
  64666. exports.interfaceTypeAnnotation = interfaceTypeAnnotation;
  64667. exports.intersectionTypeAnnotation = intersectionTypeAnnotation;
  64668. exports.mixedTypeAnnotation = mixedTypeAnnotation;
  64669. exports.emptyTypeAnnotation = emptyTypeAnnotation;
  64670. exports.nullableTypeAnnotation = nullableTypeAnnotation;
  64671. exports.numberLiteralTypeAnnotation = numberLiteralTypeAnnotation;
  64672. exports.numberTypeAnnotation = numberTypeAnnotation;
  64673. exports.objectTypeAnnotation = objectTypeAnnotation;
  64674. exports.objectTypeInternalSlot = objectTypeInternalSlot;
  64675. exports.objectTypeCallProperty = objectTypeCallProperty;
  64676. exports.objectTypeIndexer = objectTypeIndexer;
  64677. exports.objectTypeProperty = objectTypeProperty;
  64678. exports.objectTypeSpreadProperty = objectTypeSpreadProperty;
  64679. exports.opaqueType = opaqueType;
  64680. exports.qualifiedTypeIdentifier = qualifiedTypeIdentifier;
  64681. exports.stringLiteralTypeAnnotation = stringLiteralTypeAnnotation;
  64682. exports.stringTypeAnnotation = stringTypeAnnotation;
  64683. exports.symbolTypeAnnotation = symbolTypeAnnotation;
  64684. exports.thisTypeAnnotation = thisTypeAnnotation;
  64685. exports.tupleTypeAnnotation = tupleTypeAnnotation;
  64686. exports.typeofTypeAnnotation = typeofTypeAnnotation;
  64687. exports.typeAlias = typeAlias;
  64688. exports.typeAnnotation = typeAnnotation;
  64689. exports.typeCastExpression = typeCastExpression;
  64690. exports.typeParameter = typeParameter;
  64691. exports.typeParameterDeclaration = typeParameterDeclaration;
  64692. exports.typeParameterInstantiation = typeParameterInstantiation;
  64693. exports.unionTypeAnnotation = unionTypeAnnotation;
  64694. exports.variance = variance;
  64695. exports.voidTypeAnnotation = voidTypeAnnotation;
  64696. exports.enumDeclaration = enumDeclaration;
  64697. exports.enumBooleanBody = enumBooleanBody;
  64698. exports.enumNumberBody = enumNumberBody;
  64699. exports.enumStringBody = enumStringBody;
  64700. exports.enumSymbolBody = enumSymbolBody;
  64701. exports.enumBooleanMember = enumBooleanMember;
  64702. exports.enumNumberMember = enumNumberMember;
  64703. exports.enumStringMember = enumStringMember;
  64704. exports.enumDefaultedMember = enumDefaultedMember;
  64705. exports.indexedAccessType = indexedAccessType;
  64706. exports.optionalIndexedAccessType = optionalIndexedAccessType;
  64707. exports.jSXAttribute = exports.jsxAttribute = jsxAttribute;
  64708. exports.jSXClosingElement = exports.jsxClosingElement = jsxClosingElement;
  64709. exports.jSXElement = exports.jsxElement = jsxElement;
  64710. exports.jSXEmptyExpression = exports.jsxEmptyExpression = jsxEmptyExpression;
  64711. exports.jSXExpressionContainer = exports.jsxExpressionContainer = jsxExpressionContainer;
  64712. exports.jSXSpreadChild = exports.jsxSpreadChild = jsxSpreadChild;
  64713. exports.jSXIdentifier = exports.jsxIdentifier = jsxIdentifier;
  64714. exports.jSXMemberExpression = exports.jsxMemberExpression = jsxMemberExpression;
  64715. exports.jSXNamespacedName = exports.jsxNamespacedName = jsxNamespacedName;
  64716. exports.jSXOpeningElement = exports.jsxOpeningElement = jsxOpeningElement;
  64717. exports.jSXSpreadAttribute = exports.jsxSpreadAttribute = jsxSpreadAttribute;
  64718. exports.jSXText = exports.jsxText = jsxText2;
  64719. exports.jSXFragment = exports.jsxFragment = jsxFragment;
  64720. exports.jSXOpeningFragment = exports.jsxOpeningFragment = jsxOpeningFragment;
  64721. exports.jSXClosingFragment = exports.jsxClosingFragment = jsxClosingFragment;
  64722. exports.noop = noop;
  64723. exports.placeholder = placeholder;
  64724. exports.v8IntrinsicIdentifier = v8IntrinsicIdentifier;
  64725. exports.argumentPlaceholder = argumentPlaceholder;
  64726. exports.bindExpression = bindExpression;
  64727. exports.classProperty = classProperty;
  64728. exports.pipelineTopicExpression = pipelineTopicExpression;
  64729. exports.pipelineBareFunction = pipelineBareFunction;
  64730. exports.pipelinePrimaryTopicReference = pipelinePrimaryTopicReference;
  64731. exports.classPrivateProperty = classPrivateProperty;
  64732. exports.classPrivateMethod = classPrivateMethod;
  64733. exports.importAttribute = importAttribute;
  64734. exports.decorator = decorator;
  64735. exports.doExpression = doExpression;
  64736. exports.exportDefaultSpecifier = exportDefaultSpecifier;
  64737. exports.privateName = privateName;
  64738. exports.recordExpression = recordExpression;
  64739. exports.tupleExpression = tupleExpression;
  64740. exports.decimalLiteral = decimalLiteral;
  64741. exports.staticBlock = staticBlock;
  64742. exports.moduleExpression = moduleExpression;
  64743. exports.tSParameterProperty = exports.tsParameterProperty = tsParameterProperty;
  64744. exports.tSDeclareFunction = exports.tsDeclareFunction = tsDeclareFunction;
  64745. exports.tSDeclareMethod = exports.tsDeclareMethod = tsDeclareMethod;
  64746. exports.tSQualifiedName = exports.tsQualifiedName = tsQualifiedName;
  64747. exports.tSCallSignatureDeclaration = exports.tsCallSignatureDeclaration = tsCallSignatureDeclaration;
  64748. exports.tSConstructSignatureDeclaration = exports.tsConstructSignatureDeclaration = tsConstructSignatureDeclaration;
  64749. exports.tSPropertySignature = exports.tsPropertySignature = tsPropertySignature;
  64750. exports.tSMethodSignature = exports.tsMethodSignature = tsMethodSignature;
  64751. exports.tSIndexSignature = exports.tsIndexSignature = tsIndexSignature;
  64752. exports.tSAnyKeyword = exports.tsAnyKeyword = tsAnyKeyword;
  64753. exports.tSBooleanKeyword = exports.tsBooleanKeyword = tsBooleanKeyword;
  64754. exports.tSBigIntKeyword = exports.tsBigIntKeyword = tsBigIntKeyword;
  64755. exports.tSIntrinsicKeyword = exports.tsIntrinsicKeyword = tsIntrinsicKeyword;
  64756. exports.tSNeverKeyword = exports.tsNeverKeyword = tsNeverKeyword;
  64757. exports.tSNullKeyword = exports.tsNullKeyword = tsNullKeyword;
  64758. exports.tSNumberKeyword = exports.tsNumberKeyword = tsNumberKeyword;
  64759. exports.tSObjectKeyword = exports.tsObjectKeyword = tsObjectKeyword;
  64760. exports.tSStringKeyword = exports.tsStringKeyword = tsStringKeyword;
  64761. exports.tSSymbolKeyword = exports.tsSymbolKeyword = tsSymbolKeyword;
  64762. exports.tSUndefinedKeyword = exports.tsUndefinedKeyword = tsUndefinedKeyword;
  64763. exports.tSUnknownKeyword = exports.tsUnknownKeyword = tsUnknownKeyword;
  64764. exports.tSVoidKeyword = exports.tsVoidKeyword = tsVoidKeyword;
  64765. exports.tSThisType = exports.tsThisType = tsThisType;
  64766. exports.tSFunctionType = exports.tsFunctionType = tsFunctionType;
  64767. exports.tSConstructorType = exports.tsConstructorType = tsConstructorType;
  64768. exports.tSTypeReference = exports.tsTypeReference = tsTypeReference;
  64769. exports.tSTypePredicate = exports.tsTypePredicate = tsTypePredicate;
  64770. exports.tSTypeQuery = exports.tsTypeQuery = tsTypeQuery;
  64771. exports.tSTypeLiteral = exports.tsTypeLiteral = tsTypeLiteral;
  64772. exports.tSArrayType = exports.tsArrayType = tsArrayType;
  64773. exports.tSTupleType = exports.tsTupleType = tsTupleType;
  64774. exports.tSOptionalType = exports.tsOptionalType = tsOptionalType;
  64775. exports.tSRestType = exports.tsRestType = tsRestType;
  64776. exports.tSNamedTupleMember = exports.tsNamedTupleMember = tsNamedTupleMember;
  64777. exports.tSUnionType = exports.tsUnionType = tsUnionType;
  64778. exports.tSIntersectionType = exports.tsIntersectionType = tsIntersectionType;
  64779. exports.tSConditionalType = exports.tsConditionalType = tsConditionalType;
  64780. exports.tSInferType = exports.tsInferType = tsInferType;
  64781. exports.tSParenthesizedType = exports.tsParenthesizedType = tsParenthesizedType;
  64782. exports.tSTypeOperator = exports.tsTypeOperator = tsTypeOperator;
  64783. exports.tSIndexedAccessType = exports.tsIndexedAccessType = tsIndexedAccessType;
  64784. exports.tSMappedType = exports.tsMappedType = tsMappedType;
  64785. exports.tSLiteralType = exports.tsLiteralType = tsLiteralType;
  64786. exports.tSExpressionWithTypeArguments = exports.tsExpressionWithTypeArguments = tsExpressionWithTypeArguments;
  64787. exports.tSInterfaceDeclaration = exports.tsInterfaceDeclaration = tsInterfaceDeclaration;
  64788. exports.tSInterfaceBody = exports.tsInterfaceBody = tsInterfaceBody;
  64789. exports.tSTypeAliasDeclaration = exports.tsTypeAliasDeclaration = tsTypeAliasDeclaration;
  64790. exports.tSAsExpression = exports.tsAsExpression = tsAsExpression;
  64791. exports.tSTypeAssertion = exports.tsTypeAssertion = tsTypeAssertion;
  64792. exports.tSEnumDeclaration = exports.tsEnumDeclaration = tsEnumDeclaration;
  64793. exports.tSEnumMember = exports.tsEnumMember = tsEnumMember;
  64794. exports.tSModuleDeclaration = exports.tsModuleDeclaration = tsModuleDeclaration;
  64795. exports.tSModuleBlock = exports.tsModuleBlock = tsModuleBlock;
  64796. exports.tSImportType = exports.tsImportType = tsImportType;
  64797. exports.tSImportEqualsDeclaration = exports.tsImportEqualsDeclaration = tsImportEqualsDeclaration;
  64798. exports.tSExternalModuleReference = exports.tsExternalModuleReference = tsExternalModuleReference;
  64799. exports.tSNonNullExpression = exports.tsNonNullExpression = tsNonNullExpression;
  64800. exports.tSExportAssignment = exports.tsExportAssignment = tsExportAssignment;
  64801. exports.tSNamespaceExportDeclaration = exports.tsNamespaceExportDeclaration = tsNamespaceExportDeclaration;
  64802. exports.tSTypeAnnotation = exports.tsTypeAnnotation = tsTypeAnnotation;
  64803. exports.tSTypeParameterInstantiation = exports.tsTypeParameterInstantiation = tsTypeParameterInstantiation;
  64804. exports.tSTypeParameterDeclaration = exports.tsTypeParameterDeclaration = tsTypeParameterDeclaration;
  64805. exports.tSTypeParameter = exports.tsTypeParameter = tsTypeParameter;
  64806. exports.numberLiteral = NumberLiteral;
  64807. exports.regexLiteral = RegexLiteral;
  64808. exports.restProperty = RestProperty;
  64809. exports.spreadProperty = SpreadProperty;
  64810. var _builder = require_builder4();
  64811. function arrayExpression(elements) {
  64812. return (0, _builder.default)("ArrayExpression", ...arguments);
  64813. }
  64814. function assignmentExpression(operator, left, right) {
  64815. return (0, _builder.default)("AssignmentExpression", ...arguments);
  64816. }
  64817. function binaryExpression(operator, left, right) {
  64818. return (0, _builder.default)("BinaryExpression", ...arguments);
  64819. }
  64820. function interpreterDirective(value) {
  64821. return (0, _builder.default)("InterpreterDirective", ...arguments);
  64822. }
  64823. function directive(value) {
  64824. return (0, _builder.default)("Directive", ...arguments);
  64825. }
  64826. function directiveLiteral(value) {
  64827. return (0, _builder.default)("DirectiveLiteral", ...arguments);
  64828. }
  64829. function blockStatement(body, directives) {
  64830. return (0, _builder.default)("BlockStatement", ...arguments);
  64831. }
  64832. function breakStatement(label) {
  64833. return (0, _builder.default)("BreakStatement", ...arguments);
  64834. }
  64835. function callExpression(callee, _arguments) {
  64836. return (0, _builder.default)("CallExpression", ...arguments);
  64837. }
  64838. function catchClause(param, body) {
  64839. return (0, _builder.default)("CatchClause", ...arguments);
  64840. }
  64841. function conditionalExpression(test, consequent, alternate) {
  64842. return (0, _builder.default)("ConditionalExpression", ...arguments);
  64843. }
  64844. function continueStatement(label) {
  64845. return (0, _builder.default)("ContinueStatement", ...arguments);
  64846. }
  64847. function debuggerStatement() {
  64848. return (0, _builder.default)("DebuggerStatement", ...arguments);
  64849. }
  64850. function doWhileStatement(test, body) {
  64851. return (0, _builder.default)("DoWhileStatement", ...arguments);
  64852. }
  64853. function emptyStatement() {
  64854. return (0, _builder.default)("EmptyStatement", ...arguments);
  64855. }
  64856. function expressionStatement(expression) {
  64857. return (0, _builder.default)("ExpressionStatement", ...arguments);
  64858. }
  64859. function file(program2, comments, tokens) {
  64860. return (0, _builder.default)("File", ...arguments);
  64861. }
  64862. function forInStatement(left, right, body) {
  64863. return (0, _builder.default)("ForInStatement", ...arguments);
  64864. }
  64865. function forStatement(init, test, update, body) {
  64866. return (0, _builder.default)("ForStatement", ...arguments);
  64867. }
  64868. function functionDeclaration(id, params, body, generator, async) {
  64869. return (0, _builder.default)("FunctionDeclaration", ...arguments);
  64870. }
  64871. function functionExpression(id, params, body, generator, async) {
  64872. return (0, _builder.default)("FunctionExpression", ...arguments);
  64873. }
  64874. function identifier(name2) {
  64875. return (0, _builder.default)("Identifier", ...arguments);
  64876. }
  64877. function ifStatement(test, consequent, alternate) {
  64878. return (0, _builder.default)("IfStatement", ...arguments);
  64879. }
  64880. function labeledStatement(label, body) {
  64881. return (0, _builder.default)("LabeledStatement", ...arguments);
  64882. }
  64883. function stringLiteral(value) {
  64884. return (0, _builder.default)("StringLiteral", ...arguments);
  64885. }
  64886. function numericLiteral(value) {
  64887. return (0, _builder.default)("NumericLiteral", ...arguments);
  64888. }
  64889. function nullLiteral() {
  64890. return (0, _builder.default)("NullLiteral", ...arguments);
  64891. }
  64892. function booleanLiteral(value) {
  64893. return (0, _builder.default)("BooleanLiteral", ...arguments);
  64894. }
  64895. function regExpLiteral(pattern, flags) {
  64896. return (0, _builder.default)("RegExpLiteral", ...arguments);
  64897. }
  64898. function logicalExpression(operator, left, right) {
  64899. return (0, _builder.default)("LogicalExpression", ...arguments);
  64900. }
  64901. function memberExpression(object, property, computed, optional) {
  64902. return (0, _builder.default)("MemberExpression", ...arguments);
  64903. }
  64904. function newExpression(callee, _arguments) {
  64905. return (0, _builder.default)("NewExpression", ...arguments);
  64906. }
  64907. function program(body, directives, sourceType, interpreter) {
  64908. return (0, _builder.default)("Program", ...arguments);
  64909. }
  64910. function objectExpression(properties) {
  64911. return (0, _builder.default)("ObjectExpression", ...arguments);
  64912. }
  64913. function objectMethod(kind, key, params, body, computed, generator, async) {
  64914. return (0, _builder.default)("ObjectMethod", ...arguments);
  64915. }
  64916. function objectProperty(key, value, computed, shorthand, decorators) {
  64917. return (0, _builder.default)("ObjectProperty", ...arguments);
  64918. }
  64919. function restElement(argument) {
  64920. return (0, _builder.default)("RestElement", ...arguments);
  64921. }
  64922. function returnStatement(argument) {
  64923. return (0, _builder.default)("ReturnStatement", ...arguments);
  64924. }
  64925. function sequenceExpression(expressions) {
  64926. return (0, _builder.default)("SequenceExpression", ...arguments);
  64927. }
  64928. function parenthesizedExpression(expression) {
  64929. return (0, _builder.default)("ParenthesizedExpression", ...arguments);
  64930. }
  64931. function switchCase(test, consequent) {
  64932. return (0, _builder.default)("SwitchCase", ...arguments);
  64933. }
  64934. function switchStatement(discriminant, cases) {
  64935. return (0, _builder.default)("SwitchStatement", ...arguments);
  64936. }
  64937. function thisExpression() {
  64938. return (0, _builder.default)("ThisExpression", ...arguments);
  64939. }
  64940. function throwStatement(argument) {
  64941. return (0, _builder.default)("ThrowStatement", ...arguments);
  64942. }
  64943. function tryStatement(block, handler, finalizer) {
  64944. return (0, _builder.default)("TryStatement", ...arguments);
  64945. }
  64946. function unaryExpression(operator, argument, prefix) {
  64947. return (0, _builder.default)("UnaryExpression", ...arguments);
  64948. }
  64949. function updateExpression(operator, argument, prefix) {
  64950. return (0, _builder.default)("UpdateExpression", ...arguments);
  64951. }
  64952. function variableDeclaration(kind, declarations) {
  64953. return (0, _builder.default)("VariableDeclaration", ...arguments);
  64954. }
  64955. function variableDeclarator(id, init) {
  64956. return (0, _builder.default)("VariableDeclarator", ...arguments);
  64957. }
  64958. function whileStatement(test, body) {
  64959. return (0, _builder.default)("WhileStatement", ...arguments);
  64960. }
  64961. function withStatement(object, body) {
  64962. return (0, _builder.default)("WithStatement", ...arguments);
  64963. }
  64964. function assignmentPattern(left, right) {
  64965. return (0, _builder.default)("AssignmentPattern", ...arguments);
  64966. }
  64967. function arrayPattern(elements) {
  64968. return (0, _builder.default)("ArrayPattern", ...arguments);
  64969. }
  64970. function arrowFunctionExpression(params, body, async) {
  64971. return (0, _builder.default)("ArrowFunctionExpression", ...arguments);
  64972. }
  64973. function classBody(body) {
  64974. return (0, _builder.default)("ClassBody", ...arguments);
  64975. }
  64976. function classExpression(id, superClass, body, decorators) {
  64977. return (0, _builder.default)("ClassExpression", ...arguments);
  64978. }
  64979. function classDeclaration(id, superClass, body, decorators) {
  64980. return (0, _builder.default)("ClassDeclaration", ...arguments);
  64981. }
  64982. function exportAllDeclaration(source) {
  64983. return (0, _builder.default)("ExportAllDeclaration", ...arguments);
  64984. }
  64985. function exportDefaultDeclaration(declaration) {
  64986. return (0, _builder.default)("ExportDefaultDeclaration", ...arguments);
  64987. }
  64988. function exportNamedDeclaration(declaration, specifiers, source) {
  64989. return (0, _builder.default)("ExportNamedDeclaration", ...arguments);
  64990. }
  64991. function exportSpecifier(local, exported) {
  64992. return (0, _builder.default)("ExportSpecifier", ...arguments);
  64993. }
  64994. function forOfStatement(left, right, body, _await) {
  64995. return (0, _builder.default)("ForOfStatement", ...arguments);
  64996. }
  64997. function importDeclaration(specifiers, source) {
  64998. return (0, _builder.default)("ImportDeclaration", ...arguments);
  64999. }
  65000. function importDefaultSpecifier(local) {
  65001. return (0, _builder.default)("ImportDefaultSpecifier", ...arguments);
  65002. }
  65003. function importNamespaceSpecifier(local) {
  65004. return (0, _builder.default)("ImportNamespaceSpecifier", ...arguments);
  65005. }
  65006. function importSpecifier(local, imported) {
  65007. return (0, _builder.default)("ImportSpecifier", ...arguments);
  65008. }
  65009. function metaProperty(meta, property) {
  65010. return (0, _builder.default)("MetaProperty", ...arguments);
  65011. }
  65012. function classMethod(kind, key, params, body, computed, _static, generator, async) {
  65013. return (0, _builder.default)("ClassMethod", ...arguments);
  65014. }
  65015. function objectPattern(properties) {
  65016. return (0, _builder.default)("ObjectPattern", ...arguments);
  65017. }
  65018. function spreadElement(argument) {
  65019. return (0, _builder.default)("SpreadElement", ...arguments);
  65020. }
  65021. function _super() {
  65022. return (0, _builder.default)("Super", ...arguments);
  65023. }
  65024. function taggedTemplateExpression(tag, quasi) {
  65025. return (0, _builder.default)("TaggedTemplateExpression", ...arguments);
  65026. }
  65027. function templateElement(value, tail) {
  65028. return (0, _builder.default)("TemplateElement", ...arguments);
  65029. }
  65030. function templateLiteral(quasis, expressions) {
  65031. return (0, _builder.default)("TemplateLiteral", ...arguments);
  65032. }
  65033. function yieldExpression(argument, delegate) {
  65034. return (0, _builder.default)("YieldExpression", ...arguments);
  65035. }
  65036. function awaitExpression(argument) {
  65037. return (0, _builder.default)("AwaitExpression", ...arguments);
  65038. }
  65039. function _import() {
  65040. return (0, _builder.default)("Import", ...arguments);
  65041. }
  65042. function bigIntLiteral(value) {
  65043. return (0, _builder.default)("BigIntLiteral", ...arguments);
  65044. }
  65045. function exportNamespaceSpecifier(exported) {
  65046. return (0, _builder.default)("ExportNamespaceSpecifier", ...arguments);
  65047. }
  65048. function optionalMemberExpression(object, property, computed, optional) {
  65049. return (0, _builder.default)("OptionalMemberExpression", ...arguments);
  65050. }
  65051. function optionalCallExpression(callee, _arguments, optional) {
  65052. return (0, _builder.default)("OptionalCallExpression", ...arguments);
  65053. }
  65054. function anyTypeAnnotation() {
  65055. return (0, _builder.default)("AnyTypeAnnotation", ...arguments);
  65056. }
  65057. function arrayTypeAnnotation(elementType) {
  65058. return (0, _builder.default)("ArrayTypeAnnotation", ...arguments);
  65059. }
  65060. function booleanTypeAnnotation() {
  65061. return (0, _builder.default)("BooleanTypeAnnotation", ...arguments);
  65062. }
  65063. function booleanLiteralTypeAnnotation(value) {
  65064. return (0, _builder.default)("BooleanLiteralTypeAnnotation", ...arguments);
  65065. }
  65066. function nullLiteralTypeAnnotation() {
  65067. return (0, _builder.default)("NullLiteralTypeAnnotation", ...arguments);
  65068. }
  65069. function classImplements(id, typeParameters) {
  65070. return (0, _builder.default)("ClassImplements", ...arguments);
  65071. }
  65072. function declareClass(id, typeParameters, _extends, body) {
  65073. return (0, _builder.default)("DeclareClass", ...arguments);
  65074. }
  65075. function declareFunction(id) {
  65076. return (0, _builder.default)("DeclareFunction", ...arguments);
  65077. }
  65078. function declareInterface(id, typeParameters, _extends, body) {
  65079. return (0, _builder.default)("DeclareInterface", ...arguments);
  65080. }
  65081. function declareModule(id, body, kind) {
  65082. return (0, _builder.default)("DeclareModule", ...arguments);
  65083. }
  65084. function declareModuleExports(typeAnnotation2) {
  65085. return (0, _builder.default)("DeclareModuleExports", ...arguments);
  65086. }
  65087. function declareTypeAlias(id, typeParameters, right) {
  65088. return (0, _builder.default)("DeclareTypeAlias", ...arguments);
  65089. }
  65090. function declareOpaqueType(id, typeParameters, supertype) {
  65091. return (0, _builder.default)("DeclareOpaqueType", ...arguments);
  65092. }
  65093. function declareVariable(id) {
  65094. return (0, _builder.default)("DeclareVariable", ...arguments);
  65095. }
  65096. function declareExportDeclaration(declaration, specifiers, source) {
  65097. return (0, _builder.default)("DeclareExportDeclaration", ...arguments);
  65098. }
  65099. function declareExportAllDeclaration(source) {
  65100. return (0, _builder.default)("DeclareExportAllDeclaration", ...arguments);
  65101. }
  65102. function declaredPredicate(value) {
  65103. return (0, _builder.default)("DeclaredPredicate", ...arguments);
  65104. }
  65105. function existsTypeAnnotation() {
  65106. return (0, _builder.default)("ExistsTypeAnnotation", ...arguments);
  65107. }
  65108. function functionTypeAnnotation(typeParameters, params, rest, returnType) {
  65109. return (0, _builder.default)("FunctionTypeAnnotation", ...arguments);
  65110. }
  65111. function functionTypeParam(name2, typeAnnotation2) {
  65112. return (0, _builder.default)("FunctionTypeParam", ...arguments);
  65113. }
  65114. function genericTypeAnnotation(id, typeParameters) {
  65115. return (0, _builder.default)("GenericTypeAnnotation", ...arguments);
  65116. }
  65117. function inferredPredicate() {
  65118. return (0, _builder.default)("InferredPredicate", ...arguments);
  65119. }
  65120. function interfaceExtends(id, typeParameters) {
  65121. return (0, _builder.default)("InterfaceExtends", ...arguments);
  65122. }
  65123. function interfaceDeclaration(id, typeParameters, _extends, body) {
  65124. return (0, _builder.default)("InterfaceDeclaration", ...arguments);
  65125. }
  65126. function interfaceTypeAnnotation(_extends, body) {
  65127. return (0, _builder.default)("InterfaceTypeAnnotation", ...arguments);
  65128. }
  65129. function intersectionTypeAnnotation(types2) {
  65130. return (0, _builder.default)("IntersectionTypeAnnotation", ...arguments);
  65131. }
  65132. function mixedTypeAnnotation() {
  65133. return (0, _builder.default)("MixedTypeAnnotation", ...arguments);
  65134. }
  65135. function emptyTypeAnnotation() {
  65136. return (0, _builder.default)("EmptyTypeAnnotation", ...arguments);
  65137. }
  65138. function nullableTypeAnnotation(typeAnnotation2) {
  65139. return (0, _builder.default)("NullableTypeAnnotation", ...arguments);
  65140. }
  65141. function numberLiteralTypeAnnotation(value) {
  65142. return (0, _builder.default)("NumberLiteralTypeAnnotation", ...arguments);
  65143. }
  65144. function numberTypeAnnotation() {
  65145. return (0, _builder.default)("NumberTypeAnnotation", ...arguments);
  65146. }
  65147. function objectTypeAnnotation(properties, indexers, callProperties, internalSlots, exact) {
  65148. return (0, _builder.default)("ObjectTypeAnnotation", ...arguments);
  65149. }
  65150. function objectTypeInternalSlot(id, value, optional, _static, method) {
  65151. return (0, _builder.default)("ObjectTypeInternalSlot", ...arguments);
  65152. }
  65153. function objectTypeCallProperty(value) {
  65154. return (0, _builder.default)("ObjectTypeCallProperty", ...arguments);
  65155. }
  65156. function objectTypeIndexer(id, key, value, variance2) {
  65157. return (0, _builder.default)("ObjectTypeIndexer", ...arguments);
  65158. }
  65159. function objectTypeProperty(key, value, variance2) {
  65160. return (0, _builder.default)("ObjectTypeProperty", ...arguments);
  65161. }
  65162. function objectTypeSpreadProperty(argument) {
  65163. return (0, _builder.default)("ObjectTypeSpreadProperty", ...arguments);
  65164. }
  65165. function opaqueType(id, typeParameters, supertype, impltype) {
  65166. return (0, _builder.default)("OpaqueType", ...arguments);
  65167. }
  65168. function qualifiedTypeIdentifier(id, qualification) {
  65169. return (0, _builder.default)("QualifiedTypeIdentifier", ...arguments);
  65170. }
  65171. function stringLiteralTypeAnnotation(value) {
  65172. return (0, _builder.default)("StringLiteralTypeAnnotation", ...arguments);
  65173. }
  65174. function stringTypeAnnotation() {
  65175. return (0, _builder.default)("StringTypeAnnotation", ...arguments);
  65176. }
  65177. function symbolTypeAnnotation() {
  65178. return (0, _builder.default)("SymbolTypeAnnotation", ...arguments);
  65179. }
  65180. function thisTypeAnnotation() {
  65181. return (0, _builder.default)("ThisTypeAnnotation", ...arguments);
  65182. }
  65183. function tupleTypeAnnotation(types2) {
  65184. return (0, _builder.default)("TupleTypeAnnotation", ...arguments);
  65185. }
  65186. function typeofTypeAnnotation(argument) {
  65187. return (0, _builder.default)("TypeofTypeAnnotation", ...arguments);
  65188. }
  65189. function typeAlias(id, typeParameters, right) {
  65190. return (0, _builder.default)("TypeAlias", ...arguments);
  65191. }
  65192. function typeAnnotation(typeAnnotation2) {
  65193. return (0, _builder.default)("TypeAnnotation", ...arguments);
  65194. }
  65195. function typeCastExpression(expression, typeAnnotation2) {
  65196. return (0, _builder.default)("TypeCastExpression", ...arguments);
  65197. }
  65198. function typeParameter(bound, _default, variance2) {
  65199. return (0, _builder.default)("TypeParameter", ...arguments);
  65200. }
  65201. function typeParameterDeclaration(params) {
  65202. return (0, _builder.default)("TypeParameterDeclaration", ...arguments);
  65203. }
  65204. function typeParameterInstantiation(params) {
  65205. return (0, _builder.default)("TypeParameterInstantiation", ...arguments);
  65206. }
  65207. function unionTypeAnnotation(types2) {
  65208. return (0, _builder.default)("UnionTypeAnnotation", ...arguments);
  65209. }
  65210. function variance(kind) {
  65211. return (0, _builder.default)("Variance", ...arguments);
  65212. }
  65213. function voidTypeAnnotation() {
  65214. return (0, _builder.default)("VoidTypeAnnotation", ...arguments);
  65215. }
  65216. function enumDeclaration(id, body) {
  65217. return (0, _builder.default)("EnumDeclaration", ...arguments);
  65218. }
  65219. function enumBooleanBody(members) {
  65220. return (0, _builder.default)("EnumBooleanBody", ...arguments);
  65221. }
  65222. function enumNumberBody(members) {
  65223. return (0, _builder.default)("EnumNumberBody", ...arguments);
  65224. }
  65225. function enumStringBody(members) {
  65226. return (0, _builder.default)("EnumStringBody", ...arguments);
  65227. }
  65228. function enumSymbolBody(members) {
  65229. return (0, _builder.default)("EnumSymbolBody", ...arguments);
  65230. }
  65231. function enumBooleanMember(id) {
  65232. return (0, _builder.default)("EnumBooleanMember", ...arguments);
  65233. }
  65234. function enumNumberMember(id, init) {
  65235. return (0, _builder.default)("EnumNumberMember", ...arguments);
  65236. }
  65237. function enumStringMember(id, init) {
  65238. return (0, _builder.default)("EnumStringMember", ...arguments);
  65239. }
  65240. function enumDefaultedMember(id) {
  65241. return (0, _builder.default)("EnumDefaultedMember", ...arguments);
  65242. }
  65243. function indexedAccessType(objectType, indexType) {
  65244. return (0, _builder.default)("IndexedAccessType", ...arguments);
  65245. }
  65246. function optionalIndexedAccessType(objectType, indexType) {
  65247. return (0, _builder.default)("OptionalIndexedAccessType", ...arguments);
  65248. }
  65249. function jsxAttribute(name2, value) {
  65250. return (0, _builder.default)("JSXAttribute", ...arguments);
  65251. }
  65252. function jsxClosingElement(name2) {
  65253. return (0, _builder.default)("JSXClosingElement", ...arguments);
  65254. }
  65255. function jsxElement(openingElement, closingElement, children, selfClosing) {
  65256. return (0, _builder.default)("JSXElement", ...arguments);
  65257. }
  65258. function jsxEmptyExpression() {
  65259. return (0, _builder.default)("JSXEmptyExpression", ...arguments);
  65260. }
  65261. function jsxExpressionContainer(expression) {
  65262. return (0, _builder.default)("JSXExpressionContainer", ...arguments);
  65263. }
  65264. function jsxSpreadChild(expression) {
  65265. return (0, _builder.default)("JSXSpreadChild", ...arguments);
  65266. }
  65267. function jsxIdentifier(name2) {
  65268. return (0, _builder.default)("JSXIdentifier", ...arguments);
  65269. }
  65270. function jsxMemberExpression(object, property) {
  65271. return (0, _builder.default)("JSXMemberExpression", ...arguments);
  65272. }
  65273. function jsxNamespacedName(namespace, name2) {
  65274. return (0, _builder.default)("JSXNamespacedName", ...arguments);
  65275. }
  65276. function jsxOpeningElement(name2, attributes, selfClosing) {
  65277. return (0, _builder.default)("JSXOpeningElement", ...arguments);
  65278. }
  65279. function jsxSpreadAttribute(argument) {
  65280. return (0, _builder.default)("JSXSpreadAttribute", ...arguments);
  65281. }
  65282. function jsxText2(value) {
  65283. return (0, _builder.default)("JSXText", ...arguments);
  65284. }
  65285. function jsxFragment(openingFragment, closingFragment, children) {
  65286. return (0, _builder.default)("JSXFragment", ...arguments);
  65287. }
  65288. function jsxOpeningFragment() {
  65289. return (0, _builder.default)("JSXOpeningFragment", ...arguments);
  65290. }
  65291. function jsxClosingFragment() {
  65292. return (0, _builder.default)("JSXClosingFragment", ...arguments);
  65293. }
  65294. function noop() {
  65295. return (0, _builder.default)("Noop", ...arguments);
  65296. }
  65297. function placeholder(expectedNode, name2) {
  65298. return (0, _builder.default)("Placeholder", ...arguments);
  65299. }
  65300. function v8IntrinsicIdentifier(name2) {
  65301. return (0, _builder.default)("V8IntrinsicIdentifier", ...arguments);
  65302. }
  65303. function argumentPlaceholder() {
  65304. return (0, _builder.default)("ArgumentPlaceholder", ...arguments);
  65305. }
  65306. function bindExpression(object, callee) {
  65307. return (0, _builder.default)("BindExpression", ...arguments);
  65308. }
  65309. function classProperty(key, value, typeAnnotation2, decorators, computed, _static) {
  65310. return (0, _builder.default)("ClassProperty", ...arguments);
  65311. }
  65312. function pipelineTopicExpression(expression) {
  65313. return (0, _builder.default)("PipelineTopicExpression", ...arguments);
  65314. }
  65315. function pipelineBareFunction(callee) {
  65316. return (0, _builder.default)("PipelineBareFunction", ...arguments);
  65317. }
  65318. function pipelinePrimaryTopicReference() {
  65319. return (0, _builder.default)("PipelinePrimaryTopicReference", ...arguments);
  65320. }
  65321. function classPrivateProperty(key, value, decorators, _static) {
  65322. return (0, _builder.default)("ClassPrivateProperty", ...arguments);
  65323. }
  65324. function classPrivateMethod(kind, key, params, body, _static) {
  65325. return (0, _builder.default)("ClassPrivateMethod", ...arguments);
  65326. }
  65327. function importAttribute(key, value) {
  65328. return (0, _builder.default)("ImportAttribute", ...arguments);
  65329. }
  65330. function decorator(expression) {
  65331. return (0, _builder.default)("Decorator", ...arguments);
  65332. }
  65333. function doExpression(body, async) {
  65334. return (0, _builder.default)("DoExpression", ...arguments);
  65335. }
  65336. function exportDefaultSpecifier(exported) {
  65337. return (0, _builder.default)("ExportDefaultSpecifier", ...arguments);
  65338. }
  65339. function privateName(id) {
  65340. return (0, _builder.default)("PrivateName", ...arguments);
  65341. }
  65342. function recordExpression(properties) {
  65343. return (0, _builder.default)("RecordExpression", ...arguments);
  65344. }
  65345. function tupleExpression(elements) {
  65346. return (0, _builder.default)("TupleExpression", ...arguments);
  65347. }
  65348. function decimalLiteral(value) {
  65349. return (0, _builder.default)("DecimalLiteral", ...arguments);
  65350. }
  65351. function staticBlock(body) {
  65352. return (0, _builder.default)("StaticBlock", ...arguments);
  65353. }
  65354. function moduleExpression(body) {
  65355. return (0, _builder.default)("ModuleExpression", ...arguments);
  65356. }
  65357. function tsParameterProperty(parameter) {
  65358. return (0, _builder.default)("TSParameterProperty", ...arguments);
  65359. }
  65360. function tsDeclareFunction(id, typeParameters, params, returnType) {
  65361. return (0, _builder.default)("TSDeclareFunction", ...arguments);
  65362. }
  65363. function tsDeclareMethod(decorators, key, typeParameters, params, returnType) {
  65364. return (0, _builder.default)("TSDeclareMethod", ...arguments);
  65365. }
  65366. function tsQualifiedName(left, right) {
  65367. return (0, _builder.default)("TSQualifiedName", ...arguments);
  65368. }
  65369. function tsCallSignatureDeclaration(typeParameters, parameters, typeAnnotation2) {
  65370. return (0, _builder.default)("TSCallSignatureDeclaration", ...arguments);
  65371. }
  65372. function tsConstructSignatureDeclaration(typeParameters, parameters, typeAnnotation2) {
  65373. return (0, _builder.default)("TSConstructSignatureDeclaration", ...arguments);
  65374. }
  65375. function tsPropertySignature(key, typeAnnotation2, initializer) {
  65376. return (0, _builder.default)("TSPropertySignature", ...arguments);
  65377. }
  65378. function tsMethodSignature(key, typeParameters, parameters, typeAnnotation2) {
  65379. return (0, _builder.default)("TSMethodSignature", ...arguments);
  65380. }
  65381. function tsIndexSignature(parameters, typeAnnotation2) {
  65382. return (0, _builder.default)("TSIndexSignature", ...arguments);
  65383. }
  65384. function tsAnyKeyword() {
  65385. return (0, _builder.default)("TSAnyKeyword", ...arguments);
  65386. }
  65387. function tsBooleanKeyword() {
  65388. return (0, _builder.default)("TSBooleanKeyword", ...arguments);
  65389. }
  65390. function tsBigIntKeyword() {
  65391. return (0, _builder.default)("TSBigIntKeyword", ...arguments);
  65392. }
  65393. function tsIntrinsicKeyword() {
  65394. return (0, _builder.default)("TSIntrinsicKeyword", ...arguments);
  65395. }
  65396. function tsNeverKeyword() {
  65397. return (0, _builder.default)("TSNeverKeyword", ...arguments);
  65398. }
  65399. function tsNullKeyword() {
  65400. return (0, _builder.default)("TSNullKeyword", ...arguments);
  65401. }
  65402. function tsNumberKeyword() {
  65403. return (0, _builder.default)("TSNumberKeyword", ...arguments);
  65404. }
  65405. function tsObjectKeyword() {
  65406. return (0, _builder.default)("TSObjectKeyword", ...arguments);
  65407. }
  65408. function tsStringKeyword() {
  65409. return (0, _builder.default)("TSStringKeyword", ...arguments);
  65410. }
  65411. function tsSymbolKeyword() {
  65412. return (0, _builder.default)("TSSymbolKeyword", ...arguments);
  65413. }
  65414. function tsUndefinedKeyword() {
  65415. return (0, _builder.default)("TSUndefinedKeyword", ...arguments);
  65416. }
  65417. function tsUnknownKeyword() {
  65418. return (0, _builder.default)("TSUnknownKeyword", ...arguments);
  65419. }
  65420. function tsVoidKeyword() {
  65421. return (0, _builder.default)("TSVoidKeyword", ...arguments);
  65422. }
  65423. function tsThisType() {
  65424. return (0, _builder.default)("TSThisType", ...arguments);
  65425. }
  65426. function tsFunctionType(typeParameters, parameters, typeAnnotation2) {
  65427. return (0, _builder.default)("TSFunctionType", ...arguments);
  65428. }
  65429. function tsConstructorType(typeParameters, parameters, typeAnnotation2) {
  65430. return (0, _builder.default)("TSConstructorType", ...arguments);
  65431. }
  65432. function tsTypeReference(typeName, typeParameters) {
  65433. return (0, _builder.default)("TSTypeReference", ...arguments);
  65434. }
  65435. function tsTypePredicate(parameterName, typeAnnotation2, asserts) {
  65436. return (0, _builder.default)("TSTypePredicate", ...arguments);
  65437. }
  65438. function tsTypeQuery(exprName) {
  65439. return (0, _builder.default)("TSTypeQuery", ...arguments);
  65440. }
  65441. function tsTypeLiteral(members) {
  65442. return (0, _builder.default)("TSTypeLiteral", ...arguments);
  65443. }
  65444. function tsArrayType(elementType) {
  65445. return (0, _builder.default)("TSArrayType", ...arguments);
  65446. }
  65447. function tsTupleType(elementTypes) {
  65448. return (0, _builder.default)("TSTupleType", ...arguments);
  65449. }
  65450. function tsOptionalType(typeAnnotation2) {
  65451. return (0, _builder.default)("TSOptionalType", ...arguments);
  65452. }
  65453. function tsRestType(typeAnnotation2) {
  65454. return (0, _builder.default)("TSRestType", ...arguments);
  65455. }
  65456. function tsNamedTupleMember(label, elementType, optional) {
  65457. return (0, _builder.default)("TSNamedTupleMember", ...arguments);
  65458. }
  65459. function tsUnionType(types2) {
  65460. return (0, _builder.default)("TSUnionType", ...arguments);
  65461. }
  65462. function tsIntersectionType(types2) {
  65463. return (0, _builder.default)("TSIntersectionType", ...arguments);
  65464. }
  65465. function tsConditionalType(checkType, extendsType, trueType, falseType) {
  65466. return (0, _builder.default)("TSConditionalType", ...arguments);
  65467. }
  65468. function tsInferType(typeParameter2) {
  65469. return (0, _builder.default)("TSInferType", ...arguments);
  65470. }
  65471. function tsParenthesizedType(typeAnnotation2) {
  65472. return (0, _builder.default)("TSParenthesizedType", ...arguments);
  65473. }
  65474. function tsTypeOperator(typeAnnotation2) {
  65475. return (0, _builder.default)("TSTypeOperator", ...arguments);
  65476. }
  65477. function tsIndexedAccessType(objectType, indexType) {
  65478. return (0, _builder.default)("TSIndexedAccessType", ...arguments);
  65479. }
  65480. function tsMappedType(typeParameter2, typeAnnotation2, nameType) {
  65481. return (0, _builder.default)("TSMappedType", ...arguments);
  65482. }
  65483. function tsLiteralType(literal2) {
  65484. return (0, _builder.default)("TSLiteralType", ...arguments);
  65485. }
  65486. function tsExpressionWithTypeArguments(expression, typeParameters) {
  65487. return (0, _builder.default)("TSExpressionWithTypeArguments", ...arguments);
  65488. }
  65489. function tsInterfaceDeclaration(id, typeParameters, _extends, body) {
  65490. return (0, _builder.default)("TSInterfaceDeclaration", ...arguments);
  65491. }
  65492. function tsInterfaceBody(body) {
  65493. return (0, _builder.default)("TSInterfaceBody", ...arguments);
  65494. }
  65495. function tsTypeAliasDeclaration(id, typeParameters, typeAnnotation2) {
  65496. return (0, _builder.default)("TSTypeAliasDeclaration", ...arguments);
  65497. }
  65498. function tsAsExpression(expression, typeAnnotation2) {
  65499. return (0, _builder.default)("TSAsExpression", ...arguments);
  65500. }
  65501. function tsTypeAssertion(typeAnnotation2, expression) {
  65502. return (0, _builder.default)("TSTypeAssertion", ...arguments);
  65503. }
  65504. function tsEnumDeclaration(id, members) {
  65505. return (0, _builder.default)("TSEnumDeclaration", ...arguments);
  65506. }
  65507. function tsEnumMember(id, initializer) {
  65508. return (0, _builder.default)("TSEnumMember", ...arguments);
  65509. }
  65510. function tsModuleDeclaration(id, body) {
  65511. return (0, _builder.default)("TSModuleDeclaration", ...arguments);
  65512. }
  65513. function tsModuleBlock(body) {
  65514. return (0, _builder.default)("TSModuleBlock", ...arguments);
  65515. }
  65516. function tsImportType(argument, qualifier, typeParameters) {
  65517. return (0, _builder.default)("TSImportType", ...arguments);
  65518. }
  65519. function tsImportEqualsDeclaration(id, moduleReference) {
  65520. return (0, _builder.default)("TSImportEqualsDeclaration", ...arguments);
  65521. }
  65522. function tsExternalModuleReference(expression) {
  65523. return (0, _builder.default)("TSExternalModuleReference", ...arguments);
  65524. }
  65525. function tsNonNullExpression(expression) {
  65526. return (0, _builder.default)("TSNonNullExpression", ...arguments);
  65527. }
  65528. function tsExportAssignment(expression) {
  65529. return (0, _builder.default)("TSExportAssignment", ...arguments);
  65530. }
  65531. function tsNamespaceExportDeclaration(id) {
  65532. return (0, _builder.default)("TSNamespaceExportDeclaration", ...arguments);
  65533. }
  65534. function tsTypeAnnotation(typeAnnotation2) {
  65535. return (0, _builder.default)("TSTypeAnnotation", ...arguments);
  65536. }
  65537. function tsTypeParameterInstantiation(params) {
  65538. return (0, _builder.default)("TSTypeParameterInstantiation", ...arguments);
  65539. }
  65540. function tsTypeParameterDeclaration(params) {
  65541. return (0, _builder.default)("TSTypeParameterDeclaration", ...arguments);
  65542. }
  65543. function tsTypeParameter(constraint, _default, name2) {
  65544. return (0, _builder.default)("TSTypeParameter", ...arguments);
  65545. }
  65546. function NumberLiteral(...args) {
  65547. console.trace("The node type NumberLiteral has been renamed to NumericLiteral");
  65548. return (0, _builder.default)("NumberLiteral", ...args);
  65549. }
  65550. function RegexLiteral(...args) {
  65551. console.trace("The node type RegexLiteral has been renamed to RegExpLiteral");
  65552. return (0, _builder.default)("RegexLiteral", ...args);
  65553. }
  65554. function RestProperty(...args) {
  65555. console.trace("The node type RestProperty has been renamed to RestElement");
  65556. return (0, _builder.default)("RestProperty", ...args);
  65557. }
  65558. function SpreadProperty(...args) {
  65559. console.trace("The node type SpreadProperty has been renamed to SpreadElement");
  65560. return (0, _builder.default)("SpreadProperty", ...args);
  65561. }
  65562. }
  65563. });
  65564. // node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/utils/react/cleanJSXElementLiteralChild.js
  65565. var require_cleanJSXElementLiteralChild3 = __commonJS({
  65566. "node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/utils/react/cleanJSXElementLiteralChild.js"(exports) {
  65567. "use strict";
  65568. Object.defineProperty(exports, "__esModule", {
  65569. value: true
  65570. });
  65571. exports.default = cleanJSXElementLiteralChild;
  65572. var _generated = require_generated12();
  65573. function cleanJSXElementLiteralChild(child, args) {
  65574. const lines = child.value.split(/\r\n|\n|\r/);
  65575. let lastNonEmptyLine = 0;
  65576. for (let i = 0; i < lines.length; i++) {
  65577. if (lines[i].match(/[^ \t]/)) {
  65578. lastNonEmptyLine = i;
  65579. }
  65580. }
  65581. let str = "";
  65582. for (let i = 0; i < lines.length; i++) {
  65583. const line = lines[i];
  65584. const isFirstLine = i === 0;
  65585. const isLastLine = i === lines.length - 1;
  65586. const isLastNonEmptyLine = i === lastNonEmptyLine;
  65587. let trimmedLine = line.replace(/\t/g, " ");
  65588. if (!isFirstLine) {
  65589. trimmedLine = trimmedLine.replace(/^[ ]+/, "");
  65590. }
  65591. if (!isLastLine) {
  65592. trimmedLine = trimmedLine.replace(/[ ]+$/, "");
  65593. }
  65594. if (trimmedLine) {
  65595. if (!isLastNonEmptyLine) {
  65596. trimmedLine += " ";
  65597. }
  65598. str += trimmedLine;
  65599. }
  65600. }
  65601. if (str)
  65602. args.push((0, _generated.stringLiteral)(str));
  65603. }
  65604. }
  65605. });
  65606. // node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/builders/react/buildChildren.js
  65607. var require_buildChildren3 = __commonJS({
  65608. "node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/builders/react/buildChildren.js"(exports) {
  65609. "use strict";
  65610. Object.defineProperty(exports, "__esModule", {
  65611. value: true
  65612. });
  65613. exports.default = buildChildren;
  65614. var _generated = require_generated11();
  65615. var _cleanJSXElementLiteralChild = require_cleanJSXElementLiteralChild3();
  65616. function buildChildren(node) {
  65617. const elements = [];
  65618. for (let i = 0; i < node.children.length; i++) {
  65619. let child = node.children[i];
  65620. if ((0, _generated.isJSXText)(child)) {
  65621. (0, _cleanJSXElementLiteralChild.default)(child, elements);
  65622. continue;
  65623. }
  65624. if ((0, _generated.isJSXExpressionContainer)(child))
  65625. child = child.expression;
  65626. if ((0, _generated.isJSXEmptyExpression)(child))
  65627. continue;
  65628. elements.push(child);
  65629. }
  65630. return elements;
  65631. }
  65632. }
  65633. });
  65634. // node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/validators/isNode.js
  65635. var require_isNode3 = __commonJS({
  65636. "node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/validators/isNode.js"(exports) {
  65637. "use strict";
  65638. Object.defineProperty(exports, "__esModule", {
  65639. value: true
  65640. });
  65641. exports.default = isNode;
  65642. var _definitions = require_definitions3();
  65643. function isNode(node) {
  65644. return !!(node && _definitions.VISITOR_KEYS[node.type]);
  65645. }
  65646. }
  65647. });
  65648. // node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/asserts/assertNode.js
  65649. var require_assertNode3 = __commonJS({
  65650. "node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/asserts/assertNode.js"(exports) {
  65651. "use strict";
  65652. Object.defineProperty(exports, "__esModule", {
  65653. value: true
  65654. });
  65655. exports.default = assertNode2;
  65656. var _isNode = require_isNode3();
  65657. function assertNode2(node) {
  65658. if (!(0, _isNode.default)(node)) {
  65659. var _node$type;
  65660. const type = (_node$type = node == null ? void 0 : node.type) != null ? _node$type : JSON.stringify(node);
  65661. throw new TypeError(`Not a valid node of type "${type}"`);
  65662. }
  65663. }
  65664. }
  65665. });
  65666. // node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/asserts/generated/index.js
  65667. var require_generated13 = __commonJS({
  65668. "node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/asserts/generated/index.js"(exports) {
  65669. "use strict";
  65670. Object.defineProperty(exports, "__esModule", {
  65671. value: true
  65672. });
  65673. exports.assertArrayExpression = assertArrayExpression;
  65674. exports.assertAssignmentExpression = assertAssignmentExpression;
  65675. exports.assertBinaryExpression = assertBinaryExpression;
  65676. exports.assertInterpreterDirective = assertInterpreterDirective;
  65677. exports.assertDirective = assertDirective;
  65678. exports.assertDirectiveLiteral = assertDirectiveLiteral;
  65679. exports.assertBlockStatement = assertBlockStatement;
  65680. exports.assertBreakStatement = assertBreakStatement;
  65681. exports.assertCallExpression = assertCallExpression;
  65682. exports.assertCatchClause = assertCatchClause;
  65683. exports.assertConditionalExpression = assertConditionalExpression;
  65684. exports.assertContinueStatement = assertContinueStatement;
  65685. exports.assertDebuggerStatement = assertDebuggerStatement;
  65686. exports.assertDoWhileStatement = assertDoWhileStatement;
  65687. exports.assertEmptyStatement = assertEmptyStatement;
  65688. exports.assertExpressionStatement = assertExpressionStatement;
  65689. exports.assertFile = assertFile;
  65690. exports.assertForInStatement = assertForInStatement;
  65691. exports.assertForStatement = assertForStatement;
  65692. exports.assertFunctionDeclaration = assertFunctionDeclaration;
  65693. exports.assertFunctionExpression = assertFunctionExpression;
  65694. exports.assertIdentifier = assertIdentifier;
  65695. exports.assertIfStatement = assertIfStatement;
  65696. exports.assertLabeledStatement = assertLabeledStatement;
  65697. exports.assertStringLiteral = assertStringLiteral;
  65698. exports.assertNumericLiteral = assertNumericLiteral;
  65699. exports.assertNullLiteral = assertNullLiteral;
  65700. exports.assertBooleanLiteral = assertBooleanLiteral;
  65701. exports.assertRegExpLiteral = assertRegExpLiteral;
  65702. exports.assertLogicalExpression = assertLogicalExpression;
  65703. exports.assertMemberExpression = assertMemberExpression;
  65704. exports.assertNewExpression = assertNewExpression;
  65705. exports.assertProgram = assertProgram;
  65706. exports.assertObjectExpression = assertObjectExpression;
  65707. exports.assertObjectMethod = assertObjectMethod;
  65708. exports.assertObjectProperty = assertObjectProperty;
  65709. exports.assertRestElement = assertRestElement;
  65710. exports.assertReturnStatement = assertReturnStatement;
  65711. exports.assertSequenceExpression = assertSequenceExpression;
  65712. exports.assertParenthesizedExpression = assertParenthesizedExpression;
  65713. exports.assertSwitchCase = assertSwitchCase;
  65714. exports.assertSwitchStatement = assertSwitchStatement;
  65715. exports.assertThisExpression = assertThisExpression;
  65716. exports.assertThrowStatement = assertThrowStatement;
  65717. exports.assertTryStatement = assertTryStatement;
  65718. exports.assertUnaryExpression = assertUnaryExpression;
  65719. exports.assertUpdateExpression = assertUpdateExpression;
  65720. exports.assertVariableDeclaration = assertVariableDeclaration;
  65721. exports.assertVariableDeclarator = assertVariableDeclarator;
  65722. exports.assertWhileStatement = assertWhileStatement;
  65723. exports.assertWithStatement = assertWithStatement;
  65724. exports.assertAssignmentPattern = assertAssignmentPattern;
  65725. exports.assertArrayPattern = assertArrayPattern;
  65726. exports.assertArrowFunctionExpression = assertArrowFunctionExpression;
  65727. exports.assertClassBody = assertClassBody;
  65728. exports.assertClassExpression = assertClassExpression;
  65729. exports.assertClassDeclaration = assertClassDeclaration;
  65730. exports.assertExportAllDeclaration = assertExportAllDeclaration;
  65731. exports.assertExportDefaultDeclaration = assertExportDefaultDeclaration;
  65732. exports.assertExportNamedDeclaration = assertExportNamedDeclaration;
  65733. exports.assertExportSpecifier = assertExportSpecifier;
  65734. exports.assertForOfStatement = assertForOfStatement;
  65735. exports.assertImportDeclaration = assertImportDeclaration;
  65736. exports.assertImportDefaultSpecifier = assertImportDefaultSpecifier;
  65737. exports.assertImportNamespaceSpecifier = assertImportNamespaceSpecifier;
  65738. exports.assertImportSpecifier = assertImportSpecifier;
  65739. exports.assertMetaProperty = assertMetaProperty;
  65740. exports.assertClassMethod = assertClassMethod;
  65741. exports.assertObjectPattern = assertObjectPattern;
  65742. exports.assertSpreadElement = assertSpreadElement;
  65743. exports.assertSuper = assertSuper;
  65744. exports.assertTaggedTemplateExpression = assertTaggedTemplateExpression;
  65745. exports.assertTemplateElement = assertTemplateElement;
  65746. exports.assertTemplateLiteral = assertTemplateLiteral;
  65747. exports.assertYieldExpression = assertYieldExpression;
  65748. exports.assertAwaitExpression = assertAwaitExpression;
  65749. exports.assertImport = assertImport;
  65750. exports.assertBigIntLiteral = assertBigIntLiteral;
  65751. exports.assertExportNamespaceSpecifier = assertExportNamespaceSpecifier;
  65752. exports.assertOptionalMemberExpression = assertOptionalMemberExpression;
  65753. exports.assertOptionalCallExpression = assertOptionalCallExpression;
  65754. exports.assertAnyTypeAnnotation = assertAnyTypeAnnotation;
  65755. exports.assertArrayTypeAnnotation = assertArrayTypeAnnotation;
  65756. exports.assertBooleanTypeAnnotation = assertBooleanTypeAnnotation;
  65757. exports.assertBooleanLiteralTypeAnnotation = assertBooleanLiteralTypeAnnotation;
  65758. exports.assertNullLiteralTypeAnnotation = assertNullLiteralTypeAnnotation;
  65759. exports.assertClassImplements = assertClassImplements;
  65760. exports.assertDeclareClass = assertDeclareClass;
  65761. exports.assertDeclareFunction = assertDeclareFunction;
  65762. exports.assertDeclareInterface = assertDeclareInterface;
  65763. exports.assertDeclareModule = assertDeclareModule;
  65764. exports.assertDeclareModuleExports = assertDeclareModuleExports;
  65765. exports.assertDeclareTypeAlias = assertDeclareTypeAlias;
  65766. exports.assertDeclareOpaqueType = assertDeclareOpaqueType;
  65767. exports.assertDeclareVariable = assertDeclareVariable;
  65768. exports.assertDeclareExportDeclaration = assertDeclareExportDeclaration;
  65769. exports.assertDeclareExportAllDeclaration = assertDeclareExportAllDeclaration;
  65770. exports.assertDeclaredPredicate = assertDeclaredPredicate;
  65771. exports.assertExistsTypeAnnotation = assertExistsTypeAnnotation;
  65772. exports.assertFunctionTypeAnnotation = assertFunctionTypeAnnotation;
  65773. exports.assertFunctionTypeParam = assertFunctionTypeParam;
  65774. exports.assertGenericTypeAnnotation = assertGenericTypeAnnotation;
  65775. exports.assertInferredPredicate = assertInferredPredicate;
  65776. exports.assertInterfaceExtends = assertInterfaceExtends;
  65777. exports.assertInterfaceDeclaration = assertInterfaceDeclaration;
  65778. exports.assertInterfaceTypeAnnotation = assertInterfaceTypeAnnotation;
  65779. exports.assertIntersectionTypeAnnotation = assertIntersectionTypeAnnotation;
  65780. exports.assertMixedTypeAnnotation = assertMixedTypeAnnotation;
  65781. exports.assertEmptyTypeAnnotation = assertEmptyTypeAnnotation;
  65782. exports.assertNullableTypeAnnotation = assertNullableTypeAnnotation;
  65783. exports.assertNumberLiteralTypeAnnotation = assertNumberLiteralTypeAnnotation;
  65784. exports.assertNumberTypeAnnotation = assertNumberTypeAnnotation;
  65785. exports.assertObjectTypeAnnotation = assertObjectTypeAnnotation;
  65786. exports.assertObjectTypeInternalSlot = assertObjectTypeInternalSlot;
  65787. exports.assertObjectTypeCallProperty = assertObjectTypeCallProperty;
  65788. exports.assertObjectTypeIndexer = assertObjectTypeIndexer;
  65789. exports.assertObjectTypeProperty = assertObjectTypeProperty;
  65790. exports.assertObjectTypeSpreadProperty = assertObjectTypeSpreadProperty;
  65791. exports.assertOpaqueType = assertOpaqueType;
  65792. exports.assertQualifiedTypeIdentifier = assertQualifiedTypeIdentifier;
  65793. exports.assertStringLiteralTypeAnnotation = assertStringLiteralTypeAnnotation;
  65794. exports.assertStringTypeAnnotation = assertStringTypeAnnotation;
  65795. exports.assertSymbolTypeAnnotation = assertSymbolTypeAnnotation;
  65796. exports.assertThisTypeAnnotation = assertThisTypeAnnotation;
  65797. exports.assertTupleTypeAnnotation = assertTupleTypeAnnotation;
  65798. exports.assertTypeofTypeAnnotation = assertTypeofTypeAnnotation;
  65799. exports.assertTypeAlias = assertTypeAlias;
  65800. exports.assertTypeAnnotation = assertTypeAnnotation;
  65801. exports.assertTypeCastExpression = assertTypeCastExpression;
  65802. exports.assertTypeParameter = assertTypeParameter;
  65803. exports.assertTypeParameterDeclaration = assertTypeParameterDeclaration;
  65804. exports.assertTypeParameterInstantiation = assertTypeParameterInstantiation;
  65805. exports.assertUnionTypeAnnotation = assertUnionTypeAnnotation;
  65806. exports.assertVariance = assertVariance;
  65807. exports.assertVoidTypeAnnotation = assertVoidTypeAnnotation;
  65808. exports.assertEnumDeclaration = assertEnumDeclaration;
  65809. exports.assertEnumBooleanBody = assertEnumBooleanBody;
  65810. exports.assertEnumNumberBody = assertEnumNumberBody;
  65811. exports.assertEnumStringBody = assertEnumStringBody;
  65812. exports.assertEnumSymbolBody = assertEnumSymbolBody;
  65813. exports.assertEnumBooleanMember = assertEnumBooleanMember;
  65814. exports.assertEnumNumberMember = assertEnumNumberMember;
  65815. exports.assertEnumStringMember = assertEnumStringMember;
  65816. exports.assertEnumDefaultedMember = assertEnumDefaultedMember;
  65817. exports.assertIndexedAccessType = assertIndexedAccessType;
  65818. exports.assertOptionalIndexedAccessType = assertOptionalIndexedAccessType;
  65819. exports.assertJSXAttribute = assertJSXAttribute;
  65820. exports.assertJSXClosingElement = assertJSXClosingElement;
  65821. exports.assertJSXElement = assertJSXElement;
  65822. exports.assertJSXEmptyExpression = assertJSXEmptyExpression;
  65823. exports.assertJSXExpressionContainer = assertJSXExpressionContainer;
  65824. exports.assertJSXSpreadChild = assertJSXSpreadChild;
  65825. exports.assertJSXIdentifier = assertJSXIdentifier;
  65826. exports.assertJSXMemberExpression = assertJSXMemberExpression;
  65827. exports.assertJSXNamespacedName = assertJSXNamespacedName;
  65828. exports.assertJSXOpeningElement = assertJSXOpeningElement;
  65829. exports.assertJSXSpreadAttribute = assertJSXSpreadAttribute;
  65830. exports.assertJSXText = assertJSXText;
  65831. exports.assertJSXFragment = assertJSXFragment;
  65832. exports.assertJSXOpeningFragment = assertJSXOpeningFragment;
  65833. exports.assertJSXClosingFragment = assertJSXClosingFragment;
  65834. exports.assertNoop = assertNoop;
  65835. exports.assertPlaceholder = assertPlaceholder;
  65836. exports.assertV8IntrinsicIdentifier = assertV8IntrinsicIdentifier;
  65837. exports.assertArgumentPlaceholder = assertArgumentPlaceholder;
  65838. exports.assertBindExpression = assertBindExpression;
  65839. exports.assertClassProperty = assertClassProperty;
  65840. exports.assertPipelineTopicExpression = assertPipelineTopicExpression;
  65841. exports.assertPipelineBareFunction = assertPipelineBareFunction;
  65842. exports.assertPipelinePrimaryTopicReference = assertPipelinePrimaryTopicReference;
  65843. exports.assertClassPrivateProperty = assertClassPrivateProperty;
  65844. exports.assertClassPrivateMethod = assertClassPrivateMethod;
  65845. exports.assertImportAttribute = assertImportAttribute;
  65846. exports.assertDecorator = assertDecorator;
  65847. exports.assertDoExpression = assertDoExpression;
  65848. exports.assertExportDefaultSpecifier = assertExportDefaultSpecifier;
  65849. exports.assertPrivateName = assertPrivateName;
  65850. exports.assertRecordExpression = assertRecordExpression;
  65851. exports.assertTupleExpression = assertTupleExpression;
  65852. exports.assertDecimalLiteral = assertDecimalLiteral;
  65853. exports.assertStaticBlock = assertStaticBlock;
  65854. exports.assertModuleExpression = assertModuleExpression;
  65855. exports.assertTSParameterProperty = assertTSParameterProperty;
  65856. exports.assertTSDeclareFunction = assertTSDeclareFunction;
  65857. exports.assertTSDeclareMethod = assertTSDeclareMethod;
  65858. exports.assertTSQualifiedName = assertTSQualifiedName;
  65859. exports.assertTSCallSignatureDeclaration = assertTSCallSignatureDeclaration;
  65860. exports.assertTSConstructSignatureDeclaration = assertTSConstructSignatureDeclaration;
  65861. exports.assertTSPropertySignature = assertTSPropertySignature;
  65862. exports.assertTSMethodSignature = assertTSMethodSignature;
  65863. exports.assertTSIndexSignature = assertTSIndexSignature;
  65864. exports.assertTSAnyKeyword = assertTSAnyKeyword;
  65865. exports.assertTSBooleanKeyword = assertTSBooleanKeyword;
  65866. exports.assertTSBigIntKeyword = assertTSBigIntKeyword;
  65867. exports.assertTSIntrinsicKeyword = assertTSIntrinsicKeyword;
  65868. exports.assertTSNeverKeyword = assertTSNeverKeyword;
  65869. exports.assertTSNullKeyword = assertTSNullKeyword;
  65870. exports.assertTSNumberKeyword = assertTSNumberKeyword;
  65871. exports.assertTSObjectKeyword = assertTSObjectKeyword;
  65872. exports.assertTSStringKeyword = assertTSStringKeyword;
  65873. exports.assertTSSymbolKeyword = assertTSSymbolKeyword;
  65874. exports.assertTSUndefinedKeyword = assertTSUndefinedKeyword;
  65875. exports.assertTSUnknownKeyword = assertTSUnknownKeyword;
  65876. exports.assertTSVoidKeyword = assertTSVoidKeyword;
  65877. exports.assertTSThisType = assertTSThisType;
  65878. exports.assertTSFunctionType = assertTSFunctionType;
  65879. exports.assertTSConstructorType = assertTSConstructorType;
  65880. exports.assertTSTypeReference = assertTSTypeReference;
  65881. exports.assertTSTypePredicate = assertTSTypePredicate;
  65882. exports.assertTSTypeQuery = assertTSTypeQuery;
  65883. exports.assertTSTypeLiteral = assertTSTypeLiteral;
  65884. exports.assertTSArrayType = assertTSArrayType;
  65885. exports.assertTSTupleType = assertTSTupleType;
  65886. exports.assertTSOptionalType = assertTSOptionalType;
  65887. exports.assertTSRestType = assertTSRestType;
  65888. exports.assertTSNamedTupleMember = assertTSNamedTupleMember;
  65889. exports.assertTSUnionType = assertTSUnionType;
  65890. exports.assertTSIntersectionType = assertTSIntersectionType;
  65891. exports.assertTSConditionalType = assertTSConditionalType;
  65892. exports.assertTSInferType = assertTSInferType;
  65893. exports.assertTSParenthesizedType = assertTSParenthesizedType;
  65894. exports.assertTSTypeOperator = assertTSTypeOperator;
  65895. exports.assertTSIndexedAccessType = assertTSIndexedAccessType;
  65896. exports.assertTSMappedType = assertTSMappedType;
  65897. exports.assertTSLiteralType = assertTSLiteralType;
  65898. exports.assertTSExpressionWithTypeArguments = assertTSExpressionWithTypeArguments;
  65899. exports.assertTSInterfaceDeclaration = assertTSInterfaceDeclaration;
  65900. exports.assertTSInterfaceBody = assertTSInterfaceBody;
  65901. exports.assertTSTypeAliasDeclaration = assertTSTypeAliasDeclaration;
  65902. exports.assertTSAsExpression = assertTSAsExpression;
  65903. exports.assertTSTypeAssertion = assertTSTypeAssertion;
  65904. exports.assertTSEnumDeclaration = assertTSEnumDeclaration;
  65905. exports.assertTSEnumMember = assertTSEnumMember;
  65906. exports.assertTSModuleDeclaration = assertTSModuleDeclaration;
  65907. exports.assertTSModuleBlock = assertTSModuleBlock;
  65908. exports.assertTSImportType = assertTSImportType;
  65909. exports.assertTSImportEqualsDeclaration = assertTSImportEqualsDeclaration;
  65910. exports.assertTSExternalModuleReference = assertTSExternalModuleReference;
  65911. exports.assertTSNonNullExpression = assertTSNonNullExpression;
  65912. exports.assertTSExportAssignment = assertTSExportAssignment;
  65913. exports.assertTSNamespaceExportDeclaration = assertTSNamespaceExportDeclaration;
  65914. exports.assertTSTypeAnnotation = assertTSTypeAnnotation;
  65915. exports.assertTSTypeParameterInstantiation = assertTSTypeParameterInstantiation;
  65916. exports.assertTSTypeParameterDeclaration = assertTSTypeParameterDeclaration;
  65917. exports.assertTSTypeParameter = assertTSTypeParameter;
  65918. exports.assertExpression = assertExpression;
  65919. exports.assertBinary = assertBinary;
  65920. exports.assertScopable = assertScopable;
  65921. exports.assertBlockParent = assertBlockParent;
  65922. exports.assertBlock = assertBlock;
  65923. exports.assertStatement = assertStatement;
  65924. exports.assertTerminatorless = assertTerminatorless;
  65925. exports.assertCompletionStatement = assertCompletionStatement;
  65926. exports.assertConditional = assertConditional;
  65927. exports.assertLoop = assertLoop;
  65928. exports.assertWhile = assertWhile;
  65929. exports.assertExpressionWrapper = assertExpressionWrapper;
  65930. exports.assertFor = assertFor;
  65931. exports.assertForXStatement = assertForXStatement;
  65932. exports.assertFunction = assertFunction;
  65933. exports.assertFunctionParent = assertFunctionParent;
  65934. exports.assertPureish = assertPureish;
  65935. exports.assertDeclaration = assertDeclaration;
  65936. exports.assertPatternLike = assertPatternLike;
  65937. exports.assertLVal = assertLVal;
  65938. exports.assertTSEntityName = assertTSEntityName;
  65939. exports.assertLiteral = assertLiteral;
  65940. exports.assertImmutable = assertImmutable;
  65941. exports.assertUserWhitespacable = assertUserWhitespacable;
  65942. exports.assertMethod = assertMethod;
  65943. exports.assertObjectMember = assertObjectMember;
  65944. exports.assertProperty = assertProperty;
  65945. exports.assertUnaryLike = assertUnaryLike;
  65946. exports.assertPattern = assertPattern;
  65947. exports.assertClass = assertClass;
  65948. exports.assertModuleDeclaration = assertModuleDeclaration;
  65949. exports.assertExportDeclaration = assertExportDeclaration;
  65950. exports.assertModuleSpecifier = assertModuleSpecifier;
  65951. exports.assertFlow = assertFlow;
  65952. exports.assertFlowType = assertFlowType;
  65953. exports.assertFlowBaseAnnotation = assertFlowBaseAnnotation;
  65954. exports.assertFlowDeclaration = assertFlowDeclaration;
  65955. exports.assertFlowPredicate = assertFlowPredicate;
  65956. exports.assertEnumBody = assertEnumBody;
  65957. exports.assertEnumMember = assertEnumMember;
  65958. exports.assertJSX = assertJSX;
  65959. exports.assertPrivate = assertPrivate;
  65960. exports.assertTSTypeElement = assertTSTypeElement;
  65961. exports.assertTSType = assertTSType;
  65962. exports.assertTSBaseType = assertTSBaseType;
  65963. exports.assertNumberLiteral = assertNumberLiteral;
  65964. exports.assertRegexLiteral = assertRegexLiteral;
  65965. exports.assertRestProperty = assertRestProperty;
  65966. exports.assertSpreadProperty = assertSpreadProperty;
  65967. var _is = require_is3();
  65968. function assert(type, node, opts) {
  65969. if (!(0, _is.default)(type, node, opts)) {
  65970. throw new Error(`Expected type "${type}" with option ${JSON.stringify(opts)}, but instead got "${node.type}".`);
  65971. }
  65972. }
  65973. function assertArrayExpression(node, opts) {
  65974. assert("ArrayExpression", node, opts);
  65975. }
  65976. function assertAssignmentExpression(node, opts) {
  65977. assert("AssignmentExpression", node, opts);
  65978. }
  65979. function assertBinaryExpression(node, opts) {
  65980. assert("BinaryExpression", node, opts);
  65981. }
  65982. function assertInterpreterDirective(node, opts) {
  65983. assert("InterpreterDirective", node, opts);
  65984. }
  65985. function assertDirective(node, opts) {
  65986. assert("Directive", node, opts);
  65987. }
  65988. function assertDirectiveLiteral(node, opts) {
  65989. assert("DirectiveLiteral", node, opts);
  65990. }
  65991. function assertBlockStatement(node, opts) {
  65992. assert("BlockStatement", node, opts);
  65993. }
  65994. function assertBreakStatement(node, opts) {
  65995. assert("BreakStatement", node, opts);
  65996. }
  65997. function assertCallExpression(node, opts) {
  65998. assert("CallExpression", node, opts);
  65999. }
  66000. function assertCatchClause(node, opts) {
  66001. assert("CatchClause", node, opts);
  66002. }
  66003. function assertConditionalExpression(node, opts) {
  66004. assert("ConditionalExpression", node, opts);
  66005. }
  66006. function assertContinueStatement(node, opts) {
  66007. assert("ContinueStatement", node, opts);
  66008. }
  66009. function assertDebuggerStatement(node, opts) {
  66010. assert("DebuggerStatement", node, opts);
  66011. }
  66012. function assertDoWhileStatement(node, opts) {
  66013. assert("DoWhileStatement", node, opts);
  66014. }
  66015. function assertEmptyStatement(node, opts) {
  66016. assert("EmptyStatement", node, opts);
  66017. }
  66018. function assertExpressionStatement(node, opts) {
  66019. assert("ExpressionStatement", node, opts);
  66020. }
  66021. function assertFile(node, opts) {
  66022. assert("File", node, opts);
  66023. }
  66024. function assertForInStatement(node, opts) {
  66025. assert("ForInStatement", node, opts);
  66026. }
  66027. function assertForStatement(node, opts) {
  66028. assert("ForStatement", node, opts);
  66029. }
  66030. function assertFunctionDeclaration(node, opts) {
  66031. assert("FunctionDeclaration", node, opts);
  66032. }
  66033. function assertFunctionExpression(node, opts) {
  66034. assert("FunctionExpression", node, opts);
  66035. }
  66036. function assertIdentifier(node, opts) {
  66037. assert("Identifier", node, opts);
  66038. }
  66039. function assertIfStatement(node, opts) {
  66040. assert("IfStatement", node, opts);
  66041. }
  66042. function assertLabeledStatement(node, opts) {
  66043. assert("LabeledStatement", node, opts);
  66044. }
  66045. function assertStringLiteral(node, opts) {
  66046. assert("StringLiteral", node, opts);
  66047. }
  66048. function assertNumericLiteral(node, opts) {
  66049. assert("NumericLiteral", node, opts);
  66050. }
  66051. function assertNullLiteral(node, opts) {
  66052. assert("NullLiteral", node, opts);
  66053. }
  66054. function assertBooleanLiteral(node, opts) {
  66055. assert("BooleanLiteral", node, opts);
  66056. }
  66057. function assertRegExpLiteral(node, opts) {
  66058. assert("RegExpLiteral", node, opts);
  66059. }
  66060. function assertLogicalExpression(node, opts) {
  66061. assert("LogicalExpression", node, opts);
  66062. }
  66063. function assertMemberExpression(node, opts) {
  66064. assert("MemberExpression", node, opts);
  66065. }
  66066. function assertNewExpression(node, opts) {
  66067. assert("NewExpression", node, opts);
  66068. }
  66069. function assertProgram(node, opts) {
  66070. assert("Program", node, opts);
  66071. }
  66072. function assertObjectExpression(node, opts) {
  66073. assert("ObjectExpression", node, opts);
  66074. }
  66075. function assertObjectMethod(node, opts) {
  66076. assert("ObjectMethod", node, opts);
  66077. }
  66078. function assertObjectProperty(node, opts) {
  66079. assert("ObjectProperty", node, opts);
  66080. }
  66081. function assertRestElement(node, opts) {
  66082. assert("RestElement", node, opts);
  66083. }
  66084. function assertReturnStatement(node, opts) {
  66085. assert("ReturnStatement", node, opts);
  66086. }
  66087. function assertSequenceExpression(node, opts) {
  66088. assert("SequenceExpression", node, opts);
  66089. }
  66090. function assertParenthesizedExpression(node, opts) {
  66091. assert("ParenthesizedExpression", node, opts);
  66092. }
  66093. function assertSwitchCase(node, opts) {
  66094. assert("SwitchCase", node, opts);
  66095. }
  66096. function assertSwitchStatement(node, opts) {
  66097. assert("SwitchStatement", node, opts);
  66098. }
  66099. function assertThisExpression(node, opts) {
  66100. assert("ThisExpression", node, opts);
  66101. }
  66102. function assertThrowStatement(node, opts) {
  66103. assert("ThrowStatement", node, opts);
  66104. }
  66105. function assertTryStatement(node, opts) {
  66106. assert("TryStatement", node, opts);
  66107. }
  66108. function assertUnaryExpression(node, opts) {
  66109. assert("UnaryExpression", node, opts);
  66110. }
  66111. function assertUpdateExpression(node, opts) {
  66112. assert("UpdateExpression", node, opts);
  66113. }
  66114. function assertVariableDeclaration(node, opts) {
  66115. assert("VariableDeclaration", node, opts);
  66116. }
  66117. function assertVariableDeclarator(node, opts) {
  66118. assert("VariableDeclarator", node, opts);
  66119. }
  66120. function assertWhileStatement(node, opts) {
  66121. assert("WhileStatement", node, opts);
  66122. }
  66123. function assertWithStatement(node, opts) {
  66124. assert("WithStatement", node, opts);
  66125. }
  66126. function assertAssignmentPattern(node, opts) {
  66127. assert("AssignmentPattern", node, opts);
  66128. }
  66129. function assertArrayPattern(node, opts) {
  66130. assert("ArrayPattern", node, opts);
  66131. }
  66132. function assertArrowFunctionExpression(node, opts) {
  66133. assert("ArrowFunctionExpression", node, opts);
  66134. }
  66135. function assertClassBody(node, opts) {
  66136. assert("ClassBody", node, opts);
  66137. }
  66138. function assertClassExpression(node, opts) {
  66139. assert("ClassExpression", node, opts);
  66140. }
  66141. function assertClassDeclaration(node, opts) {
  66142. assert("ClassDeclaration", node, opts);
  66143. }
  66144. function assertExportAllDeclaration(node, opts) {
  66145. assert("ExportAllDeclaration", node, opts);
  66146. }
  66147. function assertExportDefaultDeclaration(node, opts) {
  66148. assert("ExportDefaultDeclaration", node, opts);
  66149. }
  66150. function assertExportNamedDeclaration(node, opts) {
  66151. assert("ExportNamedDeclaration", node, opts);
  66152. }
  66153. function assertExportSpecifier(node, opts) {
  66154. assert("ExportSpecifier", node, opts);
  66155. }
  66156. function assertForOfStatement(node, opts) {
  66157. assert("ForOfStatement", node, opts);
  66158. }
  66159. function assertImportDeclaration(node, opts) {
  66160. assert("ImportDeclaration", node, opts);
  66161. }
  66162. function assertImportDefaultSpecifier(node, opts) {
  66163. assert("ImportDefaultSpecifier", node, opts);
  66164. }
  66165. function assertImportNamespaceSpecifier(node, opts) {
  66166. assert("ImportNamespaceSpecifier", node, opts);
  66167. }
  66168. function assertImportSpecifier(node, opts) {
  66169. assert("ImportSpecifier", node, opts);
  66170. }
  66171. function assertMetaProperty(node, opts) {
  66172. assert("MetaProperty", node, opts);
  66173. }
  66174. function assertClassMethod(node, opts) {
  66175. assert("ClassMethod", node, opts);
  66176. }
  66177. function assertObjectPattern(node, opts) {
  66178. assert("ObjectPattern", node, opts);
  66179. }
  66180. function assertSpreadElement(node, opts) {
  66181. assert("SpreadElement", node, opts);
  66182. }
  66183. function assertSuper(node, opts) {
  66184. assert("Super", node, opts);
  66185. }
  66186. function assertTaggedTemplateExpression(node, opts) {
  66187. assert("TaggedTemplateExpression", node, opts);
  66188. }
  66189. function assertTemplateElement(node, opts) {
  66190. assert("TemplateElement", node, opts);
  66191. }
  66192. function assertTemplateLiteral(node, opts) {
  66193. assert("TemplateLiteral", node, opts);
  66194. }
  66195. function assertYieldExpression(node, opts) {
  66196. assert("YieldExpression", node, opts);
  66197. }
  66198. function assertAwaitExpression(node, opts) {
  66199. assert("AwaitExpression", node, opts);
  66200. }
  66201. function assertImport(node, opts) {
  66202. assert("Import", node, opts);
  66203. }
  66204. function assertBigIntLiteral(node, opts) {
  66205. assert("BigIntLiteral", node, opts);
  66206. }
  66207. function assertExportNamespaceSpecifier(node, opts) {
  66208. assert("ExportNamespaceSpecifier", node, opts);
  66209. }
  66210. function assertOptionalMemberExpression(node, opts) {
  66211. assert("OptionalMemberExpression", node, opts);
  66212. }
  66213. function assertOptionalCallExpression(node, opts) {
  66214. assert("OptionalCallExpression", node, opts);
  66215. }
  66216. function assertAnyTypeAnnotation(node, opts) {
  66217. assert("AnyTypeAnnotation", node, opts);
  66218. }
  66219. function assertArrayTypeAnnotation(node, opts) {
  66220. assert("ArrayTypeAnnotation", node, opts);
  66221. }
  66222. function assertBooleanTypeAnnotation(node, opts) {
  66223. assert("BooleanTypeAnnotation", node, opts);
  66224. }
  66225. function assertBooleanLiteralTypeAnnotation(node, opts) {
  66226. assert("BooleanLiteralTypeAnnotation", node, opts);
  66227. }
  66228. function assertNullLiteralTypeAnnotation(node, opts) {
  66229. assert("NullLiteralTypeAnnotation", node, opts);
  66230. }
  66231. function assertClassImplements(node, opts) {
  66232. assert("ClassImplements", node, opts);
  66233. }
  66234. function assertDeclareClass(node, opts) {
  66235. assert("DeclareClass", node, opts);
  66236. }
  66237. function assertDeclareFunction(node, opts) {
  66238. assert("DeclareFunction", node, opts);
  66239. }
  66240. function assertDeclareInterface(node, opts) {
  66241. assert("DeclareInterface", node, opts);
  66242. }
  66243. function assertDeclareModule(node, opts) {
  66244. assert("DeclareModule", node, opts);
  66245. }
  66246. function assertDeclareModuleExports(node, opts) {
  66247. assert("DeclareModuleExports", node, opts);
  66248. }
  66249. function assertDeclareTypeAlias(node, opts) {
  66250. assert("DeclareTypeAlias", node, opts);
  66251. }
  66252. function assertDeclareOpaqueType(node, opts) {
  66253. assert("DeclareOpaqueType", node, opts);
  66254. }
  66255. function assertDeclareVariable(node, opts) {
  66256. assert("DeclareVariable", node, opts);
  66257. }
  66258. function assertDeclareExportDeclaration(node, opts) {
  66259. assert("DeclareExportDeclaration", node, opts);
  66260. }
  66261. function assertDeclareExportAllDeclaration(node, opts) {
  66262. assert("DeclareExportAllDeclaration", node, opts);
  66263. }
  66264. function assertDeclaredPredicate(node, opts) {
  66265. assert("DeclaredPredicate", node, opts);
  66266. }
  66267. function assertExistsTypeAnnotation(node, opts) {
  66268. assert("ExistsTypeAnnotation", node, opts);
  66269. }
  66270. function assertFunctionTypeAnnotation(node, opts) {
  66271. assert("FunctionTypeAnnotation", node, opts);
  66272. }
  66273. function assertFunctionTypeParam(node, opts) {
  66274. assert("FunctionTypeParam", node, opts);
  66275. }
  66276. function assertGenericTypeAnnotation(node, opts) {
  66277. assert("GenericTypeAnnotation", node, opts);
  66278. }
  66279. function assertInferredPredicate(node, opts) {
  66280. assert("InferredPredicate", node, opts);
  66281. }
  66282. function assertInterfaceExtends(node, opts) {
  66283. assert("InterfaceExtends", node, opts);
  66284. }
  66285. function assertInterfaceDeclaration(node, opts) {
  66286. assert("InterfaceDeclaration", node, opts);
  66287. }
  66288. function assertInterfaceTypeAnnotation(node, opts) {
  66289. assert("InterfaceTypeAnnotation", node, opts);
  66290. }
  66291. function assertIntersectionTypeAnnotation(node, opts) {
  66292. assert("IntersectionTypeAnnotation", node, opts);
  66293. }
  66294. function assertMixedTypeAnnotation(node, opts) {
  66295. assert("MixedTypeAnnotation", node, opts);
  66296. }
  66297. function assertEmptyTypeAnnotation(node, opts) {
  66298. assert("EmptyTypeAnnotation", node, opts);
  66299. }
  66300. function assertNullableTypeAnnotation(node, opts) {
  66301. assert("NullableTypeAnnotation", node, opts);
  66302. }
  66303. function assertNumberLiteralTypeAnnotation(node, opts) {
  66304. assert("NumberLiteralTypeAnnotation", node, opts);
  66305. }
  66306. function assertNumberTypeAnnotation(node, opts) {
  66307. assert("NumberTypeAnnotation", node, opts);
  66308. }
  66309. function assertObjectTypeAnnotation(node, opts) {
  66310. assert("ObjectTypeAnnotation", node, opts);
  66311. }
  66312. function assertObjectTypeInternalSlot(node, opts) {
  66313. assert("ObjectTypeInternalSlot", node, opts);
  66314. }
  66315. function assertObjectTypeCallProperty(node, opts) {
  66316. assert("ObjectTypeCallProperty", node, opts);
  66317. }
  66318. function assertObjectTypeIndexer(node, opts) {
  66319. assert("ObjectTypeIndexer", node, opts);
  66320. }
  66321. function assertObjectTypeProperty(node, opts) {
  66322. assert("ObjectTypeProperty", node, opts);
  66323. }
  66324. function assertObjectTypeSpreadProperty(node, opts) {
  66325. assert("ObjectTypeSpreadProperty", node, opts);
  66326. }
  66327. function assertOpaqueType(node, opts) {
  66328. assert("OpaqueType", node, opts);
  66329. }
  66330. function assertQualifiedTypeIdentifier(node, opts) {
  66331. assert("QualifiedTypeIdentifier", node, opts);
  66332. }
  66333. function assertStringLiteralTypeAnnotation(node, opts) {
  66334. assert("StringLiteralTypeAnnotation", node, opts);
  66335. }
  66336. function assertStringTypeAnnotation(node, opts) {
  66337. assert("StringTypeAnnotation", node, opts);
  66338. }
  66339. function assertSymbolTypeAnnotation(node, opts) {
  66340. assert("SymbolTypeAnnotation", node, opts);
  66341. }
  66342. function assertThisTypeAnnotation(node, opts) {
  66343. assert("ThisTypeAnnotation", node, opts);
  66344. }
  66345. function assertTupleTypeAnnotation(node, opts) {
  66346. assert("TupleTypeAnnotation", node, opts);
  66347. }
  66348. function assertTypeofTypeAnnotation(node, opts) {
  66349. assert("TypeofTypeAnnotation", node, opts);
  66350. }
  66351. function assertTypeAlias(node, opts) {
  66352. assert("TypeAlias", node, opts);
  66353. }
  66354. function assertTypeAnnotation(node, opts) {
  66355. assert("TypeAnnotation", node, opts);
  66356. }
  66357. function assertTypeCastExpression(node, opts) {
  66358. assert("TypeCastExpression", node, opts);
  66359. }
  66360. function assertTypeParameter(node, opts) {
  66361. assert("TypeParameter", node, opts);
  66362. }
  66363. function assertTypeParameterDeclaration(node, opts) {
  66364. assert("TypeParameterDeclaration", node, opts);
  66365. }
  66366. function assertTypeParameterInstantiation(node, opts) {
  66367. assert("TypeParameterInstantiation", node, opts);
  66368. }
  66369. function assertUnionTypeAnnotation(node, opts) {
  66370. assert("UnionTypeAnnotation", node, opts);
  66371. }
  66372. function assertVariance(node, opts) {
  66373. assert("Variance", node, opts);
  66374. }
  66375. function assertVoidTypeAnnotation(node, opts) {
  66376. assert("VoidTypeAnnotation", node, opts);
  66377. }
  66378. function assertEnumDeclaration(node, opts) {
  66379. assert("EnumDeclaration", node, opts);
  66380. }
  66381. function assertEnumBooleanBody(node, opts) {
  66382. assert("EnumBooleanBody", node, opts);
  66383. }
  66384. function assertEnumNumberBody(node, opts) {
  66385. assert("EnumNumberBody", node, opts);
  66386. }
  66387. function assertEnumStringBody(node, opts) {
  66388. assert("EnumStringBody", node, opts);
  66389. }
  66390. function assertEnumSymbolBody(node, opts) {
  66391. assert("EnumSymbolBody", node, opts);
  66392. }
  66393. function assertEnumBooleanMember(node, opts) {
  66394. assert("EnumBooleanMember", node, opts);
  66395. }
  66396. function assertEnumNumberMember(node, opts) {
  66397. assert("EnumNumberMember", node, opts);
  66398. }
  66399. function assertEnumStringMember(node, opts) {
  66400. assert("EnumStringMember", node, opts);
  66401. }
  66402. function assertEnumDefaultedMember(node, opts) {
  66403. assert("EnumDefaultedMember", node, opts);
  66404. }
  66405. function assertIndexedAccessType(node, opts) {
  66406. assert("IndexedAccessType", node, opts);
  66407. }
  66408. function assertOptionalIndexedAccessType(node, opts) {
  66409. assert("OptionalIndexedAccessType", node, opts);
  66410. }
  66411. function assertJSXAttribute(node, opts) {
  66412. assert("JSXAttribute", node, opts);
  66413. }
  66414. function assertJSXClosingElement(node, opts) {
  66415. assert("JSXClosingElement", node, opts);
  66416. }
  66417. function assertJSXElement(node, opts) {
  66418. assert("JSXElement", node, opts);
  66419. }
  66420. function assertJSXEmptyExpression(node, opts) {
  66421. assert("JSXEmptyExpression", node, opts);
  66422. }
  66423. function assertJSXExpressionContainer(node, opts) {
  66424. assert("JSXExpressionContainer", node, opts);
  66425. }
  66426. function assertJSXSpreadChild(node, opts) {
  66427. assert("JSXSpreadChild", node, opts);
  66428. }
  66429. function assertJSXIdentifier(node, opts) {
  66430. assert("JSXIdentifier", node, opts);
  66431. }
  66432. function assertJSXMemberExpression(node, opts) {
  66433. assert("JSXMemberExpression", node, opts);
  66434. }
  66435. function assertJSXNamespacedName(node, opts) {
  66436. assert("JSXNamespacedName", node, opts);
  66437. }
  66438. function assertJSXOpeningElement(node, opts) {
  66439. assert("JSXOpeningElement", node, opts);
  66440. }
  66441. function assertJSXSpreadAttribute(node, opts) {
  66442. assert("JSXSpreadAttribute", node, opts);
  66443. }
  66444. function assertJSXText(node, opts) {
  66445. assert("JSXText", node, opts);
  66446. }
  66447. function assertJSXFragment(node, opts) {
  66448. assert("JSXFragment", node, opts);
  66449. }
  66450. function assertJSXOpeningFragment(node, opts) {
  66451. assert("JSXOpeningFragment", node, opts);
  66452. }
  66453. function assertJSXClosingFragment(node, opts) {
  66454. assert("JSXClosingFragment", node, opts);
  66455. }
  66456. function assertNoop(node, opts) {
  66457. assert("Noop", node, opts);
  66458. }
  66459. function assertPlaceholder(node, opts) {
  66460. assert("Placeholder", node, opts);
  66461. }
  66462. function assertV8IntrinsicIdentifier(node, opts) {
  66463. assert("V8IntrinsicIdentifier", node, opts);
  66464. }
  66465. function assertArgumentPlaceholder(node, opts) {
  66466. assert("ArgumentPlaceholder", node, opts);
  66467. }
  66468. function assertBindExpression(node, opts) {
  66469. assert("BindExpression", node, opts);
  66470. }
  66471. function assertClassProperty(node, opts) {
  66472. assert("ClassProperty", node, opts);
  66473. }
  66474. function assertPipelineTopicExpression(node, opts) {
  66475. assert("PipelineTopicExpression", node, opts);
  66476. }
  66477. function assertPipelineBareFunction(node, opts) {
  66478. assert("PipelineBareFunction", node, opts);
  66479. }
  66480. function assertPipelinePrimaryTopicReference(node, opts) {
  66481. assert("PipelinePrimaryTopicReference", node, opts);
  66482. }
  66483. function assertClassPrivateProperty(node, opts) {
  66484. assert("ClassPrivateProperty", node, opts);
  66485. }
  66486. function assertClassPrivateMethod(node, opts) {
  66487. assert("ClassPrivateMethod", node, opts);
  66488. }
  66489. function assertImportAttribute(node, opts) {
  66490. assert("ImportAttribute", node, opts);
  66491. }
  66492. function assertDecorator(node, opts) {
  66493. assert("Decorator", node, opts);
  66494. }
  66495. function assertDoExpression(node, opts) {
  66496. assert("DoExpression", node, opts);
  66497. }
  66498. function assertExportDefaultSpecifier(node, opts) {
  66499. assert("ExportDefaultSpecifier", node, opts);
  66500. }
  66501. function assertPrivateName(node, opts) {
  66502. assert("PrivateName", node, opts);
  66503. }
  66504. function assertRecordExpression(node, opts) {
  66505. assert("RecordExpression", node, opts);
  66506. }
  66507. function assertTupleExpression(node, opts) {
  66508. assert("TupleExpression", node, opts);
  66509. }
  66510. function assertDecimalLiteral(node, opts) {
  66511. assert("DecimalLiteral", node, opts);
  66512. }
  66513. function assertStaticBlock(node, opts) {
  66514. assert("StaticBlock", node, opts);
  66515. }
  66516. function assertModuleExpression(node, opts) {
  66517. assert("ModuleExpression", node, opts);
  66518. }
  66519. function assertTSParameterProperty(node, opts) {
  66520. assert("TSParameterProperty", node, opts);
  66521. }
  66522. function assertTSDeclareFunction(node, opts) {
  66523. assert("TSDeclareFunction", node, opts);
  66524. }
  66525. function assertTSDeclareMethod(node, opts) {
  66526. assert("TSDeclareMethod", node, opts);
  66527. }
  66528. function assertTSQualifiedName(node, opts) {
  66529. assert("TSQualifiedName", node, opts);
  66530. }
  66531. function assertTSCallSignatureDeclaration(node, opts) {
  66532. assert("TSCallSignatureDeclaration", node, opts);
  66533. }
  66534. function assertTSConstructSignatureDeclaration(node, opts) {
  66535. assert("TSConstructSignatureDeclaration", node, opts);
  66536. }
  66537. function assertTSPropertySignature(node, opts) {
  66538. assert("TSPropertySignature", node, opts);
  66539. }
  66540. function assertTSMethodSignature(node, opts) {
  66541. assert("TSMethodSignature", node, opts);
  66542. }
  66543. function assertTSIndexSignature(node, opts) {
  66544. assert("TSIndexSignature", node, opts);
  66545. }
  66546. function assertTSAnyKeyword(node, opts) {
  66547. assert("TSAnyKeyword", node, opts);
  66548. }
  66549. function assertTSBooleanKeyword(node, opts) {
  66550. assert("TSBooleanKeyword", node, opts);
  66551. }
  66552. function assertTSBigIntKeyword(node, opts) {
  66553. assert("TSBigIntKeyword", node, opts);
  66554. }
  66555. function assertTSIntrinsicKeyword(node, opts) {
  66556. assert("TSIntrinsicKeyword", node, opts);
  66557. }
  66558. function assertTSNeverKeyword(node, opts) {
  66559. assert("TSNeverKeyword", node, opts);
  66560. }
  66561. function assertTSNullKeyword(node, opts) {
  66562. assert("TSNullKeyword", node, opts);
  66563. }
  66564. function assertTSNumberKeyword(node, opts) {
  66565. assert("TSNumberKeyword", node, opts);
  66566. }
  66567. function assertTSObjectKeyword(node, opts) {
  66568. assert("TSObjectKeyword", node, opts);
  66569. }
  66570. function assertTSStringKeyword(node, opts) {
  66571. assert("TSStringKeyword", node, opts);
  66572. }
  66573. function assertTSSymbolKeyword(node, opts) {
  66574. assert("TSSymbolKeyword", node, opts);
  66575. }
  66576. function assertTSUndefinedKeyword(node, opts) {
  66577. assert("TSUndefinedKeyword", node, opts);
  66578. }
  66579. function assertTSUnknownKeyword(node, opts) {
  66580. assert("TSUnknownKeyword", node, opts);
  66581. }
  66582. function assertTSVoidKeyword(node, opts) {
  66583. assert("TSVoidKeyword", node, opts);
  66584. }
  66585. function assertTSThisType(node, opts) {
  66586. assert("TSThisType", node, opts);
  66587. }
  66588. function assertTSFunctionType(node, opts) {
  66589. assert("TSFunctionType", node, opts);
  66590. }
  66591. function assertTSConstructorType(node, opts) {
  66592. assert("TSConstructorType", node, opts);
  66593. }
  66594. function assertTSTypeReference(node, opts) {
  66595. assert("TSTypeReference", node, opts);
  66596. }
  66597. function assertTSTypePredicate(node, opts) {
  66598. assert("TSTypePredicate", node, opts);
  66599. }
  66600. function assertTSTypeQuery(node, opts) {
  66601. assert("TSTypeQuery", node, opts);
  66602. }
  66603. function assertTSTypeLiteral(node, opts) {
  66604. assert("TSTypeLiteral", node, opts);
  66605. }
  66606. function assertTSArrayType(node, opts) {
  66607. assert("TSArrayType", node, opts);
  66608. }
  66609. function assertTSTupleType(node, opts) {
  66610. assert("TSTupleType", node, opts);
  66611. }
  66612. function assertTSOptionalType(node, opts) {
  66613. assert("TSOptionalType", node, opts);
  66614. }
  66615. function assertTSRestType(node, opts) {
  66616. assert("TSRestType", node, opts);
  66617. }
  66618. function assertTSNamedTupleMember(node, opts) {
  66619. assert("TSNamedTupleMember", node, opts);
  66620. }
  66621. function assertTSUnionType(node, opts) {
  66622. assert("TSUnionType", node, opts);
  66623. }
  66624. function assertTSIntersectionType(node, opts) {
  66625. assert("TSIntersectionType", node, opts);
  66626. }
  66627. function assertTSConditionalType(node, opts) {
  66628. assert("TSConditionalType", node, opts);
  66629. }
  66630. function assertTSInferType(node, opts) {
  66631. assert("TSInferType", node, opts);
  66632. }
  66633. function assertTSParenthesizedType(node, opts) {
  66634. assert("TSParenthesizedType", node, opts);
  66635. }
  66636. function assertTSTypeOperator(node, opts) {
  66637. assert("TSTypeOperator", node, opts);
  66638. }
  66639. function assertTSIndexedAccessType(node, opts) {
  66640. assert("TSIndexedAccessType", node, opts);
  66641. }
  66642. function assertTSMappedType(node, opts) {
  66643. assert("TSMappedType", node, opts);
  66644. }
  66645. function assertTSLiteralType(node, opts) {
  66646. assert("TSLiteralType", node, opts);
  66647. }
  66648. function assertTSExpressionWithTypeArguments(node, opts) {
  66649. assert("TSExpressionWithTypeArguments", node, opts);
  66650. }
  66651. function assertTSInterfaceDeclaration(node, opts) {
  66652. assert("TSInterfaceDeclaration", node, opts);
  66653. }
  66654. function assertTSInterfaceBody(node, opts) {
  66655. assert("TSInterfaceBody", node, opts);
  66656. }
  66657. function assertTSTypeAliasDeclaration(node, opts) {
  66658. assert("TSTypeAliasDeclaration", node, opts);
  66659. }
  66660. function assertTSAsExpression(node, opts) {
  66661. assert("TSAsExpression", node, opts);
  66662. }
  66663. function assertTSTypeAssertion(node, opts) {
  66664. assert("TSTypeAssertion", node, opts);
  66665. }
  66666. function assertTSEnumDeclaration(node, opts) {
  66667. assert("TSEnumDeclaration", node, opts);
  66668. }
  66669. function assertTSEnumMember(node, opts) {
  66670. assert("TSEnumMember", node, opts);
  66671. }
  66672. function assertTSModuleDeclaration(node, opts) {
  66673. assert("TSModuleDeclaration", node, opts);
  66674. }
  66675. function assertTSModuleBlock(node, opts) {
  66676. assert("TSModuleBlock", node, opts);
  66677. }
  66678. function assertTSImportType(node, opts) {
  66679. assert("TSImportType", node, opts);
  66680. }
  66681. function assertTSImportEqualsDeclaration(node, opts) {
  66682. assert("TSImportEqualsDeclaration", node, opts);
  66683. }
  66684. function assertTSExternalModuleReference(node, opts) {
  66685. assert("TSExternalModuleReference", node, opts);
  66686. }
  66687. function assertTSNonNullExpression(node, opts) {
  66688. assert("TSNonNullExpression", node, opts);
  66689. }
  66690. function assertTSExportAssignment(node, opts) {
  66691. assert("TSExportAssignment", node, opts);
  66692. }
  66693. function assertTSNamespaceExportDeclaration(node, opts) {
  66694. assert("TSNamespaceExportDeclaration", node, opts);
  66695. }
  66696. function assertTSTypeAnnotation(node, opts) {
  66697. assert("TSTypeAnnotation", node, opts);
  66698. }
  66699. function assertTSTypeParameterInstantiation(node, opts) {
  66700. assert("TSTypeParameterInstantiation", node, opts);
  66701. }
  66702. function assertTSTypeParameterDeclaration(node, opts) {
  66703. assert("TSTypeParameterDeclaration", node, opts);
  66704. }
  66705. function assertTSTypeParameter(node, opts) {
  66706. assert("TSTypeParameter", node, opts);
  66707. }
  66708. function assertExpression(node, opts) {
  66709. assert("Expression", node, opts);
  66710. }
  66711. function assertBinary(node, opts) {
  66712. assert("Binary", node, opts);
  66713. }
  66714. function assertScopable(node, opts) {
  66715. assert("Scopable", node, opts);
  66716. }
  66717. function assertBlockParent(node, opts) {
  66718. assert("BlockParent", node, opts);
  66719. }
  66720. function assertBlock(node, opts) {
  66721. assert("Block", node, opts);
  66722. }
  66723. function assertStatement(node, opts) {
  66724. assert("Statement", node, opts);
  66725. }
  66726. function assertTerminatorless(node, opts) {
  66727. assert("Terminatorless", node, opts);
  66728. }
  66729. function assertCompletionStatement(node, opts) {
  66730. assert("CompletionStatement", node, opts);
  66731. }
  66732. function assertConditional(node, opts) {
  66733. assert("Conditional", node, opts);
  66734. }
  66735. function assertLoop(node, opts) {
  66736. assert("Loop", node, opts);
  66737. }
  66738. function assertWhile(node, opts) {
  66739. assert("While", node, opts);
  66740. }
  66741. function assertExpressionWrapper(node, opts) {
  66742. assert("ExpressionWrapper", node, opts);
  66743. }
  66744. function assertFor(node, opts) {
  66745. assert("For", node, opts);
  66746. }
  66747. function assertForXStatement(node, opts) {
  66748. assert("ForXStatement", node, opts);
  66749. }
  66750. function assertFunction(node, opts) {
  66751. assert("Function", node, opts);
  66752. }
  66753. function assertFunctionParent(node, opts) {
  66754. assert("FunctionParent", node, opts);
  66755. }
  66756. function assertPureish(node, opts) {
  66757. assert("Pureish", node, opts);
  66758. }
  66759. function assertDeclaration(node, opts) {
  66760. assert("Declaration", node, opts);
  66761. }
  66762. function assertPatternLike(node, opts) {
  66763. assert("PatternLike", node, opts);
  66764. }
  66765. function assertLVal(node, opts) {
  66766. assert("LVal", node, opts);
  66767. }
  66768. function assertTSEntityName(node, opts) {
  66769. assert("TSEntityName", node, opts);
  66770. }
  66771. function assertLiteral(node, opts) {
  66772. assert("Literal", node, opts);
  66773. }
  66774. function assertImmutable(node, opts) {
  66775. assert("Immutable", node, opts);
  66776. }
  66777. function assertUserWhitespacable(node, opts) {
  66778. assert("UserWhitespacable", node, opts);
  66779. }
  66780. function assertMethod(node, opts) {
  66781. assert("Method", node, opts);
  66782. }
  66783. function assertObjectMember(node, opts) {
  66784. assert("ObjectMember", node, opts);
  66785. }
  66786. function assertProperty(node, opts) {
  66787. assert("Property", node, opts);
  66788. }
  66789. function assertUnaryLike(node, opts) {
  66790. assert("UnaryLike", node, opts);
  66791. }
  66792. function assertPattern(node, opts) {
  66793. assert("Pattern", node, opts);
  66794. }
  66795. function assertClass(node, opts) {
  66796. assert("Class", node, opts);
  66797. }
  66798. function assertModuleDeclaration(node, opts) {
  66799. assert("ModuleDeclaration", node, opts);
  66800. }
  66801. function assertExportDeclaration(node, opts) {
  66802. assert("ExportDeclaration", node, opts);
  66803. }
  66804. function assertModuleSpecifier(node, opts) {
  66805. assert("ModuleSpecifier", node, opts);
  66806. }
  66807. function assertFlow(node, opts) {
  66808. assert("Flow", node, opts);
  66809. }
  66810. function assertFlowType(node, opts) {
  66811. assert("FlowType", node, opts);
  66812. }
  66813. function assertFlowBaseAnnotation(node, opts) {
  66814. assert("FlowBaseAnnotation", node, opts);
  66815. }
  66816. function assertFlowDeclaration(node, opts) {
  66817. assert("FlowDeclaration", node, opts);
  66818. }
  66819. function assertFlowPredicate(node, opts) {
  66820. assert("FlowPredicate", node, opts);
  66821. }
  66822. function assertEnumBody(node, opts) {
  66823. assert("EnumBody", node, opts);
  66824. }
  66825. function assertEnumMember(node, opts) {
  66826. assert("EnumMember", node, opts);
  66827. }
  66828. function assertJSX(node, opts) {
  66829. assert("JSX", node, opts);
  66830. }
  66831. function assertPrivate(node, opts) {
  66832. assert("Private", node, opts);
  66833. }
  66834. function assertTSTypeElement(node, opts) {
  66835. assert("TSTypeElement", node, opts);
  66836. }
  66837. function assertTSType(node, opts) {
  66838. assert("TSType", node, opts);
  66839. }
  66840. function assertTSBaseType(node, opts) {
  66841. assert("TSBaseType", node, opts);
  66842. }
  66843. function assertNumberLiteral(node, opts) {
  66844. console.trace("The node type NumberLiteral has been renamed to NumericLiteral");
  66845. assert("NumberLiteral", node, opts);
  66846. }
  66847. function assertRegexLiteral(node, opts) {
  66848. console.trace("The node type RegexLiteral has been renamed to RegExpLiteral");
  66849. assert("RegexLiteral", node, opts);
  66850. }
  66851. function assertRestProperty(node, opts) {
  66852. console.trace("The node type RestProperty has been renamed to RestElement");
  66853. assert("RestProperty", node, opts);
  66854. }
  66855. function assertSpreadProperty(node, opts) {
  66856. console.trace("The node type SpreadProperty has been renamed to SpreadElement");
  66857. assert("SpreadProperty", node, opts);
  66858. }
  66859. }
  66860. });
  66861. // node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/builders/flow/createTypeAnnotationBasedOnTypeof.js
  66862. var require_createTypeAnnotationBasedOnTypeof3 = __commonJS({
  66863. "node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/builders/flow/createTypeAnnotationBasedOnTypeof.js"(exports) {
  66864. "use strict";
  66865. Object.defineProperty(exports, "__esModule", {
  66866. value: true
  66867. });
  66868. exports.default = createTypeAnnotationBasedOnTypeof;
  66869. var _generated = require_generated12();
  66870. function createTypeAnnotationBasedOnTypeof(type) {
  66871. if (type === "string") {
  66872. return (0, _generated.stringTypeAnnotation)();
  66873. } else if (type === "number") {
  66874. return (0, _generated.numberTypeAnnotation)();
  66875. } else if (type === "undefined") {
  66876. return (0, _generated.voidTypeAnnotation)();
  66877. } else if (type === "boolean") {
  66878. return (0, _generated.booleanTypeAnnotation)();
  66879. } else if (type === "function") {
  66880. return (0, _generated.genericTypeAnnotation)((0, _generated.identifier)("Function"));
  66881. } else if (type === "object") {
  66882. return (0, _generated.genericTypeAnnotation)((0, _generated.identifier)("Object"));
  66883. } else if (type === "symbol") {
  66884. return (0, _generated.genericTypeAnnotation)((0, _generated.identifier)("Symbol"));
  66885. } else if (type === "bigint") {
  66886. return (0, _generated.anyTypeAnnotation)();
  66887. } else {
  66888. throw new Error("Invalid typeof value: " + type);
  66889. }
  66890. }
  66891. }
  66892. });
  66893. // node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/modifications/flow/removeTypeDuplicates.js
  66894. var require_removeTypeDuplicates5 = __commonJS({
  66895. "node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/modifications/flow/removeTypeDuplicates.js"(exports) {
  66896. "use strict";
  66897. Object.defineProperty(exports, "__esModule", {
  66898. value: true
  66899. });
  66900. exports.default = removeTypeDuplicates;
  66901. var _generated = require_generated11();
  66902. function getQualifiedName(node) {
  66903. return (0, _generated.isIdentifier)(node) ? node.name : `${node.id.name}.${getQualifiedName(node.qualification)}`;
  66904. }
  66905. function removeTypeDuplicates(nodes) {
  66906. const generics = {};
  66907. const bases = {};
  66908. const typeGroups = [];
  66909. const types2 = [];
  66910. for (let i = 0; i < nodes.length; i++) {
  66911. const node = nodes[i];
  66912. if (!node)
  66913. continue;
  66914. if (types2.indexOf(node) >= 0) {
  66915. continue;
  66916. }
  66917. if ((0, _generated.isAnyTypeAnnotation)(node)) {
  66918. return [node];
  66919. }
  66920. if ((0, _generated.isFlowBaseAnnotation)(node)) {
  66921. bases[node.type] = node;
  66922. continue;
  66923. }
  66924. if ((0, _generated.isUnionTypeAnnotation)(node)) {
  66925. if (typeGroups.indexOf(node.types) < 0) {
  66926. nodes = nodes.concat(node.types);
  66927. typeGroups.push(node.types);
  66928. }
  66929. continue;
  66930. }
  66931. if ((0, _generated.isGenericTypeAnnotation)(node)) {
  66932. const name2 = getQualifiedName(node.id);
  66933. if (generics[name2]) {
  66934. let existing = generics[name2];
  66935. if (existing.typeParameters) {
  66936. if (node.typeParameters) {
  66937. existing.typeParameters.params = removeTypeDuplicates(existing.typeParameters.params.concat(node.typeParameters.params));
  66938. }
  66939. } else {
  66940. existing = node.typeParameters;
  66941. }
  66942. } else {
  66943. generics[name2] = node;
  66944. }
  66945. continue;
  66946. }
  66947. types2.push(node);
  66948. }
  66949. for (const type of Object.keys(bases)) {
  66950. types2.push(bases[type]);
  66951. }
  66952. for (const name2 of Object.keys(generics)) {
  66953. types2.push(generics[name2]);
  66954. }
  66955. return types2;
  66956. }
  66957. }
  66958. });
  66959. // node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/builders/flow/createFlowUnionType.js
  66960. var require_createFlowUnionType3 = __commonJS({
  66961. "node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/builders/flow/createFlowUnionType.js"(exports) {
  66962. "use strict";
  66963. Object.defineProperty(exports, "__esModule", {
  66964. value: true
  66965. });
  66966. exports.default = createFlowUnionType;
  66967. var _generated = require_generated12();
  66968. var _removeTypeDuplicates = require_removeTypeDuplicates5();
  66969. function createFlowUnionType(types2) {
  66970. const flattened = (0, _removeTypeDuplicates.default)(types2);
  66971. if (flattened.length === 1) {
  66972. return flattened[0];
  66973. } else {
  66974. return (0, _generated.unionTypeAnnotation)(flattened);
  66975. }
  66976. }
  66977. }
  66978. });
  66979. // node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/modifications/typescript/removeTypeDuplicates.js
  66980. var require_removeTypeDuplicates6 = __commonJS({
  66981. "node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/modifications/typescript/removeTypeDuplicates.js"(exports) {
  66982. "use strict";
  66983. Object.defineProperty(exports, "__esModule", {
  66984. value: true
  66985. });
  66986. exports.default = removeTypeDuplicates;
  66987. var _generated = require_generated11();
  66988. function removeTypeDuplicates(nodes) {
  66989. const generics = {};
  66990. const bases = {};
  66991. const typeGroups = [];
  66992. const types2 = [];
  66993. for (let i = 0; i < nodes.length; i++) {
  66994. const node = nodes[i];
  66995. if (!node)
  66996. continue;
  66997. if (types2.indexOf(node) >= 0) {
  66998. continue;
  66999. }
  67000. if ((0, _generated.isTSAnyKeyword)(node)) {
  67001. return [node];
  67002. }
  67003. if ((0, _generated.isTSBaseType)(node)) {
  67004. bases[node.type] = node;
  67005. continue;
  67006. }
  67007. if ((0, _generated.isTSUnionType)(node)) {
  67008. if (typeGroups.indexOf(node.types) < 0) {
  67009. nodes = nodes.concat(node.types);
  67010. typeGroups.push(node.types);
  67011. }
  67012. continue;
  67013. }
  67014. types2.push(node);
  67015. }
  67016. for (const type of Object.keys(bases)) {
  67017. types2.push(bases[type]);
  67018. }
  67019. for (const name2 of Object.keys(generics)) {
  67020. types2.push(generics[name2]);
  67021. }
  67022. return types2;
  67023. }
  67024. }
  67025. });
  67026. // node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/builders/typescript/createTSUnionType.js
  67027. var require_createTSUnionType3 = __commonJS({
  67028. "node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/builders/typescript/createTSUnionType.js"(exports) {
  67029. "use strict";
  67030. Object.defineProperty(exports, "__esModule", {
  67031. value: true
  67032. });
  67033. exports.default = createTSUnionType;
  67034. var _generated = require_generated12();
  67035. var _removeTypeDuplicates = require_removeTypeDuplicates6();
  67036. function createTSUnionType(typeAnnotations) {
  67037. const types2 = typeAnnotations.map((type) => type.typeAnnotation);
  67038. const flattened = (0, _removeTypeDuplicates.default)(types2);
  67039. if (flattened.length === 1) {
  67040. return flattened[0];
  67041. } else {
  67042. return (0, _generated.tsUnionType)(flattened);
  67043. }
  67044. }
  67045. }
  67046. });
  67047. // node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/builders/generated/uppercase.js
  67048. var require_uppercase3 = __commonJS({
  67049. "node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/builders/generated/uppercase.js"(exports) {
  67050. "use strict";
  67051. Object.defineProperty(exports, "__esModule", {
  67052. value: true
  67053. });
  67054. Object.defineProperty(exports, "ArrayExpression", {
  67055. enumerable: true,
  67056. get: function() {
  67057. return _index.arrayExpression;
  67058. }
  67059. });
  67060. Object.defineProperty(exports, "AssignmentExpression", {
  67061. enumerable: true,
  67062. get: function() {
  67063. return _index.assignmentExpression;
  67064. }
  67065. });
  67066. Object.defineProperty(exports, "BinaryExpression", {
  67067. enumerable: true,
  67068. get: function() {
  67069. return _index.binaryExpression;
  67070. }
  67071. });
  67072. Object.defineProperty(exports, "InterpreterDirective", {
  67073. enumerable: true,
  67074. get: function() {
  67075. return _index.interpreterDirective;
  67076. }
  67077. });
  67078. Object.defineProperty(exports, "Directive", {
  67079. enumerable: true,
  67080. get: function() {
  67081. return _index.directive;
  67082. }
  67083. });
  67084. Object.defineProperty(exports, "DirectiveLiteral", {
  67085. enumerable: true,
  67086. get: function() {
  67087. return _index.directiveLiteral;
  67088. }
  67089. });
  67090. Object.defineProperty(exports, "BlockStatement", {
  67091. enumerable: true,
  67092. get: function() {
  67093. return _index.blockStatement;
  67094. }
  67095. });
  67096. Object.defineProperty(exports, "BreakStatement", {
  67097. enumerable: true,
  67098. get: function() {
  67099. return _index.breakStatement;
  67100. }
  67101. });
  67102. Object.defineProperty(exports, "CallExpression", {
  67103. enumerable: true,
  67104. get: function() {
  67105. return _index.callExpression;
  67106. }
  67107. });
  67108. Object.defineProperty(exports, "CatchClause", {
  67109. enumerable: true,
  67110. get: function() {
  67111. return _index.catchClause;
  67112. }
  67113. });
  67114. Object.defineProperty(exports, "ConditionalExpression", {
  67115. enumerable: true,
  67116. get: function() {
  67117. return _index.conditionalExpression;
  67118. }
  67119. });
  67120. Object.defineProperty(exports, "ContinueStatement", {
  67121. enumerable: true,
  67122. get: function() {
  67123. return _index.continueStatement;
  67124. }
  67125. });
  67126. Object.defineProperty(exports, "DebuggerStatement", {
  67127. enumerable: true,
  67128. get: function() {
  67129. return _index.debuggerStatement;
  67130. }
  67131. });
  67132. Object.defineProperty(exports, "DoWhileStatement", {
  67133. enumerable: true,
  67134. get: function() {
  67135. return _index.doWhileStatement;
  67136. }
  67137. });
  67138. Object.defineProperty(exports, "EmptyStatement", {
  67139. enumerable: true,
  67140. get: function() {
  67141. return _index.emptyStatement;
  67142. }
  67143. });
  67144. Object.defineProperty(exports, "ExpressionStatement", {
  67145. enumerable: true,
  67146. get: function() {
  67147. return _index.expressionStatement;
  67148. }
  67149. });
  67150. Object.defineProperty(exports, "File", {
  67151. enumerable: true,
  67152. get: function() {
  67153. return _index.file;
  67154. }
  67155. });
  67156. Object.defineProperty(exports, "ForInStatement", {
  67157. enumerable: true,
  67158. get: function() {
  67159. return _index.forInStatement;
  67160. }
  67161. });
  67162. Object.defineProperty(exports, "ForStatement", {
  67163. enumerable: true,
  67164. get: function() {
  67165. return _index.forStatement;
  67166. }
  67167. });
  67168. Object.defineProperty(exports, "FunctionDeclaration", {
  67169. enumerable: true,
  67170. get: function() {
  67171. return _index.functionDeclaration;
  67172. }
  67173. });
  67174. Object.defineProperty(exports, "FunctionExpression", {
  67175. enumerable: true,
  67176. get: function() {
  67177. return _index.functionExpression;
  67178. }
  67179. });
  67180. Object.defineProperty(exports, "Identifier", {
  67181. enumerable: true,
  67182. get: function() {
  67183. return _index.identifier;
  67184. }
  67185. });
  67186. Object.defineProperty(exports, "IfStatement", {
  67187. enumerable: true,
  67188. get: function() {
  67189. return _index.ifStatement;
  67190. }
  67191. });
  67192. Object.defineProperty(exports, "LabeledStatement", {
  67193. enumerable: true,
  67194. get: function() {
  67195. return _index.labeledStatement;
  67196. }
  67197. });
  67198. Object.defineProperty(exports, "StringLiteral", {
  67199. enumerable: true,
  67200. get: function() {
  67201. return _index.stringLiteral;
  67202. }
  67203. });
  67204. Object.defineProperty(exports, "NumericLiteral", {
  67205. enumerable: true,
  67206. get: function() {
  67207. return _index.numericLiteral;
  67208. }
  67209. });
  67210. Object.defineProperty(exports, "NullLiteral", {
  67211. enumerable: true,
  67212. get: function() {
  67213. return _index.nullLiteral;
  67214. }
  67215. });
  67216. Object.defineProperty(exports, "BooleanLiteral", {
  67217. enumerable: true,
  67218. get: function() {
  67219. return _index.booleanLiteral;
  67220. }
  67221. });
  67222. Object.defineProperty(exports, "RegExpLiteral", {
  67223. enumerable: true,
  67224. get: function() {
  67225. return _index.regExpLiteral;
  67226. }
  67227. });
  67228. Object.defineProperty(exports, "LogicalExpression", {
  67229. enumerable: true,
  67230. get: function() {
  67231. return _index.logicalExpression;
  67232. }
  67233. });
  67234. Object.defineProperty(exports, "MemberExpression", {
  67235. enumerable: true,
  67236. get: function() {
  67237. return _index.memberExpression;
  67238. }
  67239. });
  67240. Object.defineProperty(exports, "NewExpression", {
  67241. enumerable: true,
  67242. get: function() {
  67243. return _index.newExpression;
  67244. }
  67245. });
  67246. Object.defineProperty(exports, "Program", {
  67247. enumerable: true,
  67248. get: function() {
  67249. return _index.program;
  67250. }
  67251. });
  67252. Object.defineProperty(exports, "ObjectExpression", {
  67253. enumerable: true,
  67254. get: function() {
  67255. return _index.objectExpression;
  67256. }
  67257. });
  67258. Object.defineProperty(exports, "ObjectMethod", {
  67259. enumerable: true,
  67260. get: function() {
  67261. return _index.objectMethod;
  67262. }
  67263. });
  67264. Object.defineProperty(exports, "ObjectProperty", {
  67265. enumerable: true,
  67266. get: function() {
  67267. return _index.objectProperty;
  67268. }
  67269. });
  67270. Object.defineProperty(exports, "RestElement", {
  67271. enumerable: true,
  67272. get: function() {
  67273. return _index.restElement;
  67274. }
  67275. });
  67276. Object.defineProperty(exports, "ReturnStatement", {
  67277. enumerable: true,
  67278. get: function() {
  67279. return _index.returnStatement;
  67280. }
  67281. });
  67282. Object.defineProperty(exports, "SequenceExpression", {
  67283. enumerable: true,
  67284. get: function() {
  67285. return _index.sequenceExpression;
  67286. }
  67287. });
  67288. Object.defineProperty(exports, "ParenthesizedExpression", {
  67289. enumerable: true,
  67290. get: function() {
  67291. return _index.parenthesizedExpression;
  67292. }
  67293. });
  67294. Object.defineProperty(exports, "SwitchCase", {
  67295. enumerable: true,
  67296. get: function() {
  67297. return _index.switchCase;
  67298. }
  67299. });
  67300. Object.defineProperty(exports, "SwitchStatement", {
  67301. enumerable: true,
  67302. get: function() {
  67303. return _index.switchStatement;
  67304. }
  67305. });
  67306. Object.defineProperty(exports, "ThisExpression", {
  67307. enumerable: true,
  67308. get: function() {
  67309. return _index.thisExpression;
  67310. }
  67311. });
  67312. Object.defineProperty(exports, "ThrowStatement", {
  67313. enumerable: true,
  67314. get: function() {
  67315. return _index.throwStatement;
  67316. }
  67317. });
  67318. Object.defineProperty(exports, "TryStatement", {
  67319. enumerable: true,
  67320. get: function() {
  67321. return _index.tryStatement;
  67322. }
  67323. });
  67324. Object.defineProperty(exports, "UnaryExpression", {
  67325. enumerable: true,
  67326. get: function() {
  67327. return _index.unaryExpression;
  67328. }
  67329. });
  67330. Object.defineProperty(exports, "UpdateExpression", {
  67331. enumerable: true,
  67332. get: function() {
  67333. return _index.updateExpression;
  67334. }
  67335. });
  67336. Object.defineProperty(exports, "VariableDeclaration", {
  67337. enumerable: true,
  67338. get: function() {
  67339. return _index.variableDeclaration;
  67340. }
  67341. });
  67342. Object.defineProperty(exports, "VariableDeclarator", {
  67343. enumerable: true,
  67344. get: function() {
  67345. return _index.variableDeclarator;
  67346. }
  67347. });
  67348. Object.defineProperty(exports, "WhileStatement", {
  67349. enumerable: true,
  67350. get: function() {
  67351. return _index.whileStatement;
  67352. }
  67353. });
  67354. Object.defineProperty(exports, "WithStatement", {
  67355. enumerable: true,
  67356. get: function() {
  67357. return _index.withStatement;
  67358. }
  67359. });
  67360. Object.defineProperty(exports, "AssignmentPattern", {
  67361. enumerable: true,
  67362. get: function() {
  67363. return _index.assignmentPattern;
  67364. }
  67365. });
  67366. Object.defineProperty(exports, "ArrayPattern", {
  67367. enumerable: true,
  67368. get: function() {
  67369. return _index.arrayPattern;
  67370. }
  67371. });
  67372. Object.defineProperty(exports, "ArrowFunctionExpression", {
  67373. enumerable: true,
  67374. get: function() {
  67375. return _index.arrowFunctionExpression;
  67376. }
  67377. });
  67378. Object.defineProperty(exports, "ClassBody", {
  67379. enumerable: true,
  67380. get: function() {
  67381. return _index.classBody;
  67382. }
  67383. });
  67384. Object.defineProperty(exports, "ClassExpression", {
  67385. enumerable: true,
  67386. get: function() {
  67387. return _index.classExpression;
  67388. }
  67389. });
  67390. Object.defineProperty(exports, "ClassDeclaration", {
  67391. enumerable: true,
  67392. get: function() {
  67393. return _index.classDeclaration;
  67394. }
  67395. });
  67396. Object.defineProperty(exports, "ExportAllDeclaration", {
  67397. enumerable: true,
  67398. get: function() {
  67399. return _index.exportAllDeclaration;
  67400. }
  67401. });
  67402. Object.defineProperty(exports, "ExportDefaultDeclaration", {
  67403. enumerable: true,
  67404. get: function() {
  67405. return _index.exportDefaultDeclaration;
  67406. }
  67407. });
  67408. Object.defineProperty(exports, "ExportNamedDeclaration", {
  67409. enumerable: true,
  67410. get: function() {
  67411. return _index.exportNamedDeclaration;
  67412. }
  67413. });
  67414. Object.defineProperty(exports, "ExportSpecifier", {
  67415. enumerable: true,
  67416. get: function() {
  67417. return _index.exportSpecifier;
  67418. }
  67419. });
  67420. Object.defineProperty(exports, "ForOfStatement", {
  67421. enumerable: true,
  67422. get: function() {
  67423. return _index.forOfStatement;
  67424. }
  67425. });
  67426. Object.defineProperty(exports, "ImportDeclaration", {
  67427. enumerable: true,
  67428. get: function() {
  67429. return _index.importDeclaration;
  67430. }
  67431. });
  67432. Object.defineProperty(exports, "ImportDefaultSpecifier", {
  67433. enumerable: true,
  67434. get: function() {
  67435. return _index.importDefaultSpecifier;
  67436. }
  67437. });
  67438. Object.defineProperty(exports, "ImportNamespaceSpecifier", {
  67439. enumerable: true,
  67440. get: function() {
  67441. return _index.importNamespaceSpecifier;
  67442. }
  67443. });
  67444. Object.defineProperty(exports, "ImportSpecifier", {
  67445. enumerable: true,
  67446. get: function() {
  67447. return _index.importSpecifier;
  67448. }
  67449. });
  67450. Object.defineProperty(exports, "MetaProperty", {
  67451. enumerable: true,
  67452. get: function() {
  67453. return _index.metaProperty;
  67454. }
  67455. });
  67456. Object.defineProperty(exports, "ClassMethod", {
  67457. enumerable: true,
  67458. get: function() {
  67459. return _index.classMethod;
  67460. }
  67461. });
  67462. Object.defineProperty(exports, "ObjectPattern", {
  67463. enumerable: true,
  67464. get: function() {
  67465. return _index.objectPattern;
  67466. }
  67467. });
  67468. Object.defineProperty(exports, "SpreadElement", {
  67469. enumerable: true,
  67470. get: function() {
  67471. return _index.spreadElement;
  67472. }
  67473. });
  67474. Object.defineProperty(exports, "Super", {
  67475. enumerable: true,
  67476. get: function() {
  67477. return _index.super;
  67478. }
  67479. });
  67480. Object.defineProperty(exports, "TaggedTemplateExpression", {
  67481. enumerable: true,
  67482. get: function() {
  67483. return _index.taggedTemplateExpression;
  67484. }
  67485. });
  67486. Object.defineProperty(exports, "TemplateElement", {
  67487. enumerable: true,
  67488. get: function() {
  67489. return _index.templateElement;
  67490. }
  67491. });
  67492. Object.defineProperty(exports, "TemplateLiteral", {
  67493. enumerable: true,
  67494. get: function() {
  67495. return _index.templateLiteral;
  67496. }
  67497. });
  67498. Object.defineProperty(exports, "YieldExpression", {
  67499. enumerable: true,
  67500. get: function() {
  67501. return _index.yieldExpression;
  67502. }
  67503. });
  67504. Object.defineProperty(exports, "AwaitExpression", {
  67505. enumerable: true,
  67506. get: function() {
  67507. return _index.awaitExpression;
  67508. }
  67509. });
  67510. Object.defineProperty(exports, "Import", {
  67511. enumerable: true,
  67512. get: function() {
  67513. return _index.import;
  67514. }
  67515. });
  67516. Object.defineProperty(exports, "BigIntLiteral", {
  67517. enumerable: true,
  67518. get: function() {
  67519. return _index.bigIntLiteral;
  67520. }
  67521. });
  67522. Object.defineProperty(exports, "ExportNamespaceSpecifier", {
  67523. enumerable: true,
  67524. get: function() {
  67525. return _index.exportNamespaceSpecifier;
  67526. }
  67527. });
  67528. Object.defineProperty(exports, "OptionalMemberExpression", {
  67529. enumerable: true,
  67530. get: function() {
  67531. return _index.optionalMemberExpression;
  67532. }
  67533. });
  67534. Object.defineProperty(exports, "OptionalCallExpression", {
  67535. enumerable: true,
  67536. get: function() {
  67537. return _index.optionalCallExpression;
  67538. }
  67539. });
  67540. Object.defineProperty(exports, "AnyTypeAnnotation", {
  67541. enumerable: true,
  67542. get: function() {
  67543. return _index.anyTypeAnnotation;
  67544. }
  67545. });
  67546. Object.defineProperty(exports, "ArrayTypeAnnotation", {
  67547. enumerable: true,
  67548. get: function() {
  67549. return _index.arrayTypeAnnotation;
  67550. }
  67551. });
  67552. Object.defineProperty(exports, "BooleanTypeAnnotation", {
  67553. enumerable: true,
  67554. get: function() {
  67555. return _index.booleanTypeAnnotation;
  67556. }
  67557. });
  67558. Object.defineProperty(exports, "BooleanLiteralTypeAnnotation", {
  67559. enumerable: true,
  67560. get: function() {
  67561. return _index.booleanLiteralTypeAnnotation;
  67562. }
  67563. });
  67564. Object.defineProperty(exports, "NullLiteralTypeAnnotation", {
  67565. enumerable: true,
  67566. get: function() {
  67567. return _index.nullLiteralTypeAnnotation;
  67568. }
  67569. });
  67570. Object.defineProperty(exports, "ClassImplements", {
  67571. enumerable: true,
  67572. get: function() {
  67573. return _index.classImplements;
  67574. }
  67575. });
  67576. Object.defineProperty(exports, "DeclareClass", {
  67577. enumerable: true,
  67578. get: function() {
  67579. return _index.declareClass;
  67580. }
  67581. });
  67582. Object.defineProperty(exports, "DeclareFunction", {
  67583. enumerable: true,
  67584. get: function() {
  67585. return _index.declareFunction;
  67586. }
  67587. });
  67588. Object.defineProperty(exports, "DeclareInterface", {
  67589. enumerable: true,
  67590. get: function() {
  67591. return _index.declareInterface;
  67592. }
  67593. });
  67594. Object.defineProperty(exports, "DeclareModule", {
  67595. enumerable: true,
  67596. get: function() {
  67597. return _index.declareModule;
  67598. }
  67599. });
  67600. Object.defineProperty(exports, "DeclareModuleExports", {
  67601. enumerable: true,
  67602. get: function() {
  67603. return _index.declareModuleExports;
  67604. }
  67605. });
  67606. Object.defineProperty(exports, "DeclareTypeAlias", {
  67607. enumerable: true,
  67608. get: function() {
  67609. return _index.declareTypeAlias;
  67610. }
  67611. });
  67612. Object.defineProperty(exports, "DeclareOpaqueType", {
  67613. enumerable: true,
  67614. get: function() {
  67615. return _index.declareOpaqueType;
  67616. }
  67617. });
  67618. Object.defineProperty(exports, "DeclareVariable", {
  67619. enumerable: true,
  67620. get: function() {
  67621. return _index.declareVariable;
  67622. }
  67623. });
  67624. Object.defineProperty(exports, "DeclareExportDeclaration", {
  67625. enumerable: true,
  67626. get: function() {
  67627. return _index.declareExportDeclaration;
  67628. }
  67629. });
  67630. Object.defineProperty(exports, "DeclareExportAllDeclaration", {
  67631. enumerable: true,
  67632. get: function() {
  67633. return _index.declareExportAllDeclaration;
  67634. }
  67635. });
  67636. Object.defineProperty(exports, "DeclaredPredicate", {
  67637. enumerable: true,
  67638. get: function() {
  67639. return _index.declaredPredicate;
  67640. }
  67641. });
  67642. Object.defineProperty(exports, "ExistsTypeAnnotation", {
  67643. enumerable: true,
  67644. get: function() {
  67645. return _index.existsTypeAnnotation;
  67646. }
  67647. });
  67648. Object.defineProperty(exports, "FunctionTypeAnnotation", {
  67649. enumerable: true,
  67650. get: function() {
  67651. return _index.functionTypeAnnotation;
  67652. }
  67653. });
  67654. Object.defineProperty(exports, "FunctionTypeParam", {
  67655. enumerable: true,
  67656. get: function() {
  67657. return _index.functionTypeParam;
  67658. }
  67659. });
  67660. Object.defineProperty(exports, "GenericTypeAnnotation", {
  67661. enumerable: true,
  67662. get: function() {
  67663. return _index.genericTypeAnnotation;
  67664. }
  67665. });
  67666. Object.defineProperty(exports, "InferredPredicate", {
  67667. enumerable: true,
  67668. get: function() {
  67669. return _index.inferredPredicate;
  67670. }
  67671. });
  67672. Object.defineProperty(exports, "InterfaceExtends", {
  67673. enumerable: true,
  67674. get: function() {
  67675. return _index.interfaceExtends;
  67676. }
  67677. });
  67678. Object.defineProperty(exports, "InterfaceDeclaration", {
  67679. enumerable: true,
  67680. get: function() {
  67681. return _index.interfaceDeclaration;
  67682. }
  67683. });
  67684. Object.defineProperty(exports, "InterfaceTypeAnnotation", {
  67685. enumerable: true,
  67686. get: function() {
  67687. return _index.interfaceTypeAnnotation;
  67688. }
  67689. });
  67690. Object.defineProperty(exports, "IntersectionTypeAnnotation", {
  67691. enumerable: true,
  67692. get: function() {
  67693. return _index.intersectionTypeAnnotation;
  67694. }
  67695. });
  67696. Object.defineProperty(exports, "MixedTypeAnnotation", {
  67697. enumerable: true,
  67698. get: function() {
  67699. return _index.mixedTypeAnnotation;
  67700. }
  67701. });
  67702. Object.defineProperty(exports, "EmptyTypeAnnotation", {
  67703. enumerable: true,
  67704. get: function() {
  67705. return _index.emptyTypeAnnotation;
  67706. }
  67707. });
  67708. Object.defineProperty(exports, "NullableTypeAnnotation", {
  67709. enumerable: true,
  67710. get: function() {
  67711. return _index.nullableTypeAnnotation;
  67712. }
  67713. });
  67714. Object.defineProperty(exports, "NumberLiteralTypeAnnotation", {
  67715. enumerable: true,
  67716. get: function() {
  67717. return _index.numberLiteralTypeAnnotation;
  67718. }
  67719. });
  67720. Object.defineProperty(exports, "NumberTypeAnnotation", {
  67721. enumerable: true,
  67722. get: function() {
  67723. return _index.numberTypeAnnotation;
  67724. }
  67725. });
  67726. Object.defineProperty(exports, "ObjectTypeAnnotation", {
  67727. enumerable: true,
  67728. get: function() {
  67729. return _index.objectTypeAnnotation;
  67730. }
  67731. });
  67732. Object.defineProperty(exports, "ObjectTypeInternalSlot", {
  67733. enumerable: true,
  67734. get: function() {
  67735. return _index.objectTypeInternalSlot;
  67736. }
  67737. });
  67738. Object.defineProperty(exports, "ObjectTypeCallProperty", {
  67739. enumerable: true,
  67740. get: function() {
  67741. return _index.objectTypeCallProperty;
  67742. }
  67743. });
  67744. Object.defineProperty(exports, "ObjectTypeIndexer", {
  67745. enumerable: true,
  67746. get: function() {
  67747. return _index.objectTypeIndexer;
  67748. }
  67749. });
  67750. Object.defineProperty(exports, "ObjectTypeProperty", {
  67751. enumerable: true,
  67752. get: function() {
  67753. return _index.objectTypeProperty;
  67754. }
  67755. });
  67756. Object.defineProperty(exports, "ObjectTypeSpreadProperty", {
  67757. enumerable: true,
  67758. get: function() {
  67759. return _index.objectTypeSpreadProperty;
  67760. }
  67761. });
  67762. Object.defineProperty(exports, "OpaqueType", {
  67763. enumerable: true,
  67764. get: function() {
  67765. return _index.opaqueType;
  67766. }
  67767. });
  67768. Object.defineProperty(exports, "QualifiedTypeIdentifier", {
  67769. enumerable: true,
  67770. get: function() {
  67771. return _index.qualifiedTypeIdentifier;
  67772. }
  67773. });
  67774. Object.defineProperty(exports, "StringLiteralTypeAnnotation", {
  67775. enumerable: true,
  67776. get: function() {
  67777. return _index.stringLiteralTypeAnnotation;
  67778. }
  67779. });
  67780. Object.defineProperty(exports, "StringTypeAnnotation", {
  67781. enumerable: true,
  67782. get: function() {
  67783. return _index.stringTypeAnnotation;
  67784. }
  67785. });
  67786. Object.defineProperty(exports, "SymbolTypeAnnotation", {
  67787. enumerable: true,
  67788. get: function() {
  67789. return _index.symbolTypeAnnotation;
  67790. }
  67791. });
  67792. Object.defineProperty(exports, "ThisTypeAnnotation", {
  67793. enumerable: true,
  67794. get: function() {
  67795. return _index.thisTypeAnnotation;
  67796. }
  67797. });
  67798. Object.defineProperty(exports, "TupleTypeAnnotation", {
  67799. enumerable: true,
  67800. get: function() {
  67801. return _index.tupleTypeAnnotation;
  67802. }
  67803. });
  67804. Object.defineProperty(exports, "TypeofTypeAnnotation", {
  67805. enumerable: true,
  67806. get: function() {
  67807. return _index.typeofTypeAnnotation;
  67808. }
  67809. });
  67810. Object.defineProperty(exports, "TypeAlias", {
  67811. enumerable: true,
  67812. get: function() {
  67813. return _index.typeAlias;
  67814. }
  67815. });
  67816. Object.defineProperty(exports, "TypeAnnotation", {
  67817. enumerable: true,
  67818. get: function() {
  67819. return _index.typeAnnotation;
  67820. }
  67821. });
  67822. Object.defineProperty(exports, "TypeCastExpression", {
  67823. enumerable: true,
  67824. get: function() {
  67825. return _index.typeCastExpression;
  67826. }
  67827. });
  67828. Object.defineProperty(exports, "TypeParameter", {
  67829. enumerable: true,
  67830. get: function() {
  67831. return _index.typeParameter;
  67832. }
  67833. });
  67834. Object.defineProperty(exports, "TypeParameterDeclaration", {
  67835. enumerable: true,
  67836. get: function() {
  67837. return _index.typeParameterDeclaration;
  67838. }
  67839. });
  67840. Object.defineProperty(exports, "TypeParameterInstantiation", {
  67841. enumerable: true,
  67842. get: function() {
  67843. return _index.typeParameterInstantiation;
  67844. }
  67845. });
  67846. Object.defineProperty(exports, "UnionTypeAnnotation", {
  67847. enumerable: true,
  67848. get: function() {
  67849. return _index.unionTypeAnnotation;
  67850. }
  67851. });
  67852. Object.defineProperty(exports, "Variance", {
  67853. enumerable: true,
  67854. get: function() {
  67855. return _index.variance;
  67856. }
  67857. });
  67858. Object.defineProperty(exports, "VoidTypeAnnotation", {
  67859. enumerable: true,
  67860. get: function() {
  67861. return _index.voidTypeAnnotation;
  67862. }
  67863. });
  67864. Object.defineProperty(exports, "EnumDeclaration", {
  67865. enumerable: true,
  67866. get: function() {
  67867. return _index.enumDeclaration;
  67868. }
  67869. });
  67870. Object.defineProperty(exports, "EnumBooleanBody", {
  67871. enumerable: true,
  67872. get: function() {
  67873. return _index.enumBooleanBody;
  67874. }
  67875. });
  67876. Object.defineProperty(exports, "EnumNumberBody", {
  67877. enumerable: true,
  67878. get: function() {
  67879. return _index.enumNumberBody;
  67880. }
  67881. });
  67882. Object.defineProperty(exports, "EnumStringBody", {
  67883. enumerable: true,
  67884. get: function() {
  67885. return _index.enumStringBody;
  67886. }
  67887. });
  67888. Object.defineProperty(exports, "EnumSymbolBody", {
  67889. enumerable: true,
  67890. get: function() {
  67891. return _index.enumSymbolBody;
  67892. }
  67893. });
  67894. Object.defineProperty(exports, "EnumBooleanMember", {
  67895. enumerable: true,
  67896. get: function() {
  67897. return _index.enumBooleanMember;
  67898. }
  67899. });
  67900. Object.defineProperty(exports, "EnumNumberMember", {
  67901. enumerable: true,
  67902. get: function() {
  67903. return _index.enumNumberMember;
  67904. }
  67905. });
  67906. Object.defineProperty(exports, "EnumStringMember", {
  67907. enumerable: true,
  67908. get: function() {
  67909. return _index.enumStringMember;
  67910. }
  67911. });
  67912. Object.defineProperty(exports, "EnumDefaultedMember", {
  67913. enumerable: true,
  67914. get: function() {
  67915. return _index.enumDefaultedMember;
  67916. }
  67917. });
  67918. Object.defineProperty(exports, "IndexedAccessType", {
  67919. enumerable: true,
  67920. get: function() {
  67921. return _index.indexedAccessType;
  67922. }
  67923. });
  67924. Object.defineProperty(exports, "OptionalIndexedAccessType", {
  67925. enumerable: true,
  67926. get: function() {
  67927. return _index.optionalIndexedAccessType;
  67928. }
  67929. });
  67930. Object.defineProperty(exports, "JSXAttribute", {
  67931. enumerable: true,
  67932. get: function() {
  67933. return _index.jsxAttribute;
  67934. }
  67935. });
  67936. Object.defineProperty(exports, "JSXClosingElement", {
  67937. enumerable: true,
  67938. get: function() {
  67939. return _index.jsxClosingElement;
  67940. }
  67941. });
  67942. Object.defineProperty(exports, "JSXElement", {
  67943. enumerable: true,
  67944. get: function() {
  67945. return _index.jsxElement;
  67946. }
  67947. });
  67948. Object.defineProperty(exports, "JSXEmptyExpression", {
  67949. enumerable: true,
  67950. get: function() {
  67951. return _index.jsxEmptyExpression;
  67952. }
  67953. });
  67954. Object.defineProperty(exports, "JSXExpressionContainer", {
  67955. enumerable: true,
  67956. get: function() {
  67957. return _index.jsxExpressionContainer;
  67958. }
  67959. });
  67960. Object.defineProperty(exports, "JSXSpreadChild", {
  67961. enumerable: true,
  67962. get: function() {
  67963. return _index.jsxSpreadChild;
  67964. }
  67965. });
  67966. Object.defineProperty(exports, "JSXIdentifier", {
  67967. enumerable: true,
  67968. get: function() {
  67969. return _index.jsxIdentifier;
  67970. }
  67971. });
  67972. Object.defineProperty(exports, "JSXMemberExpression", {
  67973. enumerable: true,
  67974. get: function() {
  67975. return _index.jsxMemberExpression;
  67976. }
  67977. });
  67978. Object.defineProperty(exports, "JSXNamespacedName", {
  67979. enumerable: true,
  67980. get: function() {
  67981. return _index.jsxNamespacedName;
  67982. }
  67983. });
  67984. Object.defineProperty(exports, "JSXOpeningElement", {
  67985. enumerable: true,
  67986. get: function() {
  67987. return _index.jsxOpeningElement;
  67988. }
  67989. });
  67990. Object.defineProperty(exports, "JSXSpreadAttribute", {
  67991. enumerable: true,
  67992. get: function() {
  67993. return _index.jsxSpreadAttribute;
  67994. }
  67995. });
  67996. Object.defineProperty(exports, "JSXText", {
  67997. enumerable: true,
  67998. get: function() {
  67999. return _index.jsxText;
  68000. }
  68001. });
  68002. Object.defineProperty(exports, "JSXFragment", {
  68003. enumerable: true,
  68004. get: function() {
  68005. return _index.jsxFragment;
  68006. }
  68007. });
  68008. Object.defineProperty(exports, "JSXOpeningFragment", {
  68009. enumerable: true,
  68010. get: function() {
  68011. return _index.jsxOpeningFragment;
  68012. }
  68013. });
  68014. Object.defineProperty(exports, "JSXClosingFragment", {
  68015. enumerable: true,
  68016. get: function() {
  68017. return _index.jsxClosingFragment;
  68018. }
  68019. });
  68020. Object.defineProperty(exports, "Noop", {
  68021. enumerable: true,
  68022. get: function() {
  68023. return _index.noop;
  68024. }
  68025. });
  68026. Object.defineProperty(exports, "Placeholder", {
  68027. enumerable: true,
  68028. get: function() {
  68029. return _index.placeholder;
  68030. }
  68031. });
  68032. Object.defineProperty(exports, "V8IntrinsicIdentifier", {
  68033. enumerable: true,
  68034. get: function() {
  68035. return _index.v8IntrinsicIdentifier;
  68036. }
  68037. });
  68038. Object.defineProperty(exports, "ArgumentPlaceholder", {
  68039. enumerable: true,
  68040. get: function() {
  68041. return _index.argumentPlaceholder;
  68042. }
  68043. });
  68044. Object.defineProperty(exports, "BindExpression", {
  68045. enumerable: true,
  68046. get: function() {
  68047. return _index.bindExpression;
  68048. }
  68049. });
  68050. Object.defineProperty(exports, "ClassProperty", {
  68051. enumerable: true,
  68052. get: function() {
  68053. return _index.classProperty;
  68054. }
  68055. });
  68056. Object.defineProperty(exports, "PipelineTopicExpression", {
  68057. enumerable: true,
  68058. get: function() {
  68059. return _index.pipelineTopicExpression;
  68060. }
  68061. });
  68062. Object.defineProperty(exports, "PipelineBareFunction", {
  68063. enumerable: true,
  68064. get: function() {
  68065. return _index.pipelineBareFunction;
  68066. }
  68067. });
  68068. Object.defineProperty(exports, "PipelinePrimaryTopicReference", {
  68069. enumerable: true,
  68070. get: function() {
  68071. return _index.pipelinePrimaryTopicReference;
  68072. }
  68073. });
  68074. Object.defineProperty(exports, "ClassPrivateProperty", {
  68075. enumerable: true,
  68076. get: function() {
  68077. return _index.classPrivateProperty;
  68078. }
  68079. });
  68080. Object.defineProperty(exports, "ClassPrivateMethod", {
  68081. enumerable: true,
  68082. get: function() {
  68083. return _index.classPrivateMethod;
  68084. }
  68085. });
  68086. Object.defineProperty(exports, "ImportAttribute", {
  68087. enumerable: true,
  68088. get: function() {
  68089. return _index.importAttribute;
  68090. }
  68091. });
  68092. Object.defineProperty(exports, "Decorator", {
  68093. enumerable: true,
  68094. get: function() {
  68095. return _index.decorator;
  68096. }
  68097. });
  68098. Object.defineProperty(exports, "DoExpression", {
  68099. enumerable: true,
  68100. get: function() {
  68101. return _index.doExpression;
  68102. }
  68103. });
  68104. Object.defineProperty(exports, "ExportDefaultSpecifier", {
  68105. enumerable: true,
  68106. get: function() {
  68107. return _index.exportDefaultSpecifier;
  68108. }
  68109. });
  68110. Object.defineProperty(exports, "PrivateName", {
  68111. enumerable: true,
  68112. get: function() {
  68113. return _index.privateName;
  68114. }
  68115. });
  68116. Object.defineProperty(exports, "RecordExpression", {
  68117. enumerable: true,
  68118. get: function() {
  68119. return _index.recordExpression;
  68120. }
  68121. });
  68122. Object.defineProperty(exports, "TupleExpression", {
  68123. enumerable: true,
  68124. get: function() {
  68125. return _index.tupleExpression;
  68126. }
  68127. });
  68128. Object.defineProperty(exports, "DecimalLiteral", {
  68129. enumerable: true,
  68130. get: function() {
  68131. return _index.decimalLiteral;
  68132. }
  68133. });
  68134. Object.defineProperty(exports, "StaticBlock", {
  68135. enumerable: true,
  68136. get: function() {
  68137. return _index.staticBlock;
  68138. }
  68139. });
  68140. Object.defineProperty(exports, "ModuleExpression", {
  68141. enumerable: true,
  68142. get: function() {
  68143. return _index.moduleExpression;
  68144. }
  68145. });
  68146. Object.defineProperty(exports, "TSParameterProperty", {
  68147. enumerable: true,
  68148. get: function() {
  68149. return _index.tsParameterProperty;
  68150. }
  68151. });
  68152. Object.defineProperty(exports, "TSDeclareFunction", {
  68153. enumerable: true,
  68154. get: function() {
  68155. return _index.tsDeclareFunction;
  68156. }
  68157. });
  68158. Object.defineProperty(exports, "TSDeclareMethod", {
  68159. enumerable: true,
  68160. get: function() {
  68161. return _index.tsDeclareMethod;
  68162. }
  68163. });
  68164. Object.defineProperty(exports, "TSQualifiedName", {
  68165. enumerable: true,
  68166. get: function() {
  68167. return _index.tsQualifiedName;
  68168. }
  68169. });
  68170. Object.defineProperty(exports, "TSCallSignatureDeclaration", {
  68171. enumerable: true,
  68172. get: function() {
  68173. return _index.tsCallSignatureDeclaration;
  68174. }
  68175. });
  68176. Object.defineProperty(exports, "TSConstructSignatureDeclaration", {
  68177. enumerable: true,
  68178. get: function() {
  68179. return _index.tsConstructSignatureDeclaration;
  68180. }
  68181. });
  68182. Object.defineProperty(exports, "TSPropertySignature", {
  68183. enumerable: true,
  68184. get: function() {
  68185. return _index.tsPropertySignature;
  68186. }
  68187. });
  68188. Object.defineProperty(exports, "TSMethodSignature", {
  68189. enumerable: true,
  68190. get: function() {
  68191. return _index.tsMethodSignature;
  68192. }
  68193. });
  68194. Object.defineProperty(exports, "TSIndexSignature", {
  68195. enumerable: true,
  68196. get: function() {
  68197. return _index.tsIndexSignature;
  68198. }
  68199. });
  68200. Object.defineProperty(exports, "TSAnyKeyword", {
  68201. enumerable: true,
  68202. get: function() {
  68203. return _index.tsAnyKeyword;
  68204. }
  68205. });
  68206. Object.defineProperty(exports, "TSBooleanKeyword", {
  68207. enumerable: true,
  68208. get: function() {
  68209. return _index.tsBooleanKeyword;
  68210. }
  68211. });
  68212. Object.defineProperty(exports, "TSBigIntKeyword", {
  68213. enumerable: true,
  68214. get: function() {
  68215. return _index.tsBigIntKeyword;
  68216. }
  68217. });
  68218. Object.defineProperty(exports, "TSIntrinsicKeyword", {
  68219. enumerable: true,
  68220. get: function() {
  68221. return _index.tsIntrinsicKeyword;
  68222. }
  68223. });
  68224. Object.defineProperty(exports, "TSNeverKeyword", {
  68225. enumerable: true,
  68226. get: function() {
  68227. return _index.tsNeverKeyword;
  68228. }
  68229. });
  68230. Object.defineProperty(exports, "TSNullKeyword", {
  68231. enumerable: true,
  68232. get: function() {
  68233. return _index.tsNullKeyword;
  68234. }
  68235. });
  68236. Object.defineProperty(exports, "TSNumberKeyword", {
  68237. enumerable: true,
  68238. get: function() {
  68239. return _index.tsNumberKeyword;
  68240. }
  68241. });
  68242. Object.defineProperty(exports, "TSObjectKeyword", {
  68243. enumerable: true,
  68244. get: function() {
  68245. return _index.tsObjectKeyword;
  68246. }
  68247. });
  68248. Object.defineProperty(exports, "TSStringKeyword", {
  68249. enumerable: true,
  68250. get: function() {
  68251. return _index.tsStringKeyword;
  68252. }
  68253. });
  68254. Object.defineProperty(exports, "TSSymbolKeyword", {
  68255. enumerable: true,
  68256. get: function() {
  68257. return _index.tsSymbolKeyword;
  68258. }
  68259. });
  68260. Object.defineProperty(exports, "TSUndefinedKeyword", {
  68261. enumerable: true,
  68262. get: function() {
  68263. return _index.tsUndefinedKeyword;
  68264. }
  68265. });
  68266. Object.defineProperty(exports, "TSUnknownKeyword", {
  68267. enumerable: true,
  68268. get: function() {
  68269. return _index.tsUnknownKeyword;
  68270. }
  68271. });
  68272. Object.defineProperty(exports, "TSVoidKeyword", {
  68273. enumerable: true,
  68274. get: function() {
  68275. return _index.tsVoidKeyword;
  68276. }
  68277. });
  68278. Object.defineProperty(exports, "TSThisType", {
  68279. enumerable: true,
  68280. get: function() {
  68281. return _index.tsThisType;
  68282. }
  68283. });
  68284. Object.defineProperty(exports, "TSFunctionType", {
  68285. enumerable: true,
  68286. get: function() {
  68287. return _index.tsFunctionType;
  68288. }
  68289. });
  68290. Object.defineProperty(exports, "TSConstructorType", {
  68291. enumerable: true,
  68292. get: function() {
  68293. return _index.tsConstructorType;
  68294. }
  68295. });
  68296. Object.defineProperty(exports, "TSTypeReference", {
  68297. enumerable: true,
  68298. get: function() {
  68299. return _index.tsTypeReference;
  68300. }
  68301. });
  68302. Object.defineProperty(exports, "TSTypePredicate", {
  68303. enumerable: true,
  68304. get: function() {
  68305. return _index.tsTypePredicate;
  68306. }
  68307. });
  68308. Object.defineProperty(exports, "TSTypeQuery", {
  68309. enumerable: true,
  68310. get: function() {
  68311. return _index.tsTypeQuery;
  68312. }
  68313. });
  68314. Object.defineProperty(exports, "TSTypeLiteral", {
  68315. enumerable: true,
  68316. get: function() {
  68317. return _index.tsTypeLiteral;
  68318. }
  68319. });
  68320. Object.defineProperty(exports, "TSArrayType", {
  68321. enumerable: true,
  68322. get: function() {
  68323. return _index.tsArrayType;
  68324. }
  68325. });
  68326. Object.defineProperty(exports, "TSTupleType", {
  68327. enumerable: true,
  68328. get: function() {
  68329. return _index.tsTupleType;
  68330. }
  68331. });
  68332. Object.defineProperty(exports, "TSOptionalType", {
  68333. enumerable: true,
  68334. get: function() {
  68335. return _index.tsOptionalType;
  68336. }
  68337. });
  68338. Object.defineProperty(exports, "TSRestType", {
  68339. enumerable: true,
  68340. get: function() {
  68341. return _index.tsRestType;
  68342. }
  68343. });
  68344. Object.defineProperty(exports, "TSNamedTupleMember", {
  68345. enumerable: true,
  68346. get: function() {
  68347. return _index.tsNamedTupleMember;
  68348. }
  68349. });
  68350. Object.defineProperty(exports, "TSUnionType", {
  68351. enumerable: true,
  68352. get: function() {
  68353. return _index.tsUnionType;
  68354. }
  68355. });
  68356. Object.defineProperty(exports, "TSIntersectionType", {
  68357. enumerable: true,
  68358. get: function() {
  68359. return _index.tsIntersectionType;
  68360. }
  68361. });
  68362. Object.defineProperty(exports, "TSConditionalType", {
  68363. enumerable: true,
  68364. get: function() {
  68365. return _index.tsConditionalType;
  68366. }
  68367. });
  68368. Object.defineProperty(exports, "TSInferType", {
  68369. enumerable: true,
  68370. get: function() {
  68371. return _index.tsInferType;
  68372. }
  68373. });
  68374. Object.defineProperty(exports, "TSParenthesizedType", {
  68375. enumerable: true,
  68376. get: function() {
  68377. return _index.tsParenthesizedType;
  68378. }
  68379. });
  68380. Object.defineProperty(exports, "TSTypeOperator", {
  68381. enumerable: true,
  68382. get: function() {
  68383. return _index.tsTypeOperator;
  68384. }
  68385. });
  68386. Object.defineProperty(exports, "TSIndexedAccessType", {
  68387. enumerable: true,
  68388. get: function() {
  68389. return _index.tsIndexedAccessType;
  68390. }
  68391. });
  68392. Object.defineProperty(exports, "TSMappedType", {
  68393. enumerable: true,
  68394. get: function() {
  68395. return _index.tsMappedType;
  68396. }
  68397. });
  68398. Object.defineProperty(exports, "TSLiteralType", {
  68399. enumerable: true,
  68400. get: function() {
  68401. return _index.tsLiteralType;
  68402. }
  68403. });
  68404. Object.defineProperty(exports, "TSExpressionWithTypeArguments", {
  68405. enumerable: true,
  68406. get: function() {
  68407. return _index.tsExpressionWithTypeArguments;
  68408. }
  68409. });
  68410. Object.defineProperty(exports, "TSInterfaceDeclaration", {
  68411. enumerable: true,
  68412. get: function() {
  68413. return _index.tsInterfaceDeclaration;
  68414. }
  68415. });
  68416. Object.defineProperty(exports, "TSInterfaceBody", {
  68417. enumerable: true,
  68418. get: function() {
  68419. return _index.tsInterfaceBody;
  68420. }
  68421. });
  68422. Object.defineProperty(exports, "TSTypeAliasDeclaration", {
  68423. enumerable: true,
  68424. get: function() {
  68425. return _index.tsTypeAliasDeclaration;
  68426. }
  68427. });
  68428. Object.defineProperty(exports, "TSAsExpression", {
  68429. enumerable: true,
  68430. get: function() {
  68431. return _index.tsAsExpression;
  68432. }
  68433. });
  68434. Object.defineProperty(exports, "TSTypeAssertion", {
  68435. enumerable: true,
  68436. get: function() {
  68437. return _index.tsTypeAssertion;
  68438. }
  68439. });
  68440. Object.defineProperty(exports, "TSEnumDeclaration", {
  68441. enumerable: true,
  68442. get: function() {
  68443. return _index.tsEnumDeclaration;
  68444. }
  68445. });
  68446. Object.defineProperty(exports, "TSEnumMember", {
  68447. enumerable: true,
  68448. get: function() {
  68449. return _index.tsEnumMember;
  68450. }
  68451. });
  68452. Object.defineProperty(exports, "TSModuleDeclaration", {
  68453. enumerable: true,
  68454. get: function() {
  68455. return _index.tsModuleDeclaration;
  68456. }
  68457. });
  68458. Object.defineProperty(exports, "TSModuleBlock", {
  68459. enumerable: true,
  68460. get: function() {
  68461. return _index.tsModuleBlock;
  68462. }
  68463. });
  68464. Object.defineProperty(exports, "TSImportType", {
  68465. enumerable: true,
  68466. get: function() {
  68467. return _index.tsImportType;
  68468. }
  68469. });
  68470. Object.defineProperty(exports, "TSImportEqualsDeclaration", {
  68471. enumerable: true,
  68472. get: function() {
  68473. return _index.tsImportEqualsDeclaration;
  68474. }
  68475. });
  68476. Object.defineProperty(exports, "TSExternalModuleReference", {
  68477. enumerable: true,
  68478. get: function() {
  68479. return _index.tsExternalModuleReference;
  68480. }
  68481. });
  68482. Object.defineProperty(exports, "TSNonNullExpression", {
  68483. enumerable: true,
  68484. get: function() {
  68485. return _index.tsNonNullExpression;
  68486. }
  68487. });
  68488. Object.defineProperty(exports, "TSExportAssignment", {
  68489. enumerable: true,
  68490. get: function() {
  68491. return _index.tsExportAssignment;
  68492. }
  68493. });
  68494. Object.defineProperty(exports, "TSNamespaceExportDeclaration", {
  68495. enumerable: true,
  68496. get: function() {
  68497. return _index.tsNamespaceExportDeclaration;
  68498. }
  68499. });
  68500. Object.defineProperty(exports, "TSTypeAnnotation", {
  68501. enumerable: true,
  68502. get: function() {
  68503. return _index.tsTypeAnnotation;
  68504. }
  68505. });
  68506. Object.defineProperty(exports, "TSTypeParameterInstantiation", {
  68507. enumerable: true,
  68508. get: function() {
  68509. return _index.tsTypeParameterInstantiation;
  68510. }
  68511. });
  68512. Object.defineProperty(exports, "TSTypeParameterDeclaration", {
  68513. enumerable: true,
  68514. get: function() {
  68515. return _index.tsTypeParameterDeclaration;
  68516. }
  68517. });
  68518. Object.defineProperty(exports, "TSTypeParameter", {
  68519. enumerable: true,
  68520. get: function() {
  68521. return _index.tsTypeParameter;
  68522. }
  68523. });
  68524. Object.defineProperty(exports, "NumberLiteral", {
  68525. enumerable: true,
  68526. get: function() {
  68527. return _index.numberLiteral;
  68528. }
  68529. });
  68530. Object.defineProperty(exports, "RegexLiteral", {
  68531. enumerable: true,
  68532. get: function() {
  68533. return _index.regexLiteral;
  68534. }
  68535. });
  68536. Object.defineProperty(exports, "RestProperty", {
  68537. enumerable: true,
  68538. get: function() {
  68539. return _index.restProperty;
  68540. }
  68541. });
  68542. Object.defineProperty(exports, "SpreadProperty", {
  68543. enumerable: true,
  68544. get: function() {
  68545. return _index.spreadProperty;
  68546. }
  68547. });
  68548. var _index = require_generated12();
  68549. }
  68550. });
  68551. // node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/clone/cloneNode.js
  68552. var require_cloneNode3 = __commonJS({
  68553. "node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/clone/cloneNode.js"(exports) {
  68554. "use strict";
  68555. Object.defineProperty(exports, "__esModule", {
  68556. value: true
  68557. });
  68558. exports.default = cloneNode;
  68559. var _definitions = require_definitions3();
  68560. var _generated = require_generated11();
  68561. var has = Function.call.bind(Object.prototype.hasOwnProperty);
  68562. function cloneIfNode(obj, deep, withoutLoc) {
  68563. if (obj && typeof obj.type === "string") {
  68564. return cloneNode(obj, deep, withoutLoc);
  68565. }
  68566. return obj;
  68567. }
  68568. function cloneIfNodeOrArray(obj, deep, withoutLoc) {
  68569. if (Array.isArray(obj)) {
  68570. return obj.map((node) => cloneIfNode(node, deep, withoutLoc));
  68571. }
  68572. return cloneIfNode(obj, deep, withoutLoc);
  68573. }
  68574. function cloneNode(node, deep = true, withoutLoc = false) {
  68575. if (!node)
  68576. return node;
  68577. const {
  68578. type
  68579. } = node;
  68580. const newNode = {
  68581. type: node.type
  68582. };
  68583. if ((0, _generated.isIdentifier)(node)) {
  68584. newNode.name = node.name;
  68585. if (has(node, "optional") && typeof node.optional === "boolean") {
  68586. newNode.optional = node.optional;
  68587. }
  68588. if (has(node, "typeAnnotation")) {
  68589. newNode.typeAnnotation = deep ? cloneIfNodeOrArray(node.typeAnnotation, true, withoutLoc) : node.typeAnnotation;
  68590. }
  68591. } else if (!has(_definitions.NODE_FIELDS, type)) {
  68592. throw new Error(`Unknown node type: "${type}"`);
  68593. } else {
  68594. for (const field of Object.keys(_definitions.NODE_FIELDS[type])) {
  68595. if (has(node, field)) {
  68596. if (deep) {
  68597. newNode[field] = (0, _generated.isFile)(node) && field === "comments" ? maybeCloneComments(node.comments, deep, withoutLoc) : cloneIfNodeOrArray(node[field], true, withoutLoc);
  68598. } else {
  68599. newNode[field] = node[field];
  68600. }
  68601. }
  68602. }
  68603. }
  68604. if (has(node, "loc")) {
  68605. if (withoutLoc) {
  68606. newNode.loc = null;
  68607. } else {
  68608. newNode.loc = node.loc;
  68609. }
  68610. }
  68611. if (has(node, "leadingComments")) {
  68612. newNode.leadingComments = maybeCloneComments(node.leadingComments, deep, withoutLoc);
  68613. }
  68614. if (has(node, "innerComments")) {
  68615. newNode.innerComments = maybeCloneComments(node.innerComments, deep, withoutLoc);
  68616. }
  68617. if (has(node, "trailingComments")) {
  68618. newNode.trailingComments = maybeCloneComments(node.trailingComments, deep, withoutLoc);
  68619. }
  68620. if (has(node, "extra")) {
  68621. newNode.extra = Object.assign({}, node.extra);
  68622. }
  68623. return newNode;
  68624. }
  68625. function maybeCloneComments(comments, deep, withoutLoc) {
  68626. if (!comments || !deep) {
  68627. return comments;
  68628. }
  68629. return comments.map(({
  68630. type,
  68631. value,
  68632. loc
  68633. }) => {
  68634. if (withoutLoc) {
  68635. return {
  68636. type,
  68637. value,
  68638. loc: null
  68639. };
  68640. }
  68641. return {
  68642. type,
  68643. value,
  68644. loc
  68645. };
  68646. });
  68647. }
  68648. }
  68649. });
  68650. // node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/clone/clone.js
  68651. var require_clone3 = __commonJS({
  68652. "node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/clone/clone.js"(exports) {
  68653. "use strict";
  68654. Object.defineProperty(exports, "__esModule", {
  68655. value: true
  68656. });
  68657. exports.default = clone;
  68658. var _cloneNode = require_cloneNode3();
  68659. function clone(node) {
  68660. return (0, _cloneNode.default)(node, false);
  68661. }
  68662. }
  68663. });
  68664. // node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/clone/cloneDeep.js
  68665. var require_cloneDeep3 = __commonJS({
  68666. "node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/clone/cloneDeep.js"(exports) {
  68667. "use strict";
  68668. Object.defineProperty(exports, "__esModule", {
  68669. value: true
  68670. });
  68671. exports.default = cloneDeep2;
  68672. var _cloneNode = require_cloneNode3();
  68673. function cloneDeep2(node) {
  68674. return (0, _cloneNode.default)(node);
  68675. }
  68676. }
  68677. });
  68678. // node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/clone/cloneDeepWithoutLoc.js
  68679. var require_cloneDeepWithoutLoc3 = __commonJS({
  68680. "node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/clone/cloneDeepWithoutLoc.js"(exports) {
  68681. "use strict";
  68682. Object.defineProperty(exports, "__esModule", {
  68683. value: true
  68684. });
  68685. exports.default = cloneDeepWithoutLoc;
  68686. var _cloneNode = require_cloneNode3();
  68687. function cloneDeepWithoutLoc(node) {
  68688. return (0, _cloneNode.default)(node, true, true);
  68689. }
  68690. }
  68691. });
  68692. // node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/clone/cloneWithoutLoc.js
  68693. var require_cloneWithoutLoc3 = __commonJS({
  68694. "node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/clone/cloneWithoutLoc.js"(exports) {
  68695. "use strict";
  68696. Object.defineProperty(exports, "__esModule", {
  68697. value: true
  68698. });
  68699. exports.default = cloneWithoutLoc;
  68700. var _cloneNode = require_cloneNode3();
  68701. function cloneWithoutLoc(node) {
  68702. return (0, _cloneNode.default)(node, false, true);
  68703. }
  68704. }
  68705. });
  68706. // node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/comments/addComments.js
  68707. var require_addComments3 = __commonJS({
  68708. "node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/comments/addComments.js"(exports) {
  68709. "use strict";
  68710. Object.defineProperty(exports, "__esModule", {
  68711. value: true
  68712. });
  68713. exports.default = addComments;
  68714. function addComments(node, type, comments) {
  68715. if (!comments || !node)
  68716. return node;
  68717. const key = `${type}Comments`;
  68718. if (node[key]) {
  68719. if (type === "leading") {
  68720. node[key] = comments.concat(node[key]);
  68721. } else {
  68722. node[key] = node[key].concat(comments);
  68723. }
  68724. } else {
  68725. node[key] = comments;
  68726. }
  68727. return node;
  68728. }
  68729. }
  68730. });
  68731. // node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/comments/addComment.js
  68732. var require_addComment3 = __commonJS({
  68733. "node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/comments/addComment.js"(exports) {
  68734. "use strict";
  68735. Object.defineProperty(exports, "__esModule", {
  68736. value: true
  68737. });
  68738. exports.default = addComment;
  68739. var _addComments = require_addComments3();
  68740. function addComment(node, type, content3, line) {
  68741. return (0, _addComments.default)(node, type, [{
  68742. type: line ? "CommentLine" : "CommentBlock",
  68743. value: content3
  68744. }]);
  68745. }
  68746. }
  68747. });
  68748. // node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/utils/inherit.js
  68749. var require_inherit3 = __commonJS({
  68750. "node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/utils/inherit.js"(exports) {
  68751. "use strict";
  68752. Object.defineProperty(exports, "__esModule", {
  68753. value: true
  68754. });
  68755. exports.default = inherit2;
  68756. function inherit2(key, child, parent) {
  68757. if (child && parent) {
  68758. child[key] = Array.from(new Set([].concat(child[key], parent[key]).filter(Boolean)));
  68759. }
  68760. }
  68761. }
  68762. });
  68763. // node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/comments/inheritInnerComments.js
  68764. var require_inheritInnerComments3 = __commonJS({
  68765. "node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/comments/inheritInnerComments.js"(exports) {
  68766. "use strict";
  68767. Object.defineProperty(exports, "__esModule", {
  68768. value: true
  68769. });
  68770. exports.default = inheritInnerComments;
  68771. var _inherit = require_inherit3();
  68772. function inheritInnerComments(child, parent) {
  68773. (0, _inherit.default)("innerComments", child, parent);
  68774. }
  68775. }
  68776. });
  68777. // node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/comments/inheritLeadingComments.js
  68778. var require_inheritLeadingComments3 = __commonJS({
  68779. "node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/comments/inheritLeadingComments.js"(exports) {
  68780. "use strict";
  68781. Object.defineProperty(exports, "__esModule", {
  68782. value: true
  68783. });
  68784. exports.default = inheritLeadingComments;
  68785. var _inherit = require_inherit3();
  68786. function inheritLeadingComments(child, parent) {
  68787. (0, _inherit.default)("leadingComments", child, parent);
  68788. }
  68789. }
  68790. });
  68791. // node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/comments/inheritTrailingComments.js
  68792. var require_inheritTrailingComments3 = __commonJS({
  68793. "node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/comments/inheritTrailingComments.js"(exports) {
  68794. "use strict";
  68795. Object.defineProperty(exports, "__esModule", {
  68796. value: true
  68797. });
  68798. exports.default = inheritTrailingComments;
  68799. var _inherit = require_inherit3();
  68800. function inheritTrailingComments(child, parent) {
  68801. (0, _inherit.default)("trailingComments", child, parent);
  68802. }
  68803. }
  68804. });
  68805. // node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/comments/inheritsComments.js
  68806. var require_inheritsComments3 = __commonJS({
  68807. "node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/comments/inheritsComments.js"(exports) {
  68808. "use strict";
  68809. Object.defineProperty(exports, "__esModule", {
  68810. value: true
  68811. });
  68812. exports.default = inheritsComments;
  68813. var _inheritTrailingComments = require_inheritTrailingComments3();
  68814. var _inheritLeadingComments = require_inheritLeadingComments3();
  68815. var _inheritInnerComments = require_inheritInnerComments3();
  68816. function inheritsComments(child, parent) {
  68817. (0, _inheritTrailingComments.default)(child, parent);
  68818. (0, _inheritLeadingComments.default)(child, parent);
  68819. (0, _inheritInnerComments.default)(child, parent);
  68820. return child;
  68821. }
  68822. }
  68823. });
  68824. // node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/comments/removeComments.js
  68825. var require_removeComments3 = __commonJS({
  68826. "node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/comments/removeComments.js"(exports) {
  68827. "use strict";
  68828. Object.defineProperty(exports, "__esModule", {
  68829. value: true
  68830. });
  68831. exports.default = removeComments;
  68832. var _constants = require_constants3();
  68833. function removeComments(node) {
  68834. _constants.COMMENT_KEYS.forEach((key) => {
  68835. node[key] = null;
  68836. });
  68837. return node;
  68838. }
  68839. }
  68840. });
  68841. // node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/constants/generated/index.js
  68842. var require_generated14 = __commonJS({
  68843. "node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/constants/generated/index.js"(exports) {
  68844. "use strict";
  68845. Object.defineProperty(exports, "__esModule", {
  68846. value: true
  68847. });
  68848. exports.TSBASETYPE_TYPES = exports.TSTYPE_TYPES = exports.TSTYPEELEMENT_TYPES = exports.PRIVATE_TYPES = exports.JSX_TYPES = exports.ENUMMEMBER_TYPES = exports.ENUMBODY_TYPES = exports.FLOWPREDICATE_TYPES = exports.FLOWDECLARATION_TYPES = exports.FLOWBASEANNOTATION_TYPES = exports.FLOWTYPE_TYPES = exports.FLOW_TYPES = exports.MODULESPECIFIER_TYPES = exports.EXPORTDECLARATION_TYPES = exports.MODULEDECLARATION_TYPES = exports.CLASS_TYPES = exports.PATTERN_TYPES = exports.UNARYLIKE_TYPES = exports.PROPERTY_TYPES = exports.OBJECTMEMBER_TYPES = exports.METHOD_TYPES = exports.USERWHITESPACABLE_TYPES = exports.IMMUTABLE_TYPES = exports.LITERAL_TYPES = exports.TSENTITYNAME_TYPES = exports.LVAL_TYPES = exports.PATTERNLIKE_TYPES = exports.DECLARATION_TYPES = exports.PUREISH_TYPES = exports.FUNCTIONPARENT_TYPES = exports.FUNCTION_TYPES = exports.FORXSTATEMENT_TYPES = exports.FOR_TYPES = exports.EXPRESSIONWRAPPER_TYPES = exports.WHILE_TYPES = exports.LOOP_TYPES = exports.CONDITIONAL_TYPES = exports.COMPLETIONSTATEMENT_TYPES = exports.TERMINATORLESS_TYPES = exports.STATEMENT_TYPES = exports.BLOCK_TYPES = exports.BLOCKPARENT_TYPES = exports.SCOPABLE_TYPES = exports.BINARY_TYPES = exports.EXPRESSION_TYPES = void 0;
  68849. var _definitions = require_definitions3();
  68850. var EXPRESSION_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Expression"];
  68851. exports.EXPRESSION_TYPES = EXPRESSION_TYPES;
  68852. var BINARY_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Binary"];
  68853. exports.BINARY_TYPES = BINARY_TYPES;
  68854. var SCOPABLE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Scopable"];
  68855. exports.SCOPABLE_TYPES = SCOPABLE_TYPES;
  68856. var BLOCKPARENT_TYPES = _definitions.FLIPPED_ALIAS_KEYS["BlockParent"];
  68857. exports.BLOCKPARENT_TYPES = BLOCKPARENT_TYPES;
  68858. var BLOCK_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Block"];
  68859. exports.BLOCK_TYPES = BLOCK_TYPES;
  68860. var STATEMENT_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Statement"];
  68861. exports.STATEMENT_TYPES = STATEMENT_TYPES;
  68862. var TERMINATORLESS_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Terminatorless"];
  68863. exports.TERMINATORLESS_TYPES = TERMINATORLESS_TYPES;
  68864. var COMPLETIONSTATEMENT_TYPES = _definitions.FLIPPED_ALIAS_KEYS["CompletionStatement"];
  68865. exports.COMPLETIONSTATEMENT_TYPES = COMPLETIONSTATEMENT_TYPES;
  68866. var CONDITIONAL_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Conditional"];
  68867. exports.CONDITIONAL_TYPES = CONDITIONAL_TYPES;
  68868. var LOOP_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Loop"];
  68869. exports.LOOP_TYPES = LOOP_TYPES;
  68870. var WHILE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["While"];
  68871. exports.WHILE_TYPES = WHILE_TYPES;
  68872. var EXPRESSIONWRAPPER_TYPES = _definitions.FLIPPED_ALIAS_KEYS["ExpressionWrapper"];
  68873. exports.EXPRESSIONWRAPPER_TYPES = EXPRESSIONWRAPPER_TYPES;
  68874. var FOR_TYPES = _definitions.FLIPPED_ALIAS_KEYS["For"];
  68875. exports.FOR_TYPES = FOR_TYPES;
  68876. var FORXSTATEMENT_TYPES = _definitions.FLIPPED_ALIAS_KEYS["ForXStatement"];
  68877. exports.FORXSTATEMENT_TYPES = FORXSTATEMENT_TYPES;
  68878. var FUNCTION_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Function"];
  68879. exports.FUNCTION_TYPES = FUNCTION_TYPES;
  68880. var FUNCTIONPARENT_TYPES = _definitions.FLIPPED_ALIAS_KEYS["FunctionParent"];
  68881. exports.FUNCTIONPARENT_TYPES = FUNCTIONPARENT_TYPES;
  68882. var PUREISH_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Pureish"];
  68883. exports.PUREISH_TYPES = PUREISH_TYPES;
  68884. var DECLARATION_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Declaration"];
  68885. exports.DECLARATION_TYPES = DECLARATION_TYPES;
  68886. var PATTERNLIKE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["PatternLike"];
  68887. exports.PATTERNLIKE_TYPES = PATTERNLIKE_TYPES;
  68888. var LVAL_TYPES = _definitions.FLIPPED_ALIAS_KEYS["LVal"];
  68889. exports.LVAL_TYPES = LVAL_TYPES;
  68890. var TSENTITYNAME_TYPES = _definitions.FLIPPED_ALIAS_KEYS["TSEntityName"];
  68891. exports.TSENTITYNAME_TYPES = TSENTITYNAME_TYPES;
  68892. var LITERAL_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Literal"];
  68893. exports.LITERAL_TYPES = LITERAL_TYPES;
  68894. var IMMUTABLE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Immutable"];
  68895. exports.IMMUTABLE_TYPES = IMMUTABLE_TYPES;
  68896. var USERWHITESPACABLE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["UserWhitespacable"];
  68897. exports.USERWHITESPACABLE_TYPES = USERWHITESPACABLE_TYPES;
  68898. var METHOD_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Method"];
  68899. exports.METHOD_TYPES = METHOD_TYPES;
  68900. var OBJECTMEMBER_TYPES = _definitions.FLIPPED_ALIAS_KEYS["ObjectMember"];
  68901. exports.OBJECTMEMBER_TYPES = OBJECTMEMBER_TYPES;
  68902. var PROPERTY_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Property"];
  68903. exports.PROPERTY_TYPES = PROPERTY_TYPES;
  68904. var UNARYLIKE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["UnaryLike"];
  68905. exports.UNARYLIKE_TYPES = UNARYLIKE_TYPES;
  68906. var PATTERN_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Pattern"];
  68907. exports.PATTERN_TYPES = PATTERN_TYPES;
  68908. var CLASS_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Class"];
  68909. exports.CLASS_TYPES = CLASS_TYPES;
  68910. var MODULEDECLARATION_TYPES = _definitions.FLIPPED_ALIAS_KEYS["ModuleDeclaration"];
  68911. exports.MODULEDECLARATION_TYPES = MODULEDECLARATION_TYPES;
  68912. var EXPORTDECLARATION_TYPES = _definitions.FLIPPED_ALIAS_KEYS["ExportDeclaration"];
  68913. exports.EXPORTDECLARATION_TYPES = EXPORTDECLARATION_TYPES;
  68914. var MODULESPECIFIER_TYPES = _definitions.FLIPPED_ALIAS_KEYS["ModuleSpecifier"];
  68915. exports.MODULESPECIFIER_TYPES = MODULESPECIFIER_TYPES;
  68916. var FLOW_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Flow"];
  68917. exports.FLOW_TYPES = FLOW_TYPES;
  68918. var FLOWTYPE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["FlowType"];
  68919. exports.FLOWTYPE_TYPES = FLOWTYPE_TYPES;
  68920. var FLOWBASEANNOTATION_TYPES = _definitions.FLIPPED_ALIAS_KEYS["FlowBaseAnnotation"];
  68921. exports.FLOWBASEANNOTATION_TYPES = FLOWBASEANNOTATION_TYPES;
  68922. var FLOWDECLARATION_TYPES = _definitions.FLIPPED_ALIAS_KEYS["FlowDeclaration"];
  68923. exports.FLOWDECLARATION_TYPES = FLOWDECLARATION_TYPES;
  68924. var FLOWPREDICATE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["FlowPredicate"];
  68925. exports.FLOWPREDICATE_TYPES = FLOWPREDICATE_TYPES;
  68926. var ENUMBODY_TYPES = _definitions.FLIPPED_ALIAS_KEYS["EnumBody"];
  68927. exports.ENUMBODY_TYPES = ENUMBODY_TYPES;
  68928. var ENUMMEMBER_TYPES = _definitions.FLIPPED_ALIAS_KEYS["EnumMember"];
  68929. exports.ENUMMEMBER_TYPES = ENUMMEMBER_TYPES;
  68930. var JSX_TYPES = _definitions.FLIPPED_ALIAS_KEYS["JSX"];
  68931. exports.JSX_TYPES = JSX_TYPES;
  68932. var PRIVATE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Private"];
  68933. exports.PRIVATE_TYPES = PRIVATE_TYPES;
  68934. var TSTYPEELEMENT_TYPES = _definitions.FLIPPED_ALIAS_KEYS["TSTypeElement"];
  68935. exports.TSTYPEELEMENT_TYPES = TSTYPEELEMENT_TYPES;
  68936. var TSTYPE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["TSType"];
  68937. exports.TSTYPE_TYPES = TSTYPE_TYPES;
  68938. var TSBASETYPE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["TSBaseType"];
  68939. exports.TSBASETYPE_TYPES = TSBASETYPE_TYPES;
  68940. }
  68941. });
  68942. // node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/converters/toBlock.js
  68943. var require_toBlock3 = __commonJS({
  68944. "node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/converters/toBlock.js"(exports) {
  68945. "use strict";
  68946. Object.defineProperty(exports, "__esModule", {
  68947. value: true
  68948. });
  68949. exports.default = toBlock;
  68950. var _generated = require_generated11();
  68951. var _generated2 = require_generated12();
  68952. function toBlock(node, parent) {
  68953. if ((0, _generated.isBlockStatement)(node)) {
  68954. return node;
  68955. }
  68956. let blockNodes = [];
  68957. if ((0, _generated.isEmptyStatement)(node)) {
  68958. blockNodes = [];
  68959. } else {
  68960. if (!(0, _generated.isStatement)(node)) {
  68961. if ((0, _generated.isFunction)(parent)) {
  68962. node = (0, _generated2.returnStatement)(node);
  68963. } else {
  68964. node = (0, _generated2.expressionStatement)(node);
  68965. }
  68966. }
  68967. blockNodes = [node];
  68968. }
  68969. return (0, _generated2.blockStatement)(blockNodes);
  68970. }
  68971. }
  68972. });
  68973. // node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/converters/ensureBlock.js
  68974. var require_ensureBlock3 = __commonJS({
  68975. "node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/converters/ensureBlock.js"(exports) {
  68976. "use strict";
  68977. Object.defineProperty(exports, "__esModule", {
  68978. value: true
  68979. });
  68980. exports.default = ensureBlock;
  68981. var _toBlock = require_toBlock3();
  68982. function ensureBlock(node, key = "body") {
  68983. return node[key] = (0, _toBlock.default)(node[key], node);
  68984. }
  68985. }
  68986. });
  68987. // node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/converters/toIdentifier.js
  68988. var require_toIdentifier3 = __commonJS({
  68989. "node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/converters/toIdentifier.js"(exports) {
  68990. "use strict";
  68991. Object.defineProperty(exports, "__esModule", {
  68992. value: true
  68993. });
  68994. exports.default = toIdentifier2;
  68995. var _isValidIdentifier = require_isValidIdentifier3();
  68996. var _helperValidatorIdentifier = require_lib15();
  68997. function toIdentifier2(input) {
  68998. input = input + "";
  68999. let name2 = "";
  69000. for (const c of input) {
  69001. name2 += (0, _helperValidatorIdentifier.isIdentifierChar)(c.codePointAt(0)) ? c : "-";
  69002. }
  69003. name2 = name2.replace(/^[-0-9]+/, "");
  69004. name2 = name2.replace(/[-\s]+(.)?/g, function(match, c) {
  69005. return c ? c.toUpperCase() : "";
  69006. });
  69007. if (!(0, _isValidIdentifier.default)(name2)) {
  69008. name2 = `_${name2}`;
  69009. }
  69010. return name2 || "_";
  69011. }
  69012. }
  69013. });
  69014. // node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/converters/toBindingIdentifierName.js
  69015. var require_toBindingIdentifierName3 = __commonJS({
  69016. "node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/converters/toBindingIdentifierName.js"(exports) {
  69017. "use strict";
  69018. Object.defineProperty(exports, "__esModule", {
  69019. value: true
  69020. });
  69021. exports.default = toBindingIdentifierName;
  69022. var _toIdentifier = require_toIdentifier3();
  69023. function toBindingIdentifierName(name2) {
  69024. name2 = (0, _toIdentifier.default)(name2);
  69025. if (name2 === "eval" || name2 === "arguments")
  69026. name2 = "_" + name2;
  69027. return name2;
  69028. }
  69029. }
  69030. });
  69031. // node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/converters/toComputedKey.js
  69032. var require_toComputedKey3 = __commonJS({
  69033. "node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/converters/toComputedKey.js"(exports) {
  69034. "use strict";
  69035. Object.defineProperty(exports, "__esModule", {
  69036. value: true
  69037. });
  69038. exports.default = toComputedKey;
  69039. var _generated = require_generated11();
  69040. var _generated2 = require_generated12();
  69041. function toComputedKey(node, key = node.key || node.property) {
  69042. if (!node.computed && (0, _generated.isIdentifier)(key))
  69043. key = (0, _generated2.stringLiteral)(key.name);
  69044. return key;
  69045. }
  69046. }
  69047. });
  69048. // node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/converters/toExpression.js
  69049. var require_toExpression3 = __commonJS({
  69050. "node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/converters/toExpression.js"(exports) {
  69051. "use strict";
  69052. Object.defineProperty(exports, "__esModule", {
  69053. value: true
  69054. });
  69055. exports.default = void 0;
  69056. var _generated = require_generated11();
  69057. var _default = toExpression;
  69058. exports.default = _default;
  69059. function toExpression(node) {
  69060. if ((0, _generated.isExpressionStatement)(node)) {
  69061. node = node.expression;
  69062. }
  69063. if ((0, _generated.isExpression)(node)) {
  69064. return node;
  69065. }
  69066. if ((0, _generated.isClass)(node)) {
  69067. node.type = "ClassExpression";
  69068. } else if ((0, _generated.isFunction)(node)) {
  69069. node.type = "FunctionExpression";
  69070. }
  69071. if (!(0, _generated.isExpression)(node)) {
  69072. throw new Error(`cannot turn ${node.type} to an expression`);
  69073. }
  69074. return node;
  69075. }
  69076. }
  69077. });
  69078. // node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/traverse/traverseFast.js
  69079. var require_traverseFast3 = __commonJS({
  69080. "node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/traverse/traverseFast.js"(exports) {
  69081. "use strict";
  69082. Object.defineProperty(exports, "__esModule", {
  69083. value: true
  69084. });
  69085. exports.default = traverseFast;
  69086. var _definitions = require_definitions3();
  69087. function traverseFast(node, enter, opts) {
  69088. if (!node)
  69089. return;
  69090. const keys2 = _definitions.VISITOR_KEYS[node.type];
  69091. if (!keys2)
  69092. return;
  69093. opts = opts || {};
  69094. enter(node, opts);
  69095. for (const key of keys2) {
  69096. const subNode = node[key];
  69097. if (Array.isArray(subNode)) {
  69098. for (const node2 of subNode) {
  69099. traverseFast(node2, enter, opts);
  69100. }
  69101. } else {
  69102. traverseFast(subNode, enter, opts);
  69103. }
  69104. }
  69105. }
  69106. }
  69107. });
  69108. // node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/modifications/removeProperties.js
  69109. var require_removeProperties3 = __commonJS({
  69110. "node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/modifications/removeProperties.js"(exports) {
  69111. "use strict";
  69112. Object.defineProperty(exports, "__esModule", {
  69113. value: true
  69114. });
  69115. exports.default = removeProperties;
  69116. var _constants = require_constants3();
  69117. var CLEAR_KEYS = ["tokens", "start", "end", "loc", "raw", "rawValue"];
  69118. var CLEAR_KEYS_PLUS_COMMENTS = _constants.COMMENT_KEYS.concat(["comments"]).concat(CLEAR_KEYS);
  69119. function removeProperties(node, opts = {}) {
  69120. const map = opts.preserveComments ? CLEAR_KEYS : CLEAR_KEYS_PLUS_COMMENTS;
  69121. for (const key of map) {
  69122. if (node[key] != null)
  69123. node[key] = void 0;
  69124. }
  69125. for (const key of Object.keys(node)) {
  69126. if (key[0] === "_" && node[key] != null)
  69127. node[key] = void 0;
  69128. }
  69129. const symbols = Object.getOwnPropertySymbols(node);
  69130. for (const sym of symbols) {
  69131. node[sym] = null;
  69132. }
  69133. }
  69134. }
  69135. });
  69136. // node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/modifications/removePropertiesDeep.js
  69137. var require_removePropertiesDeep3 = __commonJS({
  69138. "node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/modifications/removePropertiesDeep.js"(exports) {
  69139. "use strict";
  69140. Object.defineProperty(exports, "__esModule", {
  69141. value: true
  69142. });
  69143. exports.default = removePropertiesDeep;
  69144. var _traverseFast = require_traverseFast3();
  69145. var _removeProperties = require_removeProperties3();
  69146. function removePropertiesDeep(tree, opts) {
  69147. (0, _traverseFast.default)(tree, _removeProperties.default, opts);
  69148. return tree;
  69149. }
  69150. }
  69151. });
  69152. // node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/converters/toKeyAlias.js
  69153. var require_toKeyAlias3 = __commonJS({
  69154. "node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/converters/toKeyAlias.js"(exports) {
  69155. "use strict";
  69156. Object.defineProperty(exports, "__esModule", {
  69157. value: true
  69158. });
  69159. exports.default = toKeyAlias;
  69160. var _generated = require_generated11();
  69161. var _cloneNode = require_cloneNode3();
  69162. var _removePropertiesDeep = require_removePropertiesDeep3();
  69163. function toKeyAlias(node, key = node.key) {
  69164. let alias;
  69165. if (node.kind === "method") {
  69166. return toKeyAlias.increment() + "";
  69167. } else if ((0, _generated.isIdentifier)(key)) {
  69168. alias = key.name;
  69169. } else if ((0, _generated.isStringLiteral)(key)) {
  69170. alias = JSON.stringify(key.value);
  69171. } else {
  69172. alias = JSON.stringify((0, _removePropertiesDeep.default)((0, _cloneNode.default)(key)));
  69173. }
  69174. if (node.computed) {
  69175. alias = `[${alias}]`;
  69176. }
  69177. if (node.static) {
  69178. alias = `static:${alias}`;
  69179. }
  69180. return alias;
  69181. }
  69182. toKeyAlias.uid = 0;
  69183. toKeyAlias.increment = function() {
  69184. if (toKeyAlias.uid >= Number.MAX_SAFE_INTEGER) {
  69185. return toKeyAlias.uid = 0;
  69186. } else {
  69187. return toKeyAlias.uid++;
  69188. }
  69189. };
  69190. }
  69191. });
  69192. // node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/retrievers/getBindingIdentifiers.js
  69193. var require_getBindingIdentifiers3 = __commonJS({
  69194. "node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/retrievers/getBindingIdentifiers.js"(exports) {
  69195. "use strict";
  69196. Object.defineProperty(exports, "__esModule", {
  69197. value: true
  69198. });
  69199. exports.default = getBindingIdentifiers;
  69200. var _generated = require_generated11();
  69201. function getBindingIdentifiers(node, duplicates, outerOnly) {
  69202. let search2 = [].concat(node);
  69203. const ids = /* @__PURE__ */ Object.create(null);
  69204. while (search2.length) {
  69205. const id = search2.shift();
  69206. if (!id)
  69207. continue;
  69208. const keys2 = getBindingIdentifiers.keys[id.type];
  69209. if ((0, _generated.isIdentifier)(id)) {
  69210. if (duplicates) {
  69211. const _ids = ids[id.name] = ids[id.name] || [];
  69212. _ids.push(id);
  69213. } else {
  69214. ids[id.name] = id;
  69215. }
  69216. continue;
  69217. }
  69218. if ((0, _generated.isExportDeclaration)(id) && !(0, _generated.isExportAllDeclaration)(id)) {
  69219. if ((0, _generated.isDeclaration)(id.declaration)) {
  69220. search2.push(id.declaration);
  69221. }
  69222. continue;
  69223. }
  69224. if (outerOnly) {
  69225. if ((0, _generated.isFunctionDeclaration)(id)) {
  69226. search2.push(id.id);
  69227. continue;
  69228. }
  69229. if ((0, _generated.isFunctionExpression)(id)) {
  69230. continue;
  69231. }
  69232. }
  69233. if (keys2) {
  69234. for (let i = 0; i < keys2.length; i++) {
  69235. const key = keys2[i];
  69236. if (id[key]) {
  69237. search2 = search2.concat(id[key]);
  69238. }
  69239. }
  69240. }
  69241. }
  69242. return ids;
  69243. }
  69244. getBindingIdentifiers.keys = {
  69245. DeclareClass: ["id"],
  69246. DeclareFunction: ["id"],
  69247. DeclareModule: ["id"],
  69248. DeclareVariable: ["id"],
  69249. DeclareInterface: ["id"],
  69250. DeclareTypeAlias: ["id"],
  69251. DeclareOpaqueType: ["id"],
  69252. InterfaceDeclaration: ["id"],
  69253. TypeAlias: ["id"],
  69254. OpaqueType: ["id"],
  69255. CatchClause: ["param"],
  69256. LabeledStatement: ["label"],
  69257. UnaryExpression: ["argument"],
  69258. AssignmentExpression: ["left"],
  69259. ImportSpecifier: ["local"],
  69260. ImportNamespaceSpecifier: ["local"],
  69261. ImportDefaultSpecifier: ["local"],
  69262. ImportDeclaration: ["specifiers"],
  69263. ExportSpecifier: ["exported"],
  69264. ExportNamespaceSpecifier: ["exported"],
  69265. ExportDefaultSpecifier: ["exported"],
  69266. FunctionDeclaration: ["id", "params"],
  69267. FunctionExpression: ["id", "params"],
  69268. ArrowFunctionExpression: ["params"],
  69269. ObjectMethod: ["params"],
  69270. ClassMethod: ["params"],
  69271. ForInStatement: ["left"],
  69272. ForOfStatement: ["left"],
  69273. ClassDeclaration: ["id"],
  69274. ClassExpression: ["id"],
  69275. RestElement: ["argument"],
  69276. UpdateExpression: ["argument"],
  69277. ObjectProperty: ["value"],
  69278. AssignmentPattern: ["left"],
  69279. ArrayPattern: ["elements"],
  69280. ObjectPattern: ["properties"],
  69281. VariableDeclaration: ["declarations"],
  69282. VariableDeclarator: ["id"]
  69283. };
  69284. }
  69285. });
  69286. // node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/converters/gatherSequenceExpressions.js
  69287. var require_gatherSequenceExpressions3 = __commonJS({
  69288. "node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/converters/gatherSequenceExpressions.js"(exports) {
  69289. "use strict";
  69290. Object.defineProperty(exports, "__esModule", {
  69291. value: true
  69292. });
  69293. exports.default = gatherSequenceExpressions;
  69294. var _getBindingIdentifiers = require_getBindingIdentifiers3();
  69295. var _generated = require_generated11();
  69296. var _generated2 = require_generated12();
  69297. var _cloneNode = require_cloneNode3();
  69298. function gatherSequenceExpressions(nodes, scope, declars) {
  69299. const exprs = [];
  69300. let ensureLastUndefined = true;
  69301. for (const node of nodes) {
  69302. if (!(0, _generated.isEmptyStatement)(node)) {
  69303. ensureLastUndefined = false;
  69304. }
  69305. if ((0, _generated.isExpression)(node)) {
  69306. exprs.push(node);
  69307. } else if ((0, _generated.isExpressionStatement)(node)) {
  69308. exprs.push(node.expression);
  69309. } else if ((0, _generated.isVariableDeclaration)(node)) {
  69310. if (node.kind !== "var")
  69311. return;
  69312. for (const declar of node.declarations) {
  69313. const bindings = (0, _getBindingIdentifiers.default)(declar);
  69314. for (const key of Object.keys(bindings)) {
  69315. declars.push({
  69316. kind: node.kind,
  69317. id: (0, _cloneNode.default)(bindings[key])
  69318. });
  69319. }
  69320. if (declar.init) {
  69321. exprs.push((0, _generated2.assignmentExpression)("=", declar.id, declar.init));
  69322. }
  69323. }
  69324. ensureLastUndefined = true;
  69325. } else if ((0, _generated.isIfStatement)(node)) {
  69326. const consequent = node.consequent ? gatherSequenceExpressions([node.consequent], scope, declars) : scope.buildUndefinedNode();
  69327. const alternate = node.alternate ? gatherSequenceExpressions([node.alternate], scope, declars) : scope.buildUndefinedNode();
  69328. if (!consequent || !alternate)
  69329. return;
  69330. exprs.push((0, _generated2.conditionalExpression)(node.test, consequent, alternate));
  69331. } else if ((0, _generated.isBlockStatement)(node)) {
  69332. const body = gatherSequenceExpressions(node.body, scope, declars);
  69333. if (!body)
  69334. return;
  69335. exprs.push(body);
  69336. } else if ((0, _generated.isEmptyStatement)(node)) {
  69337. if (nodes.indexOf(node) === 0) {
  69338. ensureLastUndefined = true;
  69339. }
  69340. } else {
  69341. return;
  69342. }
  69343. }
  69344. if (ensureLastUndefined) {
  69345. exprs.push(scope.buildUndefinedNode());
  69346. }
  69347. if (exprs.length === 1) {
  69348. return exprs[0];
  69349. } else {
  69350. return (0, _generated2.sequenceExpression)(exprs);
  69351. }
  69352. }
  69353. }
  69354. });
  69355. // node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/converters/toSequenceExpression.js
  69356. var require_toSequenceExpression3 = __commonJS({
  69357. "node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/converters/toSequenceExpression.js"(exports) {
  69358. "use strict";
  69359. Object.defineProperty(exports, "__esModule", {
  69360. value: true
  69361. });
  69362. exports.default = toSequenceExpression;
  69363. var _gatherSequenceExpressions = require_gatherSequenceExpressions3();
  69364. function toSequenceExpression(nodes, scope) {
  69365. if (!(nodes != null && nodes.length))
  69366. return;
  69367. const declars = [];
  69368. const result = (0, _gatherSequenceExpressions.default)(nodes, scope, declars);
  69369. if (!result)
  69370. return;
  69371. for (const declar of declars) {
  69372. scope.push(declar);
  69373. }
  69374. return result;
  69375. }
  69376. }
  69377. });
  69378. // node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/converters/toStatement.js
  69379. var require_toStatement3 = __commonJS({
  69380. "node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/converters/toStatement.js"(exports) {
  69381. "use strict";
  69382. Object.defineProperty(exports, "__esModule", {
  69383. value: true
  69384. });
  69385. exports.default = void 0;
  69386. var _generated = require_generated11();
  69387. var _generated2 = require_generated12();
  69388. var _default = toStatement;
  69389. exports.default = _default;
  69390. function toStatement(node, ignore3) {
  69391. if ((0, _generated.isStatement)(node)) {
  69392. return node;
  69393. }
  69394. let mustHaveId = false;
  69395. let newType;
  69396. if ((0, _generated.isClass)(node)) {
  69397. mustHaveId = true;
  69398. newType = "ClassDeclaration";
  69399. } else if ((0, _generated.isFunction)(node)) {
  69400. mustHaveId = true;
  69401. newType = "FunctionDeclaration";
  69402. } else if ((0, _generated.isAssignmentExpression)(node)) {
  69403. return (0, _generated2.expressionStatement)(node);
  69404. }
  69405. if (mustHaveId && !node.id) {
  69406. newType = false;
  69407. }
  69408. if (!newType) {
  69409. if (ignore3) {
  69410. return false;
  69411. } else {
  69412. throw new Error(`cannot turn ${node.type} to a statement`);
  69413. }
  69414. }
  69415. node.type = newType;
  69416. return node;
  69417. }
  69418. }
  69419. });
  69420. // node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/converters/valueToNode.js
  69421. var require_valueToNode3 = __commonJS({
  69422. "node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/converters/valueToNode.js"(exports) {
  69423. "use strict";
  69424. Object.defineProperty(exports, "__esModule", {
  69425. value: true
  69426. });
  69427. exports.default = void 0;
  69428. var _isValidIdentifier = require_isValidIdentifier3();
  69429. var _generated = require_generated12();
  69430. var _default = valueToNode;
  69431. exports.default = _default;
  69432. var objectToString = Function.call.bind(Object.prototype.toString);
  69433. function isRegExp(value) {
  69434. return objectToString(value) === "[object RegExp]";
  69435. }
  69436. function isPlainObject2(value) {
  69437. if (typeof value !== "object" || value === null || Object.prototype.toString.call(value) !== "[object Object]") {
  69438. return false;
  69439. }
  69440. const proto = Object.getPrototypeOf(value);
  69441. return proto === null || Object.getPrototypeOf(proto) === null;
  69442. }
  69443. function valueToNode(value) {
  69444. if (value === void 0) {
  69445. return (0, _generated.identifier)("undefined");
  69446. }
  69447. if (value === true || value === false) {
  69448. return (0, _generated.booleanLiteral)(value);
  69449. }
  69450. if (value === null) {
  69451. return (0, _generated.nullLiteral)();
  69452. }
  69453. if (typeof value === "string") {
  69454. return (0, _generated.stringLiteral)(value);
  69455. }
  69456. if (typeof value === "number") {
  69457. let result;
  69458. if (Number.isFinite(value)) {
  69459. result = (0, _generated.numericLiteral)(Math.abs(value));
  69460. } else {
  69461. let numerator;
  69462. if (Number.isNaN(value)) {
  69463. numerator = (0, _generated.numericLiteral)(0);
  69464. } else {
  69465. numerator = (0, _generated.numericLiteral)(1);
  69466. }
  69467. result = (0, _generated.binaryExpression)("/", numerator, (0, _generated.numericLiteral)(0));
  69468. }
  69469. if (value < 0 || Object.is(value, -0)) {
  69470. result = (0, _generated.unaryExpression)("-", result);
  69471. }
  69472. return result;
  69473. }
  69474. if (isRegExp(value)) {
  69475. const pattern = value.source;
  69476. const flags = value.toString().match(/\/([a-z]+|)$/)[1];
  69477. return (0, _generated.regExpLiteral)(pattern, flags);
  69478. }
  69479. if (Array.isArray(value)) {
  69480. return (0, _generated.arrayExpression)(value.map(valueToNode));
  69481. }
  69482. if (isPlainObject2(value)) {
  69483. const props = [];
  69484. for (const key of Object.keys(value)) {
  69485. let nodeKey;
  69486. if ((0, _isValidIdentifier.default)(key)) {
  69487. nodeKey = (0, _generated.identifier)(key);
  69488. } else {
  69489. nodeKey = (0, _generated.stringLiteral)(key);
  69490. }
  69491. props.push((0, _generated.objectProperty)(nodeKey, valueToNode(value[key])));
  69492. }
  69493. return (0, _generated.objectExpression)(props);
  69494. }
  69495. throw new Error("don't know how to turn this value into a node");
  69496. }
  69497. }
  69498. });
  69499. // node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/modifications/appendToMemberExpression.js
  69500. var require_appendToMemberExpression3 = __commonJS({
  69501. "node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/modifications/appendToMemberExpression.js"(exports) {
  69502. "use strict";
  69503. Object.defineProperty(exports, "__esModule", {
  69504. value: true
  69505. });
  69506. exports.default = appendToMemberExpression;
  69507. var _generated = require_generated12();
  69508. function appendToMemberExpression(member, append, computed = false) {
  69509. member.object = (0, _generated.memberExpression)(member.object, member.property, member.computed);
  69510. member.property = append;
  69511. member.computed = !!computed;
  69512. return member;
  69513. }
  69514. }
  69515. });
  69516. // node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/modifications/inherits.js
  69517. var require_inherits3 = __commonJS({
  69518. "node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/modifications/inherits.js"(exports) {
  69519. "use strict";
  69520. Object.defineProperty(exports, "__esModule", {
  69521. value: true
  69522. });
  69523. exports.default = inherits;
  69524. var _constants = require_constants3();
  69525. var _inheritsComments = require_inheritsComments3();
  69526. function inherits(child, parent) {
  69527. if (!child || !parent)
  69528. return child;
  69529. for (const key of _constants.INHERIT_KEYS.optional) {
  69530. if (child[key] == null) {
  69531. child[key] = parent[key];
  69532. }
  69533. }
  69534. for (const key of Object.keys(parent)) {
  69535. if (key[0] === "_" && key !== "__clone")
  69536. child[key] = parent[key];
  69537. }
  69538. for (const key of _constants.INHERIT_KEYS.force) {
  69539. child[key] = parent[key];
  69540. }
  69541. (0, _inheritsComments.default)(child, parent);
  69542. return child;
  69543. }
  69544. }
  69545. });
  69546. // node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/modifications/prependToMemberExpression.js
  69547. var require_prependToMemberExpression3 = __commonJS({
  69548. "node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/modifications/prependToMemberExpression.js"(exports) {
  69549. "use strict";
  69550. Object.defineProperty(exports, "__esModule", {
  69551. value: true
  69552. });
  69553. exports.default = prependToMemberExpression;
  69554. var _generated = require_generated12();
  69555. function prependToMemberExpression(member, prepend) {
  69556. member.object = (0, _generated.memberExpression)(prepend, member.object);
  69557. return member;
  69558. }
  69559. }
  69560. });
  69561. // node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/retrievers/getOuterBindingIdentifiers.js
  69562. var require_getOuterBindingIdentifiers3 = __commonJS({
  69563. "node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/retrievers/getOuterBindingIdentifiers.js"(exports) {
  69564. "use strict";
  69565. Object.defineProperty(exports, "__esModule", {
  69566. value: true
  69567. });
  69568. exports.default = void 0;
  69569. var _getBindingIdentifiers = require_getBindingIdentifiers3();
  69570. var _default = getOuterBindingIdentifiers;
  69571. exports.default = _default;
  69572. function getOuterBindingIdentifiers(node, duplicates) {
  69573. return (0, _getBindingIdentifiers.default)(node, duplicates, true);
  69574. }
  69575. }
  69576. });
  69577. // node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/traverse/traverse.js
  69578. var require_traverse3 = __commonJS({
  69579. "node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/traverse/traverse.js"(exports) {
  69580. "use strict";
  69581. Object.defineProperty(exports, "__esModule", {
  69582. value: true
  69583. });
  69584. exports.default = traverse;
  69585. var _definitions = require_definitions3();
  69586. function traverse(node, handlers2, state) {
  69587. if (typeof handlers2 === "function") {
  69588. handlers2 = {
  69589. enter: handlers2
  69590. };
  69591. }
  69592. const {
  69593. enter,
  69594. exit: exit2
  69595. } = handlers2;
  69596. traverseSimpleImpl(node, enter, exit2, state, []);
  69597. }
  69598. function traverseSimpleImpl(node, enter, exit2, state, ancestors) {
  69599. const keys2 = _definitions.VISITOR_KEYS[node.type];
  69600. if (!keys2)
  69601. return;
  69602. if (enter)
  69603. enter(node, ancestors, state);
  69604. for (const key of keys2) {
  69605. const subNode = node[key];
  69606. if (Array.isArray(subNode)) {
  69607. for (let i = 0; i < subNode.length; i++) {
  69608. const child = subNode[i];
  69609. if (!child)
  69610. continue;
  69611. ancestors.push({
  69612. node,
  69613. key,
  69614. index: i
  69615. });
  69616. traverseSimpleImpl(child, enter, exit2, state, ancestors);
  69617. ancestors.pop();
  69618. }
  69619. } else if (subNode) {
  69620. ancestors.push({
  69621. node,
  69622. key
  69623. });
  69624. traverseSimpleImpl(subNode, enter, exit2, state, ancestors);
  69625. ancestors.pop();
  69626. }
  69627. }
  69628. if (exit2)
  69629. exit2(node, ancestors, state);
  69630. }
  69631. }
  69632. });
  69633. // node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/validators/isBinding.js
  69634. var require_isBinding3 = __commonJS({
  69635. "node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/validators/isBinding.js"(exports) {
  69636. "use strict";
  69637. Object.defineProperty(exports, "__esModule", {
  69638. value: true
  69639. });
  69640. exports.default = isBinding;
  69641. var _getBindingIdentifiers = require_getBindingIdentifiers3();
  69642. function isBinding(node, parent, grandparent) {
  69643. if (grandparent && node.type === "Identifier" && parent.type === "ObjectProperty" && grandparent.type === "ObjectExpression") {
  69644. return false;
  69645. }
  69646. const keys2 = _getBindingIdentifiers.default.keys[parent.type];
  69647. if (keys2) {
  69648. for (let i = 0; i < keys2.length; i++) {
  69649. const key = keys2[i];
  69650. const val = parent[key];
  69651. if (Array.isArray(val)) {
  69652. if (val.indexOf(node) >= 0)
  69653. return true;
  69654. } else {
  69655. if (val === node)
  69656. return true;
  69657. }
  69658. }
  69659. }
  69660. return false;
  69661. }
  69662. }
  69663. });
  69664. // node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/validators/isLet.js
  69665. var require_isLet3 = __commonJS({
  69666. "node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/validators/isLet.js"(exports) {
  69667. "use strict";
  69668. Object.defineProperty(exports, "__esModule", {
  69669. value: true
  69670. });
  69671. exports.default = isLet;
  69672. var _generated = require_generated11();
  69673. var _constants = require_constants3();
  69674. function isLet(node) {
  69675. return (0, _generated.isVariableDeclaration)(node) && (node.kind !== "var" || node[_constants.BLOCK_SCOPED_SYMBOL]);
  69676. }
  69677. }
  69678. });
  69679. // node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/validators/isBlockScoped.js
  69680. var require_isBlockScoped3 = __commonJS({
  69681. "node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/validators/isBlockScoped.js"(exports) {
  69682. "use strict";
  69683. Object.defineProperty(exports, "__esModule", {
  69684. value: true
  69685. });
  69686. exports.default = isBlockScoped;
  69687. var _generated = require_generated11();
  69688. var _isLet = require_isLet3();
  69689. function isBlockScoped(node) {
  69690. return (0, _generated.isFunctionDeclaration)(node) || (0, _generated.isClassDeclaration)(node) || (0, _isLet.default)(node);
  69691. }
  69692. }
  69693. });
  69694. // node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/validators/isImmutable.js
  69695. var require_isImmutable3 = __commonJS({
  69696. "node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/validators/isImmutable.js"(exports) {
  69697. "use strict";
  69698. Object.defineProperty(exports, "__esModule", {
  69699. value: true
  69700. });
  69701. exports.default = isImmutable;
  69702. var _isType = require_isType3();
  69703. var _generated = require_generated11();
  69704. function isImmutable(node) {
  69705. if ((0, _isType.default)(node.type, "Immutable"))
  69706. return true;
  69707. if ((0, _generated.isIdentifier)(node)) {
  69708. if (node.name === "undefined") {
  69709. return true;
  69710. } else {
  69711. return false;
  69712. }
  69713. }
  69714. return false;
  69715. }
  69716. }
  69717. });
  69718. // node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/validators/isNodesEquivalent.js
  69719. var require_isNodesEquivalent3 = __commonJS({
  69720. "node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/validators/isNodesEquivalent.js"(exports) {
  69721. "use strict";
  69722. Object.defineProperty(exports, "__esModule", {
  69723. value: true
  69724. });
  69725. exports.default = isNodesEquivalent;
  69726. var _definitions = require_definitions3();
  69727. function isNodesEquivalent(a, b) {
  69728. if (typeof a !== "object" || typeof b !== "object" || a == null || b == null) {
  69729. return a === b;
  69730. }
  69731. if (a.type !== b.type) {
  69732. return false;
  69733. }
  69734. const fields = Object.keys(_definitions.NODE_FIELDS[a.type] || a.type);
  69735. const visitorKeys = _definitions.VISITOR_KEYS[a.type];
  69736. for (const field of fields) {
  69737. if (typeof a[field] !== typeof b[field]) {
  69738. return false;
  69739. }
  69740. if (a[field] == null && b[field] == null) {
  69741. continue;
  69742. } else if (a[field] == null || b[field] == null) {
  69743. return false;
  69744. }
  69745. if (Array.isArray(a[field])) {
  69746. if (!Array.isArray(b[field])) {
  69747. return false;
  69748. }
  69749. if (a[field].length !== b[field].length) {
  69750. return false;
  69751. }
  69752. for (let i = 0; i < a[field].length; i++) {
  69753. if (!isNodesEquivalent(a[field][i], b[field][i])) {
  69754. return false;
  69755. }
  69756. }
  69757. continue;
  69758. }
  69759. if (typeof a[field] === "object" && !(visitorKeys != null && visitorKeys.includes(field))) {
  69760. for (const key of Object.keys(a[field])) {
  69761. if (a[field][key] !== b[field][key]) {
  69762. return false;
  69763. }
  69764. }
  69765. continue;
  69766. }
  69767. if (!isNodesEquivalent(a[field], b[field])) {
  69768. return false;
  69769. }
  69770. }
  69771. return true;
  69772. }
  69773. }
  69774. });
  69775. // node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/validators/isReferenced.js
  69776. var require_isReferenced3 = __commonJS({
  69777. "node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/validators/isReferenced.js"(exports) {
  69778. "use strict";
  69779. Object.defineProperty(exports, "__esModule", {
  69780. value: true
  69781. });
  69782. exports.default = isReferenced;
  69783. function isReferenced(node, parent, grandparent) {
  69784. switch (parent.type) {
  69785. case "MemberExpression":
  69786. case "JSXMemberExpression":
  69787. case "OptionalMemberExpression":
  69788. if (parent.property === node) {
  69789. return !!parent.computed;
  69790. }
  69791. return parent.object === node;
  69792. case "VariableDeclarator":
  69793. return parent.init === node;
  69794. case "ArrowFunctionExpression":
  69795. return parent.body === node;
  69796. case "PrivateName":
  69797. return false;
  69798. case "ClassMethod":
  69799. case "ClassPrivateMethod":
  69800. case "ObjectMethod":
  69801. if (parent.params.includes(node)) {
  69802. return false;
  69803. }
  69804. case "ObjectProperty":
  69805. case "ClassProperty":
  69806. case "ClassPrivateProperty":
  69807. if (parent.key === node) {
  69808. return !!parent.computed;
  69809. }
  69810. if (parent.value === node) {
  69811. return !grandparent || grandparent.type !== "ObjectPattern";
  69812. }
  69813. return true;
  69814. case "ClassDeclaration":
  69815. case "ClassExpression":
  69816. return parent.superClass === node;
  69817. case "AssignmentExpression":
  69818. return parent.right === node;
  69819. case "AssignmentPattern":
  69820. return parent.right === node;
  69821. case "LabeledStatement":
  69822. return false;
  69823. case "CatchClause":
  69824. return false;
  69825. case "RestElement":
  69826. return false;
  69827. case "BreakStatement":
  69828. case "ContinueStatement":
  69829. return false;
  69830. case "FunctionDeclaration":
  69831. case "FunctionExpression":
  69832. return false;
  69833. case "ExportNamespaceSpecifier":
  69834. case "ExportDefaultSpecifier":
  69835. return false;
  69836. case "ExportSpecifier":
  69837. if (grandparent != null && grandparent.source) {
  69838. return false;
  69839. }
  69840. return parent.local === node;
  69841. case "ImportDefaultSpecifier":
  69842. case "ImportNamespaceSpecifier":
  69843. case "ImportSpecifier":
  69844. return false;
  69845. case "JSXAttribute":
  69846. return false;
  69847. case "ObjectPattern":
  69848. case "ArrayPattern":
  69849. return false;
  69850. case "MetaProperty":
  69851. return false;
  69852. case "ObjectTypeProperty":
  69853. return parent.key !== node;
  69854. case "TSEnumMember":
  69855. return parent.id !== node;
  69856. case "TSPropertySignature":
  69857. if (parent.key === node) {
  69858. return !!parent.computed;
  69859. }
  69860. return true;
  69861. }
  69862. return true;
  69863. }
  69864. }
  69865. });
  69866. // node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/validators/isScope.js
  69867. var require_isScope3 = __commonJS({
  69868. "node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/validators/isScope.js"(exports) {
  69869. "use strict";
  69870. Object.defineProperty(exports, "__esModule", {
  69871. value: true
  69872. });
  69873. exports.default = isScope;
  69874. var _generated = require_generated11();
  69875. function isScope(node, parent) {
  69876. if ((0, _generated.isBlockStatement)(node) && ((0, _generated.isFunction)(parent) || (0, _generated.isCatchClause)(parent))) {
  69877. return false;
  69878. }
  69879. if ((0, _generated.isPattern)(node) && ((0, _generated.isFunction)(parent) || (0, _generated.isCatchClause)(parent))) {
  69880. return true;
  69881. }
  69882. return (0, _generated.isScopable)(node);
  69883. }
  69884. }
  69885. });
  69886. // node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/validators/isSpecifierDefault.js
  69887. var require_isSpecifierDefault3 = __commonJS({
  69888. "node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/validators/isSpecifierDefault.js"(exports) {
  69889. "use strict";
  69890. Object.defineProperty(exports, "__esModule", {
  69891. value: true
  69892. });
  69893. exports.default = isSpecifierDefault;
  69894. var _generated = require_generated11();
  69895. function isSpecifierDefault(specifier) {
  69896. return (0, _generated.isImportDefaultSpecifier)(specifier) || (0, _generated.isIdentifier)(specifier.imported || specifier.exported, {
  69897. name: "default"
  69898. });
  69899. }
  69900. }
  69901. });
  69902. // node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/validators/isValidES3Identifier.js
  69903. var require_isValidES3Identifier3 = __commonJS({
  69904. "node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/validators/isValidES3Identifier.js"(exports) {
  69905. "use strict";
  69906. Object.defineProperty(exports, "__esModule", {
  69907. value: true
  69908. });
  69909. exports.default = isValidES3Identifier;
  69910. var _isValidIdentifier = require_isValidIdentifier3();
  69911. var RESERVED_WORDS_ES3_ONLY = /* @__PURE__ */ new Set(["abstract", "boolean", "byte", "char", "double", "enum", "final", "float", "goto", "implements", "int", "interface", "long", "native", "package", "private", "protected", "public", "short", "static", "synchronized", "throws", "transient", "volatile"]);
  69912. function isValidES3Identifier(name2) {
  69913. return (0, _isValidIdentifier.default)(name2) && !RESERVED_WORDS_ES3_ONLY.has(name2);
  69914. }
  69915. }
  69916. });
  69917. // node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/validators/isVar.js
  69918. var require_isVar3 = __commonJS({
  69919. "node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/validators/isVar.js"(exports) {
  69920. "use strict";
  69921. Object.defineProperty(exports, "__esModule", {
  69922. value: true
  69923. });
  69924. exports.default = isVar;
  69925. var _generated = require_generated11();
  69926. var _constants = require_constants3();
  69927. function isVar(node) {
  69928. return (0, _generated.isVariableDeclaration)(node, {
  69929. kind: "var"
  69930. }) && !node[_constants.BLOCK_SCOPED_SYMBOL];
  69931. }
  69932. }
  69933. });
  69934. // node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/ast-types/generated/index.js
  69935. var require_generated15 = __commonJS({
  69936. "node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/ast-types/generated/index.js"() {
  69937. }
  69938. });
  69939. // node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/index.js
  69940. var require_lib16 = __commonJS({
  69941. "node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/index.js"(exports) {
  69942. "use strict";
  69943. Object.defineProperty(exports, "__esModule", {
  69944. value: true
  69945. });
  69946. var _exportNames = {
  69947. react: true,
  69948. assertNode: true,
  69949. createTypeAnnotationBasedOnTypeof: true,
  69950. createUnionTypeAnnotation: true,
  69951. createFlowUnionType: true,
  69952. createTSUnionType: true,
  69953. cloneNode: true,
  69954. clone: true,
  69955. cloneDeep: true,
  69956. cloneDeepWithoutLoc: true,
  69957. cloneWithoutLoc: true,
  69958. addComment: true,
  69959. addComments: true,
  69960. inheritInnerComments: true,
  69961. inheritLeadingComments: true,
  69962. inheritsComments: true,
  69963. inheritTrailingComments: true,
  69964. removeComments: true,
  69965. ensureBlock: true,
  69966. toBindingIdentifierName: true,
  69967. toBlock: true,
  69968. toComputedKey: true,
  69969. toExpression: true,
  69970. toIdentifier: true,
  69971. toKeyAlias: true,
  69972. toSequenceExpression: true,
  69973. toStatement: true,
  69974. valueToNode: true,
  69975. appendToMemberExpression: true,
  69976. inherits: true,
  69977. prependToMemberExpression: true,
  69978. removeProperties: true,
  69979. removePropertiesDeep: true,
  69980. removeTypeDuplicates: true,
  69981. getBindingIdentifiers: true,
  69982. getOuterBindingIdentifiers: true,
  69983. traverse: true,
  69984. traverseFast: true,
  69985. shallowEqual: true,
  69986. is: true,
  69987. isBinding: true,
  69988. isBlockScoped: true,
  69989. isImmutable: true,
  69990. isLet: true,
  69991. isNode: true,
  69992. isNodesEquivalent: true,
  69993. isPlaceholderType: true,
  69994. isReferenced: true,
  69995. isScope: true,
  69996. isSpecifierDefault: true,
  69997. isType: true,
  69998. isValidES3Identifier: true,
  69999. isValidIdentifier: true,
  70000. isVar: true,
  70001. matchesPattern: true,
  70002. validate: true,
  70003. buildMatchMemberExpression: true
  70004. };
  70005. Object.defineProperty(exports, "assertNode", {
  70006. enumerable: true,
  70007. get: function() {
  70008. return _assertNode.default;
  70009. }
  70010. });
  70011. Object.defineProperty(exports, "createTypeAnnotationBasedOnTypeof", {
  70012. enumerable: true,
  70013. get: function() {
  70014. return _createTypeAnnotationBasedOnTypeof.default;
  70015. }
  70016. });
  70017. Object.defineProperty(exports, "createUnionTypeAnnotation", {
  70018. enumerable: true,
  70019. get: function() {
  70020. return _createFlowUnionType.default;
  70021. }
  70022. });
  70023. Object.defineProperty(exports, "createFlowUnionType", {
  70024. enumerable: true,
  70025. get: function() {
  70026. return _createFlowUnionType.default;
  70027. }
  70028. });
  70029. Object.defineProperty(exports, "createTSUnionType", {
  70030. enumerable: true,
  70031. get: function() {
  70032. return _createTSUnionType.default;
  70033. }
  70034. });
  70035. Object.defineProperty(exports, "cloneNode", {
  70036. enumerable: true,
  70037. get: function() {
  70038. return _cloneNode.default;
  70039. }
  70040. });
  70041. Object.defineProperty(exports, "clone", {
  70042. enumerable: true,
  70043. get: function() {
  70044. return _clone.default;
  70045. }
  70046. });
  70047. Object.defineProperty(exports, "cloneDeep", {
  70048. enumerable: true,
  70049. get: function() {
  70050. return _cloneDeep.default;
  70051. }
  70052. });
  70053. Object.defineProperty(exports, "cloneDeepWithoutLoc", {
  70054. enumerable: true,
  70055. get: function() {
  70056. return _cloneDeepWithoutLoc.default;
  70057. }
  70058. });
  70059. Object.defineProperty(exports, "cloneWithoutLoc", {
  70060. enumerable: true,
  70061. get: function() {
  70062. return _cloneWithoutLoc.default;
  70063. }
  70064. });
  70065. Object.defineProperty(exports, "addComment", {
  70066. enumerable: true,
  70067. get: function() {
  70068. return _addComment.default;
  70069. }
  70070. });
  70071. Object.defineProperty(exports, "addComments", {
  70072. enumerable: true,
  70073. get: function() {
  70074. return _addComments.default;
  70075. }
  70076. });
  70077. Object.defineProperty(exports, "inheritInnerComments", {
  70078. enumerable: true,
  70079. get: function() {
  70080. return _inheritInnerComments.default;
  70081. }
  70082. });
  70083. Object.defineProperty(exports, "inheritLeadingComments", {
  70084. enumerable: true,
  70085. get: function() {
  70086. return _inheritLeadingComments.default;
  70087. }
  70088. });
  70089. Object.defineProperty(exports, "inheritsComments", {
  70090. enumerable: true,
  70091. get: function() {
  70092. return _inheritsComments.default;
  70093. }
  70094. });
  70095. Object.defineProperty(exports, "inheritTrailingComments", {
  70096. enumerable: true,
  70097. get: function() {
  70098. return _inheritTrailingComments.default;
  70099. }
  70100. });
  70101. Object.defineProperty(exports, "removeComments", {
  70102. enumerable: true,
  70103. get: function() {
  70104. return _removeComments.default;
  70105. }
  70106. });
  70107. Object.defineProperty(exports, "ensureBlock", {
  70108. enumerable: true,
  70109. get: function() {
  70110. return _ensureBlock.default;
  70111. }
  70112. });
  70113. Object.defineProperty(exports, "toBindingIdentifierName", {
  70114. enumerable: true,
  70115. get: function() {
  70116. return _toBindingIdentifierName.default;
  70117. }
  70118. });
  70119. Object.defineProperty(exports, "toBlock", {
  70120. enumerable: true,
  70121. get: function() {
  70122. return _toBlock.default;
  70123. }
  70124. });
  70125. Object.defineProperty(exports, "toComputedKey", {
  70126. enumerable: true,
  70127. get: function() {
  70128. return _toComputedKey.default;
  70129. }
  70130. });
  70131. Object.defineProperty(exports, "toExpression", {
  70132. enumerable: true,
  70133. get: function() {
  70134. return _toExpression.default;
  70135. }
  70136. });
  70137. Object.defineProperty(exports, "toIdentifier", {
  70138. enumerable: true,
  70139. get: function() {
  70140. return _toIdentifier.default;
  70141. }
  70142. });
  70143. Object.defineProperty(exports, "toKeyAlias", {
  70144. enumerable: true,
  70145. get: function() {
  70146. return _toKeyAlias.default;
  70147. }
  70148. });
  70149. Object.defineProperty(exports, "toSequenceExpression", {
  70150. enumerable: true,
  70151. get: function() {
  70152. return _toSequenceExpression.default;
  70153. }
  70154. });
  70155. Object.defineProperty(exports, "toStatement", {
  70156. enumerable: true,
  70157. get: function() {
  70158. return _toStatement.default;
  70159. }
  70160. });
  70161. Object.defineProperty(exports, "valueToNode", {
  70162. enumerable: true,
  70163. get: function() {
  70164. return _valueToNode.default;
  70165. }
  70166. });
  70167. Object.defineProperty(exports, "appendToMemberExpression", {
  70168. enumerable: true,
  70169. get: function() {
  70170. return _appendToMemberExpression.default;
  70171. }
  70172. });
  70173. Object.defineProperty(exports, "inherits", {
  70174. enumerable: true,
  70175. get: function() {
  70176. return _inherits.default;
  70177. }
  70178. });
  70179. Object.defineProperty(exports, "prependToMemberExpression", {
  70180. enumerable: true,
  70181. get: function() {
  70182. return _prependToMemberExpression.default;
  70183. }
  70184. });
  70185. Object.defineProperty(exports, "removeProperties", {
  70186. enumerable: true,
  70187. get: function() {
  70188. return _removeProperties.default;
  70189. }
  70190. });
  70191. Object.defineProperty(exports, "removePropertiesDeep", {
  70192. enumerable: true,
  70193. get: function() {
  70194. return _removePropertiesDeep.default;
  70195. }
  70196. });
  70197. Object.defineProperty(exports, "removeTypeDuplicates", {
  70198. enumerable: true,
  70199. get: function() {
  70200. return _removeTypeDuplicates.default;
  70201. }
  70202. });
  70203. Object.defineProperty(exports, "getBindingIdentifiers", {
  70204. enumerable: true,
  70205. get: function() {
  70206. return _getBindingIdentifiers.default;
  70207. }
  70208. });
  70209. Object.defineProperty(exports, "getOuterBindingIdentifiers", {
  70210. enumerable: true,
  70211. get: function() {
  70212. return _getOuterBindingIdentifiers.default;
  70213. }
  70214. });
  70215. Object.defineProperty(exports, "traverse", {
  70216. enumerable: true,
  70217. get: function() {
  70218. return _traverse.default;
  70219. }
  70220. });
  70221. Object.defineProperty(exports, "traverseFast", {
  70222. enumerable: true,
  70223. get: function() {
  70224. return _traverseFast.default;
  70225. }
  70226. });
  70227. Object.defineProperty(exports, "shallowEqual", {
  70228. enumerable: true,
  70229. get: function() {
  70230. return _shallowEqual.default;
  70231. }
  70232. });
  70233. Object.defineProperty(exports, "is", {
  70234. enumerable: true,
  70235. get: function() {
  70236. return _is.default;
  70237. }
  70238. });
  70239. Object.defineProperty(exports, "isBinding", {
  70240. enumerable: true,
  70241. get: function() {
  70242. return _isBinding.default;
  70243. }
  70244. });
  70245. Object.defineProperty(exports, "isBlockScoped", {
  70246. enumerable: true,
  70247. get: function() {
  70248. return _isBlockScoped.default;
  70249. }
  70250. });
  70251. Object.defineProperty(exports, "isImmutable", {
  70252. enumerable: true,
  70253. get: function() {
  70254. return _isImmutable.default;
  70255. }
  70256. });
  70257. Object.defineProperty(exports, "isLet", {
  70258. enumerable: true,
  70259. get: function() {
  70260. return _isLet.default;
  70261. }
  70262. });
  70263. Object.defineProperty(exports, "isNode", {
  70264. enumerable: true,
  70265. get: function() {
  70266. return _isNode.default;
  70267. }
  70268. });
  70269. Object.defineProperty(exports, "isNodesEquivalent", {
  70270. enumerable: true,
  70271. get: function() {
  70272. return _isNodesEquivalent.default;
  70273. }
  70274. });
  70275. Object.defineProperty(exports, "isPlaceholderType", {
  70276. enumerable: true,
  70277. get: function() {
  70278. return _isPlaceholderType.default;
  70279. }
  70280. });
  70281. Object.defineProperty(exports, "isReferenced", {
  70282. enumerable: true,
  70283. get: function() {
  70284. return _isReferenced.default;
  70285. }
  70286. });
  70287. Object.defineProperty(exports, "isScope", {
  70288. enumerable: true,
  70289. get: function() {
  70290. return _isScope.default;
  70291. }
  70292. });
  70293. Object.defineProperty(exports, "isSpecifierDefault", {
  70294. enumerable: true,
  70295. get: function() {
  70296. return _isSpecifierDefault.default;
  70297. }
  70298. });
  70299. Object.defineProperty(exports, "isType", {
  70300. enumerable: true,
  70301. get: function() {
  70302. return _isType.default;
  70303. }
  70304. });
  70305. Object.defineProperty(exports, "isValidES3Identifier", {
  70306. enumerable: true,
  70307. get: function() {
  70308. return _isValidES3Identifier.default;
  70309. }
  70310. });
  70311. Object.defineProperty(exports, "isValidIdentifier", {
  70312. enumerable: true,
  70313. get: function() {
  70314. return _isValidIdentifier.default;
  70315. }
  70316. });
  70317. Object.defineProperty(exports, "isVar", {
  70318. enumerable: true,
  70319. get: function() {
  70320. return _isVar.default;
  70321. }
  70322. });
  70323. Object.defineProperty(exports, "matchesPattern", {
  70324. enumerable: true,
  70325. get: function() {
  70326. return _matchesPattern.default;
  70327. }
  70328. });
  70329. Object.defineProperty(exports, "validate", {
  70330. enumerable: true,
  70331. get: function() {
  70332. return _validate.default;
  70333. }
  70334. });
  70335. Object.defineProperty(exports, "buildMatchMemberExpression", {
  70336. enumerable: true,
  70337. get: function() {
  70338. return _buildMatchMemberExpression.default;
  70339. }
  70340. });
  70341. exports.react = void 0;
  70342. var _isReactComponent = require_isReactComponent3();
  70343. var _isCompatTag = require_isCompatTag3();
  70344. var _buildChildren = require_buildChildren3();
  70345. var _assertNode = require_assertNode3();
  70346. var _generated = require_generated13();
  70347. Object.keys(_generated).forEach(function(key) {
  70348. if (key === "default" || key === "__esModule")
  70349. return;
  70350. if (Object.prototype.hasOwnProperty.call(_exportNames, key))
  70351. return;
  70352. if (key in exports && exports[key] === _generated[key])
  70353. return;
  70354. Object.defineProperty(exports, key, {
  70355. enumerable: true,
  70356. get: function() {
  70357. return _generated[key];
  70358. }
  70359. });
  70360. });
  70361. var _createTypeAnnotationBasedOnTypeof = require_createTypeAnnotationBasedOnTypeof3();
  70362. var _createFlowUnionType = require_createFlowUnionType3();
  70363. var _createTSUnionType = require_createTSUnionType3();
  70364. var _generated2 = require_generated12();
  70365. Object.keys(_generated2).forEach(function(key) {
  70366. if (key === "default" || key === "__esModule")
  70367. return;
  70368. if (Object.prototype.hasOwnProperty.call(_exportNames, key))
  70369. return;
  70370. if (key in exports && exports[key] === _generated2[key])
  70371. return;
  70372. Object.defineProperty(exports, key, {
  70373. enumerable: true,
  70374. get: function() {
  70375. return _generated2[key];
  70376. }
  70377. });
  70378. });
  70379. var _uppercase = require_uppercase3();
  70380. Object.keys(_uppercase).forEach(function(key) {
  70381. if (key === "default" || key === "__esModule")
  70382. return;
  70383. if (Object.prototype.hasOwnProperty.call(_exportNames, key))
  70384. return;
  70385. if (key in exports && exports[key] === _uppercase[key])
  70386. return;
  70387. Object.defineProperty(exports, key, {
  70388. enumerable: true,
  70389. get: function() {
  70390. return _uppercase[key];
  70391. }
  70392. });
  70393. });
  70394. var _cloneNode = require_cloneNode3();
  70395. var _clone = require_clone3();
  70396. var _cloneDeep = require_cloneDeep3();
  70397. var _cloneDeepWithoutLoc = require_cloneDeepWithoutLoc3();
  70398. var _cloneWithoutLoc = require_cloneWithoutLoc3();
  70399. var _addComment = require_addComment3();
  70400. var _addComments = require_addComments3();
  70401. var _inheritInnerComments = require_inheritInnerComments3();
  70402. var _inheritLeadingComments = require_inheritLeadingComments3();
  70403. var _inheritsComments = require_inheritsComments3();
  70404. var _inheritTrailingComments = require_inheritTrailingComments3();
  70405. var _removeComments = require_removeComments3();
  70406. var _generated3 = require_generated14();
  70407. Object.keys(_generated3).forEach(function(key) {
  70408. if (key === "default" || key === "__esModule")
  70409. return;
  70410. if (Object.prototype.hasOwnProperty.call(_exportNames, key))
  70411. return;
  70412. if (key in exports && exports[key] === _generated3[key])
  70413. return;
  70414. Object.defineProperty(exports, key, {
  70415. enumerable: true,
  70416. get: function() {
  70417. return _generated3[key];
  70418. }
  70419. });
  70420. });
  70421. var _constants = require_constants3();
  70422. Object.keys(_constants).forEach(function(key) {
  70423. if (key === "default" || key === "__esModule")
  70424. return;
  70425. if (Object.prototype.hasOwnProperty.call(_exportNames, key))
  70426. return;
  70427. if (key in exports && exports[key] === _constants[key])
  70428. return;
  70429. Object.defineProperty(exports, key, {
  70430. enumerable: true,
  70431. get: function() {
  70432. return _constants[key];
  70433. }
  70434. });
  70435. });
  70436. var _ensureBlock = require_ensureBlock3();
  70437. var _toBindingIdentifierName = require_toBindingIdentifierName3();
  70438. var _toBlock = require_toBlock3();
  70439. var _toComputedKey = require_toComputedKey3();
  70440. var _toExpression = require_toExpression3();
  70441. var _toIdentifier = require_toIdentifier3();
  70442. var _toKeyAlias = require_toKeyAlias3();
  70443. var _toSequenceExpression = require_toSequenceExpression3();
  70444. var _toStatement = require_toStatement3();
  70445. var _valueToNode = require_valueToNode3();
  70446. var _definitions = require_definitions3();
  70447. Object.keys(_definitions).forEach(function(key) {
  70448. if (key === "default" || key === "__esModule")
  70449. return;
  70450. if (Object.prototype.hasOwnProperty.call(_exportNames, key))
  70451. return;
  70452. if (key in exports && exports[key] === _definitions[key])
  70453. return;
  70454. Object.defineProperty(exports, key, {
  70455. enumerable: true,
  70456. get: function() {
  70457. return _definitions[key];
  70458. }
  70459. });
  70460. });
  70461. var _appendToMemberExpression = require_appendToMemberExpression3();
  70462. var _inherits = require_inherits3();
  70463. var _prependToMemberExpression = require_prependToMemberExpression3();
  70464. var _removeProperties = require_removeProperties3();
  70465. var _removePropertiesDeep = require_removePropertiesDeep3();
  70466. var _removeTypeDuplicates = require_removeTypeDuplicates5();
  70467. var _getBindingIdentifiers = require_getBindingIdentifiers3();
  70468. var _getOuterBindingIdentifiers = require_getOuterBindingIdentifiers3();
  70469. var _traverse = require_traverse3();
  70470. Object.keys(_traverse).forEach(function(key) {
  70471. if (key === "default" || key === "__esModule")
  70472. return;
  70473. if (Object.prototype.hasOwnProperty.call(_exportNames, key))
  70474. return;
  70475. if (key in exports && exports[key] === _traverse[key])
  70476. return;
  70477. Object.defineProperty(exports, key, {
  70478. enumerable: true,
  70479. get: function() {
  70480. return _traverse[key];
  70481. }
  70482. });
  70483. });
  70484. var _traverseFast = require_traverseFast3();
  70485. var _shallowEqual = require_shallowEqual3();
  70486. var _is = require_is3();
  70487. var _isBinding = require_isBinding3();
  70488. var _isBlockScoped = require_isBlockScoped3();
  70489. var _isImmutable = require_isImmutable3();
  70490. var _isLet = require_isLet3();
  70491. var _isNode = require_isNode3();
  70492. var _isNodesEquivalent = require_isNodesEquivalent3();
  70493. var _isPlaceholderType = require_isPlaceholderType3();
  70494. var _isReferenced = require_isReferenced3();
  70495. var _isScope = require_isScope3();
  70496. var _isSpecifierDefault = require_isSpecifierDefault3();
  70497. var _isType = require_isType3();
  70498. var _isValidES3Identifier = require_isValidES3Identifier3();
  70499. var _isValidIdentifier = require_isValidIdentifier3();
  70500. var _isVar = require_isVar3();
  70501. var _matchesPattern = require_matchesPattern3();
  70502. var _validate = require_validate3();
  70503. var _buildMatchMemberExpression = require_buildMatchMemberExpression3();
  70504. var _generated4 = require_generated11();
  70505. Object.keys(_generated4).forEach(function(key) {
  70506. if (key === "default" || key === "__esModule")
  70507. return;
  70508. if (Object.prototype.hasOwnProperty.call(_exportNames, key))
  70509. return;
  70510. if (key in exports && exports[key] === _generated4[key])
  70511. return;
  70512. Object.defineProperty(exports, key, {
  70513. enumerable: true,
  70514. get: function() {
  70515. return _generated4[key];
  70516. }
  70517. });
  70518. });
  70519. var _generated5 = require_generated15();
  70520. Object.keys(_generated5).forEach(function(key) {
  70521. if (key === "default" || key === "__esModule")
  70522. return;
  70523. if (Object.prototype.hasOwnProperty.call(_exportNames, key))
  70524. return;
  70525. if (key in exports && exports[key] === _generated5[key])
  70526. return;
  70527. Object.defineProperty(exports, key, {
  70528. enumerable: true,
  70529. get: function() {
  70530. return _generated5[key];
  70531. }
  70532. });
  70533. });
  70534. var react = {
  70535. isReactComponent: _isReactComponent.default,
  70536. isCompatTag: _isCompatTag.default,
  70537. buildChildren: _buildChildren.default
  70538. };
  70539. exports.react = react;
  70540. }
  70541. });
  70542. // node_modules/@babel/helper-split-export-declaration/lib/index.js
  70543. var require_lib17 = __commonJS({
  70544. "node_modules/@babel/helper-split-export-declaration/lib/index.js"(exports) {
  70545. "use strict";
  70546. Object.defineProperty(exports, "__esModule", {
  70547. value: true
  70548. });
  70549. exports.default = splitExportDeclaration;
  70550. var t2 = require_lib16();
  70551. function splitExportDeclaration(exportDeclaration) {
  70552. if (!exportDeclaration.isExportDeclaration()) {
  70553. throw new Error("Only export declarations can be split.");
  70554. }
  70555. const isDefault = exportDeclaration.isExportDefaultDeclaration();
  70556. const declaration = exportDeclaration.get("declaration");
  70557. const isClassDeclaration = declaration.isClassDeclaration();
  70558. if (isDefault) {
  70559. const standaloneDeclaration = declaration.isFunctionDeclaration() || isClassDeclaration;
  70560. const scope = declaration.isScope() ? declaration.scope.parent : declaration.scope;
  70561. let id = declaration.node.id;
  70562. let needBindingRegistration = false;
  70563. if (!id) {
  70564. needBindingRegistration = true;
  70565. id = scope.generateUidIdentifier("default");
  70566. if (standaloneDeclaration || declaration.isFunctionExpression() || declaration.isClassExpression()) {
  70567. declaration.node.id = t2.cloneNode(id);
  70568. }
  70569. }
  70570. const updatedDeclaration = standaloneDeclaration ? declaration : t2.variableDeclaration("var", [t2.variableDeclarator(t2.cloneNode(id), declaration.node)]);
  70571. const updatedExportDeclaration = t2.exportNamedDeclaration(null, [t2.exportSpecifier(t2.cloneNode(id), t2.identifier("default"))]);
  70572. exportDeclaration.insertAfter(updatedExportDeclaration);
  70573. exportDeclaration.replaceWith(updatedDeclaration);
  70574. if (needBindingRegistration) {
  70575. scope.registerDeclaration(exportDeclaration);
  70576. }
  70577. return exportDeclaration;
  70578. }
  70579. if (exportDeclaration.get("specifiers").length > 0) {
  70580. throw new Error("It doesn't make sense to split exported specifiers.");
  70581. }
  70582. const bindingIdentifiers = declaration.getOuterBindingIdentifiers();
  70583. const specifiers = Object.keys(bindingIdentifiers).map((name2) => {
  70584. return t2.exportSpecifier(t2.identifier(name2), t2.identifier(name2));
  70585. });
  70586. const aliasDeclar = t2.exportNamedDeclaration(null, specifiers);
  70587. exportDeclaration.insertAfter(aliasDeclar);
  70588. exportDeclaration.replaceWith(declaration.node);
  70589. return exportDeclaration;
  70590. }
  70591. }
  70592. });
  70593. // node_modules/@babel/traverse/lib/scope/lib/renamer.js
  70594. var require_renamer2 = __commonJS({
  70595. "node_modules/@babel/traverse/lib/scope/lib/renamer.js"(exports) {
  70596. "use strict";
  70597. Object.defineProperty(exports, "__esModule", {
  70598. value: true
  70599. });
  70600. exports.default = void 0;
  70601. var _binding = require_binding2();
  70602. var _helperSplitExportDeclaration = require_lib17();
  70603. var t2 = require_lib2();
  70604. var renameVisitor = {
  70605. ReferencedIdentifier({
  70606. node
  70607. }, state) {
  70608. if (node.name === state.oldName) {
  70609. node.name = state.newName;
  70610. }
  70611. },
  70612. Scope(path, state) {
  70613. if (!path.scope.bindingIdentifierEquals(state.oldName, state.binding.identifier)) {
  70614. skipAllButComputedMethodKey(path);
  70615. }
  70616. },
  70617. "AssignmentExpression|Declaration|VariableDeclarator"(path, state) {
  70618. if (path.isVariableDeclaration())
  70619. return;
  70620. const ids = path.getOuterBindingIdentifiers();
  70621. for (const name2 in ids) {
  70622. if (name2 === state.oldName)
  70623. ids[name2].name = state.newName;
  70624. }
  70625. }
  70626. };
  70627. var Renamer = class {
  70628. constructor(binding, oldName, newName) {
  70629. this.newName = newName;
  70630. this.oldName = oldName;
  70631. this.binding = binding;
  70632. }
  70633. maybeConvertFromExportDeclaration(parentDeclar) {
  70634. const maybeExportDeclar = parentDeclar.parentPath;
  70635. if (!maybeExportDeclar.isExportDeclaration()) {
  70636. return;
  70637. }
  70638. if (maybeExportDeclar.isExportDefaultDeclaration() && !maybeExportDeclar.get("declaration").node.id) {
  70639. return;
  70640. }
  70641. (0, _helperSplitExportDeclaration.default)(maybeExportDeclar);
  70642. }
  70643. maybeConvertFromClassFunctionDeclaration(path) {
  70644. return;
  70645. if (!path.isFunctionDeclaration() && !path.isClassDeclaration())
  70646. return;
  70647. if (this.binding.kind !== "hoisted")
  70648. return;
  70649. path.node.id = t2.identifier(this.oldName);
  70650. path.node._blockHoist = 3;
  70651. path.replaceWith(t2.variableDeclaration("let", [t2.variableDeclarator(t2.identifier(this.newName), t2.toExpression(path.node))]));
  70652. }
  70653. maybeConvertFromClassFunctionExpression(path) {
  70654. return;
  70655. if (!path.isFunctionExpression() && !path.isClassExpression())
  70656. return;
  70657. if (this.binding.kind !== "local")
  70658. return;
  70659. path.node.id = t2.identifier(this.oldName);
  70660. this.binding.scope.parent.push({
  70661. id: t2.identifier(this.newName)
  70662. });
  70663. path.replaceWith(t2.assignmentExpression("=", t2.identifier(this.newName), path.node));
  70664. }
  70665. rename(block) {
  70666. const {
  70667. binding,
  70668. oldName,
  70669. newName
  70670. } = this;
  70671. const {
  70672. scope,
  70673. path
  70674. } = binding;
  70675. const parentDeclar = path.find((path2) => path2.isDeclaration() || path2.isFunctionExpression() || path2.isClassExpression());
  70676. if (parentDeclar) {
  70677. const bindingIds = parentDeclar.getOuterBindingIdentifiers();
  70678. if (bindingIds[oldName] === binding.identifier) {
  70679. this.maybeConvertFromExportDeclaration(parentDeclar);
  70680. }
  70681. }
  70682. const blockToTraverse = block || scope.block;
  70683. if ((blockToTraverse == null ? void 0 : blockToTraverse.type) === "SwitchStatement") {
  70684. blockToTraverse.cases.forEach((c) => {
  70685. scope.traverse(c, renameVisitor, this);
  70686. });
  70687. } else {
  70688. scope.traverse(blockToTraverse, renameVisitor, this);
  70689. }
  70690. if (!block) {
  70691. scope.removeOwnBinding(oldName);
  70692. scope.bindings[newName] = binding;
  70693. this.binding.identifier.name = newName;
  70694. }
  70695. if (parentDeclar) {
  70696. this.maybeConvertFromClassFunctionDeclaration(parentDeclar);
  70697. this.maybeConvertFromClassFunctionExpression(parentDeclar);
  70698. }
  70699. }
  70700. };
  70701. exports.default = Renamer;
  70702. function skipAllButComputedMethodKey(path) {
  70703. if (!path.isMethod() || !path.node.computed) {
  70704. path.skip();
  70705. return;
  70706. }
  70707. const keys2 = t2.VISITOR_KEYS[path.type];
  70708. for (const key of keys2) {
  70709. if (key !== "key")
  70710. path.skipKey(key);
  70711. }
  70712. }
  70713. }
  70714. });
  70715. // node_modules/@babel/traverse/lib/cache.js
  70716. var require_cache2 = __commonJS({
  70717. "node_modules/@babel/traverse/lib/cache.js"(exports) {
  70718. "use strict";
  70719. Object.defineProperty(exports, "__esModule", {
  70720. value: true
  70721. });
  70722. exports.clear = clear;
  70723. exports.clearPath = clearPath;
  70724. exports.clearScope = clearScope;
  70725. exports.scope = exports.path = void 0;
  70726. var path = /* @__PURE__ */ new WeakMap();
  70727. exports.path = path;
  70728. var scope = /* @__PURE__ */ new WeakMap();
  70729. exports.scope = scope;
  70730. function clear() {
  70731. clearPath();
  70732. clearScope();
  70733. }
  70734. function clearPath() {
  70735. exports.path = path = /* @__PURE__ */ new WeakMap();
  70736. }
  70737. function clearScope() {
  70738. exports.scope = scope = /* @__PURE__ */ new WeakMap();
  70739. }
  70740. }
  70741. });
  70742. // node_modules/@babel/traverse/lib/scope/index.js
  70743. var require_scope2 = __commonJS({
  70744. "node_modules/@babel/traverse/lib/scope/index.js"(exports) {
  70745. "use strict";
  70746. Object.defineProperty(exports, "__esModule", {
  70747. value: true
  70748. });
  70749. exports.default = void 0;
  70750. var _renamer = require_renamer2();
  70751. var _index = require_lib37();
  70752. var _binding = require_binding2();
  70753. var _globals = require_globals2();
  70754. var t2 = require_lib2();
  70755. var _cache = require_cache2();
  70756. function gatherNodeParts(node, parts) {
  70757. switch (node == null ? void 0 : node.type) {
  70758. default:
  70759. if (t2.isModuleDeclaration(node)) {
  70760. if ((t2.isExportAllDeclaration(node) || t2.isExportNamedDeclaration(node) || t2.isImportDeclaration(node)) && node.source) {
  70761. gatherNodeParts(node.source, parts);
  70762. } else if ((t2.isExportNamedDeclaration(node) || t2.isImportDeclaration(node)) && node.specifiers && node.specifiers.length) {
  70763. for (const e of node.specifiers)
  70764. gatherNodeParts(e, parts);
  70765. } else if ((t2.isExportDefaultDeclaration(node) || t2.isExportNamedDeclaration(node)) && node.declaration) {
  70766. gatherNodeParts(node.declaration, parts);
  70767. }
  70768. } else if (t2.isModuleSpecifier(node)) {
  70769. gatherNodeParts(node.local, parts);
  70770. } else if (t2.isLiteral(node)) {
  70771. parts.push(node.value);
  70772. }
  70773. break;
  70774. case "MemberExpression":
  70775. case "OptionalMemberExpression":
  70776. case "JSXMemberExpression":
  70777. gatherNodeParts(node.object, parts);
  70778. gatherNodeParts(node.property, parts);
  70779. break;
  70780. case "Identifier":
  70781. case "JSXIdentifier":
  70782. parts.push(node.name);
  70783. break;
  70784. case "CallExpression":
  70785. case "OptionalCallExpression":
  70786. case "NewExpression":
  70787. gatherNodeParts(node.callee, parts);
  70788. break;
  70789. case "ObjectExpression":
  70790. case "ObjectPattern":
  70791. for (const e of node.properties) {
  70792. gatherNodeParts(e, parts);
  70793. }
  70794. break;
  70795. case "SpreadElement":
  70796. case "RestElement":
  70797. gatherNodeParts(node.argument, parts);
  70798. break;
  70799. case "ObjectProperty":
  70800. case "ObjectMethod":
  70801. case "ClassProperty":
  70802. case "ClassMethod":
  70803. case "ClassPrivateProperty":
  70804. case "ClassPrivateMethod":
  70805. gatherNodeParts(node.key, parts);
  70806. break;
  70807. case "ThisExpression":
  70808. parts.push("this");
  70809. break;
  70810. case "Super":
  70811. parts.push("super");
  70812. break;
  70813. case "Import":
  70814. parts.push("import");
  70815. break;
  70816. case "DoExpression":
  70817. parts.push("do");
  70818. break;
  70819. case "YieldExpression":
  70820. parts.push("yield");
  70821. gatherNodeParts(node.argument, parts);
  70822. break;
  70823. case "AwaitExpression":
  70824. parts.push("await");
  70825. gatherNodeParts(node.argument, parts);
  70826. break;
  70827. case "AssignmentExpression":
  70828. gatherNodeParts(node.left, parts);
  70829. break;
  70830. case "VariableDeclarator":
  70831. gatherNodeParts(node.id, parts);
  70832. break;
  70833. case "FunctionExpression":
  70834. case "FunctionDeclaration":
  70835. case "ClassExpression":
  70836. case "ClassDeclaration":
  70837. gatherNodeParts(node.id, parts);
  70838. break;
  70839. case "PrivateName":
  70840. gatherNodeParts(node.id, parts);
  70841. break;
  70842. case "ParenthesizedExpression":
  70843. gatherNodeParts(node.expression, parts);
  70844. break;
  70845. case "UnaryExpression":
  70846. case "UpdateExpression":
  70847. gatherNodeParts(node.argument, parts);
  70848. break;
  70849. case "MetaProperty":
  70850. gatherNodeParts(node.meta, parts);
  70851. gatherNodeParts(node.property, parts);
  70852. break;
  70853. case "JSXElement":
  70854. gatherNodeParts(node.openingElement, parts);
  70855. break;
  70856. case "JSXOpeningElement":
  70857. parts.push(node.name);
  70858. break;
  70859. case "JSXFragment":
  70860. gatherNodeParts(node.openingFragment, parts);
  70861. break;
  70862. case "JSXOpeningFragment":
  70863. parts.push("Fragment");
  70864. break;
  70865. case "JSXNamespacedName":
  70866. gatherNodeParts(node.namespace, parts);
  70867. gatherNodeParts(node.name, parts);
  70868. break;
  70869. }
  70870. }
  70871. var collectorVisitor = {
  70872. For(path) {
  70873. for (const key of t2.FOR_INIT_KEYS) {
  70874. const declar = path.get(key);
  70875. if (declar.isVar()) {
  70876. const parentScope = path.scope.getFunctionParent() || path.scope.getProgramParent();
  70877. parentScope.registerBinding("var", declar);
  70878. }
  70879. }
  70880. },
  70881. Declaration(path) {
  70882. if (path.isBlockScoped())
  70883. return;
  70884. if (path.isImportDeclaration())
  70885. return;
  70886. if (path.isExportDeclaration())
  70887. return;
  70888. const parent = path.scope.getFunctionParent() || path.scope.getProgramParent();
  70889. parent.registerDeclaration(path);
  70890. },
  70891. ImportDeclaration(path) {
  70892. const parent = path.scope.getBlockParent();
  70893. parent.registerDeclaration(path);
  70894. },
  70895. ReferencedIdentifier(path, state) {
  70896. state.references.push(path);
  70897. },
  70898. ForXStatement(path, state) {
  70899. const left = path.get("left");
  70900. if (left.isPattern() || left.isIdentifier()) {
  70901. state.constantViolations.push(path);
  70902. }
  70903. },
  70904. ExportDeclaration: {
  70905. exit(path) {
  70906. const {
  70907. node,
  70908. scope
  70909. } = path;
  70910. if (t2.isExportAllDeclaration(node))
  70911. return;
  70912. const declar = node.declaration;
  70913. if (t2.isClassDeclaration(declar) || t2.isFunctionDeclaration(declar)) {
  70914. const id = declar.id;
  70915. if (!id)
  70916. return;
  70917. const binding = scope.getBinding(id.name);
  70918. if (binding)
  70919. binding.reference(path);
  70920. } else if (t2.isVariableDeclaration(declar)) {
  70921. for (const decl of declar.declarations) {
  70922. for (const name2 of Object.keys(t2.getBindingIdentifiers(decl))) {
  70923. const binding = scope.getBinding(name2);
  70924. if (binding)
  70925. binding.reference(path);
  70926. }
  70927. }
  70928. }
  70929. }
  70930. },
  70931. LabeledStatement(path) {
  70932. path.scope.getBlockParent().registerDeclaration(path);
  70933. },
  70934. AssignmentExpression(path, state) {
  70935. state.assignments.push(path);
  70936. },
  70937. UpdateExpression(path, state) {
  70938. state.constantViolations.push(path);
  70939. },
  70940. UnaryExpression(path, state) {
  70941. if (path.node.operator === "delete") {
  70942. state.constantViolations.push(path);
  70943. }
  70944. },
  70945. BlockScoped(path) {
  70946. let scope = path.scope;
  70947. if (scope.path === path)
  70948. scope = scope.parent;
  70949. const parent = scope.getBlockParent();
  70950. parent.registerDeclaration(path);
  70951. if (path.isClassDeclaration() && path.node.id) {
  70952. const id = path.node.id;
  70953. const name2 = id.name;
  70954. path.scope.bindings[name2] = path.scope.parent.getBinding(name2);
  70955. }
  70956. },
  70957. CatchClause(path) {
  70958. path.scope.registerBinding("let", path);
  70959. },
  70960. Function(path) {
  70961. if (path.isFunctionExpression() && path.has("id") && !path.get("id").node[t2.NOT_LOCAL_BINDING]) {
  70962. path.scope.registerBinding("local", path.get("id"), path);
  70963. }
  70964. const params = path.get("params");
  70965. for (const param of params) {
  70966. path.scope.registerBinding("param", param);
  70967. }
  70968. },
  70969. ClassExpression(path) {
  70970. if (path.has("id") && !path.get("id").node[t2.NOT_LOCAL_BINDING]) {
  70971. path.scope.registerBinding("local", path);
  70972. }
  70973. }
  70974. };
  70975. var uid = 0;
  70976. var Scope4 = class {
  70977. constructor(path) {
  70978. this.uid = void 0;
  70979. this.path = void 0;
  70980. this.block = void 0;
  70981. this.labels = void 0;
  70982. this.inited = void 0;
  70983. this.bindings = void 0;
  70984. this.references = void 0;
  70985. this.globals = void 0;
  70986. this.uids = void 0;
  70987. this.data = void 0;
  70988. this.crawling = void 0;
  70989. const {
  70990. node
  70991. } = path;
  70992. const cached = _cache.scope.get(node);
  70993. if ((cached == null ? void 0 : cached.path) === path) {
  70994. return cached;
  70995. }
  70996. _cache.scope.set(node, this);
  70997. this.uid = uid++;
  70998. this.block = node;
  70999. this.path = path;
  71000. this.labels = /* @__PURE__ */ new Map();
  71001. this.inited = false;
  71002. }
  71003. get parent() {
  71004. var _parent;
  71005. let parent, path = this.path;
  71006. do {
  71007. const isKey = path.key === "key";
  71008. path = path.parentPath;
  71009. if (isKey && path.isMethod())
  71010. path = path.parentPath;
  71011. if (path && path.isScope())
  71012. parent = path;
  71013. } while (path && !parent);
  71014. return (_parent = parent) == null ? void 0 : _parent.scope;
  71015. }
  71016. get parentBlock() {
  71017. return this.path.parent;
  71018. }
  71019. get hub() {
  71020. return this.path.hub;
  71021. }
  71022. traverse(node, opts, state) {
  71023. (0, _index.default)(node, opts, this, state, this.path);
  71024. }
  71025. generateDeclaredUidIdentifier(name2) {
  71026. const id = this.generateUidIdentifier(name2);
  71027. this.push({
  71028. id
  71029. });
  71030. return t2.cloneNode(id);
  71031. }
  71032. generateUidIdentifier(name2) {
  71033. return t2.identifier(this.generateUid(name2));
  71034. }
  71035. generateUid(name2 = "temp") {
  71036. name2 = t2.toIdentifier(name2).replace(/^_+/, "").replace(/[0-9]+$/g, "");
  71037. let uid2;
  71038. let i = 1;
  71039. do {
  71040. uid2 = this._generateUid(name2, i);
  71041. i++;
  71042. } while (this.hasLabel(uid2) || this.hasBinding(uid2) || this.hasGlobal(uid2) || this.hasReference(uid2));
  71043. const program = this.getProgramParent();
  71044. program.references[uid2] = true;
  71045. program.uids[uid2] = true;
  71046. return uid2;
  71047. }
  71048. _generateUid(name2, i) {
  71049. let id = name2;
  71050. if (i > 1)
  71051. id += i;
  71052. return `_${id}`;
  71053. }
  71054. generateUidBasedOnNode(node, defaultName) {
  71055. const parts = [];
  71056. gatherNodeParts(node, parts);
  71057. let id = parts.join("$");
  71058. id = id.replace(/^_/, "") || defaultName || "ref";
  71059. return this.generateUid(id.slice(0, 20));
  71060. }
  71061. generateUidIdentifierBasedOnNode(node, defaultName) {
  71062. return t2.identifier(this.generateUidBasedOnNode(node, defaultName));
  71063. }
  71064. isStatic(node) {
  71065. if (t2.isThisExpression(node) || t2.isSuper(node)) {
  71066. return true;
  71067. }
  71068. if (t2.isIdentifier(node)) {
  71069. const binding = this.getBinding(node.name);
  71070. if (binding) {
  71071. return binding.constant;
  71072. } else {
  71073. return this.hasBinding(node.name);
  71074. }
  71075. }
  71076. return false;
  71077. }
  71078. maybeGenerateMemoised(node, dontPush) {
  71079. if (this.isStatic(node)) {
  71080. return null;
  71081. } else {
  71082. const id = this.generateUidIdentifierBasedOnNode(node);
  71083. if (!dontPush) {
  71084. this.push({
  71085. id
  71086. });
  71087. return t2.cloneNode(id);
  71088. }
  71089. return id;
  71090. }
  71091. }
  71092. checkBlockScopedCollisions(local, kind, name2, id) {
  71093. if (kind === "param")
  71094. return;
  71095. if (local.kind === "local")
  71096. return;
  71097. const duplicate = kind === "let" || local.kind === "let" || local.kind === "const" || local.kind === "module" || local.kind === "param" && (kind === "let" || kind === "const");
  71098. if (duplicate) {
  71099. throw this.hub.buildError(id, `Duplicate declaration "${name2}"`, TypeError);
  71100. }
  71101. }
  71102. rename(oldName, newName, block) {
  71103. const binding = this.getBinding(oldName);
  71104. if (binding) {
  71105. newName = newName || this.generateUidIdentifier(oldName).name;
  71106. return new _renamer.default(binding, oldName, newName).rename(block);
  71107. }
  71108. }
  71109. _renameFromMap(map, oldName, newName, value) {
  71110. if (map[oldName]) {
  71111. map[newName] = value;
  71112. map[oldName] = null;
  71113. }
  71114. }
  71115. dump() {
  71116. const sep = "-".repeat(60);
  71117. console.log(sep);
  71118. let scope = this;
  71119. do {
  71120. console.log("#", scope.block.type);
  71121. for (const name2 of Object.keys(scope.bindings)) {
  71122. const binding = scope.bindings[name2];
  71123. console.log(" -", name2, {
  71124. constant: binding.constant,
  71125. references: binding.references,
  71126. violations: binding.constantViolations.length,
  71127. kind: binding.kind
  71128. });
  71129. }
  71130. } while (scope = scope.parent);
  71131. console.log(sep);
  71132. }
  71133. toArray(node, i, arrayLikeIsIterable) {
  71134. if (t2.isIdentifier(node)) {
  71135. const binding = this.getBinding(node.name);
  71136. if (binding != null && binding.constant && binding.path.isGenericType("Array")) {
  71137. return node;
  71138. }
  71139. }
  71140. if (t2.isArrayExpression(node)) {
  71141. return node;
  71142. }
  71143. if (t2.isIdentifier(node, {
  71144. name: "arguments"
  71145. })) {
  71146. return t2.callExpression(t2.memberExpression(t2.memberExpression(t2.memberExpression(t2.identifier("Array"), t2.identifier("prototype")), t2.identifier("slice")), t2.identifier("call")), [node]);
  71147. }
  71148. let helperName;
  71149. const args = [node];
  71150. if (i === true) {
  71151. helperName = "toConsumableArray";
  71152. } else if (i) {
  71153. args.push(t2.numericLiteral(i));
  71154. helperName = "slicedToArray";
  71155. } else {
  71156. helperName = "toArray";
  71157. }
  71158. if (arrayLikeIsIterable) {
  71159. args.unshift(this.hub.addHelper(helperName));
  71160. helperName = "maybeArrayLike";
  71161. }
  71162. return t2.callExpression(this.hub.addHelper(helperName), args);
  71163. }
  71164. hasLabel(name2) {
  71165. return !!this.getLabel(name2);
  71166. }
  71167. getLabel(name2) {
  71168. return this.labels.get(name2);
  71169. }
  71170. registerLabel(path) {
  71171. this.labels.set(path.node.label.name, path);
  71172. }
  71173. registerDeclaration(path) {
  71174. if (path.isLabeledStatement()) {
  71175. this.registerLabel(path);
  71176. } else if (path.isFunctionDeclaration()) {
  71177. this.registerBinding("hoisted", path.get("id"), path);
  71178. } else if (path.isVariableDeclaration()) {
  71179. const declarations = path.get("declarations");
  71180. for (const declar of declarations) {
  71181. this.registerBinding(path.node.kind, declar);
  71182. }
  71183. } else if (path.isClassDeclaration()) {
  71184. this.registerBinding("let", path);
  71185. } else if (path.isImportDeclaration()) {
  71186. const specifiers = path.get("specifiers");
  71187. for (const specifier of specifiers) {
  71188. this.registerBinding("module", specifier);
  71189. }
  71190. } else if (path.isExportDeclaration()) {
  71191. const declar = path.get("declaration");
  71192. if (declar.isClassDeclaration() || declar.isFunctionDeclaration() || declar.isVariableDeclaration()) {
  71193. this.registerDeclaration(declar);
  71194. }
  71195. } else {
  71196. this.registerBinding("unknown", path);
  71197. }
  71198. }
  71199. buildUndefinedNode() {
  71200. return t2.unaryExpression("void", t2.numericLiteral(0), true);
  71201. }
  71202. registerConstantViolation(path) {
  71203. const ids = path.getBindingIdentifiers();
  71204. for (const name2 of Object.keys(ids)) {
  71205. const binding = this.getBinding(name2);
  71206. if (binding)
  71207. binding.reassign(path);
  71208. }
  71209. }
  71210. registerBinding(kind, path, bindingPath = path) {
  71211. if (!kind)
  71212. throw new ReferenceError("no `kind`");
  71213. if (path.isVariableDeclaration()) {
  71214. const declarators = path.get("declarations");
  71215. for (const declar of declarators) {
  71216. this.registerBinding(kind, declar);
  71217. }
  71218. return;
  71219. }
  71220. const parent = this.getProgramParent();
  71221. const ids = path.getOuterBindingIdentifiers(true);
  71222. for (const name2 of Object.keys(ids)) {
  71223. parent.references[name2] = true;
  71224. for (const id of ids[name2]) {
  71225. const local = this.getOwnBinding(name2);
  71226. if (local) {
  71227. if (local.identifier === id)
  71228. continue;
  71229. this.checkBlockScopedCollisions(local, kind, name2, id);
  71230. }
  71231. if (local) {
  71232. this.registerConstantViolation(bindingPath);
  71233. } else {
  71234. this.bindings[name2] = new _binding.default({
  71235. identifier: id,
  71236. scope: this,
  71237. path: bindingPath,
  71238. kind
  71239. });
  71240. }
  71241. }
  71242. }
  71243. }
  71244. addGlobal(node) {
  71245. this.globals[node.name] = node;
  71246. }
  71247. hasUid(name2) {
  71248. let scope = this;
  71249. do {
  71250. if (scope.uids[name2])
  71251. return true;
  71252. } while (scope = scope.parent);
  71253. return false;
  71254. }
  71255. hasGlobal(name2) {
  71256. let scope = this;
  71257. do {
  71258. if (scope.globals[name2])
  71259. return true;
  71260. } while (scope = scope.parent);
  71261. return false;
  71262. }
  71263. hasReference(name2) {
  71264. return !!this.getProgramParent().references[name2];
  71265. }
  71266. isPure(node, constantsOnly) {
  71267. if (t2.isIdentifier(node)) {
  71268. const binding = this.getBinding(node.name);
  71269. if (!binding)
  71270. return false;
  71271. if (constantsOnly)
  71272. return binding.constant;
  71273. return true;
  71274. } else if (t2.isClass(node)) {
  71275. if (node.superClass && !this.isPure(node.superClass, constantsOnly)) {
  71276. return false;
  71277. }
  71278. return this.isPure(node.body, constantsOnly);
  71279. } else if (t2.isClassBody(node)) {
  71280. for (const method of node.body) {
  71281. if (!this.isPure(method, constantsOnly))
  71282. return false;
  71283. }
  71284. return true;
  71285. } else if (t2.isBinary(node)) {
  71286. return this.isPure(node.left, constantsOnly) && this.isPure(node.right, constantsOnly);
  71287. } else if (t2.isArrayExpression(node)) {
  71288. for (const elem of node.elements) {
  71289. if (!this.isPure(elem, constantsOnly))
  71290. return false;
  71291. }
  71292. return true;
  71293. } else if (t2.isObjectExpression(node)) {
  71294. for (const prop of node.properties) {
  71295. if (!this.isPure(prop, constantsOnly))
  71296. return false;
  71297. }
  71298. return true;
  71299. } else if (t2.isMethod(node)) {
  71300. if (node.computed && !this.isPure(node.key, constantsOnly))
  71301. return false;
  71302. if (node.kind === "get" || node.kind === "set")
  71303. return false;
  71304. return true;
  71305. } else if (t2.isProperty(node)) {
  71306. if (node.computed && !this.isPure(node.key, constantsOnly))
  71307. return false;
  71308. return this.isPure(node.value, constantsOnly);
  71309. } else if (t2.isUnaryExpression(node)) {
  71310. return this.isPure(node.argument, constantsOnly);
  71311. } else if (t2.isTaggedTemplateExpression(node)) {
  71312. return t2.matchesPattern(node.tag, "String.raw") && !this.hasBinding("String", true) && this.isPure(node.quasi, constantsOnly);
  71313. } else if (t2.isTemplateLiteral(node)) {
  71314. for (const expression of node.expressions) {
  71315. if (!this.isPure(expression, constantsOnly))
  71316. return false;
  71317. }
  71318. return true;
  71319. } else {
  71320. return t2.isPureish(node);
  71321. }
  71322. }
  71323. setData(key, val) {
  71324. return this.data[key] = val;
  71325. }
  71326. getData(key) {
  71327. let scope = this;
  71328. do {
  71329. const data2 = scope.data[key];
  71330. if (data2 != null)
  71331. return data2;
  71332. } while (scope = scope.parent);
  71333. }
  71334. removeData(key) {
  71335. let scope = this;
  71336. do {
  71337. const data2 = scope.data[key];
  71338. if (data2 != null)
  71339. scope.data[key] = null;
  71340. } while (scope = scope.parent);
  71341. }
  71342. init() {
  71343. if (!this.inited) {
  71344. this.inited = true;
  71345. this.crawl();
  71346. }
  71347. }
  71348. crawl() {
  71349. const path = this.path;
  71350. this.references = /* @__PURE__ */ Object.create(null);
  71351. this.bindings = /* @__PURE__ */ Object.create(null);
  71352. this.globals = /* @__PURE__ */ Object.create(null);
  71353. this.uids = /* @__PURE__ */ Object.create(null);
  71354. this.data = /* @__PURE__ */ Object.create(null);
  71355. const programParent = this.getProgramParent();
  71356. if (programParent.crawling)
  71357. return;
  71358. const state = {
  71359. references: [],
  71360. constantViolations: [],
  71361. assignments: []
  71362. };
  71363. this.crawling = true;
  71364. if (path.type !== "Program" && collectorVisitor._exploded) {
  71365. for (const visit4 of collectorVisitor.enter) {
  71366. visit4(path, state);
  71367. }
  71368. const typeVisitors = collectorVisitor[path.type];
  71369. if (typeVisitors) {
  71370. for (const visit4 of typeVisitors.enter) {
  71371. visit4(path, state);
  71372. }
  71373. }
  71374. }
  71375. path.traverse(collectorVisitor, state);
  71376. this.crawling = false;
  71377. for (const path2 of state.assignments) {
  71378. const ids = path2.getBindingIdentifiers();
  71379. for (const name2 of Object.keys(ids)) {
  71380. if (path2.scope.getBinding(name2))
  71381. continue;
  71382. programParent.addGlobal(ids[name2]);
  71383. }
  71384. path2.scope.registerConstantViolation(path2);
  71385. }
  71386. for (const ref2 of state.references) {
  71387. const binding = ref2.scope.getBinding(ref2.node.name);
  71388. if (binding) {
  71389. binding.reference(ref2);
  71390. } else {
  71391. programParent.addGlobal(ref2.node);
  71392. }
  71393. }
  71394. for (const path2 of state.constantViolations) {
  71395. path2.scope.registerConstantViolation(path2);
  71396. }
  71397. }
  71398. push(opts) {
  71399. let path = this.path;
  71400. if (!path.isBlockStatement() && !path.isProgram()) {
  71401. path = this.getBlockParent().path;
  71402. }
  71403. if (path.isSwitchStatement()) {
  71404. path = (this.getFunctionParent() || this.getProgramParent()).path;
  71405. }
  71406. if (path.isLoop() || path.isCatchClause() || path.isFunction()) {
  71407. path.ensureBlock();
  71408. path = path.get("body");
  71409. }
  71410. const unique = opts.unique;
  71411. const kind = opts.kind || "var";
  71412. const blockHoist = opts._blockHoist == null ? 2 : opts._blockHoist;
  71413. const dataKey = `declaration:${kind}:${blockHoist}`;
  71414. let declarPath = !unique && path.getData(dataKey);
  71415. if (!declarPath) {
  71416. const declar = t2.variableDeclaration(kind, []);
  71417. declar._blockHoist = blockHoist;
  71418. [declarPath] = path.unshiftContainer("body", [declar]);
  71419. if (!unique)
  71420. path.setData(dataKey, declarPath);
  71421. }
  71422. const declarator = t2.variableDeclarator(opts.id, opts.init);
  71423. declarPath.node.declarations.push(declarator);
  71424. this.registerBinding(kind, declarPath.get("declarations").pop());
  71425. }
  71426. getProgramParent() {
  71427. let scope = this;
  71428. do {
  71429. if (scope.path.isProgram()) {
  71430. return scope;
  71431. }
  71432. } while (scope = scope.parent);
  71433. throw new Error("Couldn't find a Program");
  71434. }
  71435. getFunctionParent() {
  71436. let scope = this;
  71437. do {
  71438. if (scope.path.isFunctionParent()) {
  71439. return scope;
  71440. }
  71441. } while (scope = scope.parent);
  71442. return null;
  71443. }
  71444. getBlockParent() {
  71445. let scope = this;
  71446. do {
  71447. if (scope.path.isBlockParent()) {
  71448. return scope;
  71449. }
  71450. } while (scope = scope.parent);
  71451. throw new Error("We couldn't find a BlockStatement, For, Switch, Function, Loop or Program...");
  71452. }
  71453. getAllBindings() {
  71454. const ids = /* @__PURE__ */ Object.create(null);
  71455. let scope = this;
  71456. do {
  71457. for (const key of Object.keys(scope.bindings)) {
  71458. if (key in ids === false) {
  71459. ids[key] = scope.bindings[key];
  71460. }
  71461. }
  71462. scope = scope.parent;
  71463. } while (scope);
  71464. return ids;
  71465. }
  71466. getAllBindingsOfKind(...kinds) {
  71467. const ids = /* @__PURE__ */ Object.create(null);
  71468. for (const kind of kinds) {
  71469. let scope = this;
  71470. do {
  71471. for (const name2 of Object.keys(scope.bindings)) {
  71472. const binding = scope.bindings[name2];
  71473. if (binding.kind === kind)
  71474. ids[name2] = binding;
  71475. }
  71476. scope = scope.parent;
  71477. } while (scope);
  71478. }
  71479. return ids;
  71480. }
  71481. bindingIdentifierEquals(name2, node) {
  71482. return this.getBindingIdentifier(name2) === node;
  71483. }
  71484. getBinding(name2) {
  71485. let scope = this;
  71486. let previousPath;
  71487. do {
  71488. const binding = scope.getOwnBinding(name2);
  71489. if (binding) {
  71490. var _previousPath;
  71491. if ((_previousPath = previousPath) != null && _previousPath.isPattern() && binding.kind !== "param") {
  71492. } else {
  71493. return binding;
  71494. }
  71495. }
  71496. previousPath = scope.path;
  71497. } while (scope = scope.parent);
  71498. }
  71499. getOwnBinding(name2) {
  71500. return this.bindings[name2];
  71501. }
  71502. getBindingIdentifier(name2) {
  71503. var _this$getBinding;
  71504. return (_this$getBinding = this.getBinding(name2)) == null ? void 0 : _this$getBinding.identifier;
  71505. }
  71506. getOwnBindingIdentifier(name2) {
  71507. const binding = this.bindings[name2];
  71508. return binding == null ? void 0 : binding.identifier;
  71509. }
  71510. hasOwnBinding(name2) {
  71511. return !!this.getOwnBinding(name2);
  71512. }
  71513. hasBinding(name2, noGlobals) {
  71514. if (!name2)
  71515. return false;
  71516. if (this.hasOwnBinding(name2))
  71517. return true;
  71518. if (this.parentHasBinding(name2, noGlobals))
  71519. return true;
  71520. if (this.hasUid(name2))
  71521. return true;
  71522. if (!noGlobals && Scope4.globals.includes(name2))
  71523. return true;
  71524. if (!noGlobals && Scope4.contextVariables.includes(name2))
  71525. return true;
  71526. return false;
  71527. }
  71528. parentHasBinding(name2, noGlobals) {
  71529. var _this$parent;
  71530. return (_this$parent = this.parent) == null ? void 0 : _this$parent.hasBinding(name2, noGlobals);
  71531. }
  71532. moveBindingTo(name2, scope) {
  71533. const info = this.getBinding(name2);
  71534. if (info) {
  71535. info.scope.removeOwnBinding(name2);
  71536. info.scope = scope;
  71537. scope.bindings[name2] = info;
  71538. }
  71539. }
  71540. removeOwnBinding(name2) {
  71541. delete this.bindings[name2];
  71542. }
  71543. removeBinding(name2) {
  71544. var _this$getBinding2;
  71545. (_this$getBinding2 = this.getBinding(name2)) == null ? void 0 : _this$getBinding2.scope.removeOwnBinding(name2);
  71546. let scope = this;
  71547. do {
  71548. if (scope.uids[name2]) {
  71549. scope.uids[name2] = false;
  71550. }
  71551. } while (scope = scope.parent);
  71552. }
  71553. };
  71554. exports.default = Scope4;
  71555. Scope4.globals = Object.keys(_globals.builtin);
  71556. Scope4.contextVariables = ["arguments", "undefined", "Infinity", "NaN"];
  71557. }
  71558. });
  71559. // node_modules/@babel/generator/lib/source-map.js
  71560. var require_source_map3 = __commonJS({
  71561. "node_modules/@babel/generator/lib/source-map.js"(exports) {
  71562. "use strict";
  71563. Object.defineProperty(exports, "__esModule", {
  71564. value: true
  71565. });
  71566. exports.default = void 0;
  71567. var _sourceMap = require_source_map();
  71568. var SourceMap = class {
  71569. constructor(opts, code2) {
  71570. this._cachedMap = void 0;
  71571. this._code = void 0;
  71572. this._opts = void 0;
  71573. this._rawMappings = void 0;
  71574. this._lastGenLine = void 0;
  71575. this._lastSourceLine = void 0;
  71576. this._lastSourceColumn = void 0;
  71577. this._cachedMap = null;
  71578. this._code = code2;
  71579. this._opts = opts;
  71580. this._rawMappings = [];
  71581. }
  71582. get() {
  71583. if (!this._cachedMap) {
  71584. const map = this._cachedMap = new _sourceMap.SourceMapGenerator({
  71585. sourceRoot: this._opts.sourceRoot
  71586. });
  71587. const code2 = this._code;
  71588. if (typeof code2 === "string") {
  71589. map.setSourceContent(this._opts.sourceFileName.replace(/\\/g, "/"), code2);
  71590. } else if (typeof code2 === "object") {
  71591. Object.keys(code2).forEach((sourceFileName) => {
  71592. map.setSourceContent(sourceFileName.replace(/\\/g, "/"), code2[sourceFileName]);
  71593. });
  71594. }
  71595. this._rawMappings.forEach((mapping) => map.addMapping(mapping), map);
  71596. }
  71597. return this._cachedMap.toJSON();
  71598. }
  71599. getRawMappings() {
  71600. return this._rawMappings.slice();
  71601. }
  71602. mark(generatedLine, generatedColumn, line, column, identifierName, filename, force) {
  71603. if (this._lastGenLine !== generatedLine && line === null)
  71604. return;
  71605. if (!force && this._lastGenLine === generatedLine && this._lastSourceLine === line && this._lastSourceColumn === column) {
  71606. return;
  71607. }
  71608. this._cachedMap = null;
  71609. this._lastGenLine = generatedLine;
  71610. this._lastSourceLine = line;
  71611. this._lastSourceColumn = column;
  71612. this._rawMappings.push({
  71613. name: identifierName || void 0,
  71614. generated: {
  71615. line: generatedLine,
  71616. column: generatedColumn
  71617. },
  71618. source: line == null ? void 0 : (filename || this._opts.sourceFileName).replace(/\\/g, "/"),
  71619. original: line == null ? void 0 : {
  71620. line,
  71621. column
  71622. }
  71623. });
  71624. }
  71625. };
  71626. exports.default = SourceMap;
  71627. }
  71628. });
  71629. // node_modules/@babel/generator/lib/buffer.js
  71630. var require_buffer2 = __commonJS({
  71631. "node_modules/@babel/generator/lib/buffer.js"(exports) {
  71632. "use strict";
  71633. Object.defineProperty(exports, "__esModule", {
  71634. value: true
  71635. });
  71636. exports.default = void 0;
  71637. var SPACES_RE = /^[ \t]+$/;
  71638. var Buffer2 = class {
  71639. constructor(map) {
  71640. this._map = null;
  71641. this._buf = [];
  71642. this._last = "";
  71643. this._queue = [];
  71644. this._position = {
  71645. line: 1,
  71646. column: 0
  71647. };
  71648. this._sourcePosition = {
  71649. identifierName: null,
  71650. line: null,
  71651. column: null,
  71652. filename: null
  71653. };
  71654. this._disallowedPop = null;
  71655. this._map = map;
  71656. }
  71657. get() {
  71658. this._flush();
  71659. const map = this._map;
  71660. const result = {
  71661. code: this._buf.join("").trimRight(),
  71662. map: null,
  71663. rawMappings: map == null ? void 0 : map.getRawMappings()
  71664. };
  71665. if (map) {
  71666. Object.defineProperty(result, "map", {
  71667. configurable: true,
  71668. enumerable: true,
  71669. get() {
  71670. return this.map = map.get();
  71671. },
  71672. set(value) {
  71673. Object.defineProperty(this, "map", {
  71674. value,
  71675. writable: true
  71676. });
  71677. }
  71678. });
  71679. }
  71680. return result;
  71681. }
  71682. append(str) {
  71683. this._flush();
  71684. const {
  71685. line,
  71686. column,
  71687. filename,
  71688. identifierName,
  71689. force
  71690. } = this._sourcePosition;
  71691. this._append(str, line, column, identifierName, filename, force);
  71692. }
  71693. queue(str) {
  71694. if (str === "\n") {
  71695. while (this._queue.length > 0 && SPACES_RE.test(this._queue[0][0])) {
  71696. this._queue.shift();
  71697. }
  71698. }
  71699. const {
  71700. line,
  71701. column,
  71702. filename,
  71703. identifierName,
  71704. force
  71705. } = this._sourcePosition;
  71706. this._queue.unshift([str, line, column, identifierName, filename, force]);
  71707. }
  71708. _flush() {
  71709. let item;
  71710. while (item = this._queue.pop()) {
  71711. this._append(...item);
  71712. }
  71713. }
  71714. _append(str, line, column, identifierName, filename, force) {
  71715. this._buf.push(str);
  71716. this._last = str[str.length - 1];
  71717. let i = str.indexOf("\n");
  71718. let last = 0;
  71719. if (i !== 0) {
  71720. this._mark(line, column, identifierName, filename, force);
  71721. }
  71722. while (i !== -1) {
  71723. this._position.line++;
  71724. this._position.column = 0;
  71725. last = i + 1;
  71726. if (last < str.length) {
  71727. this._mark(++line, 0, identifierName, filename, force);
  71728. }
  71729. i = str.indexOf("\n", last);
  71730. }
  71731. this._position.column += str.length - last;
  71732. }
  71733. _mark(line, column, identifierName, filename, force) {
  71734. var _this$_map;
  71735. (_this$_map = this._map) == null ? void 0 : _this$_map.mark(this._position.line, this._position.column, line, column, identifierName, filename, force);
  71736. }
  71737. removeTrailingNewline() {
  71738. if (this._queue.length > 0 && this._queue[0][0] === "\n") {
  71739. this._queue.shift();
  71740. }
  71741. }
  71742. removeLastSemicolon() {
  71743. if (this._queue.length > 0 && this._queue[0][0] === ";") {
  71744. this._queue.shift();
  71745. }
  71746. }
  71747. endsWith(suffix) {
  71748. if (suffix.length === 1) {
  71749. let last;
  71750. if (this._queue.length > 0) {
  71751. const str = this._queue[0][0];
  71752. last = str[str.length - 1];
  71753. } else {
  71754. last = this._last;
  71755. }
  71756. return last === suffix;
  71757. }
  71758. const end = this._last + this._queue.reduce((acc, item) => item[0] + acc, "");
  71759. if (suffix.length <= end.length) {
  71760. return end.slice(-suffix.length) === suffix;
  71761. }
  71762. return false;
  71763. }
  71764. hasContent() {
  71765. return this._queue.length > 0 || !!this._last;
  71766. }
  71767. exactSource(loc, cb) {
  71768. this.source("start", loc, true);
  71769. cb();
  71770. this.source("end", loc);
  71771. this._disallowPop("start", loc);
  71772. }
  71773. source(prop, loc, force) {
  71774. if (prop && !loc)
  71775. return;
  71776. this._normalizePosition(prop, loc, this._sourcePosition, force);
  71777. }
  71778. withSource(prop, loc, cb) {
  71779. if (!this._map)
  71780. return cb();
  71781. const originalLine = this._sourcePosition.line;
  71782. const originalColumn = this._sourcePosition.column;
  71783. const originalFilename = this._sourcePosition.filename;
  71784. const originalIdentifierName = this._sourcePosition.identifierName;
  71785. this.source(prop, loc);
  71786. cb();
  71787. if ((!this._sourcePosition.force || this._sourcePosition.line !== originalLine || this._sourcePosition.column !== originalColumn || this._sourcePosition.filename !== originalFilename) && (!this._disallowedPop || this._disallowedPop.line !== originalLine || this._disallowedPop.column !== originalColumn || this._disallowedPop.filename !== originalFilename)) {
  71788. this._sourcePosition.line = originalLine;
  71789. this._sourcePosition.column = originalColumn;
  71790. this._sourcePosition.filename = originalFilename;
  71791. this._sourcePosition.identifierName = originalIdentifierName;
  71792. this._sourcePosition.force = false;
  71793. this._disallowedPop = null;
  71794. }
  71795. }
  71796. _disallowPop(prop, loc) {
  71797. if (prop && !loc)
  71798. return;
  71799. this._disallowedPop = this._normalizePosition(prop, loc);
  71800. }
  71801. _normalizePosition(prop, loc, targetObj, force) {
  71802. const pos = loc ? loc[prop] : null;
  71803. if (targetObj === void 0) {
  71804. targetObj = {
  71805. identifierName: null,
  71806. line: null,
  71807. column: null,
  71808. filename: null,
  71809. force: false
  71810. };
  71811. }
  71812. const origLine = targetObj.line;
  71813. const origColumn = targetObj.column;
  71814. const origFilename = targetObj.filename;
  71815. targetObj.identifierName = prop === "start" && (loc == null ? void 0 : loc.identifierName) || null;
  71816. targetObj.line = pos == null ? void 0 : pos.line;
  71817. targetObj.column = pos == null ? void 0 : pos.column;
  71818. targetObj.filename = loc == null ? void 0 : loc.filename;
  71819. if (force || targetObj.line !== origLine || targetObj.column !== origColumn || targetObj.filename !== origFilename) {
  71820. targetObj.force = force;
  71821. }
  71822. return targetObj;
  71823. }
  71824. getCurrentColumn() {
  71825. const extra = this._queue.reduce((acc, item) => item[0] + acc, "");
  71826. const lastIndex = extra.lastIndexOf("\n");
  71827. return lastIndex === -1 ? this._position.column + extra.length : extra.length - 1 - lastIndex;
  71828. }
  71829. getCurrentLine() {
  71830. const extra = this._queue.reduce((acc, item) => item[0] + acc, "");
  71831. let count = 0;
  71832. for (let i = 0; i < extra.length; i++) {
  71833. if (extra[i] === "\n")
  71834. count++;
  71835. }
  71836. return this._position.line + count;
  71837. }
  71838. };
  71839. exports.default = Buffer2;
  71840. }
  71841. });
  71842. // node_modules/@babel/generator/lib/node/whitespace.js
  71843. var require_whitespace2 = __commonJS({
  71844. "node_modules/@babel/generator/lib/node/whitespace.js"(exports) {
  71845. "use strict";
  71846. Object.defineProperty(exports, "__esModule", {
  71847. value: true
  71848. });
  71849. exports.list = exports.nodes = void 0;
  71850. var t2 = require_lib2();
  71851. function crawl(node, state = {}) {
  71852. if (t2.isMemberExpression(node) || t2.isOptionalMemberExpression(node)) {
  71853. crawl(node.object, state);
  71854. if (node.computed)
  71855. crawl(node.property, state);
  71856. } else if (t2.isBinary(node) || t2.isAssignmentExpression(node)) {
  71857. crawl(node.left, state);
  71858. crawl(node.right, state);
  71859. } else if (t2.isCallExpression(node) || t2.isOptionalCallExpression(node)) {
  71860. state.hasCall = true;
  71861. crawl(node.callee, state);
  71862. } else if (t2.isFunction(node)) {
  71863. state.hasFunction = true;
  71864. } else if (t2.isIdentifier(node)) {
  71865. state.hasHelper = state.hasHelper || isHelper(node.callee);
  71866. }
  71867. return state;
  71868. }
  71869. function isHelper(node) {
  71870. if (t2.isMemberExpression(node)) {
  71871. return isHelper(node.object) || isHelper(node.property);
  71872. } else if (t2.isIdentifier(node)) {
  71873. return node.name === "require" || node.name[0] === "_";
  71874. } else if (t2.isCallExpression(node)) {
  71875. return isHelper(node.callee);
  71876. } else if (t2.isBinary(node) || t2.isAssignmentExpression(node)) {
  71877. return t2.isIdentifier(node.left) && isHelper(node.left) || isHelper(node.right);
  71878. } else {
  71879. return false;
  71880. }
  71881. }
  71882. function isType(node) {
  71883. return t2.isLiteral(node) || t2.isObjectExpression(node) || t2.isArrayExpression(node) || t2.isIdentifier(node) || t2.isMemberExpression(node);
  71884. }
  71885. var nodes = {
  71886. AssignmentExpression(node) {
  71887. const state = crawl(node.right);
  71888. if (state.hasCall && state.hasHelper || state.hasFunction) {
  71889. return {
  71890. before: state.hasFunction,
  71891. after: true
  71892. };
  71893. }
  71894. },
  71895. SwitchCase(node, parent) {
  71896. return {
  71897. before: !!node.consequent.length || parent.cases[0] === node,
  71898. after: !node.consequent.length && parent.cases[parent.cases.length - 1] === node
  71899. };
  71900. },
  71901. LogicalExpression(node) {
  71902. if (t2.isFunction(node.left) || t2.isFunction(node.right)) {
  71903. return {
  71904. after: true
  71905. };
  71906. }
  71907. },
  71908. Literal(node) {
  71909. if (t2.isStringLiteral(node) && node.value === "use strict") {
  71910. return {
  71911. after: true
  71912. };
  71913. }
  71914. },
  71915. CallExpression(node) {
  71916. if (t2.isFunction(node.callee) || isHelper(node)) {
  71917. return {
  71918. before: true,
  71919. after: true
  71920. };
  71921. }
  71922. },
  71923. OptionalCallExpression(node) {
  71924. if (t2.isFunction(node.callee)) {
  71925. return {
  71926. before: true,
  71927. after: true
  71928. };
  71929. }
  71930. },
  71931. VariableDeclaration(node) {
  71932. for (let i = 0; i < node.declarations.length; i++) {
  71933. const declar = node.declarations[i];
  71934. let enabled = isHelper(declar.id) && !isType(declar.init);
  71935. if (!enabled) {
  71936. const state = crawl(declar.init);
  71937. enabled = isHelper(declar.init) && state.hasCall || state.hasFunction;
  71938. }
  71939. if (enabled) {
  71940. return {
  71941. before: true,
  71942. after: true
  71943. };
  71944. }
  71945. }
  71946. },
  71947. IfStatement(node) {
  71948. if (t2.isBlockStatement(node.consequent)) {
  71949. return {
  71950. before: true,
  71951. after: true
  71952. };
  71953. }
  71954. }
  71955. };
  71956. exports.nodes = nodes;
  71957. nodes.ObjectProperty = nodes.ObjectTypeProperty = nodes.ObjectMethod = function(node, parent) {
  71958. if (parent.properties[0] === node) {
  71959. return {
  71960. before: true
  71961. };
  71962. }
  71963. };
  71964. nodes.ObjectTypeCallProperty = function(node, parent) {
  71965. var _parent$properties;
  71966. if (parent.callProperties[0] === node && !((_parent$properties = parent.properties) != null && _parent$properties.length)) {
  71967. return {
  71968. before: true
  71969. };
  71970. }
  71971. };
  71972. nodes.ObjectTypeIndexer = function(node, parent) {
  71973. var _parent$properties2, _parent$callPropertie;
  71974. if (parent.indexers[0] === node && !((_parent$properties2 = parent.properties) != null && _parent$properties2.length) && !((_parent$callPropertie = parent.callProperties) != null && _parent$callPropertie.length)) {
  71975. return {
  71976. before: true
  71977. };
  71978. }
  71979. };
  71980. nodes.ObjectTypeInternalSlot = function(node, parent) {
  71981. var _parent$properties3, _parent$callPropertie2, _parent$indexers;
  71982. if (parent.internalSlots[0] === node && !((_parent$properties3 = parent.properties) != null && _parent$properties3.length) && !((_parent$callPropertie2 = parent.callProperties) != null && _parent$callPropertie2.length) && !((_parent$indexers = parent.indexers) != null && _parent$indexers.length)) {
  71983. return {
  71984. before: true
  71985. };
  71986. }
  71987. };
  71988. var list3 = {
  71989. VariableDeclaration(node) {
  71990. return node.declarations.map((decl) => decl.init);
  71991. },
  71992. ArrayExpression(node) {
  71993. return node.elements;
  71994. },
  71995. ObjectExpression(node) {
  71996. return node.properties;
  71997. }
  71998. };
  71999. exports.list = list3;
  72000. [["Function", true], ["Class", true], ["Loop", true], ["LabeledStatement", true], ["SwitchStatement", true], ["TryStatement", true]].forEach(function([type, amounts]) {
  72001. if (typeof amounts === "boolean") {
  72002. amounts = {
  72003. after: amounts,
  72004. before: amounts
  72005. };
  72006. }
  72007. [type].concat(t2.FLIPPED_ALIAS_KEYS[type] || []).forEach(function(type2) {
  72008. nodes[type2] = function() {
  72009. return amounts;
  72010. };
  72011. });
  72012. });
  72013. }
  72014. });
  72015. // node_modules/@babel/generator/lib/node/parentheses.js
  72016. var require_parentheses2 = __commonJS({
  72017. "node_modules/@babel/generator/lib/node/parentheses.js"(exports) {
  72018. "use strict";
  72019. Object.defineProperty(exports, "__esModule", {
  72020. value: true
  72021. });
  72022. exports.NullableTypeAnnotation = NullableTypeAnnotation;
  72023. exports.FunctionTypeAnnotation = FunctionTypeAnnotation;
  72024. exports.UpdateExpression = UpdateExpression;
  72025. exports.ObjectExpression = ObjectExpression;
  72026. exports.DoExpression = DoExpression;
  72027. exports.Binary = Binary;
  72028. exports.IntersectionTypeAnnotation = exports.UnionTypeAnnotation = UnionTypeAnnotation;
  72029. exports.OptionalIndexedAccessType = OptionalIndexedAccessType;
  72030. exports.TSAsExpression = TSAsExpression;
  72031. exports.TSTypeAssertion = TSTypeAssertion;
  72032. exports.TSIntersectionType = exports.TSUnionType = TSUnionType;
  72033. exports.TSInferType = TSInferType;
  72034. exports.BinaryExpression = BinaryExpression2;
  72035. exports.SequenceExpression = SequenceExpression;
  72036. exports.AwaitExpression = exports.YieldExpression = YieldExpression;
  72037. exports.ClassExpression = ClassExpression;
  72038. exports.UnaryLike = UnaryLike;
  72039. exports.FunctionExpression = FunctionExpression;
  72040. exports.ArrowFunctionExpression = ArrowFunctionExpression;
  72041. exports.ConditionalExpression = ConditionalExpression;
  72042. exports.OptionalCallExpression = exports.OptionalMemberExpression = OptionalMemberExpression;
  72043. exports.AssignmentExpression = AssignmentExpression;
  72044. exports.LogicalExpression = LogicalExpression;
  72045. exports.Identifier = Identifier;
  72046. var t2 = require_lib2();
  72047. var PRECEDENCE = {
  72048. "||": 0,
  72049. "??": 0,
  72050. "&&": 1,
  72051. "|": 2,
  72052. "^": 3,
  72053. "&": 4,
  72054. "==": 5,
  72055. "===": 5,
  72056. "!=": 5,
  72057. "!==": 5,
  72058. "<": 6,
  72059. ">": 6,
  72060. "<=": 6,
  72061. ">=": 6,
  72062. in: 6,
  72063. instanceof: 6,
  72064. ">>": 7,
  72065. "<<": 7,
  72066. ">>>": 7,
  72067. "+": 8,
  72068. "-": 8,
  72069. "*": 9,
  72070. "/": 9,
  72071. "%": 9,
  72072. "**": 10
  72073. };
  72074. var isClassExtendsClause = (node, parent) => (t2.isClassDeclaration(parent) || t2.isClassExpression(parent)) && parent.superClass === node;
  72075. var hasPostfixPart = (node, parent) => (t2.isMemberExpression(parent) || t2.isOptionalMemberExpression(parent)) && parent.object === node || (t2.isCallExpression(parent) || t2.isOptionalCallExpression(parent) || t2.isNewExpression(parent)) && parent.callee === node || t2.isTaggedTemplateExpression(parent) && parent.tag === node || t2.isTSNonNullExpression(parent);
  72076. function NullableTypeAnnotation(node, parent) {
  72077. return t2.isArrayTypeAnnotation(parent);
  72078. }
  72079. function FunctionTypeAnnotation(node, parent, printStack) {
  72080. return t2.isUnionTypeAnnotation(parent) || t2.isIntersectionTypeAnnotation(parent) || t2.isArrayTypeAnnotation(parent) || t2.isTypeAnnotation(parent) && t2.isArrowFunctionExpression(printStack[printStack.length - 3]);
  72081. }
  72082. function UpdateExpression(node, parent) {
  72083. return hasPostfixPart(node, parent) || isClassExtendsClause(node, parent);
  72084. }
  72085. function ObjectExpression(node, parent, printStack) {
  72086. return isFirstInContext(printStack, {
  72087. expressionStatement: true,
  72088. arrowBody: true
  72089. });
  72090. }
  72091. function DoExpression(node, parent, printStack) {
  72092. return !node.async && isFirstInContext(printStack, {
  72093. expressionStatement: true
  72094. });
  72095. }
  72096. function Binary(node, parent) {
  72097. if (node.operator === "**" && t2.isBinaryExpression(parent, {
  72098. operator: "**"
  72099. })) {
  72100. return parent.left === node;
  72101. }
  72102. if (isClassExtendsClause(node, parent)) {
  72103. return true;
  72104. }
  72105. if (hasPostfixPart(node, parent) || t2.isUnaryLike(parent) || t2.isAwaitExpression(parent)) {
  72106. return true;
  72107. }
  72108. if (t2.isBinary(parent)) {
  72109. const parentOp = parent.operator;
  72110. const parentPos = PRECEDENCE[parentOp];
  72111. const nodeOp = node.operator;
  72112. const nodePos = PRECEDENCE[nodeOp];
  72113. if (parentPos === nodePos && parent.right === node && !t2.isLogicalExpression(parent) || parentPos > nodePos) {
  72114. return true;
  72115. }
  72116. }
  72117. }
  72118. function UnionTypeAnnotation(node, parent) {
  72119. return t2.isArrayTypeAnnotation(parent) || t2.isNullableTypeAnnotation(parent) || t2.isIntersectionTypeAnnotation(parent) || t2.isUnionTypeAnnotation(parent);
  72120. }
  72121. function OptionalIndexedAccessType(node, parent) {
  72122. return t2.isIndexedAccessType(parent, {
  72123. objectType: node
  72124. });
  72125. }
  72126. function TSAsExpression() {
  72127. return true;
  72128. }
  72129. function TSTypeAssertion() {
  72130. return true;
  72131. }
  72132. function TSUnionType(node, parent) {
  72133. return t2.isTSArrayType(parent) || t2.isTSOptionalType(parent) || t2.isTSIntersectionType(parent) || t2.isTSUnionType(parent) || t2.isTSRestType(parent);
  72134. }
  72135. function TSInferType(node, parent) {
  72136. return t2.isTSArrayType(parent) || t2.isTSOptionalType(parent);
  72137. }
  72138. function BinaryExpression2(node, parent) {
  72139. return node.operator === "in" && (t2.isVariableDeclarator(parent) || t2.isFor(parent));
  72140. }
  72141. function SequenceExpression(node, parent) {
  72142. if (t2.isForStatement(parent) || t2.isThrowStatement(parent) || t2.isReturnStatement(parent) || t2.isIfStatement(parent) && parent.test === node || t2.isWhileStatement(parent) && parent.test === node || t2.isForInStatement(parent) && parent.right === node || t2.isSwitchStatement(parent) && parent.discriminant === node || t2.isExpressionStatement(parent) && parent.expression === node) {
  72143. return false;
  72144. }
  72145. return true;
  72146. }
  72147. function YieldExpression(node, parent) {
  72148. return t2.isBinary(parent) || t2.isUnaryLike(parent) || hasPostfixPart(node, parent) || t2.isAwaitExpression(parent) && t2.isYieldExpression(node) || t2.isConditionalExpression(parent) && node === parent.test || isClassExtendsClause(node, parent);
  72149. }
  72150. function ClassExpression(node, parent, printStack) {
  72151. return isFirstInContext(printStack, {
  72152. expressionStatement: true,
  72153. exportDefault: true
  72154. });
  72155. }
  72156. function UnaryLike(node, parent) {
  72157. return hasPostfixPart(node, parent) || t2.isBinaryExpression(parent, {
  72158. operator: "**",
  72159. left: node
  72160. }) || isClassExtendsClause(node, parent);
  72161. }
  72162. function FunctionExpression(node, parent, printStack) {
  72163. return isFirstInContext(printStack, {
  72164. expressionStatement: true,
  72165. exportDefault: true
  72166. });
  72167. }
  72168. function ArrowFunctionExpression(node, parent) {
  72169. return t2.isExportDeclaration(parent) || ConditionalExpression(node, parent);
  72170. }
  72171. function ConditionalExpression(node, parent) {
  72172. if (t2.isUnaryLike(parent) || t2.isBinary(parent) || t2.isConditionalExpression(parent, {
  72173. test: node
  72174. }) || t2.isAwaitExpression(parent) || t2.isTSTypeAssertion(parent) || t2.isTSAsExpression(parent)) {
  72175. return true;
  72176. }
  72177. return UnaryLike(node, parent);
  72178. }
  72179. function OptionalMemberExpression(node, parent) {
  72180. return t2.isCallExpression(parent, {
  72181. callee: node
  72182. }) || t2.isMemberExpression(parent, {
  72183. object: node
  72184. });
  72185. }
  72186. function AssignmentExpression(node, parent) {
  72187. if (t2.isObjectPattern(node.left)) {
  72188. return true;
  72189. } else {
  72190. return ConditionalExpression(node, parent);
  72191. }
  72192. }
  72193. function LogicalExpression(node, parent) {
  72194. switch (node.operator) {
  72195. case "||":
  72196. if (!t2.isLogicalExpression(parent))
  72197. return false;
  72198. return parent.operator === "??" || parent.operator === "&&";
  72199. case "&&":
  72200. return t2.isLogicalExpression(parent, {
  72201. operator: "??"
  72202. });
  72203. case "??":
  72204. return t2.isLogicalExpression(parent) && parent.operator !== "??";
  72205. }
  72206. }
  72207. function Identifier(node, parent, printStack) {
  72208. if (node.name === "let") {
  72209. const isFollowedByBracket = t2.isMemberExpression(parent, {
  72210. object: node,
  72211. computed: true
  72212. }) || t2.isOptionalMemberExpression(parent, {
  72213. object: node,
  72214. computed: true,
  72215. optional: false
  72216. });
  72217. return isFirstInContext(printStack, {
  72218. expressionStatement: isFollowedByBracket,
  72219. forHead: isFollowedByBracket,
  72220. forInHead: isFollowedByBracket,
  72221. forOfHead: true
  72222. });
  72223. }
  72224. return node.name === "async" && t2.isForOfStatement(parent) && node === parent.left;
  72225. }
  72226. function isFirstInContext(printStack, {
  72227. expressionStatement = false,
  72228. arrowBody = false,
  72229. exportDefault = false,
  72230. forHead = false,
  72231. forInHead = false,
  72232. forOfHead = false
  72233. }) {
  72234. let i = printStack.length - 1;
  72235. let node = printStack[i];
  72236. i--;
  72237. let parent = printStack[i];
  72238. while (i >= 0) {
  72239. if (expressionStatement && t2.isExpressionStatement(parent, {
  72240. expression: node
  72241. }) || exportDefault && t2.isExportDefaultDeclaration(parent, {
  72242. declaration: node
  72243. }) || arrowBody && t2.isArrowFunctionExpression(parent, {
  72244. body: node
  72245. }) || forHead && t2.isForStatement(parent, {
  72246. init: node
  72247. }) || forInHead && t2.isForInStatement(parent, {
  72248. left: node
  72249. }) || forOfHead && t2.isForOfStatement(parent, {
  72250. left: node
  72251. })) {
  72252. return true;
  72253. }
  72254. if (hasPostfixPart(node, parent) && !t2.isNewExpression(parent) || t2.isSequenceExpression(parent) && parent.expressions[0] === node || t2.isConditional(parent, {
  72255. test: node
  72256. }) || t2.isBinary(parent, {
  72257. left: node
  72258. }) || t2.isAssignmentExpression(parent, {
  72259. left: node
  72260. })) {
  72261. node = parent;
  72262. i--;
  72263. parent = printStack[i];
  72264. } else {
  72265. return false;
  72266. }
  72267. }
  72268. return false;
  72269. }
  72270. }
  72271. });
  72272. // node_modules/@babel/generator/lib/node/index.js
  72273. var require_node3 = __commonJS({
  72274. "node_modules/@babel/generator/lib/node/index.js"(exports) {
  72275. "use strict";
  72276. Object.defineProperty(exports, "__esModule", {
  72277. value: true
  72278. });
  72279. exports.needsWhitespace = needsWhitespace;
  72280. exports.needsWhitespaceBefore = needsWhitespaceBefore;
  72281. exports.needsWhitespaceAfter = needsWhitespaceAfter;
  72282. exports.needsParens = needsParens;
  72283. var whitespace2 = require_whitespace2();
  72284. var parens = require_parentheses2();
  72285. var t2 = require_lib2();
  72286. function expandAliases(obj) {
  72287. const newObj = {};
  72288. function add(type, func) {
  72289. const fn = newObj[type];
  72290. newObj[type] = fn ? function(node, parent, stack) {
  72291. const result = fn(node, parent, stack);
  72292. return result == null ? func(node, parent, stack) : result;
  72293. } : func;
  72294. }
  72295. for (const type of Object.keys(obj)) {
  72296. const aliases = t2.FLIPPED_ALIAS_KEYS[type];
  72297. if (aliases) {
  72298. for (const alias of aliases) {
  72299. add(alias, obj[type]);
  72300. }
  72301. } else {
  72302. add(type, obj[type]);
  72303. }
  72304. }
  72305. return newObj;
  72306. }
  72307. var expandedParens = expandAliases(parens);
  72308. var expandedWhitespaceNodes = expandAliases(whitespace2.nodes);
  72309. var expandedWhitespaceList = expandAliases(whitespace2.list);
  72310. function find2(obj, node, parent, printStack) {
  72311. const fn = obj[node.type];
  72312. return fn ? fn(node, parent, printStack) : null;
  72313. }
  72314. function isOrHasCallExpression(node) {
  72315. if (t2.isCallExpression(node)) {
  72316. return true;
  72317. }
  72318. return t2.isMemberExpression(node) && isOrHasCallExpression(node.object);
  72319. }
  72320. function needsWhitespace(node, parent, type) {
  72321. if (!node)
  72322. return 0;
  72323. if (t2.isExpressionStatement(node)) {
  72324. node = node.expression;
  72325. }
  72326. let linesInfo = find2(expandedWhitespaceNodes, node, parent);
  72327. if (!linesInfo) {
  72328. const items = find2(expandedWhitespaceList, node, parent);
  72329. if (items) {
  72330. for (let i = 0; i < items.length; i++) {
  72331. linesInfo = needsWhitespace(items[i], node, type);
  72332. if (linesInfo)
  72333. break;
  72334. }
  72335. }
  72336. }
  72337. if (typeof linesInfo === "object" && linesInfo !== null) {
  72338. return linesInfo[type] || 0;
  72339. }
  72340. return 0;
  72341. }
  72342. function needsWhitespaceBefore(node, parent) {
  72343. return needsWhitespace(node, parent, "before");
  72344. }
  72345. function needsWhitespaceAfter(node, parent) {
  72346. return needsWhitespace(node, parent, "after");
  72347. }
  72348. function needsParens(node, parent, printStack) {
  72349. if (!parent)
  72350. return false;
  72351. if (t2.isNewExpression(parent) && parent.callee === node) {
  72352. if (isOrHasCallExpression(node))
  72353. return true;
  72354. }
  72355. return find2(expandedParens, node, parent, printStack);
  72356. }
  72357. }
  72358. });
  72359. // node_modules/@babel/generator/lib/generators/template-literals.js
  72360. var require_template_literals2 = __commonJS({
  72361. "node_modules/@babel/generator/lib/generators/template-literals.js"(exports) {
  72362. "use strict";
  72363. Object.defineProperty(exports, "__esModule", {
  72364. value: true
  72365. });
  72366. exports.TaggedTemplateExpression = TaggedTemplateExpression;
  72367. exports.TemplateElement = TemplateElement;
  72368. exports.TemplateLiteral = TemplateLiteral;
  72369. var t2 = require_lib2();
  72370. function TaggedTemplateExpression(node) {
  72371. this.print(node.tag, node);
  72372. this.print(node.typeParameters, node);
  72373. this.print(node.quasi, node);
  72374. }
  72375. function TemplateElement(node, parent) {
  72376. const isFirst = parent.quasis[0] === node;
  72377. const isLast = parent.quasis[parent.quasis.length - 1] === node;
  72378. const value = (isFirst ? "`" : "}") + node.value.raw + (isLast ? "`" : "${");
  72379. this.token(value);
  72380. }
  72381. function TemplateLiteral(node) {
  72382. const quasis = node.quasis;
  72383. for (let i = 0; i < quasis.length; i++) {
  72384. this.print(quasis[i], node);
  72385. if (i + 1 < quasis.length) {
  72386. this.print(node.expressions[i], node);
  72387. }
  72388. }
  72389. }
  72390. }
  72391. });
  72392. // node_modules/@babel/generator/lib/generators/expressions.js
  72393. var require_expressions2 = __commonJS({
  72394. "node_modules/@babel/generator/lib/generators/expressions.js"(exports) {
  72395. "use strict";
  72396. Object.defineProperty(exports, "__esModule", {
  72397. value: true
  72398. });
  72399. exports.UnaryExpression = UnaryExpression;
  72400. exports.DoExpression = DoExpression;
  72401. exports.ParenthesizedExpression = ParenthesizedExpression;
  72402. exports.UpdateExpression = UpdateExpression;
  72403. exports.ConditionalExpression = ConditionalExpression;
  72404. exports.NewExpression = NewExpression;
  72405. exports.SequenceExpression = SequenceExpression;
  72406. exports.ThisExpression = ThisExpression;
  72407. exports.Super = Super;
  72408. exports.Decorator = Decorator;
  72409. exports.OptionalMemberExpression = OptionalMemberExpression;
  72410. exports.OptionalCallExpression = OptionalCallExpression;
  72411. exports.CallExpression = CallExpression;
  72412. exports.Import = Import;
  72413. exports.EmptyStatement = EmptyStatement;
  72414. exports.ExpressionStatement = ExpressionStatement;
  72415. exports.AssignmentPattern = AssignmentPattern;
  72416. exports.LogicalExpression = exports.BinaryExpression = exports.AssignmentExpression = AssignmentExpression;
  72417. exports.BindExpression = BindExpression;
  72418. exports.MemberExpression = MemberExpression;
  72419. exports.MetaProperty = MetaProperty;
  72420. exports.PrivateName = PrivateName;
  72421. exports.V8IntrinsicIdentifier = V8IntrinsicIdentifier;
  72422. exports.ModuleExpression = ModuleExpression;
  72423. exports.AwaitExpression = exports.YieldExpression = void 0;
  72424. var t2 = require_lib2();
  72425. var n = require_node3();
  72426. function UnaryExpression(node) {
  72427. if (node.operator === "void" || node.operator === "delete" || node.operator === "typeof" || node.operator === "throw") {
  72428. this.word(node.operator);
  72429. this.space();
  72430. } else {
  72431. this.token(node.operator);
  72432. }
  72433. this.print(node.argument, node);
  72434. }
  72435. function DoExpression(node) {
  72436. if (node.async) {
  72437. this.word("async");
  72438. this.space();
  72439. }
  72440. this.word("do");
  72441. this.space();
  72442. this.print(node.body, node);
  72443. }
  72444. function ParenthesizedExpression(node) {
  72445. this.token("(");
  72446. this.print(node.expression, node);
  72447. this.token(")");
  72448. }
  72449. function UpdateExpression(node) {
  72450. if (node.prefix) {
  72451. this.token(node.operator);
  72452. this.print(node.argument, node);
  72453. } else {
  72454. this.startTerminatorless(true);
  72455. this.print(node.argument, node);
  72456. this.endTerminatorless();
  72457. this.token(node.operator);
  72458. }
  72459. }
  72460. function ConditionalExpression(node) {
  72461. this.print(node.test, node);
  72462. this.space();
  72463. this.token("?");
  72464. this.space();
  72465. this.print(node.consequent, node);
  72466. this.space();
  72467. this.token(":");
  72468. this.space();
  72469. this.print(node.alternate, node);
  72470. }
  72471. function NewExpression(node, parent) {
  72472. this.word("new");
  72473. this.space();
  72474. this.print(node.callee, node);
  72475. if (this.format.minified && node.arguments.length === 0 && !node.optional && !t2.isCallExpression(parent, {
  72476. callee: node
  72477. }) && !t2.isMemberExpression(parent) && !t2.isNewExpression(parent)) {
  72478. return;
  72479. }
  72480. this.print(node.typeArguments, node);
  72481. this.print(node.typeParameters, node);
  72482. if (node.optional) {
  72483. this.token("?.");
  72484. }
  72485. this.token("(");
  72486. this.printList(node.arguments, node);
  72487. this.token(")");
  72488. }
  72489. function SequenceExpression(node) {
  72490. this.printList(node.expressions, node);
  72491. }
  72492. function ThisExpression() {
  72493. this.word("this");
  72494. }
  72495. function Super() {
  72496. this.word("super");
  72497. }
  72498. function Decorator(node) {
  72499. this.token("@");
  72500. this.print(node.expression, node);
  72501. this.newline();
  72502. }
  72503. function OptionalMemberExpression(node) {
  72504. this.print(node.object, node);
  72505. if (!node.computed && t2.isMemberExpression(node.property)) {
  72506. throw new TypeError("Got a MemberExpression for MemberExpression property");
  72507. }
  72508. let computed = node.computed;
  72509. if (t2.isLiteral(node.property) && typeof node.property.value === "number") {
  72510. computed = true;
  72511. }
  72512. if (node.optional) {
  72513. this.token("?.");
  72514. }
  72515. if (computed) {
  72516. this.token("[");
  72517. this.print(node.property, node);
  72518. this.token("]");
  72519. } else {
  72520. if (!node.optional) {
  72521. this.token(".");
  72522. }
  72523. this.print(node.property, node);
  72524. }
  72525. }
  72526. function OptionalCallExpression(node) {
  72527. this.print(node.callee, node);
  72528. this.print(node.typeArguments, node);
  72529. this.print(node.typeParameters, node);
  72530. if (node.optional) {
  72531. this.token("?.");
  72532. }
  72533. this.token("(");
  72534. this.printList(node.arguments, node);
  72535. this.token(")");
  72536. }
  72537. function CallExpression(node) {
  72538. this.print(node.callee, node);
  72539. this.print(node.typeArguments, node);
  72540. this.print(node.typeParameters, node);
  72541. this.token("(");
  72542. this.printList(node.arguments, node);
  72543. this.token(")");
  72544. }
  72545. function Import() {
  72546. this.word("import");
  72547. }
  72548. function buildYieldAwait(keyword) {
  72549. return function(node) {
  72550. this.word(keyword);
  72551. if (node.delegate) {
  72552. this.token("*");
  72553. }
  72554. if (node.argument) {
  72555. this.space();
  72556. const terminatorState = this.startTerminatorless();
  72557. this.print(node.argument, node);
  72558. this.endTerminatorless(terminatorState);
  72559. }
  72560. };
  72561. }
  72562. var YieldExpression = buildYieldAwait("yield");
  72563. exports.YieldExpression = YieldExpression;
  72564. var AwaitExpression = buildYieldAwait("await");
  72565. exports.AwaitExpression = AwaitExpression;
  72566. function EmptyStatement() {
  72567. this.semicolon(true);
  72568. }
  72569. function ExpressionStatement(node) {
  72570. this.print(node.expression, node);
  72571. this.semicolon();
  72572. }
  72573. function AssignmentPattern(node) {
  72574. this.print(node.left, node);
  72575. if (node.left.optional)
  72576. this.token("?");
  72577. this.print(node.left.typeAnnotation, node);
  72578. this.space();
  72579. this.token("=");
  72580. this.space();
  72581. this.print(node.right, node);
  72582. }
  72583. function AssignmentExpression(node, parent) {
  72584. const parens = this.inForStatementInitCounter && node.operator === "in" && !n.needsParens(node, parent);
  72585. if (parens) {
  72586. this.token("(");
  72587. }
  72588. this.print(node.left, node);
  72589. this.space();
  72590. if (node.operator === "in" || node.operator === "instanceof") {
  72591. this.word(node.operator);
  72592. } else {
  72593. this.token(node.operator);
  72594. }
  72595. this.space();
  72596. this.print(node.right, node);
  72597. if (parens) {
  72598. this.token(")");
  72599. }
  72600. }
  72601. function BindExpression(node) {
  72602. this.print(node.object, node);
  72603. this.token("::");
  72604. this.print(node.callee, node);
  72605. }
  72606. function MemberExpression(node) {
  72607. this.print(node.object, node);
  72608. if (!node.computed && t2.isMemberExpression(node.property)) {
  72609. throw new TypeError("Got a MemberExpression for MemberExpression property");
  72610. }
  72611. let computed = node.computed;
  72612. if (t2.isLiteral(node.property) && typeof node.property.value === "number") {
  72613. computed = true;
  72614. }
  72615. if (computed) {
  72616. this.token("[");
  72617. this.print(node.property, node);
  72618. this.token("]");
  72619. } else {
  72620. this.token(".");
  72621. this.print(node.property, node);
  72622. }
  72623. }
  72624. function MetaProperty(node) {
  72625. this.print(node.meta, node);
  72626. this.token(".");
  72627. this.print(node.property, node);
  72628. }
  72629. function PrivateName(node) {
  72630. this.token("#");
  72631. this.print(node.id, node);
  72632. }
  72633. function V8IntrinsicIdentifier(node) {
  72634. this.token("%");
  72635. this.word(node.name);
  72636. }
  72637. function ModuleExpression(node) {
  72638. this.word("module");
  72639. this.space();
  72640. this.token("{");
  72641. if (node.body.body.length === 0) {
  72642. this.token("}");
  72643. } else {
  72644. this.newline();
  72645. this.printSequence(node.body.body, node, {
  72646. indent: true
  72647. });
  72648. this.rightBrace();
  72649. }
  72650. }
  72651. }
  72652. });
  72653. // node_modules/@babel/generator/lib/generators/statements.js
  72654. var require_statements2 = __commonJS({
  72655. "node_modules/@babel/generator/lib/generators/statements.js"(exports) {
  72656. "use strict";
  72657. Object.defineProperty(exports, "__esModule", {
  72658. value: true
  72659. });
  72660. exports.WithStatement = WithStatement;
  72661. exports.IfStatement = IfStatement;
  72662. exports.ForStatement = ForStatement;
  72663. exports.WhileStatement = WhileStatement;
  72664. exports.DoWhileStatement = DoWhileStatement;
  72665. exports.LabeledStatement = LabeledStatement;
  72666. exports.TryStatement = TryStatement;
  72667. exports.CatchClause = CatchClause;
  72668. exports.SwitchStatement = SwitchStatement;
  72669. exports.SwitchCase = SwitchCase;
  72670. exports.DebuggerStatement = DebuggerStatement;
  72671. exports.VariableDeclaration = VariableDeclaration;
  72672. exports.VariableDeclarator = VariableDeclarator;
  72673. exports.ThrowStatement = exports.BreakStatement = exports.ReturnStatement = exports.ContinueStatement = exports.ForOfStatement = exports.ForInStatement = void 0;
  72674. var t2 = require_lib2();
  72675. function WithStatement(node) {
  72676. this.word("with");
  72677. this.space();
  72678. this.token("(");
  72679. this.print(node.object, node);
  72680. this.token(")");
  72681. this.printBlock(node);
  72682. }
  72683. function IfStatement(node) {
  72684. this.word("if");
  72685. this.space();
  72686. this.token("(");
  72687. this.print(node.test, node);
  72688. this.token(")");
  72689. this.space();
  72690. const needsBlock = node.alternate && t2.isIfStatement(getLastStatement(node.consequent));
  72691. if (needsBlock) {
  72692. this.token("{");
  72693. this.newline();
  72694. this.indent();
  72695. }
  72696. this.printAndIndentOnComments(node.consequent, node);
  72697. if (needsBlock) {
  72698. this.dedent();
  72699. this.newline();
  72700. this.token("}");
  72701. }
  72702. if (node.alternate) {
  72703. if (this.endsWith("}"))
  72704. this.space();
  72705. this.word("else");
  72706. this.space();
  72707. this.printAndIndentOnComments(node.alternate, node);
  72708. }
  72709. }
  72710. function getLastStatement(statement) {
  72711. if (!t2.isStatement(statement.body))
  72712. return statement;
  72713. return getLastStatement(statement.body);
  72714. }
  72715. function ForStatement(node) {
  72716. this.word("for");
  72717. this.space();
  72718. this.token("(");
  72719. this.inForStatementInitCounter++;
  72720. this.print(node.init, node);
  72721. this.inForStatementInitCounter--;
  72722. this.token(";");
  72723. if (node.test) {
  72724. this.space();
  72725. this.print(node.test, node);
  72726. }
  72727. this.token(";");
  72728. if (node.update) {
  72729. this.space();
  72730. this.print(node.update, node);
  72731. }
  72732. this.token(")");
  72733. this.printBlock(node);
  72734. }
  72735. function WhileStatement(node) {
  72736. this.word("while");
  72737. this.space();
  72738. this.token("(");
  72739. this.print(node.test, node);
  72740. this.token(")");
  72741. this.printBlock(node);
  72742. }
  72743. var buildForXStatement = function(op) {
  72744. return function(node) {
  72745. this.word("for");
  72746. this.space();
  72747. if (op === "of" && node.await) {
  72748. this.word("await");
  72749. this.space();
  72750. }
  72751. this.token("(");
  72752. this.print(node.left, node);
  72753. this.space();
  72754. this.word(op);
  72755. this.space();
  72756. this.print(node.right, node);
  72757. this.token(")");
  72758. this.printBlock(node);
  72759. };
  72760. };
  72761. var ForInStatement2 = buildForXStatement("in");
  72762. exports.ForInStatement = ForInStatement2;
  72763. var ForOfStatement = buildForXStatement("of");
  72764. exports.ForOfStatement = ForOfStatement;
  72765. function DoWhileStatement(node) {
  72766. this.word("do");
  72767. this.space();
  72768. this.print(node.body, node);
  72769. this.space();
  72770. this.word("while");
  72771. this.space();
  72772. this.token("(");
  72773. this.print(node.test, node);
  72774. this.token(")");
  72775. this.semicolon();
  72776. }
  72777. function buildLabelStatement(prefix, key = "label") {
  72778. return function(node) {
  72779. this.word(prefix);
  72780. const label = node[key];
  72781. if (label) {
  72782. this.space();
  72783. const isLabel = key == "label";
  72784. const terminatorState = this.startTerminatorless(isLabel);
  72785. this.print(label, node);
  72786. this.endTerminatorless(terminatorState);
  72787. }
  72788. this.semicolon();
  72789. };
  72790. }
  72791. var ContinueStatement = buildLabelStatement("continue");
  72792. exports.ContinueStatement = ContinueStatement;
  72793. var ReturnStatement = buildLabelStatement("return", "argument");
  72794. exports.ReturnStatement = ReturnStatement;
  72795. var BreakStatement = buildLabelStatement("break");
  72796. exports.BreakStatement = BreakStatement;
  72797. var ThrowStatement = buildLabelStatement("throw", "argument");
  72798. exports.ThrowStatement = ThrowStatement;
  72799. function LabeledStatement(node) {
  72800. this.print(node.label, node);
  72801. this.token(":");
  72802. this.space();
  72803. this.print(node.body, node);
  72804. }
  72805. function TryStatement(node) {
  72806. this.word("try");
  72807. this.space();
  72808. this.print(node.block, node);
  72809. this.space();
  72810. if (node.handlers) {
  72811. this.print(node.handlers[0], node);
  72812. } else {
  72813. this.print(node.handler, node);
  72814. }
  72815. if (node.finalizer) {
  72816. this.space();
  72817. this.word("finally");
  72818. this.space();
  72819. this.print(node.finalizer, node);
  72820. }
  72821. }
  72822. function CatchClause(node) {
  72823. this.word("catch");
  72824. this.space();
  72825. if (node.param) {
  72826. this.token("(");
  72827. this.print(node.param, node);
  72828. this.print(node.param.typeAnnotation, node);
  72829. this.token(")");
  72830. this.space();
  72831. }
  72832. this.print(node.body, node);
  72833. }
  72834. function SwitchStatement(node) {
  72835. this.word("switch");
  72836. this.space();
  72837. this.token("(");
  72838. this.print(node.discriminant, node);
  72839. this.token(")");
  72840. this.space();
  72841. this.token("{");
  72842. this.printSequence(node.cases, node, {
  72843. indent: true,
  72844. addNewlines(leading, cas) {
  72845. if (!leading && node.cases[node.cases.length - 1] === cas)
  72846. return -1;
  72847. }
  72848. });
  72849. this.token("}");
  72850. }
  72851. function SwitchCase(node) {
  72852. if (node.test) {
  72853. this.word("case");
  72854. this.space();
  72855. this.print(node.test, node);
  72856. this.token(":");
  72857. } else {
  72858. this.word("default");
  72859. this.token(":");
  72860. }
  72861. if (node.consequent.length) {
  72862. this.newline();
  72863. this.printSequence(node.consequent, node, {
  72864. indent: true
  72865. });
  72866. }
  72867. }
  72868. function DebuggerStatement() {
  72869. this.word("debugger");
  72870. this.semicolon();
  72871. }
  72872. function variableDeclarationIndent() {
  72873. this.token(",");
  72874. this.newline();
  72875. if (this.endsWith("\n"))
  72876. for (let i = 0; i < 4; i++)
  72877. this.space(true);
  72878. }
  72879. function constDeclarationIndent() {
  72880. this.token(",");
  72881. this.newline();
  72882. if (this.endsWith("\n"))
  72883. for (let i = 0; i < 6; i++)
  72884. this.space(true);
  72885. }
  72886. function VariableDeclaration(node, parent) {
  72887. if (node.declare) {
  72888. this.word("declare");
  72889. this.space();
  72890. }
  72891. this.word(node.kind);
  72892. this.space();
  72893. let hasInits = false;
  72894. if (!t2.isFor(parent)) {
  72895. for (const declar of node.declarations) {
  72896. if (declar.init) {
  72897. hasInits = true;
  72898. }
  72899. }
  72900. }
  72901. let separator;
  72902. if (hasInits) {
  72903. separator = node.kind === "const" ? constDeclarationIndent : variableDeclarationIndent;
  72904. }
  72905. this.printList(node.declarations, node, {
  72906. separator
  72907. });
  72908. if (t2.isFor(parent)) {
  72909. if (t2.isForStatement(parent)) {
  72910. if (parent.init === node)
  72911. return;
  72912. } else {
  72913. if (parent.left === node)
  72914. return;
  72915. }
  72916. }
  72917. this.semicolon();
  72918. }
  72919. function VariableDeclarator(node) {
  72920. this.print(node.id, node);
  72921. if (node.definite)
  72922. this.token("!");
  72923. this.print(node.id.typeAnnotation, node);
  72924. if (node.init) {
  72925. this.space();
  72926. this.token("=");
  72927. this.space();
  72928. this.print(node.init, node);
  72929. }
  72930. }
  72931. }
  72932. });
  72933. // node_modules/@babel/generator/lib/generators/classes.js
  72934. var require_classes2 = __commonJS({
  72935. "node_modules/@babel/generator/lib/generators/classes.js"(exports) {
  72936. "use strict";
  72937. Object.defineProperty(exports, "__esModule", {
  72938. value: true
  72939. });
  72940. exports.ClassExpression = exports.ClassDeclaration = ClassDeclaration;
  72941. exports.ClassBody = ClassBody;
  72942. exports.ClassProperty = ClassProperty;
  72943. exports.ClassPrivateProperty = ClassPrivateProperty;
  72944. exports.ClassMethod = ClassMethod;
  72945. exports.ClassPrivateMethod = ClassPrivateMethod;
  72946. exports._classMethodHead = _classMethodHead;
  72947. exports.StaticBlock = StaticBlock;
  72948. var t2 = require_lib2();
  72949. function ClassDeclaration(node, parent) {
  72950. if (!this.format.decoratorsBeforeExport || !t2.isExportDefaultDeclaration(parent) && !t2.isExportNamedDeclaration(parent)) {
  72951. this.printJoin(node.decorators, node);
  72952. }
  72953. if (node.declare) {
  72954. this.word("declare");
  72955. this.space();
  72956. }
  72957. if (node.abstract) {
  72958. this.word("abstract");
  72959. this.space();
  72960. }
  72961. this.word("class");
  72962. if (node.id) {
  72963. this.space();
  72964. this.print(node.id, node);
  72965. }
  72966. this.print(node.typeParameters, node);
  72967. if (node.superClass) {
  72968. this.space();
  72969. this.word("extends");
  72970. this.space();
  72971. this.print(node.superClass, node);
  72972. this.print(node.superTypeParameters, node);
  72973. }
  72974. if (node.implements) {
  72975. this.space();
  72976. this.word("implements");
  72977. this.space();
  72978. this.printList(node.implements, node);
  72979. }
  72980. this.space();
  72981. this.print(node.body, node);
  72982. }
  72983. function ClassBody(node) {
  72984. this.token("{");
  72985. this.printInnerComments(node);
  72986. if (node.body.length === 0) {
  72987. this.token("}");
  72988. } else {
  72989. this.newline();
  72990. this.indent();
  72991. this.printSequence(node.body, node);
  72992. this.dedent();
  72993. if (!this.endsWith("\n"))
  72994. this.newline();
  72995. this.rightBrace();
  72996. }
  72997. }
  72998. function ClassProperty(node) {
  72999. this.printJoin(node.decorators, node);
  73000. this.source("end", node.key.loc);
  73001. this.tsPrintClassMemberModifiers(node, true);
  73002. if (node.computed) {
  73003. this.token("[");
  73004. this.print(node.key, node);
  73005. this.token("]");
  73006. } else {
  73007. this._variance(node);
  73008. this.print(node.key, node);
  73009. }
  73010. if (node.optional) {
  73011. this.token("?");
  73012. }
  73013. if (node.definite) {
  73014. this.token("!");
  73015. }
  73016. this.print(node.typeAnnotation, node);
  73017. if (node.value) {
  73018. this.space();
  73019. this.token("=");
  73020. this.space();
  73021. this.print(node.value, node);
  73022. }
  73023. this.semicolon();
  73024. }
  73025. function ClassPrivateProperty(node) {
  73026. this.printJoin(node.decorators, node);
  73027. if (node.static) {
  73028. this.word("static");
  73029. this.space();
  73030. }
  73031. this.print(node.key, node);
  73032. this.print(node.typeAnnotation, node);
  73033. if (node.value) {
  73034. this.space();
  73035. this.token("=");
  73036. this.space();
  73037. this.print(node.value, node);
  73038. }
  73039. this.semicolon();
  73040. }
  73041. function ClassMethod(node) {
  73042. this._classMethodHead(node);
  73043. this.space();
  73044. this.print(node.body, node);
  73045. }
  73046. function ClassPrivateMethod(node) {
  73047. this._classMethodHead(node);
  73048. this.space();
  73049. this.print(node.body, node);
  73050. }
  73051. function _classMethodHead(node) {
  73052. this.printJoin(node.decorators, node);
  73053. this.source("end", node.key.loc);
  73054. this.tsPrintClassMemberModifiers(node, false);
  73055. this._methodHead(node);
  73056. }
  73057. function StaticBlock(node) {
  73058. this.word("static");
  73059. this.space();
  73060. this.token("{");
  73061. if (node.body.length === 0) {
  73062. this.token("}");
  73063. } else {
  73064. this.newline();
  73065. this.printSequence(node.body, node, {
  73066. indent: true
  73067. });
  73068. this.rightBrace();
  73069. }
  73070. }
  73071. }
  73072. });
  73073. // node_modules/@babel/generator/lib/generators/methods.js
  73074. var require_methods2 = __commonJS({
  73075. "node_modules/@babel/generator/lib/generators/methods.js"(exports) {
  73076. "use strict";
  73077. Object.defineProperty(exports, "__esModule", {
  73078. value: true
  73079. });
  73080. exports._params = _params;
  73081. exports._parameters = _parameters;
  73082. exports._param = _param;
  73083. exports._methodHead = _methodHead;
  73084. exports._predicate = _predicate;
  73085. exports._functionHead = _functionHead;
  73086. exports.FunctionDeclaration = exports.FunctionExpression = FunctionExpression;
  73087. exports.ArrowFunctionExpression = ArrowFunctionExpression;
  73088. var t2 = require_lib2();
  73089. function _params(node) {
  73090. this.print(node.typeParameters, node);
  73091. this.token("(");
  73092. this._parameters(node.params, node);
  73093. this.token(")");
  73094. this.print(node.returnType, node);
  73095. }
  73096. function _parameters(parameters, parent) {
  73097. for (let i = 0; i < parameters.length; i++) {
  73098. this._param(parameters[i], parent);
  73099. if (i < parameters.length - 1) {
  73100. this.token(",");
  73101. this.space();
  73102. }
  73103. }
  73104. }
  73105. function _param(parameter, parent) {
  73106. this.printJoin(parameter.decorators, parameter);
  73107. this.print(parameter, parent);
  73108. if (parameter.optional)
  73109. this.token("?");
  73110. this.print(parameter.typeAnnotation, parameter);
  73111. }
  73112. function _methodHead(node) {
  73113. const kind = node.kind;
  73114. const key = node.key;
  73115. if (kind === "get" || kind === "set") {
  73116. this.word(kind);
  73117. this.space();
  73118. }
  73119. if (node.async) {
  73120. this._catchUp("start", key.loc);
  73121. this.word("async");
  73122. this.space();
  73123. }
  73124. if (kind === "method" || kind === "init") {
  73125. if (node.generator) {
  73126. this.token("*");
  73127. }
  73128. }
  73129. if (node.computed) {
  73130. this.token("[");
  73131. this.print(key, node);
  73132. this.token("]");
  73133. } else {
  73134. this.print(key, node);
  73135. }
  73136. if (node.optional) {
  73137. this.token("?");
  73138. }
  73139. this._params(node);
  73140. }
  73141. function _predicate(node) {
  73142. if (node.predicate) {
  73143. if (!node.returnType) {
  73144. this.token(":");
  73145. }
  73146. this.space();
  73147. this.print(node.predicate, node);
  73148. }
  73149. }
  73150. function _functionHead(node) {
  73151. if (node.async) {
  73152. this.word("async");
  73153. this.space();
  73154. }
  73155. this.word("function");
  73156. if (node.generator)
  73157. this.token("*");
  73158. this.space();
  73159. if (node.id) {
  73160. this.print(node.id, node);
  73161. }
  73162. this._params(node);
  73163. this._predicate(node);
  73164. }
  73165. function FunctionExpression(node) {
  73166. this._functionHead(node);
  73167. this.space();
  73168. this.print(node.body, node);
  73169. }
  73170. function ArrowFunctionExpression(node) {
  73171. if (node.async) {
  73172. this.word("async");
  73173. this.space();
  73174. }
  73175. const firstParam = node.params[0];
  73176. if (!this.format.retainLines && !this.format.auxiliaryCommentBefore && !this.format.auxiliaryCommentAfter && node.params.length === 1 && t2.isIdentifier(firstParam) && !hasTypesOrComments(node, firstParam)) {
  73177. this.print(firstParam, node);
  73178. } else {
  73179. this._params(node);
  73180. }
  73181. this._predicate(node);
  73182. this.space();
  73183. this.token("=>");
  73184. this.space();
  73185. this.print(node.body, node);
  73186. }
  73187. function hasTypesOrComments(node, param) {
  73188. var _param$leadingComment, _param$trailingCommen;
  73189. return !!(node.typeParameters || node.returnType || node.predicate || param.typeAnnotation || param.optional || (_param$leadingComment = param.leadingComments) != null && _param$leadingComment.length || (_param$trailingCommen = param.trailingComments) != null && _param$trailingCommen.length);
  73190. }
  73191. }
  73192. });
  73193. // node_modules/@babel/generator/lib/generators/modules.js
  73194. var require_modules2 = __commonJS({
  73195. "node_modules/@babel/generator/lib/generators/modules.js"(exports) {
  73196. "use strict";
  73197. Object.defineProperty(exports, "__esModule", {
  73198. value: true
  73199. });
  73200. exports.ImportSpecifier = ImportSpecifier;
  73201. exports.ImportDefaultSpecifier = ImportDefaultSpecifier;
  73202. exports.ExportDefaultSpecifier = ExportDefaultSpecifier;
  73203. exports.ExportSpecifier = ExportSpecifier;
  73204. exports.ExportNamespaceSpecifier = ExportNamespaceSpecifier;
  73205. exports.ExportAllDeclaration = ExportAllDeclaration;
  73206. exports.ExportNamedDeclaration = ExportNamedDeclaration;
  73207. exports.ExportDefaultDeclaration = ExportDefaultDeclaration;
  73208. exports.ImportDeclaration = ImportDeclaration;
  73209. exports.ImportAttribute = ImportAttribute;
  73210. exports.ImportNamespaceSpecifier = ImportNamespaceSpecifier;
  73211. var t2 = require_lib2();
  73212. function ImportSpecifier(node) {
  73213. if (node.importKind === "type" || node.importKind === "typeof") {
  73214. this.word(node.importKind);
  73215. this.space();
  73216. }
  73217. this.print(node.imported, node);
  73218. if (node.local && node.local.name !== node.imported.name) {
  73219. this.space();
  73220. this.word("as");
  73221. this.space();
  73222. this.print(node.local, node);
  73223. }
  73224. }
  73225. function ImportDefaultSpecifier(node) {
  73226. this.print(node.local, node);
  73227. }
  73228. function ExportDefaultSpecifier(node) {
  73229. this.print(node.exported, node);
  73230. }
  73231. function ExportSpecifier(node) {
  73232. this.print(node.local, node);
  73233. if (node.exported && node.local.name !== node.exported.name) {
  73234. this.space();
  73235. this.word("as");
  73236. this.space();
  73237. this.print(node.exported, node);
  73238. }
  73239. }
  73240. function ExportNamespaceSpecifier(node) {
  73241. this.token("*");
  73242. this.space();
  73243. this.word("as");
  73244. this.space();
  73245. this.print(node.exported, node);
  73246. }
  73247. function ExportAllDeclaration(node) {
  73248. this.word("export");
  73249. this.space();
  73250. if (node.exportKind === "type") {
  73251. this.word("type");
  73252. this.space();
  73253. }
  73254. this.token("*");
  73255. this.space();
  73256. this.word("from");
  73257. this.space();
  73258. this.print(node.source, node);
  73259. this.printAssertions(node);
  73260. this.semicolon();
  73261. }
  73262. function ExportNamedDeclaration(node) {
  73263. if (this.format.decoratorsBeforeExport && t2.isClassDeclaration(node.declaration)) {
  73264. this.printJoin(node.declaration.decorators, node);
  73265. }
  73266. this.word("export");
  73267. this.space();
  73268. ExportDeclaration.apply(this, arguments);
  73269. }
  73270. function ExportDefaultDeclaration(node) {
  73271. if (this.format.decoratorsBeforeExport && t2.isClassDeclaration(node.declaration)) {
  73272. this.printJoin(node.declaration.decorators, node);
  73273. }
  73274. this.word("export");
  73275. this.space();
  73276. this.word("default");
  73277. this.space();
  73278. ExportDeclaration.apply(this, arguments);
  73279. }
  73280. function ExportDeclaration(node) {
  73281. if (node.declaration) {
  73282. const declar = node.declaration;
  73283. this.print(declar, node);
  73284. if (!t2.isStatement(declar))
  73285. this.semicolon();
  73286. } else {
  73287. if (node.exportKind === "type") {
  73288. this.word("type");
  73289. this.space();
  73290. }
  73291. const specifiers = node.specifiers.slice(0);
  73292. let hasSpecial = false;
  73293. for (; ; ) {
  73294. const first = specifiers[0];
  73295. if (t2.isExportDefaultSpecifier(first) || t2.isExportNamespaceSpecifier(first)) {
  73296. hasSpecial = true;
  73297. this.print(specifiers.shift(), node);
  73298. if (specifiers.length) {
  73299. this.token(",");
  73300. this.space();
  73301. }
  73302. } else {
  73303. break;
  73304. }
  73305. }
  73306. if (specifiers.length || !specifiers.length && !hasSpecial) {
  73307. this.token("{");
  73308. if (specifiers.length) {
  73309. this.space();
  73310. this.printList(specifiers, node);
  73311. this.space();
  73312. }
  73313. this.token("}");
  73314. }
  73315. if (node.source) {
  73316. this.space();
  73317. this.word("from");
  73318. this.space();
  73319. this.print(node.source, node);
  73320. this.printAssertions(node);
  73321. }
  73322. this.semicolon();
  73323. }
  73324. }
  73325. function ImportDeclaration(node) {
  73326. this.word("import");
  73327. this.space();
  73328. if (node.importKind === "type" || node.importKind === "typeof") {
  73329. this.word(node.importKind);
  73330. this.space();
  73331. }
  73332. const specifiers = node.specifiers.slice(0);
  73333. if (specifiers != null && specifiers.length) {
  73334. for (; ; ) {
  73335. const first = specifiers[0];
  73336. if (t2.isImportDefaultSpecifier(first) || t2.isImportNamespaceSpecifier(first)) {
  73337. this.print(specifiers.shift(), node);
  73338. if (specifiers.length) {
  73339. this.token(",");
  73340. this.space();
  73341. }
  73342. } else {
  73343. break;
  73344. }
  73345. }
  73346. if (specifiers.length) {
  73347. this.token("{");
  73348. this.space();
  73349. this.printList(specifiers, node);
  73350. this.space();
  73351. this.token("}");
  73352. }
  73353. this.space();
  73354. this.word("from");
  73355. this.space();
  73356. }
  73357. this.print(node.source, node);
  73358. this.printAssertions(node);
  73359. {
  73360. var _node$attributes;
  73361. if ((_node$attributes = node.attributes) != null && _node$attributes.length) {
  73362. this.space();
  73363. this.word("with");
  73364. this.space();
  73365. this.printList(node.attributes, node);
  73366. }
  73367. }
  73368. this.semicolon();
  73369. }
  73370. function ImportAttribute(node) {
  73371. this.print(node.key);
  73372. this.token(":");
  73373. this.space();
  73374. this.print(node.value);
  73375. }
  73376. function ImportNamespaceSpecifier(node) {
  73377. this.token("*");
  73378. this.space();
  73379. this.word("as");
  73380. this.space();
  73381. this.print(node.local, node);
  73382. }
  73383. }
  73384. });
  73385. // node_modules/@babel/generator/lib/generators/types.js
  73386. var require_types2 = __commonJS({
  73387. "node_modules/@babel/generator/lib/generators/types.js"(exports) {
  73388. "use strict";
  73389. Object.defineProperty(exports, "__esModule", {
  73390. value: true
  73391. });
  73392. exports.Identifier = Identifier;
  73393. exports.ArgumentPlaceholder = ArgumentPlaceholder;
  73394. exports.SpreadElement = exports.RestElement = RestElement2;
  73395. exports.ObjectPattern = exports.ObjectExpression = ObjectExpression;
  73396. exports.ObjectMethod = ObjectMethod;
  73397. exports.ObjectProperty = ObjectProperty;
  73398. exports.ArrayPattern = exports.ArrayExpression = ArrayExpression2;
  73399. exports.RecordExpression = RecordExpression;
  73400. exports.TupleExpression = TupleExpression;
  73401. exports.RegExpLiteral = RegExpLiteral;
  73402. exports.BooleanLiteral = BooleanLiteral;
  73403. exports.NullLiteral = NullLiteral;
  73404. exports.NumericLiteral = NumericLiteral;
  73405. exports.StringLiteral = StringLiteral;
  73406. exports.BigIntLiteral = BigIntLiteral;
  73407. exports.DecimalLiteral = DecimalLiteral;
  73408. exports.PipelineTopicExpression = PipelineTopicExpression;
  73409. exports.PipelineBareFunction = PipelineBareFunction;
  73410. exports.PipelinePrimaryTopicReference = PipelinePrimaryTopicReference;
  73411. var t2 = require_lib2();
  73412. var _jsesc = require_jsesc();
  73413. function Identifier(node) {
  73414. this.exactSource(node.loc, () => {
  73415. this.word(node.name);
  73416. });
  73417. }
  73418. function ArgumentPlaceholder() {
  73419. this.token("?");
  73420. }
  73421. function RestElement2(node) {
  73422. this.token("...");
  73423. this.print(node.argument, node);
  73424. }
  73425. function ObjectExpression(node) {
  73426. const props = node.properties;
  73427. this.token("{");
  73428. this.printInnerComments(node);
  73429. if (props.length) {
  73430. this.space();
  73431. this.printList(props, node, {
  73432. indent: true,
  73433. statement: true
  73434. });
  73435. this.space();
  73436. }
  73437. this.token("}");
  73438. }
  73439. function ObjectMethod(node) {
  73440. this.printJoin(node.decorators, node);
  73441. this._methodHead(node);
  73442. this.space();
  73443. this.print(node.body, node);
  73444. }
  73445. function ObjectProperty(node) {
  73446. this.printJoin(node.decorators, node);
  73447. if (node.computed) {
  73448. this.token("[");
  73449. this.print(node.key, node);
  73450. this.token("]");
  73451. } else {
  73452. if (t2.isAssignmentPattern(node.value) && t2.isIdentifier(node.key) && node.key.name === node.value.left.name) {
  73453. this.print(node.value, node);
  73454. return;
  73455. }
  73456. this.print(node.key, node);
  73457. if (node.shorthand && t2.isIdentifier(node.key) && t2.isIdentifier(node.value) && node.key.name === node.value.name) {
  73458. return;
  73459. }
  73460. }
  73461. this.token(":");
  73462. this.space();
  73463. this.print(node.value, node);
  73464. }
  73465. function ArrayExpression2(node) {
  73466. const elems = node.elements;
  73467. const len = elems.length;
  73468. this.token("[");
  73469. this.printInnerComments(node);
  73470. for (let i = 0; i < elems.length; i++) {
  73471. const elem = elems[i];
  73472. if (elem) {
  73473. if (i > 0)
  73474. this.space();
  73475. this.print(elem, node);
  73476. if (i < len - 1)
  73477. this.token(",");
  73478. } else {
  73479. this.token(",");
  73480. }
  73481. }
  73482. this.token("]");
  73483. }
  73484. function RecordExpression(node) {
  73485. const props = node.properties;
  73486. let startToken;
  73487. let endToken;
  73488. if (this.format.recordAndTupleSyntaxType === "bar") {
  73489. startToken = "{|";
  73490. endToken = "|}";
  73491. } else if (this.format.recordAndTupleSyntaxType === "hash") {
  73492. startToken = "#{";
  73493. endToken = "}";
  73494. } else {
  73495. throw new Error(`The "recordAndTupleSyntaxType" generator option must be "bar" or "hash" (${JSON.stringify(this.format.recordAndTupleSyntaxType)} received).`);
  73496. }
  73497. this.token(startToken);
  73498. this.printInnerComments(node);
  73499. if (props.length) {
  73500. this.space();
  73501. this.printList(props, node, {
  73502. indent: true,
  73503. statement: true
  73504. });
  73505. this.space();
  73506. }
  73507. this.token(endToken);
  73508. }
  73509. function TupleExpression(node) {
  73510. const elems = node.elements;
  73511. const len = elems.length;
  73512. let startToken;
  73513. let endToken;
  73514. if (this.format.recordAndTupleSyntaxType === "bar") {
  73515. startToken = "[|";
  73516. endToken = "|]";
  73517. } else if (this.format.recordAndTupleSyntaxType === "hash") {
  73518. startToken = "#[";
  73519. endToken = "]";
  73520. } else {
  73521. throw new Error(`${this.format.recordAndTupleSyntaxType} is not a valid recordAndTuple syntax type`);
  73522. }
  73523. this.token(startToken);
  73524. this.printInnerComments(node);
  73525. for (let i = 0; i < elems.length; i++) {
  73526. const elem = elems[i];
  73527. if (elem) {
  73528. if (i > 0)
  73529. this.space();
  73530. this.print(elem, node);
  73531. if (i < len - 1)
  73532. this.token(",");
  73533. }
  73534. }
  73535. this.token(endToken);
  73536. }
  73537. function RegExpLiteral(node) {
  73538. this.word(`/${node.pattern}/${node.flags}`);
  73539. }
  73540. function BooleanLiteral(node) {
  73541. this.word(node.value ? "true" : "false");
  73542. }
  73543. function NullLiteral() {
  73544. this.word("null");
  73545. }
  73546. function NumericLiteral(node) {
  73547. const raw = this.getPossibleRaw(node);
  73548. const opts = this.format.jsescOption;
  73549. const value = node.value + "";
  73550. if (opts.numbers) {
  73551. this.number(_jsesc(node.value, opts));
  73552. } else if (raw == null) {
  73553. this.number(value);
  73554. } else if (this.format.minified) {
  73555. this.number(raw.length < value.length ? raw : value);
  73556. } else {
  73557. this.number(raw);
  73558. }
  73559. }
  73560. function StringLiteral(node) {
  73561. const raw = this.getPossibleRaw(node);
  73562. if (!this.format.minified && raw != null) {
  73563. this.token(raw);
  73564. return;
  73565. }
  73566. const val = _jsesc(node.value, Object.assign(this.format.jsescOption, this.format.jsonCompatibleStrings && {
  73567. json: true
  73568. }));
  73569. return this.token(val);
  73570. }
  73571. function BigIntLiteral(node) {
  73572. const raw = this.getPossibleRaw(node);
  73573. if (!this.format.minified && raw != null) {
  73574. this.word(raw);
  73575. return;
  73576. }
  73577. this.word(node.value + "n");
  73578. }
  73579. function DecimalLiteral(node) {
  73580. const raw = this.getPossibleRaw(node);
  73581. if (!this.format.minified && raw != null) {
  73582. this.word(raw);
  73583. return;
  73584. }
  73585. this.word(node.value + "m");
  73586. }
  73587. function PipelineTopicExpression(node) {
  73588. this.print(node.expression, node);
  73589. }
  73590. function PipelineBareFunction(node) {
  73591. this.print(node.callee, node);
  73592. }
  73593. function PipelinePrimaryTopicReference() {
  73594. this.token("#");
  73595. }
  73596. }
  73597. });
  73598. // node_modules/@babel/generator/lib/generators/flow.js
  73599. var require_flow5 = __commonJS({
  73600. "node_modules/@babel/generator/lib/generators/flow.js"(exports) {
  73601. "use strict";
  73602. Object.defineProperty(exports, "__esModule", {
  73603. value: true
  73604. });
  73605. exports.AnyTypeAnnotation = AnyTypeAnnotation;
  73606. exports.ArrayTypeAnnotation = ArrayTypeAnnotation;
  73607. exports.BooleanTypeAnnotation = BooleanTypeAnnotation;
  73608. exports.BooleanLiteralTypeAnnotation = BooleanLiteralTypeAnnotation;
  73609. exports.NullLiteralTypeAnnotation = NullLiteralTypeAnnotation;
  73610. exports.DeclareClass = DeclareClass;
  73611. exports.DeclareFunction = DeclareFunction;
  73612. exports.InferredPredicate = InferredPredicate;
  73613. exports.DeclaredPredicate = DeclaredPredicate;
  73614. exports.DeclareInterface = DeclareInterface;
  73615. exports.DeclareModule = DeclareModule;
  73616. exports.DeclareModuleExports = DeclareModuleExports;
  73617. exports.DeclareTypeAlias = DeclareTypeAlias;
  73618. exports.DeclareOpaqueType = DeclareOpaqueType;
  73619. exports.DeclareVariable = DeclareVariable;
  73620. exports.DeclareExportDeclaration = DeclareExportDeclaration;
  73621. exports.DeclareExportAllDeclaration = DeclareExportAllDeclaration;
  73622. exports.EnumDeclaration = EnumDeclaration;
  73623. exports.EnumBooleanBody = EnumBooleanBody;
  73624. exports.EnumNumberBody = EnumNumberBody;
  73625. exports.EnumStringBody = EnumStringBody;
  73626. exports.EnumSymbolBody = EnumSymbolBody;
  73627. exports.EnumDefaultedMember = EnumDefaultedMember;
  73628. exports.EnumBooleanMember = EnumBooleanMember;
  73629. exports.EnumNumberMember = EnumNumberMember;
  73630. exports.EnumStringMember = EnumStringMember;
  73631. exports.ExistsTypeAnnotation = ExistsTypeAnnotation;
  73632. exports.FunctionTypeAnnotation = FunctionTypeAnnotation;
  73633. exports.FunctionTypeParam = FunctionTypeParam;
  73634. exports.GenericTypeAnnotation = exports.ClassImplements = exports.InterfaceExtends = InterfaceExtends;
  73635. exports._interfaceish = _interfaceish;
  73636. exports._variance = _variance;
  73637. exports.InterfaceDeclaration = InterfaceDeclaration;
  73638. exports.InterfaceTypeAnnotation = InterfaceTypeAnnotation;
  73639. exports.IntersectionTypeAnnotation = IntersectionTypeAnnotation;
  73640. exports.MixedTypeAnnotation = MixedTypeAnnotation;
  73641. exports.EmptyTypeAnnotation = EmptyTypeAnnotation;
  73642. exports.NullableTypeAnnotation = NullableTypeAnnotation;
  73643. exports.NumberTypeAnnotation = NumberTypeAnnotation;
  73644. exports.StringTypeAnnotation = StringTypeAnnotation;
  73645. exports.ThisTypeAnnotation = ThisTypeAnnotation;
  73646. exports.TupleTypeAnnotation = TupleTypeAnnotation;
  73647. exports.TypeofTypeAnnotation = TypeofTypeAnnotation;
  73648. exports.TypeAlias = TypeAlias;
  73649. exports.TypeAnnotation = TypeAnnotation;
  73650. exports.TypeParameterDeclaration = exports.TypeParameterInstantiation = TypeParameterInstantiation;
  73651. exports.TypeParameter = TypeParameter;
  73652. exports.OpaqueType = OpaqueType;
  73653. exports.ObjectTypeAnnotation = ObjectTypeAnnotation;
  73654. exports.ObjectTypeInternalSlot = ObjectTypeInternalSlot;
  73655. exports.ObjectTypeCallProperty = ObjectTypeCallProperty;
  73656. exports.ObjectTypeIndexer = ObjectTypeIndexer;
  73657. exports.ObjectTypeProperty = ObjectTypeProperty;
  73658. exports.ObjectTypeSpreadProperty = ObjectTypeSpreadProperty;
  73659. exports.QualifiedTypeIdentifier = QualifiedTypeIdentifier;
  73660. exports.SymbolTypeAnnotation = SymbolTypeAnnotation;
  73661. exports.UnionTypeAnnotation = UnionTypeAnnotation;
  73662. exports.TypeCastExpression = TypeCastExpression;
  73663. exports.Variance = Variance;
  73664. exports.VoidTypeAnnotation = VoidTypeAnnotation;
  73665. exports.IndexedAccessType = IndexedAccessType;
  73666. exports.OptionalIndexedAccessType = OptionalIndexedAccessType;
  73667. Object.defineProperty(exports, "NumberLiteralTypeAnnotation", {
  73668. enumerable: true,
  73669. get: function() {
  73670. return _types2.NumericLiteral;
  73671. }
  73672. });
  73673. Object.defineProperty(exports, "StringLiteralTypeAnnotation", {
  73674. enumerable: true,
  73675. get: function() {
  73676. return _types2.StringLiteral;
  73677. }
  73678. });
  73679. var t2 = require_lib2();
  73680. var _modules = require_modules2();
  73681. var _types2 = require_types2();
  73682. function AnyTypeAnnotation() {
  73683. this.word("any");
  73684. }
  73685. function ArrayTypeAnnotation(node) {
  73686. this.print(node.elementType, node);
  73687. this.token("[");
  73688. this.token("]");
  73689. }
  73690. function BooleanTypeAnnotation() {
  73691. this.word("boolean");
  73692. }
  73693. function BooleanLiteralTypeAnnotation(node) {
  73694. this.word(node.value ? "true" : "false");
  73695. }
  73696. function NullLiteralTypeAnnotation() {
  73697. this.word("null");
  73698. }
  73699. function DeclareClass(node, parent) {
  73700. if (!t2.isDeclareExportDeclaration(parent)) {
  73701. this.word("declare");
  73702. this.space();
  73703. }
  73704. this.word("class");
  73705. this.space();
  73706. this._interfaceish(node);
  73707. }
  73708. function DeclareFunction(node, parent) {
  73709. if (!t2.isDeclareExportDeclaration(parent)) {
  73710. this.word("declare");
  73711. this.space();
  73712. }
  73713. this.word("function");
  73714. this.space();
  73715. this.print(node.id, node);
  73716. this.print(node.id.typeAnnotation.typeAnnotation, node);
  73717. if (node.predicate) {
  73718. this.space();
  73719. this.print(node.predicate, node);
  73720. }
  73721. this.semicolon();
  73722. }
  73723. function InferredPredicate() {
  73724. this.token("%");
  73725. this.word("checks");
  73726. }
  73727. function DeclaredPredicate(node) {
  73728. this.token("%");
  73729. this.word("checks");
  73730. this.token("(");
  73731. this.print(node.value, node);
  73732. this.token(")");
  73733. }
  73734. function DeclareInterface(node) {
  73735. this.word("declare");
  73736. this.space();
  73737. this.InterfaceDeclaration(node);
  73738. }
  73739. function DeclareModule(node) {
  73740. this.word("declare");
  73741. this.space();
  73742. this.word("module");
  73743. this.space();
  73744. this.print(node.id, node);
  73745. this.space();
  73746. this.print(node.body, node);
  73747. }
  73748. function DeclareModuleExports(node) {
  73749. this.word("declare");
  73750. this.space();
  73751. this.word("module");
  73752. this.token(".");
  73753. this.word("exports");
  73754. this.print(node.typeAnnotation, node);
  73755. }
  73756. function DeclareTypeAlias(node) {
  73757. this.word("declare");
  73758. this.space();
  73759. this.TypeAlias(node);
  73760. }
  73761. function DeclareOpaqueType(node, parent) {
  73762. if (!t2.isDeclareExportDeclaration(parent)) {
  73763. this.word("declare");
  73764. this.space();
  73765. }
  73766. this.OpaqueType(node);
  73767. }
  73768. function DeclareVariable(node, parent) {
  73769. if (!t2.isDeclareExportDeclaration(parent)) {
  73770. this.word("declare");
  73771. this.space();
  73772. }
  73773. this.word("var");
  73774. this.space();
  73775. this.print(node.id, node);
  73776. this.print(node.id.typeAnnotation, node);
  73777. this.semicolon();
  73778. }
  73779. function DeclareExportDeclaration(node) {
  73780. this.word("declare");
  73781. this.space();
  73782. this.word("export");
  73783. this.space();
  73784. if (node.default) {
  73785. this.word("default");
  73786. this.space();
  73787. }
  73788. FlowExportDeclaration.apply(this, arguments);
  73789. }
  73790. function DeclareExportAllDeclaration() {
  73791. this.word("declare");
  73792. this.space();
  73793. _modules.ExportAllDeclaration.apply(this, arguments);
  73794. }
  73795. function EnumDeclaration(node) {
  73796. const {
  73797. id,
  73798. body
  73799. } = node;
  73800. this.word("enum");
  73801. this.space();
  73802. this.print(id, node);
  73803. this.print(body, node);
  73804. }
  73805. function enumExplicitType(context, name2, hasExplicitType) {
  73806. if (hasExplicitType) {
  73807. context.space();
  73808. context.word("of");
  73809. context.space();
  73810. context.word(name2);
  73811. }
  73812. context.space();
  73813. }
  73814. function enumBody(context, node) {
  73815. const {
  73816. members
  73817. } = node;
  73818. context.token("{");
  73819. context.indent();
  73820. context.newline();
  73821. for (const member of members) {
  73822. context.print(member, node);
  73823. context.newline();
  73824. }
  73825. if (node.hasUnknownMembers) {
  73826. context.token("...");
  73827. context.newline();
  73828. }
  73829. context.dedent();
  73830. context.token("}");
  73831. }
  73832. function EnumBooleanBody(node) {
  73833. const {
  73834. explicitType
  73835. } = node;
  73836. enumExplicitType(this, "boolean", explicitType);
  73837. enumBody(this, node);
  73838. }
  73839. function EnumNumberBody(node) {
  73840. const {
  73841. explicitType
  73842. } = node;
  73843. enumExplicitType(this, "number", explicitType);
  73844. enumBody(this, node);
  73845. }
  73846. function EnumStringBody(node) {
  73847. const {
  73848. explicitType
  73849. } = node;
  73850. enumExplicitType(this, "string", explicitType);
  73851. enumBody(this, node);
  73852. }
  73853. function EnumSymbolBody(node) {
  73854. enumExplicitType(this, "symbol", true);
  73855. enumBody(this, node);
  73856. }
  73857. function EnumDefaultedMember(node) {
  73858. const {
  73859. id
  73860. } = node;
  73861. this.print(id, node);
  73862. this.token(",");
  73863. }
  73864. function enumInitializedMember(context, node) {
  73865. const {
  73866. id,
  73867. init
  73868. } = node;
  73869. context.print(id, node);
  73870. context.space();
  73871. context.token("=");
  73872. context.space();
  73873. context.print(init, node);
  73874. context.token(",");
  73875. }
  73876. function EnumBooleanMember(node) {
  73877. enumInitializedMember(this, node);
  73878. }
  73879. function EnumNumberMember(node) {
  73880. enumInitializedMember(this, node);
  73881. }
  73882. function EnumStringMember(node) {
  73883. enumInitializedMember(this, node);
  73884. }
  73885. function FlowExportDeclaration(node) {
  73886. if (node.declaration) {
  73887. const declar = node.declaration;
  73888. this.print(declar, node);
  73889. if (!t2.isStatement(declar))
  73890. this.semicolon();
  73891. } else {
  73892. this.token("{");
  73893. if (node.specifiers.length) {
  73894. this.space();
  73895. this.printList(node.specifiers, node);
  73896. this.space();
  73897. }
  73898. this.token("}");
  73899. if (node.source) {
  73900. this.space();
  73901. this.word("from");
  73902. this.space();
  73903. this.print(node.source, node);
  73904. }
  73905. this.semicolon();
  73906. }
  73907. }
  73908. function ExistsTypeAnnotation() {
  73909. this.token("*");
  73910. }
  73911. function FunctionTypeAnnotation(node, parent) {
  73912. this.print(node.typeParameters, node);
  73913. this.token("(");
  73914. if (node.this) {
  73915. this.word("this");
  73916. this.token(":");
  73917. this.space();
  73918. this.print(node.this.typeAnnotation, node);
  73919. if (node.params.length || node.rest) {
  73920. this.token(",");
  73921. this.space();
  73922. }
  73923. }
  73924. this.printList(node.params, node);
  73925. if (node.rest) {
  73926. if (node.params.length) {
  73927. this.token(",");
  73928. this.space();
  73929. }
  73930. this.token("...");
  73931. this.print(node.rest, node);
  73932. }
  73933. this.token(")");
  73934. if (parent.type === "ObjectTypeCallProperty" || parent.type === "DeclareFunction" || parent.type === "ObjectTypeProperty" && parent.method) {
  73935. this.token(":");
  73936. } else {
  73937. this.space();
  73938. this.token("=>");
  73939. }
  73940. this.space();
  73941. this.print(node.returnType, node);
  73942. }
  73943. function FunctionTypeParam(node) {
  73944. this.print(node.name, node);
  73945. if (node.optional)
  73946. this.token("?");
  73947. if (node.name) {
  73948. this.token(":");
  73949. this.space();
  73950. }
  73951. this.print(node.typeAnnotation, node);
  73952. }
  73953. function InterfaceExtends(node) {
  73954. this.print(node.id, node);
  73955. this.print(node.typeParameters, node);
  73956. }
  73957. function _interfaceish(node) {
  73958. var _node$extends;
  73959. this.print(node.id, node);
  73960. this.print(node.typeParameters, node);
  73961. if ((_node$extends = node.extends) != null && _node$extends.length) {
  73962. this.space();
  73963. this.word("extends");
  73964. this.space();
  73965. this.printList(node.extends, node);
  73966. }
  73967. if (node.mixins && node.mixins.length) {
  73968. this.space();
  73969. this.word("mixins");
  73970. this.space();
  73971. this.printList(node.mixins, node);
  73972. }
  73973. if (node.implements && node.implements.length) {
  73974. this.space();
  73975. this.word("implements");
  73976. this.space();
  73977. this.printList(node.implements, node);
  73978. }
  73979. this.space();
  73980. this.print(node.body, node);
  73981. }
  73982. function _variance(node) {
  73983. if (node.variance) {
  73984. if (node.variance.kind === "plus") {
  73985. this.token("+");
  73986. } else if (node.variance.kind === "minus") {
  73987. this.token("-");
  73988. }
  73989. }
  73990. }
  73991. function InterfaceDeclaration(node) {
  73992. this.word("interface");
  73993. this.space();
  73994. this._interfaceish(node);
  73995. }
  73996. function andSeparator() {
  73997. this.space();
  73998. this.token("&");
  73999. this.space();
  74000. }
  74001. function InterfaceTypeAnnotation(node) {
  74002. this.word("interface");
  74003. if (node.extends && node.extends.length) {
  74004. this.space();
  74005. this.word("extends");
  74006. this.space();
  74007. this.printList(node.extends, node);
  74008. }
  74009. this.space();
  74010. this.print(node.body, node);
  74011. }
  74012. function IntersectionTypeAnnotation(node) {
  74013. this.printJoin(node.types, node, {
  74014. separator: andSeparator
  74015. });
  74016. }
  74017. function MixedTypeAnnotation() {
  74018. this.word("mixed");
  74019. }
  74020. function EmptyTypeAnnotation() {
  74021. this.word("empty");
  74022. }
  74023. function NullableTypeAnnotation(node) {
  74024. this.token("?");
  74025. this.print(node.typeAnnotation, node);
  74026. }
  74027. function NumberTypeAnnotation() {
  74028. this.word("number");
  74029. }
  74030. function StringTypeAnnotation() {
  74031. this.word("string");
  74032. }
  74033. function ThisTypeAnnotation() {
  74034. this.word("this");
  74035. }
  74036. function TupleTypeAnnotation(node) {
  74037. this.token("[");
  74038. this.printList(node.types, node);
  74039. this.token("]");
  74040. }
  74041. function TypeofTypeAnnotation(node) {
  74042. this.word("typeof");
  74043. this.space();
  74044. this.print(node.argument, node);
  74045. }
  74046. function TypeAlias(node) {
  74047. this.word("type");
  74048. this.space();
  74049. this.print(node.id, node);
  74050. this.print(node.typeParameters, node);
  74051. this.space();
  74052. this.token("=");
  74053. this.space();
  74054. this.print(node.right, node);
  74055. this.semicolon();
  74056. }
  74057. function TypeAnnotation(node) {
  74058. this.token(":");
  74059. this.space();
  74060. if (node.optional)
  74061. this.token("?");
  74062. this.print(node.typeAnnotation, node);
  74063. }
  74064. function TypeParameterInstantiation(node) {
  74065. this.token("<");
  74066. this.printList(node.params, node, {});
  74067. this.token(">");
  74068. }
  74069. function TypeParameter(node) {
  74070. this._variance(node);
  74071. this.word(node.name);
  74072. if (node.bound) {
  74073. this.print(node.bound, node);
  74074. }
  74075. if (node.default) {
  74076. this.space();
  74077. this.token("=");
  74078. this.space();
  74079. this.print(node.default, node);
  74080. }
  74081. }
  74082. function OpaqueType(node) {
  74083. this.word("opaque");
  74084. this.space();
  74085. this.word("type");
  74086. this.space();
  74087. this.print(node.id, node);
  74088. this.print(node.typeParameters, node);
  74089. if (node.supertype) {
  74090. this.token(":");
  74091. this.space();
  74092. this.print(node.supertype, node);
  74093. }
  74094. if (node.impltype) {
  74095. this.space();
  74096. this.token("=");
  74097. this.space();
  74098. this.print(node.impltype, node);
  74099. }
  74100. this.semicolon();
  74101. }
  74102. function ObjectTypeAnnotation(node) {
  74103. if (node.exact) {
  74104. this.token("{|");
  74105. } else {
  74106. this.token("{");
  74107. }
  74108. const props = [...node.properties, ...node.callProperties || [], ...node.indexers || [], ...node.internalSlots || []];
  74109. if (props.length) {
  74110. this.space();
  74111. this.printJoin(props, node, {
  74112. addNewlines(leading) {
  74113. if (leading && !props[0])
  74114. return 1;
  74115. },
  74116. indent: true,
  74117. statement: true,
  74118. iterator: () => {
  74119. if (props.length !== 1 || node.inexact) {
  74120. this.token(",");
  74121. this.space();
  74122. }
  74123. }
  74124. });
  74125. this.space();
  74126. }
  74127. if (node.inexact) {
  74128. this.indent();
  74129. this.token("...");
  74130. if (props.length) {
  74131. this.newline();
  74132. }
  74133. this.dedent();
  74134. }
  74135. if (node.exact) {
  74136. this.token("|}");
  74137. } else {
  74138. this.token("}");
  74139. }
  74140. }
  74141. function ObjectTypeInternalSlot(node) {
  74142. if (node.static) {
  74143. this.word("static");
  74144. this.space();
  74145. }
  74146. this.token("[");
  74147. this.token("[");
  74148. this.print(node.id, node);
  74149. this.token("]");
  74150. this.token("]");
  74151. if (node.optional)
  74152. this.token("?");
  74153. if (!node.method) {
  74154. this.token(":");
  74155. this.space();
  74156. }
  74157. this.print(node.value, node);
  74158. }
  74159. function ObjectTypeCallProperty(node) {
  74160. if (node.static) {
  74161. this.word("static");
  74162. this.space();
  74163. }
  74164. this.print(node.value, node);
  74165. }
  74166. function ObjectTypeIndexer(node) {
  74167. if (node.static) {
  74168. this.word("static");
  74169. this.space();
  74170. }
  74171. this._variance(node);
  74172. this.token("[");
  74173. if (node.id) {
  74174. this.print(node.id, node);
  74175. this.token(":");
  74176. this.space();
  74177. }
  74178. this.print(node.key, node);
  74179. this.token("]");
  74180. this.token(":");
  74181. this.space();
  74182. this.print(node.value, node);
  74183. }
  74184. function ObjectTypeProperty(node) {
  74185. if (node.proto) {
  74186. this.word("proto");
  74187. this.space();
  74188. }
  74189. if (node.static) {
  74190. this.word("static");
  74191. this.space();
  74192. }
  74193. if (node.kind === "get" || node.kind === "set") {
  74194. this.word(node.kind);
  74195. this.space();
  74196. }
  74197. this._variance(node);
  74198. this.print(node.key, node);
  74199. if (node.optional)
  74200. this.token("?");
  74201. if (!node.method) {
  74202. this.token(":");
  74203. this.space();
  74204. }
  74205. this.print(node.value, node);
  74206. }
  74207. function ObjectTypeSpreadProperty(node) {
  74208. this.token("...");
  74209. this.print(node.argument, node);
  74210. }
  74211. function QualifiedTypeIdentifier(node) {
  74212. this.print(node.qualification, node);
  74213. this.token(".");
  74214. this.print(node.id, node);
  74215. }
  74216. function SymbolTypeAnnotation() {
  74217. this.word("symbol");
  74218. }
  74219. function orSeparator() {
  74220. this.space();
  74221. this.token("|");
  74222. this.space();
  74223. }
  74224. function UnionTypeAnnotation(node) {
  74225. this.printJoin(node.types, node, {
  74226. separator: orSeparator
  74227. });
  74228. }
  74229. function TypeCastExpression(node) {
  74230. this.token("(");
  74231. this.print(node.expression, node);
  74232. this.print(node.typeAnnotation, node);
  74233. this.token(")");
  74234. }
  74235. function Variance(node) {
  74236. if (node.kind === "plus") {
  74237. this.token("+");
  74238. } else {
  74239. this.token("-");
  74240. }
  74241. }
  74242. function VoidTypeAnnotation() {
  74243. this.word("void");
  74244. }
  74245. function IndexedAccessType(node) {
  74246. this.print(node.objectType, node);
  74247. this.token("[");
  74248. this.print(node.indexType, node);
  74249. this.token("]");
  74250. }
  74251. function OptionalIndexedAccessType(node) {
  74252. this.print(node.objectType, node);
  74253. if (node.optional) {
  74254. this.token("?.");
  74255. }
  74256. this.token("[");
  74257. this.print(node.indexType, node);
  74258. this.token("]");
  74259. }
  74260. }
  74261. });
  74262. // node_modules/@babel/generator/lib/generators/base.js
  74263. var require_base2 = __commonJS({
  74264. "node_modules/@babel/generator/lib/generators/base.js"(exports) {
  74265. "use strict";
  74266. Object.defineProperty(exports, "__esModule", {
  74267. value: true
  74268. });
  74269. exports.File = File;
  74270. exports.Program = Program;
  74271. exports.BlockStatement = BlockStatement2;
  74272. exports.Directive = Directive;
  74273. exports.DirectiveLiteral = DirectiveLiteral;
  74274. exports.InterpreterDirective = InterpreterDirective;
  74275. exports.Placeholder = Placeholder;
  74276. var t2 = require_lib2();
  74277. function File(node) {
  74278. if (node.program) {
  74279. this.print(node.program.interpreter, node);
  74280. }
  74281. this.print(node.program, node);
  74282. }
  74283. function Program(node) {
  74284. this.printInnerComments(node, false);
  74285. this.printSequence(node.directives, node);
  74286. if (node.directives && node.directives.length)
  74287. this.newline();
  74288. this.printSequence(node.body, node);
  74289. }
  74290. function BlockStatement2(node) {
  74291. var _node$directives;
  74292. this.token("{");
  74293. this.printInnerComments(node);
  74294. const hasDirectives = (_node$directives = node.directives) == null ? void 0 : _node$directives.length;
  74295. if (node.body.length || hasDirectives) {
  74296. this.newline();
  74297. this.printSequence(node.directives, node, {
  74298. indent: true
  74299. });
  74300. if (hasDirectives)
  74301. this.newline();
  74302. this.printSequence(node.body, node, {
  74303. indent: true
  74304. });
  74305. this.removeTrailingNewline();
  74306. this.source("end", node.loc);
  74307. if (!this.endsWith("\n"))
  74308. this.newline();
  74309. this.rightBrace();
  74310. } else {
  74311. this.source("end", node.loc);
  74312. this.token("}");
  74313. }
  74314. }
  74315. function Directive(node) {
  74316. this.print(node.value, node);
  74317. this.semicolon();
  74318. }
  74319. var unescapedSingleQuoteRE = /(?:^|[^\\])(?:\\\\)*'/;
  74320. var unescapedDoubleQuoteRE = /(?:^|[^\\])(?:\\\\)*"/;
  74321. function DirectiveLiteral(node) {
  74322. const raw = this.getPossibleRaw(node);
  74323. if (raw != null) {
  74324. this.token(raw);
  74325. return;
  74326. }
  74327. const {
  74328. value
  74329. } = node;
  74330. if (!unescapedDoubleQuoteRE.test(value)) {
  74331. this.token(`"${value}"`);
  74332. } else if (!unescapedSingleQuoteRE.test(value)) {
  74333. this.token(`'${value}'`);
  74334. } else {
  74335. throw new Error("Malformed AST: it is not possible to print a directive containing both unescaped single and double quotes.");
  74336. }
  74337. }
  74338. function InterpreterDirective(node) {
  74339. this.token(`#!${node.value}
  74340. `);
  74341. }
  74342. function Placeholder(node) {
  74343. this.token("%%");
  74344. this.print(node.name);
  74345. this.token("%%");
  74346. if (node.expectedNode === "Statement") {
  74347. this.semicolon();
  74348. }
  74349. }
  74350. }
  74351. });
  74352. // node_modules/@babel/generator/lib/generators/jsx.js
  74353. var require_jsx5 = __commonJS({
  74354. "node_modules/@babel/generator/lib/generators/jsx.js"(exports) {
  74355. "use strict";
  74356. Object.defineProperty(exports, "__esModule", {
  74357. value: true
  74358. });
  74359. exports.JSXAttribute = JSXAttribute2;
  74360. exports.JSXIdentifier = JSXIdentifier2;
  74361. exports.JSXNamespacedName = JSXNamespacedName2;
  74362. exports.JSXMemberExpression = JSXMemberExpression2;
  74363. exports.JSXSpreadAttribute = JSXSpreadAttribute2;
  74364. exports.JSXExpressionContainer = JSXExpressionContainer2;
  74365. exports.JSXSpreadChild = JSXSpreadChild;
  74366. exports.JSXText = JSXText2;
  74367. exports.JSXElement = JSXElement2;
  74368. exports.JSXOpeningElement = JSXOpeningElement2;
  74369. exports.JSXClosingElement = JSXClosingElement2;
  74370. exports.JSXEmptyExpression = JSXEmptyExpression2;
  74371. exports.JSXFragment = JSXFragment2;
  74372. exports.JSXOpeningFragment = JSXOpeningFragment2;
  74373. exports.JSXClosingFragment = JSXClosingFragment2;
  74374. var t2 = require_lib2();
  74375. function JSXAttribute2(node) {
  74376. this.print(node.name, node);
  74377. if (node.value) {
  74378. this.token("=");
  74379. this.print(node.value, node);
  74380. }
  74381. }
  74382. function JSXIdentifier2(node) {
  74383. this.word(node.name);
  74384. }
  74385. function JSXNamespacedName2(node) {
  74386. this.print(node.namespace, node);
  74387. this.token(":");
  74388. this.print(node.name, node);
  74389. }
  74390. function JSXMemberExpression2(node) {
  74391. this.print(node.object, node);
  74392. this.token(".");
  74393. this.print(node.property, node);
  74394. }
  74395. function JSXSpreadAttribute2(node) {
  74396. this.token("{");
  74397. this.token("...");
  74398. this.print(node.argument, node);
  74399. this.token("}");
  74400. }
  74401. function JSXExpressionContainer2(node) {
  74402. this.token("{");
  74403. this.print(node.expression, node);
  74404. this.token("}");
  74405. }
  74406. function JSXSpreadChild(node) {
  74407. this.token("{");
  74408. this.token("...");
  74409. this.print(node.expression, node);
  74410. this.token("}");
  74411. }
  74412. function JSXText2(node) {
  74413. const raw = this.getPossibleRaw(node);
  74414. if (raw != null) {
  74415. this.token(raw);
  74416. } else {
  74417. this.token(node.value);
  74418. }
  74419. }
  74420. function JSXElement2(node) {
  74421. const open = node.openingElement;
  74422. this.print(open, node);
  74423. if (open.selfClosing)
  74424. return;
  74425. this.indent();
  74426. for (const child of node.children) {
  74427. this.print(child, node);
  74428. }
  74429. this.dedent();
  74430. this.print(node.closingElement, node);
  74431. }
  74432. function spaceSeparator() {
  74433. this.space();
  74434. }
  74435. function JSXOpeningElement2(node) {
  74436. this.token("<");
  74437. this.print(node.name, node);
  74438. this.print(node.typeParameters, node);
  74439. if (node.attributes.length > 0) {
  74440. this.space();
  74441. this.printJoin(node.attributes, node, {
  74442. separator: spaceSeparator
  74443. });
  74444. }
  74445. if (node.selfClosing) {
  74446. this.space();
  74447. this.token("/>");
  74448. } else {
  74449. this.token(">");
  74450. }
  74451. }
  74452. function JSXClosingElement2(node) {
  74453. this.token("</");
  74454. this.print(node.name, node);
  74455. this.token(">");
  74456. }
  74457. function JSXEmptyExpression2(node) {
  74458. this.printInnerComments(node);
  74459. }
  74460. function JSXFragment2(node) {
  74461. this.print(node.openingFragment, node);
  74462. this.indent();
  74463. for (const child of node.children) {
  74464. this.print(child, node);
  74465. }
  74466. this.dedent();
  74467. this.print(node.closingFragment, node);
  74468. }
  74469. function JSXOpeningFragment2() {
  74470. this.token("<");
  74471. this.token(">");
  74472. }
  74473. function JSXClosingFragment2() {
  74474. this.token("</");
  74475. this.token(">");
  74476. }
  74477. }
  74478. });
  74479. // node_modules/@babel/generator/lib/generators/typescript.js
  74480. var require_typescript5 = __commonJS({
  74481. "node_modules/@babel/generator/lib/generators/typescript.js"(exports) {
  74482. "use strict";
  74483. Object.defineProperty(exports, "__esModule", {
  74484. value: true
  74485. });
  74486. exports.TSTypeAnnotation = TSTypeAnnotation;
  74487. exports.TSTypeParameterDeclaration = exports.TSTypeParameterInstantiation = TSTypeParameterInstantiation;
  74488. exports.TSTypeParameter = TSTypeParameter;
  74489. exports.TSParameterProperty = TSParameterProperty;
  74490. exports.TSDeclareFunction = TSDeclareFunction;
  74491. exports.TSDeclareMethod = TSDeclareMethod;
  74492. exports.TSQualifiedName = TSQualifiedName;
  74493. exports.TSCallSignatureDeclaration = TSCallSignatureDeclaration;
  74494. exports.TSConstructSignatureDeclaration = TSConstructSignatureDeclaration;
  74495. exports.TSPropertySignature = TSPropertySignature;
  74496. exports.tsPrintPropertyOrMethodName = tsPrintPropertyOrMethodName;
  74497. exports.TSMethodSignature = TSMethodSignature;
  74498. exports.TSIndexSignature = TSIndexSignature;
  74499. exports.TSAnyKeyword = TSAnyKeyword;
  74500. exports.TSBigIntKeyword = TSBigIntKeyword;
  74501. exports.TSUnknownKeyword = TSUnknownKeyword;
  74502. exports.TSNumberKeyword = TSNumberKeyword;
  74503. exports.TSObjectKeyword = TSObjectKeyword;
  74504. exports.TSBooleanKeyword = TSBooleanKeyword;
  74505. exports.TSStringKeyword = TSStringKeyword;
  74506. exports.TSSymbolKeyword = TSSymbolKeyword;
  74507. exports.TSVoidKeyword = TSVoidKeyword;
  74508. exports.TSUndefinedKeyword = TSUndefinedKeyword;
  74509. exports.TSNullKeyword = TSNullKeyword;
  74510. exports.TSNeverKeyword = TSNeverKeyword;
  74511. exports.TSIntrinsicKeyword = TSIntrinsicKeyword;
  74512. exports.TSThisType = TSThisType;
  74513. exports.TSFunctionType = TSFunctionType;
  74514. exports.TSConstructorType = TSConstructorType;
  74515. exports.tsPrintFunctionOrConstructorType = tsPrintFunctionOrConstructorType;
  74516. exports.TSTypeReference = TSTypeReference;
  74517. exports.TSTypePredicate = TSTypePredicate;
  74518. exports.TSTypeQuery = TSTypeQuery;
  74519. exports.TSTypeLiteral = TSTypeLiteral;
  74520. exports.tsPrintTypeLiteralOrInterfaceBody = tsPrintTypeLiteralOrInterfaceBody;
  74521. exports.tsPrintBraced = tsPrintBraced;
  74522. exports.TSArrayType = TSArrayType;
  74523. exports.TSTupleType = TSTupleType;
  74524. exports.TSOptionalType = TSOptionalType;
  74525. exports.TSRestType = TSRestType;
  74526. exports.TSNamedTupleMember = TSNamedTupleMember;
  74527. exports.TSUnionType = TSUnionType;
  74528. exports.TSIntersectionType = TSIntersectionType;
  74529. exports.tsPrintUnionOrIntersectionType = tsPrintUnionOrIntersectionType;
  74530. exports.TSConditionalType = TSConditionalType;
  74531. exports.TSInferType = TSInferType;
  74532. exports.TSParenthesizedType = TSParenthesizedType;
  74533. exports.TSTypeOperator = TSTypeOperator;
  74534. exports.TSIndexedAccessType = TSIndexedAccessType;
  74535. exports.TSMappedType = TSMappedType;
  74536. exports.TSLiteralType = TSLiteralType;
  74537. exports.TSExpressionWithTypeArguments = TSExpressionWithTypeArguments;
  74538. exports.TSInterfaceDeclaration = TSInterfaceDeclaration;
  74539. exports.TSInterfaceBody = TSInterfaceBody;
  74540. exports.TSTypeAliasDeclaration = TSTypeAliasDeclaration;
  74541. exports.TSAsExpression = TSAsExpression;
  74542. exports.TSTypeAssertion = TSTypeAssertion;
  74543. exports.TSEnumDeclaration = TSEnumDeclaration;
  74544. exports.TSEnumMember = TSEnumMember;
  74545. exports.TSModuleDeclaration = TSModuleDeclaration;
  74546. exports.TSModuleBlock = TSModuleBlock;
  74547. exports.TSImportType = TSImportType;
  74548. exports.TSImportEqualsDeclaration = TSImportEqualsDeclaration;
  74549. exports.TSExternalModuleReference = TSExternalModuleReference;
  74550. exports.TSNonNullExpression = TSNonNullExpression;
  74551. exports.TSExportAssignment = TSExportAssignment;
  74552. exports.TSNamespaceExportDeclaration = TSNamespaceExportDeclaration;
  74553. exports.tsPrintSignatureDeclarationBase = tsPrintSignatureDeclarationBase;
  74554. exports.tsPrintClassMemberModifiers = tsPrintClassMemberModifiers;
  74555. var t2 = require_lib2();
  74556. function TSTypeAnnotation(node) {
  74557. this.token(":");
  74558. this.space();
  74559. if (node.optional)
  74560. this.token("?");
  74561. this.print(node.typeAnnotation, node);
  74562. }
  74563. function TSTypeParameterInstantiation(node) {
  74564. this.token("<");
  74565. this.printList(node.params, node, {});
  74566. this.token(">");
  74567. }
  74568. function TSTypeParameter(node) {
  74569. this.word(node.name);
  74570. if (node.constraint) {
  74571. this.space();
  74572. this.word("extends");
  74573. this.space();
  74574. this.print(node.constraint, node);
  74575. }
  74576. if (node.default) {
  74577. this.space();
  74578. this.token("=");
  74579. this.space();
  74580. this.print(node.default, node);
  74581. }
  74582. }
  74583. function TSParameterProperty(node) {
  74584. if (node.accessibility) {
  74585. this.word(node.accessibility);
  74586. this.space();
  74587. }
  74588. if (node.readonly) {
  74589. this.word("readonly");
  74590. this.space();
  74591. }
  74592. this._param(node.parameter);
  74593. }
  74594. function TSDeclareFunction(node) {
  74595. if (node.declare) {
  74596. this.word("declare");
  74597. this.space();
  74598. }
  74599. this._functionHead(node);
  74600. this.token(";");
  74601. }
  74602. function TSDeclareMethod(node) {
  74603. this._classMethodHead(node);
  74604. this.token(";");
  74605. }
  74606. function TSQualifiedName(node) {
  74607. this.print(node.left, node);
  74608. this.token(".");
  74609. this.print(node.right, node);
  74610. }
  74611. function TSCallSignatureDeclaration(node) {
  74612. this.tsPrintSignatureDeclarationBase(node);
  74613. this.token(";");
  74614. }
  74615. function TSConstructSignatureDeclaration(node) {
  74616. this.word("new");
  74617. this.space();
  74618. this.tsPrintSignatureDeclarationBase(node);
  74619. this.token(";");
  74620. }
  74621. function TSPropertySignature(node) {
  74622. const {
  74623. readonly,
  74624. initializer
  74625. } = node;
  74626. if (readonly) {
  74627. this.word("readonly");
  74628. this.space();
  74629. }
  74630. this.tsPrintPropertyOrMethodName(node);
  74631. this.print(node.typeAnnotation, node);
  74632. if (initializer) {
  74633. this.space();
  74634. this.token("=");
  74635. this.space();
  74636. this.print(initializer, node);
  74637. }
  74638. this.token(";");
  74639. }
  74640. function tsPrintPropertyOrMethodName(node) {
  74641. if (node.computed) {
  74642. this.token("[");
  74643. }
  74644. this.print(node.key, node);
  74645. if (node.computed) {
  74646. this.token("]");
  74647. }
  74648. if (node.optional) {
  74649. this.token("?");
  74650. }
  74651. }
  74652. function TSMethodSignature(node) {
  74653. const {
  74654. kind
  74655. } = node;
  74656. if (kind === "set" || kind === "get") {
  74657. this.word(kind);
  74658. this.space();
  74659. }
  74660. this.tsPrintPropertyOrMethodName(node);
  74661. this.tsPrintSignatureDeclarationBase(node);
  74662. this.token(";");
  74663. }
  74664. function TSIndexSignature(node) {
  74665. const {
  74666. readonly,
  74667. static: isStatic
  74668. } = node;
  74669. if (isStatic) {
  74670. this.word("static");
  74671. this.space();
  74672. }
  74673. if (readonly) {
  74674. this.word("readonly");
  74675. this.space();
  74676. }
  74677. this.token("[");
  74678. this._parameters(node.parameters, node);
  74679. this.token("]");
  74680. this.print(node.typeAnnotation, node);
  74681. this.token(";");
  74682. }
  74683. function TSAnyKeyword() {
  74684. this.word("any");
  74685. }
  74686. function TSBigIntKeyword() {
  74687. this.word("bigint");
  74688. }
  74689. function TSUnknownKeyword() {
  74690. this.word("unknown");
  74691. }
  74692. function TSNumberKeyword() {
  74693. this.word("number");
  74694. }
  74695. function TSObjectKeyword() {
  74696. this.word("object");
  74697. }
  74698. function TSBooleanKeyword() {
  74699. this.word("boolean");
  74700. }
  74701. function TSStringKeyword() {
  74702. this.word("string");
  74703. }
  74704. function TSSymbolKeyword() {
  74705. this.word("symbol");
  74706. }
  74707. function TSVoidKeyword() {
  74708. this.word("void");
  74709. }
  74710. function TSUndefinedKeyword() {
  74711. this.word("undefined");
  74712. }
  74713. function TSNullKeyword() {
  74714. this.word("null");
  74715. }
  74716. function TSNeverKeyword() {
  74717. this.word("never");
  74718. }
  74719. function TSIntrinsicKeyword() {
  74720. this.word("intrinsic");
  74721. }
  74722. function TSThisType() {
  74723. this.word("this");
  74724. }
  74725. function TSFunctionType(node) {
  74726. this.tsPrintFunctionOrConstructorType(node);
  74727. }
  74728. function TSConstructorType(node) {
  74729. if (node.abstract) {
  74730. this.word("abstract");
  74731. this.space();
  74732. }
  74733. this.word("new");
  74734. this.space();
  74735. this.tsPrintFunctionOrConstructorType(node);
  74736. }
  74737. function tsPrintFunctionOrConstructorType(node) {
  74738. const {
  74739. typeParameters,
  74740. parameters
  74741. } = node;
  74742. this.print(typeParameters, node);
  74743. this.token("(");
  74744. this._parameters(parameters, node);
  74745. this.token(")");
  74746. this.space();
  74747. this.token("=>");
  74748. this.space();
  74749. this.print(node.typeAnnotation.typeAnnotation, node);
  74750. }
  74751. function TSTypeReference(node) {
  74752. this.print(node.typeName, node);
  74753. this.print(node.typeParameters, node);
  74754. }
  74755. function TSTypePredicate(node) {
  74756. if (node.asserts) {
  74757. this.word("asserts");
  74758. this.space();
  74759. }
  74760. this.print(node.parameterName);
  74761. if (node.typeAnnotation) {
  74762. this.space();
  74763. this.word("is");
  74764. this.space();
  74765. this.print(node.typeAnnotation.typeAnnotation);
  74766. }
  74767. }
  74768. function TSTypeQuery(node) {
  74769. this.word("typeof");
  74770. this.space();
  74771. this.print(node.exprName);
  74772. }
  74773. function TSTypeLiteral(node) {
  74774. this.tsPrintTypeLiteralOrInterfaceBody(node.members, node);
  74775. }
  74776. function tsPrintTypeLiteralOrInterfaceBody(members, node) {
  74777. this.tsPrintBraced(members, node);
  74778. }
  74779. function tsPrintBraced(members, node) {
  74780. this.token("{");
  74781. if (members.length) {
  74782. this.indent();
  74783. this.newline();
  74784. for (const member of members) {
  74785. this.print(member, node);
  74786. this.newline();
  74787. }
  74788. this.dedent();
  74789. this.rightBrace();
  74790. } else {
  74791. this.token("}");
  74792. }
  74793. }
  74794. function TSArrayType(node) {
  74795. this.print(node.elementType, node);
  74796. this.token("[]");
  74797. }
  74798. function TSTupleType(node) {
  74799. this.token("[");
  74800. this.printList(node.elementTypes, node);
  74801. this.token("]");
  74802. }
  74803. function TSOptionalType(node) {
  74804. this.print(node.typeAnnotation, node);
  74805. this.token("?");
  74806. }
  74807. function TSRestType(node) {
  74808. this.token("...");
  74809. this.print(node.typeAnnotation, node);
  74810. }
  74811. function TSNamedTupleMember(node) {
  74812. this.print(node.label, node);
  74813. if (node.optional)
  74814. this.token("?");
  74815. this.token(":");
  74816. this.space();
  74817. this.print(node.elementType, node);
  74818. }
  74819. function TSUnionType(node) {
  74820. this.tsPrintUnionOrIntersectionType(node, "|");
  74821. }
  74822. function TSIntersectionType(node) {
  74823. this.tsPrintUnionOrIntersectionType(node, "&");
  74824. }
  74825. function tsPrintUnionOrIntersectionType(node, sep) {
  74826. this.printJoin(node.types, node, {
  74827. separator() {
  74828. this.space();
  74829. this.token(sep);
  74830. this.space();
  74831. }
  74832. });
  74833. }
  74834. function TSConditionalType(node) {
  74835. this.print(node.checkType);
  74836. this.space();
  74837. this.word("extends");
  74838. this.space();
  74839. this.print(node.extendsType);
  74840. this.space();
  74841. this.token("?");
  74842. this.space();
  74843. this.print(node.trueType);
  74844. this.space();
  74845. this.token(":");
  74846. this.space();
  74847. this.print(node.falseType);
  74848. }
  74849. function TSInferType(node) {
  74850. this.token("infer");
  74851. this.space();
  74852. this.print(node.typeParameter);
  74853. }
  74854. function TSParenthesizedType(node) {
  74855. this.token("(");
  74856. this.print(node.typeAnnotation, node);
  74857. this.token(")");
  74858. }
  74859. function TSTypeOperator(node) {
  74860. this.word(node.operator);
  74861. this.space();
  74862. this.print(node.typeAnnotation, node);
  74863. }
  74864. function TSIndexedAccessType(node) {
  74865. this.print(node.objectType, node);
  74866. this.token("[");
  74867. this.print(node.indexType, node);
  74868. this.token("]");
  74869. }
  74870. function TSMappedType(node) {
  74871. const {
  74872. nameType,
  74873. optional,
  74874. readonly,
  74875. typeParameter
  74876. } = node;
  74877. this.token("{");
  74878. this.space();
  74879. if (readonly) {
  74880. tokenIfPlusMinus(this, readonly);
  74881. this.word("readonly");
  74882. this.space();
  74883. }
  74884. this.token("[");
  74885. this.word(typeParameter.name);
  74886. this.space();
  74887. this.word("in");
  74888. this.space();
  74889. this.print(typeParameter.constraint, typeParameter);
  74890. if (nameType) {
  74891. this.space();
  74892. this.word("as");
  74893. this.space();
  74894. this.print(nameType, node);
  74895. }
  74896. this.token("]");
  74897. if (optional) {
  74898. tokenIfPlusMinus(this, optional);
  74899. this.token("?");
  74900. }
  74901. this.token(":");
  74902. this.space();
  74903. this.print(node.typeAnnotation, node);
  74904. this.space();
  74905. this.token("}");
  74906. }
  74907. function tokenIfPlusMinus(self2, tok) {
  74908. if (tok !== true) {
  74909. self2.token(tok);
  74910. }
  74911. }
  74912. function TSLiteralType(node) {
  74913. this.print(node.literal, node);
  74914. }
  74915. function TSExpressionWithTypeArguments(node) {
  74916. this.print(node.expression, node);
  74917. this.print(node.typeParameters, node);
  74918. }
  74919. function TSInterfaceDeclaration(node) {
  74920. const {
  74921. declare,
  74922. id,
  74923. typeParameters,
  74924. extends: extendz,
  74925. body
  74926. } = node;
  74927. if (declare) {
  74928. this.word("declare");
  74929. this.space();
  74930. }
  74931. this.word("interface");
  74932. this.space();
  74933. this.print(id, node);
  74934. this.print(typeParameters, node);
  74935. if (extendz != null && extendz.length) {
  74936. this.space();
  74937. this.word("extends");
  74938. this.space();
  74939. this.printList(extendz, node);
  74940. }
  74941. this.space();
  74942. this.print(body, node);
  74943. }
  74944. function TSInterfaceBody(node) {
  74945. this.tsPrintTypeLiteralOrInterfaceBody(node.body, node);
  74946. }
  74947. function TSTypeAliasDeclaration(node) {
  74948. const {
  74949. declare,
  74950. id,
  74951. typeParameters,
  74952. typeAnnotation
  74953. } = node;
  74954. if (declare) {
  74955. this.word("declare");
  74956. this.space();
  74957. }
  74958. this.word("type");
  74959. this.space();
  74960. this.print(id, node);
  74961. this.print(typeParameters, node);
  74962. this.space();
  74963. this.token("=");
  74964. this.space();
  74965. this.print(typeAnnotation, node);
  74966. this.token(";");
  74967. }
  74968. function TSAsExpression(node) {
  74969. const {
  74970. expression,
  74971. typeAnnotation
  74972. } = node;
  74973. this.print(expression, node);
  74974. this.space();
  74975. this.word("as");
  74976. this.space();
  74977. this.print(typeAnnotation, node);
  74978. }
  74979. function TSTypeAssertion(node) {
  74980. const {
  74981. typeAnnotation,
  74982. expression
  74983. } = node;
  74984. this.token("<");
  74985. this.print(typeAnnotation, node);
  74986. this.token(">");
  74987. this.space();
  74988. this.print(expression, node);
  74989. }
  74990. function TSEnumDeclaration(node) {
  74991. const {
  74992. declare,
  74993. const: isConst,
  74994. id,
  74995. members
  74996. } = node;
  74997. if (declare) {
  74998. this.word("declare");
  74999. this.space();
  75000. }
  75001. if (isConst) {
  75002. this.word("const");
  75003. this.space();
  75004. }
  75005. this.word("enum");
  75006. this.space();
  75007. this.print(id, node);
  75008. this.space();
  75009. this.tsPrintBraced(members, node);
  75010. }
  75011. function TSEnumMember(node) {
  75012. const {
  75013. id,
  75014. initializer
  75015. } = node;
  75016. this.print(id, node);
  75017. if (initializer) {
  75018. this.space();
  75019. this.token("=");
  75020. this.space();
  75021. this.print(initializer, node);
  75022. }
  75023. this.token(",");
  75024. }
  75025. function TSModuleDeclaration(node) {
  75026. const {
  75027. declare,
  75028. id
  75029. } = node;
  75030. if (declare) {
  75031. this.word("declare");
  75032. this.space();
  75033. }
  75034. if (!node.global) {
  75035. this.word(id.type === "Identifier" ? "namespace" : "module");
  75036. this.space();
  75037. }
  75038. this.print(id, node);
  75039. if (!node.body) {
  75040. this.token(";");
  75041. return;
  75042. }
  75043. let body = node.body;
  75044. while (body.type === "TSModuleDeclaration") {
  75045. this.token(".");
  75046. this.print(body.id, body);
  75047. body = body.body;
  75048. }
  75049. this.space();
  75050. this.print(body, node);
  75051. }
  75052. function TSModuleBlock(node) {
  75053. this.tsPrintBraced(node.body, node);
  75054. }
  75055. function TSImportType(node) {
  75056. const {
  75057. argument,
  75058. qualifier,
  75059. typeParameters
  75060. } = node;
  75061. this.word("import");
  75062. this.token("(");
  75063. this.print(argument, node);
  75064. this.token(")");
  75065. if (qualifier) {
  75066. this.token(".");
  75067. this.print(qualifier, node);
  75068. }
  75069. if (typeParameters) {
  75070. this.print(typeParameters, node);
  75071. }
  75072. }
  75073. function TSImportEqualsDeclaration(node) {
  75074. const {
  75075. isExport,
  75076. id,
  75077. moduleReference
  75078. } = node;
  75079. if (isExport) {
  75080. this.word("export");
  75081. this.space();
  75082. }
  75083. this.word("import");
  75084. this.space();
  75085. this.print(id, node);
  75086. this.space();
  75087. this.token("=");
  75088. this.space();
  75089. this.print(moduleReference, node);
  75090. this.token(";");
  75091. }
  75092. function TSExternalModuleReference(node) {
  75093. this.token("require(");
  75094. this.print(node.expression, node);
  75095. this.token(")");
  75096. }
  75097. function TSNonNullExpression(node) {
  75098. this.print(node.expression, node);
  75099. this.token("!");
  75100. }
  75101. function TSExportAssignment(node) {
  75102. this.word("export");
  75103. this.space();
  75104. this.token("=");
  75105. this.space();
  75106. this.print(node.expression, node);
  75107. this.token(";");
  75108. }
  75109. function TSNamespaceExportDeclaration(node) {
  75110. this.word("export");
  75111. this.space();
  75112. this.word("as");
  75113. this.space();
  75114. this.word("namespace");
  75115. this.space();
  75116. this.print(node.id, node);
  75117. }
  75118. function tsPrintSignatureDeclarationBase(node) {
  75119. const {
  75120. typeParameters,
  75121. parameters
  75122. } = node;
  75123. this.print(typeParameters, node);
  75124. this.token("(");
  75125. this._parameters(parameters, node);
  75126. this.token(")");
  75127. this.print(node.typeAnnotation, node);
  75128. }
  75129. function tsPrintClassMemberModifiers(node, isField) {
  75130. if (isField && node.declare) {
  75131. this.word("declare");
  75132. this.space();
  75133. }
  75134. if (node.accessibility) {
  75135. this.word(node.accessibility);
  75136. this.space();
  75137. }
  75138. if (node.static) {
  75139. this.word("static");
  75140. this.space();
  75141. }
  75142. if (node.override) {
  75143. this.word("override");
  75144. this.space();
  75145. }
  75146. if (node.abstract) {
  75147. this.word("abstract");
  75148. this.space();
  75149. }
  75150. if (isField && node.readonly) {
  75151. this.word("readonly");
  75152. this.space();
  75153. }
  75154. }
  75155. }
  75156. });
  75157. // node_modules/@babel/generator/lib/generators/index.js
  75158. var require_generators2 = __commonJS({
  75159. "node_modules/@babel/generator/lib/generators/index.js"(exports) {
  75160. "use strict";
  75161. Object.defineProperty(exports, "__esModule", {
  75162. value: true
  75163. });
  75164. var _templateLiterals = require_template_literals2();
  75165. Object.keys(_templateLiterals).forEach(function(key) {
  75166. if (key === "default" || key === "__esModule")
  75167. return;
  75168. if (key in exports && exports[key] === _templateLiterals[key])
  75169. return;
  75170. Object.defineProperty(exports, key, {
  75171. enumerable: true,
  75172. get: function() {
  75173. return _templateLiterals[key];
  75174. }
  75175. });
  75176. });
  75177. var _expressions = require_expressions2();
  75178. Object.keys(_expressions).forEach(function(key) {
  75179. if (key === "default" || key === "__esModule")
  75180. return;
  75181. if (key in exports && exports[key] === _expressions[key])
  75182. return;
  75183. Object.defineProperty(exports, key, {
  75184. enumerable: true,
  75185. get: function() {
  75186. return _expressions[key];
  75187. }
  75188. });
  75189. });
  75190. var _statements = require_statements2();
  75191. Object.keys(_statements).forEach(function(key) {
  75192. if (key === "default" || key === "__esModule")
  75193. return;
  75194. if (key in exports && exports[key] === _statements[key])
  75195. return;
  75196. Object.defineProperty(exports, key, {
  75197. enumerable: true,
  75198. get: function() {
  75199. return _statements[key];
  75200. }
  75201. });
  75202. });
  75203. var _classes = require_classes2();
  75204. Object.keys(_classes).forEach(function(key) {
  75205. if (key === "default" || key === "__esModule")
  75206. return;
  75207. if (key in exports && exports[key] === _classes[key])
  75208. return;
  75209. Object.defineProperty(exports, key, {
  75210. enumerable: true,
  75211. get: function() {
  75212. return _classes[key];
  75213. }
  75214. });
  75215. });
  75216. var _methods = require_methods2();
  75217. Object.keys(_methods).forEach(function(key) {
  75218. if (key === "default" || key === "__esModule")
  75219. return;
  75220. if (key in exports && exports[key] === _methods[key])
  75221. return;
  75222. Object.defineProperty(exports, key, {
  75223. enumerable: true,
  75224. get: function() {
  75225. return _methods[key];
  75226. }
  75227. });
  75228. });
  75229. var _modules = require_modules2();
  75230. Object.keys(_modules).forEach(function(key) {
  75231. if (key === "default" || key === "__esModule")
  75232. return;
  75233. if (key in exports && exports[key] === _modules[key])
  75234. return;
  75235. Object.defineProperty(exports, key, {
  75236. enumerable: true,
  75237. get: function() {
  75238. return _modules[key];
  75239. }
  75240. });
  75241. });
  75242. var _types = require_types2();
  75243. Object.keys(_types).forEach(function(key) {
  75244. if (key === "default" || key === "__esModule")
  75245. return;
  75246. if (key in exports && exports[key] === _types[key])
  75247. return;
  75248. Object.defineProperty(exports, key, {
  75249. enumerable: true,
  75250. get: function() {
  75251. return _types[key];
  75252. }
  75253. });
  75254. });
  75255. var _flow = require_flow5();
  75256. Object.keys(_flow).forEach(function(key) {
  75257. if (key === "default" || key === "__esModule")
  75258. return;
  75259. if (key in exports && exports[key] === _flow[key])
  75260. return;
  75261. Object.defineProperty(exports, key, {
  75262. enumerable: true,
  75263. get: function() {
  75264. return _flow[key];
  75265. }
  75266. });
  75267. });
  75268. var _base = require_base2();
  75269. Object.keys(_base).forEach(function(key) {
  75270. if (key === "default" || key === "__esModule")
  75271. return;
  75272. if (key in exports && exports[key] === _base[key])
  75273. return;
  75274. Object.defineProperty(exports, key, {
  75275. enumerable: true,
  75276. get: function() {
  75277. return _base[key];
  75278. }
  75279. });
  75280. });
  75281. var _jsx = require_jsx5();
  75282. Object.keys(_jsx).forEach(function(key) {
  75283. if (key === "default" || key === "__esModule")
  75284. return;
  75285. if (key in exports && exports[key] === _jsx[key])
  75286. return;
  75287. Object.defineProperty(exports, key, {
  75288. enumerable: true,
  75289. get: function() {
  75290. return _jsx[key];
  75291. }
  75292. });
  75293. });
  75294. var _typescript = require_typescript5();
  75295. Object.keys(_typescript).forEach(function(key) {
  75296. if (key === "default" || key === "__esModule")
  75297. return;
  75298. if (key in exports && exports[key] === _typescript[key])
  75299. return;
  75300. Object.defineProperty(exports, key, {
  75301. enumerable: true,
  75302. get: function() {
  75303. return _typescript[key];
  75304. }
  75305. });
  75306. });
  75307. }
  75308. });
  75309. // node_modules/@babel/generator/lib/printer.js
  75310. var require_printer2 = __commonJS({
  75311. "node_modules/@babel/generator/lib/printer.js"(exports) {
  75312. "use strict";
  75313. Object.defineProperty(exports, "__esModule", {
  75314. value: true
  75315. });
  75316. exports.default = void 0;
  75317. var _buffer = require_buffer2();
  75318. var n = require_node3();
  75319. var t2 = require_lib2();
  75320. var generatorFunctions = require_generators2();
  75321. var SCIENTIFIC_NOTATION = /e/i;
  75322. var ZERO_DECIMAL_INTEGER = /\.0+$/;
  75323. var NON_DECIMAL_LITERAL = /^0[box]/;
  75324. var PURE_ANNOTATION_RE = /^\s*[@#]__PURE__\s*$/;
  75325. var Printer = class {
  75326. constructor(format, map) {
  75327. this.inForStatementInitCounter = 0;
  75328. this._printStack = [];
  75329. this._indent = 0;
  75330. this._insideAux = false;
  75331. this._parenPushNewlineState = null;
  75332. this._noLineTerminator = false;
  75333. this._printAuxAfterOnNextUserNode = false;
  75334. this._printedComments = /* @__PURE__ */ new WeakSet();
  75335. this._endsWithInteger = false;
  75336. this._endsWithWord = false;
  75337. this.format = format;
  75338. this._buf = new _buffer.default(map);
  75339. }
  75340. generate(ast) {
  75341. this.print(ast);
  75342. this._maybeAddAuxComment();
  75343. return this._buf.get();
  75344. }
  75345. indent() {
  75346. if (this.format.compact || this.format.concise)
  75347. return;
  75348. this._indent++;
  75349. }
  75350. dedent() {
  75351. if (this.format.compact || this.format.concise)
  75352. return;
  75353. this._indent--;
  75354. }
  75355. semicolon(force = false) {
  75356. this._maybeAddAuxComment();
  75357. this._append(";", !force);
  75358. }
  75359. rightBrace() {
  75360. if (this.format.minified) {
  75361. this._buf.removeLastSemicolon();
  75362. }
  75363. this.token("}");
  75364. }
  75365. space(force = false) {
  75366. if (this.format.compact)
  75367. return;
  75368. if (this._buf.hasContent() && !this.endsWith(" ") && !this.endsWith("\n") || force) {
  75369. this._space();
  75370. }
  75371. }
  75372. word(str) {
  75373. if (this._endsWithWord || this.endsWith("/") && str.indexOf("/") === 0) {
  75374. this._space();
  75375. }
  75376. this._maybeAddAuxComment();
  75377. this._append(str);
  75378. this._endsWithWord = true;
  75379. }
  75380. number(str) {
  75381. this.word(str);
  75382. this._endsWithInteger = Number.isInteger(+str) && !NON_DECIMAL_LITERAL.test(str) && !SCIENTIFIC_NOTATION.test(str) && !ZERO_DECIMAL_INTEGER.test(str) && str[str.length - 1] !== ".";
  75383. }
  75384. token(str) {
  75385. if (str === "--" && this.endsWith("!") || str[0] === "+" && this.endsWith("+") || str[0] === "-" && this.endsWith("-") || str[0] === "." && this._endsWithInteger) {
  75386. this._space();
  75387. }
  75388. this._maybeAddAuxComment();
  75389. this._append(str);
  75390. }
  75391. newline(i) {
  75392. if (this.format.retainLines || this.format.compact)
  75393. return;
  75394. if (this.format.concise) {
  75395. this.space();
  75396. return;
  75397. }
  75398. if (this.endsWith("\n\n"))
  75399. return;
  75400. if (typeof i !== "number")
  75401. i = 1;
  75402. i = Math.min(2, i);
  75403. if (this.endsWith("{\n") || this.endsWith(":\n"))
  75404. i--;
  75405. if (i <= 0)
  75406. return;
  75407. for (let j = 0; j < i; j++) {
  75408. this._newline();
  75409. }
  75410. }
  75411. endsWith(str) {
  75412. return this._buf.endsWith(str);
  75413. }
  75414. removeTrailingNewline() {
  75415. this._buf.removeTrailingNewline();
  75416. }
  75417. exactSource(loc, cb) {
  75418. this._catchUp("start", loc);
  75419. this._buf.exactSource(loc, cb);
  75420. }
  75421. source(prop, loc) {
  75422. this._catchUp(prop, loc);
  75423. this._buf.source(prop, loc);
  75424. }
  75425. withSource(prop, loc, cb) {
  75426. this._catchUp(prop, loc);
  75427. this._buf.withSource(prop, loc, cb);
  75428. }
  75429. _space() {
  75430. this._append(" ", true);
  75431. }
  75432. _newline() {
  75433. this._append("\n", true);
  75434. }
  75435. _append(str, queue = false) {
  75436. this._maybeAddParen(str);
  75437. this._maybeIndent(str);
  75438. if (queue)
  75439. this._buf.queue(str);
  75440. else
  75441. this._buf.append(str);
  75442. this._endsWithWord = false;
  75443. this._endsWithInteger = false;
  75444. }
  75445. _maybeIndent(str) {
  75446. if (this._indent && this.endsWith("\n") && str[0] !== "\n") {
  75447. this._buf.queue(this._getIndent());
  75448. }
  75449. }
  75450. _maybeAddParen(str) {
  75451. const parenPushNewlineState = this._parenPushNewlineState;
  75452. if (!parenPushNewlineState)
  75453. return;
  75454. let i;
  75455. for (i = 0; i < str.length && str[i] === " "; i++)
  75456. continue;
  75457. if (i === str.length) {
  75458. return;
  75459. }
  75460. const cha = str[i];
  75461. if (cha !== "\n") {
  75462. if (cha !== "/" || i + 1 === str.length) {
  75463. this._parenPushNewlineState = null;
  75464. return;
  75465. }
  75466. const chaPost = str[i + 1];
  75467. if (chaPost === "*") {
  75468. if (PURE_ANNOTATION_RE.test(str.slice(i + 2, str.length - 2))) {
  75469. return;
  75470. }
  75471. } else if (chaPost !== "/") {
  75472. this._parenPushNewlineState = null;
  75473. return;
  75474. }
  75475. }
  75476. this.token("(");
  75477. this.indent();
  75478. parenPushNewlineState.printed = true;
  75479. }
  75480. _catchUp(prop, loc) {
  75481. if (!this.format.retainLines)
  75482. return;
  75483. const pos = loc ? loc[prop] : null;
  75484. if ((pos == null ? void 0 : pos.line) != null) {
  75485. const count = pos.line - this._buf.getCurrentLine();
  75486. for (let i = 0; i < count; i++) {
  75487. this._newline();
  75488. }
  75489. }
  75490. }
  75491. _getIndent() {
  75492. return this.format.indent.style.repeat(this._indent);
  75493. }
  75494. startTerminatorless(isLabel = false) {
  75495. if (isLabel) {
  75496. this._noLineTerminator = true;
  75497. return null;
  75498. } else {
  75499. return this._parenPushNewlineState = {
  75500. printed: false
  75501. };
  75502. }
  75503. }
  75504. endTerminatorless(state) {
  75505. this._noLineTerminator = false;
  75506. if (state != null && state.printed) {
  75507. this.dedent();
  75508. this.newline();
  75509. this.token(")");
  75510. }
  75511. }
  75512. print(node, parent) {
  75513. if (!node)
  75514. return;
  75515. const oldConcise = this.format.concise;
  75516. if (node._compact) {
  75517. this.format.concise = true;
  75518. }
  75519. const printMethod = this[node.type];
  75520. if (!printMethod) {
  75521. throw new ReferenceError(`unknown node of type ${JSON.stringify(node.type)} with constructor ${JSON.stringify(node == null ? void 0 : node.constructor.name)}`);
  75522. }
  75523. this._printStack.push(node);
  75524. const oldInAux = this._insideAux;
  75525. this._insideAux = !node.loc;
  75526. this._maybeAddAuxComment(this._insideAux && !oldInAux);
  75527. let needsParens = n.needsParens(node, parent, this._printStack);
  75528. if (this.format.retainFunctionParens && node.type === "FunctionExpression" && node.extra && node.extra.parenthesized) {
  75529. needsParens = true;
  75530. }
  75531. if (needsParens)
  75532. this.token("(");
  75533. this._printLeadingComments(node);
  75534. const loc = t2.isProgram(node) || t2.isFile(node) ? null : node.loc;
  75535. this.withSource("start", loc, () => {
  75536. printMethod.call(this, node, parent);
  75537. });
  75538. this._printTrailingComments(node);
  75539. if (needsParens)
  75540. this.token(")");
  75541. this._printStack.pop();
  75542. this.format.concise = oldConcise;
  75543. this._insideAux = oldInAux;
  75544. }
  75545. _maybeAddAuxComment(enteredPositionlessNode) {
  75546. if (enteredPositionlessNode)
  75547. this._printAuxBeforeComment();
  75548. if (!this._insideAux)
  75549. this._printAuxAfterComment();
  75550. }
  75551. _printAuxBeforeComment() {
  75552. if (this._printAuxAfterOnNextUserNode)
  75553. return;
  75554. this._printAuxAfterOnNextUserNode = true;
  75555. const comment2 = this.format.auxiliaryCommentBefore;
  75556. if (comment2) {
  75557. this._printComment({
  75558. type: "CommentBlock",
  75559. value: comment2
  75560. });
  75561. }
  75562. }
  75563. _printAuxAfterComment() {
  75564. if (!this._printAuxAfterOnNextUserNode)
  75565. return;
  75566. this._printAuxAfterOnNextUserNode = false;
  75567. const comment2 = this.format.auxiliaryCommentAfter;
  75568. if (comment2) {
  75569. this._printComment({
  75570. type: "CommentBlock",
  75571. value: comment2
  75572. });
  75573. }
  75574. }
  75575. getPossibleRaw(node) {
  75576. const extra = node.extra;
  75577. if (extra && extra.raw != null && extra.rawValue != null && node.value === extra.rawValue) {
  75578. return extra.raw;
  75579. }
  75580. }
  75581. printJoin(nodes, parent, opts = {}) {
  75582. if (!(nodes != null && nodes.length))
  75583. return;
  75584. if (opts.indent)
  75585. this.indent();
  75586. const newlineOpts = {
  75587. addNewlines: opts.addNewlines
  75588. };
  75589. for (let i = 0; i < nodes.length; i++) {
  75590. const node = nodes[i];
  75591. if (!node)
  75592. continue;
  75593. if (opts.statement)
  75594. this._printNewline(true, node, parent, newlineOpts);
  75595. this.print(node, parent);
  75596. if (opts.iterator) {
  75597. opts.iterator(node, i);
  75598. }
  75599. if (opts.separator && i < nodes.length - 1) {
  75600. opts.separator.call(this);
  75601. }
  75602. if (opts.statement)
  75603. this._printNewline(false, node, parent, newlineOpts);
  75604. }
  75605. if (opts.indent)
  75606. this.dedent();
  75607. }
  75608. printAndIndentOnComments(node, parent) {
  75609. const indent = node.leadingComments && node.leadingComments.length > 0;
  75610. if (indent)
  75611. this.indent();
  75612. this.print(node, parent);
  75613. if (indent)
  75614. this.dedent();
  75615. }
  75616. printBlock(parent) {
  75617. const node = parent.body;
  75618. if (!t2.isEmptyStatement(node)) {
  75619. this.space();
  75620. }
  75621. this.print(node, parent);
  75622. }
  75623. _printTrailingComments(node) {
  75624. this._printComments(this._getComments(false, node));
  75625. }
  75626. _printLeadingComments(node) {
  75627. this._printComments(this._getComments(true, node), true);
  75628. }
  75629. printInnerComments(node, indent = true) {
  75630. var _node$innerComments;
  75631. if (!((_node$innerComments = node.innerComments) != null && _node$innerComments.length))
  75632. return;
  75633. if (indent)
  75634. this.indent();
  75635. this._printComments(node.innerComments);
  75636. if (indent)
  75637. this.dedent();
  75638. }
  75639. printSequence(nodes, parent, opts = {}) {
  75640. opts.statement = true;
  75641. return this.printJoin(nodes, parent, opts);
  75642. }
  75643. printList(items, parent, opts = {}) {
  75644. if (opts.separator == null) {
  75645. opts.separator = commaSeparator;
  75646. }
  75647. return this.printJoin(items, parent, opts);
  75648. }
  75649. _printNewline(leading, node, parent, opts) {
  75650. if (this.format.retainLines || this.format.compact)
  75651. return;
  75652. if (this.format.concise) {
  75653. this.space();
  75654. return;
  75655. }
  75656. let lines = 0;
  75657. if (this._buf.hasContent()) {
  75658. if (!leading)
  75659. lines++;
  75660. if (opts.addNewlines)
  75661. lines += opts.addNewlines(leading, node) || 0;
  75662. const needs = leading ? n.needsWhitespaceBefore : n.needsWhitespaceAfter;
  75663. if (needs(node, parent))
  75664. lines++;
  75665. }
  75666. this.newline(lines);
  75667. }
  75668. _getComments(leading, node) {
  75669. return node && (leading ? node.leadingComments : node.trailingComments) || [];
  75670. }
  75671. _printComment(comment2, skipNewLines) {
  75672. if (!this.format.shouldPrintComment(comment2.value))
  75673. return;
  75674. if (comment2.ignore)
  75675. return;
  75676. if (this._printedComments.has(comment2))
  75677. return;
  75678. this._printedComments.add(comment2);
  75679. const isBlockComment = comment2.type === "CommentBlock";
  75680. const printNewLines = isBlockComment && !skipNewLines && !this._noLineTerminator;
  75681. if (printNewLines && this._buf.hasContent())
  75682. this.newline(1);
  75683. if (!this.endsWith("[") && !this.endsWith("{"))
  75684. this.space();
  75685. let val = !isBlockComment && !this._noLineTerminator ? `//${comment2.value}
  75686. ` : `/*${comment2.value}*/`;
  75687. if (isBlockComment && this.format.indent.adjustMultilineComment) {
  75688. var _comment$loc;
  75689. const offset2 = (_comment$loc = comment2.loc) == null ? void 0 : _comment$loc.start.column;
  75690. if (offset2) {
  75691. const newlineRegex = new RegExp("\\n\\s{1," + offset2 + "}", "g");
  75692. val = val.replace(newlineRegex, "\n");
  75693. }
  75694. const indentSize = Math.max(this._getIndent().length, this.format.retainLines ? 0 : this._buf.getCurrentColumn());
  75695. val = val.replace(/\n(?!$)/g, `
  75696. ${" ".repeat(indentSize)}`);
  75697. }
  75698. if (this.endsWith("/"))
  75699. this._space();
  75700. this.withSource("start", comment2.loc, () => {
  75701. this._append(val);
  75702. });
  75703. if (printNewLines)
  75704. this.newline(1);
  75705. }
  75706. _printComments(comments, inlinePureAnnotation) {
  75707. if (!(comments != null && comments.length))
  75708. return;
  75709. if (inlinePureAnnotation && comments.length === 1 && PURE_ANNOTATION_RE.test(comments[0].value)) {
  75710. this._printComment(comments[0], this._buf.hasContent() && !this.endsWith("\n"));
  75711. } else {
  75712. for (const comment2 of comments) {
  75713. this._printComment(comment2);
  75714. }
  75715. }
  75716. }
  75717. printAssertions(node) {
  75718. var _node$assertions;
  75719. if ((_node$assertions = node.assertions) != null && _node$assertions.length) {
  75720. this.space();
  75721. this.word("assert");
  75722. this.space();
  75723. this.token("{");
  75724. this.space();
  75725. this.printList(node.assertions, node);
  75726. this.space();
  75727. this.token("}");
  75728. }
  75729. }
  75730. };
  75731. Object.assign(Printer.prototype, generatorFunctions);
  75732. {
  75733. Printer.prototype.Noop = function Noop() {
  75734. };
  75735. }
  75736. var _default = Printer;
  75737. exports.default = _default;
  75738. function commaSeparator() {
  75739. this.token(",");
  75740. this.space();
  75741. }
  75742. }
  75743. });
  75744. // node_modules/@babel/generator/lib/index.js
  75745. var require_lib18 = __commonJS({
  75746. "node_modules/@babel/generator/lib/index.js"(exports) {
  75747. "use strict";
  75748. Object.defineProperty(exports, "__esModule", {
  75749. value: true
  75750. });
  75751. exports.default = generate2;
  75752. exports.CodeGenerator = void 0;
  75753. var _sourceMap = require_source_map3();
  75754. var _printer = require_printer2();
  75755. var Generator = class extends _printer.default {
  75756. constructor(ast, opts = {}, code2) {
  75757. const format = normalizeOptions(code2, opts);
  75758. const map = opts.sourceMaps ? new _sourceMap.default(opts, code2) : null;
  75759. super(format, map);
  75760. this.ast = void 0;
  75761. this.ast = ast;
  75762. }
  75763. generate() {
  75764. return super.generate(this.ast);
  75765. }
  75766. };
  75767. function normalizeOptions(code2, opts) {
  75768. const format = {
  75769. auxiliaryCommentBefore: opts.auxiliaryCommentBefore,
  75770. auxiliaryCommentAfter: opts.auxiliaryCommentAfter,
  75771. shouldPrintComment: opts.shouldPrintComment,
  75772. retainLines: opts.retainLines,
  75773. retainFunctionParens: opts.retainFunctionParens,
  75774. comments: opts.comments == null || opts.comments,
  75775. compact: opts.compact,
  75776. minified: opts.minified,
  75777. concise: opts.concise,
  75778. indent: {
  75779. adjustMultilineComment: true,
  75780. style: " ",
  75781. base: 0
  75782. },
  75783. decoratorsBeforeExport: !!opts.decoratorsBeforeExport,
  75784. jsescOption: Object.assign({
  75785. quotes: "double",
  75786. wrap: true,
  75787. minimal: false
  75788. }, opts.jsescOption),
  75789. recordAndTupleSyntaxType: opts.recordAndTupleSyntaxType
  75790. };
  75791. {
  75792. format.jsonCompatibleStrings = opts.jsonCompatibleStrings;
  75793. }
  75794. if (format.minified) {
  75795. format.compact = true;
  75796. format.shouldPrintComment = format.shouldPrintComment || (() => format.comments);
  75797. } else {
  75798. format.shouldPrintComment = format.shouldPrintComment || ((value) => format.comments || value.indexOf("@license") >= 0 || value.indexOf("@preserve") >= 0);
  75799. }
  75800. if (format.compact === "auto") {
  75801. format.compact = code2.length > 5e5;
  75802. if (format.compact) {
  75803. console.error(`[BABEL] Note: The code generator has deoptimised the styling of ${opts.filename} as it exceeds the max of ${"500KB"}.`);
  75804. }
  75805. }
  75806. if (format.compact) {
  75807. format.indent.adjustMultilineComment = false;
  75808. }
  75809. return format;
  75810. }
  75811. var CodeGenerator = class {
  75812. constructor(ast, opts, code2) {
  75813. this._generator = void 0;
  75814. this._generator = new Generator(ast, opts, code2);
  75815. }
  75816. generate() {
  75817. return this._generator.generate();
  75818. }
  75819. };
  75820. exports.CodeGenerator = CodeGenerator;
  75821. function generate2(ast, opts, code2) {
  75822. const gen = new Generator(ast, opts, code2);
  75823. return gen.generate();
  75824. }
  75825. }
  75826. });
  75827. // node_modules/@babel/traverse/lib/path/ancestry.js
  75828. var require_ancestry2 = __commonJS({
  75829. "node_modules/@babel/traverse/lib/path/ancestry.js"(exports) {
  75830. "use strict";
  75831. Object.defineProperty(exports, "__esModule", {
  75832. value: true
  75833. });
  75834. exports.findParent = findParent;
  75835. exports.find = find2;
  75836. exports.getFunctionParent = getFunctionParent;
  75837. exports.getStatementParent = getStatementParent;
  75838. exports.getEarliestCommonAncestorFrom = getEarliestCommonAncestorFrom;
  75839. exports.getDeepestCommonAncestorFrom = getDeepestCommonAncestorFrom;
  75840. exports.getAncestry = getAncestry;
  75841. exports.isAncestor = isAncestor;
  75842. exports.isDescendant = isDescendant;
  75843. exports.inType = inType;
  75844. var t2 = require_lib2();
  75845. var _index = require_path2();
  75846. function findParent(callback) {
  75847. let path = this;
  75848. while (path = path.parentPath) {
  75849. if (callback(path))
  75850. return path;
  75851. }
  75852. return null;
  75853. }
  75854. function find2(callback) {
  75855. let path = this;
  75856. do {
  75857. if (callback(path))
  75858. return path;
  75859. } while (path = path.parentPath);
  75860. return null;
  75861. }
  75862. function getFunctionParent() {
  75863. return this.findParent((p) => p.isFunction());
  75864. }
  75865. function getStatementParent() {
  75866. let path = this;
  75867. do {
  75868. if (!path.parentPath || Array.isArray(path.container) && path.isStatement()) {
  75869. break;
  75870. } else {
  75871. path = path.parentPath;
  75872. }
  75873. } while (path);
  75874. if (path && (path.isProgram() || path.isFile())) {
  75875. throw new Error("File/Program node, we can't possibly find a statement parent to this");
  75876. }
  75877. return path;
  75878. }
  75879. function getEarliestCommonAncestorFrom(paths) {
  75880. return this.getDeepestCommonAncestorFrom(paths, function(deepest, i, ancestries) {
  75881. let earliest;
  75882. const keys2 = t2.VISITOR_KEYS[deepest.type];
  75883. for (const ancestry of ancestries) {
  75884. const path = ancestry[i + 1];
  75885. if (!earliest) {
  75886. earliest = path;
  75887. continue;
  75888. }
  75889. if (path.listKey && earliest.listKey === path.listKey) {
  75890. if (path.key < earliest.key) {
  75891. earliest = path;
  75892. continue;
  75893. }
  75894. }
  75895. const earliestKeyIndex = keys2.indexOf(earliest.parentKey);
  75896. const currentKeyIndex = keys2.indexOf(path.parentKey);
  75897. if (earliestKeyIndex > currentKeyIndex) {
  75898. earliest = path;
  75899. }
  75900. }
  75901. return earliest;
  75902. });
  75903. }
  75904. function getDeepestCommonAncestorFrom(paths, filter) {
  75905. if (!paths.length) {
  75906. return this;
  75907. }
  75908. if (paths.length === 1) {
  75909. return paths[0];
  75910. }
  75911. let minDepth = Infinity;
  75912. let lastCommonIndex, lastCommon;
  75913. const ancestries = paths.map((path) => {
  75914. const ancestry = [];
  75915. do {
  75916. ancestry.unshift(path);
  75917. } while ((path = path.parentPath) && path !== this);
  75918. if (ancestry.length < minDepth) {
  75919. minDepth = ancestry.length;
  75920. }
  75921. return ancestry;
  75922. });
  75923. const first = ancestries[0];
  75924. depthLoop:
  75925. for (let i = 0; i < minDepth; i++) {
  75926. const shouldMatch = first[i];
  75927. for (const ancestry of ancestries) {
  75928. if (ancestry[i] !== shouldMatch) {
  75929. break depthLoop;
  75930. }
  75931. }
  75932. lastCommonIndex = i;
  75933. lastCommon = shouldMatch;
  75934. }
  75935. if (lastCommon) {
  75936. if (filter) {
  75937. return filter(lastCommon, lastCommonIndex, ancestries);
  75938. } else {
  75939. return lastCommon;
  75940. }
  75941. } else {
  75942. throw new Error("Couldn't find intersection");
  75943. }
  75944. }
  75945. function getAncestry() {
  75946. let path = this;
  75947. const paths = [];
  75948. do {
  75949. paths.push(path);
  75950. } while (path = path.parentPath);
  75951. return paths;
  75952. }
  75953. function isAncestor(maybeDescendant) {
  75954. return maybeDescendant.isDescendant(this);
  75955. }
  75956. function isDescendant(maybeAncestor) {
  75957. return !!this.findParent((parent) => parent === maybeAncestor);
  75958. }
  75959. function inType(...candidateTypes) {
  75960. let path = this;
  75961. while (path) {
  75962. for (const type of candidateTypes) {
  75963. if (path.node.type === type)
  75964. return true;
  75965. }
  75966. path = path.parentPath;
  75967. }
  75968. return false;
  75969. }
  75970. }
  75971. });
  75972. // node_modules/@babel/traverse/lib/path/inference/inferer-reference.js
  75973. var require_inferer_reference2 = __commonJS({
  75974. "node_modules/@babel/traverse/lib/path/inference/inferer-reference.js"(exports) {
  75975. "use strict";
  75976. Object.defineProperty(exports, "__esModule", {
  75977. value: true
  75978. });
  75979. exports.default = _default;
  75980. var t2 = require_lib2();
  75981. function _default(node) {
  75982. if (!this.isReferenced())
  75983. return;
  75984. const binding = this.scope.getBinding(node.name);
  75985. if (binding) {
  75986. if (binding.identifier.typeAnnotation) {
  75987. return binding.identifier.typeAnnotation;
  75988. } else {
  75989. return getTypeAnnotationBindingConstantViolations(binding, this, node.name);
  75990. }
  75991. }
  75992. if (node.name === "undefined") {
  75993. return t2.voidTypeAnnotation();
  75994. } else if (node.name === "NaN" || node.name === "Infinity") {
  75995. return t2.numberTypeAnnotation();
  75996. } else if (node.name === "arguments") {
  75997. }
  75998. }
  75999. function getTypeAnnotationBindingConstantViolations(binding, path, name2) {
  76000. const types2 = [];
  76001. const functionConstantViolations = [];
  76002. let constantViolations = getConstantViolationsBefore(binding, path, functionConstantViolations);
  76003. const testType = getConditionalAnnotation(binding, path, name2);
  76004. if (testType) {
  76005. const testConstantViolations = getConstantViolationsBefore(binding, testType.ifStatement);
  76006. constantViolations = constantViolations.filter((path2) => testConstantViolations.indexOf(path2) < 0);
  76007. types2.push(testType.typeAnnotation);
  76008. }
  76009. if (constantViolations.length) {
  76010. constantViolations = constantViolations.concat(functionConstantViolations);
  76011. for (const violation of constantViolations) {
  76012. types2.push(violation.getTypeAnnotation());
  76013. }
  76014. }
  76015. if (!types2.length) {
  76016. return;
  76017. }
  76018. if (t2.isTSTypeAnnotation(types2[0]) && t2.createTSUnionType) {
  76019. return t2.createTSUnionType(types2);
  76020. }
  76021. if (t2.createFlowUnionType) {
  76022. return t2.createFlowUnionType(types2);
  76023. }
  76024. return t2.createUnionTypeAnnotation(types2);
  76025. }
  76026. function getConstantViolationsBefore(binding, path, functions) {
  76027. const violations = binding.constantViolations.slice();
  76028. violations.unshift(binding.path);
  76029. return violations.filter((violation) => {
  76030. violation = violation.resolve();
  76031. const status = violation._guessExecutionStatusRelativeTo(path);
  76032. if (functions && status === "unknown")
  76033. functions.push(violation);
  76034. return status === "before";
  76035. });
  76036. }
  76037. function inferAnnotationFromBinaryExpression(name2, path) {
  76038. const operator = path.node.operator;
  76039. const right = path.get("right").resolve();
  76040. const left = path.get("left").resolve();
  76041. let target;
  76042. if (left.isIdentifier({
  76043. name: name2
  76044. })) {
  76045. target = right;
  76046. } else if (right.isIdentifier({
  76047. name: name2
  76048. })) {
  76049. target = left;
  76050. }
  76051. if (target) {
  76052. if (operator === "===") {
  76053. return target.getTypeAnnotation();
  76054. }
  76055. if (t2.BOOLEAN_NUMBER_BINARY_OPERATORS.indexOf(operator) >= 0) {
  76056. return t2.numberTypeAnnotation();
  76057. }
  76058. return;
  76059. }
  76060. if (operator !== "===" && operator !== "==")
  76061. return;
  76062. let typeofPath;
  76063. let typePath;
  76064. if (left.isUnaryExpression({
  76065. operator: "typeof"
  76066. })) {
  76067. typeofPath = left;
  76068. typePath = right;
  76069. } else if (right.isUnaryExpression({
  76070. operator: "typeof"
  76071. })) {
  76072. typeofPath = right;
  76073. typePath = left;
  76074. }
  76075. if (!typeofPath)
  76076. return;
  76077. if (!typeofPath.get("argument").isIdentifier({
  76078. name: name2
  76079. }))
  76080. return;
  76081. typePath = typePath.resolve();
  76082. if (!typePath.isLiteral())
  76083. return;
  76084. const typeValue = typePath.node.value;
  76085. if (typeof typeValue !== "string")
  76086. return;
  76087. return t2.createTypeAnnotationBasedOnTypeof(typeValue);
  76088. }
  76089. function getParentConditionalPath(binding, path, name2) {
  76090. let parentPath;
  76091. while (parentPath = path.parentPath) {
  76092. if (parentPath.isIfStatement() || parentPath.isConditionalExpression()) {
  76093. if (path.key === "test") {
  76094. return;
  76095. }
  76096. return parentPath;
  76097. }
  76098. if (parentPath.isFunction()) {
  76099. if (parentPath.parentPath.scope.getBinding(name2) !== binding)
  76100. return;
  76101. }
  76102. path = parentPath;
  76103. }
  76104. }
  76105. function getConditionalAnnotation(binding, path, name2) {
  76106. const ifStatement = getParentConditionalPath(binding, path, name2);
  76107. if (!ifStatement)
  76108. return;
  76109. const test = ifStatement.get("test");
  76110. const paths = [test];
  76111. const types2 = [];
  76112. for (let i = 0; i < paths.length; i++) {
  76113. const path2 = paths[i];
  76114. if (path2.isLogicalExpression()) {
  76115. if (path2.node.operator === "&&") {
  76116. paths.push(path2.get("left"));
  76117. paths.push(path2.get("right"));
  76118. }
  76119. } else if (path2.isBinaryExpression()) {
  76120. const type = inferAnnotationFromBinaryExpression(name2, path2);
  76121. if (type)
  76122. types2.push(type);
  76123. }
  76124. }
  76125. if (types2.length) {
  76126. if (t2.isTSTypeAnnotation(types2[0]) && t2.createTSUnionType) {
  76127. return {
  76128. typeAnnotation: t2.createTSUnionType(types2),
  76129. ifStatement
  76130. };
  76131. }
  76132. if (t2.createFlowUnionType) {
  76133. return {
  76134. typeAnnotation: t2.createFlowUnionType(types2),
  76135. ifStatement
  76136. };
  76137. }
  76138. return {
  76139. typeAnnotation: t2.createUnionTypeAnnotation(types2),
  76140. ifStatement
  76141. };
  76142. }
  76143. return getConditionalAnnotation(ifStatement, name2);
  76144. }
  76145. }
  76146. });
  76147. // node_modules/@babel/traverse/lib/path/inference/inferers.js
  76148. var require_inferers2 = __commonJS({
  76149. "node_modules/@babel/traverse/lib/path/inference/inferers.js"(exports) {
  76150. "use strict";
  76151. Object.defineProperty(exports, "__esModule", {
  76152. value: true
  76153. });
  76154. exports.VariableDeclarator = VariableDeclarator;
  76155. exports.TypeCastExpression = TypeCastExpression;
  76156. exports.NewExpression = NewExpression;
  76157. exports.TemplateLiteral = TemplateLiteral;
  76158. exports.UnaryExpression = UnaryExpression;
  76159. exports.BinaryExpression = BinaryExpression2;
  76160. exports.LogicalExpression = LogicalExpression;
  76161. exports.ConditionalExpression = ConditionalExpression;
  76162. exports.SequenceExpression = SequenceExpression;
  76163. exports.ParenthesizedExpression = ParenthesizedExpression;
  76164. exports.AssignmentExpression = AssignmentExpression;
  76165. exports.UpdateExpression = UpdateExpression;
  76166. exports.StringLiteral = StringLiteral;
  76167. exports.NumericLiteral = NumericLiteral;
  76168. exports.BooleanLiteral = BooleanLiteral;
  76169. exports.NullLiteral = NullLiteral;
  76170. exports.RegExpLiteral = RegExpLiteral;
  76171. exports.ObjectExpression = ObjectExpression;
  76172. exports.ArrayExpression = ArrayExpression2;
  76173. exports.RestElement = RestElement2;
  76174. exports.ClassDeclaration = exports.ClassExpression = exports.FunctionDeclaration = exports.ArrowFunctionExpression = exports.FunctionExpression = Func;
  76175. exports.CallExpression = CallExpression;
  76176. exports.TaggedTemplateExpression = TaggedTemplateExpression;
  76177. Object.defineProperty(exports, "Identifier", {
  76178. enumerable: true,
  76179. get: function() {
  76180. return _infererReference.default;
  76181. }
  76182. });
  76183. var t2 = require_lib2();
  76184. var _infererReference = require_inferer_reference2();
  76185. function VariableDeclarator() {
  76186. var _type;
  76187. const id = this.get("id");
  76188. if (!id.isIdentifier())
  76189. return;
  76190. const init = this.get("init");
  76191. let type = init.getTypeAnnotation();
  76192. if (((_type = type) == null ? void 0 : _type.type) === "AnyTypeAnnotation") {
  76193. if (init.isCallExpression() && init.get("callee").isIdentifier({
  76194. name: "Array"
  76195. }) && !init.scope.hasBinding("Array", true)) {
  76196. type = ArrayExpression2();
  76197. }
  76198. }
  76199. return type;
  76200. }
  76201. function TypeCastExpression(node) {
  76202. return node.typeAnnotation;
  76203. }
  76204. TypeCastExpression.validParent = true;
  76205. function NewExpression(node) {
  76206. if (this.get("callee").isIdentifier()) {
  76207. return t2.genericTypeAnnotation(node.callee);
  76208. }
  76209. }
  76210. function TemplateLiteral() {
  76211. return t2.stringTypeAnnotation();
  76212. }
  76213. function UnaryExpression(node) {
  76214. const operator = node.operator;
  76215. if (operator === "void") {
  76216. return t2.voidTypeAnnotation();
  76217. } else if (t2.NUMBER_UNARY_OPERATORS.indexOf(operator) >= 0) {
  76218. return t2.numberTypeAnnotation();
  76219. } else if (t2.STRING_UNARY_OPERATORS.indexOf(operator) >= 0) {
  76220. return t2.stringTypeAnnotation();
  76221. } else if (t2.BOOLEAN_UNARY_OPERATORS.indexOf(operator) >= 0) {
  76222. return t2.booleanTypeAnnotation();
  76223. }
  76224. }
  76225. function BinaryExpression2(node) {
  76226. const operator = node.operator;
  76227. if (t2.NUMBER_BINARY_OPERATORS.indexOf(operator) >= 0) {
  76228. return t2.numberTypeAnnotation();
  76229. } else if (t2.BOOLEAN_BINARY_OPERATORS.indexOf(operator) >= 0) {
  76230. return t2.booleanTypeAnnotation();
  76231. } else if (operator === "+") {
  76232. const right = this.get("right");
  76233. const left = this.get("left");
  76234. if (left.isBaseType("number") && right.isBaseType("number")) {
  76235. return t2.numberTypeAnnotation();
  76236. } else if (left.isBaseType("string") || right.isBaseType("string")) {
  76237. return t2.stringTypeAnnotation();
  76238. }
  76239. return t2.unionTypeAnnotation([t2.stringTypeAnnotation(), t2.numberTypeAnnotation()]);
  76240. }
  76241. }
  76242. function LogicalExpression() {
  76243. const argumentTypes = [this.get("left").getTypeAnnotation(), this.get("right").getTypeAnnotation()];
  76244. if (t2.isTSTypeAnnotation(argumentTypes[0]) && t2.createTSUnionType) {
  76245. return t2.createTSUnionType(argumentTypes);
  76246. }
  76247. if (t2.createFlowUnionType) {
  76248. return t2.createFlowUnionType(argumentTypes);
  76249. }
  76250. return t2.createUnionTypeAnnotation(argumentTypes);
  76251. }
  76252. function ConditionalExpression() {
  76253. const argumentTypes = [this.get("consequent").getTypeAnnotation(), this.get("alternate").getTypeAnnotation()];
  76254. if (t2.isTSTypeAnnotation(argumentTypes[0]) && t2.createTSUnionType) {
  76255. return t2.createTSUnionType(argumentTypes);
  76256. }
  76257. if (t2.createFlowUnionType) {
  76258. return t2.createFlowUnionType(argumentTypes);
  76259. }
  76260. return t2.createUnionTypeAnnotation(argumentTypes);
  76261. }
  76262. function SequenceExpression() {
  76263. return this.get("expressions").pop().getTypeAnnotation();
  76264. }
  76265. function ParenthesizedExpression() {
  76266. return this.get("expression").getTypeAnnotation();
  76267. }
  76268. function AssignmentExpression() {
  76269. return this.get("right").getTypeAnnotation();
  76270. }
  76271. function UpdateExpression(node) {
  76272. const operator = node.operator;
  76273. if (operator === "++" || operator === "--") {
  76274. return t2.numberTypeAnnotation();
  76275. }
  76276. }
  76277. function StringLiteral() {
  76278. return t2.stringTypeAnnotation();
  76279. }
  76280. function NumericLiteral() {
  76281. return t2.numberTypeAnnotation();
  76282. }
  76283. function BooleanLiteral() {
  76284. return t2.booleanTypeAnnotation();
  76285. }
  76286. function NullLiteral() {
  76287. return t2.nullLiteralTypeAnnotation();
  76288. }
  76289. function RegExpLiteral() {
  76290. return t2.genericTypeAnnotation(t2.identifier("RegExp"));
  76291. }
  76292. function ObjectExpression() {
  76293. return t2.genericTypeAnnotation(t2.identifier("Object"));
  76294. }
  76295. function ArrayExpression2() {
  76296. return t2.genericTypeAnnotation(t2.identifier("Array"));
  76297. }
  76298. function RestElement2() {
  76299. return ArrayExpression2();
  76300. }
  76301. RestElement2.validParent = true;
  76302. function Func() {
  76303. return t2.genericTypeAnnotation(t2.identifier("Function"));
  76304. }
  76305. var isArrayFrom = t2.buildMatchMemberExpression("Array.from");
  76306. var isObjectKeys = t2.buildMatchMemberExpression("Object.keys");
  76307. var isObjectValues = t2.buildMatchMemberExpression("Object.values");
  76308. var isObjectEntries = t2.buildMatchMemberExpression("Object.entries");
  76309. function CallExpression() {
  76310. const {
  76311. callee
  76312. } = this.node;
  76313. if (isObjectKeys(callee)) {
  76314. return t2.arrayTypeAnnotation(t2.stringTypeAnnotation());
  76315. } else if (isArrayFrom(callee) || isObjectValues(callee)) {
  76316. return t2.arrayTypeAnnotation(t2.anyTypeAnnotation());
  76317. } else if (isObjectEntries(callee)) {
  76318. return t2.arrayTypeAnnotation(t2.tupleTypeAnnotation([t2.stringTypeAnnotation(), t2.anyTypeAnnotation()]));
  76319. }
  76320. return resolveCall(this.get("callee"));
  76321. }
  76322. function TaggedTemplateExpression() {
  76323. return resolveCall(this.get("tag"));
  76324. }
  76325. function resolveCall(callee) {
  76326. callee = callee.resolve();
  76327. if (callee.isFunction()) {
  76328. if (callee.is("async")) {
  76329. if (callee.is("generator")) {
  76330. return t2.genericTypeAnnotation(t2.identifier("AsyncIterator"));
  76331. } else {
  76332. return t2.genericTypeAnnotation(t2.identifier("Promise"));
  76333. }
  76334. } else {
  76335. if (callee.node.returnType) {
  76336. return callee.node.returnType;
  76337. } else {
  76338. }
  76339. }
  76340. }
  76341. }
  76342. }
  76343. });
  76344. // node_modules/@babel/traverse/lib/path/inference/index.js
  76345. var require_inference2 = __commonJS({
  76346. "node_modules/@babel/traverse/lib/path/inference/index.js"(exports) {
  76347. "use strict";
  76348. Object.defineProperty(exports, "__esModule", {
  76349. value: true
  76350. });
  76351. exports.getTypeAnnotation = getTypeAnnotation;
  76352. exports._getTypeAnnotation = _getTypeAnnotation;
  76353. exports.isBaseType = isBaseType;
  76354. exports.couldBeBaseType = couldBeBaseType;
  76355. exports.baseTypeStrictlyMatches = baseTypeStrictlyMatches;
  76356. exports.isGenericType = isGenericType;
  76357. var inferers = require_inferers2();
  76358. var t2 = require_lib2();
  76359. function getTypeAnnotation() {
  76360. if (this.typeAnnotation)
  76361. return this.typeAnnotation;
  76362. let type = this._getTypeAnnotation() || t2.anyTypeAnnotation();
  76363. if (t2.isTypeAnnotation(type))
  76364. type = type.typeAnnotation;
  76365. return this.typeAnnotation = type;
  76366. }
  76367. var typeAnnotationInferringNodes = /* @__PURE__ */ new WeakSet();
  76368. function _getTypeAnnotation() {
  76369. const node = this.node;
  76370. if (!node) {
  76371. if (this.key === "init" && this.parentPath.isVariableDeclarator()) {
  76372. const declar = this.parentPath.parentPath;
  76373. const declarParent = declar.parentPath;
  76374. if (declar.key === "left" && declarParent.isForInStatement()) {
  76375. return t2.stringTypeAnnotation();
  76376. }
  76377. if (declar.key === "left" && declarParent.isForOfStatement()) {
  76378. return t2.anyTypeAnnotation();
  76379. }
  76380. return t2.voidTypeAnnotation();
  76381. } else {
  76382. return;
  76383. }
  76384. }
  76385. if (node.typeAnnotation) {
  76386. return node.typeAnnotation;
  76387. }
  76388. if (typeAnnotationInferringNodes.has(node)) {
  76389. return;
  76390. }
  76391. typeAnnotationInferringNodes.add(node);
  76392. try {
  76393. var _inferer;
  76394. let inferer = inferers[node.type];
  76395. if (inferer) {
  76396. return inferer.call(this, node);
  76397. }
  76398. inferer = inferers[this.parentPath.type];
  76399. if ((_inferer = inferer) != null && _inferer.validParent) {
  76400. return this.parentPath.getTypeAnnotation();
  76401. }
  76402. } finally {
  76403. typeAnnotationInferringNodes.delete(node);
  76404. }
  76405. }
  76406. function isBaseType(baseName, soft) {
  76407. return _isBaseType(baseName, this.getTypeAnnotation(), soft);
  76408. }
  76409. function _isBaseType(baseName, type, soft) {
  76410. if (baseName === "string") {
  76411. return t2.isStringTypeAnnotation(type);
  76412. } else if (baseName === "number") {
  76413. return t2.isNumberTypeAnnotation(type);
  76414. } else if (baseName === "boolean") {
  76415. return t2.isBooleanTypeAnnotation(type);
  76416. } else if (baseName === "any") {
  76417. return t2.isAnyTypeAnnotation(type);
  76418. } else if (baseName === "mixed") {
  76419. return t2.isMixedTypeAnnotation(type);
  76420. } else if (baseName === "empty") {
  76421. return t2.isEmptyTypeAnnotation(type);
  76422. } else if (baseName === "void") {
  76423. return t2.isVoidTypeAnnotation(type);
  76424. } else {
  76425. if (soft) {
  76426. return false;
  76427. } else {
  76428. throw new Error(`Unknown base type ${baseName}`);
  76429. }
  76430. }
  76431. }
  76432. function couldBeBaseType(name2) {
  76433. const type = this.getTypeAnnotation();
  76434. if (t2.isAnyTypeAnnotation(type))
  76435. return true;
  76436. if (t2.isUnionTypeAnnotation(type)) {
  76437. for (const type2 of type.types) {
  76438. if (t2.isAnyTypeAnnotation(type2) || _isBaseType(name2, type2, true)) {
  76439. return true;
  76440. }
  76441. }
  76442. return false;
  76443. } else {
  76444. return _isBaseType(name2, type, true);
  76445. }
  76446. }
  76447. function baseTypeStrictlyMatches(rightArg) {
  76448. const left = this.getTypeAnnotation();
  76449. const right = rightArg.getTypeAnnotation();
  76450. if (!t2.isAnyTypeAnnotation(left) && t2.isFlowBaseAnnotation(left)) {
  76451. return right.type === left.type;
  76452. }
  76453. return false;
  76454. }
  76455. function isGenericType(genericName) {
  76456. const type = this.getTypeAnnotation();
  76457. return t2.isGenericTypeAnnotation(type) && t2.isIdentifier(type.id, {
  76458. name: genericName
  76459. });
  76460. }
  76461. }
  76462. });
  76463. // node_modules/@babel/traverse/node_modules/@babel/helper-validator-identifier/lib/identifier.js
  76464. var require_identifier5 = __commonJS({
  76465. "node_modules/@babel/traverse/node_modules/@babel/helper-validator-identifier/lib/identifier.js"(exports) {
  76466. "use strict";
  76467. Object.defineProperty(exports, "__esModule", {
  76468. value: true
  76469. });
  76470. exports.isIdentifierStart = isIdentifierStart2;
  76471. exports.isIdentifierChar = isIdentifierChar2;
  76472. exports.isIdentifierName = isIdentifierName;
  76473. var nonASCIIidentifierStartChars2 = "\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u08A0-\u08B4\u08B6-\u08C7\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1878\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309B-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u31BF\u31F0-\u31FF\u3400-\u4DBF\u4E00-\u9FFC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7BF\uA7C2-\uA7CA\uA7F5-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC";
  76474. var nonASCIIidentifierChars2 = "\u200C\u200D\xB7\u0300-\u036F\u0387\u0483-\u0487\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u0669\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u06F0-\u06F9\u0711\u0730-\u074A\u07A6-\u07B0\u07C0-\u07C9\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u08D3-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0966-\u096F\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u09E6-\u09EF\u09FE\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A66-\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0AE6-\u0AEF\u0AFA-\u0AFF\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B55-\u0B57\u0B62\u0B63\u0B66-\u0B6F\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0BE6-\u0BEF\u0C00-\u0C04\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C66-\u0C6F\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0CE6-\u0CEF\u0D00-\u0D03\u0D3B\u0D3C\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D66-\u0D6F\u0D81-\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0E50-\u0E59\u0EB1\u0EB4-\u0EBC\u0EC8-\u0ECD\u0ED0-\u0ED9\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1040-\u1049\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F-\u109D\u135D-\u135F\u1369-\u1371\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u18A9\u1920-\u192B\u1930-\u193B\u1946-\u194F\u19D0-\u19DA\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AB0-\u1ABD\u1ABF\u1AC0\u1B00-\u1B04\u1B34-\u1B44\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BB0-\u1BB9\u1BE6-\u1BF3\u1C24-\u1C37\u1C40-\u1C49\u1C50-\u1C59\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF4\u1CF7-\u1CF9\u1DC0-\u1DF9\u1DFB-\u1DFF\u203F\u2040\u2054\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA620-\uA629\uA66F\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA82C\uA880\uA881\uA8B4-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F1\uA8FF-\uA909\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9D0-\uA9D9\uA9E5\uA9F0-\uA9F9\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA50-\uAA59\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uABF0-\uABF9\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFF10-\uFF19\uFF3F";
  76475. var nonASCIIidentifierStart2 = new RegExp("[" + nonASCIIidentifierStartChars2 + "]");
  76476. var nonASCIIidentifier2 = new RegExp("[" + nonASCIIidentifierStartChars2 + nonASCIIidentifierChars2 + "]");
  76477. nonASCIIidentifierStartChars2 = nonASCIIidentifierChars2 = null;
  76478. var astralIdentifierStartCodes2 = [0, 11, 2, 25, 2, 18, 2, 1, 2, 14, 3, 13, 35, 122, 70, 52, 268, 28, 4, 48, 48, 31, 14, 29, 6, 37, 11, 29, 3, 35, 5, 7, 2, 4, 43, 157, 19, 35, 5, 35, 5, 39, 9, 51, 157, 310, 10, 21, 11, 7, 153, 5, 3, 0, 2, 43, 2, 1, 4, 0, 3, 22, 11, 22, 10, 30, 66, 18, 2, 1, 11, 21, 11, 25, 71, 55, 7, 1, 65, 0, 16, 3, 2, 2, 2, 28, 43, 28, 4, 28, 36, 7, 2, 27, 28, 53, 11, 21, 11, 18, 14, 17, 111, 72, 56, 50, 14, 50, 14, 35, 349, 41, 7, 1, 79, 28, 11, 0, 9, 21, 107, 20, 28, 22, 13, 52, 76, 44, 33, 24, 27, 35, 30, 0, 3, 0, 9, 34, 4, 0, 13, 47, 15, 3, 22, 0, 2, 0, 36, 17, 2, 24, 85, 6, 2, 0, 2, 3, 2, 14, 2, 9, 8, 46, 39, 7, 3, 1, 3, 21, 2, 6, 2, 1, 2, 4, 4, 0, 19, 0, 13, 4, 159, 52, 19, 3, 21, 2, 31, 47, 21, 1, 2, 0, 185, 46, 42, 3, 37, 47, 21, 0, 60, 42, 14, 0, 72, 26, 230, 43, 117, 63, 32, 7, 3, 0, 3, 7, 2, 1, 2, 23, 16, 0, 2, 0, 95, 7, 3, 38, 17, 0, 2, 0, 29, 0, 11, 39, 8, 0, 22, 0, 12, 45, 20, 0, 35, 56, 264, 8, 2, 36, 18, 0, 50, 29, 113, 6, 2, 1, 2, 37, 22, 0, 26, 5, 2, 1, 2, 31, 15, 0, 328, 18, 190, 0, 80, 921, 103, 110, 18, 195, 2749, 1070, 4050, 582, 8634, 568, 8, 30, 114, 29, 19, 47, 17, 3, 32, 20, 6, 18, 689, 63, 129, 74, 6, 0, 67, 12, 65, 1, 2, 0, 29, 6135, 9, 1237, 43, 8, 8952, 286, 50, 2, 18, 3, 9, 395, 2309, 106, 6, 12, 4, 8, 8, 9, 5991, 84, 2, 70, 2, 1, 3, 0, 3, 1, 3, 3, 2, 11, 2, 0, 2, 6, 2, 64, 2, 3, 3, 7, 2, 6, 2, 27, 2, 3, 2, 4, 2, 0, 4, 6, 2, 339, 3, 24, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 7, 2357, 44, 11, 6, 17, 0, 370, 43, 1301, 196, 60, 67, 8, 0, 1205, 3, 2, 26, 2, 1, 2, 0, 3, 0, 2, 9, 2, 3, 2, 0, 2, 0, 7, 0, 5, 0, 2, 0, 2, 0, 2, 2, 2, 1, 2, 0, 3, 0, 2, 0, 2, 0, 2, 0, 2, 0, 2, 1, 2, 0, 3, 3, 2, 6, 2, 3, 2, 3, 2, 0, 2, 9, 2, 16, 6, 2, 2, 4, 2, 16, 4421, 42717, 35, 4148, 12, 221, 3, 5761, 15, 7472, 3104, 541, 1507, 4938];
  76479. var astralIdentifierCodes2 = [509, 0, 227, 0, 150, 4, 294, 9, 1368, 2, 2, 1, 6, 3, 41, 2, 5, 0, 166, 1, 574, 3, 9, 9, 370, 1, 154, 10, 176, 2, 54, 14, 32, 9, 16, 3, 46, 10, 54, 9, 7, 2, 37, 13, 2, 9, 6, 1, 45, 0, 13, 2, 49, 13, 9, 3, 2, 11, 83, 11, 7, 0, 161, 11, 6, 9, 7, 3, 56, 1, 2, 6, 3, 1, 3, 2, 10, 0, 11, 1, 3, 6, 4, 4, 193, 17, 10, 9, 5, 0, 82, 19, 13, 9, 214, 6, 3, 8, 28, 1, 83, 16, 16, 9, 82, 12, 9, 9, 84, 14, 5, 9, 243, 14, 166, 9, 71, 5, 2, 1, 3, 3, 2, 0, 2, 1, 13, 9, 120, 6, 3, 6, 4, 0, 29, 9, 41, 6, 2, 3, 9, 0, 10, 10, 47, 15, 406, 7, 2, 7, 17, 9, 57, 21, 2, 13, 123, 5, 4, 0, 2, 1, 2, 6, 2, 0, 9, 9, 49, 4, 2, 1, 2, 4, 9, 9, 330, 3, 19306, 9, 135, 4, 60, 6, 26, 9, 1014, 0, 2, 54, 8, 3, 82, 0, 12, 1, 19628, 1, 5319, 4, 4, 5, 9, 7, 3, 6, 31, 3, 149, 2, 1418, 49, 513, 54, 5, 49, 9, 0, 15, 0, 23, 4, 2, 14, 1361, 6, 2, 16, 3, 6, 2, 1, 2, 4, 262, 6, 10, 9, 419, 13, 1495, 6, 110, 6, 6, 9, 4759, 9, 787719, 239];
  76480. function isInAstralSet2(code2, set) {
  76481. let pos = 65536;
  76482. for (let i = 0, length = set.length; i < length; i += 2) {
  76483. pos += set[i];
  76484. if (pos > code2)
  76485. return false;
  76486. pos += set[i + 1];
  76487. if (pos >= code2)
  76488. return true;
  76489. }
  76490. return false;
  76491. }
  76492. function isIdentifierStart2(code2) {
  76493. if (code2 < 65)
  76494. return code2 === 36;
  76495. if (code2 <= 90)
  76496. return true;
  76497. if (code2 < 97)
  76498. return code2 === 95;
  76499. if (code2 <= 122)
  76500. return true;
  76501. if (code2 <= 65535) {
  76502. return code2 >= 170 && nonASCIIidentifierStart2.test(String.fromCharCode(code2));
  76503. }
  76504. return isInAstralSet2(code2, astralIdentifierStartCodes2);
  76505. }
  76506. function isIdentifierChar2(code2) {
  76507. if (code2 < 48)
  76508. return code2 === 36;
  76509. if (code2 < 58)
  76510. return true;
  76511. if (code2 < 65)
  76512. return false;
  76513. if (code2 <= 90)
  76514. return true;
  76515. if (code2 < 97)
  76516. return code2 === 95;
  76517. if (code2 <= 122)
  76518. return true;
  76519. if (code2 <= 65535) {
  76520. return code2 >= 170 && nonASCIIidentifier2.test(String.fromCharCode(code2));
  76521. }
  76522. return isInAstralSet2(code2, astralIdentifierStartCodes2) || isInAstralSet2(code2, astralIdentifierCodes2);
  76523. }
  76524. function isIdentifierName(name2) {
  76525. let isFirst = true;
  76526. for (let i = 0; i < name2.length; i++) {
  76527. let cp = name2.charCodeAt(i);
  76528. if ((cp & 64512) === 55296 && i + 1 < name2.length) {
  76529. const trail = name2.charCodeAt(++i);
  76530. if ((trail & 64512) === 56320) {
  76531. cp = 65536 + ((cp & 1023) << 10) + (trail & 1023);
  76532. }
  76533. }
  76534. if (isFirst) {
  76535. isFirst = false;
  76536. if (!isIdentifierStart2(cp)) {
  76537. return false;
  76538. }
  76539. } else if (!isIdentifierChar2(cp)) {
  76540. return false;
  76541. }
  76542. }
  76543. return !isFirst;
  76544. }
  76545. }
  76546. });
  76547. // node_modules/@babel/traverse/node_modules/@babel/helper-validator-identifier/lib/keyword.js
  76548. var require_keyword5 = __commonJS({
  76549. "node_modules/@babel/traverse/node_modules/@babel/helper-validator-identifier/lib/keyword.js"(exports) {
  76550. "use strict";
  76551. Object.defineProperty(exports, "__esModule", {
  76552. value: true
  76553. });
  76554. exports.isReservedWord = isReservedWord;
  76555. exports.isStrictReservedWord = isStrictReservedWord;
  76556. exports.isStrictBindOnlyReservedWord = isStrictBindOnlyReservedWord;
  76557. exports.isStrictBindReservedWord = isStrictBindReservedWord;
  76558. exports.isKeyword = isKeyword;
  76559. var reservedWords2 = {
  76560. keyword: ["break", "case", "catch", "continue", "debugger", "default", "do", "else", "finally", "for", "function", "if", "return", "switch", "throw", "try", "var", "const", "while", "with", "new", "this", "super", "class", "extends", "export", "import", "null", "true", "false", "in", "instanceof", "typeof", "void", "delete"],
  76561. strict: ["implements", "interface", "let", "package", "private", "protected", "public", "static", "yield"],
  76562. strictBind: ["eval", "arguments"]
  76563. };
  76564. var keywords2 = new Set(reservedWords2.keyword);
  76565. var reservedWordsStrictSet = new Set(reservedWords2.strict);
  76566. var reservedWordsStrictBindSet = new Set(reservedWords2.strictBind);
  76567. function isReservedWord(word, inModule) {
  76568. return inModule && word === "await" || word === "enum";
  76569. }
  76570. function isStrictReservedWord(word, inModule) {
  76571. return isReservedWord(word, inModule) || reservedWordsStrictSet.has(word);
  76572. }
  76573. function isStrictBindOnlyReservedWord(word) {
  76574. return reservedWordsStrictBindSet.has(word);
  76575. }
  76576. function isStrictBindReservedWord(word, inModule) {
  76577. return isStrictReservedWord(word, inModule) || isStrictBindOnlyReservedWord(word);
  76578. }
  76579. function isKeyword(word) {
  76580. return keywords2.has(word);
  76581. }
  76582. }
  76583. });
  76584. // node_modules/@babel/traverse/node_modules/@babel/helper-validator-identifier/lib/index.js
  76585. var require_lib19 = __commonJS({
  76586. "node_modules/@babel/traverse/node_modules/@babel/helper-validator-identifier/lib/index.js"(exports) {
  76587. "use strict";
  76588. Object.defineProperty(exports, "__esModule", {
  76589. value: true
  76590. });
  76591. Object.defineProperty(exports, "isIdentifierName", {
  76592. enumerable: true,
  76593. get: function() {
  76594. return _identifier.isIdentifierName;
  76595. }
  76596. });
  76597. Object.defineProperty(exports, "isIdentifierChar", {
  76598. enumerable: true,
  76599. get: function() {
  76600. return _identifier.isIdentifierChar;
  76601. }
  76602. });
  76603. Object.defineProperty(exports, "isIdentifierStart", {
  76604. enumerable: true,
  76605. get: function() {
  76606. return _identifier.isIdentifierStart;
  76607. }
  76608. });
  76609. Object.defineProperty(exports, "isReservedWord", {
  76610. enumerable: true,
  76611. get: function() {
  76612. return _keyword.isReservedWord;
  76613. }
  76614. });
  76615. Object.defineProperty(exports, "isStrictBindOnlyReservedWord", {
  76616. enumerable: true,
  76617. get: function() {
  76618. return _keyword.isStrictBindOnlyReservedWord;
  76619. }
  76620. });
  76621. Object.defineProperty(exports, "isStrictBindReservedWord", {
  76622. enumerable: true,
  76623. get: function() {
  76624. return _keyword.isStrictBindReservedWord;
  76625. }
  76626. });
  76627. Object.defineProperty(exports, "isStrictReservedWord", {
  76628. enumerable: true,
  76629. get: function() {
  76630. return _keyword.isStrictReservedWord;
  76631. }
  76632. });
  76633. Object.defineProperty(exports, "isKeyword", {
  76634. enumerable: true,
  76635. get: function() {
  76636. return _keyword.isKeyword;
  76637. }
  76638. });
  76639. var _identifier = require_identifier5();
  76640. var _keyword = require_keyword5();
  76641. }
  76642. });
  76643. // node_modules/@babel/traverse/node_modules/color-name/index.js
  76644. var require_color_name2 = __commonJS({
  76645. "node_modules/@babel/traverse/node_modules/color-name/index.js"(exports, module) {
  76646. "use strict";
  76647. module.exports = {
  76648. "aliceblue": [240, 248, 255],
  76649. "antiquewhite": [250, 235, 215],
  76650. "aqua": [0, 255, 255],
  76651. "aquamarine": [127, 255, 212],
  76652. "azure": [240, 255, 255],
  76653. "beige": [245, 245, 220],
  76654. "bisque": [255, 228, 196],
  76655. "black": [0, 0, 0],
  76656. "blanchedalmond": [255, 235, 205],
  76657. "blue": [0, 0, 255],
  76658. "blueviolet": [138, 43, 226],
  76659. "brown": [165, 42, 42],
  76660. "burlywood": [222, 184, 135],
  76661. "cadetblue": [95, 158, 160],
  76662. "chartreuse": [127, 255, 0],
  76663. "chocolate": [210, 105, 30],
  76664. "coral": [255, 127, 80],
  76665. "cornflowerblue": [100, 149, 237],
  76666. "cornsilk": [255, 248, 220],
  76667. "crimson": [220, 20, 60],
  76668. "cyan": [0, 255, 255],
  76669. "darkblue": [0, 0, 139],
  76670. "darkcyan": [0, 139, 139],
  76671. "darkgoldenrod": [184, 134, 11],
  76672. "darkgray": [169, 169, 169],
  76673. "darkgreen": [0, 100, 0],
  76674. "darkgrey": [169, 169, 169],
  76675. "darkkhaki": [189, 183, 107],
  76676. "darkmagenta": [139, 0, 139],
  76677. "darkolivegreen": [85, 107, 47],
  76678. "darkorange": [255, 140, 0],
  76679. "darkorchid": [153, 50, 204],
  76680. "darkred": [139, 0, 0],
  76681. "darksalmon": [233, 150, 122],
  76682. "darkseagreen": [143, 188, 143],
  76683. "darkslateblue": [72, 61, 139],
  76684. "darkslategray": [47, 79, 79],
  76685. "darkslategrey": [47, 79, 79],
  76686. "darkturquoise": [0, 206, 209],
  76687. "darkviolet": [148, 0, 211],
  76688. "deeppink": [255, 20, 147],
  76689. "deepskyblue": [0, 191, 255],
  76690. "dimgray": [105, 105, 105],
  76691. "dimgrey": [105, 105, 105],
  76692. "dodgerblue": [30, 144, 255],
  76693. "firebrick": [178, 34, 34],
  76694. "floralwhite": [255, 250, 240],
  76695. "forestgreen": [34, 139, 34],
  76696. "fuchsia": [255, 0, 255],
  76697. "gainsboro": [220, 220, 220],
  76698. "ghostwhite": [248, 248, 255],
  76699. "gold": [255, 215, 0],
  76700. "goldenrod": [218, 165, 32],
  76701. "gray": [128, 128, 128],
  76702. "green": [0, 128, 0],
  76703. "greenyellow": [173, 255, 47],
  76704. "grey": [128, 128, 128],
  76705. "honeydew": [240, 255, 240],
  76706. "hotpink": [255, 105, 180],
  76707. "indianred": [205, 92, 92],
  76708. "indigo": [75, 0, 130],
  76709. "ivory": [255, 255, 240],
  76710. "khaki": [240, 230, 140],
  76711. "lavender": [230, 230, 250],
  76712. "lavenderblush": [255, 240, 245],
  76713. "lawngreen": [124, 252, 0],
  76714. "lemonchiffon": [255, 250, 205],
  76715. "lightblue": [173, 216, 230],
  76716. "lightcoral": [240, 128, 128],
  76717. "lightcyan": [224, 255, 255],
  76718. "lightgoldenrodyellow": [250, 250, 210],
  76719. "lightgray": [211, 211, 211],
  76720. "lightgreen": [144, 238, 144],
  76721. "lightgrey": [211, 211, 211],
  76722. "lightpink": [255, 182, 193],
  76723. "lightsalmon": [255, 160, 122],
  76724. "lightseagreen": [32, 178, 170],
  76725. "lightskyblue": [135, 206, 250],
  76726. "lightslategray": [119, 136, 153],
  76727. "lightslategrey": [119, 136, 153],
  76728. "lightsteelblue": [176, 196, 222],
  76729. "lightyellow": [255, 255, 224],
  76730. "lime": [0, 255, 0],
  76731. "limegreen": [50, 205, 50],
  76732. "linen": [250, 240, 230],
  76733. "magenta": [255, 0, 255],
  76734. "maroon": [128, 0, 0],
  76735. "mediumaquamarine": [102, 205, 170],
  76736. "mediumblue": [0, 0, 205],
  76737. "mediumorchid": [186, 85, 211],
  76738. "mediumpurple": [147, 112, 219],
  76739. "mediumseagreen": [60, 179, 113],
  76740. "mediumslateblue": [123, 104, 238],
  76741. "mediumspringgreen": [0, 250, 154],
  76742. "mediumturquoise": [72, 209, 204],
  76743. "mediumvioletred": [199, 21, 133],
  76744. "midnightblue": [25, 25, 112],
  76745. "mintcream": [245, 255, 250],
  76746. "mistyrose": [255, 228, 225],
  76747. "moccasin": [255, 228, 181],
  76748. "navajowhite": [255, 222, 173],
  76749. "navy": [0, 0, 128],
  76750. "oldlace": [253, 245, 230],
  76751. "olive": [128, 128, 0],
  76752. "olivedrab": [107, 142, 35],
  76753. "orange": [255, 165, 0],
  76754. "orangered": [255, 69, 0],
  76755. "orchid": [218, 112, 214],
  76756. "palegoldenrod": [238, 232, 170],
  76757. "palegreen": [152, 251, 152],
  76758. "paleturquoise": [175, 238, 238],
  76759. "palevioletred": [219, 112, 147],
  76760. "papayawhip": [255, 239, 213],
  76761. "peachpuff": [255, 218, 185],
  76762. "peru": [205, 133, 63],
  76763. "pink": [255, 192, 203],
  76764. "plum": [221, 160, 221],
  76765. "powderblue": [176, 224, 230],
  76766. "purple": [128, 0, 128],
  76767. "rebeccapurple": [102, 51, 153],
  76768. "red": [255, 0, 0],
  76769. "rosybrown": [188, 143, 143],
  76770. "royalblue": [65, 105, 225],
  76771. "saddlebrown": [139, 69, 19],
  76772. "salmon": [250, 128, 114],
  76773. "sandybrown": [244, 164, 96],
  76774. "seagreen": [46, 139, 87],
  76775. "seashell": [255, 245, 238],
  76776. "sienna": [160, 82, 45],
  76777. "silver": [192, 192, 192],
  76778. "skyblue": [135, 206, 235],
  76779. "slateblue": [106, 90, 205],
  76780. "slategray": [112, 128, 144],
  76781. "slategrey": [112, 128, 144],
  76782. "snow": [255, 250, 250],
  76783. "springgreen": [0, 255, 127],
  76784. "steelblue": [70, 130, 180],
  76785. "tan": [210, 180, 140],
  76786. "teal": [0, 128, 128],
  76787. "thistle": [216, 191, 216],
  76788. "tomato": [255, 99, 71],
  76789. "turquoise": [64, 224, 208],
  76790. "violet": [238, 130, 238],
  76791. "wheat": [245, 222, 179],
  76792. "white": [255, 255, 255],
  76793. "whitesmoke": [245, 245, 245],
  76794. "yellow": [255, 255, 0],
  76795. "yellowgreen": [154, 205, 50]
  76796. };
  76797. }
  76798. });
  76799. // node_modules/@babel/traverse/node_modules/color-convert/conversions.js
  76800. var require_conversions2 = __commonJS({
  76801. "node_modules/@babel/traverse/node_modules/color-convert/conversions.js"(exports, module) {
  76802. var cssKeywords = require_color_name2();
  76803. var reverseKeywords = {};
  76804. for (key in cssKeywords) {
  76805. if (cssKeywords.hasOwnProperty(key)) {
  76806. reverseKeywords[cssKeywords[key]] = key;
  76807. }
  76808. }
  76809. var key;
  76810. var convert2 = module.exports = {
  76811. rgb: { channels: 3, labels: "rgb" },
  76812. hsl: { channels: 3, labels: "hsl" },
  76813. hsv: { channels: 3, labels: "hsv" },
  76814. hwb: { channels: 3, labels: "hwb" },
  76815. cmyk: { channels: 4, labels: "cmyk" },
  76816. xyz: { channels: 3, labels: "xyz" },
  76817. lab: { channels: 3, labels: "lab" },
  76818. lch: { channels: 3, labels: "lch" },
  76819. hex: { channels: 1, labels: ["hex"] },
  76820. keyword: { channels: 1, labels: ["keyword"] },
  76821. ansi16: { channels: 1, labels: ["ansi16"] },
  76822. ansi256: { channels: 1, labels: ["ansi256"] },
  76823. hcg: { channels: 3, labels: ["h", "c", "g"] },
  76824. apple: { channels: 3, labels: ["r16", "g16", "b16"] },
  76825. gray: { channels: 1, labels: ["gray"] }
  76826. };
  76827. for (model in convert2) {
  76828. if (convert2.hasOwnProperty(model)) {
  76829. if (!("channels" in convert2[model])) {
  76830. throw new Error("missing channels property: " + model);
  76831. }
  76832. if (!("labels" in convert2[model])) {
  76833. throw new Error("missing channel labels property: " + model);
  76834. }
  76835. if (convert2[model].labels.length !== convert2[model].channels) {
  76836. throw new Error("channel and label counts mismatch: " + model);
  76837. }
  76838. channels = convert2[model].channels;
  76839. labels = convert2[model].labels;
  76840. delete convert2[model].channels;
  76841. delete convert2[model].labels;
  76842. Object.defineProperty(convert2[model], "channels", { value: channels });
  76843. Object.defineProperty(convert2[model], "labels", { value: labels });
  76844. }
  76845. }
  76846. var channels;
  76847. var labels;
  76848. var model;
  76849. convert2.rgb.hsl = function(rgb) {
  76850. var r = rgb[0] / 255;
  76851. var g = rgb[1] / 255;
  76852. var b = rgb[2] / 255;
  76853. var min = Math.min(r, g, b);
  76854. var max = Math.max(r, g, b);
  76855. var delta = max - min;
  76856. var h;
  76857. var s;
  76858. var l;
  76859. if (max === min) {
  76860. h = 0;
  76861. } else if (r === max) {
  76862. h = (g - b) / delta;
  76863. } else if (g === max) {
  76864. h = 2 + (b - r) / delta;
  76865. } else if (b === max) {
  76866. h = 4 + (r - g) / delta;
  76867. }
  76868. h = Math.min(h * 60, 360);
  76869. if (h < 0) {
  76870. h += 360;
  76871. }
  76872. l = (min + max) / 2;
  76873. if (max === min) {
  76874. s = 0;
  76875. } else if (l <= 0.5) {
  76876. s = delta / (max + min);
  76877. } else {
  76878. s = delta / (2 - max - min);
  76879. }
  76880. return [h, s * 100, l * 100];
  76881. };
  76882. convert2.rgb.hsv = function(rgb) {
  76883. var rdif;
  76884. var gdif;
  76885. var bdif;
  76886. var h;
  76887. var s;
  76888. var r = rgb[0] / 255;
  76889. var g = rgb[1] / 255;
  76890. var b = rgb[2] / 255;
  76891. var v = Math.max(r, g, b);
  76892. var diff = v - Math.min(r, g, b);
  76893. var diffc = function(c) {
  76894. return (v - c) / 6 / diff + 1 / 2;
  76895. };
  76896. if (diff === 0) {
  76897. h = s = 0;
  76898. } else {
  76899. s = diff / v;
  76900. rdif = diffc(r);
  76901. gdif = diffc(g);
  76902. bdif = diffc(b);
  76903. if (r === v) {
  76904. h = bdif - gdif;
  76905. } else if (g === v) {
  76906. h = 1 / 3 + rdif - bdif;
  76907. } else if (b === v) {
  76908. h = 2 / 3 + gdif - rdif;
  76909. }
  76910. if (h < 0) {
  76911. h += 1;
  76912. } else if (h > 1) {
  76913. h -= 1;
  76914. }
  76915. }
  76916. return [
  76917. h * 360,
  76918. s * 100,
  76919. v * 100
  76920. ];
  76921. };
  76922. convert2.rgb.hwb = function(rgb) {
  76923. var r = rgb[0];
  76924. var g = rgb[1];
  76925. var b = rgb[2];
  76926. var h = convert2.rgb.hsl(rgb)[0];
  76927. var w = 1 / 255 * Math.min(r, Math.min(g, b));
  76928. b = 1 - 1 / 255 * Math.max(r, Math.max(g, b));
  76929. return [h, w * 100, b * 100];
  76930. };
  76931. convert2.rgb.cmyk = function(rgb) {
  76932. var r = rgb[0] / 255;
  76933. var g = rgb[1] / 255;
  76934. var b = rgb[2] / 255;
  76935. var c;
  76936. var m;
  76937. var y;
  76938. var k;
  76939. k = Math.min(1 - r, 1 - g, 1 - b);
  76940. c = (1 - r - k) / (1 - k) || 0;
  76941. m = (1 - g - k) / (1 - k) || 0;
  76942. y = (1 - b - k) / (1 - k) || 0;
  76943. return [c * 100, m * 100, y * 100, k * 100];
  76944. };
  76945. function comparativeDistance(x, y) {
  76946. return Math.pow(x[0] - y[0], 2) + Math.pow(x[1] - y[1], 2) + Math.pow(x[2] - y[2], 2);
  76947. }
  76948. convert2.rgb.keyword = function(rgb) {
  76949. var reversed = reverseKeywords[rgb];
  76950. if (reversed) {
  76951. return reversed;
  76952. }
  76953. var currentClosestDistance = Infinity;
  76954. var currentClosestKeyword;
  76955. for (var keyword in cssKeywords) {
  76956. if (cssKeywords.hasOwnProperty(keyword)) {
  76957. var value = cssKeywords[keyword];
  76958. var distance = comparativeDistance(rgb, value);
  76959. if (distance < currentClosestDistance) {
  76960. currentClosestDistance = distance;
  76961. currentClosestKeyword = keyword;
  76962. }
  76963. }
  76964. }
  76965. return currentClosestKeyword;
  76966. };
  76967. convert2.keyword.rgb = function(keyword) {
  76968. return cssKeywords[keyword];
  76969. };
  76970. convert2.rgb.xyz = function(rgb) {
  76971. var r = rgb[0] / 255;
  76972. var g = rgb[1] / 255;
  76973. var b = rgb[2] / 255;
  76974. r = r > 0.04045 ? Math.pow((r + 0.055) / 1.055, 2.4) : r / 12.92;
  76975. g = g > 0.04045 ? Math.pow((g + 0.055) / 1.055, 2.4) : g / 12.92;
  76976. b = b > 0.04045 ? Math.pow((b + 0.055) / 1.055, 2.4) : b / 12.92;
  76977. var x = r * 0.4124 + g * 0.3576 + b * 0.1805;
  76978. var y = r * 0.2126 + g * 0.7152 + b * 0.0722;
  76979. var z = r * 0.0193 + g * 0.1192 + b * 0.9505;
  76980. return [x * 100, y * 100, z * 100];
  76981. };
  76982. convert2.rgb.lab = function(rgb) {
  76983. var xyz = convert2.rgb.xyz(rgb);
  76984. var x = xyz[0];
  76985. var y = xyz[1];
  76986. var z = xyz[2];
  76987. var l;
  76988. var a;
  76989. var b;
  76990. x /= 95.047;
  76991. y /= 100;
  76992. z /= 108.883;
  76993. x = x > 8856e-6 ? Math.pow(x, 1 / 3) : 7.787 * x + 16 / 116;
  76994. y = y > 8856e-6 ? Math.pow(y, 1 / 3) : 7.787 * y + 16 / 116;
  76995. z = z > 8856e-6 ? Math.pow(z, 1 / 3) : 7.787 * z + 16 / 116;
  76996. l = 116 * y - 16;
  76997. a = 500 * (x - y);
  76998. b = 200 * (y - z);
  76999. return [l, a, b];
  77000. };
  77001. convert2.hsl.rgb = function(hsl) {
  77002. var h = hsl[0] / 360;
  77003. var s = hsl[1] / 100;
  77004. var l = hsl[2] / 100;
  77005. var t1;
  77006. var t2;
  77007. var t3;
  77008. var rgb;
  77009. var val;
  77010. if (s === 0) {
  77011. val = l * 255;
  77012. return [val, val, val];
  77013. }
  77014. if (l < 0.5) {
  77015. t2 = l * (1 + s);
  77016. } else {
  77017. t2 = l + s - l * s;
  77018. }
  77019. t1 = 2 * l - t2;
  77020. rgb = [0, 0, 0];
  77021. for (var i = 0; i < 3; i++) {
  77022. t3 = h + 1 / 3 * -(i - 1);
  77023. if (t3 < 0) {
  77024. t3++;
  77025. }
  77026. if (t3 > 1) {
  77027. t3--;
  77028. }
  77029. if (6 * t3 < 1) {
  77030. val = t1 + (t2 - t1) * 6 * t3;
  77031. } else if (2 * t3 < 1) {
  77032. val = t2;
  77033. } else if (3 * t3 < 2) {
  77034. val = t1 + (t2 - t1) * (2 / 3 - t3) * 6;
  77035. } else {
  77036. val = t1;
  77037. }
  77038. rgb[i] = val * 255;
  77039. }
  77040. return rgb;
  77041. };
  77042. convert2.hsl.hsv = function(hsl) {
  77043. var h = hsl[0];
  77044. var s = hsl[1] / 100;
  77045. var l = hsl[2] / 100;
  77046. var smin = s;
  77047. var lmin = Math.max(l, 0.01);
  77048. var sv;
  77049. var v;
  77050. l *= 2;
  77051. s *= l <= 1 ? l : 2 - l;
  77052. smin *= lmin <= 1 ? lmin : 2 - lmin;
  77053. v = (l + s) / 2;
  77054. sv = l === 0 ? 2 * smin / (lmin + smin) : 2 * s / (l + s);
  77055. return [h, sv * 100, v * 100];
  77056. };
  77057. convert2.hsv.rgb = function(hsv) {
  77058. var h = hsv[0] / 60;
  77059. var s = hsv[1] / 100;
  77060. var v = hsv[2] / 100;
  77061. var hi = Math.floor(h) % 6;
  77062. var f = h - Math.floor(h);
  77063. var p = 255 * v * (1 - s);
  77064. var q = 255 * v * (1 - s * f);
  77065. var t2 = 255 * v * (1 - s * (1 - f));
  77066. v *= 255;
  77067. switch (hi) {
  77068. case 0:
  77069. return [v, t2, p];
  77070. case 1:
  77071. return [q, v, p];
  77072. case 2:
  77073. return [p, v, t2];
  77074. case 3:
  77075. return [p, q, v];
  77076. case 4:
  77077. return [t2, p, v];
  77078. case 5:
  77079. return [v, p, q];
  77080. }
  77081. };
  77082. convert2.hsv.hsl = function(hsv) {
  77083. var h = hsv[0];
  77084. var s = hsv[1] / 100;
  77085. var v = hsv[2] / 100;
  77086. var vmin = Math.max(v, 0.01);
  77087. var lmin;
  77088. var sl;
  77089. var l;
  77090. l = (2 - s) * v;
  77091. lmin = (2 - s) * vmin;
  77092. sl = s * vmin;
  77093. sl /= lmin <= 1 ? lmin : 2 - lmin;
  77094. sl = sl || 0;
  77095. l /= 2;
  77096. return [h, sl * 100, l * 100];
  77097. };
  77098. convert2.hwb.rgb = function(hwb) {
  77099. var h = hwb[0] / 360;
  77100. var wh = hwb[1] / 100;
  77101. var bl = hwb[2] / 100;
  77102. var ratio = wh + bl;
  77103. var i;
  77104. var v;
  77105. var f;
  77106. var n;
  77107. if (ratio > 1) {
  77108. wh /= ratio;
  77109. bl /= ratio;
  77110. }
  77111. i = Math.floor(6 * h);
  77112. v = 1 - bl;
  77113. f = 6 * h - i;
  77114. if ((i & 1) !== 0) {
  77115. f = 1 - f;
  77116. }
  77117. n = wh + f * (v - wh);
  77118. var r;
  77119. var g;
  77120. var b;
  77121. switch (i) {
  77122. default:
  77123. case 6:
  77124. case 0:
  77125. r = v;
  77126. g = n;
  77127. b = wh;
  77128. break;
  77129. case 1:
  77130. r = n;
  77131. g = v;
  77132. b = wh;
  77133. break;
  77134. case 2:
  77135. r = wh;
  77136. g = v;
  77137. b = n;
  77138. break;
  77139. case 3:
  77140. r = wh;
  77141. g = n;
  77142. b = v;
  77143. break;
  77144. case 4:
  77145. r = n;
  77146. g = wh;
  77147. b = v;
  77148. break;
  77149. case 5:
  77150. r = v;
  77151. g = wh;
  77152. b = n;
  77153. break;
  77154. }
  77155. return [r * 255, g * 255, b * 255];
  77156. };
  77157. convert2.cmyk.rgb = function(cmyk) {
  77158. var c = cmyk[0] / 100;
  77159. var m = cmyk[1] / 100;
  77160. var y = cmyk[2] / 100;
  77161. var k = cmyk[3] / 100;
  77162. var r;
  77163. var g;
  77164. var b;
  77165. r = 1 - Math.min(1, c * (1 - k) + k);
  77166. g = 1 - Math.min(1, m * (1 - k) + k);
  77167. b = 1 - Math.min(1, y * (1 - k) + k);
  77168. return [r * 255, g * 255, b * 255];
  77169. };
  77170. convert2.xyz.rgb = function(xyz) {
  77171. var x = xyz[0] / 100;
  77172. var y = xyz[1] / 100;
  77173. var z = xyz[2] / 100;
  77174. var r;
  77175. var g;
  77176. var b;
  77177. r = x * 3.2406 + y * -1.5372 + z * -0.4986;
  77178. g = x * -0.9689 + y * 1.8758 + z * 0.0415;
  77179. b = x * 0.0557 + y * -0.204 + z * 1.057;
  77180. r = r > 31308e-7 ? 1.055 * Math.pow(r, 1 / 2.4) - 0.055 : r * 12.92;
  77181. g = g > 31308e-7 ? 1.055 * Math.pow(g, 1 / 2.4) - 0.055 : g * 12.92;
  77182. b = b > 31308e-7 ? 1.055 * Math.pow(b, 1 / 2.4) - 0.055 : b * 12.92;
  77183. r = Math.min(Math.max(0, r), 1);
  77184. g = Math.min(Math.max(0, g), 1);
  77185. b = Math.min(Math.max(0, b), 1);
  77186. return [r * 255, g * 255, b * 255];
  77187. };
  77188. convert2.xyz.lab = function(xyz) {
  77189. var x = xyz[0];
  77190. var y = xyz[1];
  77191. var z = xyz[2];
  77192. var l;
  77193. var a;
  77194. var b;
  77195. x /= 95.047;
  77196. y /= 100;
  77197. z /= 108.883;
  77198. x = x > 8856e-6 ? Math.pow(x, 1 / 3) : 7.787 * x + 16 / 116;
  77199. y = y > 8856e-6 ? Math.pow(y, 1 / 3) : 7.787 * y + 16 / 116;
  77200. z = z > 8856e-6 ? Math.pow(z, 1 / 3) : 7.787 * z + 16 / 116;
  77201. l = 116 * y - 16;
  77202. a = 500 * (x - y);
  77203. b = 200 * (y - z);
  77204. return [l, a, b];
  77205. };
  77206. convert2.lab.xyz = function(lab) {
  77207. var l = lab[0];
  77208. var a = lab[1];
  77209. var b = lab[2];
  77210. var x;
  77211. var y;
  77212. var z;
  77213. y = (l + 16) / 116;
  77214. x = a / 500 + y;
  77215. z = y - b / 200;
  77216. var y2 = Math.pow(y, 3);
  77217. var x2 = Math.pow(x, 3);
  77218. var z2 = Math.pow(z, 3);
  77219. y = y2 > 8856e-6 ? y2 : (y - 16 / 116) / 7.787;
  77220. x = x2 > 8856e-6 ? x2 : (x - 16 / 116) / 7.787;
  77221. z = z2 > 8856e-6 ? z2 : (z - 16 / 116) / 7.787;
  77222. x *= 95.047;
  77223. y *= 100;
  77224. z *= 108.883;
  77225. return [x, y, z];
  77226. };
  77227. convert2.lab.lch = function(lab) {
  77228. var l = lab[0];
  77229. var a = lab[1];
  77230. var b = lab[2];
  77231. var hr;
  77232. var h;
  77233. var c;
  77234. hr = Math.atan2(b, a);
  77235. h = hr * 360 / 2 / Math.PI;
  77236. if (h < 0) {
  77237. h += 360;
  77238. }
  77239. c = Math.sqrt(a * a + b * b);
  77240. return [l, c, h];
  77241. };
  77242. convert2.lch.lab = function(lch) {
  77243. var l = lch[0];
  77244. var c = lch[1];
  77245. var h = lch[2];
  77246. var a;
  77247. var b;
  77248. var hr;
  77249. hr = h / 360 * 2 * Math.PI;
  77250. a = c * Math.cos(hr);
  77251. b = c * Math.sin(hr);
  77252. return [l, a, b];
  77253. };
  77254. convert2.rgb.ansi16 = function(args) {
  77255. var r = args[0];
  77256. var g = args[1];
  77257. var b = args[2];
  77258. var value = 1 in arguments ? arguments[1] : convert2.rgb.hsv(args)[2];
  77259. value = Math.round(value / 50);
  77260. if (value === 0) {
  77261. return 30;
  77262. }
  77263. var ansi = 30 + (Math.round(b / 255) << 2 | Math.round(g / 255) << 1 | Math.round(r / 255));
  77264. if (value === 2) {
  77265. ansi += 60;
  77266. }
  77267. return ansi;
  77268. };
  77269. convert2.hsv.ansi16 = function(args) {
  77270. return convert2.rgb.ansi16(convert2.hsv.rgb(args), args[2]);
  77271. };
  77272. convert2.rgb.ansi256 = function(args) {
  77273. var r = args[0];
  77274. var g = args[1];
  77275. var b = args[2];
  77276. if (r === g && g === b) {
  77277. if (r < 8) {
  77278. return 16;
  77279. }
  77280. if (r > 248) {
  77281. return 231;
  77282. }
  77283. return Math.round((r - 8) / 247 * 24) + 232;
  77284. }
  77285. var ansi = 16 + 36 * Math.round(r / 255 * 5) + 6 * Math.round(g / 255 * 5) + Math.round(b / 255 * 5);
  77286. return ansi;
  77287. };
  77288. convert2.ansi16.rgb = function(args) {
  77289. var color4 = args % 10;
  77290. if (color4 === 0 || color4 === 7) {
  77291. if (args > 50) {
  77292. color4 += 3.5;
  77293. }
  77294. color4 = color4 / 10.5 * 255;
  77295. return [color4, color4, color4];
  77296. }
  77297. var mult = (~~(args > 50) + 1) * 0.5;
  77298. var r = (color4 & 1) * mult * 255;
  77299. var g = (color4 >> 1 & 1) * mult * 255;
  77300. var b = (color4 >> 2 & 1) * mult * 255;
  77301. return [r, g, b];
  77302. };
  77303. convert2.ansi256.rgb = function(args) {
  77304. if (args >= 232) {
  77305. var c = (args - 232) * 10 + 8;
  77306. return [c, c, c];
  77307. }
  77308. args -= 16;
  77309. var rem;
  77310. var r = Math.floor(args / 36) / 5 * 255;
  77311. var g = Math.floor((rem = args % 36) / 6) / 5 * 255;
  77312. var b = rem % 6 / 5 * 255;
  77313. return [r, g, b];
  77314. };
  77315. convert2.rgb.hex = function(args) {
  77316. var integer = ((Math.round(args[0]) & 255) << 16) + ((Math.round(args[1]) & 255) << 8) + (Math.round(args[2]) & 255);
  77317. var string3 = integer.toString(16).toUpperCase();
  77318. return "000000".substring(string3.length) + string3;
  77319. };
  77320. convert2.hex.rgb = function(args) {
  77321. var match = args.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);
  77322. if (!match) {
  77323. return [0, 0, 0];
  77324. }
  77325. var colorString = match[0];
  77326. if (match[0].length === 3) {
  77327. colorString = colorString.split("").map(function(char) {
  77328. return char + char;
  77329. }).join("");
  77330. }
  77331. var integer = parseInt(colorString, 16);
  77332. var r = integer >> 16 & 255;
  77333. var g = integer >> 8 & 255;
  77334. var b = integer & 255;
  77335. return [r, g, b];
  77336. };
  77337. convert2.rgb.hcg = function(rgb) {
  77338. var r = rgb[0] / 255;
  77339. var g = rgb[1] / 255;
  77340. var b = rgb[2] / 255;
  77341. var max = Math.max(Math.max(r, g), b);
  77342. var min = Math.min(Math.min(r, g), b);
  77343. var chroma = max - min;
  77344. var grayscale;
  77345. var hue;
  77346. if (chroma < 1) {
  77347. grayscale = min / (1 - chroma);
  77348. } else {
  77349. grayscale = 0;
  77350. }
  77351. if (chroma <= 0) {
  77352. hue = 0;
  77353. } else if (max === r) {
  77354. hue = (g - b) / chroma % 6;
  77355. } else if (max === g) {
  77356. hue = 2 + (b - r) / chroma;
  77357. } else {
  77358. hue = 4 + (r - g) / chroma + 4;
  77359. }
  77360. hue /= 6;
  77361. hue %= 1;
  77362. return [hue * 360, chroma * 100, grayscale * 100];
  77363. };
  77364. convert2.hsl.hcg = function(hsl) {
  77365. var s = hsl[1] / 100;
  77366. var l = hsl[2] / 100;
  77367. var c = 1;
  77368. var f = 0;
  77369. if (l < 0.5) {
  77370. c = 2 * s * l;
  77371. } else {
  77372. c = 2 * s * (1 - l);
  77373. }
  77374. if (c < 1) {
  77375. f = (l - 0.5 * c) / (1 - c);
  77376. }
  77377. return [hsl[0], c * 100, f * 100];
  77378. };
  77379. convert2.hsv.hcg = function(hsv) {
  77380. var s = hsv[1] / 100;
  77381. var v = hsv[2] / 100;
  77382. var c = s * v;
  77383. var f = 0;
  77384. if (c < 1) {
  77385. f = (v - c) / (1 - c);
  77386. }
  77387. return [hsv[0], c * 100, f * 100];
  77388. };
  77389. convert2.hcg.rgb = function(hcg) {
  77390. var h = hcg[0] / 360;
  77391. var c = hcg[1] / 100;
  77392. var g = hcg[2] / 100;
  77393. if (c === 0) {
  77394. return [g * 255, g * 255, g * 255];
  77395. }
  77396. var pure = [0, 0, 0];
  77397. var hi = h % 1 * 6;
  77398. var v = hi % 1;
  77399. var w = 1 - v;
  77400. var mg = 0;
  77401. switch (Math.floor(hi)) {
  77402. case 0:
  77403. pure[0] = 1;
  77404. pure[1] = v;
  77405. pure[2] = 0;
  77406. break;
  77407. case 1:
  77408. pure[0] = w;
  77409. pure[1] = 1;
  77410. pure[2] = 0;
  77411. break;
  77412. case 2:
  77413. pure[0] = 0;
  77414. pure[1] = 1;
  77415. pure[2] = v;
  77416. break;
  77417. case 3:
  77418. pure[0] = 0;
  77419. pure[1] = w;
  77420. pure[2] = 1;
  77421. break;
  77422. case 4:
  77423. pure[0] = v;
  77424. pure[1] = 0;
  77425. pure[2] = 1;
  77426. break;
  77427. default:
  77428. pure[0] = 1;
  77429. pure[1] = 0;
  77430. pure[2] = w;
  77431. }
  77432. mg = (1 - c) * g;
  77433. return [
  77434. (c * pure[0] + mg) * 255,
  77435. (c * pure[1] + mg) * 255,
  77436. (c * pure[2] + mg) * 255
  77437. ];
  77438. };
  77439. convert2.hcg.hsv = function(hcg) {
  77440. var c = hcg[1] / 100;
  77441. var g = hcg[2] / 100;
  77442. var v = c + g * (1 - c);
  77443. var f = 0;
  77444. if (v > 0) {
  77445. f = c / v;
  77446. }
  77447. return [hcg[0], f * 100, v * 100];
  77448. };
  77449. convert2.hcg.hsl = function(hcg) {
  77450. var c = hcg[1] / 100;
  77451. var g = hcg[2] / 100;
  77452. var l = g * (1 - c) + 0.5 * c;
  77453. var s = 0;
  77454. if (l > 0 && l < 0.5) {
  77455. s = c / (2 * l);
  77456. } else if (l >= 0.5 && l < 1) {
  77457. s = c / (2 * (1 - l));
  77458. }
  77459. return [hcg[0], s * 100, l * 100];
  77460. };
  77461. convert2.hcg.hwb = function(hcg) {
  77462. var c = hcg[1] / 100;
  77463. var g = hcg[2] / 100;
  77464. var v = c + g * (1 - c);
  77465. return [hcg[0], (v - c) * 100, (1 - v) * 100];
  77466. };
  77467. convert2.hwb.hcg = function(hwb) {
  77468. var w = hwb[1] / 100;
  77469. var b = hwb[2] / 100;
  77470. var v = 1 - b;
  77471. var c = v - w;
  77472. var g = 0;
  77473. if (c < 1) {
  77474. g = (v - c) / (1 - c);
  77475. }
  77476. return [hwb[0], c * 100, g * 100];
  77477. };
  77478. convert2.apple.rgb = function(apple) {
  77479. return [apple[0] / 65535 * 255, apple[1] / 65535 * 255, apple[2] / 65535 * 255];
  77480. };
  77481. convert2.rgb.apple = function(rgb) {
  77482. return [rgb[0] / 255 * 65535, rgb[1] / 255 * 65535, rgb[2] / 255 * 65535];
  77483. };
  77484. convert2.gray.rgb = function(args) {
  77485. return [args[0] / 100 * 255, args[0] / 100 * 255, args[0] / 100 * 255];
  77486. };
  77487. convert2.gray.hsl = convert2.gray.hsv = function(args) {
  77488. return [0, 0, args[0]];
  77489. };
  77490. convert2.gray.hwb = function(gray) {
  77491. return [0, 100, gray[0]];
  77492. };
  77493. convert2.gray.cmyk = function(gray) {
  77494. return [0, 0, 0, gray[0]];
  77495. };
  77496. convert2.gray.lab = function(gray) {
  77497. return [gray[0], 0, 0];
  77498. };
  77499. convert2.gray.hex = function(gray) {
  77500. var val = Math.round(gray[0] / 100 * 255) & 255;
  77501. var integer = (val << 16) + (val << 8) + val;
  77502. var string3 = integer.toString(16).toUpperCase();
  77503. return "000000".substring(string3.length) + string3;
  77504. };
  77505. convert2.rgb.gray = function(rgb) {
  77506. var val = (rgb[0] + rgb[1] + rgb[2]) / 3;
  77507. return [val / 255 * 100];
  77508. };
  77509. }
  77510. });
  77511. // node_modules/@babel/traverse/node_modules/color-convert/route.js
  77512. var require_route2 = __commonJS({
  77513. "node_modules/@babel/traverse/node_modules/color-convert/route.js"(exports, module) {
  77514. var conversions = require_conversions2();
  77515. function buildGraph() {
  77516. var graph = {};
  77517. var models = Object.keys(conversions);
  77518. for (var len = models.length, i = 0; i < len; i++) {
  77519. graph[models[i]] = {
  77520. distance: -1,
  77521. parent: null
  77522. };
  77523. }
  77524. return graph;
  77525. }
  77526. function deriveBFS(fromModel) {
  77527. var graph = buildGraph();
  77528. var queue = [fromModel];
  77529. graph[fromModel].distance = 0;
  77530. while (queue.length) {
  77531. var current2 = queue.pop();
  77532. var adjacents = Object.keys(conversions[current2]);
  77533. for (var len = adjacents.length, i = 0; i < len; i++) {
  77534. var adjacent = adjacents[i];
  77535. var node = graph[adjacent];
  77536. if (node.distance === -1) {
  77537. node.distance = graph[current2].distance + 1;
  77538. node.parent = current2;
  77539. queue.unshift(adjacent);
  77540. }
  77541. }
  77542. }
  77543. return graph;
  77544. }
  77545. function link2(from, to) {
  77546. return function(args) {
  77547. return to(from(args));
  77548. };
  77549. }
  77550. function wrapConversion(toModel, graph) {
  77551. var path = [graph[toModel].parent, toModel];
  77552. var fn = conversions[graph[toModel].parent][toModel];
  77553. var cur = graph[toModel].parent;
  77554. while (graph[cur].parent) {
  77555. path.unshift(graph[cur].parent);
  77556. fn = link2(conversions[graph[cur].parent][cur], fn);
  77557. cur = graph[cur].parent;
  77558. }
  77559. fn.conversion = path;
  77560. return fn;
  77561. }
  77562. module.exports = function(fromModel) {
  77563. var graph = deriveBFS(fromModel);
  77564. var conversion = {};
  77565. var models = Object.keys(graph);
  77566. for (var len = models.length, i = 0; i < len; i++) {
  77567. var toModel = models[i];
  77568. var node = graph[toModel];
  77569. if (node.parent === null) {
  77570. continue;
  77571. }
  77572. conversion[toModel] = wrapConversion(toModel, graph);
  77573. }
  77574. return conversion;
  77575. };
  77576. }
  77577. });
  77578. // node_modules/@babel/traverse/node_modules/color-convert/index.js
  77579. var require_color_convert2 = __commonJS({
  77580. "node_modules/@babel/traverse/node_modules/color-convert/index.js"(exports, module) {
  77581. var conversions = require_conversions2();
  77582. var route = require_route2();
  77583. var convert2 = {};
  77584. var models = Object.keys(conversions);
  77585. function wrapRaw(fn) {
  77586. var wrappedFn = function(args) {
  77587. if (args === void 0 || args === null) {
  77588. return args;
  77589. }
  77590. if (arguments.length > 1) {
  77591. args = Array.prototype.slice.call(arguments);
  77592. }
  77593. return fn(args);
  77594. };
  77595. if ("conversion" in fn) {
  77596. wrappedFn.conversion = fn.conversion;
  77597. }
  77598. return wrappedFn;
  77599. }
  77600. function wrapRounded(fn) {
  77601. var wrappedFn = function(args) {
  77602. if (args === void 0 || args === null) {
  77603. return args;
  77604. }
  77605. if (arguments.length > 1) {
  77606. args = Array.prototype.slice.call(arguments);
  77607. }
  77608. var result = fn(args);
  77609. if (typeof result === "object") {
  77610. for (var len = result.length, i = 0; i < len; i++) {
  77611. result[i] = Math.round(result[i]);
  77612. }
  77613. }
  77614. return result;
  77615. };
  77616. if ("conversion" in fn) {
  77617. wrappedFn.conversion = fn.conversion;
  77618. }
  77619. return wrappedFn;
  77620. }
  77621. models.forEach(function(fromModel) {
  77622. convert2[fromModel] = {};
  77623. Object.defineProperty(convert2[fromModel], "channels", { value: conversions[fromModel].channels });
  77624. Object.defineProperty(convert2[fromModel], "labels", { value: conversions[fromModel].labels });
  77625. var routes = route(fromModel);
  77626. var routeModels = Object.keys(routes);
  77627. routeModels.forEach(function(toModel) {
  77628. var fn = routes[toModel];
  77629. convert2[fromModel][toModel] = wrapRounded(fn);
  77630. convert2[fromModel][toModel].raw = wrapRaw(fn);
  77631. });
  77632. });
  77633. module.exports = convert2;
  77634. }
  77635. });
  77636. // node_modules/@babel/traverse/node_modules/ansi-styles/index.js
  77637. var require_ansi_styles2 = __commonJS({
  77638. "node_modules/@babel/traverse/node_modules/ansi-styles/index.js"(exports, module) {
  77639. "use strict";
  77640. var colorConvert = require_color_convert2();
  77641. var wrapAnsi16 = (fn, offset2) => function() {
  77642. const code2 = fn.apply(colorConvert, arguments);
  77643. return `\x1B[${code2 + offset2}m`;
  77644. };
  77645. var wrapAnsi256 = (fn, offset2) => function() {
  77646. const code2 = fn.apply(colorConvert, arguments);
  77647. return `\x1B[${38 + offset2};5;${code2}m`;
  77648. };
  77649. var wrapAnsi16m = (fn, offset2) => function() {
  77650. const rgb = fn.apply(colorConvert, arguments);
  77651. return `\x1B[${38 + offset2};2;${rgb[0]};${rgb[1]};${rgb[2]}m`;
  77652. };
  77653. function assembleStyles() {
  77654. const codes = /* @__PURE__ */ new Map();
  77655. const styles = {
  77656. modifier: {
  77657. reset: [0, 0],
  77658. bold: [1, 22],
  77659. dim: [2, 22],
  77660. italic: [3, 23],
  77661. underline: [4, 24],
  77662. inverse: [7, 27],
  77663. hidden: [8, 28],
  77664. strikethrough: [9, 29]
  77665. },
  77666. color: {
  77667. black: [30, 39],
  77668. red: [31, 39],
  77669. green: [32, 39],
  77670. yellow: [33, 39],
  77671. blue: [34, 39],
  77672. magenta: [35, 39],
  77673. cyan: [36, 39],
  77674. white: [37, 39],
  77675. gray: [90, 39],
  77676. redBright: [91, 39],
  77677. greenBright: [92, 39],
  77678. yellowBright: [93, 39],
  77679. blueBright: [94, 39],
  77680. magentaBright: [95, 39],
  77681. cyanBright: [96, 39],
  77682. whiteBright: [97, 39]
  77683. },
  77684. bgColor: {
  77685. bgBlack: [40, 49],
  77686. bgRed: [41, 49],
  77687. bgGreen: [42, 49],
  77688. bgYellow: [43, 49],
  77689. bgBlue: [44, 49],
  77690. bgMagenta: [45, 49],
  77691. bgCyan: [46, 49],
  77692. bgWhite: [47, 49],
  77693. bgBlackBright: [100, 49],
  77694. bgRedBright: [101, 49],
  77695. bgGreenBright: [102, 49],
  77696. bgYellowBright: [103, 49],
  77697. bgBlueBright: [104, 49],
  77698. bgMagentaBright: [105, 49],
  77699. bgCyanBright: [106, 49],
  77700. bgWhiteBright: [107, 49]
  77701. }
  77702. };
  77703. styles.color.grey = styles.color.gray;
  77704. for (const groupName of Object.keys(styles)) {
  77705. const group = styles[groupName];
  77706. for (const styleName of Object.keys(group)) {
  77707. const style2 = group[styleName];
  77708. styles[styleName] = {
  77709. open: `\x1B[${style2[0]}m`,
  77710. close: `\x1B[${style2[1]}m`
  77711. };
  77712. group[styleName] = styles[styleName];
  77713. codes.set(style2[0], style2[1]);
  77714. }
  77715. Object.defineProperty(styles, groupName, {
  77716. value: group,
  77717. enumerable: false
  77718. });
  77719. Object.defineProperty(styles, "codes", {
  77720. value: codes,
  77721. enumerable: false
  77722. });
  77723. }
  77724. const ansi2ansi = (n) => n;
  77725. const rgb2rgb = (r, g, b) => [r, g, b];
  77726. styles.color.close = "\x1B[39m";
  77727. styles.bgColor.close = "\x1B[49m";
  77728. styles.color.ansi = {
  77729. ansi: wrapAnsi16(ansi2ansi, 0)
  77730. };
  77731. styles.color.ansi256 = {
  77732. ansi256: wrapAnsi256(ansi2ansi, 0)
  77733. };
  77734. styles.color.ansi16m = {
  77735. rgb: wrapAnsi16m(rgb2rgb, 0)
  77736. };
  77737. styles.bgColor.ansi = {
  77738. ansi: wrapAnsi16(ansi2ansi, 10)
  77739. };
  77740. styles.bgColor.ansi256 = {
  77741. ansi256: wrapAnsi256(ansi2ansi, 10)
  77742. };
  77743. styles.bgColor.ansi16m = {
  77744. rgb: wrapAnsi16m(rgb2rgb, 10)
  77745. };
  77746. for (let key of Object.keys(colorConvert)) {
  77747. if (typeof colorConvert[key] !== "object") {
  77748. continue;
  77749. }
  77750. const suite = colorConvert[key];
  77751. if (key === "ansi16") {
  77752. key = "ansi";
  77753. }
  77754. if ("ansi16" in suite) {
  77755. styles.color.ansi[key] = wrapAnsi16(suite.ansi16, 0);
  77756. styles.bgColor.ansi[key] = wrapAnsi16(suite.ansi16, 10);
  77757. }
  77758. if ("ansi256" in suite) {
  77759. styles.color.ansi256[key] = wrapAnsi256(suite.ansi256, 0);
  77760. styles.bgColor.ansi256[key] = wrapAnsi256(suite.ansi256, 10);
  77761. }
  77762. if ("rgb" in suite) {
  77763. styles.color.ansi16m[key] = wrapAnsi16m(suite.rgb, 0);
  77764. styles.bgColor.ansi16m[key] = wrapAnsi16m(suite.rgb, 10);
  77765. }
  77766. }
  77767. return styles;
  77768. }
  77769. Object.defineProperty(module, "exports", {
  77770. enumerable: true,
  77771. get: assembleStyles
  77772. });
  77773. }
  77774. });
  77775. // node_modules/@babel/traverse/node_modules/has-flag/index.js
  77776. var require_has_flag3 = __commonJS({
  77777. "node_modules/@babel/traverse/node_modules/has-flag/index.js"(exports, module) {
  77778. "use strict";
  77779. module.exports = (flag, argv) => {
  77780. argv = argv || process.argv;
  77781. const prefix = flag.startsWith("-") ? "" : flag.length === 1 ? "-" : "--";
  77782. const pos = argv.indexOf(prefix + flag);
  77783. const terminatorPos = argv.indexOf("--");
  77784. return pos !== -1 && (terminatorPos === -1 ? true : pos < terminatorPos);
  77785. };
  77786. }
  77787. });
  77788. // node_modules/@babel/traverse/node_modules/supports-color/index.js
  77789. var require_supports_color3 = __commonJS({
  77790. "node_modules/@babel/traverse/node_modules/supports-color/index.js"(exports, module) {
  77791. "use strict";
  77792. var os = __require("os");
  77793. var hasFlag = require_has_flag3();
  77794. var env = process.env;
  77795. var forceColor;
  77796. if (hasFlag("no-color") || hasFlag("no-colors") || hasFlag("color=false")) {
  77797. forceColor = false;
  77798. } else if (hasFlag("color") || hasFlag("colors") || hasFlag("color=true") || hasFlag("color=always")) {
  77799. forceColor = true;
  77800. }
  77801. if ("FORCE_COLOR" in env) {
  77802. forceColor = env.FORCE_COLOR.length === 0 || parseInt(env.FORCE_COLOR, 10) !== 0;
  77803. }
  77804. function translateLevel(level) {
  77805. if (level === 0) {
  77806. return false;
  77807. }
  77808. return {
  77809. level,
  77810. hasBasic: true,
  77811. has256: level >= 2,
  77812. has16m: level >= 3
  77813. };
  77814. }
  77815. function supportsColor(stream) {
  77816. if (forceColor === false) {
  77817. return 0;
  77818. }
  77819. if (hasFlag("color=16m") || hasFlag("color=full") || hasFlag("color=truecolor")) {
  77820. return 3;
  77821. }
  77822. if (hasFlag("color=256")) {
  77823. return 2;
  77824. }
  77825. if (stream && !stream.isTTY && forceColor !== true) {
  77826. return 0;
  77827. }
  77828. const min = forceColor ? 1 : 0;
  77829. if (process.platform === "win32") {
  77830. const osRelease = os.release().split(".");
  77831. if (Number(process.versions.node.split(".")[0]) >= 8 && Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) {
  77832. return Number(osRelease[2]) >= 14931 ? 3 : 2;
  77833. }
  77834. return 1;
  77835. }
  77836. if ("CI" in env) {
  77837. if (["TRAVIS", "CIRCLECI", "APPVEYOR", "GITLAB_CI"].some((sign) => sign in env) || env.CI_NAME === "codeship") {
  77838. return 1;
  77839. }
  77840. return min;
  77841. }
  77842. if ("TEAMCITY_VERSION" in env) {
  77843. return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env.TEAMCITY_VERSION) ? 1 : 0;
  77844. }
  77845. if (env.COLORTERM === "truecolor") {
  77846. return 3;
  77847. }
  77848. if ("TERM_PROGRAM" in env) {
  77849. const version2 = parseInt((env.TERM_PROGRAM_VERSION || "").split(".")[0], 10);
  77850. switch (env.TERM_PROGRAM) {
  77851. case "iTerm.app":
  77852. return version2 >= 3 ? 3 : 2;
  77853. case "Apple_Terminal":
  77854. return 2;
  77855. }
  77856. }
  77857. if (/-256(color)?$/i.test(env.TERM)) {
  77858. return 2;
  77859. }
  77860. if (/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(env.TERM)) {
  77861. return 1;
  77862. }
  77863. if ("COLORTERM" in env) {
  77864. return 1;
  77865. }
  77866. if (env.TERM === "dumb") {
  77867. return min;
  77868. }
  77869. return min;
  77870. }
  77871. function getSupportLevel(stream) {
  77872. const level = supportsColor(stream);
  77873. return translateLevel(level);
  77874. }
  77875. module.exports = {
  77876. supportsColor: getSupportLevel,
  77877. stdout: getSupportLevel(process.stdout),
  77878. stderr: getSupportLevel(process.stderr)
  77879. };
  77880. }
  77881. });
  77882. // node_modules/@babel/traverse/node_modules/chalk/templates.js
  77883. var require_templates2 = __commonJS({
  77884. "node_modules/@babel/traverse/node_modules/chalk/templates.js"(exports, module) {
  77885. "use strict";
  77886. var TEMPLATE_REGEX = /(?:\\(u[a-f\d]{4}|x[a-f\d]{2}|.))|(?:\{(~)?(\w+(?:\([^)]*\))?(?:\.\w+(?:\([^)]*\))?)*)(?:[ \t]|(?=\r?\n)))|(\})|((?:.|[\r\n\f])+?)/gi;
  77887. var STYLE_REGEX = /(?:^|\.)(\w+)(?:\(([^)]*)\))?/g;
  77888. var STRING_REGEX = /^(['"])((?:\\.|(?!\1)[^\\])*)\1$/;
  77889. var ESCAPE_REGEX = /\\(u[a-f\d]{4}|x[a-f\d]{2}|.)|([^\\])/gi;
  77890. var ESCAPES = /* @__PURE__ */ new Map([
  77891. ["n", "\n"],
  77892. ["r", "\r"],
  77893. ["t", " "],
  77894. ["b", "\b"],
  77895. ["f", "\f"],
  77896. ["v", "\v"],
  77897. ["0", "\0"],
  77898. ["\\", "\\"],
  77899. ["e", "\x1B"],
  77900. ["a", "\x07"]
  77901. ]);
  77902. function unescape(c) {
  77903. if (c[0] === "u" && c.length === 5 || c[0] === "x" && c.length === 3) {
  77904. return String.fromCharCode(parseInt(c.slice(1), 16));
  77905. }
  77906. return ESCAPES.get(c) || c;
  77907. }
  77908. function parseArguments(name2, args) {
  77909. const results = [];
  77910. const chunks = args.trim().split(/\s*,\s*/g);
  77911. let matches;
  77912. for (const chunk of chunks) {
  77913. if (!isNaN(chunk)) {
  77914. results.push(Number(chunk));
  77915. } else if (matches = chunk.match(STRING_REGEX)) {
  77916. results.push(matches[2].replace(ESCAPE_REGEX, (m, escape, chr) => escape ? unescape(escape) : chr));
  77917. } else {
  77918. throw new Error(`Invalid Chalk template style argument: ${chunk} (in style '${name2}')`);
  77919. }
  77920. }
  77921. return results;
  77922. }
  77923. function parseStyle2(style2) {
  77924. STYLE_REGEX.lastIndex = 0;
  77925. const results = [];
  77926. let matches;
  77927. while ((matches = STYLE_REGEX.exec(style2)) !== null) {
  77928. const name2 = matches[1];
  77929. if (matches[2]) {
  77930. const args = parseArguments(name2, matches[2]);
  77931. results.push([name2].concat(args));
  77932. } else {
  77933. results.push([name2]);
  77934. }
  77935. }
  77936. return results;
  77937. }
  77938. function buildStyle(chalk, styles) {
  77939. const enabled = {};
  77940. for (const layer of styles) {
  77941. for (const style2 of layer.styles) {
  77942. enabled[style2[0]] = layer.inverse ? null : style2.slice(1);
  77943. }
  77944. }
  77945. let current2 = chalk;
  77946. for (const styleName of Object.keys(enabled)) {
  77947. if (Array.isArray(enabled[styleName])) {
  77948. if (!(styleName in current2)) {
  77949. throw new Error(`Unknown Chalk style: ${styleName}`);
  77950. }
  77951. if (enabled[styleName].length > 0) {
  77952. current2 = current2[styleName].apply(current2, enabled[styleName]);
  77953. } else {
  77954. current2 = current2[styleName];
  77955. }
  77956. }
  77957. }
  77958. return current2;
  77959. }
  77960. module.exports = (chalk, tmp) => {
  77961. const styles = [];
  77962. const chunks = [];
  77963. let chunk = [];
  77964. tmp.replace(TEMPLATE_REGEX, (m, escapeChar, inverse, style2, close, chr) => {
  77965. if (escapeChar) {
  77966. chunk.push(unescape(escapeChar));
  77967. } else if (style2) {
  77968. const str = chunk.join("");
  77969. chunk = [];
  77970. chunks.push(styles.length === 0 ? str : buildStyle(chalk, styles)(str));
  77971. styles.push({ inverse, styles: parseStyle2(style2) });
  77972. } else if (close) {
  77973. if (styles.length === 0) {
  77974. throw new Error("Found extraneous } in Chalk template literal");
  77975. }
  77976. chunks.push(buildStyle(chalk, styles)(chunk.join("")));
  77977. chunk = [];
  77978. styles.pop();
  77979. } else {
  77980. chunk.push(chr);
  77981. }
  77982. });
  77983. chunks.push(chunk.join(""));
  77984. if (styles.length > 0) {
  77985. const errMsg = `Chalk template literal is missing ${styles.length} closing bracket${styles.length === 1 ? "" : "s"} (\`}\`)`;
  77986. throw new Error(errMsg);
  77987. }
  77988. return chunks.join("");
  77989. };
  77990. }
  77991. });
  77992. // node_modules/@babel/traverse/node_modules/chalk/index.js
  77993. var require_chalk2 = __commonJS({
  77994. "node_modules/@babel/traverse/node_modules/chalk/index.js"(exports, module) {
  77995. "use strict";
  77996. var escapeStringRegexp = require_escape_string_regexp();
  77997. var ansiStyles = require_ansi_styles2();
  77998. var stdoutColor = require_supports_color3().stdout;
  77999. var template = require_templates2();
  78000. var isSimpleWindowsTerm = process.platform === "win32" && !(process.env.TERM || "").toLowerCase().startsWith("xterm");
  78001. var levelMapping = ["ansi", "ansi", "ansi256", "ansi16m"];
  78002. var skipModels = /* @__PURE__ */ new Set(["gray"]);
  78003. var styles = /* @__PURE__ */ Object.create(null);
  78004. function applyOptions(obj, options) {
  78005. options = options || {};
  78006. const scLevel = stdoutColor ? stdoutColor.level : 0;
  78007. obj.level = options.level === void 0 ? scLevel : options.level;
  78008. obj.enabled = "enabled" in options ? options.enabled : obj.level > 0;
  78009. }
  78010. function Chalk(options) {
  78011. if (!this || !(this instanceof Chalk) || this.template) {
  78012. const chalk = {};
  78013. applyOptions(chalk, options);
  78014. chalk.template = function() {
  78015. const args = [].slice.call(arguments);
  78016. return chalkTag.apply(null, [chalk.template].concat(args));
  78017. };
  78018. Object.setPrototypeOf(chalk, Chalk.prototype);
  78019. Object.setPrototypeOf(chalk.template, chalk);
  78020. chalk.template.constructor = Chalk;
  78021. return chalk.template;
  78022. }
  78023. applyOptions(this, options);
  78024. }
  78025. if (isSimpleWindowsTerm) {
  78026. ansiStyles.blue.open = "\x1B[94m";
  78027. }
  78028. for (const key of Object.keys(ansiStyles)) {
  78029. ansiStyles[key].closeRe = new RegExp(escapeStringRegexp(ansiStyles[key].close), "g");
  78030. styles[key] = {
  78031. get() {
  78032. const codes = ansiStyles[key];
  78033. return build.call(this, this._styles ? this._styles.concat(codes) : [codes], this._empty, key);
  78034. }
  78035. };
  78036. }
  78037. styles.visible = {
  78038. get() {
  78039. return build.call(this, this._styles || [], true, "visible");
  78040. }
  78041. };
  78042. ansiStyles.color.closeRe = new RegExp(escapeStringRegexp(ansiStyles.color.close), "g");
  78043. for (const model of Object.keys(ansiStyles.color.ansi)) {
  78044. if (skipModels.has(model)) {
  78045. continue;
  78046. }
  78047. styles[model] = {
  78048. get() {
  78049. const level = this.level;
  78050. return function() {
  78051. const open = ansiStyles.color[levelMapping[level]][model].apply(null, arguments);
  78052. const codes = {
  78053. open,
  78054. close: ansiStyles.color.close,
  78055. closeRe: ansiStyles.color.closeRe
  78056. };
  78057. return build.call(this, this._styles ? this._styles.concat(codes) : [codes], this._empty, model);
  78058. };
  78059. }
  78060. };
  78061. }
  78062. ansiStyles.bgColor.closeRe = new RegExp(escapeStringRegexp(ansiStyles.bgColor.close), "g");
  78063. for (const model of Object.keys(ansiStyles.bgColor.ansi)) {
  78064. if (skipModels.has(model)) {
  78065. continue;
  78066. }
  78067. const bgModel = "bg" + model[0].toUpperCase() + model.slice(1);
  78068. styles[bgModel] = {
  78069. get() {
  78070. const level = this.level;
  78071. return function() {
  78072. const open = ansiStyles.bgColor[levelMapping[level]][model].apply(null, arguments);
  78073. const codes = {
  78074. open,
  78075. close: ansiStyles.bgColor.close,
  78076. closeRe: ansiStyles.bgColor.closeRe
  78077. };
  78078. return build.call(this, this._styles ? this._styles.concat(codes) : [codes], this._empty, model);
  78079. };
  78080. }
  78081. };
  78082. }
  78083. var proto = Object.defineProperties(() => {
  78084. }, styles);
  78085. function build(_styles, _empty, key) {
  78086. const builder = function() {
  78087. return applyStyle.apply(builder, arguments);
  78088. };
  78089. builder._styles = _styles;
  78090. builder._empty = _empty;
  78091. const self2 = this;
  78092. Object.defineProperty(builder, "level", {
  78093. enumerable: true,
  78094. get() {
  78095. return self2.level;
  78096. },
  78097. set(level) {
  78098. self2.level = level;
  78099. }
  78100. });
  78101. Object.defineProperty(builder, "enabled", {
  78102. enumerable: true,
  78103. get() {
  78104. return self2.enabled;
  78105. },
  78106. set(enabled) {
  78107. self2.enabled = enabled;
  78108. }
  78109. });
  78110. builder.hasGrey = this.hasGrey || key === "gray" || key === "grey";
  78111. builder.__proto__ = proto;
  78112. return builder;
  78113. }
  78114. function applyStyle() {
  78115. const args = arguments;
  78116. const argsLen = args.length;
  78117. let str = String(arguments[0]);
  78118. if (argsLen === 0) {
  78119. return "";
  78120. }
  78121. if (argsLen > 1) {
  78122. for (let a = 1; a < argsLen; a++) {
  78123. str += " " + args[a];
  78124. }
  78125. }
  78126. if (!this.enabled || this.level <= 0 || !str) {
  78127. return this._empty ? "" : str;
  78128. }
  78129. const originalDim = ansiStyles.dim.open;
  78130. if (isSimpleWindowsTerm && this.hasGrey) {
  78131. ansiStyles.dim.open = "";
  78132. }
  78133. for (const code2 of this._styles.slice().reverse()) {
  78134. str = code2.open + str.replace(code2.closeRe, code2.open) + code2.close;
  78135. str = str.replace(/\r?\n/g, `${code2.close}$&${code2.open}`);
  78136. }
  78137. ansiStyles.dim.open = originalDim;
  78138. return str;
  78139. }
  78140. function chalkTag(chalk, strings) {
  78141. if (!Array.isArray(strings)) {
  78142. return [].slice.call(arguments, 1).join(" ");
  78143. }
  78144. const args = [].slice.call(arguments, 2);
  78145. const parts = [strings.raw[0]];
  78146. for (let i = 1; i < strings.length; i++) {
  78147. parts.push(String(args[i - 1]).replace(/[{}\\]/g, "\\$&"));
  78148. parts.push(String(strings.raw[i]));
  78149. }
  78150. return template(chalk, parts.join(""));
  78151. }
  78152. Object.defineProperties(Chalk.prototype, styles);
  78153. module.exports = Chalk();
  78154. module.exports.supportsColor = stdoutColor;
  78155. module.exports.default = module.exports;
  78156. }
  78157. });
  78158. // node_modules/@babel/traverse/node_modules/@babel/highlight/lib/index.js
  78159. var require_lib20 = __commonJS({
  78160. "node_modules/@babel/traverse/node_modules/@babel/highlight/lib/index.js"(exports) {
  78161. "use strict";
  78162. Object.defineProperty(exports, "__esModule", {
  78163. value: true
  78164. });
  78165. exports.shouldHighlight = shouldHighlight;
  78166. exports.getChalk = getChalk;
  78167. exports.default = highlight;
  78168. var _jsTokens = require_js_tokens();
  78169. var _helperValidatorIdentifier = require_lib19();
  78170. var _chalk = require_chalk2();
  78171. var sometimesKeywords = /* @__PURE__ */ new Set(["as", "async", "from", "get", "of", "set"]);
  78172. function getDefs(chalk) {
  78173. return {
  78174. keyword: chalk.cyan,
  78175. capitalized: chalk.yellow,
  78176. jsxIdentifier: chalk.yellow,
  78177. punctuator: chalk.yellow,
  78178. number: chalk.magenta,
  78179. string: chalk.green,
  78180. regex: chalk.magenta,
  78181. comment: chalk.grey,
  78182. invalid: chalk.white.bgRed.bold
  78183. };
  78184. }
  78185. var NEWLINE = /\r\n|[\n\r\u2028\u2029]/;
  78186. var BRACKET = /^[()[\]{}]$/;
  78187. var tokenize;
  78188. {
  78189. const JSX_TAG = /^[a-z][\w-]*$/i;
  78190. const getTokenType = function(token, offset2, text5) {
  78191. if (token.type === "name") {
  78192. if ((0, _helperValidatorIdentifier.isKeyword)(token.value) || (0, _helperValidatorIdentifier.isStrictReservedWord)(token.value, true) || sometimesKeywords.has(token.value)) {
  78193. return "keyword";
  78194. }
  78195. if (JSX_TAG.test(token.value) && (text5[offset2 - 1] === "<" || text5.substr(offset2 - 2, 2) == "</")) {
  78196. return "jsxIdentifier";
  78197. }
  78198. if (token.value[0] !== token.value[0].toLowerCase()) {
  78199. return "capitalized";
  78200. }
  78201. }
  78202. if (token.type === "punctuator" && BRACKET.test(token.value)) {
  78203. return "bracket";
  78204. }
  78205. if (token.type === "invalid" && (token.value === "@" || token.value === "#")) {
  78206. return "punctuator";
  78207. }
  78208. return token.type;
  78209. };
  78210. tokenize = function* (text5) {
  78211. let match;
  78212. while (match = _jsTokens.default.exec(text5)) {
  78213. const token = _jsTokens.matchToToken(match);
  78214. yield {
  78215. type: getTokenType(token, match.index, text5),
  78216. value: token.value
  78217. };
  78218. }
  78219. };
  78220. }
  78221. function highlightTokens(defs, text5) {
  78222. let highlighted = "";
  78223. for (const {
  78224. type,
  78225. value
  78226. } of tokenize(text5)) {
  78227. const colorize = defs[type];
  78228. if (colorize) {
  78229. highlighted += value.split(NEWLINE).map((str) => colorize(str)).join("\n");
  78230. } else {
  78231. highlighted += value;
  78232. }
  78233. }
  78234. return highlighted;
  78235. }
  78236. function shouldHighlight(options) {
  78237. return !!_chalk.supportsColor || options.forceColor;
  78238. }
  78239. function getChalk(options) {
  78240. return options.forceColor ? new _chalk.constructor({
  78241. enabled: true,
  78242. level: 1
  78243. }) : _chalk;
  78244. }
  78245. function highlight(code2, options = {}) {
  78246. if (shouldHighlight(options)) {
  78247. const chalk = getChalk(options);
  78248. const defs = getDefs(chalk);
  78249. return highlightTokens(defs, code2);
  78250. } else {
  78251. return code2;
  78252. }
  78253. }
  78254. }
  78255. });
  78256. // node_modules/@babel/traverse/node_modules/@babel/code-frame/lib/index.js
  78257. var require_lib21 = __commonJS({
  78258. "node_modules/@babel/traverse/node_modules/@babel/code-frame/lib/index.js"(exports) {
  78259. "use strict";
  78260. Object.defineProperty(exports, "__esModule", {
  78261. value: true
  78262. });
  78263. exports.codeFrameColumns = codeFrameColumns;
  78264. exports.default = _default;
  78265. var _highlight = require_lib20();
  78266. var deprecationWarningShown = false;
  78267. function getDefs(chalk) {
  78268. return {
  78269. gutter: chalk.grey,
  78270. marker: chalk.red.bold,
  78271. message: chalk.red.bold
  78272. };
  78273. }
  78274. var NEWLINE = /\r\n|[\n\r\u2028\u2029]/;
  78275. function getMarkerLines(loc, source, opts) {
  78276. const startLoc = Object.assign({
  78277. column: 0,
  78278. line: -1
  78279. }, loc.start);
  78280. const endLoc = Object.assign({}, startLoc, loc.end);
  78281. const {
  78282. linesAbove = 2,
  78283. linesBelow = 3
  78284. } = opts || {};
  78285. const startLine = startLoc.line;
  78286. const startColumn = startLoc.column;
  78287. const endLine = endLoc.line;
  78288. const endColumn = endLoc.column;
  78289. let start3 = Math.max(startLine - (linesAbove + 1), 0);
  78290. let end = Math.min(source.length, endLine + linesBelow);
  78291. if (startLine === -1) {
  78292. start3 = 0;
  78293. }
  78294. if (endLine === -1) {
  78295. end = source.length;
  78296. }
  78297. const lineDiff = endLine - startLine;
  78298. const markerLines = {};
  78299. if (lineDiff) {
  78300. for (let i = 0; i <= lineDiff; i++) {
  78301. const lineNumber = i + startLine;
  78302. if (!startColumn) {
  78303. markerLines[lineNumber] = true;
  78304. } else if (i === 0) {
  78305. const sourceLength = source[lineNumber - 1].length;
  78306. markerLines[lineNumber] = [startColumn, sourceLength - startColumn + 1];
  78307. } else if (i === lineDiff) {
  78308. markerLines[lineNumber] = [0, endColumn];
  78309. } else {
  78310. const sourceLength = source[lineNumber - i].length;
  78311. markerLines[lineNumber] = [0, sourceLength];
  78312. }
  78313. }
  78314. } else {
  78315. if (startColumn === endColumn) {
  78316. if (startColumn) {
  78317. markerLines[startLine] = [startColumn, 0];
  78318. } else {
  78319. markerLines[startLine] = true;
  78320. }
  78321. } else {
  78322. markerLines[startLine] = [startColumn, endColumn - startColumn];
  78323. }
  78324. }
  78325. return {
  78326. start: start3,
  78327. end,
  78328. markerLines
  78329. };
  78330. }
  78331. function codeFrameColumns(rawLines, loc, opts = {}) {
  78332. const highlighted = (opts.highlightCode || opts.forceColor) && (0, _highlight.shouldHighlight)(opts);
  78333. const chalk = (0, _highlight.getChalk)(opts);
  78334. const defs = getDefs(chalk);
  78335. const maybeHighlight = (chalkFn, string3) => {
  78336. return highlighted ? chalkFn(string3) : string3;
  78337. };
  78338. const lines = rawLines.split(NEWLINE);
  78339. const {
  78340. start: start3,
  78341. end,
  78342. markerLines
  78343. } = getMarkerLines(loc, lines, opts);
  78344. const hasColumns = loc.start && typeof loc.start.column === "number";
  78345. const numberMaxWidth = String(end).length;
  78346. const highlightedLines = highlighted ? (0, _highlight.default)(rawLines, opts) : rawLines;
  78347. let frame = highlightedLines.split(NEWLINE).slice(start3, end).map((line, index2) => {
  78348. const number2 = start3 + 1 + index2;
  78349. const paddedNumber = ` ${number2}`.slice(-numberMaxWidth);
  78350. const gutter = ` ${paddedNumber} |`;
  78351. const hasMarker = markerLines[number2];
  78352. const lastMarkerLine = !markerLines[number2 + 1];
  78353. if (hasMarker) {
  78354. let markerLine = "";
  78355. if (Array.isArray(hasMarker)) {
  78356. const markerSpacing = line.slice(0, Math.max(hasMarker[0] - 1, 0)).replace(/[^\t]/g, " ");
  78357. const numberOfMarkers = hasMarker[1] || 1;
  78358. markerLine = ["\n ", maybeHighlight(defs.gutter, gutter.replace(/\d/g, " ")), " ", markerSpacing, maybeHighlight(defs.marker, "^").repeat(numberOfMarkers)].join("");
  78359. if (lastMarkerLine && opts.message) {
  78360. markerLine += " " + maybeHighlight(defs.message, opts.message);
  78361. }
  78362. }
  78363. return [maybeHighlight(defs.marker, ">"), maybeHighlight(defs.gutter, gutter), line.length > 0 ? ` ${line}` : "", markerLine].join("");
  78364. } else {
  78365. return ` ${maybeHighlight(defs.gutter, gutter)}${line.length > 0 ? ` ${line}` : ""}`;
  78366. }
  78367. }).join("\n");
  78368. if (opts.message && !hasColumns) {
  78369. frame = `${" ".repeat(numberMaxWidth + 1)}${opts.message}
  78370. ${frame}`;
  78371. }
  78372. if (highlighted) {
  78373. return chalk.reset(frame);
  78374. } else {
  78375. return frame;
  78376. }
  78377. }
  78378. function _default(rawLines, lineNumber, colNumber, opts = {}) {
  78379. if (!deprecationWarningShown) {
  78380. deprecationWarningShown = true;
  78381. const message = "Passing lineNumber and colNumber is deprecated to @babel/code-frame. Please use `codeFrameColumns`.";
  78382. if (process.emitWarning) {
  78383. process.emitWarning(message, "DeprecationWarning");
  78384. } else {
  78385. const deprecationError = new Error(message);
  78386. deprecationError.name = "DeprecationWarning";
  78387. console.warn(new Error(message));
  78388. }
  78389. }
  78390. colNumber = Math.max(colNumber, 0);
  78391. const location = {
  78392. start: {
  78393. column: colNumber,
  78394. line: lineNumber
  78395. }
  78396. };
  78397. return codeFrameColumns(rawLines, location, opts);
  78398. }
  78399. }
  78400. });
  78401. // node_modules/@babel/traverse/node_modules/@babel/parser/lib/index.js
  78402. var require_lib22 = __commonJS({
  78403. "node_modules/@babel/traverse/node_modules/@babel/parser/lib/index.js"(exports) {
  78404. "use strict";
  78405. Object.defineProperty(exports, "__esModule", { value: true });
  78406. var beforeExpr2 = true;
  78407. var startsExpr2 = true;
  78408. var isLoop = true;
  78409. var isAssign = true;
  78410. var prefix = true;
  78411. var postfix = true;
  78412. var TokenType3 = class {
  78413. constructor(label, conf = {}) {
  78414. this.label = void 0;
  78415. this.keyword = void 0;
  78416. this.beforeExpr = void 0;
  78417. this.startsExpr = void 0;
  78418. this.rightAssociative = void 0;
  78419. this.isLoop = void 0;
  78420. this.isAssign = void 0;
  78421. this.prefix = void 0;
  78422. this.postfix = void 0;
  78423. this.binop = void 0;
  78424. this.updateContext = void 0;
  78425. this.label = label;
  78426. this.keyword = conf.keyword;
  78427. this.beforeExpr = !!conf.beforeExpr;
  78428. this.startsExpr = !!conf.startsExpr;
  78429. this.rightAssociative = !!conf.rightAssociative;
  78430. this.isLoop = !!conf.isLoop;
  78431. this.isAssign = !!conf.isAssign;
  78432. this.prefix = !!conf.prefix;
  78433. this.postfix = !!conf.postfix;
  78434. this.binop = conf.binop != null ? conf.binop : null;
  78435. this.updateContext = null;
  78436. }
  78437. };
  78438. var keywords$12 = /* @__PURE__ */ new Map();
  78439. function createKeyword(name2, options = {}) {
  78440. options.keyword = name2;
  78441. const token = new TokenType3(name2, options);
  78442. keywords$12.set(name2, token);
  78443. return token;
  78444. }
  78445. function createBinop(name2, binop2) {
  78446. return new TokenType3(name2, {
  78447. beforeExpr: beforeExpr2,
  78448. binop: binop2
  78449. });
  78450. }
  78451. var types$12 = {
  78452. num: new TokenType3("num", {
  78453. startsExpr: startsExpr2
  78454. }),
  78455. bigint: new TokenType3("bigint", {
  78456. startsExpr: startsExpr2
  78457. }),
  78458. decimal: new TokenType3("decimal", {
  78459. startsExpr: startsExpr2
  78460. }),
  78461. regexp: new TokenType3("regexp", {
  78462. startsExpr: startsExpr2
  78463. }),
  78464. string: new TokenType3("string", {
  78465. startsExpr: startsExpr2
  78466. }),
  78467. name: new TokenType3("name", {
  78468. startsExpr: startsExpr2
  78469. }),
  78470. privateName: new TokenType3("#name", {
  78471. startsExpr: startsExpr2
  78472. }),
  78473. eof: new TokenType3("eof"),
  78474. bracketL: new TokenType3("[", {
  78475. beforeExpr: beforeExpr2,
  78476. startsExpr: startsExpr2
  78477. }),
  78478. bracketHashL: new TokenType3("#[", {
  78479. beforeExpr: beforeExpr2,
  78480. startsExpr: startsExpr2
  78481. }),
  78482. bracketBarL: new TokenType3("[|", {
  78483. beforeExpr: beforeExpr2,
  78484. startsExpr: startsExpr2
  78485. }),
  78486. bracketR: new TokenType3("]"),
  78487. bracketBarR: new TokenType3("|]"),
  78488. braceL: new TokenType3("{", {
  78489. beforeExpr: beforeExpr2,
  78490. startsExpr: startsExpr2
  78491. }),
  78492. braceBarL: new TokenType3("{|", {
  78493. beforeExpr: beforeExpr2,
  78494. startsExpr: startsExpr2
  78495. }),
  78496. braceHashL: new TokenType3("#{", {
  78497. beforeExpr: beforeExpr2,
  78498. startsExpr: startsExpr2
  78499. }),
  78500. braceR: new TokenType3("}", {
  78501. beforeExpr: beforeExpr2
  78502. }),
  78503. braceBarR: new TokenType3("|}"),
  78504. parenL: new TokenType3("(", {
  78505. beforeExpr: beforeExpr2,
  78506. startsExpr: startsExpr2
  78507. }),
  78508. parenR: new TokenType3(")"),
  78509. comma: new TokenType3(",", {
  78510. beforeExpr: beforeExpr2
  78511. }),
  78512. semi: new TokenType3(";", {
  78513. beforeExpr: beforeExpr2
  78514. }),
  78515. colon: new TokenType3(":", {
  78516. beforeExpr: beforeExpr2
  78517. }),
  78518. doubleColon: new TokenType3("::", {
  78519. beforeExpr: beforeExpr2
  78520. }),
  78521. dot: new TokenType3("."),
  78522. question: new TokenType3("?", {
  78523. beforeExpr: beforeExpr2
  78524. }),
  78525. questionDot: new TokenType3("?."),
  78526. arrow: new TokenType3("=>", {
  78527. beforeExpr: beforeExpr2
  78528. }),
  78529. template: new TokenType3("template"),
  78530. ellipsis: new TokenType3("...", {
  78531. beforeExpr: beforeExpr2
  78532. }),
  78533. backQuote: new TokenType3("`", {
  78534. startsExpr: startsExpr2
  78535. }),
  78536. dollarBraceL: new TokenType3("${", {
  78537. beforeExpr: beforeExpr2,
  78538. startsExpr: startsExpr2
  78539. }),
  78540. at: new TokenType3("@"),
  78541. hash: new TokenType3("#", {
  78542. startsExpr: startsExpr2
  78543. }),
  78544. interpreterDirective: new TokenType3("#!..."),
  78545. eq: new TokenType3("=", {
  78546. beforeExpr: beforeExpr2,
  78547. isAssign
  78548. }),
  78549. assign: new TokenType3("_=", {
  78550. beforeExpr: beforeExpr2,
  78551. isAssign
  78552. }),
  78553. slashAssign: new TokenType3("_=", {
  78554. beforeExpr: beforeExpr2,
  78555. isAssign
  78556. }),
  78557. incDec: new TokenType3("++/--", {
  78558. prefix,
  78559. postfix,
  78560. startsExpr: startsExpr2
  78561. }),
  78562. bang: new TokenType3("!", {
  78563. beforeExpr: beforeExpr2,
  78564. prefix,
  78565. startsExpr: startsExpr2
  78566. }),
  78567. tilde: new TokenType3("~", {
  78568. beforeExpr: beforeExpr2,
  78569. prefix,
  78570. startsExpr: startsExpr2
  78571. }),
  78572. pipeline: createBinop("|>", 0),
  78573. nullishCoalescing: createBinop("??", 1),
  78574. logicalOR: createBinop("||", 1),
  78575. logicalAND: createBinop("&&", 2),
  78576. bitwiseOR: createBinop("|", 3),
  78577. bitwiseXOR: createBinop("^", 4),
  78578. bitwiseAND: createBinop("&", 5),
  78579. equality: createBinop("==/!=/===/!==", 6),
  78580. relational: createBinop("</>/<=/>=", 7),
  78581. bitShift: createBinop("<</>>/>>>", 8),
  78582. plusMin: new TokenType3("+/-", {
  78583. beforeExpr: beforeExpr2,
  78584. binop: 9,
  78585. prefix,
  78586. startsExpr: startsExpr2
  78587. }),
  78588. modulo: new TokenType3("%", {
  78589. beforeExpr: beforeExpr2,
  78590. binop: 10,
  78591. startsExpr: startsExpr2
  78592. }),
  78593. star: new TokenType3("*", {
  78594. binop: 10
  78595. }),
  78596. slash: createBinop("/", 10),
  78597. exponent: new TokenType3("**", {
  78598. beforeExpr: beforeExpr2,
  78599. binop: 11,
  78600. rightAssociative: true
  78601. }),
  78602. _break: createKeyword("break"),
  78603. _case: createKeyword("case", {
  78604. beforeExpr: beforeExpr2
  78605. }),
  78606. _catch: createKeyword("catch"),
  78607. _continue: createKeyword("continue"),
  78608. _debugger: createKeyword("debugger"),
  78609. _default: createKeyword("default", {
  78610. beforeExpr: beforeExpr2
  78611. }),
  78612. _do: createKeyword("do", {
  78613. isLoop,
  78614. beforeExpr: beforeExpr2
  78615. }),
  78616. _else: createKeyword("else", {
  78617. beforeExpr: beforeExpr2
  78618. }),
  78619. _finally: createKeyword("finally"),
  78620. _for: createKeyword("for", {
  78621. isLoop
  78622. }),
  78623. _function: createKeyword("function", {
  78624. startsExpr: startsExpr2
  78625. }),
  78626. _if: createKeyword("if"),
  78627. _return: createKeyword("return", {
  78628. beforeExpr: beforeExpr2
  78629. }),
  78630. _switch: createKeyword("switch"),
  78631. _throw: createKeyword("throw", {
  78632. beforeExpr: beforeExpr2,
  78633. prefix,
  78634. startsExpr: startsExpr2
  78635. }),
  78636. _try: createKeyword("try"),
  78637. _var: createKeyword("var"),
  78638. _const: createKeyword("const"),
  78639. _while: createKeyword("while", {
  78640. isLoop
  78641. }),
  78642. _with: createKeyword("with"),
  78643. _new: createKeyword("new", {
  78644. beforeExpr: beforeExpr2,
  78645. startsExpr: startsExpr2
  78646. }),
  78647. _this: createKeyword("this", {
  78648. startsExpr: startsExpr2
  78649. }),
  78650. _super: createKeyword("super", {
  78651. startsExpr: startsExpr2
  78652. }),
  78653. _class: createKeyword("class", {
  78654. startsExpr: startsExpr2
  78655. }),
  78656. _extends: createKeyword("extends", {
  78657. beforeExpr: beforeExpr2
  78658. }),
  78659. _export: createKeyword("export"),
  78660. _import: createKeyword("import", {
  78661. startsExpr: startsExpr2
  78662. }),
  78663. _null: createKeyword("null", {
  78664. startsExpr: startsExpr2
  78665. }),
  78666. _true: createKeyword("true", {
  78667. startsExpr: startsExpr2
  78668. }),
  78669. _false: createKeyword("false", {
  78670. startsExpr: startsExpr2
  78671. }),
  78672. _in: createKeyword("in", {
  78673. beforeExpr: beforeExpr2,
  78674. binop: 7
  78675. }),
  78676. _instanceof: createKeyword("instanceof", {
  78677. beforeExpr: beforeExpr2,
  78678. binop: 7
  78679. }),
  78680. _typeof: createKeyword("typeof", {
  78681. beforeExpr: beforeExpr2,
  78682. prefix,
  78683. startsExpr: startsExpr2
  78684. }),
  78685. _void: createKeyword("void", {
  78686. beforeExpr: beforeExpr2,
  78687. prefix,
  78688. startsExpr: startsExpr2
  78689. }),
  78690. _delete: createKeyword("delete", {
  78691. beforeExpr: beforeExpr2,
  78692. prefix,
  78693. startsExpr: startsExpr2
  78694. })
  78695. };
  78696. var lineBreak2 = /\r\n?|[\n\u2028\u2029]/;
  78697. var lineBreakG2 = new RegExp(lineBreak2.source, "g");
  78698. function isNewLine2(code2) {
  78699. switch (code2) {
  78700. case 10:
  78701. case 13:
  78702. case 8232:
  78703. case 8233:
  78704. return true;
  78705. default:
  78706. return false;
  78707. }
  78708. }
  78709. var skipWhiteSpace2 = /(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g;
  78710. function isWhitespace(code2) {
  78711. switch (code2) {
  78712. case 9:
  78713. case 11:
  78714. case 12:
  78715. case 32:
  78716. case 160:
  78717. case 5760:
  78718. case 8192:
  78719. case 8193:
  78720. case 8194:
  78721. case 8195:
  78722. case 8196:
  78723. case 8197:
  78724. case 8198:
  78725. case 8199:
  78726. case 8200:
  78727. case 8201:
  78728. case 8202:
  78729. case 8239:
  78730. case 8287:
  78731. case 12288:
  78732. case 65279:
  78733. return true;
  78734. default:
  78735. return false;
  78736. }
  78737. }
  78738. var Position3 = class {
  78739. constructor(line, col) {
  78740. this.line = void 0;
  78741. this.column = void 0;
  78742. this.line = line;
  78743. this.column = col;
  78744. }
  78745. };
  78746. var SourceLocation3 = class {
  78747. constructor(start3, end) {
  78748. this.start = void 0;
  78749. this.end = void 0;
  78750. this.filename = void 0;
  78751. this.identifierName = void 0;
  78752. this.start = start3;
  78753. this.end = end;
  78754. }
  78755. };
  78756. function getLineInfo2(input, offset2) {
  78757. let line = 1;
  78758. let lineStart = 0;
  78759. let match;
  78760. lineBreakG2.lastIndex = 0;
  78761. while ((match = lineBreakG2.exec(input)) && match.index < offset2) {
  78762. line++;
  78763. lineStart = lineBreakG2.lastIndex;
  78764. }
  78765. return new Position3(line, offset2 - lineStart);
  78766. }
  78767. var BaseParser = class {
  78768. constructor() {
  78769. this.sawUnambiguousESM = false;
  78770. this.ambiguousScriptDifferentAst = false;
  78771. }
  78772. hasPlugin(name2) {
  78773. return this.plugins.has(name2);
  78774. }
  78775. getPluginOption(plugin2, name2) {
  78776. if (this.hasPlugin(plugin2))
  78777. return this.plugins.get(plugin2)[name2];
  78778. }
  78779. };
  78780. function setTrailingComments(node, comments) {
  78781. if (node.trailingComments === void 0) {
  78782. node.trailingComments = comments;
  78783. } else {
  78784. node.trailingComments.unshift(...comments);
  78785. }
  78786. }
  78787. function setInnerComments(node, comments) {
  78788. if (node.innerComments === void 0) {
  78789. node.innerComments = comments;
  78790. } else if (comments !== void 0) {
  78791. node.innerComments.unshift(...comments);
  78792. }
  78793. }
  78794. function adjustInnerComments(node, elements, commentWS) {
  78795. let lastElement = null;
  78796. let i = elements.length;
  78797. while (lastElement === null && i > 0) {
  78798. lastElement = elements[--i];
  78799. }
  78800. if (lastElement === null || lastElement.start > commentWS.start) {
  78801. setInnerComments(node, commentWS.comments);
  78802. } else {
  78803. setTrailingComments(lastElement, commentWS.comments);
  78804. }
  78805. }
  78806. var CommentsParser = class extends BaseParser {
  78807. addComment(comment2) {
  78808. if (this.filename)
  78809. comment2.loc.filename = this.filename;
  78810. this.state.comments.push(comment2);
  78811. }
  78812. processComment(node) {
  78813. const {
  78814. commentStack
  78815. } = this.state;
  78816. const commentStackLength = commentStack.length;
  78817. if (commentStackLength === 0)
  78818. return;
  78819. let i = commentStackLength - 1;
  78820. const lastCommentWS = commentStack[i];
  78821. if (lastCommentWS.start === node.end) {
  78822. lastCommentWS.leadingNode = node;
  78823. i--;
  78824. }
  78825. const {
  78826. start: nodeStart
  78827. } = node;
  78828. for (; i >= 0; i--) {
  78829. const commentWS = commentStack[i];
  78830. const commentEnd = commentWS.end;
  78831. if (commentEnd > nodeStart) {
  78832. commentWS.containingNode = node;
  78833. this.finalizeComment(commentWS);
  78834. commentStack.splice(i, 1);
  78835. } else {
  78836. if (commentEnd === nodeStart) {
  78837. commentWS.trailingNode = node;
  78838. }
  78839. break;
  78840. }
  78841. }
  78842. }
  78843. finalizeComment(commentWS) {
  78844. const {
  78845. comments
  78846. } = commentWS;
  78847. if (commentWS.leadingNode !== null || commentWS.trailingNode !== null) {
  78848. if (commentWS.leadingNode !== null) {
  78849. setTrailingComments(commentWS.leadingNode, comments);
  78850. }
  78851. if (commentWS.trailingNode !== null) {
  78852. commentWS.trailingNode.leadingComments = comments;
  78853. }
  78854. } else {
  78855. const {
  78856. containingNode: node,
  78857. start: commentStart
  78858. } = commentWS;
  78859. if (this.input.charCodeAt(commentStart - 1) === 44) {
  78860. switch (node.type) {
  78861. case "ObjectExpression":
  78862. case "ObjectPattern":
  78863. case "RecordExpression":
  78864. adjustInnerComments(node, node.properties, commentWS);
  78865. break;
  78866. case "CallExpression":
  78867. case "OptionalCallExpression":
  78868. adjustInnerComments(node, node.arguments, commentWS);
  78869. break;
  78870. case "FunctionDeclaration":
  78871. case "FunctionExpression":
  78872. case "ArrowFunctionExpression":
  78873. case "ObjectMethod":
  78874. case "ClassMethod":
  78875. case "ClassPrivateMethod":
  78876. adjustInnerComments(node, node.params, commentWS);
  78877. break;
  78878. case "ArrayExpression":
  78879. case "ArrayPattern":
  78880. case "TupleExpression":
  78881. adjustInnerComments(node, node.elements, commentWS);
  78882. break;
  78883. case "ExportNamedDeclaration":
  78884. case "ImportDeclaration":
  78885. adjustInnerComments(node, node.specifiers, commentWS);
  78886. break;
  78887. default: {
  78888. setInnerComments(node, comments);
  78889. }
  78890. }
  78891. } else {
  78892. setInnerComments(node, comments);
  78893. }
  78894. }
  78895. }
  78896. finalizeRemainingComments() {
  78897. const {
  78898. commentStack
  78899. } = this.state;
  78900. for (let i = commentStack.length - 1; i >= 0; i--) {
  78901. this.finalizeComment(commentStack[i]);
  78902. }
  78903. this.state.commentStack = [];
  78904. }
  78905. resetPreviousNodeTrailingComments(node) {
  78906. const {
  78907. commentStack
  78908. } = this.state;
  78909. const {
  78910. length
  78911. } = commentStack;
  78912. if (length === 0)
  78913. return;
  78914. const commentWS = commentStack[length - 1];
  78915. if (commentWS.leadingNode === node) {
  78916. commentWS.leadingNode = null;
  78917. }
  78918. }
  78919. };
  78920. var ErrorCodes = Object.freeze({
  78921. SyntaxError: "BABEL_PARSER_SYNTAX_ERROR",
  78922. SourceTypeModuleError: "BABEL_PARSER_SOURCETYPE_MODULE_REQUIRED"
  78923. });
  78924. var ErrorMessages = makeErrorTemplates({
  78925. AccessorIsGenerator: "A %0ter cannot be a generator.",
  78926. ArgumentsInClass: "'arguments' is only allowed in functions and class methods.",
  78927. AsyncFunctionInSingleStatementContext: "Async functions can only be declared at the top level or inside a block.",
  78928. AwaitBindingIdentifier: "Can not use 'await' as identifier inside an async function.",
  78929. AwaitBindingIdentifierInStaticBlock: "Can not use 'await' as identifier inside a static block.",
  78930. AwaitExpressionFormalParameter: "'await' is not allowed in async function parameters.",
  78931. AwaitNotInAsyncContext: "'await' is only allowed within async functions and at the top levels of modules.",
  78932. AwaitNotInAsyncFunction: "'await' is only allowed within async functions.",
  78933. BadGetterArity: "A 'get' accesor must not have any formal parameters.",
  78934. BadSetterArity: "A 'set' accesor must have exactly one formal parameter.",
  78935. BadSetterRestParameter: "A 'set' accesor function argument must not be a rest parameter.",
  78936. ConstructorClassField: "Classes may not have a field named 'constructor'.",
  78937. ConstructorClassPrivateField: "Classes may not have a private field named '#constructor'.",
  78938. ConstructorIsAccessor: "Class constructor may not be an accessor.",
  78939. ConstructorIsAsync: "Constructor can't be an async function.",
  78940. ConstructorIsGenerator: "Constructor can't be a generator.",
  78941. DeclarationMissingInitializer: "'%0' require an initialization value.",
  78942. DecoratorBeforeExport: "Decorators must be placed *before* the 'export' keyword. You can set the 'decoratorsBeforeExport' option to false to use the 'export @decorator class {}' syntax.",
  78943. DecoratorConstructor: "Decorators can't be used with a constructor. Did you mean '@dec class { ... }'?",
  78944. DecoratorExportClass: "Using the export keyword between a decorator and a class is not allowed. Please use `export @dec class` instead.",
  78945. DecoratorSemicolon: "Decorators must not be followed by a semicolon.",
  78946. DecoratorStaticBlock: "Decorators can't be used with a static block.",
  78947. DeletePrivateField: "Deleting a private field is not allowed.",
  78948. DestructureNamedImport: "ES2015 named imports do not destructure. Use another statement for destructuring after the import.",
  78949. DuplicateConstructor: "Duplicate constructor in the same class.",
  78950. DuplicateDefaultExport: "Only one default export allowed per module.",
  78951. DuplicateExport: "`%0` has already been exported. Exported identifiers must be unique.",
  78952. DuplicateProto: "Redefinition of __proto__ property.",
  78953. DuplicateRegExpFlags: "Duplicate regular expression flag.",
  78954. ElementAfterRest: "Rest element must be last element.",
  78955. EscapedCharNotAnIdentifier: "Invalid Unicode escape.",
  78956. ExportBindingIsString: "A string literal cannot be used as an exported binding without `from`.\n- Did you mean `export { '%0' as '%1' } from 'some-module'`?",
  78957. ExportDefaultFromAsIdentifier: "'from' is not allowed as an identifier after 'export default'.",
  78958. ForInOfLoopInitializer: "'%0' loop variable declaration may not have an initializer.",
  78959. ForOfAsync: "The left-hand side of a for-of loop may not be 'async'.",
  78960. ForOfLet: "The left-hand side of a for-of loop may not start with 'let'.",
  78961. GeneratorInSingleStatementContext: "Generators can only be declared at the top level or inside a block.",
  78962. IllegalBreakContinue: "Unsyntactic %0.",
  78963. IllegalLanguageModeDirective: "Illegal 'use strict' directive in function with non-simple parameter list.",
  78964. IllegalReturn: "'return' outside of function.",
  78965. ImportBindingIsString: 'A string literal cannot be used as an imported binding.\n- Did you mean `import { "%0" as foo }`?',
  78966. ImportCallArgumentTrailingComma: "Trailing comma is disallowed inside import(...) arguments.",
  78967. ImportCallArity: "`import()` requires exactly %0.",
  78968. ImportCallNotNewExpression: "Cannot use new with import(...).",
  78969. ImportCallSpreadArgument: "`...` is not allowed in `import()`.",
  78970. InvalidBigIntLiteral: "Invalid BigIntLiteral.",
  78971. InvalidCodePoint: "Code point out of bounds.",
  78972. InvalidDecimal: "Invalid decimal.",
  78973. InvalidDigit: "Expected number in radix %0.",
  78974. InvalidEscapeSequence: "Bad character escape sequence.",
  78975. InvalidEscapeSequenceTemplate: "Invalid escape sequence in template.",
  78976. InvalidEscapedReservedWord: "Escape sequence in keyword %0.",
  78977. InvalidIdentifier: "Invalid identifier %0.",
  78978. InvalidLhs: "Invalid left-hand side in %0.",
  78979. InvalidLhsBinding: "Binding invalid left-hand side in %0.",
  78980. InvalidNumber: "Invalid number.",
  78981. InvalidOrMissingExponent: "Floating-point numbers require a valid exponent after the 'e'.",
  78982. InvalidOrUnexpectedToken: "Unexpected character '%0'.",
  78983. InvalidParenthesizedAssignment: "Invalid parenthesized assignment pattern.",
  78984. InvalidPrivateFieldResolution: "Private name #%0 is not defined.",
  78985. InvalidPropertyBindingPattern: "Binding member expression.",
  78986. InvalidRecordProperty: "Only properties and spread elements are allowed in record definitions.",
  78987. InvalidRestAssignmentPattern: "Invalid rest operator's argument.",
  78988. LabelRedeclaration: "Label '%0' is already declared.",
  78989. LetInLexicalBinding: "'let' is not allowed to be used as a name in 'let' or 'const' declarations.",
  78990. LineTerminatorBeforeArrow: "No line break is allowed before '=>'.",
  78991. MalformedRegExpFlags: "Invalid regular expression flag.",
  78992. MissingClassName: "A class name is required.",
  78993. MissingEqInAssignment: "Only '=' operator can be used for specifying default value.",
  78994. MissingSemicolon: "Missing semicolon.",
  78995. MissingUnicodeEscape: "Expecting Unicode escape sequence \\uXXXX.",
  78996. MixingCoalesceWithLogical: "Nullish coalescing operator(??) requires parens when mixing with logical operators.",
  78997. ModuleAttributeDifferentFromType: "The only accepted module attribute is `type`.",
  78998. ModuleAttributeInvalidValue: "Only string literals are allowed as module attribute values.",
  78999. ModuleAttributesWithDuplicateKeys: 'Duplicate key "%0" is not allowed in module attributes.',
  79000. ModuleExportNameHasLoneSurrogate: "An export name cannot include a lone surrogate, found '\\u%0'.",
  79001. ModuleExportUndefined: "Export '%0' is not defined.",
  79002. MultipleDefaultsInSwitch: "Multiple default clauses.",
  79003. NewlineAfterThrow: "Illegal newline after throw.",
  79004. NoCatchOrFinally: "Missing catch or finally clause.",
  79005. NumberIdentifier: "Identifier directly after number.",
  79006. NumericSeparatorInEscapeSequence: "Numeric separators are not allowed inside unicode escape sequences or hex escape sequences.",
  79007. ObsoleteAwaitStar: "'await*' has been removed from the async functions proposal. Use Promise.all() instead.",
  79008. OptionalChainingNoNew: "Constructors in/after an Optional Chain are not allowed.",
  79009. OptionalChainingNoTemplate: "Tagged Template Literals are not allowed in optionalChain.",
  79010. OverrideOnConstructor: "'override' modifier cannot appear on a constructor declaration.",
  79011. ParamDupe: "Argument name clash.",
  79012. PatternHasAccessor: "Object pattern can't contain getter or setter.",
  79013. PatternHasMethod: "Object pattern can't contain methods.",
  79014. PipelineBodyNoArrow: 'Unexpected arrow "=>" after pipeline body; arrow function in pipeline body must be parenthesized.',
  79015. PipelineBodySequenceExpression: "Pipeline body may not be a comma-separated sequence expression.",
  79016. PipelineHeadSequenceExpression: "Pipeline head should not be a comma-separated sequence expression.",
  79017. PipelineTopicUnused: "Pipeline is in topic style but does not use topic reference.",
  79018. PrimaryTopicNotAllowed: "Topic reference was used in a lexical context without topic binding.",
  79019. PrimaryTopicRequiresSmartPipeline: "Primary Topic Reference found but pipelineOperator not passed 'smart' for 'proposal' option.",
  79020. PrivateInExpectedIn: "Private names are only allowed in property accesses (`obj.#%0`) or in `in` expressions (`#%0 in obj`).",
  79021. PrivateNameRedeclaration: "Duplicate private name #%0.",
  79022. RecordExpressionBarIncorrectEndSyntaxType: "Record expressions ending with '|}' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'bar'.",
  79023. RecordExpressionBarIncorrectStartSyntaxType: "Record expressions starting with '{|' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'bar'.",
  79024. RecordExpressionHashIncorrectStartSyntaxType: "Record expressions starting with '#{' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'hash'.",
  79025. RecordNoProto: "'__proto__' is not allowed in Record expressions.",
  79026. RestTrailingComma: "Unexpected trailing comma after rest element.",
  79027. SloppyFunction: "In non-strict mode code, functions can only be declared at top level, inside a block, or as the body of an if statement.",
  79028. StaticPrototype: "Classes may not have static property named prototype.",
  79029. StrictDelete: "Deleting local variable in strict mode.",
  79030. StrictEvalArguments: "Assigning to '%0' in strict mode.",
  79031. StrictEvalArgumentsBinding: "Binding '%0' in strict mode.",
  79032. StrictFunction: "In strict mode code, functions can only be declared at top level or inside a block.",
  79033. StrictNumericEscape: "The only valid numeric escape in strict mode is '\\0'.",
  79034. StrictOctalLiteral: "Legacy octal literals are not allowed in strict mode.",
  79035. StrictWith: "'with' in strict mode.",
  79036. SuperNotAllowed: "`super()` is only valid inside a class constructor of a subclass. Maybe a typo in the method name ('constructor') or not extending another class?",
  79037. SuperPrivateField: "Private fields can't be accessed on super.",
  79038. TrailingDecorator: "Decorators must be attached to a class element.",
  79039. TupleExpressionBarIncorrectEndSyntaxType: "Tuple expressions ending with '|]' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'bar'.",
  79040. TupleExpressionBarIncorrectStartSyntaxType: "Tuple expressions starting with '[|' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'bar'.",
  79041. TupleExpressionHashIncorrectStartSyntaxType: "Tuple expressions starting with '#[' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'hash'.",
  79042. UnexpectedArgumentPlaceholder: "Unexpected argument placeholder.",
  79043. UnexpectedAwaitAfterPipelineBody: 'Unexpected "await" after pipeline body; await must have parentheses in minimal proposal.',
  79044. UnexpectedDigitAfterHash: "Unexpected digit after hash token.",
  79045. UnexpectedImportExport: "'import' and 'export' may only appear at the top level.",
  79046. UnexpectedKeyword: "Unexpected keyword '%0'.",
  79047. UnexpectedLeadingDecorator: "Leading decorators must be attached to a class declaration.",
  79048. UnexpectedLexicalDeclaration: "Lexical declaration cannot appear in a single-statement context.",
  79049. UnexpectedNewTarget: "`new.target` can only be used in functions or class properties.",
  79050. UnexpectedNumericSeparator: "A numeric separator is only allowed between two digits.",
  79051. UnexpectedPrivateField: "Private names can only be used as the name of a class element (i.e. class C { #p = 42; #m() {} } )\n or a property of member expression (i.e. this.#p).",
  79052. UnexpectedReservedWord: "Unexpected reserved word '%0'.",
  79053. UnexpectedSuper: "'super' is only allowed in object methods and classes.",
  79054. UnexpectedToken: "Unexpected token '%0'.",
  79055. UnexpectedTokenUnaryExponentiation: "Illegal expression. Wrap left hand side or entire exponentiation in parentheses.",
  79056. UnsupportedBind: "Binding should be performed on object property.",
  79057. UnsupportedDecoratorExport: "A decorated export must export a class declaration.",
  79058. UnsupportedDefaultExport: "Only expressions, functions or classes are allowed as the `default` export.",
  79059. UnsupportedImport: "`import` can only be used in `import()` or `import.meta`.",
  79060. UnsupportedMetaProperty: "The only valid meta property for %0 is %0.%1.",
  79061. UnsupportedParameterDecorator: "Decorators cannot be used to decorate parameters.",
  79062. UnsupportedPropertyDecorator: "Decorators cannot be used to decorate object literal properties.",
  79063. UnsupportedSuper: "'super' can only be used with function calls (i.e. super()) or in property accesses (i.e. super.prop or super[prop]).",
  79064. UnterminatedComment: "Unterminated comment.",
  79065. UnterminatedRegExp: "Unterminated regular expression.",
  79066. UnterminatedString: "Unterminated string constant.",
  79067. UnterminatedTemplate: "Unterminated template.",
  79068. VarRedeclaration: "Identifier '%0' has already been declared.",
  79069. YieldBindingIdentifier: "Can not use 'yield' as identifier inside a generator.",
  79070. YieldInParameter: "Yield expression is not allowed in formal parameters.",
  79071. ZeroDigitNumericSeparator: "Numeric separator can not be used after leading 0."
  79072. }, ErrorCodes.SyntaxError);
  79073. var SourceTypeModuleErrorMessages = makeErrorTemplates({
  79074. ImportMetaOutsideModule: `import.meta may appear only with 'sourceType: "module"'`,
  79075. ImportOutsideModule: `'import' and 'export' may appear only with 'sourceType: "module"'`
  79076. }, ErrorCodes.SourceTypeModuleError);
  79077. function makeErrorTemplates(messages2, code2) {
  79078. const templates = {};
  79079. Object.keys(messages2).forEach((reasonCode) => {
  79080. templates[reasonCode] = Object.freeze({
  79081. code: code2,
  79082. reasonCode,
  79083. template: messages2[reasonCode]
  79084. });
  79085. });
  79086. return Object.freeze(templates);
  79087. }
  79088. var ParserError = class extends CommentsParser {
  79089. getLocationForPosition(pos) {
  79090. let loc;
  79091. if (pos === this.state.start)
  79092. loc = this.state.startLoc;
  79093. else if (pos === this.state.lastTokStart)
  79094. loc = this.state.lastTokStartLoc;
  79095. else if (pos === this.state.end)
  79096. loc = this.state.endLoc;
  79097. else if (pos === this.state.lastTokEnd)
  79098. loc = this.state.lastTokEndLoc;
  79099. else
  79100. loc = getLineInfo2(this.input, pos);
  79101. return loc;
  79102. }
  79103. raise(pos, {
  79104. code: code2,
  79105. reasonCode,
  79106. template
  79107. }, ...params) {
  79108. return this.raiseWithData(pos, {
  79109. code: code2,
  79110. reasonCode
  79111. }, template, ...params);
  79112. }
  79113. raiseOverwrite(pos, {
  79114. code: code2,
  79115. template
  79116. }, ...params) {
  79117. const loc = this.getLocationForPosition(pos);
  79118. const message = template.replace(/%(\d+)/g, (_, i) => params[i]) + ` (${loc.line}:${loc.column})`;
  79119. if (this.options.errorRecovery) {
  79120. const errors = this.state.errors;
  79121. for (let i = errors.length - 1; i >= 0; i--) {
  79122. const error = errors[i];
  79123. if (error.pos === pos) {
  79124. return Object.assign(error, {
  79125. message
  79126. });
  79127. } else if (error.pos < pos) {
  79128. break;
  79129. }
  79130. }
  79131. }
  79132. return this._raise({
  79133. code: code2,
  79134. loc,
  79135. pos
  79136. }, message);
  79137. }
  79138. raiseWithData(pos, data2, errorTemplate, ...params) {
  79139. const loc = this.getLocationForPosition(pos);
  79140. const message = errorTemplate.replace(/%(\d+)/g, (_, i) => params[i]) + ` (${loc.line}:${loc.column})`;
  79141. return this._raise(Object.assign({
  79142. loc,
  79143. pos
  79144. }, data2), message);
  79145. }
  79146. _raise(errorContext, message) {
  79147. const err = new SyntaxError(message);
  79148. Object.assign(err, errorContext);
  79149. if (this.options.errorRecovery) {
  79150. if (!this.isLookahead)
  79151. this.state.errors.push(err);
  79152. return err;
  79153. } else {
  79154. throw err;
  79155. }
  79156. }
  79157. };
  79158. var estree = (superClass) => class extends superClass {
  79159. parseRegExpLiteral({
  79160. pattern,
  79161. flags
  79162. }) {
  79163. let regex2 = null;
  79164. try {
  79165. regex2 = new RegExp(pattern, flags);
  79166. } catch (e) {
  79167. }
  79168. const node = this.estreeParseLiteral(regex2);
  79169. node.regex = {
  79170. pattern,
  79171. flags
  79172. };
  79173. return node;
  79174. }
  79175. parseBigIntLiteral(value) {
  79176. let bigInt;
  79177. try {
  79178. bigInt = BigInt(value);
  79179. } catch (_unused) {
  79180. bigInt = null;
  79181. }
  79182. const node = this.estreeParseLiteral(bigInt);
  79183. node.bigint = String(node.value || value);
  79184. return node;
  79185. }
  79186. parseDecimalLiteral(value) {
  79187. const decimal = null;
  79188. const node = this.estreeParseLiteral(decimal);
  79189. node.decimal = String(node.value || value);
  79190. return node;
  79191. }
  79192. estreeParseLiteral(value) {
  79193. return this.parseLiteral(value, "Literal");
  79194. }
  79195. parseStringLiteral(value) {
  79196. return this.estreeParseLiteral(value);
  79197. }
  79198. parseNumericLiteral(value) {
  79199. return this.estreeParseLiteral(value);
  79200. }
  79201. parseNullLiteral() {
  79202. return this.estreeParseLiteral(null);
  79203. }
  79204. parseBooleanLiteral(value) {
  79205. return this.estreeParseLiteral(value);
  79206. }
  79207. directiveToStmt(directive) {
  79208. const directiveLiteral = directive.value;
  79209. const stmt = this.startNodeAt(directive.start, directive.loc.start);
  79210. const expression = this.startNodeAt(directiveLiteral.start, directiveLiteral.loc.start);
  79211. expression.value = directiveLiteral.extra.expressionValue;
  79212. expression.raw = directiveLiteral.extra.raw;
  79213. stmt.expression = this.finishNodeAt(expression, "Literal", directiveLiteral.end, directiveLiteral.loc.end);
  79214. stmt.directive = directiveLiteral.extra.raw.slice(1, -1);
  79215. return this.finishNodeAt(stmt, "ExpressionStatement", directive.end, directive.loc.end);
  79216. }
  79217. initFunction(node, isAsync) {
  79218. super.initFunction(node, isAsync);
  79219. node.expression = false;
  79220. }
  79221. checkDeclaration(node) {
  79222. if (node != null && this.isObjectProperty(node)) {
  79223. this.checkDeclaration(node.value);
  79224. } else {
  79225. super.checkDeclaration(node);
  79226. }
  79227. }
  79228. getObjectOrClassMethodParams(method) {
  79229. return method.value.params;
  79230. }
  79231. isValidDirective(stmt) {
  79232. var _stmt$expression$extr;
  79233. return stmt.type === "ExpressionStatement" && stmt.expression.type === "Literal" && typeof stmt.expression.value === "string" && !((_stmt$expression$extr = stmt.expression.extra) != null && _stmt$expression$extr.parenthesized);
  79234. }
  79235. stmtToDirective(stmt) {
  79236. const value = stmt.expression.value;
  79237. const directive = super.stmtToDirective(stmt);
  79238. this.addExtra(directive.value, "expressionValue", value);
  79239. return directive;
  79240. }
  79241. parseBlockBody(node, ...args) {
  79242. super.parseBlockBody(node, ...args);
  79243. const directiveStatements = node.directives.map((d) => this.directiveToStmt(d));
  79244. node.body = directiveStatements.concat(node.body);
  79245. delete node.directives;
  79246. }
  79247. pushClassMethod(classBody, method, isGenerator, isAsync, isConstructor, allowsDirectSuper) {
  79248. this.parseMethod(method, isGenerator, isAsync, isConstructor, allowsDirectSuper, "ClassMethod", true);
  79249. if (method.typeParameters) {
  79250. method.value.typeParameters = method.typeParameters;
  79251. delete method.typeParameters;
  79252. }
  79253. classBody.body.push(method);
  79254. }
  79255. parseMaybePrivateName(...args) {
  79256. const node = super.parseMaybePrivateName(...args);
  79257. if (node.type === "PrivateName" && this.getPluginOption("estree", "classFeatures")) {
  79258. return this.convertPrivateNameToPrivateIdentifier(node);
  79259. }
  79260. return node;
  79261. }
  79262. convertPrivateNameToPrivateIdentifier(node) {
  79263. const name2 = super.getPrivateNameSV(node);
  79264. node = node;
  79265. delete node.id;
  79266. node.name = name2;
  79267. node.type = "PrivateIdentifier";
  79268. return node;
  79269. }
  79270. isPrivateName(node) {
  79271. if (!this.getPluginOption("estree", "classFeatures")) {
  79272. return super.isPrivateName(node);
  79273. }
  79274. return node.type === "PrivateIdentifier";
  79275. }
  79276. getPrivateNameSV(node) {
  79277. if (!this.getPluginOption("estree", "classFeatures")) {
  79278. return super.getPrivateNameSV(node);
  79279. }
  79280. return node.name;
  79281. }
  79282. parseLiteral(value, type) {
  79283. const node = super.parseLiteral(value, type);
  79284. node.raw = node.extra.raw;
  79285. delete node.extra;
  79286. return node;
  79287. }
  79288. parseFunctionBody(node, allowExpression, isMethod = false) {
  79289. super.parseFunctionBody(node, allowExpression, isMethod);
  79290. node.expression = node.body.type !== "BlockStatement";
  79291. }
  79292. parseMethod(node, isGenerator, isAsync, isConstructor, allowDirectSuper, type, inClassScope = false) {
  79293. let funcNode = this.startNode();
  79294. funcNode.kind = node.kind;
  79295. funcNode = super.parseMethod(funcNode, isGenerator, isAsync, isConstructor, allowDirectSuper, type, inClassScope);
  79296. funcNode.type = "FunctionExpression";
  79297. delete funcNode.kind;
  79298. node.value = funcNode;
  79299. if (type === "ClassPrivateMethod") {
  79300. node.computed = false;
  79301. }
  79302. type = "MethodDefinition";
  79303. return this.finishNode(node, type);
  79304. }
  79305. parseClassProperty(...args) {
  79306. const propertyNode = super.parseClassProperty(...args);
  79307. if (this.getPluginOption("estree", "classFeatures")) {
  79308. propertyNode.type = "PropertyDefinition";
  79309. }
  79310. return propertyNode;
  79311. }
  79312. parseClassPrivateProperty(...args) {
  79313. const propertyNode = super.parseClassPrivateProperty(...args);
  79314. if (this.getPluginOption("estree", "classFeatures")) {
  79315. propertyNode.type = "PropertyDefinition";
  79316. propertyNode.computed = false;
  79317. }
  79318. return propertyNode;
  79319. }
  79320. parseObjectMethod(prop, isGenerator, isAsync, isPattern, isAccessor) {
  79321. const node = super.parseObjectMethod(prop, isGenerator, isAsync, isPattern, isAccessor);
  79322. if (node) {
  79323. node.type = "Property";
  79324. if (node.kind === "method")
  79325. node.kind = "init";
  79326. node.shorthand = false;
  79327. }
  79328. return node;
  79329. }
  79330. parseObjectProperty(prop, startPos, startLoc, isPattern, refExpressionErrors) {
  79331. const node = super.parseObjectProperty(prop, startPos, startLoc, isPattern, refExpressionErrors);
  79332. if (node) {
  79333. node.kind = "init";
  79334. node.type = "Property";
  79335. }
  79336. return node;
  79337. }
  79338. toAssignable(node, isLHS = false) {
  79339. if (node != null && this.isObjectProperty(node)) {
  79340. this.toAssignable(node.value, isLHS);
  79341. return node;
  79342. }
  79343. return super.toAssignable(node, isLHS);
  79344. }
  79345. toAssignableObjectExpressionProp(prop, ...args) {
  79346. if (prop.kind === "get" || prop.kind === "set") {
  79347. this.raise(prop.key.start, ErrorMessages.PatternHasAccessor);
  79348. } else if (prop.method) {
  79349. this.raise(prop.key.start, ErrorMessages.PatternHasMethod);
  79350. } else {
  79351. super.toAssignableObjectExpressionProp(prop, ...args);
  79352. }
  79353. }
  79354. finishCallExpression(node, optional) {
  79355. super.finishCallExpression(node, optional);
  79356. if (node.callee.type === "Import") {
  79357. node.type = "ImportExpression";
  79358. node.source = node.arguments[0];
  79359. if (this.hasPlugin("importAssertions")) {
  79360. var _node$arguments$;
  79361. node.attributes = (_node$arguments$ = node.arguments[1]) != null ? _node$arguments$ : null;
  79362. }
  79363. delete node.arguments;
  79364. delete node.callee;
  79365. }
  79366. return node;
  79367. }
  79368. toReferencedArguments(node) {
  79369. if (node.type === "ImportExpression") {
  79370. return;
  79371. }
  79372. super.toReferencedArguments(node);
  79373. }
  79374. parseExport(node) {
  79375. super.parseExport(node);
  79376. switch (node.type) {
  79377. case "ExportAllDeclaration":
  79378. node.exported = null;
  79379. break;
  79380. case "ExportNamedDeclaration":
  79381. if (node.specifiers.length === 1 && node.specifiers[0].type === "ExportNamespaceSpecifier") {
  79382. node.type = "ExportAllDeclaration";
  79383. node.exported = node.specifiers[0].exported;
  79384. delete node.specifiers;
  79385. }
  79386. break;
  79387. }
  79388. return node;
  79389. }
  79390. parseSubscript(base2, startPos, startLoc, noCalls, state) {
  79391. const node = super.parseSubscript(base2, startPos, startLoc, noCalls, state);
  79392. if (state.optionalChainMember) {
  79393. if (node.type === "OptionalMemberExpression" || node.type === "OptionalCallExpression") {
  79394. node.type = node.type.substring(8);
  79395. }
  79396. if (state.stop) {
  79397. const chain = this.startNodeAtNode(node);
  79398. chain.expression = node;
  79399. return this.finishNode(chain, "ChainExpression");
  79400. }
  79401. } else if (node.type === "MemberExpression" || node.type === "CallExpression") {
  79402. node.optional = false;
  79403. }
  79404. return node;
  79405. }
  79406. hasPropertyAsPrivateName(node) {
  79407. if (node.type === "ChainExpression") {
  79408. node = node.expression;
  79409. }
  79410. return super.hasPropertyAsPrivateName(node);
  79411. }
  79412. isOptionalChain(node) {
  79413. return node.type === "ChainExpression";
  79414. }
  79415. isObjectProperty(node) {
  79416. return node.type === "Property" && node.kind === "init" && !node.method;
  79417. }
  79418. isObjectMethod(node) {
  79419. return node.method || node.kind === "get" || node.kind === "set";
  79420. }
  79421. };
  79422. var TokContext3 = class {
  79423. constructor(token, preserveSpace) {
  79424. this.token = void 0;
  79425. this.preserveSpace = void 0;
  79426. this.token = token;
  79427. this.preserveSpace = !!preserveSpace;
  79428. }
  79429. };
  79430. var types2 = {
  79431. brace: new TokContext3("{"),
  79432. template: new TokContext3("`", true)
  79433. };
  79434. types$12.braceR.updateContext = (context) => {
  79435. context.pop();
  79436. };
  79437. types$12.braceL.updateContext = types$12.braceHashL.updateContext = types$12.dollarBraceL.updateContext = (context) => {
  79438. context.push(types2.brace);
  79439. };
  79440. types$12.backQuote.updateContext = (context) => {
  79441. if (context[context.length - 1] === types2.template) {
  79442. context.pop();
  79443. } else {
  79444. context.push(types2.template);
  79445. }
  79446. };
  79447. var nonASCIIidentifierStartChars2 = "\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u08A0-\u08B4\u08B6-\u08C7\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1878\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309B-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u31BF\u31F0-\u31FF\u3400-\u4DBF\u4E00-\u9FFC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7BF\uA7C2-\uA7CA\uA7F5-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC";
  79448. var nonASCIIidentifierChars2 = "\u200C\u200D\xB7\u0300-\u036F\u0387\u0483-\u0487\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u0669\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u06F0-\u06F9\u0711\u0730-\u074A\u07A6-\u07B0\u07C0-\u07C9\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u08D3-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0966-\u096F\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u09E6-\u09EF\u09FE\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A66-\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0AE6-\u0AEF\u0AFA-\u0AFF\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B55-\u0B57\u0B62\u0B63\u0B66-\u0B6F\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0BE6-\u0BEF\u0C00-\u0C04\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C66-\u0C6F\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0CE6-\u0CEF\u0D00-\u0D03\u0D3B\u0D3C\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D66-\u0D6F\u0D81-\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0E50-\u0E59\u0EB1\u0EB4-\u0EBC\u0EC8-\u0ECD\u0ED0-\u0ED9\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1040-\u1049\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F-\u109D\u135D-\u135F\u1369-\u1371\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u18A9\u1920-\u192B\u1930-\u193B\u1946-\u194F\u19D0-\u19DA\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AB0-\u1ABD\u1ABF\u1AC0\u1B00-\u1B04\u1B34-\u1B44\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BB0-\u1BB9\u1BE6-\u1BF3\u1C24-\u1C37\u1C40-\u1C49\u1C50-\u1C59\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF4\u1CF7-\u1CF9\u1DC0-\u1DF9\u1DFB-\u1DFF\u203F\u2040\u2054\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA620-\uA629\uA66F\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA82C\uA880\uA881\uA8B4-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F1\uA8FF-\uA909\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9D0-\uA9D9\uA9E5\uA9F0-\uA9F9\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA50-\uAA59\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uABF0-\uABF9\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFF10-\uFF19\uFF3F";
  79449. var nonASCIIidentifierStart2 = new RegExp("[" + nonASCIIidentifierStartChars2 + "]");
  79450. var nonASCIIidentifier2 = new RegExp("[" + nonASCIIidentifierStartChars2 + nonASCIIidentifierChars2 + "]");
  79451. nonASCIIidentifierStartChars2 = nonASCIIidentifierChars2 = null;
  79452. var astralIdentifierStartCodes2 = [0, 11, 2, 25, 2, 18, 2, 1, 2, 14, 3, 13, 35, 122, 70, 52, 268, 28, 4, 48, 48, 31, 14, 29, 6, 37, 11, 29, 3, 35, 5, 7, 2, 4, 43, 157, 19, 35, 5, 35, 5, 39, 9, 51, 157, 310, 10, 21, 11, 7, 153, 5, 3, 0, 2, 43, 2, 1, 4, 0, 3, 22, 11, 22, 10, 30, 66, 18, 2, 1, 11, 21, 11, 25, 71, 55, 7, 1, 65, 0, 16, 3, 2, 2, 2, 28, 43, 28, 4, 28, 36, 7, 2, 27, 28, 53, 11, 21, 11, 18, 14, 17, 111, 72, 56, 50, 14, 50, 14, 35, 349, 41, 7, 1, 79, 28, 11, 0, 9, 21, 107, 20, 28, 22, 13, 52, 76, 44, 33, 24, 27, 35, 30, 0, 3, 0, 9, 34, 4, 0, 13, 47, 15, 3, 22, 0, 2, 0, 36, 17, 2, 24, 85, 6, 2, 0, 2, 3, 2, 14, 2, 9, 8, 46, 39, 7, 3, 1, 3, 21, 2, 6, 2, 1, 2, 4, 4, 0, 19, 0, 13, 4, 159, 52, 19, 3, 21, 2, 31, 47, 21, 1, 2, 0, 185, 46, 42, 3, 37, 47, 21, 0, 60, 42, 14, 0, 72, 26, 230, 43, 117, 63, 32, 7, 3, 0, 3, 7, 2, 1, 2, 23, 16, 0, 2, 0, 95, 7, 3, 38, 17, 0, 2, 0, 29, 0, 11, 39, 8, 0, 22, 0, 12, 45, 20, 0, 35, 56, 264, 8, 2, 36, 18, 0, 50, 29, 113, 6, 2, 1, 2, 37, 22, 0, 26, 5, 2, 1, 2, 31, 15, 0, 328, 18, 190, 0, 80, 921, 103, 110, 18, 195, 2749, 1070, 4050, 582, 8634, 568, 8, 30, 114, 29, 19, 47, 17, 3, 32, 20, 6, 18, 689, 63, 129, 74, 6, 0, 67, 12, 65, 1, 2, 0, 29, 6135, 9, 1237, 43, 8, 8952, 286, 50, 2, 18, 3, 9, 395, 2309, 106, 6, 12, 4, 8, 8, 9, 5991, 84, 2, 70, 2, 1, 3, 0, 3, 1, 3, 3, 2, 11, 2, 0, 2, 6, 2, 64, 2, 3, 3, 7, 2, 6, 2, 27, 2, 3, 2, 4, 2, 0, 4, 6, 2, 339, 3, 24, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 7, 2357, 44, 11, 6, 17, 0, 370, 43, 1301, 196, 60, 67, 8, 0, 1205, 3, 2, 26, 2, 1, 2, 0, 3, 0, 2, 9, 2, 3, 2, 0, 2, 0, 7, 0, 5, 0, 2, 0, 2, 0, 2, 2, 2, 1, 2, 0, 3, 0, 2, 0, 2, 0, 2, 0, 2, 0, 2, 1, 2, 0, 3, 3, 2, 6, 2, 3, 2, 3, 2, 0, 2, 9, 2, 16, 6, 2, 2, 4, 2, 16, 4421, 42717, 35, 4148, 12, 221, 3, 5761, 15, 7472, 3104, 541, 1507, 4938];
  79453. var astralIdentifierCodes2 = [509, 0, 227, 0, 150, 4, 294, 9, 1368, 2, 2, 1, 6, 3, 41, 2, 5, 0, 166, 1, 574, 3, 9, 9, 370, 1, 154, 10, 176, 2, 54, 14, 32, 9, 16, 3, 46, 10, 54, 9, 7, 2, 37, 13, 2, 9, 6, 1, 45, 0, 13, 2, 49, 13, 9, 3, 2, 11, 83, 11, 7, 0, 161, 11, 6, 9, 7, 3, 56, 1, 2, 6, 3, 1, 3, 2, 10, 0, 11, 1, 3, 6, 4, 4, 193, 17, 10, 9, 5, 0, 82, 19, 13, 9, 214, 6, 3, 8, 28, 1, 83, 16, 16, 9, 82, 12, 9, 9, 84, 14, 5, 9, 243, 14, 166, 9, 71, 5, 2, 1, 3, 3, 2, 0, 2, 1, 13, 9, 120, 6, 3, 6, 4, 0, 29, 9, 41, 6, 2, 3, 9, 0, 10, 10, 47, 15, 406, 7, 2, 7, 17, 9, 57, 21, 2, 13, 123, 5, 4, 0, 2, 1, 2, 6, 2, 0, 9, 9, 49, 4, 2, 1, 2, 4, 9, 9, 330, 3, 19306, 9, 135, 4, 60, 6, 26, 9, 1014, 0, 2, 54, 8, 3, 82, 0, 12, 1, 19628, 1, 5319, 4, 4, 5, 9, 7, 3, 6, 31, 3, 149, 2, 1418, 49, 513, 54, 5, 49, 9, 0, 15, 0, 23, 4, 2, 14, 1361, 6, 2, 16, 3, 6, 2, 1, 2, 4, 262, 6, 10, 9, 419, 13, 1495, 6, 110, 6, 6, 9, 4759, 9, 787719, 239];
  79454. function isInAstralSet2(code2, set) {
  79455. let pos = 65536;
  79456. for (let i = 0, length = set.length; i < length; i += 2) {
  79457. pos += set[i];
  79458. if (pos > code2)
  79459. return false;
  79460. pos += set[i + 1];
  79461. if (pos >= code2)
  79462. return true;
  79463. }
  79464. return false;
  79465. }
  79466. function isIdentifierStart2(code2) {
  79467. if (code2 < 65)
  79468. return code2 === 36;
  79469. if (code2 <= 90)
  79470. return true;
  79471. if (code2 < 97)
  79472. return code2 === 95;
  79473. if (code2 <= 122)
  79474. return true;
  79475. if (code2 <= 65535) {
  79476. return code2 >= 170 && nonASCIIidentifierStart2.test(String.fromCharCode(code2));
  79477. }
  79478. return isInAstralSet2(code2, astralIdentifierStartCodes2);
  79479. }
  79480. function isIdentifierChar2(code2) {
  79481. if (code2 < 48)
  79482. return code2 === 36;
  79483. if (code2 < 58)
  79484. return true;
  79485. if (code2 < 65)
  79486. return false;
  79487. if (code2 <= 90)
  79488. return true;
  79489. if (code2 < 97)
  79490. return code2 === 95;
  79491. if (code2 <= 122)
  79492. return true;
  79493. if (code2 <= 65535) {
  79494. return code2 >= 170 && nonASCIIidentifier2.test(String.fromCharCode(code2));
  79495. }
  79496. return isInAstralSet2(code2, astralIdentifierStartCodes2) || isInAstralSet2(code2, astralIdentifierCodes2);
  79497. }
  79498. var reservedWords2 = {
  79499. keyword: ["break", "case", "catch", "continue", "debugger", "default", "do", "else", "finally", "for", "function", "if", "return", "switch", "throw", "try", "var", "const", "while", "with", "new", "this", "super", "class", "extends", "export", "import", "null", "true", "false", "in", "instanceof", "typeof", "void", "delete"],
  79500. strict: ["implements", "interface", "let", "package", "private", "protected", "public", "static", "yield"],
  79501. strictBind: ["eval", "arguments"]
  79502. };
  79503. var keywords2 = new Set(reservedWords2.keyword);
  79504. var reservedWordsStrictSet = new Set(reservedWords2.strict);
  79505. var reservedWordsStrictBindSet = new Set(reservedWords2.strictBind);
  79506. function isReservedWord(word, inModule) {
  79507. return inModule && word === "await" || word === "enum";
  79508. }
  79509. function isStrictReservedWord(word, inModule) {
  79510. return isReservedWord(word, inModule) || reservedWordsStrictSet.has(word);
  79511. }
  79512. function isStrictBindOnlyReservedWord(word) {
  79513. return reservedWordsStrictBindSet.has(word);
  79514. }
  79515. function isStrictBindReservedWord(word, inModule) {
  79516. return isStrictReservedWord(word, inModule) || isStrictBindOnlyReservedWord(word);
  79517. }
  79518. function isKeyword(word) {
  79519. return keywords2.has(word);
  79520. }
  79521. function isIteratorStart(current2, next) {
  79522. return current2 === 64 && next === 64;
  79523. }
  79524. var reservedWordLikeSet = /* @__PURE__ */ new Set(["break", "case", "catch", "continue", "debugger", "default", "do", "else", "finally", "for", "function", "if", "return", "switch", "throw", "try", "var", "const", "while", "with", "new", "this", "super", "class", "extends", "export", "import", "null", "true", "false", "in", "instanceof", "typeof", "void", "delete", "implements", "interface", "let", "package", "private", "protected", "public", "static", "yield", "eval", "arguments", "enum", "await"]);
  79525. function canBeReservedWord(word) {
  79526. return reservedWordLikeSet.has(word);
  79527. }
  79528. var SCOPE_OTHER = 0;
  79529. var SCOPE_PROGRAM = 1;
  79530. var SCOPE_FUNCTION2 = 2;
  79531. var SCOPE_ARROW2 = 4;
  79532. var SCOPE_SIMPLE_CATCH2 = 8;
  79533. var SCOPE_SUPER2 = 16;
  79534. var SCOPE_DIRECT_SUPER2 = 32;
  79535. var SCOPE_CLASS = 64;
  79536. var SCOPE_STATIC_BLOCK = 128;
  79537. var SCOPE_TS_MODULE = 256;
  79538. var SCOPE_VAR2 = SCOPE_PROGRAM | SCOPE_FUNCTION2 | SCOPE_TS_MODULE;
  79539. var BIND_KIND_VALUE = 1;
  79540. var BIND_KIND_TYPE = 2;
  79541. var BIND_SCOPE_VAR = 4;
  79542. var BIND_SCOPE_LEXICAL = 8;
  79543. var BIND_SCOPE_FUNCTION = 16;
  79544. var BIND_FLAGS_NONE = 64;
  79545. var BIND_FLAGS_CLASS = 128;
  79546. var BIND_FLAGS_TS_ENUM = 256;
  79547. var BIND_FLAGS_TS_CONST_ENUM = 512;
  79548. var BIND_FLAGS_TS_EXPORT_ONLY = 1024;
  79549. var BIND_FLAGS_FLOW_DECLARE_FN = 2048;
  79550. var BIND_CLASS = BIND_KIND_VALUE | BIND_KIND_TYPE | BIND_SCOPE_LEXICAL | BIND_FLAGS_CLASS;
  79551. var BIND_LEXICAL2 = BIND_KIND_VALUE | 0 | BIND_SCOPE_LEXICAL | 0;
  79552. var BIND_VAR2 = BIND_KIND_VALUE | 0 | BIND_SCOPE_VAR | 0;
  79553. var BIND_FUNCTION2 = BIND_KIND_VALUE | 0 | BIND_SCOPE_FUNCTION | 0;
  79554. var BIND_TS_INTERFACE = 0 | BIND_KIND_TYPE | 0 | BIND_FLAGS_CLASS;
  79555. var BIND_TS_TYPE = 0 | BIND_KIND_TYPE | 0 | 0;
  79556. var BIND_TS_ENUM = BIND_KIND_VALUE | BIND_KIND_TYPE | BIND_SCOPE_LEXICAL | BIND_FLAGS_TS_ENUM;
  79557. var BIND_TS_AMBIENT = 0 | 0 | 0 | BIND_FLAGS_TS_EXPORT_ONLY;
  79558. var BIND_NONE2 = 0 | 0 | 0 | BIND_FLAGS_NONE;
  79559. var BIND_OUTSIDE2 = BIND_KIND_VALUE | 0 | 0 | BIND_FLAGS_NONE;
  79560. var BIND_TS_CONST_ENUM = BIND_TS_ENUM | BIND_FLAGS_TS_CONST_ENUM;
  79561. var BIND_TS_NAMESPACE = 0 | 0 | 0 | BIND_FLAGS_TS_EXPORT_ONLY;
  79562. var BIND_FLOW_DECLARE_FN = BIND_FLAGS_FLOW_DECLARE_FN;
  79563. var CLASS_ELEMENT_FLAG_STATIC = 4;
  79564. var CLASS_ELEMENT_KIND_GETTER = 2;
  79565. var CLASS_ELEMENT_KIND_SETTER = 1;
  79566. var CLASS_ELEMENT_KIND_ACCESSOR = CLASS_ELEMENT_KIND_GETTER | CLASS_ELEMENT_KIND_SETTER;
  79567. var CLASS_ELEMENT_STATIC_GETTER = CLASS_ELEMENT_KIND_GETTER | CLASS_ELEMENT_FLAG_STATIC;
  79568. var CLASS_ELEMENT_STATIC_SETTER = CLASS_ELEMENT_KIND_SETTER | CLASS_ELEMENT_FLAG_STATIC;
  79569. var CLASS_ELEMENT_INSTANCE_GETTER = CLASS_ELEMENT_KIND_GETTER;
  79570. var CLASS_ELEMENT_INSTANCE_SETTER = CLASS_ELEMENT_KIND_SETTER;
  79571. var CLASS_ELEMENT_OTHER = 0;
  79572. var Scope4 = class {
  79573. constructor(flags) {
  79574. this.var = /* @__PURE__ */ new Set();
  79575. this.lexical = /* @__PURE__ */ new Set();
  79576. this.functions = /* @__PURE__ */ new Set();
  79577. this.flags = flags;
  79578. }
  79579. };
  79580. var ScopeHandler = class {
  79581. constructor(raise2, inModule) {
  79582. this.scopeStack = [];
  79583. this.undefinedExports = /* @__PURE__ */ new Map();
  79584. this.undefinedPrivateNames = /* @__PURE__ */ new Map();
  79585. this.raise = raise2;
  79586. this.inModule = inModule;
  79587. }
  79588. get inFunction() {
  79589. return (this.currentVarScopeFlags() & SCOPE_FUNCTION2) > 0;
  79590. }
  79591. get allowSuper() {
  79592. return (this.currentThisScopeFlags() & SCOPE_SUPER2) > 0;
  79593. }
  79594. get allowDirectSuper() {
  79595. return (this.currentThisScopeFlags() & SCOPE_DIRECT_SUPER2) > 0;
  79596. }
  79597. get inClass() {
  79598. return (this.currentThisScopeFlags() & SCOPE_CLASS) > 0;
  79599. }
  79600. get inClassAndNotInNonArrowFunction() {
  79601. const flags = this.currentThisScopeFlags();
  79602. return (flags & SCOPE_CLASS) > 0 && (flags & SCOPE_FUNCTION2) === 0;
  79603. }
  79604. get inStaticBlock() {
  79605. for (let i = this.scopeStack.length - 1; ; i--) {
  79606. const {
  79607. flags
  79608. } = this.scopeStack[i];
  79609. if (flags & SCOPE_STATIC_BLOCK) {
  79610. return true;
  79611. }
  79612. if (flags & (SCOPE_VAR2 | SCOPE_CLASS)) {
  79613. return false;
  79614. }
  79615. }
  79616. }
  79617. get inNonArrowFunction() {
  79618. return (this.currentThisScopeFlags() & SCOPE_FUNCTION2) > 0;
  79619. }
  79620. get treatFunctionsAsVar() {
  79621. return this.treatFunctionsAsVarInScope(this.currentScope());
  79622. }
  79623. createScope(flags) {
  79624. return new Scope4(flags);
  79625. }
  79626. enter(flags) {
  79627. this.scopeStack.push(this.createScope(flags));
  79628. }
  79629. exit() {
  79630. this.scopeStack.pop();
  79631. }
  79632. treatFunctionsAsVarInScope(scope) {
  79633. return !!(scope.flags & SCOPE_FUNCTION2 || !this.inModule && scope.flags & SCOPE_PROGRAM);
  79634. }
  79635. declareName(name2, bindingType, pos) {
  79636. let scope = this.currentScope();
  79637. if (bindingType & BIND_SCOPE_LEXICAL || bindingType & BIND_SCOPE_FUNCTION) {
  79638. this.checkRedeclarationInScope(scope, name2, bindingType, pos);
  79639. if (bindingType & BIND_SCOPE_FUNCTION) {
  79640. scope.functions.add(name2);
  79641. } else {
  79642. scope.lexical.add(name2);
  79643. }
  79644. if (bindingType & BIND_SCOPE_LEXICAL) {
  79645. this.maybeExportDefined(scope, name2);
  79646. }
  79647. } else if (bindingType & BIND_SCOPE_VAR) {
  79648. for (let i = this.scopeStack.length - 1; i >= 0; --i) {
  79649. scope = this.scopeStack[i];
  79650. this.checkRedeclarationInScope(scope, name2, bindingType, pos);
  79651. scope.var.add(name2);
  79652. this.maybeExportDefined(scope, name2);
  79653. if (scope.flags & SCOPE_VAR2)
  79654. break;
  79655. }
  79656. }
  79657. if (this.inModule && scope.flags & SCOPE_PROGRAM) {
  79658. this.undefinedExports.delete(name2);
  79659. }
  79660. }
  79661. maybeExportDefined(scope, name2) {
  79662. if (this.inModule && scope.flags & SCOPE_PROGRAM) {
  79663. this.undefinedExports.delete(name2);
  79664. }
  79665. }
  79666. checkRedeclarationInScope(scope, name2, bindingType, pos) {
  79667. if (this.isRedeclaredInScope(scope, name2, bindingType)) {
  79668. this.raise(pos, ErrorMessages.VarRedeclaration, name2);
  79669. }
  79670. }
  79671. isRedeclaredInScope(scope, name2, bindingType) {
  79672. if (!(bindingType & BIND_KIND_VALUE))
  79673. return false;
  79674. if (bindingType & BIND_SCOPE_LEXICAL) {
  79675. return scope.lexical.has(name2) || scope.functions.has(name2) || scope.var.has(name2);
  79676. }
  79677. if (bindingType & BIND_SCOPE_FUNCTION) {
  79678. return scope.lexical.has(name2) || !this.treatFunctionsAsVarInScope(scope) && scope.var.has(name2);
  79679. }
  79680. return scope.lexical.has(name2) && !(scope.flags & SCOPE_SIMPLE_CATCH2 && scope.lexical.values().next().value === name2) || !this.treatFunctionsAsVarInScope(scope) && scope.functions.has(name2);
  79681. }
  79682. checkLocalExport(id) {
  79683. const {
  79684. name: name2
  79685. } = id;
  79686. const topLevelScope = this.scopeStack[0];
  79687. if (!topLevelScope.lexical.has(name2) && !topLevelScope.var.has(name2) && !topLevelScope.functions.has(name2)) {
  79688. this.undefinedExports.set(name2, id.start);
  79689. }
  79690. }
  79691. currentScope() {
  79692. return this.scopeStack[this.scopeStack.length - 1];
  79693. }
  79694. currentVarScopeFlags() {
  79695. for (let i = this.scopeStack.length - 1; ; i--) {
  79696. const {
  79697. flags
  79698. } = this.scopeStack[i];
  79699. if (flags & SCOPE_VAR2) {
  79700. return flags;
  79701. }
  79702. }
  79703. }
  79704. currentThisScopeFlags() {
  79705. for (let i = this.scopeStack.length - 1; ; i--) {
  79706. const {
  79707. flags
  79708. } = this.scopeStack[i];
  79709. if (flags & (SCOPE_VAR2 | SCOPE_CLASS) && !(flags & SCOPE_ARROW2)) {
  79710. return flags;
  79711. }
  79712. }
  79713. }
  79714. };
  79715. var FlowScope = class extends Scope4 {
  79716. constructor(...args) {
  79717. super(...args);
  79718. this.declareFunctions = /* @__PURE__ */ new Set();
  79719. }
  79720. };
  79721. var FlowScopeHandler = class extends ScopeHandler {
  79722. createScope(flags) {
  79723. return new FlowScope(flags);
  79724. }
  79725. declareName(name2, bindingType, pos) {
  79726. const scope = this.currentScope();
  79727. if (bindingType & BIND_FLAGS_FLOW_DECLARE_FN) {
  79728. this.checkRedeclarationInScope(scope, name2, bindingType, pos);
  79729. this.maybeExportDefined(scope, name2);
  79730. scope.declareFunctions.add(name2);
  79731. return;
  79732. }
  79733. super.declareName(...arguments);
  79734. }
  79735. isRedeclaredInScope(scope, name2, bindingType) {
  79736. if (super.isRedeclaredInScope(...arguments))
  79737. return true;
  79738. if (bindingType & BIND_FLAGS_FLOW_DECLARE_FN) {
  79739. return !scope.declareFunctions.has(name2) && (scope.lexical.has(name2) || scope.functions.has(name2));
  79740. }
  79741. return false;
  79742. }
  79743. checkLocalExport(id) {
  79744. if (!this.scopeStack[0].declareFunctions.has(id.name)) {
  79745. super.checkLocalExport(id);
  79746. }
  79747. }
  79748. };
  79749. var reservedTypes = /* @__PURE__ */ new Set(["_", "any", "bool", "boolean", "empty", "extends", "false", "interface", "mixed", "null", "number", "static", "string", "true", "typeof", "void"]);
  79750. var FlowErrors = makeErrorTemplates({
  79751. AmbiguousConditionalArrow: "Ambiguous expression: wrap the arrow functions in parentheses to disambiguate.",
  79752. AmbiguousDeclareModuleKind: "Found both `declare module.exports` and `declare export` in the same module. Modules can only have 1 since they are either an ES module or they are a CommonJS module.",
  79753. AssignReservedType: "Cannot overwrite reserved type %0.",
  79754. DeclareClassElement: "The `declare` modifier can only appear on class fields.",
  79755. DeclareClassFieldInitializer: "Initializers are not allowed in fields with the `declare` modifier.",
  79756. DuplicateDeclareModuleExports: "Duplicate `declare module.exports` statement.",
  79757. EnumBooleanMemberNotInitialized: "Boolean enum members need to be initialized. Use either `%0 = true,` or `%0 = false,` in enum `%1`.",
  79758. EnumDuplicateMemberName: "Enum member names need to be unique, but the name `%0` has already been used before in enum `%1`.",
  79759. EnumInconsistentMemberValues: "Enum `%0` has inconsistent member initializers. Either use no initializers, or consistently use literals (either booleans, numbers, or strings) for all member initializers.",
  79760. EnumInvalidExplicitType: "Enum type `%1` is not valid. Use one of `boolean`, `number`, `string`, or `symbol` in enum `%0`.",
  79761. EnumInvalidExplicitTypeUnknownSupplied: "Supplied enum type is not valid. Use one of `boolean`, `number`, `string`, or `symbol` in enum `%0`.",
  79762. EnumInvalidMemberInitializerPrimaryType: "Enum `%0` has type `%2`, so the initializer of `%1` needs to be a %2 literal.",
  79763. EnumInvalidMemberInitializerSymbolType: "Symbol enum members cannot be initialized. Use `%1,` in enum `%0`.",
  79764. EnumInvalidMemberInitializerUnknownType: "The enum member initializer for `%1` needs to be a literal (either a boolean, number, or string) in enum `%0`.",
  79765. EnumInvalidMemberName: "Enum member names cannot start with lowercase 'a' through 'z'. Instead of using `%0`, consider using `%1`, in enum `%2`.",
  79766. EnumNumberMemberNotInitialized: "Number enum members need to be initialized, e.g. `%1 = 1` in enum `%0`.",
  79767. EnumStringMemberInconsistentlyInitailized: "String enum members need to consistently either all use initializers, or use no initializers, in enum `%0`.",
  79768. GetterMayNotHaveThisParam: "A getter cannot have a `this` parameter.",
  79769. ImportTypeShorthandOnlyInPureImport: "The `type` and `typeof` keywords on named imports can only be used on regular `import` statements. It cannot be used with `import type` or `import typeof` statements.",
  79770. InexactInsideExact: "Explicit inexact syntax cannot appear inside an explicit exact object type.",
  79771. InexactInsideNonObject: "Explicit inexact syntax cannot appear in class or interface definitions.",
  79772. InexactVariance: "Explicit inexact syntax cannot have variance.",
  79773. InvalidNonTypeImportInDeclareModule: "Imports within a `declare module` body must always be `import type` or `import typeof`.",
  79774. MissingTypeParamDefault: "Type parameter declaration needs a default, since a preceding type parameter declaration has a default.",
  79775. NestedDeclareModule: "`declare module` cannot be used inside another `declare module`.",
  79776. NestedFlowComment: "Cannot have a flow comment inside another flow comment.",
  79777. OptionalBindingPattern: "A binding pattern parameter cannot be optional in an implementation signature.",
  79778. SetterMayNotHaveThisParam: "A setter cannot have a `this` parameter.",
  79779. SpreadVariance: "Spread properties cannot have variance.",
  79780. ThisParamAnnotationRequired: "A type annotation is required for the `this` parameter.",
  79781. ThisParamBannedInConstructor: "Constructors cannot have a `this` parameter; constructors don't bind `this` like other functions.",
  79782. ThisParamMayNotBeOptional: "The `this` parameter cannot be optional.",
  79783. ThisParamMustBeFirst: "The `this` parameter must be the first function parameter.",
  79784. ThisParamNoDefault: "The `this` parameter may not have a default value.",
  79785. TypeBeforeInitializer: "Type annotations must come before default assignments, e.g. instead of `age = 25: number` use `age: number = 25`.",
  79786. TypeCastInPattern: "The type cast expression is expected to be wrapped with parenthesis.",
  79787. UnexpectedExplicitInexactInObject: "Explicit inexact syntax must appear at the end of an inexact object.",
  79788. UnexpectedReservedType: "Unexpected reserved type %0.",
  79789. UnexpectedReservedUnderscore: "`_` is only allowed as a type argument to call or new.",
  79790. UnexpectedSpaceBetweenModuloChecks: "Spaces between `%` and `checks` are not allowed here.",
  79791. UnexpectedSpreadType: "Spread operator cannot appear in class or interface definitions.",
  79792. UnexpectedSubtractionOperand: 'Unexpected token, expected "number" or "bigint".',
  79793. UnexpectedTokenAfterTypeParameter: "Expected an arrow function after this type parameter declaration.",
  79794. UnexpectedTypeParameterBeforeAsyncArrowFunction: "Type parameters must come after the async keyword, e.g. instead of `<T> async () => {}`, use `async <T>() => {}`.",
  79795. UnsupportedDeclareExportKind: "`declare export %0` is not supported. Use `%1` instead.",
  79796. UnsupportedStatementInDeclareModule: "Only declares and type imports are allowed inside declare module.",
  79797. UnterminatedFlowComment: "Unterminated flow-comment."
  79798. }, ErrorCodes.SyntaxError);
  79799. function isEsModuleType(bodyElement) {
  79800. return bodyElement.type === "DeclareExportAllDeclaration" || bodyElement.type === "DeclareExportDeclaration" && (!bodyElement.declaration || bodyElement.declaration.type !== "TypeAlias" && bodyElement.declaration.type !== "InterfaceDeclaration");
  79801. }
  79802. function hasTypeImportKind(node) {
  79803. return node.importKind === "type" || node.importKind === "typeof";
  79804. }
  79805. function isMaybeDefaultImport(state) {
  79806. return (state.type === types$12.name || !!state.type.keyword) && state.value !== "from";
  79807. }
  79808. var exportSuggestions = {
  79809. const: "declare export var",
  79810. let: "declare export var",
  79811. type: "export type",
  79812. interface: "export interface"
  79813. };
  79814. function partition(list3, test) {
  79815. const list1 = [];
  79816. const list22 = [];
  79817. for (let i = 0; i < list3.length; i++) {
  79818. (test(list3[i], i, list3) ? list1 : list22).push(list3[i]);
  79819. }
  79820. return [list1, list22];
  79821. }
  79822. var FLOW_PRAGMA_REGEX = /\*?\s*@((?:no)?flow)\b/;
  79823. var flow3 = (superClass) => class extends superClass {
  79824. constructor(...args) {
  79825. super(...args);
  79826. this.flowPragma = void 0;
  79827. }
  79828. getScopeHandler() {
  79829. return FlowScopeHandler;
  79830. }
  79831. shouldParseTypes() {
  79832. return this.getPluginOption("flow", "all") || this.flowPragma === "flow";
  79833. }
  79834. shouldParseEnums() {
  79835. return !!this.getPluginOption("flow", "enums");
  79836. }
  79837. finishToken(type, val) {
  79838. if (type !== types$12.string && type !== types$12.semi && type !== types$12.interpreterDirective) {
  79839. if (this.flowPragma === void 0) {
  79840. this.flowPragma = null;
  79841. }
  79842. }
  79843. return super.finishToken(type, val);
  79844. }
  79845. addComment(comment2) {
  79846. if (this.flowPragma === void 0) {
  79847. const matches = FLOW_PRAGMA_REGEX.exec(comment2.value);
  79848. if (!matches)
  79849. ;
  79850. else if (matches[1] === "flow") {
  79851. this.flowPragma = "flow";
  79852. } else if (matches[1] === "noflow") {
  79853. this.flowPragma = "noflow";
  79854. } else {
  79855. throw new Error("Unexpected flow pragma");
  79856. }
  79857. }
  79858. return super.addComment(comment2);
  79859. }
  79860. flowParseTypeInitialiser(tok) {
  79861. const oldInType = this.state.inType;
  79862. this.state.inType = true;
  79863. this.expect(tok || types$12.colon);
  79864. const type = this.flowParseType();
  79865. this.state.inType = oldInType;
  79866. return type;
  79867. }
  79868. flowParsePredicate() {
  79869. const node = this.startNode();
  79870. const moduloPos = this.state.start;
  79871. this.next();
  79872. this.expectContextual("checks");
  79873. if (this.state.lastTokStart > moduloPos + 1) {
  79874. this.raise(moduloPos, FlowErrors.UnexpectedSpaceBetweenModuloChecks);
  79875. }
  79876. if (this.eat(types$12.parenL)) {
  79877. node.value = this.parseExpression();
  79878. this.expect(types$12.parenR);
  79879. return this.finishNode(node, "DeclaredPredicate");
  79880. } else {
  79881. return this.finishNode(node, "InferredPredicate");
  79882. }
  79883. }
  79884. flowParseTypeAndPredicateInitialiser() {
  79885. const oldInType = this.state.inType;
  79886. this.state.inType = true;
  79887. this.expect(types$12.colon);
  79888. let type = null;
  79889. let predicate = null;
  79890. if (this.match(types$12.modulo)) {
  79891. this.state.inType = oldInType;
  79892. predicate = this.flowParsePredicate();
  79893. } else {
  79894. type = this.flowParseType();
  79895. this.state.inType = oldInType;
  79896. if (this.match(types$12.modulo)) {
  79897. predicate = this.flowParsePredicate();
  79898. }
  79899. }
  79900. return [type, predicate];
  79901. }
  79902. flowParseDeclareClass(node) {
  79903. this.next();
  79904. this.flowParseInterfaceish(node, true);
  79905. return this.finishNode(node, "DeclareClass");
  79906. }
  79907. flowParseDeclareFunction(node) {
  79908. this.next();
  79909. const id = node.id = this.parseIdentifier();
  79910. const typeNode = this.startNode();
  79911. const typeContainer = this.startNode();
  79912. if (this.isRelational("<")) {
  79913. typeNode.typeParameters = this.flowParseTypeParameterDeclaration();
  79914. } else {
  79915. typeNode.typeParameters = null;
  79916. }
  79917. this.expect(types$12.parenL);
  79918. const tmp = this.flowParseFunctionTypeParams();
  79919. typeNode.params = tmp.params;
  79920. typeNode.rest = tmp.rest;
  79921. typeNode.this = tmp._this;
  79922. this.expect(types$12.parenR);
  79923. [typeNode.returnType, node.predicate] = this.flowParseTypeAndPredicateInitialiser();
  79924. typeContainer.typeAnnotation = this.finishNode(typeNode, "FunctionTypeAnnotation");
  79925. id.typeAnnotation = this.finishNode(typeContainer, "TypeAnnotation");
  79926. this.resetEndLocation(id);
  79927. this.semicolon();
  79928. this.scope.declareName(node.id.name, BIND_FLOW_DECLARE_FN, node.id.start);
  79929. return this.finishNode(node, "DeclareFunction");
  79930. }
  79931. flowParseDeclare(node, insideModule) {
  79932. if (this.match(types$12._class)) {
  79933. return this.flowParseDeclareClass(node);
  79934. } else if (this.match(types$12._function)) {
  79935. return this.flowParseDeclareFunction(node);
  79936. } else if (this.match(types$12._var)) {
  79937. return this.flowParseDeclareVariable(node);
  79938. } else if (this.eatContextual("module")) {
  79939. if (this.match(types$12.dot)) {
  79940. return this.flowParseDeclareModuleExports(node);
  79941. } else {
  79942. if (insideModule) {
  79943. this.raise(this.state.lastTokStart, FlowErrors.NestedDeclareModule);
  79944. }
  79945. return this.flowParseDeclareModule(node);
  79946. }
  79947. } else if (this.isContextual("type")) {
  79948. return this.flowParseDeclareTypeAlias(node);
  79949. } else if (this.isContextual("opaque")) {
  79950. return this.flowParseDeclareOpaqueType(node);
  79951. } else if (this.isContextual("interface")) {
  79952. return this.flowParseDeclareInterface(node);
  79953. } else if (this.match(types$12._export)) {
  79954. return this.flowParseDeclareExportDeclaration(node, insideModule);
  79955. } else {
  79956. throw this.unexpected();
  79957. }
  79958. }
  79959. flowParseDeclareVariable(node) {
  79960. this.next();
  79961. node.id = this.flowParseTypeAnnotatableIdentifier(true);
  79962. this.scope.declareName(node.id.name, BIND_VAR2, node.id.start);
  79963. this.semicolon();
  79964. return this.finishNode(node, "DeclareVariable");
  79965. }
  79966. flowParseDeclareModule(node) {
  79967. this.scope.enter(SCOPE_OTHER);
  79968. if (this.match(types$12.string)) {
  79969. node.id = this.parseExprAtom();
  79970. } else {
  79971. node.id = this.parseIdentifier();
  79972. }
  79973. const bodyNode = node.body = this.startNode();
  79974. const body = bodyNode.body = [];
  79975. this.expect(types$12.braceL);
  79976. while (!this.match(types$12.braceR)) {
  79977. let bodyNode2 = this.startNode();
  79978. if (this.match(types$12._import)) {
  79979. this.next();
  79980. if (!this.isContextual("type") && !this.match(types$12._typeof)) {
  79981. this.raise(this.state.lastTokStart, FlowErrors.InvalidNonTypeImportInDeclareModule);
  79982. }
  79983. this.parseImport(bodyNode2);
  79984. } else {
  79985. this.expectContextual("declare", FlowErrors.UnsupportedStatementInDeclareModule);
  79986. bodyNode2 = this.flowParseDeclare(bodyNode2, true);
  79987. }
  79988. body.push(bodyNode2);
  79989. }
  79990. this.scope.exit();
  79991. this.expect(types$12.braceR);
  79992. this.finishNode(bodyNode, "BlockStatement");
  79993. let kind = null;
  79994. let hasModuleExport = false;
  79995. body.forEach((bodyElement) => {
  79996. if (isEsModuleType(bodyElement)) {
  79997. if (kind === "CommonJS") {
  79998. this.raise(bodyElement.start, FlowErrors.AmbiguousDeclareModuleKind);
  79999. }
  80000. kind = "ES";
  80001. } else if (bodyElement.type === "DeclareModuleExports") {
  80002. if (hasModuleExport) {
  80003. this.raise(bodyElement.start, FlowErrors.DuplicateDeclareModuleExports);
  80004. }
  80005. if (kind === "ES") {
  80006. this.raise(bodyElement.start, FlowErrors.AmbiguousDeclareModuleKind);
  80007. }
  80008. kind = "CommonJS";
  80009. hasModuleExport = true;
  80010. }
  80011. });
  80012. node.kind = kind || "CommonJS";
  80013. return this.finishNode(node, "DeclareModule");
  80014. }
  80015. flowParseDeclareExportDeclaration(node, insideModule) {
  80016. this.expect(types$12._export);
  80017. if (this.eat(types$12._default)) {
  80018. if (this.match(types$12._function) || this.match(types$12._class)) {
  80019. node.declaration = this.flowParseDeclare(this.startNode());
  80020. } else {
  80021. node.declaration = this.flowParseType();
  80022. this.semicolon();
  80023. }
  80024. node.default = true;
  80025. return this.finishNode(node, "DeclareExportDeclaration");
  80026. } else {
  80027. if (this.match(types$12._const) || this.isLet() || (this.isContextual("type") || this.isContextual("interface")) && !insideModule) {
  80028. const label = this.state.value;
  80029. const suggestion = exportSuggestions[label];
  80030. throw this.raise(this.state.start, FlowErrors.UnsupportedDeclareExportKind, label, suggestion);
  80031. }
  80032. if (this.match(types$12._var) || this.match(types$12._function) || this.match(types$12._class) || this.isContextual("opaque")) {
  80033. node.declaration = this.flowParseDeclare(this.startNode());
  80034. node.default = false;
  80035. return this.finishNode(node, "DeclareExportDeclaration");
  80036. } else if (this.match(types$12.star) || this.match(types$12.braceL) || this.isContextual("interface") || this.isContextual("type") || this.isContextual("opaque")) {
  80037. node = this.parseExport(node);
  80038. if (node.type === "ExportNamedDeclaration") {
  80039. node.type = "ExportDeclaration";
  80040. node.default = false;
  80041. delete node.exportKind;
  80042. }
  80043. node.type = "Declare" + node.type;
  80044. return node;
  80045. }
  80046. }
  80047. throw this.unexpected();
  80048. }
  80049. flowParseDeclareModuleExports(node) {
  80050. this.next();
  80051. this.expectContextual("exports");
  80052. node.typeAnnotation = this.flowParseTypeAnnotation();
  80053. this.semicolon();
  80054. return this.finishNode(node, "DeclareModuleExports");
  80055. }
  80056. flowParseDeclareTypeAlias(node) {
  80057. this.next();
  80058. this.flowParseTypeAlias(node);
  80059. node.type = "DeclareTypeAlias";
  80060. return node;
  80061. }
  80062. flowParseDeclareOpaqueType(node) {
  80063. this.next();
  80064. this.flowParseOpaqueType(node, true);
  80065. node.type = "DeclareOpaqueType";
  80066. return node;
  80067. }
  80068. flowParseDeclareInterface(node) {
  80069. this.next();
  80070. this.flowParseInterfaceish(node);
  80071. return this.finishNode(node, "DeclareInterface");
  80072. }
  80073. flowParseInterfaceish(node, isClass = false) {
  80074. node.id = this.flowParseRestrictedIdentifier(!isClass, true);
  80075. this.scope.declareName(node.id.name, isClass ? BIND_FUNCTION2 : BIND_LEXICAL2, node.id.start);
  80076. if (this.isRelational("<")) {
  80077. node.typeParameters = this.flowParseTypeParameterDeclaration();
  80078. } else {
  80079. node.typeParameters = null;
  80080. }
  80081. node.extends = [];
  80082. node.implements = [];
  80083. node.mixins = [];
  80084. if (this.eat(types$12._extends)) {
  80085. do {
  80086. node.extends.push(this.flowParseInterfaceExtends());
  80087. } while (!isClass && this.eat(types$12.comma));
  80088. }
  80089. if (this.isContextual("mixins")) {
  80090. this.next();
  80091. do {
  80092. node.mixins.push(this.flowParseInterfaceExtends());
  80093. } while (this.eat(types$12.comma));
  80094. }
  80095. if (this.isContextual("implements")) {
  80096. this.next();
  80097. do {
  80098. node.implements.push(this.flowParseInterfaceExtends());
  80099. } while (this.eat(types$12.comma));
  80100. }
  80101. node.body = this.flowParseObjectType({
  80102. allowStatic: isClass,
  80103. allowExact: false,
  80104. allowSpread: false,
  80105. allowProto: isClass,
  80106. allowInexact: false
  80107. });
  80108. }
  80109. flowParseInterfaceExtends() {
  80110. const node = this.startNode();
  80111. node.id = this.flowParseQualifiedTypeIdentifier();
  80112. if (this.isRelational("<")) {
  80113. node.typeParameters = this.flowParseTypeParameterInstantiation();
  80114. } else {
  80115. node.typeParameters = null;
  80116. }
  80117. return this.finishNode(node, "InterfaceExtends");
  80118. }
  80119. flowParseInterface(node) {
  80120. this.flowParseInterfaceish(node);
  80121. return this.finishNode(node, "InterfaceDeclaration");
  80122. }
  80123. checkNotUnderscore(word) {
  80124. if (word === "_") {
  80125. this.raise(this.state.start, FlowErrors.UnexpectedReservedUnderscore);
  80126. }
  80127. }
  80128. checkReservedType(word, startLoc, declaration) {
  80129. if (!reservedTypes.has(word))
  80130. return;
  80131. this.raise(startLoc, declaration ? FlowErrors.AssignReservedType : FlowErrors.UnexpectedReservedType, word);
  80132. }
  80133. flowParseRestrictedIdentifier(liberal, declaration) {
  80134. this.checkReservedType(this.state.value, this.state.start, declaration);
  80135. return this.parseIdentifier(liberal);
  80136. }
  80137. flowParseTypeAlias(node) {
  80138. node.id = this.flowParseRestrictedIdentifier(false, true);
  80139. this.scope.declareName(node.id.name, BIND_LEXICAL2, node.id.start);
  80140. if (this.isRelational("<")) {
  80141. node.typeParameters = this.flowParseTypeParameterDeclaration();
  80142. } else {
  80143. node.typeParameters = null;
  80144. }
  80145. node.right = this.flowParseTypeInitialiser(types$12.eq);
  80146. this.semicolon();
  80147. return this.finishNode(node, "TypeAlias");
  80148. }
  80149. flowParseOpaqueType(node, declare) {
  80150. this.expectContextual("type");
  80151. node.id = this.flowParseRestrictedIdentifier(true, true);
  80152. this.scope.declareName(node.id.name, BIND_LEXICAL2, node.id.start);
  80153. if (this.isRelational("<")) {
  80154. node.typeParameters = this.flowParseTypeParameterDeclaration();
  80155. } else {
  80156. node.typeParameters = null;
  80157. }
  80158. node.supertype = null;
  80159. if (this.match(types$12.colon)) {
  80160. node.supertype = this.flowParseTypeInitialiser(types$12.colon);
  80161. }
  80162. node.impltype = null;
  80163. if (!declare) {
  80164. node.impltype = this.flowParseTypeInitialiser(types$12.eq);
  80165. }
  80166. this.semicolon();
  80167. return this.finishNode(node, "OpaqueType");
  80168. }
  80169. flowParseTypeParameter(requireDefault = false) {
  80170. const nodeStart = this.state.start;
  80171. const node = this.startNode();
  80172. const variance = this.flowParseVariance();
  80173. const ident = this.flowParseTypeAnnotatableIdentifier();
  80174. node.name = ident.name;
  80175. node.variance = variance;
  80176. node.bound = ident.typeAnnotation;
  80177. if (this.match(types$12.eq)) {
  80178. this.eat(types$12.eq);
  80179. node.default = this.flowParseType();
  80180. } else {
  80181. if (requireDefault) {
  80182. this.raise(nodeStart, FlowErrors.MissingTypeParamDefault);
  80183. }
  80184. }
  80185. return this.finishNode(node, "TypeParameter");
  80186. }
  80187. flowParseTypeParameterDeclaration() {
  80188. const oldInType = this.state.inType;
  80189. const node = this.startNode();
  80190. node.params = [];
  80191. this.state.inType = true;
  80192. if (this.isRelational("<") || this.match(types$12.jsxTagStart)) {
  80193. this.next();
  80194. } else {
  80195. this.unexpected();
  80196. }
  80197. let defaultRequired = false;
  80198. do {
  80199. const typeParameter = this.flowParseTypeParameter(defaultRequired);
  80200. node.params.push(typeParameter);
  80201. if (typeParameter.default) {
  80202. defaultRequired = true;
  80203. }
  80204. if (!this.isRelational(">")) {
  80205. this.expect(types$12.comma);
  80206. }
  80207. } while (!this.isRelational(">"));
  80208. this.expectRelational(">");
  80209. this.state.inType = oldInType;
  80210. return this.finishNode(node, "TypeParameterDeclaration");
  80211. }
  80212. flowParseTypeParameterInstantiation() {
  80213. const node = this.startNode();
  80214. const oldInType = this.state.inType;
  80215. node.params = [];
  80216. this.state.inType = true;
  80217. this.expectRelational("<");
  80218. const oldNoAnonFunctionType = this.state.noAnonFunctionType;
  80219. this.state.noAnonFunctionType = false;
  80220. while (!this.isRelational(">")) {
  80221. node.params.push(this.flowParseType());
  80222. if (!this.isRelational(">")) {
  80223. this.expect(types$12.comma);
  80224. }
  80225. }
  80226. this.state.noAnonFunctionType = oldNoAnonFunctionType;
  80227. this.expectRelational(">");
  80228. this.state.inType = oldInType;
  80229. return this.finishNode(node, "TypeParameterInstantiation");
  80230. }
  80231. flowParseTypeParameterInstantiationCallOrNew() {
  80232. const node = this.startNode();
  80233. const oldInType = this.state.inType;
  80234. node.params = [];
  80235. this.state.inType = true;
  80236. this.expectRelational("<");
  80237. while (!this.isRelational(">")) {
  80238. node.params.push(this.flowParseTypeOrImplicitInstantiation());
  80239. if (!this.isRelational(">")) {
  80240. this.expect(types$12.comma);
  80241. }
  80242. }
  80243. this.expectRelational(">");
  80244. this.state.inType = oldInType;
  80245. return this.finishNode(node, "TypeParameterInstantiation");
  80246. }
  80247. flowParseInterfaceType() {
  80248. const node = this.startNode();
  80249. this.expectContextual("interface");
  80250. node.extends = [];
  80251. if (this.eat(types$12._extends)) {
  80252. do {
  80253. node.extends.push(this.flowParseInterfaceExtends());
  80254. } while (this.eat(types$12.comma));
  80255. }
  80256. node.body = this.flowParseObjectType({
  80257. allowStatic: false,
  80258. allowExact: false,
  80259. allowSpread: false,
  80260. allowProto: false,
  80261. allowInexact: false
  80262. });
  80263. return this.finishNode(node, "InterfaceTypeAnnotation");
  80264. }
  80265. flowParseObjectPropertyKey() {
  80266. return this.match(types$12.num) || this.match(types$12.string) ? this.parseExprAtom() : this.parseIdentifier(true);
  80267. }
  80268. flowParseObjectTypeIndexer(node, isStatic, variance) {
  80269. node.static = isStatic;
  80270. if (this.lookahead().type === types$12.colon) {
  80271. node.id = this.flowParseObjectPropertyKey();
  80272. node.key = this.flowParseTypeInitialiser();
  80273. } else {
  80274. node.id = null;
  80275. node.key = this.flowParseType();
  80276. }
  80277. this.expect(types$12.bracketR);
  80278. node.value = this.flowParseTypeInitialiser();
  80279. node.variance = variance;
  80280. return this.finishNode(node, "ObjectTypeIndexer");
  80281. }
  80282. flowParseObjectTypeInternalSlot(node, isStatic) {
  80283. node.static = isStatic;
  80284. node.id = this.flowParseObjectPropertyKey();
  80285. this.expect(types$12.bracketR);
  80286. this.expect(types$12.bracketR);
  80287. if (this.isRelational("<") || this.match(types$12.parenL)) {
  80288. node.method = true;
  80289. node.optional = false;
  80290. node.value = this.flowParseObjectTypeMethodish(this.startNodeAt(node.start, node.loc.start));
  80291. } else {
  80292. node.method = false;
  80293. if (this.eat(types$12.question)) {
  80294. node.optional = true;
  80295. }
  80296. node.value = this.flowParseTypeInitialiser();
  80297. }
  80298. return this.finishNode(node, "ObjectTypeInternalSlot");
  80299. }
  80300. flowParseObjectTypeMethodish(node) {
  80301. node.params = [];
  80302. node.rest = null;
  80303. node.typeParameters = null;
  80304. node.this = null;
  80305. if (this.isRelational("<")) {
  80306. node.typeParameters = this.flowParseTypeParameterDeclaration();
  80307. }
  80308. this.expect(types$12.parenL);
  80309. if (this.match(types$12._this)) {
  80310. node.this = this.flowParseFunctionTypeParam(true);
  80311. node.this.name = null;
  80312. if (!this.match(types$12.parenR)) {
  80313. this.expect(types$12.comma);
  80314. }
  80315. }
  80316. while (!this.match(types$12.parenR) && !this.match(types$12.ellipsis)) {
  80317. node.params.push(this.flowParseFunctionTypeParam(false));
  80318. if (!this.match(types$12.parenR)) {
  80319. this.expect(types$12.comma);
  80320. }
  80321. }
  80322. if (this.eat(types$12.ellipsis)) {
  80323. node.rest = this.flowParseFunctionTypeParam(false);
  80324. }
  80325. this.expect(types$12.parenR);
  80326. node.returnType = this.flowParseTypeInitialiser();
  80327. return this.finishNode(node, "FunctionTypeAnnotation");
  80328. }
  80329. flowParseObjectTypeCallProperty(node, isStatic) {
  80330. const valueNode = this.startNode();
  80331. node.static = isStatic;
  80332. node.value = this.flowParseObjectTypeMethodish(valueNode);
  80333. return this.finishNode(node, "ObjectTypeCallProperty");
  80334. }
  80335. flowParseObjectType({
  80336. allowStatic,
  80337. allowExact,
  80338. allowSpread,
  80339. allowProto,
  80340. allowInexact
  80341. }) {
  80342. const oldInType = this.state.inType;
  80343. this.state.inType = true;
  80344. const nodeStart = this.startNode();
  80345. nodeStart.callProperties = [];
  80346. nodeStart.properties = [];
  80347. nodeStart.indexers = [];
  80348. nodeStart.internalSlots = [];
  80349. let endDelim;
  80350. let exact;
  80351. let inexact = false;
  80352. if (allowExact && this.match(types$12.braceBarL)) {
  80353. this.expect(types$12.braceBarL);
  80354. endDelim = types$12.braceBarR;
  80355. exact = true;
  80356. } else {
  80357. this.expect(types$12.braceL);
  80358. endDelim = types$12.braceR;
  80359. exact = false;
  80360. }
  80361. nodeStart.exact = exact;
  80362. while (!this.match(endDelim)) {
  80363. let isStatic = false;
  80364. let protoStart = null;
  80365. let inexactStart = null;
  80366. const node = this.startNode();
  80367. if (allowProto && this.isContextual("proto")) {
  80368. const lookahead2 = this.lookahead();
  80369. if (lookahead2.type !== types$12.colon && lookahead2.type !== types$12.question) {
  80370. this.next();
  80371. protoStart = this.state.start;
  80372. allowStatic = false;
  80373. }
  80374. }
  80375. if (allowStatic && this.isContextual("static")) {
  80376. const lookahead2 = this.lookahead();
  80377. if (lookahead2.type !== types$12.colon && lookahead2.type !== types$12.question) {
  80378. this.next();
  80379. isStatic = true;
  80380. }
  80381. }
  80382. const variance = this.flowParseVariance();
  80383. if (this.eat(types$12.bracketL)) {
  80384. if (protoStart != null) {
  80385. this.unexpected(protoStart);
  80386. }
  80387. if (this.eat(types$12.bracketL)) {
  80388. if (variance) {
  80389. this.unexpected(variance.start);
  80390. }
  80391. nodeStart.internalSlots.push(this.flowParseObjectTypeInternalSlot(node, isStatic));
  80392. } else {
  80393. nodeStart.indexers.push(this.flowParseObjectTypeIndexer(node, isStatic, variance));
  80394. }
  80395. } else if (this.match(types$12.parenL) || this.isRelational("<")) {
  80396. if (protoStart != null) {
  80397. this.unexpected(protoStart);
  80398. }
  80399. if (variance) {
  80400. this.unexpected(variance.start);
  80401. }
  80402. nodeStart.callProperties.push(this.flowParseObjectTypeCallProperty(node, isStatic));
  80403. } else {
  80404. let kind = "init";
  80405. if (this.isContextual("get") || this.isContextual("set")) {
  80406. const lookahead2 = this.lookahead();
  80407. if (lookahead2.type === types$12.name || lookahead2.type === types$12.string || lookahead2.type === types$12.num) {
  80408. kind = this.state.value;
  80409. this.next();
  80410. }
  80411. }
  80412. const propOrInexact = this.flowParseObjectTypeProperty(node, isStatic, protoStart, variance, kind, allowSpread, allowInexact != null ? allowInexact : !exact);
  80413. if (propOrInexact === null) {
  80414. inexact = true;
  80415. inexactStart = this.state.lastTokStart;
  80416. } else {
  80417. nodeStart.properties.push(propOrInexact);
  80418. }
  80419. }
  80420. this.flowObjectTypeSemicolon();
  80421. if (inexactStart && !this.match(types$12.braceR) && !this.match(types$12.braceBarR)) {
  80422. this.raise(inexactStart, FlowErrors.UnexpectedExplicitInexactInObject);
  80423. }
  80424. }
  80425. this.expect(endDelim);
  80426. if (allowSpread) {
  80427. nodeStart.inexact = inexact;
  80428. }
  80429. const out = this.finishNode(nodeStart, "ObjectTypeAnnotation");
  80430. this.state.inType = oldInType;
  80431. return out;
  80432. }
  80433. flowParseObjectTypeProperty(node, isStatic, protoStart, variance, kind, allowSpread, allowInexact) {
  80434. if (this.eat(types$12.ellipsis)) {
  80435. const isInexactToken = this.match(types$12.comma) || this.match(types$12.semi) || this.match(types$12.braceR) || this.match(types$12.braceBarR);
  80436. if (isInexactToken) {
  80437. if (!allowSpread) {
  80438. this.raise(this.state.lastTokStart, FlowErrors.InexactInsideNonObject);
  80439. } else if (!allowInexact) {
  80440. this.raise(this.state.lastTokStart, FlowErrors.InexactInsideExact);
  80441. }
  80442. if (variance) {
  80443. this.raise(variance.start, FlowErrors.InexactVariance);
  80444. }
  80445. return null;
  80446. }
  80447. if (!allowSpread) {
  80448. this.raise(this.state.lastTokStart, FlowErrors.UnexpectedSpreadType);
  80449. }
  80450. if (protoStart != null) {
  80451. this.unexpected(protoStart);
  80452. }
  80453. if (variance) {
  80454. this.raise(variance.start, FlowErrors.SpreadVariance);
  80455. }
  80456. node.argument = this.flowParseType();
  80457. return this.finishNode(node, "ObjectTypeSpreadProperty");
  80458. } else {
  80459. node.key = this.flowParseObjectPropertyKey();
  80460. node.static = isStatic;
  80461. node.proto = protoStart != null;
  80462. node.kind = kind;
  80463. let optional = false;
  80464. if (this.isRelational("<") || this.match(types$12.parenL)) {
  80465. node.method = true;
  80466. if (protoStart != null) {
  80467. this.unexpected(protoStart);
  80468. }
  80469. if (variance) {
  80470. this.unexpected(variance.start);
  80471. }
  80472. node.value = this.flowParseObjectTypeMethodish(this.startNodeAt(node.start, node.loc.start));
  80473. if (kind === "get" || kind === "set") {
  80474. this.flowCheckGetterSetterParams(node);
  80475. }
  80476. if (!allowSpread && node.key.name === "constructor" && node.value.this) {
  80477. this.raise(node.value.this.start, FlowErrors.ThisParamBannedInConstructor);
  80478. }
  80479. } else {
  80480. if (kind !== "init")
  80481. this.unexpected();
  80482. node.method = false;
  80483. if (this.eat(types$12.question)) {
  80484. optional = true;
  80485. }
  80486. node.value = this.flowParseTypeInitialiser();
  80487. node.variance = variance;
  80488. }
  80489. node.optional = optional;
  80490. return this.finishNode(node, "ObjectTypeProperty");
  80491. }
  80492. }
  80493. flowCheckGetterSetterParams(property) {
  80494. const paramCount = property.kind === "get" ? 0 : 1;
  80495. const start3 = property.start;
  80496. const length = property.value.params.length + (property.value.rest ? 1 : 0);
  80497. if (property.value.this) {
  80498. this.raise(property.value.this.start, property.kind === "get" ? FlowErrors.GetterMayNotHaveThisParam : FlowErrors.SetterMayNotHaveThisParam);
  80499. }
  80500. if (length !== paramCount) {
  80501. if (property.kind === "get") {
  80502. this.raise(start3, ErrorMessages.BadGetterArity);
  80503. } else {
  80504. this.raise(start3, ErrorMessages.BadSetterArity);
  80505. }
  80506. }
  80507. if (property.kind === "set" && property.value.rest) {
  80508. this.raise(start3, ErrorMessages.BadSetterRestParameter);
  80509. }
  80510. }
  80511. flowObjectTypeSemicolon() {
  80512. if (!this.eat(types$12.semi) && !this.eat(types$12.comma) && !this.match(types$12.braceR) && !this.match(types$12.braceBarR)) {
  80513. this.unexpected();
  80514. }
  80515. }
  80516. flowParseQualifiedTypeIdentifier(startPos, startLoc, id) {
  80517. startPos = startPos || this.state.start;
  80518. startLoc = startLoc || this.state.startLoc;
  80519. let node = id || this.flowParseRestrictedIdentifier(true);
  80520. while (this.eat(types$12.dot)) {
  80521. const node2 = this.startNodeAt(startPos, startLoc);
  80522. node2.qualification = node;
  80523. node2.id = this.flowParseRestrictedIdentifier(true);
  80524. node = this.finishNode(node2, "QualifiedTypeIdentifier");
  80525. }
  80526. return node;
  80527. }
  80528. flowParseGenericType(startPos, startLoc, id) {
  80529. const node = this.startNodeAt(startPos, startLoc);
  80530. node.typeParameters = null;
  80531. node.id = this.flowParseQualifiedTypeIdentifier(startPos, startLoc, id);
  80532. if (this.isRelational("<")) {
  80533. node.typeParameters = this.flowParseTypeParameterInstantiation();
  80534. }
  80535. return this.finishNode(node, "GenericTypeAnnotation");
  80536. }
  80537. flowParseTypeofType() {
  80538. const node = this.startNode();
  80539. this.expect(types$12._typeof);
  80540. node.argument = this.flowParsePrimaryType();
  80541. return this.finishNode(node, "TypeofTypeAnnotation");
  80542. }
  80543. flowParseTupleType() {
  80544. const node = this.startNode();
  80545. node.types = [];
  80546. this.expect(types$12.bracketL);
  80547. while (this.state.pos < this.length && !this.match(types$12.bracketR)) {
  80548. node.types.push(this.flowParseType());
  80549. if (this.match(types$12.bracketR))
  80550. break;
  80551. this.expect(types$12.comma);
  80552. }
  80553. this.expect(types$12.bracketR);
  80554. return this.finishNode(node, "TupleTypeAnnotation");
  80555. }
  80556. flowParseFunctionTypeParam(first) {
  80557. let name2 = null;
  80558. let optional = false;
  80559. let typeAnnotation = null;
  80560. const node = this.startNode();
  80561. const lh = this.lookahead();
  80562. const isThis = this.state.type === types$12._this;
  80563. if (lh.type === types$12.colon || lh.type === types$12.question) {
  80564. if (isThis && !first) {
  80565. this.raise(node.start, FlowErrors.ThisParamMustBeFirst);
  80566. }
  80567. name2 = this.parseIdentifier(isThis);
  80568. if (this.eat(types$12.question)) {
  80569. optional = true;
  80570. if (isThis) {
  80571. this.raise(node.start, FlowErrors.ThisParamMayNotBeOptional);
  80572. }
  80573. }
  80574. typeAnnotation = this.flowParseTypeInitialiser();
  80575. } else {
  80576. typeAnnotation = this.flowParseType();
  80577. }
  80578. node.name = name2;
  80579. node.optional = optional;
  80580. node.typeAnnotation = typeAnnotation;
  80581. return this.finishNode(node, "FunctionTypeParam");
  80582. }
  80583. reinterpretTypeAsFunctionTypeParam(type) {
  80584. const node = this.startNodeAt(type.start, type.loc.start);
  80585. node.name = null;
  80586. node.optional = false;
  80587. node.typeAnnotation = type;
  80588. return this.finishNode(node, "FunctionTypeParam");
  80589. }
  80590. flowParseFunctionTypeParams(params = []) {
  80591. let rest = null;
  80592. let _this = null;
  80593. if (this.match(types$12._this)) {
  80594. _this = this.flowParseFunctionTypeParam(true);
  80595. _this.name = null;
  80596. if (!this.match(types$12.parenR)) {
  80597. this.expect(types$12.comma);
  80598. }
  80599. }
  80600. while (!this.match(types$12.parenR) && !this.match(types$12.ellipsis)) {
  80601. params.push(this.flowParseFunctionTypeParam(false));
  80602. if (!this.match(types$12.parenR)) {
  80603. this.expect(types$12.comma);
  80604. }
  80605. }
  80606. if (this.eat(types$12.ellipsis)) {
  80607. rest = this.flowParseFunctionTypeParam(false);
  80608. }
  80609. return {
  80610. params,
  80611. rest,
  80612. _this
  80613. };
  80614. }
  80615. flowIdentToTypeAnnotation(startPos, startLoc, node, id) {
  80616. switch (id.name) {
  80617. case "any":
  80618. return this.finishNode(node, "AnyTypeAnnotation");
  80619. case "bool":
  80620. case "boolean":
  80621. return this.finishNode(node, "BooleanTypeAnnotation");
  80622. case "mixed":
  80623. return this.finishNode(node, "MixedTypeAnnotation");
  80624. case "empty":
  80625. return this.finishNode(node, "EmptyTypeAnnotation");
  80626. case "number":
  80627. return this.finishNode(node, "NumberTypeAnnotation");
  80628. case "string":
  80629. return this.finishNode(node, "StringTypeAnnotation");
  80630. case "symbol":
  80631. return this.finishNode(node, "SymbolTypeAnnotation");
  80632. default:
  80633. this.checkNotUnderscore(id.name);
  80634. return this.flowParseGenericType(startPos, startLoc, id);
  80635. }
  80636. }
  80637. flowParsePrimaryType() {
  80638. const startPos = this.state.start;
  80639. const startLoc = this.state.startLoc;
  80640. const node = this.startNode();
  80641. let tmp;
  80642. let type;
  80643. let isGroupedType = false;
  80644. const oldNoAnonFunctionType = this.state.noAnonFunctionType;
  80645. switch (this.state.type) {
  80646. case types$12.name:
  80647. if (this.isContextual("interface")) {
  80648. return this.flowParseInterfaceType();
  80649. }
  80650. return this.flowIdentToTypeAnnotation(startPos, startLoc, node, this.parseIdentifier());
  80651. case types$12.braceL:
  80652. return this.flowParseObjectType({
  80653. allowStatic: false,
  80654. allowExact: false,
  80655. allowSpread: true,
  80656. allowProto: false,
  80657. allowInexact: true
  80658. });
  80659. case types$12.braceBarL:
  80660. return this.flowParseObjectType({
  80661. allowStatic: false,
  80662. allowExact: true,
  80663. allowSpread: true,
  80664. allowProto: false,
  80665. allowInexact: false
  80666. });
  80667. case types$12.bracketL:
  80668. this.state.noAnonFunctionType = false;
  80669. type = this.flowParseTupleType();
  80670. this.state.noAnonFunctionType = oldNoAnonFunctionType;
  80671. return type;
  80672. case types$12.relational:
  80673. if (this.state.value === "<") {
  80674. node.typeParameters = this.flowParseTypeParameterDeclaration();
  80675. this.expect(types$12.parenL);
  80676. tmp = this.flowParseFunctionTypeParams();
  80677. node.params = tmp.params;
  80678. node.rest = tmp.rest;
  80679. node.this = tmp._this;
  80680. this.expect(types$12.parenR);
  80681. this.expect(types$12.arrow);
  80682. node.returnType = this.flowParseType();
  80683. return this.finishNode(node, "FunctionTypeAnnotation");
  80684. }
  80685. break;
  80686. case types$12.parenL:
  80687. this.next();
  80688. if (!this.match(types$12.parenR) && !this.match(types$12.ellipsis)) {
  80689. if (this.match(types$12.name) || this.match(types$12._this)) {
  80690. const token = this.lookahead().type;
  80691. isGroupedType = token !== types$12.question && token !== types$12.colon;
  80692. } else {
  80693. isGroupedType = true;
  80694. }
  80695. }
  80696. if (isGroupedType) {
  80697. this.state.noAnonFunctionType = false;
  80698. type = this.flowParseType();
  80699. this.state.noAnonFunctionType = oldNoAnonFunctionType;
  80700. if (this.state.noAnonFunctionType || !(this.match(types$12.comma) || this.match(types$12.parenR) && this.lookahead().type === types$12.arrow)) {
  80701. this.expect(types$12.parenR);
  80702. return type;
  80703. } else {
  80704. this.eat(types$12.comma);
  80705. }
  80706. }
  80707. if (type) {
  80708. tmp = this.flowParseFunctionTypeParams([this.reinterpretTypeAsFunctionTypeParam(type)]);
  80709. } else {
  80710. tmp = this.flowParseFunctionTypeParams();
  80711. }
  80712. node.params = tmp.params;
  80713. node.rest = tmp.rest;
  80714. node.this = tmp._this;
  80715. this.expect(types$12.parenR);
  80716. this.expect(types$12.arrow);
  80717. node.returnType = this.flowParseType();
  80718. node.typeParameters = null;
  80719. return this.finishNode(node, "FunctionTypeAnnotation");
  80720. case types$12.string:
  80721. return this.parseLiteral(this.state.value, "StringLiteralTypeAnnotation");
  80722. case types$12._true:
  80723. case types$12._false:
  80724. node.value = this.match(types$12._true);
  80725. this.next();
  80726. return this.finishNode(node, "BooleanLiteralTypeAnnotation");
  80727. case types$12.plusMin:
  80728. if (this.state.value === "-") {
  80729. this.next();
  80730. if (this.match(types$12.num)) {
  80731. return this.parseLiteralAtNode(-this.state.value, "NumberLiteralTypeAnnotation", node);
  80732. }
  80733. if (this.match(types$12.bigint)) {
  80734. return this.parseLiteralAtNode(-this.state.value, "BigIntLiteralTypeAnnotation", node);
  80735. }
  80736. throw this.raise(this.state.start, FlowErrors.UnexpectedSubtractionOperand);
  80737. }
  80738. throw this.unexpected();
  80739. case types$12.num:
  80740. return this.parseLiteral(this.state.value, "NumberLiteralTypeAnnotation");
  80741. case types$12.bigint:
  80742. return this.parseLiteral(this.state.value, "BigIntLiteralTypeAnnotation");
  80743. case types$12._void:
  80744. this.next();
  80745. return this.finishNode(node, "VoidTypeAnnotation");
  80746. case types$12._null:
  80747. this.next();
  80748. return this.finishNode(node, "NullLiteralTypeAnnotation");
  80749. case types$12._this:
  80750. this.next();
  80751. return this.finishNode(node, "ThisTypeAnnotation");
  80752. case types$12.star:
  80753. this.next();
  80754. return this.finishNode(node, "ExistsTypeAnnotation");
  80755. default:
  80756. if (this.state.type.keyword === "typeof") {
  80757. return this.flowParseTypeofType();
  80758. } else if (this.state.type.keyword) {
  80759. const label = this.state.type.label;
  80760. this.next();
  80761. return super.createIdentifier(node, label);
  80762. }
  80763. }
  80764. throw this.unexpected();
  80765. }
  80766. flowParsePostfixType() {
  80767. const startPos = this.state.start;
  80768. const startLoc = this.state.startLoc;
  80769. let type = this.flowParsePrimaryType();
  80770. let seenOptionalIndexedAccess = false;
  80771. while ((this.match(types$12.bracketL) || this.match(types$12.questionDot)) && !this.canInsertSemicolon()) {
  80772. const node = this.startNodeAt(startPos, startLoc);
  80773. const optional = this.eat(types$12.questionDot);
  80774. seenOptionalIndexedAccess = seenOptionalIndexedAccess || optional;
  80775. this.expect(types$12.bracketL);
  80776. if (!optional && this.match(types$12.bracketR)) {
  80777. node.elementType = type;
  80778. this.next();
  80779. type = this.finishNode(node, "ArrayTypeAnnotation");
  80780. } else {
  80781. node.objectType = type;
  80782. node.indexType = this.flowParseType();
  80783. this.expect(types$12.bracketR);
  80784. if (seenOptionalIndexedAccess) {
  80785. node.optional = optional;
  80786. type = this.finishNode(node, "OptionalIndexedAccessType");
  80787. } else {
  80788. type = this.finishNode(node, "IndexedAccessType");
  80789. }
  80790. }
  80791. }
  80792. return type;
  80793. }
  80794. flowParsePrefixType() {
  80795. const node = this.startNode();
  80796. if (this.eat(types$12.question)) {
  80797. node.typeAnnotation = this.flowParsePrefixType();
  80798. return this.finishNode(node, "NullableTypeAnnotation");
  80799. } else {
  80800. return this.flowParsePostfixType();
  80801. }
  80802. }
  80803. flowParseAnonFunctionWithoutParens() {
  80804. const param = this.flowParsePrefixType();
  80805. if (!this.state.noAnonFunctionType && this.eat(types$12.arrow)) {
  80806. const node = this.startNodeAt(param.start, param.loc.start);
  80807. node.params = [this.reinterpretTypeAsFunctionTypeParam(param)];
  80808. node.rest = null;
  80809. node.this = null;
  80810. node.returnType = this.flowParseType();
  80811. node.typeParameters = null;
  80812. return this.finishNode(node, "FunctionTypeAnnotation");
  80813. }
  80814. return param;
  80815. }
  80816. flowParseIntersectionType() {
  80817. const node = this.startNode();
  80818. this.eat(types$12.bitwiseAND);
  80819. const type = this.flowParseAnonFunctionWithoutParens();
  80820. node.types = [type];
  80821. while (this.eat(types$12.bitwiseAND)) {
  80822. node.types.push(this.flowParseAnonFunctionWithoutParens());
  80823. }
  80824. return node.types.length === 1 ? type : this.finishNode(node, "IntersectionTypeAnnotation");
  80825. }
  80826. flowParseUnionType() {
  80827. const node = this.startNode();
  80828. this.eat(types$12.bitwiseOR);
  80829. const type = this.flowParseIntersectionType();
  80830. node.types = [type];
  80831. while (this.eat(types$12.bitwiseOR)) {
  80832. node.types.push(this.flowParseIntersectionType());
  80833. }
  80834. return node.types.length === 1 ? type : this.finishNode(node, "UnionTypeAnnotation");
  80835. }
  80836. flowParseType() {
  80837. const oldInType = this.state.inType;
  80838. this.state.inType = true;
  80839. const type = this.flowParseUnionType();
  80840. this.state.inType = oldInType;
  80841. return type;
  80842. }
  80843. flowParseTypeOrImplicitInstantiation() {
  80844. if (this.state.type === types$12.name && this.state.value === "_") {
  80845. const startPos = this.state.start;
  80846. const startLoc = this.state.startLoc;
  80847. const node = this.parseIdentifier();
  80848. return this.flowParseGenericType(startPos, startLoc, node);
  80849. } else {
  80850. return this.flowParseType();
  80851. }
  80852. }
  80853. flowParseTypeAnnotation() {
  80854. const node = this.startNode();
  80855. node.typeAnnotation = this.flowParseTypeInitialiser();
  80856. return this.finishNode(node, "TypeAnnotation");
  80857. }
  80858. flowParseTypeAnnotatableIdentifier(allowPrimitiveOverride) {
  80859. const ident = allowPrimitiveOverride ? this.parseIdentifier() : this.flowParseRestrictedIdentifier();
  80860. if (this.match(types$12.colon)) {
  80861. ident.typeAnnotation = this.flowParseTypeAnnotation();
  80862. this.resetEndLocation(ident);
  80863. }
  80864. return ident;
  80865. }
  80866. typeCastToParameter(node) {
  80867. node.expression.typeAnnotation = node.typeAnnotation;
  80868. this.resetEndLocation(node.expression, node.typeAnnotation.end, node.typeAnnotation.loc.end);
  80869. return node.expression;
  80870. }
  80871. flowParseVariance() {
  80872. let variance = null;
  80873. if (this.match(types$12.plusMin)) {
  80874. variance = this.startNode();
  80875. if (this.state.value === "+") {
  80876. variance.kind = "plus";
  80877. } else {
  80878. variance.kind = "minus";
  80879. }
  80880. this.next();
  80881. this.finishNode(variance, "Variance");
  80882. }
  80883. return variance;
  80884. }
  80885. parseFunctionBody(node, allowExpressionBody, isMethod = false) {
  80886. if (allowExpressionBody) {
  80887. return this.forwardNoArrowParamsConversionAt(node, () => super.parseFunctionBody(node, true, isMethod));
  80888. }
  80889. return super.parseFunctionBody(node, false, isMethod);
  80890. }
  80891. parseFunctionBodyAndFinish(node, type, isMethod = false) {
  80892. if (this.match(types$12.colon)) {
  80893. const typeNode = this.startNode();
  80894. [typeNode.typeAnnotation, node.predicate] = this.flowParseTypeAndPredicateInitialiser();
  80895. node.returnType = typeNode.typeAnnotation ? this.finishNode(typeNode, "TypeAnnotation") : null;
  80896. }
  80897. super.parseFunctionBodyAndFinish(node, type, isMethod);
  80898. }
  80899. parseStatement(context, topLevel) {
  80900. if (this.state.strict && this.match(types$12.name) && this.state.value === "interface") {
  80901. const lookahead2 = this.lookahead();
  80902. if (lookahead2.type === types$12.name || isKeyword(lookahead2.value)) {
  80903. const node = this.startNode();
  80904. this.next();
  80905. return this.flowParseInterface(node);
  80906. }
  80907. } else if (this.shouldParseEnums() && this.isContextual("enum")) {
  80908. const node = this.startNode();
  80909. this.next();
  80910. return this.flowParseEnumDeclaration(node);
  80911. }
  80912. const stmt = super.parseStatement(context, topLevel);
  80913. if (this.flowPragma === void 0 && !this.isValidDirective(stmt)) {
  80914. this.flowPragma = null;
  80915. }
  80916. return stmt;
  80917. }
  80918. parseExpressionStatement(node, expr) {
  80919. if (expr.type === "Identifier") {
  80920. if (expr.name === "declare") {
  80921. if (this.match(types$12._class) || this.match(types$12.name) || this.match(types$12._function) || this.match(types$12._var) || this.match(types$12._export)) {
  80922. return this.flowParseDeclare(node);
  80923. }
  80924. } else if (this.match(types$12.name)) {
  80925. if (expr.name === "interface") {
  80926. return this.flowParseInterface(node);
  80927. } else if (expr.name === "type") {
  80928. return this.flowParseTypeAlias(node);
  80929. } else if (expr.name === "opaque") {
  80930. return this.flowParseOpaqueType(node, false);
  80931. }
  80932. }
  80933. }
  80934. return super.parseExpressionStatement(node, expr);
  80935. }
  80936. shouldParseExportDeclaration() {
  80937. return this.isContextual("type") || this.isContextual("interface") || this.isContextual("opaque") || this.shouldParseEnums() && this.isContextual("enum") || super.shouldParseExportDeclaration();
  80938. }
  80939. isExportDefaultSpecifier() {
  80940. if (this.match(types$12.name) && (this.state.value === "type" || this.state.value === "interface" || this.state.value === "opaque" || this.shouldParseEnums() && this.state.value === "enum")) {
  80941. return false;
  80942. }
  80943. return super.isExportDefaultSpecifier();
  80944. }
  80945. parseExportDefaultExpression() {
  80946. if (this.shouldParseEnums() && this.isContextual("enum")) {
  80947. const node = this.startNode();
  80948. this.next();
  80949. return this.flowParseEnumDeclaration(node);
  80950. }
  80951. return super.parseExportDefaultExpression();
  80952. }
  80953. parseConditional(expr, startPos, startLoc, refExpressionErrors) {
  80954. if (!this.match(types$12.question))
  80955. return expr;
  80956. if (this.state.maybeInArrowParameters) {
  80957. const result = this.tryParse(() => super.parseConditional(expr, startPos, startLoc));
  80958. if (!result.node) {
  80959. if (result.error) {
  80960. super.setOptionalParametersError(refExpressionErrors, result.error);
  80961. }
  80962. return expr;
  80963. }
  80964. if (result.error)
  80965. this.state = result.failState;
  80966. return result.node;
  80967. }
  80968. this.expect(types$12.question);
  80969. const state = this.state.clone();
  80970. const originalNoArrowAt = this.state.noArrowAt;
  80971. const node = this.startNodeAt(startPos, startLoc);
  80972. let {
  80973. consequent,
  80974. failed
  80975. } = this.tryParseConditionalConsequent();
  80976. let [valid2, invalid2] = this.getArrowLikeExpressions(consequent);
  80977. if (failed || invalid2.length > 0) {
  80978. const noArrowAt = [...originalNoArrowAt];
  80979. if (invalid2.length > 0) {
  80980. this.state = state;
  80981. this.state.noArrowAt = noArrowAt;
  80982. for (let i = 0; i < invalid2.length; i++) {
  80983. noArrowAt.push(invalid2[i].start);
  80984. }
  80985. ({
  80986. consequent,
  80987. failed
  80988. } = this.tryParseConditionalConsequent());
  80989. [valid2, invalid2] = this.getArrowLikeExpressions(consequent);
  80990. }
  80991. if (failed && valid2.length > 1) {
  80992. this.raise(state.start, FlowErrors.AmbiguousConditionalArrow);
  80993. }
  80994. if (failed && valid2.length === 1) {
  80995. this.state = state;
  80996. this.state.noArrowAt = noArrowAt.concat(valid2[0].start);
  80997. ({
  80998. consequent,
  80999. failed
  81000. } = this.tryParseConditionalConsequent());
  81001. }
  81002. }
  81003. this.getArrowLikeExpressions(consequent, true);
  81004. this.state.noArrowAt = originalNoArrowAt;
  81005. this.expect(types$12.colon);
  81006. node.test = expr;
  81007. node.consequent = consequent;
  81008. node.alternate = this.forwardNoArrowParamsConversionAt(node, () => this.parseMaybeAssign(void 0, void 0));
  81009. return this.finishNode(node, "ConditionalExpression");
  81010. }
  81011. tryParseConditionalConsequent() {
  81012. this.state.noArrowParamsConversionAt.push(this.state.start);
  81013. const consequent = this.parseMaybeAssignAllowIn();
  81014. const failed = !this.match(types$12.colon);
  81015. this.state.noArrowParamsConversionAt.pop();
  81016. return {
  81017. consequent,
  81018. failed
  81019. };
  81020. }
  81021. getArrowLikeExpressions(node, disallowInvalid) {
  81022. const stack = [node];
  81023. const arrows = [];
  81024. while (stack.length !== 0) {
  81025. const node2 = stack.pop();
  81026. if (node2.type === "ArrowFunctionExpression") {
  81027. if (node2.typeParameters || !node2.returnType) {
  81028. this.finishArrowValidation(node2);
  81029. } else {
  81030. arrows.push(node2);
  81031. }
  81032. stack.push(node2.body);
  81033. } else if (node2.type === "ConditionalExpression") {
  81034. stack.push(node2.consequent);
  81035. stack.push(node2.alternate);
  81036. }
  81037. }
  81038. if (disallowInvalid) {
  81039. arrows.forEach((node2) => this.finishArrowValidation(node2));
  81040. return [arrows, []];
  81041. }
  81042. return partition(arrows, (node2) => node2.params.every((param) => this.isAssignable(param, true)));
  81043. }
  81044. finishArrowValidation(node) {
  81045. var _node$extra;
  81046. this.toAssignableList(node.params, (_node$extra = node.extra) == null ? void 0 : _node$extra.trailingComma, false);
  81047. this.scope.enter(SCOPE_FUNCTION2 | SCOPE_ARROW2);
  81048. super.checkParams(node, false, true);
  81049. this.scope.exit();
  81050. }
  81051. forwardNoArrowParamsConversionAt(node, parse5) {
  81052. let result;
  81053. if (this.state.noArrowParamsConversionAt.indexOf(node.start) !== -1) {
  81054. this.state.noArrowParamsConversionAt.push(this.state.start);
  81055. result = parse5();
  81056. this.state.noArrowParamsConversionAt.pop();
  81057. } else {
  81058. result = parse5();
  81059. }
  81060. return result;
  81061. }
  81062. parseParenItem(node, startPos, startLoc) {
  81063. node = super.parseParenItem(node, startPos, startLoc);
  81064. if (this.eat(types$12.question)) {
  81065. node.optional = true;
  81066. this.resetEndLocation(node);
  81067. }
  81068. if (this.match(types$12.colon)) {
  81069. const typeCastNode = this.startNodeAt(startPos, startLoc);
  81070. typeCastNode.expression = node;
  81071. typeCastNode.typeAnnotation = this.flowParseTypeAnnotation();
  81072. return this.finishNode(typeCastNode, "TypeCastExpression");
  81073. }
  81074. return node;
  81075. }
  81076. assertModuleNodeAllowed(node) {
  81077. if (node.type === "ImportDeclaration" && (node.importKind === "type" || node.importKind === "typeof") || node.type === "ExportNamedDeclaration" && node.exportKind === "type" || node.type === "ExportAllDeclaration" && node.exportKind === "type") {
  81078. return;
  81079. }
  81080. super.assertModuleNodeAllowed(node);
  81081. }
  81082. parseExport(node) {
  81083. const decl = super.parseExport(node);
  81084. if (decl.type === "ExportNamedDeclaration" || decl.type === "ExportAllDeclaration") {
  81085. decl.exportKind = decl.exportKind || "value";
  81086. }
  81087. return decl;
  81088. }
  81089. parseExportDeclaration(node) {
  81090. if (this.isContextual("type")) {
  81091. node.exportKind = "type";
  81092. const declarationNode = this.startNode();
  81093. this.next();
  81094. if (this.match(types$12.braceL)) {
  81095. node.specifiers = this.parseExportSpecifiers();
  81096. this.parseExportFrom(node);
  81097. return null;
  81098. } else {
  81099. return this.flowParseTypeAlias(declarationNode);
  81100. }
  81101. } else if (this.isContextual("opaque")) {
  81102. node.exportKind = "type";
  81103. const declarationNode = this.startNode();
  81104. this.next();
  81105. return this.flowParseOpaqueType(declarationNode, false);
  81106. } else if (this.isContextual("interface")) {
  81107. node.exportKind = "type";
  81108. const declarationNode = this.startNode();
  81109. this.next();
  81110. return this.flowParseInterface(declarationNode);
  81111. } else if (this.shouldParseEnums() && this.isContextual("enum")) {
  81112. node.exportKind = "value";
  81113. const declarationNode = this.startNode();
  81114. this.next();
  81115. return this.flowParseEnumDeclaration(declarationNode);
  81116. } else {
  81117. return super.parseExportDeclaration(node);
  81118. }
  81119. }
  81120. eatExportStar(node) {
  81121. if (super.eatExportStar(...arguments))
  81122. return true;
  81123. if (this.isContextual("type") && this.lookahead().type === types$12.star) {
  81124. node.exportKind = "type";
  81125. this.next();
  81126. this.next();
  81127. return true;
  81128. }
  81129. return false;
  81130. }
  81131. maybeParseExportNamespaceSpecifier(node) {
  81132. const pos = this.state.start;
  81133. const hasNamespace = super.maybeParseExportNamespaceSpecifier(node);
  81134. if (hasNamespace && node.exportKind === "type") {
  81135. this.unexpected(pos);
  81136. }
  81137. return hasNamespace;
  81138. }
  81139. parseClassId(node, isStatement, optionalId) {
  81140. super.parseClassId(node, isStatement, optionalId);
  81141. if (this.isRelational("<")) {
  81142. node.typeParameters = this.flowParseTypeParameterDeclaration();
  81143. }
  81144. }
  81145. parseClassMember(classBody, member, state) {
  81146. const pos = this.state.start;
  81147. if (this.isContextual("declare")) {
  81148. if (this.parseClassMemberFromModifier(classBody, member)) {
  81149. return;
  81150. }
  81151. member.declare = true;
  81152. }
  81153. super.parseClassMember(classBody, member, state);
  81154. if (member.declare) {
  81155. if (member.type !== "ClassProperty" && member.type !== "ClassPrivateProperty" && member.type !== "PropertyDefinition") {
  81156. this.raise(pos, FlowErrors.DeclareClassElement);
  81157. } else if (member.value) {
  81158. this.raise(member.value.start, FlowErrors.DeclareClassFieldInitializer);
  81159. }
  81160. }
  81161. }
  81162. isIterator(word) {
  81163. return word === "iterator" || word === "asyncIterator";
  81164. }
  81165. readIterator() {
  81166. const word = super.readWord1();
  81167. const fullWord = "@@" + word;
  81168. if (!this.isIterator(word) || !this.state.inType) {
  81169. this.raise(this.state.pos, ErrorMessages.InvalidIdentifier, fullWord);
  81170. }
  81171. this.finishToken(types$12.name, fullWord);
  81172. }
  81173. getTokenFromCode(code2) {
  81174. const next = this.input.charCodeAt(this.state.pos + 1);
  81175. if (code2 === 123 && next === 124) {
  81176. return this.finishOp(types$12.braceBarL, 2);
  81177. } else if (this.state.inType && (code2 === 62 || code2 === 60)) {
  81178. return this.finishOp(types$12.relational, 1);
  81179. } else if (this.state.inType && code2 === 63) {
  81180. if (next === 46) {
  81181. return this.finishOp(types$12.questionDot, 2);
  81182. }
  81183. return this.finishOp(types$12.question, 1);
  81184. } else if (isIteratorStart(code2, next)) {
  81185. this.state.pos += 2;
  81186. return this.readIterator();
  81187. } else {
  81188. return super.getTokenFromCode(code2);
  81189. }
  81190. }
  81191. isAssignable(node, isBinding) {
  81192. switch (node.type) {
  81193. case "Identifier":
  81194. case "ObjectPattern":
  81195. case "ArrayPattern":
  81196. case "AssignmentPattern":
  81197. return true;
  81198. case "ObjectExpression": {
  81199. const last = node.properties.length - 1;
  81200. return node.properties.every((prop, i) => {
  81201. return prop.type !== "ObjectMethod" && (i === last || prop.type === "SpreadElement") && this.isAssignable(prop);
  81202. });
  81203. }
  81204. case "ObjectProperty":
  81205. return this.isAssignable(node.value);
  81206. case "SpreadElement":
  81207. return this.isAssignable(node.argument);
  81208. case "ArrayExpression":
  81209. return node.elements.every((element2) => this.isAssignable(element2));
  81210. case "AssignmentExpression":
  81211. return node.operator === "=";
  81212. case "ParenthesizedExpression":
  81213. case "TypeCastExpression":
  81214. return this.isAssignable(node.expression);
  81215. case "MemberExpression":
  81216. case "OptionalMemberExpression":
  81217. return !isBinding;
  81218. default:
  81219. return false;
  81220. }
  81221. }
  81222. toAssignable(node, isLHS = false) {
  81223. if (node.type === "TypeCastExpression") {
  81224. return super.toAssignable(this.typeCastToParameter(node), isLHS);
  81225. } else {
  81226. return super.toAssignable(node, isLHS);
  81227. }
  81228. }
  81229. toAssignableList(exprList, trailingCommaPos, isLHS) {
  81230. for (let i = 0; i < exprList.length; i++) {
  81231. const expr = exprList[i];
  81232. if ((expr == null ? void 0 : expr.type) === "TypeCastExpression") {
  81233. exprList[i] = this.typeCastToParameter(expr);
  81234. }
  81235. }
  81236. return super.toAssignableList(exprList, trailingCommaPos, isLHS);
  81237. }
  81238. toReferencedList(exprList, isParenthesizedExpr) {
  81239. for (let i = 0; i < exprList.length; i++) {
  81240. var _expr$extra;
  81241. const expr = exprList[i];
  81242. if (expr && expr.type === "TypeCastExpression" && !((_expr$extra = expr.extra) != null && _expr$extra.parenthesized) && (exprList.length > 1 || !isParenthesizedExpr)) {
  81243. this.raise(expr.typeAnnotation.start, FlowErrors.TypeCastInPattern);
  81244. }
  81245. }
  81246. return exprList;
  81247. }
  81248. parseArrayLike(close, canBePattern, isTuple, refExpressionErrors) {
  81249. const node = super.parseArrayLike(close, canBePattern, isTuple, refExpressionErrors);
  81250. if (canBePattern && !this.state.maybeInArrowParameters) {
  81251. this.toReferencedList(node.elements);
  81252. }
  81253. return node;
  81254. }
  81255. checkLVal(expr, ...args) {
  81256. if (expr.type !== "TypeCastExpression") {
  81257. return super.checkLVal(expr, ...args);
  81258. }
  81259. }
  81260. parseClassProperty(node) {
  81261. if (this.match(types$12.colon)) {
  81262. node.typeAnnotation = this.flowParseTypeAnnotation();
  81263. }
  81264. return super.parseClassProperty(node);
  81265. }
  81266. parseClassPrivateProperty(node) {
  81267. if (this.match(types$12.colon)) {
  81268. node.typeAnnotation = this.flowParseTypeAnnotation();
  81269. }
  81270. return super.parseClassPrivateProperty(node);
  81271. }
  81272. isClassMethod() {
  81273. return this.isRelational("<") || super.isClassMethod();
  81274. }
  81275. isClassProperty() {
  81276. return this.match(types$12.colon) || super.isClassProperty();
  81277. }
  81278. isNonstaticConstructor(method) {
  81279. return !this.match(types$12.colon) && super.isNonstaticConstructor(method);
  81280. }
  81281. pushClassMethod(classBody, method, isGenerator, isAsync, isConstructor, allowsDirectSuper) {
  81282. if (method.variance) {
  81283. this.unexpected(method.variance.start);
  81284. }
  81285. delete method.variance;
  81286. if (this.isRelational("<")) {
  81287. method.typeParameters = this.flowParseTypeParameterDeclaration();
  81288. }
  81289. super.pushClassMethod(classBody, method, isGenerator, isAsync, isConstructor, allowsDirectSuper);
  81290. if (method.params && isConstructor) {
  81291. const params = method.params;
  81292. if (params.length > 0 && this.isThisParam(params[0])) {
  81293. this.raise(method.start, FlowErrors.ThisParamBannedInConstructor);
  81294. }
  81295. } else if (method.type === "MethodDefinition" && isConstructor && method.value.params) {
  81296. const params = method.value.params;
  81297. if (params.length > 0 && this.isThisParam(params[0])) {
  81298. this.raise(method.start, FlowErrors.ThisParamBannedInConstructor);
  81299. }
  81300. }
  81301. }
  81302. pushClassPrivateMethod(classBody, method, isGenerator, isAsync) {
  81303. if (method.variance) {
  81304. this.unexpected(method.variance.start);
  81305. }
  81306. delete method.variance;
  81307. if (this.isRelational("<")) {
  81308. method.typeParameters = this.flowParseTypeParameterDeclaration();
  81309. }
  81310. super.pushClassPrivateMethod(classBody, method, isGenerator, isAsync);
  81311. }
  81312. parseClassSuper(node) {
  81313. super.parseClassSuper(node);
  81314. if (node.superClass && this.isRelational("<")) {
  81315. node.superTypeParameters = this.flowParseTypeParameterInstantiation();
  81316. }
  81317. if (this.isContextual("implements")) {
  81318. this.next();
  81319. const implemented = node.implements = [];
  81320. do {
  81321. const node2 = this.startNode();
  81322. node2.id = this.flowParseRestrictedIdentifier(true);
  81323. if (this.isRelational("<")) {
  81324. node2.typeParameters = this.flowParseTypeParameterInstantiation();
  81325. } else {
  81326. node2.typeParameters = null;
  81327. }
  81328. implemented.push(this.finishNode(node2, "ClassImplements"));
  81329. } while (this.eat(types$12.comma));
  81330. }
  81331. }
  81332. checkGetterSetterParams(method) {
  81333. super.checkGetterSetterParams(method);
  81334. const params = this.getObjectOrClassMethodParams(method);
  81335. if (params.length > 0) {
  81336. const param = params[0];
  81337. if (this.isThisParam(param) && method.kind === "get") {
  81338. this.raise(param.start, FlowErrors.GetterMayNotHaveThisParam);
  81339. } else if (this.isThisParam(param)) {
  81340. this.raise(param.start, FlowErrors.SetterMayNotHaveThisParam);
  81341. }
  81342. }
  81343. }
  81344. parsePropertyName(node, isPrivateNameAllowed) {
  81345. const variance = this.flowParseVariance();
  81346. const key = super.parsePropertyName(node, isPrivateNameAllowed);
  81347. node.variance = variance;
  81348. return key;
  81349. }
  81350. parseObjPropValue(prop, startPos, startLoc, isGenerator, isAsync, isPattern, isAccessor, refExpressionErrors) {
  81351. if (prop.variance) {
  81352. this.unexpected(prop.variance.start);
  81353. }
  81354. delete prop.variance;
  81355. let typeParameters;
  81356. if (this.isRelational("<") && !isAccessor) {
  81357. typeParameters = this.flowParseTypeParameterDeclaration();
  81358. if (!this.match(types$12.parenL))
  81359. this.unexpected();
  81360. }
  81361. super.parseObjPropValue(prop, startPos, startLoc, isGenerator, isAsync, isPattern, isAccessor, refExpressionErrors);
  81362. if (typeParameters) {
  81363. (prop.value || prop).typeParameters = typeParameters;
  81364. }
  81365. }
  81366. parseAssignableListItemTypes(param) {
  81367. if (this.eat(types$12.question)) {
  81368. if (param.type !== "Identifier") {
  81369. this.raise(param.start, FlowErrors.OptionalBindingPattern);
  81370. }
  81371. if (this.isThisParam(param)) {
  81372. this.raise(param.start, FlowErrors.ThisParamMayNotBeOptional);
  81373. }
  81374. param.optional = true;
  81375. }
  81376. if (this.match(types$12.colon)) {
  81377. param.typeAnnotation = this.flowParseTypeAnnotation();
  81378. } else if (this.isThisParam(param)) {
  81379. this.raise(param.start, FlowErrors.ThisParamAnnotationRequired);
  81380. }
  81381. if (this.match(types$12.eq) && this.isThisParam(param)) {
  81382. this.raise(param.start, FlowErrors.ThisParamNoDefault);
  81383. }
  81384. this.resetEndLocation(param);
  81385. return param;
  81386. }
  81387. parseMaybeDefault(startPos, startLoc, left) {
  81388. const node = super.parseMaybeDefault(startPos, startLoc, left);
  81389. if (node.type === "AssignmentPattern" && node.typeAnnotation && node.right.start < node.typeAnnotation.start) {
  81390. this.raise(node.typeAnnotation.start, FlowErrors.TypeBeforeInitializer);
  81391. }
  81392. return node;
  81393. }
  81394. shouldParseDefaultImport(node) {
  81395. if (!hasTypeImportKind(node)) {
  81396. return super.shouldParseDefaultImport(node);
  81397. }
  81398. return isMaybeDefaultImport(this.state);
  81399. }
  81400. parseImportSpecifierLocal(node, specifier, type, contextDescription) {
  81401. specifier.local = hasTypeImportKind(node) ? this.flowParseRestrictedIdentifier(true, true) : this.parseIdentifier();
  81402. this.checkLVal(specifier.local, contextDescription, BIND_LEXICAL2);
  81403. node.specifiers.push(this.finishNode(specifier, type));
  81404. }
  81405. maybeParseDefaultImportSpecifier(node) {
  81406. node.importKind = "value";
  81407. let kind = null;
  81408. if (this.match(types$12._typeof)) {
  81409. kind = "typeof";
  81410. } else if (this.isContextual("type")) {
  81411. kind = "type";
  81412. }
  81413. if (kind) {
  81414. const lh = this.lookahead();
  81415. if (kind === "type" && lh.type === types$12.star) {
  81416. this.unexpected(lh.start);
  81417. }
  81418. if (isMaybeDefaultImport(lh) || lh.type === types$12.braceL || lh.type === types$12.star) {
  81419. this.next();
  81420. node.importKind = kind;
  81421. }
  81422. }
  81423. return super.maybeParseDefaultImportSpecifier(node);
  81424. }
  81425. parseImportSpecifier(node) {
  81426. const specifier = this.startNode();
  81427. const firstIdentIsString = this.match(types$12.string);
  81428. const firstIdent = this.parseModuleExportName();
  81429. let specifierTypeKind = null;
  81430. if (firstIdent.type === "Identifier") {
  81431. if (firstIdent.name === "type") {
  81432. specifierTypeKind = "type";
  81433. } else if (firstIdent.name === "typeof") {
  81434. specifierTypeKind = "typeof";
  81435. }
  81436. }
  81437. let isBinding = false;
  81438. if (this.isContextual("as") && !this.isLookaheadContextual("as")) {
  81439. const as_ident = this.parseIdentifier(true);
  81440. if (specifierTypeKind !== null && !this.match(types$12.name) && !this.state.type.keyword) {
  81441. specifier.imported = as_ident;
  81442. specifier.importKind = specifierTypeKind;
  81443. specifier.local = as_ident.__clone();
  81444. } else {
  81445. specifier.imported = firstIdent;
  81446. specifier.importKind = null;
  81447. specifier.local = this.parseIdentifier();
  81448. }
  81449. } else if (specifierTypeKind !== null && (this.match(types$12.name) || this.state.type.keyword)) {
  81450. specifier.imported = this.parseIdentifier(true);
  81451. specifier.importKind = specifierTypeKind;
  81452. if (this.eatContextual("as")) {
  81453. specifier.local = this.parseIdentifier();
  81454. } else {
  81455. isBinding = true;
  81456. specifier.local = specifier.imported.__clone();
  81457. }
  81458. } else {
  81459. if (firstIdentIsString) {
  81460. throw this.raise(specifier.start, ErrorMessages.ImportBindingIsString, firstIdent.value);
  81461. }
  81462. isBinding = true;
  81463. specifier.imported = firstIdent;
  81464. specifier.importKind = null;
  81465. specifier.local = specifier.imported.__clone();
  81466. }
  81467. const nodeIsTypeImport = hasTypeImportKind(node);
  81468. const specifierIsTypeImport = hasTypeImportKind(specifier);
  81469. if (nodeIsTypeImport && specifierIsTypeImport) {
  81470. this.raise(specifier.start, FlowErrors.ImportTypeShorthandOnlyInPureImport);
  81471. }
  81472. if (nodeIsTypeImport || specifierIsTypeImport) {
  81473. this.checkReservedType(specifier.local.name, specifier.local.start, true);
  81474. }
  81475. if (isBinding && !nodeIsTypeImport && !specifierIsTypeImport) {
  81476. this.checkReservedWord(specifier.local.name, specifier.start, true, true);
  81477. }
  81478. this.checkLVal(specifier.local, "import specifier", BIND_LEXICAL2);
  81479. node.specifiers.push(this.finishNode(specifier, "ImportSpecifier"));
  81480. }
  81481. parseBindingAtom() {
  81482. switch (this.state.type) {
  81483. case types$12._this:
  81484. return this.parseIdentifier(true);
  81485. default:
  81486. return super.parseBindingAtom();
  81487. }
  81488. }
  81489. parseFunctionParams(node, allowModifiers) {
  81490. const kind = node.kind;
  81491. if (kind !== "get" && kind !== "set" && this.isRelational("<")) {
  81492. node.typeParameters = this.flowParseTypeParameterDeclaration();
  81493. }
  81494. super.parseFunctionParams(node, allowModifiers);
  81495. }
  81496. parseVarId(decl, kind) {
  81497. super.parseVarId(decl, kind);
  81498. if (this.match(types$12.colon)) {
  81499. decl.id.typeAnnotation = this.flowParseTypeAnnotation();
  81500. this.resetEndLocation(decl.id);
  81501. }
  81502. }
  81503. parseAsyncArrowFromCallExpression(node, call) {
  81504. if (this.match(types$12.colon)) {
  81505. const oldNoAnonFunctionType = this.state.noAnonFunctionType;
  81506. this.state.noAnonFunctionType = true;
  81507. node.returnType = this.flowParseTypeAnnotation();
  81508. this.state.noAnonFunctionType = oldNoAnonFunctionType;
  81509. }
  81510. return super.parseAsyncArrowFromCallExpression(node, call);
  81511. }
  81512. shouldParseAsyncArrow() {
  81513. return this.match(types$12.colon) || super.shouldParseAsyncArrow();
  81514. }
  81515. parseMaybeAssign(refExpressionErrors, afterLeftParse) {
  81516. var _jsx;
  81517. let state = null;
  81518. let jsx2;
  81519. if (this.hasPlugin("jsx") && (this.match(types$12.jsxTagStart) || this.isRelational("<"))) {
  81520. state = this.state.clone();
  81521. jsx2 = this.tryParse(() => super.parseMaybeAssign(refExpressionErrors, afterLeftParse), state);
  81522. if (!jsx2.error)
  81523. return jsx2.node;
  81524. const {
  81525. context
  81526. } = this.state;
  81527. const curContext = context[context.length - 1];
  81528. if (curContext === types2.j_oTag) {
  81529. context.length -= 2;
  81530. } else if (curContext === types2.j_expr) {
  81531. context.length -= 1;
  81532. }
  81533. }
  81534. if ((_jsx = jsx2) != null && _jsx.error || this.isRelational("<")) {
  81535. var _jsx2, _jsx3;
  81536. state = state || this.state.clone();
  81537. let typeParameters;
  81538. const arrow = this.tryParse((abort) => {
  81539. var _arrowExpression$extr;
  81540. typeParameters = this.flowParseTypeParameterDeclaration();
  81541. const arrowExpression2 = this.forwardNoArrowParamsConversionAt(typeParameters, () => {
  81542. const result = super.parseMaybeAssign(refExpressionErrors, afterLeftParse);
  81543. this.resetStartLocationFromNode(result, typeParameters);
  81544. return result;
  81545. });
  81546. if (arrowExpression2.type !== "ArrowFunctionExpression" && (_arrowExpression$extr = arrowExpression2.extra) != null && _arrowExpression$extr.parenthesized) {
  81547. abort();
  81548. }
  81549. const expr = this.maybeUnwrapTypeCastExpression(arrowExpression2);
  81550. expr.typeParameters = typeParameters;
  81551. this.resetStartLocationFromNode(expr, typeParameters);
  81552. return arrowExpression2;
  81553. }, state);
  81554. let arrowExpression = null;
  81555. if (arrow.node && this.maybeUnwrapTypeCastExpression(arrow.node).type === "ArrowFunctionExpression") {
  81556. if (!arrow.error && !arrow.aborted) {
  81557. if (arrow.node.async) {
  81558. this.raise(typeParameters.start, FlowErrors.UnexpectedTypeParameterBeforeAsyncArrowFunction);
  81559. }
  81560. return arrow.node;
  81561. }
  81562. arrowExpression = arrow.node;
  81563. }
  81564. if ((_jsx2 = jsx2) != null && _jsx2.node) {
  81565. this.state = jsx2.failState;
  81566. return jsx2.node;
  81567. }
  81568. if (arrowExpression) {
  81569. this.state = arrow.failState;
  81570. return arrowExpression;
  81571. }
  81572. if ((_jsx3 = jsx2) != null && _jsx3.thrown)
  81573. throw jsx2.error;
  81574. if (arrow.thrown)
  81575. throw arrow.error;
  81576. throw this.raise(typeParameters.start, FlowErrors.UnexpectedTokenAfterTypeParameter);
  81577. }
  81578. return super.parseMaybeAssign(refExpressionErrors, afterLeftParse);
  81579. }
  81580. parseArrow(node) {
  81581. if (this.match(types$12.colon)) {
  81582. const result = this.tryParse(() => {
  81583. const oldNoAnonFunctionType = this.state.noAnonFunctionType;
  81584. this.state.noAnonFunctionType = true;
  81585. const typeNode = this.startNode();
  81586. [typeNode.typeAnnotation, node.predicate] = this.flowParseTypeAndPredicateInitialiser();
  81587. this.state.noAnonFunctionType = oldNoAnonFunctionType;
  81588. if (this.canInsertSemicolon())
  81589. this.unexpected();
  81590. if (!this.match(types$12.arrow))
  81591. this.unexpected();
  81592. return typeNode;
  81593. });
  81594. if (result.thrown)
  81595. return null;
  81596. if (result.error)
  81597. this.state = result.failState;
  81598. node.returnType = result.node.typeAnnotation ? this.finishNode(result.node, "TypeAnnotation") : null;
  81599. }
  81600. return super.parseArrow(node);
  81601. }
  81602. shouldParseArrow() {
  81603. return this.match(types$12.colon) || super.shouldParseArrow();
  81604. }
  81605. setArrowFunctionParameters(node, params) {
  81606. if (this.state.noArrowParamsConversionAt.indexOf(node.start) !== -1) {
  81607. node.params = params;
  81608. } else {
  81609. super.setArrowFunctionParameters(node, params);
  81610. }
  81611. }
  81612. checkParams(node, allowDuplicates, isArrowFunction) {
  81613. if (isArrowFunction && this.state.noArrowParamsConversionAt.indexOf(node.start) !== -1) {
  81614. return;
  81615. }
  81616. for (let i = 0; i < node.params.length; i++) {
  81617. if (this.isThisParam(node.params[i]) && i > 0) {
  81618. this.raise(node.params[i].start, FlowErrors.ThisParamMustBeFirst);
  81619. }
  81620. }
  81621. return super.checkParams(...arguments);
  81622. }
  81623. parseParenAndDistinguishExpression(canBeArrow) {
  81624. return super.parseParenAndDistinguishExpression(canBeArrow && this.state.noArrowAt.indexOf(this.state.start) === -1);
  81625. }
  81626. parseSubscripts(base2, startPos, startLoc, noCalls) {
  81627. if (base2.type === "Identifier" && base2.name === "async" && this.state.noArrowAt.indexOf(startPos) !== -1) {
  81628. this.next();
  81629. const node = this.startNodeAt(startPos, startLoc);
  81630. node.callee = base2;
  81631. node.arguments = this.parseCallExpressionArguments(types$12.parenR, false);
  81632. base2 = this.finishNode(node, "CallExpression");
  81633. } else if (base2.type === "Identifier" && base2.name === "async" && this.isRelational("<")) {
  81634. const state = this.state.clone();
  81635. const arrow = this.tryParse((abort) => this.parseAsyncArrowWithTypeParameters(startPos, startLoc) || abort(), state);
  81636. if (!arrow.error && !arrow.aborted)
  81637. return arrow.node;
  81638. const result = this.tryParse(() => super.parseSubscripts(base2, startPos, startLoc, noCalls), state);
  81639. if (result.node && !result.error)
  81640. return result.node;
  81641. if (arrow.node) {
  81642. this.state = arrow.failState;
  81643. return arrow.node;
  81644. }
  81645. if (result.node) {
  81646. this.state = result.failState;
  81647. return result.node;
  81648. }
  81649. throw arrow.error || result.error;
  81650. }
  81651. return super.parseSubscripts(base2, startPos, startLoc, noCalls);
  81652. }
  81653. parseSubscript(base2, startPos, startLoc, noCalls, subscriptState) {
  81654. if (this.match(types$12.questionDot) && this.isLookaheadToken_lt()) {
  81655. subscriptState.optionalChainMember = true;
  81656. if (noCalls) {
  81657. subscriptState.stop = true;
  81658. return base2;
  81659. }
  81660. this.next();
  81661. const node = this.startNodeAt(startPos, startLoc);
  81662. node.callee = base2;
  81663. node.typeArguments = this.flowParseTypeParameterInstantiation();
  81664. this.expect(types$12.parenL);
  81665. node.arguments = this.parseCallExpressionArguments(types$12.parenR, false);
  81666. node.optional = true;
  81667. return this.finishCallExpression(node, true);
  81668. } else if (!noCalls && this.shouldParseTypes() && this.isRelational("<")) {
  81669. const node = this.startNodeAt(startPos, startLoc);
  81670. node.callee = base2;
  81671. const result = this.tryParse(() => {
  81672. node.typeArguments = this.flowParseTypeParameterInstantiationCallOrNew();
  81673. this.expect(types$12.parenL);
  81674. node.arguments = this.parseCallExpressionArguments(types$12.parenR, false);
  81675. if (subscriptState.optionalChainMember)
  81676. node.optional = false;
  81677. return this.finishCallExpression(node, subscriptState.optionalChainMember);
  81678. });
  81679. if (result.node) {
  81680. if (result.error)
  81681. this.state = result.failState;
  81682. return result.node;
  81683. }
  81684. }
  81685. return super.parseSubscript(base2, startPos, startLoc, noCalls, subscriptState);
  81686. }
  81687. parseNewArguments(node) {
  81688. let targs = null;
  81689. if (this.shouldParseTypes() && this.isRelational("<")) {
  81690. targs = this.tryParse(() => this.flowParseTypeParameterInstantiationCallOrNew()).node;
  81691. }
  81692. node.typeArguments = targs;
  81693. super.parseNewArguments(node);
  81694. }
  81695. parseAsyncArrowWithTypeParameters(startPos, startLoc) {
  81696. const node = this.startNodeAt(startPos, startLoc);
  81697. this.parseFunctionParams(node);
  81698. if (!this.parseArrow(node))
  81699. return;
  81700. return this.parseArrowExpression(node, void 0, true);
  81701. }
  81702. readToken_mult_modulo(code2) {
  81703. const next = this.input.charCodeAt(this.state.pos + 1);
  81704. if (code2 === 42 && next === 47 && this.state.hasFlowComment) {
  81705. this.state.hasFlowComment = false;
  81706. this.state.pos += 2;
  81707. this.nextToken();
  81708. return;
  81709. }
  81710. super.readToken_mult_modulo(code2);
  81711. }
  81712. readToken_pipe_amp(code2) {
  81713. const next = this.input.charCodeAt(this.state.pos + 1);
  81714. if (code2 === 124 && next === 125) {
  81715. this.finishOp(types$12.braceBarR, 2);
  81716. return;
  81717. }
  81718. super.readToken_pipe_amp(code2);
  81719. }
  81720. parseTopLevel(file, program) {
  81721. const fileNode = super.parseTopLevel(file, program);
  81722. if (this.state.hasFlowComment) {
  81723. this.raise(this.state.pos, FlowErrors.UnterminatedFlowComment);
  81724. }
  81725. return fileNode;
  81726. }
  81727. skipBlockComment() {
  81728. if (this.hasPlugin("flowComments") && this.skipFlowComment()) {
  81729. if (this.state.hasFlowComment) {
  81730. this.unexpected(null, FlowErrors.NestedFlowComment);
  81731. }
  81732. this.hasFlowCommentCompletion();
  81733. this.state.pos += this.skipFlowComment();
  81734. this.state.hasFlowComment = true;
  81735. return;
  81736. }
  81737. if (this.state.hasFlowComment) {
  81738. const end = this.input.indexOf("*-/", this.state.pos += 2);
  81739. if (end === -1) {
  81740. throw this.raise(this.state.pos - 2, ErrorMessages.UnterminatedComment);
  81741. }
  81742. this.state.pos = end + 3;
  81743. return;
  81744. }
  81745. return super.skipBlockComment();
  81746. }
  81747. skipFlowComment() {
  81748. const {
  81749. pos
  81750. } = this.state;
  81751. let shiftToFirstNonWhiteSpace = 2;
  81752. while ([32, 9].includes(this.input.charCodeAt(pos + shiftToFirstNonWhiteSpace))) {
  81753. shiftToFirstNonWhiteSpace++;
  81754. }
  81755. const ch2 = this.input.charCodeAt(shiftToFirstNonWhiteSpace + pos);
  81756. const ch3 = this.input.charCodeAt(shiftToFirstNonWhiteSpace + pos + 1);
  81757. if (ch2 === 58 && ch3 === 58) {
  81758. return shiftToFirstNonWhiteSpace + 2;
  81759. }
  81760. if (this.input.slice(shiftToFirstNonWhiteSpace + pos, shiftToFirstNonWhiteSpace + pos + 12) === "flow-include") {
  81761. return shiftToFirstNonWhiteSpace + 12;
  81762. }
  81763. if (ch2 === 58 && ch3 !== 58) {
  81764. return shiftToFirstNonWhiteSpace;
  81765. }
  81766. return false;
  81767. }
  81768. hasFlowCommentCompletion() {
  81769. const end = this.input.indexOf("*/", this.state.pos);
  81770. if (end === -1) {
  81771. throw this.raise(this.state.pos, ErrorMessages.UnterminatedComment);
  81772. }
  81773. }
  81774. flowEnumErrorBooleanMemberNotInitialized(pos, {
  81775. enumName,
  81776. memberName
  81777. }) {
  81778. this.raise(pos, FlowErrors.EnumBooleanMemberNotInitialized, memberName, enumName);
  81779. }
  81780. flowEnumErrorInvalidMemberName(pos, {
  81781. enumName,
  81782. memberName
  81783. }) {
  81784. const suggestion = memberName[0].toUpperCase() + memberName.slice(1);
  81785. this.raise(pos, FlowErrors.EnumInvalidMemberName, memberName, suggestion, enumName);
  81786. }
  81787. flowEnumErrorDuplicateMemberName(pos, {
  81788. enumName,
  81789. memberName
  81790. }) {
  81791. this.raise(pos, FlowErrors.EnumDuplicateMemberName, memberName, enumName);
  81792. }
  81793. flowEnumErrorInconsistentMemberValues(pos, {
  81794. enumName
  81795. }) {
  81796. this.raise(pos, FlowErrors.EnumInconsistentMemberValues, enumName);
  81797. }
  81798. flowEnumErrorInvalidExplicitType(pos, {
  81799. enumName,
  81800. suppliedType
  81801. }) {
  81802. return this.raise(pos, suppliedType === null ? FlowErrors.EnumInvalidExplicitTypeUnknownSupplied : FlowErrors.EnumInvalidExplicitType, enumName, suppliedType);
  81803. }
  81804. flowEnumErrorInvalidMemberInitializer(pos, {
  81805. enumName,
  81806. explicitType,
  81807. memberName
  81808. }) {
  81809. let message = null;
  81810. switch (explicitType) {
  81811. case "boolean":
  81812. case "number":
  81813. case "string":
  81814. message = FlowErrors.EnumInvalidMemberInitializerPrimaryType;
  81815. break;
  81816. case "symbol":
  81817. message = FlowErrors.EnumInvalidMemberInitializerSymbolType;
  81818. break;
  81819. default:
  81820. message = FlowErrors.EnumInvalidMemberInitializerUnknownType;
  81821. }
  81822. return this.raise(pos, message, enumName, memberName, explicitType);
  81823. }
  81824. flowEnumErrorNumberMemberNotInitialized(pos, {
  81825. enumName,
  81826. memberName
  81827. }) {
  81828. this.raise(pos, FlowErrors.EnumNumberMemberNotInitialized, enumName, memberName);
  81829. }
  81830. flowEnumErrorStringMemberInconsistentlyInitailized(pos, {
  81831. enumName
  81832. }) {
  81833. this.raise(pos, FlowErrors.EnumStringMemberInconsistentlyInitailized, enumName);
  81834. }
  81835. flowEnumMemberInit() {
  81836. const startPos = this.state.start;
  81837. const endOfInit = () => this.match(types$12.comma) || this.match(types$12.braceR);
  81838. switch (this.state.type) {
  81839. case types$12.num: {
  81840. const literal2 = this.parseNumericLiteral(this.state.value);
  81841. if (endOfInit()) {
  81842. return {
  81843. type: "number",
  81844. pos: literal2.start,
  81845. value: literal2
  81846. };
  81847. }
  81848. return {
  81849. type: "invalid",
  81850. pos: startPos
  81851. };
  81852. }
  81853. case types$12.string: {
  81854. const literal2 = this.parseStringLiteral(this.state.value);
  81855. if (endOfInit()) {
  81856. return {
  81857. type: "string",
  81858. pos: literal2.start,
  81859. value: literal2
  81860. };
  81861. }
  81862. return {
  81863. type: "invalid",
  81864. pos: startPos
  81865. };
  81866. }
  81867. case types$12._true:
  81868. case types$12._false: {
  81869. const literal2 = this.parseBooleanLiteral(this.match(types$12._true));
  81870. if (endOfInit()) {
  81871. return {
  81872. type: "boolean",
  81873. pos: literal2.start,
  81874. value: literal2
  81875. };
  81876. }
  81877. return {
  81878. type: "invalid",
  81879. pos: startPos
  81880. };
  81881. }
  81882. default:
  81883. return {
  81884. type: "invalid",
  81885. pos: startPos
  81886. };
  81887. }
  81888. }
  81889. flowEnumMemberRaw() {
  81890. const pos = this.state.start;
  81891. const id = this.parseIdentifier(true);
  81892. const init = this.eat(types$12.eq) ? this.flowEnumMemberInit() : {
  81893. type: "none",
  81894. pos
  81895. };
  81896. return {
  81897. id,
  81898. init
  81899. };
  81900. }
  81901. flowEnumCheckExplicitTypeMismatch(pos, context, expectedType) {
  81902. const {
  81903. explicitType
  81904. } = context;
  81905. if (explicitType === null) {
  81906. return;
  81907. }
  81908. if (explicitType !== expectedType) {
  81909. this.flowEnumErrorInvalidMemberInitializer(pos, context);
  81910. }
  81911. }
  81912. flowEnumMembers({
  81913. enumName,
  81914. explicitType
  81915. }) {
  81916. const seenNames = /* @__PURE__ */ new Set();
  81917. const members = {
  81918. booleanMembers: [],
  81919. numberMembers: [],
  81920. stringMembers: [],
  81921. defaultedMembers: []
  81922. };
  81923. let hasUnknownMembers = false;
  81924. while (!this.match(types$12.braceR)) {
  81925. if (this.eat(types$12.ellipsis)) {
  81926. hasUnknownMembers = true;
  81927. break;
  81928. }
  81929. const memberNode = this.startNode();
  81930. const {
  81931. id,
  81932. init
  81933. } = this.flowEnumMemberRaw();
  81934. const memberName = id.name;
  81935. if (memberName === "") {
  81936. continue;
  81937. }
  81938. if (/^[a-z]/.test(memberName)) {
  81939. this.flowEnumErrorInvalidMemberName(id.start, {
  81940. enumName,
  81941. memberName
  81942. });
  81943. }
  81944. if (seenNames.has(memberName)) {
  81945. this.flowEnumErrorDuplicateMemberName(id.start, {
  81946. enumName,
  81947. memberName
  81948. });
  81949. }
  81950. seenNames.add(memberName);
  81951. const context = {
  81952. enumName,
  81953. explicitType,
  81954. memberName
  81955. };
  81956. memberNode.id = id;
  81957. switch (init.type) {
  81958. case "boolean": {
  81959. this.flowEnumCheckExplicitTypeMismatch(init.pos, context, "boolean");
  81960. memberNode.init = init.value;
  81961. members.booleanMembers.push(this.finishNode(memberNode, "EnumBooleanMember"));
  81962. break;
  81963. }
  81964. case "number": {
  81965. this.flowEnumCheckExplicitTypeMismatch(init.pos, context, "number");
  81966. memberNode.init = init.value;
  81967. members.numberMembers.push(this.finishNode(memberNode, "EnumNumberMember"));
  81968. break;
  81969. }
  81970. case "string": {
  81971. this.flowEnumCheckExplicitTypeMismatch(init.pos, context, "string");
  81972. memberNode.init = init.value;
  81973. members.stringMembers.push(this.finishNode(memberNode, "EnumStringMember"));
  81974. break;
  81975. }
  81976. case "invalid": {
  81977. throw this.flowEnumErrorInvalidMemberInitializer(init.pos, context);
  81978. }
  81979. case "none": {
  81980. switch (explicitType) {
  81981. case "boolean":
  81982. this.flowEnumErrorBooleanMemberNotInitialized(init.pos, context);
  81983. break;
  81984. case "number":
  81985. this.flowEnumErrorNumberMemberNotInitialized(init.pos, context);
  81986. break;
  81987. default:
  81988. members.defaultedMembers.push(this.finishNode(memberNode, "EnumDefaultedMember"));
  81989. }
  81990. }
  81991. }
  81992. if (!this.match(types$12.braceR)) {
  81993. this.expect(types$12.comma);
  81994. }
  81995. }
  81996. return {
  81997. members,
  81998. hasUnknownMembers
  81999. };
  82000. }
  82001. flowEnumStringMembers(initializedMembers, defaultedMembers, {
  82002. enumName
  82003. }) {
  82004. if (initializedMembers.length === 0) {
  82005. return defaultedMembers;
  82006. } else if (defaultedMembers.length === 0) {
  82007. return initializedMembers;
  82008. } else if (defaultedMembers.length > initializedMembers.length) {
  82009. for (const member of initializedMembers) {
  82010. this.flowEnumErrorStringMemberInconsistentlyInitailized(member.start, {
  82011. enumName
  82012. });
  82013. }
  82014. return defaultedMembers;
  82015. } else {
  82016. for (const member of defaultedMembers) {
  82017. this.flowEnumErrorStringMemberInconsistentlyInitailized(member.start, {
  82018. enumName
  82019. });
  82020. }
  82021. return initializedMembers;
  82022. }
  82023. }
  82024. flowEnumParseExplicitType({
  82025. enumName
  82026. }) {
  82027. if (this.eatContextual("of")) {
  82028. if (!this.match(types$12.name)) {
  82029. throw this.flowEnumErrorInvalidExplicitType(this.state.start, {
  82030. enumName,
  82031. suppliedType: null
  82032. });
  82033. }
  82034. const {
  82035. value
  82036. } = this.state;
  82037. this.next();
  82038. if (value !== "boolean" && value !== "number" && value !== "string" && value !== "symbol") {
  82039. this.flowEnumErrorInvalidExplicitType(this.state.start, {
  82040. enumName,
  82041. suppliedType: value
  82042. });
  82043. }
  82044. return value;
  82045. }
  82046. return null;
  82047. }
  82048. flowEnumBody(node, {
  82049. enumName,
  82050. nameLoc
  82051. }) {
  82052. const explicitType = this.flowEnumParseExplicitType({
  82053. enumName
  82054. });
  82055. this.expect(types$12.braceL);
  82056. const {
  82057. members,
  82058. hasUnknownMembers
  82059. } = this.flowEnumMembers({
  82060. enumName,
  82061. explicitType
  82062. });
  82063. node.hasUnknownMembers = hasUnknownMembers;
  82064. switch (explicitType) {
  82065. case "boolean":
  82066. node.explicitType = true;
  82067. node.members = members.booleanMembers;
  82068. this.expect(types$12.braceR);
  82069. return this.finishNode(node, "EnumBooleanBody");
  82070. case "number":
  82071. node.explicitType = true;
  82072. node.members = members.numberMembers;
  82073. this.expect(types$12.braceR);
  82074. return this.finishNode(node, "EnumNumberBody");
  82075. case "string":
  82076. node.explicitType = true;
  82077. node.members = this.flowEnumStringMembers(members.stringMembers, members.defaultedMembers, {
  82078. enumName
  82079. });
  82080. this.expect(types$12.braceR);
  82081. return this.finishNode(node, "EnumStringBody");
  82082. case "symbol":
  82083. node.members = members.defaultedMembers;
  82084. this.expect(types$12.braceR);
  82085. return this.finishNode(node, "EnumSymbolBody");
  82086. default: {
  82087. const empty3 = () => {
  82088. node.members = [];
  82089. this.expect(types$12.braceR);
  82090. return this.finishNode(node, "EnumStringBody");
  82091. };
  82092. node.explicitType = false;
  82093. const boolsLen = members.booleanMembers.length;
  82094. const numsLen = members.numberMembers.length;
  82095. const strsLen = members.stringMembers.length;
  82096. const defaultedLen = members.defaultedMembers.length;
  82097. if (!boolsLen && !numsLen && !strsLen && !defaultedLen) {
  82098. return empty3();
  82099. } else if (!boolsLen && !numsLen) {
  82100. node.members = this.flowEnumStringMembers(members.stringMembers, members.defaultedMembers, {
  82101. enumName
  82102. });
  82103. this.expect(types$12.braceR);
  82104. return this.finishNode(node, "EnumStringBody");
  82105. } else if (!numsLen && !strsLen && boolsLen >= defaultedLen) {
  82106. for (const member of members.defaultedMembers) {
  82107. this.flowEnumErrorBooleanMemberNotInitialized(member.start, {
  82108. enumName,
  82109. memberName: member.id.name
  82110. });
  82111. }
  82112. node.members = members.booleanMembers;
  82113. this.expect(types$12.braceR);
  82114. return this.finishNode(node, "EnumBooleanBody");
  82115. } else if (!boolsLen && !strsLen && numsLen >= defaultedLen) {
  82116. for (const member of members.defaultedMembers) {
  82117. this.flowEnumErrorNumberMemberNotInitialized(member.start, {
  82118. enumName,
  82119. memberName: member.id.name
  82120. });
  82121. }
  82122. node.members = members.numberMembers;
  82123. this.expect(types$12.braceR);
  82124. return this.finishNode(node, "EnumNumberBody");
  82125. } else {
  82126. this.flowEnumErrorInconsistentMemberValues(nameLoc, {
  82127. enumName
  82128. });
  82129. return empty3();
  82130. }
  82131. }
  82132. }
  82133. }
  82134. flowParseEnumDeclaration(node) {
  82135. const id = this.parseIdentifier();
  82136. node.id = id;
  82137. node.body = this.flowEnumBody(this.startNode(), {
  82138. enumName: id.name,
  82139. nameLoc: id.start
  82140. });
  82141. return this.finishNode(node, "EnumDeclaration");
  82142. }
  82143. isLookaheadToken_lt() {
  82144. const next = this.nextTokenStart();
  82145. if (this.input.charCodeAt(next) === 60) {
  82146. const afterNext = this.input.charCodeAt(next + 1);
  82147. return afterNext !== 60 && afterNext !== 61;
  82148. }
  82149. return false;
  82150. }
  82151. maybeUnwrapTypeCastExpression(node) {
  82152. return node.type === "TypeCastExpression" ? node.expression : node;
  82153. }
  82154. };
  82155. var entities = {
  82156. quot: '"',
  82157. amp: "&",
  82158. apos: "'",
  82159. lt: "<",
  82160. gt: ">",
  82161. nbsp: "\xA0",
  82162. iexcl: "\xA1",
  82163. cent: "\xA2",
  82164. pound: "\xA3",
  82165. curren: "\xA4",
  82166. yen: "\xA5",
  82167. brvbar: "\xA6",
  82168. sect: "\xA7",
  82169. uml: "\xA8",
  82170. copy: "\xA9",
  82171. ordf: "\xAA",
  82172. laquo: "\xAB",
  82173. not: "\xAC",
  82174. shy: "\xAD",
  82175. reg: "\xAE",
  82176. macr: "\xAF",
  82177. deg: "\xB0",
  82178. plusmn: "\xB1",
  82179. sup2: "\xB2",
  82180. sup3: "\xB3",
  82181. acute: "\xB4",
  82182. micro: "\xB5",
  82183. para: "\xB6",
  82184. middot: "\xB7",
  82185. cedil: "\xB8",
  82186. sup1: "\xB9",
  82187. ordm: "\xBA",
  82188. raquo: "\xBB",
  82189. frac14: "\xBC",
  82190. frac12: "\xBD",
  82191. frac34: "\xBE",
  82192. iquest: "\xBF",
  82193. Agrave: "\xC0",
  82194. Aacute: "\xC1",
  82195. Acirc: "\xC2",
  82196. Atilde: "\xC3",
  82197. Auml: "\xC4",
  82198. Aring: "\xC5",
  82199. AElig: "\xC6",
  82200. Ccedil: "\xC7",
  82201. Egrave: "\xC8",
  82202. Eacute: "\xC9",
  82203. Ecirc: "\xCA",
  82204. Euml: "\xCB",
  82205. Igrave: "\xCC",
  82206. Iacute: "\xCD",
  82207. Icirc: "\xCE",
  82208. Iuml: "\xCF",
  82209. ETH: "\xD0",
  82210. Ntilde: "\xD1",
  82211. Ograve: "\xD2",
  82212. Oacute: "\xD3",
  82213. Ocirc: "\xD4",
  82214. Otilde: "\xD5",
  82215. Ouml: "\xD6",
  82216. times: "\xD7",
  82217. Oslash: "\xD8",
  82218. Ugrave: "\xD9",
  82219. Uacute: "\xDA",
  82220. Ucirc: "\xDB",
  82221. Uuml: "\xDC",
  82222. Yacute: "\xDD",
  82223. THORN: "\xDE",
  82224. szlig: "\xDF",
  82225. agrave: "\xE0",
  82226. aacute: "\xE1",
  82227. acirc: "\xE2",
  82228. atilde: "\xE3",
  82229. auml: "\xE4",
  82230. aring: "\xE5",
  82231. aelig: "\xE6",
  82232. ccedil: "\xE7",
  82233. egrave: "\xE8",
  82234. eacute: "\xE9",
  82235. ecirc: "\xEA",
  82236. euml: "\xEB",
  82237. igrave: "\xEC",
  82238. iacute: "\xED",
  82239. icirc: "\xEE",
  82240. iuml: "\xEF",
  82241. eth: "\xF0",
  82242. ntilde: "\xF1",
  82243. ograve: "\xF2",
  82244. oacute: "\xF3",
  82245. ocirc: "\xF4",
  82246. otilde: "\xF5",
  82247. ouml: "\xF6",
  82248. divide: "\xF7",
  82249. oslash: "\xF8",
  82250. ugrave: "\xF9",
  82251. uacute: "\xFA",
  82252. ucirc: "\xFB",
  82253. uuml: "\xFC",
  82254. yacute: "\xFD",
  82255. thorn: "\xFE",
  82256. yuml: "\xFF",
  82257. OElig: "\u0152",
  82258. oelig: "\u0153",
  82259. Scaron: "\u0160",
  82260. scaron: "\u0161",
  82261. Yuml: "\u0178",
  82262. fnof: "\u0192",
  82263. circ: "\u02C6",
  82264. tilde: "\u02DC",
  82265. Alpha: "\u0391",
  82266. Beta: "\u0392",
  82267. Gamma: "\u0393",
  82268. Delta: "\u0394",
  82269. Epsilon: "\u0395",
  82270. Zeta: "\u0396",
  82271. Eta: "\u0397",
  82272. Theta: "\u0398",
  82273. Iota: "\u0399",
  82274. Kappa: "\u039A",
  82275. Lambda: "\u039B",
  82276. Mu: "\u039C",
  82277. Nu: "\u039D",
  82278. Xi: "\u039E",
  82279. Omicron: "\u039F",
  82280. Pi: "\u03A0",
  82281. Rho: "\u03A1",
  82282. Sigma: "\u03A3",
  82283. Tau: "\u03A4",
  82284. Upsilon: "\u03A5",
  82285. Phi: "\u03A6",
  82286. Chi: "\u03A7",
  82287. Psi: "\u03A8",
  82288. Omega: "\u03A9",
  82289. alpha: "\u03B1",
  82290. beta: "\u03B2",
  82291. gamma: "\u03B3",
  82292. delta: "\u03B4",
  82293. epsilon: "\u03B5",
  82294. zeta: "\u03B6",
  82295. eta: "\u03B7",
  82296. theta: "\u03B8",
  82297. iota: "\u03B9",
  82298. kappa: "\u03BA",
  82299. lambda: "\u03BB",
  82300. mu: "\u03BC",
  82301. nu: "\u03BD",
  82302. xi: "\u03BE",
  82303. omicron: "\u03BF",
  82304. pi: "\u03C0",
  82305. rho: "\u03C1",
  82306. sigmaf: "\u03C2",
  82307. sigma: "\u03C3",
  82308. tau: "\u03C4",
  82309. upsilon: "\u03C5",
  82310. phi: "\u03C6",
  82311. chi: "\u03C7",
  82312. psi: "\u03C8",
  82313. omega: "\u03C9",
  82314. thetasym: "\u03D1",
  82315. upsih: "\u03D2",
  82316. piv: "\u03D6",
  82317. ensp: "\u2002",
  82318. emsp: "\u2003",
  82319. thinsp: "\u2009",
  82320. zwnj: "\u200C",
  82321. zwj: "\u200D",
  82322. lrm: "\u200E",
  82323. rlm: "\u200F",
  82324. ndash: "\u2013",
  82325. mdash: "\u2014",
  82326. lsquo: "\u2018",
  82327. rsquo: "\u2019",
  82328. sbquo: "\u201A",
  82329. ldquo: "\u201C",
  82330. rdquo: "\u201D",
  82331. bdquo: "\u201E",
  82332. dagger: "\u2020",
  82333. Dagger: "\u2021",
  82334. bull: "\u2022",
  82335. hellip: "\u2026",
  82336. permil: "\u2030",
  82337. prime: "\u2032",
  82338. Prime: "\u2033",
  82339. lsaquo: "\u2039",
  82340. rsaquo: "\u203A",
  82341. oline: "\u203E",
  82342. frasl: "\u2044",
  82343. euro: "\u20AC",
  82344. image: "\u2111",
  82345. weierp: "\u2118",
  82346. real: "\u211C",
  82347. trade: "\u2122",
  82348. alefsym: "\u2135",
  82349. larr: "\u2190",
  82350. uarr: "\u2191",
  82351. rarr: "\u2192",
  82352. darr: "\u2193",
  82353. harr: "\u2194",
  82354. crarr: "\u21B5",
  82355. lArr: "\u21D0",
  82356. uArr: "\u21D1",
  82357. rArr: "\u21D2",
  82358. dArr: "\u21D3",
  82359. hArr: "\u21D4",
  82360. forall: "\u2200",
  82361. part: "\u2202",
  82362. exist: "\u2203",
  82363. empty: "\u2205",
  82364. nabla: "\u2207",
  82365. isin: "\u2208",
  82366. notin: "\u2209",
  82367. ni: "\u220B",
  82368. prod: "\u220F",
  82369. sum: "\u2211",
  82370. minus: "\u2212",
  82371. lowast: "\u2217",
  82372. radic: "\u221A",
  82373. prop: "\u221D",
  82374. infin: "\u221E",
  82375. ang: "\u2220",
  82376. and: "\u2227",
  82377. or: "\u2228",
  82378. cap: "\u2229",
  82379. cup: "\u222A",
  82380. int: "\u222B",
  82381. there4: "\u2234",
  82382. sim: "\u223C",
  82383. cong: "\u2245",
  82384. asymp: "\u2248",
  82385. ne: "\u2260",
  82386. equiv: "\u2261",
  82387. le: "\u2264",
  82388. ge: "\u2265",
  82389. sub: "\u2282",
  82390. sup: "\u2283",
  82391. nsub: "\u2284",
  82392. sube: "\u2286",
  82393. supe: "\u2287",
  82394. oplus: "\u2295",
  82395. otimes: "\u2297",
  82396. perp: "\u22A5",
  82397. sdot: "\u22C5",
  82398. lceil: "\u2308",
  82399. rceil: "\u2309",
  82400. lfloor: "\u230A",
  82401. rfloor: "\u230B",
  82402. lang: "\u2329",
  82403. rang: "\u232A",
  82404. loz: "\u25CA",
  82405. spades: "\u2660",
  82406. clubs: "\u2663",
  82407. hearts: "\u2665",
  82408. diams: "\u2666"
  82409. };
  82410. var State2 = class {
  82411. constructor() {
  82412. this.strict = void 0;
  82413. this.curLine = void 0;
  82414. this.startLoc = void 0;
  82415. this.endLoc = void 0;
  82416. this.errors = [];
  82417. this.potentialArrowAt = -1;
  82418. this.noArrowAt = [];
  82419. this.noArrowParamsConversionAt = [];
  82420. this.maybeInArrowParameters = false;
  82421. this.inPipeline = false;
  82422. this.inType = false;
  82423. this.noAnonFunctionType = false;
  82424. this.inPropertyName = false;
  82425. this.hasFlowComment = false;
  82426. this.isAmbientContext = false;
  82427. this.inAbstractClass = false;
  82428. this.topicContext = {
  82429. maxNumOfResolvableTopics: 0,
  82430. maxTopicIndex: null
  82431. };
  82432. this.soloAwait = false;
  82433. this.inFSharpPipelineDirectBody = false;
  82434. this.labels = [];
  82435. this.decoratorStack = [[]];
  82436. this.comments = [];
  82437. this.commentStack = [];
  82438. this.pos = 0;
  82439. this.lineStart = 0;
  82440. this.type = types$12.eof;
  82441. this.value = null;
  82442. this.start = 0;
  82443. this.end = 0;
  82444. this.lastTokEndLoc = null;
  82445. this.lastTokStartLoc = null;
  82446. this.lastTokStart = 0;
  82447. this.lastTokEnd = 0;
  82448. this.context = [types2.brace];
  82449. this.exprAllowed = true;
  82450. this.containsEsc = false;
  82451. this.strictErrors = /* @__PURE__ */ new Map();
  82452. this.tokensLength = 0;
  82453. }
  82454. init(options) {
  82455. this.strict = options.strictMode === false ? false : options.strictMode === true ? true : options.sourceType === "module";
  82456. this.curLine = options.startLine;
  82457. this.startLoc = this.endLoc = this.curPosition();
  82458. }
  82459. curPosition() {
  82460. return new Position3(this.curLine, this.pos - this.lineStart);
  82461. }
  82462. clone(skipArrays) {
  82463. const state = new State2();
  82464. const keys2 = Object.keys(this);
  82465. for (let i = 0, length = keys2.length; i < length; i++) {
  82466. const key = keys2[i];
  82467. let val = this[key];
  82468. if (!skipArrays && Array.isArray(val)) {
  82469. val = val.slice();
  82470. }
  82471. state[key] = val;
  82472. }
  82473. return state;
  82474. }
  82475. };
  82476. var HEX_NUMBER = /^[\da-fA-F]+$/;
  82477. var DECIMAL_NUMBER = /^\d+$/;
  82478. var JsxErrors = makeErrorTemplates({
  82479. AttributeIsEmpty: "JSX attributes must only be assigned a non-empty expression.",
  82480. MissingClosingTagElement: "Expected corresponding JSX closing tag for <%0>.",
  82481. MissingClosingTagFragment: "Expected corresponding JSX closing tag for <>.",
  82482. UnexpectedSequenceExpression: "Sequence expressions cannot be directly nested inside JSX. Did you mean to wrap it in parentheses (...)?",
  82483. UnsupportedJsxValue: "JSX value should be either an expression or a quoted JSX text.",
  82484. UnterminatedJsxContent: "Unterminated JSX contents.",
  82485. UnwrappedAdjacentJSXElements: "Adjacent JSX elements must be wrapped in an enclosing tag. Did you want a JSX fragment <>...</>?"
  82486. }, ErrorCodes.SyntaxError);
  82487. types2.j_oTag = new TokContext3("<tag");
  82488. types2.j_cTag = new TokContext3("</tag");
  82489. types2.j_expr = new TokContext3("<tag>...</tag>", true);
  82490. types$12.jsxName = new TokenType3("jsxName");
  82491. types$12.jsxText = new TokenType3("jsxText", {
  82492. beforeExpr: true
  82493. });
  82494. types$12.jsxTagStart = new TokenType3("jsxTagStart", {
  82495. startsExpr: true
  82496. });
  82497. types$12.jsxTagEnd = new TokenType3("jsxTagEnd");
  82498. types$12.jsxTagStart.updateContext = (context) => {
  82499. context.push(types2.j_expr, types2.j_oTag);
  82500. };
  82501. function isFragment(object) {
  82502. return object ? object.type === "JSXOpeningFragment" || object.type === "JSXClosingFragment" : false;
  82503. }
  82504. function getQualifiedJSXName(object) {
  82505. if (object.type === "JSXIdentifier") {
  82506. return object.name;
  82507. }
  82508. if (object.type === "JSXNamespacedName") {
  82509. return object.namespace.name + ":" + object.name.name;
  82510. }
  82511. if (object.type === "JSXMemberExpression") {
  82512. return getQualifiedJSXName(object.object) + "." + getQualifiedJSXName(object.property);
  82513. }
  82514. throw new Error("Node had unexpected type: " + object.type);
  82515. }
  82516. var jsx = (superClass) => class extends superClass {
  82517. jsxReadToken() {
  82518. let out = "";
  82519. let chunkStart = this.state.pos;
  82520. for (; ; ) {
  82521. if (this.state.pos >= this.length) {
  82522. throw this.raise(this.state.start, JsxErrors.UnterminatedJsxContent);
  82523. }
  82524. const ch = this.input.charCodeAt(this.state.pos);
  82525. switch (ch) {
  82526. case 60:
  82527. case 123:
  82528. if (this.state.pos === this.state.start) {
  82529. if (ch === 60 && this.state.exprAllowed) {
  82530. ++this.state.pos;
  82531. return this.finishToken(types$12.jsxTagStart);
  82532. }
  82533. return super.getTokenFromCode(ch);
  82534. }
  82535. out += this.input.slice(chunkStart, this.state.pos);
  82536. return this.finishToken(types$12.jsxText, out);
  82537. case 38:
  82538. out += this.input.slice(chunkStart, this.state.pos);
  82539. out += this.jsxReadEntity();
  82540. chunkStart = this.state.pos;
  82541. break;
  82542. case 62:
  82543. case 125:
  82544. default:
  82545. if (isNewLine2(ch)) {
  82546. out += this.input.slice(chunkStart, this.state.pos);
  82547. out += this.jsxReadNewLine(true);
  82548. chunkStart = this.state.pos;
  82549. } else {
  82550. ++this.state.pos;
  82551. }
  82552. }
  82553. }
  82554. }
  82555. jsxReadNewLine(normalizeCRLF) {
  82556. const ch = this.input.charCodeAt(this.state.pos);
  82557. let out;
  82558. ++this.state.pos;
  82559. if (ch === 13 && this.input.charCodeAt(this.state.pos) === 10) {
  82560. ++this.state.pos;
  82561. out = normalizeCRLF ? "\n" : "\r\n";
  82562. } else {
  82563. out = String.fromCharCode(ch);
  82564. }
  82565. ++this.state.curLine;
  82566. this.state.lineStart = this.state.pos;
  82567. return out;
  82568. }
  82569. jsxReadString(quote) {
  82570. let out = "";
  82571. let chunkStart = ++this.state.pos;
  82572. for (; ; ) {
  82573. if (this.state.pos >= this.length) {
  82574. throw this.raise(this.state.start, ErrorMessages.UnterminatedString);
  82575. }
  82576. const ch = this.input.charCodeAt(this.state.pos);
  82577. if (ch === quote)
  82578. break;
  82579. if (ch === 38) {
  82580. out += this.input.slice(chunkStart, this.state.pos);
  82581. out += this.jsxReadEntity();
  82582. chunkStart = this.state.pos;
  82583. } else if (isNewLine2(ch)) {
  82584. out += this.input.slice(chunkStart, this.state.pos);
  82585. out += this.jsxReadNewLine(false);
  82586. chunkStart = this.state.pos;
  82587. } else {
  82588. ++this.state.pos;
  82589. }
  82590. }
  82591. out += this.input.slice(chunkStart, this.state.pos++);
  82592. return this.finishToken(types$12.string, out);
  82593. }
  82594. jsxReadEntity() {
  82595. let str = "";
  82596. let count = 0;
  82597. let entity;
  82598. let ch = this.input[this.state.pos];
  82599. const startPos = ++this.state.pos;
  82600. while (this.state.pos < this.length && count++ < 10) {
  82601. ch = this.input[this.state.pos++];
  82602. if (ch === ";") {
  82603. if (str[0] === "#") {
  82604. if (str[1] === "x") {
  82605. str = str.substr(2);
  82606. if (HEX_NUMBER.test(str)) {
  82607. entity = String.fromCodePoint(parseInt(str, 16));
  82608. }
  82609. } else {
  82610. str = str.substr(1);
  82611. if (DECIMAL_NUMBER.test(str)) {
  82612. entity = String.fromCodePoint(parseInt(str, 10));
  82613. }
  82614. }
  82615. } else {
  82616. entity = entities[str];
  82617. }
  82618. break;
  82619. }
  82620. str += ch;
  82621. }
  82622. if (!entity) {
  82623. this.state.pos = startPos;
  82624. return "&";
  82625. }
  82626. return entity;
  82627. }
  82628. jsxReadWord() {
  82629. let ch;
  82630. const start3 = this.state.pos;
  82631. do {
  82632. ch = this.input.charCodeAt(++this.state.pos);
  82633. } while (isIdentifierChar2(ch) || ch === 45);
  82634. return this.finishToken(types$12.jsxName, this.input.slice(start3, this.state.pos));
  82635. }
  82636. jsxParseIdentifier() {
  82637. const node = this.startNode();
  82638. if (this.match(types$12.jsxName)) {
  82639. node.name = this.state.value;
  82640. } else if (this.state.type.keyword) {
  82641. node.name = this.state.type.keyword;
  82642. } else {
  82643. this.unexpected();
  82644. }
  82645. this.next();
  82646. return this.finishNode(node, "JSXIdentifier");
  82647. }
  82648. jsxParseNamespacedName() {
  82649. const startPos = this.state.start;
  82650. const startLoc = this.state.startLoc;
  82651. const name2 = this.jsxParseIdentifier();
  82652. if (!this.eat(types$12.colon))
  82653. return name2;
  82654. const node = this.startNodeAt(startPos, startLoc);
  82655. node.namespace = name2;
  82656. node.name = this.jsxParseIdentifier();
  82657. return this.finishNode(node, "JSXNamespacedName");
  82658. }
  82659. jsxParseElementName() {
  82660. const startPos = this.state.start;
  82661. const startLoc = this.state.startLoc;
  82662. let node = this.jsxParseNamespacedName();
  82663. if (node.type === "JSXNamespacedName") {
  82664. return node;
  82665. }
  82666. while (this.eat(types$12.dot)) {
  82667. const newNode = this.startNodeAt(startPos, startLoc);
  82668. newNode.object = node;
  82669. newNode.property = this.jsxParseIdentifier();
  82670. node = this.finishNode(newNode, "JSXMemberExpression");
  82671. }
  82672. return node;
  82673. }
  82674. jsxParseAttributeValue() {
  82675. let node;
  82676. switch (this.state.type) {
  82677. case types$12.braceL:
  82678. node = this.startNode();
  82679. this.next();
  82680. node = this.jsxParseExpressionContainer(node);
  82681. if (node.expression.type === "JSXEmptyExpression") {
  82682. this.raise(node.start, JsxErrors.AttributeIsEmpty);
  82683. }
  82684. return node;
  82685. case types$12.jsxTagStart:
  82686. case types$12.string:
  82687. return this.parseExprAtom();
  82688. default:
  82689. throw this.raise(this.state.start, JsxErrors.UnsupportedJsxValue);
  82690. }
  82691. }
  82692. jsxParseEmptyExpression() {
  82693. const node = this.startNodeAt(this.state.lastTokEnd, this.state.lastTokEndLoc);
  82694. return this.finishNodeAt(node, "JSXEmptyExpression", this.state.start, this.state.startLoc);
  82695. }
  82696. jsxParseSpreadChild(node) {
  82697. this.next();
  82698. node.expression = this.parseExpression();
  82699. this.expect(types$12.braceR);
  82700. return this.finishNode(node, "JSXSpreadChild");
  82701. }
  82702. jsxParseExpressionContainer(node) {
  82703. if (this.match(types$12.braceR)) {
  82704. node.expression = this.jsxParseEmptyExpression();
  82705. } else {
  82706. const expression = this.parseExpression();
  82707. node.expression = expression;
  82708. }
  82709. this.expect(types$12.braceR);
  82710. return this.finishNode(node, "JSXExpressionContainer");
  82711. }
  82712. jsxParseAttribute() {
  82713. const node = this.startNode();
  82714. if (this.eat(types$12.braceL)) {
  82715. this.expect(types$12.ellipsis);
  82716. node.argument = this.parseMaybeAssignAllowIn();
  82717. this.expect(types$12.braceR);
  82718. return this.finishNode(node, "JSXSpreadAttribute");
  82719. }
  82720. node.name = this.jsxParseNamespacedName();
  82721. node.value = this.eat(types$12.eq) ? this.jsxParseAttributeValue() : null;
  82722. return this.finishNode(node, "JSXAttribute");
  82723. }
  82724. jsxParseOpeningElementAt(startPos, startLoc) {
  82725. const node = this.startNodeAt(startPos, startLoc);
  82726. if (this.match(types$12.jsxTagEnd)) {
  82727. this.expect(types$12.jsxTagEnd);
  82728. return this.finishNode(node, "JSXOpeningFragment");
  82729. }
  82730. node.name = this.jsxParseElementName();
  82731. return this.jsxParseOpeningElementAfterName(node);
  82732. }
  82733. jsxParseOpeningElementAfterName(node) {
  82734. const attributes = [];
  82735. while (!this.match(types$12.slash) && !this.match(types$12.jsxTagEnd)) {
  82736. attributes.push(this.jsxParseAttribute());
  82737. }
  82738. node.attributes = attributes;
  82739. node.selfClosing = this.eat(types$12.slash);
  82740. this.expect(types$12.jsxTagEnd);
  82741. return this.finishNode(node, "JSXOpeningElement");
  82742. }
  82743. jsxParseClosingElementAt(startPos, startLoc) {
  82744. const node = this.startNodeAt(startPos, startLoc);
  82745. if (this.match(types$12.jsxTagEnd)) {
  82746. this.expect(types$12.jsxTagEnd);
  82747. return this.finishNode(node, "JSXClosingFragment");
  82748. }
  82749. node.name = this.jsxParseElementName();
  82750. this.expect(types$12.jsxTagEnd);
  82751. return this.finishNode(node, "JSXClosingElement");
  82752. }
  82753. jsxParseElementAt(startPos, startLoc) {
  82754. const node = this.startNodeAt(startPos, startLoc);
  82755. const children = [];
  82756. const openingElement = this.jsxParseOpeningElementAt(startPos, startLoc);
  82757. let closingElement = null;
  82758. if (!openingElement.selfClosing) {
  82759. contents:
  82760. for (; ; ) {
  82761. switch (this.state.type) {
  82762. case types$12.jsxTagStart:
  82763. startPos = this.state.start;
  82764. startLoc = this.state.startLoc;
  82765. this.next();
  82766. if (this.eat(types$12.slash)) {
  82767. closingElement = this.jsxParseClosingElementAt(startPos, startLoc);
  82768. break contents;
  82769. }
  82770. children.push(this.jsxParseElementAt(startPos, startLoc));
  82771. break;
  82772. case types$12.jsxText:
  82773. children.push(this.parseExprAtom());
  82774. break;
  82775. case types$12.braceL: {
  82776. const node2 = this.startNode();
  82777. this.next();
  82778. if (this.match(types$12.ellipsis)) {
  82779. children.push(this.jsxParseSpreadChild(node2));
  82780. } else {
  82781. children.push(this.jsxParseExpressionContainer(node2));
  82782. }
  82783. break;
  82784. }
  82785. default:
  82786. throw this.unexpected();
  82787. }
  82788. }
  82789. if (isFragment(openingElement) && !isFragment(closingElement)) {
  82790. this.raise(closingElement.start, JsxErrors.MissingClosingTagFragment);
  82791. } else if (!isFragment(openingElement) && isFragment(closingElement)) {
  82792. this.raise(closingElement.start, JsxErrors.MissingClosingTagElement, getQualifiedJSXName(openingElement.name));
  82793. } else if (!isFragment(openingElement) && !isFragment(closingElement)) {
  82794. if (getQualifiedJSXName(closingElement.name) !== getQualifiedJSXName(openingElement.name)) {
  82795. this.raise(closingElement.start, JsxErrors.MissingClosingTagElement, getQualifiedJSXName(openingElement.name));
  82796. }
  82797. }
  82798. }
  82799. if (isFragment(openingElement)) {
  82800. node.openingFragment = openingElement;
  82801. node.closingFragment = closingElement;
  82802. } else {
  82803. node.openingElement = openingElement;
  82804. node.closingElement = closingElement;
  82805. }
  82806. node.children = children;
  82807. if (this.isRelational("<")) {
  82808. throw this.raise(this.state.start, JsxErrors.UnwrappedAdjacentJSXElements);
  82809. }
  82810. return isFragment(openingElement) ? this.finishNode(node, "JSXFragment") : this.finishNode(node, "JSXElement");
  82811. }
  82812. jsxParseElement() {
  82813. const startPos = this.state.start;
  82814. const startLoc = this.state.startLoc;
  82815. this.next();
  82816. return this.jsxParseElementAt(startPos, startLoc);
  82817. }
  82818. parseExprAtom(refExpressionErrors) {
  82819. if (this.match(types$12.jsxText)) {
  82820. return this.parseLiteral(this.state.value, "JSXText");
  82821. } else if (this.match(types$12.jsxTagStart)) {
  82822. return this.jsxParseElement();
  82823. } else if (this.isRelational("<") && this.input.charCodeAt(this.state.pos) !== 33) {
  82824. this.finishToken(types$12.jsxTagStart);
  82825. return this.jsxParseElement();
  82826. } else {
  82827. return super.parseExprAtom(refExpressionErrors);
  82828. }
  82829. }
  82830. createLookaheadState(state) {
  82831. const lookaheadState = super.createLookaheadState(state);
  82832. lookaheadState.inPropertyName = state.inPropertyName;
  82833. return lookaheadState;
  82834. }
  82835. getTokenFromCode(code2) {
  82836. if (this.state.inPropertyName)
  82837. return super.getTokenFromCode(code2);
  82838. const context = this.curContext();
  82839. if (context === types2.j_expr) {
  82840. return this.jsxReadToken();
  82841. }
  82842. if (context === types2.j_oTag || context === types2.j_cTag) {
  82843. if (isIdentifierStart2(code2)) {
  82844. return this.jsxReadWord();
  82845. }
  82846. if (code2 === 62) {
  82847. ++this.state.pos;
  82848. return this.finishToken(types$12.jsxTagEnd);
  82849. }
  82850. if ((code2 === 34 || code2 === 39) && context === types2.j_oTag) {
  82851. return this.jsxReadString(code2);
  82852. }
  82853. }
  82854. if (code2 === 60 && this.state.exprAllowed && this.input.charCodeAt(this.state.pos + 1) !== 33) {
  82855. ++this.state.pos;
  82856. return this.finishToken(types$12.jsxTagStart);
  82857. }
  82858. return super.getTokenFromCode(code2);
  82859. }
  82860. updateContext(prevType) {
  82861. super.updateContext(prevType);
  82862. const {
  82863. context,
  82864. type
  82865. } = this.state;
  82866. if (type === types$12.slash && prevType === types$12.jsxTagStart) {
  82867. context.splice(-2, 2, types2.j_cTag);
  82868. this.state.exprAllowed = false;
  82869. } else if (type === types$12.jsxTagEnd) {
  82870. const out = context.pop();
  82871. if (out === types2.j_oTag && prevType === types$12.slash || out === types2.j_cTag) {
  82872. context.pop();
  82873. this.state.exprAllowed = context[context.length - 1] === types2.j_expr;
  82874. } else {
  82875. this.state.exprAllowed = true;
  82876. }
  82877. } else if (type.keyword && (prevType === types$12.dot || prevType === types$12.questionDot)) {
  82878. this.state.exprAllowed = false;
  82879. } else {
  82880. this.state.exprAllowed = type.beforeExpr;
  82881. }
  82882. }
  82883. };
  82884. var TypeScriptScope = class extends Scope4 {
  82885. constructor(...args) {
  82886. super(...args);
  82887. this.types = /* @__PURE__ */ new Set();
  82888. this.enums = /* @__PURE__ */ new Set();
  82889. this.constEnums = /* @__PURE__ */ new Set();
  82890. this.classes = /* @__PURE__ */ new Set();
  82891. this.exportOnlyBindings = /* @__PURE__ */ new Set();
  82892. }
  82893. };
  82894. var TypeScriptScopeHandler = class extends ScopeHandler {
  82895. createScope(flags) {
  82896. return new TypeScriptScope(flags);
  82897. }
  82898. declareName(name2, bindingType, pos) {
  82899. const scope = this.currentScope();
  82900. if (bindingType & BIND_FLAGS_TS_EXPORT_ONLY) {
  82901. this.maybeExportDefined(scope, name2);
  82902. scope.exportOnlyBindings.add(name2);
  82903. return;
  82904. }
  82905. super.declareName(...arguments);
  82906. if (bindingType & BIND_KIND_TYPE) {
  82907. if (!(bindingType & BIND_KIND_VALUE)) {
  82908. this.checkRedeclarationInScope(scope, name2, bindingType, pos);
  82909. this.maybeExportDefined(scope, name2);
  82910. }
  82911. scope.types.add(name2);
  82912. }
  82913. if (bindingType & BIND_FLAGS_TS_ENUM)
  82914. scope.enums.add(name2);
  82915. if (bindingType & BIND_FLAGS_TS_CONST_ENUM)
  82916. scope.constEnums.add(name2);
  82917. if (bindingType & BIND_FLAGS_CLASS)
  82918. scope.classes.add(name2);
  82919. }
  82920. isRedeclaredInScope(scope, name2, bindingType) {
  82921. if (scope.enums.has(name2)) {
  82922. if (bindingType & BIND_FLAGS_TS_ENUM) {
  82923. const isConst = !!(bindingType & BIND_FLAGS_TS_CONST_ENUM);
  82924. const wasConst = scope.constEnums.has(name2);
  82925. return isConst !== wasConst;
  82926. }
  82927. return true;
  82928. }
  82929. if (bindingType & BIND_FLAGS_CLASS && scope.classes.has(name2)) {
  82930. if (scope.lexical.has(name2)) {
  82931. return !!(bindingType & BIND_KIND_VALUE);
  82932. } else {
  82933. return false;
  82934. }
  82935. }
  82936. if (bindingType & BIND_KIND_TYPE && scope.types.has(name2)) {
  82937. return true;
  82938. }
  82939. return super.isRedeclaredInScope(...arguments);
  82940. }
  82941. checkLocalExport(id) {
  82942. const topLevelScope = this.scopeStack[0];
  82943. const {
  82944. name: name2
  82945. } = id;
  82946. if (!topLevelScope.types.has(name2) && !topLevelScope.exportOnlyBindings.has(name2)) {
  82947. super.checkLocalExport(id);
  82948. }
  82949. }
  82950. };
  82951. var PARAM = 0;
  82952. var PARAM_YIELD = 1;
  82953. var PARAM_AWAIT = 2;
  82954. var PARAM_RETURN = 4;
  82955. var PARAM_IN = 8;
  82956. var ProductionParameterHandler = class {
  82957. constructor() {
  82958. this.stacks = [];
  82959. }
  82960. enter(flags) {
  82961. this.stacks.push(flags);
  82962. }
  82963. exit() {
  82964. this.stacks.pop();
  82965. }
  82966. currentFlags() {
  82967. return this.stacks[this.stacks.length - 1];
  82968. }
  82969. get hasAwait() {
  82970. return (this.currentFlags() & PARAM_AWAIT) > 0;
  82971. }
  82972. get hasYield() {
  82973. return (this.currentFlags() & PARAM_YIELD) > 0;
  82974. }
  82975. get hasReturn() {
  82976. return (this.currentFlags() & PARAM_RETURN) > 0;
  82977. }
  82978. get hasIn() {
  82979. return (this.currentFlags() & PARAM_IN) > 0;
  82980. }
  82981. };
  82982. function functionFlags2(isAsync, isGenerator) {
  82983. return (isAsync ? PARAM_AWAIT : 0) | (isGenerator ? PARAM_YIELD : 0);
  82984. }
  82985. function nonNull(x) {
  82986. if (x == null) {
  82987. throw new Error(`Unexpected ${x} value.`);
  82988. }
  82989. return x;
  82990. }
  82991. function assert(x) {
  82992. if (!x) {
  82993. throw new Error("Assert fail");
  82994. }
  82995. }
  82996. var TSErrors = makeErrorTemplates({
  82997. AbstractMethodHasImplementation: "Method '%0' cannot have an implementation because it is marked abstract.",
  82998. AccesorCannotDeclareThisParameter: "'get' and 'set' accessors cannot declare 'this' parameters.",
  82999. AccesorCannotHaveTypeParameters: "An accessor cannot have type parameters.",
  83000. ClassMethodHasDeclare: "Class methods cannot have the 'declare' modifier.",
  83001. ClassMethodHasReadonly: "Class methods cannot have the 'readonly' modifier.",
  83002. ConstructorHasTypeParameters: "Type parameters cannot appear on a constructor declaration.",
  83003. DeclareAccessor: "'declare' is not allowed in %0ters.",
  83004. DeclareClassFieldHasInitializer: "Initializers are not allowed in ambient contexts.",
  83005. DeclareFunctionHasImplementation: "An implementation cannot be declared in ambient contexts.",
  83006. DuplicateAccessibilityModifier: "Accessibility modifier already seen.",
  83007. DuplicateModifier: "Duplicate modifier: '%0'.",
  83008. EmptyHeritageClauseType: "'%0' list cannot be empty.",
  83009. EmptyTypeArguments: "Type argument list cannot be empty.",
  83010. EmptyTypeParameters: "Type parameter list cannot be empty.",
  83011. ExpectedAmbientAfterExportDeclare: "'export declare' must be followed by an ambient declaration.",
  83012. ImportAliasHasImportType: "An import alias can not use 'import type'.",
  83013. IncompatibleModifiers: "'%0' modifier cannot be used with '%1' modifier.",
  83014. IndexSignatureHasAbstract: "Index signatures cannot have the 'abstract' modifier.",
  83015. IndexSignatureHasAccessibility: "Index signatures cannot have an accessibility modifier ('%0').",
  83016. IndexSignatureHasDeclare: "Index signatures cannot have the 'declare' modifier.",
  83017. IndexSignatureHasOverride: "'override' modifier cannot appear on an index signature.",
  83018. IndexSignatureHasStatic: "Index signatures cannot have the 'static' modifier.",
  83019. InvalidModifierOnTypeMember: "'%0' modifier cannot appear on a type member.",
  83020. InvalidModifiersOrder: "'%0' modifier must precede '%1' modifier.",
  83021. InvalidTupleMemberLabel: "Tuple members must be labeled with a simple identifier.",
  83022. MixedLabeledAndUnlabeledElements: "Tuple members must all have names or all not have names.",
  83023. NonAbstractClassHasAbstractMethod: "Abstract methods can only appear within an abstract class.",
  83024. NonClassMethodPropertyHasAbstractModifer: "'abstract' modifier can only appear on a class, method, or property declaration.",
  83025. OptionalTypeBeforeRequired: "A required element cannot follow an optional element.",
  83026. OverrideNotInSubClass: "This member cannot have an 'override' modifier because its containing class does not extend another class.",
  83027. PatternIsOptional: "A binding pattern parameter cannot be optional in an implementation signature.",
  83028. PrivateElementHasAbstract: "Private elements cannot have the 'abstract' modifier.",
  83029. PrivateElementHasAccessibility: "Private elements cannot have an accessibility modifier ('%0').",
  83030. ReadonlyForMethodSignature: "'readonly' modifier can only appear on a property declaration or index signature.",
  83031. SetAccesorCannotHaveOptionalParameter: "A 'set' accessor cannot have an optional parameter.",
  83032. SetAccesorCannotHaveRestParameter: "A 'set' accessor cannot have rest parameter.",
  83033. SetAccesorCannotHaveReturnType: "A 'set' accessor cannot have a return type annotation.",
  83034. StaticBlockCannotHaveModifier: "Static class blocks cannot have any modifier.",
  83035. TypeAnnotationAfterAssign: "Type annotations must come before default assignments, e.g. instead of `age = 25: number` use `age: number = 25`.",
  83036. TypeImportCannotSpecifyDefaultAndNamed: "A type-only import can specify a default import or named bindings, but not both.",
  83037. UnexpectedParameterModifier: "A parameter property is only allowed in a constructor implementation.",
  83038. UnexpectedReadonly: "'readonly' type modifier is only permitted on array and tuple literal types.",
  83039. UnexpectedTypeAnnotation: "Did not expect a type annotation here.",
  83040. UnexpectedTypeCastInParameter: "Unexpected type cast in parameter position.",
  83041. UnsupportedImportTypeArgument: "Argument in a type import must be a string literal.",
  83042. UnsupportedParameterPropertyKind: "A parameter property may not be declared using a binding pattern.",
  83043. UnsupportedSignatureParameterKind: "Name in a signature must be an Identifier, ObjectPattern or ArrayPattern, instead got %0."
  83044. }, ErrorCodes.SyntaxError);
  83045. function keywordTypeFromName(value) {
  83046. switch (value) {
  83047. case "any":
  83048. return "TSAnyKeyword";
  83049. case "boolean":
  83050. return "TSBooleanKeyword";
  83051. case "bigint":
  83052. return "TSBigIntKeyword";
  83053. case "never":
  83054. return "TSNeverKeyword";
  83055. case "number":
  83056. return "TSNumberKeyword";
  83057. case "object":
  83058. return "TSObjectKeyword";
  83059. case "string":
  83060. return "TSStringKeyword";
  83061. case "symbol":
  83062. return "TSSymbolKeyword";
  83063. case "undefined":
  83064. return "TSUndefinedKeyword";
  83065. case "unknown":
  83066. return "TSUnknownKeyword";
  83067. default:
  83068. return void 0;
  83069. }
  83070. }
  83071. function tsIsAccessModifier(modifier) {
  83072. return modifier === "private" || modifier === "public" || modifier === "protected";
  83073. }
  83074. var typescript = (superClass) => class extends superClass {
  83075. getScopeHandler() {
  83076. return TypeScriptScopeHandler;
  83077. }
  83078. tsIsIdentifier() {
  83079. return this.match(types$12.name);
  83080. }
  83081. tsTokenCanFollowModifier() {
  83082. return (this.match(types$12.bracketL) || this.match(types$12.braceL) || this.match(types$12.star) || this.match(types$12.ellipsis) || this.match(types$12.privateName) || this.isLiteralPropertyName()) && !this.hasPrecedingLineBreak();
  83083. }
  83084. tsNextTokenCanFollowModifier() {
  83085. this.next();
  83086. return this.tsTokenCanFollowModifier();
  83087. }
  83088. tsParseModifier(allowedModifiers) {
  83089. if (!this.match(types$12.name)) {
  83090. return void 0;
  83091. }
  83092. const modifier = this.state.value;
  83093. if (allowedModifiers.indexOf(modifier) !== -1 && this.tsTryParse(this.tsNextTokenCanFollowModifier.bind(this))) {
  83094. return modifier;
  83095. }
  83096. return void 0;
  83097. }
  83098. tsParseModifiers(modified, allowedModifiers, disallowedModifiers, errorTemplate) {
  83099. const enforceOrder = (pos, modifier, before, after) => {
  83100. if (modifier === before && modified[after]) {
  83101. this.raise(pos, TSErrors.InvalidModifiersOrder, before, after);
  83102. }
  83103. };
  83104. const incompatible = (pos, modifier, mod1, mod2) => {
  83105. if (modified[mod1] && modifier === mod2 || modified[mod2] && modifier === mod1) {
  83106. this.raise(pos, TSErrors.IncompatibleModifiers, mod1, mod2);
  83107. }
  83108. };
  83109. for (; ; ) {
  83110. const startPos = this.state.start;
  83111. const modifier = this.tsParseModifier(allowedModifiers.concat(disallowedModifiers != null ? disallowedModifiers : []));
  83112. if (!modifier)
  83113. break;
  83114. if (tsIsAccessModifier(modifier)) {
  83115. if (modified.accessibility) {
  83116. this.raise(startPos, TSErrors.DuplicateAccessibilityModifier);
  83117. } else {
  83118. enforceOrder(startPos, modifier, modifier, "override");
  83119. enforceOrder(startPos, modifier, modifier, "static");
  83120. enforceOrder(startPos, modifier, modifier, "readonly");
  83121. modified.accessibility = modifier;
  83122. }
  83123. } else {
  83124. if (Object.hasOwnProperty.call(modified, modifier)) {
  83125. this.raise(startPos, TSErrors.DuplicateModifier, modifier);
  83126. } else {
  83127. enforceOrder(startPos, modifier, "static", "readonly");
  83128. enforceOrder(startPos, modifier, "static", "override");
  83129. enforceOrder(startPos, modifier, "override", "readonly");
  83130. enforceOrder(startPos, modifier, "abstract", "override");
  83131. incompatible(startPos, modifier, "declare", "override");
  83132. incompatible(startPos, modifier, "static", "abstract");
  83133. }
  83134. modified[modifier] = true;
  83135. }
  83136. if (disallowedModifiers != null && disallowedModifiers.includes(modifier)) {
  83137. this.raise(startPos, errorTemplate, modifier);
  83138. }
  83139. }
  83140. }
  83141. tsIsListTerminator(kind) {
  83142. switch (kind) {
  83143. case "EnumMembers":
  83144. case "TypeMembers":
  83145. return this.match(types$12.braceR);
  83146. case "HeritageClauseElement":
  83147. return this.match(types$12.braceL);
  83148. case "TupleElementTypes":
  83149. return this.match(types$12.bracketR);
  83150. case "TypeParametersOrArguments":
  83151. return this.isRelational(">");
  83152. }
  83153. throw new Error("Unreachable");
  83154. }
  83155. tsParseList(kind, parseElement) {
  83156. const result = [];
  83157. while (!this.tsIsListTerminator(kind)) {
  83158. result.push(parseElement());
  83159. }
  83160. return result;
  83161. }
  83162. tsParseDelimitedList(kind, parseElement) {
  83163. return nonNull(this.tsParseDelimitedListWorker(kind, parseElement, true));
  83164. }
  83165. tsParseDelimitedListWorker(kind, parseElement, expectSuccess) {
  83166. const result = [];
  83167. for (; ; ) {
  83168. if (this.tsIsListTerminator(kind)) {
  83169. break;
  83170. }
  83171. const element2 = parseElement();
  83172. if (element2 == null) {
  83173. return void 0;
  83174. }
  83175. result.push(element2);
  83176. if (this.eat(types$12.comma)) {
  83177. continue;
  83178. }
  83179. if (this.tsIsListTerminator(kind)) {
  83180. break;
  83181. }
  83182. if (expectSuccess) {
  83183. this.expect(types$12.comma);
  83184. }
  83185. return void 0;
  83186. }
  83187. return result;
  83188. }
  83189. tsParseBracketedList(kind, parseElement, bracket, skipFirstToken) {
  83190. if (!skipFirstToken) {
  83191. if (bracket) {
  83192. this.expect(types$12.bracketL);
  83193. } else {
  83194. this.expectRelational("<");
  83195. }
  83196. }
  83197. const result = this.tsParseDelimitedList(kind, parseElement);
  83198. if (bracket) {
  83199. this.expect(types$12.bracketR);
  83200. } else {
  83201. this.expectRelational(">");
  83202. }
  83203. return result;
  83204. }
  83205. tsParseImportType() {
  83206. const node = this.startNode();
  83207. this.expect(types$12._import);
  83208. this.expect(types$12.parenL);
  83209. if (!this.match(types$12.string)) {
  83210. this.raise(this.state.start, TSErrors.UnsupportedImportTypeArgument);
  83211. }
  83212. node.argument = this.parseExprAtom();
  83213. this.expect(types$12.parenR);
  83214. if (this.eat(types$12.dot)) {
  83215. node.qualifier = this.tsParseEntityName(true);
  83216. }
  83217. if (this.isRelational("<")) {
  83218. node.typeParameters = this.tsParseTypeArguments();
  83219. }
  83220. return this.finishNode(node, "TSImportType");
  83221. }
  83222. tsParseEntityName(allowReservedWords) {
  83223. let entity = this.parseIdentifier();
  83224. while (this.eat(types$12.dot)) {
  83225. const node = this.startNodeAtNode(entity);
  83226. node.left = entity;
  83227. node.right = this.parseIdentifier(allowReservedWords);
  83228. entity = this.finishNode(node, "TSQualifiedName");
  83229. }
  83230. return entity;
  83231. }
  83232. tsParseTypeReference() {
  83233. const node = this.startNode();
  83234. node.typeName = this.tsParseEntityName(false);
  83235. if (!this.hasPrecedingLineBreak() && this.isRelational("<")) {
  83236. node.typeParameters = this.tsParseTypeArguments();
  83237. }
  83238. return this.finishNode(node, "TSTypeReference");
  83239. }
  83240. tsParseThisTypePredicate(lhs) {
  83241. this.next();
  83242. const node = this.startNodeAtNode(lhs);
  83243. node.parameterName = lhs;
  83244. node.typeAnnotation = this.tsParseTypeAnnotation(false);
  83245. node.asserts = false;
  83246. return this.finishNode(node, "TSTypePredicate");
  83247. }
  83248. tsParseThisTypeNode() {
  83249. const node = this.startNode();
  83250. this.next();
  83251. return this.finishNode(node, "TSThisType");
  83252. }
  83253. tsParseTypeQuery() {
  83254. const node = this.startNode();
  83255. this.expect(types$12._typeof);
  83256. if (this.match(types$12._import)) {
  83257. node.exprName = this.tsParseImportType();
  83258. } else {
  83259. node.exprName = this.tsParseEntityName(true);
  83260. }
  83261. return this.finishNode(node, "TSTypeQuery");
  83262. }
  83263. tsParseTypeParameter() {
  83264. const node = this.startNode();
  83265. node.name = this.tsParseTypeParameterName();
  83266. node.constraint = this.tsEatThenParseType(types$12._extends);
  83267. node.default = this.tsEatThenParseType(types$12.eq);
  83268. return this.finishNode(node, "TSTypeParameter");
  83269. }
  83270. tsTryParseTypeParameters() {
  83271. if (this.isRelational("<")) {
  83272. return this.tsParseTypeParameters();
  83273. }
  83274. }
  83275. tsParseTypeParameters() {
  83276. const node = this.startNode();
  83277. if (this.isRelational("<") || this.match(types$12.jsxTagStart)) {
  83278. this.next();
  83279. } else {
  83280. this.unexpected();
  83281. }
  83282. node.params = this.tsParseBracketedList("TypeParametersOrArguments", this.tsParseTypeParameter.bind(this), false, true);
  83283. if (node.params.length === 0) {
  83284. this.raise(node.start, TSErrors.EmptyTypeParameters);
  83285. }
  83286. return this.finishNode(node, "TSTypeParameterDeclaration");
  83287. }
  83288. tsTryNextParseConstantContext() {
  83289. if (this.lookahead().type === types$12._const) {
  83290. this.next();
  83291. return this.tsParseTypeReference();
  83292. }
  83293. return null;
  83294. }
  83295. tsFillSignature(returnToken, signature) {
  83296. const returnTokenRequired = returnToken === types$12.arrow;
  83297. signature.typeParameters = this.tsTryParseTypeParameters();
  83298. this.expect(types$12.parenL);
  83299. signature.parameters = this.tsParseBindingListForSignature();
  83300. if (returnTokenRequired) {
  83301. signature.typeAnnotation = this.tsParseTypeOrTypePredicateAnnotation(returnToken);
  83302. } else if (this.match(returnToken)) {
  83303. signature.typeAnnotation = this.tsParseTypeOrTypePredicateAnnotation(returnToken);
  83304. }
  83305. }
  83306. tsParseBindingListForSignature() {
  83307. return this.parseBindingList(types$12.parenR, 41).map((pattern) => {
  83308. if (pattern.type !== "Identifier" && pattern.type !== "RestElement" && pattern.type !== "ObjectPattern" && pattern.type !== "ArrayPattern") {
  83309. this.raise(pattern.start, TSErrors.UnsupportedSignatureParameterKind, pattern.type);
  83310. }
  83311. return pattern;
  83312. });
  83313. }
  83314. tsParseTypeMemberSemicolon() {
  83315. if (!this.eat(types$12.comma) && !this.isLineTerminator()) {
  83316. this.expect(types$12.semi);
  83317. }
  83318. }
  83319. tsParseSignatureMember(kind, node) {
  83320. this.tsFillSignature(types$12.colon, node);
  83321. this.tsParseTypeMemberSemicolon();
  83322. return this.finishNode(node, kind);
  83323. }
  83324. tsIsUnambiguouslyIndexSignature() {
  83325. this.next();
  83326. return this.eat(types$12.name) && this.match(types$12.colon);
  83327. }
  83328. tsTryParseIndexSignature(node) {
  83329. if (!(this.match(types$12.bracketL) && this.tsLookAhead(this.tsIsUnambiguouslyIndexSignature.bind(this)))) {
  83330. return void 0;
  83331. }
  83332. this.expect(types$12.bracketL);
  83333. const id = this.parseIdentifier();
  83334. id.typeAnnotation = this.tsParseTypeAnnotation();
  83335. this.resetEndLocation(id);
  83336. this.expect(types$12.bracketR);
  83337. node.parameters = [id];
  83338. const type = this.tsTryParseTypeAnnotation();
  83339. if (type)
  83340. node.typeAnnotation = type;
  83341. this.tsParseTypeMemberSemicolon();
  83342. return this.finishNode(node, "TSIndexSignature");
  83343. }
  83344. tsParsePropertyOrMethodSignature(node, readonly) {
  83345. if (this.eat(types$12.question))
  83346. node.optional = true;
  83347. const nodeAny = node;
  83348. if (this.match(types$12.parenL) || this.isRelational("<")) {
  83349. if (readonly) {
  83350. this.raise(node.start, TSErrors.ReadonlyForMethodSignature);
  83351. }
  83352. const method = nodeAny;
  83353. if (method.kind && this.isRelational("<")) {
  83354. this.raise(this.state.pos, TSErrors.AccesorCannotHaveTypeParameters);
  83355. }
  83356. this.tsFillSignature(types$12.colon, method);
  83357. this.tsParseTypeMemberSemicolon();
  83358. if (method.kind === "get") {
  83359. if (method.parameters.length > 0) {
  83360. this.raise(this.state.pos, ErrorMessages.BadGetterArity);
  83361. if (this.isThisParam(method.parameters[0])) {
  83362. this.raise(this.state.pos, TSErrors.AccesorCannotDeclareThisParameter);
  83363. }
  83364. }
  83365. } else if (method.kind === "set") {
  83366. if (method.parameters.length !== 1) {
  83367. this.raise(this.state.pos, ErrorMessages.BadSetterArity);
  83368. } else {
  83369. const firstParameter = method.parameters[0];
  83370. if (this.isThisParam(firstParameter)) {
  83371. this.raise(this.state.pos, TSErrors.AccesorCannotDeclareThisParameter);
  83372. }
  83373. if (firstParameter.type === "Identifier" && firstParameter.optional) {
  83374. this.raise(this.state.pos, TSErrors.SetAccesorCannotHaveOptionalParameter);
  83375. }
  83376. if (firstParameter.type === "RestElement") {
  83377. this.raise(this.state.pos, TSErrors.SetAccesorCannotHaveRestParameter);
  83378. }
  83379. }
  83380. if (method.typeAnnotation) {
  83381. this.raise(method.typeAnnotation.start, TSErrors.SetAccesorCannotHaveReturnType);
  83382. }
  83383. } else {
  83384. method.kind = "method";
  83385. }
  83386. return this.finishNode(method, "TSMethodSignature");
  83387. } else {
  83388. const property = nodeAny;
  83389. if (readonly)
  83390. property.readonly = true;
  83391. const type = this.tsTryParseTypeAnnotation();
  83392. if (type)
  83393. property.typeAnnotation = type;
  83394. this.tsParseTypeMemberSemicolon();
  83395. return this.finishNode(property, "TSPropertySignature");
  83396. }
  83397. }
  83398. tsParseTypeMember() {
  83399. const node = this.startNode();
  83400. if (this.match(types$12.parenL) || this.isRelational("<")) {
  83401. return this.tsParseSignatureMember("TSCallSignatureDeclaration", node);
  83402. }
  83403. if (this.match(types$12._new)) {
  83404. const id = this.startNode();
  83405. this.next();
  83406. if (this.match(types$12.parenL) || this.isRelational("<")) {
  83407. return this.tsParseSignatureMember("TSConstructSignatureDeclaration", node);
  83408. } else {
  83409. node.key = this.createIdentifier(id, "new");
  83410. return this.tsParsePropertyOrMethodSignature(node, false);
  83411. }
  83412. }
  83413. this.tsParseModifiers(node, ["readonly"], ["declare", "abstract", "private", "protected", "public", "static", "override"], TSErrors.InvalidModifierOnTypeMember);
  83414. const idx = this.tsTryParseIndexSignature(node);
  83415. if (idx) {
  83416. return idx;
  83417. }
  83418. this.parsePropertyName(node, false);
  83419. if (!node.computed && node.key.type === "Identifier" && (node.key.name === "get" || node.key.name === "set") && this.tsTokenCanFollowModifier()) {
  83420. node.kind = node.key.name;
  83421. this.parsePropertyName(node, false);
  83422. }
  83423. return this.tsParsePropertyOrMethodSignature(node, !!node.readonly);
  83424. }
  83425. tsParseTypeLiteral() {
  83426. const node = this.startNode();
  83427. node.members = this.tsParseObjectTypeMembers();
  83428. return this.finishNode(node, "TSTypeLiteral");
  83429. }
  83430. tsParseObjectTypeMembers() {
  83431. this.expect(types$12.braceL);
  83432. const members = this.tsParseList("TypeMembers", this.tsParseTypeMember.bind(this));
  83433. this.expect(types$12.braceR);
  83434. return members;
  83435. }
  83436. tsIsStartOfMappedType() {
  83437. this.next();
  83438. if (this.eat(types$12.plusMin)) {
  83439. return this.isContextual("readonly");
  83440. }
  83441. if (this.isContextual("readonly")) {
  83442. this.next();
  83443. }
  83444. if (!this.match(types$12.bracketL)) {
  83445. return false;
  83446. }
  83447. this.next();
  83448. if (!this.tsIsIdentifier()) {
  83449. return false;
  83450. }
  83451. this.next();
  83452. return this.match(types$12._in);
  83453. }
  83454. tsParseMappedTypeParameter() {
  83455. const node = this.startNode();
  83456. node.name = this.tsParseTypeParameterName();
  83457. node.constraint = this.tsExpectThenParseType(types$12._in);
  83458. return this.finishNode(node, "TSTypeParameter");
  83459. }
  83460. tsParseMappedType() {
  83461. const node = this.startNode();
  83462. this.expect(types$12.braceL);
  83463. if (this.match(types$12.plusMin)) {
  83464. node.readonly = this.state.value;
  83465. this.next();
  83466. this.expectContextual("readonly");
  83467. } else if (this.eatContextual("readonly")) {
  83468. node.readonly = true;
  83469. }
  83470. this.expect(types$12.bracketL);
  83471. node.typeParameter = this.tsParseMappedTypeParameter();
  83472. node.nameType = this.eatContextual("as") ? this.tsParseType() : null;
  83473. this.expect(types$12.bracketR);
  83474. if (this.match(types$12.plusMin)) {
  83475. node.optional = this.state.value;
  83476. this.next();
  83477. this.expect(types$12.question);
  83478. } else if (this.eat(types$12.question)) {
  83479. node.optional = true;
  83480. }
  83481. node.typeAnnotation = this.tsTryParseType();
  83482. this.semicolon();
  83483. this.expect(types$12.braceR);
  83484. return this.finishNode(node, "TSMappedType");
  83485. }
  83486. tsParseTupleType() {
  83487. const node = this.startNode();
  83488. node.elementTypes = this.tsParseBracketedList("TupleElementTypes", this.tsParseTupleElementType.bind(this), true, false);
  83489. let seenOptionalElement = false;
  83490. let labeledElements = null;
  83491. node.elementTypes.forEach((elementNode) => {
  83492. var _labeledElements;
  83493. let {
  83494. type
  83495. } = elementNode;
  83496. if (seenOptionalElement && type !== "TSRestType" && type !== "TSOptionalType" && !(type === "TSNamedTupleMember" && elementNode.optional)) {
  83497. this.raise(elementNode.start, TSErrors.OptionalTypeBeforeRequired);
  83498. }
  83499. seenOptionalElement = seenOptionalElement || type === "TSNamedTupleMember" && elementNode.optional || type === "TSOptionalType";
  83500. if (type === "TSRestType") {
  83501. elementNode = elementNode.typeAnnotation;
  83502. type = elementNode.type;
  83503. }
  83504. const isLabeled = type === "TSNamedTupleMember";
  83505. labeledElements = (_labeledElements = labeledElements) != null ? _labeledElements : isLabeled;
  83506. if (labeledElements !== isLabeled) {
  83507. this.raise(elementNode.start, TSErrors.MixedLabeledAndUnlabeledElements);
  83508. }
  83509. });
  83510. return this.finishNode(node, "TSTupleType");
  83511. }
  83512. tsParseTupleElementType() {
  83513. const {
  83514. start: startPos,
  83515. startLoc
  83516. } = this.state;
  83517. const rest = this.eat(types$12.ellipsis);
  83518. let type = this.tsParseType();
  83519. const optional = this.eat(types$12.question);
  83520. const labeled = this.eat(types$12.colon);
  83521. if (labeled) {
  83522. const labeledNode = this.startNodeAtNode(type);
  83523. labeledNode.optional = optional;
  83524. if (type.type === "TSTypeReference" && !type.typeParameters && type.typeName.type === "Identifier") {
  83525. labeledNode.label = type.typeName;
  83526. } else {
  83527. this.raise(type.start, TSErrors.InvalidTupleMemberLabel);
  83528. labeledNode.label = type;
  83529. }
  83530. labeledNode.elementType = this.tsParseType();
  83531. type = this.finishNode(labeledNode, "TSNamedTupleMember");
  83532. } else if (optional) {
  83533. const optionalTypeNode = this.startNodeAtNode(type);
  83534. optionalTypeNode.typeAnnotation = type;
  83535. type = this.finishNode(optionalTypeNode, "TSOptionalType");
  83536. }
  83537. if (rest) {
  83538. const restNode = this.startNodeAt(startPos, startLoc);
  83539. restNode.typeAnnotation = type;
  83540. type = this.finishNode(restNode, "TSRestType");
  83541. }
  83542. return type;
  83543. }
  83544. tsParseParenthesizedType() {
  83545. const node = this.startNode();
  83546. this.expect(types$12.parenL);
  83547. node.typeAnnotation = this.tsParseType();
  83548. this.expect(types$12.parenR);
  83549. return this.finishNode(node, "TSParenthesizedType");
  83550. }
  83551. tsParseFunctionOrConstructorType(type, abstract) {
  83552. const node = this.startNode();
  83553. if (type === "TSConstructorType") {
  83554. node.abstract = !!abstract;
  83555. if (abstract)
  83556. this.next();
  83557. this.next();
  83558. }
  83559. this.tsFillSignature(types$12.arrow, node);
  83560. return this.finishNode(node, type);
  83561. }
  83562. tsParseLiteralTypeNode() {
  83563. const node = this.startNode();
  83564. node.literal = (() => {
  83565. switch (this.state.type) {
  83566. case types$12.num:
  83567. case types$12.bigint:
  83568. case types$12.string:
  83569. case types$12._true:
  83570. case types$12._false:
  83571. return this.parseExprAtom();
  83572. default:
  83573. throw this.unexpected();
  83574. }
  83575. })();
  83576. return this.finishNode(node, "TSLiteralType");
  83577. }
  83578. tsParseTemplateLiteralType() {
  83579. const node = this.startNode();
  83580. node.literal = this.parseTemplate(false);
  83581. return this.finishNode(node, "TSLiteralType");
  83582. }
  83583. parseTemplateSubstitution() {
  83584. if (this.state.inType)
  83585. return this.tsParseType();
  83586. return super.parseTemplateSubstitution();
  83587. }
  83588. tsParseThisTypeOrThisTypePredicate() {
  83589. const thisKeyword = this.tsParseThisTypeNode();
  83590. if (this.isContextual("is") && !this.hasPrecedingLineBreak()) {
  83591. return this.tsParseThisTypePredicate(thisKeyword);
  83592. } else {
  83593. return thisKeyword;
  83594. }
  83595. }
  83596. tsParseNonArrayType() {
  83597. switch (this.state.type) {
  83598. case types$12.name:
  83599. case types$12._void:
  83600. case types$12._null: {
  83601. const type = this.match(types$12._void) ? "TSVoidKeyword" : this.match(types$12._null) ? "TSNullKeyword" : keywordTypeFromName(this.state.value);
  83602. if (type !== void 0 && this.lookaheadCharCode() !== 46) {
  83603. const node = this.startNode();
  83604. this.next();
  83605. return this.finishNode(node, type);
  83606. }
  83607. return this.tsParseTypeReference();
  83608. }
  83609. case types$12.string:
  83610. case types$12.num:
  83611. case types$12.bigint:
  83612. case types$12._true:
  83613. case types$12._false:
  83614. return this.tsParseLiteralTypeNode();
  83615. case types$12.plusMin:
  83616. if (this.state.value === "-") {
  83617. const node = this.startNode();
  83618. const nextToken = this.lookahead();
  83619. if (nextToken.type !== types$12.num && nextToken.type !== types$12.bigint) {
  83620. throw this.unexpected();
  83621. }
  83622. node.literal = this.parseMaybeUnary();
  83623. return this.finishNode(node, "TSLiteralType");
  83624. }
  83625. break;
  83626. case types$12._this:
  83627. return this.tsParseThisTypeOrThisTypePredicate();
  83628. case types$12._typeof:
  83629. return this.tsParseTypeQuery();
  83630. case types$12._import:
  83631. return this.tsParseImportType();
  83632. case types$12.braceL:
  83633. return this.tsLookAhead(this.tsIsStartOfMappedType.bind(this)) ? this.tsParseMappedType() : this.tsParseTypeLiteral();
  83634. case types$12.bracketL:
  83635. return this.tsParseTupleType();
  83636. case types$12.parenL:
  83637. return this.tsParseParenthesizedType();
  83638. case types$12.backQuote:
  83639. return this.tsParseTemplateLiteralType();
  83640. }
  83641. throw this.unexpected();
  83642. }
  83643. tsParseArrayTypeOrHigher() {
  83644. let type = this.tsParseNonArrayType();
  83645. while (!this.hasPrecedingLineBreak() && this.eat(types$12.bracketL)) {
  83646. if (this.match(types$12.bracketR)) {
  83647. const node = this.startNodeAtNode(type);
  83648. node.elementType = type;
  83649. this.expect(types$12.bracketR);
  83650. type = this.finishNode(node, "TSArrayType");
  83651. } else {
  83652. const node = this.startNodeAtNode(type);
  83653. node.objectType = type;
  83654. node.indexType = this.tsParseType();
  83655. this.expect(types$12.bracketR);
  83656. type = this.finishNode(node, "TSIndexedAccessType");
  83657. }
  83658. }
  83659. return type;
  83660. }
  83661. tsParseTypeOperator(operator) {
  83662. const node = this.startNode();
  83663. this.expectContextual(operator);
  83664. node.operator = operator;
  83665. node.typeAnnotation = this.tsParseTypeOperatorOrHigher();
  83666. if (operator === "readonly") {
  83667. this.tsCheckTypeAnnotationForReadOnly(node);
  83668. }
  83669. return this.finishNode(node, "TSTypeOperator");
  83670. }
  83671. tsCheckTypeAnnotationForReadOnly(node) {
  83672. switch (node.typeAnnotation.type) {
  83673. case "TSTupleType":
  83674. case "TSArrayType":
  83675. return;
  83676. default:
  83677. this.raise(node.start, TSErrors.UnexpectedReadonly);
  83678. }
  83679. }
  83680. tsParseInferType() {
  83681. const node = this.startNode();
  83682. this.expectContextual("infer");
  83683. const typeParameter = this.startNode();
  83684. typeParameter.name = this.tsParseTypeParameterName();
  83685. node.typeParameter = this.finishNode(typeParameter, "TSTypeParameter");
  83686. return this.finishNode(node, "TSInferType");
  83687. }
  83688. tsParseTypeOperatorOrHigher() {
  83689. const operator = ["keyof", "unique", "readonly"].find((kw2) => this.isContextual(kw2));
  83690. return operator ? this.tsParseTypeOperator(operator) : this.isContextual("infer") ? this.tsParseInferType() : this.tsParseArrayTypeOrHigher();
  83691. }
  83692. tsParseUnionOrIntersectionType(kind, parseConstituentType, operator) {
  83693. const node = this.startNode();
  83694. const hasLeadingOperator = this.eat(operator);
  83695. const types3 = [];
  83696. do {
  83697. types3.push(parseConstituentType());
  83698. } while (this.eat(operator));
  83699. if (types3.length === 1 && !hasLeadingOperator) {
  83700. return types3[0];
  83701. }
  83702. node.types = types3;
  83703. return this.finishNode(node, kind);
  83704. }
  83705. tsParseIntersectionTypeOrHigher() {
  83706. return this.tsParseUnionOrIntersectionType("TSIntersectionType", this.tsParseTypeOperatorOrHigher.bind(this), types$12.bitwiseAND);
  83707. }
  83708. tsParseUnionTypeOrHigher() {
  83709. return this.tsParseUnionOrIntersectionType("TSUnionType", this.tsParseIntersectionTypeOrHigher.bind(this), types$12.bitwiseOR);
  83710. }
  83711. tsIsStartOfFunctionType() {
  83712. if (this.isRelational("<")) {
  83713. return true;
  83714. }
  83715. return this.match(types$12.parenL) && this.tsLookAhead(this.tsIsUnambiguouslyStartOfFunctionType.bind(this));
  83716. }
  83717. tsSkipParameterStart() {
  83718. if (this.match(types$12.name) || this.match(types$12._this)) {
  83719. this.next();
  83720. return true;
  83721. }
  83722. if (this.match(types$12.braceL)) {
  83723. let braceStackCounter = 1;
  83724. this.next();
  83725. while (braceStackCounter > 0) {
  83726. if (this.match(types$12.braceL)) {
  83727. ++braceStackCounter;
  83728. } else if (this.match(types$12.braceR)) {
  83729. --braceStackCounter;
  83730. }
  83731. this.next();
  83732. }
  83733. return true;
  83734. }
  83735. if (this.match(types$12.bracketL)) {
  83736. let braceStackCounter = 1;
  83737. this.next();
  83738. while (braceStackCounter > 0) {
  83739. if (this.match(types$12.bracketL)) {
  83740. ++braceStackCounter;
  83741. } else if (this.match(types$12.bracketR)) {
  83742. --braceStackCounter;
  83743. }
  83744. this.next();
  83745. }
  83746. return true;
  83747. }
  83748. return false;
  83749. }
  83750. tsIsUnambiguouslyStartOfFunctionType() {
  83751. this.next();
  83752. if (this.match(types$12.parenR) || this.match(types$12.ellipsis)) {
  83753. return true;
  83754. }
  83755. if (this.tsSkipParameterStart()) {
  83756. if (this.match(types$12.colon) || this.match(types$12.comma) || this.match(types$12.question) || this.match(types$12.eq)) {
  83757. return true;
  83758. }
  83759. if (this.match(types$12.parenR)) {
  83760. this.next();
  83761. if (this.match(types$12.arrow)) {
  83762. return true;
  83763. }
  83764. }
  83765. }
  83766. return false;
  83767. }
  83768. tsParseTypeOrTypePredicateAnnotation(returnToken) {
  83769. return this.tsInType(() => {
  83770. const t2 = this.startNode();
  83771. this.expect(returnToken);
  83772. const node = this.startNode();
  83773. const asserts = !!this.tsTryParse(this.tsParseTypePredicateAsserts.bind(this));
  83774. if (asserts && this.match(types$12._this)) {
  83775. let thisTypePredicate = this.tsParseThisTypeOrThisTypePredicate();
  83776. if (thisTypePredicate.type === "TSThisType") {
  83777. node.parameterName = thisTypePredicate;
  83778. node.asserts = true;
  83779. node.typeAnnotation = null;
  83780. thisTypePredicate = this.finishNode(node, "TSTypePredicate");
  83781. } else {
  83782. this.resetStartLocationFromNode(thisTypePredicate, node);
  83783. thisTypePredicate.asserts = true;
  83784. }
  83785. t2.typeAnnotation = thisTypePredicate;
  83786. return this.finishNode(t2, "TSTypeAnnotation");
  83787. }
  83788. const typePredicateVariable = this.tsIsIdentifier() && this.tsTryParse(this.tsParseTypePredicatePrefix.bind(this));
  83789. if (!typePredicateVariable) {
  83790. if (!asserts) {
  83791. return this.tsParseTypeAnnotation(false, t2);
  83792. }
  83793. node.parameterName = this.parseIdentifier();
  83794. node.asserts = asserts;
  83795. node.typeAnnotation = null;
  83796. t2.typeAnnotation = this.finishNode(node, "TSTypePredicate");
  83797. return this.finishNode(t2, "TSTypeAnnotation");
  83798. }
  83799. const type = this.tsParseTypeAnnotation(false);
  83800. node.parameterName = typePredicateVariable;
  83801. node.typeAnnotation = type;
  83802. node.asserts = asserts;
  83803. t2.typeAnnotation = this.finishNode(node, "TSTypePredicate");
  83804. return this.finishNode(t2, "TSTypeAnnotation");
  83805. });
  83806. }
  83807. tsTryParseTypeOrTypePredicateAnnotation() {
  83808. return this.match(types$12.colon) ? this.tsParseTypeOrTypePredicateAnnotation(types$12.colon) : void 0;
  83809. }
  83810. tsTryParseTypeAnnotation() {
  83811. return this.match(types$12.colon) ? this.tsParseTypeAnnotation() : void 0;
  83812. }
  83813. tsTryParseType() {
  83814. return this.tsEatThenParseType(types$12.colon);
  83815. }
  83816. tsParseTypePredicatePrefix() {
  83817. const id = this.parseIdentifier();
  83818. if (this.isContextual("is") && !this.hasPrecedingLineBreak()) {
  83819. this.next();
  83820. return id;
  83821. }
  83822. }
  83823. tsParseTypePredicateAsserts() {
  83824. if (!this.match(types$12.name) || this.state.value !== "asserts" || this.hasPrecedingLineBreak()) {
  83825. return false;
  83826. }
  83827. const containsEsc = this.state.containsEsc;
  83828. this.next();
  83829. if (!this.match(types$12.name) && !this.match(types$12._this)) {
  83830. return false;
  83831. }
  83832. if (containsEsc) {
  83833. this.raise(this.state.lastTokStart, ErrorMessages.InvalidEscapedReservedWord, "asserts");
  83834. }
  83835. return true;
  83836. }
  83837. tsParseTypeAnnotation(eatColon = true, t2 = this.startNode()) {
  83838. this.tsInType(() => {
  83839. if (eatColon)
  83840. this.expect(types$12.colon);
  83841. t2.typeAnnotation = this.tsParseType();
  83842. });
  83843. return this.finishNode(t2, "TSTypeAnnotation");
  83844. }
  83845. tsParseType() {
  83846. assert(this.state.inType);
  83847. const type = this.tsParseNonConditionalType();
  83848. if (this.hasPrecedingLineBreak() || !this.eat(types$12._extends)) {
  83849. return type;
  83850. }
  83851. const node = this.startNodeAtNode(type);
  83852. node.checkType = type;
  83853. node.extendsType = this.tsParseNonConditionalType();
  83854. this.expect(types$12.question);
  83855. node.trueType = this.tsParseType();
  83856. this.expect(types$12.colon);
  83857. node.falseType = this.tsParseType();
  83858. return this.finishNode(node, "TSConditionalType");
  83859. }
  83860. isAbstractConstructorSignature() {
  83861. return this.isContextual("abstract") && this.lookahead().type === types$12._new;
  83862. }
  83863. tsParseNonConditionalType() {
  83864. if (this.tsIsStartOfFunctionType()) {
  83865. return this.tsParseFunctionOrConstructorType("TSFunctionType");
  83866. }
  83867. if (this.match(types$12._new)) {
  83868. return this.tsParseFunctionOrConstructorType("TSConstructorType");
  83869. } else if (this.isAbstractConstructorSignature()) {
  83870. return this.tsParseFunctionOrConstructorType("TSConstructorType", true);
  83871. }
  83872. return this.tsParseUnionTypeOrHigher();
  83873. }
  83874. tsParseTypeAssertion() {
  83875. const node = this.startNode();
  83876. const _const = this.tsTryNextParseConstantContext();
  83877. node.typeAnnotation = _const || this.tsNextThenParseType();
  83878. this.expectRelational(">");
  83879. node.expression = this.parseMaybeUnary();
  83880. return this.finishNode(node, "TSTypeAssertion");
  83881. }
  83882. tsParseHeritageClause(descriptor) {
  83883. const originalStart = this.state.start;
  83884. const delimitedList = this.tsParseDelimitedList("HeritageClauseElement", this.tsParseExpressionWithTypeArguments.bind(this));
  83885. if (!delimitedList.length) {
  83886. this.raise(originalStart, TSErrors.EmptyHeritageClauseType, descriptor);
  83887. }
  83888. return delimitedList;
  83889. }
  83890. tsParseExpressionWithTypeArguments() {
  83891. const node = this.startNode();
  83892. node.expression = this.tsParseEntityName(false);
  83893. if (this.isRelational("<")) {
  83894. node.typeParameters = this.tsParseTypeArguments();
  83895. }
  83896. return this.finishNode(node, "TSExpressionWithTypeArguments");
  83897. }
  83898. tsParseInterfaceDeclaration(node) {
  83899. node.id = this.parseIdentifier();
  83900. this.checkLVal(node.id, "typescript interface declaration", BIND_TS_INTERFACE);
  83901. node.typeParameters = this.tsTryParseTypeParameters();
  83902. if (this.eat(types$12._extends)) {
  83903. node.extends = this.tsParseHeritageClause("extends");
  83904. }
  83905. const body = this.startNode();
  83906. body.body = this.tsInType(this.tsParseObjectTypeMembers.bind(this));
  83907. node.body = this.finishNode(body, "TSInterfaceBody");
  83908. return this.finishNode(node, "TSInterfaceDeclaration");
  83909. }
  83910. tsParseTypeAliasDeclaration(node) {
  83911. node.id = this.parseIdentifier();
  83912. this.checkLVal(node.id, "typescript type alias", BIND_TS_TYPE);
  83913. node.typeParameters = this.tsTryParseTypeParameters();
  83914. node.typeAnnotation = this.tsInType(() => {
  83915. this.expect(types$12.eq);
  83916. if (this.isContextual("intrinsic") && this.lookahead().type !== types$12.dot) {
  83917. const node2 = this.startNode();
  83918. this.next();
  83919. return this.finishNode(node2, "TSIntrinsicKeyword");
  83920. }
  83921. return this.tsParseType();
  83922. });
  83923. this.semicolon();
  83924. return this.finishNode(node, "TSTypeAliasDeclaration");
  83925. }
  83926. tsInNoContext(cb) {
  83927. const oldContext = this.state.context;
  83928. this.state.context = [oldContext[0]];
  83929. try {
  83930. return cb();
  83931. } finally {
  83932. this.state.context = oldContext;
  83933. }
  83934. }
  83935. tsInType(cb) {
  83936. const oldInType = this.state.inType;
  83937. this.state.inType = true;
  83938. try {
  83939. return cb();
  83940. } finally {
  83941. this.state.inType = oldInType;
  83942. }
  83943. }
  83944. tsEatThenParseType(token) {
  83945. return !this.match(token) ? void 0 : this.tsNextThenParseType();
  83946. }
  83947. tsExpectThenParseType(token) {
  83948. return this.tsDoThenParseType(() => this.expect(token));
  83949. }
  83950. tsNextThenParseType() {
  83951. return this.tsDoThenParseType(() => this.next());
  83952. }
  83953. tsDoThenParseType(cb) {
  83954. return this.tsInType(() => {
  83955. cb();
  83956. return this.tsParseType();
  83957. });
  83958. }
  83959. tsParseEnumMember() {
  83960. const node = this.startNode();
  83961. node.id = this.match(types$12.string) ? this.parseExprAtom() : this.parseIdentifier(true);
  83962. if (this.eat(types$12.eq)) {
  83963. node.initializer = this.parseMaybeAssignAllowIn();
  83964. }
  83965. return this.finishNode(node, "TSEnumMember");
  83966. }
  83967. tsParseEnumDeclaration(node, isConst) {
  83968. if (isConst)
  83969. node.const = true;
  83970. node.id = this.parseIdentifier();
  83971. this.checkLVal(node.id, "typescript enum declaration", isConst ? BIND_TS_CONST_ENUM : BIND_TS_ENUM);
  83972. this.expect(types$12.braceL);
  83973. node.members = this.tsParseDelimitedList("EnumMembers", this.tsParseEnumMember.bind(this));
  83974. this.expect(types$12.braceR);
  83975. return this.finishNode(node, "TSEnumDeclaration");
  83976. }
  83977. tsParseModuleBlock() {
  83978. const node = this.startNode();
  83979. this.scope.enter(SCOPE_OTHER);
  83980. this.expect(types$12.braceL);
  83981. this.parseBlockOrModuleBlockBody(node.body = [], void 0, true, types$12.braceR);
  83982. this.scope.exit();
  83983. return this.finishNode(node, "TSModuleBlock");
  83984. }
  83985. tsParseModuleOrNamespaceDeclaration(node, nested = false) {
  83986. node.id = this.parseIdentifier();
  83987. if (!nested) {
  83988. this.checkLVal(node.id, "module or namespace declaration", BIND_TS_NAMESPACE);
  83989. }
  83990. if (this.eat(types$12.dot)) {
  83991. const inner = this.startNode();
  83992. this.tsParseModuleOrNamespaceDeclaration(inner, true);
  83993. node.body = inner;
  83994. } else {
  83995. this.scope.enter(SCOPE_TS_MODULE);
  83996. this.prodParam.enter(PARAM);
  83997. node.body = this.tsParseModuleBlock();
  83998. this.prodParam.exit();
  83999. this.scope.exit();
  84000. }
  84001. return this.finishNode(node, "TSModuleDeclaration");
  84002. }
  84003. tsParseAmbientExternalModuleDeclaration(node) {
  84004. if (this.isContextual("global")) {
  84005. node.global = true;
  84006. node.id = this.parseIdentifier();
  84007. } else if (this.match(types$12.string)) {
  84008. node.id = this.parseExprAtom();
  84009. } else {
  84010. this.unexpected();
  84011. }
  84012. if (this.match(types$12.braceL)) {
  84013. this.scope.enter(SCOPE_TS_MODULE);
  84014. this.prodParam.enter(PARAM);
  84015. node.body = this.tsParseModuleBlock();
  84016. this.prodParam.exit();
  84017. this.scope.exit();
  84018. } else {
  84019. this.semicolon();
  84020. }
  84021. return this.finishNode(node, "TSModuleDeclaration");
  84022. }
  84023. tsParseImportEqualsDeclaration(node, isExport) {
  84024. node.isExport = isExport || false;
  84025. node.id = this.parseIdentifier();
  84026. this.checkLVal(node.id, "import equals declaration", BIND_LEXICAL2);
  84027. this.expect(types$12.eq);
  84028. const moduleReference = this.tsParseModuleReference();
  84029. if (node.importKind === "type" && moduleReference.type !== "TSExternalModuleReference") {
  84030. this.raise(moduleReference.start, TSErrors.ImportAliasHasImportType);
  84031. }
  84032. node.moduleReference = moduleReference;
  84033. this.semicolon();
  84034. return this.finishNode(node, "TSImportEqualsDeclaration");
  84035. }
  84036. tsIsExternalModuleReference() {
  84037. return this.isContextual("require") && this.lookaheadCharCode() === 40;
  84038. }
  84039. tsParseModuleReference() {
  84040. return this.tsIsExternalModuleReference() ? this.tsParseExternalModuleReference() : this.tsParseEntityName(false);
  84041. }
  84042. tsParseExternalModuleReference() {
  84043. const node = this.startNode();
  84044. this.expectContextual("require");
  84045. this.expect(types$12.parenL);
  84046. if (!this.match(types$12.string)) {
  84047. throw this.unexpected();
  84048. }
  84049. node.expression = this.parseExprAtom();
  84050. this.expect(types$12.parenR);
  84051. return this.finishNode(node, "TSExternalModuleReference");
  84052. }
  84053. tsLookAhead(f) {
  84054. const state = this.state.clone();
  84055. const res = f();
  84056. this.state = state;
  84057. return res;
  84058. }
  84059. tsTryParseAndCatch(f) {
  84060. const result = this.tryParse((abort) => f() || abort());
  84061. if (result.aborted || !result.node)
  84062. return void 0;
  84063. if (result.error)
  84064. this.state = result.failState;
  84065. return result.node;
  84066. }
  84067. tsTryParse(f) {
  84068. const state = this.state.clone();
  84069. const result = f();
  84070. if (result !== void 0 && result !== false) {
  84071. return result;
  84072. } else {
  84073. this.state = state;
  84074. return void 0;
  84075. }
  84076. }
  84077. tsTryParseDeclare(nany) {
  84078. if (this.isLineTerminator()) {
  84079. return;
  84080. }
  84081. let starttype = this.state.type;
  84082. let kind;
  84083. if (this.isContextual("let")) {
  84084. starttype = types$12._var;
  84085. kind = "let";
  84086. }
  84087. return this.tsInAmbientContext(() => {
  84088. switch (starttype) {
  84089. case types$12._function:
  84090. nany.declare = true;
  84091. return this.parseFunctionStatement(nany, false, true);
  84092. case types$12._class:
  84093. nany.declare = true;
  84094. return this.parseClass(nany, true, false);
  84095. case types$12._const:
  84096. if (this.match(types$12._const) && this.isLookaheadContextual("enum")) {
  84097. this.expect(types$12._const);
  84098. this.expectContextual("enum");
  84099. return this.tsParseEnumDeclaration(nany, true);
  84100. }
  84101. case types$12._var:
  84102. kind = kind || this.state.value;
  84103. return this.parseVarStatement(nany, kind);
  84104. case types$12.name: {
  84105. const value = this.state.value;
  84106. if (value === "global") {
  84107. return this.tsParseAmbientExternalModuleDeclaration(nany);
  84108. } else {
  84109. return this.tsParseDeclaration(nany, value, true);
  84110. }
  84111. }
  84112. }
  84113. });
  84114. }
  84115. tsTryParseExportDeclaration() {
  84116. return this.tsParseDeclaration(this.startNode(), this.state.value, true);
  84117. }
  84118. tsParseExpressionStatement(node, expr) {
  84119. switch (expr.name) {
  84120. case "declare": {
  84121. const declaration = this.tsTryParseDeclare(node);
  84122. if (declaration) {
  84123. declaration.declare = true;
  84124. return declaration;
  84125. }
  84126. break;
  84127. }
  84128. case "global":
  84129. if (this.match(types$12.braceL)) {
  84130. this.scope.enter(SCOPE_TS_MODULE);
  84131. this.prodParam.enter(PARAM);
  84132. const mod = node;
  84133. mod.global = true;
  84134. mod.id = expr;
  84135. mod.body = this.tsParseModuleBlock();
  84136. this.scope.exit();
  84137. this.prodParam.exit();
  84138. return this.finishNode(mod, "TSModuleDeclaration");
  84139. }
  84140. break;
  84141. default:
  84142. return this.tsParseDeclaration(node, expr.name, false);
  84143. }
  84144. }
  84145. tsParseDeclaration(node, value, next) {
  84146. switch (value) {
  84147. case "abstract":
  84148. if (this.tsCheckLineTerminator(next) && (this.match(types$12._class) || this.match(types$12.name))) {
  84149. return this.tsParseAbstractDeclaration(node);
  84150. }
  84151. break;
  84152. case "enum":
  84153. if (next || this.match(types$12.name)) {
  84154. if (next)
  84155. this.next();
  84156. return this.tsParseEnumDeclaration(node, false);
  84157. }
  84158. break;
  84159. case "interface":
  84160. if (this.tsCheckLineTerminator(next) && this.match(types$12.name)) {
  84161. return this.tsParseInterfaceDeclaration(node);
  84162. }
  84163. break;
  84164. case "module":
  84165. if (this.tsCheckLineTerminator(next)) {
  84166. if (this.match(types$12.string)) {
  84167. return this.tsParseAmbientExternalModuleDeclaration(node);
  84168. } else if (this.match(types$12.name)) {
  84169. return this.tsParseModuleOrNamespaceDeclaration(node);
  84170. }
  84171. }
  84172. break;
  84173. case "namespace":
  84174. if (this.tsCheckLineTerminator(next) && this.match(types$12.name)) {
  84175. return this.tsParseModuleOrNamespaceDeclaration(node);
  84176. }
  84177. break;
  84178. case "type":
  84179. if (this.tsCheckLineTerminator(next) && this.match(types$12.name)) {
  84180. return this.tsParseTypeAliasDeclaration(node);
  84181. }
  84182. break;
  84183. }
  84184. }
  84185. tsCheckLineTerminator(next) {
  84186. if (next) {
  84187. if (this.hasFollowingLineBreak())
  84188. return false;
  84189. this.next();
  84190. return true;
  84191. }
  84192. return !this.isLineTerminator();
  84193. }
  84194. tsTryParseGenericAsyncArrowFunction(startPos, startLoc) {
  84195. if (!this.isRelational("<")) {
  84196. return void 0;
  84197. }
  84198. const oldMaybeInArrowParameters = this.state.maybeInArrowParameters;
  84199. this.state.maybeInArrowParameters = true;
  84200. const res = this.tsTryParseAndCatch(() => {
  84201. const node = this.startNodeAt(startPos, startLoc);
  84202. node.typeParameters = this.tsParseTypeParameters();
  84203. super.parseFunctionParams(node);
  84204. node.returnType = this.tsTryParseTypeOrTypePredicateAnnotation();
  84205. this.expect(types$12.arrow);
  84206. return node;
  84207. });
  84208. this.state.maybeInArrowParameters = oldMaybeInArrowParameters;
  84209. if (!res) {
  84210. return void 0;
  84211. }
  84212. return this.parseArrowExpression(res, null, true);
  84213. }
  84214. tsParseTypeArguments() {
  84215. const node = this.startNode();
  84216. node.params = this.tsInType(() => this.tsInNoContext(() => {
  84217. this.expectRelational("<");
  84218. return this.tsParseDelimitedList("TypeParametersOrArguments", this.tsParseType.bind(this));
  84219. }));
  84220. if (node.params.length === 0) {
  84221. this.raise(node.start, TSErrors.EmptyTypeArguments);
  84222. }
  84223. this.expectRelational(">");
  84224. return this.finishNode(node, "TSTypeParameterInstantiation");
  84225. }
  84226. tsIsDeclarationStart() {
  84227. if (this.match(types$12.name)) {
  84228. switch (this.state.value) {
  84229. case "abstract":
  84230. case "declare":
  84231. case "enum":
  84232. case "interface":
  84233. case "module":
  84234. case "namespace":
  84235. case "type":
  84236. return true;
  84237. }
  84238. }
  84239. return false;
  84240. }
  84241. isExportDefaultSpecifier() {
  84242. if (this.tsIsDeclarationStart())
  84243. return false;
  84244. return super.isExportDefaultSpecifier();
  84245. }
  84246. parseAssignableListItem(allowModifiers, decorators) {
  84247. const startPos = this.state.start;
  84248. const startLoc = this.state.startLoc;
  84249. let accessibility;
  84250. let readonly = false;
  84251. let override = false;
  84252. if (allowModifiers !== void 0) {
  84253. const modified = {};
  84254. this.tsParseModifiers(modified, ["public", "private", "protected", "override", "readonly"]);
  84255. accessibility = modified.accessibility;
  84256. override = modified.override;
  84257. readonly = modified.readonly;
  84258. if (allowModifiers === false && (accessibility || readonly || override)) {
  84259. this.raise(startPos, TSErrors.UnexpectedParameterModifier);
  84260. }
  84261. }
  84262. const left = this.parseMaybeDefault();
  84263. this.parseAssignableListItemTypes(left);
  84264. const elt = this.parseMaybeDefault(left.start, left.loc.start, left);
  84265. if (accessibility || readonly || override) {
  84266. const pp2 = this.startNodeAt(startPos, startLoc);
  84267. if (decorators.length) {
  84268. pp2.decorators = decorators;
  84269. }
  84270. if (accessibility)
  84271. pp2.accessibility = accessibility;
  84272. if (readonly)
  84273. pp2.readonly = readonly;
  84274. if (override)
  84275. pp2.override = override;
  84276. if (elt.type !== "Identifier" && elt.type !== "AssignmentPattern") {
  84277. this.raise(pp2.start, TSErrors.UnsupportedParameterPropertyKind);
  84278. }
  84279. pp2.parameter = elt;
  84280. return this.finishNode(pp2, "TSParameterProperty");
  84281. }
  84282. if (decorators.length) {
  84283. left.decorators = decorators;
  84284. }
  84285. return elt;
  84286. }
  84287. parseFunctionBodyAndFinish(node, type, isMethod = false) {
  84288. if (this.match(types$12.colon)) {
  84289. node.returnType = this.tsParseTypeOrTypePredicateAnnotation(types$12.colon);
  84290. }
  84291. const bodilessType = type === "FunctionDeclaration" ? "TSDeclareFunction" : type === "ClassMethod" ? "TSDeclareMethod" : void 0;
  84292. if (bodilessType && !this.match(types$12.braceL) && this.isLineTerminator()) {
  84293. this.finishNode(node, bodilessType);
  84294. return;
  84295. }
  84296. if (bodilessType === "TSDeclareFunction" && this.state.isAmbientContext) {
  84297. this.raise(node.start, TSErrors.DeclareFunctionHasImplementation);
  84298. if (node.declare) {
  84299. super.parseFunctionBodyAndFinish(node, bodilessType, isMethod);
  84300. return;
  84301. }
  84302. }
  84303. super.parseFunctionBodyAndFinish(node, type, isMethod);
  84304. }
  84305. registerFunctionStatementId(node) {
  84306. if (!node.body && node.id) {
  84307. this.checkLVal(node.id, "function name", BIND_TS_AMBIENT);
  84308. } else {
  84309. super.registerFunctionStatementId(...arguments);
  84310. }
  84311. }
  84312. tsCheckForInvalidTypeCasts(items) {
  84313. items.forEach((node) => {
  84314. if ((node == null ? void 0 : node.type) === "TSTypeCastExpression") {
  84315. this.raise(node.typeAnnotation.start, TSErrors.UnexpectedTypeAnnotation);
  84316. }
  84317. });
  84318. }
  84319. toReferencedList(exprList, isInParens) {
  84320. this.tsCheckForInvalidTypeCasts(exprList);
  84321. return exprList;
  84322. }
  84323. parseArrayLike(...args) {
  84324. const node = super.parseArrayLike(...args);
  84325. if (node.type === "ArrayExpression") {
  84326. this.tsCheckForInvalidTypeCasts(node.elements);
  84327. }
  84328. return node;
  84329. }
  84330. parseSubscript(base2, startPos, startLoc, noCalls, state) {
  84331. if (!this.hasPrecedingLineBreak() && this.match(types$12.bang)) {
  84332. this.state.exprAllowed = false;
  84333. this.next();
  84334. const nonNullExpression = this.startNodeAt(startPos, startLoc);
  84335. nonNullExpression.expression = base2;
  84336. return this.finishNode(nonNullExpression, "TSNonNullExpression");
  84337. }
  84338. if (this.isRelational("<")) {
  84339. const result = this.tsTryParseAndCatch(() => {
  84340. if (!noCalls && this.atPossibleAsyncArrow(base2)) {
  84341. const asyncArrowFn = this.tsTryParseGenericAsyncArrowFunction(startPos, startLoc);
  84342. if (asyncArrowFn) {
  84343. return asyncArrowFn;
  84344. }
  84345. }
  84346. const node = this.startNodeAt(startPos, startLoc);
  84347. node.callee = base2;
  84348. const typeArguments = this.tsParseTypeArguments();
  84349. if (typeArguments) {
  84350. if (!noCalls && this.eat(types$12.parenL)) {
  84351. node.arguments = this.parseCallExpressionArguments(types$12.parenR, false);
  84352. this.tsCheckForInvalidTypeCasts(node.arguments);
  84353. node.typeParameters = typeArguments;
  84354. if (state.optionalChainMember) {
  84355. node.optional = false;
  84356. }
  84357. return this.finishCallExpression(node, state.optionalChainMember);
  84358. } else if (this.match(types$12.backQuote)) {
  84359. const result2 = this.parseTaggedTemplateExpression(base2, startPos, startLoc, state);
  84360. result2.typeParameters = typeArguments;
  84361. return result2;
  84362. }
  84363. }
  84364. this.unexpected();
  84365. });
  84366. if (result)
  84367. return result;
  84368. }
  84369. return super.parseSubscript(base2, startPos, startLoc, noCalls, state);
  84370. }
  84371. parseNewArguments(node) {
  84372. if (this.isRelational("<")) {
  84373. const typeParameters = this.tsTryParseAndCatch(() => {
  84374. const args = this.tsParseTypeArguments();
  84375. if (!this.match(types$12.parenL))
  84376. this.unexpected();
  84377. return args;
  84378. });
  84379. if (typeParameters) {
  84380. node.typeParameters = typeParameters;
  84381. }
  84382. }
  84383. super.parseNewArguments(node);
  84384. }
  84385. parseExprOp(left, leftStartPos, leftStartLoc, minPrec) {
  84386. if (nonNull(types$12._in.binop) > minPrec && !this.hasPrecedingLineBreak() && this.isContextual("as")) {
  84387. const node = this.startNodeAt(leftStartPos, leftStartLoc);
  84388. node.expression = left;
  84389. const _const = this.tsTryNextParseConstantContext();
  84390. if (_const) {
  84391. node.typeAnnotation = _const;
  84392. } else {
  84393. node.typeAnnotation = this.tsNextThenParseType();
  84394. }
  84395. this.finishNode(node, "TSAsExpression");
  84396. this.reScan_lt_gt();
  84397. return this.parseExprOp(node, leftStartPos, leftStartLoc, minPrec);
  84398. }
  84399. return super.parseExprOp(left, leftStartPos, leftStartLoc, minPrec);
  84400. }
  84401. checkReservedWord(word, startLoc, checkKeywords, isBinding) {
  84402. }
  84403. checkDuplicateExports() {
  84404. }
  84405. parseImport(node) {
  84406. node.importKind = "value";
  84407. if (this.match(types$12.name) || this.match(types$12.star) || this.match(types$12.braceL)) {
  84408. let ahead = this.lookahead();
  84409. if (this.isContextual("type") && ahead.type !== types$12.comma && !(ahead.type === types$12.name && ahead.value === "from") && ahead.type !== types$12.eq) {
  84410. node.importKind = "type";
  84411. this.next();
  84412. ahead = this.lookahead();
  84413. }
  84414. if (this.match(types$12.name) && ahead.type === types$12.eq) {
  84415. return this.tsParseImportEqualsDeclaration(node);
  84416. }
  84417. }
  84418. const importNode = super.parseImport(node);
  84419. if (importNode.importKind === "type" && importNode.specifiers.length > 1 && importNode.specifiers[0].type === "ImportDefaultSpecifier") {
  84420. this.raise(importNode.start, TSErrors.TypeImportCannotSpecifyDefaultAndNamed);
  84421. }
  84422. return importNode;
  84423. }
  84424. parseExport(node) {
  84425. if (this.match(types$12._import)) {
  84426. this.next();
  84427. if (this.isContextual("type") && this.lookaheadCharCode() !== 61) {
  84428. node.importKind = "type";
  84429. this.next();
  84430. } else {
  84431. node.importKind = "value";
  84432. }
  84433. return this.tsParseImportEqualsDeclaration(node, true);
  84434. } else if (this.eat(types$12.eq)) {
  84435. const assign = node;
  84436. assign.expression = this.parseExpression();
  84437. this.semicolon();
  84438. return this.finishNode(assign, "TSExportAssignment");
  84439. } else if (this.eatContextual("as")) {
  84440. const decl = node;
  84441. this.expectContextual("namespace");
  84442. decl.id = this.parseIdentifier();
  84443. this.semicolon();
  84444. return this.finishNode(decl, "TSNamespaceExportDeclaration");
  84445. } else {
  84446. if (this.isContextual("type") && this.lookahead().type === types$12.braceL) {
  84447. this.next();
  84448. node.exportKind = "type";
  84449. } else {
  84450. node.exportKind = "value";
  84451. }
  84452. return super.parseExport(node);
  84453. }
  84454. }
  84455. isAbstractClass() {
  84456. return this.isContextual("abstract") && this.lookahead().type === types$12._class;
  84457. }
  84458. parseExportDefaultExpression() {
  84459. if (this.isAbstractClass()) {
  84460. const cls = this.startNode();
  84461. this.next();
  84462. cls.abstract = true;
  84463. this.parseClass(cls, true, true);
  84464. return cls;
  84465. }
  84466. if (this.state.value === "interface") {
  84467. const result = this.tsParseDeclaration(this.startNode(), this.state.value, true);
  84468. if (result)
  84469. return result;
  84470. }
  84471. return super.parseExportDefaultExpression();
  84472. }
  84473. parseStatementContent(context, topLevel) {
  84474. if (this.state.type === types$12._const) {
  84475. const ahead = this.lookahead();
  84476. if (ahead.type === types$12.name && ahead.value === "enum") {
  84477. const node = this.startNode();
  84478. this.expect(types$12._const);
  84479. this.expectContextual("enum");
  84480. return this.tsParseEnumDeclaration(node, true);
  84481. }
  84482. }
  84483. return super.parseStatementContent(context, topLevel);
  84484. }
  84485. parseAccessModifier() {
  84486. return this.tsParseModifier(["public", "protected", "private"]);
  84487. }
  84488. tsHasSomeModifiers(member, modifiers) {
  84489. return modifiers.some((modifier) => {
  84490. if (tsIsAccessModifier(modifier)) {
  84491. return member.accessibility === modifier;
  84492. }
  84493. return !!member[modifier];
  84494. });
  84495. }
  84496. parseClassMember(classBody, member, state) {
  84497. const invalidModifersForStaticBlocks = ["declare", "private", "public", "protected", "override", "abstract", "readonly"];
  84498. this.tsParseModifiers(member, invalidModifersForStaticBlocks.concat(["static"]));
  84499. const callParseClassMemberWithIsStatic = () => {
  84500. const isStatic = !!member.static;
  84501. if (isStatic && this.eat(types$12.braceL)) {
  84502. if (this.tsHasSomeModifiers(member, invalidModifersForStaticBlocks)) {
  84503. this.raise(this.state.pos, TSErrors.StaticBlockCannotHaveModifier);
  84504. }
  84505. this.parseClassStaticBlock(classBody, member);
  84506. } else {
  84507. this.parseClassMemberWithIsStatic(classBody, member, state, isStatic);
  84508. }
  84509. };
  84510. if (member.declare) {
  84511. this.tsInAmbientContext(callParseClassMemberWithIsStatic);
  84512. } else {
  84513. callParseClassMemberWithIsStatic();
  84514. }
  84515. }
  84516. parseClassMemberWithIsStatic(classBody, member, state, isStatic) {
  84517. const idx = this.tsTryParseIndexSignature(member);
  84518. if (idx) {
  84519. classBody.body.push(idx);
  84520. if (member.abstract) {
  84521. this.raise(member.start, TSErrors.IndexSignatureHasAbstract);
  84522. }
  84523. if (member.accessibility) {
  84524. this.raise(member.start, TSErrors.IndexSignatureHasAccessibility, member.accessibility);
  84525. }
  84526. if (member.declare) {
  84527. this.raise(member.start, TSErrors.IndexSignatureHasDeclare);
  84528. }
  84529. if (member.override) {
  84530. this.raise(member.start, TSErrors.IndexSignatureHasOverride);
  84531. }
  84532. return;
  84533. }
  84534. if (!this.state.inAbstractClass && member.abstract) {
  84535. this.raise(member.start, TSErrors.NonAbstractClassHasAbstractMethod);
  84536. }
  84537. if (member.override) {
  84538. if (!state.hadSuperClass) {
  84539. this.raise(member.start, TSErrors.OverrideNotInSubClass);
  84540. }
  84541. }
  84542. super.parseClassMemberWithIsStatic(classBody, member, state, isStatic);
  84543. }
  84544. parsePostMemberNameModifiers(methodOrProp) {
  84545. const optional = this.eat(types$12.question);
  84546. if (optional)
  84547. methodOrProp.optional = true;
  84548. if (methodOrProp.readonly && this.match(types$12.parenL)) {
  84549. this.raise(methodOrProp.start, TSErrors.ClassMethodHasReadonly);
  84550. }
  84551. if (methodOrProp.declare && this.match(types$12.parenL)) {
  84552. this.raise(methodOrProp.start, TSErrors.ClassMethodHasDeclare);
  84553. }
  84554. }
  84555. parseExpressionStatement(node, expr) {
  84556. const decl = expr.type === "Identifier" ? this.tsParseExpressionStatement(node, expr) : void 0;
  84557. return decl || super.parseExpressionStatement(node, expr);
  84558. }
  84559. shouldParseExportDeclaration() {
  84560. if (this.tsIsDeclarationStart())
  84561. return true;
  84562. return super.shouldParseExportDeclaration();
  84563. }
  84564. parseConditional(expr, startPos, startLoc, refExpressionErrors) {
  84565. if (!this.state.maybeInArrowParameters || !this.match(types$12.question)) {
  84566. return super.parseConditional(expr, startPos, startLoc, refExpressionErrors);
  84567. }
  84568. const result = this.tryParse(() => super.parseConditional(expr, startPos, startLoc));
  84569. if (!result.node) {
  84570. if (result.error) {
  84571. super.setOptionalParametersError(refExpressionErrors, result.error);
  84572. }
  84573. return expr;
  84574. }
  84575. if (result.error)
  84576. this.state = result.failState;
  84577. return result.node;
  84578. }
  84579. parseParenItem(node, startPos, startLoc) {
  84580. node = super.parseParenItem(node, startPos, startLoc);
  84581. if (this.eat(types$12.question)) {
  84582. node.optional = true;
  84583. this.resetEndLocation(node);
  84584. }
  84585. if (this.match(types$12.colon)) {
  84586. const typeCastNode = this.startNodeAt(startPos, startLoc);
  84587. typeCastNode.expression = node;
  84588. typeCastNode.typeAnnotation = this.tsParseTypeAnnotation();
  84589. return this.finishNode(typeCastNode, "TSTypeCastExpression");
  84590. }
  84591. return node;
  84592. }
  84593. parseExportDeclaration(node) {
  84594. const startPos = this.state.start;
  84595. const startLoc = this.state.startLoc;
  84596. const isDeclare = this.eatContextual("declare");
  84597. if (isDeclare && (this.isContextual("declare") || !this.shouldParseExportDeclaration())) {
  84598. throw this.raise(this.state.start, TSErrors.ExpectedAmbientAfterExportDeclare);
  84599. }
  84600. let declaration;
  84601. if (this.match(types$12.name)) {
  84602. declaration = this.tsTryParseExportDeclaration();
  84603. }
  84604. if (!declaration) {
  84605. declaration = super.parseExportDeclaration(node);
  84606. }
  84607. if (declaration && (declaration.type === "TSInterfaceDeclaration" || declaration.type === "TSTypeAliasDeclaration" || isDeclare)) {
  84608. node.exportKind = "type";
  84609. }
  84610. if (declaration && isDeclare) {
  84611. this.resetStartLocation(declaration, startPos, startLoc);
  84612. declaration.declare = true;
  84613. }
  84614. return declaration;
  84615. }
  84616. parseClassId(node, isStatement, optionalId) {
  84617. if ((!isStatement || optionalId) && this.isContextual("implements")) {
  84618. return;
  84619. }
  84620. super.parseClassId(node, isStatement, optionalId, node.declare ? BIND_TS_AMBIENT : BIND_CLASS);
  84621. const typeParameters = this.tsTryParseTypeParameters();
  84622. if (typeParameters)
  84623. node.typeParameters = typeParameters;
  84624. }
  84625. parseClassPropertyAnnotation(node) {
  84626. if (!node.optional && this.eat(types$12.bang)) {
  84627. node.definite = true;
  84628. }
  84629. const type = this.tsTryParseTypeAnnotation();
  84630. if (type)
  84631. node.typeAnnotation = type;
  84632. }
  84633. parseClassProperty(node) {
  84634. this.parseClassPropertyAnnotation(node);
  84635. if (this.state.isAmbientContext && this.match(types$12.eq)) {
  84636. this.raise(this.state.start, TSErrors.DeclareClassFieldHasInitializer);
  84637. }
  84638. return super.parseClassProperty(node);
  84639. }
  84640. parseClassPrivateProperty(node) {
  84641. if (node.abstract) {
  84642. this.raise(node.start, TSErrors.PrivateElementHasAbstract);
  84643. }
  84644. if (node.accessibility) {
  84645. this.raise(node.start, TSErrors.PrivateElementHasAccessibility, node.accessibility);
  84646. }
  84647. this.parseClassPropertyAnnotation(node);
  84648. return super.parseClassPrivateProperty(node);
  84649. }
  84650. pushClassMethod(classBody, method, isGenerator, isAsync, isConstructor, allowsDirectSuper) {
  84651. const typeParameters = this.tsTryParseTypeParameters();
  84652. if (typeParameters && isConstructor) {
  84653. this.raise(typeParameters.start, TSErrors.ConstructorHasTypeParameters);
  84654. }
  84655. if (method.declare && (method.kind === "get" || method.kind === "set")) {
  84656. this.raise(method.start, TSErrors.DeclareAccessor, method.kind);
  84657. }
  84658. if (typeParameters)
  84659. method.typeParameters = typeParameters;
  84660. super.pushClassMethod(classBody, method, isGenerator, isAsync, isConstructor, allowsDirectSuper);
  84661. }
  84662. pushClassPrivateMethod(classBody, method, isGenerator, isAsync) {
  84663. const typeParameters = this.tsTryParseTypeParameters();
  84664. if (typeParameters)
  84665. method.typeParameters = typeParameters;
  84666. super.pushClassPrivateMethod(classBody, method, isGenerator, isAsync);
  84667. }
  84668. parseClassSuper(node) {
  84669. super.parseClassSuper(node);
  84670. if (node.superClass && this.isRelational("<")) {
  84671. node.superTypeParameters = this.tsParseTypeArguments();
  84672. }
  84673. if (this.eatContextual("implements")) {
  84674. node.implements = this.tsParseHeritageClause("implements");
  84675. }
  84676. }
  84677. parseObjPropValue(prop, ...args) {
  84678. const typeParameters = this.tsTryParseTypeParameters();
  84679. if (typeParameters)
  84680. prop.typeParameters = typeParameters;
  84681. super.parseObjPropValue(prop, ...args);
  84682. }
  84683. parseFunctionParams(node, allowModifiers) {
  84684. const typeParameters = this.tsTryParseTypeParameters();
  84685. if (typeParameters)
  84686. node.typeParameters = typeParameters;
  84687. super.parseFunctionParams(node, allowModifiers);
  84688. }
  84689. parseVarId(decl, kind) {
  84690. super.parseVarId(decl, kind);
  84691. if (decl.id.type === "Identifier" && this.eat(types$12.bang)) {
  84692. decl.definite = true;
  84693. }
  84694. const type = this.tsTryParseTypeAnnotation();
  84695. if (type) {
  84696. decl.id.typeAnnotation = type;
  84697. this.resetEndLocation(decl.id);
  84698. }
  84699. }
  84700. parseAsyncArrowFromCallExpression(node, call) {
  84701. if (this.match(types$12.colon)) {
  84702. node.returnType = this.tsParseTypeAnnotation();
  84703. }
  84704. return super.parseAsyncArrowFromCallExpression(node, call);
  84705. }
  84706. parseMaybeAssign(...args) {
  84707. var _jsx, _jsx2, _typeCast, _jsx3, _typeCast2, _jsx4, _typeCast3;
  84708. let state;
  84709. let jsx2;
  84710. let typeCast;
  84711. if (this.hasPlugin("jsx") && (this.match(types$12.jsxTagStart) || this.isRelational("<"))) {
  84712. state = this.state.clone();
  84713. jsx2 = this.tryParse(() => super.parseMaybeAssign(...args), state);
  84714. if (!jsx2.error)
  84715. return jsx2.node;
  84716. const {
  84717. context
  84718. } = this.state;
  84719. if (context[context.length - 1] === types2.j_oTag) {
  84720. context.length -= 2;
  84721. } else if (context[context.length - 1] === types2.j_expr) {
  84722. context.length -= 1;
  84723. }
  84724. }
  84725. if (!((_jsx = jsx2) != null && _jsx.error) && !this.isRelational("<")) {
  84726. return super.parseMaybeAssign(...args);
  84727. }
  84728. let typeParameters;
  84729. state = state || this.state.clone();
  84730. const arrow = this.tryParse((abort) => {
  84731. var _expr$extra, _typeParameters;
  84732. typeParameters = this.tsParseTypeParameters();
  84733. const expr = super.parseMaybeAssign(...args);
  84734. if (expr.type !== "ArrowFunctionExpression" || (_expr$extra = expr.extra) != null && _expr$extra.parenthesized) {
  84735. abort();
  84736. }
  84737. if (((_typeParameters = typeParameters) == null ? void 0 : _typeParameters.params.length) !== 0) {
  84738. this.resetStartLocationFromNode(expr, typeParameters);
  84739. }
  84740. expr.typeParameters = typeParameters;
  84741. return expr;
  84742. }, state);
  84743. if (!arrow.error && !arrow.aborted)
  84744. return arrow.node;
  84745. if (!jsx2) {
  84746. assert(!this.hasPlugin("jsx"));
  84747. typeCast = this.tryParse(() => super.parseMaybeAssign(...args), state);
  84748. if (!typeCast.error)
  84749. return typeCast.node;
  84750. }
  84751. if ((_jsx2 = jsx2) != null && _jsx2.node) {
  84752. this.state = jsx2.failState;
  84753. return jsx2.node;
  84754. }
  84755. if (arrow.node) {
  84756. this.state = arrow.failState;
  84757. return arrow.node;
  84758. }
  84759. if ((_typeCast = typeCast) != null && _typeCast.node) {
  84760. this.state = typeCast.failState;
  84761. return typeCast.node;
  84762. }
  84763. if ((_jsx3 = jsx2) != null && _jsx3.thrown)
  84764. throw jsx2.error;
  84765. if (arrow.thrown)
  84766. throw arrow.error;
  84767. if ((_typeCast2 = typeCast) != null && _typeCast2.thrown)
  84768. throw typeCast.error;
  84769. throw ((_jsx4 = jsx2) == null ? void 0 : _jsx4.error) || arrow.error || ((_typeCast3 = typeCast) == null ? void 0 : _typeCast3.error);
  84770. }
  84771. parseMaybeUnary(refExpressionErrors) {
  84772. if (!this.hasPlugin("jsx") && this.isRelational("<")) {
  84773. return this.tsParseTypeAssertion();
  84774. } else {
  84775. return super.parseMaybeUnary(refExpressionErrors);
  84776. }
  84777. }
  84778. parseArrow(node) {
  84779. if (this.match(types$12.colon)) {
  84780. const result = this.tryParse((abort) => {
  84781. const returnType = this.tsParseTypeOrTypePredicateAnnotation(types$12.colon);
  84782. if (this.canInsertSemicolon() || !this.match(types$12.arrow))
  84783. abort();
  84784. return returnType;
  84785. });
  84786. if (result.aborted)
  84787. return;
  84788. if (!result.thrown) {
  84789. if (result.error)
  84790. this.state = result.failState;
  84791. node.returnType = result.node;
  84792. }
  84793. }
  84794. return super.parseArrow(node);
  84795. }
  84796. parseAssignableListItemTypes(param) {
  84797. if (this.eat(types$12.question)) {
  84798. if (param.type !== "Identifier" && !this.state.isAmbientContext && !this.state.inType) {
  84799. this.raise(param.start, TSErrors.PatternIsOptional);
  84800. }
  84801. param.optional = true;
  84802. }
  84803. const type = this.tsTryParseTypeAnnotation();
  84804. if (type)
  84805. param.typeAnnotation = type;
  84806. this.resetEndLocation(param);
  84807. return param;
  84808. }
  84809. toAssignable(node, isLHS = false) {
  84810. switch (node.type) {
  84811. case "TSTypeCastExpression":
  84812. return super.toAssignable(this.typeCastToParameter(node), isLHS);
  84813. case "TSParameterProperty":
  84814. return super.toAssignable(node, isLHS);
  84815. case "ParenthesizedExpression":
  84816. return this.toAssignableParenthesizedExpression(node, isLHS);
  84817. case "TSAsExpression":
  84818. case "TSNonNullExpression":
  84819. case "TSTypeAssertion":
  84820. node.expression = this.toAssignable(node.expression, isLHS);
  84821. return node;
  84822. default:
  84823. return super.toAssignable(node, isLHS);
  84824. }
  84825. }
  84826. toAssignableParenthesizedExpression(node, isLHS) {
  84827. switch (node.expression.type) {
  84828. case "TSAsExpression":
  84829. case "TSNonNullExpression":
  84830. case "TSTypeAssertion":
  84831. case "ParenthesizedExpression":
  84832. node.expression = this.toAssignable(node.expression, isLHS);
  84833. return node;
  84834. default:
  84835. return super.toAssignable(node, isLHS);
  84836. }
  84837. }
  84838. checkLVal(expr, contextDescription, ...args) {
  84839. var _expr$extra2;
  84840. switch (expr.type) {
  84841. case "TSTypeCastExpression":
  84842. return;
  84843. case "TSParameterProperty":
  84844. this.checkLVal(expr.parameter, "parameter property", ...args);
  84845. return;
  84846. case "TSAsExpression":
  84847. case "TSTypeAssertion":
  84848. if (!args[0] && contextDescription !== "parenthesized expression" && !((_expr$extra2 = expr.extra) != null && _expr$extra2.parenthesized)) {
  84849. this.raise(expr.start, ErrorMessages.InvalidLhs, contextDescription);
  84850. break;
  84851. }
  84852. this.checkLVal(expr.expression, "parenthesized expression", ...args);
  84853. return;
  84854. case "TSNonNullExpression":
  84855. this.checkLVal(expr.expression, contextDescription, ...args);
  84856. return;
  84857. default:
  84858. super.checkLVal(expr, contextDescription, ...args);
  84859. return;
  84860. }
  84861. }
  84862. parseBindingAtom() {
  84863. switch (this.state.type) {
  84864. case types$12._this:
  84865. return this.parseIdentifier(true);
  84866. default:
  84867. return super.parseBindingAtom();
  84868. }
  84869. }
  84870. parseMaybeDecoratorArguments(expr) {
  84871. if (this.isRelational("<")) {
  84872. const typeArguments = this.tsParseTypeArguments();
  84873. if (this.match(types$12.parenL)) {
  84874. const call = super.parseMaybeDecoratorArguments(expr);
  84875. call.typeParameters = typeArguments;
  84876. return call;
  84877. }
  84878. this.unexpected(this.state.start, types$12.parenL);
  84879. }
  84880. return super.parseMaybeDecoratorArguments(expr);
  84881. }
  84882. checkCommaAfterRest(close) {
  84883. if (this.state.isAmbientContext && this.match(types$12.comma) && this.lookaheadCharCode() === close) {
  84884. this.next();
  84885. } else {
  84886. super.checkCommaAfterRest(close);
  84887. }
  84888. }
  84889. isClassMethod() {
  84890. return this.isRelational("<") || super.isClassMethod();
  84891. }
  84892. isClassProperty() {
  84893. return this.match(types$12.bang) || this.match(types$12.colon) || super.isClassProperty();
  84894. }
  84895. parseMaybeDefault(...args) {
  84896. const node = super.parseMaybeDefault(...args);
  84897. if (node.type === "AssignmentPattern" && node.typeAnnotation && node.right.start < node.typeAnnotation.start) {
  84898. this.raise(node.typeAnnotation.start, TSErrors.TypeAnnotationAfterAssign);
  84899. }
  84900. return node;
  84901. }
  84902. getTokenFromCode(code2) {
  84903. if (this.state.inType && (code2 === 62 || code2 === 60)) {
  84904. return this.finishOp(types$12.relational, 1);
  84905. } else {
  84906. return super.getTokenFromCode(code2);
  84907. }
  84908. }
  84909. reScan_lt_gt() {
  84910. if (this.match(types$12.relational)) {
  84911. const code2 = this.input.charCodeAt(this.state.start);
  84912. if (code2 === 60 || code2 === 62) {
  84913. this.state.pos -= 1;
  84914. this.readToken_lt_gt(code2);
  84915. }
  84916. }
  84917. }
  84918. toAssignableList(exprList) {
  84919. for (let i = 0; i < exprList.length; i++) {
  84920. const expr = exprList[i];
  84921. if (!expr)
  84922. continue;
  84923. switch (expr.type) {
  84924. case "TSTypeCastExpression":
  84925. exprList[i] = this.typeCastToParameter(expr);
  84926. break;
  84927. case "TSAsExpression":
  84928. case "TSTypeAssertion":
  84929. if (!this.state.maybeInArrowParameters) {
  84930. exprList[i] = this.typeCastToParameter(expr);
  84931. } else {
  84932. this.raise(expr.start, TSErrors.UnexpectedTypeCastInParameter);
  84933. }
  84934. break;
  84935. }
  84936. }
  84937. return super.toAssignableList(...arguments);
  84938. }
  84939. typeCastToParameter(node) {
  84940. node.expression.typeAnnotation = node.typeAnnotation;
  84941. this.resetEndLocation(node.expression, node.typeAnnotation.end, node.typeAnnotation.loc.end);
  84942. return node.expression;
  84943. }
  84944. shouldParseArrow() {
  84945. return this.match(types$12.colon) || super.shouldParseArrow();
  84946. }
  84947. shouldParseAsyncArrow() {
  84948. return this.match(types$12.colon) || super.shouldParseAsyncArrow();
  84949. }
  84950. canHaveLeadingDecorator() {
  84951. return super.canHaveLeadingDecorator() || this.isAbstractClass();
  84952. }
  84953. jsxParseOpeningElementAfterName(node) {
  84954. if (this.isRelational("<")) {
  84955. const typeArguments = this.tsTryParseAndCatch(() => this.tsParseTypeArguments());
  84956. if (typeArguments)
  84957. node.typeParameters = typeArguments;
  84958. }
  84959. return super.jsxParseOpeningElementAfterName(node);
  84960. }
  84961. getGetterSetterExpectedParamCount(method) {
  84962. const baseCount = super.getGetterSetterExpectedParamCount(method);
  84963. const params = this.getObjectOrClassMethodParams(method);
  84964. const firstParam = params[0];
  84965. const hasContextParam = firstParam && this.isThisParam(firstParam);
  84966. return hasContextParam ? baseCount + 1 : baseCount;
  84967. }
  84968. parseCatchClauseParam() {
  84969. const param = super.parseCatchClauseParam();
  84970. const type = this.tsTryParseTypeAnnotation();
  84971. if (type) {
  84972. param.typeAnnotation = type;
  84973. this.resetEndLocation(param);
  84974. }
  84975. return param;
  84976. }
  84977. tsInAmbientContext(cb) {
  84978. const oldIsAmbientContext = this.state.isAmbientContext;
  84979. this.state.isAmbientContext = true;
  84980. try {
  84981. return cb();
  84982. } finally {
  84983. this.state.isAmbientContext = oldIsAmbientContext;
  84984. }
  84985. }
  84986. parseClass(node, ...args) {
  84987. const oldInAbstractClass = this.state.inAbstractClass;
  84988. this.state.inAbstractClass = !!node.abstract;
  84989. try {
  84990. return super.parseClass(node, ...args);
  84991. } finally {
  84992. this.state.inAbstractClass = oldInAbstractClass;
  84993. }
  84994. }
  84995. tsParseAbstractDeclaration(node) {
  84996. if (this.match(types$12._class)) {
  84997. node.abstract = true;
  84998. return this.parseClass(node, true, false);
  84999. } else if (this.isContextual("interface")) {
  85000. if (!this.hasFollowingLineBreak()) {
  85001. node.abstract = true;
  85002. this.raise(node.start, TSErrors.NonClassMethodPropertyHasAbstractModifer);
  85003. this.next();
  85004. return this.tsParseInterfaceDeclaration(node);
  85005. }
  85006. } else {
  85007. this.unexpected(null, types$12._class);
  85008. }
  85009. }
  85010. parseMethod(...args) {
  85011. const method = super.parseMethod(...args);
  85012. if (method.abstract) {
  85013. const hasBody = this.hasPlugin("estree") ? !!method.value.body : !!method.body;
  85014. if (hasBody) {
  85015. const {
  85016. key
  85017. } = method;
  85018. this.raise(method.start, TSErrors.AbstractMethodHasImplementation, key.type === "Identifier" ? key.name : `[${this.input.slice(key.start, key.end)}]`);
  85019. }
  85020. }
  85021. return method;
  85022. }
  85023. tsParseTypeParameterName() {
  85024. const typeName = this.parseIdentifier();
  85025. return typeName.name;
  85026. }
  85027. shouldParseAsAmbientContext() {
  85028. return !!this.getPluginOption("typescript", "dts");
  85029. }
  85030. parse() {
  85031. if (this.shouldParseAsAmbientContext()) {
  85032. this.state.isAmbientContext = true;
  85033. }
  85034. return super.parse();
  85035. }
  85036. getExpression() {
  85037. if (this.shouldParseAsAmbientContext()) {
  85038. this.state.isAmbientContext = true;
  85039. }
  85040. return super.getExpression();
  85041. }
  85042. };
  85043. types$12.placeholder = new TokenType3("%%", {
  85044. startsExpr: true
  85045. });
  85046. var PlaceHolderErrors = makeErrorTemplates({
  85047. ClassNameIsRequired: "A class name is required."
  85048. }, ErrorCodes.SyntaxError);
  85049. var placeholders = (superClass) => class extends superClass {
  85050. parsePlaceholder(expectedNode) {
  85051. if (this.match(types$12.placeholder)) {
  85052. const node = this.startNode();
  85053. this.next();
  85054. this.assertNoSpace("Unexpected space in placeholder.");
  85055. node.name = super.parseIdentifier(true);
  85056. this.assertNoSpace("Unexpected space in placeholder.");
  85057. this.expect(types$12.placeholder);
  85058. return this.finishPlaceholder(node, expectedNode);
  85059. }
  85060. }
  85061. finishPlaceholder(node, expectedNode) {
  85062. const isFinished = !!(node.expectedNode && node.type === "Placeholder");
  85063. node.expectedNode = expectedNode;
  85064. return isFinished ? node : this.finishNode(node, "Placeholder");
  85065. }
  85066. getTokenFromCode(code2) {
  85067. if (code2 === 37 && this.input.charCodeAt(this.state.pos + 1) === 37) {
  85068. return this.finishOp(types$12.placeholder, 2);
  85069. }
  85070. return super.getTokenFromCode(...arguments);
  85071. }
  85072. parseExprAtom() {
  85073. return this.parsePlaceholder("Expression") || super.parseExprAtom(...arguments);
  85074. }
  85075. parseIdentifier() {
  85076. return this.parsePlaceholder("Identifier") || super.parseIdentifier(...arguments);
  85077. }
  85078. checkReservedWord(word) {
  85079. if (word !== void 0)
  85080. super.checkReservedWord(...arguments);
  85081. }
  85082. parseBindingAtom() {
  85083. return this.parsePlaceholder("Pattern") || super.parseBindingAtom(...arguments);
  85084. }
  85085. checkLVal(expr) {
  85086. if (expr.type !== "Placeholder")
  85087. super.checkLVal(...arguments);
  85088. }
  85089. toAssignable(node) {
  85090. if (node && node.type === "Placeholder" && node.expectedNode === "Expression") {
  85091. node.expectedNode = "Pattern";
  85092. return node;
  85093. }
  85094. return super.toAssignable(...arguments);
  85095. }
  85096. isLet(context) {
  85097. if (super.isLet(context)) {
  85098. return true;
  85099. }
  85100. if (!this.isContextual("let")) {
  85101. return false;
  85102. }
  85103. if (context)
  85104. return false;
  85105. const nextToken = this.lookahead();
  85106. if (nextToken.type === types$12.placeholder) {
  85107. return true;
  85108. }
  85109. return false;
  85110. }
  85111. verifyBreakContinue(node) {
  85112. if (node.label && node.label.type === "Placeholder")
  85113. return;
  85114. super.verifyBreakContinue(...arguments);
  85115. }
  85116. parseExpressionStatement(node, expr) {
  85117. if (expr.type !== "Placeholder" || expr.extra && expr.extra.parenthesized) {
  85118. return super.parseExpressionStatement(...arguments);
  85119. }
  85120. if (this.match(types$12.colon)) {
  85121. const stmt = node;
  85122. stmt.label = this.finishPlaceholder(expr, "Identifier");
  85123. this.next();
  85124. stmt.body = this.parseStatement("label");
  85125. return this.finishNode(stmt, "LabeledStatement");
  85126. }
  85127. this.semicolon();
  85128. node.name = expr.name;
  85129. return this.finishPlaceholder(node, "Statement");
  85130. }
  85131. parseBlock() {
  85132. return this.parsePlaceholder("BlockStatement") || super.parseBlock(...arguments);
  85133. }
  85134. parseFunctionId() {
  85135. return this.parsePlaceholder("Identifier") || super.parseFunctionId(...arguments);
  85136. }
  85137. parseClass(node, isStatement, optionalId) {
  85138. const type = isStatement ? "ClassDeclaration" : "ClassExpression";
  85139. this.next();
  85140. this.takeDecorators(node);
  85141. const oldStrict = this.state.strict;
  85142. const placeholder = this.parsePlaceholder("Identifier");
  85143. if (placeholder) {
  85144. if (this.match(types$12._extends) || this.match(types$12.placeholder) || this.match(types$12.braceL)) {
  85145. node.id = placeholder;
  85146. } else if (optionalId || !isStatement) {
  85147. node.id = null;
  85148. node.body = this.finishPlaceholder(placeholder, "ClassBody");
  85149. return this.finishNode(node, type);
  85150. } else {
  85151. this.unexpected(null, PlaceHolderErrors.ClassNameIsRequired);
  85152. }
  85153. } else {
  85154. this.parseClassId(node, isStatement, optionalId);
  85155. }
  85156. this.parseClassSuper(node);
  85157. node.body = this.parsePlaceholder("ClassBody") || this.parseClassBody(!!node.superClass, oldStrict);
  85158. return this.finishNode(node, type);
  85159. }
  85160. parseExport(node) {
  85161. const placeholder = this.parsePlaceholder("Identifier");
  85162. if (!placeholder)
  85163. return super.parseExport(...arguments);
  85164. if (!this.isContextual("from") && !this.match(types$12.comma)) {
  85165. node.specifiers = [];
  85166. node.source = null;
  85167. node.declaration = this.finishPlaceholder(placeholder, "Declaration");
  85168. return this.finishNode(node, "ExportNamedDeclaration");
  85169. }
  85170. this.expectPlugin("exportDefaultFrom");
  85171. const specifier = this.startNode();
  85172. specifier.exported = placeholder;
  85173. node.specifiers = [this.finishNode(specifier, "ExportDefaultSpecifier")];
  85174. return super.parseExport(node);
  85175. }
  85176. isExportDefaultSpecifier() {
  85177. if (this.match(types$12._default)) {
  85178. const next = this.nextTokenStart();
  85179. if (this.isUnparsedContextual(next, "from")) {
  85180. if (this.input.startsWith(types$12.placeholder.label, this.nextTokenStartSince(next + 4))) {
  85181. return true;
  85182. }
  85183. }
  85184. }
  85185. return super.isExportDefaultSpecifier();
  85186. }
  85187. maybeParseExportDefaultSpecifier(node) {
  85188. if (node.specifiers && node.specifiers.length > 0) {
  85189. return true;
  85190. }
  85191. return super.maybeParseExportDefaultSpecifier(...arguments);
  85192. }
  85193. checkExport(node) {
  85194. const {
  85195. specifiers
  85196. } = node;
  85197. if (specifiers != null && specifiers.length) {
  85198. node.specifiers = specifiers.filter((node2) => node2.exported.type === "Placeholder");
  85199. }
  85200. super.checkExport(node);
  85201. node.specifiers = specifiers;
  85202. }
  85203. parseImport(node) {
  85204. const placeholder = this.parsePlaceholder("Identifier");
  85205. if (!placeholder)
  85206. return super.parseImport(...arguments);
  85207. node.specifiers = [];
  85208. if (!this.isContextual("from") && !this.match(types$12.comma)) {
  85209. node.source = this.finishPlaceholder(placeholder, "StringLiteral");
  85210. this.semicolon();
  85211. return this.finishNode(node, "ImportDeclaration");
  85212. }
  85213. const specifier = this.startNodeAtNode(placeholder);
  85214. specifier.local = placeholder;
  85215. this.finishNode(specifier, "ImportDefaultSpecifier");
  85216. node.specifiers.push(specifier);
  85217. if (this.eat(types$12.comma)) {
  85218. const hasStarImport = this.maybeParseStarImportSpecifier(node);
  85219. if (!hasStarImport)
  85220. this.parseNamedImportSpecifiers(node);
  85221. }
  85222. this.expectContextual("from");
  85223. node.source = this.parseImportSource();
  85224. this.semicolon();
  85225. return this.finishNode(node, "ImportDeclaration");
  85226. }
  85227. parseImportSource() {
  85228. return this.parsePlaceholder("StringLiteral") || super.parseImportSource(...arguments);
  85229. }
  85230. };
  85231. var v8intrinsic = (superClass) => class extends superClass {
  85232. parseV8Intrinsic() {
  85233. if (this.match(types$12.modulo)) {
  85234. const v8IntrinsicStart = this.state.start;
  85235. const node = this.startNode();
  85236. this.eat(types$12.modulo);
  85237. if (this.match(types$12.name)) {
  85238. const name2 = this.parseIdentifierName(this.state.start);
  85239. const identifier = this.createIdentifier(node, name2);
  85240. identifier.type = "V8IntrinsicIdentifier";
  85241. if (this.match(types$12.parenL)) {
  85242. return identifier;
  85243. }
  85244. }
  85245. this.unexpected(v8IntrinsicStart);
  85246. }
  85247. }
  85248. parseExprAtom() {
  85249. return this.parseV8Intrinsic() || super.parseExprAtom(...arguments);
  85250. }
  85251. };
  85252. function hasPlugin(plugins, name2) {
  85253. return plugins.some((plugin2) => {
  85254. if (Array.isArray(plugin2)) {
  85255. return plugin2[0] === name2;
  85256. } else {
  85257. return plugin2 === name2;
  85258. }
  85259. });
  85260. }
  85261. function getPluginOption(plugins, name2, option) {
  85262. const plugin2 = plugins.find((plugin3) => {
  85263. if (Array.isArray(plugin3)) {
  85264. return plugin3[0] === name2;
  85265. } else {
  85266. return plugin3 === name2;
  85267. }
  85268. });
  85269. if (plugin2 && Array.isArray(plugin2)) {
  85270. return plugin2[1][option];
  85271. }
  85272. return null;
  85273. }
  85274. var PIPELINE_PROPOSALS = ["minimal", "smart", "fsharp"];
  85275. var RECORD_AND_TUPLE_SYNTAX_TYPES = ["hash", "bar"];
  85276. function validatePlugins(plugins) {
  85277. if (hasPlugin(plugins, "decorators")) {
  85278. if (hasPlugin(plugins, "decorators-legacy")) {
  85279. throw new Error("Cannot use the decorators and decorators-legacy plugin together");
  85280. }
  85281. const decoratorsBeforeExport = getPluginOption(plugins, "decorators", "decoratorsBeforeExport");
  85282. if (decoratorsBeforeExport == null) {
  85283. throw new Error("The 'decorators' plugin requires a 'decoratorsBeforeExport' option, whose value must be a boolean. If you are migrating from Babylon/Babel 6 or want to use the old decorators proposal, you should use the 'decorators-legacy' plugin instead of 'decorators'.");
  85284. } else if (typeof decoratorsBeforeExport !== "boolean") {
  85285. throw new Error("'decoratorsBeforeExport' must be a boolean.");
  85286. }
  85287. }
  85288. if (hasPlugin(plugins, "flow") && hasPlugin(plugins, "typescript")) {
  85289. throw new Error("Cannot combine flow and typescript plugins.");
  85290. }
  85291. if (hasPlugin(plugins, "placeholders") && hasPlugin(plugins, "v8intrinsic")) {
  85292. throw new Error("Cannot combine placeholders and v8intrinsic plugins.");
  85293. }
  85294. if (hasPlugin(plugins, "pipelineOperator") && !PIPELINE_PROPOSALS.includes(getPluginOption(plugins, "pipelineOperator", "proposal"))) {
  85295. throw new Error("'pipelineOperator' requires 'proposal' option whose value should be one of: " + PIPELINE_PROPOSALS.map((p) => `'${p}'`).join(", "));
  85296. }
  85297. if (hasPlugin(plugins, "moduleAttributes")) {
  85298. {
  85299. if (hasPlugin(plugins, "importAssertions")) {
  85300. throw new Error("Cannot combine importAssertions and moduleAttributes plugins.");
  85301. }
  85302. const moduleAttributesVerionPluginOption = getPluginOption(plugins, "moduleAttributes", "version");
  85303. if (moduleAttributesVerionPluginOption !== "may-2020") {
  85304. throw new Error("The 'moduleAttributes' plugin requires a 'version' option, representing the last proposal update. Currently, the only supported value is 'may-2020'.");
  85305. }
  85306. }
  85307. }
  85308. if (hasPlugin(plugins, "recordAndTuple") && !RECORD_AND_TUPLE_SYNTAX_TYPES.includes(getPluginOption(plugins, "recordAndTuple", "syntaxType"))) {
  85309. throw new Error("'recordAndTuple' requires 'syntaxType' option whose value should be one of: " + RECORD_AND_TUPLE_SYNTAX_TYPES.map((p) => `'${p}'`).join(", "));
  85310. }
  85311. if (hasPlugin(plugins, "asyncDoExpressions") && !hasPlugin(plugins, "doExpressions")) {
  85312. const error = new Error("'asyncDoExpressions' requires 'doExpressions', please add 'doExpressions' to parser plugins.");
  85313. error.missingPlugins = "doExpressions";
  85314. throw error;
  85315. }
  85316. }
  85317. var mixinPlugins = {
  85318. estree,
  85319. jsx,
  85320. flow: flow3,
  85321. typescript,
  85322. v8intrinsic,
  85323. placeholders
  85324. };
  85325. var mixinPluginNames = Object.keys(mixinPlugins);
  85326. var defaultOptions2 = {
  85327. sourceType: "script",
  85328. sourceFilename: void 0,
  85329. startLine: 1,
  85330. allowAwaitOutsideFunction: false,
  85331. allowReturnOutsideFunction: false,
  85332. allowImportExportEverywhere: false,
  85333. allowSuperOutsideMethod: false,
  85334. allowUndeclaredExports: false,
  85335. plugins: [],
  85336. strictMode: null,
  85337. ranges: false,
  85338. tokens: false,
  85339. createParenthesizedExpressions: false,
  85340. errorRecovery: false
  85341. };
  85342. function getOptions2(opts) {
  85343. const options = {};
  85344. for (const key of Object.keys(defaultOptions2)) {
  85345. options[key] = opts && opts[key] != null ? opts[key] : defaultOptions2[key];
  85346. }
  85347. return options;
  85348. }
  85349. var _isDigit = function isDigit(code2) {
  85350. return code2 >= 48 && code2 <= 57;
  85351. };
  85352. var VALID_REGEX_FLAGS = /* @__PURE__ */ new Set([103, 109, 115, 105, 121, 117, 100]);
  85353. var forbiddenNumericSeparatorSiblings = {
  85354. decBinOct: [46, 66, 69, 79, 95, 98, 101, 111],
  85355. hex: [46, 88, 95, 120]
  85356. };
  85357. var allowedNumericSeparatorSiblings = {};
  85358. allowedNumericSeparatorSiblings.bin = [48, 49];
  85359. allowedNumericSeparatorSiblings.oct = [...allowedNumericSeparatorSiblings.bin, 50, 51, 52, 53, 54, 55];
  85360. allowedNumericSeparatorSiblings.dec = [...allowedNumericSeparatorSiblings.oct, 56, 57];
  85361. allowedNumericSeparatorSiblings.hex = [...allowedNumericSeparatorSiblings.dec, 65, 66, 67, 68, 69, 70, 97, 98, 99, 100, 101, 102];
  85362. var Token3 = class {
  85363. constructor(state) {
  85364. this.type = state.type;
  85365. this.value = state.value;
  85366. this.start = state.start;
  85367. this.end = state.end;
  85368. this.loc = new SourceLocation3(state.startLoc, state.endLoc);
  85369. }
  85370. };
  85371. var Tokenizer = class extends ParserError {
  85372. constructor(options, input) {
  85373. super();
  85374. this.isLookahead = void 0;
  85375. this.tokens = [];
  85376. this.state = new State2();
  85377. this.state.init(options);
  85378. this.input = input;
  85379. this.length = input.length;
  85380. this.isLookahead = false;
  85381. }
  85382. pushToken(token) {
  85383. this.tokens.length = this.state.tokensLength;
  85384. this.tokens.push(token);
  85385. ++this.state.tokensLength;
  85386. }
  85387. next() {
  85388. this.checkKeywordEscapes();
  85389. if (this.options.tokens) {
  85390. this.pushToken(new Token3(this.state));
  85391. }
  85392. this.state.lastTokEnd = this.state.end;
  85393. this.state.lastTokStart = this.state.start;
  85394. this.state.lastTokEndLoc = this.state.endLoc;
  85395. this.state.lastTokStartLoc = this.state.startLoc;
  85396. this.nextToken();
  85397. }
  85398. eat(type) {
  85399. if (this.match(type)) {
  85400. this.next();
  85401. return true;
  85402. } else {
  85403. return false;
  85404. }
  85405. }
  85406. match(type) {
  85407. return this.state.type === type;
  85408. }
  85409. createLookaheadState(state) {
  85410. return {
  85411. pos: state.pos,
  85412. value: null,
  85413. type: state.type,
  85414. start: state.start,
  85415. end: state.end,
  85416. lastTokEnd: state.end,
  85417. context: [this.curContext()],
  85418. inType: state.inType
  85419. };
  85420. }
  85421. lookahead() {
  85422. const old = this.state;
  85423. this.state = this.createLookaheadState(old);
  85424. this.isLookahead = true;
  85425. this.nextToken();
  85426. this.isLookahead = false;
  85427. const curr = this.state;
  85428. this.state = old;
  85429. return curr;
  85430. }
  85431. nextTokenStart() {
  85432. return this.nextTokenStartSince(this.state.pos);
  85433. }
  85434. nextTokenStartSince(pos) {
  85435. skipWhiteSpace2.lastIndex = pos;
  85436. const skip = skipWhiteSpace2.exec(this.input);
  85437. return pos + skip[0].length;
  85438. }
  85439. lookaheadCharCode() {
  85440. return this.input.charCodeAt(this.nextTokenStart());
  85441. }
  85442. codePointAtPos(pos) {
  85443. let cp = this.input.charCodeAt(pos);
  85444. if ((cp & 64512) === 55296 && ++pos < this.input.length) {
  85445. const trail = this.input.charCodeAt(pos);
  85446. if ((trail & 64512) === 56320) {
  85447. cp = 65536 + ((cp & 1023) << 10) + (trail & 1023);
  85448. }
  85449. }
  85450. return cp;
  85451. }
  85452. setStrict(strict) {
  85453. this.state.strict = strict;
  85454. if (strict) {
  85455. this.state.strictErrors.forEach((message, pos) => this.raise(pos, message));
  85456. this.state.strictErrors.clear();
  85457. }
  85458. }
  85459. curContext() {
  85460. return this.state.context[this.state.context.length - 1];
  85461. }
  85462. nextToken() {
  85463. const curContext = this.curContext();
  85464. if (!curContext.preserveSpace)
  85465. this.skipSpace();
  85466. this.state.start = this.state.pos;
  85467. if (!this.isLookahead)
  85468. this.state.startLoc = this.state.curPosition();
  85469. if (this.state.pos >= this.length) {
  85470. this.finishToken(types$12.eof);
  85471. return;
  85472. }
  85473. if (curContext === types2.template) {
  85474. this.readTmplToken();
  85475. } else {
  85476. this.getTokenFromCode(this.codePointAtPos(this.state.pos));
  85477. }
  85478. }
  85479. skipBlockComment() {
  85480. let startLoc;
  85481. if (!this.isLookahead)
  85482. startLoc = this.state.curPosition();
  85483. const start3 = this.state.pos;
  85484. const end = this.input.indexOf("*/", this.state.pos + 2);
  85485. if (end === -1)
  85486. throw this.raise(start3, ErrorMessages.UnterminatedComment);
  85487. this.state.pos = end + 2;
  85488. lineBreakG2.lastIndex = start3;
  85489. let match;
  85490. while ((match = lineBreakG2.exec(this.input)) && match.index < this.state.pos) {
  85491. ++this.state.curLine;
  85492. this.state.lineStart = match.index + match[0].length;
  85493. }
  85494. if (this.isLookahead)
  85495. return;
  85496. const value = this.input.slice(start3 + 2, end);
  85497. const comment2 = {
  85498. type: "CommentBlock",
  85499. value,
  85500. start: start3,
  85501. end: end + 2,
  85502. loc: new SourceLocation3(startLoc, this.state.curPosition())
  85503. };
  85504. if (this.options.tokens)
  85505. this.pushToken(comment2);
  85506. return comment2;
  85507. }
  85508. skipLineComment(startSkip) {
  85509. const start3 = this.state.pos;
  85510. let startLoc;
  85511. if (!this.isLookahead)
  85512. startLoc = this.state.curPosition();
  85513. let ch = this.input.charCodeAt(this.state.pos += startSkip);
  85514. if (this.state.pos < this.length) {
  85515. while (!isNewLine2(ch) && ++this.state.pos < this.length) {
  85516. ch = this.input.charCodeAt(this.state.pos);
  85517. }
  85518. }
  85519. if (this.isLookahead)
  85520. return;
  85521. const end = this.state.pos;
  85522. const value = this.input.slice(start3 + startSkip, end);
  85523. const comment2 = {
  85524. type: "CommentLine",
  85525. value,
  85526. start: start3,
  85527. end,
  85528. loc: new SourceLocation3(startLoc, this.state.curPosition())
  85529. };
  85530. if (this.options.tokens)
  85531. this.pushToken(comment2);
  85532. return comment2;
  85533. }
  85534. skipSpace() {
  85535. const spaceStart = this.state.pos;
  85536. const comments = [];
  85537. loop:
  85538. while (this.state.pos < this.length) {
  85539. const ch = this.input.charCodeAt(this.state.pos);
  85540. switch (ch) {
  85541. case 32:
  85542. case 160:
  85543. case 9:
  85544. ++this.state.pos;
  85545. break;
  85546. case 13:
  85547. if (this.input.charCodeAt(this.state.pos + 1) === 10) {
  85548. ++this.state.pos;
  85549. }
  85550. case 10:
  85551. case 8232:
  85552. case 8233:
  85553. ++this.state.pos;
  85554. ++this.state.curLine;
  85555. this.state.lineStart = this.state.pos;
  85556. break;
  85557. case 47:
  85558. switch (this.input.charCodeAt(this.state.pos + 1)) {
  85559. case 42: {
  85560. const comment2 = this.skipBlockComment();
  85561. if (comment2 !== void 0) {
  85562. this.addComment(comment2);
  85563. comments.push(comment2);
  85564. }
  85565. break;
  85566. }
  85567. case 47: {
  85568. const comment2 = this.skipLineComment(2);
  85569. if (comment2 !== void 0) {
  85570. this.addComment(comment2);
  85571. comments.push(comment2);
  85572. }
  85573. break;
  85574. }
  85575. default:
  85576. break loop;
  85577. }
  85578. break;
  85579. default:
  85580. if (isWhitespace(ch)) {
  85581. ++this.state.pos;
  85582. } else if (ch === 45 && !this.inModule) {
  85583. const pos = this.state.pos;
  85584. if (this.input.charCodeAt(pos + 1) === 45 && this.input.charCodeAt(pos + 2) === 62 && (spaceStart === 0 || this.state.lineStart > spaceStart)) {
  85585. const comment2 = this.skipLineComment(3);
  85586. if (comment2 !== void 0) {
  85587. this.addComment(comment2);
  85588. comments.push(comment2);
  85589. }
  85590. } else {
  85591. break loop;
  85592. }
  85593. } else if (ch === 60 && !this.inModule) {
  85594. const pos = this.state.pos;
  85595. if (this.input.charCodeAt(pos + 1) === 33 && this.input.charCodeAt(pos + 2) === 45 && this.input.charCodeAt(pos + 3) === 45) {
  85596. const comment2 = this.skipLineComment(4);
  85597. if (comment2 !== void 0) {
  85598. this.addComment(comment2);
  85599. comments.push(comment2);
  85600. }
  85601. } else {
  85602. break loop;
  85603. }
  85604. } else {
  85605. break loop;
  85606. }
  85607. }
  85608. }
  85609. if (comments.length > 0) {
  85610. const end = this.state.pos;
  85611. const CommentWhitespace = {
  85612. start: spaceStart,
  85613. end,
  85614. comments,
  85615. leadingNode: null,
  85616. trailingNode: null,
  85617. containingNode: null
  85618. };
  85619. this.state.commentStack.push(CommentWhitespace);
  85620. }
  85621. }
  85622. finishToken(type, val) {
  85623. this.state.end = this.state.pos;
  85624. const prevType = this.state.type;
  85625. this.state.type = type;
  85626. this.state.value = val;
  85627. if (!this.isLookahead) {
  85628. this.state.endLoc = this.state.curPosition();
  85629. this.updateContext(prevType);
  85630. }
  85631. }
  85632. readToken_numberSign() {
  85633. if (this.state.pos === 0 && this.readToken_interpreter()) {
  85634. return;
  85635. }
  85636. const nextPos = this.state.pos + 1;
  85637. const next = this.codePointAtPos(nextPos);
  85638. if (next >= 48 && next <= 57) {
  85639. throw this.raise(this.state.pos, ErrorMessages.UnexpectedDigitAfterHash);
  85640. }
  85641. if (next === 123 || next === 91 && this.hasPlugin("recordAndTuple")) {
  85642. this.expectPlugin("recordAndTuple");
  85643. if (this.getPluginOption("recordAndTuple", "syntaxType") !== "hash") {
  85644. throw this.raise(this.state.pos, next === 123 ? ErrorMessages.RecordExpressionHashIncorrectStartSyntaxType : ErrorMessages.TupleExpressionHashIncorrectStartSyntaxType);
  85645. }
  85646. this.state.pos += 2;
  85647. if (next === 123) {
  85648. this.finishToken(types$12.braceHashL);
  85649. } else {
  85650. this.finishToken(types$12.bracketHashL);
  85651. }
  85652. } else if (isIdentifierStart2(next)) {
  85653. ++this.state.pos;
  85654. this.finishToken(types$12.privateName, this.readWord1(next));
  85655. } else if (next === 92) {
  85656. ++this.state.pos;
  85657. this.finishToken(types$12.privateName, this.readWord1());
  85658. } else {
  85659. this.finishOp(types$12.hash, 1);
  85660. }
  85661. }
  85662. readToken_dot() {
  85663. const next = this.input.charCodeAt(this.state.pos + 1);
  85664. if (next >= 48 && next <= 57) {
  85665. this.readNumber(true);
  85666. return;
  85667. }
  85668. if (next === 46 && this.input.charCodeAt(this.state.pos + 2) === 46) {
  85669. this.state.pos += 3;
  85670. this.finishToken(types$12.ellipsis);
  85671. } else {
  85672. ++this.state.pos;
  85673. this.finishToken(types$12.dot);
  85674. }
  85675. }
  85676. readToken_slash() {
  85677. const next = this.input.charCodeAt(this.state.pos + 1);
  85678. if (next === 61) {
  85679. this.finishOp(types$12.slashAssign, 2);
  85680. } else {
  85681. this.finishOp(types$12.slash, 1);
  85682. }
  85683. }
  85684. readToken_interpreter() {
  85685. if (this.state.pos !== 0 || this.length < 2)
  85686. return false;
  85687. let ch = this.input.charCodeAt(this.state.pos + 1);
  85688. if (ch !== 33)
  85689. return false;
  85690. const start3 = this.state.pos;
  85691. this.state.pos += 1;
  85692. while (!isNewLine2(ch) && ++this.state.pos < this.length) {
  85693. ch = this.input.charCodeAt(this.state.pos);
  85694. }
  85695. const value = this.input.slice(start3 + 2, this.state.pos);
  85696. this.finishToken(types$12.interpreterDirective, value);
  85697. return true;
  85698. }
  85699. readToken_mult_modulo(code2) {
  85700. let type = code2 === 42 ? types$12.star : types$12.modulo;
  85701. let width = 1;
  85702. let next = this.input.charCodeAt(this.state.pos + 1);
  85703. if (code2 === 42 && next === 42) {
  85704. width++;
  85705. next = this.input.charCodeAt(this.state.pos + 2);
  85706. type = types$12.exponent;
  85707. }
  85708. if (next === 61 && !this.state.inType) {
  85709. width++;
  85710. type = types$12.assign;
  85711. }
  85712. this.finishOp(type, width);
  85713. }
  85714. readToken_pipe_amp(code2) {
  85715. const next = this.input.charCodeAt(this.state.pos + 1);
  85716. if (next === code2) {
  85717. if (this.input.charCodeAt(this.state.pos + 2) === 61) {
  85718. this.finishOp(types$12.assign, 3);
  85719. } else {
  85720. this.finishOp(code2 === 124 ? types$12.logicalOR : types$12.logicalAND, 2);
  85721. }
  85722. return;
  85723. }
  85724. if (code2 === 124) {
  85725. if (next === 62) {
  85726. this.finishOp(types$12.pipeline, 2);
  85727. return;
  85728. }
  85729. if (this.hasPlugin("recordAndTuple") && next === 125) {
  85730. if (this.getPluginOption("recordAndTuple", "syntaxType") !== "bar") {
  85731. throw this.raise(this.state.pos, ErrorMessages.RecordExpressionBarIncorrectEndSyntaxType);
  85732. }
  85733. this.state.pos += 2;
  85734. this.finishToken(types$12.braceBarR);
  85735. return;
  85736. }
  85737. if (this.hasPlugin("recordAndTuple") && next === 93) {
  85738. if (this.getPluginOption("recordAndTuple", "syntaxType") !== "bar") {
  85739. throw this.raise(this.state.pos, ErrorMessages.TupleExpressionBarIncorrectEndSyntaxType);
  85740. }
  85741. this.state.pos += 2;
  85742. this.finishToken(types$12.bracketBarR);
  85743. return;
  85744. }
  85745. }
  85746. if (next === 61) {
  85747. this.finishOp(types$12.assign, 2);
  85748. return;
  85749. }
  85750. this.finishOp(code2 === 124 ? types$12.bitwiseOR : types$12.bitwiseAND, 1);
  85751. }
  85752. readToken_caret() {
  85753. const next = this.input.charCodeAt(this.state.pos + 1);
  85754. if (next === 61) {
  85755. this.finishOp(types$12.assign, 2);
  85756. } else {
  85757. this.finishOp(types$12.bitwiseXOR, 1);
  85758. }
  85759. }
  85760. readToken_plus_min(code2) {
  85761. const next = this.input.charCodeAt(this.state.pos + 1);
  85762. if (next === code2) {
  85763. this.finishOp(types$12.incDec, 2);
  85764. return;
  85765. }
  85766. if (next === 61) {
  85767. this.finishOp(types$12.assign, 2);
  85768. } else {
  85769. this.finishOp(types$12.plusMin, 1);
  85770. }
  85771. }
  85772. readToken_lt_gt(code2) {
  85773. const next = this.input.charCodeAt(this.state.pos + 1);
  85774. let size = 1;
  85775. if (next === code2) {
  85776. size = code2 === 62 && this.input.charCodeAt(this.state.pos + 2) === 62 ? 3 : 2;
  85777. if (this.input.charCodeAt(this.state.pos + size) === 61) {
  85778. this.finishOp(types$12.assign, size + 1);
  85779. return;
  85780. }
  85781. this.finishOp(types$12.bitShift, size);
  85782. return;
  85783. }
  85784. if (next === 61) {
  85785. size = 2;
  85786. }
  85787. this.finishOp(types$12.relational, size);
  85788. }
  85789. readToken_eq_excl(code2) {
  85790. const next = this.input.charCodeAt(this.state.pos + 1);
  85791. if (next === 61) {
  85792. this.finishOp(types$12.equality, this.input.charCodeAt(this.state.pos + 2) === 61 ? 3 : 2);
  85793. return;
  85794. }
  85795. if (code2 === 61 && next === 62) {
  85796. this.state.pos += 2;
  85797. this.finishToken(types$12.arrow);
  85798. return;
  85799. }
  85800. this.finishOp(code2 === 61 ? types$12.eq : types$12.bang, 1);
  85801. }
  85802. readToken_question() {
  85803. const next = this.input.charCodeAt(this.state.pos + 1);
  85804. const next2 = this.input.charCodeAt(this.state.pos + 2);
  85805. if (next === 63) {
  85806. if (next2 === 61) {
  85807. this.finishOp(types$12.assign, 3);
  85808. } else {
  85809. this.finishOp(types$12.nullishCoalescing, 2);
  85810. }
  85811. } else if (next === 46 && !(next2 >= 48 && next2 <= 57)) {
  85812. this.state.pos += 2;
  85813. this.finishToken(types$12.questionDot);
  85814. } else {
  85815. ++this.state.pos;
  85816. this.finishToken(types$12.question);
  85817. }
  85818. }
  85819. getTokenFromCode(code2) {
  85820. switch (code2) {
  85821. case 46:
  85822. this.readToken_dot();
  85823. return;
  85824. case 40:
  85825. ++this.state.pos;
  85826. this.finishToken(types$12.parenL);
  85827. return;
  85828. case 41:
  85829. ++this.state.pos;
  85830. this.finishToken(types$12.parenR);
  85831. return;
  85832. case 59:
  85833. ++this.state.pos;
  85834. this.finishToken(types$12.semi);
  85835. return;
  85836. case 44:
  85837. ++this.state.pos;
  85838. this.finishToken(types$12.comma);
  85839. return;
  85840. case 91:
  85841. if (this.hasPlugin("recordAndTuple") && this.input.charCodeAt(this.state.pos + 1) === 124) {
  85842. if (this.getPluginOption("recordAndTuple", "syntaxType") !== "bar") {
  85843. throw this.raise(this.state.pos, ErrorMessages.TupleExpressionBarIncorrectStartSyntaxType);
  85844. }
  85845. this.state.pos += 2;
  85846. this.finishToken(types$12.bracketBarL);
  85847. } else {
  85848. ++this.state.pos;
  85849. this.finishToken(types$12.bracketL);
  85850. }
  85851. return;
  85852. case 93:
  85853. ++this.state.pos;
  85854. this.finishToken(types$12.bracketR);
  85855. return;
  85856. case 123:
  85857. if (this.hasPlugin("recordAndTuple") && this.input.charCodeAt(this.state.pos + 1) === 124) {
  85858. if (this.getPluginOption("recordAndTuple", "syntaxType") !== "bar") {
  85859. throw this.raise(this.state.pos, ErrorMessages.RecordExpressionBarIncorrectStartSyntaxType);
  85860. }
  85861. this.state.pos += 2;
  85862. this.finishToken(types$12.braceBarL);
  85863. } else {
  85864. ++this.state.pos;
  85865. this.finishToken(types$12.braceL);
  85866. }
  85867. return;
  85868. case 125:
  85869. ++this.state.pos;
  85870. this.finishToken(types$12.braceR);
  85871. return;
  85872. case 58:
  85873. if (this.hasPlugin("functionBind") && this.input.charCodeAt(this.state.pos + 1) === 58) {
  85874. this.finishOp(types$12.doubleColon, 2);
  85875. } else {
  85876. ++this.state.pos;
  85877. this.finishToken(types$12.colon);
  85878. }
  85879. return;
  85880. case 63:
  85881. this.readToken_question();
  85882. return;
  85883. case 96:
  85884. ++this.state.pos;
  85885. this.finishToken(types$12.backQuote);
  85886. return;
  85887. case 48: {
  85888. const next = this.input.charCodeAt(this.state.pos + 1);
  85889. if (next === 120 || next === 88) {
  85890. this.readRadixNumber(16);
  85891. return;
  85892. }
  85893. if (next === 111 || next === 79) {
  85894. this.readRadixNumber(8);
  85895. return;
  85896. }
  85897. if (next === 98 || next === 66) {
  85898. this.readRadixNumber(2);
  85899. return;
  85900. }
  85901. }
  85902. case 49:
  85903. case 50:
  85904. case 51:
  85905. case 52:
  85906. case 53:
  85907. case 54:
  85908. case 55:
  85909. case 56:
  85910. case 57:
  85911. this.readNumber(false);
  85912. return;
  85913. case 34:
  85914. case 39:
  85915. this.readString(code2);
  85916. return;
  85917. case 47:
  85918. this.readToken_slash();
  85919. return;
  85920. case 37:
  85921. case 42:
  85922. this.readToken_mult_modulo(code2);
  85923. return;
  85924. case 124:
  85925. case 38:
  85926. this.readToken_pipe_amp(code2);
  85927. return;
  85928. case 94:
  85929. this.readToken_caret();
  85930. return;
  85931. case 43:
  85932. case 45:
  85933. this.readToken_plus_min(code2);
  85934. return;
  85935. case 60:
  85936. case 62:
  85937. this.readToken_lt_gt(code2);
  85938. return;
  85939. case 61:
  85940. case 33:
  85941. this.readToken_eq_excl(code2);
  85942. return;
  85943. case 126:
  85944. this.finishOp(types$12.tilde, 1);
  85945. return;
  85946. case 64:
  85947. ++this.state.pos;
  85948. this.finishToken(types$12.at);
  85949. return;
  85950. case 35:
  85951. this.readToken_numberSign();
  85952. return;
  85953. case 92:
  85954. this.readWord();
  85955. return;
  85956. default:
  85957. if (isIdentifierStart2(code2)) {
  85958. this.readWord(code2);
  85959. return;
  85960. }
  85961. }
  85962. throw this.raise(this.state.pos, ErrorMessages.InvalidOrUnexpectedToken, String.fromCodePoint(code2));
  85963. }
  85964. finishOp(type, size) {
  85965. const str = this.input.slice(this.state.pos, this.state.pos + size);
  85966. this.state.pos += size;
  85967. this.finishToken(type, str);
  85968. }
  85969. readRegexp() {
  85970. const start3 = this.state.start + 1;
  85971. let escaped, inClass;
  85972. let {
  85973. pos
  85974. } = this.state;
  85975. for (; ; ++pos) {
  85976. if (pos >= this.length) {
  85977. throw this.raise(start3, ErrorMessages.UnterminatedRegExp);
  85978. }
  85979. const ch = this.input.charCodeAt(pos);
  85980. if (isNewLine2(ch)) {
  85981. throw this.raise(start3, ErrorMessages.UnterminatedRegExp);
  85982. }
  85983. if (escaped) {
  85984. escaped = false;
  85985. } else {
  85986. if (ch === 91) {
  85987. inClass = true;
  85988. } else if (ch === 93 && inClass) {
  85989. inClass = false;
  85990. } else if (ch === 47 && !inClass) {
  85991. break;
  85992. }
  85993. escaped = ch === 92;
  85994. }
  85995. }
  85996. const content3 = this.input.slice(start3, pos);
  85997. ++pos;
  85998. let mods = "";
  85999. while (pos < this.length) {
  86000. const cp = this.codePointAtPos(pos);
  86001. const char = String.fromCharCode(cp);
  86002. if (VALID_REGEX_FLAGS.has(cp)) {
  86003. if (mods.includes(char)) {
  86004. this.raise(pos + 1, ErrorMessages.DuplicateRegExpFlags);
  86005. }
  86006. } else if (isIdentifierChar2(cp) || cp === 92) {
  86007. this.raise(pos + 1, ErrorMessages.MalformedRegExpFlags);
  86008. } else {
  86009. break;
  86010. }
  86011. ++pos;
  86012. mods += char;
  86013. }
  86014. this.state.pos = pos;
  86015. this.finishToken(types$12.regexp, {
  86016. pattern: content3,
  86017. flags: mods
  86018. });
  86019. }
  86020. readInt(radix, len, forceLen, allowNumSeparator = true) {
  86021. const start3 = this.state.pos;
  86022. const forbiddenSiblings = radix === 16 ? forbiddenNumericSeparatorSiblings.hex : forbiddenNumericSeparatorSiblings.decBinOct;
  86023. const allowedSiblings = radix === 16 ? allowedNumericSeparatorSiblings.hex : radix === 10 ? allowedNumericSeparatorSiblings.dec : radix === 8 ? allowedNumericSeparatorSiblings.oct : allowedNumericSeparatorSiblings.bin;
  86024. let invalid2 = false;
  86025. let total = 0;
  86026. for (let i = 0, e = len == null ? Infinity : len; i < e; ++i) {
  86027. const code2 = this.input.charCodeAt(this.state.pos);
  86028. let val;
  86029. if (code2 === 95) {
  86030. const prev = this.input.charCodeAt(this.state.pos - 1);
  86031. const next = this.input.charCodeAt(this.state.pos + 1);
  86032. if (allowedSiblings.indexOf(next) === -1) {
  86033. this.raise(this.state.pos, ErrorMessages.UnexpectedNumericSeparator);
  86034. } else if (forbiddenSiblings.indexOf(prev) > -1 || forbiddenSiblings.indexOf(next) > -1 || Number.isNaN(next)) {
  86035. this.raise(this.state.pos, ErrorMessages.UnexpectedNumericSeparator);
  86036. }
  86037. if (!allowNumSeparator) {
  86038. this.raise(this.state.pos, ErrorMessages.NumericSeparatorInEscapeSequence);
  86039. }
  86040. ++this.state.pos;
  86041. continue;
  86042. }
  86043. if (code2 >= 97) {
  86044. val = code2 - 97 + 10;
  86045. } else if (code2 >= 65) {
  86046. val = code2 - 65 + 10;
  86047. } else if (_isDigit(code2)) {
  86048. val = code2 - 48;
  86049. } else {
  86050. val = Infinity;
  86051. }
  86052. if (val >= radix) {
  86053. if (this.options.errorRecovery && val <= 9) {
  86054. val = 0;
  86055. this.raise(this.state.start + i + 2, ErrorMessages.InvalidDigit, radix);
  86056. } else if (forceLen) {
  86057. val = 0;
  86058. invalid2 = true;
  86059. } else {
  86060. break;
  86061. }
  86062. }
  86063. ++this.state.pos;
  86064. total = total * radix + val;
  86065. }
  86066. if (this.state.pos === start3 || len != null && this.state.pos - start3 !== len || invalid2) {
  86067. return null;
  86068. }
  86069. return total;
  86070. }
  86071. readRadixNumber(radix) {
  86072. const start3 = this.state.pos;
  86073. let isBigInt = false;
  86074. this.state.pos += 2;
  86075. const val = this.readInt(radix);
  86076. if (val == null) {
  86077. this.raise(this.state.start + 2, ErrorMessages.InvalidDigit, radix);
  86078. }
  86079. const next = this.input.charCodeAt(this.state.pos);
  86080. if (next === 110) {
  86081. ++this.state.pos;
  86082. isBigInt = true;
  86083. } else if (next === 109) {
  86084. throw this.raise(start3, ErrorMessages.InvalidDecimal);
  86085. }
  86086. if (isIdentifierStart2(this.codePointAtPos(this.state.pos))) {
  86087. throw this.raise(this.state.pos, ErrorMessages.NumberIdentifier);
  86088. }
  86089. if (isBigInt) {
  86090. const str = this.input.slice(start3, this.state.pos).replace(/[_n]/g, "");
  86091. this.finishToken(types$12.bigint, str);
  86092. return;
  86093. }
  86094. this.finishToken(types$12.num, val);
  86095. }
  86096. readNumber(startsWithDot) {
  86097. const start3 = this.state.pos;
  86098. let isFloat = false;
  86099. let isBigInt = false;
  86100. let isDecimal2 = false;
  86101. let hasExponent = false;
  86102. let isOctal = false;
  86103. if (!startsWithDot && this.readInt(10) === null) {
  86104. this.raise(start3, ErrorMessages.InvalidNumber);
  86105. }
  86106. const hasLeadingZero = this.state.pos - start3 >= 2 && this.input.charCodeAt(start3) === 48;
  86107. if (hasLeadingZero) {
  86108. const integer = this.input.slice(start3, this.state.pos);
  86109. this.recordStrictModeErrors(start3, ErrorMessages.StrictOctalLiteral);
  86110. if (!this.state.strict) {
  86111. const underscorePos = integer.indexOf("_");
  86112. if (underscorePos > 0) {
  86113. this.raise(underscorePos + start3, ErrorMessages.ZeroDigitNumericSeparator);
  86114. }
  86115. }
  86116. isOctal = hasLeadingZero && !/[89]/.test(integer);
  86117. }
  86118. let next = this.input.charCodeAt(this.state.pos);
  86119. if (next === 46 && !isOctal) {
  86120. ++this.state.pos;
  86121. this.readInt(10);
  86122. isFloat = true;
  86123. next = this.input.charCodeAt(this.state.pos);
  86124. }
  86125. if ((next === 69 || next === 101) && !isOctal) {
  86126. next = this.input.charCodeAt(++this.state.pos);
  86127. if (next === 43 || next === 45) {
  86128. ++this.state.pos;
  86129. }
  86130. if (this.readInt(10) === null) {
  86131. this.raise(start3, ErrorMessages.InvalidOrMissingExponent);
  86132. }
  86133. isFloat = true;
  86134. hasExponent = true;
  86135. next = this.input.charCodeAt(this.state.pos);
  86136. }
  86137. if (next === 110) {
  86138. if (isFloat || hasLeadingZero) {
  86139. this.raise(start3, ErrorMessages.InvalidBigIntLiteral);
  86140. }
  86141. ++this.state.pos;
  86142. isBigInt = true;
  86143. }
  86144. if (next === 109) {
  86145. this.expectPlugin("decimal", this.state.pos);
  86146. if (hasExponent || hasLeadingZero) {
  86147. this.raise(start3, ErrorMessages.InvalidDecimal);
  86148. }
  86149. ++this.state.pos;
  86150. isDecimal2 = true;
  86151. }
  86152. if (isIdentifierStart2(this.codePointAtPos(this.state.pos))) {
  86153. throw this.raise(this.state.pos, ErrorMessages.NumberIdentifier);
  86154. }
  86155. const str = this.input.slice(start3, this.state.pos).replace(/[_mn]/g, "");
  86156. if (isBigInt) {
  86157. this.finishToken(types$12.bigint, str);
  86158. return;
  86159. }
  86160. if (isDecimal2) {
  86161. this.finishToken(types$12.decimal, str);
  86162. return;
  86163. }
  86164. const val = isOctal ? parseInt(str, 8) : parseFloat(str);
  86165. this.finishToken(types$12.num, val);
  86166. }
  86167. readCodePoint(throwOnInvalid) {
  86168. const ch = this.input.charCodeAt(this.state.pos);
  86169. let code2;
  86170. if (ch === 123) {
  86171. const codePos = ++this.state.pos;
  86172. code2 = this.readHexChar(this.input.indexOf("}", this.state.pos) - this.state.pos, true, throwOnInvalid);
  86173. ++this.state.pos;
  86174. if (code2 !== null && code2 > 1114111) {
  86175. if (throwOnInvalid) {
  86176. this.raise(codePos, ErrorMessages.InvalidCodePoint);
  86177. } else {
  86178. return null;
  86179. }
  86180. }
  86181. } else {
  86182. code2 = this.readHexChar(4, false, throwOnInvalid);
  86183. }
  86184. return code2;
  86185. }
  86186. readString(quote) {
  86187. let out = "", chunkStart = ++this.state.pos;
  86188. for (; ; ) {
  86189. if (this.state.pos >= this.length) {
  86190. throw this.raise(this.state.start, ErrorMessages.UnterminatedString);
  86191. }
  86192. const ch = this.input.charCodeAt(this.state.pos);
  86193. if (ch === quote)
  86194. break;
  86195. if (ch === 92) {
  86196. out += this.input.slice(chunkStart, this.state.pos);
  86197. out += this.readEscapedChar(false);
  86198. chunkStart = this.state.pos;
  86199. } else if (ch === 8232 || ch === 8233) {
  86200. ++this.state.pos;
  86201. ++this.state.curLine;
  86202. this.state.lineStart = this.state.pos;
  86203. } else if (isNewLine2(ch)) {
  86204. throw this.raise(this.state.start, ErrorMessages.UnterminatedString);
  86205. } else {
  86206. ++this.state.pos;
  86207. }
  86208. }
  86209. out += this.input.slice(chunkStart, this.state.pos++);
  86210. this.finishToken(types$12.string, out);
  86211. }
  86212. readTmplToken() {
  86213. let out = "", chunkStart = this.state.pos, containsInvalid = false;
  86214. for (; ; ) {
  86215. if (this.state.pos >= this.length) {
  86216. throw this.raise(this.state.start, ErrorMessages.UnterminatedTemplate);
  86217. }
  86218. const ch = this.input.charCodeAt(this.state.pos);
  86219. if (ch === 96 || ch === 36 && this.input.charCodeAt(this.state.pos + 1) === 123) {
  86220. if (this.state.pos === this.state.start && this.match(types$12.template)) {
  86221. if (ch === 36) {
  86222. this.state.pos += 2;
  86223. this.finishToken(types$12.dollarBraceL);
  86224. return;
  86225. } else {
  86226. ++this.state.pos;
  86227. this.finishToken(types$12.backQuote);
  86228. return;
  86229. }
  86230. }
  86231. out += this.input.slice(chunkStart, this.state.pos);
  86232. this.finishToken(types$12.template, containsInvalid ? null : out);
  86233. return;
  86234. }
  86235. if (ch === 92) {
  86236. out += this.input.slice(chunkStart, this.state.pos);
  86237. const escaped = this.readEscapedChar(true);
  86238. if (escaped === null) {
  86239. containsInvalid = true;
  86240. } else {
  86241. out += escaped;
  86242. }
  86243. chunkStart = this.state.pos;
  86244. } else if (isNewLine2(ch)) {
  86245. out += this.input.slice(chunkStart, this.state.pos);
  86246. ++this.state.pos;
  86247. switch (ch) {
  86248. case 13:
  86249. if (this.input.charCodeAt(this.state.pos) === 10) {
  86250. ++this.state.pos;
  86251. }
  86252. case 10:
  86253. out += "\n";
  86254. break;
  86255. default:
  86256. out += String.fromCharCode(ch);
  86257. break;
  86258. }
  86259. ++this.state.curLine;
  86260. this.state.lineStart = this.state.pos;
  86261. chunkStart = this.state.pos;
  86262. } else {
  86263. ++this.state.pos;
  86264. }
  86265. }
  86266. }
  86267. recordStrictModeErrors(pos, message) {
  86268. if (this.state.strict && !this.state.strictErrors.has(pos)) {
  86269. this.raise(pos, message);
  86270. } else {
  86271. this.state.strictErrors.set(pos, message);
  86272. }
  86273. }
  86274. readEscapedChar(inTemplate) {
  86275. const throwOnInvalid = !inTemplate;
  86276. const ch = this.input.charCodeAt(++this.state.pos);
  86277. ++this.state.pos;
  86278. switch (ch) {
  86279. case 110:
  86280. return "\n";
  86281. case 114:
  86282. return "\r";
  86283. case 120: {
  86284. const code2 = this.readHexChar(2, false, throwOnInvalid);
  86285. return code2 === null ? null : String.fromCharCode(code2);
  86286. }
  86287. case 117: {
  86288. const code2 = this.readCodePoint(throwOnInvalid);
  86289. return code2 === null ? null : String.fromCodePoint(code2);
  86290. }
  86291. case 116:
  86292. return " ";
  86293. case 98:
  86294. return "\b";
  86295. case 118:
  86296. return "\v";
  86297. case 102:
  86298. return "\f";
  86299. case 13:
  86300. if (this.input.charCodeAt(this.state.pos) === 10) {
  86301. ++this.state.pos;
  86302. }
  86303. case 10:
  86304. this.state.lineStart = this.state.pos;
  86305. ++this.state.curLine;
  86306. case 8232:
  86307. case 8233:
  86308. return "";
  86309. case 56:
  86310. case 57:
  86311. if (inTemplate) {
  86312. return null;
  86313. } else {
  86314. this.recordStrictModeErrors(this.state.pos - 1, ErrorMessages.StrictNumericEscape);
  86315. }
  86316. default:
  86317. if (ch >= 48 && ch <= 55) {
  86318. const codePos = this.state.pos - 1;
  86319. const match = this.input.substr(this.state.pos - 1, 3).match(/^[0-7]+/);
  86320. let octalStr = match[0];
  86321. let octal = parseInt(octalStr, 8);
  86322. if (octal > 255) {
  86323. octalStr = octalStr.slice(0, -1);
  86324. octal = parseInt(octalStr, 8);
  86325. }
  86326. this.state.pos += octalStr.length - 1;
  86327. const next = this.input.charCodeAt(this.state.pos);
  86328. if (octalStr !== "0" || next === 56 || next === 57) {
  86329. if (inTemplate) {
  86330. return null;
  86331. } else {
  86332. this.recordStrictModeErrors(codePos, ErrorMessages.StrictNumericEscape);
  86333. }
  86334. }
  86335. return String.fromCharCode(octal);
  86336. }
  86337. return String.fromCharCode(ch);
  86338. }
  86339. }
  86340. readHexChar(len, forceLen, throwOnInvalid) {
  86341. const codePos = this.state.pos;
  86342. const n = this.readInt(16, len, forceLen, false);
  86343. if (n === null) {
  86344. if (throwOnInvalid) {
  86345. this.raise(codePos, ErrorMessages.InvalidEscapeSequence);
  86346. } else {
  86347. this.state.pos = codePos - 1;
  86348. }
  86349. }
  86350. return n;
  86351. }
  86352. readWord1(firstCode) {
  86353. this.state.containsEsc = false;
  86354. let word = "";
  86355. const start3 = this.state.pos;
  86356. let chunkStart = this.state.pos;
  86357. if (firstCode !== void 0) {
  86358. this.state.pos += firstCode <= 65535 ? 1 : 2;
  86359. }
  86360. while (this.state.pos < this.length) {
  86361. const ch = this.codePointAtPos(this.state.pos);
  86362. if (isIdentifierChar2(ch)) {
  86363. this.state.pos += ch <= 65535 ? 1 : 2;
  86364. } else if (ch === 92) {
  86365. this.state.containsEsc = true;
  86366. word += this.input.slice(chunkStart, this.state.pos);
  86367. const escStart = this.state.pos;
  86368. const identifierCheck = this.state.pos === start3 ? isIdentifierStart2 : isIdentifierChar2;
  86369. if (this.input.charCodeAt(++this.state.pos) !== 117) {
  86370. this.raise(this.state.pos, ErrorMessages.MissingUnicodeEscape);
  86371. chunkStart = this.state.pos - 1;
  86372. continue;
  86373. }
  86374. ++this.state.pos;
  86375. const esc = this.readCodePoint(true);
  86376. if (esc !== null) {
  86377. if (!identifierCheck(esc)) {
  86378. this.raise(escStart, ErrorMessages.EscapedCharNotAnIdentifier);
  86379. }
  86380. word += String.fromCodePoint(esc);
  86381. }
  86382. chunkStart = this.state.pos;
  86383. } else {
  86384. break;
  86385. }
  86386. }
  86387. return word + this.input.slice(chunkStart, this.state.pos);
  86388. }
  86389. readWord(firstCode) {
  86390. const word = this.readWord1(firstCode);
  86391. const type = keywords$12.get(word) || types$12.name;
  86392. this.finishToken(type, word);
  86393. }
  86394. checkKeywordEscapes() {
  86395. const kw2 = this.state.type.keyword;
  86396. if (kw2 && this.state.containsEsc) {
  86397. this.raise(this.state.start, ErrorMessages.InvalidEscapedReservedWord, kw2);
  86398. }
  86399. }
  86400. updateContext(prevType) {
  86401. var _this$state$type$upda, _this$state$type;
  86402. (_this$state$type$upda = (_this$state$type = this.state.type).updateContext) == null ? void 0 : _this$state$type$upda.call(_this$state$type, this.state.context);
  86403. }
  86404. };
  86405. var ClassScope = class {
  86406. constructor() {
  86407. this.privateNames = /* @__PURE__ */ new Set();
  86408. this.loneAccessors = /* @__PURE__ */ new Map();
  86409. this.undefinedPrivateNames = /* @__PURE__ */ new Map();
  86410. }
  86411. };
  86412. var ClassScopeHandler = class {
  86413. constructor(raise2) {
  86414. this.stack = [];
  86415. this.undefinedPrivateNames = /* @__PURE__ */ new Map();
  86416. this.raise = raise2;
  86417. }
  86418. current() {
  86419. return this.stack[this.stack.length - 1];
  86420. }
  86421. enter() {
  86422. this.stack.push(new ClassScope());
  86423. }
  86424. exit() {
  86425. const oldClassScope = this.stack.pop();
  86426. const current2 = this.current();
  86427. for (const [name2, pos] of Array.from(oldClassScope.undefinedPrivateNames)) {
  86428. if (current2) {
  86429. if (!current2.undefinedPrivateNames.has(name2)) {
  86430. current2.undefinedPrivateNames.set(name2, pos);
  86431. }
  86432. } else {
  86433. this.raise(pos, ErrorMessages.InvalidPrivateFieldResolution, name2);
  86434. }
  86435. }
  86436. }
  86437. declarePrivateName(name2, elementType, pos) {
  86438. const classScope = this.current();
  86439. let redefined = classScope.privateNames.has(name2);
  86440. if (elementType & CLASS_ELEMENT_KIND_ACCESSOR) {
  86441. const accessor = redefined && classScope.loneAccessors.get(name2);
  86442. if (accessor) {
  86443. const oldStatic = accessor & CLASS_ELEMENT_FLAG_STATIC;
  86444. const newStatic = elementType & CLASS_ELEMENT_FLAG_STATIC;
  86445. const oldKind = accessor & CLASS_ELEMENT_KIND_ACCESSOR;
  86446. const newKind = elementType & CLASS_ELEMENT_KIND_ACCESSOR;
  86447. redefined = oldKind === newKind || oldStatic !== newStatic;
  86448. if (!redefined)
  86449. classScope.loneAccessors.delete(name2);
  86450. } else if (!redefined) {
  86451. classScope.loneAccessors.set(name2, elementType);
  86452. }
  86453. }
  86454. if (redefined) {
  86455. this.raise(pos, ErrorMessages.PrivateNameRedeclaration, name2);
  86456. }
  86457. classScope.privateNames.add(name2);
  86458. classScope.undefinedPrivateNames.delete(name2);
  86459. }
  86460. usePrivateName(name2, pos) {
  86461. let classScope;
  86462. for (classScope of this.stack) {
  86463. if (classScope.privateNames.has(name2))
  86464. return;
  86465. }
  86466. if (classScope) {
  86467. classScope.undefinedPrivateNames.set(name2, pos);
  86468. } else {
  86469. this.raise(pos, ErrorMessages.InvalidPrivateFieldResolution, name2);
  86470. }
  86471. }
  86472. };
  86473. var kExpression = 0;
  86474. var kMaybeArrowParameterDeclaration = 1;
  86475. var kMaybeAsyncArrowParameterDeclaration = 2;
  86476. var kParameterDeclaration = 3;
  86477. var ExpressionScope = class {
  86478. constructor(type = kExpression) {
  86479. this.type = void 0;
  86480. this.type = type;
  86481. }
  86482. canBeArrowParameterDeclaration() {
  86483. return this.type === kMaybeAsyncArrowParameterDeclaration || this.type === kMaybeArrowParameterDeclaration;
  86484. }
  86485. isCertainlyParameterDeclaration() {
  86486. return this.type === kParameterDeclaration;
  86487. }
  86488. };
  86489. var ArrowHeadParsingScope = class extends ExpressionScope {
  86490. constructor(type) {
  86491. super(type);
  86492. this.errors = /* @__PURE__ */ new Map();
  86493. }
  86494. recordDeclarationError(pos, template) {
  86495. this.errors.set(pos, template);
  86496. }
  86497. clearDeclarationError(pos) {
  86498. this.errors.delete(pos);
  86499. }
  86500. iterateErrors(iterator) {
  86501. this.errors.forEach(iterator);
  86502. }
  86503. };
  86504. var ExpressionScopeHandler = class {
  86505. constructor(raise2) {
  86506. this.stack = [new ExpressionScope()];
  86507. this.raise = raise2;
  86508. }
  86509. enter(scope) {
  86510. this.stack.push(scope);
  86511. }
  86512. exit() {
  86513. this.stack.pop();
  86514. }
  86515. recordParameterInitializerError(pos, template) {
  86516. const {
  86517. stack
  86518. } = this;
  86519. let i = stack.length - 1;
  86520. let scope = stack[i];
  86521. while (!scope.isCertainlyParameterDeclaration()) {
  86522. if (scope.canBeArrowParameterDeclaration()) {
  86523. scope.recordDeclarationError(pos, template);
  86524. } else {
  86525. return;
  86526. }
  86527. scope = stack[--i];
  86528. }
  86529. this.raise(pos, template);
  86530. }
  86531. recordParenthesizedIdentifierError(pos, template) {
  86532. const {
  86533. stack
  86534. } = this;
  86535. const scope = stack[stack.length - 1];
  86536. if (scope.isCertainlyParameterDeclaration()) {
  86537. this.raise(pos, template);
  86538. } else if (scope.canBeArrowParameterDeclaration()) {
  86539. scope.recordDeclarationError(pos, template);
  86540. } else {
  86541. return;
  86542. }
  86543. }
  86544. recordAsyncArrowParametersError(pos, template) {
  86545. const {
  86546. stack
  86547. } = this;
  86548. let i = stack.length - 1;
  86549. let scope = stack[i];
  86550. while (scope.canBeArrowParameterDeclaration()) {
  86551. if (scope.type === kMaybeAsyncArrowParameterDeclaration) {
  86552. scope.recordDeclarationError(pos, template);
  86553. }
  86554. scope = stack[--i];
  86555. }
  86556. }
  86557. validateAsPattern() {
  86558. const {
  86559. stack
  86560. } = this;
  86561. const currentScope = stack[stack.length - 1];
  86562. if (!currentScope.canBeArrowParameterDeclaration())
  86563. return;
  86564. currentScope.iterateErrors((template, pos) => {
  86565. this.raise(pos, template);
  86566. let i = stack.length - 2;
  86567. let scope = stack[i];
  86568. while (scope.canBeArrowParameterDeclaration()) {
  86569. scope.clearDeclarationError(pos);
  86570. scope = stack[--i];
  86571. }
  86572. });
  86573. }
  86574. };
  86575. function newParameterDeclarationScope() {
  86576. return new ExpressionScope(kParameterDeclaration);
  86577. }
  86578. function newArrowHeadScope() {
  86579. return new ArrowHeadParsingScope(kMaybeArrowParameterDeclaration);
  86580. }
  86581. function newAsyncArrowScope() {
  86582. return new ArrowHeadParsingScope(kMaybeAsyncArrowParameterDeclaration);
  86583. }
  86584. function newExpressionScope() {
  86585. return new ExpressionScope();
  86586. }
  86587. var UtilParser = class extends Tokenizer {
  86588. addExtra(node, key, val) {
  86589. if (!node)
  86590. return;
  86591. const extra = node.extra = node.extra || {};
  86592. extra[key] = val;
  86593. }
  86594. isRelational(op) {
  86595. return this.match(types$12.relational) && this.state.value === op;
  86596. }
  86597. expectRelational(op) {
  86598. if (this.isRelational(op)) {
  86599. this.next();
  86600. } else {
  86601. this.unexpected(null, types$12.relational);
  86602. }
  86603. }
  86604. isContextual(name2) {
  86605. return this.match(types$12.name) && this.state.value === name2 && !this.state.containsEsc;
  86606. }
  86607. isUnparsedContextual(nameStart, name2) {
  86608. const nameEnd = nameStart + name2.length;
  86609. if (this.input.slice(nameStart, nameEnd) === name2) {
  86610. const nextCh = this.input.charCodeAt(nameEnd);
  86611. return !(isIdentifierChar2(nextCh) || (nextCh & 64512) === 55296);
  86612. }
  86613. return false;
  86614. }
  86615. isLookaheadContextual(name2) {
  86616. const next = this.nextTokenStart();
  86617. return this.isUnparsedContextual(next, name2);
  86618. }
  86619. eatContextual(name2) {
  86620. return this.isContextual(name2) && this.eat(types$12.name);
  86621. }
  86622. expectContextual(name2, template) {
  86623. if (!this.eatContextual(name2))
  86624. this.unexpected(null, template);
  86625. }
  86626. canInsertSemicolon() {
  86627. return this.match(types$12.eof) || this.match(types$12.braceR) || this.hasPrecedingLineBreak();
  86628. }
  86629. hasPrecedingLineBreak() {
  86630. return lineBreak2.test(this.input.slice(this.state.lastTokEnd, this.state.start));
  86631. }
  86632. hasFollowingLineBreak() {
  86633. return lineBreak2.test(this.input.slice(this.state.end, this.nextTokenStart()));
  86634. }
  86635. isLineTerminator() {
  86636. return this.eat(types$12.semi) || this.canInsertSemicolon();
  86637. }
  86638. semicolon(allowAsi = true) {
  86639. if (allowAsi ? this.isLineTerminator() : this.eat(types$12.semi))
  86640. return;
  86641. this.raise(this.state.lastTokEnd, ErrorMessages.MissingSemicolon);
  86642. }
  86643. expect(type, pos) {
  86644. this.eat(type) || this.unexpected(pos, type);
  86645. }
  86646. assertNoSpace(message = "Unexpected space.") {
  86647. if (this.state.start > this.state.lastTokEnd) {
  86648. this.raise(this.state.lastTokEnd, {
  86649. code: ErrorCodes.SyntaxError,
  86650. reasonCode: "UnexpectedSpace",
  86651. template: message
  86652. });
  86653. }
  86654. }
  86655. unexpected(pos, messageOrType = {
  86656. code: ErrorCodes.SyntaxError,
  86657. reasonCode: "UnexpectedToken",
  86658. template: "Unexpected token"
  86659. }) {
  86660. if (messageOrType instanceof TokenType3) {
  86661. messageOrType = {
  86662. code: ErrorCodes.SyntaxError,
  86663. reasonCode: "UnexpectedToken",
  86664. template: `Unexpected token, expected "${messageOrType.label}"`
  86665. };
  86666. }
  86667. throw this.raise(pos != null ? pos : this.state.start, messageOrType);
  86668. }
  86669. expectPlugin(name2, pos) {
  86670. if (!this.hasPlugin(name2)) {
  86671. throw this.raiseWithData(pos != null ? pos : this.state.start, {
  86672. missingPlugin: [name2]
  86673. }, `This experimental syntax requires enabling the parser plugin: '${name2}'`);
  86674. }
  86675. return true;
  86676. }
  86677. expectOnePlugin(names, pos) {
  86678. if (!names.some((n) => this.hasPlugin(n))) {
  86679. throw this.raiseWithData(pos != null ? pos : this.state.start, {
  86680. missingPlugin: names
  86681. }, `This experimental syntax requires enabling one of the following parser plugin(s): '${names.join(", ")}'`);
  86682. }
  86683. }
  86684. tryParse(fn, oldState = this.state.clone()) {
  86685. const abortSignal = {
  86686. node: null
  86687. };
  86688. try {
  86689. const node = fn((node2 = null) => {
  86690. abortSignal.node = node2;
  86691. throw abortSignal;
  86692. });
  86693. if (this.state.errors.length > oldState.errors.length) {
  86694. const failState = this.state;
  86695. this.state = oldState;
  86696. this.state.tokensLength = failState.tokensLength;
  86697. return {
  86698. node,
  86699. error: failState.errors[oldState.errors.length],
  86700. thrown: false,
  86701. aborted: false,
  86702. failState
  86703. };
  86704. }
  86705. return {
  86706. node,
  86707. error: null,
  86708. thrown: false,
  86709. aborted: false,
  86710. failState: null
  86711. };
  86712. } catch (error) {
  86713. const failState = this.state;
  86714. this.state = oldState;
  86715. if (error instanceof SyntaxError) {
  86716. return {
  86717. node: null,
  86718. error,
  86719. thrown: true,
  86720. aborted: false,
  86721. failState
  86722. };
  86723. }
  86724. if (error === abortSignal) {
  86725. return {
  86726. node: abortSignal.node,
  86727. error: null,
  86728. thrown: false,
  86729. aborted: true,
  86730. failState
  86731. };
  86732. }
  86733. throw error;
  86734. }
  86735. }
  86736. checkExpressionErrors(refExpressionErrors, andThrow) {
  86737. if (!refExpressionErrors)
  86738. return false;
  86739. const {
  86740. shorthandAssign,
  86741. doubleProto,
  86742. optionalParameters
  86743. } = refExpressionErrors;
  86744. if (!andThrow) {
  86745. return shorthandAssign >= 0 || doubleProto >= 0 || optionalParameters >= 0;
  86746. }
  86747. if (shorthandAssign >= 0) {
  86748. this.unexpected(shorthandAssign);
  86749. }
  86750. if (doubleProto >= 0) {
  86751. this.raise(doubleProto, ErrorMessages.DuplicateProto);
  86752. }
  86753. if (optionalParameters >= 0) {
  86754. this.unexpected(optionalParameters);
  86755. }
  86756. }
  86757. isLiteralPropertyName() {
  86758. return this.match(types$12.name) || !!this.state.type.keyword || this.match(types$12.string) || this.match(types$12.num) || this.match(types$12.bigint) || this.match(types$12.decimal);
  86759. }
  86760. isPrivateName(node) {
  86761. return node.type === "PrivateName";
  86762. }
  86763. getPrivateNameSV(node) {
  86764. return node.id.name;
  86765. }
  86766. hasPropertyAsPrivateName(node) {
  86767. return (node.type === "MemberExpression" || node.type === "OptionalMemberExpression") && this.isPrivateName(node.property);
  86768. }
  86769. isOptionalChain(node) {
  86770. return node.type === "OptionalMemberExpression" || node.type === "OptionalCallExpression";
  86771. }
  86772. isObjectProperty(node) {
  86773. return node.type === "ObjectProperty";
  86774. }
  86775. isObjectMethod(node) {
  86776. return node.type === "ObjectMethod";
  86777. }
  86778. initializeScopes(inModule = this.options.sourceType === "module") {
  86779. const oldLabels = this.state.labels;
  86780. this.state.labels = [];
  86781. const oldExportedIdentifiers = this.exportedIdentifiers;
  86782. this.exportedIdentifiers = /* @__PURE__ */ new Set();
  86783. const oldInModule = this.inModule;
  86784. this.inModule = inModule;
  86785. const oldScope = this.scope;
  86786. const ScopeHandler2 = this.getScopeHandler();
  86787. this.scope = new ScopeHandler2(this.raise.bind(this), this.inModule);
  86788. const oldProdParam = this.prodParam;
  86789. this.prodParam = new ProductionParameterHandler();
  86790. const oldClassScope = this.classScope;
  86791. this.classScope = new ClassScopeHandler(this.raise.bind(this));
  86792. const oldExpressionScope = this.expressionScope;
  86793. this.expressionScope = new ExpressionScopeHandler(this.raise.bind(this));
  86794. return () => {
  86795. this.state.labels = oldLabels;
  86796. this.exportedIdentifiers = oldExportedIdentifiers;
  86797. this.inModule = oldInModule;
  86798. this.scope = oldScope;
  86799. this.prodParam = oldProdParam;
  86800. this.classScope = oldClassScope;
  86801. this.expressionScope = oldExpressionScope;
  86802. };
  86803. }
  86804. enterInitialScopes() {
  86805. let paramFlags = PARAM;
  86806. if (this.hasPlugin("topLevelAwait") && this.inModule) {
  86807. paramFlags |= PARAM_AWAIT;
  86808. }
  86809. this.scope.enter(SCOPE_PROGRAM);
  86810. this.prodParam.enter(paramFlags);
  86811. }
  86812. };
  86813. var ExpressionErrors = class {
  86814. constructor() {
  86815. this.shorthandAssign = -1;
  86816. this.doubleProto = -1;
  86817. this.optionalParameters = -1;
  86818. }
  86819. };
  86820. var Node3 = class {
  86821. constructor(parser, pos, loc) {
  86822. this.type = void 0;
  86823. this.start = void 0;
  86824. this.end = void 0;
  86825. this.loc = void 0;
  86826. this.range = void 0;
  86827. this.leadingComments = void 0;
  86828. this.trailingComments = void 0;
  86829. this.innerComments = void 0;
  86830. this.extra = void 0;
  86831. this.type = "";
  86832. this.start = pos;
  86833. this.end = 0;
  86834. this.loc = new SourceLocation3(loc);
  86835. if (parser != null && parser.options.ranges)
  86836. this.range = [pos, 0];
  86837. if (parser != null && parser.filename)
  86838. this.loc.filename = parser.filename;
  86839. }
  86840. __clone() {
  86841. const newNode = new Node3();
  86842. const keys2 = Object.keys(this);
  86843. for (let i = 0, length = keys2.length; i < length; i++) {
  86844. const key = keys2[i];
  86845. if (key !== "leadingComments" && key !== "trailingComments" && key !== "innerComments") {
  86846. newNode[key] = this[key];
  86847. }
  86848. }
  86849. return newNode;
  86850. }
  86851. };
  86852. var NodeUtils = class extends UtilParser {
  86853. startNode() {
  86854. return new Node3(this, this.state.start, this.state.startLoc);
  86855. }
  86856. startNodeAt(pos, loc) {
  86857. return new Node3(this, pos, loc);
  86858. }
  86859. startNodeAtNode(type) {
  86860. return this.startNodeAt(type.start, type.loc.start);
  86861. }
  86862. finishNode(node, type) {
  86863. return this.finishNodeAt(node, type, this.state.lastTokEnd, this.state.lastTokEndLoc);
  86864. }
  86865. finishNodeAt(node, type, pos, loc) {
  86866. node.type = type;
  86867. node.end = pos;
  86868. node.loc.end = loc;
  86869. if (this.options.ranges)
  86870. node.range[1] = pos;
  86871. this.processComment(node);
  86872. return node;
  86873. }
  86874. resetStartLocation(node, start3, startLoc) {
  86875. node.start = start3;
  86876. node.loc.start = startLoc;
  86877. if (this.options.ranges)
  86878. node.range[0] = start3;
  86879. }
  86880. resetEndLocation(node, end = this.state.lastTokEnd, endLoc = this.state.lastTokEndLoc) {
  86881. node.end = end;
  86882. node.loc.end = endLoc;
  86883. if (this.options.ranges)
  86884. node.range[1] = end;
  86885. }
  86886. resetStartLocationFromNode(node, locationNode) {
  86887. this.resetStartLocation(node, locationNode.start, locationNode.loc.start);
  86888. }
  86889. };
  86890. var unwrapParenthesizedExpression = (node) => {
  86891. return node.type === "ParenthesizedExpression" ? unwrapParenthesizedExpression(node.expression) : node;
  86892. };
  86893. var LValParser = class extends NodeUtils {
  86894. toAssignable(node, isLHS = false) {
  86895. var _node$extra, _node$extra3;
  86896. let parenthesized = void 0;
  86897. if (node.type === "ParenthesizedExpression" || (_node$extra = node.extra) != null && _node$extra.parenthesized) {
  86898. parenthesized = unwrapParenthesizedExpression(node);
  86899. if (isLHS) {
  86900. if (parenthesized.type === "Identifier") {
  86901. this.expressionScope.recordParenthesizedIdentifierError(node.start, ErrorMessages.InvalidParenthesizedAssignment);
  86902. } else if (parenthesized.type !== "MemberExpression") {
  86903. this.raise(node.start, ErrorMessages.InvalidParenthesizedAssignment);
  86904. }
  86905. } else {
  86906. this.raise(node.start, ErrorMessages.InvalidParenthesizedAssignment);
  86907. }
  86908. }
  86909. switch (node.type) {
  86910. case "Identifier":
  86911. case "ObjectPattern":
  86912. case "ArrayPattern":
  86913. case "AssignmentPattern":
  86914. break;
  86915. case "ObjectExpression":
  86916. node.type = "ObjectPattern";
  86917. for (let i = 0, length = node.properties.length, last = length - 1; i < length; i++) {
  86918. var _node$extra2;
  86919. const prop = node.properties[i];
  86920. const isLast = i === last;
  86921. this.toAssignableObjectExpressionProp(prop, isLast, isLHS);
  86922. if (isLast && prop.type === "RestElement" && (_node$extra2 = node.extra) != null && _node$extra2.trailingComma) {
  86923. this.raiseRestNotLast(node.extra.trailingComma);
  86924. }
  86925. }
  86926. break;
  86927. case "ObjectProperty":
  86928. this.toAssignable(node.value, isLHS);
  86929. break;
  86930. case "SpreadElement": {
  86931. this.checkToRestConversion(node);
  86932. node.type = "RestElement";
  86933. const arg = node.argument;
  86934. this.toAssignable(arg, isLHS);
  86935. break;
  86936. }
  86937. case "ArrayExpression":
  86938. node.type = "ArrayPattern";
  86939. this.toAssignableList(node.elements, (_node$extra3 = node.extra) == null ? void 0 : _node$extra3.trailingComma, isLHS);
  86940. break;
  86941. case "AssignmentExpression":
  86942. if (node.operator !== "=") {
  86943. this.raise(node.left.end, ErrorMessages.MissingEqInAssignment);
  86944. }
  86945. node.type = "AssignmentPattern";
  86946. delete node.operator;
  86947. this.toAssignable(node.left, isLHS);
  86948. break;
  86949. case "ParenthesizedExpression":
  86950. this.toAssignable(parenthesized, isLHS);
  86951. break;
  86952. }
  86953. return node;
  86954. }
  86955. toAssignableObjectExpressionProp(prop, isLast, isLHS) {
  86956. if (prop.type === "ObjectMethod") {
  86957. const error = prop.kind === "get" || prop.kind === "set" ? ErrorMessages.PatternHasAccessor : ErrorMessages.PatternHasMethod;
  86958. this.raise(prop.key.start, error);
  86959. } else if (prop.type === "SpreadElement" && !isLast) {
  86960. this.raiseRestNotLast(prop.start);
  86961. } else {
  86962. this.toAssignable(prop, isLHS);
  86963. }
  86964. }
  86965. toAssignableList(exprList, trailingCommaPos, isLHS) {
  86966. let end = exprList.length;
  86967. if (end) {
  86968. const last = exprList[end - 1];
  86969. if ((last == null ? void 0 : last.type) === "RestElement") {
  86970. --end;
  86971. } else if ((last == null ? void 0 : last.type) === "SpreadElement") {
  86972. last.type = "RestElement";
  86973. let arg = last.argument;
  86974. this.toAssignable(arg, isLHS);
  86975. arg = unwrapParenthesizedExpression(arg);
  86976. if (arg.type !== "Identifier" && arg.type !== "MemberExpression" && arg.type !== "ArrayPattern" && arg.type !== "ObjectPattern") {
  86977. this.unexpected(arg.start);
  86978. }
  86979. if (trailingCommaPos) {
  86980. this.raiseTrailingCommaAfterRest(trailingCommaPos);
  86981. }
  86982. --end;
  86983. }
  86984. }
  86985. for (let i = 0; i < end; i++) {
  86986. const elt = exprList[i];
  86987. if (elt) {
  86988. this.toAssignable(elt, isLHS);
  86989. if (elt.type === "RestElement") {
  86990. this.raiseRestNotLast(elt.start);
  86991. }
  86992. }
  86993. }
  86994. return exprList;
  86995. }
  86996. toReferencedList(exprList, isParenthesizedExpr) {
  86997. return exprList;
  86998. }
  86999. toReferencedListDeep(exprList, isParenthesizedExpr) {
  87000. this.toReferencedList(exprList, isParenthesizedExpr);
  87001. for (const expr of exprList) {
  87002. if ((expr == null ? void 0 : expr.type) === "ArrayExpression") {
  87003. this.toReferencedListDeep(expr.elements);
  87004. }
  87005. }
  87006. }
  87007. parseSpread(refExpressionErrors, refNeedsArrowPos) {
  87008. const node = this.startNode();
  87009. this.next();
  87010. node.argument = this.parseMaybeAssignAllowIn(refExpressionErrors, void 0, refNeedsArrowPos);
  87011. return this.finishNode(node, "SpreadElement");
  87012. }
  87013. parseRestBinding() {
  87014. const node = this.startNode();
  87015. this.next();
  87016. node.argument = this.parseBindingAtom();
  87017. return this.finishNode(node, "RestElement");
  87018. }
  87019. parseBindingAtom() {
  87020. switch (this.state.type) {
  87021. case types$12.bracketL: {
  87022. const node = this.startNode();
  87023. this.next();
  87024. node.elements = this.parseBindingList(types$12.bracketR, 93, true);
  87025. return this.finishNode(node, "ArrayPattern");
  87026. }
  87027. case types$12.braceL:
  87028. return this.parseObjectLike(types$12.braceR, true);
  87029. }
  87030. return this.parseIdentifier();
  87031. }
  87032. parseBindingList(close, closeCharCode, allowEmpty, allowModifiers) {
  87033. const elts = [];
  87034. let first = true;
  87035. while (!this.eat(close)) {
  87036. if (first) {
  87037. first = false;
  87038. } else {
  87039. this.expect(types$12.comma);
  87040. }
  87041. if (allowEmpty && this.match(types$12.comma)) {
  87042. elts.push(null);
  87043. } else if (this.eat(close)) {
  87044. break;
  87045. } else if (this.match(types$12.ellipsis)) {
  87046. elts.push(this.parseAssignableListItemTypes(this.parseRestBinding()));
  87047. this.checkCommaAfterRest(closeCharCode);
  87048. this.expect(close);
  87049. break;
  87050. } else {
  87051. const decorators = [];
  87052. if (this.match(types$12.at) && this.hasPlugin("decorators")) {
  87053. this.raise(this.state.start, ErrorMessages.UnsupportedParameterDecorator);
  87054. }
  87055. while (this.match(types$12.at)) {
  87056. decorators.push(this.parseDecorator());
  87057. }
  87058. elts.push(this.parseAssignableListItem(allowModifiers, decorators));
  87059. }
  87060. }
  87061. return elts;
  87062. }
  87063. parseAssignableListItem(allowModifiers, decorators) {
  87064. const left = this.parseMaybeDefault();
  87065. this.parseAssignableListItemTypes(left);
  87066. const elt = this.parseMaybeDefault(left.start, left.loc.start, left);
  87067. if (decorators.length) {
  87068. left.decorators = decorators;
  87069. }
  87070. return elt;
  87071. }
  87072. parseAssignableListItemTypes(param) {
  87073. return param;
  87074. }
  87075. parseMaybeDefault(startPos, startLoc, left) {
  87076. var _startLoc, _startPos, _left;
  87077. startLoc = (_startLoc = startLoc) != null ? _startLoc : this.state.startLoc;
  87078. startPos = (_startPos = startPos) != null ? _startPos : this.state.start;
  87079. left = (_left = left) != null ? _left : this.parseBindingAtom();
  87080. if (!this.eat(types$12.eq))
  87081. return left;
  87082. const node = this.startNodeAt(startPos, startLoc);
  87083. node.left = left;
  87084. node.right = this.parseMaybeAssignAllowIn();
  87085. return this.finishNode(node, "AssignmentPattern");
  87086. }
  87087. checkLVal(expr, contextDescription, bindingType = BIND_NONE2, checkClashes, disallowLetBinding, strictModeChanged = false) {
  87088. switch (expr.type) {
  87089. case "Identifier": {
  87090. const {
  87091. name: name2
  87092. } = expr;
  87093. if (this.state.strict && (strictModeChanged ? isStrictBindReservedWord(name2, this.inModule) : isStrictBindOnlyReservedWord(name2))) {
  87094. this.raise(expr.start, bindingType === BIND_NONE2 ? ErrorMessages.StrictEvalArguments : ErrorMessages.StrictEvalArgumentsBinding, name2);
  87095. }
  87096. if (checkClashes) {
  87097. if (checkClashes.has(name2)) {
  87098. this.raise(expr.start, ErrorMessages.ParamDupe);
  87099. } else {
  87100. checkClashes.add(name2);
  87101. }
  87102. }
  87103. if (disallowLetBinding && name2 === "let") {
  87104. this.raise(expr.start, ErrorMessages.LetInLexicalBinding);
  87105. }
  87106. if (!(bindingType & BIND_NONE2)) {
  87107. this.scope.declareName(name2, bindingType, expr.start);
  87108. }
  87109. break;
  87110. }
  87111. case "MemberExpression":
  87112. if (bindingType !== BIND_NONE2) {
  87113. this.raise(expr.start, ErrorMessages.InvalidPropertyBindingPattern);
  87114. }
  87115. break;
  87116. case "ObjectPattern":
  87117. for (let prop of expr.properties) {
  87118. if (this.isObjectProperty(prop))
  87119. prop = prop.value;
  87120. else if (this.isObjectMethod(prop))
  87121. continue;
  87122. this.checkLVal(prop, "object destructuring pattern", bindingType, checkClashes, disallowLetBinding);
  87123. }
  87124. break;
  87125. case "ArrayPattern":
  87126. for (const elem of expr.elements) {
  87127. if (elem) {
  87128. this.checkLVal(elem, "array destructuring pattern", bindingType, checkClashes, disallowLetBinding);
  87129. }
  87130. }
  87131. break;
  87132. case "AssignmentPattern":
  87133. this.checkLVal(expr.left, "assignment pattern", bindingType, checkClashes);
  87134. break;
  87135. case "RestElement":
  87136. this.checkLVal(expr.argument, "rest element", bindingType, checkClashes);
  87137. break;
  87138. case "ParenthesizedExpression":
  87139. this.checkLVal(expr.expression, "parenthesized expression", bindingType, checkClashes);
  87140. break;
  87141. default: {
  87142. this.raise(expr.start, bindingType === BIND_NONE2 ? ErrorMessages.InvalidLhs : ErrorMessages.InvalidLhsBinding, contextDescription);
  87143. }
  87144. }
  87145. }
  87146. checkToRestConversion(node) {
  87147. if (node.argument.type !== "Identifier" && node.argument.type !== "MemberExpression") {
  87148. this.raise(node.argument.start, ErrorMessages.InvalidRestAssignmentPattern);
  87149. }
  87150. }
  87151. checkCommaAfterRest(close) {
  87152. if (this.match(types$12.comma)) {
  87153. if (this.lookaheadCharCode() === close) {
  87154. this.raiseTrailingCommaAfterRest(this.state.start);
  87155. } else {
  87156. this.raiseRestNotLast(this.state.start);
  87157. }
  87158. }
  87159. }
  87160. raiseRestNotLast(pos) {
  87161. throw this.raise(pos, ErrorMessages.ElementAfterRest);
  87162. }
  87163. raiseTrailingCommaAfterRest(pos) {
  87164. this.raise(pos, ErrorMessages.RestTrailingComma);
  87165. }
  87166. };
  87167. var ExpressionParser = class extends LValParser {
  87168. checkProto(prop, isRecord, protoRef, refExpressionErrors) {
  87169. if (prop.type === "SpreadElement" || this.isObjectMethod(prop) || prop.computed || prop.shorthand) {
  87170. return;
  87171. }
  87172. const key = prop.key;
  87173. const name2 = key.type === "Identifier" ? key.name : key.value;
  87174. if (name2 === "__proto__") {
  87175. if (isRecord) {
  87176. this.raise(key.start, ErrorMessages.RecordNoProto);
  87177. return;
  87178. }
  87179. if (protoRef.used) {
  87180. if (refExpressionErrors) {
  87181. if (refExpressionErrors.doubleProto === -1) {
  87182. refExpressionErrors.doubleProto = key.start;
  87183. }
  87184. } else {
  87185. this.raise(key.start, ErrorMessages.DuplicateProto);
  87186. }
  87187. }
  87188. protoRef.used = true;
  87189. }
  87190. }
  87191. shouldExitDescending(expr, potentialArrowAt) {
  87192. return expr.type === "ArrowFunctionExpression" && expr.start === potentialArrowAt;
  87193. }
  87194. getExpression() {
  87195. let paramFlags = PARAM;
  87196. if (this.hasPlugin("topLevelAwait") && this.inModule) {
  87197. paramFlags |= PARAM_AWAIT;
  87198. }
  87199. this.scope.enter(SCOPE_PROGRAM);
  87200. this.prodParam.enter(paramFlags);
  87201. this.nextToken();
  87202. const expr = this.parseExpression();
  87203. if (!this.match(types$12.eof)) {
  87204. this.unexpected();
  87205. }
  87206. this.finalizeRemainingComments();
  87207. expr.comments = this.state.comments;
  87208. expr.errors = this.state.errors;
  87209. if (this.options.tokens) {
  87210. expr.tokens = this.tokens;
  87211. }
  87212. return expr;
  87213. }
  87214. parseExpression(disallowIn, refExpressionErrors) {
  87215. if (disallowIn) {
  87216. return this.disallowInAnd(() => this.parseExpressionBase(refExpressionErrors));
  87217. }
  87218. return this.allowInAnd(() => this.parseExpressionBase(refExpressionErrors));
  87219. }
  87220. parseExpressionBase(refExpressionErrors) {
  87221. const startPos = this.state.start;
  87222. const startLoc = this.state.startLoc;
  87223. const expr = this.parseMaybeAssign(refExpressionErrors);
  87224. if (this.match(types$12.comma)) {
  87225. const node = this.startNodeAt(startPos, startLoc);
  87226. node.expressions = [expr];
  87227. while (this.eat(types$12.comma)) {
  87228. node.expressions.push(this.parseMaybeAssign(refExpressionErrors));
  87229. }
  87230. this.toReferencedList(node.expressions);
  87231. return this.finishNode(node, "SequenceExpression");
  87232. }
  87233. return expr;
  87234. }
  87235. parseMaybeAssignDisallowIn(refExpressionErrors, afterLeftParse) {
  87236. return this.disallowInAnd(() => this.parseMaybeAssign(refExpressionErrors, afterLeftParse));
  87237. }
  87238. parseMaybeAssignAllowIn(refExpressionErrors, afterLeftParse) {
  87239. return this.allowInAnd(() => this.parseMaybeAssign(refExpressionErrors, afterLeftParse));
  87240. }
  87241. setOptionalParametersError(refExpressionErrors, resultError) {
  87242. var _resultError$pos;
  87243. refExpressionErrors.optionalParameters = (_resultError$pos = resultError == null ? void 0 : resultError.pos) != null ? _resultError$pos : this.state.start;
  87244. }
  87245. parseMaybeAssign(refExpressionErrors, afterLeftParse) {
  87246. const startPos = this.state.start;
  87247. const startLoc = this.state.startLoc;
  87248. if (this.isContextual("yield")) {
  87249. if (this.prodParam.hasYield) {
  87250. let left2 = this.parseYield();
  87251. if (afterLeftParse) {
  87252. left2 = afterLeftParse.call(this, left2, startPos, startLoc);
  87253. }
  87254. return left2;
  87255. }
  87256. }
  87257. let ownExpressionErrors;
  87258. if (refExpressionErrors) {
  87259. ownExpressionErrors = false;
  87260. } else {
  87261. refExpressionErrors = new ExpressionErrors();
  87262. ownExpressionErrors = true;
  87263. }
  87264. if (this.match(types$12.parenL) || this.match(types$12.name)) {
  87265. this.state.potentialArrowAt = this.state.start;
  87266. }
  87267. let left = this.parseMaybeConditional(refExpressionErrors);
  87268. if (afterLeftParse) {
  87269. left = afterLeftParse.call(this, left, startPos, startLoc);
  87270. }
  87271. if (this.state.type.isAssign) {
  87272. const node = this.startNodeAt(startPos, startLoc);
  87273. const operator = this.state.value;
  87274. node.operator = operator;
  87275. if (this.match(types$12.eq)) {
  87276. node.left = this.toAssignable(left, true);
  87277. refExpressionErrors.doubleProto = -1;
  87278. } else {
  87279. node.left = left;
  87280. }
  87281. if (refExpressionErrors.shorthandAssign >= node.left.start) {
  87282. refExpressionErrors.shorthandAssign = -1;
  87283. }
  87284. this.checkLVal(left, "assignment expression");
  87285. this.next();
  87286. node.right = this.parseMaybeAssign();
  87287. return this.finishNode(node, "AssignmentExpression");
  87288. } else if (ownExpressionErrors) {
  87289. this.checkExpressionErrors(refExpressionErrors, true);
  87290. }
  87291. return left;
  87292. }
  87293. parseMaybeConditional(refExpressionErrors) {
  87294. const startPos = this.state.start;
  87295. const startLoc = this.state.startLoc;
  87296. const potentialArrowAt = this.state.potentialArrowAt;
  87297. const expr = this.parseExprOps(refExpressionErrors);
  87298. if (this.shouldExitDescending(expr, potentialArrowAt)) {
  87299. return expr;
  87300. }
  87301. return this.parseConditional(expr, startPos, startLoc, refExpressionErrors);
  87302. }
  87303. parseConditional(expr, startPos, startLoc, refExpressionErrors) {
  87304. if (this.eat(types$12.question)) {
  87305. const node = this.startNodeAt(startPos, startLoc);
  87306. node.test = expr;
  87307. node.consequent = this.parseMaybeAssignAllowIn();
  87308. this.expect(types$12.colon);
  87309. node.alternate = this.parseMaybeAssign();
  87310. return this.finishNode(node, "ConditionalExpression");
  87311. }
  87312. return expr;
  87313. }
  87314. parseExprOps(refExpressionErrors) {
  87315. const startPos = this.state.start;
  87316. const startLoc = this.state.startLoc;
  87317. const potentialArrowAt = this.state.potentialArrowAt;
  87318. const expr = this.parseMaybeUnary(refExpressionErrors);
  87319. if (this.shouldExitDescending(expr, potentialArrowAt)) {
  87320. return expr;
  87321. }
  87322. return this.parseExprOp(expr, startPos, startLoc, -1);
  87323. }
  87324. parseExprOp(left, leftStartPos, leftStartLoc, minPrec) {
  87325. let prec = this.state.type.binop;
  87326. if (prec != null && (this.prodParam.hasIn || !this.match(types$12._in))) {
  87327. if (prec > minPrec) {
  87328. const op = this.state.type;
  87329. if (op === types$12.pipeline) {
  87330. this.expectPlugin("pipelineOperator");
  87331. if (this.state.inFSharpPipelineDirectBody) {
  87332. return left;
  87333. }
  87334. this.state.inPipeline = true;
  87335. this.checkPipelineAtInfixOperator(left, leftStartPos);
  87336. }
  87337. const node = this.startNodeAt(leftStartPos, leftStartLoc);
  87338. node.left = left;
  87339. node.operator = this.state.value;
  87340. const logical = op === types$12.logicalOR || op === types$12.logicalAND;
  87341. const coalesce = op === types$12.nullishCoalescing;
  87342. if (coalesce) {
  87343. prec = types$12.logicalAND.binop;
  87344. }
  87345. this.next();
  87346. if (op === types$12.pipeline && this.getPluginOption("pipelineOperator", "proposal") === "minimal") {
  87347. if (this.match(types$12.name) && this.state.value === "await" && this.prodParam.hasAwait) {
  87348. throw this.raise(this.state.start, ErrorMessages.UnexpectedAwaitAfterPipelineBody);
  87349. }
  87350. }
  87351. node.right = this.parseExprOpRightExpr(op, prec);
  87352. this.finishNode(node, logical || coalesce ? "LogicalExpression" : "BinaryExpression");
  87353. const nextOp = this.state.type;
  87354. if (coalesce && (nextOp === types$12.logicalOR || nextOp === types$12.logicalAND) || logical && nextOp === types$12.nullishCoalescing) {
  87355. throw this.raise(this.state.start, ErrorMessages.MixingCoalesceWithLogical);
  87356. }
  87357. return this.parseExprOp(node, leftStartPos, leftStartLoc, minPrec);
  87358. }
  87359. }
  87360. return left;
  87361. }
  87362. parseExprOpRightExpr(op, prec) {
  87363. const startPos = this.state.start;
  87364. const startLoc = this.state.startLoc;
  87365. switch (op) {
  87366. case types$12.pipeline:
  87367. switch (this.getPluginOption("pipelineOperator", "proposal")) {
  87368. case "smart":
  87369. return this.withTopicPermittingContext(() => {
  87370. return this.parseSmartPipelineBody(this.parseExprOpBaseRightExpr(op, prec), startPos, startLoc);
  87371. });
  87372. case "fsharp":
  87373. return this.withSoloAwaitPermittingContext(() => {
  87374. return this.parseFSharpPipelineBody(prec);
  87375. });
  87376. }
  87377. default:
  87378. return this.parseExprOpBaseRightExpr(op, prec);
  87379. }
  87380. }
  87381. parseExprOpBaseRightExpr(op, prec) {
  87382. const startPos = this.state.start;
  87383. const startLoc = this.state.startLoc;
  87384. return this.parseExprOp(this.parseMaybeUnary(), startPos, startLoc, op.rightAssociative ? prec - 1 : prec);
  87385. }
  87386. checkExponentialAfterUnary(node) {
  87387. if (this.match(types$12.exponent)) {
  87388. this.raise(node.argument.start, ErrorMessages.UnexpectedTokenUnaryExponentiation);
  87389. }
  87390. }
  87391. parseMaybeUnary(refExpressionErrors, sawUnary) {
  87392. const startPos = this.state.start;
  87393. const startLoc = this.state.startLoc;
  87394. const isAwait = this.isContextual("await");
  87395. if (isAwait && this.isAwaitAllowed()) {
  87396. this.next();
  87397. const expr2 = this.parseAwait(startPos, startLoc);
  87398. if (!sawUnary)
  87399. this.checkExponentialAfterUnary(expr2);
  87400. return expr2;
  87401. }
  87402. const update = this.match(types$12.incDec);
  87403. const node = this.startNode();
  87404. if (this.state.type.prefix) {
  87405. node.operator = this.state.value;
  87406. node.prefix = true;
  87407. if (this.match(types$12._throw)) {
  87408. this.expectPlugin("throwExpressions");
  87409. }
  87410. const isDelete = this.match(types$12._delete);
  87411. this.next();
  87412. node.argument = this.parseMaybeUnary(null, true);
  87413. this.checkExpressionErrors(refExpressionErrors, true);
  87414. if (this.state.strict && isDelete) {
  87415. const arg = node.argument;
  87416. if (arg.type === "Identifier") {
  87417. this.raise(node.start, ErrorMessages.StrictDelete);
  87418. } else if (this.hasPropertyAsPrivateName(arg)) {
  87419. this.raise(node.start, ErrorMessages.DeletePrivateField);
  87420. }
  87421. }
  87422. if (!update) {
  87423. if (!sawUnary)
  87424. this.checkExponentialAfterUnary(node);
  87425. return this.finishNode(node, "UnaryExpression");
  87426. }
  87427. }
  87428. const expr = this.parseUpdate(node, update, refExpressionErrors);
  87429. if (isAwait) {
  87430. const startsExpr3 = this.hasPlugin("v8intrinsic") ? this.state.type.startsExpr : this.state.type.startsExpr && !this.match(types$12.modulo);
  87431. if (startsExpr3 && !this.isAmbiguousAwait()) {
  87432. this.raiseOverwrite(startPos, this.hasPlugin("topLevelAwait") ? ErrorMessages.AwaitNotInAsyncContext : ErrorMessages.AwaitNotInAsyncFunction);
  87433. return this.parseAwait(startPos, startLoc);
  87434. }
  87435. }
  87436. return expr;
  87437. }
  87438. parseUpdate(node, update, refExpressionErrors) {
  87439. if (update) {
  87440. this.checkLVal(node.argument, "prefix operation");
  87441. return this.finishNode(node, "UpdateExpression");
  87442. }
  87443. const startPos = this.state.start;
  87444. const startLoc = this.state.startLoc;
  87445. let expr = this.parseExprSubscripts(refExpressionErrors);
  87446. if (this.checkExpressionErrors(refExpressionErrors, false))
  87447. return expr;
  87448. while (this.state.type.postfix && !this.canInsertSemicolon()) {
  87449. const node2 = this.startNodeAt(startPos, startLoc);
  87450. node2.operator = this.state.value;
  87451. node2.prefix = false;
  87452. node2.argument = expr;
  87453. this.checkLVal(expr, "postfix operation");
  87454. this.next();
  87455. expr = this.finishNode(node2, "UpdateExpression");
  87456. }
  87457. return expr;
  87458. }
  87459. parseExprSubscripts(refExpressionErrors) {
  87460. const startPos = this.state.start;
  87461. const startLoc = this.state.startLoc;
  87462. const potentialArrowAt = this.state.potentialArrowAt;
  87463. const expr = this.parseExprAtom(refExpressionErrors);
  87464. if (this.shouldExitDescending(expr, potentialArrowAt)) {
  87465. return expr;
  87466. }
  87467. return this.parseSubscripts(expr, startPos, startLoc);
  87468. }
  87469. parseSubscripts(base2, startPos, startLoc, noCalls) {
  87470. const state = {
  87471. optionalChainMember: false,
  87472. maybeAsyncArrow: this.atPossibleAsyncArrow(base2),
  87473. stop: false
  87474. };
  87475. do {
  87476. base2 = this.parseSubscript(base2, startPos, startLoc, noCalls, state);
  87477. state.maybeAsyncArrow = false;
  87478. } while (!state.stop);
  87479. return base2;
  87480. }
  87481. parseSubscript(base2, startPos, startLoc, noCalls, state) {
  87482. if (!noCalls && this.eat(types$12.doubleColon)) {
  87483. return this.parseBind(base2, startPos, startLoc, noCalls, state);
  87484. } else if (this.match(types$12.backQuote)) {
  87485. return this.parseTaggedTemplateExpression(base2, startPos, startLoc, state);
  87486. }
  87487. let optional = false;
  87488. if (this.match(types$12.questionDot)) {
  87489. if (noCalls && this.lookaheadCharCode() === 40) {
  87490. state.stop = true;
  87491. return base2;
  87492. }
  87493. state.optionalChainMember = optional = true;
  87494. this.next();
  87495. }
  87496. if (!noCalls && this.match(types$12.parenL)) {
  87497. return this.parseCoverCallAndAsyncArrowHead(base2, startPos, startLoc, state, optional);
  87498. } else if (optional || this.match(types$12.bracketL) || this.eat(types$12.dot)) {
  87499. return this.parseMember(base2, startPos, startLoc, state, optional);
  87500. } else {
  87501. state.stop = true;
  87502. return base2;
  87503. }
  87504. }
  87505. parseMember(base2, startPos, startLoc, state, optional) {
  87506. const node = this.startNodeAt(startPos, startLoc);
  87507. const computed = this.eat(types$12.bracketL);
  87508. node.object = base2;
  87509. node.computed = computed;
  87510. const privateName = !computed && this.match(types$12.privateName) && this.state.value;
  87511. const property = computed ? this.parseExpression() : privateName ? this.parsePrivateName() : this.parseIdentifier(true);
  87512. if (privateName !== false) {
  87513. if (node.object.type === "Super") {
  87514. this.raise(startPos, ErrorMessages.SuperPrivateField);
  87515. }
  87516. this.classScope.usePrivateName(privateName, property.start);
  87517. }
  87518. node.property = property;
  87519. if (computed) {
  87520. this.expect(types$12.bracketR);
  87521. }
  87522. if (state.optionalChainMember) {
  87523. node.optional = optional;
  87524. return this.finishNode(node, "OptionalMemberExpression");
  87525. } else {
  87526. return this.finishNode(node, "MemberExpression");
  87527. }
  87528. }
  87529. parseBind(base2, startPos, startLoc, noCalls, state) {
  87530. const node = this.startNodeAt(startPos, startLoc);
  87531. node.object = base2;
  87532. node.callee = this.parseNoCallExpr();
  87533. state.stop = true;
  87534. return this.parseSubscripts(this.finishNode(node, "BindExpression"), startPos, startLoc, noCalls);
  87535. }
  87536. parseCoverCallAndAsyncArrowHead(base2, startPos, startLoc, state, optional) {
  87537. const oldMaybeInArrowParameters = this.state.maybeInArrowParameters;
  87538. let refExpressionErrors = null;
  87539. this.state.maybeInArrowParameters = true;
  87540. this.next();
  87541. let node = this.startNodeAt(startPos, startLoc);
  87542. node.callee = base2;
  87543. if (state.maybeAsyncArrow) {
  87544. this.expressionScope.enter(newAsyncArrowScope());
  87545. refExpressionErrors = new ExpressionErrors();
  87546. }
  87547. if (state.optionalChainMember) {
  87548. node.optional = optional;
  87549. }
  87550. if (optional) {
  87551. node.arguments = this.parseCallExpressionArguments(types$12.parenR);
  87552. } else {
  87553. node.arguments = this.parseCallExpressionArguments(types$12.parenR, base2.type === "Import", base2.type !== "Super", node, refExpressionErrors);
  87554. }
  87555. this.finishCallExpression(node, state.optionalChainMember);
  87556. if (state.maybeAsyncArrow && this.shouldParseAsyncArrow() && !optional) {
  87557. state.stop = true;
  87558. this.expressionScope.validateAsPattern();
  87559. this.expressionScope.exit();
  87560. node = this.parseAsyncArrowFromCallExpression(this.startNodeAt(startPos, startLoc), node);
  87561. } else {
  87562. if (state.maybeAsyncArrow) {
  87563. this.checkExpressionErrors(refExpressionErrors, true);
  87564. this.expressionScope.exit();
  87565. }
  87566. this.toReferencedArguments(node);
  87567. }
  87568. this.state.maybeInArrowParameters = oldMaybeInArrowParameters;
  87569. return node;
  87570. }
  87571. toReferencedArguments(node, isParenthesizedExpr) {
  87572. this.toReferencedListDeep(node.arguments, isParenthesizedExpr);
  87573. }
  87574. parseTaggedTemplateExpression(base2, startPos, startLoc, state) {
  87575. const node = this.startNodeAt(startPos, startLoc);
  87576. node.tag = base2;
  87577. node.quasi = this.parseTemplate(true);
  87578. if (state.optionalChainMember) {
  87579. this.raise(startPos, ErrorMessages.OptionalChainingNoTemplate);
  87580. }
  87581. return this.finishNode(node, "TaggedTemplateExpression");
  87582. }
  87583. atPossibleAsyncArrow(base2) {
  87584. return base2.type === "Identifier" && base2.name === "async" && this.state.lastTokEnd === base2.end && !this.canInsertSemicolon() && base2.end - base2.start === 5 && base2.start === this.state.potentialArrowAt;
  87585. }
  87586. finishCallExpression(node, optional) {
  87587. if (node.callee.type === "Import") {
  87588. if (node.arguments.length === 2) {
  87589. {
  87590. if (!this.hasPlugin("moduleAttributes")) {
  87591. this.expectPlugin("importAssertions");
  87592. }
  87593. }
  87594. }
  87595. if (node.arguments.length === 0 || node.arguments.length > 2) {
  87596. this.raise(node.start, ErrorMessages.ImportCallArity, this.hasPlugin("importAssertions") || this.hasPlugin("moduleAttributes") ? "one or two arguments" : "one argument");
  87597. } else {
  87598. for (const arg of node.arguments) {
  87599. if (arg.type === "SpreadElement") {
  87600. this.raise(arg.start, ErrorMessages.ImportCallSpreadArgument);
  87601. }
  87602. }
  87603. }
  87604. }
  87605. return this.finishNode(node, optional ? "OptionalCallExpression" : "CallExpression");
  87606. }
  87607. parseCallExpressionArguments(close, dynamicImport, allowPlaceholder, nodeForExtra, refExpressionErrors) {
  87608. const elts = [];
  87609. let first = true;
  87610. const oldInFSharpPipelineDirectBody = this.state.inFSharpPipelineDirectBody;
  87611. this.state.inFSharpPipelineDirectBody = false;
  87612. while (!this.eat(close)) {
  87613. if (first) {
  87614. first = false;
  87615. } else {
  87616. this.expect(types$12.comma);
  87617. if (this.match(close)) {
  87618. if (dynamicImport && !this.hasPlugin("importAssertions") && !this.hasPlugin("moduleAttributes")) {
  87619. this.raise(this.state.lastTokStart, ErrorMessages.ImportCallArgumentTrailingComma);
  87620. }
  87621. if (nodeForExtra) {
  87622. this.addExtra(nodeForExtra, "trailingComma", this.state.lastTokStart);
  87623. }
  87624. this.next();
  87625. break;
  87626. }
  87627. }
  87628. elts.push(this.parseExprListItem(false, refExpressionErrors, allowPlaceholder));
  87629. }
  87630. this.state.inFSharpPipelineDirectBody = oldInFSharpPipelineDirectBody;
  87631. return elts;
  87632. }
  87633. shouldParseAsyncArrow() {
  87634. return this.match(types$12.arrow) && !this.canInsertSemicolon();
  87635. }
  87636. parseAsyncArrowFromCallExpression(node, call) {
  87637. var _call$extra;
  87638. this.resetPreviousNodeTrailingComments(call);
  87639. this.expect(types$12.arrow);
  87640. this.parseArrowExpression(node, call.arguments, true, (_call$extra = call.extra) == null ? void 0 : _call$extra.trailingComma);
  87641. setInnerComments(node, call.innerComments);
  87642. setInnerComments(node, call.callee.trailingComments);
  87643. return node;
  87644. }
  87645. parseNoCallExpr() {
  87646. const startPos = this.state.start;
  87647. const startLoc = this.state.startLoc;
  87648. return this.parseSubscripts(this.parseExprAtom(), startPos, startLoc, true);
  87649. }
  87650. parseExprAtom(refExpressionErrors) {
  87651. let node;
  87652. switch (this.state.type) {
  87653. case types$12._super:
  87654. return this.parseSuper();
  87655. case types$12._import:
  87656. node = this.startNode();
  87657. this.next();
  87658. if (this.match(types$12.dot)) {
  87659. return this.parseImportMetaProperty(node);
  87660. }
  87661. if (!this.match(types$12.parenL)) {
  87662. this.raise(this.state.lastTokStart, ErrorMessages.UnsupportedImport);
  87663. }
  87664. return this.finishNode(node, "Import");
  87665. case types$12._this:
  87666. node = this.startNode();
  87667. this.next();
  87668. return this.finishNode(node, "ThisExpression");
  87669. case types$12.name: {
  87670. if (this.isContextual("module") && this.lookaheadCharCode() === 123 && !this.hasFollowingLineBreak()) {
  87671. return this.parseModuleExpression();
  87672. }
  87673. const canBeArrow = this.state.potentialArrowAt === this.state.start;
  87674. const containsEsc = this.state.containsEsc;
  87675. const id = this.parseIdentifier();
  87676. if (!containsEsc && id.name === "async" && !this.canInsertSemicolon()) {
  87677. if (this.match(types$12._function)) {
  87678. this.resetPreviousNodeTrailingComments(id);
  87679. this.next();
  87680. return this.parseFunction(this.startNodeAtNode(id), void 0, true);
  87681. } else if (this.match(types$12.name)) {
  87682. if (this.lookaheadCharCode() === 61) {
  87683. return this.parseAsyncArrowUnaryFunction(this.startNodeAtNode(id));
  87684. } else {
  87685. return id;
  87686. }
  87687. } else if (this.match(types$12._do)) {
  87688. this.resetPreviousNodeTrailingComments(id);
  87689. return this.parseDo(this.startNodeAtNode(id), true);
  87690. }
  87691. }
  87692. if (canBeArrow && this.match(types$12.arrow) && !this.canInsertSemicolon()) {
  87693. this.next();
  87694. return this.parseArrowExpression(this.startNodeAtNode(id), [id], false);
  87695. }
  87696. return id;
  87697. }
  87698. case types$12._do: {
  87699. return this.parseDo(this.startNode(), false);
  87700. }
  87701. case types$12.slash:
  87702. case types$12.slashAssign: {
  87703. this.readRegexp();
  87704. return this.parseRegExpLiteral(this.state.value);
  87705. }
  87706. case types$12.num:
  87707. return this.parseNumericLiteral(this.state.value);
  87708. case types$12.bigint:
  87709. return this.parseBigIntLiteral(this.state.value);
  87710. case types$12.decimal:
  87711. return this.parseDecimalLiteral(this.state.value);
  87712. case types$12.string:
  87713. return this.parseStringLiteral(this.state.value);
  87714. case types$12._null:
  87715. return this.parseNullLiteral();
  87716. case types$12._true:
  87717. return this.parseBooleanLiteral(true);
  87718. case types$12._false:
  87719. return this.parseBooleanLiteral(false);
  87720. case types$12.parenL: {
  87721. const canBeArrow = this.state.potentialArrowAt === this.state.start;
  87722. return this.parseParenAndDistinguishExpression(canBeArrow);
  87723. }
  87724. case types$12.bracketBarL:
  87725. case types$12.bracketHashL: {
  87726. return this.parseArrayLike(this.state.type === types$12.bracketBarL ? types$12.bracketBarR : types$12.bracketR, false, true, refExpressionErrors);
  87727. }
  87728. case types$12.bracketL: {
  87729. return this.parseArrayLike(types$12.bracketR, true, false, refExpressionErrors);
  87730. }
  87731. case types$12.braceBarL:
  87732. case types$12.braceHashL: {
  87733. return this.parseObjectLike(this.state.type === types$12.braceBarL ? types$12.braceBarR : types$12.braceR, false, true, refExpressionErrors);
  87734. }
  87735. case types$12.braceL: {
  87736. return this.parseObjectLike(types$12.braceR, false, false, refExpressionErrors);
  87737. }
  87738. case types$12._function:
  87739. return this.parseFunctionOrFunctionSent();
  87740. case types$12.at:
  87741. this.parseDecorators();
  87742. case types$12._class:
  87743. node = this.startNode();
  87744. this.takeDecorators(node);
  87745. return this.parseClass(node, false);
  87746. case types$12._new:
  87747. return this.parseNewOrNewTarget();
  87748. case types$12.backQuote:
  87749. return this.parseTemplate(false);
  87750. case types$12.doubleColon: {
  87751. node = this.startNode();
  87752. this.next();
  87753. node.object = null;
  87754. const callee = node.callee = this.parseNoCallExpr();
  87755. if (callee.type === "MemberExpression") {
  87756. return this.finishNode(node, "BindExpression");
  87757. } else {
  87758. throw this.raise(callee.start, ErrorMessages.UnsupportedBind);
  87759. }
  87760. }
  87761. case types$12.privateName: {
  87762. const start3 = this.state.start;
  87763. const value = this.state.value;
  87764. node = this.parsePrivateName();
  87765. if (this.match(types$12._in)) {
  87766. this.expectPlugin("privateIn");
  87767. this.classScope.usePrivateName(value, node.start);
  87768. } else if (this.hasPlugin("privateIn")) {
  87769. this.raise(this.state.start, ErrorMessages.PrivateInExpectedIn, value);
  87770. } else {
  87771. throw this.unexpected(start3);
  87772. }
  87773. return node;
  87774. }
  87775. case types$12.hash: {
  87776. if (this.state.inPipeline) {
  87777. node = this.startNode();
  87778. if (this.getPluginOption("pipelineOperator", "proposal") !== "smart") {
  87779. this.raise(node.start, ErrorMessages.PrimaryTopicRequiresSmartPipeline);
  87780. }
  87781. this.next();
  87782. if (!this.primaryTopicReferenceIsAllowedInCurrentTopicContext()) {
  87783. this.raise(node.start, ErrorMessages.PrimaryTopicNotAllowed);
  87784. }
  87785. this.registerTopicReference();
  87786. return this.finishNode(node, "PipelinePrimaryTopicReference");
  87787. }
  87788. }
  87789. case types$12.relational: {
  87790. if (this.state.value === "<") {
  87791. const lookaheadCh = this.input.codePointAt(this.nextTokenStart());
  87792. if (isIdentifierStart2(lookaheadCh) || lookaheadCh === 62) {
  87793. this.expectOnePlugin(["jsx", "flow", "typescript"]);
  87794. }
  87795. }
  87796. }
  87797. default:
  87798. throw this.unexpected();
  87799. }
  87800. }
  87801. parseAsyncArrowUnaryFunction(node) {
  87802. this.prodParam.enter(functionFlags2(true, this.prodParam.hasYield));
  87803. const params = [this.parseIdentifier()];
  87804. this.prodParam.exit();
  87805. if (this.hasPrecedingLineBreak()) {
  87806. this.raise(this.state.pos, ErrorMessages.LineTerminatorBeforeArrow);
  87807. }
  87808. this.expect(types$12.arrow);
  87809. this.parseArrowExpression(node, params, true);
  87810. return node;
  87811. }
  87812. parseDo(node, isAsync) {
  87813. this.expectPlugin("doExpressions");
  87814. if (isAsync) {
  87815. this.expectPlugin("asyncDoExpressions");
  87816. }
  87817. node.async = isAsync;
  87818. this.next();
  87819. const oldLabels = this.state.labels;
  87820. this.state.labels = [];
  87821. if (isAsync) {
  87822. this.prodParam.enter(PARAM_AWAIT);
  87823. node.body = this.parseBlock();
  87824. this.prodParam.exit();
  87825. } else {
  87826. node.body = this.parseBlock();
  87827. }
  87828. this.state.labels = oldLabels;
  87829. return this.finishNode(node, "DoExpression");
  87830. }
  87831. parseSuper() {
  87832. const node = this.startNode();
  87833. this.next();
  87834. if (this.match(types$12.parenL) && !this.scope.allowDirectSuper && !this.options.allowSuperOutsideMethod) {
  87835. this.raise(node.start, ErrorMessages.SuperNotAllowed);
  87836. } else if (!this.scope.allowSuper && !this.options.allowSuperOutsideMethod) {
  87837. this.raise(node.start, ErrorMessages.UnexpectedSuper);
  87838. }
  87839. if (!this.match(types$12.parenL) && !this.match(types$12.bracketL) && !this.match(types$12.dot)) {
  87840. this.raise(node.start, ErrorMessages.UnsupportedSuper);
  87841. }
  87842. return this.finishNode(node, "Super");
  87843. }
  87844. parseMaybePrivateName(isPrivateNameAllowed) {
  87845. const isPrivate = this.match(types$12.privateName);
  87846. if (isPrivate) {
  87847. if (!isPrivateNameAllowed) {
  87848. this.raise(this.state.start + 1, ErrorMessages.UnexpectedPrivateField);
  87849. }
  87850. return this.parsePrivateName();
  87851. } else {
  87852. return this.parseIdentifier(true);
  87853. }
  87854. }
  87855. parsePrivateName() {
  87856. const node = this.startNode();
  87857. const id = this.startNodeAt(this.state.start + 1, new Position3(this.state.curLine, this.state.start + 1 - this.state.lineStart));
  87858. const name2 = this.state.value;
  87859. this.next();
  87860. node.id = this.createIdentifier(id, name2);
  87861. return this.finishNode(node, "PrivateName");
  87862. }
  87863. parseFunctionOrFunctionSent() {
  87864. const node = this.startNode();
  87865. this.next();
  87866. if (this.prodParam.hasYield && this.match(types$12.dot)) {
  87867. const meta = this.createIdentifier(this.startNodeAtNode(node), "function");
  87868. this.next();
  87869. return this.parseMetaProperty(node, meta, "sent");
  87870. }
  87871. return this.parseFunction(node);
  87872. }
  87873. parseMetaProperty(node, meta, propertyName) {
  87874. node.meta = meta;
  87875. if (meta.name === "function" && propertyName === "sent") {
  87876. if (this.isContextual(propertyName)) {
  87877. this.expectPlugin("functionSent");
  87878. } else if (!this.hasPlugin("functionSent")) {
  87879. this.unexpected();
  87880. }
  87881. }
  87882. const containsEsc = this.state.containsEsc;
  87883. node.property = this.parseIdentifier(true);
  87884. if (node.property.name !== propertyName || containsEsc) {
  87885. this.raise(node.property.start, ErrorMessages.UnsupportedMetaProperty, meta.name, propertyName);
  87886. }
  87887. return this.finishNode(node, "MetaProperty");
  87888. }
  87889. parseImportMetaProperty(node) {
  87890. const id = this.createIdentifier(this.startNodeAtNode(node), "import");
  87891. this.next();
  87892. if (this.isContextual("meta")) {
  87893. if (!this.inModule) {
  87894. this.raise(id.start, SourceTypeModuleErrorMessages.ImportMetaOutsideModule);
  87895. }
  87896. this.sawUnambiguousESM = true;
  87897. }
  87898. return this.parseMetaProperty(node, id, "meta");
  87899. }
  87900. parseLiteralAtNode(value, type, node) {
  87901. this.addExtra(node, "rawValue", value);
  87902. this.addExtra(node, "raw", this.input.slice(node.start, this.state.end));
  87903. node.value = value;
  87904. this.next();
  87905. return this.finishNode(node, type);
  87906. }
  87907. parseLiteral(value, type) {
  87908. const node = this.startNode();
  87909. return this.parseLiteralAtNode(value, type, node);
  87910. }
  87911. parseStringLiteral(value) {
  87912. return this.parseLiteral(value, "StringLiteral");
  87913. }
  87914. parseNumericLiteral(value) {
  87915. return this.parseLiteral(value, "NumericLiteral");
  87916. }
  87917. parseBigIntLiteral(value) {
  87918. return this.parseLiteral(value, "BigIntLiteral");
  87919. }
  87920. parseDecimalLiteral(value) {
  87921. return this.parseLiteral(value, "DecimalLiteral");
  87922. }
  87923. parseRegExpLiteral(value) {
  87924. const node = this.parseLiteral(value.value, "RegExpLiteral");
  87925. node.pattern = value.pattern;
  87926. node.flags = value.flags;
  87927. return node;
  87928. }
  87929. parseBooleanLiteral(value) {
  87930. const node = this.startNode();
  87931. node.value = value;
  87932. this.next();
  87933. return this.finishNode(node, "BooleanLiteral");
  87934. }
  87935. parseNullLiteral() {
  87936. const node = this.startNode();
  87937. this.next();
  87938. return this.finishNode(node, "NullLiteral");
  87939. }
  87940. parseParenAndDistinguishExpression(canBeArrow) {
  87941. const startPos = this.state.start;
  87942. const startLoc = this.state.startLoc;
  87943. let val;
  87944. this.next();
  87945. this.expressionScope.enter(newArrowHeadScope());
  87946. const oldMaybeInArrowParameters = this.state.maybeInArrowParameters;
  87947. const oldInFSharpPipelineDirectBody = this.state.inFSharpPipelineDirectBody;
  87948. this.state.maybeInArrowParameters = true;
  87949. this.state.inFSharpPipelineDirectBody = false;
  87950. const innerStartPos = this.state.start;
  87951. const innerStartLoc = this.state.startLoc;
  87952. const exprList = [];
  87953. const refExpressionErrors = new ExpressionErrors();
  87954. let first = true;
  87955. let spreadStart;
  87956. let optionalCommaStart;
  87957. while (!this.match(types$12.parenR)) {
  87958. if (first) {
  87959. first = false;
  87960. } else {
  87961. this.expect(types$12.comma, refExpressionErrors.optionalParameters === -1 ? null : refExpressionErrors.optionalParameters);
  87962. if (this.match(types$12.parenR)) {
  87963. optionalCommaStart = this.state.start;
  87964. break;
  87965. }
  87966. }
  87967. if (this.match(types$12.ellipsis)) {
  87968. const spreadNodeStartPos = this.state.start;
  87969. const spreadNodeStartLoc = this.state.startLoc;
  87970. spreadStart = this.state.start;
  87971. exprList.push(this.parseParenItem(this.parseRestBinding(), spreadNodeStartPos, spreadNodeStartLoc));
  87972. this.checkCommaAfterRest(41);
  87973. break;
  87974. } else {
  87975. exprList.push(this.parseMaybeAssignAllowIn(refExpressionErrors, this.parseParenItem));
  87976. }
  87977. }
  87978. const innerEndPos = this.state.lastTokEnd;
  87979. const innerEndLoc = this.state.lastTokEndLoc;
  87980. this.expect(types$12.parenR);
  87981. this.state.maybeInArrowParameters = oldMaybeInArrowParameters;
  87982. this.state.inFSharpPipelineDirectBody = oldInFSharpPipelineDirectBody;
  87983. let arrowNode = this.startNodeAt(startPos, startLoc);
  87984. if (canBeArrow && this.shouldParseArrow() && (arrowNode = this.parseArrow(arrowNode))) {
  87985. this.expressionScope.validateAsPattern();
  87986. this.expressionScope.exit();
  87987. this.parseArrowExpression(arrowNode, exprList, false);
  87988. return arrowNode;
  87989. }
  87990. this.expressionScope.exit();
  87991. if (!exprList.length) {
  87992. this.unexpected(this.state.lastTokStart);
  87993. }
  87994. if (optionalCommaStart)
  87995. this.unexpected(optionalCommaStart);
  87996. if (spreadStart)
  87997. this.unexpected(spreadStart);
  87998. this.checkExpressionErrors(refExpressionErrors, true);
  87999. this.toReferencedListDeep(exprList, true);
  88000. if (exprList.length > 1) {
  88001. val = this.startNodeAt(innerStartPos, innerStartLoc);
  88002. val.expressions = exprList;
  88003. this.finishNode(val, "SequenceExpression");
  88004. val.end = innerEndPos;
  88005. val.loc.end = innerEndLoc;
  88006. } else {
  88007. val = exprList[0];
  88008. }
  88009. if (!this.options.createParenthesizedExpressions) {
  88010. this.addExtra(val, "parenthesized", true);
  88011. this.addExtra(val, "parenStart", startPos);
  88012. return val;
  88013. }
  88014. const parenExpression = this.startNodeAt(startPos, startLoc);
  88015. parenExpression.expression = val;
  88016. this.finishNode(parenExpression, "ParenthesizedExpression");
  88017. return parenExpression;
  88018. }
  88019. shouldParseArrow() {
  88020. return !this.canInsertSemicolon();
  88021. }
  88022. parseArrow(node) {
  88023. if (this.eat(types$12.arrow)) {
  88024. return node;
  88025. }
  88026. }
  88027. parseParenItem(node, startPos, startLoc) {
  88028. return node;
  88029. }
  88030. parseNewOrNewTarget() {
  88031. const node = this.startNode();
  88032. this.next();
  88033. if (this.match(types$12.dot)) {
  88034. const meta = this.createIdentifier(this.startNodeAtNode(node), "new");
  88035. this.next();
  88036. const metaProp = this.parseMetaProperty(node, meta, "target");
  88037. if (!this.scope.inNonArrowFunction && !this.scope.inClass) {
  88038. this.raise(metaProp.start, ErrorMessages.UnexpectedNewTarget);
  88039. }
  88040. return metaProp;
  88041. }
  88042. return this.parseNew(node);
  88043. }
  88044. parseNew(node) {
  88045. node.callee = this.parseNoCallExpr();
  88046. if (node.callee.type === "Import") {
  88047. this.raise(node.callee.start, ErrorMessages.ImportCallNotNewExpression);
  88048. } else if (this.isOptionalChain(node.callee)) {
  88049. this.raise(this.state.lastTokEnd, ErrorMessages.OptionalChainingNoNew);
  88050. } else if (this.eat(types$12.questionDot)) {
  88051. this.raise(this.state.start, ErrorMessages.OptionalChainingNoNew);
  88052. }
  88053. this.parseNewArguments(node);
  88054. return this.finishNode(node, "NewExpression");
  88055. }
  88056. parseNewArguments(node) {
  88057. if (this.eat(types$12.parenL)) {
  88058. const args = this.parseExprList(types$12.parenR);
  88059. this.toReferencedList(args);
  88060. node.arguments = args;
  88061. } else {
  88062. node.arguments = [];
  88063. }
  88064. }
  88065. parseTemplateElement(isTagged) {
  88066. const elem = this.startNode();
  88067. if (this.state.value === null) {
  88068. if (!isTagged) {
  88069. this.raise(this.state.start + 1, ErrorMessages.InvalidEscapeSequenceTemplate);
  88070. }
  88071. }
  88072. elem.value = {
  88073. raw: this.input.slice(this.state.start, this.state.end).replace(/\r\n?/g, "\n"),
  88074. cooked: this.state.value
  88075. };
  88076. this.next();
  88077. elem.tail = this.match(types$12.backQuote);
  88078. return this.finishNode(elem, "TemplateElement");
  88079. }
  88080. parseTemplate(isTagged) {
  88081. const node = this.startNode();
  88082. this.next();
  88083. node.expressions = [];
  88084. let curElt = this.parseTemplateElement(isTagged);
  88085. node.quasis = [curElt];
  88086. while (!curElt.tail) {
  88087. this.expect(types$12.dollarBraceL);
  88088. node.expressions.push(this.parseTemplateSubstitution());
  88089. this.expect(types$12.braceR);
  88090. node.quasis.push(curElt = this.parseTemplateElement(isTagged));
  88091. }
  88092. this.next();
  88093. return this.finishNode(node, "TemplateLiteral");
  88094. }
  88095. parseTemplateSubstitution() {
  88096. return this.parseExpression();
  88097. }
  88098. parseObjectLike(close, isPattern, isRecord, refExpressionErrors) {
  88099. if (isRecord) {
  88100. this.expectPlugin("recordAndTuple");
  88101. }
  88102. const oldInFSharpPipelineDirectBody = this.state.inFSharpPipelineDirectBody;
  88103. this.state.inFSharpPipelineDirectBody = false;
  88104. const propHash = /* @__PURE__ */ Object.create(null);
  88105. let first = true;
  88106. const node = this.startNode();
  88107. node.properties = [];
  88108. this.next();
  88109. while (!this.match(close)) {
  88110. if (first) {
  88111. first = false;
  88112. } else {
  88113. this.expect(types$12.comma);
  88114. if (this.match(close)) {
  88115. this.addExtra(node, "trailingComma", this.state.lastTokStart);
  88116. break;
  88117. }
  88118. }
  88119. const prop = this.parsePropertyDefinition(isPattern, refExpressionErrors);
  88120. if (!isPattern) {
  88121. this.checkProto(prop, isRecord, propHash, refExpressionErrors);
  88122. }
  88123. if (isRecord && !this.isObjectProperty(prop) && prop.type !== "SpreadElement") {
  88124. this.raise(prop.start, ErrorMessages.InvalidRecordProperty);
  88125. }
  88126. if (prop.shorthand) {
  88127. this.addExtra(prop, "shorthand", true);
  88128. }
  88129. node.properties.push(prop);
  88130. }
  88131. this.next();
  88132. this.state.inFSharpPipelineDirectBody = oldInFSharpPipelineDirectBody;
  88133. let type = "ObjectExpression";
  88134. if (isPattern) {
  88135. type = "ObjectPattern";
  88136. } else if (isRecord) {
  88137. type = "RecordExpression";
  88138. }
  88139. return this.finishNode(node, type);
  88140. }
  88141. maybeAsyncOrAccessorProp(prop) {
  88142. return !prop.computed && prop.key.type === "Identifier" && (this.isLiteralPropertyName() || this.match(types$12.bracketL) || this.match(types$12.star));
  88143. }
  88144. parsePropertyDefinition(isPattern, refExpressionErrors) {
  88145. let decorators = [];
  88146. if (this.match(types$12.at)) {
  88147. if (this.hasPlugin("decorators")) {
  88148. this.raise(this.state.start, ErrorMessages.UnsupportedPropertyDecorator);
  88149. }
  88150. while (this.match(types$12.at)) {
  88151. decorators.push(this.parseDecorator());
  88152. }
  88153. }
  88154. const prop = this.startNode();
  88155. let isGenerator = false;
  88156. let isAsync = false;
  88157. let isAccessor = false;
  88158. let startPos;
  88159. let startLoc;
  88160. if (this.match(types$12.ellipsis)) {
  88161. if (decorators.length)
  88162. this.unexpected();
  88163. if (isPattern) {
  88164. this.next();
  88165. prop.argument = this.parseIdentifier();
  88166. this.checkCommaAfterRest(125);
  88167. return this.finishNode(prop, "RestElement");
  88168. }
  88169. return this.parseSpread();
  88170. }
  88171. if (decorators.length) {
  88172. prop.decorators = decorators;
  88173. decorators = [];
  88174. }
  88175. prop.method = false;
  88176. if (isPattern || refExpressionErrors) {
  88177. startPos = this.state.start;
  88178. startLoc = this.state.startLoc;
  88179. }
  88180. if (!isPattern) {
  88181. isGenerator = this.eat(types$12.star);
  88182. }
  88183. const containsEsc = this.state.containsEsc;
  88184. const key = this.parsePropertyName(prop, false);
  88185. if (!isPattern && !isGenerator && !containsEsc && this.maybeAsyncOrAccessorProp(prop)) {
  88186. const keyName = key.name;
  88187. if (keyName === "async" && !this.hasPrecedingLineBreak()) {
  88188. isAsync = true;
  88189. this.resetPreviousNodeTrailingComments(key);
  88190. isGenerator = this.eat(types$12.star);
  88191. this.parsePropertyName(prop, false);
  88192. }
  88193. if (keyName === "get" || keyName === "set") {
  88194. isAccessor = true;
  88195. this.resetPreviousNodeTrailingComments(key);
  88196. prop.kind = keyName;
  88197. if (this.match(types$12.star)) {
  88198. isGenerator = true;
  88199. this.raise(this.state.pos, ErrorMessages.AccessorIsGenerator, keyName);
  88200. this.next();
  88201. }
  88202. this.parsePropertyName(prop, false);
  88203. }
  88204. }
  88205. this.parseObjPropValue(prop, startPos, startLoc, isGenerator, isAsync, isPattern, isAccessor, refExpressionErrors);
  88206. return prop;
  88207. }
  88208. getGetterSetterExpectedParamCount(method) {
  88209. return method.kind === "get" ? 0 : 1;
  88210. }
  88211. getObjectOrClassMethodParams(method) {
  88212. return method.params;
  88213. }
  88214. checkGetterSetterParams(method) {
  88215. var _params;
  88216. const paramCount = this.getGetterSetterExpectedParamCount(method);
  88217. const params = this.getObjectOrClassMethodParams(method);
  88218. const start3 = method.start;
  88219. if (params.length !== paramCount) {
  88220. if (method.kind === "get") {
  88221. this.raise(start3, ErrorMessages.BadGetterArity);
  88222. } else {
  88223. this.raise(start3, ErrorMessages.BadSetterArity);
  88224. }
  88225. }
  88226. if (method.kind === "set" && ((_params = params[params.length - 1]) == null ? void 0 : _params.type) === "RestElement") {
  88227. this.raise(start3, ErrorMessages.BadSetterRestParameter);
  88228. }
  88229. }
  88230. parseObjectMethod(prop, isGenerator, isAsync, isPattern, isAccessor) {
  88231. if (isAccessor) {
  88232. this.parseMethod(prop, isGenerator, false, false, false, "ObjectMethod");
  88233. this.checkGetterSetterParams(prop);
  88234. return prop;
  88235. }
  88236. if (isAsync || isGenerator || this.match(types$12.parenL)) {
  88237. if (isPattern)
  88238. this.unexpected();
  88239. prop.kind = "method";
  88240. prop.method = true;
  88241. return this.parseMethod(prop, isGenerator, isAsync, false, false, "ObjectMethod");
  88242. }
  88243. }
  88244. parseObjectProperty(prop, startPos, startLoc, isPattern, refExpressionErrors) {
  88245. prop.shorthand = false;
  88246. if (this.eat(types$12.colon)) {
  88247. prop.value = isPattern ? this.parseMaybeDefault(this.state.start, this.state.startLoc) : this.parseMaybeAssignAllowIn(refExpressionErrors);
  88248. return this.finishNode(prop, "ObjectProperty");
  88249. }
  88250. if (!prop.computed && prop.key.type === "Identifier") {
  88251. this.checkReservedWord(prop.key.name, prop.key.start, true, false);
  88252. if (isPattern) {
  88253. prop.value = this.parseMaybeDefault(startPos, startLoc, prop.key.__clone());
  88254. } else if (this.match(types$12.eq) && refExpressionErrors) {
  88255. if (refExpressionErrors.shorthandAssign === -1) {
  88256. refExpressionErrors.shorthandAssign = this.state.start;
  88257. }
  88258. prop.value = this.parseMaybeDefault(startPos, startLoc, prop.key.__clone());
  88259. } else {
  88260. prop.value = prop.key.__clone();
  88261. }
  88262. prop.shorthand = true;
  88263. return this.finishNode(prop, "ObjectProperty");
  88264. }
  88265. }
  88266. parseObjPropValue(prop, startPos, startLoc, isGenerator, isAsync, isPattern, isAccessor, refExpressionErrors) {
  88267. const node = this.parseObjectMethod(prop, isGenerator, isAsync, isPattern, isAccessor) || this.parseObjectProperty(prop, startPos, startLoc, isPattern, refExpressionErrors);
  88268. if (!node)
  88269. this.unexpected();
  88270. return node;
  88271. }
  88272. parsePropertyName(prop, isPrivateNameAllowed) {
  88273. if (this.eat(types$12.bracketL)) {
  88274. prop.computed = true;
  88275. prop.key = this.parseMaybeAssignAllowIn();
  88276. this.expect(types$12.bracketR);
  88277. } else {
  88278. const oldInPropertyName = this.state.inPropertyName;
  88279. this.state.inPropertyName = true;
  88280. const type = this.state.type;
  88281. prop.key = type === types$12.num || type === types$12.string || type === types$12.bigint || type === types$12.decimal ? this.parseExprAtom() : this.parseMaybePrivateName(isPrivateNameAllowed);
  88282. if (type !== types$12.privateName) {
  88283. prop.computed = false;
  88284. }
  88285. this.state.inPropertyName = oldInPropertyName;
  88286. }
  88287. return prop.key;
  88288. }
  88289. initFunction(node, isAsync) {
  88290. node.id = null;
  88291. node.generator = false;
  88292. node.async = !!isAsync;
  88293. }
  88294. parseMethod(node, isGenerator, isAsync, isConstructor, allowDirectSuper, type, inClassScope = false) {
  88295. this.initFunction(node, isAsync);
  88296. node.generator = !!isGenerator;
  88297. const allowModifiers = isConstructor;
  88298. this.scope.enter(SCOPE_FUNCTION2 | SCOPE_SUPER2 | (inClassScope ? SCOPE_CLASS : 0) | (allowDirectSuper ? SCOPE_DIRECT_SUPER2 : 0));
  88299. this.prodParam.enter(functionFlags2(isAsync, node.generator));
  88300. this.parseFunctionParams(node, allowModifiers);
  88301. this.parseFunctionBodyAndFinish(node, type, true);
  88302. this.prodParam.exit();
  88303. this.scope.exit();
  88304. return node;
  88305. }
  88306. parseArrayLike(close, canBePattern, isTuple, refExpressionErrors) {
  88307. if (isTuple) {
  88308. this.expectPlugin("recordAndTuple");
  88309. }
  88310. const oldInFSharpPipelineDirectBody = this.state.inFSharpPipelineDirectBody;
  88311. this.state.inFSharpPipelineDirectBody = false;
  88312. const node = this.startNode();
  88313. this.next();
  88314. node.elements = this.parseExprList(close, !isTuple, refExpressionErrors, node);
  88315. this.state.inFSharpPipelineDirectBody = oldInFSharpPipelineDirectBody;
  88316. return this.finishNode(node, isTuple ? "TupleExpression" : "ArrayExpression");
  88317. }
  88318. parseArrowExpression(node, params, isAsync, trailingCommaPos) {
  88319. this.scope.enter(SCOPE_FUNCTION2 | SCOPE_ARROW2);
  88320. let flags = functionFlags2(isAsync, false);
  88321. if (!this.match(types$12.bracketL) && this.prodParam.hasIn) {
  88322. flags |= PARAM_IN;
  88323. }
  88324. this.prodParam.enter(flags);
  88325. this.initFunction(node, isAsync);
  88326. const oldMaybeInArrowParameters = this.state.maybeInArrowParameters;
  88327. if (params) {
  88328. this.state.maybeInArrowParameters = true;
  88329. this.setArrowFunctionParameters(node, params, trailingCommaPos);
  88330. }
  88331. this.state.maybeInArrowParameters = false;
  88332. this.parseFunctionBody(node, true);
  88333. this.prodParam.exit();
  88334. this.scope.exit();
  88335. this.state.maybeInArrowParameters = oldMaybeInArrowParameters;
  88336. return this.finishNode(node, "ArrowFunctionExpression");
  88337. }
  88338. setArrowFunctionParameters(node, params, trailingCommaPos) {
  88339. node.params = this.toAssignableList(params, trailingCommaPos, false);
  88340. }
  88341. parseFunctionBodyAndFinish(node, type, isMethod = false) {
  88342. this.parseFunctionBody(node, false, isMethod);
  88343. this.finishNode(node, type);
  88344. }
  88345. parseFunctionBody(node, allowExpression, isMethod = false) {
  88346. const isExpression = allowExpression && !this.match(types$12.braceL);
  88347. this.expressionScope.enter(newExpressionScope());
  88348. if (isExpression) {
  88349. node.body = this.parseMaybeAssign();
  88350. this.checkParams(node, false, allowExpression, false);
  88351. } else {
  88352. const oldStrict = this.state.strict;
  88353. const oldLabels = this.state.labels;
  88354. this.state.labels = [];
  88355. this.prodParam.enter(this.prodParam.currentFlags() | PARAM_RETURN);
  88356. node.body = this.parseBlock(true, false, (hasStrictModeDirective) => {
  88357. const nonSimple = !this.isSimpleParamList(node.params);
  88358. if (hasStrictModeDirective && nonSimple) {
  88359. const errorPos = (node.kind === "method" || node.kind === "constructor") && !!node.key ? node.key.end : node.start;
  88360. this.raise(errorPos, ErrorMessages.IllegalLanguageModeDirective);
  88361. }
  88362. const strictModeChanged = !oldStrict && this.state.strict;
  88363. this.checkParams(node, !this.state.strict && !allowExpression && !isMethod && !nonSimple, allowExpression, strictModeChanged);
  88364. if (this.state.strict && node.id) {
  88365. this.checkLVal(node.id, "function name", BIND_OUTSIDE2, void 0, void 0, strictModeChanged);
  88366. }
  88367. });
  88368. this.prodParam.exit();
  88369. this.expressionScope.exit();
  88370. this.state.labels = oldLabels;
  88371. }
  88372. }
  88373. isSimpleParamList(params) {
  88374. for (let i = 0, len = params.length; i < len; i++) {
  88375. if (params[i].type !== "Identifier")
  88376. return false;
  88377. }
  88378. return true;
  88379. }
  88380. checkParams(node, allowDuplicates, isArrowFunction, strictModeChanged = true) {
  88381. const checkClashes = /* @__PURE__ */ new Set();
  88382. for (const param of node.params) {
  88383. this.checkLVal(param, "function parameter list", BIND_VAR2, allowDuplicates ? null : checkClashes, void 0, strictModeChanged);
  88384. }
  88385. }
  88386. parseExprList(close, allowEmpty, refExpressionErrors, nodeForExtra) {
  88387. const elts = [];
  88388. let first = true;
  88389. while (!this.eat(close)) {
  88390. if (first) {
  88391. first = false;
  88392. } else {
  88393. this.expect(types$12.comma);
  88394. if (this.match(close)) {
  88395. if (nodeForExtra) {
  88396. this.addExtra(nodeForExtra, "trailingComma", this.state.lastTokStart);
  88397. }
  88398. this.next();
  88399. break;
  88400. }
  88401. }
  88402. elts.push(this.parseExprListItem(allowEmpty, refExpressionErrors));
  88403. }
  88404. return elts;
  88405. }
  88406. parseExprListItem(allowEmpty, refExpressionErrors, allowPlaceholder) {
  88407. let elt;
  88408. if (this.match(types$12.comma)) {
  88409. if (!allowEmpty) {
  88410. this.raise(this.state.pos, ErrorMessages.UnexpectedToken, ",");
  88411. }
  88412. elt = null;
  88413. } else if (this.match(types$12.ellipsis)) {
  88414. const spreadNodeStartPos = this.state.start;
  88415. const spreadNodeStartLoc = this.state.startLoc;
  88416. elt = this.parseParenItem(this.parseSpread(refExpressionErrors), spreadNodeStartPos, spreadNodeStartLoc);
  88417. } else if (this.match(types$12.question)) {
  88418. this.expectPlugin("partialApplication");
  88419. if (!allowPlaceholder) {
  88420. this.raise(this.state.start, ErrorMessages.UnexpectedArgumentPlaceholder);
  88421. }
  88422. const node = this.startNode();
  88423. this.next();
  88424. elt = this.finishNode(node, "ArgumentPlaceholder");
  88425. } else {
  88426. elt = this.parseMaybeAssignAllowIn(refExpressionErrors, this.parseParenItem);
  88427. }
  88428. return elt;
  88429. }
  88430. parseIdentifier(liberal) {
  88431. const node = this.startNode();
  88432. const name2 = this.parseIdentifierName(node.start, liberal);
  88433. return this.createIdentifier(node, name2);
  88434. }
  88435. createIdentifier(node, name2) {
  88436. node.name = name2;
  88437. node.loc.identifierName = name2;
  88438. return this.finishNode(node, "Identifier");
  88439. }
  88440. parseIdentifierName(pos, liberal) {
  88441. let name2;
  88442. const {
  88443. start: start3,
  88444. type
  88445. } = this.state;
  88446. if (type === types$12.name) {
  88447. name2 = this.state.value;
  88448. } else if (type.keyword) {
  88449. name2 = type.keyword;
  88450. } else {
  88451. throw this.unexpected();
  88452. }
  88453. if (liberal) {
  88454. this.state.type = types$12.name;
  88455. } else {
  88456. this.checkReservedWord(name2, start3, !!type.keyword, false);
  88457. }
  88458. this.next();
  88459. return name2;
  88460. }
  88461. checkReservedWord(word, startLoc, checkKeywords, isBinding) {
  88462. if (word.length > 10) {
  88463. return;
  88464. }
  88465. if (!canBeReservedWord(word)) {
  88466. return;
  88467. }
  88468. if (word === "yield") {
  88469. if (this.prodParam.hasYield) {
  88470. this.raise(startLoc, ErrorMessages.YieldBindingIdentifier);
  88471. return;
  88472. }
  88473. } else if (word === "await") {
  88474. if (this.prodParam.hasAwait) {
  88475. this.raise(startLoc, ErrorMessages.AwaitBindingIdentifier);
  88476. return;
  88477. } else if (this.scope.inStaticBlock) {
  88478. this.raise(startLoc, ErrorMessages.AwaitBindingIdentifierInStaticBlock);
  88479. return;
  88480. } else {
  88481. this.expressionScope.recordAsyncArrowParametersError(startLoc, ErrorMessages.AwaitBindingIdentifier);
  88482. }
  88483. } else if (word === "arguments") {
  88484. if (this.scope.inClassAndNotInNonArrowFunction) {
  88485. this.raise(startLoc, ErrorMessages.ArgumentsInClass);
  88486. return;
  88487. }
  88488. }
  88489. if (checkKeywords && isKeyword(word)) {
  88490. this.raise(startLoc, ErrorMessages.UnexpectedKeyword, word);
  88491. return;
  88492. }
  88493. const reservedTest = !this.state.strict ? isReservedWord : isBinding ? isStrictBindReservedWord : isStrictReservedWord;
  88494. if (reservedTest(word, this.inModule)) {
  88495. this.raise(startLoc, ErrorMessages.UnexpectedReservedWord, word);
  88496. }
  88497. }
  88498. isAwaitAllowed() {
  88499. if (this.prodParam.hasAwait)
  88500. return true;
  88501. if (this.options.allowAwaitOutsideFunction && !this.scope.inFunction) {
  88502. return true;
  88503. }
  88504. return false;
  88505. }
  88506. parseAwait(startPos, startLoc) {
  88507. const node = this.startNodeAt(startPos, startLoc);
  88508. this.expressionScope.recordParameterInitializerError(node.start, ErrorMessages.AwaitExpressionFormalParameter);
  88509. if (this.eat(types$12.star)) {
  88510. this.raise(node.start, ErrorMessages.ObsoleteAwaitStar);
  88511. }
  88512. if (!this.scope.inFunction && !this.options.allowAwaitOutsideFunction) {
  88513. if (this.isAmbiguousAwait()) {
  88514. this.ambiguousScriptDifferentAst = true;
  88515. } else {
  88516. this.sawUnambiguousESM = true;
  88517. }
  88518. }
  88519. if (!this.state.soloAwait) {
  88520. node.argument = this.parseMaybeUnary(null, true);
  88521. }
  88522. return this.finishNode(node, "AwaitExpression");
  88523. }
  88524. isAmbiguousAwait() {
  88525. return this.hasPrecedingLineBreak() || this.match(types$12.plusMin) || this.match(types$12.parenL) || this.match(types$12.bracketL) || this.match(types$12.backQuote) || this.match(types$12.regexp) || this.match(types$12.slash) || this.hasPlugin("v8intrinsic") && this.match(types$12.modulo);
  88526. }
  88527. parseYield() {
  88528. const node = this.startNode();
  88529. this.expressionScope.recordParameterInitializerError(node.start, ErrorMessages.YieldInParameter);
  88530. this.next();
  88531. let delegating = false;
  88532. let argument = null;
  88533. if (!this.hasPrecedingLineBreak()) {
  88534. delegating = this.eat(types$12.star);
  88535. switch (this.state.type) {
  88536. case types$12.semi:
  88537. case types$12.eof:
  88538. case types$12.braceR:
  88539. case types$12.parenR:
  88540. case types$12.bracketR:
  88541. case types$12.braceBarR:
  88542. case types$12.colon:
  88543. case types$12.comma:
  88544. if (!delegating)
  88545. break;
  88546. default:
  88547. argument = this.parseMaybeAssign();
  88548. }
  88549. }
  88550. node.delegate = delegating;
  88551. node.argument = argument;
  88552. return this.finishNode(node, "YieldExpression");
  88553. }
  88554. checkPipelineAtInfixOperator(left, leftStartPos) {
  88555. if (this.getPluginOption("pipelineOperator", "proposal") === "smart") {
  88556. if (left.type === "SequenceExpression") {
  88557. this.raise(leftStartPos, ErrorMessages.PipelineHeadSequenceExpression);
  88558. }
  88559. }
  88560. }
  88561. parseSmartPipelineBody(childExpression, startPos, startLoc) {
  88562. this.checkSmartPipelineBodyEarlyErrors(childExpression, startPos);
  88563. return this.parseSmartPipelineBodyInStyle(childExpression, startPos, startLoc);
  88564. }
  88565. checkSmartPipelineBodyEarlyErrors(childExpression, startPos) {
  88566. if (this.match(types$12.arrow)) {
  88567. throw this.raise(this.state.start, ErrorMessages.PipelineBodyNoArrow);
  88568. } else if (childExpression.type === "SequenceExpression") {
  88569. this.raise(startPos, ErrorMessages.PipelineBodySequenceExpression);
  88570. }
  88571. }
  88572. parseSmartPipelineBodyInStyle(childExpression, startPos, startLoc) {
  88573. const bodyNode = this.startNodeAt(startPos, startLoc);
  88574. const isSimpleReference = this.isSimpleReference(childExpression);
  88575. if (isSimpleReference) {
  88576. bodyNode.callee = childExpression;
  88577. } else {
  88578. if (!this.topicReferenceWasUsedInCurrentTopicContext()) {
  88579. this.raise(startPos, ErrorMessages.PipelineTopicUnused);
  88580. }
  88581. bodyNode.expression = childExpression;
  88582. }
  88583. return this.finishNode(bodyNode, isSimpleReference ? "PipelineBareFunction" : "PipelineTopicExpression");
  88584. }
  88585. isSimpleReference(expression) {
  88586. switch (expression.type) {
  88587. case "MemberExpression":
  88588. return !expression.computed && this.isSimpleReference(expression.object);
  88589. case "Identifier":
  88590. return true;
  88591. default:
  88592. return false;
  88593. }
  88594. }
  88595. withTopicPermittingContext(callback) {
  88596. const outerContextTopicState = this.state.topicContext;
  88597. this.state.topicContext = {
  88598. maxNumOfResolvableTopics: 1,
  88599. maxTopicIndex: null
  88600. };
  88601. try {
  88602. return callback();
  88603. } finally {
  88604. this.state.topicContext = outerContextTopicState;
  88605. }
  88606. }
  88607. withTopicForbiddingContext(callback) {
  88608. const outerContextTopicState = this.state.topicContext;
  88609. this.state.topicContext = {
  88610. maxNumOfResolvableTopics: 0,
  88611. maxTopicIndex: null
  88612. };
  88613. try {
  88614. return callback();
  88615. } finally {
  88616. this.state.topicContext = outerContextTopicState;
  88617. }
  88618. }
  88619. withSoloAwaitPermittingContext(callback) {
  88620. const outerContextSoloAwaitState = this.state.soloAwait;
  88621. this.state.soloAwait = true;
  88622. try {
  88623. return callback();
  88624. } finally {
  88625. this.state.soloAwait = outerContextSoloAwaitState;
  88626. }
  88627. }
  88628. allowInAnd(callback) {
  88629. const flags = this.prodParam.currentFlags();
  88630. const prodParamToSet = PARAM_IN & ~flags;
  88631. if (prodParamToSet) {
  88632. this.prodParam.enter(flags | PARAM_IN);
  88633. try {
  88634. return callback();
  88635. } finally {
  88636. this.prodParam.exit();
  88637. }
  88638. }
  88639. return callback();
  88640. }
  88641. disallowInAnd(callback) {
  88642. const flags = this.prodParam.currentFlags();
  88643. const prodParamToClear = PARAM_IN & flags;
  88644. if (prodParamToClear) {
  88645. this.prodParam.enter(flags & ~PARAM_IN);
  88646. try {
  88647. return callback();
  88648. } finally {
  88649. this.prodParam.exit();
  88650. }
  88651. }
  88652. return callback();
  88653. }
  88654. registerTopicReference() {
  88655. this.state.topicContext.maxTopicIndex = 0;
  88656. }
  88657. primaryTopicReferenceIsAllowedInCurrentTopicContext() {
  88658. return this.state.topicContext.maxNumOfResolvableTopics >= 1;
  88659. }
  88660. topicReferenceWasUsedInCurrentTopicContext() {
  88661. return this.state.topicContext.maxTopicIndex != null && this.state.topicContext.maxTopicIndex >= 0;
  88662. }
  88663. parseFSharpPipelineBody(prec) {
  88664. const startPos = this.state.start;
  88665. const startLoc = this.state.startLoc;
  88666. this.state.potentialArrowAt = this.state.start;
  88667. const oldInFSharpPipelineDirectBody = this.state.inFSharpPipelineDirectBody;
  88668. this.state.inFSharpPipelineDirectBody = true;
  88669. const ret = this.parseExprOp(this.parseMaybeUnary(), startPos, startLoc, prec);
  88670. this.state.inFSharpPipelineDirectBody = oldInFSharpPipelineDirectBody;
  88671. return ret;
  88672. }
  88673. parseModuleExpression() {
  88674. this.expectPlugin("moduleBlocks");
  88675. const node = this.startNode();
  88676. this.next();
  88677. this.eat(types$12.braceL);
  88678. const revertScopes = this.initializeScopes(true);
  88679. this.enterInitialScopes();
  88680. const program = this.startNode();
  88681. try {
  88682. node.body = this.parseProgram(program, types$12.braceR, "module");
  88683. } finally {
  88684. revertScopes();
  88685. }
  88686. this.eat(types$12.braceR);
  88687. return this.finishNode(node, "ModuleExpression");
  88688. }
  88689. };
  88690. var loopLabel2 = {
  88691. kind: "loop"
  88692. };
  88693. var switchLabel2 = {
  88694. kind: "switch"
  88695. };
  88696. var FUNC_NO_FLAGS = 0;
  88697. var FUNC_STATEMENT2 = 1;
  88698. var FUNC_HANGING_STATEMENT2 = 2;
  88699. var FUNC_NULLABLE_ID2 = 4;
  88700. var loneSurrogate2 = /[\uD800-\uDFFF]/u;
  88701. var keywordRelationalOperator2 = /in(?:stanceof)?/y;
  88702. function babel7CompatTokens(tokens) {
  88703. {
  88704. for (let i = 0; i < tokens.length; i++) {
  88705. const token = tokens[i];
  88706. if (token.type === types$12.privateName) {
  88707. const {
  88708. loc,
  88709. start: start3,
  88710. value,
  88711. end
  88712. } = token;
  88713. const hashEndPos = start3 + 1;
  88714. const hashEndLoc = new Position3(loc.start.line, loc.start.column + 1);
  88715. tokens.splice(i, 1, new Token3({
  88716. type: types$12.hash,
  88717. value: "#",
  88718. start: start3,
  88719. end: hashEndPos,
  88720. startLoc: loc.start,
  88721. endLoc: hashEndLoc
  88722. }), new Token3({
  88723. type: types$12.name,
  88724. value,
  88725. start: hashEndPos,
  88726. end,
  88727. startLoc: hashEndLoc,
  88728. endLoc: loc.end
  88729. }));
  88730. }
  88731. }
  88732. }
  88733. return tokens;
  88734. }
  88735. var StatementParser = class extends ExpressionParser {
  88736. parseTopLevel(file, program) {
  88737. file.program = this.parseProgram(program);
  88738. file.comments = this.state.comments;
  88739. if (this.options.tokens)
  88740. file.tokens = babel7CompatTokens(this.tokens);
  88741. return this.finishNode(file, "File");
  88742. }
  88743. parseProgram(program, end = types$12.eof, sourceType = this.options.sourceType) {
  88744. program.sourceType = sourceType;
  88745. program.interpreter = this.parseInterpreterDirective();
  88746. this.parseBlockBody(program, true, true, end);
  88747. if (this.inModule && !this.options.allowUndeclaredExports && this.scope.undefinedExports.size > 0) {
  88748. for (const [name2] of Array.from(this.scope.undefinedExports)) {
  88749. const pos = this.scope.undefinedExports.get(name2);
  88750. this.raise(pos, ErrorMessages.ModuleExportUndefined, name2);
  88751. }
  88752. }
  88753. return this.finishNode(program, "Program");
  88754. }
  88755. stmtToDirective(stmt) {
  88756. const directive = stmt;
  88757. directive.type = "Directive";
  88758. directive.value = directive.expression;
  88759. delete directive.expression;
  88760. const directiveLiteral = directive.value;
  88761. const raw = this.input.slice(directiveLiteral.start, directiveLiteral.end);
  88762. const val = directiveLiteral.value = raw.slice(1, -1);
  88763. this.addExtra(directiveLiteral, "raw", raw);
  88764. this.addExtra(directiveLiteral, "rawValue", val);
  88765. directiveLiteral.type = "DirectiveLiteral";
  88766. return directive;
  88767. }
  88768. parseInterpreterDirective() {
  88769. if (!this.match(types$12.interpreterDirective)) {
  88770. return null;
  88771. }
  88772. const node = this.startNode();
  88773. node.value = this.state.value;
  88774. this.next();
  88775. return this.finishNode(node, "InterpreterDirective");
  88776. }
  88777. isLet(context) {
  88778. if (!this.isContextual("let")) {
  88779. return false;
  88780. }
  88781. return this.isLetKeyword(context);
  88782. }
  88783. isLetKeyword(context) {
  88784. const next = this.nextTokenStart();
  88785. const nextCh = this.codePointAtPos(next);
  88786. if (nextCh === 92 || nextCh === 91) {
  88787. return true;
  88788. }
  88789. if (context)
  88790. return false;
  88791. if (nextCh === 123)
  88792. return true;
  88793. if (isIdentifierStart2(nextCh)) {
  88794. keywordRelationalOperator2.lastIndex = next;
  88795. const matched = keywordRelationalOperator2.exec(this.input);
  88796. if (matched !== null) {
  88797. const endCh = this.codePointAtPos(next + matched[0].length);
  88798. if (!isIdentifierChar2(endCh) && endCh !== 92) {
  88799. return false;
  88800. }
  88801. }
  88802. return true;
  88803. }
  88804. return false;
  88805. }
  88806. parseStatement(context, topLevel) {
  88807. if (this.match(types$12.at)) {
  88808. this.parseDecorators(true);
  88809. }
  88810. return this.parseStatementContent(context, topLevel);
  88811. }
  88812. parseStatementContent(context, topLevel) {
  88813. let starttype = this.state.type;
  88814. const node = this.startNode();
  88815. let kind;
  88816. if (this.isLet(context)) {
  88817. starttype = types$12._var;
  88818. kind = "let";
  88819. }
  88820. switch (starttype) {
  88821. case types$12._break:
  88822. case types$12._continue:
  88823. return this.parseBreakContinueStatement(node, starttype.keyword);
  88824. case types$12._debugger:
  88825. return this.parseDebuggerStatement(node);
  88826. case types$12._do:
  88827. return this.parseDoStatement(node);
  88828. case types$12._for:
  88829. return this.parseForStatement(node);
  88830. case types$12._function:
  88831. if (this.lookaheadCharCode() === 46)
  88832. break;
  88833. if (context) {
  88834. if (this.state.strict) {
  88835. this.raise(this.state.start, ErrorMessages.StrictFunction);
  88836. } else if (context !== "if" && context !== "label") {
  88837. this.raise(this.state.start, ErrorMessages.SloppyFunction);
  88838. }
  88839. }
  88840. return this.parseFunctionStatement(node, false, !context);
  88841. case types$12._class:
  88842. if (context)
  88843. this.unexpected();
  88844. return this.parseClass(node, true);
  88845. case types$12._if:
  88846. return this.parseIfStatement(node);
  88847. case types$12._return:
  88848. return this.parseReturnStatement(node);
  88849. case types$12._switch:
  88850. return this.parseSwitchStatement(node);
  88851. case types$12._throw:
  88852. return this.parseThrowStatement(node);
  88853. case types$12._try:
  88854. return this.parseTryStatement(node);
  88855. case types$12._const:
  88856. case types$12._var:
  88857. kind = kind || this.state.value;
  88858. if (context && kind !== "var") {
  88859. this.raise(this.state.start, ErrorMessages.UnexpectedLexicalDeclaration);
  88860. }
  88861. return this.parseVarStatement(node, kind);
  88862. case types$12._while:
  88863. return this.parseWhileStatement(node);
  88864. case types$12._with:
  88865. return this.parseWithStatement(node);
  88866. case types$12.braceL:
  88867. return this.parseBlock();
  88868. case types$12.semi:
  88869. return this.parseEmptyStatement(node);
  88870. case types$12._import: {
  88871. const nextTokenCharCode = this.lookaheadCharCode();
  88872. if (nextTokenCharCode === 40 || nextTokenCharCode === 46) {
  88873. break;
  88874. }
  88875. }
  88876. case types$12._export: {
  88877. if (!this.options.allowImportExportEverywhere && !topLevel) {
  88878. this.raise(this.state.start, ErrorMessages.UnexpectedImportExport);
  88879. }
  88880. this.next();
  88881. let result;
  88882. if (starttype === types$12._import) {
  88883. result = this.parseImport(node);
  88884. if (result.type === "ImportDeclaration" && (!result.importKind || result.importKind === "value")) {
  88885. this.sawUnambiguousESM = true;
  88886. }
  88887. } else {
  88888. result = this.parseExport(node);
  88889. if (result.type === "ExportNamedDeclaration" && (!result.exportKind || result.exportKind === "value") || result.type === "ExportAllDeclaration" && (!result.exportKind || result.exportKind === "value") || result.type === "ExportDefaultDeclaration") {
  88890. this.sawUnambiguousESM = true;
  88891. }
  88892. }
  88893. this.assertModuleNodeAllowed(node);
  88894. return result;
  88895. }
  88896. default: {
  88897. if (this.isAsyncFunction()) {
  88898. if (context) {
  88899. this.raise(this.state.start, ErrorMessages.AsyncFunctionInSingleStatementContext);
  88900. }
  88901. this.next();
  88902. return this.parseFunctionStatement(node, true, !context);
  88903. }
  88904. }
  88905. }
  88906. const maybeName = this.state.value;
  88907. const expr = this.parseExpression();
  88908. if (starttype === types$12.name && expr.type === "Identifier" && this.eat(types$12.colon)) {
  88909. return this.parseLabeledStatement(node, maybeName, expr, context);
  88910. } else {
  88911. return this.parseExpressionStatement(node, expr);
  88912. }
  88913. }
  88914. assertModuleNodeAllowed(node) {
  88915. if (!this.options.allowImportExportEverywhere && !this.inModule) {
  88916. this.raise(node.start, SourceTypeModuleErrorMessages.ImportOutsideModule);
  88917. }
  88918. }
  88919. takeDecorators(node) {
  88920. const decorators = this.state.decoratorStack[this.state.decoratorStack.length - 1];
  88921. if (decorators.length) {
  88922. node.decorators = decorators;
  88923. this.resetStartLocationFromNode(node, decorators[0]);
  88924. this.state.decoratorStack[this.state.decoratorStack.length - 1] = [];
  88925. }
  88926. }
  88927. canHaveLeadingDecorator() {
  88928. return this.match(types$12._class);
  88929. }
  88930. parseDecorators(allowExport) {
  88931. const currentContextDecorators = this.state.decoratorStack[this.state.decoratorStack.length - 1];
  88932. while (this.match(types$12.at)) {
  88933. const decorator = this.parseDecorator();
  88934. currentContextDecorators.push(decorator);
  88935. }
  88936. if (this.match(types$12._export)) {
  88937. if (!allowExport) {
  88938. this.unexpected();
  88939. }
  88940. if (this.hasPlugin("decorators") && !this.getPluginOption("decorators", "decoratorsBeforeExport")) {
  88941. this.raise(this.state.start, ErrorMessages.DecoratorExportClass);
  88942. }
  88943. } else if (!this.canHaveLeadingDecorator()) {
  88944. throw this.raise(this.state.start, ErrorMessages.UnexpectedLeadingDecorator);
  88945. }
  88946. }
  88947. parseDecorator() {
  88948. this.expectOnePlugin(["decorators-legacy", "decorators"]);
  88949. const node = this.startNode();
  88950. this.next();
  88951. if (this.hasPlugin("decorators")) {
  88952. this.state.decoratorStack.push([]);
  88953. const startPos = this.state.start;
  88954. const startLoc = this.state.startLoc;
  88955. let expr;
  88956. if (this.eat(types$12.parenL)) {
  88957. expr = this.parseExpression();
  88958. this.expect(types$12.parenR);
  88959. } else {
  88960. expr = this.parseIdentifier(false);
  88961. while (this.eat(types$12.dot)) {
  88962. const node2 = this.startNodeAt(startPos, startLoc);
  88963. node2.object = expr;
  88964. node2.property = this.parseIdentifier(true);
  88965. node2.computed = false;
  88966. expr = this.finishNode(node2, "MemberExpression");
  88967. }
  88968. }
  88969. node.expression = this.parseMaybeDecoratorArguments(expr);
  88970. this.state.decoratorStack.pop();
  88971. } else {
  88972. node.expression = this.parseExprSubscripts();
  88973. }
  88974. return this.finishNode(node, "Decorator");
  88975. }
  88976. parseMaybeDecoratorArguments(expr) {
  88977. if (this.eat(types$12.parenL)) {
  88978. const node = this.startNodeAtNode(expr);
  88979. node.callee = expr;
  88980. node.arguments = this.parseCallExpressionArguments(types$12.parenR, false);
  88981. this.toReferencedList(node.arguments);
  88982. return this.finishNode(node, "CallExpression");
  88983. }
  88984. return expr;
  88985. }
  88986. parseBreakContinueStatement(node, keyword) {
  88987. const isBreak = keyword === "break";
  88988. this.next();
  88989. if (this.isLineTerminator()) {
  88990. node.label = null;
  88991. } else {
  88992. node.label = this.parseIdentifier();
  88993. this.semicolon();
  88994. }
  88995. this.verifyBreakContinue(node, keyword);
  88996. return this.finishNode(node, isBreak ? "BreakStatement" : "ContinueStatement");
  88997. }
  88998. verifyBreakContinue(node, keyword) {
  88999. const isBreak = keyword === "break";
  89000. let i;
  89001. for (i = 0; i < this.state.labels.length; ++i) {
  89002. const lab = this.state.labels[i];
  89003. if (node.label == null || lab.name === node.label.name) {
  89004. if (lab.kind != null && (isBreak || lab.kind === "loop"))
  89005. break;
  89006. if (node.label && isBreak)
  89007. break;
  89008. }
  89009. }
  89010. if (i === this.state.labels.length) {
  89011. this.raise(node.start, ErrorMessages.IllegalBreakContinue, keyword);
  89012. }
  89013. }
  89014. parseDebuggerStatement(node) {
  89015. this.next();
  89016. this.semicolon();
  89017. return this.finishNode(node, "DebuggerStatement");
  89018. }
  89019. parseHeaderExpression() {
  89020. this.expect(types$12.parenL);
  89021. const val = this.parseExpression();
  89022. this.expect(types$12.parenR);
  89023. return val;
  89024. }
  89025. parseDoStatement(node) {
  89026. this.next();
  89027. this.state.labels.push(loopLabel2);
  89028. node.body = this.withTopicForbiddingContext(() => this.parseStatement("do"));
  89029. this.state.labels.pop();
  89030. this.expect(types$12._while);
  89031. node.test = this.parseHeaderExpression();
  89032. this.eat(types$12.semi);
  89033. return this.finishNode(node, "DoWhileStatement");
  89034. }
  89035. parseForStatement(node) {
  89036. this.next();
  89037. this.state.labels.push(loopLabel2);
  89038. let awaitAt = -1;
  89039. if (this.isAwaitAllowed() && this.eatContextual("await")) {
  89040. awaitAt = this.state.lastTokStart;
  89041. }
  89042. this.scope.enter(SCOPE_OTHER);
  89043. this.expect(types$12.parenL);
  89044. if (this.match(types$12.semi)) {
  89045. if (awaitAt > -1) {
  89046. this.unexpected(awaitAt);
  89047. }
  89048. return this.parseFor(node, null);
  89049. }
  89050. const startsWithLet = this.isContextual("let");
  89051. const isLet = startsWithLet && this.isLetKeyword();
  89052. if (this.match(types$12._var) || this.match(types$12._const) || isLet) {
  89053. const init2 = this.startNode();
  89054. const kind = isLet ? "let" : this.state.value;
  89055. this.next();
  89056. this.parseVar(init2, true, kind);
  89057. this.finishNode(init2, "VariableDeclaration");
  89058. if ((this.match(types$12._in) || this.isContextual("of")) && init2.declarations.length === 1) {
  89059. return this.parseForIn(node, init2, awaitAt);
  89060. }
  89061. if (awaitAt > -1) {
  89062. this.unexpected(awaitAt);
  89063. }
  89064. return this.parseFor(node, init2);
  89065. }
  89066. const startsWithUnescapedName = this.match(types$12.name) && !this.state.containsEsc;
  89067. const refExpressionErrors = new ExpressionErrors();
  89068. const init = this.parseExpression(true, refExpressionErrors);
  89069. const isForOf = this.isContextual("of");
  89070. if (isForOf) {
  89071. if (startsWithLet) {
  89072. this.raise(init.start, ErrorMessages.ForOfLet);
  89073. } else if (awaitAt === -1 && startsWithUnescapedName && init.type === "Identifier" && init.name === "async") {
  89074. this.raise(init.start, ErrorMessages.ForOfAsync);
  89075. }
  89076. }
  89077. if (isForOf || this.match(types$12._in)) {
  89078. this.toAssignable(init, true);
  89079. const description = isForOf ? "for-of statement" : "for-in statement";
  89080. this.checkLVal(init, description);
  89081. return this.parseForIn(node, init, awaitAt);
  89082. } else {
  89083. this.checkExpressionErrors(refExpressionErrors, true);
  89084. }
  89085. if (awaitAt > -1) {
  89086. this.unexpected(awaitAt);
  89087. }
  89088. return this.parseFor(node, init);
  89089. }
  89090. parseFunctionStatement(node, isAsync, declarationPosition) {
  89091. this.next();
  89092. return this.parseFunction(node, FUNC_STATEMENT2 | (declarationPosition ? 0 : FUNC_HANGING_STATEMENT2), isAsync);
  89093. }
  89094. parseIfStatement(node) {
  89095. this.next();
  89096. node.test = this.parseHeaderExpression();
  89097. node.consequent = this.parseStatement("if");
  89098. node.alternate = this.eat(types$12._else) ? this.parseStatement("if") : null;
  89099. return this.finishNode(node, "IfStatement");
  89100. }
  89101. parseReturnStatement(node) {
  89102. if (!this.prodParam.hasReturn && !this.options.allowReturnOutsideFunction) {
  89103. this.raise(this.state.start, ErrorMessages.IllegalReturn);
  89104. }
  89105. this.next();
  89106. if (this.isLineTerminator()) {
  89107. node.argument = null;
  89108. } else {
  89109. node.argument = this.parseExpression();
  89110. this.semicolon();
  89111. }
  89112. return this.finishNode(node, "ReturnStatement");
  89113. }
  89114. parseSwitchStatement(node) {
  89115. this.next();
  89116. node.discriminant = this.parseHeaderExpression();
  89117. const cases = node.cases = [];
  89118. this.expect(types$12.braceL);
  89119. this.state.labels.push(switchLabel2);
  89120. this.scope.enter(SCOPE_OTHER);
  89121. let cur;
  89122. for (let sawDefault; !this.match(types$12.braceR); ) {
  89123. if (this.match(types$12._case) || this.match(types$12._default)) {
  89124. const isCase = this.match(types$12._case);
  89125. if (cur)
  89126. this.finishNode(cur, "SwitchCase");
  89127. cases.push(cur = this.startNode());
  89128. cur.consequent = [];
  89129. this.next();
  89130. if (isCase) {
  89131. cur.test = this.parseExpression();
  89132. } else {
  89133. if (sawDefault) {
  89134. this.raise(this.state.lastTokStart, ErrorMessages.MultipleDefaultsInSwitch);
  89135. }
  89136. sawDefault = true;
  89137. cur.test = null;
  89138. }
  89139. this.expect(types$12.colon);
  89140. } else {
  89141. if (cur) {
  89142. cur.consequent.push(this.parseStatement(null));
  89143. } else {
  89144. this.unexpected();
  89145. }
  89146. }
  89147. }
  89148. this.scope.exit();
  89149. if (cur)
  89150. this.finishNode(cur, "SwitchCase");
  89151. this.next();
  89152. this.state.labels.pop();
  89153. return this.finishNode(node, "SwitchStatement");
  89154. }
  89155. parseThrowStatement(node) {
  89156. this.next();
  89157. if (this.hasPrecedingLineBreak()) {
  89158. this.raise(this.state.lastTokEnd, ErrorMessages.NewlineAfterThrow);
  89159. }
  89160. node.argument = this.parseExpression();
  89161. this.semicolon();
  89162. return this.finishNode(node, "ThrowStatement");
  89163. }
  89164. parseCatchClauseParam() {
  89165. const param = this.parseBindingAtom();
  89166. const simple = param.type === "Identifier";
  89167. this.scope.enter(simple ? SCOPE_SIMPLE_CATCH2 : 0);
  89168. this.checkLVal(param, "catch clause", BIND_LEXICAL2);
  89169. return param;
  89170. }
  89171. parseTryStatement(node) {
  89172. this.next();
  89173. node.block = this.parseBlock();
  89174. node.handler = null;
  89175. if (this.match(types$12._catch)) {
  89176. const clause = this.startNode();
  89177. this.next();
  89178. if (this.match(types$12.parenL)) {
  89179. this.expect(types$12.parenL);
  89180. clause.param = this.parseCatchClauseParam();
  89181. this.expect(types$12.parenR);
  89182. } else {
  89183. clause.param = null;
  89184. this.scope.enter(SCOPE_OTHER);
  89185. }
  89186. clause.body = this.withTopicForbiddingContext(() => this.parseBlock(false, false));
  89187. this.scope.exit();
  89188. node.handler = this.finishNode(clause, "CatchClause");
  89189. }
  89190. node.finalizer = this.eat(types$12._finally) ? this.parseBlock() : null;
  89191. if (!node.handler && !node.finalizer) {
  89192. this.raise(node.start, ErrorMessages.NoCatchOrFinally);
  89193. }
  89194. return this.finishNode(node, "TryStatement");
  89195. }
  89196. parseVarStatement(node, kind) {
  89197. this.next();
  89198. this.parseVar(node, false, kind);
  89199. this.semicolon();
  89200. return this.finishNode(node, "VariableDeclaration");
  89201. }
  89202. parseWhileStatement(node) {
  89203. this.next();
  89204. node.test = this.parseHeaderExpression();
  89205. this.state.labels.push(loopLabel2);
  89206. node.body = this.withTopicForbiddingContext(() => this.parseStatement("while"));
  89207. this.state.labels.pop();
  89208. return this.finishNode(node, "WhileStatement");
  89209. }
  89210. parseWithStatement(node) {
  89211. if (this.state.strict) {
  89212. this.raise(this.state.start, ErrorMessages.StrictWith);
  89213. }
  89214. this.next();
  89215. node.object = this.parseHeaderExpression();
  89216. node.body = this.withTopicForbiddingContext(() => this.parseStatement("with"));
  89217. return this.finishNode(node, "WithStatement");
  89218. }
  89219. parseEmptyStatement(node) {
  89220. this.next();
  89221. return this.finishNode(node, "EmptyStatement");
  89222. }
  89223. parseLabeledStatement(node, maybeName, expr, context) {
  89224. for (const label of this.state.labels) {
  89225. if (label.name === maybeName) {
  89226. this.raise(expr.start, ErrorMessages.LabelRedeclaration, maybeName);
  89227. }
  89228. }
  89229. const kind = this.state.type.isLoop ? "loop" : this.match(types$12._switch) ? "switch" : null;
  89230. for (let i = this.state.labels.length - 1; i >= 0; i--) {
  89231. const label = this.state.labels[i];
  89232. if (label.statementStart === node.start) {
  89233. label.statementStart = this.state.start;
  89234. label.kind = kind;
  89235. } else {
  89236. break;
  89237. }
  89238. }
  89239. this.state.labels.push({
  89240. name: maybeName,
  89241. kind,
  89242. statementStart: this.state.start
  89243. });
  89244. node.body = this.parseStatement(context ? context.indexOf("label") === -1 ? context + "label" : context : "label");
  89245. this.state.labels.pop();
  89246. node.label = expr;
  89247. return this.finishNode(node, "LabeledStatement");
  89248. }
  89249. parseExpressionStatement(node, expr) {
  89250. node.expression = expr;
  89251. this.semicolon();
  89252. return this.finishNode(node, "ExpressionStatement");
  89253. }
  89254. parseBlock(allowDirectives = false, createNewLexicalScope = true, afterBlockParse) {
  89255. const node = this.startNode();
  89256. if (allowDirectives) {
  89257. this.state.strictErrors.clear();
  89258. }
  89259. this.expect(types$12.braceL);
  89260. if (createNewLexicalScope) {
  89261. this.scope.enter(SCOPE_OTHER);
  89262. }
  89263. this.parseBlockBody(node, allowDirectives, false, types$12.braceR, afterBlockParse);
  89264. if (createNewLexicalScope) {
  89265. this.scope.exit();
  89266. }
  89267. return this.finishNode(node, "BlockStatement");
  89268. }
  89269. isValidDirective(stmt) {
  89270. return stmt.type === "ExpressionStatement" && stmt.expression.type === "StringLiteral" && !stmt.expression.extra.parenthesized;
  89271. }
  89272. parseBlockBody(node, allowDirectives, topLevel, end, afterBlockParse) {
  89273. const body = node.body = [];
  89274. const directives = node.directives = [];
  89275. this.parseBlockOrModuleBlockBody(body, allowDirectives ? directives : void 0, topLevel, end, afterBlockParse);
  89276. }
  89277. parseBlockOrModuleBlockBody(body, directives, topLevel, end, afterBlockParse) {
  89278. const oldStrict = this.state.strict;
  89279. let hasStrictModeDirective = false;
  89280. let parsedNonDirective = false;
  89281. while (!this.match(end)) {
  89282. const stmt = this.parseStatement(null, topLevel);
  89283. if (directives && !parsedNonDirective) {
  89284. if (this.isValidDirective(stmt)) {
  89285. const directive = this.stmtToDirective(stmt);
  89286. directives.push(directive);
  89287. if (!hasStrictModeDirective && directive.value.value === "use strict") {
  89288. hasStrictModeDirective = true;
  89289. this.setStrict(true);
  89290. }
  89291. continue;
  89292. }
  89293. parsedNonDirective = true;
  89294. this.state.strictErrors.clear();
  89295. }
  89296. body.push(stmt);
  89297. }
  89298. if (afterBlockParse) {
  89299. afterBlockParse.call(this, hasStrictModeDirective);
  89300. }
  89301. if (!oldStrict) {
  89302. this.setStrict(false);
  89303. }
  89304. this.next();
  89305. }
  89306. parseFor(node, init) {
  89307. node.init = init;
  89308. this.semicolon(false);
  89309. node.test = this.match(types$12.semi) ? null : this.parseExpression();
  89310. this.semicolon(false);
  89311. node.update = this.match(types$12.parenR) ? null : this.parseExpression();
  89312. this.expect(types$12.parenR);
  89313. node.body = this.withTopicForbiddingContext(() => this.parseStatement("for"));
  89314. this.scope.exit();
  89315. this.state.labels.pop();
  89316. return this.finishNode(node, "ForStatement");
  89317. }
  89318. parseForIn(node, init, awaitAt) {
  89319. const isForIn = this.match(types$12._in);
  89320. this.next();
  89321. if (isForIn) {
  89322. if (awaitAt > -1)
  89323. this.unexpected(awaitAt);
  89324. } else {
  89325. node.await = awaitAt > -1;
  89326. }
  89327. if (init.type === "VariableDeclaration" && init.declarations[0].init != null && (!isForIn || this.state.strict || init.kind !== "var" || init.declarations[0].id.type !== "Identifier")) {
  89328. this.raise(init.start, ErrorMessages.ForInOfLoopInitializer, isForIn ? "for-in" : "for-of");
  89329. } else if (init.type === "AssignmentPattern") {
  89330. this.raise(init.start, ErrorMessages.InvalidLhs, "for-loop");
  89331. }
  89332. node.left = init;
  89333. node.right = isForIn ? this.parseExpression() : this.parseMaybeAssignAllowIn();
  89334. this.expect(types$12.parenR);
  89335. node.body = this.withTopicForbiddingContext(() => this.parseStatement("for"));
  89336. this.scope.exit();
  89337. this.state.labels.pop();
  89338. return this.finishNode(node, isForIn ? "ForInStatement" : "ForOfStatement");
  89339. }
  89340. parseVar(node, isFor, kind) {
  89341. const declarations = node.declarations = [];
  89342. const isTypescript = this.hasPlugin("typescript");
  89343. node.kind = kind;
  89344. for (; ; ) {
  89345. const decl = this.startNode();
  89346. this.parseVarId(decl, kind);
  89347. if (this.eat(types$12.eq)) {
  89348. decl.init = isFor ? this.parseMaybeAssignDisallowIn() : this.parseMaybeAssignAllowIn();
  89349. } else {
  89350. if (kind === "const" && !(this.match(types$12._in) || this.isContextual("of"))) {
  89351. if (!isTypescript) {
  89352. this.raise(this.state.lastTokEnd, ErrorMessages.DeclarationMissingInitializer, "Const declarations");
  89353. }
  89354. } else if (decl.id.type !== "Identifier" && !(isFor && (this.match(types$12._in) || this.isContextual("of")))) {
  89355. this.raise(this.state.lastTokEnd, ErrorMessages.DeclarationMissingInitializer, "Complex binding patterns");
  89356. }
  89357. decl.init = null;
  89358. }
  89359. declarations.push(this.finishNode(decl, "VariableDeclarator"));
  89360. if (!this.eat(types$12.comma))
  89361. break;
  89362. }
  89363. return node;
  89364. }
  89365. parseVarId(decl, kind) {
  89366. decl.id = this.parseBindingAtom();
  89367. this.checkLVal(decl.id, "variable declaration", kind === "var" ? BIND_VAR2 : BIND_LEXICAL2, void 0, kind !== "var");
  89368. }
  89369. parseFunction(node, statement = FUNC_NO_FLAGS, isAsync = false) {
  89370. const isStatement = statement & FUNC_STATEMENT2;
  89371. const isHangingStatement = statement & FUNC_HANGING_STATEMENT2;
  89372. const requireId = !!isStatement && !(statement & FUNC_NULLABLE_ID2);
  89373. this.initFunction(node, isAsync);
  89374. if (this.match(types$12.star) && isHangingStatement) {
  89375. this.raise(this.state.start, ErrorMessages.GeneratorInSingleStatementContext);
  89376. }
  89377. node.generator = this.eat(types$12.star);
  89378. if (isStatement) {
  89379. node.id = this.parseFunctionId(requireId);
  89380. }
  89381. const oldMaybeInArrowParameters = this.state.maybeInArrowParameters;
  89382. this.state.maybeInArrowParameters = false;
  89383. this.scope.enter(SCOPE_FUNCTION2);
  89384. this.prodParam.enter(functionFlags2(isAsync, node.generator));
  89385. if (!isStatement) {
  89386. node.id = this.parseFunctionId();
  89387. }
  89388. this.parseFunctionParams(node, false);
  89389. this.withTopicForbiddingContext(() => {
  89390. this.parseFunctionBodyAndFinish(node, isStatement ? "FunctionDeclaration" : "FunctionExpression");
  89391. });
  89392. this.prodParam.exit();
  89393. this.scope.exit();
  89394. if (isStatement && !isHangingStatement) {
  89395. this.registerFunctionStatementId(node);
  89396. }
  89397. this.state.maybeInArrowParameters = oldMaybeInArrowParameters;
  89398. return node;
  89399. }
  89400. parseFunctionId(requireId) {
  89401. return requireId || this.match(types$12.name) ? this.parseIdentifier() : null;
  89402. }
  89403. parseFunctionParams(node, allowModifiers) {
  89404. this.expect(types$12.parenL);
  89405. this.expressionScope.enter(newParameterDeclarationScope());
  89406. node.params = this.parseBindingList(types$12.parenR, 41, false, allowModifiers);
  89407. this.expressionScope.exit();
  89408. }
  89409. registerFunctionStatementId(node) {
  89410. if (!node.id)
  89411. return;
  89412. this.scope.declareName(node.id.name, this.state.strict || node.generator || node.async ? this.scope.treatFunctionsAsVar ? BIND_VAR2 : BIND_LEXICAL2 : BIND_FUNCTION2, node.id.start);
  89413. }
  89414. parseClass(node, isStatement, optionalId) {
  89415. this.next();
  89416. this.takeDecorators(node);
  89417. const oldStrict = this.state.strict;
  89418. this.state.strict = true;
  89419. this.parseClassId(node, isStatement, optionalId);
  89420. this.parseClassSuper(node);
  89421. node.body = this.parseClassBody(!!node.superClass, oldStrict);
  89422. return this.finishNode(node, isStatement ? "ClassDeclaration" : "ClassExpression");
  89423. }
  89424. isClassProperty() {
  89425. return this.match(types$12.eq) || this.match(types$12.semi) || this.match(types$12.braceR);
  89426. }
  89427. isClassMethod() {
  89428. return this.match(types$12.parenL);
  89429. }
  89430. isNonstaticConstructor(method) {
  89431. return !method.computed && !method.static && (method.key.name === "constructor" || method.key.value === "constructor");
  89432. }
  89433. parseClassBody(hadSuperClass, oldStrict) {
  89434. this.classScope.enter();
  89435. const state = {
  89436. hadConstructor: false,
  89437. hadSuperClass
  89438. };
  89439. let decorators = [];
  89440. const classBody = this.startNode();
  89441. classBody.body = [];
  89442. this.expect(types$12.braceL);
  89443. this.withTopicForbiddingContext(() => {
  89444. while (!this.match(types$12.braceR)) {
  89445. if (this.eat(types$12.semi)) {
  89446. if (decorators.length > 0) {
  89447. throw this.raise(this.state.lastTokEnd, ErrorMessages.DecoratorSemicolon);
  89448. }
  89449. continue;
  89450. }
  89451. if (this.match(types$12.at)) {
  89452. decorators.push(this.parseDecorator());
  89453. continue;
  89454. }
  89455. const member = this.startNode();
  89456. if (decorators.length) {
  89457. member.decorators = decorators;
  89458. this.resetStartLocationFromNode(member, decorators[0]);
  89459. decorators = [];
  89460. }
  89461. this.parseClassMember(classBody, member, state);
  89462. if (member.kind === "constructor" && member.decorators && member.decorators.length > 0) {
  89463. this.raise(member.start, ErrorMessages.DecoratorConstructor);
  89464. }
  89465. }
  89466. });
  89467. this.state.strict = oldStrict;
  89468. this.next();
  89469. if (decorators.length) {
  89470. throw this.raise(this.state.start, ErrorMessages.TrailingDecorator);
  89471. }
  89472. this.classScope.exit();
  89473. return this.finishNode(classBody, "ClassBody");
  89474. }
  89475. parseClassMemberFromModifier(classBody, member) {
  89476. const key = this.parseIdentifier(true);
  89477. if (this.isClassMethod()) {
  89478. const method = member;
  89479. method.kind = "method";
  89480. method.computed = false;
  89481. method.key = key;
  89482. method.static = false;
  89483. this.pushClassMethod(classBody, method, false, false, false, false);
  89484. return true;
  89485. } else if (this.isClassProperty()) {
  89486. const prop = member;
  89487. prop.computed = false;
  89488. prop.key = key;
  89489. prop.static = false;
  89490. classBody.body.push(this.parseClassProperty(prop));
  89491. return true;
  89492. }
  89493. this.resetPreviousNodeTrailingComments(key);
  89494. return false;
  89495. }
  89496. parseClassMember(classBody, member, state) {
  89497. const isStatic = this.isContextual("static");
  89498. if (isStatic) {
  89499. if (this.parseClassMemberFromModifier(classBody, member)) {
  89500. return;
  89501. }
  89502. if (this.eat(types$12.braceL)) {
  89503. this.parseClassStaticBlock(classBody, member);
  89504. return;
  89505. }
  89506. }
  89507. this.parseClassMemberWithIsStatic(classBody, member, state, isStatic);
  89508. }
  89509. parseClassMemberWithIsStatic(classBody, member, state, isStatic) {
  89510. const publicMethod = member;
  89511. const privateMethod = member;
  89512. const publicProp = member;
  89513. const privateProp = member;
  89514. const method = publicMethod;
  89515. const publicMember = publicMethod;
  89516. member.static = isStatic;
  89517. if (this.eat(types$12.star)) {
  89518. method.kind = "method";
  89519. const isPrivateName = this.match(types$12.privateName);
  89520. this.parseClassElementName(method);
  89521. if (isPrivateName) {
  89522. this.pushClassPrivateMethod(classBody, privateMethod, true, false);
  89523. return;
  89524. }
  89525. if (this.isNonstaticConstructor(publicMethod)) {
  89526. this.raise(publicMethod.key.start, ErrorMessages.ConstructorIsGenerator);
  89527. }
  89528. this.pushClassMethod(classBody, publicMethod, true, false, false, false);
  89529. return;
  89530. }
  89531. const isContextual = this.match(types$12.name) && !this.state.containsEsc;
  89532. const isPrivate = this.match(types$12.privateName);
  89533. const key = this.parseClassElementName(member);
  89534. const maybeQuestionTokenStart = this.state.start;
  89535. this.parsePostMemberNameModifiers(publicMember);
  89536. if (this.isClassMethod()) {
  89537. method.kind = "method";
  89538. if (isPrivate) {
  89539. this.pushClassPrivateMethod(classBody, privateMethod, false, false);
  89540. return;
  89541. }
  89542. const isConstructor = this.isNonstaticConstructor(publicMethod);
  89543. let allowsDirectSuper = false;
  89544. if (isConstructor) {
  89545. publicMethod.kind = "constructor";
  89546. if (state.hadConstructor && !this.hasPlugin("typescript")) {
  89547. this.raise(key.start, ErrorMessages.DuplicateConstructor);
  89548. }
  89549. if (isConstructor && this.hasPlugin("typescript") && member.override) {
  89550. this.raise(key.start, ErrorMessages.OverrideOnConstructor);
  89551. }
  89552. state.hadConstructor = true;
  89553. allowsDirectSuper = state.hadSuperClass;
  89554. }
  89555. this.pushClassMethod(classBody, publicMethod, false, false, isConstructor, allowsDirectSuper);
  89556. } else if (this.isClassProperty()) {
  89557. if (isPrivate) {
  89558. this.pushClassPrivateProperty(classBody, privateProp);
  89559. } else {
  89560. this.pushClassProperty(classBody, publicProp);
  89561. }
  89562. } else if (isContextual && key.name === "async" && !this.isLineTerminator()) {
  89563. this.resetPreviousNodeTrailingComments(key);
  89564. const isGenerator = this.eat(types$12.star);
  89565. if (publicMember.optional) {
  89566. this.unexpected(maybeQuestionTokenStart);
  89567. }
  89568. method.kind = "method";
  89569. const isPrivate2 = this.match(types$12.privateName);
  89570. this.parseClassElementName(method);
  89571. this.parsePostMemberNameModifiers(publicMember);
  89572. if (isPrivate2) {
  89573. this.pushClassPrivateMethod(classBody, privateMethod, isGenerator, true);
  89574. } else {
  89575. if (this.isNonstaticConstructor(publicMethod)) {
  89576. this.raise(publicMethod.key.start, ErrorMessages.ConstructorIsAsync);
  89577. }
  89578. this.pushClassMethod(classBody, publicMethod, isGenerator, true, false, false);
  89579. }
  89580. } else if (isContextual && (key.name === "get" || key.name === "set") && !(this.match(types$12.star) && this.isLineTerminator())) {
  89581. this.resetPreviousNodeTrailingComments(key);
  89582. method.kind = key.name;
  89583. const isPrivate2 = this.match(types$12.privateName);
  89584. this.parseClassElementName(publicMethod);
  89585. if (isPrivate2) {
  89586. this.pushClassPrivateMethod(classBody, privateMethod, false, false);
  89587. } else {
  89588. if (this.isNonstaticConstructor(publicMethod)) {
  89589. this.raise(publicMethod.key.start, ErrorMessages.ConstructorIsAccessor);
  89590. }
  89591. this.pushClassMethod(classBody, publicMethod, false, false, false, false);
  89592. }
  89593. this.checkGetterSetterParams(publicMethod);
  89594. } else if (this.isLineTerminator()) {
  89595. if (isPrivate) {
  89596. this.pushClassPrivateProperty(classBody, privateProp);
  89597. } else {
  89598. this.pushClassProperty(classBody, publicProp);
  89599. }
  89600. } else {
  89601. this.unexpected();
  89602. }
  89603. }
  89604. parseClassElementName(member) {
  89605. const {
  89606. type,
  89607. value,
  89608. start: start3
  89609. } = this.state;
  89610. if ((type === types$12.name || type === types$12.string) && member.static && value === "prototype") {
  89611. this.raise(start3, ErrorMessages.StaticPrototype);
  89612. }
  89613. if (type === types$12.privateName && value === "constructor") {
  89614. this.raise(start3, ErrorMessages.ConstructorClassPrivateField);
  89615. }
  89616. return this.parsePropertyName(member, true);
  89617. }
  89618. parseClassStaticBlock(classBody, member) {
  89619. var _member$decorators;
  89620. this.expectPlugin("classStaticBlock", member.start);
  89621. this.scope.enter(SCOPE_CLASS | SCOPE_STATIC_BLOCK | SCOPE_SUPER2);
  89622. const oldLabels = this.state.labels;
  89623. this.state.labels = [];
  89624. this.prodParam.enter(PARAM);
  89625. const body = member.body = [];
  89626. this.parseBlockOrModuleBlockBody(body, void 0, false, types$12.braceR);
  89627. this.prodParam.exit();
  89628. this.scope.exit();
  89629. this.state.labels = oldLabels;
  89630. classBody.body.push(this.finishNode(member, "StaticBlock"));
  89631. if ((_member$decorators = member.decorators) != null && _member$decorators.length) {
  89632. this.raise(member.start, ErrorMessages.DecoratorStaticBlock);
  89633. }
  89634. }
  89635. pushClassProperty(classBody, prop) {
  89636. if (!prop.computed && (prop.key.name === "constructor" || prop.key.value === "constructor")) {
  89637. this.raise(prop.key.start, ErrorMessages.ConstructorClassField);
  89638. }
  89639. classBody.body.push(this.parseClassProperty(prop));
  89640. }
  89641. pushClassPrivateProperty(classBody, prop) {
  89642. const node = this.parseClassPrivateProperty(prop);
  89643. classBody.body.push(node);
  89644. this.classScope.declarePrivateName(this.getPrivateNameSV(node.key), CLASS_ELEMENT_OTHER, node.key.start);
  89645. }
  89646. pushClassMethod(classBody, method, isGenerator, isAsync, isConstructor, allowsDirectSuper) {
  89647. classBody.body.push(this.parseMethod(method, isGenerator, isAsync, isConstructor, allowsDirectSuper, "ClassMethod", true));
  89648. }
  89649. pushClassPrivateMethod(classBody, method, isGenerator, isAsync) {
  89650. const node = this.parseMethod(method, isGenerator, isAsync, false, false, "ClassPrivateMethod", true);
  89651. classBody.body.push(node);
  89652. const kind = node.kind === "get" ? node.static ? CLASS_ELEMENT_STATIC_GETTER : CLASS_ELEMENT_INSTANCE_GETTER : node.kind === "set" ? node.static ? CLASS_ELEMENT_STATIC_SETTER : CLASS_ELEMENT_INSTANCE_SETTER : CLASS_ELEMENT_OTHER;
  89653. this.classScope.declarePrivateName(this.getPrivateNameSV(node.key), kind, node.key.start);
  89654. }
  89655. parsePostMemberNameModifiers(methodOrProp) {
  89656. }
  89657. parseClassPrivateProperty(node) {
  89658. this.parseInitializer(node);
  89659. this.semicolon();
  89660. return this.finishNode(node, "ClassPrivateProperty");
  89661. }
  89662. parseClassProperty(node) {
  89663. this.parseInitializer(node);
  89664. this.semicolon();
  89665. return this.finishNode(node, "ClassProperty");
  89666. }
  89667. parseInitializer(node) {
  89668. this.scope.enter(SCOPE_CLASS | SCOPE_SUPER2);
  89669. this.expressionScope.enter(newExpressionScope());
  89670. this.prodParam.enter(PARAM);
  89671. node.value = this.eat(types$12.eq) ? this.parseMaybeAssignAllowIn() : null;
  89672. this.expressionScope.exit();
  89673. this.prodParam.exit();
  89674. this.scope.exit();
  89675. }
  89676. parseClassId(node, isStatement, optionalId, bindingType = BIND_CLASS) {
  89677. if (this.match(types$12.name)) {
  89678. node.id = this.parseIdentifier();
  89679. if (isStatement) {
  89680. this.checkLVal(node.id, "class name", bindingType);
  89681. }
  89682. } else {
  89683. if (optionalId || !isStatement) {
  89684. node.id = null;
  89685. } else {
  89686. this.unexpected(null, ErrorMessages.MissingClassName);
  89687. }
  89688. }
  89689. }
  89690. parseClassSuper(node) {
  89691. node.superClass = this.eat(types$12._extends) ? this.parseExprSubscripts() : null;
  89692. }
  89693. parseExport(node) {
  89694. const hasDefault = this.maybeParseExportDefaultSpecifier(node);
  89695. const parseAfterDefault = !hasDefault || this.eat(types$12.comma);
  89696. const hasStar = parseAfterDefault && this.eatExportStar(node);
  89697. const hasNamespace = hasStar && this.maybeParseExportNamespaceSpecifier(node);
  89698. const parseAfterNamespace = parseAfterDefault && (!hasNamespace || this.eat(types$12.comma));
  89699. const isFromRequired = hasDefault || hasStar;
  89700. if (hasStar && !hasNamespace) {
  89701. if (hasDefault)
  89702. this.unexpected();
  89703. this.parseExportFrom(node, true);
  89704. return this.finishNode(node, "ExportAllDeclaration");
  89705. }
  89706. const hasSpecifiers = this.maybeParseExportNamedSpecifiers(node);
  89707. if (hasDefault && parseAfterDefault && !hasStar && !hasSpecifiers || hasNamespace && parseAfterNamespace && !hasSpecifiers) {
  89708. throw this.unexpected(null, types$12.braceL);
  89709. }
  89710. let hasDeclaration;
  89711. if (isFromRequired || hasSpecifiers) {
  89712. hasDeclaration = false;
  89713. this.parseExportFrom(node, isFromRequired);
  89714. } else {
  89715. hasDeclaration = this.maybeParseExportDeclaration(node);
  89716. }
  89717. if (isFromRequired || hasSpecifiers || hasDeclaration) {
  89718. this.checkExport(node, true, false, !!node.source);
  89719. return this.finishNode(node, "ExportNamedDeclaration");
  89720. }
  89721. if (this.eat(types$12._default)) {
  89722. node.declaration = this.parseExportDefaultExpression();
  89723. this.checkExport(node, true, true);
  89724. return this.finishNode(node, "ExportDefaultDeclaration");
  89725. }
  89726. throw this.unexpected(null, types$12.braceL);
  89727. }
  89728. eatExportStar(node) {
  89729. return this.eat(types$12.star);
  89730. }
  89731. maybeParseExportDefaultSpecifier(node) {
  89732. if (this.isExportDefaultSpecifier()) {
  89733. this.expectPlugin("exportDefaultFrom");
  89734. const specifier = this.startNode();
  89735. specifier.exported = this.parseIdentifier(true);
  89736. node.specifiers = [this.finishNode(specifier, "ExportDefaultSpecifier")];
  89737. return true;
  89738. }
  89739. return false;
  89740. }
  89741. maybeParseExportNamespaceSpecifier(node) {
  89742. if (this.isContextual("as")) {
  89743. if (!node.specifiers)
  89744. node.specifiers = [];
  89745. const specifier = this.startNodeAt(this.state.lastTokStart, this.state.lastTokStartLoc);
  89746. this.next();
  89747. specifier.exported = this.parseModuleExportName();
  89748. node.specifiers.push(this.finishNode(specifier, "ExportNamespaceSpecifier"));
  89749. return true;
  89750. }
  89751. return false;
  89752. }
  89753. maybeParseExportNamedSpecifiers(node) {
  89754. if (this.match(types$12.braceL)) {
  89755. if (!node.specifiers)
  89756. node.specifiers = [];
  89757. node.specifiers.push(...this.parseExportSpecifiers());
  89758. node.source = null;
  89759. node.declaration = null;
  89760. return true;
  89761. }
  89762. return false;
  89763. }
  89764. maybeParseExportDeclaration(node) {
  89765. if (this.shouldParseExportDeclaration()) {
  89766. node.specifiers = [];
  89767. node.source = null;
  89768. node.declaration = this.parseExportDeclaration(node);
  89769. return true;
  89770. }
  89771. return false;
  89772. }
  89773. isAsyncFunction() {
  89774. if (!this.isContextual("async"))
  89775. return false;
  89776. const next = this.nextTokenStart();
  89777. return !lineBreak2.test(this.input.slice(this.state.pos, next)) && this.isUnparsedContextual(next, "function");
  89778. }
  89779. parseExportDefaultExpression() {
  89780. const expr = this.startNode();
  89781. const isAsync = this.isAsyncFunction();
  89782. if (this.match(types$12._function) || isAsync) {
  89783. this.next();
  89784. if (isAsync) {
  89785. this.next();
  89786. }
  89787. return this.parseFunction(expr, FUNC_STATEMENT2 | FUNC_NULLABLE_ID2, isAsync);
  89788. } else if (this.match(types$12._class)) {
  89789. return this.parseClass(expr, true, true);
  89790. } else if (this.match(types$12.at)) {
  89791. if (this.hasPlugin("decorators") && this.getPluginOption("decorators", "decoratorsBeforeExport")) {
  89792. this.raise(this.state.start, ErrorMessages.DecoratorBeforeExport);
  89793. }
  89794. this.parseDecorators(false);
  89795. return this.parseClass(expr, true, true);
  89796. } else if (this.match(types$12._const) || this.match(types$12._var) || this.isLet()) {
  89797. throw this.raise(this.state.start, ErrorMessages.UnsupportedDefaultExport);
  89798. } else {
  89799. const res = this.parseMaybeAssignAllowIn();
  89800. this.semicolon();
  89801. return res;
  89802. }
  89803. }
  89804. parseExportDeclaration(node) {
  89805. return this.parseStatement(null);
  89806. }
  89807. isExportDefaultSpecifier() {
  89808. if (this.match(types$12.name)) {
  89809. const value = this.state.value;
  89810. if (value === "async" && !this.state.containsEsc || value === "let") {
  89811. return false;
  89812. }
  89813. if ((value === "type" || value === "interface") && !this.state.containsEsc) {
  89814. const l = this.lookahead();
  89815. if (l.type === types$12.name && l.value !== "from" || l.type === types$12.braceL) {
  89816. this.expectOnePlugin(["flow", "typescript"]);
  89817. return false;
  89818. }
  89819. }
  89820. } else if (!this.match(types$12._default)) {
  89821. return false;
  89822. }
  89823. const next = this.nextTokenStart();
  89824. const hasFrom = this.isUnparsedContextual(next, "from");
  89825. if (this.input.charCodeAt(next) === 44 || this.match(types$12.name) && hasFrom) {
  89826. return true;
  89827. }
  89828. if (this.match(types$12._default) && hasFrom) {
  89829. const nextAfterFrom = this.input.charCodeAt(this.nextTokenStartSince(next + 4));
  89830. return nextAfterFrom === 34 || nextAfterFrom === 39;
  89831. }
  89832. return false;
  89833. }
  89834. parseExportFrom(node, expect) {
  89835. if (this.eatContextual("from")) {
  89836. node.source = this.parseImportSource();
  89837. this.checkExport(node);
  89838. const assertions = this.maybeParseImportAssertions();
  89839. if (assertions) {
  89840. node.assertions = assertions;
  89841. }
  89842. } else {
  89843. if (expect) {
  89844. this.unexpected();
  89845. } else {
  89846. node.source = null;
  89847. }
  89848. }
  89849. this.semicolon();
  89850. }
  89851. shouldParseExportDeclaration() {
  89852. if (this.match(types$12.at)) {
  89853. this.expectOnePlugin(["decorators", "decorators-legacy"]);
  89854. if (this.hasPlugin("decorators")) {
  89855. if (this.getPluginOption("decorators", "decoratorsBeforeExport")) {
  89856. this.unexpected(this.state.start, ErrorMessages.DecoratorBeforeExport);
  89857. } else {
  89858. return true;
  89859. }
  89860. }
  89861. }
  89862. return this.state.type.keyword === "var" || this.state.type.keyword === "const" || this.state.type.keyword === "function" || this.state.type.keyword === "class" || this.isLet() || this.isAsyncFunction();
  89863. }
  89864. checkExport(node, checkNames, isDefault, isFrom) {
  89865. if (checkNames) {
  89866. if (isDefault) {
  89867. this.checkDuplicateExports(node, "default");
  89868. if (this.hasPlugin("exportDefaultFrom")) {
  89869. var _declaration$extra;
  89870. const declaration = node.declaration;
  89871. if (declaration.type === "Identifier" && declaration.name === "from" && declaration.end - declaration.start === 4 && !((_declaration$extra = declaration.extra) != null && _declaration$extra.parenthesized)) {
  89872. this.raise(declaration.start, ErrorMessages.ExportDefaultFromAsIdentifier);
  89873. }
  89874. }
  89875. } else if (node.specifiers && node.specifiers.length) {
  89876. for (const specifier of node.specifiers) {
  89877. const {
  89878. exported
  89879. } = specifier;
  89880. const exportedName = exported.type === "Identifier" ? exported.name : exported.value;
  89881. this.checkDuplicateExports(specifier, exportedName);
  89882. if (!isFrom && specifier.local) {
  89883. const {
  89884. local
  89885. } = specifier;
  89886. if (local.type !== "Identifier") {
  89887. this.raise(specifier.start, ErrorMessages.ExportBindingIsString, local.value, exportedName);
  89888. } else {
  89889. this.checkReservedWord(local.name, local.start, true, false);
  89890. this.scope.checkLocalExport(local);
  89891. }
  89892. }
  89893. }
  89894. } else if (node.declaration) {
  89895. if (node.declaration.type === "FunctionDeclaration" || node.declaration.type === "ClassDeclaration") {
  89896. const id = node.declaration.id;
  89897. if (!id)
  89898. throw new Error("Assertion failure");
  89899. this.checkDuplicateExports(node, id.name);
  89900. } else if (node.declaration.type === "VariableDeclaration") {
  89901. for (const declaration of node.declaration.declarations) {
  89902. this.checkDeclaration(declaration.id);
  89903. }
  89904. }
  89905. }
  89906. }
  89907. const currentContextDecorators = this.state.decoratorStack[this.state.decoratorStack.length - 1];
  89908. if (currentContextDecorators.length) {
  89909. throw this.raise(node.start, ErrorMessages.UnsupportedDecoratorExport);
  89910. }
  89911. }
  89912. checkDeclaration(node) {
  89913. if (node.type === "Identifier") {
  89914. this.checkDuplicateExports(node, node.name);
  89915. } else if (node.type === "ObjectPattern") {
  89916. for (const prop of node.properties) {
  89917. this.checkDeclaration(prop);
  89918. }
  89919. } else if (node.type === "ArrayPattern") {
  89920. for (const elem of node.elements) {
  89921. if (elem) {
  89922. this.checkDeclaration(elem);
  89923. }
  89924. }
  89925. } else if (node.type === "ObjectProperty") {
  89926. this.checkDeclaration(node.value);
  89927. } else if (node.type === "RestElement") {
  89928. this.checkDeclaration(node.argument);
  89929. } else if (node.type === "AssignmentPattern") {
  89930. this.checkDeclaration(node.left);
  89931. }
  89932. }
  89933. checkDuplicateExports(node, name2) {
  89934. if (this.exportedIdentifiers.has(name2)) {
  89935. this.raise(node.start, name2 === "default" ? ErrorMessages.DuplicateDefaultExport : ErrorMessages.DuplicateExport, name2);
  89936. }
  89937. this.exportedIdentifiers.add(name2);
  89938. }
  89939. parseExportSpecifiers() {
  89940. const nodes = [];
  89941. let first = true;
  89942. this.expect(types$12.braceL);
  89943. while (!this.eat(types$12.braceR)) {
  89944. if (first) {
  89945. first = false;
  89946. } else {
  89947. this.expect(types$12.comma);
  89948. if (this.eat(types$12.braceR))
  89949. break;
  89950. }
  89951. const node = this.startNode();
  89952. node.local = this.parseModuleExportName();
  89953. node.exported = this.eatContextual("as") ? this.parseModuleExportName() : node.local.__clone();
  89954. nodes.push(this.finishNode(node, "ExportSpecifier"));
  89955. }
  89956. return nodes;
  89957. }
  89958. parseModuleExportName() {
  89959. if (this.match(types$12.string)) {
  89960. const result = this.parseStringLiteral(this.state.value);
  89961. const surrogate = result.value.match(loneSurrogate2);
  89962. if (surrogate) {
  89963. this.raise(result.start, ErrorMessages.ModuleExportNameHasLoneSurrogate, surrogate[0].charCodeAt(0).toString(16));
  89964. }
  89965. return result;
  89966. }
  89967. return this.parseIdentifier(true);
  89968. }
  89969. parseImport(node) {
  89970. node.specifiers = [];
  89971. if (!this.match(types$12.string)) {
  89972. const hasDefault = this.maybeParseDefaultImportSpecifier(node);
  89973. const parseNext = !hasDefault || this.eat(types$12.comma);
  89974. const hasStar = parseNext && this.maybeParseStarImportSpecifier(node);
  89975. if (parseNext && !hasStar)
  89976. this.parseNamedImportSpecifiers(node);
  89977. this.expectContextual("from");
  89978. }
  89979. node.source = this.parseImportSource();
  89980. const assertions = this.maybeParseImportAssertions();
  89981. if (assertions) {
  89982. node.assertions = assertions;
  89983. } else {
  89984. const attributes = this.maybeParseModuleAttributes();
  89985. if (attributes) {
  89986. node.attributes = attributes;
  89987. }
  89988. }
  89989. this.semicolon();
  89990. return this.finishNode(node, "ImportDeclaration");
  89991. }
  89992. parseImportSource() {
  89993. if (!this.match(types$12.string))
  89994. this.unexpected();
  89995. return this.parseExprAtom();
  89996. }
  89997. shouldParseDefaultImport(node) {
  89998. return this.match(types$12.name);
  89999. }
  90000. parseImportSpecifierLocal(node, specifier, type, contextDescription) {
  90001. specifier.local = this.parseIdentifier();
  90002. this.checkLVal(specifier.local, contextDescription, BIND_LEXICAL2);
  90003. node.specifiers.push(this.finishNode(specifier, type));
  90004. }
  90005. parseAssertEntries() {
  90006. const attrs = [];
  90007. const attrNames = /* @__PURE__ */ new Set();
  90008. do {
  90009. if (this.match(types$12.braceR)) {
  90010. break;
  90011. }
  90012. const node = this.startNode();
  90013. const keyName = this.state.value;
  90014. if (attrNames.has(keyName)) {
  90015. this.raise(this.state.start, ErrorMessages.ModuleAttributesWithDuplicateKeys, keyName);
  90016. }
  90017. attrNames.add(keyName);
  90018. if (this.match(types$12.string)) {
  90019. node.key = this.parseStringLiteral(keyName);
  90020. } else {
  90021. node.key = this.parseIdentifier(true);
  90022. }
  90023. this.expect(types$12.colon);
  90024. if (!this.match(types$12.string)) {
  90025. throw this.unexpected(this.state.start, ErrorMessages.ModuleAttributeInvalidValue);
  90026. }
  90027. node.value = this.parseStringLiteral(this.state.value);
  90028. this.finishNode(node, "ImportAttribute");
  90029. attrs.push(node);
  90030. } while (this.eat(types$12.comma));
  90031. return attrs;
  90032. }
  90033. maybeParseModuleAttributes() {
  90034. if (this.match(types$12._with) && !this.hasPrecedingLineBreak()) {
  90035. this.expectPlugin("moduleAttributes");
  90036. this.next();
  90037. } else {
  90038. if (this.hasPlugin("moduleAttributes"))
  90039. return [];
  90040. return null;
  90041. }
  90042. const attrs = [];
  90043. const attributes = /* @__PURE__ */ new Set();
  90044. do {
  90045. const node = this.startNode();
  90046. node.key = this.parseIdentifier(true);
  90047. if (node.key.name !== "type") {
  90048. this.raise(node.key.start, ErrorMessages.ModuleAttributeDifferentFromType, node.key.name);
  90049. }
  90050. if (attributes.has(node.key.name)) {
  90051. this.raise(node.key.start, ErrorMessages.ModuleAttributesWithDuplicateKeys, node.key.name);
  90052. }
  90053. attributes.add(node.key.name);
  90054. this.expect(types$12.colon);
  90055. if (!this.match(types$12.string)) {
  90056. throw this.unexpected(this.state.start, ErrorMessages.ModuleAttributeInvalidValue);
  90057. }
  90058. node.value = this.parseStringLiteral(this.state.value);
  90059. this.finishNode(node, "ImportAttribute");
  90060. attrs.push(node);
  90061. } while (this.eat(types$12.comma));
  90062. return attrs;
  90063. }
  90064. maybeParseImportAssertions() {
  90065. if (this.isContextual("assert") && !this.hasPrecedingLineBreak()) {
  90066. this.expectPlugin("importAssertions");
  90067. this.next();
  90068. } else {
  90069. if (this.hasPlugin("importAssertions"))
  90070. return [];
  90071. return null;
  90072. }
  90073. this.eat(types$12.braceL);
  90074. const attrs = this.parseAssertEntries();
  90075. this.eat(types$12.braceR);
  90076. return attrs;
  90077. }
  90078. maybeParseDefaultImportSpecifier(node) {
  90079. if (this.shouldParseDefaultImport(node)) {
  90080. this.parseImportSpecifierLocal(node, this.startNode(), "ImportDefaultSpecifier", "default import specifier");
  90081. return true;
  90082. }
  90083. return false;
  90084. }
  90085. maybeParseStarImportSpecifier(node) {
  90086. if (this.match(types$12.star)) {
  90087. const specifier = this.startNode();
  90088. this.next();
  90089. this.expectContextual("as");
  90090. this.parseImportSpecifierLocal(node, specifier, "ImportNamespaceSpecifier", "import namespace specifier");
  90091. return true;
  90092. }
  90093. return false;
  90094. }
  90095. parseNamedImportSpecifiers(node) {
  90096. let first = true;
  90097. this.expect(types$12.braceL);
  90098. while (!this.eat(types$12.braceR)) {
  90099. if (first) {
  90100. first = false;
  90101. } else {
  90102. if (this.eat(types$12.colon)) {
  90103. throw this.raise(this.state.start, ErrorMessages.DestructureNamedImport);
  90104. }
  90105. this.expect(types$12.comma);
  90106. if (this.eat(types$12.braceR))
  90107. break;
  90108. }
  90109. this.parseImportSpecifier(node);
  90110. }
  90111. }
  90112. parseImportSpecifier(node) {
  90113. const specifier = this.startNode();
  90114. const importedIsString = this.match(types$12.string);
  90115. specifier.imported = this.parseModuleExportName();
  90116. if (this.eatContextual("as")) {
  90117. specifier.local = this.parseIdentifier();
  90118. } else {
  90119. const {
  90120. imported
  90121. } = specifier;
  90122. if (importedIsString) {
  90123. throw this.raise(specifier.start, ErrorMessages.ImportBindingIsString, imported.value);
  90124. }
  90125. this.checkReservedWord(imported.name, specifier.start, true, true);
  90126. specifier.local = imported.__clone();
  90127. }
  90128. this.checkLVal(specifier.local, "import specifier", BIND_LEXICAL2);
  90129. node.specifiers.push(this.finishNode(specifier, "ImportSpecifier"));
  90130. }
  90131. isThisParam(param) {
  90132. return param.type === "Identifier" && param.name === "this";
  90133. }
  90134. };
  90135. var Parser3 = class extends StatementParser {
  90136. constructor(options, input) {
  90137. options = getOptions2(options);
  90138. super(options, input);
  90139. this.options = options;
  90140. this.initializeScopes();
  90141. this.plugins = pluginsMap(this.options.plugins);
  90142. this.filename = options.sourceFilename;
  90143. }
  90144. getScopeHandler() {
  90145. return ScopeHandler;
  90146. }
  90147. parse() {
  90148. this.enterInitialScopes();
  90149. const file = this.startNode();
  90150. const program = this.startNode();
  90151. this.nextToken();
  90152. file.errors = null;
  90153. this.parseTopLevel(file, program);
  90154. file.errors = this.state.errors;
  90155. return file;
  90156. }
  90157. };
  90158. function pluginsMap(plugins) {
  90159. const pluginMap = /* @__PURE__ */ new Map();
  90160. for (const plugin2 of plugins) {
  90161. const [name2, options] = Array.isArray(plugin2) ? plugin2 : [plugin2, {}];
  90162. if (!pluginMap.has(name2))
  90163. pluginMap.set(name2, options || {});
  90164. }
  90165. return pluginMap;
  90166. }
  90167. function parse4(input, options) {
  90168. var _options;
  90169. if (((_options = options) == null ? void 0 : _options.sourceType) === "unambiguous") {
  90170. options = Object.assign({}, options);
  90171. try {
  90172. options.sourceType = "module";
  90173. const parser = getParser(options, input);
  90174. const ast = parser.parse();
  90175. if (parser.sawUnambiguousESM) {
  90176. return ast;
  90177. }
  90178. if (parser.ambiguousScriptDifferentAst) {
  90179. try {
  90180. options.sourceType = "script";
  90181. return getParser(options, input).parse();
  90182. } catch (_unused) {
  90183. }
  90184. } else {
  90185. ast.program.sourceType = "script";
  90186. }
  90187. return ast;
  90188. } catch (moduleError) {
  90189. try {
  90190. options.sourceType = "script";
  90191. return getParser(options, input).parse();
  90192. } catch (_unused2) {
  90193. }
  90194. throw moduleError;
  90195. }
  90196. } else {
  90197. return getParser(options, input).parse();
  90198. }
  90199. }
  90200. function parseExpression(input, options) {
  90201. const parser = getParser(options, input);
  90202. if (parser.options.strictMode) {
  90203. parser.state.strict = true;
  90204. }
  90205. return parser.getExpression();
  90206. }
  90207. function getParser(options, input) {
  90208. let cls = Parser3;
  90209. if (options != null && options.plugins) {
  90210. validatePlugins(options.plugins);
  90211. cls = getParserClass(options.plugins);
  90212. }
  90213. return new cls(options, input);
  90214. }
  90215. var parserClassCache = {};
  90216. function getParserClass(pluginsFromOptions) {
  90217. const pluginList = mixinPluginNames.filter((name2) => hasPlugin(pluginsFromOptions, name2));
  90218. const key = pluginList.join("/");
  90219. let cls = parserClassCache[key];
  90220. if (!cls) {
  90221. cls = Parser3;
  90222. for (const plugin2 of pluginList) {
  90223. cls = mixinPlugins[plugin2](cls);
  90224. }
  90225. parserClassCache[key] = cls;
  90226. }
  90227. return cls;
  90228. }
  90229. exports.parse = parse4;
  90230. exports.parseExpression = parseExpression;
  90231. exports.tokTypes = types$12;
  90232. }
  90233. });
  90234. // node_modules/@babel/helper-hoist-variables/node_modules/@babel/types/lib/utils/shallowEqual.js
  90235. var require_shallowEqual4 = __commonJS({
  90236. "node_modules/@babel/helper-hoist-variables/node_modules/@babel/types/lib/utils/shallowEqual.js"(exports) {
  90237. "use strict";
  90238. Object.defineProperty(exports, "__esModule", {
  90239. value: true
  90240. });
  90241. exports.default = shallowEqual;
  90242. function shallowEqual(actual, expected) {
  90243. const keys2 = Object.keys(expected);
  90244. for (const key of keys2) {
  90245. if (actual[key] !== expected[key]) {
  90246. return false;
  90247. }
  90248. }
  90249. return true;
  90250. }
  90251. }
  90252. });
  90253. // node_modules/@babel/helper-hoist-variables/node_modules/@babel/types/lib/validators/generated/index.js
  90254. var require_generated16 = __commonJS({
  90255. "node_modules/@babel/helper-hoist-variables/node_modules/@babel/types/lib/validators/generated/index.js"(exports) {
  90256. "use strict";
  90257. Object.defineProperty(exports, "__esModule", {
  90258. value: true
  90259. });
  90260. exports.isArrayExpression = isArrayExpression;
  90261. exports.isAssignmentExpression = isAssignmentExpression;
  90262. exports.isBinaryExpression = isBinaryExpression;
  90263. exports.isInterpreterDirective = isInterpreterDirective;
  90264. exports.isDirective = isDirective;
  90265. exports.isDirectiveLiteral = isDirectiveLiteral;
  90266. exports.isBlockStatement = isBlockStatement;
  90267. exports.isBreakStatement = isBreakStatement;
  90268. exports.isCallExpression = isCallExpression;
  90269. exports.isCatchClause = isCatchClause;
  90270. exports.isConditionalExpression = isConditionalExpression;
  90271. exports.isContinueStatement = isContinueStatement;
  90272. exports.isDebuggerStatement = isDebuggerStatement;
  90273. exports.isDoWhileStatement = isDoWhileStatement;
  90274. exports.isEmptyStatement = isEmptyStatement;
  90275. exports.isExpressionStatement = isExpressionStatement2;
  90276. exports.isFile = isFile;
  90277. exports.isForInStatement = isForInStatement;
  90278. exports.isForStatement = isForStatement;
  90279. exports.isFunctionDeclaration = isFunctionDeclaration;
  90280. exports.isFunctionExpression = isFunctionExpression;
  90281. exports.isIdentifier = isIdentifier2;
  90282. exports.isIfStatement = isIfStatement;
  90283. exports.isLabeledStatement = isLabeledStatement;
  90284. exports.isStringLiteral = isStringLiteral2;
  90285. exports.isNumericLiteral = isNumericLiteral;
  90286. exports.isNullLiteral = isNullLiteral;
  90287. exports.isBooleanLiteral = isBooleanLiteral2;
  90288. exports.isRegExpLiteral = isRegExpLiteral;
  90289. exports.isLogicalExpression = isLogicalExpression;
  90290. exports.isMemberExpression = isMemberExpression;
  90291. exports.isNewExpression = isNewExpression;
  90292. exports.isProgram = isProgram;
  90293. exports.isObjectExpression = isObjectExpression;
  90294. exports.isObjectMethod = isObjectMethod;
  90295. exports.isObjectProperty = isObjectProperty;
  90296. exports.isRestElement = isRestElement;
  90297. exports.isReturnStatement = isReturnStatement;
  90298. exports.isSequenceExpression = isSequenceExpression;
  90299. exports.isParenthesizedExpression = isParenthesizedExpression;
  90300. exports.isSwitchCase = isSwitchCase;
  90301. exports.isSwitchStatement = isSwitchStatement;
  90302. exports.isThisExpression = isThisExpression;
  90303. exports.isThrowStatement = isThrowStatement;
  90304. exports.isTryStatement = isTryStatement;
  90305. exports.isUnaryExpression = isUnaryExpression;
  90306. exports.isUpdateExpression = isUpdateExpression;
  90307. exports.isVariableDeclaration = isVariableDeclaration;
  90308. exports.isVariableDeclarator = isVariableDeclarator;
  90309. exports.isWhileStatement = isWhileStatement;
  90310. exports.isWithStatement = isWithStatement;
  90311. exports.isAssignmentPattern = isAssignmentPattern;
  90312. exports.isArrayPattern = isArrayPattern;
  90313. exports.isArrowFunctionExpression = isArrowFunctionExpression;
  90314. exports.isClassBody = isClassBody;
  90315. exports.isClassExpression = isClassExpression;
  90316. exports.isClassDeclaration = isClassDeclaration;
  90317. exports.isExportAllDeclaration = isExportAllDeclaration;
  90318. exports.isExportDefaultDeclaration = isExportDefaultDeclaration;
  90319. exports.isExportNamedDeclaration = isExportNamedDeclaration;
  90320. exports.isExportSpecifier = isExportSpecifier;
  90321. exports.isForOfStatement = isForOfStatement;
  90322. exports.isImportDeclaration = isImportDeclaration;
  90323. exports.isImportDefaultSpecifier = isImportDefaultSpecifier;
  90324. exports.isImportNamespaceSpecifier = isImportNamespaceSpecifier;
  90325. exports.isImportSpecifier = isImportSpecifier;
  90326. exports.isMetaProperty = isMetaProperty;
  90327. exports.isClassMethod = isClassMethod;
  90328. exports.isObjectPattern = isObjectPattern;
  90329. exports.isSpreadElement = isSpreadElement;
  90330. exports.isSuper = isSuper;
  90331. exports.isTaggedTemplateExpression = isTaggedTemplateExpression;
  90332. exports.isTemplateElement = isTemplateElement;
  90333. exports.isTemplateLiteral = isTemplateLiteral;
  90334. exports.isYieldExpression = isYieldExpression;
  90335. exports.isAwaitExpression = isAwaitExpression;
  90336. exports.isImport = isImport;
  90337. exports.isBigIntLiteral = isBigIntLiteral;
  90338. exports.isExportNamespaceSpecifier = isExportNamespaceSpecifier;
  90339. exports.isOptionalMemberExpression = isOptionalMemberExpression;
  90340. exports.isOptionalCallExpression = isOptionalCallExpression;
  90341. exports.isAnyTypeAnnotation = isAnyTypeAnnotation;
  90342. exports.isArrayTypeAnnotation = isArrayTypeAnnotation;
  90343. exports.isBooleanTypeAnnotation = isBooleanTypeAnnotation;
  90344. exports.isBooleanLiteralTypeAnnotation = isBooleanLiteralTypeAnnotation;
  90345. exports.isNullLiteralTypeAnnotation = isNullLiteralTypeAnnotation;
  90346. exports.isClassImplements = isClassImplements;
  90347. exports.isDeclareClass = isDeclareClass;
  90348. exports.isDeclareFunction = isDeclareFunction;
  90349. exports.isDeclareInterface = isDeclareInterface;
  90350. exports.isDeclareModule = isDeclareModule;
  90351. exports.isDeclareModuleExports = isDeclareModuleExports;
  90352. exports.isDeclareTypeAlias = isDeclareTypeAlias;
  90353. exports.isDeclareOpaqueType = isDeclareOpaqueType;
  90354. exports.isDeclareVariable = isDeclareVariable;
  90355. exports.isDeclareExportDeclaration = isDeclareExportDeclaration;
  90356. exports.isDeclareExportAllDeclaration = isDeclareExportAllDeclaration;
  90357. exports.isDeclaredPredicate = isDeclaredPredicate;
  90358. exports.isExistsTypeAnnotation = isExistsTypeAnnotation;
  90359. exports.isFunctionTypeAnnotation = isFunctionTypeAnnotation;
  90360. exports.isFunctionTypeParam = isFunctionTypeParam;
  90361. exports.isGenericTypeAnnotation = isGenericTypeAnnotation;
  90362. exports.isInferredPredicate = isInferredPredicate;
  90363. exports.isInterfaceExtends = isInterfaceExtends;
  90364. exports.isInterfaceDeclaration = isInterfaceDeclaration;
  90365. exports.isInterfaceTypeAnnotation = isInterfaceTypeAnnotation;
  90366. exports.isIntersectionTypeAnnotation = isIntersectionTypeAnnotation;
  90367. exports.isMixedTypeAnnotation = isMixedTypeAnnotation;
  90368. exports.isEmptyTypeAnnotation = isEmptyTypeAnnotation;
  90369. exports.isNullableTypeAnnotation = isNullableTypeAnnotation;
  90370. exports.isNumberLiteralTypeAnnotation = isNumberLiteralTypeAnnotation;
  90371. exports.isNumberTypeAnnotation = isNumberTypeAnnotation;
  90372. exports.isObjectTypeAnnotation = isObjectTypeAnnotation;
  90373. exports.isObjectTypeInternalSlot = isObjectTypeInternalSlot;
  90374. exports.isObjectTypeCallProperty = isObjectTypeCallProperty;
  90375. exports.isObjectTypeIndexer = isObjectTypeIndexer;
  90376. exports.isObjectTypeProperty = isObjectTypeProperty;
  90377. exports.isObjectTypeSpreadProperty = isObjectTypeSpreadProperty;
  90378. exports.isOpaqueType = isOpaqueType;
  90379. exports.isQualifiedTypeIdentifier = isQualifiedTypeIdentifier;
  90380. exports.isStringLiteralTypeAnnotation = isStringLiteralTypeAnnotation;
  90381. exports.isStringTypeAnnotation = isStringTypeAnnotation;
  90382. exports.isSymbolTypeAnnotation = isSymbolTypeAnnotation;
  90383. exports.isThisTypeAnnotation = isThisTypeAnnotation;
  90384. exports.isTupleTypeAnnotation = isTupleTypeAnnotation;
  90385. exports.isTypeofTypeAnnotation = isTypeofTypeAnnotation;
  90386. exports.isTypeAlias = isTypeAlias;
  90387. exports.isTypeAnnotation = isTypeAnnotation;
  90388. exports.isTypeCastExpression = isTypeCastExpression;
  90389. exports.isTypeParameter = isTypeParameter;
  90390. exports.isTypeParameterDeclaration = isTypeParameterDeclaration;
  90391. exports.isTypeParameterInstantiation = isTypeParameterInstantiation;
  90392. exports.isUnionTypeAnnotation = isUnionTypeAnnotation;
  90393. exports.isVariance = isVariance;
  90394. exports.isVoidTypeAnnotation = isVoidTypeAnnotation;
  90395. exports.isEnumDeclaration = isEnumDeclaration;
  90396. exports.isEnumBooleanBody = isEnumBooleanBody;
  90397. exports.isEnumNumberBody = isEnumNumberBody;
  90398. exports.isEnumStringBody = isEnumStringBody;
  90399. exports.isEnumSymbolBody = isEnumSymbolBody;
  90400. exports.isEnumBooleanMember = isEnumBooleanMember;
  90401. exports.isEnumNumberMember = isEnumNumberMember;
  90402. exports.isEnumStringMember = isEnumStringMember;
  90403. exports.isEnumDefaultedMember = isEnumDefaultedMember;
  90404. exports.isIndexedAccessType = isIndexedAccessType;
  90405. exports.isOptionalIndexedAccessType = isOptionalIndexedAccessType;
  90406. exports.isJSXAttribute = isJSXAttribute;
  90407. exports.isJSXClosingElement = isJSXClosingElement;
  90408. exports.isJSXElement = isJSXElement2;
  90409. exports.isJSXEmptyExpression = isJSXEmptyExpression;
  90410. exports.isJSXExpressionContainer = isJSXExpressionContainer2;
  90411. exports.isJSXSpreadChild = isJSXSpreadChild;
  90412. exports.isJSXIdentifier = isJSXIdentifier2;
  90413. exports.isJSXMemberExpression = isJSXMemberExpression;
  90414. exports.isJSXNamespacedName = isJSXNamespacedName;
  90415. exports.isJSXOpeningElement = isJSXOpeningElement;
  90416. exports.isJSXSpreadAttribute = isJSXSpreadAttribute;
  90417. exports.isJSXText = isJSXText;
  90418. exports.isJSXFragment = isJSXFragment2;
  90419. exports.isJSXOpeningFragment = isJSXOpeningFragment;
  90420. exports.isJSXClosingFragment = isJSXClosingFragment;
  90421. exports.isNoop = isNoop;
  90422. exports.isPlaceholder = isPlaceholder;
  90423. exports.isV8IntrinsicIdentifier = isV8IntrinsicIdentifier;
  90424. exports.isArgumentPlaceholder = isArgumentPlaceholder;
  90425. exports.isBindExpression = isBindExpression;
  90426. exports.isClassProperty = isClassProperty;
  90427. exports.isPipelineTopicExpression = isPipelineTopicExpression;
  90428. exports.isPipelineBareFunction = isPipelineBareFunction;
  90429. exports.isPipelinePrimaryTopicReference = isPipelinePrimaryTopicReference;
  90430. exports.isClassPrivateProperty = isClassPrivateProperty;
  90431. exports.isClassPrivateMethod = isClassPrivateMethod;
  90432. exports.isImportAttribute = isImportAttribute;
  90433. exports.isDecorator = isDecorator;
  90434. exports.isDoExpression = isDoExpression;
  90435. exports.isExportDefaultSpecifier = isExportDefaultSpecifier;
  90436. exports.isPrivateName = isPrivateName;
  90437. exports.isRecordExpression = isRecordExpression;
  90438. exports.isTupleExpression = isTupleExpression;
  90439. exports.isDecimalLiteral = isDecimalLiteral;
  90440. exports.isStaticBlock = isStaticBlock;
  90441. exports.isModuleExpression = isModuleExpression;
  90442. exports.isTSParameterProperty = isTSParameterProperty;
  90443. exports.isTSDeclareFunction = isTSDeclareFunction;
  90444. exports.isTSDeclareMethod = isTSDeclareMethod;
  90445. exports.isTSQualifiedName = isTSQualifiedName;
  90446. exports.isTSCallSignatureDeclaration = isTSCallSignatureDeclaration;
  90447. exports.isTSConstructSignatureDeclaration = isTSConstructSignatureDeclaration;
  90448. exports.isTSPropertySignature = isTSPropertySignature;
  90449. exports.isTSMethodSignature = isTSMethodSignature;
  90450. exports.isTSIndexSignature = isTSIndexSignature;
  90451. exports.isTSAnyKeyword = isTSAnyKeyword;
  90452. exports.isTSBooleanKeyword = isTSBooleanKeyword;
  90453. exports.isTSBigIntKeyword = isTSBigIntKeyword;
  90454. exports.isTSIntrinsicKeyword = isTSIntrinsicKeyword;
  90455. exports.isTSNeverKeyword = isTSNeverKeyword;
  90456. exports.isTSNullKeyword = isTSNullKeyword;
  90457. exports.isTSNumberKeyword = isTSNumberKeyword;
  90458. exports.isTSObjectKeyword = isTSObjectKeyword;
  90459. exports.isTSStringKeyword = isTSStringKeyword;
  90460. exports.isTSSymbolKeyword = isTSSymbolKeyword;
  90461. exports.isTSUndefinedKeyword = isTSUndefinedKeyword;
  90462. exports.isTSUnknownKeyword = isTSUnknownKeyword;
  90463. exports.isTSVoidKeyword = isTSVoidKeyword;
  90464. exports.isTSThisType = isTSThisType;
  90465. exports.isTSFunctionType = isTSFunctionType;
  90466. exports.isTSConstructorType = isTSConstructorType;
  90467. exports.isTSTypeReference = isTSTypeReference;
  90468. exports.isTSTypePredicate = isTSTypePredicate;
  90469. exports.isTSTypeQuery = isTSTypeQuery;
  90470. exports.isTSTypeLiteral = isTSTypeLiteral;
  90471. exports.isTSArrayType = isTSArrayType;
  90472. exports.isTSTupleType = isTSTupleType;
  90473. exports.isTSOptionalType = isTSOptionalType;
  90474. exports.isTSRestType = isTSRestType;
  90475. exports.isTSNamedTupleMember = isTSNamedTupleMember;
  90476. exports.isTSUnionType = isTSUnionType;
  90477. exports.isTSIntersectionType = isTSIntersectionType;
  90478. exports.isTSConditionalType = isTSConditionalType;
  90479. exports.isTSInferType = isTSInferType;
  90480. exports.isTSParenthesizedType = isTSParenthesizedType;
  90481. exports.isTSTypeOperator = isTSTypeOperator;
  90482. exports.isTSIndexedAccessType = isTSIndexedAccessType;
  90483. exports.isTSMappedType = isTSMappedType;
  90484. exports.isTSLiteralType = isTSLiteralType;
  90485. exports.isTSExpressionWithTypeArguments = isTSExpressionWithTypeArguments;
  90486. exports.isTSInterfaceDeclaration = isTSInterfaceDeclaration;
  90487. exports.isTSInterfaceBody = isTSInterfaceBody;
  90488. exports.isTSTypeAliasDeclaration = isTSTypeAliasDeclaration;
  90489. exports.isTSAsExpression = isTSAsExpression;
  90490. exports.isTSTypeAssertion = isTSTypeAssertion;
  90491. exports.isTSEnumDeclaration = isTSEnumDeclaration;
  90492. exports.isTSEnumMember = isTSEnumMember;
  90493. exports.isTSModuleDeclaration = isTSModuleDeclaration;
  90494. exports.isTSModuleBlock = isTSModuleBlock;
  90495. exports.isTSImportType = isTSImportType;
  90496. exports.isTSImportEqualsDeclaration = isTSImportEqualsDeclaration;
  90497. exports.isTSExternalModuleReference = isTSExternalModuleReference;
  90498. exports.isTSNonNullExpression = isTSNonNullExpression;
  90499. exports.isTSExportAssignment = isTSExportAssignment;
  90500. exports.isTSNamespaceExportDeclaration = isTSNamespaceExportDeclaration;
  90501. exports.isTSTypeAnnotation = isTSTypeAnnotation;
  90502. exports.isTSTypeParameterInstantiation = isTSTypeParameterInstantiation;
  90503. exports.isTSTypeParameterDeclaration = isTSTypeParameterDeclaration;
  90504. exports.isTSTypeParameter = isTSTypeParameter;
  90505. exports.isExpression = isExpression;
  90506. exports.isBinary = isBinary;
  90507. exports.isScopable = isScopable;
  90508. exports.isBlockParent = isBlockParent;
  90509. exports.isBlock = isBlock;
  90510. exports.isStatement = isStatement;
  90511. exports.isTerminatorless = isTerminatorless;
  90512. exports.isCompletionStatement = isCompletionStatement;
  90513. exports.isConditional = isConditional;
  90514. exports.isLoop = isLoop;
  90515. exports.isWhile = isWhile;
  90516. exports.isExpressionWrapper = isExpressionWrapper;
  90517. exports.isFor = isFor;
  90518. exports.isForXStatement = isForXStatement;
  90519. exports.isFunction = isFunction;
  90520. exports.isFunctionParent = isFunctionParent;
  90521. exports.isPureish = isPureish;
  90522. exports.isDeclaration = isDeclaration2;
  90523. exports.isPatternLike = isPatternLike;
  90524. exports.isLVal = isLVal;
  90525. exports.isTSEntityName = isTSEntityName;
  90526. exports.isLiteral = isLiteral;
  90527. exports.isImmutable = isImmutable;
  90528. exports.isUserWhitespacable = isUserWhitespacable;
  90529. exports.isMethod = isMethod;
  90530. exports.isObjectMember = isObjectMember;
  90531. exports.isProperty = isProperty;
  90532. exports.isUnaryLike = isUnaryLike;
  90533. exports.isPattern = isPattern;
  90534. exports.isClass = isClass;
  90535. exports.isModuleDeclaration = isModuleDeclaration;
  90536. exports.isExportDeclaration = isExportDeclaration;
  90537. exports.isModuleSpecifier = isModuleSpecifier;
  90538. exports.isFlow = isFlow;
  90539. exports.isFlowType = isFlowType;
  90540. exports.isFlowBaseAnnotation = isFlowBaseAnnotation;
  90541. exports.isFlowDeclaration = isFlowDeclaration;
  90542. exports.isFlowPredicate = isFlowPredicate;
  90543. exports.isEnumBody = isEnumBody;
  90544. exports.isEnumMember = isEnumMember;
  90545. exports.isJSX = isJSX;
  90546. exports.isPrivate = isPrivate;
  90547. exports.isTSTypeElement = isTSTypeElement;
  90548. exports.isTSType = isTSType;
  90549. exports.isTSBaseType = isTSBaseType;
  90550. exports.isNumberLiteral = isNumberLiteral;
  90551. exports.isRegexLiteral = isRegexLiteral;
  90552. exports.isRestProperty = isRestProperty;
  90553. exports.isSpreadProperty = isSpreadProperty;
  90554. var _shallowEqual = require_shallowEqual4();
  90555. function isArrayExpression(node, opts) {
  90556. if (!node)
  90557. return false;
  90558. const nodeType = node.type;
  90559. if (nodeType === "ArrayExpression") {
  90560. if (typeof opts === "undefined") {
  90561. return true;
  90562. } else {
  90563. return (0, _shallowEqual.default)(node, opts);
  90564. }
  90565. }
  90566. return false;
  90567. }
  90568. function isAssignmentExpression(node, opts) {
  90569. if (!node)
  90570. return false;
  90571. const nodeType = node.type;
  90572. if (nodeType === "AssignmentExpression") {
  90573. if (typeof opts === "undefined") {
  90574. return true;
  90575. } else {
  90576. return (0, _shallowEqual.default)(node, opts);
  90577. }
  90578. }
  90579. return false;
  90580. }
  90581. function isBinaryExpression(node, opts) {
  90582. if (!node)
  90583. return false;
  90584. const nodeType = node.type;
  90585. if (nodeType === "BinaryExpression") {
  90586. if (typeof opts === "undefined") {
  90587. return true;
  90588. } else {
  90589. return (0, _shallowEqual.default)(node, opts);
  90590. }
  90591. }
  90592. return false;
  90593. }
  90594. function isInterpreterDirective(node, opts) {
  90595. if (!node)
  90596. return false;
  90597. const nodeType = node.type;
  90598. if (nodeType === "InterpreterDirective") {
  90599. if (typeof opts === "undefined") {
  90600. return true;
  90601. } else {
  90602. return (0, _shallowEqual.default)(node, opts);
  90603. }
  90604. }
  90605. return false;
  90606. }
  90607. function isDirective(node, opts) {
  90608. if (!node)
  90609. return false;
  90610. const nodeType = node.type;
  90611. if (nodeType === "Directive") {
  90612. if (typeof opts === "undefined") {
  90613. return true;
  90614. } else {
  90615. return (0, _shallowEqual.default)(node, opts);
  90616. }
  90617. }
  90618. return false;
  90619. }
  90620. function isDirectiveLiteral(node, opts) {
  90621. if (!node)
  90622. return false;
  90623. const nodeType = node.type;
  90624. if (nodeType === "DirectiveLiteral") {
  90625. if (typeof opts === "undefined") {
  90626. return true;
  90627. } else {
  90628. return (0, _shallowEqual.default)(node, opts);
  90629. }
  90630. }
  90631. return false;
  90632. }
  90633. function isBlockStatement(node, opts) {
  90634. if (!node)
  90635. return false;
  90636. const nodeType = node.type;
  90637. if (nodeType === "BlockStatement") {
  90638. if (typeof opts === "undefined") {
  90639. return true;
  90640. } else {
  90641. return (0, _shallowEqual.default)(node, opts);
  90642. }
  90643. }
  90644. return false;
  90645. }
  90646. function isBreakStatement(node, opts) {
  90647. if (!node)
  90648. return false;
  90649. const nodeType = node.type;
  90650. if (nodeType === "BreakStatement") {
  90651. if (typeof opts === "undefined") {
  90652. return true;
  90653. } else {
  90654. return (0, _shallowEqual.default)(node, opts);
  90655. }
  90656. }
  90657. return false;
  90658. }
  90659. function isCallExpression(node, opts) {
  90660. if (!node)
  90661. return false;
  90662. const nodeType = node.type;
  90663. if (nodeType === "CallExpression") {
  90664. if (typeof opts === "undefined") {
  90665. return true;
  90666. } else {
  90667. return (0, _shallowEqual.default)(node, opts);
  90668. }
  90669. }
  90670. return false;
  90671. }
  90672. function isCatchClause(node, opts) {
  90673. if (!node)
  90674. return false;
  90675. const nodeType = node.type;
  90676. if (nodeType === "CatchClause") {
  90677. if (typeof opts === "undefined") {
  90678. return true;
  90679. } else {
  90680. return (0, _shallowEqual.default)(node, opts);
  90681. }
  90682. }
  90683. return false;
  90684. }
  90685. function isConditionalExpression(node, opts) {
  90686. if (!node)
  90687. return false;
  90688. const nodeType = node.type;
  90689. if (nodeType === "ConditionalExpression") {
  90690. if (typeof opts === "undefined") {
  90691. return true;
  90692. } else {
  90693. return (0, _shallowEqual.default)(node, opts);
  90694. }
  90695. }
  90696. return false;
  90697. }
  90698. function isContinueStatement(node, opts) {
  90699. if (!node)
  90700. return false;
  90701. const nodeType = node.type;
  90702. if (nodeType === "ContinueStatement") {
  90703. if (typeof opts === "undefined") {
  90704. return true;
  90705. } else {
  90706. return (0, _shallowEqual.default)(node, opts);
  90707. }
  90708. }
  90709. return false;
  90710. }
  90711. function isDebuggerStatement(node, opts) {
  90712. if (!node)
  90713. return false;
  90714. const nodeType = node.type;
  90715. if (nodeType === "DebuggerStatement") {
  90716. if (typeof opts === "undefined") {
  90717. return true;
  90718. } else {
  90719. return (0, _shallowEqual.default)(node, opts);
  90720. }
  90721. }
  90722. return false;
  90723. }
  90724. function isDoWhileStatement(node, opts) {
  90725. if (!node)
  90726. return false;
  90727. const nodeType = node.type;
  90728. if (nodeType === "DoWhileStatement") {
  90729. if (typeof opts === "undefined") {
  90730. return true;
  90731. } else {
  90732. return (0, _shallowEqual.default)(node, opts);
  90733. }
  90734. }
  90735. return false;
  90736. }
  90737. function isEmptyStatement(node, opts) {
  90738. if (!node)
  90739. return false;
  90740. const nodeType = node.type;
  90741. if (nodeType === "EmptyStatement") {
  90742. if (typeof opts === "undefined") {
  90743. return true;
  90744. } else {
  90745. return (0, _shallowEqual.default)(node, opts);
  90746. }
  90747. }
  90748. return false;
  90749. }
  90750. function isExpressionStatement2(node, opts) {
  90751. if (!node)
  90752. return false;
  90753. const nodeType = node.type;
  90754. if (nodeType === "ExpressionStatement") {
  90755. if (typeof opts === "undefined") {
  90756. return true;
  90757. } else {
  90758. return (0, _shallowEqual.default)(node, opts);
  90759. }
  90760. }
  90761. return false;
  90762. }
  90763. function isFile(node, opts) {
  90764. if (!node)
  90765. return false;
  90766. const nodeType = node.type;
  90767. if (nodeType === "File") {
  90768. if (typeof opts === "undefined") {
  90769. return true;
  90770. } else {
  90771. return (0, _shallowEqual.default)(node, opts);
  90772. }
  90773. }
  90774. return false;
  90775. }
  90776. function isForInStatement(node, opts) {
  90777. if (!node)
  90778. return false;
  90779. const nodeType = node.type;
  90780. if (nodeType === "ForInStatement") {
  90781. if (typeof opts === "undefined") {
  90782. return true;
  90783. } else {
  90784. return (0, _shallowEqual.default)(node, opts);
  90785. }
  90786. }
  90787. return false;
  90788. }
  90789. function isForStatement(node, opts) {
  90790. if (!node)
  90791. return false;
  90792. const nodeType = node.type;
  90793. if (nodeType === "ForStatement") {
  90794. if (typeof opts === "undefined") {
  90795. return true;
  90796. } else {
  90797. return (0, _shallowEqual.default)(node, opts);
  90798. }
  90799. }
  90800. return false;
  90801. }
  90802. function isFunctionDeclaration(node, opts) {
  90803. if (!node)
  90804. return false;
  90805. const nodeType = node.type;
  90806. if (nodeType === "FunctionDeclaration") {
  90807. if (typeof opts === "undefined") {
  90808. return true;
  90809. } else {
  90810. return (0, _shallowEqual.default)(node, opts);
  90811. }
  90812. }
  90813. return false;
  90814. }
  90815. function isFunctionExpression(node, opts) {
  90816. if (!node)
  90817. return false;
  90818. const nodeType = node.type;
  90819. if (nodeType === "FunctionExpression") {
  90820. if (typeof opts === "undefined") {
  90821. return true;
  90822. } else {
  90823. return (0, _shallowEqual.default)(node, opts);
  90824. }
  90825. }
  90826. return false;
  90827. }
  90828. function isIdentifier2(node, opts) {
  90829. if (!node)
  90830. return false;
  90831. const nodeType = node.type;
  90832. if (nodeType === "Identifier") {
  90833. if (typeof opts === "undefined") {
  90834. return true;
  90835. } else {
  90836. return (0, _shallowEqual.default)(node, opts);
  90837. }
  90838. }
  90839. return false;
  90840. }
  90841. function isIfStatement(node, opts) {
  90842. if (!node)
  90843. return false;
  90844. const nodeType = node.type;
  90845. if (nodeType === "IfStatement") {
  90846. if (typeof opts === "undefined") {
  90847. return true;
  90848. } else {
  90849. return (0, _shallowEqual.default)(node, opts);
  90850. }
  90851. }
  90852. return false;
  90853. }
  90854. function isLabeledStatement(node, opts) {
  90855. if (!node)
  90856. return false;
  90857. const nodeType = node.type;
  90858. if (nodeType === "LabeledStatement") {
  90859. if (typeof opts === "undefined") {
  90860. return true;
  90861. } else {
  90862. return (0, _shallowEqual.default)(node, opts);
  90863. }
  90864. }
  90865. return false;
  90866. }
  90867. function isStringLiteral2(node, opts) {
  90868. if (!node)
  90869. return false;
  90870. const nodeType = node.type;
  90871. if (nodeType === "StringLiteral") {
  90872. if (typeof opts === "undefined") {
  90873. return true;
  90874. } else {
  90875. return (0, _shallowEqual.default)(node, opts);
  90876. }
  90877. }
  90878. return false;
  90879. }
  90880. function isNumericLiteral(node, opts) {
  90881. if (!node)
  90882. return false;
  90883. const nodeType = node.type;
  90884. if (nodeType === "NumericLiteral") {
  90885. if (typeof opts === "undefined") {
  90886. return true;
  90887. } else {
  90888. return (0, _shallowEqual.default)(node, opts);
  90889. }
  90890. }
  90891. return false;
  90892. }
  90893. function isNullLiteral(node, opts) {
  90894. if (!node)
  90895. return false;
  90896. const nodeType = node.type;
  90897. if (nodeType === "NullLiteral") {
  90898. if (typeof opts === "undefined") {
  90899. return true;
  90900. } else {
  90901. return (0, _shallowEqual.default)(node, opts);
  90902. }
  90903. }
  90904. return false;
  90905. }
  90906. function isBooleanLiteral2(node, opts) {
  90907. if (!node)
  90908. return false;
  90909. const nodeType = node.type;
  90910. if (nodeType === "BooleanLiteral") {
  90911. if (typeof opts === "undefined") {
  90912. return true;
  90913. } else {
  90914. return (0, _shallowEqual.default)(node, opts);
  90915. }
  90916. }
  90917. return false;
  90918. }
  90919. function isRegExpLiteral(node, opts) {
  90920. if (!node)
  90921. return false;
  90922. const nodeType = node.type;
  90923. if (nodeType === "RegExpLiteral") {
  90924. if (typeof opts === "undefined") {
  90925. return true;
  90926. } else {
  90927. return (0, _shallowEqual.default)(node, opts);
  90928. }
  90929. }
  90930. return false;
  90931. }
  90932. function isLogicalExpression(node, opts) {
  90933. if (!node)
  90934. return false;
  90935. const nodeType = node.type;
  90936. if (nodeType === "LogicalExpression") {
  90937. if (typeof opts === "undefined") {
  90938. return true;
  90939. } else {
  90940. return (0, _shallowEqual.default)(node, opts);
  90941. }
  90942. }
  90943. return false;
  90944. }
  90945. function isMemberExpression(node, opts) {
  90946. if (!node)
  90947. return false;
  90948. const nodeType = node.type;
  90949. if (nodeType === "MemberExpression") {
  90950. if (typeof opts === "undefined") {
  90951. return true;
  90952. } else {
  90953. return (0, _shallowEqual.default)(node, opts);
  90954. }
  90955. }
  90956. return false;
  90957. }
  90958. function isNewExpression(node, opts) {
  90959. if (!node)
  90960. return false;
  90961. const nodeType = node.type;
  90962. if (nodeType === "NewExpression") {
  90963. if (typeof opts === "undefined") {
  90964. return true;
  90965. } else {
  90966. return (0, _shallowEqual.default)(node, opts);
  90967. }
  90968. }
  90969. return false;
  90970. }
  90971. function isProgram(node, opts) {
  90972. if (!node)
  90973. return false;
  90974. const nodeType = node.type;
  90975. if (nodeType === "Program") {
  90976. if (typeof opts === "undefined") {
  90977. return true;
  90978. } else {
  90979. return (0, _shallowEqual.default)(node, opts);
  90980. }
  90981. }
  90982. return false;
  90983. }
  90984. function isObjectExpression(node, opts) {
  90985. if (!node)
  90986. return false;
  90987. const nodeType = node.type;
  90988. if (nodeType === "ObjectExpression") {
  90989. if (typeof opts === "undefined") {
  90990. return true;
  90991. } else {
  90992. return (0, _shallowEqual.default)(node, opts);
  90993. }
  90994. }
  90995. return false;
  90996. }
  90997. function isObjectMethod(node, opts) {
  90998. if (!node)
  90999. return false;
  91000. const nodeType = node.type;
  91001. if (nodeType === "ObjectMethod") {
  91002. if (typeof opts === "undefined") {
  91003. return true;
  91004. } else {
  91005. return (0, _shallowEqual.default)(node, opts);
  91006. }
  91007. }
  91008. return false;
  91009. }
  91010. function isObjectProperty(node, opts) {
  91011. if (!node)
  91012. return false;
  91013. const nodeType = node.type;
  91014. if (nodeType === "ObjectProperty") {
  91015. if (typeof opts === "undefined") {
  91016. return true;
  91017. } else {
  91018. return (0, _shallowEqual.default)(node, opts);
  91019. }
  91020. }
  91021. return false;
  91022. }
  91023. function isRestElement(node, opts) {
  91024. if (!node)
  91025. return false;
  91026. const nodeType = node.type;
  91027. if (nodeType === "RestElement") {
  91028. if (typeof opts === "undefined") {
  91029. return true;
  91030. } else {
  91031. return (0, _shallowEqual.default)(node, opts);
  91032. }
  91033. }
  91034. return false;
  91035. }
  91036. function isReturnStatement(node, opts) {
  91037. if (!node)
  91038. return false;
  91039. const nodeType = node.type;
  91040. if (nodeType === "ReturnStatement") {
  91041. if (typeof opts === "undefined") {
  91042. return true;
  91043. } else {
  91044. return (0, _shallowEqual.default)(node, opts);
  91045. }
  91046. }
  91047. return false;
  91048. }
  91049. function isSequenceExpression(node, opts) {
  91050. if (!node)
  91051. return false;
  91052. const nodeType = node.type;
  91053. if (nodeType === "SequenceExpression") {
  91054. if (typeof opts === "undefined") {
  91055. return true;
  91056. } else {
  91057. return (0, _shallowEqual.default)(node, opts);
  91058. }
  91059. }
  91060. return false;
  91061. }
  91062. function isParenthesizedExpression(node, opts) {
  91063. if (!node)
  91064. return false;
  91065. const nodeType = node.type;
  91066. if (nodeType === "ParenthesizedExpression") {
  91067. if (typeof opts === "undefined") {
  91068. return true;
  91069. } else {
  91070. return (0, _shallowEqual.default)(node, opts);
  91071. }
  91072. }
  91073. return false;
  91074. }
  91075. function isSwitchCase(node, opts) {
  91076. if (!node)
  91077. return false;
  91078. const nodeType = node.type;
  91079. if (nodeType === "SwitchCase") {
  91080. if (typeof opts === "undefined") {
  91081. return true;
  91082. } else {
  91083. return (0, _shallowEqual.default)(node, opts);
  91084. }
  91085. }
  91086. return false;
  91087. }
  91088. function isSwitchStatement(node, opts) {
  91089. if (!node)
  91090. return false;
  91091. const nodeType = node.type;
  91092. if (nodeType === "SwitchStatement") {
  91093. if (typeof opts === "undefined") {
  91094. return true;
  91095. } else {
  91096. return (0, _shallowEqual.default)(node, opts);
  91097. }
  91098. }
  91099. return false;
  91100. }
  91101. function isThisExpression(node, opts) {
  91102. if (!node)
  91103. return false;
  91104. const nodeType = node.type;
  91105. if (nodeType === "ThisExpression") {
  91106. if (typeof opts === "undefined") {
  91107. return true;
  91108. } else {
  91109. return (0, _shallowEqual.default)(node, opts);
  91110. }
  91111. }
  91112. return false;
  91113. }
  91114. function isThrowStatement(node, opts) {
  91115. if (!node)
  91116. return false;
  91117. const nodeType = node.type;
  91118. if (nodeType === "ThrowStatement") {
  91119. if (typeof opts === "undefined") {
  91120. return true;
  91121. } else {
  91122. return (0, _shallowEqual.default)(node, opts);
  91123. }
  91124. }
  91125. return false;
  91126. }
  91127. function isTryStatement(node, opts) {
  91128. if (!node)
  91129. return false;
  91130. const nodeType = node.type;
  91131. if (nodeType === "TryStatement") {
  91132. if (typeof opts === "undefined") {
  91133. return true;
  91134. } else {
  91135. return (0, _shallowEqual.default)(node, opts);
  91136. }
  91137. }
  91138. return false;
  91139. }
  91140. function isUnaryExpression(node, opts) {
  91141. if (!node)
  91142. return false;
  91143. const nodeType = node.type;
  91144. if (nodeType === "UnaryExpression") {
  91145. if (typeof opts === "undefined") {
  91146. return true;
  91147. } else {
  91148. return (0, _shallowEqual.default)(node, opts);
  91149. }
  91150. }
  91151. return false;
  91152. }
  91153. function isUpdateExpression(node, opts) {
  91154. if (!node)
  91155. return false;
  91156. const nodeType = node.type;
  91157. if (nodeType === "UpdateExpression") {
  91158. if (typeof opts === "undefined") {
  91159. return true;
  91160. } else {
  91161. return (0, _shallowEqual.default)(node, opts);
  91162. }
  91163. }
  91164. return false;
  91165. }
  91166. function isVariableDeclaration(node, opts) {
  91167. if (!node)
  91168. return false;
  91169. const nodeType = node.type;
  91170. if (nodeType === "VariableDeclaration") {
  91171. if (typeof opts === "undefined") {
  91172. return true;
  91173. } else {
  91174. return (0, _shallowEqual.default)(node, opts);
  91175. }
  91176. }
  91177. return false;
  91178. }
  91179. function isVariableDeclarator(node, opts) {
  91180. if (!node)
  91181. return false;
  91182. const nodeType = node.type;
  91183. if (nodeType === "VariableDeclarator") {
  91184. if (typeof opts === "undefined") {
  91185. return true;
  91186. } else {
  91187. return (0, _shallowEqual.default)(node, opts);
  91188. }
  91189. }
  91190. return false;
  91191. }
  91192. function isWhileStatement(node, opts) {
  91193. if (!node)
  91194. return false;
  91195. const nodeType = node.type;
  91196. if (nodeType === "WhileStatement") {
  91197. if (typeof opts === "undefined") {
  91198. return true;
  91199. } else {
  91200. return (0, _shallowEqual.default)(node, opts);
  91201. }
  91202. }
  91203. return false;
  91204. }
  91205. function isWithStatement(node, opts) {
  91206. if (!node)
  91207. return false;
  91208. const nodeType = node.type;
  91209. if (nodeType === "WithStatement") {
  91210. if (typeof opts === "undefined") {
  91211. return true;
  91212. } else {
  91213. return (0, _shallowEqual.default)(node, opts);
  91214. }
  91215. }
  91216. return false;
  91217. }
  91218. function isAssignmentPattern(node, opts) {
  91219. if (!node)
  91220. return false;
  91221. const nodeType = node.type;
  91222. if (nodeType === "AssignmentPattern") {
  91223. if (typeof opts === "undefined") {
  91224. return true;
  91225. } else {
  91226. return (0, _shallowEqual.default)(node, opts);
  91227. }
  91228. }
  91229. return false;
  91230. }
  91231. function isArrayPattern(node, opts) {
  91232. if (!node)
  91233. return false;
  91234. const nodeType = node.type;
  91235. if (nodeType === "ArrayPattern") {
  91236. if (typeof opts === "undefined") {
  91237. return true;
  91238. } else {
  91239. return (0, _shallowEqual.default)(node, opts);
  91240. }
  91241. }
  91242. return false;
  91243. }
  91244. function isArrowFunctionExpression(node, opts) {
  91245. if (!node)
  91246. return false;
  91247. const nodeType = node.type;
  91248. if (nodeType === "ArrowFunctionExpression") {
  91249. if (typeof opts === "undefined") {
  91250. return true;
  91251. } else {
  91252. return (0, _shallowEqual.default)(node, opts);
  91253. }
  91254. }
  91255. return false;
  91256. }
  91257. function isClassBody(node, opts) {
  91258. if (!node)
  91259. return false;
  91260. const nodeType = node.type;
  91261. if (nodeType === "ClassBody") {
  91262. if (typeof opts === "undefined") {
  91263. return true;
  91264. } else {
  91265. return (0, _shallowEqual.default)(node, opts);
  91266. }
  91267. }
  91268. return false;
  91269. }
  91270. function isClassExpression(node, opts) {
  91271. if (!node)
  91272. return false;
  91273. const nodeType = node.type;
  91274. if (nodeType === "ClassExpression") {
  91275. if (typeof opts === "undefined") {
  91276. return true;
  91277. } else {
  91278. return (0, _shallowEqual.default)(node, opts);
  91279. }
  91280. }
  91281. return false;
  91282. }
  91283. function isClassDeclaration(node, opts) {
  91284. if (!node)
  91285. return false;
  91286. const nodeType = node.type;
  91287. if (nodeType === "ClassDeclaration") {
  91288. if (typeof opts === "undefined") {
  91289. return true;
  91290. } else {
  91291. return (0, _shallowEqual.default)(node, opts);
  91292. }
  91293. }
  91294. return false;
  91295. }
  91296. function isExportAllDeclaration(node, opts) {
  91297. if (!node)
  91298. return false;
  91299. const nodeType = node.type;
  91300. if (nodeType === "ExportAllDeclaration") {
  91301. if (typeof opts === "undefined") {
  91302. return true;
  91303. } else {
  91304. return (0, _shallowEqual.default)(node, opts);
  91305. }
  91306. }
  91307. return false;
  91308. }
  91309. function isExportDefaultDeclaration(node, opts) {
  91310. if (!node)
  91311. return false;
  91312. const nodeType = node.type;
  91313. if (nodeType === "ExportDefaultDeclaration") {
  91314. if (typeof opts === "undefined") {
  91315. return true;
  91316. } else {
  91317. return (0, _shallowEqual.default)(node, opts);
  91318. }
  91319. }
  91320. return false;
  91321. }
  91322. function isExportNamedDeclaration(node, opts) {
  91323. if (!node)
  91324. return false;
  91325. const nodeType = node.type;
  91326. if (nodeType === "ExportNamedDeclaration") {
  91327. if (typeof opts === "undefined") {
  91328. return true;
  91329. } else {
  91330. return (0, _shallowEqual.default)(node, opts);
  91331. }
  91332. }
  91333. return false;
  91334. }
  91335. function isExportSpecifier(node, opts) {
  91336. if (!node)
  91337. return false;
  91338. const nodeType = node.type;
  91339. if (nodeType === "ExportSpecifier") {
  91340. if (typeof opts === "undefined") {
  91341. return true;
  91342. } else {
  91343. return (0, _shallowEqual.default)(node, opts);
  91344. }
  91345. }
  91346. return false;
  91347. }
  91348. function isForOfStatement(node, opts) {
  91349. if (!node)
  91350. return false;
  91351. const nodeType = node.type;
  91352. if (nodeType === "ForOfStatement") {
  91353. if (typeof opts === "undefined") {
  91354. return true;
  91355. } else {
  91356. return (0, _shallowEqual.default)(node, opts);
  91357. }
  91358. }
  91359. return false;
  91360. }
  91361. function isImportDeclaration(node, opts) {
  91362. if (!node)
  91363. return false;
  91364. const nodeType = node.type;
  91365. if (nodeType === "ImportDeclaration") {
  91366. if (typeof opts === "undefined") {
  91367. return true;
  91368. } else {
  91369. return (0, _shallowEqual.default)(node, opts);
  91370. }
  91371. }
  91372. return false;
  91373. }
  91374. function isImportDefaultSpecifier(node, opts) {
  91375. if (!node)
  91376. return false;
  91377. const nodeType = node.type;
  91378. if (nodeType === "ImportDefaultSpecifier") {
  91379. if (typeof opts === "undefined") {
  91380. return true;
  91381. } else {
  91382. return (0, _shallowEqual.default)(node, opts);
  91383. }
  91384. }
  91385. return false;
  91386. }
  91387. function isImportNamespaceSpecifier(node, opts) {
  91388. if (!node)
  91389. return false;
  91390. const nodeType = node.type;
  91391. if (nodeType === "ImportNamespaceSpecifier") {
  91392. if (typeof opts === "undefined") {
  91393. return true;
  91394. } else {
  91395. return (0, _shallowEqual.default)(node, opts);
  91396. }
  91397. }
  91398. return false;
  91399. }
  91400. function isImportSpecifier(node, opts) {
  91401. if (!node)
  91402. return false;
  91403. const nodeType = node.type;
  91404. if (nodeType === "ImportSpecifier") {
  91405. if (typeof opts === "undefined") {
  91406. return true;
  91407. } else {
  91408. return (0, _shallowEqual.default)(node, opts);
  91409. }
  91410. }
  91411. return false;
  91412. }
  91413. function isMetaProperty(node, opts) {
  91414. if (!node)
  91415. return false;
  91416. const nodeType = node.type;
  91417. if (nodeType === "MetaProperty") {
  91418. if (typeof opts === "undefined") {
  91419. return true;
  91420. } else {
  91421. return (0, _shallowEqual.default)(node, opts);
  91422. }
  91423. }
  91424. return false;
  91425. }
  91426. function isClassMethod(node, opts) {
  91427. if (!node)
  91428. return false;
  91429. const nodeType = node.type;
  91430. if (nodeType === "ClassMethod") {
  91431. if (typeof opts === "undefined") {
  91432. return true;
  91433. } else {
  91434. return (0, _shallowEqual.default)(node, opts);
  91435. }
  91436. }
  91437. return false;
  91438. }
  91439. function isObjectPattern(node, opts) {
  91440. if (!node)
  91441. return false;
  91442. const nodeType = node.type;
  91443. if (nodeType === "ObjectPattern") {
  91444. if (typeof opts === "undefined") {
  91445. return true;
  91446. } else {
  91447. return (0, _shallowEqual.default)(node, opts);
  91448. }
  91449. }
  91450. return false;
  91451. }
  91452. function isSpreadElement(node, opts) {
  91453. if (!node)
  91454. return false;
  91455. const nodeType = node.type;
  91456. if (nodeType === "SpreadElement") {
  91457. if (typeof opts === "undefined") {
  91458. return true;
  91459. } else {
  91460. return (0, _shallowEqual.default)(node, opts);
  91461. }
  91462. }
  91463. return false;
  91464. }
  91465. function isSuper(node, opts) {
  91466. if (!node)
  91467. return false;
  91468. const nodeType = node.type;
  91469. if (nodeType === "Super") {
  91470. if (typeof opts === "undefined") {
  91471. return true;
  91472. } else {
  91473. return (0, _shallowEqual.default)(node, opts);
  91474. }
  91475. }
  91476. return false;
  91477. }
  91478. function isTaggedTemplateExpression(node, opts) {
  91479. if (!node)
  91480. return false;
  91481. const nodeType = node.type;
  91482. if (nodeType === "TaggedTemplateExpression") {
  91483. if (typeof opts === "undefined") {
  91484. return true;
  91485. } else {
  91486. return (0, _shallowEqual.default)(node, opts);
  91487. }
  91488. }
  91489. return false;
  91490. }
  91491. function isTemplateElement(node, opts) {
  91492. if (!node)
  91493. return false;
  91494. const nodeType = node.type;
  91495. if (nodeType === "TemplateElement") {
  91496. if (typeof opts === "undefined") {
  91497. return true;
  91498. } else {
  91499. return (0, _shallowEqual.default)(node, opts);
  91500. }
  91501. }
  91502. return false;
  91503. }
  91504. function isTemplateLiteral(node, opts) {
  91505. if (!node)
  91506. return false;
  91507. const nodeType = node.type;
  91508. if (nodeType === "TemplateLiteral") {
  91509. if (typeof opts === "undefined") {
  91510. return true;
  91511. } else {
  91512. return (0, _shallowEqual.default)(node, opts);
  91513. }
  91514. }
  91515. return false;
  91516. }
  91517. function isYieldExpression(node, opts) {
  91518. if (!node)
  91519. return false;
  91520. const nodeType = node.type;
  91521. if (nodeType === "YieldExpression") {
  91522. if (typeof opts === "undefined") {
  91523. return true;
  91524. } else {
  91525. return (0, _shallowEqual.default)(node, opts);
  91526. }
  91527. }
  91528. return false;
  91529. }
  91530. function isAwaitExpression(node, opts) {
  91531. if (!node)
  91532. return false;
  91533. const nodeType = node.type;
  91534. if (nodeType === "AwaitExpression") {
  91535. if (typeof opts === "undefined") {
  91536. return true;
  91537. } else {
  91538. return (0, _shallowEqual.default)(node, opts);
  91539. }
  91540. }
  91541. return false;
  91542. }
  91543. function isImport(node, opts) {
  91544. if (!node)
  91545. return false;
  91546. const nodeType = node.type;
  91547. if (nodeType === "Import") {
  91548. if (typeof opts === "undefined") {
  91549. return true;
  91550. } else {
  91551. return (0, _shallowEqual.default)(node, opts);
  91552. }
  91553. }
  91554. return false;
  91555. }
  91556. function isBigIntLiteral(node, opts) {
  91557. if (!node)
  91558. return false;
  91559. const nodeType = node.type;
  91560. if (nodeType === "BigIntLiteral") {
  91561. if (typeof opts === "undefined") {
  91562. return true;
  91563. } else {
  91564. return (0, _shallowEqual.default)(node, opts);
  91565. }
  91566. }
  91567. return false;
  91568. }
  91569. function isExportNamespaceSpecifier(node, opts) {
  91570. if (!node)
  91571. return false;
  91572. const nodeType = node.type;
  91573. if (nodeType === "ExportNamespaceSpecifier") {
  91574. if (typeof opts === "undefined") {
  91575. return true;
  91576. } else {
  91577. return (0, _shallowEqual.default)(node, opts);
  91578. }
  91579. }
  91580. return false;
  91581. }
  91582. function isOptionalMemberExpression(node, opts) {
  91583. if (!node)
  91584. return false;
  91585. const nodeType = node.type;
  91586. if (nodeType === "OptionalMemberExpression") {
  91587. if (typeof opts === "undefined") {
  91588. return true;
  91589. } else {
  91590. return (0, _shallowEqual.default)(node, opts);
  91591. }
  91592. }
  91593. return false;
  91594. }
  91595. function isOptionalCallExpression(node, opts) {
  91596. if (!node)
  91597. return false;
  91598. const nodeType = node.type;
  91599. if (nodeType === "OptionalCallExpression") {
  91600. if (typeof opts === "undefined") {
  91601. return true;
  91602. } else {
  91603. return (0, _shallowEqual.default)(node, opts);
  91604. }
  91605. }
  91606. return false;
  91607. }
  91608. function isAnyTypeAnnotation(node, opts) {
  91609. if (!node)
  91610. return false;
  91611. const nodeType = node.type;
  91612. if (nodeType === "AnyTypeAnnotation") {
  91613. if (typeof opts === "undefined") {
  91614. return true;
  91615. } else {
  91616. return (0, _shallowEqual.default)(node, opts);
  91617. }
  91618. }
  91619. return false;
  91620. }
  91621. function isArrayTypeAnnotation(node, opts) {
  91622. if (!node)
  91623. return false;
  91624. const nodeType = node.type;
  91625. if (nodeType === "ArrayTypeAnnotation") {
  91626. if (typeof opts === "undefined") {
  91627. return true;
  91628. } else {
  91629. return (0, _shallowEqual.default)(node, opts);
  91630. }
  91631. }
  91632. return false;
  91633. }
  91634. function isBooleanTypeAnnotation(node, opts) {
  91635. if (!node)
  91636. return false;
  91637. const nodeType = node.type;
  91638. if (nodeType === "BooleanTypeAnnotation") {
  91639. if (typeof opts === "undefined") {
  91640. return true;
  91641. } else {
  91642. return (0, _shallowEqual.default)(node, opts);
  91643. }
  91644. }
  91645. return false;
  91646. }
  91647. function isBooleanLiteralTypeAnnotation(node, opts) {
  91648. if (!node)
  91649. return false;
  91650. const nodeType = node.type;
  91651. if (nodeType === "BooleanLiteralTypeAnnotation") {
  91652. if (typeof opts === "undefined") {
  91653. return true;
  91654. } else {
  91655. return (0, _shallowEqual.default)(node, opts);
  91656. }
  91657. }
  91658. return false;
  91659. }
  91660. function isNullLiteralTypeAnnotation(node, opts) {
  91661. if (!node)
  91662. return false;
  91663. const nodeType = node.type;
  91664. if (nodeType === "NullLiteralTypeAnnotation") {
  91665. if (typeof opts === "undefined") {
  91666. return true;
  91667. } else {
  91668. return (0, _shallowEqual.default)(node, opts);
  91669. }
  91670. }
  91671. return false;
  91672. }
  91673. function isClassImplements(node, opts) {
  91674. if (!node)
  91675. return false;
  91676. const nodeType = node.type;
  91677. if (nodeType === "ClassImplements") {
  91678. if (typeof opts === "undefined") {
  91679. return true;
  91680. } else {
  91681. return (0, _shallowEqual.default)(node, opts);
  91682. }
  91683. }
  91684. return false;
  91685. }
  91686. function isDeclareClass(node, opts) {
  91687. if (!node)
  91688. return false;
  91689. const nodeType = node.type;
  91690. if (nodeType === "DeclareClass") {
  91691. if (typeof opts === "undefined") {
  91692. return true;
  91693. } else {
  91694. return (0, _shallowEqual.default)(node, opts);
  91695. }
  91696. }
  91697. return false;
  91698. }
  91699. function isDeclareFunction(node, opts) {
  91700. if (!node)
  91701. return false;
  91702. const nodeType = node.type;
  91703. if (nodeType === "DeclareFunction") {
  91704. if (typeof opts === "undefined") {
  91705. return true;
  91706. } else {
  91707. return (0, _shallowEqual.default)(node, opts);
  91708. }
  91709. }
  91710. return false;
  91711. }
  91712. function isDeclareInterface(node, opts) {
  91713. if (!node)
  91714. return false;
  91715. const nodeType = node.type;
  91716. if (nodeType === "DeclareInterface") {
  91717. if (typeof opts === "undefined") {
  91718. return true;
  91719. } else {
  91720. return (0, _shallowEqual.default)(node, opts);
  91721. }
  91722. }
  91723. return false;
  91724. }
  91725. function isDeclareModule(node, opts) {
  91726. if (!node)
  91727. return false;
  91728. const nodeType = node.type;
  91729. if (nodeType === "DeclareModule") {
  91730. if (typeof opts === "undefined") {
  91731. return true;
  91732. } else {
  91733. return (0, _shallowEqual.default)(node, opts);
  91734. }
  91735. }
  91736. return false;
  91737. }
  91738. function isDeclareModuleExports(node, opts) {
  91739. if (!node)
  91740. return false;
  91741. const nodeType = node.type;
  91742. if (nodeType === "DeclareModuleExports") {
  91743. if (typeof opts === "undefined") {
  91744. return true;
  91745. } else {
  91746. return (0, _shallowEqual.default)(node, opts);
  91747. }
  91748. }
  91749. return false;
  91750. }
  91751. function isDeclareTypeAlias(node, opts) {
  91752. if (!node)
  91753. return false;
  91754. const nodeType = node.type;
  91755. if (nodeType === "DeclareTypeAlias") {
  91756. if (typeof opts === "undefined") {
  91757. return true;
  91758. } else {
  91759. return (0, _shallowEqual.default)(node, opts);
  91760. }
  91761. }
  91762. return false;
  91763. }
  91764. function isDeclareOpaqueType(node, opts) {
  91765. if (!node)
  91766. return false;
  91767. const nodeType = node.type;
  91768. if (nodeType === "DeclareOpaqueType") {
  91769. if (typeof opts === "undefined") {
  91770. return true;
  91771. } else {
  91772. return (0, _shallowEqual.default)(node, opts);
  91773. }
  91774. }
  91775. return false;
  91776. }
  91777. function isDeclareVariable(node, opts) {
  91778. if (!node)
  91779. return false;
  91780. const nodeType = node.type;
  91781. if (nodeType === "DeclareVariable") {
  91782. if (typeof opts === "undefined") {
  91783. return true;
  91784. } else {
  91785. return (0, _shallowEqual.default)(node, opts);
  91786. }
  91787. }
  91788. return false;
  91789. }
  91790. function isDeclareExportDeclaration(node, opts) {
  91791. if (!node)
  91792. return false;
  91793. const nodeType = node.type;
  91794. if (nodeType === "DeclareExportDeclaration") {
  91795. if (typeof opts === "undefined") {
  91796. return true;
  91797. } else {
  91798. return (0, _shallowEqual.default)(node, opts);
  91799. }
  91800. }
  91801. return false;
  91802. }
  91803. function isDeclareExportAllDeclaration(node, opts) {
  91804. if (!node)
  91805. return false;
  91806. const nodeType = node.type;
  91807. if (nodeType === "DeclareExportAllDeclaration") {
  91808. if (typeof opts === "undefined") {
  91809. return true;
  91810. } else {
  91811. return (0, _shallowEqual.default)(node, opts);
  91812. }
  91813. }
  91814. return false;
  91815. }
  91816. function isDeclaredPredicate(node, opts) {
  91817. if (!node)
  91818. return false;
  91819. const nodeType = node.type;
  91820. if (nodeType === "DeclaredPredicate") {
  91821. if (typeof opts === "undefined") {
  91822. return true;
  91823. } else {
  91824. return (0, _shallowEqual.default)(node, opts);
  91825. }
  91826. }
  91827. return false;
  91828. }
  91829. function isExistsTypeAnnotation(node, opts) {
  91830. if (!node)
  91831. return false;
  91832. const nodeType = node.type;
  91833. if (nodeType === "ExistsTypeAnnotation") {
  91834. if (typeof opts === "undefined") {
  91835. return true;
  91836. } else {
  91837. return (0, _shallowEqual.default)(node, opts);
  91838. }
  91839. }
  91840. return false;
  91841. }
  91842. function isFunctionTypeAnnotation(node, opts) {
  91843. if (!node)
  91844. return false;
  91845. const nodeType = node.type;
  91846. if (nodeType === "FunctionTypeAnnotation") {
  91847. if (typeof opts === "undefined") {
  91848. return true;
  91849. } else {
  91850. return (0, _shallowEqual.default)(node, opts);
  91851. }
  91852. }
  91853. return false;
  91854. }
  91855. function isFunctionTypeParam(node, opts) {
  91856. if (!node)
  91857. return false;
  91858. const nodeType = node.type;
  91859. if (nodeType === "FunctionTypeParam") {
  91860. if (typeof opts === "undefined") {
  91861. return true;
  91862. } else {
  91863. return (0, _shallowEqual.default)(node, opts);
  91864. }
  91865. }
  91866. return false;
  91867. }
  91868. function isGenericTypeAnnotation(node, opts) {
  91869. if (!node)
  91870. return false;
  91871. const nodeType = node.type;
  91872. if (nodeType === "GenericTypeAnnotation") {
  91873. if (typeof opts === "undefined") {
  91874. return true;
  91875. } else {
  91876. return (0, _shallowEqual.default)(node, opts);
  91877. }
  91878. }
  91879. return false;
  91880. }
  91881. function isInferredPredicate(node, opts) {
  91882. if (!node)
  91883. return false;
  91884. const nodeType = node.type;
  91885. if (nodeType === "InferredPredicate") {
  91886. if (typeof opts === "undefined") {
  91887. return true;
  91888. } else {
  91889. return (0, _shallowEqual.default)(node, opts);
  91890. }
  91891. }
  91892. return false;
  91893. }
  91894. function isInterfaceExtends(node, opts) {
  91895. if (!node)
  91896. return false;
  91897. const nodeType = node.type;
  91898. if (nodeType === "InterfaceExtends") {
  91899. if (typeof opts === "undefined") {
  91900. return true;
  91901. } else {
  91902. return (0, _shallowEqual.default)(node, opts);
  91903. }
  91904. }
  91905. return false;
  91906. }
  91907. function isInterfaceDeclaration(node, opts) {
  91908. if (!node)
  91909. return false;
  91910. const nodeType = node.type;
  91911. if (nodeType === "InterfaceDeclaration") {
  91912. if (typeof opts === "undefined") {
  91913. return true;
  91914. } else {
  91915. return (0, _shallowEqual.default)(node, opts);
  91916. }
  91917. }
  91918. return false;
  91919. }
  91920. function isInterfaceTypeAnnotation(node, opts) {
  91921. if (!node)
  91922. return false;
  91923. const nodeType = node.type;
  91924. if (nodeType === "InterfaceTypeAnnotation") {
  91925. if (typeof opts === "undefined") {
  91926. return true;
  91927. } else {
  91928. return (0, _shallowEqual.default)(node, opts);
  91929. }
  91930. }
  91931. return false;
  91932. }
  91933. function isIntersectionTypeAnnotation(node, opts) {
  91934. if (!node)
  91935. return false;
  91936. const nodeType = node.type;
  91937. if (nodeType === "IntersectionTypeAnnotation") {
  91938. if (typeof opts === "undefined") {
  91939. return true;
  91940. } else {
  91941. return (0, _shallowEqual.default)(node, opts);
  91942. }
  91943. }
  91944. return false;
  91945. }
  91946. function isMixedTypeAnnotation(node, opts) {
  91947. if (!node)
  91948. return false;
  91949. const nodeType = node.type;
  91950. if (nodeType === "MixedTypeAnnotation") {
  91951. if (typeof opts === "undefined") {
  91952. return true;
  91953. } else {
  91954. return (0, _shallowEqual.default)(node, opts);
  91955. }
  91956. }
  91957. return false;
  91958. }
  91959. function isEmptyTypeAnnotation(node, opts) {
  91960. if (!node)
  91961. return false;
  91962. const nodeType = node.type;
  91963. if (nodeType === "EmptyTypeAnnotation") {
  91964. if (typeof opts === "undefined") {
  91965. return true;
  91966. } else {
  91967. return (0, _shallowEqual.default)(node, opts);
  91968. }
  91969. }
  91970. return false;
  91971. }
  91972. function isNullableTypeAnnotation(node, opts) {
  91973. if (!node)
  91974. return false;
  91975. const nodeType = node.type;
  91976. if (nodeType === "NullableTypeAnnotation") {
  91977. if (typeof opts === "undefined") {
  91978. return true;
  91979. } else {
  91980. return (0, _shallowEqual.default)(node, opts);
  91981. }
  91982. }
  91983. return false;
  91984. }
  91985. function isNumberLiteralTypeAnnotation(node, opts) {
  91986. if (!node)
  91987. return false;
  91988. const nodeType = node.type;
  91989. if (nodeType === "NumberLiteralTypeAnnotation") {
  91990. if (typeof opts === "undefined") {
  91991. return true;
  91992. } else {
  91993. return (0, _shallowEqual.default)(node, opts);
  91994. }
  91995. }
  91996. return false;
  91997. }
  91998. function isNumberTypeAnnotation(node, opts) {
  91999. if (!node)
  92000. return false;
  92001. const nodeType = node.type;
  92002. if (nodeType === "NumberTypeAnnotation") {
  92003. if (typeof opts === "undefined") {
  92004. return true;
  92005. } else {
  92006. return (0, _shallowEqual.default)(node, opts);
  92007. }
  92008. }
  92009. return false;
  92010. }
  92011. function isObjectTypeAnnotation(node, opts) {
  92012. if (!node)
  92013. return false;
  92014. const nodeType = node.type;
  92015. if (nodeType === "ObjectTypeAnnotation") {
  92016. if (typeof opts === "undefined") {
  92017. return true;
  92018. } else {
  92019. return (0, _shallowEqual.default)(node, opts);
  92020. }
  92021. }
  92022. return false;
  92023. }
  92024. function isObjectTypeInternalSlot(node, opts) {
  92025. if (!node)
  92026. return false;
  92027. const nodeType = node.type;
  92028. if (nodeType === "ObjectTypeInternalSlot") {
  92029. if (typeof opts === "undefined") {
  92030. return true;
  92031. } else {
  92032. return (0, _shallowEqual.default)(node, opts);
  92033. }
  92034. }
  92035. return false;
  92036. }
  92037. function isObjectTypeCallProperty(node, opts) {
  92038. if (!node)
  92039. return false;
  92040. const nodeType = node.type;
  92041. if (nodeType === "ObjectTypeCallProperty") {
  92042. if (typeof opts === "undefined") {
  92043. return true;
  92044. } else {
  92045. return (0, _shallowEqual.default)(node, opts);
  92046. }
  92047. }
  92048. return false;
  92049. }
  92050. function isObjectTypeIndexer(node, opts) {
  92051. if (!node)
  92052. return false;
  92053. const nodeType = node.type;
  92054. if (nodeType === "ObjectTypeIndexer") {
  92055. if (typeof opts === "undefined") {
  92056. return true;
  92057. } else {
  92058. return (0, _shallowEqual.default)(node, opts);
  92059. }
  92060. }
  92061. return false;
  92062. }
  92063. function isObjectTypeProperty(node, opts) {
  92064. if (!node)
  92065. return false;
  92066. const nodeType = node.type;
  92067. if (nodeType === "ObjectTypeProperty") {
  92068. if (typeof opts === "undefined") {
  92069. return true;
  92070. } else {
  92071. return (0, _shallowEqual.default)(node, opts);
  92072. }
  92073. }
  92074. return false;
  92075. }
  92076. function isObjectTypeSpreadProperty(node, opts) {
  92077. if (!node)
  92078. return false;
  92079. const nodeType = node.type;
  92080. if (nodeType === "ObjectTypeSpreadProperty") {
  92081. if (typeof opts === "undefined") {
  92082. return true;
  92083. } else {
  92084. return (0, _shallowEqual.default)(node, opts);
  92085. }
  92086. }
  92087. return false;
  92088. }
  92089. function isOpaqueType(node, opts) {
  92090. if (!node)
  92091. return false;
  92092. const nodeType = node.type;
  92093. if (nodeType === "OpaqueType") {
  92094. if (typeof opts === "undefined") {
  92095. return true;
  92096. } else {
  92097. return (0, _shallowEqual.default)(node, opts);
  92098. }
  92099. }
  92100. return false;
  92101. }
  92102. function isQualifiedTypeIdentifier(node, opts) {
  92103. if (!node)
  92104. return false;
  92105. const nodeType = node.type;
  92106. if (nodeType === "QualifiedTypeIdentifier") {
  92107. if (typeof opts === "undefined") {
  92108. return true;
  92109. } else {
  92110. return (0, _shallowEqual.default)(node, opts);
  92111. }
  92112. }
  92113. return false;
  92114. }
  92115. function isStringLiteralTypeAnnotation(node, opts) {
  92116. if (!node)
  92117. return false;
  92118. const nodeType = node.type;
  92119. if (nodeType === "StringLiteralTypeAnnotation") {
  92120. if (typeof opts === "undefined") {
  92121. return true;
  92122. } else {
  92123. return (0, _shallowEqual.default)(node, opts);
  92124. }
  92125. }
  92126. return false;
  92127. }
  92128. function isStringTypeAnnotation(node, opts) {
  92129. if (!node)
  92130. return false;
  92131. const nodeType = node.type;
  92132. if (nodeType === "StringTypeAnnotation") {
  92133. if (typeof opts === "undefined") {
  92134. return true;
  92135. } else {
  92136. return (0, _shallowEqual.default)(node, opts);
  92137. }
  92138. }
  92139. return false;
  92140. }
  92141. function isSymbolTypeAnnotation(node, opts) {
  92142. if (!node)
  92143. return false;
  92144. const nodeType = node.type;
  92145. if (nodeType === "SymbolTypeAnnotation") {
  92146. if (typeof opts === "undefined") {
  92147. return true;
  92148. } else {
  92149. return (0, _shallowEqual.default)(node, opts);
  92150. }
  92151. }
  92152. return false;
  92153. }
  92154. function isThisTypeAnnotation(node, opts) {
  92155. if (!node)
  92156. return false;
  92157. const nodeType = node.type;
  92158. if (nodeType === "ThisTypeAnnotation") {
  92159. if (typeof opts === "undefined") {
  92160. return true;
  92161. } else {
  92162. return (0, _shallowEqual.default)(node, opts);
  92163. }
  92164. }
  92165. return false;
  92166. }
  92167. function isTupleTypeAnnotation(node, opts) {
  92168. if (!node)
  92169. return false;
  92170. const nodeType = node.type;
  92171. if (nodeType === "TupleTypeAnnotation") {
  92172. if (typeof opts === "undefined") {
  92173. return true;
  92174. } else {
  92175. return (0, _shallowEqual.default)(node, opts);
  92176. }
  92177. }
  92178. return false;
  92179. }
  92180. function isTypeofTypeAnnotation(node, opts) {
  92181. if (!node)
  92182. return false;
  92183. const nodeType = node.type;
  92184. if (nodeType === "TypeofTypeAnnotation") {
  92185. if (typeof opts === "undefined") {
  92186. return true;
  92187. } else {
  92188. return (0, _shallowEqual.default)(node, opts);
  92189. }
  92190. }
  92191. return false;
  92192. }
  92193. function isTypeAlias(node, opts) {
  92194. if (!node)
  92195. return false;
  92196. const nodeType = node.type;
  92197. if (nodeType === "TypeAlias") {
  92198. if (typeof opts === "undefined") {
  92199. return true;
  92200. } else {
  92201. return (0, _shallowEqual.default)(node, opts);
  92202. }
  92203. }
  92204. return false;
  92205. }
  92206. function isTypeAnnotation(node, opts) {
  92207. if (!node)
  92208. return false;
  92209. const nodeType = node.type;
  92210. if (nodeType === "TypeAnnotation") {
  92211. if (typeof opts === "undefined") {
  92212. return true;
  92213. } else {
  92214. return (0, _shallowEqual.default)(node, opts);
  92215. }
  92216. }
  92217. return false;
  92218. }
  92219. function isTypeCastExpression(node, opts) {
  92220. if (!node)
  92221. return false;
  92222. const nodeType = node.type;
  92223. if (nodeType === "TypeCastExpression") {
  92224. if (typeof opts === "undefined") {
  92225. return true;
  92226. } else {
  92227. return (0, _shallowEqual.default)(node, opts);
  92228. }
  92229. }
  92230. return false;
  92231. }
  92232. function isTypeParameter(node, opts) {
  92233. if (!node)
  92234. return false;
  92235. const nodeType = node.type;
  92236. if (nodeType === "TypeParameter") {
  92237. if (typeof opts === "undefined") {
  92238. return true;
  92239. } else {
  92240. return (0, _shallowEqual.default)(node, opts);
  92241. }
  92242. }
  92243. return false;
  92244. }
  92245. function isTypeParameterDeclaration(node, opts) {
  92246. if (!node)
  92247. return false;
  92248. const nodeType = node.type;
  92249. if (nodeType === "TypeParameterDeclaration") {
  92250. if (typeof opts === "undefined") {
  92251. return true;
  92252. } else {
  92253. return (0, _shallowEqual.default)(node, opts);
  92254. }
  92255. }
  92256. return false;
  92257. }
  92258. function isTypeParameterInstantiation(node, opts) {
  92259. if (!node)
  92260. return false;
  92261. const nodeType = node.type;
  92262. if (nodeType === "TypeParameterInstantiation") {
  92263. if (typeof opts === "undefined") {
  92264. return true;
  92265. } else {
  92266. return (0, _shallowEqual.default)(node, opts);
  92267. }
  92268. }
  92269. return false;
  92270. }
  92271. function isUnionTypeAnnotation(node, opts) {
  92272. if (!node)
  92273. return false;
  92274. const nodeType = node.type;
  92275. if (nodeType === "UnionTypeAnnotation") {
  92276. if (typeof opts === "undefined") {
  92277. return true;
  92278. } else {
  92279. return (0, _shallowEqual.default)(node, opts);
  92280. }
  92281. }
  92282. return false;
  92283. }
  92284. function isVariance(node, opts) {
  92285. if (!node)
  92286. return false;
  92287. const nodeType = node.type;
  92288. if (nodeType === "Variance") {
  92289. if (typeof opts === "undefined") {
  92290. return true;
  92291. } else {
  92292. return (0, _shallowEqual.default)(node, opts);
  92293. }
  92294. }
  92295. return false;
  92296. }
  92297. function isVoidTypeAnnotation(node, opts) {
  92298. if (!node)
  92299. return false;
  92300. const nodeType = node.type;
  92301. if (nodeType === "VoidTypeAnnotation") {
  92302. if (typeof opts === "undefined") {
  92303. return true;
  92304. } else {
  92305. return (0, _shallowEqual.default)(node, opts);
  92306. }
  92307. }
  92308. return false;
  92309. }
  92310. function isEnumDeclaration(node, opts) {
  92311. if (!node)
  92312. return false;
  92313. const nodeType = node.type;
  92314. if (nodeType === "EnumDeclaration") {
  92315. if (typeof opts === "undefined") {
  92316. return true;
  92317. } else {
  92318. return (0, _shallowEqual.default)(node, opts);
  92319. }
  92320. }
  92321. return false;
  92322. }
  92323. function isEnumBooleanBody(node, opts) {
  92324. if (!node)
  92325. return false;
  92326. const nodeType = node.type;
  92327. if (nodeType === "EnumBooleanBody") {
  92328. if (typeof opts === "undefined") {
  92329. return true;
  92330. } else {
  92331. return (0, _shallowEqual.default)(node, opts);
  92332. }
  92333. }
  92334. return false;
  92335. }
  92336. function isEnumNumberBody(node, opts) {
  92337. if (!node)
  92338. return false;
  92339. const nodeType = node.type;
  92340. if (nodeType === "EnumNumberBody") {
  92341. if (typeof opts === "undefined") {
  92342. return true;
  92343. } else {
  92344. return (0, _shallowEqual.default)(node, opts);
  92345. }
  92346. }
  92347. return false;
  92348. }
  92349. function isEnumStringBody(node, opts) {
  92350. if (!node)
  92351. return false;
  92352. const nodeType = node.type;
  92353. if (nodeType === "EnumStringBody") {
  92354. if (typeof opts === "undefined") {
  92355. return true;
  92356. } else {
  92357. return (0, _shallowEqual.default)(node, opts);
  92358. }
  92359. }
  92360. return false;
  92361. }
  92362. function isEnumSymbolBody(node, opts) {
  92363. if (!node)
  92364. return false;
  92365. const nodeType = node.type;
  92366. if (nodeType === "EnumSymbolBody") {
  92367. if (typeof opts === "undefined") {
  92368. return true;
  92369. } else {
  92370. return (0, _shallowEqual.default)(node, opts);
  92371. }
  92372. }
  92373. return false;
  92374. }
  92375. function isEnumBooleanMember(node, opts) {
  92376. if (!node)
  92377. return false;
  92378. const nodeType = node.type;
  92379. if (nodeType === "EnumBooleanMember") {
  92380. if (typeof opts === "undefined") {
  92381. return true;
  92382. } else {
  92383. return (0, _shallowEqual.default)(node, opts);
  92384. }
  92385. }
  92386. return false;
  92387. }
  92388. function isEnumNumberMember(node, opts) {
  92389. if (!node)
  92390. return false;
  92391. const nodeType = node.type;
  92392. if (nodeType === "EnumNumberMember") {
  92393. if (typeof opts === "undefined") {
  92394. return true;
  92395. } else {
  92396. return (0, _shallowEqual.default)(node, opts);
  92397. }
  92398. }
  92399. return false;
  92400. }
  92401. function isEnumStringMember(node, opts) {
  92402. if (!node)
  92403. return false;
  92404. const nodeType = node.type;
  92405. if (nodeType === "EnumStringMember") {
  92406. if (typeof opts === "undefined") {
  92407. return true;
  92408. } else {
  92409. return (0, _shallowEqual.default)(node, opts);
  92410. }
  92411. }
  92412. return false;
  92413. }
  92414. function isEnumDefaultedMember(node, opts) {
  92415. if (!node)
  92416. return false;
  92417. const nodeType = node.type;
  92418. if (nodeType === "EnumDefaultedMember") {
  92419. if (typeof opts === "undefined") {
  92420. return true;
  92421. } else {
  92422. return (0, _shallowEqual.default)(node, opts);
  92423. }
  92424. }
  92425. return false;
  92426. }
  92427. function isIndexedAccessType(node, opts) {
  92428. if (!node)
  92429. return false;
  92430. const nodeType = node.type;
  92431. if (nodeType === "IndexedAccessType") {
  92432. if (typeof opts === "undefined") {
  92433. return true;
  92434. } else {
  92435. return (0, _shallowEqual.default)(node, opts);
  92436. }
  92437. }
  92438. return false;
  92439. }
  92440. function isOptionalIndexedAccessType(node, opts) {
  92441. if (!node)
  92442. return false;
  92443. const nodeType = node.type;
  92444. if (nodeType === "OptionalIndexedAccessType") {
  92445. if (typeof opts === "undefined") {
  92446. return true;
  92447. } else {
  92448. return (0, _shallowEqual.default)(node, opts);
  92449. }
  92450. }
  92451. return false;
  92452. }
  92453. function isJSXAttribute(node, opts) {
  92454. if (!node)
  92455. return false;
  92456. const nodeType = node.type;
  92457. if (nodeType === "JSXAttribute") {
  92458. if (typeof opts === "undefined") {
  92459. return true;
  92460. } else {
  92461. return (0, _shallowEqual.default)(node, opts);
  92462. }
  92463. }
  92464. return false;
  92465. }
  92466. function isJSXClosingElement(node, opts) {
  92467. if (!node)
  92468. return false;
  92469. const nodeType = node.type;
  92470. if (nodeType === "JSXClosingElement") {
  92471. if (typeof opts === "undefined") {
  92472. return true;
  92473. } else {
  92474. return (0, _shallowEqual.default)(node, opts);
  92475. }
  92476. }
  92477. return false;
  92478. }
  92479. function isJSXElement2(node, opts) {
  92480. if (!node)
  92481. return false;
  92482. const nodeType = node.type;
  92483. if (nodeType === "JSXElement") {
  92484. if (typeof opts === "undefined") {
  92485. return true;
  92486. } else {
  92487. return (0, _shallowEqual.default)(node, opts);
  92488. }
  92489. }
  92490. return false;
  92491. }
  92492. function isJSXEmptyExpression(node, opts) {
  92493. if (!node)
  92494. return false;
  92495. const nodeType = node.type;
  92496. if (nodeType === "JSXEmptyExpression") {
  92497. if (typeof opts === "undefined") {
  92498. return true;
  92499. } else {
  92500. return (0, _shallowEqual.default)(node, opts);
  92501. }
  92502. }
  92503. return false;
  92504. }
  92505. function isJSXExpressionContainer2(node, opts) {
  92506. if (!node)
  92507. return false;
  92508. const nodeType = node.type;
  92509. if (nodeType === "JSXExpressionContainer") {
  92510. if (typeof opts === "undefined") {
  92511. return true;
  92512. } else {
  92513. return (0, _shallowEqual.default)(node, opts);
  92514. }
  92515. }
  92516. return false;
  92517. }
  92518. function isJSXSpreadChild(node, opts) {
  92519. if (!node)
  92520. return false;
  92521. const nodeType = node.type;
  92522. if (nodeType === "JSXSpreadChild") {
  92523. if (typeof opts === "undefined") {
  92524. return true;
  92525. } else {
  92526. return (0, _shallowEqual.default)(node, opts);
  92527. }
  92528. }
  92529. return false;
  92530. }
  92531. function isJSXIdentifier2(node, opts) {
  92532. if (!node)
  92533. return false;
  92534. const nodeType = node.type;
  92535. if (nodeType === "JSXIdentifier") {
  92536. if (typeof opts === "undefined") {
  92537. return true;
  92538. } else {
  92539. return (0, _shallowEqual.default)(node, opts);
  92540. }
  92541. }
  92542. return false;
  92543. }
  92544. function isJSXMemberExpression(node, opts) {
  92545. if (!node)
  92546. return false;
  92547. const nodeType = node.type;
  92548. if (nodeType === "JSXMemberExpression") {
  92549. if (typeof opts === "undefined") {
  92550. return true;
  92551. } else {
  92552. return (0, _shallowEqual.default)(node, opts);
  92553. }
  92554. }
  92555. return false;
  92556. }
  92557. function isJSXNamespacedName(node, opts) {
  92558. if (!node)
  92559. return false;
  92560. const nodeType = node.type;
  92561. if (nodeType === "JSXNamespacedName") {
  92562. if (typeof opts === "undefined") {
  92563. return true;
  92564. } else {
  92565. return (0, _shallowEqual.default)(node, opts);
  92566. }
  92567. }
  92568. return false;
  92569. }
  92570. function isJSXOpeningElement(node, opts) {
  92571. if (!node)
  92572. return false;
  92573. const nodeType = node.type;
  92574. if (nodeType === "JSXOpeningElement") {
  92575. if (typeof opts === "undefined") {
  92576. return true;
  92577. } else {
  92578. return (0, _shallowEqual.default)(node, opts);
  92579. }
  92580. }
  92581. return false;
  92582. }
  92583. function isJSXSpreadAttribute(node, opts) {
  92584. if (!node)
  92585. return false;
  92586. const nodeType = node.type;
  92587. if (nodeType === "JSXSpreadAttribute") {
  92588. if (typeof opts === "undefined") {
  92589. return true;
  92590. } else {
  92591. return (0, _shallowEqual.default)(node, opts);
  92592. }
  92593. }
  92594. return false;
  92595. }
  92596. function isJSXText(node, opts) {
  92597. if (!node)
  92598. return false;
  92599. const nodeType = node.type;
  92600. if (nodeType === "JSXText") {
  92601. if (typeof opts === "undefined") {
  92602. return true;
  92603. } else {
  92604. return (0, _shallowEqual.default)(node, opts);
  92605. }
  92606. }
  92607. return false;
  92608. }
  92609. function isJSXFragment2(node, opts) {
  92610. if (!node)
  92611. return false;
  92612. const nodeType = node.type;
  92613. if (nodeType === "JSXFragment") {
  92614. if (typeof opts === "undefined") {
  92615. return true;
  92616. } else {
  92617. return (0, _shallowEqual.default)(node, opts);
  92618. }
  92619. }
  92620. return false;
  92621. }
  92622. function isJSXOpeningFragment(node, opts) {
  92623. if (!node)
  92624. return false;
  92625. const nodeType = node.type;
  92626. if (nodeType === "JSXOpeningFragment") {
  92627. if (typeof opts === "undefined") {
  92628. return true;
  92629. } else {
  92630. return (0, _shallowEqual.default)(node, opts);
  92631. }
  92632. }
  92633. return false;
  92634. }
  92635. function isJSXClosingFragment(node, opts) {
  92636. if (!node)
  92637. return false;
  92638. const nodeType = node.type;
  92639. if (nodeType === "JSXClosingFragment") {
  92640. if (typeof opts === "undefined") {
  92641. return true;
  92642. } else {
  92643. return (0, _shallowEqual.default)(node, opts);
  92644. }
  92645. }
  92646. return false;
  92647. }
  92648. function isNoop(node, opts) {
  92649. if (!node)
  92650. return false;
  92651. const nodeType = node.type;
  92652. if (nodeType === "Noop") {
  92653. if (typeof opts === "undefined") {
  92654. return true;
  92655. } else {
  92656. return (0, _shallowEqual.default)(node, opts);
  92657. }
  92658. }
  92659. return false;
  92660. }
  92661. function isPlaceholder(node, opts) {
  92662. if (!node)
  92663. return false;
  92664. const nodeType = node.type;
  92665. if (nodeType === "Placeholder") {
  92666. if (typeof opts === "undefined") {
  92667. return true;
  92668. } else {
  92669. return (0, _shallowEqual.default)(node, opts);
  92670. }
  92671. }
  92672. return false;
  92673. }
  92674. function isV8IntrinsicIdentifier(node, opts) {
  92675. if (!node)
  92676. return false;
  92677. const nodeType = node.type;
  92678. if (nodeType === "V8IntrinsicIdentifier") {
  92679. if (typeof opts === "undefined") {
  92680. return true;
  92681. } else {
  92682. return (0, _shallowEqual.default)(node, opts);
  92683. }
  92684. }
  92685. return false;
  92686. }
  92687. function isArgumentPlaceholder(node, opts) {
  92688. if (!node)
  92689. return false;
  92690. const nodeType = node.type;
  92691. if (nodeType === "ArgumentPlaceholder") {
  92692. if (typeof opts === "undefined") {
  92693. return true;
  92694. } else {
  92695. return (0, _shallowEqual.default)(node, opts);
  92696. }
  92697. }
  92698. return false;
  92699. }
  92700. function isBindExpression(node, opts) {
  92701. if (!node)
  92702. return false;
  92703. const nodeType = node.type;
  92704. if (nodeType === "BindExpression") {
  92705. if (typeof opts === "undefined") {
  92706. return true;
  92707. } else {
  92708. return (0, _shallowEqual.default)(node, opts);
  92709. }
  92710. }
  92711. return false;
  92712. }
  92713. function isClassProperty(node, opts) {
  92714. if (!node)
  92715. return false;
  92716. const nodeType = node.type;
  92717. if (nodeType === "ClassProperty") {
  92718. if (typeof opts === "undefined") {
  92719. return true;
  92720. } else {
  92721. return (0, _shallowEqual.default)(node, opts);
  92722. }
  92723. }
  92724. return false;
  92725. }
  92726. function isPipelineTopicExpression(node, opts) {
  92727. if (!node)
  92728. return false;
  92729. const nodeType = node.type;
  92730. if (nodeType === "PipelineTopicExpression") {
  92731. if (typeof opts === "undefined") {
  92732. return true;
  92733. } else {
  92734. return (0, _shallowEqual.default)(node, opts);
  92735. }
  92736. }
  92737. return false;
  92738. }
  92739. function isPipelineBareFunction(node, opts) {
  92740. if (!node)
  92741. return false;
  92742. const nodeType = node.type;
  92743. if (nodeType === "PipelineBareFunction") {
  92744. if (typeof opts === "undefined") {
  92745. return true;
  92746. } else {
  92747. return (0, _shallowEqual.default)(node, opts);
  92748. }
  92749. }
  92750. return false;
  92751. }
  92752. function isPipelinePrimaryTopicReference(node, opts) {
  92753. if (!node)
  92754. return false;
  92755. const nodeType = node.type;
  92756. if (nodeType === "PipelinePrimaryTopicReference") {
  92757. if (typeof opts === "undefined") {
  92758. return true;
  92759. } else {
  92760. return (0, _shallowEqual.default)(node, opts);
  92761. }
  92762. }
  92763. return false;
  92764. }
  92765. function isClassPrivateProperty(node, opts) {
  92766. if (!node)
  92767. return false;
  92768. const nodeType = node.type;
  92769. if (nodeType === "ClassPrivateProperty") {
  92770. if (typeof opts === "undefined") {
  92771. return true;
  92772. } else {
  92773. return (0, _shallowEqual.default)(node, opts);
  92774. }
  92775. }
  92776. return false;
  92777. }
  92778. function isClassPrivateMethod(node, opts) {
  92779. if (!node)
  92780. return false;
  92781. const nodeType = node.type;
  92782. if (nodeType === "ClassPrivateMethod") {
  92783. if (typeof opts === "undefined") {
  92784. return true;
  92785. } else {
  92786. return (0, _shallowEqual.default)(node, opts);
  92787. }
  92788. }
  92789. return false;
  92790. }
  92791. function isImportAttribute(node, opts) {
  92792. if (!node)
  92793. return false;
  92794. const nodeType = node.type;
  92795. if (nodeType === "ImportAttribute") {
  92796. if (typeof opts === "undefined") {
  92797. return true;
  92798. } else {
  92799. return (0, _shallowEqual.default)(node, opts);
  92800. }
  92801. }
  92802. return false;
  92803. }
  92804. function isDecorator(node, opts) {
  92805. if (!node)
  92806. return false;
  92807. const nodeType = node.type;
  92808. if (nodeType === "Decorator") {
  92809. if (typeof opts === "undefined") {
  92810. return true;
  92811. } else {
  92812. return (0, _shallowEqual.default)(node, opts);
  92813. }
  92814. }
  92815. return false;
  92816. }
  92817. function isDoExpression(node, opts) {
  92818. if (!node)
  92819. return false;
  92820. const nodeType = node.type;
  92821. if (nodeType === "DoExpression") {
  92822. if (typeof opts === "undefined") {
  92823. return true;
  92824. } else {
  92825. return (0, _shallowEqual.default)(node, opts);
  92826. }
  92827. }
  92828. return false;
  92829. }
  92830. function isExportDefaultSpecifier(node, opts) {
  92831. if (!node)
  92832. return false;
  92833. const nodeType = node.type;
  92834. if (nodeType === "ExportDefaultSpecifier") {
  92835. if (typeof opts === "undefined") {
  92836. return true;
  92837. } else {
  92838. return (0, _shallowEqual.default)(node, opts);
  92839. }
  92840. }
  92841. return false;
  92842. }
  92843. function isPrivateName(node, opts) {
  92844. if (!node)
  92845. return false;
  92846. const nodeType = node.type;
  92847. if (nodeType === "PrivateName") {
  92848. if (typeof opts === "undefined") {
  92849. return true;
  92850. } else {
  92851. return (0, _shallowEqual.default)(node, opts);
  92852. }
  92853. }
  92854. return false;
  92855. }
  92856. function isRecordExpression(node, opts) {
  92857. if (!node)
  92858. return false;
  92859. const nodeType = node.type;
  92860. if (nodeType === "RecordExpression") {
  92861. if (typeof opts === "undefined") {
  92862. return true;
  92863. } else {
  92864. return (0, _shallowEqual.default)(node, opts);
  92865. }
  92866. }
  92867. return false;
  92868. }
  92869. function isTupleExpression(node, opts) {
  92870. if (!node)
  92871. return false;
  92872. const nodeType = node.type;
  92873. if (nodeType === "TupleExpression") {
  92874. if (typeof opts === "undefined") {
  92875. return true;
  92876. } else {
  92877. return (0, _shallowEqual.default)(node, opts);
  92878. }
  92879. }
  92880. return false;
  92881. }
  92882. function isDecimalLiteral(node, opts) {
  92883. if (!node)
  92884. return false;
  92885. const nodeType = node.type;
  92886. if (nodeType === "DecimalLiteral") {
  92887. if (typeof opts === "undefined") {
  92888. return true;
  92889. } else {
  92890. return (0, _shallowEqual.default)(node, opts);
  92891. }
  92892. }
  92893. return false;
  92894. }
  92895. function isStaticBlock(node, opts) {
  92896. if (!node)
  92897. return false;
  92898. const nodeType = node.type;
  92899. if (nodeType === "StaticBlock") {
  92900. if (typeof opts === "undefined") {
  92901. return true;
  92902. } else {
  92903. return (0, _shallowEqual.default)(node, opts);
  92904. }
  92905. }
  92906. return false;
  92907. }
  92908. function isModuleExpression(node, opts) {
  92909. if (!node)
  92910. return false;
  92911. const nodeType = node.type;
  92912. if (nodeType === "ModuleExpression") {
  92913. if (typeof opts === "undefined") {
  92914. return true;
  92915. } else {
  92916. return (0, _shallowEqual.default)(node, opts);
  92917. }
  92918. }
  92919. return false;
  92920. }
  92921. function isTSParameterProperty(node, opts) {
  92922. if (!node)
  92923. return false;
  92924. const nodeType = node.type;
  92925. if (nodeType === "TSParameterProperty") {
  92926. if (typeof opts === "undefined") {
  92927. return true;
  92928. } else {
  92929. return (0, _shallowEqual.default)(node, opts);
  92930. }
  92931. }
  92932. return false;
  92933. }
  92934. function isTSDeclareFunction(node, opts) {
  92935. if (!node)
  92936. return false;
  92937. const nodeType = node.type;
  92938. if (nodeType === "TSDeclareFunction") {
  92939. if (typeof opts === "undefined") {
  92940. return true;
  92941. } else {
  92942. return (0, _shallowEqual.default)(node, opts);
  92943. }
  92944. }
  92945. return false;
  92946. }
  92947. function isTSDeclareMethod(node, opts) {
  92948. if (!node)
  92949. return false;
  92950. const nodeType = node.type;
  92951. if (nodeType === "TSDeclareMethod") {
  92952. if (typeof opts === "undefined") {
  92953. return true;
  92954. } else {
  92955. return (0, _shallowEqual.default)(node, opts);
  92956. }
  92957. }
  92958. return false;
  92959. }
  92960. function isTSQualifiedName(node, opts) {
  92961. if (!node)
  92962. return false;
  92963. const nodeType = node.type;
  92964. if (nodeType === "TSQualifiedName") {
  92965. if (typeof opts === "undefined") {
  92966. return true;
  92967. } else {
  92968. return (0, _shallowEqual.default)(node, opts);
  92969. }
  92970. }
  92971. return false;
  92972. }
  92973. function isTSCallSignatureDeclaration(node, opts) {
  92974. if (!node)
  92975. return false;
  92976. const nodeType = node.type;
  92977. if (nodeType === "TSCallSignatureDeclaration") {
  92978. if (typeof opts === "undefined") {
  92979. return true;
  92980. } else {
  92981. return (0, _shallowEqual.default)(node, opts);
  92982. }
  92983. }
  92984. return false;
  92985. }
  92986. function isTSConstructSignatureDeclaration(node, opts) {
  92987. if (!node)
  92988. return false;
  92989. const nodeType = node.type;
  92990. if (nodeType === "TSConstructSignatureDeclaration") {
  92991. if (typeof opts === "undefined") {
  92992. return true;
  92993. } else {
  92994. return (0, _shallowEqual.default)(node, opts);
  92995. }
  92996. }
  92997. return false;
  92998. }
  92999. function isTSPropertySignature(node, opts) {
  93000. if (!node)
  93001. return false;
  93002. const nodeType = node.type;
  93003. if (nodeType === "TSPropertySignature") {
  93004. if (typeof opts === "undefined") {
  93005. return true;
  93006. } else {
  93007. return (0, _shallowEqual.default)(node, opts);
  93008. }
  93009. }
  93010. return false;
  93011. }
  93012. function isTSMethodSignature(node, opts) {
  93013. if (!node)
  93014. return false;
  93015. const nodeType = node.type;
  93016. if (nodeType === "TSMethodSignature") {
  93017. if (typeof opts === "undefined") {
  93018. return true;
  93019. } else {
  93020. return (0, _shallowEqual.default)(node, opts);
  93021. }
  93022. }
  93023. return false;
  93024. }
  93025. function isTSIndexSignature(node, opts) {
  93026. if (!node)
  93027. return false;
  93028. const nodeType = node.type;
  93029. if (nodeType === "TSIndexSignature") {
  93030. if (typeof opts === "undefined") {
  93031. return true;
  93032. } else {
  93033. return (0, _shallowEqual.default)(node, opts);
  93034. }
  93035. }
  93036. return false;
  93037. }
  93038. function isTSAnyKeyword(node, opts) {
  93039. if (!node)
  93040. return false;
  93041. const nodeType = node.type;
  93042. if (nodeType === "TSAnyKeyword") {
  93043. if (typeof opts === "undefined") {
  93044. return true;
  93045. } else {
  93046. return (0, _shallowEqual.default)(node, opts);
  93047. }
  93048. }
  93049. return false;
  93050. }
  93051. function isTSBooleanKeyword(node, opts) {
  93052. if (!node)
  93053. return false;
  93054. const nodeType = node.type;
  93055. if (nodeType === "TSBooleanKeyword") {
  93056. if (typeof opts === "undefined") {
  93057. return true;
  93058. } else {
  93059. return (0, _shallowEqual.default)(node, opts);
  93060. }
  93061. }
  93062. return false;
  93063. }
  93064. function isTSBigIntKeyword(node, opts) {
  93065. if (!node)
  93066. return false;
  93067. const nodeType = node.type;
  93068. if (nodeType === "TSBigIntKeyword") {
  93069. if (typeof opts === "undefined") {
  93070. return true;
  93071. } else {
  93072. return (0, _shallowEqual.default)(node, opts);
  93073. }
  93074. }
  93075. return false;
  93076. }
  93077. function isTSIntrinsicKeyword(node, opts) {
  93078. if (!node)
  93079. return false;
  93080. const nodeType = node.type;
  93081. if (nodeType === "TSIntrinsicKeyword") {
  93082. if (typeof opts === "undefined") {
  93083. return true;
  93084. } else {
  93085. return (0, _shallowEqual.default)(node, opts);
  93086. }
  93087. }
  93088. return false;
  93089. }
  93090. function isTSNeverKeyword(node, opts) {
  93091. if (!node)
  93092. return false;
  93093. const nodeType = node.type;
  93094. if (nodeType === "TSNeverKeyword") {
  93095. if (typeof opts === "undefined") {
  93096. return true;
  93097. } else {
  93098. return (0, _shallowEqual.default)(node, opts);
  93099. }
  93100. }
  93101. return false;
  93102. }
  93103. function isTSNullKeyword(node, opts) {
  93104. if (!node)
  93105. return false;
  93106. const nodeType = node.type;
  93107. if (nodeType === "TSNullKeyword") {
  93108. if (typeof opts === "undefined") {
  93109. return true;
  93110. } else {
  93111. return (0, _shallowEqual.default)(node, opts);
  93112. }
  93113. }
  93114. return false;
  93115. }
  93116. function isTSNumberKeyword(node, opts) {
  93117. if (!node)
  93118. return false;
  93119. const nodeType = node.type;
  93120. if (nodeType === "TSNumberKeyword") {
  93121. if (typeof opts === "undefined") {
  93122. return true;
  93123. } else {
  93124. return (0, _shallowEqual.default)(node, opts);
  93125. }
  93126. }
  93127. return false;
  93128. }
  93129. function isTSObjectKeyword(node, opts) {
  93130. if (!node)
  93131. return false;
  93132. const nodeType = node.type;
  93133. if (nodeType === "TSObjectKeyword") {
  93134. if (typeof opts === "undefined") {
  93135. return true;
  93136. } else {
  93137. return (0, _shallowEqual.default)(node, opts);
  93138. }
  93139. }
  93140. return false;
  93141. }
  93142. function isTSStringKeyword(node, opts) {
  93143. if (!node)
  93144. return false;
  93145. const nodeType = node.type;
  93146. if (nodeType === "TSStringKeyword") {
  93147. if (typeof opts === "undefined") {
  93148. return true;
  93149. } else {
  93150. return (0, _shallowEqual.default)(node, opts);
  93151. }
  93152. }
  93153. return false;
  93154. }
  93155. function isTSSymbolKeyword(node, opts) {
  93156. if (!node)
  93157. return false;
  93158. const nodeType = node.type;
  93159. if (nodeType === "TSSymbolKeyword") {
  93160. if (typeof opts === "undefined") {
  93161. return true;
  93162. } else {
  93163. return (0, _shallowEqual.default)(node, opts);
  93164. }
  93165. }
  93166. return false;
  93167. }
  93168. function isTSUndefinedKeyword(node, opts) {
  93169. if (!node)
  93170. return false;
  93171. const nodeType = node.type;
  93172. if (nodeType === "TSUndefinedKeyword") {
  93173. if (typeof opts === "undefined") {
  93174. return true;
  93175. } else {
  93176. return (0, _shallowEqual.default)(node, opts);
  93177. }
  93178. }
  93179. return false;
  93180. }
  93181. function isTSUnknownKeyword(node, opts) {
  93182. if (!node)
  93183. return false;
  93184. const nodeType = node.type;
  93185. if (nodeType === "TSUnknownKeyword") {
  93186. if (typeof opts === "undefined") {
  93187. return true;
  93188. } else {
  93189. return (0, _shallowEqual.default)(node, opts);
  93190. }
  93191. }
  93192. return false;
  93193. }
  93194. function isTSVoidKeyword(node, opts) {
  93195. if (!node)
  93196. return false;
  93197. const nodeType = node.type;
  93198. if (nodeType === "TSVoidKeyword") {
  93199. if (typeof opts === "undefined") {
  93200. return true;
  93201. } else {
  93202. return (0, _shallowEqual.default)(node, opts);
  93203. }
  93204. }
  93205. return false;
  93206. }
  93207. function isTSThisType(node, opts) {
  93208. if (!node)
  93209. return false;
  93210. const nodeType = node.type;
  93211. if (nodeType === "TSThisType") {
  93212. if (typeof opts === "undefined") {
  93213. return true;
  93214. } else {
  93215. return (0, _shallowEqual.default)(node, opts);
  93216. }
  93217. }
  93218. return false;
  93219. }
  93220. function isTSFunctionType(node, opts) {
  93221. if (!node)
  93222. return false;
  93223. const nodeType = node.type;
  93224. if (nodeType === "TSFunctionType") {
  93225. if (typeof opts === "undefined") {
  93226. return true;
  93227. } else {
  93228. return (0, _shallowEqual.default)(node, opts);
  93229. }
  93230. }
  93231. return false;
  93232. }
  93233. function isTSConstructorType(node, opts) {
  93234. if (!node)
  93235. return false;
  93236. const nodeType = node.type;
  93237. if (nodeType === "TSConstructorType") {
  93238. if (typeof opts === "undefined") {
  93239. return true;
  93240. } else {
  93241. return (0, _shallowEqual.default)(node, opts);
  93242. }
  93243. }
  93244. return false;
  93245. }
  93246. function isTSTypeReference(node, opts) {
  93247. if (!node)
  93248. return false;
  93249. const nodeType = node.type;
  93250. if (nodeType === "TSTypeReference") {
  93251. if (typeof opts === "undefined") {
  93252. return true;
  93253. } else {
  93254. return (0, _shallowEqual.default)(node, opts);
  93255. }
  93256. }
  93257. return false;
  93258. }
  93259. function isTSTypePredicate(node, opts) {
  93260. if (!node)
  93261. return false;
  93262. const nodeType = node.type;
  93263. if (nodeType === "TSTypePredicate") {
  93264. if (typeof opts === "undefined") {
  93265. return true;
  93266. } else {
  93267. return (0, _shallowEqual.default)(node, opts);
  93268. }
  93269. }
  93270. return false;
  93271. }
  93272. function isTSTypeQuery(node, opts) {
  93273. if (!node)
  93274. return false;
  93275. const nodeType = node.type;
  93276. if (nodeType === "TSTypeQuery") {
  93277. if (typeof opts === "undefined") {
  93278. return true;
  93279. } else {
  93280. return (0, _shallowEqual.default)(node, opts);
  93281. }
  93282. }
  93283. return false;
  93284. }
  93285. function isTSTypeLiteral(node, opts) {
  93286. if (!node)
  93287. return false;
  93288. const nodeType = node.type;
  93289. if (nodeType === "TSTypeLiteral") {
  93290. if (typeof opts === "undefined") {
  93291. return true;
  93292. } else {
  93293. return (0, _shallowEqual.default)(node, opts);
  93294. }
  93295. }
  93296. return false;
  93297. }
  93298. function isTSArrayType(node, opts) {
  93299. if (!node)
  93300. return false;
  93301. const nodeType = node.type;
  93302. if (nodeType === "TSArrayType") {
  93303. if (typeof opts === "undefined") {
  93304. return true;
  93305. } else {
  93306. return (0, _shallowEqual.default)(node, opts);
  93307. }
  93308. }
  93309. return false;
  93310. }
  93311. function isTSTupleType(node, opts) {
  93312. if (!node)
  93313. return false;
  93314. const nodeType = node.type;
  93315. if (nodeType === "TSTupleType") {
  93316. if (typeof opts === "undefined") {
  93317. return true;
  93318. } else {
  93319. return (0, _shallowEqual.default)(node, opts);
  93320. }
  93321. }
  93322. return false;
  93323. }
  93324. function isTSOptionalType(node, opts) {
  93325. if (!node)
  93326. return false;
  93327. const nodeType = node.type;
  93328. if (nodeType === "TSOptionalType") {
  93329. if (typeof opts === "undefined") {
  93330. return true;
  93331. } else {
  93332. return (0, _shallowEqual.default)(node, opts);
  93333. }
  93334. }
  93335. return false;
  93336. }
  93337. function isTSRestType(node, opts) {
  93338. if (!node)
  93339. return false;
  93340. const nodeType = node.type;
  93341. if (nodeType === "TSRestType") {
  93342. if (typeof opts === "undefined") {
  93343. return true;
  93344. } else {
  93345. return (0, _shallowEqual.default)(node, opts);
  93346. }
  93347. }
  93348. return false;
  93349. }
  93350. function isTSNamedTupleMember(node, opts) {
  93351. if (!node)
  93352. return false;
  93353. const nodeType = node.type;
  93354. if (nodeType === "TSNamedTupleMember") {
  93355. if (typeof opts === "undefined") {
  93356. return true;
  93357. } else {
  93358. return (0, _shallowEqual.default)(node, opts);
  93359. }
  93360. }
  93361. return false;
  93362. }
  93363. function isTSUnionType(node, opts) {
  93364. if (!node)
  93365. return false;
  93366. const nodeType = node.type;
  93367. if (nodeType === "TSUnionType") {
  93368. if (typeof opts === "undefined") {
  93369. return true;
  93370. } else {
  93371. return (0, _shallowEqual.default)(node, opts);
  93372. }
  93373. }
  93374. return false;
  93375. }
  93376. function isTSIntersectionType(node, opts) {
  93377. if (!node)
  93378. return false;
  93379. const nodeType = node.type;
  93380. if (nodeType === "TSIntersectionType") {
  93381. if (typeof opts === "undefined") {
  93382. return true;
  93383. } else {
  93384. return (0, _shallowEqual.default)(node, opts);
  93385. }
  93386. }
  93387. return false;
  93388. }
  93389. function isTSConditionalType(node, opts) {
  93390. if (!node)
  93391. return false;
  93392. const nodeType = node.type;
  93393. if (nodeType === "TSConditionalType") {
  93394. if (typeof opts === "undefined") {
  93395. return true;
  93396. } else {
  93397. return (0, _shallowEqual.default)(node, opts);
  93398. }
  93399. }
  93400. return false;
  93401. }
  93402. function isTSInferType(node, opts) {
  93403. if (!node)
  93404. return false;
  93405. const nodeType = node.type;
  93406. if (nodeType === "TSInferType") {
  93407. if (typeof opts === "undefined") {
  93408. return true;
  93409. } else {
  93410. return (0, _shallowEqual.default)(node, opts);
  93411. }
  93412. }
  93413. return false;
  93414. }
  93415. function isTSParenthesizedType(node, opts) {
  93416. if (!node)
  93417. return false;
  93418. const nodeType = node.type;
  93419. if (nodeType === "TSParenthesizedType") {
  93420. if (typeof opts === "undefined") {
  93421. return true;
  93422. } else {
  93423. return (0, _shallowEqual.default)(node, opts);
  93424. }
  93425. }
  93426. return false;
  93427. }
  93428. function isTSTypeOperator(node, opts) {
  93429. if (!node)
  93430. return false;
  93431. const nodeType = node.type;
  93432. if (nodeType === "TSTypeOperator") {
  93433. if (typeof opts === "undefined") {
  93434. return true;
  93435. } else {
  93436. return (0, _shallowEqual.default)(node, opts);
  93437. }
  93438. }
  93439. return false;
  93440. }
  93441. function isTSIndexedAccessType(node, opts) {
  93442. if (!node)
  93443. return false;
  93444. const nodeType = node.type;
  93445. if (nodeType === "TSIndexedAccessType") {
  93446. if (typeof opts === "undefined") {
  93447. return true;
  93448. } else {
  93449. return (0, _shallowEqual.default)(node, opts);
  93450. }
  93451. }
  93452. return false;
  93453. }
  93454. function isTSMappedType(node, opts) {
  93455. if (!node)
  93456. return false;
  93457. const nodeType = node.type;
  93458. if (nodeType === "TSMappedType") {
  93459. if (typeof opts === "undefined") {
  93460. return true;
  93461. } else {
  93462. return (0, _shallowEqual.default)(node, opts);
  93463. }
  93464. }
  93465. return false;
  93466. }
  93467. function isTSLiteralType(node, opts) {
  93468. if (!node)
  93469. return false;
  93470. const nodeType = node.type;
  93471. if (nodeType === "TSLiteralType") {
  93472. if (typeof opts === "undefined") {
  93473. return true;
  93474. } else {
  93475. return (0, _shallowEqual.default)(node, opts);
  93476. }
  93477. }
  93478. return false;
  93479. }
  93480. function isTSExpressionWithTypeArguments(node, opts) {
  93481. if (!node)
  93482. return false;
  93483. const nodeType = node.type;
  93484. if (nodeType === "TSExpressionWithTypeArguments") {
  93485. if (typeof opts === "undefined") {
  93486. return true;
  93487. } else {
  93488. return (0, _shallowEqual.default)(node, opts);
  93489. }
  93490. }
  93491. return false;
  93492. }
  93493. function isTSInterfaceDeclaration(node, opts) {
  93494. if (!node)
  93495. return false;
  93496. const nodeType = node.type;
  93497. if (nodeType === "TSInterfaceDeclaration") {
  93498. if (typeof opts === "undefined") {
  93499. return true;
  93500. } else {
  93501. return (0, _shallowEqual.default)(node, opts);
  93502. }
  93503. }
  93504. return false;
  93505. }
  93506. function isTSInterfaceBody(node, opts) {
  93507. if (!node)
  93508. return false;
  93509. const nodeType = node.type;
  93510. if (nodeType === "TSInterfaceBody") {
  93511. if (typeof opts === "undefined") {
  93512. return true;
  93513. } else {
  93514. return (0, _shallowEqual.default)(node, opts);
  93515. }
  93516. }
  93517. return false;
  93518. }
  93519. function isTSTypeAliasDeclaration(node, opts) {
  93520. if (!node)
  93521. return false;
  93522. const nodeType = node.type;
  93523. if (nodeType === "TSTypeAliasDeclaration") {
  93524. if (typeof opts === "undefined") {
  93525. return true;
  93526. } else {
  93527. return (0, _shallowEqual.default)(node, opts);
  93528. }
  93529. }
  93530. return false;
  93531. }
  93532. function isTSAsExpression(node, opts) {
  93533. if (!node)
  93534. return false;
  93535. const nodeType = node.type;
  93536. if (nodeType === "TSAsExpression") {
  93537. if (typeof opts === "undefined") {
  93538. return true;
  93539. } else {
  93540. return (0, _shallowEqual.default)(node, opts);
  93541. }
  93542. }
  93543. return false;
  93544. }
  93545. function isTSTypeAssertion(node, opts) {
  93546. if (!node)
  93547. return false;
  93548. const nodeType = node.type;
  93549. if (nodeType === "TSTypeAssertion") {
  93550. if (typeof opts === "undefined") {
  93551. return true;
  93552. } else {
  93553. return (0, _shallowEqual.default)(node, opts);
  93554. }
  93555. }
  93556. return false;
  93557. }
  93558. function isTSEnumDeclaration(node, opts) {
  93559. if (!node)
  93560. return false;
  93561. const nodeType = node.type;
  93562. if (nodeType === "TSEnumDeclaration") {
  93563. if (typeof opts === "undefined") {
  93564. return true;
  93565. } else {
  93566. return (0, _shallowEqual.default)(node, opts);
  93567. }
  93568. }
  93569. return false;
  93570. }
  93571. function isTSEnumMember(node, opts) {
  93572. if (!node)
  93573. return false;
  93574. const nodeType = node.type;
  93575. if (nodeType === "TSEnumMember") {
  93576. if (typeof opts === "undefined") {
  93577. return true;
  93578. } else {
  93579. return (0, _shallowEqual.default)(node, opts);
  93580. }
  93581. }
  93582. return false;
  93583. }
  93584. function isTSModuleDeclaration(node, opts) {
  93585. if (!node)
  93586. return false;
  93587. const nodeType = node.type;
  93588. if (nodeType === "TSModuleDeclaration") {
  93589. if (typeof opts === "undefined") {
  93590. return true;
  93591. } else {
  93592. return (0, _shallowEqual.default)(node, opts);
  93593. }
  93594. }
  93595. return false;
  93596. }
  93597. function isTSModuleBlock(node, opts) {
  93598. if (!node)
  93599. return false;
  93600. const nodeType = node.type;
  93601. if (nodeType === "TSModuleBlock") {
  93602. if (typeof opts === "undefined") {
  93603. return true;
  93604. } else {
  93605. return (0, _shallowEqual.default)(node, opts);
  93606. }
  93607. }
  93608. return false;
  93609. }
  93610. function isTSImportType(node, opts) {
  93611. if (!node)
  93612. return false;
  93613. const nodeType = node.type;
  93614. if (nodeType === "TSImportType") {
  93615. if (typeof opts === "undefined") {
  93616. return true;
  93617. } else {
  93618. return (0, _shallowEqual.default)(node, opts);
  93619. }
  93620. }
  93621. return false;
  93622. }
  93623. function isTSImportEqualsDeclaration(node, opts) {
  93624. if (!node)
  93625. return false;
  93626. const nodeType = node.type;
  93627. if (nodeType === "TSImportEqualsDeclaration") {
  93628. if (typeof opts === "undefined") {
  93629. return true;
  93630. } else {
  93631. return (0, _shallowEqual.default)(node, opts);
  93632. }
  93633. }
  93634. return false;
  93635. }
  93636. function isTSExternalModuleReference(node, opts) {
  93637. if (!node)
  93638. return false;
  93639. const nodeType = node.type;
  93640. if (nodeType === "TSExternalModuleReference") {
  93641. if (typeof opts === "undefined") {
  93642. return true;
  93643. } else {
  93644. return (0, _shallowEqual.default)(node, opts);
  93645. }
  93646. }
  93647. return false;
  93648. }
  93649. function isTSNonNullExpression(node, opts) {
  93650. if (!node)
  93651. return false;
  93652. const nodeType = node.type;
  93653. if (nodeType === "TSNonNullExpression") {
  93654. if (typeof opts === "undefined") {
  93655. return true;
  93656. } else {
  93657. return (0, _shallowEqual.default)(node, opts);
  93658. }
  93659. }
  93660. return false;
  93661. }
  93662. function isTSExportAssignment(node, opts) {
  93663. if (!node)
  93664. return false;
  93665. const nodeType = node.type;
  93666. if (nodeType === "TSExportAssignment") {
  93667. if (typeof opts === "undefined") {
  93668. return true;
  93669. } else {
  93670. return (0, _shallowEqual.default)(node, opts);
  93671. }
  93672. }
  93673. return false;
  93674. }
  93675. function isTSNamespaceExportDeclaration(node, opts) {
  93676. if (!node)
  93677. return false;
  93678. const nodeType = node.type;
  93679. if (nodeType === "TSNamespaceExportDeclaration") {
  93680. if (typeof opts === "undefined") {
  93681. return true;
  93682. } else {
  93683. return (0, _shallowEqual.default)(node, opts);
  93684. }
  93685. }
  93686. return false;
  93687. }
  93688. function isTSTypeAnnotation(node, opts) {
  93689. if (!node)
  93690. return false;
  93691. const nodeType = node.type;
  93692. if (nodeType === "TSTypeAnnotation") {
  93693. if (typeof opts === "undefined") {
  93694. return true;
  93695. } else {
  93696. return (0, _shallowEqual.default)(node, opts);
  93697. }
  93698. }
  93699. return false;
  93700. }
  93701. function isTSTypeParameterInstantiation(node, opts) {
  93702. if (!node)
  93703. return false;
  93704. const nodeType = node.type;
  93705. if (nodeType === "TSTypeParameterInstantiation") {
  93706. if (typeof opts === "undefined") {
  93707. return true;
  93708. } else {
  93709. return (0, _shallowEqual.default)(node, opts);
  93710. }
  93711. }
  93712. return false;
  93713. }
  93714. function isTSTypeParameterDeclaration(node, opts) {
  93715. if (!node)
  93716. return false;
  93717. const nodeType = node.type;
  93718. if (nodeType === "TSTypeParameterDeclaration") {
  93719. if (typeof opts === "undefined") {
  93720. return true;
  93721. } else {
  93722. return (0, _shallowEqual.default)(node, opts);
  93723. }
  93724. }
  93725. return false;
  93726. }
  93727. function isTSTypeParameter(node, opts) {
  93728. if (!node)
  93729. return false;
  93730. const nodeType = node.type;
  93731. if (nodeType === "TSTypeParameter") {
  93732. if (typeof opts === "undefined") {
  93733. return true;
  93734. } else {
  93735. return (0, _shallowEqual.default)(node, opts);
  93736. }
  93737. }
  93738. return false;
  93739. }
  93740. function isExpression(node, opts) {
  93741. if (!node)
  93742. return false;
  93743. const nodeType = node.type;
  93744. if ("ArrayExpression" === nodeType || "AssignmentExpression" === nodeType || "BinaryExpression" === nodeType || "CallExpression" === nodeType || "ConditionalExpression" === nodeType || "FunctionExpression" === nodeType || "Identifier" === nodeType || "StringLiteral" === nodeType || "NumericLiteral" === nodeType || "NullLiteral" === nodeType || "BooleanLiteral" === nodeType || "RegExpLiteral" === nodeType || "LogicalExpression" === nodeType || "MemberExpression" === nodeType || "NewExpression" === nodeType || "ObjectExpression" === nodeType || "SequenceExpression" === nodeType || "ParenthesizedExpression" === nodeType || "ThisExpression" === nodeType || "UnaryExpression" === nodeType || "UpdateExpression" === nodeType || "ArrowFunctionExpression" === nodeType || "ClassExpression" === nodeType || "MetaProperty" === nodeType || "Super" === nodeType || "TaggedTemplateExpression" === nodeType || "TemplateLiteral" === nodeType || "YieldExpression" === nodeType || "AwaitExpression" === nodeType || "Import" === nodeType || "BigIntLiteral" === nodeType || "OptionalMemberExpression" === nodeType || "OptionalCallExpression" === nodeType || "TypeCastExpression" === nodeType || "JSXElement" === nodeType || "JSXFragment" === nodeType || "BindExpression" === nodeType || "PipelinePrimaryTopicReference" === nodeType || "DoExpression" === nodeType || "RecordExpression" === nodeType || "TupleExpression" === nodeType || "DecimalLiteral" === nodeType || "ModuleExpression" === nodeType || "TSAsExpression" === nodeType || "TSTypeAssertion" === nodeType || "TSNonNullExpression" === nodeType || nodeType === "Placeholder" && ("Expression" === node.expectedNode || "Identifier" === node.expectedNode || "StringLiteral" === node.expectedNode)) {
  93745. if (typeof opts === "undefined") {
  93746. return true;
  93747. } else {
  93748. return (0, _shallowEqual.default)(node, opts);
  93749. }
  93750. }
  93751. return false;
  93752. }
  93753. function isBinary(node, opts) {
  93754. if (!node)
  93755. return false;
  93756. const nodeType = node.type;
  93757. if ("BinaryExpression" === nodeType || "LogicalExpression" === nodeType) {
  93758. if (typeof opts === "undefined") {
  93759. return true;
  93760. } else {
  93761. return (0, _shallowEqual.default)(node, opts);
  93762. }
  93763. }
  93764. return false;
  93765. }
  93766. function isScopable(node, opts) {
  93767. if (!node)
  93768. return false;
  93769. const nodeType = node.type;
  93770. if ("BlockStatement" === nodeType || "CatchClause" === nodeType || "DoWhileStatement" === nodeType || "ForInStatement" === nodeType || "ForStatement" === nodeType || "FunctionDeclaration" === nodeType || "FunctionExpression" === nodeType || "Program" === nodeType || "ObjectMethod" === nodeType || "SwitchStatement" === nodeType || "WhileStatement" === nodeType || "ArrowFunctionExpression" === nodeType || "ClassExpression" === nodeType || "ClassDeclaration" === nodeType || "ForOfStatement" === nodeType || "ClassMethod" === nodeType || "ClassPrivateMethod" === nodeType || "StaticBlock" === nodeType || "TSModuleBlock" === nodeType || nodeType === "Placeholder" && "BlockStatement" === node.expectedNode) {
  93771. if (typeof opts === "undefined") {
  93772. return true;
  93773. } else {
  93774. return (0, _shallowEqual.default)(node, opts);
  93775. }
  93776. }
  93777. return false;
  93778. }
  93779. function isBlockParent(node, opts) {
  93780. if (!node)
  93781. return false;
  93782. const nodeType = node.type;
  93783. if ("BlockStatement" === nodeType || "CatchClause" === nodeType || "DoWhileStatement" === nodeType || "ForInStatement" === nodeType || "ForStatement" === nodeType || "FunctionDeclaration" === nodeType || "FunctionExpression" === nodeType || "Program" === nodeType || "ObjectMethod" === nodeType || "SwitchStatement" === nodeType || "WhileStatement" === nodeType || "ArrowFunctionExpression" === nodeType || "ForOfStatement" === nodeType || "ClassMethod" === nodeType || "ClassPrivateMethod" === nodeType || "StaticBlock" === nodeType || "TSModuleBlock" === nodeType || nodeType === "Placeholder" && "BlockStatement" === node.expectedNode) {
  93784. if (typeof opts === "undefined") {
  93785. return true;
  93786. } else {
  93787. return (0, _shallowEqual.default)(node, opts);
  93788. }
  93789. }
  93790. return false;
  93791. }
  93792. function isBlock(node, opts) {
  93793. if (!node)
  93794. return false;
  93795. const nodeType = node.type;
  93796. if ("BlockStatement" === nodeType || "Program" === nodeType || "TSModuleBlock" === nodeType || nodeType === "Placeholder" && "BlockStatement" === node.expectedNode) {
  93797. if (typeof opts === "undefined") {
  93798. return true;
  93799. } else {
  93800. return (0, _shallowEqual.default)(node, opts);
  93801. }
  93802. }
  93803. return false;
  93804. }
  93805. function isStatement(node, opts) {
  93806. if (!node)
  93807. return false;
  93808. const nodeType = node.type;
  93809. if ("BlockStatement" === nodeType || "BreakStatement" === nodeType || "ContinueStatement" === nodeType || "DebuggerStatement" === nodeType || "DoWhileStatement" === nodeType || "EmptyStatement" === nodeType || "ExpressionStatement" === nodeType || "ForInStatement" === nodeType || "ForStatement" === nodeType || "FunctionDeclaration" === nodeType || "IfStatement" === nodeType || "LabeledStatement" === nodeType || "ReturnStatement" === nodeType || "SwitchStatement" === nodeType || "ThrowStatement" === nodeType || "TryStatement" === nodeType || "VariableDeclaration" === nodeType || "WhileStatement" === nodeType || "WithStatement" === nodeType || "ClassDeclaration" === nodeType || "ExportAllDeclaration" === nodeType || "ExportDefaultDeclaration" === nodeType || "ExportNamedDeclaration" === nodeType || "ForOfStatement" === nodeType || "ImportDeclaration" === nodeType || "DeclareClass" === nodeType || "DeclareFunction" === nodeType || "DeclareInterface" === nodeType || "DeclareModule" === nodeType || "DeclareModuleExports" === nodeType || "DeclareTypeAlias" === nodeType || "DeclareOpaqueType" === nodeType || "DeclareVariable" === nodeType || "DeclareExportDeclaration" === nodeType || "DeclareExportAllDeclaration" === nodeType || "InterfaceDeclaration" === nodeType || "OpaqueType" === nodeType || "TypeAlias" === nodeType || "EnumDeclaration" === nodeType || "TSDeclareFunction" === nodeType || "TSInterfaceDeclaration" === nodeType || "TSTypeAliasDeclaration" === nodeType || "TSEnumDeclaration" === nodeType || "TSModuleDeclaration" === nodeType || "TSImportEqualsDeclaration" === nodeType || "TSExportAssignment" === nodeType || "TSNamespaceExportDeclaration" === nodeType || nodeType === "Placeholder" && ("Statement" === node.expectedNode || "Declaration" === node.expectedNode || "BlockStatement" === node.expectedNode)) {
  93810. if (typeof opts === "undefined") {
  93811. return true;
  93812. } else {
  93813. return (0, _shallowEqual.default)(node, opts);
  93814. }
  93815. }
  93816. return false;
  93817. }
  93818. function isTerminatorless(node, opts) {
  93819. if (!node)
  93820. return false;
  93821. const nodeType = node.type;
  93822. if ("BreakStatement" === nodeType || "ContinueStatement" === nodeType || "ReturnStatement" === nodeType || "ThrowStatement" === nodeType || "YieldExpression" === nodeType || "AwaitExpression" === nodeType) {
  93823. if (typeof opts === "undefined") {
  93824. return true;
  93825. } else {
  93826. return (0, _shallowEqual.default)(node, opts);
  93827. }
  93828. }
  93829. return false;
  93830. }
  93831. function isCompletionStatement(node, opts) {
  93832. if (!node)
  93833. return false;
  93834. const nodeType = node.type;
  93835. if ("BreakStatement" === nodeType || "ContinueStatement" === nodeType || "ReturnStatement" === nodeType || "ThrowStatement" === nodeType) {
  93836. if (typeof opts === "undefined") {
  93837. return true;
  93838. } else {
  93839. return (0, _shallowEqual.default)(node, opts);
  93840. }
  93841. }
  93842. return false;
  93843. }
  93844. function isConditional(node, opts) {
  93845. if (!node)
  93846. return false;
  93847. const nodeType = node.type;
  93848. if ("ConditionalExpression" === nodeType || "IfStatement" === nodeType) {
  93849. if (typeof opts === "undefined") {
  93850. return true;
  93851. } else {
  93852. return (0, _shallowEqual.default)(node, opts);
  93853. }
  93854. }
  93855. return false;
  93856. }
  93857. function isLoop(node, opts) {
  93858. if (!node)
  93859. return false;
  93860. const nodeType = node.type;
  93861. if ("DoWhileStatement" === nodeType || "ForInStatement" === nodeType || "ForStatement" === nodeType || "WhileStatement" === nodeType || "ForOfStatement" === nodeType) {
  93862. if (typeof opts === "undefined") {
  93863. return true;
  93864. } else {
  93865. return (0, _shallowEqual.default)(node, opts);
  93866. }
  93867. }
  93868. return false;
  93869. }
  93870. function isWhile(node, opts) {
  93871. if (!node)
  93872. return false;
  93873. const nodeType = node.type;
  93874. if ("DoWhileStatement" === nodeType || "WhileStatement" === nodeType) {
  93875. if (typeof opts === "undefined") {
  93876. return true;
  93877. } else {
  93878. return (0, _shallowEqual.default)(node, opts);
  93879. }
  93880. }
  93881. return false;
  93882. }
  93883. function isExpressionWrapper(node, opts) {
  93884. if (!node)
  93885. return false;
  93886. const nodeType = node.type;
  93887. if ("ExpressionStatement" === nodeType || "ParenthesizedExpression" === nodeType || "TypeCastExpression" === nodeType) {
  93888. if (typeof opts === "undefined") {
  93889. return true;
  93890. } else {
  93891. return (0, _shallowEqual.default)(node, opts);
  93892. }
  93893. }
  93894. return false;
  93895. }
  93896. function isFor(node, opts) {
  93897. if (!node)
  93898. return false;
  93899. const nodeType = node.type;
  93900. if ("ForInStatement" === nodeType || "ForStatement" === nodeType || "ForOfStatement" === nodeType) {
  93901. if (typeof opts === "undefined") {
  93902. return true;
  93903. } else {
  93904. return (0, _shallowEqual.default)(node, opts);
  93905. }
  93906. }
  93907. return false;
  93908. }
  93909. function isForXStatement(node, opts) {
  93910. if (!node)
  93911. return false;
  93912. const nodeType = node.type;
  93913. if ("ForInStatement" === nodeType || "ForOfStatement" === nodeType) {
  93914. if (typeof opts === "undefined") {
  93915. return true;
  93916. } else {
  93917. return (0, _shallowEqual.default)(node, opts);
  93918. }
  93919. }
  93920. return false;
  93921. }
  93922. function isFunction(node, opts) {
  93923. if (!node)
  93924. return false;
  93925. const nodeType = node.type;
  93926. if ("FunctionDeclaration" === nodeType || "FunctionExpression" === nodeType || "ObjectMethod" === nodeType || "ArrowFunctionExpression" === nodeType || "ClassMethod" === nodeType || "ClassPrivateMethod" === nodeType) {
  93927. if (typeof opts === "undefined") {
  93928. return true;
  93929. } else {
  93930. return (0, _shallowEqual.default)(node, opts);
  93931. }
  93932. }
  93933. return false;
  93934. }
  93935. function isFunctionParent(node, opts) {
  93936. if (!node)
  93937. return false;
  93938. const nodeType = node.type;
  93939. if ("FunctionDeclaration" === nodeType || "FunctionExpression" === nodeType || "ObjectMethod" === nodeType || "ArrowFunctionExpression" === nodeType || "ClassMethod" === nodeType || "ClassPrivateMethod" === nodeType) {
  93940. if (typeof opts === "undefined") {
  93941. return true;
  93942. } else {
  93943. return (0, _shallowEqual.default)(node, opts);
  93944. }
  93945. }
  93946. return false;
  93947. }
  93948. function isPureish(node, opts) {
  93949. if (!node)
  93950. return false;
  93951. const nodeType = node.type;
  93952. if ("FunctionDeclaration" === nodeType || "FunctionExpression" === nodeType || "StringLiteral" === nodeType || "NumericLiteral" === nodeType || "NullLiteral" === nodeType || "BooleanLiteral" === nodeType || "RegExpLiteral" === nodeType || "ArrowFunctionExpression" === nodeType || "BigIntLiteral" === nodeType || "DecimalLiteral" === nodeType || nodeType === "Placeholder" && "StringLiteral" === node.expectedNode) {
  93953. if (typeof opts === "undefined") {
  93954. return true;
  93955. } else {
  93956. return (0, _shallowEqual.default)(node, opts);
  93957. }
  93958. }
  93959. return false;
  93960. }
  93961. function isDeclaration2(node, opts) {
  93962. if (!node)
  93963. return false;
  93964. const nodeType = node.type;
  93965. if ("FunctionDeclaration" === nodeType || "VariableDeclaration" === nodeType || "ClassDeclaration" === nodeType || "ExportAllDeclaration" === nodeType || "ExportDefaultDeclaration" === nodeType || "ExportNamedDeclaration" === nodeType || "ImportDeclaration" === nodeType || "DeclareClass" === nodeType || "DeclareFunction" === nodeType || "DeclareInterface" === nodeType || "DeclareModule" === nodeType || "DeclareModuleExports" === nodeType || "DeclareTypeAlias" === nodeType || "DeclareOpaqueType" === nodeType || "DeclareVariable" === nodeType || "DeclareExportDeclaration" === nodeType || "DeclareExportAllDeclaration" === nodeType || "InterfaceDeclaration" === nodeType || "OpaqueType" === nodeType || "TypeAlias" === nodeType || "EnumDeclaration" === nodeType || "TSDeclareFunction" === nodeType || "TSInterfaceDeclaration" === nodeType || "TSTypeAliasDeclaration" === nodeType || "TSEnumDeclaration" === nodeType || "TSModuleDeclaration" === nodeType || nodeType === "Placeholder" && "Declaration" === node.expectedNode) {
  93966. if (typeof opts === "undefined") {
  93967. return true;
  93968. } else {
  93969. return (0, _shallowEqual.default)(node, opts);
  93970. }
  93971. }
  93972. return false;
  93973. }
  93974. function isPatternLike(node, opts) {
  93975. if (!node)
  93976. return false;
  93977. const nodeType = node.type;
  93978. if ("Identifier" === nodeType || "RestElement" === nodeType || "AssignmentPattern" === nodeType || "ArrayPattern" === nodeType || "ObjectPattern" === nodeType || nodeType === "Placeholder" && ("Pattern" === node.expectedNode || "Identifier" === node.expectedNode)) {
  93979. if (typeof opts === "undefined") {
  93980. return true;
  93981. } else {
  93982. return (0, _shallowEqual.default)(node, opts);
  93983. }
  93984. }
  93985. return false;
  93986. }
  93987. function isLVal(node, opts) {
  93988. if (!node)
  93989. return false;
  93990. const nodeType = node.type;
  93991. if ("Identifier" === nodeType || "MemberExpression" === nodeType || "RestElement" === nodeType || "AssignmentPattern" === nodeType || "ArrayPattern" === nodeType || "ObjectPattern" === nodeType || "TSParameterProperty" === nodeType || nodeType === "Placeholder" && ("Pattern" === node.expectedNode || "Identifier" === node.expectedNode)) {
  93992. if (typeof opts === "undefined") {
  93993. return true;
  93994. } else {
  93995. return (0, _shallowEqual.default)(node, opts);
  93996. }
  93997. }
  93998. return false;
  93999. }
  94000. function isTSEntityName(node, opts) {
  94001. if (!node)
  94002. return false;
  94003. const nodeType = node.type;
  94004. if ("Identifier" === nodeType || "TSQualifiedName" === nodeType || nodeType === "Placeholder" && "Identifier" === node.expectedNode) {
  94005. if (typeof opts === "undefined") {
  94006. return true;
  94007. } else {
  94008. return (0, _shallowEqual.default)(node, opts);
  94009. }
  94010. }
  94011. return false;
  94012. }
  94013. function isLiteral(node, opts) {
  94014. if (!node)
  94015. return false;
  94016. const nodeType = node.type;
  94017. if ("StringLiteral" === nodeType || "NumericLiteral" === nodeType || "NullLiteral" === nodeType || "BooleanLiteral" === nodeType || "RegExpLiteral" === nodeType || "TemplateLiteral" === nodeType || "BigIntLiteral" === nodeType || "DecimalLiteral" === nodeType || nodeType === "Placeholder" && "StringLiteral" === node.expectedNode) {
  94018. if (typeof opts === "undefined") {
  94019. return true;
  94020. } else {
  94021. return (0, _shallowEqual.default)(node, opts);
  94022. }
  94023. }
  94024. return false;
  94025. }
  94026. function isImmutable(node, opts) {
  94027. if (!node)
  94028. return false;
  94029. const nodeType = node.type;
  94030. if ("StringLiteral" === nodeType || "NumericLiteral" === nodeType || "NullLiteral" === nodeType || "BooleanLiteral" === nodeType || "BigIntLiteral" === nodeType || "JSXAttribute" === nodeType || "JSXClosingElement" === nodeType || "JSXElement" === nodeType || "JSXExpressionContainer" === nodeType || "JSXSpreadChild" === nodeType || "JSXOpeningElement" === nodeType || "JSXText" === nodeType || "JSXFragment" === nodeType || "JSXOpeningFragment" === nodeType || "JSXClosingFragment" === nodeType || "DecimalLiteral" === nodeType || nodeType === "Placeholder" && "StringLiteral" === node.expectedNode) {
  94031. if (typeof opts === "undefined") {
  94032. return true;
  94033. } else {
  94034. return (0, _shallowEqual.default)(node, opts);
  94035. }
  94036. }
  94037. return false;
  94038. }
  94039. function isUserWhitespacable(node, opts) {
  94040. if (!node)
  94041. return false;
  94042. const nodeType = node.type;
  94043. if ("ObjectMethod" === nodeType || "ObjectProperty" === nodeType || "ObjectTypeInternalSlot" === nodeType || "ObjectTypeCallProperty" === nodeType || "ObjectTypeIndexer" === nodeType || "ObjectTypeProperty" === nodeType || "ObjectTypeSpreadProperty" === nodeType) {
  94044. if (typeof opts === "undefined") {
  94045. return true;
  94046. } else {
  94047. return (0, _shallowEqual.default)(node, opts);
  94048. }
  94049. }
  94050. return false;
  94051. }
  94052. function isMethod(node, opts) {
  94053. if (!node)
  94054. return false;
  94055. const nodeType = node.type;
  94056. if ("ObjectMethod" === nodeType || "ClassMethod" === nodeType || "ClassPrivateMethod" === nodeType) {
  94057. if (typeof opts === "undefined") {
  94058. return true;
  94059. } else {
  94060. return (0, _shallowEqual.default)(node, opts);
  94061. }
  94062. }
  94063. return false;
  94064. }
  94065. function isObjectMember(node, opts) {
  94066. if (!node)
  94067. return false;
  94068. const nodeType = node.type;
  94069. if ("ObjectMethod" === nodeType || "ObjectProperty" === nodeType) {
  94070. if (typeof opts === "undefined") {
  94071. return true;
  94072. } else {
  94073. return (0, _shallowEqual.default)(node, opts);
  94074. }
  94075. }
  94076. return false;
  94077. }
  94078. function isProperty(node, opts) {
  94079. if (!node)
  94080. return false;
  94081. const nodeType = node.type;
  94082. if ("ObjectProperty" === nodeType || "ClassProperty" === nodeType || "ClassPrivateProperty" === nodeType) {
  94083. if (typeof opts === "undefined") {
  94084. return true;
  94085. } else {
  94086. return (0, _shallowEqual.default)(node, opts);
  94087. }
  94088. }
  94089. return false;
  94090. }
  94091. function isUnaryLike(node, opts) {
  94092. if (!node)
  94093. return false;
  94094. const nodeType = node.type;
  94095. if ("UnaryExpression" === nodeType || "SpreadElement" === nodeType) {
  94096. if (typeof opts === "undefined") {
  94097. return true;
  94098. } else {
  94099. return (0, _shallowEqual.default)(node, opts);
  94100. }
  94101. }
  94102. return false;
  94103. }
  94104. function isPattern(node, opts) {
  94105. if (!node)
  94106. return false;
  94107. const nodeType = node.type;
  94108. if ("AssignmentPattern" === nodeType || "ArrayPattern" === nodeType || "ObjectPattern" === nodeType || nodeType === "Placeholder" && "Pattern" === node.expectedNode) {
  94109. if (typeof opts === "undefined") {
  94110. return true;
  94111. } else {
  94112. return (0, _shallowEqual.default)(node, opts);
  94113. }
  94114. }
  94115. return false;
  94116. }
  94117. function isClass(node, opts) {
  94118. if (!node)
  94119. return false;
  94120. const nodeType = node.type;
  94121. if ("ClassExpression" === nodeType || "ClassDeclaration" === nodeType) {
  94122. if (typeof opts === "undefined") {
  94123. return true;
  94124. } else {
  94125. return (0, _shallowEqual.default)(node, opts);
  94126. }
  94127. }
  94128. return false;
  94129. }
  94130. function isModuleDeclaration(node, opts) {
  94131. if (!node)
  94132. return false;
  94133. const nodeType = node.type;
  94134. if ("ExportAllDeclaration" === nodeType || "ExportDefaultDeclaration" === nodeType || "ExportNamedDeclaration" === nodeType || "ImportDeclaration" === nodeType) {
  94135. if (typeof opts === "undefined") {
  94136. return true;
  94137. } else {
  94138. return (0, _shallowEqual.default)(node, opts);
  94139. }
  94140. }
  94141. return false;
  94142. }
  94143. function isExportDeclaration(node, opts) {
  94144. if (!node)
  94145. return false;
  94146. const nodeType = node.type;
  94147. if ("ExportAllDeclaration" === nodeType || "ExportDefaultDeclaration" === nodeType || "ExportNamedDeclaration" === nodeType) {
  94148. if (typeof opts === "undefined") {
  94149. return true;
  94150. } else {
  94151. return (0, _shallowEqual.default)(node, opts);
  94152. }
  94153. }
  94154. return false;
  94155. }
  94156. function isModuleSpecifier(node, opts) {
  94157. if (!node)
  94158. return false;
  94159. const nodeType = node.type;
  94160. if ("ExportSpecifier" === nodeType || "ImportDefaultSpecifier" === nodeType || "ImportNamespaceSpecifier" === nodeType || "ImportSpecifier" === nodeType || "ExportNamespaceSpecifier" === nodeType || "ExportDefaultSpecifier" === nodeType) {
  94161. if (typeof opts === "undefined") {
  94162. return true;
  94163. } else {
  94164. return (0, _shallowEqual.default)(node, opts);
  94165. }
  94166. }
  94167. return false;
  94168. }
  94169. function isFlow(node, opts) {
  94170. if (!node)
  94171. return false;
  94172. const nodeType = node.type;
  94173. if ("AnyTypeAnnotation" === nodeType || "ArrayTypeAnnotation" === nodeType || "BooleanTypeAnnotation" === nodeType || "BooleanLiteralTypeAnnotation" === nodeType || "NullLiteralTypeAnnotation" === nodeType || "ClassImplements" === nodeType || "DeclareClass" === nodeType || "DeclareFunction" === nodeType || "DeclareInterface" === nodeType || "DeclareModule" === nodeType || "DeclareModuleExports" === nodeType || "DeclareTypeAlias" === nodeType || "DeclareOpaqueType" === nodeType || "DeclareVariable" === nodeType || "DeclareExportDeclaration" === nodeType || "DeclareExportAllDeclaration" === nodeType || "DeclaredPredicate" === nodeType || "ExistsTypeAnnotation" === nodeType || "FunctionTypeAnnotation" === nodeType || "FunctionTypeParam" === nodeType || "GenericTypeAnnotation" === nodeType || "InferredPredicate" === nodeType || "InterfaceExtends" === nodeType || "InterfaceDeclaration" === nodeType || "InterfaceTypeAnnotation" === nodeType || "IntersectionTypeAnnotation" === nodeType || "MixedTypeAnnotation" === nodeType || "EmptyTypeAnnotation" === nodeType || "NullableTypeAnnotation" === nodeType || "NumberLiteralTypeAnnotation" === nodeType || "NumberTypeAnnotation" === nodeType || "ObjectTypeAnnotation" === nodeType || "ObjectTypeInternalSlot" === nodeType || "ObjectTypeCallProperty" === nodeType || "ObjectTypeIndexer" === nodeType || "ObjectTypeProperty" === nodeType || "ObjectTypeSpreadProperty" === nodeType || "OpaqueType" === nodeType || "QualifiedTypeIdentifier" === nodeType || "StringLiteralTypeAnnotation" === nodeType || "StringTypeAnnotation" === nodeType || "SymbolTypeAnnotation" === nodeType || "ThisTypeAnnotation" === nodeType || "TupleTypeAnnotation" === nodeType || "TypeofTypeAnnotation" === nodeType || "TypeAlias" === nodeType || "TypeAnnotation" === nodeType || "TypeCastExpression" === nodeType || "TypeParameter" === nodeType || "TypeParameterDeclaration" === nodeType || "TypeParameterInstantiation" === nodeType || "UnionTypeAnnotation" === nodeType || "Variance" === nodeType || "VoidTypeAnnotation" === nodeType || "IndexedAccessType" === nodeType || "OptionalIndexedAccessType" === nodeType) {
  94174. if (typeof opts === "undefined") {
  94175. return true;
  94176. } else {
  94177. return (0, _shallowEqual.default)(node, opts);
  94178. }
  94179. }
  94180. return false;
  94181. }
  94182. function isFlowType(node, opts) {
  94183. if (!node)
  94184. return false;
  94185. const nodeType = node.type;
  94186. if ("AnyTypeAnnotation" === nodeType || "ArrayTypeAnnotation" === nodeType || "BooleanTypeAnnotation" === nodeType || "BooleanLiteralTypeAnnotation" === nodeType || "NullLiteralTypeAnnotation" === nodeType || "ExistsTypeAnnotation" === nodeType || "FunctionTypeAnnotation" === nodeType || "GenericTypeAnnotation" === nodeType || "InterfaceTypeAnnotation" === nodeType || "IntersectionTypeAnnotation" === nodeType || "MixedTypeAnnotation" === nodeType || "EmptyTypeAnnotation" === nodeType || "NullableTypeAnnotation" === nodeType || "NumberLiteralTypeAnnotation" === nodeType || "NumberTypeAnnotation" === nodeType || "ObjectTypeAnnotation" === nodeType || "StringLiteralTypeAnnotation" === nodeType || "StringTypeAnnotation" === nodeType || "SymbolTypeAnnotation" === nodeType || "ThisTypeAnnotation" === nodeType || "TupleTypeAnnotation" === nodeType || "TypeofTypeAnnotation" === nodeType || "UnionTypeAnnotation" === nodeType || "VoidTypeAnnotation" === nodeType || "IndexedAccessType" === nodeType || "OptionalIndexedAccessType" === nodeType) {
  94187. if (typeof opts === "undefined") {
  94188. return true;
  94189. } else {
  94190. return (0, _shallowEqual.default)(node, opts);
  94191. }
  94192. }
  94193. return false;
  94194. }
  94195. function isFlowBaseAnnotation(node, opts) {
  94196. if (!node)
  94197. return false;
  94198. const nodeType = node.type;
  94199. if ("AnyTypeAnnotation" === nodeType || "BooleanTypeAnnotation" === nodeType || "NullLiteralTypeAnnotation" === nodeType || "MixedTypeAnnotation" === nodeType || "EmptyTypeAnnotation" === nodeType || "NumberTypeAnnotation" === nodeType || "StringTypeAnnotation" === nodeType || "SymbolTypeAnnotation" === nodeType || "ThisTypeAnnotation" === nodeType || "VoidTypeAnnotation" === nodeType) {
  94200. if (typeof opts === "undefined") {
  94201. return true;
  94202. } else {
  94203. return (0, _shallowEqual.default)(node, opts);
  94204. }
  94205. }
  94206. return false;
  94207. }
  94208. function isFlowDeclaration(node, opts) {
  94209. if (!node)
  94210. return false;
  94211. const nodeType = node.type;
  94212. if ("DeclareClass" === nodeType || "DeclareFunction" === nodeType || "DeclareInterface" === nodeType || "DeclareModule" === nodeType || "DeclareModuleExports" === nodeType || "DeclareTypeAlias" === nodeType || "DeclareOpaqueType" === nodeType || "DeclareVariable" === nodeType || "DeclareExportDeclaration" === nodeType || "DeclareExportAllDeclaration" === nodeType || "InterfaceDeclaration" === nodeType || "OpaqueType" === nodeType || "TypeAlias" === nodeType) {
  94213. if (typeof opts === "undefined") {
  94214. return true;
  94215. } else {
  94216. return (0, _shallowEqual.default)(node, opts);
  94217. }
  94218. }
  94219. return false;
  94220. }
  94221. function isFlowPredicate(node, opts) {
  94222. if (!node)
  94223. return false;
  94224. const nodeType = node.type;
  94225. if ("DeclaredPredicate" === nodeType || "InferredPredicate" === nodeType) {
  94226. if (typeof opts === "undefined") {
  94227. return true;
  94228. } else {
  94229. return (0, _shallowEqual.default)(node, opts);
  94230. }
  94231. }
  94232. return false;
  94233. }
  94234. function isEnumBody(node, opts) {
  94235. if (!node)
  94236. return false;
  94237. const nodeType = node.type;
  94238. if ("EnumBooleanBody" === nodeType || "EnumNumberBody" === nodeType || "EnumStringBody" === nodeType || "EnumSymbolBody" === nodeType) {
  94239. if (typeof opts === "undefined") {
  94240. return true;
  94241. } else {
  94242. return (0, _shallowEqual.default)(node, opts);
  94243. }
  94244. }
  94245. return false;
  94246. }
  94247. function isEnumMember(node, opts) {
  94248. if (!node)
  94249. return false;
  94250. const nodeType = node.type;
  94251. if ("EnumBooleanMember" === nodeType || "EnumNumberMember" === nodeType || "EnumStringMember" === nodeType || "EnumDefaultedMember" === nodeType) {
  94252. if (typeof opts === "undefined") {
  94253. return true;
  94254. } else {
  94255. return (0, _shallowEqual.default)(node, opts);
  94256. }
  94257. }
  94258. return false;
  94259. }
  94260. function isJSX(node, opts) {
  94261. if (!node)
  94262. return false;
  94263. const nodeType = node.type;
  94264. if ("JSXAttribute" === nodeType || "JSXClosingElement" === nodeType || "JSXElement" === nodeType || "JSXEmptyExpression" === nodeType || "JSXExpressionContainer" === nodeType || "JSXSpreadChild" === nodeType || "JSXIdentifier" === nodeType || "JSXMemberExpression" === nodeType || "JSXNamespacedName" === nodeType || "JSXOpeningElement" === nodeType || "JSXSpreadAttribute" === nodeType || "JSXText" === nodeType || "JSXFragment" === nodeType || "JSXOpeningFragment" === nodeType || "JSXClosingFragment" === nodeType) {
  94265. if (typeof opts === "undefined") {
  94266. return true;
  94267. } else {
  94268. return (0, _shallowEqual.default)(node, opts);
  94269. }
  94270. }
  94271. return false;
  94272. }
  94273. function isPrivate(node, opts) {
  94274. if (!node)
  94275. return false;
  94276. const nodeType = node.type;
  94277. if ("ClassPrivateProperty" === nodeType || "ClassPrivateMethod" === nodeType || "PrivateName" === nodeType) {
  94278. if (typeof opts === "undefined") {
  94279. return true;
  94280. } else {
  94281. return (0, _shallowEqual.default)(node, opts);
  94282. }
  94283. }
  94284. return false;
  94285. }
  94286. function isTSTypeElement(node, opts) {
  94287. if (!node)
  94288. return false;
  94289. const nodeType = node.type;
  94290. if ("TSCallSignatureDeclaration" === nodeType || "TSConstructSignatureDeclaration" === nodeType || "TSPropertySignature" === nodeType || "TSMethodSignature" === nodeType || "TSIndexSignature" === nodeType) {
  94291. if (typeof opts === "undefined") {
  94292. return true;
  94293. } else {
  94294. return (0, _shallowEqual.default)(node, opts);
  94295. }
  94296. }
  94297. return false;
  94298. }
  94299. function isTSType(node, opts) {
  94300. if (!node)
  94301. return false;
  94302. const nodeType = node.type;
  94303. if ("TSAnyKeyword" === nodeType || "TSBooleanKeyword" === nodeType || "TSBigIntKeyword" === nodeType || "TSIntrinsicKeyword" === nodeType || "TSNeverKeyword" === nodeType || "TSNullKeyword" === nodeType || "TSNumberKeyword" === nodeType || "TSObjectKeyword" === nodeType || "TSStringKeyword" === nodeType || "TSSymbolKeyword" === nodeType || "TSUndefinedKeyword" === nodeType || "TSUnknownKeyword" === nodeType || "TSVoidKeyword" === nodeType || "TSThisType" === nodeType || "TSFunctionType" === nodeType || "TSConstructorType" === nodeType || "TSTypeReference" === nodeType || "TSTypePredicate" === nodeType || "TSTypeQuery" === nodeType || "TSTypeLiteral" === nodeType || "TSArrayType" === nodeType || "TSTupleType" === nodeType || "TSOptionalType" === nodeType || "TSRestType" === nodeType || "TSUnionType" === nodeType || "TSIntersectionType" === nodeType || "TSConditionalType" === nodeType || "TSInferType" === nodeType || "TSParenthesizedType" === nodeType || "TSTypeOperator" === nodeType || "TSIndexedAccessType" === nodeType || "TSMappedType" === nodeType || "TSLiteralType" === nodeType || "TSExpressionWithTypeArguments" === nodeType || "TSImportType" === nodeType) {
  94304. if (typeof opts === "undefined") {
  94305. return true;
  94306. } else {
  94307. return (0, _shallowEqual.default)(node, opts);
  94308. }
  94309. }
  94310. return false;
  94311. }
  94312. function isTSBaseType(node, opts) {
  94313. if (!node)
  94314. return false;
  94315. const nodeType = node.type;
  94316. if ("TSAnyKeyword" === nodeType || "TSBooleanKeyword" === nodeType || "TSBigIntKeyword" === nodeType || "TSIntrinsicKeyword" === nodeType || "TSNeverKeyword" === nodeType || "TSNullKeyword" === nodeType || "TSNumberKeyword" === nodeType || "TSObjectKeyword" === nodeType || "TSStringKeyword" === nodeType || "TSSymbolKeyword" === nodeType || "TSUndefinedKeyword" === nodeType || "TSUnknownKeyword" === nodeType || "TSVoidKeyword" === nodeType || "TSThisType" === nodeType || "TSLiteralType" === nodeType) {
  94317. if (typeof opts === "undefined") {
  94318. return true;
  94319. } else {
  94320. return (0, _shallowEqual.default)(node, opts);
  94321. }
  94322. }
  94323. return false;
  94324. }
  94325. function isNumberLiteral(node, opts) {
  94326. console.trace("The node type NumberLiteral has been renamed to NumericLiteral");
  94327. if (!node)
  94328. return false;
  94329. const nodeType = node.type;
  94330. if (nodeType === "NumberLiteral") {
  94331. if (typeof opts === "undefined") {
  94332. return true;
  94333. } else {
  94334. return (0, _shallowEqual.default)(node, opts);
  94335. }
  94336. }
  94337. return false;
  94338. }
  94339. function isRegexLiteral(node, opts) {
  94340. console.trace("The node type RegexLiteral has been renamed to RegExpLiteral");
  94341. if (!node)
  94342. return false;
  94343. const nodeType = node.type;
  94344. if (nodeType === "RegexLiteral") {
  94345. if (typeof opts === "undefined") {
  94346. return true;
  94347. } else {
  94348. return (0, _shallowEqual.default)(node, opts);
  94349. }
  94350. }
  94351. return false;
  94352. }
  94353. function isRestProperty(node, opts) {
  94354. console.trace("The node type RestProperty has been renamed to RestElement");
  94355. if (!node)
  94356. return false;
  94357. const nodeType = node.type;
  94358. if (nodeType === "RestProperty") {
  94359. if (typeof opts === "undefined") {
  94360. return true;
  94361. } else {
  94362. return (0, _shallowEqual.default)(node, opts);
  94363. }
  94364. }
  94365. return false;
  94366. }
  94367. function isSpreadProperty(node, opts) {
  94368. console.trace("The node type SpreadProperty has been renamed to SpreadElement");
  94369. if (!node)
  94370. return false;
  94371. const nodeType = node.type;
  94372. if (nodeType === "SpreadProperty") {
  94373. if (typeof opts === "undefined") {
  94374. return true;
  94375. } else {
  94376. return (0, _shallowEqual.default)(node, opts);
  94377. }
  94378. }
  94379. return false;
  94380. }
  94381. }
  94382. });
  94383. // node_modules/@babel/helper-hoist-variables/node_modules/@babel/types/lib/validators/matchesPattern.js
  94384. var require_matchesPattern4 = __commonJS({
  94385. "node_modules/@babel/helper-hoist-variables/node_modules/@babel/types/lib/validators/matchesPattern.js"(exports) {
  94386. "use strict";
  94387. Object.defineProperty(exports, "__esModule", {
  94388. value: true
  94389. });
  94390. exports.default = matchesPattern;
  94391. var _generated = require_generated16();
  94392. function matchesPattern(member, match, allowPartial) {
  94393. if (!(0, _generated.isMemberExpression)(member))
  94394. return false;
  94395. const parts = Array.isArray(match) ? match : match.split(".");
  94396. const nodes = [];
  94397. let node;
  94398. for (node = member; (0, _generated.isMemberExpression)(node); node = node.object) {
  94399. nodes.push(node.property);
  94400. }
  94401. nodes.push(node);
  94402. if (nodes.length < parts.length)
  94403. return false;
  94404. if (!allowPartial && nodes.length > parts.length)
  94405. return false;
  94406. for (let i = 0, j = nodes.length - 1; i < parts.length; i++, j--) {
  94407. const node2 = nodes[j];
  94408. let value;
  94409. if ((0, _generated.isIdentifier)(node2)) {
  94410. value = node2.name;
  94411. } else if ((0, _generated.isStringLiteral)(node2)) {
  94412. value = node2.value;
  94413. } else if ((0, _generated.isThisExpression)(node2)) {
  94414. value = "this";
  94415. } else {
  94416. return false;
  94417. }
  94418. if (parts[i] !== value)
  94419. return false;
  94420. }
  94421. return true;
  94422. }
  94423. }
  94424. });
  94425. // node_modules/@babel/helper-hoist-variables/node_modules/@babel/types/lib/validators/buildMatchMemberExpression.js
  94426. var require_buildMatchMemberExpression4 = __commonJS({
  94427. "node_modules/@babel/helper-hoist-variables/node_modules/@babel/types/lib/validators/buildMatchMemberExpression.js"(exports) {
  94428. "use strict";
  94429. Object.defineProperty(exports, "__esModule", {
  94430. value: true
  94431. });
  94432. exports.default = buildMatchMemberExpression;
  94433. var _matchesPattern = require_matchesPattern4();
  94434. function buildMatchMemberExpression(match, allowPartial) {
  94435. const parts = match.split(".");
  94436. return (member) => (0, _matchesPattern.default)(member, parts, allowPartial);
  94437. }
  94438. }
  94439. });
  94440. // node_modules/@babel/helper-hoist-variables/node_modules/@babel/types/lib/validators/react/isReactComponent.js
  94441. var require_isReactComponent4 = __commonJS({
  94442. "node_modules/@babel/helper-hoist-variables/node_modules/@babel/types/lib/validators/react/isReactComponent.js"(exports) {
  94443. "use strict";
  94444. Object.defineProperty(exports, "__esModule", {
  94445. value: true
  94446. });
  94447. exports.default = void 0;
  94448. var _buildMatchMemberExpression = require_buildMatchMemberExpression4();
  94449. var isReactComponent = (0, _buildMatchMemberExpression.default)("React.Component");
  94450. var _default = isReactComponent;
  94451. exports.default = _default;
  94452. }
  94453. });
  94454. // node_modules/@babel/helper-hoist-variables/node_modules/@babel/types/lib/validators/react/isCompatTag.js
  94455. var require_isCompatTag4 = __commonJS({
  94456. "node_modules/@babel/helper-hoist-variables/node_modules/@babel/types/lib/validators/react/isCompatTag.js"(exports) {
  94457. "use strict";
  94458. Object.defineProperty(exports, "__esModule", {
  94459. value: true
  94460. });
  94461. exports.default = isCompatTag;
  94462. function isCompatTag(tagName) {
  94463. return !!tagName && /^[a-z]/.test(tagName);
  94464. }
  94465. }
  94466. });
  94467. // node_modules/@babel/helper-hoist-variables/node_modules/@babel/types/lib/validators/isType.js
  94468. var require_isType4 = __commonJS({
  94469. "node_modules/@babel/helper-hoist-variables/node_modules/@babel/types/lib/validators/isType.js"(exports) {
  94470. "use strict";
  94471. Object.defineProperty(exports, "__esModule", {
  94472. value: true
  94473. });
  94474. exports.default = isType;
  94475. var _definitions = require_definitions4();
  94476. function isType(nodeType, targetType) {
  94477. if (nodeType === targetType)
  94478. return true;
  94479. if (_definitions.ALIAS_KEYS[targetType])
  94480. return false;
  94481. const aliases = _definitions.FLIPPED_ALIAS_KEYS[targetType];
  94482. if (aliases) {
  94483. if (aliases[0] === nodeType)
  94484. return true;
  94485. for (const alias of aliases) {
  94486. if (nodeType === alias)
  94487. return true;
  94488. }
  94489. }
  94490. return false;
  94491. }
  94492. }
  94493. });
  94494. // node_modules/@babel/helper-hoist-variables/node_modules/@babel/types/lib/validators/isPlaceholderType.js
  94495. var require_isPlaceholderType4 = __commonJS({
  94496. "node_modules/@babel/helper-hoist-variables/node_modules/@babel/types/lib/validators/isPlaceholderType.js"(exports) {
  94497. "use strict";
  94498. Object.defineProperty(exports, "__esModule", {
  94499. value: true
  94500. });
  94501. exports.default = isPlaceholderType;
  94502. var _definitions = require_definitions4();
  94503. function isPlaceholderType(placeholderType, targetType) {
  94504. if (placeholderType === targetType)
  94505. return true;
  94506. const aliases = _definitions.PLACEHOLDERS_ALIAS[placeholderType];
  94507. if (aliases) {
  94508. for (const alias of aliases) {
  94509. if (targetType === alias)
  94510. return true;
  94511. }
  94512. }
  94513. return false;
  94514. }
  94515. }
  94516. });
  94517. // node_modules/@babel/helper-hoist-variables/node_modules/@babel/types/lib/validators/is.js
  94518. var require_is4 = __commonJS({
  94519. "node_modules/@babel/helper-hoist-variables/node_modules/@babel/types/lib/validators/is.js"(exports) {
  94520. "use strict";
  94521. Object.defineProperty(exports, "__esModule", {
  94522. value: true
  94523. });
  94524. exports.default = is;
  94525. var _shallowEqual = require_shallowEqual4();
  94526. var _isType = require_isType4();
  94527. var _isPlaceholderType = require_isPlaceholderType4();
  94528. var _definitions = require_definitions4();
  94529. function is(type, node, opts) {
  94530. if (!node)
  94531. return false;
  94532. const matches = (0, _isType.default)(node.type, type);
  94533. if (!matches) {
  94534. if (!opts && node.type === "Placeholder" && type in _definitions.FLIPPED_ALIAS_KEYS) {
  94535. return (0, _isPlaceholderType.default)(node.expectedNode, type);
  94536. }
  94537. return false;
  94538. }
  94539. if (typeof opts === "undefined") {
  94540. return true;
  94541. } else {
  94542. return (0, _shallowEqual.default)(node, opts);
  94543. }
  94544. }
  94545. }
  94546. });
  94547. // node_modules/@babel/helper-hoist-variables/node_modules/@babel/helper-validator-identifier/lib/identifier.js
  94548. var require_identifier6 = __commonJS({
  94549. "node_modules/@babel/helper-hoist-variables/node_modules/@babel/helper-validator-identifier/lib/identifier.js"(exports) {
  94550. "use strict";
  94551. Object.defineProperty(exports, "__esModule", {
  94552. value: true
  94553. });
  94554. exports.isIdentifierStart = isIdentifierStart2;
  94555. exports.isIdentifierChar = isIdentifierChar2;
  94556. exports.isIdentifierName = isIdentifierName;
  94557. var nonASCIIidentifierStartChars2 = "\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u08A0-\u08B4\u08B6-\u08C7\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1878\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309B-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u31BF\u31F0-\u31FF\u3400-\u4DBF\u4E00-\u9FFC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7BF\uA7C2-\uA7CA\uA7F5-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC";
  94558. var nonASCIIidentifierChars2 = "\u200C\u200D\xB7\u0300-\u036F\u0387\u0483-\u0487\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u0669\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u06F0-\u06F9\u0711\u0730-\u074A\u07A6-\u07B0\u07C0-\u07C9\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u08D3-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0966-\u096F\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u09E6-\u09EF\u09FE\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A66-\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0AE6-\u0AEF\u0AFA-\u0AFF\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B55-\u0B57\u0B62\u0B63\u0B66-\u0B6F\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0BE6-\u0BEF\u0C00-\u0C04\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C66-\u0C6F\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0CE6-\u0CEF\u0D00-\u0D03\u0D3B\u0D3C\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D66-\u0D6F\u0D81-\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0E50-\u0E59\u0EB1\u0EB4-\u0EBC\u0EC8-\u0ECD\u0ED0-\u0ED9\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1040-\u1049\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F-\u109D\u135D-\u135F\u1369-\u1371\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u18A9\u1920-\u192B\u1930-\u193B\u1946-\u194F\u19D0-\u19DA\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AB0-\u1ABD\u1ABF\u1AC0\u1B00-\u1B04\u1B34-\u1B44\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BB0-\u1BB9\u1BE6-\u1BF3\u1C24-\u1C37\u1C40-\u1C49\u1C50-\u1C59\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF4\u1CF7-\u1CF9\u1DC0-\u1DF9\u1DFB-\u1DFF\u203F\u2040\u2054\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA620-\uA629\uA66F\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA82C\uA880\uA881\uA8B4-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F1\uA8FF-\uA909\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9D0-\uA9D9\uA9E5\uA9F0-\uA9F9\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA50-\uAA59\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uABF0-\uABF9\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFF10-\uFF19\uFF3F";
  94559. var nonASCIIidentifierStart2 = new RegExp("[" + nonASCIIidentifierStartChars2 + "]");
  94560. var nonASCIIidentifier2 = new RegExp("[" + nonASCIIidentifierStartChars2 + nonASCIIidentifierChars2 + "]");
  94561. nonASCIIidentifierStartChars2 = nonASCIIidentifierChars2 = null;
  94562. var astralIdentifierStartCodes2 = [0, 11, 2, 25, 2, 18, 2, 1, 2, 14, 3, 13, 35, 122, 70, 52, 268, 28, 4, 48, 48, 31, 14, 29, 6, 37, 11, 29, 3, 35, 5, 7, 2, 4, 43, 157, 19, 35, 5, 35, 5, 39, 9, 51, 157, 310, 10, 21, 11, 7, 153, 5, 3, 0, 2, 43, 2, 1, 4, 0, 3, 22, 11, 22, 10, 30, 66, 18, 2, 1, 11, 21, 11, 25, 71, 55, 7, 1, 65, 0, 16, 3, 2, 2, 2, 28, 43, 28, 4, 28, 36, 7, 2, 27, 28, 53, 11, 21, 11, 18, 14, 17, 111, 72, 56, 50, 14, 50, 14, 35, 349, 41, 7, 1, 79, 28, 11, 0, 9, 21, 107, 20, 28, 22, 13, 52, 76, 44, 33, 24, 27, 35, 30, 0, 3, 0, 9, 34, 4, 0, 13, 47, 15, 3, 22, 0, 2, 0, 36, 17, 2, 24, 85, 6, 2, 0, 2, 3, 2, 14, 2, 9, 8, 46, 39, 7, 3, 1, 3, 21, 2, 6, 2, 1, 2, 4, 4, 0, 19, 0, 13, 4, 159, 52, 19, 3, 21, 2, 31, 47, 21, 1, 2, 0, 185, 46, 42, 3, 37, 47, 21, 0, 60, 42, 14, 0, 72, 26, 230, 43, 117, 63, 32, 7, 3, 0, 3, 7, 2, 1, 2, 23, 16, 0, 2, 0, 95, 7, 3, 38, 17, 0, 2, 0, 29, 0, 11, 39, 8, 0, 22, 0, 12, 45, 20, 0, 35, 56, 264, 8, 2, 36, 18, 0, 50, 29, 113, 6, 2, 1, 2, 37, 22, 0, 26, 5, 2, 1, 2, 31, 15, 0, 328, 18, 190, 0, 80, 921, 103, 110, 18, 195, 2749, 1070, 4050, 582, 8634, 568, 8, 30, 114, 29, 19, 47, 17, 3, 32, 20, 6, 18, 689, 63, 129, 74, 6, 0, 67, 12, 65, 1, 2, 0, 29, 6135, 9, 1237, 43, 8, 8952, 286, 50, 2, 18, 3, 9, 395, 2309, 106, 6, 12, 4, 8, 8, 9, 5991, 84, 2, 70, 2, 1, 3, 0, 3, 1, 3, 3, 2, 11, 2, 0, 2, 6, 2, 64, 2, 3, 3, 7, 2, 6, 2, 27, 2, 3, 2, 4, 2, 0, 4, 6, 2, 339, 3, 24, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 7, 2357, 44, 11, 6, 17, 0, 370, 43, 1301, 196, 60, 67, 8, 0, 1205, 3, 2, 26, 2, 1, 2, 0, 3, 0, 2, 9, 2, 3, 2, 0, 2, 0, 7, 0, 5, 0, 2, 0, 2, 0, 2, 2, 2, 1, 2, 0, 3, 0, 2, 0, 2, 0, 2, 0, 2, 0, 2, 1, 2, 0, 3, 3, 2, 6, 2, 3, 2, 3, 2, 0, 2, 9, 2, 16, 6, 2, 2, 4, 2, 16, 4421, 42717, 35, 4148, 12, 221, 3, 5761, 15, 7472, 3104, 541, 1507, 4938];
  94563. var astralIdentifierCodes2 = [509, 0, 227, 0, 150, 4, 294, 9, 1368, 2, 2, 1, 6, 3, 41, 2, 5, 0, 166, 1, 574, 3, 9, 9, 370, 1, 154, 10, 176, 2, 54, 14, 32, 9, 16, 3, 46, 10, 54, 9, 7, 2, 37, 13, 2, 9, 6, 1, 45, 0, 13, 2, 49, 13, 9, 3, 2, 11, 83, 11, 7, 0, 161, 11, 6, 9, 7, 3, 56, 1, 2, 6, 3, 1, 3, 2, 10, 0, 11, 1, 3, 6, 4, 4, 193, 17, 10, 9, 5, 0, 82, 19, 13, 9, 214, 6, 3, 8, 28, 1, 83, 16, 16, 9, 82, 12, 9, 9, 84, 14, 5, 9, 243, 14, 166, 9, 71, 5, 2, 1, 3, 3, 2, 0, 2, 1, 13, 9, 120, 6, 3, 6, 4, 0, 29, 9, 41, 6, 2, 3, 9, 0, 10, 10, 47, 15, 406, 7, 2, 7, 17, 9, 57, 21, 2, 13, 123, 5, 4, 0, 2, 1, 2, 6, 2, 0, 9, 9, 49, 4, 2, 1, 2, 4, 9, 9, 330, 3, 19306, 9, 135, 4, 60, 6, 26, 9, 1014, 0, 2, 54, 8, 3, 82, 0, 12, 1, 19628, 1, 5319, 4, 4, 5, 9, 7, 3, 6, 31, 3, 149, 2, 1418, 49, 513, 54, 5, 49, 9, 0, 15, 0, 23, 4, 2, 14, 1361, 6, 2, 16, 3, 6, 2, 1, 2, 4, 262, 6, 10, 9, 419, 13, 1495, 6, 110, 6, 6, 9, 4759, 9, 787719, 239];
  94564. function isInAstralSet2(code2, set) {
  94565. let pos = 65536;
  94566. for (let i = 0, length = set.length; i < length; i += 2) {
  94567. pos += set[i];
  94568. if (pos > code2)
  94569. return false;
  94570. pos += set[i + 1];
  94571. if (pos >= code2)
  94572. return true;
  94573. }
  94574. return false;
  94575. }
  94576. function isIdentifierStart2(code2) {
  94577. if (code2 < 65)
  94578. return code2 === 36;
  94579. if (code2 <= 90)
  94580. return true;
  94581. if (code2 < 97)
  94582. return code2 === 95;
  94583. if (code2 <= 122)
  94584. return true;
  94585. if (code2 <= 65535) {
  94586. return code2 >= 170 && nonASCIIidentifierStart2.test(String.fromCharCode(code2));
  94587. }
  94588. return isInAstralSet2(code2, astralIdentifierStartCodes2);
  94589. }
  94590. function isIdentifierChar2(code2) {
  94591. if (code2 < 48)
  94592. return code2 === 36;
  94593. if (code2 < 58)
  94594. return true;
  94595. if (code2 < 65)
  94596. return false;
  94597. if (code2 <= 90)
  94598. return true;
  94599. if (code2 < 97)
  94600. return code2 === 95;
  94601. if (code2 <= 122)
  94602. return true;
  94603. if (code2 <= 65535) {
  94604. return code2 >= 170 && nonASCIIidentifier2.test(String.fromCharCode(code2));
  94605. }
  94606. return isInAstralSet2(code2, astralIdentifierStartCodes2) || isInAstralSet2(code2, astralIdentifierCodes2);
  94607. }
  94608. function isIdentifierName(name2) {
  94609. let isFirst = true;
  94610. for (let i = 0; i < name2.length; i++) {
  94611. let cp = name2.charCodeAt(i);
  94612. if ((cp & 64512) === 55296 && i + 1 < name2.length) {
  94613. const trail = name2.charCodeAt(++i);
  94614. if ((trail & 64512) === 56320) {
  94615. cp = 65536 + ((cp & 1023) << 10) + (trail & 1023);
  94616. }
  94617. }
  94618. if (isFirst) {
  94619. isFirst = false;
  94620. if (!isIdentifierStart2(cp)) {
  94621. return false;
  94622. }
  94623. } else if (!isIdentifierChar2(cp)) {
  94624. return false;
  94625. }
  94626. }
  94627. return !isFirst;
  94628. }
  94629. }
  94630. });
  94631. // node_modules/@babel/helper-hoist-variables/node_modules/@babel/helper-validator-identifier/lib/keyword.js
  94632. var require_keyword6 = __commonJS({
  94633. "node_modules/@babel/helper-hoist-variables/node_modules/@babel/helper-validator-identifier/lib/keyword.js"(exports) {
  94634. "use strict";
  94635. Object.defineProperty(exports, "__esModule", {
  94636. value: true
  94637. });
  94638. exports.isReservedWord = isReservedWord;
  94639. exports.isStrictReservedWord = isStrictReservedWord;
  94640. exports.isStrictBindOnlyReservedWord = isStrictBindOnlyReservedWord;
  94641. exports.isStrictBindReservedWord = isStrictBindReservedWord;
  94642. exports.isKeyword = isKeyword;
  94643. var reservedWords2 = {
  94644. keyword: ["break", "case", "catch", "continue", "debugger", "default", "do", "else", "finally", "for", "function", "if", "return", "switch", "throw", "try", "var", "const", "while", "with", "new", "this", "super", "class", "extends", "export", "import", "null", "true", "false", "in", "instanceof", "typeof", "void", "delete"],
  94645. strict: ["implements", "interface", "let", "package", "private", "protected", "public", "static", "yield"],
  94646. strictBind: ["eval", "arguments"]
  94647. };
  94648. var keywords2 = new Set(reservedWords2.keyword);
  94649. var reservedWordsStrictSet = new Set(reservedWords2.strict);
  94650. var reservedWordsStrictBindSet = new Set(reservedWords2.strictBind);
  94651. function isReservedWord(word, inModule) {
  94652. return inModule && word === "await" || word === "enum";
  94653. }
  94654. function isStrictReservedWord(word, inModule) {
  94655. return isReservedWord(word, inModule) || reservedWordsStrictSet.has(word);
  94656. }
  94657. function isStrictBindOnlyReservedWord(word) {
  94658. return reservedWordsStrictBindSet.has(word);
  94659. }
  94660. function isStrictBindReservedWord(word, inModule) {
  94661. return isStrictReservedWord(word, inModule) || isStrictBindOnlyReservedWord(word);
  94662. }
  94663. function isKeyword(word) {
  94664. return keywords2.has(word);
  94665. }
  94666. }
  94667. });
  94668. // node_modules/@babel/helper-hoist-variables/node_modules/@babel/helper-validator-identifier/lib/index.js
  94669. var require_lib23 = __commonJS({
  94670. "node_modules/@babel/helper-hoist-variables/node_modules/@babel/helper-validator-identifier/lib/index.js"(exports) {
  94671. "use strict";
  94672. Object.defineProperty(exports, "__esModule", {
  94673. value: true
  94674. });
  94675. Object.defineProperty(exports, "isIdentifierName", {
  94676. enumerable: true,
  94677. get: function() {
  94678. return _identifier.isIdentifierName;
  94679. }
  94680. });
  94681. Object.defineProperty(exports, "isIdentifierChar", {
  94682. enumerable: true,
  94683. get: function() {
  94684. return _identifier.isIdentifierChar;
  94685. }
  94686. });
  94687. Object.defineProperty(exports, "isIdentifierStart", {
  94688. enumerable: true,
  94689. get: function() {
  94690. return _identifier.isIdentifierStart;
  94691. }
  94692. });
  94693. Object.defineProperty(exports, "isReservedWord", {
  94694. enumerable: true,
  94695. get: function() {
  94696. return _keyword.isReservedWord;
  94697. }
  94698. });
  94699. Object.defineProperty(exports, "isStrictBindOnlyReservedWord", {
  94700. enumerable: true,
  94701. get: function() {
  94702. return _keyword.isStrictBindOnlyReservedWord;
  94703. }
  94704. });
  94705. Object.defineProperty(exports, "isStrictBindReservedWord", {
  94706. enumerable: true,
  94707. get: function() {
  94708. return _keyword.isStrictBindReservedWord;
  94709. }
  94710. });
  94711. Object.defineProperty(exports, "isStrictReservedWord", {
  94712. enumerable: true,
  94713. get: function() {
  94714. return _keyword.isStrictReservedWord;
  94715. }
  94716. });
  94717. Object.defineProperty(exports, "isKeyword", {
  94718. enumerable: true,
  94719. get: function() {
  94720. return _keyword.isKeyword;
  94721. }
  94722. });
  94723. var _identifier = require_identifier6();
  94724. var _keyword = require_keyword6();
  94725. }
  94726. });
  94727. // node_modules/@babel/helper-hoist-variables/node_modules/@babel/types/lib/validators/isValidIdentifier.js
  94728. var require_isValidIdentifier4 = __commonJS({
  94729. "node_modules/@babel/helper-hoist-variables/node_modules/@babel/types/lib/validators/isValidIdentifier.js"(exports) {
  94730. "use strict";
  94731. Object.defineProperty(exports, "__esModule", {
  94732. value: true
  94733. });
  94734. exports.default = isValidIdentifier;
  94735. var _helperValidatorIdentifier = require_lib23();
  94736. function isValidIdentifier(name2, reserved = true) {
  94737. if (typeof name2 !== "string")
  94738. return false;
  94739. if (reserved) {
  94740. if ((0, _helperValidatorIdentifier.isKeyword)(name2) || (0, _helperValidatorIdentifier.isStrictReservedWord)(name2, true)) {
  94741. return false;
  94742. }
  94743. }
  94744. return (0, _helperValidatorIdentifier.isIdentifierName)(name2);
  94745. }
  94746. }
  94747. });
  94748. // node_modules/@babel/helper-hoist-variables/node_modules/@babel/types/lib/constants/index.js
  94749. var require_constants4 = __commonJS({
  94750. "node_modules/@babel/helper-hoist-variables/node_modules/@babel/types/lib/constants/index.js"(exports) {
  94751. "use strict";
  94752. Object.defineProperty(exports, "__esModule", {
  94753. value: true
  94754. });
  94755. exports.NOT_LOCAL_BINDING = exports.BLOCK_SCOPED_SYMBOL = exports.INHERIT_KEYS = exports.UNARY_OPERATORS = exports.STRING_UNARY_OPERATORS = exports.NUMBER_UNARY_OPERATORS = exports.BOOLEAN_UNARY_OPERATORS = exports.ASSIGNMENT_OPERATORS = exports.BINARY_OPERATORS = exports.NUMBER_BINARY_OPERATORS = exports.BOOLEAN_BINARY_OPERATORS = exports.COMPARISON_BINARY_OPERATORS = exports.EQUALITY_BINARY_OPERATORS = exports.BOOLEAN_NUMBER_BINARY_OPERATORS = exports.UPDATE_OPERATORS = exports.LOGICAL_OPERATORS = exports.COMMENT_KEYS = exports.FOR_INIT_KEYS = exports.FLATTENABLE_KEYS = exports.STATEMENT_OR_BLOCK_KEYS = void 0;
  94756. var STATEMENT_OR_BLOCK_KEYS = ["consequent", "body", "alternate"];
  94757. exports.STATEMENT_OR_BLOCK_KEYS = STATEMENT_OR_BLOCK_KEYS;
  94758. var FLATTENABLE_KEYS = ["body", "expressions"];
  94759. exports.FLATTENABLE_KEYS = FLATTENABLE_KEYS;
  94760. var FOR_INIT_KEYS = ["left", "init"];
  94761. exports.FOR_INIT_KEYS = FOR_INIT_KEYS;
  94762. var COMMENT_KEYS = ["leadingComments", "trailingComments", "innerComments"];
  94763. exports.COMMENT_KEYS = COMMENT_KEYS;
  94764. var LOGICAL_OPERATORS = ["||", "&&", "??"];
  94765. exports.LOGICAL_OPERATORS = LOGICAL_OPERATORS;
  94766. var UPDATE_OPERATORS = ["++", "--"];
  94767. exports.UPDATE_OPERATORS = UPDATE_OPERATORS;
  94768. var BOOLEAN_NUMBER_BINARY_OPERATORS = [">", "<", ">=", "<="];
  94769. exports.BOOLEAN_NUMBER_BINARY_OPERATORS = BOOLEAN_NUMBER_BINARY_OPERATORS;
  94770. var EQUALITY_BINARY_OPERATORS = ["==", "===", "!=", "!=="];
  94771. exports.EQUALITY_BINARY_OPERATORS = EQUALITY_BINARY_OPERATORS;
  94772. var COMPARISON_BINARY_OPERATORS = [...EQUALITY_BINARY_OPERATORS, "in", "instanceof"];
  94773. exports.COMPARISON_BINARY_OPERATORS = COMPARISON_BINARY_OPERATORS;
  94774. var BOOLEAN_BINARY_OPERATORS = [...COMPARISON_BINARY_OPERATORS, ...BOOLEAN_NUMBER_BINARY_OPERATORS];
  94775. exports.BOOLEAN_BINARY_OPERATORS = BOOLEAN_BINARY_OPERATORS;
  94776. var NUMBER_BINARY_OPERATORS = ["-", "/", "%", "*", "**", "&", "|", ">>", ">>>", "<<", "^"];
  94777. exports.NUMBER_BINARY_OPERATORS = NUMBER_BINARY_OPERATORS;
  94778. var BINARY_OPERATORS = ["+", ...NUMBER_BINARY_OPERATORS, ...BOOLEAN_BINARY_OPERATORS];
  94779. exports.BINARY_OPERATORS = BINARY_OPERATORS;
  94780. var ASSIGNMENT_OPERATORS = ["=", "+=", ...NUMBER_BINARY_OPERATORS.map((op) => op + "="), ...LOGICAL_OPERATORS.map((op) => op + "=")];
  94781. exports.ASSIGNMENT_OPERATORS = ASSIGNMENT_OPERATORS;
  94782. var BOOLEAN_UNARY_OPERATORS = ["delete", "!"];
  94783. exports.BOOLEAN_UNARY_OPERATORS = BOOLEAN_UNARY_OPERATORS;
  94784. var NUMBER_UNARY_OPERATORS = ["+", "-", "~"];
  94785. exports.NUMBER_UNARY_OPERATORS = NUMBER_UNARY_OPERATORS;
  94786. var STRING_UNARY_OPERATORS = ["typeof"];
  94787. exports.STRING_UNARY_OPERATORS = STRING_UNARY_OPERATORS;
  94788. var UNARY_OPERATORS = ["void", "throw", ...BOOLEAN_UNARY_OPERATORS, ...NUMBER_UNARY_OPERATORS, ...STRING_UNARY_OPERATORS];
  94789. exports.UNARY_OPERATORS = UNARY_OPERATORS;
  94790. var INHERIT_KEYS = {
  94791. optional: ["typeAnnotation", "typeParameters", "returnType"],
  94792. force: ["start", "loc", "end"]
  94793. };
  94794. exports.INHERIT_KEYS = INHERIT_KEYS;
  94795. var BLOCK_SCOPED_SYMBOL = Symbol.for("var used to be block scoped");
  94796. exports.BLOCK_SCOPED_SYMBOL = BLOCK_SCOPED_SYMBOL;
  94797. var NOT_LOCAL_BINDING = Symbol.for("should not be considered a local binding");
  94798. exports.NOT_LOCAL_BINDING = NOT_LOCAL_BINDING;
  94799. }
  94800. });
  94801. // node_modules/@babel/helper-hoist-variables/node_modules/@babel/types/lib/validators/validate.js
  94802. var require_validate4 = __commonJS({
  94803. "node_modules/@babel/helper-hoist-variables/node_modules/@babel/types/lib/validators/validate.js"(exports) {
  94804. "use strict";
  94805. Object.defineProperty(exports, "__esModule", {
  94806. value: true
  94807. });
  94808. exports.default = validate;
  94809. exports.validateField = validateField;
  94810. exports.validateChild = validateChild;
  94811. var _definitions = require_definitions4();
  94812. function validate(node, key, val) {
  94813. if (!node)
  94814. return;
  94815. const fields = _definitions.NODE_FIELDS[node.type];
  94816. if (!fields)
  94817. return;
  94818. const field = fields[key];
  94819. validateField(node, key, val, field);
  94820. validateChild(node, key, val);
  94821. }
  94822. function validateField(node, key, val, field) {
  94823. if (!(field != null && field.validate))
  94824. return;
  94825. if (field.optional && val == null)
  94826. return;
  94827. field.validate(node, key, val);
  94828. }
  94829. function validateChild(node, key, val) {
  94830. if (val == null)
  94831. return;
  94832. const validate2 = _definitions.NODE_PARENT_VALIDATIONS[val.type];
  94833. if (!validate2)
  94834. return;
  94835. validate2(node, key, val);
  94836. }
  94837. }
  94838. });
  94839. // node_modules/@babel/helper-hoist-variables/node_modules/@babel/types/lib/definitions/utils.js
  94840. var require_utils4 = __commonJS({
  94841. "node_modules/@babel/helper-hoist-variables/node_modules/@babel/types/lib/definitions/utils.js"(exports) {
  94842. "use strict";
  94843. Object.defineProperty(exports, "__esModule", {
  94844. value: true
  94845. });
  94846. exports.validate = validate;
  94847. exports.typeIs = typeIs;
  94848. exports.validateType = validateType;
  94849. exports.validateOptional = validateOptional;
  94850. exports.validateOptionalType = validateOptionalType;
  94851. exports.arrayOf = arrayOf;
  94852. exports.arrayOfType = arrayOfType;
  94853. exports.validateArrayOfType = validateArrayOfType;
  94854. exports.assertEach = assertEach;
  94855. exports.assertOneOf = assertOneOf;
  94856. exports.assertNodeType = assertNodeType;
  94857. exports.assertNodeOrValueType = assertNodeOrValueType;
  94858. exports.assertValueType = assertValueType;
  94859. exports.assertShape = assertShape;
  94860. exports.assertOptionalChainStart = assertOptionalChainStart;
  94861. exports.chain = chain;
  94862. exports.default = defineType;
  94863. exports.NODE_PARENT_VALIDATIONS = exports.DEPRECATED_KEYS = exports.BUILDER_KEYS = exports.NODE_FIELDS = exports.FLIPPED_ALIAS_KEYS = exports.ALIAS_KEYS = exports.VISITOR_KEYS = void 0;
  94864. var _is = require_is4();
  94865. var _validate = require_validate4();
  94866. var VISITOR_KEYS = {};
  94867. exports.VISITOR_KEYS = VISITOR_KEYS;
  94868. var ALIAS_KEYS = {};
  94869. exports.ALIAS_KEYS = ALIAS_KEYS;
  94870. var FLIPPED_ALIAS_KEYS = {};
  94871. exports.FLIPPED_ALIAS_KEYS = FLIPPED_ALIAS_KEYS;
  94872. var NODE_FIELDS = {};
  94873. exports.NODE_FIELDS = NODE_FIELDS;
  94874. var BUILDER_KEYS = {};
  94875. exports.BUILDER_KEYS = BUILDER_KEYS;
  94876. var DEPRECATED_KEYS = {};
  94877. exports.DEPRECATED_KEYS = DEPRECATED_KEYS;
  94878. var NODE_PARENT_VALIDATIONS = {};
  94879. exports.NODE_PARENT_VALIDATIONS = NODE_PARENT_VALIDATIONS;
  94880. function getType(val) {
  94881. if (Array.isArray(val)) {
  94882. return "array";
  94883. } else if (val === null) {
  94884. return "null";
  94885. } else {
  94886. return typeof val;
  94887. }
  94888. }
  94889. function validate(validate2) {
  94890. return {
  94891. validate: validate2
  94892. };
  94893. }
  94894. function typeIs(typeName) {
  94895. return typeof typeName === "string" ? assertNodeType(typeName) : assertNodeType(...typeName);
  94896. }
  94897. function validateType(typeName) {
  94898. return validate(typeIs(typeName));
  94899. }
  94900. function validateOptional(validate2) {
  94901. return {
  94902. validate: validate2,
  94903. optional: true
  94904. };
  94905. }
  94906. function validateOptionalType(typeName) {
  94907. return {
  94908. validate: typeIs(typeName),
  94909. optional: true
  94910. };
  94911. }
  94912. function arrayOf(elementType) {
  94913. return chain(assertValueType("array"), assertEach(elementType));
  94914. }
  94915. function arrayOfType(typeName) {
  94916. return arrayOf(typeIs(typeName));
  94917. }
  94918. function validateArrayOfType(typeName) {
  94919. return validate(arrayOfType(typeName));
  94920. }
  94921. function assertEach(callback) {
  94922. function validator(node, key, val) {
  94923. if (!Array.isArray(val))
  94924. return;
  94925. for (let i = 0; i < val.length; i++) {
  94926. const subkey = `${key}[${i}]`;
  94927. const v = val[i];
  94928. callback(node, subkey, v);
  94929. if (process.env.BABEL_TYPES_8_BREAKING)
  94930. (0, _validate.validateChild)(node, subkey, v);
  94931. }
  94932. }
  94933. validator.each = callback;
  94934. return validator;
  94935. }
  94936. function assertOneOf(...values) {
  94937. function validate2(node, key, val) {
  94938. if (values.indexOf(val) < 0) {
  94939. throw new TypeError(`Property ${key} expected value to be one of ${JSON.stringify(values)} but got ${JSON.stringify(val)}`);
  94940. }
  94941. }
  94942. validate2.oneOf = values;
  94943. return validate2;
  94944. }
  94945. function assertNodeType(...types2) {
  94946. function validate2(node, key, val) {
  94947. for (const type of types2) {
  94948. if ((0, _is.default)(type, val)) {
  94949. (0, _validate.validateChild)(node, key, val);
  94950. return;
  94951. }
  94952. }
  94953. throw new TypeError(`Property ${key} of ${node.type} expected node to be of a type ${JSON.stringify(types2)} but instead got ${JSON.stringify(val == null ? void 0 : val.type)}`);
  94954. }
  94955. validate2.oneOfNodeTypes = types2;
  94956. return validate2;
  94957. }
  94958. function assertNodeOrValueType(...types2) {
  94959. function validate2(node, key, val) {
  94960. for (const type of types2) {
  94961. if (getType(val) === type || (0, _is.default)(type, val)) {
  94962. (0, _validate.validateChild)(node, key, val);
  94963. return;
  94964. }
  94965. }
  94966. throw new TypeError(`Property ${key} of ${node.type} expected node to be of a type ${JSON.stringify(types2)} but instead got ${JSON.stringify(val == null ? void 0 : val.type)}`);
  94967. }
  94968. validate2.oneOfNodeOrValueTypes = types2;
  94969. return validate2;
  94970. }
  94971. function assertValueType(type) {
  94972. function validate2(node, key, val) {
  94973. const valid2 = getType(val) === type;
  94974. if (!valid2) {
  94975. throw new TypeError(`Property ${key} expected type of ${type} but got ${getType(val)}`);
  94976. }
  94977. }
  94978. validate2.type = type;
  94979. return validate2;
  94980. }
  94981. function assertShape(shape) {
  94982. function validate2(node, key, val) {
  94983. const errors = [];
  94984. for (const property of Object.keys(shape)) {
  94985. try {
  94986. (0, _validate.validateField)(node, property, val[property], shape[property]);
  94987. } catch (error) {
  94988. if (error instanceof TypeError) {
  94989. errors.push(error.message);
  94990. continue;
  94991. }
  94992. throw error;
  94993. }
  94994. }
  94995. if (errors.length) {
  94996. throw new TypeError(`Property ${key} of ${node.type} expected to have the following:
  94997. ${errors.join("\n")}`);
  94998. }
  94999. }
  95000. validate2.shapeOf = shape;
  95001. return validate2;
  95002. }
  95003. function assertOptionalChainStart() {
  95004. function validate2(node) {
  95005. var _current;
  95006. let current2 = node;
  95007. while (node) {
  95008. const {
  95009. type
  95010. } = current2;
  95011. if (type === "OptionalCallExpression") {
  95012. if (current2.optional)
  95013. return;
  95014. current2 = current2.callee;
  95015. continue;
  95016. }
  95017. if (type === "OptionalMemberExpression") {
  95018. if (current2.optional)
  95019. return;
  95020. current2 = current2.object;
  95021. continue;
  95022. }
  95023. break;
  95024. }
  95025. throw new TypeError(`Non-optional ${node.type} must chain from an optional OptionalMemberExpression or OptionalCallExpression. Found chain from ${(_current = current2) == null ? void 0 : _current.type}`);
  95026. }
  95027. return validate2;
  95028. }
  95029. function chain(...fns) {
  95030. function validate2(...args) {
  95031. for (const fn of fns) {
  95032. fn(...args);
  95033. }
  95034. }
  95035. validate2.chainOf = fns;
  95036. if (fns.length >= 2 && "type" in fns[0] && fns[0].type === "array" && !("each" in fns[1])) {
  95037. throw new Error(`An assertValueType("array") validator can only be followed by an assertEach(...) validator.`);
  95038. }
  95039. return validate2;
  95040. }
  95041. var validTypeOpts = ["aliases", "builder", "deprecatedAlias", "fields", "inherits", "visitor", "validate"];
  95042. var validFieldKeys = ["default", "optional", "validate"];
  95043. function defineType(type, opts = {}) {
  95044. const inherits = opts.inherits && store[opts.inherits] || {};
  95045. let fields = opts.fields;
  95046. if (!fields) {
  95047. fields = {};
  95048. if (inherits.fields) {
  95049. const keys2 = Object.getOwnPropertyNames(inherits.fields);
  95050. for (const key of keys2) {
  95051. const field = inherits.fields[key];
  95052. const def = field.default;
  95053. if (Array.isArray(def) ? def.length > 0 : def && typeof def === "object") {
  95054. throw new Error("field defaults can only be primitives or empty arrays currently");
  95055. }
  95056. fields[key] = {
  95057. default: Array.isArray(def) ? [] : def,
  95058. optional: field.optional,
  95059. validate: field.validate
  95060. };
  95061. }
  95062. }
  95063. }
  95064. const visitor = opts.visitor || inherits.visitor || [];
  95065. const aliases = opts.aliases || inherits.aliases || [];
  95066. const builder = opts.builder || inherits.builder || opts.visitor || [];
  95067. for (const k of Object.keys(opts)) {
  95068. if (validTypeOpts.indexOf(k) === -1) {
  95069. throw new Error(`Unknown type option "${k}" on ${type}`);
  95070. }
  95071. }
  95072. if (opts.deprecatedAlias) {
  95073. DEPRECATED_KEYS[opts.deprecatedAlias] = type;
  95074. }
  95075. for (const key of visitor.concat(builder)) {
  95076. fields[key] = fields[key] || {};
  95077. }
  95078. for (const key of Object.keys(fields)) {
  95079. const field = fields[key];
  95080. if (field.default !== void 0 && builder.indexOf(key) === -1) {
  95081. field.optional = true;
  95082. }
  95083. if (field.default === void 0) {
  95084. field.default = null;
  95085. } else if (!field.validate && field.default != null) {
  95086. field.validate = assertValueType(getType(field.default));
  95087. }
  95088. for (const k of Object.keys(field)) {
  95089. if (validFieldKeys.indexOf(k) === -1) {
  95090. throw new Error(`Unknown field key "${k}" on ${type}.${key}`);
  95091. }
  95092. }
  95093. }
  95094. VISITOR_KEYS[type] = opts.visitor = visitor;
  95095. BUILDER_KEYS[type] = opts.builder = builder;
  95096. NODE_FIELDS[type] = opts.fields = fields;
  95097. ALIAS_KEYS[type] = opts.aliases = aliases;
  95098. aliases.forEach((alias) => {
  95099. FLIPPED_ALIAS_KEYS[alias] = FLIPPED_ALIAS_KEYS[alias] || [];
  95100. FLIPPED_ALIAS_KEYS[alias].push(type);
  95101. });
  95102. if (opts.validate) {
  95103. NODE_PARENT_VALIDATIONS[type] = opts.validate;
  95104. }
  95105. store[type] = opts;
  95106. }
  95107. var store = {};
  95108. }
  95109. });
  95110. // node_modules/@babel/helper-hoist-variables/node_modules/@babel/types/lib/definitions/core.js
  95111. var require_core4 = __commonJS({
  95112. "node_modules/@babel/helper-hoist-variables/node_modules/@babel/types/lib/definitions/core.js"(exports) {
  95113. "use strict";
  95114. Object.defineProperty(exports, "__esModule", {
  95115. value: true
  95116. });
  95117. exports.classMethodOrDeclareMethodCommon = exports.classMethodOrPropertyCommon = exports.patternLikeCommon = exports.functionDeclarationCommon = exports.functionTypeAnnotationCommon = exports.functionCommon = void 0;
  95118. var _is = require_is4();
  95119. var _isValidIdentifier = require_isValidIdentifier4();
  95120. var _helperValidatorIdentifier = require_lib23();
  95121. var _constants = require_constants4();
  95122. var _utils = require_utils4();
  95123. (0, _utils.default)("ArrayExpression", {
  95124. fields: {
  95125. elements: {
  95126. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeOrValueType)("null", "Expression", "SpreadElement"))),
  95127. default: !process.env.BABEL_TYPES_8_BREAKING ? [] : void 0
  95128. }
  95129. },
  95130. visitor: ["elements"],
  95131. aliases: ["Expression"]
  95132. });
  95133. (0, _utils.default)("AssignmentExpression", {
  95134. fields: {
  95135. operator: {
  95136. validate: function() {
  95137. if (!process.env.BABEL_TYPES_8_BREAKING) {
  95138. return (0, _utils.assertValueType)("string");
  95139. }
  95140. const identifier = (0, _utils.assertOneOf)(..._constants.ASSIGNMENT_OPERATORS);
  95141. const pattern = (0, _utils.assertOneOf)("=");
  95142. return function(node, key, val) {
  95143. const validator = (0, _is.default)("Pattern", node.left) ? pattern : identifier;
  95144. validator(node, key, val);
  95145. };
  95146. }()
  95147. },
  95148. left: {
  95149. validate: !process.env.BABEL_TYPES_8_BREAKING ? (0, _utils.assertNodeType)("LVal") : (0, _utils.assertNodeType)("Identifier", "MemberExpression", "ArrayPattern", "ObjectPattern")
  95150. },
  95151. right: {
  95152. validate: (0, _utils.assertNodeType)("Expression")
  95153. }
  95154. },
  95155. builder: ["operator", "left", "right"],
  95156. visitor: ["left", "right"],
  95157. aliases: ["Expression"]
  95158. });
  95159. (0, _utils.default)("BinaryExpression", {
  95160. builder: ["operator", "left", "right"],
  95161. fields: {
  95162. operator: {
  95163. validate: (0, _utils.assertOneOf)(..._constants.BINARY_OPERATORS)
  95164. },
  95165. left: {
  95166. validate: function() {
  95167. const expression = (0, _utils.assertNodeType)("Expression");
  95168. const inOp = (0, _utils.assertNodeType)("Expression", "PrivateName");
  95169. const validator = function(node, key, val) {
  95170. const validator2 = node.operator === "in" ? inOp : expression;
  95171. validator2(node, key, val);
  95172. };
  95173. validator.oneOfNodeTypes = ["Expression", "PrivateName"];
  95174. return validator;
  95175. }()
  95176. },
  95177. right: {
  95178. validate: (0, _utils.assertNodeType)("Expression")
  95179. }
  95180. },
  95181. visitor: ["left", "right"],
  95182. aliases: ["Binary", "Expression"]
  95183. });
  95184. (0, _utils.default)("InterpreterDirective", {
  95185. builder: ["value"],
  95186. fields: {
  95187. value: {
  95188. validate: (0, _utils.assertValueType)("string")
  95189. }
  95190. }
  95191. });
  95192. (0, _utils.default)("Directive", {
  95193. visitor: ["value"],
  95194. fields: {
  95195. value: {
  95196. validate: (0, _utils.assertNodeType)("DirectiveLiteral")
  95197. }
  95198. }
  95199. });
  95200. (0, _utils.default)("DirectiveLiteral", {
  95201. builder: ["value"],
  95202. fields: {
  95203. value: {
  95204. validate: (0, _utils.assertValueType)("string")
  95205. }
  95206. }
  95207. });
  95208. (0, _utils.default)("BlockStatement", {
  95209. builder: ["body", "directives"],
  95210. visitor: ["directives", "body"],
  95211. fields: {
  95212. directives: {
  95213. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Directive"))),
  95214. default: []
  95215. },
  95216. body: {
  95217. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Statement")))
  95218. }
  95219. },
  95220. aliases: ["Scopable", "BlockParent", "Block", "Statement"]
  95221. });
  95222. (0, _utils.default)("BreakStatement", {
  95223. visitor: ["label"],
  95224. fields: {
  95225. label: {
  95226. validate: (0, _utils.assertNodeType)("Identifier"),
  95227. optional: true
  95228. }
  95229. },
  95230. aliases: ["Statement", "Terminatorless", "CompletionStatement"]
  95231. });
  95232. (0, _utils.default)("CallExpression", {
  95233. visitor: ["callee", "arguments", "typeParameters", "typeArguments"],
  95234. builder: ["callee", "arguments"],
  95235. aliases: ["Expression"],
  95236. fields: Object.assign({
  95237. callee: {
  95238. validate: (0, _utils.assertNodeType)("Expression", "V8IntrinsicIdentifier")
  95239. },
  95240. arguments: {
  95241. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Expression", "SpreadElement", "JSXNamespacedName", "ArgumentPlaceholder")))
  95242. }
  95243. }, !process.env.BABEL_TYPES_8_BREAKING ? {
  95244. optional: {
  95245. validate: (0, _utils.assertOneOf)(true, false),
  95246. optional: true
  95247. }
  95248. } : {}, {
  95249. typeArguments: {
  95250. validate: (0, _utils.assertNodeType)("TypeParameterInstantiation"),
  95251. optional: true
  95252. },
  95253. typeParameters: {
  95254. validate: (0, _utils.assertNodeType)("TSTypeParameterInstantiation"),
  95255. optional: true
  95256. }
  95257. })
  95258. });
  95259. (0, _utils.default)("CatchClause", {
  95260. visitor: ["param", "body"],
  95261. fields: {
  95262. param: {
  95263. validate: (0, _utils.assertNodeType)("Identifier", "ArrayPattern", "ObjectPattern"),
  95264. optional: true
  95265. },
  95266. body: {
  95267. validate: (0, _utils.assertNodeType)("BlockStatement")
  95268. }
  95269. },
  95270. aliases: ["Scopable", "BlockParent"]
  95271. });
  95272. (0, _utils.default)("ConditionalExpression", {
  95273. visitor: ["test", "consequent", "alternate"],
  95274. fields: {
  95275. test: {
  95276. validate: (0, _utils.assertNodeType)("Expression")
  95277. },
  95278. consequent: {
  95279. validate: (0, _utils.assertNodeType)("Expression")
  95280. },
  95281. alternate: {
  95282. validate: (0, _utils.assertNodeType)("Expression")
  95283. }
  95284. },
  95285. aliases: ["Expression", "Conditional"]
  95286. });
  95287. (0, _utils.default)("ContinueStatement", {
  95288. visitor: ["label"],
  95289. fields: {
  95290. label: {
  95291. validate: (0, _utils.assertNodeType)("Identifier"),
  95292. optional: true
  95293. }
  95294. },
  95295. aliases: ["Statement", "Terminatorless", "CompletionStatement"]
  95296. });
  95297. (0, _utils.default)("DebuggerStatement", {
  95298. aliases: ["Statement"]
  95299. });
  95300. (0, _utils.default)("DoWhileStatement", {
  95301. visitor: ["test", "body"],
  95302. fields: {
  95303. test: {
  95304. validate: (0, _utils.assertNodeType)("Expression")
  95305. },
  95306. body: {
  95307. validate: (0, _utils.assertNodeType)("Statement")
  95308. }
  95309. },
  95310. aliases: ["Statement", "BlockParent", "Loop", "While", "Scopable"]
  95311. });
  95312. (0, _utils.default)("EmptyStatement", {
  95313. aliases: ["Statement"]
  95314. });
  95315. (0, _utils.default)("ExpressionStatement", {
  95316. visitor: ["expression"],
  95317. fields: {
  95318. expression: {
  95319. validate: (0, _utils.assertNodeType)("Expression")
  95320. }
  95321. },
  95322. aliases: ["Statement", "ExpressionWrapper"]
  95323. });
  95324. (0, _utils.default)("File", {
  95325. builder: ["program", "comments", "tokens"],
  95326. visitor: ["program"],
  95327. fields: {
  95328. program: {
  95329. validate: (0, _utils.assertNodeType)("Program")
  95330. },
  95331. comments: {
  95332. validate: !process.env.BABEL_TYPES_8_BREAKING ? Object.assign(() => {
  95333. }, {
  95334. each: {
  95335. oneOfNodeTypes: ["CommentBlock", "CommentLine"]
  95336. }
  95337. }) : (0, _utils.assertEach)((0, _utils.assertNodeType)("CommentBlock", "CommentLine")),
  95338. optional: true
  95339. },
  95340. tokens: {
  95341. validate: (0, _utils.assertEach)(Object.assign(() => {
  95342. }, {
  95343. type: "any"
  95344. })),
  95345. optional: true
  95346. }
  95347. }
  95348. });
  95349. (0, _utils.default)("ForInStatement", {
  95350. visitor: ["left", "right", "body"],
  95351. aliases: ["Scopable", "Statement", "For", "BlockParent", "Loop", "ForXStatement"],
  95352. fields: {
  95353. left: {
  95354. validate: !process.env.BABEL_TYPES_8_BREAKING ? (0, _utils.assertNodeType)("VariableDeclaration", "LVal") : (0, _utils.assertNodeType)("VariableDeclaration", "Identifier", "MemberExpression", "ArrayPattern", "ObjectPattern")
  95355. },
  95356. right: {
  95357. validate: (0, _utils.assertNodeType)("Expression")
  95358. },
  95359. body: {
  95360. validate: (0, _utils.assertNodeType)("Statement")
  95361. }
  95362. }
  95363. });
  95364. (0, _utils.default)("ForStatement", {
  95365. visitor: ["init", "test", "update", "body"],
  95366. aliases: ["Scopable", "Statement", "For", "BlockParent", "Loop"],
  95367. fields: {
  95368. init: {
  95369. validate: (0, _utils.assertNodeType)("VariableDeclaration", "Expression"),
  95370. optional: true
  95371. },
  95372. test: {
  95373. validate: (0, _utils.assertNodeType)("Expression"),
  95374. optional: true
  95375. },
  95376. update: {
  95377. validate: (0, _utils.assertNodeType)("Expression"),
  95378. optional: true
  95379. },
  95380. body: {
  95381. validate: (0, _utils.assertNodeType)("Statement")
  95382. }
  95383. }
  95384. });
  95385. var functionCommon = {
  95386. params: {
  95387. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Identifier", "Pattern", "RestElement")))
  95388. },
  95389. generator: {
  95390. default: false
  95391. },
  95392. async: {
  95393. default: false
  95394. }
  95395. };
  95396. exports.functionCommon = functionCommon;
  95397. var functionTypeAnnotationCommon = {
  95398. returnType: {
  95399. validate: (0, _utils.assertNodeType)("TypeAnnotation", "TSTypeAnnotation", "Noop"),
  95400. optional: true
  95401. },
  95402. typeParameters: {
  95403. validate: (0, _utils.assertNodeType)("TypeParameterDeclaration", "TSTypeParameterDeclaration", "Noop"),
  95404. optional: true
  95405. }
  95406. };
  95407. exports.functionTypeAnnotationCommon = functionTypeAnnotationCommon;
  95408. var functionDeclarationCommon = Object.assign({}, functionCommon, {
  95409. declare: {
  95410. validate: (0, _utils.assertValueType)("boolean"),
  95411. optional: true
  95412. },
  95413. id: {
  95414. validate: (0, _utils.assertNodeType)("Identifier"),
  95415. optional: true
  95416. }
  95417. });
  95418. exports.functionDeclarationCommon = functionDeclarationCommon;
  95419. (0, _utils.default)("FunctionDeclaration", {
  95420. builder: ["id", "params", "body", "generator", "async"],
  95421. visitor: ["id", "params", "body", "returnType", "typeParameters"],
  95422. fields: Object.assign({}, functionDeclarationCommon, functionTypeAnnotationCommon, {
  95423. body: {
  95424. validate: (0, _utils.assertNodeType)("BlockStatement")
  95425. }
  95426. }),
  95427. aliases: ["Scopable", "Function", "BlockParent", "FunctionParent", "Statement", "Pureish", "Declaration"],
  95428. validate: function() {
  95429. if (!process.env.BABEL_TYPES_8_BREAKING)
  95430. return () => {
  95431. };
  95432. const identifier = (0, _utils.assertNodeType)("Identifier");
  95433. return function(parent, key, node) {
  95434. if (!(0, _is.default)("ExportDefaultDeclaration", parent)) {
  95435. identifier(node, "id", node.id);
  95436. }
  95437. };
  95438. }()
  95439. });
  95440. (0, _utils.default)("FunctionExpression", {
  95441. inherits: "FunctionDeclaration",
  95442. aliases: ["Scopable", "Function", "BlockParent", "FunctionParent", "Expression", "Pureish"],
  95443. fields: Object.assign({}, functionCommon, functionTypeAnnotationCommon, {
  95444. id: {
  95445. validate: (0, _utils.assertNodeType)("Identifier"),
  95446. optional: true
  95447. },
  95448. body: {
  95449. validate: (0, _utils.assertNodeType)("BlockStatement")
  95450. }
  95451. })
  95452. });
  95453. var patternLikeCommon = {
  95454. typeAnnotation: {
  95455. validate: (0, _utils.assertNodeType)("TypeAnnotation", "TSTypeAnnotation", "Noop"),
  95456. optional: true
  95457. },
  95458. decorators: {
  95459. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Decorator")))
  95460. }
  95461. };
  95462. exports.patternLikeCommon = patternLikeCommon;
  95463. (0, _utils.default)("Identifier", {
  95464. builder: ["name"],
  95465. visitor: ["typeAnnotation", "decorators"],
  95466. aliases: ["Expression", "PatternLike", "LVal", "TSEntityName"],
  95467. fields: Object.assign({}, patternLikeCommon, {
  95468. name: {
  95469. validate: (0, _utils.chain)((0, _utils.assertValueType)("string"), Object.assign(function(node, key, val) {
  95470. if (!process.env.BABEL_TYPES_8_BREAKING)
  95471. return;
  95472. if (!(0, _isValidIdentifier.default)(val, false)) {
  95473. throw new TypeError(`"${val}" is not a valid identifier name`);
  95474. }
  95475. }, {
  95476. type: "string"
  95477. }))
  95478. },
  95479. optional: {
  95480. validate: (0, _utils.assertValueType)("boolean"),
  95481. optional: true
  95482. }
  95483. }),
  95484. validate(parent, key, node) {
  95485. if (!process.env.BABEL_TYPES_8_BREAKING)
  95486. return;
  95487. const match = /\.(\w+)$/.exec(key);
  95488. if (!match)
  95489. return;
  95490. const [, parentKey] = match;
  95491. const nonComp = {
  95492. computed: false
  95493. };
  95494. if (parentKey === "property") {
  95495. if ((0, _is.default)("MemberExpression", parent, nonComp))
  95496. return;
  95497. if ((0, _is.default)("OptionalMemberExpression", parent, nonComp))
  95498. return;
  95499. } else if (parentKey === "key") {
  95500. if ((0, _is.default)("Property", parent, nonComp))
  95501. return;
  95502. if ((0, _is.default)("Method", parent, nonComp))
  95503. return;
  95504. } else if (parentKey === "exported") {
  95505. if ((0, _is.default)("ExportSpecifier", parent))
  95506. return;
  95507. } else if (parentKey === "imported") {
  95508. if ((0, _is.default)("ImportSpecifier", parent, {
  95509. imported: node
  95510. }))
  95511. return;
  95512. } else if (parentKey === "meta") {
  95513. if ((0, _is.default)("MetaProperty", parent, {
  95514. meta: node
  95515. }))
  95516. return;
  95517. }
  95518. if (((0, _helperValidatorIdentifier.isKeyword)(node.name) || (0, _helperValidatorIdentifier.isReservedWord)(node.name, false)) && node.name !== "this") {
  95519. throw new TypeError(`"${node.name}" is not a valid identifier`);
  95520. }
  95521. }
  95522. });
  95523. (0, _utils.default)("IfStatement", {
  95524. visitor: ["test", "consequent", "alternate"],
  95525. aliases: ["Statement", "Conditional"],
  95526. fields: {
  95527. test: {
  95528. validate: (0, _utils.assertNodeType)("Expression")
  95529. },
  95530. consequent: {
  95531. validate: (0, _utils.assertNodeType)("Statement")
  95532. },
  95533. alternate: {
  95534. optional: true,
  95535. validate: (0, _utils.assertNodeType)("Statement")
  95536. }
  95537. }
  95538. });
  95539. (0, _utils.default)("LabeledStatement", {
  95540. visitor: ["label", "body"],
  95541. aliases: ["Statement"],
  95542. fields: {
  95543. label: {
  95544. validate: (0, _utils.assertNodeType)("Identifier")
  95545. },
  95546. body: {
  95547. validate: (0, _utils.assertNodeType)("Statement")
  95548. }
  95549. }
  95550. });
  95551. (0, _utils.default)("StringLiteral", {
  95552. builder: ["value"],
  95553. fields: {
  95554. value: {
  95555. validate: (0, _utils.assertValueType)("string")
  95556. }
  95557. },
  95558. aliases: ["Expression", "Pureish", "Literal", "Immutable"]
  95559. });
  95560. (0, _utils.default)("NumericLiteral", {
  95561. builder: ["value"],
  95562. deprecatedAlias: "NumberLiteral",
  95563. fields: {
  95564. value: {
  95565. validate: (0, _utils.assertValueType)("number")
  95566. }
  95567. },
  95568. aliases: ["Expression", "Pureish", "Literal", "Immutable"]
  95569. });
  95570. (0, _utils.default)("NullLiteral", {
  95571. aliases: ["Expression", "Pureish", "Literal", "Immutable"]
  95572. });
  95573. (0, _utils.default)("BooleanLiteral", {
  95574. builder: ["value"],
  95575. fields: {
  95576. value: {
  95577. validate: (0, _utils.assertValueType)("boolean")
  95578. }
  95579. },
  95580. aliases: ["Expression", "Pureish", "Literal", "Immutable"]
  95581. });
  95582. (0, _utils.default)("RegExpLiteral", {
  95583. builder: ["pattern", "flags"],
  95584. deprecatedAlias: "RegexLiteral",
  95585. aliases: ["Expression", "Pureish", "Literal"],
  95586. fields: {
  95587. pattern: {
  95588. validate: (0, _utils.assertValueType)("string")
  95589. },
  95590. flags: {
  95591. validate: (0, _utils.chain)((0, _utils.assertValueType)("string"), Object.assign(function(node, key, val) {
  95592. if (!process.env.BABEL_TYPES_8_BREAKING)
  95593. return;
  95594. const invalid2 = /[^gimsuy]/.exec(val);
  95595. if (invalid2) {
  95596. throw new TypeError(`"${invalid2[0]}" is not a valid RegExp flag`);
  95597. }
  95598. }, {
  95599. type: "string"
  95600. })),
  95601. default: ""
  95602. }
  95603. }
  95604. });
  95605. (0, _utils.default)("LogicalExpression", {
  95606. builder: ["operator", "left", "right"],
  95607. visitor: ["left", "right"],
  95608. aliases: ["Binary", "Expression"],
  95609. fields: {
  95610. operator: {
  95611. validate: (0, _utils.assertOneOf)(..._constants.LOGICAL_OPERATORS)
  95612. },
  95613. left: {
  95614. validate: (0, _utils.assertNodeType)("Expression")
  95615. },
  95616. right: {
  95617. validate: (0, _utils.assertNodeType)("Expression")
  95618. }
  95619. }
  95620. });
  95621. (0, _utils.default)("MemberExpression", {
  95622. builder: ["object", "property", "computed", ...!process.env.BABEL_TYPES_8_BREAKING ? ["optional"] : []],
  95623. visitor: ["object", "property"],
  95624. aliases: ["Expression", "LVal"],
  95625. fields: Object.assign({
  95626. object: {
  95627. validate: (0, _utils.assertNodeType)("Expression")
  95628. },
  95629. property: {
  95630. validate: function() {
  95631. const normal = (0, _utils.assertNodeType)("Identifier", "PrivateName");
  95632. const computed = (0, _utils.assertNodeType)("Expression");
  95633. const validator = function(node, key, val) {
  95634. const validator2 = node.computed ? computed : normal;
  95635. validator2(node, key, val);
  95636. };
  95637. validator.oneOfNodeTypes = ["Expression", "Identifier", "PrivateName"];
  95638. return validator;
  95639. }()
  95640. },
  95641. computed: {
  95642. default: false
  95643. }
  95644. }, !process.env.BABEL_TYPES_8_BREAKING ? {
  95645. optional: {
  95646. validate: (0, _utils.assertOneOf)(true, false),
  95647. optional: true
  95648. }
  95649. } : {})
  95650. });
  95651. (0, _utils.default)("NewExpression", {
  95652. inherits: "CallExpression"
  95653. });
  95654. (0, _utils.default)("Program", {
  95655. visitor: ["directives", "body"],
  95656. builder: ["body", "directives", "sourceType", "interpreter"],
  95657. fields: {
  95658. sourceFile: {
  95659. validate: (0, _utils.assertValueType)("string")
  95660. },
  95661. sourceType: {
  95662. validate: (0, _utils.assertOneOf)("script", "module"),
  95663. default: "script"
  95664. },
  95665. interpreter: {
  95666. validate: (0, _utils.assertNodeType)("InterpreterDirective"),
  95667. default: null,
  95668. optional: true
  95669. },
  95670. directives: {
  95671. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Directive"))),
  95672. default: []
  95673. },
  95674. body: {
  95675. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Statement")))
  95676. }
  95677. },
  95678. aliases: ["Scopable", "BlockParent", "Block"]
  95679. });
  95680. (0, _utils.default)("ObjectExpression", {
  95681. visitor: ["properties"],
  95682. aliases: ["Expression"],
  95683. fields: {
  95684. properties: {
  95685. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("ObjectMethod", "ObjectProperty", "SpreadElement")))
  95686. }
  95687. }
  95688. });
  95689. (0, _utils.default)("ObjectMethod", {
  95690. builder: ["kind", "key", "params", "body", "computed", "generator", "async"],
  95691. fields: Object.assign({}, functionCommon, functionTypeAnnotationCommon, {
  95692. kind: Object.assign({
  95693. validate: (0, _utils.assertOneOf)("method", "get", "set")
  95694. }, !process.env.BABEL_TYPES_8_BREAKING ? {
  95695. default: "method"
  95696. } : {}),
  95697. computed: {
  95698. default: false
  95699. },
  95700. key: {
  95701. validate: function() {
  95702. const normal = (0, _utils.assertNodeType)("Identifier", "StringLiteral", "NumericLiteral");
  95703. const computed = (0, _utils.assertNodeType)("Expression");
  95704. const validator = function(node, key, val) {
  95705. const validator2 = node.computed ? computed : normal;
  95706. validator2(node, key, val);
  95707. };
  95708. validator.oneOfNodeTypes = ["Expression", "Identifier", "StringLiteral", "NumericLiteral"];
  95709. return validator;
  95710. }()
  95711. },
  95712. decorators: {
  95713. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Decorator"))),
  95714. optional: true
  95715. },
  95716. body: {
  95717. validate: (0, _utils.assertNodeType)("BlockStatement")
  95718. }
  95719. }),
  95720. visitor: ["key", "params", "body", "decorators", "returnType", "typeParameters"],
  95721. aliases: ["UserWhitespacable", "Function", "Scopable", "BlockParent", "FunctionParent", "Method", "ObjectMember"]
  95722. });
  95723. (0, _utils.default)("ObjectProperty", {
  95724. builder: ["key", "value", "computed", "shorthand", ...!process.env.BABEL_TYPES_8_BREAKING ? ["decorators"] : []],
  95725. fields: {
  95726. computed: {
  95727. default: false
  95728. },
  95729. key: {
  95730. validate: function() {
  95731. const normal = (0, _utils.assertNodeType)("Identifier", "StringLiteral", "NumericLiteral");
  95732. const computed = (0, _utils.assertNodeType)("Expression");
  95733. const validator = function(node, key, val) {
  95734. const validator2 = node.computed ? computed : normal;
  95735. validator2(node, key, val);
  95736. };
  95737. validator.oneOfNodeTypes = ["Expression", "Identifier", "StringLiteral", "NumericLiteral"];
  95738. return validator;
  95739. }()
  95740. },
  95741. value: {
  95742. validate: (0, _utils.assertNodeType)("Expression", "PatternLike")
  95743. },
  95744. shorthand: {
  95745. validate: (0, _utils.chain)((0, _utils.assertValueType)("boolean"), Object.assign(function(node, key, val) {
  95746. if (!process.env.BABEL_TYPES_8_BREAKING)
  95747. return;
  95748. if (val && node.computed) {
  95749. throw new TypeError("Property shorthand of ObjectProperty cannot be true if computed is true");
  95750. }
  95751. }, {
  95752. type: "boolean"
  95753. }), function(node, key, val) {
  95754. if (!process.env.BABEL_TYPES_8_BREAKING)
  95755. return;
  95756. if (val && !(0, _is.default)("Identifier", node.key)) {
  95757. throw new TypeError("Property shorthand of ObjectProperty cannot be true if key is not an Identifier");
  95758. }
  95759. }),
  95760. default: false
  95761. },
  95762. decorators: {
  95763. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Decorator"))),
  95764. optional: true
  95765. }
  95766. },
  95767. visitor: ["key", "value", "decorators"],
  95768. aliases: ["UserWhitespacable", "Property", "ObjectMember"],
  95769. validate: function() {
  95770. const pattern = (0, _utils.assertNodeType)("Identifier", "Pattern");
  95771. const expression = (0, _utils.assertNodeType)("Expression");
  95772. return function(parent, key, node) {
  95773. if (!process.env.BABEL_TYPES_8_BREAKING)
  95774. return;
  95775. const validator = (0, _is.default)("ObjectPattern", parent) ? pattern : expression;
  95776. validator(node, "value", node.value);
  95777. };
  95778. }()
  95779. });
  95780. (0, _utils.default)("RestElement", {
  95781. visitor: ["argument", "typeAnnotation"],
  95782. builder: ["argument"],
  95783. aliases: ["LVal", "PatternLike"],
  95784. deprecatedAlias: "RestProperty",
  95785. fields: Object.assign({}, patternLikeCommon, {
  95786. argument: {
  95787. validate: !process.env.BABEL_TYPES_8_BREAKING ? (0, _utils.assertNodeType)("LVal") : (0, _utils.assertNodeType)("Identifier", "Pattern", "MemberExpression")
  95788. }
  95789. }),
  95790. validate(parent, key) {
  95791. if (!process.env.BABEL_TYPES_8_BREAKING)
  95792. return;
  95793. const match = /(\w+)\[(\d+)\]/.exec(key);
  95794. if (!match)
  95795. throw new Error("Internal Babel error: malformed key.");
  95796. const [, listKey, index2] = match;
  95797. if (parent[listKey].length > index2 + 1) {
  95798. throw new TypeError(`RestElement must be last element of ${listKey}`);
  95799. }
  95800. }
  95801. });
  95802. (0, _utils.default)("ReturnStatement", {
  95803. visitor: ["argument"],
  95804. aliases: ["Statement", "Terminatorless", "CompletionStatement"],
  95805. fields: {
  95806. argument: {
  95807. validate: (0, _utils.assertNodeType)("Expression"),
  95808. optional: true
  95809. }
  95810. }
  95811. });
  95812. (0, _utils.default)("SequenceExpression", {
  95813. visitor: ["expressions"],
  95814. fields: {
  95815. expressions: {
  95816. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Expression")))
  95817. }
  95818. },
  95819. aliases: ["Expression"]
  95820. });
  95821. (0, _utils.default)("ParenthesizedExpression", {
  95822. visitor: ["expression"],
  95823. aliases: ["Expression", "ExpressionWrapper"],
  95824. fields: {
  95825. expression: {
  95826. validate: (0, _utils.assertNodeType)("Expression")
  95827. }
  95828. }
  95829. });
  95830. (0, _utils.default)("SwitchCase", {
  95831. visitor: ["test", "consequent"],
  95832. fields: {
  95833. test: {
  95834. validate: (0, _utils.assertNodeType)("Expression"),
  95835. optional: true
  95836. },
  95837. consequent: {
  95838. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Statement")))
  95839. }
  95840. }
  95841. });
  95842. (0, _utils.default)("SwitchStatement", {
  95843. visitor: ["discriminant", "cases"],
  95844. aliases: ["Statement", "BlockParent", "Scopable"],
  95845. fields: {
  95846. discriminant: {
  95847. validate: (0, _utils.assertNodeType)("Expression")
  95848. },
  95849. cases: {
  95850. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("SwitchCase")))
  95851. }
  95852. }
  95853. });
  95854. (0, _utils.default)("ThisExpression", {
  95855. aliases: ["Expression"]
  95856. });
  95857. (0, _utils.default)("ThrowStatement", {
  95858. visitor: ["argument"],
  95859. aliases: ["Statement", "Terminatorless", "CompletionStatement"],
  95860. fields: {
  95861. argument: {
  95862. validate: (0, _utils.assertNodeType)("Expression")
  95863. }
  95864. }
  95865. });
  95866. (0, _utils.default)("TryStatement", {
  95867. visitor: ["block", "handler", "finalizer"],
  95868. aliases: ["Statement"],
  95869. fields: {
  95870. block: {
  95871. validate: (0, _utils.chain)((0, _utils.assertNodeType)("BlockStatement"), Object.assign(function(node) {
  95872. if (!process.env.BABEL_TYPES_8_BREAKING)
  95873. return;
  95874. if (!node.handler && !node.finalizer) {
  95875. throw new TypeError("TryStatement expects either a handler or finalizer, or both");
  95876. }
  95877. }, {
  95878. oneOfNodeTypes: ["BlockStatement"]
  95879. }))
  95880. },
  95881. handler: {
  95882. optional: true,
  95883. validate: (0, _utils.assertNodeType)("CatchClause")
  95884. },
  95885. finalizer: {
  95886. optional: true,
  95887. validate: (0, _utils.assertNodeType)("BlockStatement")
  95888. }
  95889. }
  95890. });
  95891. (0, _utils.default)("UnaryExpression", {
  95892. builder: ["operator", "argument", "prefix"],
  95893. fields: {
  95894. prefix: {
  95895. default: true
  95896. },
  95897. argument: {
  95898. validate: (0, _utils.assertNodeType)("Expression")
  95899. },
  95900. operator: {
  95901. validate: (0, _utils.assertOneOf)(..._constants.UNARY_OPERATORS)
  95902. }
  95903. },
  95904. visitor: ["argument"],
  95905. aliases: ["UnaryLike", "Expression"]
  95906. });
  95907. (0, _utils.default)("UpdateExpression", {
  95908. builder: ["operator", "argument", "prefix"],
  95909. fields: {
  95910. prefix: {
  95911. default: false
  95912. },
  95913. argument: {
  95914. validate: !process.env.BABEL_TYPES_8_BREAKING ? (0, _utils.assertNodeType)("Expression") : (0, _utils.assertNodeType)("Identifier", "MemberExpression")
  95915. },
  95916. operator: {
  95917. validate: (0, _utils.assertOneOf)(..._constants.UPDATE_OPERATORS)
  95918. }
  95919. },
  95920. visitor: ["argument"],
  95921. aliases: ["Expression"]
  95922. });
  95923. (0, _utils.default)("VariableDeclaration", {
  95924. builder: ["kind", "declarations"],
  95925. visitor: ["declarations"],
  95926. aliases: ["Statement", "Declaration"],
  95927. fields: {
  95928. declare: {
  95929. validate: (0, _utils.assertValueType)("boolean"),
  95930. optional: true
  95931. },
  95932. kind: {
  95933. validate: (0, _utils.assertOneOf)("var", "let", "const")
  95934. },
  95935. declarations: {
  95936. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("VariableDeclarator")))
  95937. }
  95938. },
  95939. validate(parent, key, node) {
  95940. if (!process.env.BABEL_TYPES_8_BREAKING)
  95941. return;
  95942. if (!(0, _is.default)("ForXStatement", parent, {
  95943. left: node
  95944. }))
  95945. return;
  95946. if (node.declarations.length !== 1) {
  95947. throw new TypeError(`Exactly one VariableDeclarator is required in the VariableDeclaration of a ${parent.type}`);
  95948. }
  95949. }
  95950. });
  95951. (0, _utils.default)("VariableDeclarator", {
  95952. visitor: ["id", "init"],
  95953. fields: {
  95954. id: {
  95955. validate: function() {
  95956. if (!process.env.BABEL_TYPES_8_BREAKING) {
  95957. return (0, _utils.assertNodeType)("LVal");
  95958. }
  95959. const normal = (0, _utils.assertNodeType)("Identifier", "ArrayPattern", "ObjectPattern");
  95960. const without = (0, _utils.assertNodeType)("Identifier");
  95961. return function(node, key, val) {
  95962. const validator = node.init ? normal : without;
  95963. validator(node, key, val);
  95964. };
  95965. }()
  95966. },
  95967. definite: {
  95968. optional: true,
  95969. validate: (0, _utils.assertValueType)("boolean")
  95970. },
  95971. init: {
  95972. optional: true,
  95973. validate: (0, _utils.assertNodeType)("Expression")
  95974. }
  95975. }
  95976. });
  95977. (0, _utils.default)("WhileStatement", {
  95978. visitor: ["test", "body"],
  95979. aliases: ["Statement", "BlockParent", "Loop", "While", "Scopable"],
  95980. fields: {
  95981. test: {
  95982. validate: (0, _utils.assertNodeType)("Expression")
  95983. },
  95984. body: {
  95985. validate: (0, _utils.assertNodeType)("Statement")
  95986. }
  95987. }
  95988. });
  95989. (0, _utils.default)("WithStatement", {
  95990. visitor: ["object", "body"],
  95991. aliases: ["Statement"],
  95992. fields: {
  95993. object: {
  95994. validate: (0, _utils.assertNodeType)("Expression")
  95995. },
  95996. body: {
  95997. validate: (0, _utils.assertNodeType)("Statement")
  95998. }
  95999. }
  96000. });
  96001. (0, _utils.default)("AssignmentPattern", {
  96002. visitor: ["left", "right", "decorators"],
  96003. builder: ["left", "right"],
  96004. aliases: ["Pattern", "PatternLike", "LVal"],
  96005. fields: Object.assign({}, patternLikeCommon, {
  96006. left: {
  96007. validate: (0, _utils.assertNodeType)("Identifier", "ObjectPattern", "ArrayPattern", "MemberExpression")
  96008. },
  96009. right: {
  96010. validate: (0, _utils.assertNodeType)("Expression")
  96011. },
  96012. decorators: {
  96013. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Decorator"))),
  96014. optional: true
  96015. }
  96016. })
  96017. });
  96018. (0, _utils.default)("ArrayPattern", {
  96019. visitor: ["elements", "typeAnnotation"],
  96020. builder: ["elements"],
  96021. aliases: ["Pattern", "PatternLike", "LVal"],
  96022. fields: Object.assign({}, patternLikeCommon, {
  96023. elements: {
  96024. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeOrValueType)("null", "PatternLike")))
  96025. },
  96026. decorators: {
  96027. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Decorator"))),
  96028. optional: true
  96029. }
  96030. })
  96031. });
  96032. (0, _utils.default)("ArrowFunctionExpression", {
  96033. builder: ["params", "body", "async"],
  96034. visitor: ["params", "body", "returnType", "typeParameters"],
  96035. aliases: ["Scopable", "Function", "BlockParent", "FunctionParent", "Expression", "Pureish"],
  96036. fields: Object.assign({}, functionCommon, functionTypeAnnotationCommon, {
  96037. expression: {
  96038. validate: (0, _utils.assertValueType)("boolean")
  96039. },
  96040. body: {
  96041. validate: (0, _utils.assertNodeType)("BlockStatement", "Expression")
  96042. }
  96043. })
  96044. });
  96045. (0, _utils.default)("ClassBody", {
  96046. visitor: ["body"],
  96047. fields: {
  96048. body: {
  96049. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("ClassMethod", "ClassPrivateMethod", "ClassProperty", "ClassPrivateProperty", "TSDeclareMethod", "TSIndexSignature")))
  96050. }
  96051. }
  96052. });
  96053. (0, _utils.default)("ClassExpression", {
  96054. builder: ["id", "superClass", "body", "decorators"],
  96055. visitor: ["id", "body", "superClass", "mixins", "typeParameters", "superTypeParameters", "implements", "decorators"],
  96056. aliases: ["Scopable", "Class", "Expression"],
  96057. fields: {
  96058. id: {
  96059. validate: (0, _utils.assertNodeType)("Identifier"),
  96060. optional: true
  96061. },
  96062. typeParameters: {
  96063. validate: (0, _utils.assertNodeType)("TypeParameterDeclaration", "TSTypeParameterDeclaration", "Noop"),
  96064. optional: true
  96065. },
  96066. body: {
  96067. validate: (0, _utils.assertNodeType)("ClassBody")
  96068. },
  96069. superClass: {
  96070. optional: true,
  96071. validate: (0, _utils.assertNodeType)("Expression")
  96072. },
  96073. superTypeParameters: {
  96074. validate: (0, _utils.assertNodeType)("TypeParameterInstantiation", "TSTypeParameterInstantiation"),
  96075. optional: true
  96076. },
  96077. implements: {
  96078. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("TSExpressionWithTypeArguments", "ClassImplements"))),
  96079. optional: true
  96080. },
  96081. decorators: {
  96082. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Decorator"))),
  96083. optional: true
  96084. },
  96085. mixins: {
  96086. validate: (0, _utils.assertNodeType)("InterfaceExtends"),
  96087. optional: true
  96088. }
  96089. }
  96090. });
  96091. (0, _utils.default)("ClassDeclaration", {
  96092. inherits: "ClassExpression",
  96093. aliases: ["Scopable", "Class", "Statement", "Declaration"],
  96094. fields: {
  96095. id: {
  96096. validate: (0, _utils.assertNodeType)("Identifier")
  96097. },
  96098. typeParameters: {
  96099. validate: (0, _utils.assertNodeType)("TypeParameterDeclaration", "TSTypeParameterDeclaration", "Noop"),
  96100. optional: true
  96101. },
  96102. body: {
  96103. validate: (0, _utils.assertNodeType)("ClassBody")
  96104. },
  96105. superClass: {
  96106. optional: true,
  96107. validate: (0, _utils.assertNodeType)("Expression")
  96108. },
  96109. superTypeParameters: {
  96110. validate: (0, _utils.assertNodeType)("TypeParameterInstantiation", "TSTypeParameterInstantiation"),
  96111. optional: true
  96112. },
  96113. implements: {
  96114. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("TSExpressionWithTypeArguments", "ClassImplements"))),
  96115. optional: true
  96116. },
  96117. decorators: {
  96118. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Decorator"))),
  96119. optional: true
  96120. },
  96121. mixins: {
  96122. validate: (0, _utils.assertNodeType)("InterfaceExtends"),
  96123. optional: true
  96124. },
  96125. declare: {
  96126. validate: (0, _utils.assertValueType)("boolean"),
  96127. optional: true
  96128. },
  96129. abstract: {
  96130. validate: (0, _utils.assertValueType)("boolean"),
  96131. optional: true
  96132. }
  96133. },
  96134. validate: function() {
  96135. const identifier = (0, _utils.assertNodeType)("Identifier");
  96136. return function(parent, key, node) {
  96137. if (!process.env.BABEL_TYPES_8_BREAKING)
  96138. return;
  96139. if (!(0, _is.default)("ExportDefaultDeclaration", parent)) {
  96140. identifier(node, "id", node.id);
  96141. }
  96142. };
  96143. }()
  96144. });
  96145. (0, _utils.default)("ExportAllDeclaration", {
  96146. visitor: ["source"],
  96147. aliases: ["Statement", "Declaration", "ModuleDeclaration", "ExportDeclaration"],
  96148. fields: {
  96149. source: {
  96150. validate: (0, _utils.assertNodeType)("StringLiteral")
  96151. },
  96152. exportKind: (0, _utils.validateOptional)((0, _utils.assertOneOf)("type", "value")),
  96153. assertions: {
  96154. optional: true,
  96155. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("ImportAttribute")))
  96156. }
  96157. }
  96158. });
  96159. (0, _utils.default)("ExportDefaultDeclaration", {
  96160. visitor: ["declaration"],
  96161. aliases: ["Statement", "Declaration", "ModuleDeclaration", "ExportDeclaration"],
  96162. fields: {
  96163. declaration: {
  96164. validate: (0, _utils.assertNodeType)("FunctionDeclaration", "TSDeclareFunction", "ClassDeclaration", "Expression")
  96165. }
  96166. }
  96167. });
  96168. (0, _utils.default)("ExportNamedDeclaration", {
  96169. visitor: ["declaration", "specifiers", "source"],
  96170. aliases: ["Statement", "Declaration", "ModuleDeclaration", "ExportDeclaration"],
  96171. fields: {
  96172. declaration: {
  96173. optional: true,
  96174. validate: (0, _utils.chain)((0, _utils.assertNodeType)("Declaration"), Object.assign(function(node, key, val) {
  96175. if (!process.env.BABEL_TYPES_8_BREAKING)
  96176. return;
  96177. if (val && node.specifiers.length) {
  96178. throw new TypeError("Only declaration or specifiers is allowed on ExportNamedDeclaration");
  96179. }
  96180. }, {
  96181. oneOfNodeTypes: ["Declaration"]
  96182. }), function(node, key, val) {
  96183. if (!process.env.BABEL_TYPES_8_BREAKING)
  96184. return;
  96185. if (val && node.source) {
  96186. throw new TypeError("Cannot export a declaration from a source");
  96187. }
  96188. })
  96189. },
  96190. assertions: {
  96191. optional: true,
  96192. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("ImportAttribute")))
  96193. },
  96194. specifiers: {
  96195. default: [],
  96196. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)(function() {
  96197. const sourced = (0, _utils.assertNodeType)("ExportSpecifier", "ExportDefaultSpecifier", "ExportNamespaceSpecifier");
  96198. const sourceless = (0, _utils.assertNodeType)("ExportSpecifier");
  96199. if (!process.env.BABEL_TYPES_8_BREAKING)
  96200. return sourced;
  96201. return function(node, key, val) {
  96202. const validator = node.source ? sourced : sourceless;
  96203. validator(node, key, val);
  96204. };
  96205. }()))
  96206. },
  96207. source: {
  96208. validate: (0, _utils.assertNodeType)("StringLiteral"),
  96209. optional: true
  96210. },
  96211. exportKind: (0, _utils.validateOptional)((0, _utils.assertOneOf)("type", "value"))
  96212. }
  96213. });
  96214. (0, _utils.default)("ExportSpecifier", {
  96215. visitor: ["local", "exported"],
  96216. aliases: ["ModuleSpecifier"],
  96217. fields: {
  96218. local: {
  96219. validate: (0, _utils.assertNodeType)("Identifier")
  96220. },
  96221. exported: {
  96222. validate: (0, _utils.assertNodeType)("Identifier", "StringLiteral")
  96223. }
  96224. }
  96225. });
  96226. (0, _utils.default)("ForOfStatement", {
  96227. visitor: ["left", "right", "body"],
  96228. builder: ["left", "right", "body", "await"],
  96229. aliases: ["Scopable", "Statement", "For", "BlockParent", "Loop", "ForXStatement"],
  96230. fields: {
  96231. left: {
  96232. validate: function() {
  96233. if (!process.env.BABEL_TYPES_8_BREAKING) {
  96234. return (0, _utils.assertNodeType)("VariableDeclaration", "LVal");
  96235. }
  96236. const declaration = (0, _utils.assertNodeType)("VariableDeclaration");
  96237. const lval = (0, _utils.assertNodeType)("Identifier", "MemberExpression", "ArrayPattern", "ObjectPattern");
  96238. return function(node, key, val) {
  96239. if ((0, _is.default)("VariableDeclaration", val)) {
  96240. declaration(node, key, val);
  96241. } else {
  96242. lval(node, key, val);
  96243. }
  96244. };
  96245. }()
  96246. },
  96247. right: {
  96248. validate: (0, _utils.assertNodeType)("Expression")
  96249. },
  96250. body: {
  96251. validate: (0, _utils.assertNodeType)("Statement")
  96252. },
  96253. await: {
  96254. default: false
  96255. }
  96256. }
  96257. });
  96258. (0, _utils.default)("ImportDeclaration", {
  96259. visitor: ["specifiers", "source"],
  96260. aliases: ["Statement", "Declaration", "ModuleDeclaration"],
  96261. fields: {
  96262. assertions: {
  96263. optional: true,
  96264. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("ImportAttribute")))
  96265. },
  96266. specifiers: {
  96267. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("ImportSpecifier", "ImportDefaultSpecifier", "ImportNamespaceSpecifier")))
  96268. },
  96269. source: {
  96270. validate: (0, _utils.assertNodeType)("StringLiteral")
  96271. },
  96272. importKind: {
  96273. validate: (0, _utils.assertOneOf)("type", "typeof", "value"),
  96274. optional: true
  96275. }
  96276. }
  96277. });
  96278. (0, _utils.default)("ImportDefaultSpecifier", {
  96279. visitor: ["local"],
  96280. aliases: ["ModuleSpecifier"],
  96281. fields: {
  96282. local: {
  96283. validate: (0, _utils.assertNodeType)("Identifier")
  96284. }
  96285. }
  96286. });
  96287. (0, _utils.default)("ImportNamespaceSpecifier", {
  96288. visitor: ["local"],
  96289. aliases: ["ModuleSpecifier"],
  96290. fields: {
  96291. local: {
  96292. validate: (0, _utils.assertNodeType)("Identifier")
  96293. }
  96294. }
  96295. });
  96296. (0, _utils.default)("ImportSpecifier", {
  96297. visitor: ["local", "imported"],
  96298. aliases: ["ModuleSpecifier"],
  96299. fields: {
  96300. local: {
  96301. validate: (0, _utils.assertNodeType)("Identifier")
  96302. },
  96303. imported: {
  96304. validate: (0, _utils.assertNodeType)("Identifier", "StringLiteral")
  96305. },
  96306. importKind: {
  96307. validate: (0, _utils.assertOneOf)("type", "typeof"),
  96308. optional: true
  96309. }
  96310. }
  96311. });
  96312. (0, _utils.default)("MetaProperty", {
  96313. visitor: ["meta", "property"],
  96314. aliases: ["Expression"],
  96315. fields: {
  96316. meta: {
  96317. validate: (0, _utils.chain)((0, _utils.assertNodeType)("Identifier"), Object.assign(function(node, key, val) {
  96318. if (!process.env.BABEL_TYPES_8_BREAKING)
  96319. return;
  96320. let property;
  96321. switch (val.name) {
  96322. case "function":
  96323. property = "sent";
  96324. break;
  96325. case "new":
  96326. property = "target";
  96327. break;
  96328. case "import":
  96329. property = "meta";
  96330. break;
  96331. }
  96332. if (!(0, _is.default)("Identifier", node.property, {
  96333. name: property
  96334. })) {
  96335. throw new TypeError("Unrecognised MetaProperty");
  96336. }
  96337. }, {
  96338. oneOfNodeTypes: ["Identifier"]
  96339. }))
  96340. },
  96341. property: {
  96342. validate: (0, _utils.assertNodeType)("Identifier")
  96343. }
  96344. }
  96345. });
  96346. var classMethodOrPropertyCommon = {
  96347. abstract: {
  96348. validate: (0, _utils.assertValueType)("boolean"),
  96349. optional: true
  96350. },
  96351. accessibility: {
  96352. validate: (0, _utils.assertOneOf)("public", "private", "protected"),
  96353. optional: true
  96354. },
  96355. static: {
  96356. default: false
  96357. },
  96358. override: {
  96359. default: false
  96360. },
  96361. computed: {
  96362. default: false
  96363. },
  96364. optional: {
  96365. validate: (0, _utils.assertValueType)("boolean"),
  96366. optional: true
  96367. },
  96368. key: {
  96369. validate: (0, _utils.chain)(function() {
  96370. const normal = (0, _utils.assertNodeType)("Identifier", "StringLiteral", "NumericLiteral");
  96371. const computed = (0, _utils.assertNodeType)("Expression");
  96372. return function(node, key, val) {
  96373. const validator = node.computed ? computed : normal;
  96374. validator(node, key, val);
  96375. };
  96376. }(), (0, _utils.assertNodeType)("Identifier", "StringLiteral", "NumericLiteral", "Expression"))
  96377. }
  96378. };
  96379. exports.classMethodOrPropertyCommon = classMethodOrPropertyCommon;
  96380. var classMethodOrDeclareMethodCommon = Object.assign({}, functionCommon, classMethodOrPropertyCommon, {
  96381. params: {
  96382. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Identifier", "Pattern", "RestElement", "TSParameterProperty")))
  96383. },
  96384. kind: {
  96385. validate: (0, _utils.assertOneOf)("get", "set", "method", "constructor"),
  96386. default: "method"
  96387. },
  96388. access: {
  96389. validate: (0, _utils.chain)((0, _utils.assertValueType)("string"), (0, _utils.assertOneOf)("public", "private", "protected")),
  96390. optional: true
  96391. },
  96392. decorators: {
  96393. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Decorator"))),
  96394. optional: true
  96395. }
  96396. });
  96397. exports.classMethodOrDeclareMethodCommon = classMethodOrDeclareMethodCommon;
  96398. (0, _utils.default)("ClassMethod", {
  96399. aliases: ["Function", "Scopable", "BlockParent", "FunctionParent", "Method"],
  96400. builder: ["kind", "key", "params", "body", "computed", "static", "generator", "async"],
  96401. visitor: ["key", "params", "body", "decorators", "returnType", "typeParameters"],
  96402. fields: Object.assign({}, classMethodOrDeclareMethodCommon, functionTypeAnnotationCommon, {
  96403. body: {
  96404. validate: (0, _utils.assertNodeType)("BlockStatement")
  96405. }
  96406. })
  96407. });
  96408. (0, _utils.default)("ObjectPattern", {
  96409. visitor: ["properties", "typeAnnotation", "decorators"],
  96410. builder: ["properties"],
  96411. aliases: ["Pattern", "PatternLike", "LVal"],
  96412. fields: Object.assign({}, patternLikeCommon, {
  96413. properties: {
  96414. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("RestElement", "ObjectProperty")))
  96415. }
  96416. })
  96417. });
  96418. (0, _utils.default)("SpreadElement", {
  96419. visitor: ["argument"],
  96420. aliases: ["UnaryLike"],
  96421. deprecatedAlias: "SpreadProperty",
  96422. fields: {
  96423. argument: {
  96424. validate: (0, _utils.assertNodeType)("Expression")
  96425. }
  96426. }
  96427. });
  96428. (0, _utils.default)("Super", {
  96429. aliases: ["Expression"]
  96430. });
  96431. (0, _utils.default)("TaggedTemplateExpression", {
  96432. visitor: ["tag", "quasi"],
  96433. aliases: ["Expression"],
  96434. fields: {
  96435. tag: {
  96436. validate: (0, _utils.assertNodeType)("Expression")
  96437. },
  96438. quasi: {
  96439. validate: (0, _utils.assertNodeType)("TemplateLiteral")
  96440. },
  96441. typeParameters: {
  96442. validate: (0, _utils.assertNodeType)("TypeParameterInstantiation", "TSTypeParameterInstantiation"),
  96443. optional: true
  96444. }
  96445. }
  96446. });
  96447. (0, _utils.default)("TemplateElement", {
  96448. builder: ["value", "tail"],
  96449. fields: {
  96450. value: {
  96451. validate: (0, _utils.assertShape)({
  96452. raw: {
  96453. validate: (0, _utils.assertValueType)("string")
  96454. },
  96455. cooked: {
  96456. validate: (0, _utils.assertValueType)("string"),
  96457. optional: true
  96458. }
  96459. })
  96460. },
  96461. tail: {
  96462. default: false
  96463. }
  96464. }
  96465. });
  96466. (0, _utils.default)("TemplateLiteral", {
  96467. visitor: ["quasis", "expressions"],
  96468. aliases: ["Expression", "Literal"],
  96469. fields: {
  96470. quasis: {
  96471. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("TemplateElement")))
  96472. },
  96473. expressions: {
  96474. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Expression", "TSType")), function(node, key, val) {
  96475. if (node.quasis.length !== val.length + 1) {
  96476. throw new TypeError(`Number of ${node.type} quasis should be exactly one more than the number of expressions.
  96477. Expected ${val.length + 1} quasis but got ${node.quasis.length}`);
  96478. }
  96479. })
  96480. }
  96481. }
  96482. });
  96483. (0, _utils.default)("YieldExpression", {
  96484. builder: ["argument", "delegate"],
  96485. visitor: ["argument"],
  96486. aliases: ["Expression", "Terminatorless"],
  96487. fields: {
  96488. delegate: {
  96489. validate: (0, _utils.chain)((0, _utils.assertValueType)("boolean"), Object.assign(function(node, key, val) {
  96490. if (!process.env.BABEL_TYPES_8_BREAKING)
  96491. return;
  96492. if (val && !node.argument) {
  96493. throw new TypeError("Property delegate of YieldExpression cannot be true if there is no argument");
  96494. }
  96495. }, {
  96496. type: "boolean"
  96497. })),
  96498. default: false
  96499. },
  96500. argument: {
  96501. optional: true,
  96502. validate: (0, _utils.assertNodeType)("Expression")
  96503. }
  96504. }
  96505. });
  96506. (0, _utils.default)("AwaitExpression", {
  96507. builder: ["argument"],
  96508. visitor: ["argument"],
  96509. aliases: ["Expression", "Terminatorless"],
  96510. fields: {
  96511. argument: {
  96512. validate: (0, _utils.assertNodeType)("Expression")
  96513. }
  96514. }
  96515. });
  96516. (0, _utils.default)("Import", {
  96517. aliases: ["Expression"]
  96518. });
  96519. (0, _utils.default)("BigIntLiteral", {
  96520. builder: ["value"],
  96521. fields: {
  96522. value: {
  96523. validate: (0, _utils.assertValueType)("string")
  96524. }
  96525. },
  96526. aliases: ["Expression", "Pureish", "Literal", "Immutable"]
  96527. });
  96528. (0, _utils.default)("ExportNamespaceSpecifier", {
  96529. visitor: ["exported"],
  96530. aliases: ["ModuleSpecifier"],
  96531. fields: {
  96532. exported: {
  96533. validate: (0, _utils.assertNodeType)("Identifier")
  96534. }
  96535. }
  96536. });
  96537. (0, _utils.default)("OptionalMemberExpression", {
  96538. builder: ["object", "property", "computed", "optional"],
  96539. visitor: ["object", "property"],
  96540. aliases: ["Expression"],
  96541. fields: {
  96542. object: {
  96543. validate: (0, _utils.assertNodeType)("Expression")
  96544. },
  96545. property: {
  96546. validate: function() {
  96547. const normal = (0, _utils.assertNodeType)("Identifier");
  96548. const computed = (0, _utils.assertNodeType)("Expression");
  96549. const validator = function(node, key, val) {
  96550. const validator2 = node.computed ? computed : normal;
  96551. validator2(node, key, val);
  96552. };
  96553. validator.oneOfNodeTypes = ["Expression", "Identifier"];
  96554. return validator;
  96555. }()
  96556. },
  96557. computed: {
  96558. default: false
  96559. },
  96560. optional: {
  96561. validate: !process.env.BABEL_TYPES_8_BREAKING ? (0, _utils.assertValueType)("boolean") : (0, _utils.chain)((0, _utils.assertValueType)("boolean"), (0, _utils.assertOptionalChainStart)())
  96562. }
  96563. }
  96564. });
  96565. (0, _utils.default)("OptionalCallExpression", {
  96566. visitor: ["callee", "arguments", "typeParameters", "typeArguments"],
  96567. builder: ["callee", "arguments", "optional"],
  96568. aliases: ["Expression"],
  96569. fields: {
  96570. callee: {
  96571. validate: (0, _utils.assertNodeType)("Expression")
  96572. },
  96573. arguments: {
  96574. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Expression", "SpreadElement", "JSXNamespacedName", "ArgumentPlaceholder")))
  96575. },
  96576. optional: {
  96577. validate: !process.env.BABEL_TYPES_8_BREAKING ? (0, _utils.assertValueType)("boolean") : (0, _utils.chain)((0, _utils.assertValueType)("boolean"), (0, _utils.assertOptionalChainStart)())
  96578. },
  96579. typeArguments: {
  96580. validate: (0, _utils.assertNodeType)("TypeParameterInstantiation"),
  96581. optional: true
  96582. },
  96583. typeParameters: {
  96584. validate: (0, _utils.assertNodeType)("TSTypeParameterInstantiation"),
  96585. optional: true
  96586. }
  96587. }
  96588. });
  96589. }
  96590. });
  96591. // node_modules/@babel/helper-hoist-variables/node_modules/@babel/types/lib/definitions/flow.js
  96592. var require_flow6 = __commonJS({
  96593. "node_modules/@babel/helper-hoist-variables/node_modules/@babel/types/lib/definitions/flow.js"() {
  96594. "use strict";
  96595. var _utils = require_utils4();
  96596. var defineInterfaceishType = (name2, typeParameterType = "TypeParameterDeclaration") => {
  96597. (0, _utils.default)(name2, {
  96598. builder: ["id", "typeParameters", "extends", "body"],
  96599. visitor: ["id", "typeParameters", "extends", "mixins", "implements", "body"],
  96600. aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"],
  96601. fields: {
  96602. id: (0, _utils.validateType)("Identifier"),
  96603. typeParameters: (0, _utils.validateOptionalType)(typeParameterType),
  96604. extends: (0, _utils.validateOptional)((0, _utils.arrayOfType)("InterfaceExtends")),
  96605. mixins: (0, _utils.validateOptional)((0, _utils.arrayOfType)("InterfaceExtends")),
  96606. implements: (0, _utils.validateOptional)((0, _utils.arrayOfType)("ClassImplements")),
  96607. body: (0, _utils.validateType)("ObjectTypeAnnotation")
  96608. }
  96609. });
  96610. };
  96611. (0, _utils.default)("AnyTypeAnnotation", {
  96612. aliases: ["Flow", "FlowType", "FlowBaseAnnotation"]
  96613. });
  96614. (0, _utils.default)("ArrayTypeAnnotation", {
  96615. visitor: ["elementType"],
  96616. aliases: ["Flow", "FlowType"],
  96617. fields: {
  96618. elementType: (0, _utils.validateType)("FlowType")
  96619. }
  96620. });
  96621. (0, _utils.default)("BooleanTypeAnnotation", {
  96622. aliases: ["Flow", "FlowType", "FlowBaseAnnotation"]
  96623. });
  96624. (0, _utils.default)("BooleanLiteralTypeAnnotation", {
  96625. builder: ["value"],
  96626. aliases: ["Flow", "FlowType"],
  96627. fields: {
  96628. value: (0, _utils.validate)((0, _utils.assertValueType)("boolean"))
  96629. }
  96630. });
  96631. (0, _utils.default)("NullLiteralTypeAnnotation", {
  96632. aliases: ["Flow", "FlowType", "FlowBaseAnnotation"]
  96633. });
  96634. (0, _utils.default)("ClassImplements", {
  96635. visitor: ["id", "typeParameters"],
  96636. aliases: ["Flow"],
  96637. fields: {
  96638. id: (0, _utils.validateType)("Identifier"),
  96639. typeParameters: (0, _utils.validateOptionalType)("TypeParameterInstantiation")
  96640. }
  96641. });
  96642. defineInterfaceishType("DeclareClass");
  96643. (0, _utils.default)("DeclareFunction", {
  96644. visitor: ["id"],
  96645. aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"],
  96646. fields: {
  96647. id: (0, _utils.validateType)("Identifier"),
  96648. predicate: (0, _utils.validateOptionalType)("DeclaredPredicate")
  96649. }
  96650. });
  96651. defineInterfaceishType("DeclareInterface");
  96652. (0, _utils.default)("DeclareModule", {
  96653. builder: ["id", "body", "kind"],
  96654. visitor: ["id", "body"],
  96655. aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"],
  96656. fields: {
  96657. id: (0, _utils.validateType)(["Identifier", "StringLiteral"]),
  96658. body: (0, _utils.validateType)("BlockStatement"),
  96659. kind: (0, _utils.validateOptional)((0, _utils.assertOneOf)("CommonJS", "ES"))
  96660. }
  96661. });
  96662. (0, _utils.default)("DeclareModuleExports", {
  96663. visitor: ["typeAnnotation"],
  96664. aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"],
  96665. fields: {
  96666. typeAnnotation: (0, _utils.validateType)("TypeAnnotation")
  96667. }
  96668. });
  96669. (0, _utils.default)("DeclareTypeAlias", {
  96670. visitor: ["id", "typeParameters", "right"],
  96671. aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"],
  96672. fields: {
  96673. id: (0, _utils.validateType)("Identifier"),
  96674. typeParameters: (0, _utils.validateOptionalType)("TypeParameterDeclaration"),
  96675. right: (0, _utils.validateType)("FlowType")
  96676. }
  96677. });
  96678. (0, _utils.default)("DeclareOpaqueType", {
  96679. visitor: ["id", "typeParameters", "supertype"],
  96680. aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"],
  96681. fields: {
  96682. id: (0, _utils.validateType)("Identifier"),
  96683. typeParameters: (0, _utils.validateOptionalType)("TypeParameterDeclaration"),
  96684. supertype: (0, _utils.validateOptionalType)("FlowType")
  96685. }
  96686. });
  96687. (0, _utils.default)("DeclareVariable", {
  96688. visitor: ["id"],
  96689. aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"],
  96690. fields: {
  96691. id: (0, _utils.validateType)("Identifier")
  96692. }
  96693. });
  96694. (0, _utils.default)("DeclareExportDeclaration", {
  96695. visitor: ["declaration", "specifiers", "source"],
  96696. aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"],
  96697. fields: {
  96698. declaration: (0, _utils.validateOptionalType)("Flow"),
  96699. specifiers: (0, _utils.validateOptional)((0, _utils.arrayOfType)(["ExportSpecifier", "ExportNamespaceSpecifier"])),
  96700. source: (0, _utils.validateOptionalType)("StringLiteral"),
  96701. default: (0, _utils.validateOptional)((0, _utils.assertValueType)("boolean"))
  96702. }
  96703. });
  96704. (0, _utils.default)("DeclareExportAllDeclaration", {
  96705. visitor: ["source"],
  96706. aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"],
  96707. fields: {
  96708. source: (0, _utils.validateType)("StringLiteral"),
  96709. exportKind: (0, _utils.validateOptional)((0, _utils.assertOneOf)("type", "value"))
  96710. }
  96711. });
  96712. (0, _utils.default)("DeclaredPredicate", {
  96713. visitor: ["value"],
  96714. aliases: ["Flow", "FlowPredicate"],
  96715. fields: {
  96716. value: (0, _utils.validateType)("Flow")
  96717. }
  96718. });
  96719. (0, _utils.default)("ExistsTypeAnnotation", {
  96720. aliases: ["Flow", "FlowType"]
  96721. });
  96722. (0, _utils.default)("FunctionTypeAnnotation", {
  96723. visitor: ["typeParameters", "params", "rest", "returnType"],
  96724. aliases: ["Flow", "FlowType"],
  96725. fields: {
  96726. typeParameters: (0, _utils.validateOptionalType)("TypeParameterDeclaration"),
  96727. params: (0, _utils.validate)((0, _utils.arrayOfType)("FunctionTypeParam")),
  96728. rest: (0, _utils.validateOptionalType)("FunctionTypeParam"),
  96729. this: (0, _utils.validateOptionalType)("FunctionTypeParam"),
  96730. returnType: (0, _utils.validateType)("FlowType")
  96731. }
  96732. });
  96733. (0, _utils.default)("FunctionTypeParam", {
  96734. visitor: ["name", "typeAnnotation"],
  96735. aliases: ["Flow"],
  96736. fields: {
  96737. name: (0, _utils.validateOptionalType)("Identifier"),
  96738. typeAnnotation: (0, _utils.validateType)("FlowType"),
  96739. optional: (0, _utils.validateOptional)((0, _utils.assertValueType)("boolean"))
  96740. }
  96741. });
  96742. (0, _utils.default)("GenericTypeAnnotation", {
  96743. visitor: ["id", "typeParameters"],
  96744. aliases: ["Flow", "FlowType"],
  96745. fields: {
  96746. id: (0, _utils.validateType)(["Identifier", "QualifiedTypeIdentifier"]),
  96747. typeParameters: (0, _utils.validateOptionalType)("TypeParameterInstantiation")
  96748. }
  96749. });
  96750. (0, _utils.default)("InferredPredicate", {
  96751. aliases: ["Flow", "FlowPredicate"]
  96752. });
  96753. (0, _utils.default)("InterfaceExtends", {
  96754. visitor: ["id", "typeParameters"],
  96755. aliases: ["Flow"],
  96756. fields: {
  96757. id: (0, _utils.validateType)(["Identifier", "QualifiedTypeIdentifier"]),
  96758. typeParameters: (0, _utils.validateOptionalType)("TypeParameterInstantiation")
  96759. }
  96760. });
  96761. defineInterfaceishType("InterfaceDeclaration");
  96762. (0, _utils.default)("InterfaceTypeAnnotation", {
  96763. visitor: ["extends", "body"],
  96764. aliases: ["Flow", "FlowType"],
  96765. fields: {
  96766. extends: (0, _utils.validateOptional)((0, _utils.arrayOfType)("InterfaceExtends")),
  96767. body: (0, _utils.validateType)("ObjectTypeAnnotation")
  96768. }
  96769. });
  96770. (0, _utils.default)("IntersectionTypeAnnotation", {
  96771. visitor: ["types"],
  96772. aliases: ["Flow", "FlowType"],
  96773. fields: {
  96774. types: (0, _utils.validate)((0, _utils.arrayOfType)("FlowType"))
  96775. }
  96776. });
  96777. (0, _utils.default)("MixedTypeAnnotation", {
  96778. aliases: ["Flow", "FlowType", "FlowBaseAnnotation"]
  96779. });
  96780. (0, _utils.default)("EmptyTypeAnnotation", {
  96781. aliases: ["Flow", "FlowType", "FlowBaseAnnotation"]
  96782. });
  96783. (0, _utils.default)("NullableTypeAnnotation", {
  96784. visitor: ["typeAnnotation"],
  96785. aliases: ["Flow", "FlowType"],
  96786. fields: {
  96787. typeAnnotation: (0, _utils.validateType)("FlowType")
  96788. }
  96789. });
  96790. (0, _utils.default)("NumberLiteralTypeAnnotation", {
  96791. builder: ["value"],
  96792. aliases: ["Flow", "FlowType"],
  96793. fields: {
  96794. value: (0, _utils.validate)((0, _utils.assertValueType)("number"))
  96795. }
  96796. });
  96797. (0, _utils.default)("NumberTypeAnnotation", {
  96798. aliases: ["Flow", "FlowType", "FlowBaseAnnotation"]
  96799. });
  96800. (0, _utils.default)("ObjectTypeAnnotation", {
  96801. visitor: ["properties", "indexers", "callProperties", "internalSlots"],
  96802. aliases: ["Flow", "FlowType"],
  96803. builder: ["properties", "indexers", "callProperties", "internalSlots", "exact"],
  96804. fields: {
  96805. properties: (0, _utils.validate)((0, _utils.arrayOfType)(["ObjectTypeProperty", "ObjectTypeSpreadProperty"])),
  96806. indexers: (0, _utils.validateOptional)((0, _utils.arrayOfType)("ObjectTypeIndexer")),
  96807. callProperties: (0, _utils.validateOptional)((0, _utils.arrayOfType)("ObjectTypeCallProperty")),
  96808. internalSlots: (0, _utils.validateOptional)((0, _utils.arrayOfType)("ObjectTypeInternalSlot")),
  96809. exact: {
  96810. validate: (0, _utils.assertValueType)("boolean"),
  96811. default: false
  96812. },
  96813. inexact: (0, _utils.validateOptional)((0, _utils.assertValueType)("boolean"))
  96814. }
  96815. });
  96816. (0, _utils.default)("ObjectTypeInternalSlot", {
  96817. visitor: ["id", "value", "optional", "static", "method"],
  96818. aliases: ["Flow", "UserWhitespacable"],
  96819. fields: {
  96820. id: (0, _utils.validateType)("Identifier"),
  96821. value: (0, _utils.validateType)("FlowType"),
  96822. optional: (0, _utils.validate)((0, _utils.assertValueType)("boolean")),
  96823. static: (0, _utils.validate)((0, _utils.assertValueType)("boolean")),
  96824. method: (0, _utils.validate)((0, _utils.assertValueType)("boolean"))
  96825. }
  96826. });
  96827. (0, _utils.default)("ObjectTypeCallProperty", {
  96828. visitor: ["value"],
  96829. aliases: ["Flow", "UserWhitespacable"],
  96830. fields: {
  96831. value: (0, _utils.validateType)("FlowType"),
  96832. static: (0, _utils.validate)((0, _utils.assertValueType)("boolean"))
  96833. }
  96834. });
  96835. (0, _utils.default)("ObjectTypeIndexer", {
  96836. visitor: ["id", "key", "value", "variance"],
  96837. aliases: ["Flow", "UserWhitespacable"],
  96838. fields: {
  96839. id: (0, _utils.validateOptionalType)("Identifier"),
  96840. key: (0, _utils.validateType)("FlowType"),
  96841. value: (0, _utils.validateType)("FlowType"),
  96842. static: (0, _utils.validate)((0, _utils.assertValueType)("boolean")),
  96843. variance: (0, _utils.validateOptionalType)("Variance")
  96844. }
  96845. });
  96846. (0, _utils.default)("ObjectTypeProperty", {
  96847. visitor: ["key", "value", "variance"],
  96848. aliases: ["Flow", "UserWhitespacable"],
  96849. fields: {
  96850. key: (0, _utils.validateType)(["Identifier", "StringLiteral"]),
  96851. value: (0, _utils.validateType)("FlowType"),
  96852. kind: (0, _utils.validate)((0, _utils.assertOneOf)("init", "get", "set")),
  96853. static: (0, _utils.validate)((0, _utils.assertValueType)("boolean")),
  96854. proto: (0, _utils.validate)((0, _utils.assertValueType)("boolean")),
  96855. optional: (0, _utils.validate)((0, _utils.assertValueType)("boolean")),
  96856. variance: (0, _utils.validateOptionalType)("Variance"),
  96857. method: (0, _utils.validate)((0, _utils.assertValueType)("boolean"))
  96858. }
  96859. });
  96860. (0, _utils.default)("ObjectTypeSpreadProperty", {
  96861. visitor: ["argument"],
  96862. aliases: ["Flow", "UserWhitespacable"],
  96863. fields: {
  96864. argument: (0, _utils.validateType)("FlowType")
  96865. }
  96866. });
  96867. (0, _utils.default)("OpaqueType", {
  96868. visitor: ["id", "typeParameters", "supertype", "impltype"],
  96869. aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"],
  96870. fields: {
  96871. id: (0, _utils.validateType)("Identifier"),
  96872. typeParameters: (0, _utils.validateOptionalType)("TypeParameterDeclaration"),
  96873. supertype: (0, _utils.validateOptionalType)("FlowType"),
  96874. impltype: (0, _utils.validateType)("FlowType")
  96875. }
  96876. });
  96877. (0, _utils.default)("QualifiedTypeIdentifier", {
  96878. visitor: ["id", "qualification"],
  96879. aliases: ["Flow"],
  96880. fields: {
  96881. id: (0, _utils.validateType)("Identifier"),
  96882. qualification: (0, _utils.validateType)(["Identifier", "QualifiedTypeIdentifier"])
  96883. }
  96884. });
  96885. (0, _utils.default)("StringLiteralTypeAnnotation", {
  96886. builder: ["value"],
  96887. aliases: ["Flow", "FlowType"],
  96888. fields: {
  96889. value: (0, _utils.validate)((0, _utils.assertValueType)("string"))
  96890. }
  96891. });
  96892. (0, _utils.default)("StringTypeAnnotation", {
  96893. aliases: ["Flow", "FlowType", "FlowBaseAnnotation"]
  96894. });
  96895. (0, _utils.default)("SymbolTypeAnnotation", {
  96896. aliases: ["Flow", "FlowType", "FlowBaseAnnotation"]
  96897. });
  96898. (0, _utils.default)("ThisTypeAnnotation", {
  96899. aliases: ["Flow", "FlowType", "FlowBaseAnnotation"]
  96900. });
  96901. (0, _utils.default)("TupleTypeAnnotation", {
  96902. visitor: ["types"],
  96903. aliases: ["Flow", "FlowType"],
  96904. fields: {
  96905. types: (0, _utils.validate)((0, _utils.arrayOfType)("FlowType"))
  96906. }
  96907. });
  96908. (0, _utils.default)("TypeofTypeAnnotation", {
  96909. visitor: ["argument"],
  96910. aliases: ["Flow", "FlowType"],
  96911. fields: {
  96912. argument: (0, _utils.validateType)("FlowType")
  96913. }
  96914. });
  96915. (0, _utils.default)("TypeAlias", {
  96916. visitor: ["id", "typeParameters", "right"],
  96917. aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"],
  96918. fields: {
  96919. id: (0, _utils.validateType)("Identifier"),
  96920. typeParameters: (0, _utils.validateOptionalType)("TypeParameterDeclaration"),
  96921. right: (0, _utils.validateType)("FlowType")
  96922. }
  96923. });
  96924. (0, _utils.default)("TypeAnnotation", {
  96925. aliases: ["Flow"],
  96926. visitor: ["typeAnnotation"],
  96927. fields: {
  96928. typeAnnotation: (0, _utils.validateType)("FlowType")
  96929. }
  96930. });
  96931. (0, _utils.default)("TypeCastExpression", {
  96932. visitor: ["expression", "typeAnnotation"],
  96933. aliases: ["Flow", "ExpressionWrapper", "Expression"],
  96934. fields: {
  96935. expression: (0, _utils.validateType)("Expression"),
  96936. typeAnnotation: (0, _utils.validateType)("TypeAnnotation")
  96937. }
  96938. });
  96939. (0, _utils.default)("TypeParameter", {
  96940. aliases: ["Flow"],
  96941. visitor: ["bound", "default", "variance"],
  96942. fields: {
  96943. name: (0, _utils.validate)((0, _utils.assertValueType)("string")),
  96944. bound: (0, _utils.validateOptionalType)("TypeAnnotation"),
  96945. default: (0, _utils.validateOptionalType)("FlowType"),
  96946. variance: (0, _utils.validateOptionalType)("Variance")
  96947. }
  96948. });
  96949. (0, _utils.default)("TypeParameterDeclaration", {
  96950. aliases: ["Flow"],
  96951. visitor: ["params"],
  96952. fields: {
  96953. params: (0, _utils.validate)((0, _utils.arrayOfType)("TypeParameter"))
  96954. }
  96955. });
  96956. (0, _utils.default)("TypeParameterInstantiation", {
  96957. aliases: ["Flow"],
  96958. visitor: ["params"],
  96959. fields: {
  96960. params: (0, _utils.validate)((0, _utils.arrayOfType)("FlowType"))
  96961. }
  96962. });
  96963. (0, _utils.default)("UnionTypeAnnotation", {
  96964. visitor: ["types"],
  96965. aliases: ["Flow", "FlowType"],
  96966. fields: {
  96967. types: (0, _utils.validate)((0, _utils.arrayOfType)("FlowType"))
  96968. }
  96969. });
  96970. (0, _utils.default)("Variance", {
  96971. aliases: ["Flow"],
  96972. builder: ["kind"],
  96973. fields: {
  96974. kind: (0, _utils.validate)((0, _utils.assertOneOf)("minus", "plus"))
  96975. }
  96976. });
  96977. (0, _utils.default)("VoidTypeAnnotation", {
  96978. aliases: ["Flow", "FlowType", "FlowBaseAnnotation"]
  96979. });
  96980. (0, _utils.default)("EnumDeclaration", {
  96981. aliases: ["Statement", "Declaration"],
  96982. visitor: ["id", "body"],
  96983. fields: {
  96984. id: (0, _utils.validateType)("Identifier"),
  96985. body: (0, _utils.validateType)(["EnumBooleanBody", "EnumNumberBody", "EnumStringBody", "EnumSymbolBody"])
  96986. }
  96987. });
  96988. (0, _utils.default)("EnumBooleanBody", {
  96989. aliases: ["EnumBody"],
  96990. visitor: ["members"],
  96991. fields: {
  96992. explicitType: (0, _utils.validate)((0, _utils.assertValueType)("boolean")),
  96993. members: (0, _utils.validateArrayOfType)("EnumBooleanMember"),
  96994. hasUnknownMembers: (0, _utils.validate)((0, _utils.assertValueType)("boolean"))
  96995. }
  96996. });
  96997. (0, _utils.default)("EnumNumberBody", {
  96998. aliases: ["EnumBody"],
  96999. visitor: ["members"],
  97000. fields: {
  97001. explicitType: (0, _utils.validate)((0, _utils.assertValueType)("boolean")),
  97002. members: (0, _utils.validateArrayOfType)("EnumNumberMember"),
  97003. hasUnknownMembers: (0, _utils.validate)((0, _utils.assertValueType)("boolean"))
  97004. }
  97005. });
  97006. (0, _utils.default)("EnumStringBody", {
  97007. aliases: ["EnumBody"],
  97008. visitor: ["members"],
  97009. fields: {
  97010. explicitType: (0, _utils.validate)((0, _utils.assertValueType)("boolean")),
  97011. members: (0, _utils.validateArrayOfType)(["EnumStringMember", "EnumDefaultedMember"]),
  97012. hasUnknownMembers: (0, _utils.validate)((0, _utils.assertValueType)("boolean"))
  97013. }
  97014. });
  97015. (0, _utils.default)("EnumSymbolBody", {
  97016. aliases: ["EnumBody"],
  97017. visitor: ["members"],
  97018. fields: {
  97019. members: (0, _utils.validateArrayOfType)("EnumDefaultedMember"),
  97020. hasUnknownMembers: (0, _utils.validate)((0, _utils.assertValueType)("boolean"))
  97021. }
  97022. });
  97023. (0, _utils.default)("EnumBooleanMember", {
  97024. aliases: ["EnumMember"],
  97025. visitor: ["id"],
  97026. fields: {
  97027. id: (0, _utils.validateType)("Identifier"),
  97028. init: (0, _utils.validateType)("BooleanLiteral")
  97029. }
  97030. });
  97031. (0, _utils.default)("EnumNumberMember", {
  97032. aliases: ["EnumMember"],
  97033. visitor: ["id", "init"],
  97034. fields: {
  97035. id: (0, _utils.validateType)("Identifier"),
  97036. init: (0, _utils.validateType)("NumericLiteral")
  97037. }
  97038. });
  97039. (0, _utils.default)("EnumStringMember", {
  97040. aliases: ["EnumMember"],
  97041. visitor: ["id", "init"],
  97042. fields: {
  97043. id: (0, _utils.validateType)("Identifier"),
  97044. init: (0, _utils.validateType)("StringLiteral")
  97045. }
  97046. });
  97047. (0, _utils.default)("EnumDefaultedMember", {
  97048. aliases: ["EnumMember"],
  97049. visitor: ["id"],
  97050. fields: {
  97051. id: (0, _utils.validateType)("Identifier")
  97052. }
  97053. });
  97054. (0, _utils.default)("IndexedAccessType", {
  97055. visitor: ["objectType", "indexType"],
  97056. aliases: ["Flow", "FlowType"],
  97057. fields: {
  97058. objectType: (0, _utils.validateType)("FlowType"),
  97059. indexType: (0, _utils.validateType)("FlowType")
  97060. }
  97061. });
  97062. (0, _utils.default)("OptionalIndexedAccessType", {
  97063. visitor: ["objectType", "indexType"],
  97064. aliases: ["Flow", "FlowType"],
  97065. fields: {
  97066. objectType: (0, _utils.validateType)("FlowType"),
  97067. indexType: (0, _utils.validateType)("FlowType"),
  97068. optional: (0, _utils.validate)((0, _utils.assertValueType)("boolean"))
  97069. }
  97070. });
  97071. }
  97072. });
  97073. // node_modules/@babel/helper-hoist-variables/node_modules/@babel/types/lib/definitions/jsx.js
  97074. var require_jsx6 = __commonJS({
  97075. "node_modules/@babel/helper-hoist-variables/node_modules/@babel/types/lib/definitions/jsx.js"() {
  97076. "use strict";
  97077. var _utils = require_utils4();
  97078. (0, _utils.default)("JSXAttribute", {
  97079. visitor: ["name", "value"],
  97080. aliases: ["JSX", "Immutable"],
  97081. fields: {
  97082. name: {
  97083. validate: (0, _utils.assertNodeType)("JSXIdentifier", "JSXNamespacedName")
  97084. },
  97085. value: {
  97086. optional: true,
  97087. validate: (0, _utils.assertNodeType)("JSXElement", "JSXFragment", "StringLiteral", "JSXExpressionContainer")
  97088. }
  97089. }
  97090. });
  97091. (0, _utils.default)("JSXClosingElement", {
  97092. visitor: ["name"],
  97093. aliases: ["JSX", "Immutable"],
  97094. fields: {
  97095. name: {
  97096. validate: (0, _utils.assertNodeType)("JSXIdentifier", "JSXMemberExpression", "JSXNamespacedName")
  97097. }
  97098. }
  97099. });
  97100. (0, _utils.default)("JSXElement", {
  97101. builder: ["openingElement", "closingElement", "children", "selfClosing"],
  97102. visitor: ["openingElement", "children", "closingElement"],
  97103. aliases: ["JSX", "Immutable", "Expression"],
  97104. fields: {
  97105. openingElement: {
  97106. validate: (0, _utils.assertNodeType)("JSXOpeningElement")
  97107. },
  97108. closingElement: {
  97109. optional: true,
  97110. validate: (0, _utils.assertNodeType)("JSXClosingElement")
  97111. },
  97112. children: {
  97113. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("JSXText", "JSXExpressionContainer", "JSXSpreadChild", "JSXElement", "JSXFragment")))
  97114. },
  97115. selfClosing: {
  97116. validate: (0, _utils.assertValueType)("boolean"),
  97117. optional: true
  97118. }
  97119. }
  97120. });
  97121. (0, _utils.default)("JSXEmptyExpression", {
  97122. aliases: ["JSX"]
  97123. });
  97124. (0, _utils.default)("JSXExpressionContainer", {
  97125. visitor: ["expression"],
  97126. aliases: ["JSX", "Immutable"],
  97127. fields: {
  97128. expression: {
  97129. validate: (0, _utils.assertNodeType)("Expression", "JSXEmptyExpression")
  97130. }
  97131. }
  97132. });
  97133. (0, _utils.default)("JSXSpreadChild", {
  97134. visitor: ["expression"],
  97135. aliases: ["JSX", "Immutable"],
  97136. fields: {
  97137. expression: {
  97138. validate: (0, _utils.assertNodeType)("Expression")
  97139. }
  97140. }
  97141. });
  97142. (0, _utils.default)("JSXIdentifier", {
  97143. builder: ["name"],
  97144. aliases: ["JSX"],
  97145. fields: {
  97146. name: {
  97147. validate: (0, _utils.assertValueType)("string")
  97148. }
  97149. }
  97150. });
  97151. (0, _utils.default)("JSXMemberExpression", {
  97152. visitor: ["object", "property"],
  97153. aliases: ["JSX"],
  97154. fields: {
  97155. object: {
  97156. validate: (0, _utils.assertNodeType)("JSXMemberExpression", "JSXIdentifier")
  97157. },
  97158. property: {
  97159. validate: (0, _utils.assertNodeType)("JSXIdentifier")
  97160. }
  97161. }
  97162. });
  97163. (0, _utils.default)("JSXNamespacedName", {
  97164. visitor: ["namespace", "name"],
  97165. aliases: ["JSX"],
  97166. fields: {
  97167. namespace: {
  97168. validate: (0, _utils.assertNodeType)("JSXIdentifier")
  97169. },
  97170. name: {
  97171. validate: (0, _utils.assertNodeType)("JSXIdentifier")
  97172. }
  97173. }
  97174. });
  97175. (0, _utils.default)("JSXOpeningElement", {
  97176. builder: ["name", "attributes", "selfClosing"],
  97177. visitor: ["name", "attributes"],
  97178. aliases: ["JSX", "Immutable"],
  97179. fields: {
  97180. name: {
  97181. validate: (0, _utils.assertNodeType)("JSXIdentifier", "JSXMemberExpression", "JSXNamespacedName")
  97182. },
  97183. selfClosing: {
  97184. default: false
  97185. },
  97186. attributes: {
  97187. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("JSXAttribute", "JSXSpreadAttribute")))
  97188. },
  97189. typeParameters: {
  97190. validate: (0, _utils.assertNodeType)("TypeParameterInstantiation", "TSTypeParameterInstantiation"),
  97191. optional: true
  97192. }
  97193. }
  97194. });
  97195. (0, _utils.default)("JSXSpreadAttribute", {
  97196. visitor: ["argument"],
  97197. aliases: ["JSX"],
  97198. fields: {
  97199. argument: {
  97200. validate: (0, _utils.assertNodeType)("Expression")
  97201. }
  97202. }
  97203. });
  97204. (0, _utils.default)("JSXText", {
  97205. aliases: ["JSX", "Immutable"],
  97206. builder: ["value"],
  97207. fields: {
  97208. value: {
  97209. validate: (0, _utils.assertValueType)("string")
  97210. }
  97211. }
  97212. });
  97213. (0, _utils.default)("JSXFragment", {
  97214. builder: ["openingFragment", "closingFragment", "children"],
  97215. visitor: ["openingFragment", "children", "closingFragment"],
  97216. aliases: ["JSX", "Immutable", "Expression"],
  97217. fields: {
  97218. openingFragment: {
  97219. validate: (0, _utils.assertNodeType)("JSXOpeningFragment")
  97220. },
  97221. closingFragment: {
  97222. validate: (0, _utils.assertNodeType)("JSXClosingFragment")
  97223. },
  97224. children: {
  97225. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("JSXText", "JSXExpressionContainer", "JSXSpreadChild", "JSXElement", "JSXFragment")))
  97226. }
  97227. }
  97228. });
  97229. (0, _utils.default)("JSXOpeningFragment", {
  97230. aliases: ["JSX", "Immutable"]
  97231. });
  97232. (0, _utils.default)("JSXClosingFragment", {
  97233. aliases: ["JSX", "Immutable"]
  97234. });
  97235. }
  97236. });
  97237. // node_modules/@babel/helper-hoist-variables/node_modules/@babel/types/lib/definitions/placeholders.js
  97238. var require_placeholders4 = __commonJS({
  97239. "node_modules/@babel/helper-hoist-variables/node_modules/@babel/types/lib/definitions/placeholders.js"(exports) {
  97240. "use strict";
  97241. Object.defineProperty(exports, "__esModule", {
  97242. value: true
  97243. });
  97244. exports.PLACEHOLDERS_FLIPPED_ALIAS = exports.PLACEHOLDERS_ALIAS = exports.PLACEHOLDERS = void 0;
  97245. var _utils = require_utils4();
  97246. var PLACEHOLDERS = ["Identifier", "StringLiteral", "Expression", "Statement", "Declaration", "BlockStatement", "ClassBody", "Pattern"];
  97247. exports.PLACEHOLDERS = PLACEHOLDERS;
  97248. var PLACEHOLDERS_ALIAS = {
  97249. Declaration: ["Statement"],
  97250. Pattern: ["PatternLike", "LVal"]
  97251. };
  97252. exports.PLACEHOLDERS_ALIAS = PLACEHOLDERS_ALIAS;
  97253. for (const type of PLACEHOLDERS) {
  97254. const alias = _utils.ALIAS_KEYS[type];
  97255. if (alias != null && alias.length)
  97256. PLACEHOLDERS_ALIAS[type] = alias;
  97257. }
  97258. var PLACEHOLDERS_FLIPPED_ALIAS = {};
  97259. exports.PLACEHOLDERS_FLIPPED_ALIAS = PLACEHOLDERS_FLIPPED_ALIAS;
  97260. Object.keys(PLACEHOLDERS_ALIAS).forEach((type) => {
  97261. PLACEHOLDERS_ALIAS[type].forEach((alias) => {
  97262. if (!Object.hasOwnProperty.call(PLACEHOLDERS_FLIPPED_ALIAS, alias)) {
  97263. PLACEHOLDERS_FLIPPED_ALIAS[alias] = [];
  97264. }
  97265. PLACEHOLDERS_FLIPPED_ALIAS[alias].push(type);
  97266. });
  97267. });
  97268. }
  97269. });
  97270. // node_modules/@babel/helper-hoist-variables/node_modules/@babel/types/lib/definitions/misc.js
  97271. var require_misc4 = __commonJS({
  97272. "node_modules/@babel/helper-hoist-variables/node_modules/@babel/types/lib/definitions/misc.js"() {
  97273. "use strict";
  97274. var _utils = require_utils4();
  97275. var _placeholders = require_placeholders4();
  97276. {
  97277. (0, _utils.default)("Noop", {
  97278. visitor: []
  97279. });
  97280. }
  97281. (0, _utils.default)("Placeholder", {
  97282. visitor: [],
  97283. builder: ["expectedNode", "name"],
  97284. fields: {
  97285. name: {
  97286. validate: (0, _utils.assertNodeType)("Identifier")
  97287. },
  97288. expectedNode: {
  97289. validate: (0, _utils.assertOneOf)(..._placeholders.PLACEHOLDERS)
  97290. }
  97291. }
  97292. });
  97293. (0, _utils.default)("V8IntrinsicIdentifier", {
  97294. builder: ["name"],
  97295. fields: {
  97296. name: {
  97297. validate: (0, _utils.assertValueType)("string")
  97298. }
  97299. }
  97300. });
  97301. }
  97302. });
  97303. // node_modules/@babel/helper-hoist-variables/node_modules/@babel/types/lib/definitions/experimental.js
  97304. var require_experimental4 = __commonJS({
  97305. "node_modules/@babel/helper-hoist-variables/node_modules/@babel/types/lib/definitions/experimental.js"() {
  97306. "use strict";
  97307. var _utils = require_utils4();
  97308. var _core = require_core4();
  97309. (0, _utils.default)("ArgumentPlaceholder", {});
  97310. (0, _utils.default)("BindExpression", {
  97311. visitor: ["object", "callee"],
  97312. aliases: ["Expression"],
  97313. fields: !process.env.BABEL_TYPES_8_BREAKING ? {
  97314. object: {
  97315. validate: Object.assign(() => {
  97316. }, {
  97317. oneOfNodeTypes: ["Expression"]
  97318. })
  97319. },
  97320. callee: {
  97321. validate: Object.assign(() => {
  97322. }, {
  97323. oneOfNodeTypes: ["Expression"]
  97324. })
  97325. }
  97326. } : {
  97327. object: {
  97328. validate: (0, _utils.assertNodeType)("Expression")
  97329. },
  97330. callee: {
  97331. validate: (0, _utils.assertNodeType)("Expression")
  97332. }
  97333. }
  97334. });
  97335. (0, _utils.default)("ClassProperty", {
  97336. visitor: ["key", "value", "typeAnnotation", "decorators"],
  97337. builder: ["key", "value", "typeAnnotation", "decorators", "computed", "static"],
  97338. aliases: ["Property"],
  97339. fields: Object.assign({}, _core.classMethodOrPropertyCommon, {
  97340. value: {
  97341. validate: (0, _utils.assertNodeType)("Expression"),
  97342. optional: true
  97343. },
  97344. definite: {
  97345. validate: (0, _utils.assertValueType)("boolean"),
  97346. optional: true
  97347. },
  97348. typeAnnotation: {
  97349. validate: (0, _utils.assertNodeType)("TypeAnnotation", "TSTypeAnnotation", "Noop"),
  97350. optional: true
  97351. },
  97352. decorators: {
  97353. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Decorator"))),
  97354. optional: true
  97355. },
  97356. readonly: {
  97357. validate: (0, _utils.assertValueType)("boolean"),
  97358. optional: true
  97359. },
  97360. declare: {
  97361. validate: (0, _utils.assertValueType)("boolean"),
  97362. optional: true
  97363. }
  97364. })
  97365. });
  97366. (0, _utils.default)("PipelineTopicExpression", {
  97367. builder: ["expression"],
  97368. visitor: ["expression"],
  97369. fields: {
  97370. expression: {
  97371. validate: (0, _utils.assertNodeType)("Expression")
  97372. }
  97373. }
  97374. });
  97375. (0, _utils.default)("PipelineBareFunction", {
  97376. builder: ["callee"],
  97377. visitor: ["callee"],
  97378. fields: {
  97379. callee: {
  97380. validate: (0, _utils.assertNodeType)("Expression")
  97381. }
  97382. }
  97383. });
  97384. (0, _utils.default)("PipelinePrimaryTopicReference", {
  97385. aliases: ["Expression"]
  97386. });
  97387. (0, _utils.default)("ClassPrivateProperty", {
  97388. visitor: ["key", "value", "decorators"],
  97389. builder: ["key", "value", "decorators", "static"],
  97390. aliases: ["Property", "Private"],
  97391. fields: {
  97392. key: {
  97393. validate: (0, _utils.assertNodeType)("PrivateName")
  97394. },
  97395. value: {
  97396. validate: (0, _utils.assertNodeType)("Expression"),
  97397. optional: true
  97398. },
  97399. typeAnnotation: {
  97400. validate: (0, _utils.assertNodeType)("TypeAnnotation", "TSTypeAnnotation", "Noop"),
  97401. optional: true
  97402. },
  97403. decorators: {
  97404. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Decorator"))),
  97405. optional: true
  97406. }
  97407. }
  97408. });
  97409. (0, _utils.default)("ClassPrivateMethod", {
  97410. builder: ["kind", "key", "params", "body", "static"],
  97411. visitor: ["key", "params", "body", "decorators", "returnType", "typeParameters"],
  97412. aliases: ["Function", "Scopable", "BlockParent", "FunctionParent", "Method", "Private"],
  97413. fields: Object.assign({}, _core.classMethodOrDeclareMethodCommon, _core.functionTypeAnnotationCommon, {
  97414. key: {
  97415. validate: (0, _utils.assertNodeType)("PrivateName")
  97416. },
  97417. body: {
  97418. validate: (0, _utils.assertNodeType)("BlockStatement")
  97419. }
  97420. })
  97421. });
  97422. (0, _utils.default)("ImportAttribute", {
  97423. visitor: ["key", "value"],
  97424. fields: {
  97425. key: {
  97426. validate: (0, _utils.assertNodeType)("Identifier", "StringLiteral")
  97427. },
  97428. value: {
  97429. validate: (0, _utils.assertNodeType)("StringLiteral")
  97430. }
  97431. }
  97432. });
  97433. (0, _utils.default)("Decorator", {
  97434. visitor: ["expression"],
  97435. fields: {
  97436. expression: {
  97437. validate: (0, _utils.assertNodeType)("Expression")
  97438. }
  97439. }
  97440. });
  97441. (0, _utils.default)("DoExpression", {
  97442. visitor: ["body"],
  97443. builder: ["body", "async"],
  97444. aliases: ["Expression"],
  97445. fields: {
  97446. body: {
  97447. validate: (0, _utils.assertNodeType)("BlockStatement")
  97448. },
  97449. async: {
  97450. validate: (0, _utils.assertValueType)("boolean"),
  97451. default: false
  97452. }
  97453. }
  97454. });
  97455. (0, _utils.default)("ExportDefaultSpecifier", {
  97456. visitor: ["exported"],
  97457. aliases: ["ModuleSpecifier"],
  97458. fields: {
  97459. exported: {
  97460. validate: (0, _utils.assertNodeType)("Identifier")
  97461. }
  97462. }
  97463. });
  97464. (0, _utils.default)("PrivateName", {
  97465. visitor: ["id"],
  97466. aliases: ["Private"],
  97467. fields: {
  97468. id: {
  97469. validate: (0, _utils.assertNodeType)("Identifier")
  97470. }
  97471. }
  97472. });
  97473. (0, _utils.default)("RecordExpression", {
  97474. visitor: ["properties"],
  97475. aliases: ["Expression"],
  97476. fields: {
  97477. properties: {
  97478. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("ObjectProperty", "SpreadElement")))
  97479. }
  97480. }
  97481. });
  97482. (0, _utils.default)("TupleExpression", {
  97483. fields: {
  97484. elements: {
  97485. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Expression", "SpreadElement"))),
  97486. default: []
  97487. }
  97488. },
  97489. visitor: ["elements"],
  97490. aliases: ["Expression"]
  97491. });
  97492. (0, _utils.default)("DecimalLiteral", {
  97493. builder: ["value"],
  97494. fields: {
  97495. value: {
  97496. validate: (0, _utils.assertValueType)("string")
  97497. }
  97498. },
  97499. aliases: ["Expression", "Pureish", "Literal", "Immutable"]
  97500. });
  97501. (0, _utils.default)("StaticBlock", {
  97502. visitor: ["body"],
  97503. fields: {
  97504. body: {
  97505. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Statement")))
  97506. }
  97507. },
  97508. aliases: ["Scopable", "BlockParent"]
  97509. });
  97510. (0, _utils.default)("ModuleExpression", {
  97511. visitor: ["body"],
  97512. fields: {
  97513. body: {
  97514. validate: (0, _utils.assertNodeType)("Program")
  97515. }
  97516. },
  97517. aliases: ["Expression"]
  97518. });
  97519. }
  97520. });
  97521. // node_modules/@babel/helper-hoist-variables/node_modules/@babel/types/lib/definitions/typescript.js
  97522. var require_typescript6 = __commonJS({
  97523. "node_modules/@babel/helper-hoist-variables/node_modules/@babel/types/lib/definitions/typescript.js"() {
  97524. "use strict";
  97525. var _utils = require_utils4();
  97526. var _core = require_core4();
  97527. var bool = (0, _utils.assertValueType)("boolean");
  97528. var tSFunctionTypeAnnotationCommon = {
  97529. returnType: {
  97530. validate: (0, _utils.assertNodeType)("TSTypeAnnotation", "Noop"),
  97531. optional: true
  97532. },
  97533. typeParameters: {
  97534. validate: (0, _utils.assertNodeType)("TSTypeParameterDeclaration", "Noop"),
  97535. optional: true
  97536. }
  97537. };
  97538. (0, _utils.default)("TSParameterProperty", {
  97539. aliases: ["LVal"],
  97540. visitor: ["parameter"],
  97541. fields: {
  97542. accessibility: {
  97543. validate: (0, _utils.assertOneOf)("public", "private", "protected"),
  97544. optional: true
  97545. },
  97546. readonly: {
  97547. validate: (0, _utils.assertValueType)("boolean"),
  97548. optional: true
  97549. },
  97550. parameter: {
  97551. validate: (0, _utils.assertNodeType)("Identifier", "AssignmentPattern")
  97552. }
  97553. }
  97554. });
  97555. (0, _utils.default)("TSDeclareFunction", {
  97556. aliases: ["Statement", "Declaration"],
  97557. visitor: ["id", "typeParameters", "params", "returnType"],
  97558. fields: Object.assign({}, _core.functionDeclarationCommon, tSFunctionTypeAnnotationCommon)
  97559. });
  97560. (0, _utils.default)("TSDeclareMethod", {
  97561. visitor: ["decorators", "key", "typeParameters", "params", "returnType"],
  97562. fields: Object.assign({}, _core.classMethodOrDeclareMethodCommon, tSFunctionTypeAnnotationCommon)
  97563. });
  97564. (0, _utils.default)("TSQualifiedName", {
  97565. aliases: ["TSEntityName"],
  97566. visitor: ["left", "right"],
  97567. fields: {
  97568. left: (0, _utils.validateType)("TSEntityName"),
  97569. right: (0, _utils.validateType)("Identifier")
  97570. }
  97571. });
  97572. var signatureDeclarationCommon = {
  97573. typeParameters: (0, _utils.validateOptionalType)("TSTypeParameterDeclaration"),
  97574. parameters: (0, _utils.validateArrayOfType)(["Identifier", "RestElement"]),
  97575. typeAnnotation: (0, _utils.validateOptionalType)("TSTypeAnnotation")
  97576. };
  97577. var callConstructSignatureDeclaration = {
  97578. aliases: ["TSTypeElement"],
  97579. visitor: ["typeParameters", "parameters", "typeAnnotation"],
  97580. fields: signatureDeclarationCommon
  97581. };
  97582. (0, _utils.default)("TSCallSignatureDeclaration", callConstructSignatureDeclaration);
  97583. (0, _utils.default)("TSConstructSignatureDeclaration", callConstructSignatureDeclaration);
  97584. var namedTypeElementCommon = {
  97585. key: (0, _utils.validateType)("Expression"),
  97586. computed: (0, _utils.validate)(bool),
  97587. optional: (0, _utils.validateOptional)(bool)
  97588. };
  97589. (0, _utils.default)("TSPropertySignature", {
  97590. aliases: ["TSTypeElement"],
  97591. visitor: ["key", "typeAnnotation", "initializer"],
  97592. fields: Object.assign({}, namedTypeElementCommon, {
  97593. readonly: (0, _utils.validateOptional)(bool),
  97594. typeAnnotation: (0, _utils.validateOptionalType)("TSTypeAnnotation"),
  97595. initializer: (0, _utils.validateOptionalType)("Expression")
  97596. })
  97597. });
  97598. (0, _utils.default)("TSMethodSignature", {
  97599. aliases: ["TSTypeElement"],
  97600. visitor: ["key", "typeParameters", "parameters", "typeAnnotation"],
  97601. fields: Object.assign({}, signatureDeclarationCommon, namedTypeElementCommon, {
  97602. kind: {
  97603. validate: (0, _utils.assertOneOf)("method", "get", "set")
  97604. }
  97605. })
  97606. });
  97607. (0, _utils.default)("TSIndexSignature", {
  97608. aliases: ["TSTypeElement"],
  97609. visitor: ["parameters", "typeAnnotation"],
  97610. fields: {
  97611. readonly: (0, _utils.validateOptional)(bool),
  97612. static: (0, _utils.validateOptional)(bool),
  97613. parameters: (0, _utils.validateArrayOfType)("Identifier"),
  97614. typeAnnotation: (0, _utils.validateOptionalType)("TSTypeAnnotation")
  97615. }
  97616. });
  97617. var tsKeywordTypes = ["TSAnyKeyword", "TSBooleanKeyword", "TSBigIntKeyword", "TSIntrinsicKeyword", "TSNeverKeyword", "TSNullKeyword", "TSNumberKeyword", "TSObjectKeyword", "TSStringKeyword", "TSSymbolKeyword", "TSUndefinedKeyword", "TSUnknownKeyword", "TSVoidKeyword"];
  97618. for (const type of tsKeywordTypes) {
  97619. (0, _utils.default)(type, {
  97620. aliases: ["TSType", "TSBaseType"],
  97621. visitor: [],
  97622. fields: {}
  97623. });
  97624. }
  97625. (0, _utils.default)("TSThisType", {
  97626. aliases: ["TSType", "TSBaseType"],
  97627. visitor: [],
  97628. fields: {}
  97629. });
  97630. var fnOrCtrBase = {
  97631. aliases: ["TSType"],
  97632. visitor: ["typeParameters", "parameters", "typeAnnotation"]
  97633. };
  97634. (0, _utils.default)("TSFunctionType", Object.assign({}, fnOrCtrBase, {
  97635. fields: signatureDeclarationCommon
  97636. }));
  97637. (0, _utils.default)("TSConstructorType", Object.assign({}, fnOrCtrBase, {
  97638. fields: Object.assign({}, signatureDeclarationCommon, {
  97639. abstract: (0, _utils.validateOptional)(bool)
  97640. })
  97641. }));
  97642. (0, _utils.default)("TSTypeReference", {
  97643. aliases: ["TSType"],
  97644. visitor: ["typeName", "typeParameters"],
  97645. fields: {
  97646. typeName: (0, _utils.validateType)("TSEntityName"),
  97647. typeParameters: (0, _utils.validateOptionalType)("TSTypeParameterInstantiation")
  97648. }
  97649. });
  97650. (0, _utils.default)("TSTypePredicate", {
  97651. aliases: ["TSType"],
  97652. visitor: ["parameterName", "typeAnnotation"],
  97653. builder: ["parameterName", "typeAnnotation", "asserts"],
  97654. fields: {
  97655. parameterName: (0, _utils.validateType)(["Identifier", "TSThisType"]),
  97656. typeAnnotation: (0, _utils.validateOptionalType)("TSTypeAnnotation"),
  97657. asserts: (0, _utils.validateOptional)(bool)
  97658. }
  97659. });
  97660. (0, _utils.default)("TSTypeQuery", {
  97661. aliases: ["TSType"],
  97662. visitor: ["exprName"],
  97663. fields: {
  97664. exprName: (0, _utils.validateType)(["TSEntityName", "TSImportType"])
  97665. }
  97666. });
  97667. (0, _utils.default)("TSTypeLiteral", {
  97668. aliases: ["TSType"],
  97669. visitor: ["members"],
  97670. fields: {
  97671. members: (0, _utils.validateArrayOfType)("TSTypeElement")
  97672. }
  97673. });
  97674. (0, _utils.default)("TSArrayType", {
  97675. aliases: ["TSType"],
  97676. visitor: ["elementType"],
  97677. fields: {
  97678. elementType: (0, _utils.validateType)("TSType")
  97679. }
  97680. });
  97681. (0, _utils.default)("TSTupleType", {
  97682. aliases: ["TSType"],
  97683. visitor: ["elementTypes"],
  97684. fields: {
  97685. elementTypes: (0, _utils.validateArrayOfType)(["TSType", "TSNamedTupleMember"])
  97686. }
  97687. });
  97688. (0, _utils.default)("TSOptionalType", {
  97689. aliases: ["TSType"],
  97690. visitor: ["typeAnnotation"],
  97691. fields: {
  97692. typeAnnotation: (0, _utils.validateType)("TSType")
  97693. }
  97694. });
  97695. (0, _utils.default)("TSRestType", {
  97696. aliases: ["TSType"],
  97697. visitor: ["typeAnnotation"],
  97698. fields: {
  97699. typeAnnotation: (0, _utils.validateType)("TSType")
  97700. }
  97701. });
  97702. (0, _utils.default)("TSNamedTupleMember", {
  97703. visitor: ["label", "elementType"],
  97704. builder: ["label", "elementType", "optional"],
  97705. fields: {
  97706. label: (0, _utils.validateType)("Identifier"),
  97707. optional: {
  97708. validate: bool,
  97709. default: false
  97710. },
  97711. elementType: (0, _utils.validateType)("TSType")
  97712. }
  97713. });
  97714. var unionOrIntersection = {
  97715. aliases: ["TSType"],
  97716. visitor: ["types"],
  97717. fields: {
  97718. types: (0, _utils.validateArrayOfType)("TSType")
  97719. }
  97720. };
  97721. (0, _utils.default)("TSUnionType", unionOrIntersection);
  97722. (0, _utils.default)("TSIntersectionType", unionOrIntersection);
  97723. (0, _utils.default)("TSConditionalType", {
  97724. aliases: ["TSType"],
  97725. visitor: ["checkType", "extendsType", "trueType", "falseType"],
  97726. fields: {
  97727. checkType: (0, _utils.validateType)("TSType"),
  97728. extendsType: (0, _utils.validateType)("TSType"),
  97729. trueType: (0, _utils.validateType)("TSType"),
  97730. falseType: (0, _utils.validateType)("TSType")
  97731. }
  97732. });
  97733. (0, _utils.default)("TSInferType", {
  97734. aliases: ["TSType"],
  97735. visitor: ["typeParameter"],
  97736. fields: {
  97737. typeParameter: (0, _utils.validateType)("TSTypeParameter")
  97738. }
  97739. });
  97740. (0, _utils.default)("TSParenthesizedType", {
  97741. aliases: ["TSType"],
  97742. visitor: ["typeAnnotation"],
  97743. fields: {
  97744. typeAnnotation: (0, _utils.validateType)("TSType")
  97745. }
  97746. });
  97747. (0, _utils.default)("TSTypeOperator", {
  97748. aliases: ["TSType"],
  97749. visitor: ["typeAnnotation"],
  97750. fields: {
  97751. operator: (0, _utils.validate)((0, _utils.assertValueType)("string")),
  97752. typeAnnotation: (0, _utils.validateType)("TSType")
  97753. }
  97754. });
  97755. (0, _utils.default)("TSIndexedAccessType", {
  97756. aliases: ["TSType"],
  97757. visitor: ["objectType", "indexType"],
  97758. fields: {
  97759. objectType: (0, _utils.validateType)("TSType"),
  97760. indexType: (0, _utils.validateType)("TSType")
  97761. }
  97762. });
  97763. (0, _utils.default)("TSMappedType", {
  97764. aliases: ["TSType"],
  97765. visitor: ["typeParameter", "typeAnnotation", "nameType"],
  97766. fields: {
  97767. readonly: (0, _utils.validateOptional)(bool),
  97768. typeParameter: (0, _utils.validateType)("TSTypeParameter"),
  97769. optional: (0, _utils.validateOptional)(bool),
  97770. typeAnnotation: (0, _utils.validateOptionalType)("TSType"),
  97771. nameType: (0, _utils.validateOptionalType)("TSType")
  97772. }
  97773. });
  97774. (0, _utils.default)("TSLiteralType", {
  97775. aliases: ["TSType", "TSBaseType"],
  97776. visitor: ["literal"],
  97777. fields: {
  97778. literal: (0, _utils.validateType)(["NumericLiteral", "StringLiteral", "BooleanLiteral", "BigIntLiteral"])
  97779. }
  97780. });
  97781. (0, _utils.default)("TSExpressionWithTypeArguments", {
  97782. aliases: ["TSType"],
  97783. visitor: ["expression", "typeParameters"],
  97784. fields: {
  97785. expression: (0, _utils.validateType)("TSEntityName"),
  97786. typeParameters: (0, _utils.validateOptionalType)("TSTypeParameterInstantiation")
  97787. }
  97788. });
  97789. (0, _utils.default)("TSInterfaceDeclaration", {
  97790. aliases: ["Statement", "Declaration"],
  97791. visitor: ["id", "typeParameters", "extends", "body"],
  97792. fields: {
  97793. declare: (0, _utils.validateOptional)(bool),
  97794. id: (0, _utils.validateType)("Identifier"),
  97795. typeParameters: (0, _utils.validateOptionalType)("TSTypeParameterDeclaration"),
  97796. extends: (0, _utils.validateOptional)((0, _utils.arrayOfType)("TSExpressionWithTypeArguments")),
  97797. body: (0, _utils.validateType)("TSInterfaceBody")
  97798. }
  97799. });
  97800. (0, _utils.default)("TSInterfaceBody", {
  97801. visitor: ["body"],
  97802. fields: {
  97803. body: (0, _utils.validateArrayOfType)("TSTypeElement")
  97804. }
  97805. });
  97806. (0, _utils.default)("TSTypeAliasDeclaration", {
  97807. aliases: ["Statement", "Declaration"],
  97808. visitor: ["id", "typeParameters", "typeAnnotation"],
  97809. fields: {
  97810. declare: (0, _utils.validateOptional)(bool),
  97811. id: (0, _utils.validateType)("Identifier"),
  97812. typeParameters: (0, _utils.validateOptionalType)("TSTypeParameterDeclaration"),
  97813. typeAnnotation: (0, _utils.validateType)("TSType")
  97814. }
  97815. });
  97816. (0, _utils.default)("TSAsExpression", {
  97817. aliases: ["Expression"],
  97818. visitor: ["expression", "typeAnnotation"],
  97819. fields: {
  97820. expression: (0, _utils.validateType)("Expression"),
  97821. typeAnnotation: (0, _utils.validateType)("TSType")
  97822. }
  97823. });
  97824. (0, _utils.default)("TSTypeAssertion", {
  97825. aliases: ["Expression"],
  97826. visitor: ["typeAnnotation", "expression"],
  97827. fields: {
  97828. typeAnnotation: (0, _utils.validateType)("TSType"),
  97829. expression: (0, _utils.validateType)("Expression")
  97830. }
  97831. });
  97832. (0, _utils.default)("TSEnumDeclaration", {
  97833. aliases: ["Statement", "Declaration"],
  97834. visitor: ["id", "members"],
  97835. fields: {
  97836. declare: (0, _utils.validateOptional)(bool),
  97837. const: (0, _utils.validateOptional)(bool),
  97838. id: (0, _utils.validateType)("Identifier"),
  97839. members: (0, _utils.validateArrayOfType)("TSEnumMember"),
  97840. initializer: (0, _utils.validateOptionalType)("Expression")
  97841. }
  97842. });
  97843. (0, _utils.default)("TSEnumMember", {
  97844. visitor: ["id", "initializer"],
  97845. fields: {
  97846. id: (0, _utils.validateType)(["Identifier", "StringLiteral"]),
  97847. initializer: (0, _utils.validateOptionalType)("Expression")
  97848. }
  97849. });
  97850. (0, _utils.default)("TSModuleDeclaration", {
  97851. aliases: ["Statement", "Declaration"],
  97852. visitor: ["id", "body"],
  97853. fields: {
  97854. declare: (0, _utils.validateOptional)(bool),
  97855. global: (0, _utils.validateOptional)(bool),
  97856. id: (0, _utils.validateType)(["Identifier", "StringLiteral"]),
  97857. body: (0, _utils.validateType)(["TSModuleBlock", "TSModuleDeclaration"])
  97858. }
  97859. });
  97860. (0, _utils.default)("TSModuleBlock", {
  97861. aliases: ["Scopable", "Block", "BlockParent"],
  97862. visitor: ["body"],
  97863. fields: {
  97864. body: (0, _utils.validateArrayOfType)("Statement")
  97865. }
  97866. });
  97867. (0, _utils.default)("TSImportType", {
  97868. aliases: ["TSType"],
  97869. visitor: ["argument", "qualifier", "typeParameters"],
  97870. fields: {
  97871. argument: (0, _utils.validateType)("StringLiteral"),
  97872. qualifier: (0, _utils.validateOptionalType)("TSEntityName"),
  97873. typeParameters: (0, _utils.validateOptionalType)("TSTypeParameterInstantiation")
  97874. }
  97875. });
  97876. (0, _utils.default)("TSImportEqualsDeclaration", {
  97877. aliases: ["Statement"],
  97878. visitor: ["id", "moduleReference"],
  97879. fields: {
  97880. isExport: (0, _utils.validate)(bool),
  97881. id: (0, _utils.validateType)("Identifier"),
  97882. moduleReference: (0, _utils.validateType)(["TSEntityName", "TSExternalModuleReference"])
  97883. }
  97884. });
  97885. (0, _utils.default)("TSExternalModuleReference", {
  97886. visitor: ["expression"],
  97887. fields: {
  97888. expression: (0, _utils.validateType)("StringLiteral")
  97889. }
  97890. });
  97891. (0, _utils.default)("TSNonNullExpression", {
  97892. aliases: ["Expression"],
  97893. visitor: ["expression"],
  97894. fields: {
  97895. expression: (0, _utils.validateType)("Expression")
  97896. }
  97897. });
  97898. (0, _utils.default)("TSExportAssignment", {
  97899. aliases: ["Statement"],
  97900. visitor: ["expression"],
  97901. fields: {
  97902. expression: (0, _utils.validateType)("Expression")
  97903. }
  97904. });
  97905. (0, _utils.default)("TSNamespaceExportDeclaration", {
  97906. aliases: ["Statement"],
  97907. visitor: ["id"],
  97908. fields: {
  97909. id: (0, _utils.validateType)("Identifier")
  97910. }
  97911. });
  97912. (0, _utils.default)("TSTypeAnnotation", {
  97913. visitor: ["typeAnnotation"],
  97914. fields: {
  97915. typeAnnotation: {
  97916. validate: (0, _utils.assertNodeType)("TSType")
  97917. }
  97918. }
  97919. });
  97920. (0, _utils.default)("TSTypeParameterInstantiation", {
  97921. visitor: ["params"],
  97922. fields: {
  97923. params: {
  97924. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("TSType")))
  97925. }
  97926. }
  97927. });
  97928. (0, _utils.default)("TSTypeParameterDeclaration", {
  97929. visitor: ["params"],
  97930. fields: {
  97931. params: {
  97932. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("TSTypeParameter")))
  97933. }
  97934. }
  97935. });
  97936. (0, _utils.default)("TSTypeParameter", {
  97937. builder: ["constraint", "default", "name"],
  97938. visitor: ["constraint", "default"],
  97939. fields: {
  97940. name: {
  97941. validate: (0, _utils.assertValueType)("string")
  97942. },
  97943. constraint: {
  97944. validate: (0, _utils.assertNodeType)("TSType"),
  97945. optional: true
  97946. },
  97947. default: {
  97948. validate: (0, _utils.assertNodeType)("TSType"),
  97949. optional: true
  97950. }
  97951. }
  97952. });
  97953. }
  97954. });
  97955. // node_modules/@babel/helper-hoist-variables/node_modules/@babel/types/lib/definitions/index.js
  97956. var require_definitions4 = __commonJS({
  97957. "node_modules/@babel/helper-hoist-variables/node_modules/@babel/types/lib/definitions/index.js"(exports) {
  97958. "use strict";
  97959. Object.defineProperty(exports, "__esModule", {
  97960. value: true
  97961. });
  97962. Object.defineProperty(exports, "VISITOR_KEYS", {
  97963. enumerable: true,
  97964. get: function() {
  97965. return _utils.VISITOR_KEYS;
  97966. }
  97967. });
  97968. Object.defineProperty(exports, "ALIAS_KEYS", {
  97969. enumerable: true,
  97970. get: function() {
  97971. return _utils.ALIAS_KEYS;
  97972. }
  97973. });
  97974. Object.defineProperty(exports, "FLIPPED_ALIAS_KEYS", {
  97975. enumerable: true,
  97976. get: function() {
  97977. return _utils.FLIPPED_ALIAS_KEYS;
  97978. }
  97979. });
  97980. Object.defineProperty(exports, "NODE_FIELDS", {
  97981. enumerable: true,
  97982. get: function() {
  97983. return _utils.NODE_FIELDS;
  97984. }
  97985. });
  97986. Object.defineProperty(exports, "BUILDER_KEYS", {
  97987. enumerable: true,
  97988. get: function() {
  97989. return _utils.BUILDER_KEYS;
  97990. }
  97991. });
  97992. Object.defineProperty(exports, "DEPRECATED_KEYS", {
  97993. enumerable: true,
  97994. get: function() {
  97995. return _utils.DEPRECATED_KEYS;
  97996. }
  97997. });
  97998. Object.defineProperty(exports, "NODE_PARENT_VALIDATIONS", {
  97999. enumerable: true,
  98000. get: function() {
  98001. return _utils.NODE_PARENT_VALIDATIONS;
  98002. }
  98003. });
  98004. Object.defineProperty(exports, "PLACEHOLDERS", {
  98005. enumerable: true,
  98006. get: function() {
  98007. return _placeholders.PLACEHOLDERS;
  98008. }
  98009. });
  98010. Object.defineProperty(exports, "PLACEHOLDERS_ALIAS", {
  98011. enumerable: true,
  98012. get: function() {
  98013. return _placeholders.PLACEHOLDERS_ALIAS;
  98014. }
  98015. });
  98016. Object.defineProperty(exports, "PLACEHOLDERS_FLIPPED_ALIAS", {
  98017. enumerable: true,
  98018. get: function() {
  98019. return _placeholders.PLACEHOLDERS_FLIPPED_ALIAS;
  98020. }
  98021. });
  98022. exports.TYPES = void 0;
  98023. var _toFastProperties = require_to_fast_properties();
  98024. require_core4();
  98025. require_flow6();
  98026. require_jsx6();
  98027. require_misc4();
  98028. require_experimental4();
  98029. require_typescript6();
  98030. var _utils = require_utils4();
  98031. var _placeholders = require_placeholders4();
  98032. _toFastProperties(_utils.VISITOR_KEYS);
  98033. _toFastProperties(_utils.ALIAS_KEYS);
  98034. _toFastProperties(_utils.FLIPPED_ALIAS_KEYS);
  98035. _toFastProperties(_utils.NODE_FIELDS);
  98036. _toFastProperties(_utils.BUILDER_KEYS);
  98037. _toFastProperties(_utils.DEPRECATED_KEYS);
  98038. _toFastProperties(_placeholders.PLACEHOLDERS_ALIAS);
  98039. _toFastProperties(_placeholders.PLACEHOLDERS_FLIPPED_ALIAS);
  98040. var TYPES = Object.keys(_utils.VISITOR_KEYS).concat(Object.keys(_utils.FLIPPED_ALIAS_KEYS)).concat(Object.keys(_utils.DEPRECATED_KEYS));
  98041. exports.TYPES = TYPES;
  98042. }
  98043. });
  98044. // node_modules/@babel/helper-hoist-variables/node_modules/@babel/types/lib/builders/builder.js
  98045. var require_builder5 = __commonJS({
  98046. "node_modules/@babel/helper-hoist-variables/node_modules/@babel/types/lib/builders/builder.js"(exports) {
  98047. "use strict";
  98048. Object.defineProperty(exports, "__esModule", {
  98049. value: true
  98050. });
  98051. exports.default = builder;
  98052. var _definitions = require_definitions4();
  98053. var _validate = require_validate4();
  98054. function builder(type, ...args) {
  98055. const keys2 = _definitions.BUILDER_KEYS[type];
  98056. const countArgs = args.length;
  98057. if (countArgs > keys2.length) {
  98058. throw new Error(`${type}: Too many arguments passed. Received ${countArgs} but can receive no more than ${keys2.length}`);
  98059. }
  98060. const node = {
  98061. type
  98062. };
  98063. let i = 0;
  98064. keys2.forEach((key) => {
  98065. const field = _definitions.NODE_FIELDS[type][key];
  98066. let arg;
  98067. if (i < countArgs)
  98068. arg = args[i];
  98069. if (arg === void 0) {
  98070. arg = Array.isArray(field.default) ? [] : field.default;
  98071. }
  98072. node[key] = arg;
  98073. i++;
  98074. });
  98075. for (const key of Object.keys(node)) {
  98076. (0, _validate.default)(node, key, node[key]);
  98077. }
  98078. return node;
  98079. }
  98080. }
  98081. });
  98082. // node_modules/@babel/helper-hoist-variables/node_modules/@babel/types/lib/builders/generated/index.js
  98083. var require_generated17 = __commonJS({
  98084. "node_modules/@babel/helper-hoist-variables/node_modules/@babel/types/lib/builders/generated/index.js"(exports) {
  98085. "use strict";
  98086. Object.defineProperty(exports, "__esModule", {
  98087. value: true
  98088. });
  98089. exports.arrayExpression = arrayExpression;
  98090. exports.assignmentExpression = assignmentExpression;
  98091. exports.binaryExpression = binaryExpression;
  98092. exports.interpreterDirective = interpreterDirective;
  98093. exports.directive = directive;
  98094. exports.directiveLiteral = directiveLiteral;
  98095. exports.blockStatement = blockStatement;
  98096. exports.breakStatement = breakStatement;
  98097. exports.callExpression = callExpression;
  98098. exports.catchClause = catchClause;
  98099. exports.conditionalExpression = conditionalExpression;
  98100. exports.continueStatement = continueStatement;
  98101. exports.debuggerStatement = debuggerStatement;
  98102. exports.doWhileStatement = doWhileStatement;
  98103. exports.emptyStatement = emptyStatement;
  98104. exports.expressionStatement = expressionStatement;
  98105. exports.file = file;
  98106. exports.forInStatement = forInStatement;
  98107. exports.forStatement = forStatement;
  98108. exports.functionDeclaration = functionDeclaration;
  98109. exports.functionExpression = functionExpression;
  98110. exports.identifier = identifier;
  98111. exports.ifStatement = ifStatement;
  98112. exports.labeledStatement = labeledStatement;
  98113. exports.stringLiteral = stringLiteral;
  98114. exports.numericLiteral = numericLiteral;
  98115. exports.nullLiteral = nullLiteral;
  98116. exports.booleanLiteral = booleanLiteral;
  98117. exports.regExpLiteral = regExpLiteral;
  98118. exports.logicalExpression = logicalExpression;
  98119. exports.memberExpression = memberExpression;
  98120. exports.newExpression = newExpression;
  98121. exports.program = program;
  98122. exports.objectExpression = objectExpression;
  98123. exports.objectMethod = objectMethod;
  98124. exports.objectProperty = objectProperty;
  98125. exports.restElement = restElement;
  98126. exports.returnStatement = returnStatement;
  98127. exports.sequenceExpression = sequenceExpression;
  98128. exports.parenthesizedExpression = parenthesizedExpression;
  98129. exports.switchCase = switchCase;
  98130. exports.switchStatement = switchStatement;
  98131. exports.thisExpression = thisExpression;
  98132. exports.throwStatement = throwStatement;
  98133. exports.tryStatement = tryStatement;
  98134. exports.unaryExpression = unaryExpression;
  98135. exports.updateExpression = updateExpression;
  98136. exports.variableDeclaration = variableDeclaration;
  98137. exports.variableDeclarator = variableDeclarator;
  98138. exports.whileStatement = whileStatement;
  98139. exports.withStatement = withStatement;
  98140. exports.assignmentPattern = assignmentPattern;
  98141. exports.arrayPattern = arrayPattern;
  98142. exports.arrowFunctionExpression = arrowFunctionExpression;
  98143. exports.classBody = classBody;
  98144. exports.classExpression = classExpression;
  98145. exports.classDeclaration = classDeclaration;
  98146. exports.exportAllDeclaration = exportAllDeclaration;
  98147. exports.exportDefaultDeclaration = exportDefaultDeclaration;
  98148. exports.exportNamedDeclaration = exportNamedDeclaration;
  98149. exports.exportSpecifier = exportSpecifier;
  98150. exports.forOfStatement = forOfStatement;
  98151. exports.importDeclaration = importDeclaration;
  98152. exports.importDefaultSpecifier = importDefaultSpecifier;
  98153. exports.importNamespaceSpecifier = importNamespaceSpecifier;
  98154. exports.importSpecifier = importSpecifier;
  98155. exports.metaProperty = metaProperty;
  98156. exports.classMethod = classMethod;
  98157. exports.objectPattern = objectPattern;
  98158. exports.spreadElement = spreadElement;
  98159. exports.super = _super;
  98160. exports.taggedTemplateExpression = taggedTemplateExpression;
  98161. exports.templateElement = templateElement;
  98162. exports.templateLiteral = templateLiteral;
  98163. exports.yieldExpression = yieldExpression;
  98164. exports.awaitExpression = awaitExpression;
  98165. exports.import = _import;
  98166. exports.bigIntLiteral = bigIntLiteral;
  98167. exports.exportNamespaceSpecifier = exportNamespaceSpecifier;
  98168. exports.optionalMemberExpression = optionalMemberExpression;
  98169. exports.optionalCallExpression = optionalCallExpression;
  98170. exports.anyTypeAnnotation = anyTypeAnnotation;
  98171. exports.arrayTypeAnnotation = arrayTypeAnnotation;
  98172. exports.booleanTypeAnnotation = booleanTypeAnnotation;
  98173. exports.booleanLiteralTypeAnnotation = booleanLiteralTypeAnnotation;
  98174. exports.nullLiteralTypeAnnotation = nullLiteralTypeAnnotation;
  98175. exports.classImplements = classImplements;
  98176. exports.declareClass = declareClass;
  98177. exports.declareFunction = declareFunction;
  98178. exports.declareInterface = declareInterface;
  98179. exports.declareModule = declareModule;
  98180. exports.declareModuleExports = declareModuleExports;
  98181. exports.declareTypeAlias = declareTypeAlias;
  98182. exports.declareOpaqueType = declareOpaqueType;
  98183. exports.declareVariable = declareVariable;
  98184. exports.declareExportDeclaration = declareExportDeclaration;
  98185. exports.declareExportAllDeclaration = declareExportAllDeclaration;
  98186. exports.declaredPredicate = declaredPredicate;
  98187. exports.existsTypeAnnotation = existsTypeAnnotation;
  98188. exports.functionTypeAnnotation = functionTypeAnnotation;
  98189. exports.functionTypeParam = functionTypeParam;
  98190. exports.genericTypeAnnotation = genericTypeAnnotation;
  98191. exports.inferredPredicate = inferredPredicate;
  98192. exports.interfaceExtends = interfaceExtends;
  98193. exports.interfaceDeclaration = interfaceDeclaration;
  98194. exports.interfaceTypeAnnotation = interfaceTypeAnnotation;
  98195. exports.intersectionTypeAnnotation = intersectionTypeAnnotation;
  98196. exports.mixedTypeAnnotation = mixedTypeAnnotation;
  98197. exports.emptyTypeAnnotation = emptyTypeAnnotation;
  98198. exports.nullableTypeAnnotation = nullableTypeAnnotation;
  98199. exports.numberLiteralTypeAnnotation = numberLiteralTypeAnnotation;
  98200. exports.numberTypeAnnotation = numberTypeAnnotation;
  98201. exports.objectTypeAnnotation = objectTypeAnnotation;
  98202. exports.objectTypeInternalSlot = objectTypeInternalSlot;
  98203. exports.objectTypeCallProperty = objectTypeCallProperty;
  98204. exports.objectTypeIndexer = objectTypeIndexer;
  98205. exports.objectTypeProperty = objectTypeProperty;
  98206. exports.objectTypeSpreadProperty = objectTypeSpreadProperty;
  98207. exports.opaqueType = opaqueType;
  98208. exports.qualifiedTypeIdentifier = qualifiedTypeIdentifier;
  98209. exports.stringLiteralTypeAnnotation = stringLiteralTypeAnnotation;
  98210. exports.stringTypeAnnotation = stringTypeAnnotation;
  98211. exports.symbolTypeAnnotation = symbolTypeAnnotation;
  98212. exports.thisTypeAnnotation = thisTypeAnnotation;
  98213. exports.tupleTypeAnnotation = tupleTypeAnnotation;
  98214. exports.typeofTypeAnnotation = typeofTypeAnnotation;
  98215. exports.typeAlias = typeAlias;
  98216. exports.typeAnnotation = typeAnnotation;
  98217. exports.typeCastExpression = typeCastExpression;
  98218. exports.typeParameter = typeParameter;
  98219. exports.typeParameterDeclaration = typeParameterDeclaration;
  98220. exports.typeParameterInstantiation = typeParameterInstantiation;
  98221. exports.unionTypeAnnotation = unionTypeAnnotation;
  98222. exports.variance = variance;
  98223. exports.voidTypeAnnotation = voidTypeAnnotation;
  98224. exports.enumDeclaration = enumDeclaration;
  98225. exports.enumBooleanBody = enumBooleanBody;
  98226. exports.enumNumberBody = enumNumberBody;
  98227. exports.enumStringBody = enumStringBody;
  98228. exports.enumSymbolBody = enumSymbolBody;
  98229. exports.enumBooleanMember = enumBooleanMember;
  98230. exports.enumNumberMember = enumNumberMember;
  98231. exports.enumStringMember = enumStringMember;
  98232. exports.enumDefaultedMember = enumDefaultedMember;
  98233. exports.indexedAccessType = indexedAccessType;
  98234. exports.optionalIndexedAccessType = optionalIndexedAccessType;
  98235. exports.jSXAttribute = exports.jsxAttribute = jsxAttribute;
  98236. exports.jSXClosingElement = exports.jsxClosingElement = jsxClosingElement;
  98237. exports.jSXElement = exports.jsxElement = jsxElement;
  98238. exports.jSXEmptyExpression = exports.jsxEmptyExpression = jsxEmptyExpression;
  98239. exports.jSXExpressionContainer = exports.jsxExpressionContainer = jsxExpressionContainer;
  98240. exports.jSXSpreadChild = exports.jsxSpreadChild = jsxSpreadChild;
  98241. exports.jSXIdentifier = exports.jsxIdentifier = jsxIdentifier;
  98242. exports.jSXMemberExpression = exports.jsxMemberExpression = jsxMemberExpression;
  98243. exports.jSXNamespacedName = exports.jsxNamespacedName = jsxNamespacedName;
  98244. exports.jSXOpeningElement = exports.jsxOpeningElement = jsxOpeningElement;
  98245. exports.jSXSpreadAttribute = exports.jsxSpreadAttribute = jsxSpreadAttribute;
  98246. exports.jSXText = exports.jsxText = jsxText2;
  98247. exports.jSXFragment = exports.jsxFragment = jsxFragment;
  98248. exports.jSXOpeningFragment = exports.jsxOpeningFragment = jsxOpeningFragment;
  98249. exports.jSXClosingFragment = exports.jsxClosingFragment = jsxClosingFragment;
  98250. exports.noop = noop;
  98251. exports.placeholder = placeholder;
  98252. exports.v8IntrinsicIdentifier = v8IntrinsicIdentifier;
  98253. exports.argumentPlaceholder = argumentPlaceholder;
  98254. exports.bindExpression = bindExpression;
  98255. exports.classProperty = classProperty;
  98256. exports.pipelineTopicExpression = pipelineTopicExpression;
  98257. exports.pipelineBareFunction = pipelineBareFunction;
  98258. exports.pipelinePrimaryTopicReference = pipelinePrimaryTopicReference;
  98259. exports.classPrivateProperty = classPrivateProperty;
  98260. exports.classPrivateMethod = classPrivateMethod;
  98261. exports.importAttribute = importAttribute;
  98262. exports.decorator = decorator;
  98263. exports.doExpression = doExpression;
  98264. exports.exportDefaultSpecifier = exportDefaultSpecifier;
  98265. exports.privateName = privateName;
  98266. exports.recordExpression = recordExpression;
  98267. exports.tupleExpression = tupleExpression;
  98268. exports.decimalLiteral = decimalLiteral;
  98269. exports.staticBlock = staticBlock;
  98270. exports.moduleExpression = moduleExpression;
  98271. exports.tSParameterProperty = exports.tsParameterProperty = tsParameterProperty;
  98272. exports.tSDeclareFunction = exports.tsDeclareFunction = tsDeclareFunction;
  98273. exports.tSDeclareMethod = exports.tsDeclareMethod = tsDeclareMethod;
  98274. exports.tSQualifiedName = exports.tsQualifiedName = tsQualifiedName;
  98275. exports.tSCallSignatureDeclaration = exports.tsCallSignatureDeclaration = tsCallSignatureDeclaration;
  98276. exports.tSConstructSignatureDeclaration = exports.tsConstructSignatureDeclaration = tsConstructSignatureDeclaration;
  98277. exports.tSPropertySignature = exports.tsPropertySignature = tsPropertySignature;
  98278. exports.tSMethodSignature = exports.tsMethodSignature = tsMethodSignature;
  98279. exports.tSIndexSignature = exports.tsIndexSignature = tsIndexSignature;
  98280. exports.tSAnyKeyword = exports.tsAnyKeyword = tsAnyKeyword;
  98281. exports.tSBooleanKeyword = exports.tsBooleanKeyword = tsBooleanKeyword;
  98282. exports.tSBigIntKeyword = exports.tsBigIntKeyword = tsBigIntKeyword;
  98283. exports.tSIntrinsicKeyword = exports.tsIntrinsicKeyword = tsIntrinsicKeyword;
  98284. exports.tSNeverKeyword = exports.tsNeverKeyword = tsNeverKeyword;
  98285. exports.tSNullKeyword = exports.tsNullKeyword = tsNullKeyword;
  98286. exports.tSNumberKeyword = exports.tsNumberKeyword = tsNumberKeyword;
  98287. exports.tSObjectKeyword = exports.tsObjectKeyword = tsObjectKeyword;
  98288. exports.tSStringKeyword = exports.tsStringKeyword = tsStringKeyword;
  98289. exports.tSSymbolKeyword = exports.tsSymbolKeyword = tsSymbolKeyword;
  98290. exports.tSUndefinedKeyword = exports.tsUndefinedKeyword = tsUndefinedKeyword;
  98291. exports.tSUnknownKeyword = exports.tsUnknownKeyword = tsUnknownKeyword;
  98292. exports.tSVoidKeyword = exports.tsVoidKeyword = tsVoidKeyword;
  98293. exports.tSThisType = exports.tsThisType = tsThisType;
  98294. exports.tSFunctionType = exports.tsFunctionType = tsFunctionType;
  98295. exports.tSConstructorType = exports.tsConstructorType = tsConstructorType;
  98296. exports.tSTypeReference = exports.tsTypeReference = tsTypeReference;
  98297. exports.tSTypePredicate = exports.tsTypePredicate = tsTypePredicate;
  98298. exports.tSTypeQuery = exports.tsTypeQuery = tsTypeQuery;
  98299. exports.tSTypeLiteral = exports.tsTypeLiteral = tsTypeLiteral;
  98300. exports.tSArrayType = exports.tsArrayType = tsArrayType;
  98301. exports.tSTupleType = exports.tsTupleType = tsTupleType;
  98302. exports.tSOptionalType = exports.tsOptionalType = tsOptionalType;
  98303. exports.tSRestType = exports.tsRestType = tsRestType;
  98304. exports.tSNamedTupleMember = exports.tsNamedTupleMember = tsNamedTupleMember;
  98305. exports.tSUnionType = exports.tsUnionType = tsUnionType;
  98306. exports.tSIntersectionType = exports.tsIntersectionType = tsIntersectionType;
  98307. exports.tSConditionalType = exports.tsConditionalType = tsConditionalType;
  98308. exports.tSInferType = exports.tsInferType = tsInferType;
  98309. exports.tSParenthesizedType = exports.tsParenthesizedType = tsParenthesizedType;
  98310. exports.tSTypeOperator = exports.tsTypeOperator = tsTypeOperator;
  98311. exports.tSIndexedAccessType = exports.tsIndexedAccessType = tsIndexedAccessType;
  98312. exports.tSMappedType = exports.tsMappedType = tsMappedType;
  98313. exports.tSLiteralType = exports.tsLiteralType = tsLiteralType;
  98314. exports.tSExpressionWithTypeArguments = exports.tsExpressionWithTypeArguments = tsExpressionWithTypeArguments;
  98315. exports.tSInterfaceDeclaration = exports.tsInterfaceDeclaration = tsInterfaceDeclaration;
  98316. exports.tSInterfaceBody = exports.tsInterfaceBody = tsInterfaceBody;
  98317. exports.tSTypeAliasDeclaration = exports.tsTypeAliasDeclaration = tsTypeAliasDeclaration;
  98318. exports.tSAsExpression = exports.tsAsExpression = tsAsExpression;
  98319. exports.tSTypeAssertion = exports.tsTypeAssertion = tsTypeAssertion;
  98320. exports.tSEnumDeclaration = exports.tsEnumDeclaration = tsEnumDeclaration;
  98321. exports.tSEnumMember = exports.tsEnumMember = tsEnumMember;
  98322. exports.tSModuleDeclaration = exports.tsModuleDeclaration = tsModuleDeclaration;
  98323. exports.tSModuleBlock = exports.tsModuleBlock = tsModuleBlock;
  98324. exports.tSImportType = exports.tsImportType = tsImportType;
  98325. exports.tSImportEqualsDeclaration = exports.tsImportEqualsDeclaration = tsImportEqualsDeclaration;
  98326. exports.tSExternalModuleReference = exports.tsExternalModuleReference = tsExternalModuleReference;
  98327. exports.tSNonNullExpression = exports.tsNonNullExpression = tsNonNullExpression;
  98328. exports.tSExportAssignment = exports.tsExportAssignment = tsExportAssignment;
  98329. exports.tSNamespaceExportDeclaration = exports.tsNamespaceExportDeclaration = tsNamespaceExportDeclaration;
  98330. exports.tSTypeAnnotation = exports.tsTypeAnnotation = tsTypeAnnotation;
  98331. exports.tSTypeParameterInstantiation = exports.tsTypeParameterInstantiation = tsTypeParameterInstantiation;
  98332. exports.tSTypeParameterDeclaration = exports.tsTypeParameterDeclaration = tsTypeParameterDeclaration;
  98333. exports.tSTypeParameter = exports.tsTypeParameter = tsTypeParameter;
  98334. exports.numberLiteral = NumberLiteral;
  98335. exports.regexLiteral = RegexLiteral;
  98336. exports.restProperty = RestProperty;
  98337. exports.spreadProperty = SpreadProperty;
  98338. var _builder = require_builder5();
  98339. function arrayExpression(elements) {
  98340. return (0, _builder.default)("ArrayExpression", ...arguments);
  98341. }
  98342. function assignmentExpression(operator, left, right) {
  98343. return (0, _builder.default)("AssignmentExpression", ...arguments);
  98344. }
  98345. function binaryExpression(operator, left, right) {
  98346. return (0, _builder.default)("BinaryExpression", ...arguments);
  98347. }
  98348. function interpreterDirective(value) {
  98349. return (0, _builder.default)("InterpreterDirective", ...arguments);
  98350. }
  98351. function directive(value) {
  98352. return (0, _builder.default)("Directive", ...arguments);
  98353. }
  98354. function directiveLiteral(value) {
  98355. return (0, _builder.default)("DirectiveLiteral", ...arguments);
  98356. }
  98357. function blockStatement(body, directives) {
  98358. return (0, _builder.default)("BlockStatement", ...arguments);
  98359. }
  98360. function breakStatement(label) {
  98361. return (0, _builder.default)("BreakStatement", ...arguments);
  98362. }
  98363. function callExpression(callee, _arguments) {
  98364. return (0, _builder.default)("CallExpression", ...arguments);
  98365. }
  98366. function catchClause(param, body) {
  98367. return (0, _builder.default)("CatchClause", ...arguments);
  98368. }
  98369. function conditionalExpression(test, consequent, alternate) {
  98370. return (0, _builder.default)("ConditionalExpression", ...arguments);
  98371. }
  98372. function continueStatement(label) {
  98373. return (0, _builder.default)("ContinueStatement", ...arguments);
  98374. }
  98375. function debuggerStatement() {
  98376. return (0, _builder.default)("DebuggerStatement", ...arguments);
  98377. }
  98378. function doWhileStatement(test, body) {
  98379. return (0, _builder.default)("DoWhileStatement", ...arguments);
  98380. }
  98381. function emptyStatement() {
  98382. return (0, _builder.default)("EmptyStatement", ...arguments);
  98383. }
  98384. function expressionStatement(expression) {
  98385. return (0, _builder.default)("ExpressionStatement", ...arguments);
  98386. }
  98387. function file(program2, comments, tokens) {
  98388. return (0, _builder.default)("File", ...arguments);
  98389. }
  98390. function forInStatement(left, right, body) {
  98391. return (0, _builder.default)("ForInStatement", ...arguments);
  98392. }
  98393. function forStatement(init, test, update, body) {
  98394. return (0, _builder.default)("ForStatement", ...arguments);
  98395. }
  98396. function functionDeclaration(id, params, body, generator, async) {
  98397. return (0, _builder.default)("FunctionDeclaration", ...arguments);
  98398. }
  98399. function functionExpression(id, params, body, generator, async) {
  98400. return (0, _builder.default)("FunctionExpression", ...arguments);
  98401. }
  98402. function identifier(name2) {
  98403. return (0, _builder.default)("Identifier", ...arguments);
  98404. }
  98405. function ifStatement(test, consequent, alternate) {
  98406. return (0, _builder.default)("IfStatement", ...arguments);
  98407. }
  98408. function labeledStatement(label, body) {
  98409. return (0, _builder.default)("LabeledStatement", ...arguments);
  98410. }
  98411. function stringLiteral(value) {
  98412. return (0, _builder.default)("StringLiteral", ...arguments);
  98413. }
  98414. function numericLiteral(value) {
  98415. return (0, _builder.default)("NumericLiteral", ...arguments);
  98416. }
  98417. function nullLiteral() {
  98418. return (0, _builder.default)("NullLiteral", ...arguments);
  98419. }
  98420. function booleanLiteral(value) {
  98421. return (0, _builder.default)("BooleanLiteral", ...arguments);
  98422. }
  98423. function regExpLiteral(pattern, flags) {
  98424. return (0, _builder.default)("RegExpLiteral", ...arguments);
  98425. }
  98426. function logicalExpression(operator, left, right) {
  98427. return (0, _builder.default)("LogicalExpression", ...arguments);
  98428. }
  98429. function memberExpression(object, property, computed, optional) {
  98430. return (0, _builder.default)("MemberExpression", ...arguments);
  98431. }
  98432. function newExpression(callee, _arguments) {
  98433. return (0, _builder.default)("NewExpression", ...arguments);
  98434. }
  98435. function program(body, directives, sourceType, interpreter) {
  98436. return (0, _builder.default)("Program", ...arguments);
  98437. }
  98438. function objectExpression(properties) {
  98439. return (0, _builder.default)("ObjectExpression", ...arguments);
  98440. }
  98441. function objectMethod(kind, key, params, body, computed, generator, async) {
  98442. return (0, _builder.default)("ObjectMethod", ...arguments);
  98443. }
  98444. function objectProperty(key, value, computed, shorthand, decorators) {
  98445. return (0, _builder.default)("ObjectProperty", ...arguments);
  98446. }
  98447. function restElement(argument) {
  98448. return (0, _builder.default)("RestElement", ...arguments);
  98449. }
  98450. function returnStatement(argument) {
  98451. return (0, _builder.default)("ReturnStatement", ...arguments);
  98452. }
  98453. function sequenceExpression(expressions) {
  98454. return (0, _builder.default)("SequenceExpression", ...arguments);
  98455. }
  98456. function parenthesizedExpression(expression) {
  98457. return (0, _builder.default)("ParenthesizedExpression", ...arguments);
  98458. }
  98459. function switchCase(test, consequent) {
  98460. return (0, _builder.default)("SwitchCase", ...arguments);
  98461. }
  98462. function switchStatement(discriminant, cases) {
  98463. return (0, _builder.default)("SwitchStatement", ...arguments);
  98464. }
  98465. function thisExpression() {
  98466. return (0, _builder.default)("ThisExpression", ...arguments);
  98467. }
  98468. function throwStatement(argument) {
  98469. return (0, _builder.default)("ThrowStatement", ...arguments);
  98470. }
  98471. function tryStatement(block, handler, finalizer) {
  98472. return (0, _builder.default)("TryStatement", ...arguments);
  98473. }
  98474. function unaryExpression(operator, argument, prefix) {
  98475. return (0, _builder.default)("UnaryExpression", ...arguments);
  98476. }
  98477. function updateExpression(operator, argument, prefix) {
  98478. return (0, _builder.default)("UpdateExpression", ...arguments);
  98479. }
  98480. function variableDeclaration(kind, declarations) {
  98481. return (0, _builder.default)("VariableDeclaration", ...arguments);
  98482. }
  98483. function variableDeclarator(id, init) {
  98484. return (0, _builder.default)("VariableDeclarator", ...arguments);
  98485. }
  98486. function whileStatement(test, body) {
  98487. return (0, _builder.default)("WhileStatement", ...arguments);
  98488. }
  98489. function withStatement(object, body) {
  98490. return (0, _builder.default)("WithStatement", ...arguments);
  98491. }
  98492. function assignmentPattern(left, right) {
  98493. return (0, _builder.default)("AssignmentPattern", ...arguments);
  98494. }
  98495. function arrayPattern(elements) {
  98496. return (0, _builder.default)("ArrayPattern", ...arguments);
  98497. }
  98498. function arrowFunctionExpression(params, body, async) {
  98499. return (0, _builder.default)("ArrowFunctionExpression", ...arguments);
  98500. }
  98501. function classBody(body) {
  98502. return (0, _builder.default)("ClassBody", ...arguments);
  98503. }
  98504. function classExpression(id, superClass, body, decorators) {
  98505. return (0, _builder.default)("ClassExpression", ...arguments);
  98506. }
  98507. function classDeclaration(id, superClass, body, decorators) {
  98508. return (0, _builder.default)("ClassDeclaration", ...arguments);
  98509. }
  98510. function exportAllDeclaration(source) {
  98511. return (0, _builder.default)("ExportAllDeclaration", ...arguments);
  98512. }
  98513. function exportDefaultDeclaration(declaration) {
  98514. return (0, _builder.default)("ExportDefaultDeclaration", ...arguments);
  98515. }
  98516. function exportNamedDeclaration(declaration, specifiers, source) {
  98517. return (0, _builder.default)("ExportNamedDeclaration", ...arguments);
  98518. }
  98519. function exportSpecifier(local, exported) {
  98520. return (0, _builder.default)("ExportSpecifier", ...arguments);
  98521. }
  98522. function forOfStatement(left, right, body, _await) {
  98523. return (0, _builder.default)("ForOfStatement", ...arguments);
  98524. }
  98525. function importDeclaration(specifiers, source) {
  98526. return (0, _builder.default)("ImportDeclaration", ...arguments);
  98527. }
  98528. function importDefaultSpecifier(local) {
  98529. return (0, _builder.default)("ImportDefaultSpecifier", ...arguments);
  98530. }
  98531. function importNamespaceSpecifier(local) {
  98532. return (0, _builder.default)("ImportNamespaceSpecifier", ...arguments);
  98533. }
  98534. function importSpecifier(local, imported) {
  98535. return (0, _builder.default)("ImportSpecifier", ...arguments);
  98536. }
  98537. function metaProperty(meta, property) {
  98538. return (0, _builder.default)("MetaProperty", ...arguments);
  98539. }
  98540. function classMethod(kind, key, params, body, computed, _static, generator, async) {
  98541. return (0, _builder.default)("ClassMethod", ...arguments);
  98542. }
  98543. function objectPattern(properties) {
  98544. return (0, _builder.default)("ObjectPattern", ...arguments);
  98545. }
  98546. function spreadElement(argument) {
  98547. return (0, _builder.default)("SpreadElement", ...arguments);
  98548. }
  98549. function _super() {
  98550. return (0, _builder.default)("Super", ...arguments);
  98551. }
  98552. function taggedTemplateExpression(tag, quasi) {
  98553. return (0, _builder.default)("TaggedTemplateExpression", ...arguments);
  98554. }
  98555. function templateElement(value, tail) {
  98556. return (0, _builder.default)("TemplateElement", ...arguments);
  98557. }
  98558. function templateLiteral(quasis, expressions) {
  98559. return (0, _builder.default)("TemplateLiteral", ...arguments);
  98560. }
  98561. function yieldExpression(argument, delegate) {
  98562. return (0, _builder.default)("YieldExpression", ...arguments);
  98563. }
  98564. function awaitExpression(argument) {
  98565. return (0, _builder.default)("AwaitExpression", ...arguments);
  98566. }
  98567. function _import() {
  98568. return (0, _builder.default)("Import", ...arguments);
  98569. }
  98570. function bigIntLiteral(value) {
  98571. return (0, _builder.default)("BigIntLiteral", ...arguments);
  98572. }
  98573. function exportNamespaceSpecifier(exported) {
  98574. return (0, _builder.default)("ExportNamespaceSpecifier", ...arguments);
  98575. }
  98576. function optionalMemberExpression(object, property, computed, optional) {
  98577. return (0, _builder.default)("OptionalMemberExpression", ...arguments);
  98578. }
  98579. function optionalCallExpression(callee, _arguments, optional) {
  98580. return (0, _builder.default)("OptionalCallExpression", ...arguments);
  98581. }
  98582. function anyTypeAnnotation() {
  98583. return (0, _builder.default)("AnyTypeAnnotation", ...arguments);
  98584. }
  98585. function arrayTypeAnnotation(elementType) {
  98586. return (0, _builder.default)("ArrayTypeAnnotation", ...arguments);
  98587. }
  98588. function booleanTypeAnnotation() {
  98589. return (0, _builder.default)("BooleanTypeAnnotation", ...arguments);
  98590. }
  98591. function booleanLiteralTypeAnnotation(value) {
  98592. return (0, _builder.default)("BooleanLiteralTypeAnnotation", ...arguments);
  98593. }
  98594. function nullLiteralTypeAnnotation() {
  98595. return (0, _builder.default)("NullLiteralTypeAnnotation", ...arguments);
  98596. }
  98597. function classImplements(id, typeParameters) {
  98598. return (0, _builder.default)("ClassImplements", ...arguments);
  98599. }
  98600. function declareClass(id, typeParameters, _extends, body) {
  98601. return (0, _builder.default)("DeclareClass", ...arguments);
  98602. }
  98603. function declareFunction(id) {
  98604. return (0, _builder.default)("DeclareFunction", ...arguments);
  98605. }
  98606. function declareInterface(id, typeParameters, _extends, body) {
  98607. return (0, _builder.default)("DeclareInterface", ...arguments);
  98608. }
  98609. function declareModule(id, body, kind) {
  98610. return (0, _builder.default)("DeclareModule", ...arguments);
  98611. }
  98612. function declareModuleExports(typeAnnotation2) {
  98613. return (0, _builder.default)("DeclareModuleExports", ...arguments);
  98614. }
  98615. function declareTypeAlias(id, typeParameters, right) {
  98616. return (0, _builder.default)("DeclareTypeAlias", ...arguments);
  98617. }
  98618. function declareOpaqueType(id, typeParameters, supertype) {
  98619. return (0, _builder.default)("DeclareOpaqueType", ...arguments);
  98620. }
  98621. function declareVariable(id) {
  98622. return (0, _builder.default)("DeclareVariable", ...arguments);
  98623. }
  98624. function declareExportDeclaration(declaration, specifiers, source) {
  98625. return (0, _builder.default)("DeclareExportDeclaration", ...arguments);
  98626. }
  98627. function declareExportAllDeclaration(source) {
  98628. return (0, _builder.default)("DeclareExportAllDeclaration", ...arguments);
  98629. }
  98630. function declaredPredicate(value) {
  98631. return (0, _builder.default)("DeclaredPredicate", ...arguments);
  98632. }
  98633. function existsTypeAnnotation() {
  98634. return (0, _builder.default)("ExistsTypeAnnotation", ...arguments);
  98635. }
  98636. function functionTypeAnnotation(typeParameters, params, rest, returnType) {
  98637. return (0, _builder.default)("FunctionTypeAnnotation", ...arguments);
  98638. }
  98639. function functionTypeParam(name2, typeAnnotation2) {
  98640. return (0, _builder.default)("FunctionTypeParam", ...arguments);
  98641. }
  98642. function genericTypeAnnotation(id, typeParameters) {
  98643. return (0, _builder.default)("GenericTypeAnnotation", ...arguments);
  98644. }
  98645. function inferredPredicate() {
  98646. return (0, _builder.default)("InferredPredicate", ...arguments);
  98647. }
  98648. function interfaceExtends(id, typeParameters) {
  98649. return (0, _builder.default)("InterfaceExtends", ...arguments);
  98650. }
  98651. function interfaceDeclaration(id, typeParameters, _extends, body) {
  98652. return (0, _builder.default)("InterfaceDeclaration", ...arguments);
  98653. }
  98654. function interfaceTypeAnnotation(_extends, body) {
  98655. return (0, _builder.default)("InterfaceTypeAnnotation", ...arguments);
  98656. }
  98657. function intersectionTypeAnnotation(types2) {
  98658. return (0, _builder.default)("IntersectionTypeAnnotation", ...arguments);
  98659. }
  98660. function mixedTypeAnnotation() {
  98661. return (0, _builder.default)("MixedTypeAnnotation", ...arguments);
  98662. }
  98663. function emptyTypeAnnotation() {
  98664. return (0, _builder.default)("EmptyTypeAnnotation", ...arguments);
  98665. }
  98666. function nullableTypeAnnotation(typeAnnotation2) {
  98667. return (0, _builder.default)("NullableTypeAnnotation", ...arguments);
  98668. }
  98669. function numberLiteralTypeAnnotation(value) {
  98670. return (0, _builder.default)("NumberLiteralTypeAnnotation", ...arguments);
  98671. }
  98672. function numberTypeAnnotation() {
  98673. return (0, _builder.default)("NumberTypeAnnotation", ...arguments);
  98674. }
  98675. function objectTypeAnnotation(properties, indexers, callProperties, internalSlots, exact) {
  98676. return (0, _builder.default)("ObjectTypeAnnotation", ...arguments);
  98677. }
  98678. function objectTypeInternalSlot(id, value, optional, _static, method) {
  98679. return (0, _builder.default)("ObjectTypeInternalSlot", ...arguments);
  98680. }
  98681. function objectTypeCallProperty(value) {
  98682. return (0, _builder.default)("ObjectTypeCallProperty", ...arguments);
  98683. }
  98684. function objectTypeIndexer(id, key, value, variance2) {
  98685. return (0, _builder.default)("ObjectTypeIndexer", ...arguments);
  98686. }
  98687. function objectTypeProperty(key, value, variance2) {
  98688. return (0, _builder.default)("ObjectTypeProperty", ...arguments);
  98689. }
  98690. function objectTypeSpreadProperty(argument) {
  98691. return (0, _builder.default)("ObjectTypeSpreadProperty", ...arguments);
  98692. }
  98693. function opaqueType(id, typeParameters, supertype, impltype) {
  98694. return (0, _builder.default)("OpaqueType", ...arguments);
  98695. }
  98696. function qualifiedTypeIdentifier(id, qualification) {
  98697. return (0, _builder.default)("QualifiedTypeIdentifier", ...arguments);
  98698. }
  98699. function stringLiteralTypeAnnotation(value) {
  98700. return (0, _builder.default)("StringLiteralTypeAnnotation", ...arguments);
  98701. }
  98702. function stringTypeAnnotation() {
  98703. return (0, _builder.default)("StringTypeAnnotation", ...arguments);
  98704. }
  98705. function symbolTypeAnnotation() {
  98706. return (0, _builder.default)("SymbolTypeAnnotation", ...arguments);
  98707. }
  98708. function thisTypeAnnotation() {
  98709. return (0, _builder.default)("ThisTypeAnnotation", ...arguments);
  98710. }
  98711. function tupleTypeAnnotation(types2) {
  98712. return (0, _builder.default)("TupleTypeAnnotation", ...arguments);
  98713. }
  98714. function typeofTypeAnnotation(argument) {
  98715. return (0, _builder.default)("TypeofTypeAnnotation", ...arguments);
  98716. }
  98717. function typeAlias(id, typeParameters, right) {
  98718. return (0, _builder.default)("TypeAlias", ...arguments);
  98719. }
  98720. function typeAnnotation(typeAnnotation2) {
  98721. return (0, _builder.default)("TypeAnnotation", ...arguments);
  98722. }
  98723. function typeCastExpression(expression, typeAnnotation2) {
  98724. return (0, _builder.default)("TypeCastExpression", ...arguments);
  98725. }
  98726. function typeParameter(bound, _default, variance2) {
  98727. return (0, _builder.default)("TypeParameter", ...arguments);
  98728. }
  98729. function typeParameterDeclaration(params) {
  98730. return (0, _builder.default)("TypeParameterDeclaration", ...arguments);
  98731. }
  98732. function typeParameterInstantiation(params) {
  98733. return (0, _builder.default)("TypeParameterInstantiation", ...arguments);
  98734. }
  98735. function unionTypeAnnotation(types2) {
  98736. return (0, _builder.default)("UnionTypeAnnotation", ...arguments);
  98737. }
  98738. function variance(kind) {
  98739. return (0, _builder.default)("Variance", ...arguments);
  98740. }
  98741. function voidTypeAnnotation() {
  98742. return (0, _builder.default)("VoidTypeAnnotation", ...arguments);
  98743. }
  98744. function enumDeclaration(id, body) {
  98745. return (0, _builder.default)("EnumDeclaration", ...arguments);
  98746. }
  98747. function enumBooleanBody(members) {
  98748. return (0, _builder.default)("EnumBooleanBody", ...arguments);
  98749. }
  98750. function enumNumberBody(members) {
  98751. return (0, _builder.default)("EnumNumberBody", ...arguments);
  98752. }
  98753. function enumStringBody(members) {
  98754. return (0, _builder.default)("EnumStringBody", ...arguments);
  98755. }
  98756. function enumSymbolBody(members) {
  98757. return (0, _builder.default)("EnumSymbolBody", ...arguments);
  98758. }
  98759. function enumBooleanMember(id) {
  98760. return (0, _builder.default)("EnumBooleanMember", ...arguments);
  98761. }
  98762. function enumNumberMember(id, init) {
  98763. return (0, _builder.default)("EnumNumberMember", ...arguments);
  98764. }
  98765. function enumStringMember(id, init) {
  98766. return (0, _builder.default)("EnumStringMember", ...arguments);
  98767. }
  98768. function enumDefaultedMember(id) {
  98769. return (0, _builder.default)("EnumDefaultedMember", ...arguments);
  98770. }
  98771. function indexedAccessType(objectType, indexType) {
  98772. return (0, _builder.default)("IndexedAccessType", ...arguments);
  98773. }
  98774. function optionalIndexedAccessType(objectType, indexType) {
  98775. return (0, _builder.default)("OptionalIndexedAccessType", ...arguments);
  98776. }
  98777. function jsxAttribute(name2, value) {
  98778. return (0, _builder.default)("JSXAttribute", ...arguments);
  98779. }
  98780. function jsxClosingElement(name2) {
  98781. return (0, _builder.default)("JSXClosingElement", ...arguments);
  98782. }
  98783. function jsxElement(openingElement, closingElement, children, selfClosing) {
  98784. return (0, _builder.default)("JSXElement", ...arguments);
  98785. }
  98786. function jsxEmptyExpression() {
  98787. return (0, _builder.default)("JSXEmptyExpression", ...arguments);
  98788. }
  98789. function jsxExpressionContainer(expression) {
  98790. return (0, _builder.default)("JSXExpressionContainer", ...arguments);
  98791. }
  98792. function jsxSpreadChild(expression) {
  98793. return (0, _builder.default)("JSXSpreadChild", ...arguments);
  98794. }
  98795. function jsxIdentifier(name2) {
  98796. return (0, _builder.default)("JSXIdentifier", ...arguments);
  98797. }
  98798. function jsxMemberExpression(object, property) {
  98799. return (0, _builder.default)("JSXMemberExpression", ...arguments);
  98800. }
  98801. function jsxNamespacedName(namespace, name2) {
  98802. return (0, _builder.default)("JSXNamespacedName", ...arguments);
  98803. }
  98804. function jsxOpeningElement(name2, attributes, selfClosing) {
  98805. return (0, _builder.default)("JSXOpeningElement", ...arguments);
  98806. }
  98807. function jsxSpreadAttribute(argument) {
  98808. return (0, _builder.default)("JSXSpreadAttribute", ...arguments);
  98809. }
  98810. function jsxText2(value) {
  98811. return (0, _builder.default)("JSXText", ...arguments);
  98812. }
  98813. function jsxFragment(openingFragment, closingFragment, children) {
  98814. return (0, _builder.default)("JSXFragment", ...arguments);
  98815. }
  98816. function jsxOpeningFragment() {
  98817. return (0, _builder.default)("JSXOpeningFragment", ...arguments);
  98818. }
  98819. function jsxClosingFragment() {
  98820. return (0, _builder.default)("JSXClosingFragment", ...arguments);
  98821. }
  98822. function noop() {
  98823. return (0, _builder.default)("Noop", ...arguments);
  98824. }
  98825. function placeholder(expectedNode, name2) {
  98826. return (0, _builder.default)("Placeholder", ...arguments);
  98827. }
  98828. function v8IntrinsicIdentifier(name2) {
  98829. return (0, _builder.default)("V8IntrinsicIdentifier", ...arguments);
  98830. }
  98831. function argumentPlaceholder() {
  98832. return (0, _builder.default)("ArgumentPlaceholder", ...arguments);
  98833. }
  98834. function bindExpression(object, callee) {
  98835. return (0, _builder.default)("BindExpression", ...arguments);
  98836. }
  98837. function classProperty(key, value, typeAnnotation2, decorators, computed, _static) {
  98838. return (0, _builder.default)("ClassProperty", ...arguments);
  98839. }
  98840. function pipelineTopicExpression(expression) {
  98841. return (0, _builder.default)("PipelineTopicExpression", ...arguments);
  98842. }
  98843. function pipelineBareFunction(callee) {
  98844. return (0, _builder.default)("PipelineBareFunction", ...arguments);
  98845. }
  98846. function pipelinePrimaryTopicReference() {
  98847. return (0, _builder.default)("PipelinePrimaryTopicReference", ...arguments);
  98848. }
  98849. function classPrivateProperty(key, value, decorators, _static) {
  98850. return (0, _builder.default)("ClassPrivateProperty", ...arguments);
  98851. }
  98852. function classPrivateMethod(kind, key, params, body, _static) {
  98853. return (0, _builder.default)("ClassPrivateMethod", ...arguments);
  98854. }
  98855. function importAttribute(key, value) {
  98856. return (0, _builder.default)("ImportAttribute", ...arguments);
  98857. }
  98858. function decorator(expression) {
  98859. return (0, _builder.default)("Decorator", ...arguments);
  98860. }
  98861. function doExpression(body, async) {
  98862. return (0, _builder.default)("DoExpression", ...arguments);
  98863. }
  98864. function exportDefaultSpecifier(exported) {
  98865. return (0, _builder.default)("ExportDefaultSpecifier", ...arguments);
  98866. }
  98867. function privateName(id) {
  98868. return (0, _builder.default)("PrivateName", ...arguments);
  98869. }
  98870. function recordExpression(properties) {
  98871. return (0, _builder.default)("RecordExpression", ...arguments);
  98872. }
  98873. function tupleExpression(elements) {
  98874. return (0, _builder.default)("TupleExpression", ...arguments);
  98875. }
  98876. function decimalLiteral(value) {
  98877. return (0, _builder.default)("DecimalLiteral", ...arguments);
  98878. }
  98879. function staticBlock(body) {
  98880. return (0, _builder.default)("StaticBlock", ...arguments);
  98881. }
  98882. function moduleExpression(body) {
  98883. return (0, _builder.default)("ModuleExpression", ...arguments);
  98884. }
  98885. function tsParameterProperty(parameter) {
  98886. return (0, _builder.default)("TSParameterProperty", ...arguments);
  98887. }
  98888. function tsDeclareFunction(id, typeParameters, params, returnType) {
  98889. return (0, _builder.default)("TSDeclareFunction", ...arguments);
  98890. }
  98891. function tsDeclareMethod(decorators, key, typeParameters, params, returnType) {
  98892. return (0, _builder.default)("TSDeclareMethod", ...arguments);
  98893. }
  98894. function tsQualifiedName(left, right) {
  98895. return (0, _builder.default)("TSQualifiedName", ...arguments);
  98896. }
  98897. function tsCallSignatureDeclaration(typeParameters, parameters, typeAnnotation2) {
  98898. return (0, _builder.default)("TSCallSignatureDeclaration", ...arguments);
  98899. }
  98900. function tsConstructSignatureDeclaration(typeParameters, parameters, typeAnnotation2) {
  98901. return (0, _builder.default)("TSConstructSignatureDeclaration", ...arguments);
  98902. }
  98903. function tsPropertySignature(key, typeAnnotation2, initializer) {
  98904. return (0, _builder.default)("TSPropertySignature", ...arguments);
  98905. }
  98906. function tsMethodSignature(key, typeParameters, parameters, typeAnnotation2) {
  98907. return (0, _builder.default)("TSMethodSignature", ...arguments);
  98908. }
  98909. function tsIndexSignature(parameters, typeAnnotation2) {
  98910. return (0, _builder.default)("TSIndexSignature", ...arguments);
  98911. }
  98912. function tsAnyKeyword() {
  98913. return (0, _builder.default)("TSAnyKeyword", ...arguments);
  98914. }
  98915. function tsBooleanKeyword() {
  98916. return (0, _builder.default)("TSBooleanKeyword", ...arguments);
  98917. }
  98918. function tsBigIntKeyword() {
  98919. return (0, _builder.default)("TSBigIntKeyword", ...arguments);
  98920. }
  98921. function tsIntrinsicKeyword() {
  98922. return (0, _builder.default)("TSIntrinsicKeyword", ...arguments);
  98923. }
  98924. function tsNeverKeyword() {
  98925. return (0, _builder.default)("TSNeverKeyword", ...arguments);
  98926. }
  98927. function tsNullKeyword() {
  98928. return (0, _builder.default)("TSNullKeyword", ...arguments);
  98929. }
  98930. function tsNumberKeyword() {
  98931. return (0, _builder.default)("TSNumberKeyword", ...arguments);
  98932. }
  98933. function tsObjectKeyword() {
  98934. return (0, _builder.default)("TSObjectKeyword", ...arguments);
  98935. }
  98936. function tsStringKeyword() {
  98937. return (0, _builder.default)("TSStringKeyword", ...arguments);
  98938. }
  98939. function tsSymbolKeyword() {
  98940. return (0, _builder.default)("TSSymbolKeyword", ...arguments);
  98941. }
  98942. function tsUndefinedKeyword() {
  98943. return (0, _builder.default)("TSUndefinedKeyword", ...arguments);
  98944. }
  98945. function tsUnknownKeyword() {
  98946. return (0, _builder.default)("TSUnknownKeyword", ...arguments);
  98947. }
  98948. function tsVoidKeyword() {
  98949. return (0, _builder.default)("TSVoidKeyword", ...arguments);
  98950. }
  98951. function tsThisType() {
  98952. return (0, _builder.default)("TSThisType", ...arguments);
  98953. }
  98954. function tsFunctionType(typeParameters, parameters, typeAnnotation2) {
  98955. return (0, _builder.default)("TSFunctionType", ...arguments);
  98956. }
  98957. function tsConstructorType(typeParameters, parameters, typeAnnotation2) {
  98958. return (0, _builder.default)("TSConstructorType", ...arguments);
  98959. }
  98960. function tsTypeReference(typeName, typeParameters) {
  98961. return (0, _builder.default)("TSTypeReference", ...arguments);
  98962. }
  98963. function tsTypePredicate(parameterName, typeAnnotation2, asserts) {
  98964. return (0, _builder.default)("TSTypePredicate", ...arguments);
  98965. }
  98966. function tsTypeQuery(exprName) {
  98967. return (0, _builder.default)("TSTypeQuery", ...arguments);
  98968. }
  98969. function tsTypeLiteral(members) {
  98970. return (0, _builder.default)("TSTypeLiteral", ...arguments);
  98971. }
  98972. function tsArrayType(elementType) {
  98973. return (0, _builder.default)("TSArrayType", ...arguments);
  98974. }
  98975. function tsTupleType(elementTypes) {
  98976. return (0, _builder.default)("TSTupleType", ...arguments);
  98977. }
  98978. function tsOptionalType(typeAnnotation2) {
  98979. return (0, _builder.default)("TSOptionalType", ...arguments);
  98980. }
  98981. function tsRestType(typeAnnotation2) {
  98982. return (0, _builder.default)("TSRestType", ...arguments);
  98983. }
  98984. function tsNamedTupleMember(label, elementType, optional) {
  98985. return (0, _builder.default)("TSNamedTupleMember", ...arguments);
  98986. }
  98987. function tsUnionType(types2) {
  98988. return (0, _builder.default)("TSUnionType", ...arguments);
  98989. }
  98990. function tsIntersectionType(types2) {
  98991. return (0, _builder.default)("TSIntersectionType", ...arguments);
  98992. }
  98993. function tsConditionalType(checkType, extendsType, trueType, falseType) {
  98994. return (0, _builder.default)("TSConditionalType", ...arguments);
  98995. }
  98996. function tsInferType(typeParameter2) {
  98997. return (0, _builder.default)("TSInferType", ...arguments);
  98998. }
  98999. function tsParenthesizedType(typeAnnotation2) {
  99000. return (0, _builder.default)("TSParenthesizedType", ...arguments);
  99001. }
  99002. function tsTypeOperator(typeAnnotation2) {
  99003. return (0, _builder.default)("TSTypeOperator", ...arguments);
  99004. }
  99005. function tsIndexedAccessType(objectType, indexType) {
  99006. return (0, _builder.default)("TSIndexedAccessType", ...arguments);
  99007. }
  99008. function tsMappedType(typeParameter2, typeAnnotation2, nameType) {
  99009. return (0, _builder.default)("TSMappedType", ...arguments);
  99010. }
  99011. function tsLiteralType(literal2) {
  99012. return (0, _builder.default)("TSLiteralType", ...arguments);
  99013. }
  99014. function tsExpressionWithTypeArguments(expression, typeParameters) {
  99015. return (0, _builder.default)("TSExpressionWithTypeArguments", ...arguments);
  99016. }
  99017. function tsInterfaceDeclaration(id, typeParameters, _extends, body) {
  99018. return (0, _builder.default)("TSInterfaceDeclaration", ...arguments);
  99019. }
  99020. function tsInterfaceBody(body) {
  99021. return (0, _builder.default)("TSInterfaceBody", ...arguments);
  99022. }
  99023. function tsTypeAliasDeclaration(id, typeParameters, typeAnnotation2) {
  99024. return (0, _builder.default)("TSTypeAliasDeclaration", ...arguments);
  99025. }
  99026. function tsAsExpression(expression, typeAnnotation2) {
  99027. return (0, _builder.default)("TSAsExpression", ...arguments);
  99028. }
  99029. function tsTypeAssertion(typeAnnotation2, expression) {
  99030. return (0, _builder.default)("TSTypeAssertion", ...arguments);
  99031. }
  99032. function tsEnumDeclaration(id, members) {
  99033. return (0, _builder.default)("TSEnumDeclaration", ...arguments);
  99034. }
  99035. function tsEnumMember(id, initializer) {
  99036. return (0, _builder.default)("TSEnumMember", ...arguments);
  99037. }
  99038. function tsModuleDeclaration(id, body) {
  99039. return (0, _builder.default)("TSModuleDeclaration", ...arguments);
  99040. }
  99041. function tsModuleBlock(body) {
  99042. return (0, _builder.default)("TSModuleBlock", ...arguments);
  99043. }
  99044. function tsImportType(argument, qualifier, typeParameters) {
  99045. return (0, _builder.default)("TSImportType", ...arguments);
  99046. }
  99047. function tsImportEqualsDeclaration(id, moduleReference) {
  99048. return (0, _builder.default)("TSImportEqualsDeclaration", ...arguments);
  99049. }
  99050. function tsExternalModuleReference(expression) {
  99051. return (0, _builder.default)("TSExternalModuleReference", ...arguments);
  99052. }
  99053. function tsNonNullExpression(expression) {
  99054. return (0, _builder.default)("TSNonNullExpression", ...arguments);
  99055. }
  99056. function tsExportAssignment(expression) {
  99057. return (0, _builder.default)("TSExportAssignment", ...arguments);
  99058. }
  99059. function tsNamespaceExportDeclaration(id) {
  99060. return (0, _builder.default)("TSNamespaceExportDeclaration", ...arguments);
  99061. }
  99062. function tsTypeAnnotation(typeAnnotation2) {
  99063. return (0, _builder.default)("TSTypeAnnotation", ...arguments);
  99064. }
  99065. function tsTypeParameterInstantiation(params) {
  99066. return (0, _builder.default)("TSTypeParameterInstantiation", ...arguments);
  99067. }
  99068. function tsTypeParameterDeclaration(params) {
  99069. return (0, _builder.default)("TSTypeParameterDeclaration", ...arguments);
  99070. }
  99071. function tsTypeParameter(constraint, _default, name2) {
  99072. return (0, _builder.default)("TSTypeParameter", ...arguments);
  99073. }
  99074. function NumberLiteral(...args) {
  99075. console.trace("The node type NumberLiteral has been renamed to NumericLiteral");
  99076. return (0, _builder.default)("NumberLiteral", ...args);
  99077. }
  99078. function RegexLiteral(...args) {
  99079. console.trace("The node type RegexLiteral has been renamed to RegExpLiteral");
  99080. return (0, _builder.default)("RegexLiteral", ...args);
  99081. }
  99082. function RestProperty(...args) {
  99083. console.trace("The node type RestProperty has been renamed to RestElement");
  99084. return (0, _builder.default)("RestProperty", ...args);
  99085. }
  99086. function SpreadProperty(...args) {
  99087. console.trace("The node type SpreadProperty has been renamed to SpreadElement");
  99088. return (0, _builder.default)("SpreadProperty", ...args);
  99089. }
  99090. }
  99091. });
  99092. // node_modules/@babel/helper-hoist-variables/node_modules/@babel/types/lib/utils/react/cleanJSXElementLiteralChild.js
  99093. var require_cleanJSXElementLiteralChild4 = __commonJS({
  99094. "node_modules/@babel/helper-hoist-variables/node_modules/@babel/types/lib/utils/react/cleanJSXElementLiteralChild.js"(exports) {
  99095. "use strict";
  99096. Object.defineProperty(exports, "__esModule", {
  99097. value: true
  99098. });
  99099. exports.default = cleanJSXElementLiteralChild;
  99100. var _generated = require_generated17();
  99101. function cleanJSXElementLiteralChild(child, args) {
  99102. const lines = child.value.split(/\r\n|\n|\r/);
  99103. let lastNonEmptyLine = 0;
  99104. for (let i = 0; i < lines.length; i++) {
  99105. if (lines[i].match(/[^ \t]/)) {
  99106. lastNonEmptyLine = i;
  99107. }
  99108. }
  99109. let str = "";
  99110. for (let i = 0; i < lines.length; i++) {
  99111. const line = lines[i];
  99112. const isFirstLine = i === 0;
  99113. const isLastLine = i === lines.length - 1;
  99114. const isLastNonEmptyLine = i === lastNonEmptyLine;
  99115. let trimmedLine = line.replace(/\t/g, " ");
  99116. if (!isFirstLine) {
  99117. trimmedLine = trimmedLine.replace(/^[ ]+/, "");
  99118. }
  99119. if (!isLastLine) {
  99120. trimmedLine = trimmedLine.replace(/[ ]+$/, "");
  99121. }
  99122. if (trimmedLine) {
  99123. if (!isLastNonEmptyLine) {
  99124. trimmedLine += " ";
  99125. }
  99126. str += trimmedLine;
  99127. }
  99128. }
  99129. if (str)
  99130. args.push((0, _generated.stringLiteral)(str));
  99131. }
  99132. }
  99133. });
  99134. // node_modules/@babel/helper-hoist-variables/node_modules/@babel/types/lib/builders/react/buildChildren.js
  99135. var require_buildChildren4 = __commonJS({
  99136. "node_modules/@babel/helper-hoist-variables/node_modules/@babel/types/lib/builders/react/buildChildren.js"(exports) {
  99137. "use strict";
  99138. Object.defineProperty(exports, "__esModule", {
  99139. value: true
  99140. });
  99141. exports.default = buildChildren;
  99142. var _generated = require_generated16();
  99143. var _cleanJSXElementLiteralChild = require_cleanJSXElementLiteralChild4();
  99144. function buildChildren(node) {
  99145. const elements = [];
  99146. for (let i = 0; i < node.children.length; i++) {
  99147. let child = node.children[i];
  99148. if ((0, _generated.isJSXText)(child)) {
  99149. (0, _cleanJSXElementLiteralChild.default)(child, elements);
  99150. continue;
  99151. }
  99152. if ((0, _generated.isJSXExpressionContainer)(child))
  99153. child = child.expression;
  99154. if ((0, _generated.isJSXEmptyExpression)(child))
  99155. continue;
  99156. elements.push(child);
  99157. }
  99158. return elements;
  99159. }
  99160. }
  99161. });
  99162. // node_modules/@babel/helper-hoist-variables/node_modules/@babel/types/lib/validators/isNode.js
  99163. var require_isNode4 = __commonJS({
  99164. "node_modules/@babel/helper-hoist-variables/node_modules/@babel/types/lib/validators/isNode.js"(exports) {
  99165. "use strict";
  99166. Object.defineProperty(exports, "__esModule", {
  99167. value: true
  99168. });
  99169. exports.default = isNode;
  99170. var _definitions = require_definitions4();
  99171. function isNode(node) {
  99172. return !!(node && _definitions.VISITOR_KEYS[node.type]);
  99173. }
  99174. }
  99175. });
  99176. // node_modules/@babel/helper-hoist-variables/node_modules/@babel/types/lib/asserts/assertNode.js
  99177. var require_assertNode4 = __commonJS({
  99178. "node_modules/@babel/helper-hoist-variables/node_modules/@babel/types/lib/asserts/assertNode.js"(exports) {
  99179. "use strict";
  99180. Object.defineProperty(exports, "__esModule", {
  99181. value: true
  99182. });
  99183. exports.default = assertNode2;
  99184. var _isNode = require_isNode4();
  99185. function assertNode2(node) {
  99186. if (!(0, _isNode.default)(node)) {
  99187. var _node$type;
  99188. const type = (_node$type = node == null ? void 0 : node.type) != null ? _node$type : JSON.stringify(node);
  99189. throw new TypeError(`Not a valid node of type "${type}"`);
  99190. }
  99191. }
  99192. }
  99193. });
  99194. // node_modules/@babel/helper-hoist-variables/node_modules/@babel/types/lib/asserts/generated/index.js
  99195. var require_generated18 = __commonJS({
  99196. "node_modules/@babel/helper-hoist-variables/node_modules/@babel/types/lib/asserts/generated/index.js"(exports) {
  99197. "use strict";
  99198. Object.defineProperty(exports, "__esModule", {
  99199. value: true
  99200. });
  99201. exports.assertArrayExpression = assertArrayExpression;
  99202. exports.assertAssignmentExpression = assertAssignmentExpression;
  99203. exports.assertBinaryExpression = assertBinaryExpression;
  99204. exports.assertInterpreterDirective = assertInterpreterDirective;
  99205. exports.assertDirective = assertDirective;
  99206. exports.assertDirectiveLiteral = assertDirectiveLiteral;
  99207. exports.assertBlockStatement = assertBlockStatement;
  99208. exports.assertBreakStatement = assertBreakStatement;
  99209. exports.assertCallExpression = assertCallExpression;
  99210. exports.assertCatchClause = assertCatchClause;
  99211. exports.assertConditionalExpression = assertConditionalExpression;
  99212. exports.assertContinueStatement = assertContinueStatement;
  99213. exports.assertDebuggerStatement = assertDebuggerStatement;
  99214. exports.assertDoWhileStatement = assertDoWhileStatement;
  99215. exports.assertEmptyStatement = assertEmptyStatement;
  99216. exports.assertExpressionStatement = assertExpressionStatement;
  99217. exports.assertFile = assertFile;
  99218. exports.assertForInStatement = assertForInStatement;
  99219. exports.assertForStatement = assertForStatement;
  99220. exports.assertFunctionDeclaration = assertFunctionDeclaration;
  99221. exports.assertFunctionExpression = assertFunctionExpression;
  99222. exports.assertIdentifier = assertIdentifier;
  99223. exports.assertIfStatement = assertIfStatement;
  99224. exports.assertLabeledStatement = assertLabeledStatement;
  99225. exports.assertStringLiteral = assertStringLiteral;
  99226. exports.assertNumericLiteral = assertNumericLiteral;
  99227. exports.assertNullLiteral = assertNullLiteral;
  99228. exports.assertBooleanLiteral = assertBooleanLiteral;
  99229. exports.assertRegExpLiteral = assertRegExpLiteral;
  99230. exports.assertLogicalExpression = assertLogicalExpression;
  99231. exports.assertMemberExpression = assertMemberExpression;
  99232. exports.assertNewExpression = assertNewExpression;
  99233. exports.assertProgram = assertProgram;
  99234. exports.assertObjectExpression = assertObjectExpression;
  99235. exports.assertObjectMethod = assertObjectMethod;
  99236. exports.assertObjectProperty = assertObjectProperty;
  99237. exports.assertRestElement = assertRestElement;
  99238. exports.assertReturnStatement = assertReturnStatement;
  99239. exports.assertSequenceExpression = assertSequenceExpression;
  99240. exports.assertParenthesizedExpression = assertParenthesizedExpression;
  99241. exports.assertSwitchCase = assertSwitchCase;
  99242. exports.assertSwitchStatement = assertSwitchStatement;
  99243. exports.assertThisExpression = assertThisExpression;
  99244. exports.assertThrowStatement = assertThrowStatement;
  99245. exports.assertTryStatement = assertTryStatement;
  99246. exports.assertUnaryExpression = assertUnaryExpression;
  99247. exports.assertUpdateExpression = assertUpdateExpression;
  99248. exports.assertVariableDeclaration = assertVariableDeclaration;
  99249. exports.assertVariableDeclarator = assertVariableDeclarator;
  99250. exports.assertWhileStatement = assertWhileStatement;
  99251. exports.assertWithStatement = assertWithStatement;
  99252. exports.assertAssignmentPattern = assertAssignmentPattern;
  99253. exports.assertArrayPattern = assertArrayPattern;
  99254. exports.assertArrowFunctionExpression = assertArrowFunctionExpression;
  99255. exports.assertClassBody = assertClassBody;
  99256. exports.assertClassExpression = assertClassExpression;
  99257. exports.assertClassDeclaration = assertClassDeclaration;
  99258. exports.assertExportAllDeclaration = assertExportAllDeclaration;
  99259. exports.assertExportDefaultDeclaration = assertExportDefaultDeclaration;
  99260. exports.assertExportNamedDeclaration = assertExportNamedDeclaration;
  99261. exports.assertExportSpecifier = assertExportSpecifier;
  99262. exports.assertForOfStatement = assertForOfStatement;
  99263. exports.assertImportDeclaration = assertImportDeclaration;
  99264. exports.assertImportDefaultSpecifier = assertImportDefaultSpecifier;
  99265. exports.assertImportNamespaceSpecifier = assertImportNamespaceSpecifier;
  99266. exports.assertImportSpecifier = assertImportSpecifier;
  99267. exports.assertMetaProperty = assertMetaProperty;
  99268. exports.assertClassMethod = assertClassMethod;
  99269. exports.assertObjectPattern = assertObjectPattern;
  99270. exports.assertSpreadElement = assertSpreadElement;
  99271. exports.assertSuper = assertSuper;
  99272. exports.assertTaggedTemplateExpression = assertTaggedTemplateExpression;
  99273. exports.assertTemplateElement = assertTemplateElement;
  99274. exports.assertTemplateLiteral = assertTemplateLiteral;
  99275. exports.assertYieldExpression = assertYieldExpression;
  99276. exports.assertAwaitExpression = assertAwaitExpression;
  99277. exports.assertImport = assertImport;
  99278. exports.assertBigIntLiteral = assertBigIntLiteral;
  99279. exports.assertExportNamespaceSpecifier = assertExportNamespaceSpecifier;
  99280. exports.assertOptionalMemberExpression = assertOptionalMemberExpression;
  99281. exports.assertOptionalCallExpression = assertOptionalCallExpression;
  99282. exports.assertAnyTypeAnnotation = assertAnyTypeAnnotation;
  99283. exports.assertArrayTypeAnnotation = assertArrayTypeAnnotation;
  99284. exports.assertBooleanTypeAnnotation = assertBooleanTypeAnnotation;
  99285. exports.assertBooleanLiteralTypeAnnotation = assertBooleanLiteralTypeAnnotation;
  99286. exports.assertNullLiteralTypeAnnotation = assertNullLiteralTypeAnnotation;
  99287. exports.assertClassImplements = assertClassImplements;
  99288. exports.assertDeclareClass = assertDeclareClass;
  99289. exports.assertDeclareFunction = assertDeclareFunction;
  99290. exports.assertDeclareInterface = assertDeclareInterface;
  99291. exports.assertDeclareModule = assertDeclareModule;
  99292. exports.assertDeclareModuleExports = assertDeclareModuleExports;
  99293. exports.assertDeclareTypeAlias = assertDeclareTypeAlias;
  99294. exports.assertDeclareOpaqueType = assertDeclareOpaqueType;
  99295. exports.assertDeclareVariable = assertDeclareVariable;
  99296. exports.assertDeclareExportDeclaration = assertDeclareExportDeclaration;
  99297. exports.assertDeclareExportAllDeclaration = assertDeclareExportAllDeclaration;
  99298. exports.assertDeclaredPredicate = assertDeclaredPredicate;
  99299. exports.assertExistsTypeAnnotation = assertExistsTypeAnnotation;
  99300. exports.assertFunctionTypeAnnotation = assertFunctionTypeAnnotation;
  99301. exports.assertFunctionTypeParam = assertFunctionTypeParam;
  99302. exports.assertGenericTypeAnnotation = assertGenericTypeAnnotation;
  99303. exports.assertInferredPredicate = assertInferredPredicate;
  99304. exports.assertInterfaceExtends = assertInterfaceExtends;
  99305. exports.assertInterfaceDeclaration = assertInterfaceDeclaration;
  99306. exports.assertInterfaceTypeAnnotation = assertInterfaceTypeAnnotation;
  99307. exports.assertIntersectionTypeAnnotation = assertIntersectionTypeAnnotation;
  99308. exports.assertMixedTypeAnnotation = assertMixedTypeAnnotation;
  99309. exports.assertEmptyTypeAnnotation = assertEmptyTypeAnnotation;
  99310. exports.assertNullableTypeAnnotation = assertNullableTypeAnnotation;
  99311. exports.assertNumberLiteralTypeAnnotation = assertNumberLiteralTypeAnnotation;
  99312. exports.assertNumberTypeAnnotation = assertNumberTypeAnnotation;
  99313. exports.assertObjectTypeAnnotation = assertObjectTypeAnnotation;
  99314. exports.assertObjectTypeInternalSlot = assertObjectTypeInternalSlot;
  99315. exports.assertObjectTypeCallProperty = assertObjectTypeCallProperty;
  99316. exports.assertObjectTypeIndexer = assertObjectTypeIndexer;
  99317. exports.assertObjectTypeProperty = assertObjectTypeProperty;
  99318. exports.assertObjectTypeSpreadProperty = assertObjectTypeSpreadProperty;
  99319. exports.assertOpaqueType = assertOpaqueType;
  99320. exports.assertQualifiedTypeIdentifier = assertQualifiedTypeIdentifier;
  99321. exports.assertStringLiteralTypeAnnotation = assertStringLiteralTypeAnnotation;
  99322. exports.assertStringTypeAnnotation = assertStringTypeAnnotation;
  99323. exports.assertSymbolTypeAnnotation = assertSymbolTypeAnnotation;
  99324. exports.assertThisTypeAnnotation = assertThisTypeAnnotation;
  99325. exports.assertTupleTypeAnnotation = assertTupleTypeAnnotation;
  99326. exports.assertTypeofTypeAnnotation = assertTypeofTypeAnnotation;
  99327. exports.assertTypeAlias = assertTypeAlias;
  99328. exports.assertTypeAnnotation = assertTypeAnnotation;
  99329. exports.assertTypeCastExpression = assertTypeCastExpression;
  99330. exports.assertTypeParameter = assertTypeParameter;
  99331. exports.assertTypeParameterDeclaration = assertTypeParameterDeclaration;
  99332. exports.assertTypeParameterInstantiation = assertTypeParameterInstantiation;
  99333. exports.assertUnionTypeAnnotation = assertUnionTypeAnnotation;
  99334. exports.assertVariance = assertVariance;
  99335. exports.assertVoidTypeAnnotation = assertVoidTypeAnnotation;
  99336. exports.assertEnumDeclaration = assertEnumDeclaration;
  99337. exports.assertEnumBooleanBody = assertEnumBooleanBody;
  99338. exports.assertEnumNumberBody = assertEnumNumberBody;
  99339. exports.assertEnumStringBody = assertEnumStringBody;
  99340. exports.assertEnumSymbolBody = assertEnumSymbolBody;
  99341. exports.assertEnumBooleanMember = assertEnumBooleanMember;
  99342. exports.assertEnumNumberMember = assertEnumNumberMember;
  99343. exports.assertEnumStringMember = assertEnumStringMember;
  99344. exports.assertEnumDefaultedMember = assertEnumDefaultedMember;
  99345. exports.assertIndexedAccessType = assertIndexedAccessType;
  99346. exports.assertOptionalIndexedAccessType = assertOptionalIndexedAccessType;
  99347. exports.assertJSXAttribute = assertJSXAttribute;
  99348. exports.assertJSXClosingElement = assertJSXClosingElement;
  99349. exports.assertJSXElement = assertJSXElement;
  99350. exports.assertJSXEmptyExpression = assertJSXEmptyExpression;
  99351. exports.assertJSXExpressionContainer = assertJSXExpressionContainer;
  99352. exports.assertJSXSpreadChild = assertJSXSpreadChild;
  99353. exports.assertJSXIdentifier = assertJSXIdentifier;
  99354. exports.assertJSXMemberExpression = assertJSXMemberExpression;
  99355. exports.assertJSXNamespacedName = assertJSXNamespacedName;
  99356. exports.assertJSXOpeningElement = assertJSXOpeningElement;
  99357. exports.assertJSXSpreadAttribute = assertJSXSpreadAttribute;
  99358. exports.assertJSXText = assertJSXText;
  99359. exports.assertJSXFragment = assertJSXFragment;
  99360. exports.assertJSXOpeningFragment = assertJSXOpeningFragment;
  99361. exports.assertJSXClosingFragment = assertJSXClosingFragment;
  99362. exports.assertNoop = assertNoop;
  99363. exports.assertPlaceholder = assertPlaceholder;
  99364. exports.assertV8IntrinsicIdentifier = assertV8IntrinsicIdentifier;
  99365. exports.assertArgumentPlaceholder = assertArgumentPlaceholder;
  99366. exports.assertBindExpression = assertBindExpression;
  99367. exports.assertClassProperty = assertClassProperty;
  99368. exports.assertPipelineTopicExpression = assertPipelineTopicExpression;
  99369. exports.assertPipelineBareFunction = assertPipelineBareFunction;
  99370. exports.assertPipelinePrimaryTopicReference = assertPipelinePrimaryTopicReference;
  99371. exports.assertClassPrivateProperty = assertClassPrivateProperty;
  99372. exports.assertClassPrivateMethod = assertClassPrivateMethod;
  99373. exports.assertImportAttribute = assertImportAttribute;
  99374. exports.assertDecorator = assertDecorator;
  99375. exports.assertDoExpression = assertDoExpression;
  99376. exports.assertExportDefaultSpecifier = assertExportDefaultSpecifier;
  99377. exports.assertPrivateName = assertPrivateName;
  99378. exports.assertRecordExpression = assertRecordExpression;
  99379. exports.assertTupleExpression = assertTupleExpression;
  99380. exports.assertDecimalLiteral = assertDecimalLiteral;
  99381. exports.assertStaticBlock = assertStaticBlock;
  99382. exports.assertModuleExpression = assertModuleExpression;
  99383. exports.assertTSParameterProperty = assertTSParameterProperty;
  99384. exports.assertTSDeclareFunction = assertTSDeclareFunction;
  99385. exports.assertTSDeclareMethod = assertTSDeclareMethod;
  99386. exports.assertTSQualifiedName = assertTSQualifiedName;
  99387. exports.assertTSCallSignatureDeclaration = assertTSCallSignatureDeclaration;
  99388. exports.assertTSConstructSignatureDeclaration = assertTSConstructSignatureDeclaration;
  99389. exports.assertTSPropertySignature = assertTSPropertySignature;
  99390. exports.assertTSMethodSignature = assertTSMethodSignature;
  99391. exports.assertTSIndexSignature = assertTSIndexSignature;
  99392. exports.assertTSAnyKeyword = assertTSAnyKeyword;
  99393. exports.assertTSBooleanKeyword = assertTSBooleanKeyword;
  99394. exports.assertTSBigIntKeyword = assertTSBigIntKeyword;
  99395. exports.assertTSIntrinsicKeyword = assertTSIntrinsicKeyword;
  99396. exports.assertTSNeverKeyword = assertTSNeverKeyword;
  99397. exports.assertTSNullKeyword = assertTSNullKeyword;
  99398. exports.assertTSNumberKeyword = assertTSNumberKeyword;
  99399. exports.assertTSObjectKeyword = assertTSObjectKeyword;
  99400. exports.assertTSStringKeyword = assertTSStringKeyword;
  99401. exports.assertTSSymbolKeyword = assertTSSymbolKeyword;
  99402. exports.assertTSUndefinedKeyword = assertTSUndefinedKeyword;
  99403. exports.assertTSUnknownKeyword = assertTSUnknownKeyword;
  99404. exports.assertTSVoidKeyword = assertTSVoidKeyword;
  99405. exports.assertTSThisType = assertTSThisType;
  99406. exports.assertTSFunctionType = assertTSFunctionType;
  99407. exports.assertTSConstructorType = assertTSConstructorType;
  99408. exports.assertTSTypeReference = assertTSTypeReference;
  99409. exports.assertTSTypePredicate = assertTSTypePredicate;
  99410. exports.assertTSTypeQuery = assertTSTypeQuery;
  99411. exports.assertTSTypeLiteral = assertTSTypeLiteral;
  99412. exports.assertTSArrayType = assertTSArrayType;
  99413. exports.assertTSTupleType = assertTSTupleType;
  99414. exports.assertTSOptionalType = assertTSOptionalType;
  99415. exports.assertTSRestType = assertTSRestType;
  99416. exports.assertTSNamedTupleMember = assertTSNamedTupleMember;
  99417. exports.assertTSUnionType = assertTSUnionType;
  99418. exports.assertTSIntersectionType = assertTSIntersectionType;
  99419. exports.assertTSConditionalType = assertTSConditionalType;
  99420. exports.assertTSInferType = assertTSInferType;
  99421. exports.assertTSParenthesizedType = assertTSParenthesizedType;
  99422. exports.assertTSTypeOperator = assertTSTypeOperator;
  99423. exports.assertTSIndexedAccessType = assertTSIndexedAccessType;
  99424. exports.assertTSMappedType = assertTSMappedType;
  99425. exports.assertTSLiteralType = assertTSLiteralType;
  99426. exports.assertTSExpressionWithTypeArguments = assertTSExpressionWithTypeArguments;
  99427. exports.assertTSInterfaceDeclaration = assertTSInterfaceDeclaration;
  99428. exports.assertTSInterfaceBody = assertTSInterfaceBody;
  99429. exports.assertTSTypeAliasDeclaration = assertTSTypeAliasDeclaration;
  99430. exports.assertTSAsExpression = assertTSAsExpression;
  99431. exports.assertTSTypeAssertion = assertTSTypeAssertion;
  99432. exports.assertTSEnumDeclaration = assertTSEnumDeclaration;
  99433. exports.assertTSEnumMember = assertTSEnumMember;
  99434. exports.assertTSModuleDeclaration = assertTSModuleDeclaration;
  99435. exports.assertTSModuleBlock = assertTSModuleBlock;
  99436. exports.assertTSImportType = assertTSImportType;
  99437. exports.assertTSImportEqualsDeclaration = assertTSImportEqualsDeclaration;
  99438. exports.assertTSExternalModuleReference = assertTSExternalModuleReference;
  99439. exports.assertTSNonNullExpression = assertTSNonNullExpression;
  99440. exports.assertTSExportAssignment = assertTSExportAssignment;
  99441. exports.assertTSNamespaceExportDeclaration = assertTSNamespaceExportDeclaration;
  99442. exports.assertTSTypeAnnotation = assertTSTypeAnnotation;
  99443. exports.assertTSTypeParameterInstantiation = assertTSTypeParameterInstantiation;
  99444. exports.assertTSTypeParameterDeclaration = assertTSTypeParameterDeclaration;
  99445. exports.assertTSTypeParameter = assertTSTypeParameter;
  99446. exports.assertExpression = assertExpression;
  99447. exports.assertBinary = assertBinary;
  99448. exports.assertScopable = assertScopable;
  99449. exports.assertBlockParent = assertBlockParent;
  99450. exports.assertBlock = assertBlock;
  99451. exports.assertStatement = assertStatement;
  99452. exports.assertTerminatorless = assertTerminatorless;
  99453. exports.assertCompletionStatement = assertCompletionStatement;
  99454. exports.assertConditional = assertConditional;
  99455. exports.assertLoop = assertLoop;
  99456. exports.assertWhile = assertWhile;
  99457. exports.assertExpressionWrapper = assertExpressionWrapper;
  99458. exports.assertFor = assertFor;
  99459. exports.assertForXStatement = assertForXStatement;
  99460. exports.assertFunction = assertFunction;
  99461. exports.assertFunctionParent = assertFunctionParent;
  99462. exports.assertPureish = assertPureish;
  99463. exports.assertDeclaration = assertDeclaration;
  99464. exports.assertPatternLike = assertPatternLike;
  99465. exports.assertLVal = assertLVal;
  99466. exports.assertTSEntityName = assertTSEntityName;
  99467. exports.assertLiteral = assertLiteral;
  99468. exports.assertImmutable = assertImmutable;
  99469. exports.assertUserWhitespacable = assertUserWhitespacable;
  99470. exports.assertMethod = assertMethod;
  99471. exports.assertObjectMember = assertObjectMember;
  99472. exports.assertProperty = assertProperty;
  99473. exports.assertUnaryLike = assertUnaryLike;
  99474. exports.assertPattern = assertPattern;
  99475. exports.assertClass = assertClass;
  99476. exports.assertModuleDeclaration = assertModuleDeclaration;
  99477. exports.assertExportDeclaration = assertExportDeclaration;
  99478. exports.assertModuleSpecifier = assertModuleSpecifier;
  99479. exports.assertFlow = assertFlow;
  99480. exports.assertFlowType = assertFlowType;
  99481. exports.assertFlowBaseAnnotation = assertFlowBaseAnnotation;
  99482. exports.assertFlowDeclaration = assertFlowDeclaration;
  99483. exports.assertFlowPredicate = assertFlowPredicate;
  99484. exports.assertEnumBody = assertEnumBody;
  99485. exports.assertEnumMember = assertEnumMember;
  99486. exports.assertJSX = assertJSX;
  99487. exports.assertPrivate = assertPrivate;
  99488. exports.assertTSTypeElement = assertTSTypeElement;
  99489. exports.assertTSType = assertTSType;
  99490. exports.assertTSBaseType = assertTSBaseType;
  99491. exports.assertNumberLiteral = assertNumberLiteral;
  99492. exports.assertRegexLiteral = assertRegexLiteral;
  99493. exports.assertRestProperty = assertRestProperty;
  99494. exports.assertSpreadProperty = assertSpreadProperty;
  99495. var _is = require_is4();
  99496. function assert(type, node, opts) {
  99497. if (!(0, _is.default)(type, node, opts)) {
  99498. throw new Error(`Expected type "${type}" with option ${JSON.stringify(opts)}, but instead got "${node.type}".`);
  99499. }
  99500. }
  99501. function assertArrayExpression(node, opts) {
  99502. assert("ArrayExpression", node, opts);
  99503. }
  99504. function assertAssignmentExpression(node, opts) {
  99505. assert("AssignmentExpression", node, opts);
  99506. }
  99507. function assertBinaryExpression(node, opts) {
  99508. assert("BinaryExpression", node, opts);
  99509. }
  99510. function assertInterpreterDirective(node, opts) {
  99511. assert("InterpreterDirective", node, opts);
  99512. }
  99513. function assertDirective(node, opts) {
  99514. assert("Directive", node, opts);
  99515. }
  99516. function assertDirectiveLiteral(node, opts) {
  99517. assert("DirectiveLiteral", node, opts);
  99518. }
  99519. function assertBlockStatement(node, opts) {
  99520. assert("BlockStatement", node, opts);
  99521. }
  99522. function assertBreakStatement(node, opts) {
  99523. assert("BreakStatement", node, opts);
  99524. }
  99525. function assertCallExpression(node, opts) {
  99526. assert("CallExpression", node, opts);
  99527. }
  99528. function assertCatchClause(node, opts) {
  99529. assert("CatchClause", node, opts);
  99530. }
  99531. function assertConditionalExpression(node, opts) {
  99532. assert("ConditionalExpression", node, opts);
  99533. }
  99534. function assertContinueStatement(node, opts) {
  99535. assert("ContinueStatement", node, opts);
  99536. }
  99537. function assertDebuggerStatement(node, opts) {
  99538. assert("DebuggerStatement", node, opts);
  99539. }
  99540. function assertDoWhileStatement(node, opts) {
  99541. assert("DoWhileStatement", node, opts);
  99542. }
  99543. function assertEmptyStatement(node, opts) {
  99544. assert("EmptyStatement", node, opts);
  99545. }
  99546. function assertExpressionStatement(node, opts) {
  99547. assert("ExpressionStatement", node, opts);
  99548. }
  99549. function assertFile(node, opts) {
  99550. assert("File", node, opts);
  99551. }
  99552. function assertForInStatement(node, opts) {
  99553. assert("ForInStatement", node, opts);
  99554. }
  99555. function assertForStatement(node, opts) {
  99556. assert("ForStatement", node, opts);
  99557. }
  99558. function assertFunctionDeclaration(node, opts) {
  99559. assert("FunctionDeclaration", node, opts);
  99560. }
  99561. function assertFunctionExpression(node, opts) {
  99562. assert("FunctionExpression", node, opts);
  99563. }
  99564. function assertIdentifier(node, opts) {
  99565. assert("Identifier", node, opts);
  99566. }
  99567. function assertIfStatement(node, opts) {
  99568. assert("IfStatement", node, opts);
  99569. }
  99570. function assertLabeledStatement(node, opts) {
  99571. assert("LabeledStatement", node, opts);
  99572. }
  99573. function assertStringLiteral(node, opts) {
  99574. assert("StringLiteral", node, opts);
  99575. }
  99576. function assertNumericLiteral(node, opts) {
  99577. assert("NumericLiteral", node, opts);
  99578. }
  99579. function assertNullLiteral(node, opts) {
  99580. assert("NullLiteral", node, opts);
  99581. }
  99582. function assertBooleanLiteral(node, opts) {
  99583. assert("BooleanLiteral", node, opts);
  99584. }
  99585. function assertRegExpLiteral(node, opts) {
  99586. assert("RegExpLiteral", node, opts);
  99587. }
  99588. function assertLogicalExpression(node, opts) {
  99589. assert("LogicalExpression", node, opts);
  99590. }
  99591. function assertMemberExpression(node, opts) {
  99592. assert("MemberExpression", node, opts);
  99593. }
  99594. function assertNewExpression(node, opts) {
  99595. assert("NewExpression", node, opts);
  99596. }
  99597. function assertProgram(node, opts) {
  99598. assert("Program", node, opts);
  99599. }
  99600. function assertObjectExpression(node, opts) {
  99601. assert("ObjectExpression", node, opts);
  99602. }
  99603. function assertObjectMethod(node, opts) {
  99604. assert("ObjectMethod", node, opts);
  99605. }
  99606. function assertObjectProperty(node, opts) {
  99607. assert("ObjectProperty", node, opts);
  99608. }
  99609. function assertRestElement(node, opts) {
  99610. assert("RestElement", node, opts);
  99611. }
  99612. function assertReturnStatement(node, opts) {
  99613. assert("ReturnStatement", node, opts);
  99614. }
  99615. function assertSequenceExpression(node, opts) {
  99616. assert("SequenceExpression", node, opts);
  99617. }
  99618. function assertParenthesizedExpression(node, opts) {
  99619. assert("ParenthesizedExpression", node, opts);
  99620. }
  99621. function assertSwitchCase(node, opts) {
  99622. assert("SwitchCase", node, opts);
  99623. }
  99624. function assertSwitchStatement(node, opts) {
  99625. assert("SwitchStatement", node, opts);
  99626. }
  99627. function assertThisExpression(node, opts) {
  99628. assert("ThisExpression", node, opts);
  99629. }
  99630. function assertThrowStatement(node, opts) {
  99631. assert("ThrowStatement", node, opts);
  99632. }
  99633. function assertTryStatement(node, opts) {
  99634. assert("TryStatement", node, opts);
  99635. }
  99636. function assertUnaryExpression(node, opts) {
  99637. assert("UnaryExpression", node, opts);
  99638. }
  99639. function assertUpdateExpression(node, opts) {
  99640. assert("UpdateExpression", node, opts);
  99641. }
  99642. function assertVariableDeclaration(node, opts) {
  99643. assert("VariableDeclaration", node, opts);
  99644. }
  99645. function assertVariableDeclarator(node, opts) {
  99646. assert("VariableDeclarator", node, opts);
  99647. }
  99648. function assertWhileStatement(node, opts) {
  99649. assert("WhileStatement", node, opts);
  99650. }
  99651. function assertWithStatement(node, opts) {
  99652. assert("WithStatement", node, opts);
  99653. }
  99654. function assertAssignmentPattern(node, opts) {
  99655. assert("AssignmentPattern", node, opts);
  99656. }
  99657. function assertArrayPattern(node, opts) {
  99658. assert("ArrayPattern", node, opts);
  99659. }
  99660. function assertArrowFunctionExpression(node, opts) {
  99661. assert("ArrowFunctionExpression", node, opts);
  99662. }
  99663. function assertClassBody(node, opts) {
  99664. assert("ClassBody", node, opts);
  99665. }
  99666. function assertClassExpression(node, opts) {
  99667. assert("ClassExpression", node, opts);
  99668. }
  99669. function assertClassDeclaration(node, opts) {
  99670. assert("ClassDeclaration", node, opts);
  99671. }
  99672. function assertExportAllDeclaration(node, opts) {
  99673. assert("ExportAllDeclaration", node, opts);
  99674. }
  99675. function assertExportDefaultDeclaration(node, opts) {
  99676. assert("ExportDefaultDeclaration", node, opts);
  99677. }
  99678. function assertExportNamedDeclaration(node, opts) {
  99679. assert("ExportNamedDeclaration", node, opts);
  99680. }
  99681. function assertExportSpecifier(node, opts) {
  99682. assert("ExportSpecifier", node, opts);
  99683. }
  99684. function assertForOfStatement(node, opts) {
  99685. assert("ForOfStatement", node, opts);
  99686. }
  99687. function assertImportDeclaration(node, opts) {
  99688. assert("ImportDeclaration", node, opts);
  99689. }
  99690. function assertImportDefaultSpecifier(node, opts) {
  99691. assert("ImportDefaultSpecifier", node, opts);
  99692. }
  99693. function assertImportNamespaceSpecifier(node, opts) {
  99694. assert("ImportNamespaceSpecifier", node, opts);
  99695. }
  99696. function assertImportSpecifier(node, opts) {
  99697. assert("ImportSpecifier", node, opts);
  99698. }
  99699. function assertMetaProperty(node, opts) {
  99700. assert("MetaProperty", node, opts);
  99701. }
  99702. function assertClassMethod(node, opts) {
  99703. assert("ClassMethod", node, opts);
  99704. }
  99705. function assertObjectPattern(node, opts) {
  99706. assert("ObjectPattern", node, opts);
  99707. }
  99708. function assertSpreadElement(node, opts) {
  99709. assert("SpreadElement", node, opts);
  99710. }
  99711. function assertSuper(node, opts) {
  99712. assert("Super", node, opts);
  99713. }
  99714. function assertTaggedTemplateExpression(node, opts) {
  99715. assert("TaggedTemplateExpression", node, opts);
  99716. }
  99717. function assertTemplateElement(node, opts) {
  99718. assert("TemplateElement", node, opts);
  99719. }
  99720. function assertTemplateLiteral(node, opts) {
  99721. assert("TemplateLiteral", node, opts);
  99722. }
  99723. function assertYieldExpression(node, opts) {
  99724. assert("YieldExpression", node, opts);
  99725. }
  99726. function assertAwaitExpression(node, opts) {
  99727. assert("AwaitExpression", node, opts);
  99728. }
  99729. function assertImport(node, opts) {
  99730. assert("Import", node, opts);
  99731. }
  99732. function assertBigIntLiteral(node, opts) {
  99733. assert("BigIntLiteral", node, opts);
  99734. }
  99735. function assertExportNamespaceSpecifier(node, opts) {
  99736. assert("ExportNamespaceSpecifier", node, opts);
  99737. }
  99738. function assertOptionalMemberExpression(node, opts) {
  99739. assert("OptionalMemberExpression", node, opts);
  99740. }
  99741. function assertOptionalCallExpression(node, opts) {
  99742. assert("OptionalCallExpression", node, opts);
  99743. }
  99744. function assertAnyTypeAnnotation(node, opts) {
  99745. assert("AnyTypeAnnotation", node, opts);
  99746. }
  99747. function assertArrayTypeAnnotation(node, opts) {
  99748. assert("ArrayTypeAnnotation", node, opts);
  99749. }
  99750. function assertBooleanTypeAnnotation(node, opts) {
  99751. assert("BooleanTypeAnnotation", node, opts);
  99752. }
  99753. function assertBooleanLiteralTypeAnnotation(node, opts) {
  99754. assert("BooleanLiteralTypeAnnotation", node, opts);
  99755. }
  99756. function assertNullLiteralTypeAnnotation(node, opts) {
  99757. assert("NullLiteralTypeAnnotation", node, opts);
  99758. }
  99759. function assertClassImplements(node, opts) {
  99760. assert("ClassImplements", node, opts);
  99761. }
  99762. function assertDeclareClass(node, opts) {
  99763. assert("DeclareClass", node, opts);
  99764. }
  99765. function assertDeclareFunction(node, opts) {
  99766. assert("DeclareFunction", node, opts);
  99767. }
  99768. function assertDeclareInterface(node, opts) {
  99769. assert("DeclareInterface", node, opts);
  99770. }
  99771. function assertDeclareModule(node, opts) {
  99772. assert("DeclareModule", node, opts);
  99773. }
  99774. function assertDeclareModuleExports(node, opts) {
  99775. assert("DeclareModuleExports", node, opts);
  99776. }
  99777. function assertDeclareTypeAlias(node, opts) {
  99778. assert("DeclareTypeAlias", node, opts);
  99779. }
  99780. function assertDeclareOpaqueType(node, opts) {
  99781. assert("DeclareOpaqueType", node, opts);
  99782. }
  99783. function assertDeclareVariable(node, opts) {
  99784. assert("DeclareVariable", node, opts);
  99785. }
  99786. function assertDeclareExportDeclaration(node, opts) {
  99787. assert("DeclareExportDeclaration", node, opts);
  99788. }
  99789. function assertDeclareExportAllDeclaration(node, opts) {
  99790. assert("DeclareExportAllDeclaration", node, opts);
  99791. }
  99792. function assertDeclaredPredicate(node, opts) {
  99793. assert("DeclaredPredicate", node, opts);
  99794. }
  99795. function assertExistsTypeAnnotation(node, opts) {
  99796. assert("ExistsTypeAnnotation", node, opts);
  99797. }
  99798. function assertFunctionTypeAnnotation(node, opts) {
  99799. assert("FunctionTypeAnnotation", node, opts);
  99800. }
  99801. function assertFunctionTypeParam(node, opts) {
  99802. assert("FunctionTypeParam", node, opts);
  99803. }
  99804. function assertGenericTypeAnnotation(node, opts) {
  99805. assert("GenericTypeAnnotation", node, opts);
  99806. }
  99807. function assertInferredPredicate(node, opts) {
  99808. assert("InferredPredicate", node, opts);
  99809. }
  99810. function assertInterfaceExtends(node, opts) {
  99811. assert("InterfaceExtends", node, opts);
  99812. }
  99813. function assertInterfaceDeclaration(node, opts) {
  99814. assert("InterfaceDeclaration", node, opts);
  99815. }
  99816. function assertInterfaceTypeAnnotation(node, opts) {
  99817. assert("InterfaceTypeAnnotation", node, opts);
  99818. }
  99819. function assertIntersectionTypeAnnotation(node, opts) {
  99820. assert("IntersectionTypeAnnotation", node, opts);
  99821. }
  99822. function assertMixedTypeAnnotation(node, opts) {
  99823. assert("MixedTypeAnnotation", node, opts);
  99824. }
  99825. function assertEmptyTypeAnnotation(node, opts) {
  99826. assert("EmptyTypeAnnotation", node, opts);
  99827. }
  99828. function assertNullableTypeAnnotation(node, opts) {
  99829. assert("NullableTypeAnnotation", node, opts);
  99830. }
  99831. function assertNumberLiteralTypeAnnotation(node, opts) {
  99832. assert("NumberLiteralTypeAnnotation", node, opts);
  99833. }
  99834. function assertNumberTypeAnnotation(node, opts) {
  99835. assert("NumberTypeAnnotation", node, opts);
  99836. }
  99837. function assertObjectTypeAnnotation(node, opts) {
  99838. assert("ObjectTypeAnnotation", node, opts);
  99839. }
  99840. function assertObjectTypeInternalSlot(node, opts) {
  99841. assert("ObjectTypeInternalSlot", node, opts);
  99842. }
  99843. function assertObjectTypeCallProperty(node, opts) {
  99844. assert("ObjectTypeCallProperty", node, opts);
  99845. }
  99846. function assertObjectTypeIndexer(node, opts) {
  99847. assert("ObjectTypeIndexer", node, opts);
  99848. }
  99849. function assertObjectTypeProperty(node, opts) {
  99850. assert("ObjectTypeProperty", node, opts);
  99851. }
  99852. function assertObjectTypeSpreadProperty(node, opts) {
  99853. assert("ObjectTypeSpreadProperty", node, opts);
  99854. }
  99855. function assertOpaqueType(node, opts) {
  99856. assert("OpaqueType", node, opts);
  99857. }
  99858. function assertQualifiedTypeIdentifier(node, opts) {
  99859. assert("QualifiedTypeIdentifier", node, opts);
  99860. }
  99861. function assertStringLiteralTypeAnnotation(node, opts) {
  99862. assert("StringLiteralTypeAnnotation", node, opts);
  99863. }
  99864. function assertStringTypeAnnotation(node, opts) {
  99865. assert("StringTypeAnnotation", node, opts);
  99866. }
  99867. function assertSymbolTypeAnnotation(node, opts) {
  99868. assert("SymbolTypeAnnotation", node, opts);
  99869. }
  99870. function assertThisTypeAnnotation(node, opts) {
  99871. assert("ThisTypeAnnotation", node, opts);
  99872. }
  99873. function assertTupleTypeAnnotation(node, opts) {
  99874. assert("TupleTypeAnnotation", node, opts);
  99875. }
  99876. function assertTypeofTypeAnnotation(node, opts) {
  99877. assert("TypeofTypeAnnotation", node, opts);
  99878. }
  99879. function assertTypeAlias(node, opts) {
  99880. assert("TypeAlias", node, opts);
  99881. }
  99882. function assertTypeAnnotation(node, opts) {
  99883. assert("TypeAnnotation", node, opts);
  99884. }
  99885. function assertTypeCastExpression(node, opts) {
  99886. assert("TypeCastExpression", node, opts);
  99887. }
  99888. function assertTypeParameter(node, opts) {
  99889. assert("TypeParameter", node, opts);
  99890. }
  99891. function assertTypeParameterDeclaration(node, opts) {
  99892. assert("TypeParameterDeclaration", node, opts);
  99893. }
  99894. function assertTypeParameterInstantiation(node, opts) {
  99895. assert("TypeParameterInstantiation", node, opts);
  99896. }
  99897. function assertUnionTypeAnnotation(node, opts) {
  99898. assert("UnionTypeAnnotation", node, opts);
  99899. }
  99900. function assertVariance(node, opts) {
  99901. assert("Variance", node, opts);
  99902. }
  99903. function assertVoidTypeAnnotation(node, opts) {
  99904. assert("VoidTypeAnnotation", node, opts);
  99905. }
  99906. function assertEnumDeclaration(node, opts) {
  99907. assert("EnumDeclaration", node, opts);
  99908. }
  99909. function assertEnumBooleanBody(node, opts) {
  99910. assert("EnumBooleanBody", node, opts);
  99911. }
  99912. function assertEnumNumberBody(node, opts) {
  99913. assert("EnumNumberBody", node, opts);
  99914. }
  99915. function assertEnumStringBody(node, opts) {
  99916. assert("EnumStringBody", node, opts);
  99917. }
  99918. function assertEnumSymbolBody(node, opts) {
  99919. assert("EnumSymbolBody", node, opts);
  99920. }
  99921. function assertEnumBooleanMember(node, opts) {
  99922. assert("EnumBooleanMember", node, opts);
  99923. }
  99924. function assertEnumNumberMember(node, opts) {
  99925. assert("EnumNumberMember", node, opts);
  99926. }
  99927. function assertEnumStringMember(node, opts) {
  99928. assert("EnumStringMember", node, opts);
  99929. }
  99930. function assertEnumDefaultedMember(node, opts) {
  99931. assert("EnumDefaultedMember", node, opts);
  99932. }
  99933. function assertIndexedAccessType(node, opts) {
  99934. assert("IndexedAccessType", node, opts);
  99935. }
  99936. function assertOptionalIndexedAccessType(node, opts) {
  99937. assert("OptionalIndexedAccessType", node, opts);
  99938. }
  99939. function assertJSXAttribute(node, opts) {
  99940. assert("JSXAttribute", node, opts);
  99941. }
  99942. function assertJSXClosingElement(node, opts) {
  99943. assert("JSXClosingElement", node, opts);
  99944. }
  99945. function assertJSXElement(node, opts) {
  99946. assert("JSXElement", node, opts);
  99947. }
  99948. function assertJSXEmptyExpression(node, opts) {
  99949. assert("JSXEmptyExpression", node, opts);
  99950. }
  99951. function assertJSXExpressionContainer(node, opts) {
  99952. assert("JSXExpressionContainer", node, opts);
  99953. }
  99954. function assertJSXSpreadChild(node, opts) {
  99955. assert("JSXSpreadChild", node, opts);
  99956. }
  99957. function assertJSXIdentifier(node, opts) {
  99958. assert("JSXIdentifier", node, opts);
  99959. }
  99960. function assertJSXMemberExpression(node, opts) {
  99961. assert("JSXMemberExpression", node, opts);
  99962. }
  99963. function assertJSXNamespacedName(node, opts) {
  99964. assert("JSXNamespacedName", node, opts);
  99965. }
  99966. function assertJSXOpeningElement(node, opts) {
  99967. assert("JSXOpeningElement", node, opts);
  99968. }
  99969. function assertJSXSpreadAttribute(node, opts) {
  99970. assert("JSXSpreadAttribute", node, opts);
  99971. }
  99972. function assertJSXText(node, opts) {
  99973. assert("JSXText", node, opts);
  99974. }
  99975. function assertJSXFragment(node, opts) {
  99976. assert("JSXFragment", node, opts);
  99977. }
  99978. function assertJSXOpeningFragment(node, opts) {
  99979. assert("JSXOpeningFragment", node, opts);
  99980. }
  99981. function assertJSXClosingFragment(node, opts) {
  99982. assert("JSXClosingFragment", node, opts);
  99983. }
  99984. function assertNoop(node, opts) {
  99985. assert("Noop", node, opts);
  99986. }
  99987. function assertPlaceholder(node, opts) {
  99988. assert("Placeholder", node, opts);
  99989. }
  99990. function assertV8IntrinsicIdentifier(node, opts) {
  99991. assert("V8IntrinsicIdentifier", node, opts);
  99992. }
  99993. function assertArgumentPlaceholder(node, opts) {
  99994. assert("ArgumentPlaceholder", node, opts);
  99995. }
  99996. function assertBindExpression(node, opts) {
  99997. assert("BindExpression", node, opts);
  99998. }
  99999. function assertClassProperty(node, opts) {
  100000. assert("ClassProperty", node, opts);
  100001. }
  100002. function assertPipelineTopicExpression(node, opts) {
  100003. assert("PipelineTopicExpression", node, opts);
  100004. }
  100005. function assertPipelineBareFunction(node, opts) {
  100006. assert("PipelineBareFunction", node, opts);
  100007. }
  100008. function assertPipelinePrimaryTopicReference(node, opts) {
  100009. assert("PipelinePrimaryTopicReference", node, opts);
  100010. }
  100011. function assertClassPrivateProperty(node, opts) {
  100012. assert("ClassPrivateProperty", node, opts);
  100013. }
  100014. function assertClassPrivateMethod(node, opts) {
  100015. assert("ClassPrivateMethod", node, opts);
  100016. }
  100017. function assertImportAttribute(node, opts) {
  100018. assert("ImportAttribute", node, opts);
  100019. }
  100020. function assertDecorator(node, opts) {
  100021. assert("Decorator", node, opts);
  100022. }
  100023. function assertDoExpression(node, opts) {
  100024. assert("DoExpression", node, opts);
  100025. }
  100026. function assertExportDefaultSpecifier(node, opts) {
  100027. assert("ExportDefaultSpecifier", node, opts);
  100028. }
  100029. function assertPrivateName(node, opts) {
  100030. assert("PrivateName", node, opts);
  100031. }
  100032. function assertRecordExpression(node, opts) {
  100033. assert("RecordExpression", node, opts);
  100034. }
  100035. function assertTupleExpression(node, opts) {
  100036. assert("TupleExpression", node, opts);
  100037. }
  100038. function assertDecimalLiteral(node, opts) {
  100039. assert("DecimalLiteral", node, opts);
  100040. }
  100041. function assertStaticBlock(node, opts) {
  100042. assert("StaticBlock", node, opts);
  100043. }
  100044. function assertModuleExpression(node, opts) {
  100045. assert("ModuleExpression", node, opts);
  100046. }
  100047. function assertTSParameterProperty(node, opts) {
  100048. assert("TSParameterProperty", node, opts);
  100049. }
  100050. function assertTSDeclareFunction(node, opts) {
  100051. assert("TSDeclareFunction", node, opts);
  100052. }
  100053. function assertTSDeclareMethod(node, opts) {
  100054. assert("TSDeclareMethod", node, opts);
  100055. }
  100056. function assertTSQualifiedName(node, opts) {
  100057. assert("TSQualifiedName", node, opts);
  100058. }
  100059. function assertTSCallSignatureDeclaration(node, opts) {
  100060. assert("TSCallSignatureDeclaration", node, opts);
  100061. }
  100062. function assertTSConstructSignatureDeclaration(node, opts) {
  100063. assert("TSConstructSignatureDeclaration", node, opts);
  100064. }
  100065. function assertTSPropertySignature(node, opts) {
  100066. assert("TSPropertySignature", node, opts);
  100067. }
  100068. function assertTSMethodSignature(node, opts) {
  100069. assert("TSMethodSignature", node, opts);
  100070. }
  100071. function assertTSIndexSignature(node, opts) {
  100072. assert("TSIndexSignature", node, opts);
  100073. }
  100074. function assertTSAnyKeyword(node, opts) {
  100075. assert("TSAnyKeyword", node, opts);
  100076. }
  100077. function assertTSBooleanKeyword(node, opts) {
  100078. assert("TSBooleanKeyword", node, opts);
  100079. }
  100080. function assertTSBigIntKeyword(node, opts) {
  100081. assert("TSBigIntKeyword", node, opts);
  100082. }
  100083. function assertTSIntrinsicKeyword(node, opts) {
  100084. assert("TSIntrinsicKeyword", node, opts);
  100085. }
  100086. function assertTSNeverKeyword(node, opts) {
  100087. assert("TSNeverKeyword", node, opts);
  100088. }
  100089. function assertTSNullKeyword(node, opts) {
  100090. assert("TSNullKeyword", node, opts);
  100091. }
  100092. function assertTSNumberKeyword(node, opts) {
  100093. assert("TSNumberKeyword", node, opts);
  100094. }
  100095. function assertTSObjectKeyword(node, opts) {
  100096. assert("TSObjectKeyword", node, opts);
  100097. }
  100098. function assertTSStringKeyword(node, opts) {
  100099. assert("TSStringKeyword", node, opts);
  100100. }
  100101. function assertTSSymbolKeyword(node, opts) {
  100102. assert("TSSymbolKeyword", node, opts);
  100103. }
  100104. function assertTSUndefinedKeyword(node, opts) {
  100105. assert("TSUndefinedKeyword", node, opts);
  100106. }
  100107. function assertTSUnknownKeyword(node, opts) {
  100108. assert("TSUnknownKeyword", node, opts);
  100109. }
  100110. function assertTSVoidKeyword(node, opts) {
  100111. assert("TSVoidKeyword", node, opts);
  100112. }
  100113. function assertTSThisType(node, opts) {
  100114. assert("TSThisType", node, opts);
  100115. }
  100116. function assertTSFunctionType(node, opts) {
  100117. assert("TSFunctionType", node, opts);
  100118. }
  100119. function assertTSConstructorType(node, opts) {
  100120. assert("TSConstructorType", node, opts);
  100121. }
  100122. function assertTSTypeReference(node, opts) {
  100123. assert("TSTypeReference", node, opts);
  100124. }
  100125. function assertTSTypePredicate(node, opts) {
  100126. assert("TSTypePredicate", node, opts);
  100127. }
  100128. function assertTSTypeQuery(node, opts) {
  100129. assert("TSTypeQuery", node, opts);
  100130. }
  100131. function assertTSTypeLiteral(node, opts) {
  100132. assert("TSTypeLiteral", node, opts);
  100133. }
  100134. function assertTSArrayType(node, opts) {
  100135. assert("TSArrayType", node, opts);
  100136. }
  100137. function assertTSTupleType(node, opts) {
  100138. assert("TSTupleType", node, opts);
  100139. }
  100140. function assertTSOptionalType(node, opts) {
  100141. assert("TSOptionalType", node, opts);
  100142. }
  100143. function assertTSRestType(node, opts) {
  100144. assert("TSRestType", node, opts);
  100145. }
  100146. function assertTSNamedTupleMember(node, opts) {
  100147. assert("TSNamedTupleMember", node, opts);
  100148. }
  100149. function assertTSUnionType(node, opts) {
  100150. assert("TSUnionType", node, opts);
  100151. }
  100152. function assertTSIntersectionType(node, opts) {
  100153. assert("TSIntersectionType", node, opts);
  100154. }
  100155. function assertTSConditionalType(node, opts) {
  100156. assert("TSConditionalType", node, opts);
  100157. }
  100158. function assertTSInferType(node, opts) {
  100159. assert("TSInferType", node, opts);
  100160. }
  100161. function assertTSParenthesizedType(node, opts) {
  100162. assert("TSParenthesizedType", node, opts);
  100163. }
  100164. function assertTSTypeOperator(node, opts) {
  100165. assert("TSTypeOperator", node, opts);
  100166. }
  100167. function assertTSIndexedAccessType(node, opts) {
  100168. assert("TSIndexedAccessType", node, opts);
  100169. }
  100170. function assertTSMappedType(node, opts) {
  100171. assert("TSMappedType", node, opts);
  100172. }
  100173. function assertTSLiteralType(node, opts) {
  100174. assert("TSLiteralType", node, opts);
  100175. }
  100176. function assertTSExpressionWithTypeArguments(node, opts) {
  100177. assert("TSExpressionWithTypeArguments", node, opts);
  100178. }
  100179. function assertTSInterfaceDeclaration(node, opts) {
  100180. assert("TSInterfaceDeclaration", node, opts);
  100181. }
  100182. function assertTSInterfaceBody(node, opts) {
  100183. assert("TSInterfaceBody", node, opts);
  100184. }
  100185. function assertTSTypeAliasDeclaration(node, opts) {
  100186. assert("TSTypeAliasDeclaration", node, opts);
  100187. }
  100188. function assertTSAsExpression(node, opts) {
  100189. assert("TSAsExpression", node, opts);
  100190. }
  100191. function assertTSTypeAssertion(node, opts) {
  100192. assert("TSTypeAssertion", node, opts);
  100193. }
  100194. function assertTSEnumDeclaration(node, opts) {
  100195. assert("TSEnumDeclaration", node, opts);
  100196. }
  100197. function assertTSEnumMember(node, opts) {
  100198. assert("TSEnumMember", node, opts);
  100199. }
  100200. function assertTSModuleDeclaration(node, opts) {
  100201. assert("TSModuleDeclaration", node, opts);
  100202. }
  100203. function assertTSModuleBlock(node, opts) {
  100204. assert("TSModuleBlock", node, opts);
  100205. }
  100206. function assertTSImportType(node, opts) {
  100207. assert("TSImportType", node, opts);
  100208. }
  100209. function assertTSImportEqualsDeclaration(node, opts) {
  100210. assert("TSImportEqualsDeclaration", node, opts);
  100211. }
  100212. function assertTSExternalModuleReference(node, opts) {
  100213. assert("TSExternalModuleReference", node, opts);
  100214. }
  100215. function assertTSNonNullExpression(node, opts) {
  100216. assert("TSNonNullExpression", node, opts);
  100217. }
  100218. function assertTSExportAssignment(node, opts) {
  100219. assert("TSExportAssignment", node, opts);
  100220. }
  100221. function assertTSNamespaceExportDeclaration(node, opts) {
  100222. assert("TSNamespaceExportDeclaration", node, opts);
  100223. }
  100224. function assertTSTypeAnnotation(node, opts) {
  100225. assert("TSTypeAnnotation", node, opts);
  100226. }
  100227. function assertTSTypeParameterInstantiation(node, opts) {
  100228. assert("TSTypeParameterInstantiation", node, opts);
  100229. }
  100230. function assertTSTypeParameterDeclaration(node, opts) {
  100231. assert("TSTypeParameterDeclaration", node, opts);
  100232. }
  100233. function assertTSTypeParameter(node, opts) {
  100234. assert("TSTypeParameter", node, opts);
  100235. }
  100236. function assertExpression(node, opts) {
  100237. assert("Expression", node, opts);
  100238. }
  100239. function assertBinary(node, opts) {
  100240. assert("Binary", node, opts);
  100241. }
  100242. function assertScopable(node, opts) {
  100243. assert("Scopable", node, opts);
  100244. }
  100245. function assertBlockParent(node, opts) {
  100246. assert("BlockParent", node, opts);
  100247. }
  100248. function assertBlock(node, opts) {
  100249. assert("Block", node, opts);
  100250. }
  100251. function assertStatement(node, opts) {
  100252. assert("Statement", node, opts);
  100253. }
  100254. function assertTerminatorless(node, opts) {
  100255. assert("Terminatorless", node, opts);
  100256. }
  100257. function assertCompletionStatement(node, opts) {
  100258. assert("CompletionStatement", node, opts);
  100259. }
  100260. function assertConditional(node, opts) {
  100261. assert("Conditional", node, opts);
  100262. }
  100263. function assertLoop(node, opts) {
  100264. assert("Loop", node, opts);
  100265. }
  100266. function assertWhile(node, opts) {
  100267. assert("While", node, opts);
  100268. }
  100269. function assertExpressionWrapper(node, opts) {
  100270. assert("ExpressionWrapper", node, opts);
  100271. }
  100272. function assertFor(node, opts) {
  100273. assert("For", node, opts);
  100274. }
  100275. function assertForXStatement(node, opts) {
  100276. assert("ForXStatement", node, opts);
  100277. }
  100278. function assertFunction(node, opts) {
  100279. assert("Function", node, opts);
  100280. }
  100281. function assertFunctionParent(node, opts) {
  100282. assert("FunctionParent", node, opts);
  100283. }
  100284. function assertPureish(node, opts) {
  100285. assert("Pureish", node, opts);
  100286. }
  100287. function assertDeclaration(node, opts) {
  100288. assert("Declaration", node, opts);
  100289. }
  100290. function assertPatternLike(node, opts) {
  100291. assert("PatternLike", node, opts);
  100292. }
  100293. function assertLVal(node, opts) {
  100294. assert("LVal", node, opts);
  100295. }
  100296. function assertTSEntityName(node, opts) {
  100297. assert("TSEntityName", node, opts);
  100298. }
  100299. function assertLiteral(node, opts) {
  100300. assert("Literal", node, opts);
  100301. }
  100302. function assertImmutable(node, opts) {
  100303. assert("Immutable", node, opts);
  100304. }
  100305. function assertUserWhitespacable(node, opts) {
  100306. assert("UserWhitespacable", node, opts);
  100307. }
  100308. function assertMethod(node, opts) {
  100309. assert("Method", node, opts);
  100310. }
  100311. function assertObjectMember(node, opts) {
  100312. assert("ObjectMember", node, opts);
  100313. }
  100314. function assertProperty(node, opts) {
  100315. assert("Property", node, opts);
  100316. }
  100317. function assertUnaryLike(node, opts) {
  100318. assert("UnaryLike", node, opts);
  100319. }
  100320. function assertPattern(node, opts) {
  100321. assert("Pattern", node, opts);
  100322. }
  100323. function assertClass(node, opts) {
  100324. assert("Class", node, opts);
  100325. }
  100326. function assertModuleDeclaration(node, opts) {
  100327. assert("ModuleDeclaration", node, opts);
  100328. }
  100329. function assertExportDeclaration(node, opts) {
  100330. assert("ExportDeclaration", node, opts);
  100331. }
  100332. function assertModuleSpecifier(node, opts) {
  100333. assert("ModuleSpecifier", node, opts);
  100334. }
  100335. function assertFlow(node, opts) {
  100336. assert("Flow", node, opts);
  100337. }
  100338. function assertFlowType(node, opts) {
  100339. assert("FlowType", node, opts);
  100340. }
  100341. function assertFlowBaseAnnotation(node, opts) {
  100342. assert("FlowBaseAnnotation", node, opts);
  100343. }
  100344. function assertFlowDeclaration(node, opts) {
  100345. assert("FlowDeclaration", node, opts);
  100346. }
  100347. function assertFlowPredicate(node, opts) {
  100348. assert("FlowPredicate", node, opts);
  100349. }
  100350. function assertEnumBody(node, opts) {
  100351. assert("EnumBody", node, opts);
  100352. }
  100353. function assertEnumMember(node, opts) {
  100354. assert("EnumMember", node, opts);
  100355. }
  100356. function assertJSX(node, opts) {
  100357. assert("JSX", node, opts);
  100358. }
  100359. function assertPrivate(node, opts) {
  100360. assert("Private", node, opts);
  100361. }
  100362. function assertTSTypeElement(node, opts) {
  100363. assert("TSTypeElement", node, opts);
  100364. }
  100365. function assertTSType(node, opts) {
  100366. assert("TSType", node, opts);
  100367. }
  100368. function assertTSBaseType(node, opts) {
  100369. assert("TSBaseType", node, opts);
  100370. }
  100371. function assertNumberLiteral(node, opts) {
  100372. console.trace("The node type NumberLiteral has been renamed to NumericLiteral");
  100373. assert("NumberLiteral", node, opts);
  100374. }
  100375. function assertRegexLiteral(node, opts) {
  100376. console.trace("The node type RegexLiteral has been renamed to RegExpLiteral");
  100377. assert("RegexLiteral", node, opts);
  100378. }
  100379. function assertRestProperty(node, opts) {
  100380. console.trace("The node type RestProperty has been renamed to RestElement");
  100381. assert("RestProperty", node, opts);
  100382. }
  100383. function assertSpreadProperty(node, opts) {
  100384. console.trace("The node type SpreadProperty has been renamed to SpreadElement");
  100385. assert("SpreadProperty", node, opts);
  100386. }
  100387. }
  100388. });
  100389. // node_modules/@babel/helper-hoist-variables/node_modules/@babel/types/lib/builders/flow/createTypeAnnotationBasedOnTypeof.js
  100390. var require_createTypeAnnotationBasedOnTypeof4 = __commonJS({
  100391. "node_modules/@babel/helper-hoist-variables/node_modules/@babel/types/lib/builders/flow/createTypeAnnotationBasedOnTypeof.js"(exports) {
  100392. "use strict";
  100393. Object.defineProperty(exports, "__esModule", {
  100394. value: true
  100395. });
  100396. exports.default = createTypeAnnotationBasedOnTypeof;
  100397. var _generated = require_generated17();
  100398. function createTypeAnnotationBasedOnTypeof(type) {
  100399. if (type === "string") {
  100400. return (0, _generated.stringTypeAnnotation)();
  100401. } else if (type === "number") {
  100402. return (0, _generated.numberTypeAnnotation)();
  100403. } else if (type === "undefined") {
  100404. return (0, _generated.voidTypeAnnotation)();
  100405. } else if (type === "boolean") {
  100406. return (0, _generated.booleanTypeAnnotation)();
  100407. } else if (type === "function") {
  100408. return (0, _generated.genericTypeAnnotation)((0, _generated.identifier)("Function"));
  100409. } else if (type === "object") {
  100410. return (0, _generated.genericTypeAnnotation)((0, _generated.identifier)("Object"));
  100411. } else if (type === "symbol") {
  100412. return (0, _generated.genericTypeAnnotation)((0, _generated.identifier)("Symbol"));
  100413. } else if (type === "bigint") {
  100414. return (0, _generated.anyTypeAnnotation)();
  100415. } else {
  100416. throw new Error("Invalid typeof value: " + type);
  100417. }
  100418. }
  100419. }
  100420. });
  100421. // node_modules/@babel/helper-hoist-variables/node_modules/@babel/types/lib/modifications/flow/removeTypeDuplicates.js
  100422. var require_removeTypeDuplicates7 = __commonJS({
  100423. "node_modules/@babel/helper-hoist-variables/node_modules/@babel/types/lib/modifications/flow/removeTypeDuplicates.js"(exports) {
  100424. "use strict";
  100425. Object.defineProperty(exports, "__esModule", {
  100426. value: true
  100427. });
  100428. exports.default = removeTypeDuplicates;
  100429. var _generated = require_generated16();
  100430. function getQualifiedName(node) {
  100431. return (0, _generated.isIdentifier)(node) ? node.name : `${node.id.name}.${getQualifiedName(node.qualification)}`;
  100432. }
  100433. function removeTypeDuplicates(nodes) {
  100434. const generics = {};
  100435. const bases = {};
  100436. const typeGroups = [];
  100437. const types2 = [];
  100438. for (let i = 0; i < nodes.length; i++) {
  100439. const node = nodes[i];
  100440. if (!node)
  100441. continue;
  100442. if (types2.indexOf(node) >= 0) {
  100443. continue;
  100444. }
  100445. if ((0, _generated.isAnyTypeAnnotation)(node)) {
  100446. return [node];
  100447. }
  100448. if ((0, _generated.isFlowBaseAnnotation)(node)) {
  100449. bases[node.type] = node;
  100450. continue;
  100451. }
  100452. if ((0, _generated.isUnionTypeAnnotation)(node)) {
  100453. if (typeGroups.indexOf(node.types) < 0) {
  100454. nodes = nodes.concat(node.types);
  100455. typeGroups.push(node.types);
  100456. }
  100457. continue;
  100458. }
  100459. if ((0, _generated.isGenericTypeAnnotation)(node)) {
  100460. const name2 = getQualifiedName(node.id);
  100461. if (generics[name2]) {
  100462. let existing = generics[name2];
  100463. if (existing.typeParameters) {
  100464. if (node.typeParameters) {
  100465. existing.typeParameters.params = removeTypeDuplicates(existing.typeParameters.params.concat(node.typeParameters.params));
  100466. }
  100467. } else {
  100468. existing = node.typeParameters;
  100469. }
  100470. } else {
  100471. generics[name2] = node;
  100472. }
  100473. continue;
  100474. }
  100475. types2.push(node);
  100476. }
  100477. for (const type of Object.keys(bases)) {
  100478. types2.push(bases[type]);
  100479. }
  100480. for (const name2 of Object.keys(generics)) {
  100481. types2.push(generics[name2]);
  100482. }
  100483. return types2;
  100484. }
  100485. }
  100486. });
  100487. // node_modules/@babel/helper-hoist-variables/node_modules/@babel/types/lib/builders/flow/createFlowUnionType.js
  100488. var require_createFlowUnionType4 = __commonJS({
  100489. "node_modules/@babel/helper-hoist-variables/node_modules/@babel/types/lib/builders/flow/createFlowUnionType.js"(exports) {
  100490. "use strict";
  100491. Object.defineProperty(exports, "__esModule", {
  100492. value: true
  100493. });
  100494. exports.default = createFlowUnionType;
  100495. var _generated = require_generated17();
  100496. var _removeTypeDuplicates = require_removeTypeDuplicates7();
  100497. function createFlowUnionType(types2) {
  100498. const flattened = (0, _removeTypeDuplicates.default)(types2);
  100499. if (flattened.length === 1) {
  100500. return flattened[0];
  100501. } else {
  100502. return (0, _generated.unionTypeAnnotation)(flattened);
  100503. }
  100504. }
  100505. }
  100506. });
  100507. // node_modules/@babel/helper-hoist-variables/node_modules/@babel/types/lib/modifications/typescript/removeTypeDuplicates.js
  100508. var require_removeTypeDuplicates8 = __commonJS({
  100509. "node_modules/@babel/helper-hoist-variables/node_modules/@babel/types/lib/modifications/typescript/removeTypeDuplicates.js"(exports) {
  100510. "use strict";
  100511. Object.defineProperty(exports, "__esModule", {
  100512. value: true
  100513. });
  100514. exports.default = removeTypeDuplicates;
  100515. var _generated = require_generated16();
  100516. function removeTypeDuplicates(nodes) {
  100517. const generics = {};
  100518. const bases = {};
  100519. const typeGroups = [];
  100520. const types2 = [];
  100521. for (let i = 0; i < nodes.length; i++) {
  100522. const node = nodes[i];
  100523. if (!node)
  100524. continue;
  100525. if (types2.indexOf(node) >= 0) {
  100526. continue;
  100527. }
  100528. if ((0, _generated.isTSAnyKeyword)(node)) {
  100529. return [node];
  100530. }
  100531. if ((0, _generated.isTSBaseType)(node)) {
  100532. bases[node.type] = node;
  100533. continue;
  100534. }
  100535. if ((0, _generated.isTSUnionType)(node)) {
  100536. if (typeGroups.indexOf(node.types) < 0) {
  100537. nodes = nodes.concat(node.types);
  100538. typeGroups.push(node.types);
  100539. }
  100540. continue;
  100541. }
  100542. types2.push(node);
  100543. }
  100544. for (const type of Object.keys(bases)) {
  100545. types2.push(bases[type]);
  100546. }
  100547. for (const name2 of Object.keys(generics)) {
  100548. types2.push(generics[name2]);
  100549. }
  100550. return types2;
  100551. }
  100552. }
  100553. });
  100554. // node_modules/@babel/helper-hoist-variables/node_modules/@babel/types/lib/builders/typescript/createTSUnionType.js
  100555. var require_createTSUnionType4 = __commonJS({
  100556. "node_modules/@babel/helper-hoist-variables/node_modules/@babel/types/lib/builders/typescript/createTSUnionType.js"(exports) {
  100557. "use strict";
  100558. Object.defineProperty(exports, "__esModule", {
  100559. value: true
  100560. });
  100561. exports.default = createTSUnionType;
  100562. var _generated = require_generated17();
  100563. var _removeTypeDuplicates = require_removeTypeDuplicates8();
  100564. function createTSUnionType(typeAnnotations) {
  100565. const types2 = typeAnnotations.map((type) => type.typeAnnotation);
  100566. const flattened = (0, _removeTypeDuplicates.default)(types2);
  100567. if (flattened.length === 1) {
  100568. return flattened[0];
  100569. } else {
  100570. return (0, _generated.tsUnionType)(flattened);
  100571. }
  100572. }
  100573. }
  100574. });
  100575. // node_modules/@babel/helper-hoist-variables/node_modules/@babel/types/lib/builders/generated/uppercase.js
  100576. var require_uppercase4 = __commonJS({
  100577. "node_modules/@babel/helper-hoist-variables/node_modules/@babel/types/lib/builders/generated/uppercase.js"(exports) {
  100578. "use strict";
  100579. Object.defineProperty(exports, "__esModule", {
  100580. value: true
  100581. });
  100582. Object.defineProperty(exports, "ArrayExpression", {
  100583. enumerable: true,
  100584. get: function() {
  100585. return _index.arrayExpression;
  100586. }
  100587. });
  100588. Object.defineProperty(exports, "AssignmentExpression", {
  100589. enumerable: true,
  100590. get: function() {
  100591. return _index.assignmentExpression;
  100592. }
  100593. });
  100594. Object.defineProperty(exports, "BinaryExpression", {
  100595. enumerable: true,
  100596. get: function() {
  100597. return _index.binaryExpression;
  100598. }
  100599. });
  100600. Object.defineProperty(exports, "InterpreterDirective", {
  100601. enumerable: true,
  100602. get: function() {
  100603. return _index.interpreterDirective;
  100604. }
  100605. });
  100606. Object.defineProperty(exports, "Directive", {
  100607. enumerable: true,
  100608. get: function() {
  100609. return _index.directive;
  100610. }
  100611. });
  100612. Object.defineProperty(exports, "DirectiveLiteral", {
  100613. enumerable: true,
  100614. get: function() {
  100615. return _index.directiveLiteral;
  100616. }
  100617. });
  100618. Object.defineProperty(exports, "BlockStatement", {
  100619. enumerable: true,
  100620. get: function() {
  100621. return _index.blockStatement;
  100622. }
  100623. });
  100624. Object.defineProperty(exports, "BreakStatement", {
  100625. enumerable: true,
  100626. get: function() {
  100627. return _index.breakStatement;
  100628. }
  100629. });
  100630. Object.defineProperty(exports, "CallExpression", {
  100631. enumerable: true,
  100632. get: function() {
  100633. return _index.callExpression;
  100634. }
  100635. });
  100636. Object.defineProperty(exports, "CatchClause", {
  100637. enumerable: true,
  100638. get: function() {
  100639. return _index.catchClause;
  100640. }
  100641. });
  100642. Object.defineProperty(exports, "ConditionalExpression", {
  100643. enumerable: true,
  100644. get: function() {
  100645. return _index.conditionalExpression;
  100646. }
  100647. });
  100648. Object.defineProperty(exports, "ContinueStatement", {
  100649. enumerable: true,
  100650. get: function() {
  100651. return _index.continueStatement;
  100652. }
  100653. });
  100654. Object.defineProperty(exports, "DebuggerStatement", {
  100655. enumerable: true,
  100656. get: function() {
  100657. return _index.debuggerStatement;
  100658. }
  100659. });
  100660. Object.defineProperty(exports, "DoWhileStatement", {
  100661. enumerable: true,
  100662. get: function() {
  100663. return _index.doWhileStatement;
  100664. }
  100665. });
  100666. Object.defineProperty(exports, "EmptyStatement", {
  100667. enumerable: true,
  100668. get: function() {
  100669. return _index.emptyStatement;
  100670. }
  100671. });
  100672. Object.defineProperty(exports, "ExpressionStatement", {
  100673. enumerable: true,
  100674. get: function() {
  100675. return _index.expressionStatement;
  100676. }
  100677. });
  100678. Object.defineProperty(exports, "File", {
  100679. enumerable: true,
  100680. get: function() {
  100681. return _index.file;
  100682. }
  100683. });
  100684. Object.defineProperty(exports, "ForInStatement", {
  100685. enumerable: true,
  100686. get: function() {
  100687. return _index.forInStatement;
  100688. }
  100689. });
  100690. Object.defineProperty(exports, "ForStatement", {
  100691. enumerable: true,
  100692. get: function() {
  100693. return _index.forStatement;
  100694. }
  100695. });
  100696. Object.defineProperty(exports, "FunctionDeclaration", {
  100697. enumerable: true,
  100698. get: function() {
  100699. return _index.functionDeclaration;
  100700. }
  100701. });
  100702. Object.defineProperty(exports, "FunctionExpression", {
  100703. enumerable: true,
  100704. get: function() {
  100705. return _index.functionExpression;
  100706. }
  100707. });
  100708. Object.defineProperty(exports, "Identifier", {
  100709. enumerable: true,
  100710. get: function() {
  100711. return _index.identifier;
  100712. }
  100713. });
  100714. Object.defineProperty(exports, "IfStatement", {
  100715. enumerable: true,
  100716. get: function() {
  100717. return _index.ifStatement;
  100718. }
  100719. });
  100720. Object.defineProperty(exports, "LabeledStatement", {
  100721. enumerable: true,
  100722. get: function() {
  100723. return _index.labeledStatement;
  100724. }
  100725. });
  100726. Object.defineProperty(exports, "StringLiteral", {
  100727. enumerable: true,
  100728. get: function() {
  100729. return _index.stringLiteral;
  100730. }
  100731. });
  100732. Object.defineProperty(exports, "NumericLiteral", {
  100733. enumerable: true,
  100734. get: function() {
  100735. return _index.numericLiteral;
  100736. }
  100737. });
  100738. Object.defineProperty(exports, "NullLiteral", {
  100739. enumerable: true,
  100740. get: function() {
  100741. return _index.nullLiteral;
  100742. }
  100743. });
  100744. Object.defineProperty(exports, "BooleanLiteral", {
  100745. enumerable: true,
  100746. get: function() {
  100747. return _index.booleanLiteral;
  100748. }
  100749. });
  100750. Object.defineProperty(exports, "RegExpLiteral", {
  100751. enumerable: true,
  100752. get: function() {
  100753. return _index.regExpLiteral;
  100754. }
  100755. });
  100756. Object.defineProperty(exports, "LogicalExpression", {
  100757. enumerable: true,
  100758. get: function() {
  100759. return _index.logicalExpression;
  100760. }
  100761. });
  100762. Object.defineProperty(exports, "MemberExpression", {
  100763. enumerable: true,
  100764. get: function() {
  100765. return _index.memberExpression;
  100766. }
  100767. });
  100768. Object.defineProperty(exports, "NewExpression", {
  100769. enumerable: true,
  100770. get: function() {
  100771. return _index.newExpression;
  100772. }
  100773. });
  100774. Object.defineProperty(exports, "Program", {
  100775. enumerable: true,
  100776. get: function() {
  100777. return _index.program;
  100778. }
  100779. });
  100780. Object.defineProperty(exports, "ObjectExpression", {
  100781. enumerable: true,
  100782. get: function() {
  100783. return _index.objectExpression;
  100784. }
  100785. });
  100786. Object.defineProperty(exports, "ObjectMethod", {
  100787. enumerable: true,
  100788. get: function() {
  100789. return _index.objectMethod;
  100790. }
  100791. });
  100792. Object.defineProperty(exports, "ObjectProperty", {
  100793. enumerable: true,
  100794. get: function() {
  100795. return _index.objectProperty;
  100796. }
  100797. });
  100798. Object.defineProperty(exports, "RestElement", {
  100799. enumerable: true,
  100800. get: function() {
  100801. return _index.restElement;
  100802. }
  100803. });
  100804. Object.defineProperty(exports, "ReturnStatement", {
  100805. enumerable: true,
  100806. get: function() {
  100807. return _index.returnStatement;
  100808. }
  100809. });
  100810. Object.defineProperty(exports, "SequenceExpression", {
  100811. enumerable: true,
  100812. get: function() {
  100813. return _index.sequenceExpression;
  100814. }
  100815. });
  100816. Object.defineProperty(exports, "ParenthesizedExpression", {
  100817. enumerable: true,
  100818. get: function() {
  100819. return _index.parenthesizedExpression;
  100820. }
  100821. });
  100822. Object.defineProperty(exports, "SwitchCase", {
  100823. enumerable: true,
  100824. get: function() {
  100825. return _index.switchCase;
  100826. }
  100827. });
  100828. Object.defineProperty(exports, "SwitchStatement", {
  100829. enumerable: true,
  100830. get: function() {
  100831. return _index.switchStatement;
  100832. }
  100833. });
  100834. Object.defineProperty(exports, "ThisExpression", {
  100835. enumerable: true,
  100836. get: function() {
  100837. return _index.thisExpression;
  100838. }
  100839. });
  100840. Object.defineProperty(exports, "ThrowStatement", {
  100841. enumerable: true,
  100842. get: function() {
  100843. return _index.throwStatement;
  100844. }
  100845. });
  100846. Object.defineProperty(exports, "TryStatement", {
  100847. enumerable: true,
  100848. get: function() {
  100849. return _index.tryStatement;
  100850. }
  100851. });
  100852. Object.defineProperty(exports, "UnaryExpression", {
  100853. enumerable: true,
  100854. get: function() {
  100855. return _index.unaryExpression;
  100856. }
  100857. });
  100858. Object.defineProperty(exports, "UpdateExpression", {
  100859. enumerable: true,
  100860. get: function() {
  100861. return _index.updateExpression;
  100862. }
  100863. });
  100864. Object.defineProperty(exports, "VariableDeclaration", {
  100865. enumerable: true,
  100866. get: function() {
  100867. return _index.variableDeclaration;
  100868. }
  100869. });
  100870. Object.defineProperty(exports, "VariableDeclarator", {
  100871. enumerable: true,
  100872. get: function() {
  100873. return _index.variableDeclarator;
  100874. }
  100875. });
  100876. Object.defineProperty(exports, "WhileStatement", {
  100877. enumerable: true,
  100878. get: function() {
  100879. return _index.whileStatement;
  100880. }
  100881. });
  100882. Object.defineProperty(exports, "WithStatement", {
  100883. enumerable: true,
  100884. get: function() {
  100885. return _index.withStatement;
  100886. }
  100887. });
  100888. Object.defineProperty(exports, "AssignmentPattern", {
  100889. enumerable: true,
  100890. get: function() {
  100891. return _index.assignmentPattern;
  100892. }
  100893. });
  100894. Object.defineProperty(exports, "ArrayPattern", {
  100895. enumerable: true,
  100896. get: function() {
  100897. return _index.arrayPattern;
  100898. }
  100899. });
  100900. Object.defineProperty(exports, "ArrowFunctionExpression", {
  100901. enumerable: true,
  100902. get: function() {
  100903. return _index.arrowFunctionExpression;
  100904. }
  100905. });
  100906. Object.defineProperty(exports, "ClassBody", {
  100907. enumerable: true,
  100908. get: function() {
  100909. return _index.classBody;
  100910. }
  100911. });
  100912. Object.defineProperty(exports, "ClassExpression", {
  100913. enumerable: true,
  100914. get: function() {
  100915. return _index.classExpression;
  100916. }
  100917. });
  100918. Object.defineProperty(exports, "ClassDeclaration", {
  100919. enumerable: true,
  100920. get: function() {
  100921. return _index.classDeclaration;
  100922. }
  100923. });
  100924. Object.defineProperty(exports, "ExportAllDeclaration", {
  100925. enumerable: true,
  100926. get: function() {
  100927. return _index.exportAllDeclaration;
  100928. }
  100929. });
  100930. Object.defineProperty(exports, "ExportDefaultDeclaration", {
  100931. enumerable: true,
  100932. get: function() {
  100933. return _index.exportDefaultDeclaration;
  100934. }
  100935. });
  100936. Object.defineProperty(exports, "ExportNamedDeclaration", {
  100937. enumerable: true,
  100938. get: function() {
  100939. return _index.exportNamedDeclaration;
  100940. }
  100941. });
  100942. Object.defineProperty(exports, "ExportSpecifier", {
  100943. enumerable: true,
  100944. get: function() {
  100945. return _index.exportSpecifier;
  100946. }
  100947. });
  100948. Object.defineProperty(exports, "ForOfStatement", {
  100949. enumerable: true,
  100950. get: function() {
  100951. return _index.forOfStatement;
  100952. }
  100953. });
  100954. Object.defineProperty(exports, "ImportDeclaration", {
  100955. enumerable: true,
  100956. get: function() {
  100957. return _index.importDeclaration;
  100958. }
  100959. });
  100960. Object.defineProperty(exports, "ImportDefaultSpecifier", {
  100961. enumerable: true,
  100962. get: function() {
  100963. return _index.importDefaultSpecifier;
  100964. }
  100965. });
  100966. Object.defineProperty(exports, "ImportNamespaceSpecifier", {
  100967. enumerable: true,
  100968. get: function() {
  100969. return _index.importNamespaceSpecifier;
  100970. }
  100971. });
  100972. Object.defineProperty(exports, "ImportSpecifier", {
  100973. enumerable: true,
  100974. get: function() {
  100975. return _index.importSpecifier;
  100976. }
  100977. });
  100978. Object.defineProperty(exports, "MetaProperty", {
  100979. enumerable: true,
  100980. get: function() {
  100981. return _index.metaProperty;
  100982. }
  100983. });
  100984. Object.defineProperty(exports, "ClassMethod", {
  100985. enumerable: true,
  100986. get: function() {
  100987. return _index.classMethod;
  100988. }
  100989. });
  100990. Object.defineProperty(exports, "ObjectPattern", {
  100991. enumerable: true,
  100992. get: function() {
  100993. return _index.objectPattern;
  100994. }
  100995. });
  100996. Object.defineProperty(exports, "SpreadElement", {
  100997. enumerable: true,
  100998. get: function() {
  100999. return _index.spreadElement;
  101000. }
  101001. });
  101002. Object.defineProperty(exports, "Super", {
  101003. enumerable: true,
  101004. get: function() {
  101005. return _index.super;
  101006. }
  101007. });
  101008. Object.defineProperty(exports, "TaggedTemplateExpression", {
  101009. enumerable: true,
  101010. get: function() {
  101011. return _index.taggedTemplateExpression;
  101012. }
  101013. });
  101014. Object.defineProperty(exports, "TemplateElement", {
  101015. enumerable: true,
  101016. get: function() {
  101017. return _index.templateElement;
  101018. }
  101019. });
  101020. Object.defineProperty(exports, "TemplateLiteral", {
  101021. enumerable: true,
  101022. get: function() {
  101023. return _index.templateLiteral;
  101024. }
  101025. });
  101026. Object.defineProperty(exports, "YieldExpression", {
  101027. enumerable: true,
  101028. get: function() {
  101029. return _index.yieldExpression;
  101030. }
  101031. });
  101032. Object.defineProperty(exports, "AwaitExpression", {
  101033. enumerable: true,
  101034. get: function() {
  101035. return _index.awaitExpression;
  101036. }
  101037. });
  101038. Object.defineProperty(exports, "Import", {
  101039. enumerable: true,
  101040. get: function() {
  101041. return _index.import;
  101042. }
  101043. });
  101044. Object.defineProperty(exports, "BigIntLiteral", {
  101045. enumerable: true,
  101046. get: function() {
  101047. return _index.bigIntLiteral;
  101048. }
  101049. });
  101050. Object.defineProperty(exports, "ExportNamespaceSpecifier", {
  101051. enumerable: true,
  101052. get: function() {
  101053. return _index.exportNamespaceSpecifier;
  101054. }
  101055. });
  101056. Object.defineProperty(exports, "OptionalMemberExpression", {
  101057. enumerable: true,
  101058. get: function() {
  101059. return _index.optionalMemberExpression;
  101060. }
  101061. });
  101062. Object.defineProperty(exports, "OptionalCallExpression", {
  101063. enumerable: true,
  101064. get: function() {
  101065. return _index.optionalCallExpression;
  101066. }
  101067. });
  101068. Object.defineProperty(exports, "AnyTypeAnnotation", {
  101069. enumerable: true,
  101070. get: function() {
  101071. return _index.anyTypeAnnotation;
  101072. }
  101073. });
  101074. Object.defineProperty(exports, "ArrayTypeAnnotation", {
  101075. enumerable: true,
  101076. get: function() {
  101077. return _index.arrayTypeAnnotation;
  101078. }
  101079. });
  101080. Object.defineProperty(exports, "BooleanTypeAnnotation", {
  101081. enumerable: true,
  101082. get: function() {
  101083. return _index.booleanTypeAnnotation;
  101084. }
  101085. });
  101086. Object.defineProperty(exports, "BooleanLiteralTypeAnnotation", {
  101087. enumerable: true,
  101088. get: function() {
  101089. return _index.booleanLiteralTypeAnnotation;
  101090. }
  101091. });
  101092. Object.defineProperty(exports, "NullLiteralTypeAnnotation", {
  101093. enumerable: true,
  101094. get: function() {
  101095. return _index.nullLiteralTypeAnnotation;
  101096. }
  101097. });
  101098. Object.defineProperty(exports, "ClassImplements", {
  101099. enumerable: true,
  101100. get: function() {
  101101. return _index.classImplements;
  101102. }
  101103. });
  101104. Object.defineProperty(exports, "DeclareClass", {
  101105. enumerable: true,
  101106. get: function() {
  101107. return _index.declareClass;
  101108. }
  101109. });
  101110. Object.defineProperty(exports, "DeclareFunction", {
  101111. enumerable: true,
  101112. get: function() {
  101113. return _index.declareFunction;
  101114. }
  101115. });
  101116. Object.defineProperty(exports, "DeclareInterface", {
  101117. enumerable: true,
  101118. get: function() {
  101119. return _index.declareInterface;
  101120. }
  101121. });
  101122. Object.defineProperty(exports, "DeclareModule", {
  101123. enumerable: true,
  101124. get: function() {
  101125. return _index.declareModule;
  101126. }
  101127. });
  101128. Object.defineProperty(exports, "DeclareModuleExports", {
  101129. enumerable: true,
  101130. get: function() {
  101131. return _index.declareModuleExports;
  101132. }
  101133. });
  101134. Object.defineProperty(exports, "DeclareTypeAlias", {
  101135. enumerable: true,
  101136. get: function() {
  101137. return _index.declareTypeAlias;
  101138. }
  101139. });
  101140. Object.defineProperty(exports, "DeclareOpaqueType", {
  101141. enumerable: true,
  101142. get: function() {
  101143. return _index.declareOpaqueType;
  101144. }
  101145. });
  101146. Object.defineProperty(exports, "DeclareVariable", {
  101147. enumerable: true,
  101148. get: function() {
  101149. return _index.declareVariable;
  101150. }
  101151. });
  101152. Object.defineProperty(exports, "DeclareExportDeclaration", {
  101153. enumerable: true,
  101154. get: function() {
  101155. return _index.declareExportDeclaration;
  101156. }
  101157. });
  101158. Object.defineProperty(exports, "DeclareExportAllDeclaration", {
  101159. enumerable: true,
  101160. get: function() {
  101161. return _index.declareExportAllDeclaration;
  101162. }
  101163. });
  101164. Object.defineProperty(exports, "DeclaredPredicate", {
  101165. enumerable: true,
  101166. get: function() {
  101167. return _index.declaredPredicate;
  101168. }
  101169. });
  101170. Object.defineProperty(exports, "ExistsTypeAnnotation", {
  101171. enumerable: true,
  101172. get: function() {
  101173. return _index.existsTypeAnnotation;
  101174. }
  101175. });
  101176. Object.defineProperty(exports, "FunctionTypeAnnotation", {
  101177. enumerable: true,
  101178. get: function() {
  101179. return _index.functionTypeAnnotation;
  101180. }
  101181. });
  101182. Object.defineProperty(exports, "FunctionTypeParam", {
  101183. enumerable: true,
  101184. get: function() {
  101185. return _index.functionTypeParam;
  101186. }
  101187. });
  101188. Object.defineProperty(exports, "GenericTypeAnnotation", {
  101189. enumerable: true,
  101190. get: function() {
  101191. return _index.genericTypeAnnotation;
  101192. }
  101193. });
  101194. Object.defineProperty(exports, "InferredPredicate", {
  101195. enumerable: true,
  101196. get: function() {
  101197. return _index.inferredPredicate;
  101198. }
  101199. });
  101200. Object.defineProperty(exports, "InterfaceExtends", {
  101201. enumerable: true,
  101202. get: function() {
  101203. return _index.interfaceExtends;
  101204. }
  101205. });
  101206. Object.defineProperty(exports, "InterfaceDeclaration", {
  101207. enumerable: true,
  101208. get: function() {
  101209. return _index.interfaceDeclaration;
  101210. }
  101211. });
  101212. Object.defineProperty(exports, "InterfaceTypeAnnotation", {
  101213. enumerable: true,
  101214. get: function() {
  101215. return _index.interfaceTypeAnnotation;
  101216. }
  101217. });
  101218. Object.defineProperty(exports, "IntersectionTypeAnnotation", {
  101219. enumerable: true,
  101220. get: function() {
  101221. return _index.intersectionTypeAnnotation;
  101222. }
  101223. });
  101224. Object.defineProperty(exports, "MixedTypeAnnotation", {
  101225. enumerable: true,
  101226. get: function() {
  101227. return _index.mixedTypeAnnotation;
  101228. }
  101229. });
  101230. Object.defineProperty(exports, "EmptyTypeAnnotation", {
  101231. enumerable: true,
  101232. get: function() {
  101233. return _index.emptyTypeAnnotation;
  101234. }
  101235. });
  101236. Object.defineProperty(exports, "NullableTypeAnnotation", {
  101237. enumerable: true,
  101238. get: function() {
  101239. return _index.nullableTypeAnnotation;
  101240. }
  101241. });
  101242. Object.defineProperty(exports, "NumberLiteralTypeAnnotation", {
  101243. enumerable: true,
  101244. get: function() {
  101245. return _index.numberLiteralTypeAnnotation;
  101246. }
  101247. });
  101248. Object.defineProperty(exports, "NumberTypeAnnotation", {
  101249. enumerable: true,
  101250. get: function() {
  101251. return _index.numberTypeAnnotation;
  101252. }
  101253. });
  101254. Object.defineProperty(exports, "ObjectTypeAnnotation", {
  101255. enumerable: true,
  101256. get: function() {
  101257. return _index.objectTypeAnnotation;
  101258. }
  101259. });
  101260. Object.defineProperty(exports, "ObjectTypeInternalSlot", {
  101261. enumerable: true,
  101262. get: function() {
  101263. return _index.objectTypeInternalSlot;
  101264. }
  101265. });
  101266. Object.defineProperty(exports, "ObjectTypeCallProperty", {
  101267. enumerable: true,
  101268. get: function() {
  101269. return _index.objectTypeCallProperty;
  101270. }
  101271. });
  101272. Object.defineProperty(exports, "ObjectTypeIndexer", {
  101273. enumerable: true,
  101274. get: function() {
  101275. return _index.objectTypeIndexer;
  101276. }
  101277. });
  101278. Object.defineProperty(exports, "ObjectTypeProperty", {
  101279. enumerable: true,
  101280. get: function() {
  101281. return _index.objectTypeProperty;
  101282. }
  101283. });
  101284. Object.defineProperty(exports, "ObjectTypeSpreadProperty", {
  101285. enumerable: true,
  101286. get: function() {
  101287. return _index.objectTypeSpreadProperty;
  101288. }
  101289. });
  101290. Object.defineProperty(exports, "OpaqueType", {
  101291. enumerable: true,
  101292. get: function() {
  101293. return _index.opaqueType;
  101294. }
  101295. });
  101296. Object.defineProperty(exports, "QualifiedTypeIdentifier", {
  101297. enumerable: true,
  101298. get: function() {
  101299. return _index.qualifiedTypeIdentifier;
  101300. }
  101301. });
  101302. Object.defineProperty(exports, "StringLiteralTypeAnnotation", {
  101303. enumerable: true,
  101304. get: function() {
  101305. return _index.stringLiteralTypeAnnotation;
  101306. }
  101307. });
  101308. Object.defineProperty(exports, "StringTypeAnnotation", {
  101309. enumerable: true,
  101310. get: function() {
  101311. return _index.stringTypeAnnotation;
  101312. }
  101313. });
  101314. Object.defineProperty(exports, "SymbolTypeAnnotation", {
  101315. enumerable: true,
  101316. get: function() {
  101317. return _index.symbolTypeAnnotation;
  101318. }
  101319. });
  101320. Object.defineProperty(exports, "ThisTypeAnnotation", {
  101321. enumerable: true,
  101322. get: function() {
  101323. return _index.thisTypeAnnotation;
  101324. }
  101325. });
  101326. Object.defineProperty(exports, "TupleTypeAnnotation", {
  101327. enumerable: true,
  101328. get: function() {
  101329. return _index.tupleTypeAnnotation;
  101330. }
  101331. });
  101332. Object.defineProperty(exports, "TypeofTypeAnnotation", {
  101333. enumerable: true,
  101334. get: function() {
  101335. return _index.typeofTypeAnnotation;
  101336. }
  101337. });
  101338. Object.defineProperty(exports, "TypeAlias", {
  101339. enumerable: true,
  101340. get: function() {
  101341. return _index.typeAlias;
  101342. }
  101343. });
  101344. Object.defineProperty(exports, "TypeAnnotation", {
  101345. enumerable: true,
  101346. get: function() {
  101347. return _index.typeAnnotation;
  101348. }
  101349. });
  101350. Object.defineProperty(exports, "TypeCastExpression", {
  101351. enumerable: true,
  101352. get: function() {
  101353. return _index.typeCastExpression;
  101354. }
  101355. });
  101356. Object.defineProperty(exports, "TypeParameter", {
  101357. enumerable: true,
  101358. get: function() {
  101359. return _index.typeParameter;
  101360. }
  101361. });
  101362. Object.defineProperty(exports, "TypeParameterDeclaration", {
  101363. enumerable: true,
  101364. get: function() {
  101365. return _index.typeParameterDeclaration;
  101366. }
  101367. });
  101368. Object.defineProperty(exports, "TypeParameterInstantiation", {
  101369. enumerable: true,
  101370. get: function() {
  101371. return _index.typeParameterInstantiation;
  101372. }
  101373. });
  101374. Object.defineProperty(exports, "UnionTypeAnnotation", {
  101375. enumerable: true,
  101376. get: function() {
  101377. return _index.unionTypeAnnotation;
  101378. }
  101379. });
  101380. Object.defineProperty(exports, "Variance", {
  101381. enumerable: true,
  101382. get: function() {
  101383. return _index.variance;
  101384. }
  101385. });
  101386. Object.defineProperty(exports, "VoidTypeAnnotation", {
  101387. enumerable: true,
  101388. get: function() {
  101389. return _index.voidTypeAnnotation;
  101390. }
  101391. });
  101392. Object.defineProperty(exports, "EnumDeclaration", {
  101393. enumerable: true,
  101394. get: function() {
  101395. return _index.enumDeclaration;
  101396. }
  101397. });
  101398. Object.defineProperty(exports, "EnumBooleanBody", {
  101399. enumerable: true,
  101400. get: function() {
  101401. return _index.enumBooleanBody;
  101402. }
  101403. });
  101404. Object.defineProperty(exports, "EnumNumberBody", {
  101405. enumerable: true,
  101406. get: function() {
  101407. return _index.enumNumberBody;
  101408. }
  101409. });
  101410. Object.defineProperty(exports, "EnumStringBody", {
  101411. enumerable: true,
  101412. get: function() {
  101413. return _index.enumStringBody;
  101414. }
  101415. });
  101416. Object.defineProperty(exports, "EnumSymbolBody", {
  101417. enumerable: true,
  101418. get: function() {
  101419. return _index.enumSymbolBody;
  101420. }
  101421. });
  101422. Object.defineProperty(exports, "EnumBooleanMember", {
  101423. enumerable: true,
  101424. get: function() {
  101425. return _index.enumBooleanMember;
  101426. }
  101427. });
  101428. Object.defineProperty(exports, "EnumNumberMember", {
  101429. enumerable: true,
  101430. get: function() {
  101431. return _index.enumNumberMember;
  101432. }
  101433. });
  101434. Object.defineProperty(exports, "EnumStringMember", {
  101435. enumerable: true,
  101436. get: function() {
  101437. return _index.enumStringMember;
  101438. }
  101439. });
  101440. Object.defineProperty(exports, "EnumDefaultedMember", {
  101441. enumerable: true,
  101442. get: function() {
  101443. return _index.enumDefaultedMember;
  101444. }
  101445. });
  101446. Object.defineProperty(exports, "IndexedAccessType", {
  101447. enumerable: true,
  101448. get: function() {
  101449. return _index.indexedAccessType;
  101450. }
  101451. });
  101452. Object.defineProperty(exports, "OptionalIndexedAccessType", {
  101453. enumerable: true,
  101454. get: function() {
  101455. return _index.optionalIndexedAccessType;
  101456. }
  101457. });
  101458. Object.defineProperty(exports, "JSXAttribute", {
  101459. enumerable: true,
  101460. get: function() {
  101461. return _index.jsxAttribute;
  101462. }
  101463. });
  101464. Object.defineProperty(exports, "JSXClosingElement", {
  101465. enumerable: true,
  101466. get: function() {
  101467. return _index.jsxClosingElement;
  101468. }
  101469. });
  101470. Object.defineProperty(exports, "JSXElement", {
  101471. enumerable: true,
  101472. get: function() {
  101473. return _index.jsxElement;
  101474. }
  101475. });
  101476. Object.defineProperty(exports, "JSXEmptyExpression", {
  101477. enumerable: true,
  101478. get: function() {
  101479. return _index.jsxEmptyExpression;
  101480. }
  101481. });
  101482. Object.defineProperty(exports, "JSXExpressionContainer", {
  101483. enumerable: true,
  101484. get: function() {
  101485. return _index.jsxExpressionContainer;
  101486. }
  101487. });
  101488. Object.defineProperty(exports, "JSXSpreadChild", {
  101489. enumerable: true,
  101490. get: function() {
  101491. return _index.jsxSpreadChild;
  101492. }
  101493. });
  101494. Object.defineProperty(exports, "JSXIdentifier", {
  101495. enumerable: true,
  101496. get: function() {
  101497. return _index.jsxIdentifier;
  101498. }
  101499. });
  101500. Object.defineProperty(exports, "JSXMemberExpression", {
  101501. enumerable: true,
  101502. get: function() {
  101503. return _index.jsxMemberExpression;
  101504. }
  101505. });
  101506. Object.defineProperty(exports, "JSXNamespacedName", {
  101507. enumerable: true,
  101508. get: function() {
  101509. return _index.jsxNamespacedName;
  101510. }
  101511. });
  101512. Object.defineProperty(exports, "JSXOpeningElement", {
  101513. enumerable: true,
  101514. get: function() {
  101515. return _index.jsxOpeningElement;
  101516. }
  101517. });
  101518. Object.defineProperty(exports, "JSXSpreadAttribute", {
  101519. enumerable: true,
  101520. get: function() {
  101521. return _index.jsxSpreadAttribute;
  101522. }
  101523. });
  101524. Object.defineProperty(exports, "JSXText", {
  101525. enumerable: true,
  101526. get: function() {
  101527. return _index.jsxText;
  101528. }
  101529. });
  101530. Object.defineProperty(exports, "JSXFragment", {
  101531. enumerable: true,
  101532. get: function() {
  101533. return _index.jsxFragment;
  101534. }
  101535. });
  101536. Object.defineProperty(exports, "JSXOpeningFragment", {
  101537. enumerable: true,
  101538. get: function() {
  101539. return _index.jsxOpeningFragment;
  101540. }
  101541. });
  101542. Object.defineProperty(exports, "JSXClosingFragment", {
  101543. enumerable: true,
  101544. get: function() {
  101545. return _index.jsxClosingFragment;
  101546. }
  101547. });
  101548. Object.defineProperty(exports, "Noop", {
  101549. enumerable: true,
  101550. get: function() {
  101551. return _index.noop;
  101552. }
  101553. });
  101554. Object.defineProperty(exports, "Placeholder", {
  101555. enumerable: true,
  101556. get: function() {
  101557. return _index.placeholder;
  101558. }
  101559. });
  101560. Object.defineProperty(exports, "V8IntrinsicIdentifier", {
  101561. enumerable: true,
  101562. get: function() {
  101563. return _index.v8IntrinsicIdentifier;
  101564. }
  101565. });
  101566. Object.defineProperty(exports, "ArgumentPlaceholder", {
  101567. enumerable: true,
  101568. get: function() {
  101569. return _index.argumentPlaceholder;
  101570. }
  101571. });
  101572. Object.defineProperty(exports, "BindExpression", {
  101573. enumerable: true,
  101574. get: function() {
  101575. return _index.bindExpression;
  101576. }
  101577. });
  101578. Object.defineProperty(exports, "ClassProperty", {
  101579. enumerable: true,
  101580. get: function() {
  101581. return _index.classProperty;
  101582. }
  101583. });
  101584. Object.defineProperty(exports, "PipelineTopicExpression", {
  101585. enumerable: true,
  101586. get: function() {
  101587. return _index.pipelineTopicExpression;
  101588. }
  101589. });
  101590. Object.defineProperty(exports, "PipelineBareFunction", {
  101591. enumerable: true,
  101592. get: function() {
  101593. return _index.pipelineBareFunction;
  101594. }
  101595. });
  101596. Object.defineProperty(exports, "PipelinePrimaryTopicReference", {
  101597. enumerable: true,
  101598. get: function() {
  101599. return _index.pipelinePrimaryTopicReference;
  101600. }
  101601. });
  101602. Object.defineProperty(exports, "ClassPrivateProperty", {
  101603. enumerable: true,
  101604. get: function() {
  101605. return _index.classPrivateProperty;
  101606. }
  101607. });
  101608. Object.defineProperty(exports, "ClassPrivateMethod", {
  101609. enumerable: true,
  101610. get: function() {
  101611. return _index.classPrivateMethod;
  101612. }
  101613. });
  101614. Object.defineProperty(exports, "ImportAttribute", {
  101615. enumerable: true,
  101616. get: function() {
  101617. return _index.importAttribute;
  101618. }
  101619. });
  101620. Object.defineProperty(exports, "Decorator", {
  101621. enumerable: true,
  101622. get: function() {
  101623. return _index.decorator;
  101624. }
  101625. });
  101626. Object.defineProperty(exports, "DoExpression", {
  101627. enumerable: true,
  101628. get: function() {
  101629. return _index.doExpression;
  101630. }
  101631. });
  101632. Object.defineProperty(exports, "ExportDefaultSpecifier", {
  101633. enumerable: true,
  101634. get: function() {
  101635. return _index.exportDefaultSpecifier;
  101636. }
  101637. });
  101638. Object.defineProperty(exports, "PrivateName", {
  101639. enumerable: true,
  101640. get: function() {
  101641. return _index.privateName;
  101642. }
  101643. });
  101644. Object.defineProperty(exports, "RecordExpression", {
  101645. enumerable: true,
  101646. get: function() {
  101647. return _index.recordExpression;
  101648. }
  101649. });
  101650. Object.defineProperty(exports, "TupleExpression", {
  101651. enumerable: true,
  101652. get: function() {
  101653. return _index.tupleExpression;
  101654. }
  101655. });
  101656. Object.defineProperty(exports, "DecimalLiteral", {
  101657. enumerable: true,
  101658. get: function() {
  101659. return _index.decimalLiteral;
  101660. }
  101661. });
  101662. Object.defineProperty(exports, "StaticBlock", {
  101663. enumerable: true,
  101664. get: function() {
  101665. return _index.staticBlock;
  101666. }
  101667. });
  101668. Object.defineProperty(exports, "ModuleExpression", {
  101669. enumerable: true,
  101670. get: function() {
  101671. return _index.moduleExpression;
  101672. }
  101673. });
  101674. Object.defineProperty(exports, "TSParameterProperty", {
  101675. enumerable: true,
  101676. get: function() {
  101677. return _index.tsParameterProperty;
  101678. }
  101679. });
  101680. Object.defineProperty(exports, "TSDeclareFunction", {
  101681. enumerable: true,
  101682. get: function() {
  101683. return _index.tsDeclareFunction;
  101684. }
  101685. });
  101686. Object.defineProperty(exports, "TSDeclareMethod", {
  101687. enumerable: true,
  101688. get: function() {
  101689. return _index.tsDeclareMethod;
  101690. }
  101691. });
  101692. Object.defineProperty(exports, "TSQualifiedName", {
  101693. enumerable: true,
  101694. get: function() {
  101695. return _index.tsQualifiedName;
  101696. }
  101697. });
  101698. Object.defineProperty(exports, "TSCallSignatureDeclaration", {
  101699. enumerable: true,
  101700. get: function() {
  101701. return _index.tsCallSignatureDeclaration;
  101702. }
  101703. });
  101704. Object.defineProperty(exports, "TSConstructSignatureDeclaration", {
  101705. enumerable: true,
  101706. get: function() {
  101707. return _index.tsConstructSignatureDeclaration;
  101708. }
  101709. });
  101710. Object.defineProperty(exports, "TSPropertySignature", {
  101711. enumerable: true,
  101712. get: function() {
  101713. return _index.tsPropertySignature;
  101714. }
  101715. });
  101716. Object.defineProperty(exports, "TSMethodSignature", {
  101717. enumerable: true,
  101718. get: function() {
  101719. return _index.tsMethodSignature;
  101720. }
  101721. });
  101722. Object.defineProperty(exports, "TSIndexSignature", {
  101723. enumerable: true,
  101724. get: function() {
  101725. return _index.tsIndexSignature;
  101726. }
  101727. });
  101728. Object.defineProperty(exports, "TSAnyKeyword", {
  101729. enumerable: true,
  101730. get: function() {
  101731. return _index.tsAnyKeyword;
  101732. }
  101733. });
  101734. Object.defineProperty(exports, "TSBooleanKeyword", {
  101735. enumerable: true,
  101736. get: function() {
  101737. return _index.tsBooleanKeyword;
  101738. }
  101739. });
  101740. Object.defineProperty(exports, "TSBigIntKeyword", {
  101741. enumerable: true,
  101742. get: function() {
  101743. return _index.tsBigIntKeyword;
  101744. }
  101745. });
  101746. Object.defineProperty(exports, "TSIntrinsicKeyword", {
  101747. enumerable: true,
  101748. get: function() {
  101749. return _index.tsIntrinsicKeyword;
  101750. }
  101751. });
  101752. Object.defineProperty(exports, "TSNeverKeyword", {
  101753. enumerable: true,
  101754. get: function() {
  101755. return _index.tsNeverKeyword;
  101756. }
  101757. });
  101758. Object.defineProperty(exports, "TSNullKeyword", {
  101759. enumerable: true,
  101760. get: function() {
  101761. return _index.tsNullKeyword;
  101762. }
  101763. });
  101764. Object.defineProperty(exports, "TSNumberKeyword", {
  101765. enumerable: true,
  101766. get: function() {
  101767. return _index.tsNumberKeyword;
  101768. }
  101769. });
  101770. Object.defineProperty(exports, "TSObjectKeyword", {
  101771. enumerable: true,
  101772. get: function() {
  101773. return _index.tsObjectKeyword;
  101774. }
  101775. });
  101776. Object.defineProperty(exports, "TSStringKeyword", {
  101777. enumerable: true,
  101778. get: function() {
  101779. return _index.tsStringKeyword;
  101780. }
  101781. });
  101782. Object.defineProperty(exports, "TSSymbolKeyword", {
  101783. enumerable: true,
  101784. get: function() {
  101785. return _index.tsSymbolKeyword;
  101786. }
  101787. });
  101788. Object.defineProperty(exports, "TSUndefinedKeyword", {
  101789. enumerable: true,
  101790. get: function() {
  101791. return _index.tsUndefinedKeyword;
  101792. }
  101793. });
  101794. Object.defineProperty(exports, "TSUnknownKeyword", {
  101795. enumerable: true,
  101796. get: function() {
  101797. return _index.tsUnknownKeyword;
  101798. }
  101799. });
  101800. Object.defineProperty(exports, "TSVoidKeyword", {
  101801. enumerable: true,
  101802. get: function() {
  101803. return _index.tsVoidKeyword;
  101804. }
  101805. });
  101806. Object.defineProperty(exports, "TSThisType", {
  101807. enumerable: true,
  101808. get: function() {
  101809. return _index.tsThisType;
  101810. }
  101811. });
  101812. Object.defineProperty(exports, "TSFunctionType", {
  101813. enumerable: true,
  101814. get: function() {
  101815. return _index.tsFunctionType;
  101816. }
  101817. });
  101818. Object.defineProperty(exports, "TSConstructorType", {
  101819. enumerable: true,
  101820. get: function() {
  101821. return _index.tsConstructorType;
  101822. }
  101823. });
  101824. Object.defineProperty(exports, "TSTypeReference", {
  101825. enumerable: true,
  101826. get: function() {
  101827. return _index.tsTypeReference;
  101828. }
  101829. });
  101830. Object.defineProperty(exports, "TSTypePredicate", {
  101831. enumerable: true,
  101832. get: function() {
  101833. return _index.tsTypePredicate;
  101834. }
  101835. });
  101836. Object.defineProperty(exports, "TSTypeQuery", {
  101837. enumerable: true,
  101838. get: function() {
  101839. return _index.tsTypeQuery;
  101840. }
  101841. });
  101842. Object.defineProperty(exports, "TSTypeLiteral", {
  101843. enumerable: true,
  101844. get: function() {
  101845. return _index.tsTypeLiteral;
  101846. }
  101847. });
  101848. Object.defineProperty(exports, "TSArrayType", {
  101849. enumerable: true,
  101850. get: function() {
  101851. return _index.tsArrayType;
  101852. }
  101853. });
  101854. Object.defineProperty(exports, "TSTupleType", {
  101855. enumerable: true,
  101856. get: function() {
  101857. return _index.tsTupleType;
  101858. }
  101859. });
  101860. Object.defineProperty(exports, "TSOptionalType", {
  101861. enumerable: true,
  101862. get: function() {
  101863. return _index.tsOptionalType;
  101864. }
  101865. });
  101866. Object.defineProperty(exports, "TSRestType", {
  101867. enumerable: true,
  101868. get: function() {
  101869. return _index.tsRestType;
  101870. }
  101871. });
  101872. Object.defineProperty(exports, "TSNamedTupleMember", {
  101873. enumerable: true,
  101874. get: function() {
  101875. return _index.tsNamedTupleMember;
  101876. }
  101877. });
  101878. Object.defineProperty(exports, "TSUnionType", {
  101879. enumerable: true,
  101880. get: function() {
  101881. return _index.tsUnionType;
  101882. }
  101883. });
  101884. Object.defineProperty(exports, "TSIntersectionType", {
  101885. enumerable: true,
  101886. get: function() {
  101887. return _index.tsIntersectionType;
  101888. }
  101889. });
  101890. Object.defineProperty(exports, "TSConditionalType", {
  101891. enumerable: true,
  101892. get: function() {
  101893. return _index.tsConditionalType;
  101894. }
  101895. });
  101896. Object.defineProperty(exports, "TSInferType", {
  101897. enumerable: true,
  101898. get: function() {
  101899. return _index.tsInferType;
  101900. }
  101901. });
  101902. Object.defineProperty(exports, "TSParenthesizedType", {
  101903. enumerable: true,
  101904. get: function() {
  101905. return _index.tsParenthesizedType;
  101906. }
  101907. });
  101908. Object.defineProperty(exports, "TSTypeOperator", {
  101909. enumerable: true,
  101910. get: function() {
  101911. return _index.tsTypeOperator;
  101912. }
  101913. });
  101914. Object.defineProperty(exports, "TSIndexedAccessType", {
  101915. enumerable: true,
  101916. get: function() {
  101917. return _index.tsIndexedAccessType;
  101918. }
  101919. });
  101920. Object.defineProperty(exports, "TSMappedType", {
  101921. enumerable: true,
  101922. get: function() {
  101923. return _index.tsMappedType;
  101924. }
  101925. });
  101926. Object.defineProperty(exports, "TSLiteralType", {
  101927. enumerable: true,
  101928. get: function() {
  101929. return _index.tsLiteralType;
  101930. }
  101931. });
  101932. Object.defineProperty(exports, "TSExpressionWithTypeArguments", {
  101933. enumerable: true,
  101934. get: function() {
  101935. return _index.tsExpressionWithTypeArguments;
  101936. }
  101937. });
  101938. Object.defineProperty(exports, "TSInterfaceDeclaration", {
  101939. enumerable: true,
  101940. get: function() {
  101941. return _index.tsInterfaceDeclaration;
  101942. }
  101943. });
  101944. Object.defineProperty(exports, "TSInterfaceBody", {
  101945. enumerable: true,
  101946. get: function() {
  101947. return _index.tsInterfaceBody;
  101948. }
  101949. });
  101950. Object.defineProperty(exports, "TSTypeAliasDeclaration", {
  101951. enumerable: true,
  101952. get: function() {
  101953. return _index.tsTypeAliasDeclaration;
  101954. }
  101955. });
  101956. Object.defineProperty(exports, "TSAsExpression", {
  101957. enumerable: true,
  101958. get: function() {
  101959. return _index.tsAsExpression;
  101960. }
  101961. });
  101962. Object.defineProperty(exports, "TSTypeAssertion", {
  101963. enumerable: true,
  101964. get: function() {
  101965. return _index.tsTypeAssertion;
  101966. }
  101967. });
  101968. Object.defineProperty(exports, "TSEnumDeclaration", {
  101969. enumerable: true,
  101970. get: function() {
  101971. return _index.tsEnumDeclaration;
  101972. }
  101973. });
  101974. Object.defineProperty(exports, "TSEnumMember", {
  101975. enumerable: true,
  101976. get: function() {
  101977. return _index.tsEnumMember;
  101978. }
  101979. });
  101980. Object.defineProperty(exports, "TSModuleDeclaration", {
  101981. enumerable: true,
  101982. get: function() {
  101983. return _index.tsModuleDeclaration;
  101984. }
  101985. });
  101986. Object.defineProperty(exports, "TSModuleBlock", {
  101987. enumerable: true,
  101988. get: function() {
  101989. return _index.tsModuleBlock;
  101990. }
  101991. });
  101992. Object.defineProperty(exports, "TSImportType", {
  101993. enumerable: true,
  101994. get: function() {
  101995. return _index.tsImportType;
  101996. }
  101997. });
  101998. Object.defineProperty(exports, "TSImportEqualsDeclaration", {
  101999. enumerable: true,
  102000. get: function() {
  102001. return _index.tsImportEqualsDeclaration;
  102002. }
  102003. });
  102004. Object.defineProperty(exports, "TSExternalModuleReference", {
  102005. enumerable: true,
  102006. get: function() {
  102007. return _index.tsExternalModuleReference;
  102008. }
  102009. });
  102010. Object.defineProperty(exports, "TSNonNullExpression", {
  102011. enumerable: true,
  102012. get: function() {
  102013. return _index.tsNonNullExpression;
  102014. }
  102015. });
  102016. Object.defineProperty(exports, "TSExportAssignment", {
  102017. enumerable: true,
  102018. get: function() {
  102019. return _index.tsExportAssignment;
  102020. }
  102021. });
  102022. Object.defineProperty(exports, "TSNamespaceExportDeclaration", {
  102023. enumerable: true,
  102024. get: function() {
  102025. return _index.tsNamespaceExportDeclaration;
  102026. }
  102027. });
  102028. Object.defineProperty(exports, "TSTypeAnnotation", {
  102029. enumerable: true,
  102030. get: function() {
  102031. return _index.tsTypeAnnotation;
  102032. }
  102033. });
  102034. Object.defineProperty(exports, "TSTypeParameterInstantiation", {
  102035. enumerable: true,
  102036. get: function() {
  102037. return _index.tsTypeParameterInstantiation;
  102038. }
  102039. });
  102040. Object.defineProperty(exports, "TSTypeParameterDeclaration", {
  102041. enumerable: true,
  102042. get: function() {
  102043. return _index.tsTypeParameterDeclaration;
  102044. }
  102045. });
  102046. Object.defineProperty(exports, "TSTypeParameter", {
  102047. enumerable: true,
  102048. get: function() {
  102049. return _index.tsTypeParameter;
  102050. }
  102051. });
  102052. Object.defineProperty(exports, "NumberLiteral", {
  102053. enumerable: true,
  102054. get: function() {
  102055. return _index.numberLiteral;
  102056. }
  102057. });
  102058. Object.defineProperty(exports, "RegexLiteral", {
  102059. enumerable: true,
  102060. get: function() {
  102061. return _index.regexLiteral;
  102062. }
  102063. });
  102064. Object.defineProperty(exports, "RestProperty", {
  102065. enumerable: true,
  102066. get: function() {
  102067. return _index.restProperty;
  102068. }
  102069. });
  102070. Object.defineProperty(exports, "SpreadProperty", {
  102071. enumerable: true,
  102072. get: function() {
  102073. return _index.spreadProperty;
  102074. }
  102075. });
  102076. var _index = require_generated17();
  102077. }
  102078. });
  102079. // node_modules/@babel/helper-hoist-variables/node_modules/@babel/types/lib/clone/cloneNode.js
  102080. var require_cloneNode4 = __commonJS({
  102081. "node_modules/@babel/helper-hoist-variables/node_modules/@babel/types/lib/clone/cloneNode.js"(exports) {
  102082. "use strict";
  102083. Object.defineProperty(exports, "__esModule", {
  102084. value: true
  102085. });
  102086. exports.default = cloneNode;
  102087. var _definitions = require_definitions4();
  102088. var _generated = require_generated16();
  102089. var has = Function.call.bind(Object.prototype.hasOwnProperty);
  102090. function cloneIfNode(obj, deep, withoutLoc) {
  102091. if (obj && typeof obj.type === "string") {
  102092. return cloneNode(obj, deep, withoutLoc);
  102093. }
  102094. return obj;
  102095. }
  102096. function cloneIfNodeOrArray(obj, deep, withoutLoc) {
  102097. if (Array.isArray(obj)) {
  102098. return obj.map((node) => cloneIfNode(node, deep, withoutLoc));
  102099. }
  102100. return cloneIfNode(obj, deep, withoutLoc);
  102101. }
  102102. function cloneNode(node, deep = true, withoutLoc = false) {
  102103. if (!node)
  102104. return node;
  102105. const {
  102106. type
  102107. } = node;
  102108. const newNode = {
  102109. type: node.type
  102110. };
  102111. if ((0, _generated.isIdentifier)(node)) {
  102112. newNode.name = node.name;
  102113. if (has(node, "optional") && typeof node.optional === "boolean") {
  102114. newNode.optional = node.optional;
  102115. }
  102116. if (has(node, "typeAnnotation")) {
  102117. newNode.typeAnnotation = deep ? cloneIfNodeOrArray(node.typeAnnotation, true, withoutLoc) : node.typeAnnotation;
  102118. }
  102119. } else if (!has(_definitions.NODE_FIELDS, type)) {
  102120. throw new Error(`Unknown node type: "${type}"`);
  102121. } else {
  102122. for (const field of Object.keys(_definitions.NODE_FIELDS[type])) {
  102123. if (has(node, field)) {
  102124. if (deep) {
  102125. newNode[field] = (0, _generated.isFile)(node) && field === "comments" ? maybeCloneComments(node.comments, deep, withoutLoc) : cloneIfNodeOrArray(node[field], true, withoutLoc);
  102126. } else {
  102127. newNode[field] = node[field];
  102128. }
  102129. }
  102130. }
  102131. }
  102132. if (has(node, "loc")) {
  102133. if (withoutLoc) {
  102134. newNode.loc = null;
  102135. } else {
  102136. newNode.loc = node.loc;
  102137. }
  102138. }
  102139. if (has(node, "leadingComments")) {
  102140. newNode.leadingComments = maybeCloneComments(node.leadingComments, deep, withoutLoc);
  102141. }
  102142. if (has(node, "innerComments")) {
  102143. newNode.innerComments = maybeCloneComments(node.innerComments, deep, withoutLoc);
  102144. }
  102145. if (has(node, "trailingComments")) {
  102146. newNode.trailingComments = maybeCloneComments(node.trailingComments, deep, withoutLoc);
  102147. }
  102148. if (has(node, "extra")) {
  102149. newNode.extra = Object.assign({}, node.extra);
  102150. }
  102151. return newNode;
  102152. }
  102153. function maybeCloneComments(comments, deep, withoutLoc) {
  102154. if (!comments || !deep) {
  102155. return comments;
  102156. }
  102157. return comments.map(({
  102158. type,
  102159. value,
  102160. loc
  102161. }) => {
  102162. if (withoutLoc) {
  102163. return {
  102164. type,
  102165. value,
  102166. loc: null
  102167. };
  102168. }
  102169. return {
  102170. type,
  102171. value,
  102172. loc
  102173. };
  102174. });
  102175. }
  102176. }
  102177. });
  102178. // node_modules/@babel/helper-hoist-variables/node_modules/@babel/types/lib/clone/clone.js
  102179. var require_clone4 = __commonJS({
  102180. "node_modules/@babel/helper-hoist-variables/node_modules/@babel/types/lib/clone/clone.js"(exports) {
  102181. "use strict";
  102182. Object.defineProperty(exports, "__esModule", {
  102183. value: true
  102184. });
  102185. exports.default = clone;
  102186. var _cloneNode = require_cloneNode4();
  102187. function clone(node) {
  102188. return (0, _cloneNode.default)(node, false);
  102189. }
  102190. }
  102191. });
  102192. // node_modules/@babel/helper-hoist-variables/node_modules/@babel/types/lib/clone/cloneDeep.js
  102193. var require_cloneDeep4 = __commonJS({
  102194. "node_modules/@babel/helper-hoist-variables/node_modules/@babel/types/lib/clone/cloneDeep.js"(exports) {
  102195. "use strict";
  102196. Object.defineProperty(exports, "__esModule", {
  102197. value: true
  102198. });
  102199. exports.default = cloneDeep2;
  102200. var _cloneNode = require_cloneNode4();
  102201. function cloneDeep2(node) {
  102202. return (0, _cloneNode.default)(node);
  102203. }
  102204. }
  102205. });
  102206. // node_modules/@babel/helper-hoist-variables/node_modules/@babel/types/lib/clone/cloneDeepWithoutLoc.js
  102207. var require_cloneDeepWithoutLoc4 = __commonJS({
  102208. "node_modules/@babel/helper-hoist-variables/node_modules/@babel/types/lib/clone/cloneDeepWithoutLoc.js"(exports) {
  102209. "use strict";
  102210. Object.defineProperty(exports, "__esModule", {
  102211. value: true
  102212. });
  102213. exports.default = cloneDeepWithoutLoc;
  102214. var _cloneNode = require_cloneNode4();
  102215. function cloneDeepWithoutLoc(node) {
  102216. return (0, _cloneNode.default)(node, true, true);
  102217. }
  102218. }
  102219. });
  102220. // node_modules/@babel/helper-hoist-variables/node_modules/@babel/types/lib/clone/cloneWithoutLoc.js
  102221. var require_cloneWithoutLoc4 = __commonJS({
  102222. "node_modules/@babel/helper-hoist-variables/node_modules/@babel/types/lib/clone/cloneWithoutLoc.js"(exports) {
  102223. "use strict";
  102224. Object.defineProperty(exports, "__esModule", {
  102225. value: true
  102226. });
  102227. exports.default = cloneWithoutLoc;
  102228. var _cloneNode = require_cloneNode4();
  102229. function cloneWithoutLoc(node) {
  102230. return (0, _cloneNode.default)(node, false, true);
  102231. }
  102232. }
  102233. });
  102234. // node_modules/@babel/helper-hoist-variables/node_modules/@babel/types/lib/comments/addComments.js
  102235. var require_addComments4 = __commonJS({
  102236. "node_modules/@babel/helper-hoist-variables/node_modules/@babel/types/lib/comments/addComments.js"(exports) {
  102237. "use strict";
  102238. Object.defineProperty(exports, "__esModule", {
  102239. value: true
  102240. });
  102241. exports.default = addComments;
  102242. function addComments(node, type, comments) {
  102243. if (!comments || !node)
  102244. return node;
  102245. const key = `${type}Comments`;
  102246. if (node[key]) {
  102247. if (type === "leading") {
  102248. node[key] = comments.concat(node[key]);
  102249. } else {
  102250. node[key] = node[key].concat(comments);
  102251. }
  102252. } else {
  102253. node[key] = comments;
  102254. }
  102255. return node;
  102256. }
  102257. }
  102258. });
  102259. // node_modules/@babel/helper-hoist-variables/node_modules/@babel/types/lib/comments/addComment.js
  102260. var require_addComment4 = __commonJS({
  102261. "node_modules/@babel/helper-hoist-variables/node_modules/@babel/types/lib/comments/addComment.js"(exports) {
  102262. "use strict";
  102263. Object.defineProperty(exports, "__esModule", {
  102264. value: true
  102265. });
  102266. exports.default = addComment;
  102267. var _addComments = require_addComments4();
  102268. function addComment(node, type, content3, line) {
  102269. return (0, _addComments.default)(node, type, [{
  102270. type: line ? "CommentLine" : "CommentBlock",
  102271. value: content3
  102272. }]);
  102273. }
  102274. }
  102275. });
  102276. // node_modules/@babel/helper-hoist-variables/node_modules/@babel/types/lib/utils/inherit.js
  102277. var require_inherit4 = __commonJS({
  102278. "node_modules/@babel/helper-hoist-variables/node_modules/@babel/types/lib/utils/inherit.js"(exports) {
  102279. "use strict";
  102280. Object.defineProperty(exports, "__esModule", {
  102281. value: true
  102282. });
  102283. exports.default = inherit2;
  102284. function inherit2(key, child, parent) {
  102285. if (child && parent) {
  102286. child[key] = Array.from(new Set([].concat(child[key], parent[key]).filter(Boolean)));
  102287. }
  102288. }
  102289. }
  102290. });
  102291. // node_modules/@babel/helper-hoist-variables/node_modules/@babel/types/lib/comments/inheritInnerComments.js
  102292. var require_inheritInnerComments4 = __commonJS({
  102293. "node_modules/@babel/helper-hoist-variables/node_modules/@babel/types/lib/comments/inheritInnerComments.js"(exports) {
  102294. "use strict";
  102295. Object.defineProperty(exports, "__esModule", {
  102296. value: true
  102297. });
  102298. exports.default = inheritInnerComments;
  102299. var _inherit = require_inherit4();
  102300. function inheritInnerComments(child, parent) {
  102301. (0, _inherit.default)("innerComments", child, parent);
  102302. }
  102303. }
  102304. });
  102305. // node_modules/@babel/helper-hoist-variables/node_modules/@babel/types/lib/comments/inheritLeadingComments.js
  102306. var require_inheritLeadingComments4 = __commonJS({
  102307. "node_modules/@babel/helper-hoist-variables/node_modules/@babel/types/lib/comments/inheritLeadingComments.js"(exports) {
  102308. "use strict";
  102309. Object.defineProperty(exports, "__esModule", {
  102310. value: true
  102311. });
  102312. exports.default = inheritLeadingComments;
  102313. var _inherit = require_inherit4();
  102314. function inheritLeadingComments(child, parent) {
  102315. (0, _inherit.default)("leadingComments", child, parent);
  102316. }
  102317. }
  102318. });
  102319. // node_modules/@babel/helper-hoist-variables/node_modules/@babel/types/lib/comments/inheritTrailingComments.js
  102320. var require_inheritTrailingComments4 = __commonJS({
  102321. "node_modules/@babel/helper-hoist-variables/node_modules/@babel/types/lib/comments/inheritTrailingComments.js"(exports) {
  102322. "use strict";
  102323. Object.defineProperty(exports, "__esModule", {
  102324. value: true
  102325. });
  102326. exports.default = inheritTrailingComments;
  102327. var _inherit = require_inherit4();
  102328. function inheritTrailingComments(child, parent) {
  102329. (0, _inherit.default)("trailingComments", child, parent);
  102330. }
  102331. }
  102332. });
  102333. // node_modules/@babel/helper-hoist-variables/node_modules/@babel/types/lib/comments/inheritsComments.js
  102334. var require_inheritsComments4 = __commonJS({
  102335. "node_modules/@babel/helper-hoist-variables/node_modules/@babel/types/lib/comments/inheritsComments.js"(exports) {
  102336. "use strict";
  102337. Object.defineProperty(exports, "__esModule", {
  102338. value: true
  102339. });
  102340. exports.default = inheritsComments;
  102341. var _inheritTrailingComments = require_inheritTrailingComments4();
  102342. var _inheritLeadingComments = require_inheritLeadingComments4();
  102343. var _inheritInnerComments = require_inheritInnerComments4();
  102344. function inheritsComments(child, parent) {
  102345. (0, _inheritTrailingComments.default)(child, parent);
  102346. (0, _inheritLeadingComments.default)(child, parent);
  102347. (0, _inheritInnerComments.default)(child, parent);
  102348. return child;
  102349. }
  102350. }
  102351. });
  102352. // node_modules/@babel/helper-hoist-variables/node_modules/@babel/types/lib/comments/removeComments.js
  102353. var require_removeComments4 = __commonJS({
  102354. "node_modules/@babel/helper-hoist-variables/node_modules/@babel/types/lib/comments/removeComments.js"(exports) {
  102355. "use strict";
  102356. Object.defineProperty(exports, "__esModule", {
  102357. value: true
  102358. });
  102359. exports.default = removeComments;
  102360. var _constants = require_constants4();
  102361. function removeComments(node) {
  102362. _constants.COMMENT_KEYS.forEach((key) => {
  102363. node[key] = null;
  102364. });
  102365. return node;
  102366. }
  102367. }
  102368. });
  102369. // node_modules/@babel/helper-hoist-variables/node_modules/@babel/types/lib/constants/generated/index.js
  102370. var require_generated19 = __commonJS({
  102371. "node_modules/@babel/helper-hoist-variables/node_modules/@babel/types/lib/constants/generated/index.js"(exports) {
  102372. "use strict";
  102373. Object.defineProperty(exports, "__esModule", {
  102374. value: true
  102375. });
  102376. exports.TSBASETYPE_TYPES = exports.TSTYPE_TYPES = exports.TSTYPEELEMENT_TYPES = exports.PRIVATE_TYPES = exports.JSX_TYPES = exports.ENUMMEMBER_TYPES = exports.ENUMBODY_TYPES = exports.FLOWPREDICATE_TYPES = exports.FLOWDECLARATION_TYPES = exports.FLOWBASEANNOTATION_TYPES = exports.FLOWTYPE_TYPES = exports.FLOW_TYPES = exports.MODULESPECIFIER_TYPES = exports.EXPORTDECLARATION_TYPES = exports.MODULEDECLARATION_TYPES = exports.CLASS_TYPES = exports.PATTERN_TYPES = exports.UNARYLIKE_TYPES = exports.PROPERTY_TYPES = exports.OBJECTMEMBER_TYPES = exports.METHOD_TYPES = exports.USERWHITESPACABLE_TYPES = exports.IMMUTABLE_TYPES = exports.LITERAL_TYPES = exports.TSENTITYNAME_TYPES = exports.LVAL_TYPES = exports.PATTERNLIKE_TYPES = exports.DECLARATION_TYPES = exports.PUREISH_TYPES = exports.FUNCTIONPARENT_TYPES = exports.FUNCTION_TYPES = exports.FORXSTATEMENT_TYPES = exports.FOR_TYPES = exports.EXPRESSIONWRAPPER_TYPES = exports.WHILE_TYPES = exports.LOOP_TYPES = exports.CONDITIONAL_TYPES = exports.COMPLETIONSTATEMENT_TYPES = exports.TERMINATORLESS_TYPES = exports.STATEMENT_TYPES = exports.BLOCK_TYPES = exports.BLOCKPARENT_TYPES = exports.SCOPABLE_TYPES = exports.BINARY_TYPES = exports.EXPRESSION_TYPES = void 0;
  102377. var _definitions = require_definitions4();
  102378. var EXPRESSION_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Expression"];
  102379. exports.EXPRESSION_TYPES = EXPRESSION_TYPES;
  102380. var BINARY_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Binary"];
  102381. exports.BINARY_TYPES = BINARY_TYPES;
  102382. var SCOPABLE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Scopable"];
  102383. exports.SCOPABLE_TYPES = SCOPABLE_TYPES;
  102384. var BLOCKPARENT_TYPES = _definitions.FLIPPED_ALIAS_KEYS["BlockParent"];
  102385. exports.BLOCKPARENT_TYPES = BLOCKPARENT_TYPES;
  102386. var BLOCK_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Block"];
  102387. exports.BLOCK_TYPES = BLOCK_TYPES;
  102388. var STATEMENT_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Statement"];
  102389. exports.STATEMENT_TYPES = STATEMENT_TYPES;
  102390. var TERMINATORLESS_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Terminatorless"];
  102391. exports.TERMINATORLESS_TYPES = TERMINATORLESS_TYPES;
  102392. var COMPLETIONSTATEMENT_TYPES = _definitions.FLIPPED_ALIAS_KEYS["CompletionStatement"];
  102393. exports.COMPLETIONSTATEMENT_TYPES = COMPLETIONSTATEMENT_TYPES;
  102394. var CONDITIONAL_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Conditional"];
  102395. exports.CONDITIONAL_TYPES = CONDITIONAL_TYPES;
  102396. var LOOP_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Loop"];
  102397. exports.LOOP_TYPES = LOOP_TYPES;
  102398. var WHILE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["While"];
  102399. exports.WHILE_TYPES = WHILE_TYPES;
  102400. var EXPRESSIONWRAPPER_TYPES = _definitions.FLIPPED_ALIAS_KEYS["ExpressionWrapper"];
  102401. exports.EXPRESSIONWRAPPER_TYPES = EXPRESSIONWRAPPER_TYPES;
  102402. var FOR_TYPES = _definitions.FLIPPED_ALIAS_KEYS["For"];
  102403. exports.FOR_TYPES = FOR_TYPES;
  102404. var FORXSTATEMENT_TYPES = _definitions.FLIPPED_ALIAS_KEYS["ForXStatement"];
  102405. exports.FORXSTATEMENT_TYPES = FORXSTATEMENT_TYPES;
  102406. var FUNCTION_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Function"];
  102407. exports.FUNCTION_TYPES = FUNCTION_TYPES;
  102408. var FUNCTIONPARENT_TYPES = _definitions.FLIPPED_ALIAS_KEYS["FunctionParent"];
  102409. exports.FUNCTIONPARENT_TYPES = FUNCTIONPARENT_TYPES;
  102410. var PUREISH_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Pureish"];
  102411. exports.PUREISH_TYPES = PUREISH_TYPES;
  102412. var DECLARATION_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Declaration"];
  102413. exports.DECLARATION_TYPES = DECLARATION_TYPES;
  102414. var PATTERNLIKE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["PatternLike"];
  102415. exports.PATTERNLIKE_TYPES = PATTERNLIKE_TYPES;
  102416. var LVAL_TYPES = _definitions.FLIPPED_ALIAS_KEYS["LVal"];
  102417. exports.LVAL_TYPES = LVAL_TYPES;
  102418. var TSENTITYNAME_TYPES = _definitions.FLIPPED_ALIAS_KEYS["TSEntityName"];
  102419. exports.TSENTITYNAME_TYPES = TSENTITYNAME_TYPES;
  102420. var LITERAL_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Literal"];
  102421. exports.LITERAL_TYPES = LITERAL_TYPES;
  102422. var IMMUTABLE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Immutable"];
  102423. exports.IMMUTABLE_TYPES = IMMUTABLE_TYPES;
  102424. var USERWHITESPACABLE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["UserWhitespacable"];
  102425. exports.USERWHITESPACABLE_TYPES = USERWHITESPACABLE_TYPES;
  102426. var METHOD_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Method"];
  102427. exports.METHOD_TYPES = METHOD_TYPES;
  102428. var OBJECTMEMBER_TYPES = _definitions.FLIPPED_ALIAS_KEYS["ObjectMember"];
  102429. exports.OBJECTMEMBER_TYPES = OBJECTMEMBER_TYPES;
  102430. var PROPERTY_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Property"];
  102431. exports.PROPERTY_TYPES = PROPERTY_TYPES;
  102432. var UNARYLIKE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["UnaryLike"];
  102433. exports.UNARYLIKE_TYPES = UNARYLIKE_TYPES;
  102434. var PATTERN_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Pattern"];
  102435. exports.PATTERN_TYPES = PATTERN_TYPES;
  102436. var CLASS_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Class"];
  102437. exports.CLASS_TYPES = CLASS_TYPES;
  102438. var MODULEDECLARATION_TYPES = _definitions.FLIPPED_ALIAS_KEYS["ModuleDeclaration"];
  102439. exports.MODULEDECLARATION_TYPES = MODULEDECLARATION_TYPES;
  102440. var EXPORTDECLARATION_TYPES = _definitions.FLIPPED_ALIAS_KEYS["ExportDeclaration"];
  102441. exports.EXPORTDECLARATION_TYPES = EXPORTDECLARATION_TYPES;
  102442. var MODULESPECIFIER_TYPES = _definitions.FLIPPED_ALIAS_KEYS["ModuleSpecifier"];
  102443. exports.MODULESPECIFIER_TYPES = MODULESPECIFIER_TYPES;
  102444. var FLOW_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Flow"];
  102445. exports.FLOW_TYPES = FLOW_TYPES;
  102446. var FLOWTYPE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["FlowType"];
  102447. exports.FLOWTYPE_TYPES = FLOWTYPE_TYPES;
  102448. var FLOWBASEANNOTATION_TYPES = _definitions.FLIPPED_ALIAS_KEYS["FlowBaseAnnotation"];
  102449. exports.FLOWBASEANNOTATION_TYPES = FLOWBASEANNOTATION_TYPES;
  102450. var FLOWDECLARATION_TYPES = _definitions.FLIPPED_ALIAS_KEYS["FlowDeclaration"];
  102451. exports.FLOWDECLARATION_TYPES = FLOWDECLARATION_TYPES;
  102452. var FLOWPREDICATE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["FlowPredicate"];
  102453. exports.FLOWPREDICATE_TYPES = FLOWPREDICATE_TYPES;
  102454. var ENUMBODY_TYPES = _definitions.FLIPPED_ALIAS_KEYS["EnumBody"];
  102455. exports.ENUMBODY_TYPES = ENUMBODY_TYPES;
  102456. var ENUMMEMBER_TYPES = _definitions.FLIPPED_ALIAS_KEYS["EnumMember"];
  102457. exports.ENUMMEMBER_TYPES = ENUMMEMBER_TYPES;
  102458. var JSX_TYPES = _definitions.FLIPPED_ALIAS_KEYS["JSX"];
  102459. exports.JSX_TYPES = JSX_TYPES;
  102460. var PRIVATE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Private"];
  102461. exports.PRIVATE_TYPES = PRIVATE_TYPES;
  102462. var TSTYPEELEMENT_TYPES = _definitions.FLIPPED_ALIAS_KEYS["TSTypeElement"];
  102463. exports.TSTYPEELEMENT_TYPES = TSTYPEELEMENT_TYPES;
  102464. var TSTYPE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["TSType"];
  102465. exports.TSTYPE_TYPES = TSTYPE_TYPES;
  102466. var TSBASETYPE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["TSBaseType"];
  102467. exports.TSBASETYPE_TYPES = TSBASETYPE_TYPES;
  102468. }
  102469. });
  102470. // node_modules/@babel/helper-hoist-variables/node_modules/@babel/types/lib/converters/toBlock.js
  102471. var require_toBlock4 = __commonJS({
  102472. "node_modules/@babel/helper-hoist-variables/node_modules/@babel/types/lib/converters/toBlock.js"(exports) {
  102473. "use strict";
  102474. Object.defineProperty(exports, "__esModule", {
  102475. value: true
  102476. });
  102477. exports.default = toBlock;
  102478. var _generated = require_generated16();
  102479. var _generated2 = require_generated17();
  102480. function toBlock(node, parent) {
  102481. if ((0, _generated.isBlockStatement)(node)) {
  102482. return node;
  102483. }
  102484. let blockNodes = [];
  102485. if ((0, _generated.isEmptyStatement)(node)) {
  102486. blockNodes = [];
  102487. } else {
  102488. if (!(0, _generated.isStatement)(node)) {
  102489. if ((0, _generated.isFunction)(parent)) {
  102490. node = (0, _generated2.returnStatement)(node);
  102491. } else {
  102492. node = (0, _generated2.expressionStatement)(node);
  102493. }
  102494. }
  102495. blockNodes = [node];
  102496. }
  102497. return (0, _generated2.blockStatement)(blockNodes);
  102498. }
  102499. }
  102500. });
  102501. // node_modules/@babel/helper-hoist-variables/node_modules/@babel/types/lib/converters/ensureBlock.js
  102502. var require_ensureBlock4 = __commonJS({
  102503. "node_modules/@babel/helper-hoist-variables/node_modules/@babel/types/lib/converters/ensureBlock.js"(exports) {
  102504. "use strict";
  102505. Object.defineProperty(exports, "__esModule", {
  102506. value: true
  102507. });
  102508. exports.default = ensureBlock;
  102509. var _toBlock = require_toBlock4();
  102510. function ensureBlock(node, key = "body") {
  102511. return node[key] = (0, _toBlock.default)(node[key], node);
  102512. }
  102513. }
  102514. });
  102515. // node_modules/@babel/helper-hoist-variables/node_modules/@babel/types/lib/converters/toIdentifier.js
  102516. var require_toIdentifier4 = __commonJS({
  102517. "node_modules/@babel/helper-hoist-variables/node_modules/@babel/types/lib/converters/toIdentifier.js"(exports) {
  102518. "use strict";
  102519. Object.defineProperty(exports, "__esModule", {
  102520. value: true
  102521. });
  102522. exports.default = toIdentifier2;
  102523. var _isValidIdentifier = require_isValidIdentifier4();
  102524. var _helperValidatorIdentifier = require_lib23();
  102525. function toIdentifier2(input) {
  102526. input = input + "";
  102527. let name2 = "";
  102528. for (const c of input) {
  102529. name2 += (0, _helperValidatorIdentifier.isIdentifierChar)(c.codePointAt(0)) ? c : "-";
  102530. }
  102531. name2 = name2.replace(/^[-0-9]+/, "");
  102532. name2 = name2.replace(/[-\s]+(.)?/g, function(match, c) {
  102533. return c ? c.toUpperCase() : "";
  102534. });
  102535. if (!(0, _isValidIdentifier.default)(name2)) {
  102536. name2 = `_${name2}`;
  102537. }
  102538. return name2 || "_";
  102539. }
  102540. }
  102541. });
  102542. // node_modules/@babel/helper-hoist-variables/node_modules/@babel/types/lib/converters/toBindingIdentifierName.js
  102543. var require_toBindingIdentifierName4 = __commonJS({
  102544. "node_modules/@babel/helper-hoist-variables/node_modules/@babel/types/lib/converters/toBindingIdentifierName.js"(exports) {
  102545. "use strict";
  102546. Object.defineProperty(exports, "__esModule", {
  102547. value: true
  102548. });
  102549. exports.default = toBindingIdentifierName;
  102550. var _toIdentifier = require_toIdentifier4();
  102551. function toBindingIdentifierName(name2) {
  102552. name2 = (0, _toIdentifier.default)(name2);
  102553. if (name2 === "eval" || name2 === "arguments")
  102554. name2 = "_" + name2;
  102555. return name2;
  102556. }
  102557. }
  102558. });
  102559. // node_modules/@babel/helper-hoist-variables/node_modules/@babel/types/lib/converters/toComputedKey.js
  102560. var require_toComputedKey4 = __commonJS({
  102561. "node_modules/@babel/helper-hoist-variables/node_modules/@babel/types/lib/converters/toComputedKey.js"(exports) {
  102562. "use strict";
  102563. Object.defineProperty(exports, "__esModule", {
  102564. value: true
  102565. });
  102566. exports.default = toComputedKey;
  102567. var _generated = require_generated16();
  102568. var _generated2 = require_generated17();
  102569. function toComputedKey(node, key = node.key || node.property) {
  102570. if (!node.computed && (0, _generated.isIdentifier)(key))
  102571. key = (0, _generated2.stringLiteral)(key.name);
  102572. return key;
  102573. }
  102574. }
  102575. });
  102576. // node_modules/@babel/helper-hoist-variables/node_modules/@babel/types/lib/converters/toExpression.js
  102577. var require_toExpression4 = __commonJS({
  102578. "node_modules/@babel/helper-hoist-variables/node_modules/@babel/types/lib/converters/toExpression.js"(exports) {
  102579. "use strict";
  102580. Object.defineProperty(exports, "__esModule", {
  102581. value: true
  102582. });
  102583. exports.default = void 0;
  102584. var _generated = require_generated16();
  102585. var _default = toExpression;
  102586. exports.default = _default;
  102587. function toExpression(node) {
  102588. if ((0, _generated.isExpressionStatement)(node)) {
  102589. node = node.expression;
  102590. }
  102591. if ((0, _generated.isExpression)(node)) {
  102592. return node;
  102593. }
  102594. if ((0, _generated.isClass)(node)) {
  102595. node.type = "ClassExpression";
  102596. } else if ((0, _generated.isFunction)(node)) {
  102597. node.type = "FunctionExpression";
  102598. }
  102599. if (!(0, _generated.isExpression)(node)) {
  102600. throw new Error(`cannot turn ${node.type} to an expression`);
  102601. }
  102602. return node;
  102603. }
  102604. }
  102605. });
  102606. // node_modules/@babel/helper-hoist-variables/node_modules/@babel/types/lib/traverse/traverseFast.js
  102607. var require_traverseFast4 = __commonJS({
  102608. "node_modules/@babel/helper-hoist-variables/node_modules/@babel/types/lib/traverse/traverseFast.js"(exports) {
  102609. "use strict";
  102610. Object.defineProperty(exports, "__esModule", {
  102611. value: true
  102612. });
  102613. exports.default = traverseFast;
  102614. var _definitions = require_definitions4();
  102615. function traverseFast(node, enter, opts) {
  102616. if (!node)
  102617. return;
  102618. const keys2 = _definitions.VISITOR_KEYS[node.type];
  102619. if (!keys2)
  102620. return;
  102621. opts = opts || {};
  102622. enter(node, opts);
  102623. for (const key of keys2) {
  102624. const subNode = node[key];
  102625. if (Array.isArray(subNode)) {
  102626. for (const node2 of subNode) {
  102627. traverseFast(node2, enter, opts);
  102628. }
  102629. } else {
  102630. traverseFast(subNode, enter, opts);
  102631. }
  102632. }
  102633. }
  102634. }
  102635. });
  102636. // node_modules/@babel/helper-hoist-variables/node_modules/@babel/types/lib/modifications/removeProperties.js
  102637. var require_removeProperties4 = __commonJS({
  102638. "node_modules/@babel/helper-hoist-variables/node_modules/@babel/types/lib/modifications/removeProperties.js"(exports) {
  102639. "use strict";
  102640. Object.defineProperty(exports, "__esModule", {
  102641. value: true
  102642. });
  102643. exports.default = removeProperties;
  102644. var _constants = require_constants4();
  102645. var CLEAR_KEYS = ["tokens", "start", "end", "loc", "raw", "rawValue"];
  102646. var CLEAR_KEYS_PLUS_COMMENTS = _constants.COMMENT_KEYS.concat(["comments"]).concat(CLEAR_KEYS);
  102647. function removeProperties(node, opts = {}) {
  102648. const map = opts.preserveComments ? CLEAR_KEYS : CLEAR_KEYS_PLUS_COMMENTS;
  102649. for (const key of map) {
  102650. if (node[key] != null)
  102651. node[key] = void 0;
  102652. }
  102653. for (const key of Object.keys(node)) {
  102654. if (key[0] === "_" && node[key] != null)
  102655. node[key] = void 0;
  102656. }
  102657. const symbols = Object.getOwnPropertySymbols(node);
  102658. for (const sym of symbols) {
  102659. node[sym] = null;
  102660. }
  102661. }
  102662. }
  102663. });
  102664. // node_modules/@babel/helper-hoist-variables/node_modules/@babel/types/lib/modifications/removePropertiesDeep.js
  102665. var require_removePropertiesDeep4 = __commonJS({
  102666. "node_modules/@babel/helper-hoist-variables/node_modules/@babel/types/lib/modifications/removePropertiesDeep.js"(exports) {
  102667. "use strict";
  102668. Object.defineProperty(exports, "__esModule", {
  102669. value: true
  102670. });
  102671. exports.default = removePropertiesDeep;
  102672. var _traverseFast = require_traverseFast4();
  102673. var _removeProperties = require_removeProperties4();
  102674. function removePropertiesDeep(tree, opts) {
  102675. (0, _traverseFast.default)(tree, _removeProperties.default, opts);
  102676. return tree;
  102677. }
  102678. }
  102679. });
  102680. // node_modules/@babel/helper-hoist-variables/node_modules/@babel/types/lib/converters/toKeyAlias.js
  102681. var require_toKeyAlias4 = __commonJS({
  102682. "node_modules/@babel/helper-hoist-variables/node_modules/@babel/types/lib/converters/toKeyAlias.js"(exports) {
  102683. "use strict";
  102684. Object.defineProperty(exports, "__esModule", {
  102685. value: true
  102686. });
  102687. exports.default = toKeyAlias;
  102688. var _generated = require_generated16();
  102689. var _cloneNode = require_cloneNode4();
  102690. var _removePropertiesDeep = require_removePropertiesDeep4();
  102691. function toKeyAlias(node, key = node.key) {
  102692. let alias;
  102693. if (node.kind === "method") {
  102694. return toKeyAlias.increment() + "";
  102695. } else if ((0, _generated.isIdentifier)(key)) {
  102696. alias = key.name;
  102697. } else if ((0, _generated.isStringLiteral)(key)) {
  102698. alias = JSON.stringify(key.value);
  102699. } else {
  102700. alias = JSON.stringify((0, _removePropertiesDeep.default)((0, _cloneNode.default)(key)));
  102701. }
  102702. if (node.computed) {
  102703. alias = `[${alias}]`;
  102704. }
  102705. if (node.static) {
  102706. alias = `static:${alias}`;
  102707. }
  102708. return alias;
  102709. }
  102710. toKeyAlias.uid = 0;
  102711. toKeyAlias.increment = function() {
  102712. if (toKeyAlias.uid >= Number.MAX_SAFE_INTEGER) {
  102713. return toKeyAlias.uid = 0;
  102714. } else {
  102715. return toKeyAlias.uid++;
  102716. }
  102717. };
  102718. }
  102719. });
  102720. // node_modules/@babel/helper-hoist-variables/node_modules/@babel/types/lib/retrievers/getBindingIdentifiers.js
  102721. var require_getBindingIdentifiers4 = __commonJS({
  102722. "node_modules/@babel/helper-hoist-variables/node_modules/@babel/types/lib/retrievers/getBindingIdentifiers.js"(exports) {
  102723. "use strict";
  102724. Object.defineProperty(exports, "__esModule", {
  102725. value: true
  102726. });
  102727. exports.default = getBindingIdentifiers;
  102728. var _generated = require_generated16();
  102729. function getBindingIdentifiers(node, duplicates, outerOnly) {
  102730. let search2 = [].concat(node);
  102731. const ids = /* @__PURE__ */ Object.create(null);
  102732. while (search2.length) {
  102733. const id = search2.shift();
  102734. if (!id)
  102735. continue;
  102736. const keys2 = getBindingIdentifiers.keys[id.type];
  102737. if ((0, _generated.isIdentifier)(id)) {
  102738. if (duplicates) {
  102739. const _ids = ids[id.name] = ids[id.name] || [];
  102740. _ids.push(id);
  102741. } else {
  102742. ids[id.name] = id;
  102743. }
  102744. continue;
  102745. }
  102746. if ((0, _generated.isExportDeclaration)(id) && !(0, _generated.isExportAllDeclaration)(id)) {
  102747. if ((0, _generated.isDeclaration)(id.declaration)) {
  102748. search2.push(id.declaration);
  102749. }
  102750. continue;
  102751. }
  102752. if (outerOnly) {
  102753. if ((0, _generated.isFunctionDeclaration)(id)) {
  102754. search2.push(id.id);
  102755. continue;
  102756. }
  102757. if ((0, _generated.isFunctionExpression)(id)) {
  102758. continue;
  102759. }
  102760. }
  102761. if (keys2) {
  102762. for (let i = 0; i < keys2.length; i++) {
  102763. const key = keys2[i];
  102764. if (id[key]) {
  102765. search2 = search2.concat(id[key]);
  102766. }
  102767. }
  102768. }
  102769. }
  102770. return ids;
  102771. }
  102772. getBindingIdentifiers.keys = {
  102773. DeclareClass: ["id"],
  102774. DeclareFunction: ["id"],
  102775. DeclareModule: ["id"],
  102776. DeclareVariable: ["id"],
  102777. DeclareInterface: ["id"],
  102778. DeclareTypeAlias: ["id"],
  102779. DeclareOpaqueType: ["id"],
  102780. InterfaceDeclaration: ["id"],
  102781. TypeAlias: ["id"],
  102782. OpaqueType: ["id"],
  102783. CatchClause: ["param"],
  102784. LabeledStatement: ["label"],
  102785. UnaryExpression: ["argument"],
  102786. AssignmentExpression: ["left"],
  102787. ImportSpecifier: ["local"],
  102788. ImportNamespaceSpecifier: ["local"],
  102789. ImportDefaultSpecifier: ["local"],
  102790. ImportDeclaration: ["specifiers"],
  102791. ExportSpecifier: ["exported"],
  102792. ExportNamespaceSpecifier: ["exported"],
  102793. ExportDefaultSpecifier: ["exported"],
  102794. FunctionDeclaration: ["id", "params"],
  102795. FunctionExpression: ["id", "params"],
  102796. ArrowFunctionExpression: ["params"],
  102797. ObjectMethod: ["params"],
  102798. ClassMethod: ["params"],
  102799. ForInStatement: ["left"],
  102800. ForOfStatement: ["left"],
  102801. ClassDeclaration: ["id"],
  102802. ClassExpression: ["id"],
  102803. RestElement: ["argument"],
  102804. UpdateExpression: ["argument"],
  102805. ObjectProperty: ["value"],
  102806. AssignmentPattern: ["left"],
  102807. ArrayPattern: ["elements"],
  102808. ObjectPattern: ["properties"],
  102809. VariableDeclaration: ["declarations"],
  102810. VariableDeclarator: ["id"]
  102811. };
  102812. }
  102813. });
  102814. // node_modules/@babel/helper-hoist-variables/node_modules/@babel/types/lib/converters/gatherSequenceExpressions.js
  102815. var require_gatherSequenceExpressions4 = __commonJS({
  102816. "node_modules/@babel/helper-hoist-variables/node_modules/@babel/types/lib/converters/gatherSequenceExpressions.js"(exports) {
  102817. "use strict";
  102818. Object.defineProperty(exports, "__esModule", {
  102819. value: true
  102820. });
  102821. exports.default = gatherSequenceExpressions;
  102822. var _getBindingIdentifiers = require_getBindingIdentifiers4();
  102823. var _generated = require_generated16();
  102824. var _generated2 = require_generated17();
  102825. var _cloneNode = require_cloneNode4();
  102826. function gatherSequenceExpressions(nodes, scope, declars) {
  102827. const exprs = [];
  102828. let ensureLastUndefined = true;
  102829. for (const node of nodes) {
  102830. if (!(0, _generated.isEmptyStatement)(node)) {
  102831. ensureLastUndefined = false;
  102832. }
  102833. if ((0, _generated.isExpression)(node)) {
  102834. exprs.push(node);
  102835. } else if ((0, _generated.isExpressionStatement)(node)) {
  102836. exprs.push(node.expression);
  102837. } else if ((0, _generated.isVariableDeclaration)(node)) {
  102838. if (node.kind !== "var")
  102839. return;
  102840. for (const declar of node.declarations) {
  102841. const bindings = (0, _getBindingIdentifiers.default)(declar);
  102842. for (const key of Object.keys(bindings)) {
  102843. declars.push({
  102844. kind: node.kind,
  102845. id: (0, _cloneNode.default)(bindings[key])
  102846. });
  102847. }
  102848. if (declar.init) {
  102849. exprs.push((0, _generated2.assignmentExpression)("=", declar.id, declar.init));
  102850. }
  102851. }
  102852. ensureLastUndefined = true;
  102853. } else if ((0, _generated.isIfStatement)(node)) {
  102854. const consequent = node.consequent ? gatherSequenceExpressions([node.consequent], scope, declars) : scope.buildUndefinedNode();
  102855. const alternate = node.alternate ? gatherSequenceExpressions([node.alternate], scope, declars) : scope.buildUndefinedNode();
  102856. if (!consequent || !alternate)
  102857. return;
  102858. exprs.push((0, _generated2.conditionalExpression)(node.test, consequent, alternate));
  102859. } else if ((0, _generated.isBlockStatement)(node)) {
  102860. const body = gatherSequenceExpressions(node.body, scope, declars);
  102861. if (!body)
  102862. return;
  102863. exprs.push(body);
  102864. } else if ((0, _generated.isEmptyStatement)(node)) {
  102865. if (nodes.indexOf(node) === 0) {
  102866. ensureLastUndefined = true;
  102867. }
  102868. } else {
  102869. return;
  102870. }
  102871. }
  102872. if (ensureLastUndefined) {
  102873. exprs.push(scope.buildUndefinedNode());
  102874. }
  102875. if (exprs.length === 1) {
  102876. return exprs[0];
  102877. } else {
  102878. return (0, _generated2.sequenceExpression)(exprs);
  102879. }
  102880. }
  102881. }
  102882. });
  102883. // node_modules/@babel/helper-hoist-variables/node_modules/@babel/types/lib/converters/toSequenceExpression.js
  102884. var require_toSequenceExpression4 = __commonJS({
  102885. "node_modules/@babel/helper-hoist-variables/node_modules/@babel/types/lib/converters/toSequenceExpression.js"(exports) {
  102886. "use strict";
  102887. Object.defineProperty(exports, "__esModule", {
  102888. value: true
  102889. });
  102890. exports.default = toSequenceExpression;
  102891. var _gatherSequenceExpressions = require_gatherSequenceExpressions4();
  102892. function toSequenceExpression(nodes, scope) {
  102893. if (!(nodes != null && nodes.length))
  102894. return;
  102895. const declars = [];
  102896. const result = (0, _gatherSequenceExpressions.default)(nodes, scope, declars);
  102897. if (!result)
  102898. return;
  102899. for (const declar of declars) {
  102900. scope.push(declar);
  102901. }
  102902. return result;
  102903. }
  102904. }
  102905. });
  102906. // node_modules/@babel/helper-hoist-variables/node_modules/@babel/types/lib/converters/toStatement.js
  102907. var require_toStatement4 = __commonJS({
  102908. "node_modules/@babel/helper-hoist-variables/node_modules/@babel/types/lib/converters/toStatement.js"(exports) {
  102909. "use strict";
  102910. Object.defineProperty(exports, "__esModule", {
  102911. value: true
  102912. });
  102913. exports.default = void 0;
  102914. var _generated = require_generated16();
  102915. var _generated2 = require_generated17();
  102916. var _default = toStatement;
  102917. exports.default = _default;
  102918. function toStatement(node, ignore3) {
  102919. if ((0, _generated.isStatement)(node)) {
  102920. return node;
  102921. }
  102922. let mustHaveId = false;
  102923. let newType;
  102924. if ((0, _generated.isClass)(node)) {
  102925. mustHaveId = true;
  102926. newType = "ClassDeclaration";
  102927. } else if ((0, _generated.isFunction)(node)) {
  102928. mustHaveId = true;
  102929. newType = "FunctionDeclaration";
  102930. } else if ((0, _generated.isAssignmentExpression)(node)) {
  102931. return (0, _generated2.expressionStatement)(node);
  102932. }
  102933. if (mustHaveId && !node.id) {
  102934. newType = false;
  102935. }
  102936. if (!newType) {
  102937. if (ignore3) {
  102938. return false;
  102939. } else {
  102940. throw new Error(`cannot turn ${node.type} to a statement`);
  102941. }
  102942. }
  102943. node.type = newType;
  102944. return node;
  102945. }
  102946. }
  102947. });
  102948. // node_modules/@babel/helper-hoist-variables/node_modules/@babel/types/lib/converters/valueToNode.js
  102949. var require_valueToNode4 = __commonJS({
  102950. "node_modules/@babel/helper-hoist-variables/node_modules/@babel/types/lib/converters/valueToNode.js"(exports) {
  102951. "use strict";
  102952. Object.defineProperty(exports, "__esModule", {
  102953. value: true
  102954. });
  102955. exports.default = void 0;
  102956. var _isValidIdentifier = require_isValidIdentifier4();
  102957. var _generated = require_generated17();
  102958. var _default = valueToNode;
  102959. exports.default = _default;
  102960. var objectToString = Function.call.bind(Object.prototype.toString);
  102961. function isRegExp(value) {
  102962. return objectToString(value) === "[object RegExp]";
  102963. }
  102964. function isPlainObject2(value) {
  102965. if (typeof value !== "object" || value === null || Object.prototype.toString.call(value) !== "[object Object]") {
  102966. return false;
  102967. }
  102968. const proto = Object.getPrototypeOf(value);
  102969. return proto === null || Object.getPrototypeOf(proto) === null;
  102970. }
  102971. function valueToNode(value) {
  102972. if (value === void 0) {
  102973. return (0, _generated.identifier)("undefined");
  102974. }
  102975. if (value === true || value === false) {
  102976. return (0, _generated.booleanLiteral)(value);
  102977. }
  102978. if (value === null) {
  102979. return (0, _generated.nullLiteral)();
  102980. }
  102981. if (typeof value === "string") {
  102982. return (0, _generated.stringLiteral)(value);
  102983. }
  102984. if (typeof value === "number") {
  102985. let result;
  102986. if (Number.isFinite(value)) {
  102987. result = (0, _generated.numericLiteral)(Math.abs(value));
  102988. } else {
  102989. let numerator;
  102990. if (Number.isNaN(value)) {
  102991. numerator = (0, _generated.numericLiteral)(0);
  102992. } else {
  102993. numerator = (0, _generated.numericLiteral)(1);
  102994. }
  102995. result = (0, _generated.binaryExpression)("/", numerator, (0, _generated.numericLiteral)(0));
  102996. }
  102997. if (value < 0 || Object.is(value, -0)) {
  102998. result = (0, _generated.unaryExpression)("-", result);
  102999. }
  103000. return result;
  103001. }
  103002. if (isRegExp(value)) {
  103003. const pattern = value.source;
  103004. const flags = value.toString().match(/\/([a-z]+|)$/)[1];
  103005. return (0, _generated.regExpLiteral)(pattern, flags);
  103006. }
  103007. if (Array.isArray(value)) {
  103008. return (0, _generated.arrayExpression)(value.map(valueToNode));
  103009. }
  103010. if (isPlainObject2(value)) {
  103011. const props = [];
  103012. for (const key of Object.keys(value)) {
  103013. let nodeKey;
  103014. if ((0, _isValidIdentifier.default)(key)) {
  103015. nodeKey = (0, _generated.identifier)(key);
  103016. } else {
  103017. nodeKey = (0, _generated.stringLiteral)(key);
  103018. }
  103019. props.push((0, _generated.objectProperty)(nodeKey, valueToNode(value[key])));
  103020. }
  103021. return (0, _generated.objectExpression)(props);
  103022. }
  103023. throw new Error("don't know how to turn this value into a node");
  103024. }
  103025. }
  103026. });
  103027. // node_modules/@babel/helper-hoist-variables/node_modules/@babel/types/lib/modifications/appendToMemberExpression.js
  103028. var require_appendToMemberExpression4 = __commonJS({
  103029. "node_modules/@babel/helper-hoist-variables/node_modules/@babel/types/lib/modifications/appendToMemberExpression.js"(exports) {
  103030. "use strict";
  103031. Object.defineProperty(exports, "__esModule", {
  103032. value: true
  103033. });
  103034. exports.default = appendToMemberExpression;
  103035. var _generated = require_generated17();
  103036. function appendToMemberExpression(member, append, computed = false) {
  103037. member.object = (0, _generated.memberExpression)(member.object, member.property, member.computed);
  103038. member.property = append;
  103039. member.computed = !!computed;
  103040. return member;
  103041. }
  103042. }
  103043. });
  103044. // node_modules/@babel/helper-hoist-variables/node_modules/@babel/types/lib/modifications/inherits.js
  103045. var require_inherits4 = __commonJS({
  103046. "node_modules/@babel/helper-hoist-variables/node_modules/@babel/types/lib/modifications/inherits.js"(exports) {
  103047. "use strict";
  103048. Object.defineProperty(exports, "__esModule", {
  103049. value: true
  103050. });
  103051. exports.default = inherits;
  103052. var _constants = require_constants4();
  103053. var _inheritsComments = require_inheritsComments4();
  103054. function inherits(child, parent) {
  103055. if (!child || !parent)
  103056. return child;
  103057. for (const key of _constants.INHERIT_KEYS.optional) {
  103058. if (child[key] == null) {
  103059. child[key] = parent[key];
  103060. }
  103061. }
  103062. for (const key of Object.keys(parent)) {
  103063. if (key[0] === "_" && key !== "__clone")
  103064. child[key] = parent[key];
  103065. }
  103066. for (const key of _constants.INHERIT_KEYS.force) {
  103067. child[key] = parent[key];
  103068. }
  103069. (0, _inheritsComments.default)(child, parent);
  103070. return child;
  103071. }
  103072. }
  103073. });
  103074. // node_modules/@babel/helper-hoist-variables/node_modules/@babel/types/lib/modifications/prependToMemberExpression.js
  103075. var require_prependToMemberExpression4 = __commonJS({
  103076. "node_modules/@babel/helper-hoist-variables/node_modules/@babel/types/lib/modifications/prependToMemberExpression.js"(exports) {
  103077. "use strict";
  103078. Object.defineProperty(exports, "__esModule", {
  103079. value: true
  103080. });
  103081. exports.default = prependToMemberExpression;
  103082. var _generated = require_generated17();
  103083. function prependToMemberExpression(member, prepend) {
  103084. member.object = (0, _generated.memberExpression)(prepend, member.object);
  103085. return member;
  103086. }
  103087. }
  103088. });
  103089. // node_modules/@babel/helper-hoist-variables/node_modules/@babel/types/lib/retrievers/getOuterBindingIdentifiers.js
  103090. var require_getOuterBindingIdentifiers4 = __commonJS({
  103091. "node_modules/@babel/helper-hoist-variables/node_modules/@babel/types/lib/retrievers/getOuterBindingIdentifiers.js"(exports) {
  103092. "use strict";
  103093. Object.defineProperty(exports, "__esModule", {
  103094. value: true
  103095. });
  103096. exports.default = void 0;
  103097. var _getBindingIdentifiers = require_getBindingIdentifiers4();
  103098. var _default = getOuterBindingIdentifiers;
  103099. exports.default = _default;
  103100. function getOuterBindingIdentifiers(node, duplicates) {
  103101. return (0, _getBindingIdentifiers.default)(node, duplicates, true);
  103102. }
  103103. }
  103104. });
  103105. // node_modules/@babel/helper-hoist-variables/node_modules/@babel/types/lib/traverse/traverse.js
  103106. var require_traverse4 = __commonJS({
  103107. "node_modules/@babel/helper-hoist-variables/node_modules/@babel/types/lib/traverse/traverse.js"(exports) {
  103108. "use strict";
  103109. Object.defineProperty(exports, "__esModule", {
  103110. value: true
  103111. });
  103112. exports.default = traverse;
  103113. var _definitions = require_definitions4();
  103114. function traverse(node, handlers2, state) {
  103115. if (typeof handlers2 === "function") {
  103116. handlers2 = {
  103117. enter: handlers2
  103118. };
  103119. }
  103120. const {
  103121. enter,
  103122. exit: exit2
  103123. } = handlers2;
  103124. traverseSimpleImpl(node, enter, exit2, state, []);
  103125. }
  103126. function traverseSimpleImpl(node, enter, exit2, state, ancestors) {
  103127. const keys2 = _definitions.VISITOR_KEYS[node.type];
  103128. if (!keys2)
  103129. return;
  103130. if (enter)
  103131. enter(node, ancestors, state);
  103132. for (const key of keys2) {
  103133. const subNode = node[key];
  103134. if (Array.isArray(subNode)) {
  103135. for (let i = 0; i < subNode.length; i++) {
  103136. const child = subNode[i];
  103137. if (!child)
  103138. continue;
  103139. ancestors.push({
  103140. node,
  103141. key,
  103142. index: i
  103143. });
  103144. traverseSimpleImpl(child, enter, exit2, state, ancestors);
  103145. ancestors.pop();
  103146. }
  103147. } else if (subNode) {
  103148. ancestors.push({
  103149. node,
  103150. key
  103151. });
  103152. traverseSimpleImpl(subNode, enter, exit2, state, ancestors);
  103153. ancestors.pop();
  103154. }
  103155. }
  103156. if (exit2)
  103157. exit2(node, ancestors, state);
  103158. }
  103159. }
  103160. });
  103161. // node_modules/@babel/helper-hoist-variables/node_modules/@babel/types/lib/validators/isBinding.js
  103162. var require_isBinding4 = __commonJS({
  103163. "node_modules/@babel/helper-hoist-variables/node_modules/@babel/types/lib/validators/isBinding.js"(exports) {
  103164. "use strict";
  103165. Object.defineProperty(exports, "__esModule", {
  103166. value: true
  103167. });
  103168. exports.default = isBinding;
  103169. var _getBindingIdentifiers = require_getBindingIdentifiers4();
  103170. function isBinding(node, parent, grandparent) {
  103171. if (grandparent && node.type === "Identifier" && parent.type === "ObjectProperty" && grandparent.type === "ObjectExpression") {
  103172. return false;
  103173. }
  103174. const keys2 = _getBindingIdentifiers.default.keys[parent.type];
  103175. if (keys2) {
  103176. for (let i = 0; i < keys2.length; i++) {
  103177. const key = keys2[i];
  103178. const val = parent[key];
  103179. if (Array.isArray(val)) {
  103180. if (val.indexOf(node) >= 0)
  103181. return true;
  103182. } else {
  103183. if (val === node)
  103184. return true;
  103185. }
  103186. }
  103187. }
  103188. return false;
  103189. }
  103190. }
  103191. });
  103192. // node_modules/@babel/helper-hoist-variables/node_modules/@babel/types/lib/validators/isLet.js
  103193. var require_isLet4 = __commonJS({
  103194. "node_modules/@babel/helper-hoist-variables/node_modules/@babel/types/lib/validators/isLet.js"(exports) {
  103195. "use strict";
  103196. Object.defineProperty(exports, "__esModule", {
  103197. value: true
  103198. });
  103199. exports.default = isLet;
  103200. var _generated = require_generated16();
  103201. var _constants = require_constants4();
  103202. function isLet(node) {
  103203. return (0, _generated.isVariableDeclaration)(node) && (node.kind !== "var" || node[_constants.BLOCK_SCOPED_SYMBOL]);
  103204. }
  103205. }
  103206. });
  103207. // node_modules/@babel/helper-hoist-variables/node_modules/@babel/types/lib/validators/isBlockScoped.js
  103208. var require_isBlockScoped4 = __commonJS({
  103209. "node_modules/@babel/helper-hoist-variables/node_modules/@babel/types/lib/validators/isBlockScoped.js"(exports) {
  103210. "use strict";
  103211. Object.defineProperty(exports, "__esModule", {
  103212. value: true
  103213. });
  103214. exports.default = isBlockScoped;
  103215. var _generated = require_generated16();
  103216. var _isLet = require_isLet4();
  103217. function isBlockScoped(node) {
  103218. return (0, _generated.isFunctionDeclaration)(node) || (0, _generated.isClassDeclaration)(node) || (0, _isLet.default)(node);
  103219. }
  103220. }
  103221. });
  103222. // node_modules/@babel/helper-hoist-variables/node_modules/@babel/types/lib/validators/isImmutable.js
  103223. var require_isImmutable4 = __commonJS({
  103224. "node_modules/@babel/helper-hoist-variables/node_modules/@babel/types/lib/validators/isImmutable.js"(exports) {
  103225. "use strict";
  103226. Object.defineProperty(exports, "__esModule", {
  103227. value: true
  103228. });
  103229. exports.default = isImmutable;
  103230. var _isType = require_isType4();
  103231. var _generated = require_generated16();
  103232. function isImmutable(node) {
  103233. if ((0, _isType.default)(node.type, "Immutable"))
  103234. return true;
  103235. if ((0, _generated.isIdentifier)(node)) {
  103236. if (node.name === "undefined") {
  103237. return true;
  103238. } else {
  103239. return false;
  103240. }
  103241. }
  103242. return false;
  103243. }
  103244. }
  103245. });
  103246. // node_modules/@babel/helper-hoist-variables/node_modules/@babel/types/lib/validators/isNodesEquivalent.js
  103247. var require_isNodesEquivalent4 = __commonJS({
  103248. "node_modules/@babel/helper-hoist-variables/node_modules/@babel/types/lib/validators/isNodesEquivalent.js"(exports) {
  103249. "use strict";
  103250. Object.defineProperty(exports, "__esModule", {
  103251. value: true
  103252. });
  103253. exports.default = isNodesEquivalent;
  103254. var _definitions = require_definitions4();
  103255. function isNodesEquivalent(a, b) {
  103256. if (typeof a !== "object" || typeof b !== "object" || a == null || b == null) {
  103257. return a === b;
  103258. }
  103259. if (a.type !== b.type) {
  103260. return false;
  103261. }
  103262. const fields = Object.keys(_definitions.NODE_FIELDS[a.type] || a.type);
  103263. const visitorKeys = _definitions.VISITOR_KEYS[a.type];
  103264. for (const field of fields) {
  103265. if (typeof a[field] !== typeof b[field]) {
  103266. return false;
  103267. }
  103268. if (a[field] == null && b[field] == null) {
  103269. continue;
  103270. } else if (a[field] == null || b[field] == null) {
  103271. return false;
  103272. }
  103273. if (Array.isArray(a[field])) {
  103274. if (!Array.isArray(b[field])) {
  103275. return false;
  103276. }
  103277. if (a[field].length !== b[field].length) {
  103278. return false;
  103279. }
  103280. for (let i = 0; i < a[field].length; i++) {
  103281. if (!isNodesEquivalent(a[field][i], b[field][i])) {
  103282. return false;
  103283. }
  103284. }
  103285. continue;
  103286. }
  103287. if (typeof a[field] === "object" && !(visitorKeys != null && visitorKeys.includes(field))) {
  103288. for (const key of Object.keys(a[field])) {
  103289. if (a[field][key] !== b[field][key]) {
  103290. return false;
  103291. }
  103292. }
  103293. continue;
  103294. }
  103295. if (!isNodesEquivalent(a[field], b[field])) {
  103296. return false;
  103297. }
  103298. }
  103299. return true;
  103300. }
  103301. }
  103302. });
  103303. // node_modules/@babel/helper-hoist-variables/node_modules/@babel/types/lib/validators/isReferenced.js
  103304. var require_isReferenced4 = __commonJS({
  103305. "node_modules/@babel/helper-hoist-variables/node_modules/@babel/types/lib/validators/isReferenced.js"(exports) {
  103306. "use strict";
  103307. Object.defineProperty(exports, "__esModule", {
  103308. value: true
  103309. });
  103310. exports.default = isReferenced;
  103311. function isReferenced(node, parent, grandparent) {
  103312. switch (parent.type) {
  103313. case "MemberExpression":
  103314. case "JSXMemberExpression":
  103315. case "OptionalMemberExpression":
  103316. if (parent.property === node) {
  103317. return !!parent.computed;
  103318. }
  103319. return parent.object === node;
  103320. case "VariableDeclarator":
  103321. return parent.init === node;
  103322. case "ArrowFunctionExpression":
  103323. return parent.body === node;
  103324. case "PrivateName":
  103325. return false;
  103326. case "ClassMethod":
  103327. case "ClassPrivateMethod":
  103328. case "ObjectMethod":
  103329. if (parent.params.includes(node)) {
  103330. return false;
  103331. }
  103332. case "ObjectProperty":
  103333. case "ClassProperty":
  103334. case "ClassPrivateProperty":
  103335. if (parent.key === node) {
  103336. return !!parent.computed;
  103337. }
  103338. if (parent.value === node) {
  103339. return !grandparent || grandparent.type !== "ObjectPattern";
  103340. }
  103341. return true;
  103342. case "ClassDeclaration":
  103343. case "ClassExpression":
  103344. return parent.superClass === node;
  103345. case "AssignmentExpression":
  103346. return parent.right === node;
  103347. case "AssignmentPattern":
  103348. return parent.right === node;
  103349. case "LabeledStatement":
  103350. return false;
  103351. case "CatchClause":
  103352. return false;
  103353. case "RestElement":
  103354. return false;
  103355. case "BreakStatement":
  103356. case "ContinueStatement":
  103357. return false;
  103358. case "FunctionDeclaration":
  103359. case "FunctionExpression":
  103360. return false;
  103361. case "ExportNamespaceSpecifier":
  103362. case "ExportDefaultSpecifier":
  103363. return false;
  103364. case "ExportSpecifier":
  103365. if (grandparent != null && grandparent.source) {
  103366. return false;
  103367. }
  103368. return parent.local === node;
  103369. case "ImportDefaultSpecifier":
  103370. case "ImportNamespaceSpecifier":
  103371. case "ImportSpecifier":
  103372. return false;
  103373. case "JSXAttribute":
  103374. return false;
  103375. case "ObjectPattern":
  103376. case "ArrayPattern":
  103377. return false;
  103378. case "MetaProperty":
  103379. return false;
  103380. case "ObjectTypeProperty":
  103381. return parent.key !== node;
  103382. case "TSEnumMember":
  103383. return parent.id !== node;
  103384. case "TSPropertySignature":
  103385. if (parent.key === node) {
  103386. return !!parent.computed;
  103387. }
  103388. return true;
  103389. }
  103390. return true;
  103391. }
  103392. }
  103393. });
  103394. // node_modules/@babel/helper-hoist-variables/node_modules/@babel/types/lib/validators/isScope.js
  103395. var require_isScope4 = __commonJS({
  103396. "node_modules/@babel/helper-hoist-variables/node_modules/@babel/types/lib/validators/isScope.js"(exports) {
  103397. "use strict";
  103398. Object.defineProperty(exports, "__esModule", {
  103399. value: true
  103400. });
  103401. exports.default = isScope;
  103402. var _generated = require_generated16();
  103403. function isScope(node, parent) {
  103404. if ((0, _generated.isBlockStatement)(node) && ((0, _generated.isFunction)(parent) || (0, _generated.isCatchClause)(parent))) {
  103405. return false;
  103406. }
  103407. if ((0, _generated.isPattern)(node) && ((0, _generated.isFunction)(parent) || (0, _generated.isCatchClause)(parent))) {
  103408. return true;
  103409. }
  103410. return (0, _generated.isScopable)(node);
  103411. }
  103412. }
  103413. });
  103414. // node_modules/@babel/helper-hoist-variables/node_modules/@babel/types/lib/validators/isSpecifierDefault.js
  103415. var require_isSpecifierDefault4 = __commonJS({
  103416. "node_modules/@babel/helper-hoist-variables/node_modules/@babel/types/lib/validators/isSpecifierDefault.js"(exports) {
  103417. "use strict";
  103418. Object.defineProperty(exports, "__esModule", {
  103419. value: true
  103420. });
  103421. exports.default = isSpecifierDefault;
  103422. var _generated = require_generated16();
  103423. function isSpecifierDefault(specifier) {
  103424. return (0, _generated.isImportDefaultSpecifier)(specifier) || (0, _generated.isIdentifier)(specifier.imported || specifier.exported, {
  103425. name: "default"
  103426. });
  103427. }
  103428. }
  103429. });
  103430. // node_modules/@babel/helper-hoist-variables/node_modules/@babel/types/lib/validators/isValidES3Identifier.js
  103431. var require_isValidES3Identifier4 = __commonJS({
  103432. "node_modules/@babel/helper-hoist-variables/node_modules/@babel/types/lib/validators/isValidES3Identifier.js"(exports) {
  103433. "use strict";
  103434. Object.defineProperty(exports, "__esModule", {
  103435. value: true
  103436. });
  103437. exports.default = isValidES3Identifier;
  103438. var _isValidIdentifier = require_isValidIdentifier4();
  103439. var RESERVED_WORDS_ES3_ONLY = /* @__PURE__ */ new Set(["abstract", "boolean", "byte", "char", "double", "enum", "final", "float", "goto", "implements", "int", "interface", "long", "native", "package", "private", "protected", "public", "short", "static", "synchronized", "throws", "transient", "volatile"]);
  103440. function isValidES3Identifier(name2) {
  103441. return (0, _isValidIdentifier.default)(name2) && !RESERVED_WORDS_ES3_ONLY.has(name2);
  103442. }
  103443. }
  103444. });
  103445. // node_modules/@babel/helper-hoist-variables/node_modules/@babel/types/lib/validators/isVar.js
  103446. var require_isVar4 = __commonJS({
  103447. "node_modules/@babel/helper-hoist-variables/node_modules/@babel/types/lib/validators/isVar.js"(exports) {
  103448. "use strict";
  103449. Object.defineProperty(exports, "__esModule", {
  103450. value: true
  103451. });
  103452. exports.default = isVar;
  103453. var _generated = require_generated16();
  103454. var _constants = require_constants4();
  103455. function isVar(node) {
  103456. return (0, _generated.isVariableDeclaration)(node, {
  103457. kind: "var"
  103458. }) && !node[_constants.BLOCK_SCOPED_SYMBOL];
  103459. }
  103460. }
  103461. });
  103462. // node_modules/@babel/helper-hoist-variables/node_modules/@babel/types/lib/ast-types/generated/index.js
  103463. var require_generated20 = __commonJS({
  103464. "node_modules/@babel/helper-hoist-variables/node_modules/@babel/types/lib/ast-types/generated/index.js"() {
  103465. }
  103466. });
  103467. // node_modules/@babel/helper-hoist-variables/node_modules/@babel/types/lib/index.js
  103468. var require_lib24 = __commonJS({
  103469. "node_modules/@babel/helper-hoist-variables/node_modules/@babel/types/lib/index.js"(exports) {
  103470. "use strict";
  103471. Object.defineProperty(exports, "__esModule", {
  103472. value: true
  103473. });
  103474. var _exportNames = {
  103475. react: true,
  103476. assertNode: true,
  103477. createTypeAnnotationBasedOnTypeof: true,
  103478. createUnionTypeAnnotation: true,
  103479. createFlowUnionType: true,
  103480. createTSUnionType: true,
  103481. cloneNode: true,
  103482. clone: true,
  103483. cloneDeep: true,
  103484. cloneDeepWithoutLoc: true,
  103485. cloneWithoutLoc: true,
  103486. addComment: true,
  103487. addComments: true,
  103488. inheritInnerComments: true,
  103489. inheritLeadingComments: true,
  103490. inheritsComments: true,
  103491. inheritTrailingComments: true,
  103492. removeComments: true,
  103493. ensureBlock: true,
  103494. toBindingIdentifierName: true,
  103495. toBlock: true,
  103496. toComputedKey: true,
  103497. toExpression: true,
  103498. toIdentifier: true,
  103499. toKeyAlias: true,
  103500. toSequenceExpression: true,
  103501. toStatement: true,
  103502. valueToNode: true,
  103503. appendToMemberExpression: true,
  103504. inherits: true,
  103505. prependToMemberExpression: true,
  103506. removeProperties: true,
  103507. removePropertiesDeep: true,
  103508. removeTypeDuplicates: true,
  103509. getBindingIdentifiers: true,
  103510. getOuterBindingIdentifiers: true,
  103511. traverse: true,
  103512. traverseFast: true,
  103513. shallowEqual: true,
  103514. is: true,
  103515. isBinding: true,
  103516. isBlockScoped: true,
  103517. isImmutable: true,
  103518. isLet: true,
  103519. isNode: true,
  103520. isNodesEquivalent: true,
  103521. isPlaceholderType: true,
  103522. isReferenced: true,
  103523. isScope: true,
  103524. isSpecifierDefault: true,
  103525. isType: true,
  103526. isValidES3Identifier: true,
  103527. isValidIdentifier: true,
  103528. isVar: true,
  103529. matchesPattern: true,
  103530. validate: true,
  103531. buildMatchMemberExpression: true
  103532. };
  103533. Object.defineProperty(exports, "assertNode", {
  103534. enumerable: true,
  103535. get: function() {
  103536. return _assertNode.default;
  103537. }
  103538. });
  103539. Object.defineProperty(exports, "createTypeAnnotationBasedOnTypeof", {
  103540. enumerable: true,
  103541. get: function() {
  103542. return _createTypeAnnotationBasedOnTypeof.default;
  103543. }
  103544. });
  103545. Object.defineProperty(exports, "createUnionTypeAnnotation", {
  103546. enumerable: true,
  103547. get: function() {
  103548. return _createFlowUnionType.default;
  103549. }
  103550. });
  103551. Object.defineProperty(exports, "createFlowUnionType", {
  103552. enumerable: true,
  103553. get: function() {
  103554. return _createFlowUnionType.default;
  103555. }
  103556. });
  103557. Object.defineProperty(exports, "createTSUnionType", {
  103558. enumerable: true,
  103559. get: function() {
  103560. return _createTSUnionType.default;
  103561. }
  103562. });
  103563. Object.defineProperty(exports, "cloneNode", {
  103564. enumerable: true,
  103565. get: function() {
  103566. return _cloneNode.default;
  103567. }
  103568. });
  103569. Object.defineProperty(exports, "clone", {
  103570. enumerable: true,
  103571. get: function() {
  103572. return _clone.default;
  103573. }
  103574. });
  103575. Object.defineProperty(exports, "cloneDeep", {
  103576. enumerable: true,
  103577. get: function() {
  103578. return _cloneDeep.default;
  103579. }
  103580. });
  103581. Object.defineProperty(exports, "cloneDeepWithoutLoc", {
  103582. enumerable: true,
  103583. get: function() {
  103584. return _cloneDeepWithoutLoc.default;
  103585. }
  103586. });
  103587. Object.defineProperty(exports, "cloneWithoutLoc", {
  103588. enumerable: true,
  103589. get: function() {
  103590. return _cloneWithoutLoc.default;
  103591. }
  103592. });
  103593. Object.defineProperty(exports, "addComment", {
  103594. enumerable: true,
  103595. get: function() {
  103596. return _addComment.default;
  103597. }
  103598. });
  103599. Object.defineProperty(exports, "addComments", {
  103600. enumerable: true,
  103601. get: function() {
  103602. return _addComments.default;
  103603. }
  103604. });
  103605. Object.defineProperty(exports, "inheritInnerComments", {
  103606. enumerable: true,
  103607. get: function() {
  103608. return _inheritInnerComments.default;
  103609. }
  103610. });
  103611. Object.defineProperty(exports, "inheritLeadingComments", {
  103612. enumerable: true,
  103613. get: function() {
  103614. return _inheritLeadingComments.default;
  103615. }
  103616. });
  103617. Object.defineProperty(exports, "inheritsComments", {
  103618. enumerable: true,
  103619. get: function() {
  103620. return _inheritsComments.default;
  103621. }
  103622. });
  103623. Object.defineProperty(exports, "inheritTrailingComments", {
  103624. enumerable: true,
  103625. get: function() {
  103626. return _inheritTrailingComments.default;
  103627. }
  103628. });
  103629. Object.defineProperty(exports, "removeComments", {
  103630. enumerable: true,
  103631. get: function() {
  103632. return _removeComments.default;
  103633. }
  103634. });
  103635. Object.defineProperty(exports, "ensureBlock", {
  103636. enumerable: true,
  103637. get: function() {
  103638. return _ensureBlock.default;
  103639. }
  103640. });
  103641. Object.defineProperty(exports, "toBindingIdentifierName", {
  103642. enumerable: true,
  103643. get: function() {
  103644. return _toBindingIdentifierName.default;
  103645. }
  103646. });
  103647. Object.defineProperty(exports, "toBlock", {
  103648. enumerable: true,
  103649. get: function() {
  103650. return _toBlock.default;
  103651. }
  103652. });
  103653. Object.defineProperty(exports, "toComputedKey", {
  103654. enumerable: true,
  103655. get: function() {
  103656. return _toComputedKey.default;
  103657. }
  103658. });
  103659. Object.defineProperty(exports, "toExpression", {
  103660. enumerable: true,
  103661. get: function() {
  103662. return _toExpression.default;
  103663. }
  103664. });
  103665. Object.defineProperty(exports, "toIdentifier", {
  103666. enumerable: true,
  103667. get: function() {
  103668. return _toIdentifier.default;
  103669. }
  103670. });
  103671. Object.defineProperty(exports, "toKeyAlias", {
  103672. enumerable: true,
  103673. get: function() {
  103674. return _toKeyAlias.default;
  103675. }
  103676. });
  103677. Object.defineProperty(exports, "toSequenceExpression", {
  103678. enumerable: true,
  103679. get: function() {
  103680. return _toSequenceExpression.default;
  103681. }
  103682. });
  103683. Object.defineProperty(exports, "toStatement", {
  103684. enumerable: true,
  103685. get: function() {
  103686. return _toStatement.default;
  103687. }
  103688. });
  103689. Object.defineProperty(exports, "valueToNode", {
  103690. enumerable: true,
  103691. get: function() {
  103692. return _valueToNode.default;
  103693. }
  103694. });
  103695. Object.defineProperty(exports, "appendToMemberExpression", {
  103696. enumerable: true,
  103697. get: function() {
  103698. return _appendToMemberExpression.default;
  103699. }
  103700. });
  103701. Object.defineProperty(exports, "inherits", {
  103702. enumerable: true,
  103703. get: function() {
  103704. return _inherits.default;
  103705. }
  103706. });
  103707. Object.defineProperty(exports, "prependToMemberExpression", {
  103708. enumerable: true,
  103709. get: function() {
  103710. return _prependToMemberExpression.default;
  103711. }
  103712. });
  103713. Object.defineProperty(exports, "removeProperties", {
  103714. enumerable: true,
  103715. get: function() {
  103716. return _removeProperties.default;
  103717. }
  103718. });
  103719. Object.defineProperty(exports, "removePropertiesDeep", {
  103720. enumerable: true,
  103721. get: function() {
  103722. return _removePropertiesDeep.default;
  103723. }
  103724. });
  103725. Object.defineProperty(exports, "removeTypeDuplicates", {
  103726. enumerable: true,
  103727. get: function() {
  103728. return _removeTypeDuplicates.default;
  103729. }
  103730. });
  103731. Object.defineProperty(exports, "getBindingIdentifiers", {
  103732. enumerable: true,
  103733. get: function() {
  103734. return _getBindingIdentifiers.default;
  103735. }
  103736. });
  103737. Object.defineProperty(exports, "getOuterBindingIdentifiers", {
  103738. enumerable: true,
  103739. get: function() {
  103740. return _getOuterBindingIdentifiers.default;
  103741. }
  103742. });
  103743. Object.defineProperty(exports, "traverse", {
  103744. enumerable: true,
  103745. get: function() {
  103746. return _traverse.default;
  103747. }
  103748. });
  103749. Object.defineProperty(exports, "traverseFast", {
  103750. enumerable: true,
  103751. get: function() {
  103752. return _traverseFast.default;
  103753. }
  103754. });
  103755. Object.defineProperty(exports, "shallowEqual", {
  103756. enumerable: true,
  103757. get: function() {
  103758. return _shallowEqual.default;
  103759. }
  103760. });
  103761. Object.defineProperty(exports, "is", {
  103762. enumerable: true,
  103763. get: function() {
  103764. return _is.default;
  103765. }
  103766. });
  103767. Object.defineProperty(exports, "isBinding", {
  103768. enumerable: true,
  103769. get: function() {
  103770. return _isBinding.default;
  103771. }
  103772. });
  103773. Object.defineProperty(exports, "isBlockScoped", {
  103774. enumerable: true,
  103775. get: function() {
  103776. return _isBlockScoped.default;
  103777. }
  103778. });
  103779. Object.defineProperty(exports, "isImmutable", {
  103780. enumerable: true,
  103781. get: function() {
  103782. return _isImmutable.default;
  103783. }
  103784. });
  103785. Object.defineProperty(exports, "isLet", {
  103786. enumerable: true,
  103787. get: function() {
  103788. return _isLet.default;
  103789. }
  103790. });
  103791. Object.defineProperty(exports, "isNode", {
  103792. enumerable: true,
  103793. get: function() {
  103794. return _isNode.default;
  103795. }
  103796. });
  103797. Object.defineProperty(exports, "isNodesEquivalent", {
  103798. enumerable: true,
  103799. get: function() {
  103800. return _isNodesEquivalent.default;
  103801. }
  103802. });
  103803. Object.defineProperty(exports, "isPlaceholderType", {
  103804. enumerable: true,
  103805. get: function() {
  103806. return _isPlaceholderType.default;
  103807. }
  103808. });
  103809. Object.defineProperty(exports, "isReferenced", {
  103810. enumerable: true,
  103811. get: function() {
  103812. return _isReferenced.default;
  103813. }
  103814. });
  103815. Object.defineProperty(exports, "isScope", {
  103816. enumerable: true,
  103817. get: function() {
  103818. return _isScope.default;
  103819. }
  103820. });
  103821. Object.defineProperty(exports, "isSpecifierDefault", {
  103822. enumerable: true,
  103823. get: function() {
  103824. return _isSpecifierDefault.default;
  103825. }
  103826. });
  103827. Object.defineProperty(exports, "isType", {
  103828. enumerable: true,
  103829. get: function() {
  103830. return _isType.default;
  103831. }
  103832. });
  103833. Object.defineProperty(exports, "isValidES3Identifier", {
  103834. enumerable: true,
  103835. get: function() {
  103836. return _isValidES3Identifier.default;
  103837. }
  103838. });
  103839. Object.defineProperty(exports, "isValidIdentifier", {
  103840. enumerable: true,
  103841. get: function() {
  103842. return _isValidIdentifier.default;
  103843. }
  103844. });
  103845. Object.defineProperty(exports, "isVar", {
  103846. enumerable: true,
  103847. get: function() {
  103848. return _isVar.default;
  103849. }
  103850. });
  103851. Object.defineProperty(exports, "matchesPattern", {
  103852. enumerable: true,
  103853. get: function() {
  103854. return _matchesPattern.default;
  103855. }
  103856. });
  103857. Object.defineProperty(exports, "validate", {
  103858. enumerable: true,
  103859. get: function() {
  103860. return _validate.default;
  103861. }
  103862. });
  103863. Object.defineProperty(exports, "buildMatchMemberExpression", {
  103864. enumerable: true,
  103865. get: function() {
  103866. return _buildMatchMemberExpression.default;
  103867. }
  103868. });
  103869. exports.react = void 0;
  103870. var _isReactComponent = require_isReactComponent4();
  103871. var _isCompatTag = require_isCompatTag4();
  103872. var _buildChildren = require_buildChildren4();
  103873. var _assertNode = require_assertNode4();
  103874. var _generated = require_generated18();
  103875. Object.keys(_generated).forEach(function(key) {
  103876. if (key === "default" || key === "__esModule")
  103877. return;
  103878. if (Object.prototype.hasOwnProperty.call(_exportNames, key))
  103879. return;
  103880. if (key in exports && exports[key] === _generated[key])
  103881. return;
  103882. Object.defineProperty(exports, key, {
  103883. enumerable: true,
  103884. get: function() {
  103885. return _generated[key];
  103886. }
  103887. });
  103888. });
  103889. var _createTypeAnnotationBasedOnTypeof = require_createTypeAnnotationBasedOnTypeof4();
  103890. var _createFlowUnionType = require_createFlowUnionType4();
  103891. var _createTSUnionType = require_createTSUnionType4();
  103892. var _generated2 = require_generated17();
  103893. Object.keys(_generated2).forEach(function(key) {
  103894. if (key === "default" || key === "__esModule")
  103895. return;
  103896. if (Object.prototype.hasOwnProperty.call(_exportNames, key))
  103897. return;
  103898. if (key in exports && exports[key] === _generated2[key])
  103899. return;
  103900. Object.defineProperty(exports, key, {
  103901. enumerable: true,
  103902. get: function() {
  103903. return _generated2[key];
  103904. }
  103905. });
  103906. });
  103907. var _uppercase = require_uppercase4();
  103908. Object.keys(_uppercase).forEach(function(key) {
  103909. if (key === "default" || key === "__esModule")
  103910. return;
  103911. if (Object.prototype.hasOwnProperty.call(_exportNames, key))
  103912. return;
  103913. if (key in exports && exports[key] === _uppercase[key])
  103914. return;
  103915. Object.defineProperty(exports, key, {
  103916. enumerable: true,
  103917. get: function() {
  103918. return _uppercase[key];
  103919. }
  103920. });
  103921. });
  103922. var _cloneNode = require_cloneNode4();
  103923. var _clone = require_clone4();
  103924. var _cloneDeep = require_cloneDeep4();
  103925. var _cloneDeepWithoutLoc = require_cloneDeepWithoutLoc4();
  103926. var _cloneWithoutLoc = require_cloneWithoutLoc4();
  103927. var _addComment = require_addComment4();
  103928. var _addComments = require_addComments4();
  103929. var _inheritInnerComments = require_inheritInnerComments4();
  103930. var _inheritLeadingComments = require_inheritLeadingComments4();
  103931. var _inheritsComments = require_inheritsComments4();
  103932. var _inheritTrailingComments = require_inheritTrailingComments4();
  103933. var _removeComments = require_removeComments4();
  103934. var _generated3 = require_generated19();
  103935. Object.keys(_generated3).forEach(function(key) {
  103936. if (key === "default" || key === "__esModule")
  103937. return;
  103938. if (Object.prototype.hasOwnProperty.call(_exportNames, key))
  103939. return;
  103940. if (key in exports && exports[key] === _generated3[key])
  103941. return;
  103942. Object.defineProperty(exports, key, {
  103943. enumerable: true,
  103944. get: function() {
  103945. return _generated3[key];
  103946. }
  103947. });
  103948. });
  103949. var _constants = require_constants4();
  103950. Object.keys(_constants).forEach(function(key) {
  103951. if (key === "default" || key === "__esModule")
  103952. return;
  103953. if (Object.prototype.hasOwnProperty.call(_exportNames, key))
  103954. return;
  103955. if (key in exports && exports[key] === _constants[key])
  103956. return;
  103957. Object.defineProperty(exports, key, {
  103958. enumerable: true,
  103959. get: function() {
  103960. return _constants[key];
  103961. }
  103962. });
  103963. });
  103964. var _ensureBlock = require_ensureBlock4();
  103965. var _toBindingIdentifierName = require_toBindingIdentifierName4();
  103966. var _toBlock = require_toBlock4();
  103967. var _toComputedKey = require_toComputedKey4();
  103968. var _toExpression = require_toExpression4();
  103969. var _toIdentifier = require_toIdentifier4();
  103970. var _toKeyAlias = require_toKeyAlias4();
  103971. var _toSequenceExpression = require_toSequenceExpression4();
  103972. var _toStatement = require_toStatement4();
  103973. var _valueToNode = require_valueToNode4();
  103974. var _definitions = require_definitions4();
  103975. Object.keys(_definitions).forEach(function(key) {
  103976. if (key === "default" || key === "__esModule")
  103977. return;
  103978. if (Object.prototype.hasOwnProperty.call(_exportNames, key))
  103979. return;
  103980. if (key in exports && exports[key] === _definitions[key])
  103981. return;
  103982. Object.defineProperty(exports, key, {
  103983. enumerable: true,
  103984. get: function() {
  103985. return _definitions[key];
  103986. }
  103987. });
  103988. });
  103989. var _appendToMemberExpression = require_appendToMemberExpression4();
  103990. var _inherits = require_inherits4();
  103991. var _prependToMemberExpression = require_prependToMemberExpression4();
  103992. var _removeProperties = require_removeProperties4();
  103993. var _removePropertiesDeep = require_removePropertiesDeep4();
  103994. var _removeTypeDuplicates = require_removeTypeDuplicates7();
  103995. var _getBindingIdentifiers = require_getBindingIdentifiers4();
  103996. var _getOuterBindingIdentifiers = require_getOuterBindingIdentifiers4();
  103997. var _traverse = require_traverse4();
  103998. Object.keys(_traverse).forEach(function(key) {
  103999. if (key === "default" || key === "__esModule")
  104000. return;
  104001. if (Object.prototype.hasOwnProperty.call(_exportNames, key))
  104002. return;
  104003. if (key in exports && exports[key] === _traverse[key])
  104004. return;
  104005. Object.defineProperty(exports, key, {
  104006. enumerable: true,
  104007. get: function() {
  104008. return _traverse[key];
  104009. }
  104010. });
  104011. });
  104012. var _traverseFast = require_traverseFast4();
  104013. var _shallowEqual = require_shallowEqual4();
  104014. var _is = require_is4();
  104015. var _isBinding = require_isBinding4();
  104016. var _isBlockScoped = require_isBlockScoped4();
  104017. var _isImmutable = require_isImmutable4();
  104018. var _isLet = require_isLet4();
  104019. var _isNode = require_isNode4();
  104020. var _isNodesEquivalent = require_isNodesEquivalent4();
  104021. var _isPlaceholderType = require_isPlaceholderType4();
  104022. var _isReferenced = require_isReferenced4();
  104023. var _isScope = require_isScope4();
  104024. var _isSpecifierDefault = require_isSpecifierDefault4();
  104025. var _isType = require_isType4();
  104026. var _isValidES3Identifier = require_isValidES3Identifier4();
  104027. var _isValidIdentifier = require_isValidIdentifier4();
  104028. var _isVar = require_isVar4();
  104029. var _matchesPattern = require_matchesPattern4();
  104030. var _validate = require_validate4();
  104031. var _buildMatchMemberExpression = require_buildMatchMemberExpression4();
  104032. var _generated4 = require_generated16();
  104033. Object.keys(_generated4).forEach(function(key) {
  104034. if (key === "default" || key === "__esModule")
  104035. return;
  104036. if (Object.prototype.hasOwnProperty.call(_exportNames, key))
  104037. return;
  104038. if (key in exports && exports[key] === _generated4[key])
  104039. return;
  104040. Object.defineProperty(exports, key, {
  104041. enumerable: true,
  104042. get: function() {
  104043. return _generated4[key];
  104044. }
  104045. });
  104046. });
  104047. var _generated5 = require_generated20();
  104048. Object.keys(_generated5).forEach(function(key) {
  104049. if (key === "default" || key === "__esModule")
  104050. return;
  104051. if (Object.prototype.hasOwnProperty.call(_exportNames, key))
  104052. return;
  104053. if (key in exports && exports[key] === _generated5[key])
  104054. return;
  104055. Object.defineProperty(exports, key, {
  104056. enumerable: true,
  104057. get: function() {
  104058. return _generated5[key];
  104059. }
  104060. });
  104061. });
  104062. var react = {
  104063. isReactComponent: _isReactComponent.default,
  104064. isCompatTag: _isCompatTag.default,
  104065. buildChildren: _buildChildren.default
  104066. };
  104067. exports.react = react;
  104068. }
  104069. });
  104070. // node_modules/@babel/helper-hoist-variables/lib/index.js
  104071. var require_lib25 = __commonJS({
  104072. "node_modules/@babel/helper-hoist-variables/lib/index.js"(exports) {
  104073. "use strict";
  104074. Object.defineProperty(exports, "__esModule", {
  104075. value: true
  104076. });
  104077. exports.default = hoistVariables;
  104078. var t2 = require_lib24();
  104079. var visitor = {
  104080. Scope(path, state) {
  104081. if (state.kind === "let")
  104082. path.skip();
  104083. },
  104084. FunctionParent(path) {
  104085. path.skip();
  104086. },
  104087. VariableDeclaration(path, state) {
  104088. if (state.kind && path.node.kind !== state.kind)
  104089. return;
  104090. const nodes = [];
  104091. const declarations = path.get("declarations");
  104092. let firstId;
  104093. for (const declar of declarations) {
  104094. firstId = declar.node.id;
  104095. if (declar.node.init) {
  104096. nodes.push(t2.expressionStatement(t2.assignmentExpression("=", declar.node.id, declar.node.init)));
  104097. }
  104098. for (const name2 of Object.keys(declar.getBindingIdentifiers())) {
  104099. state.emit(t2.identifier(name2), name2, declar.node.init !== null);
  104100. }
  104101. }
  104102. if (path.parentPath.isFor({
  104103. left: path.node
  104104. })) {
  104105. path.replaceWith(firstId);
  104106. } else {
  104107. path.replaceWithMultiple(nodes);
  104108. }
  104109. }
  104110. };
  104111. function hoistVariables(path, emit, kind = "var") {
  104112. path.traverse(visitor, {
  104113. kind,
  104114. emit
  104115. });
  104116. }
  104117. }
  104118. });
  104119. // node_modules/@babel/traverse/lib/path/replacement.js
  104120. var require_replacement2 = __commonJS({
  104121. "node_modules/@babel/traverse/lib/path/replacement.js"(exports) {
  104122. "use strict";
  104123. Object.defineProperty(exports, "__esModule", {
  104124. value: true
  104125. });
  104126. exports.replaceWithMultiple = replaceWithMultiple;
  104127. exports.replaceWithSourceString = replaceWithSourceString;
  104128. exports.replaceWith = replaceWith;
  104129. exports._replaceWith = _replaceWith;
  104130. exports.replaceExpressionWithStatements = replaceExpressionWithStatements;
  104131. exports.replaceInline = replaceInline;
  104132. var _codeFrame = require_lib21();
  104133. var _index = require_lib37();
  104134. var _index2 = require_path2();
  104135. var _cache = require_cache2();
  104136. var _parser = require_lib22();
  104137. var t2 = require_lib2();
  104138. var _helperHoistVariables = require_lib25();
  104139. function replaceWithMultiple(nodes) {
  104140. var _pathCache$get;
  104141. this.resync();
  104142. nodes = this._verifyNodeList(nodes);
  104143. t2.inheritLeadingComments(nodes[0], this.node);
  104144. t2.inheritTrailingComments(nodes[nodes.length - 1], this.node);
  104145. (_pathCache$get = _cache.path.get(this.parent)) == null ? void 0 : _pathCache$get.delete(this.node);
  104146. this.node = this.container[this.key] = null;
  104147. const paths = this.insertAfter(nodes);
  104148. if (this.node) {
  104149. this.requeue();
  104150. } else {
  104151. this.remove();
  104152. }
  104153. return paths;
  104154. }
  104155. function replaceWithSourceString(replacement) {
  104156. this.resync();
  104157. try {
  104158. replacement = `(${replacement})`;
  104159. replacement = (0, _parser.parse)(replacement);
  104160. } catch (err) {
  104161. const loc = err.loc;
  104162. if (loc) {
  104163. err.message += " - make sure this is an expression.\n" + (0, _codeFrame.codeFrameColumns)(replacement, {
  104164. start: {
  104165. line: loc.line,
  104166. column: loc.column + 1
  104167. }
  104168. });
  104169. err.code = "BABEL_REPLACE_SOURCE_ERROR";
  104170. }
  104171. throw err;
  104172. }
  104173. replacement = replacement.program.body[0].expression;
  104174. _index.default.removeProperties(replacement);
  104175. return this.replaceWith(replacement);
  104176. }
  104177. function replaceWith(replacement) {
  104178. this.resync();
  104179. if (this.removed) {
  104180. throw new Error("You can't replace this node, we've already removed it");
  104181. }
  104182. if (replacement instanceof _index2.default) {
  104183. replacement = replacement.node;
  104184. }
  104185. if (!replacement) {
  104186. throw new Error("You passed `path.replaceWith()` a falsy node, use `path.remove()` instead");
  104187. }
  104188. if (this.node === replacement) {
  104189. return [this];
  104190. }
  104191. if (this.isProgram() && !t2.isProgram(replacement)) {
  104192. throw new Error("You can only replace a Program root node with another Program node");
  104193. }
  104194. if (Array.isArray(replacement)) {
  104195. throw new Error("Don't use `path.replaceWith()` with an array of nodes, use `path.replaceWithMultiple()`");
  104196. }
  104197. if (typeof replacement === "string") {
  104198. throw new Error("Don't use `path.replaceWith()` with a source string, use `path.replaceWithSourceString()`");
  104199. }
  104200. let nodePath = "";
  104201. if (this.isNodeType("Statement") && t2.isExpression(replacement)) {
  104202. if (!this.canHaveVariableDeclarationOrExpression() && !this.canSwapBetweenExpressionAndStatement(replacement) && !this.parentPath.isExportDefaultDeclaration()) {
  104203. replacement = t2.expressionStatement(replacement);
  104204. nodePath = "expression";
  104205. }
  104206. }
  104207. if (this.isNodeType("Expression") && t2.isStatement(replacement)) {
  104208. if (!this.canHaveVariableDeclarationOrExpression() && !this.canSwapBetweenExpressionAndStatement(replacement)) {
  104209. return this.replaceExpressionWithStatements([replacement]);
  104210. }
  104211. }
  104212. const oldNode = this.node;
  104213. if (oldNode) {
  104214. t2.inheritsComments(replacement, oldNode);
  104215. t2.removeComments(oldNode);
  104216. }
  104217. this._replaceWith(replacement);
  104218. this.type = replacement.type;
  104219. this.setScope();
  104220. this.requeue();
  104221. return [nodePath ? this.get(nodePath) : this];
  104222. }
  104223. function _replaceWith(node) {
  104224. var _pathCache$get2;
  104225. if (!this.container) {
  104226. throw new ReferenceError("Container is falsy");
  104227. }
  104228. if (this.inList) {
  104229. t2.validate(this.parent, this.key, [node]);
  104230. } else {
  104231. t2.validate(this.parent, this.key, node);
  104232. }
  104233. this.debug(`Replace with ${node == null ? void 0 : node.type}`);
  104234. (_pathCache$get2 = _cache.path.get(this.parent)) == null ? void 0 : _pathCache$get2.set(node, this).delete(this.node);
  104235. this.node = this.container[this.key] = node;
  104236. }
  104237. function replaceExpressionWithStatements(nodes) {
  104238. this.resync();
  104239. const toSequenceExpression = t2.toSequenceExpression(nodes, this.scope);
  104240. if (toSequenceExpression) {
  104241. return this.replaceWith(toSequenceExpression)[0].get("expressions");
  104242. }
  104243. const functionParent = this.getFunctionParent();
  104244. const isParentAsync = functionParent == null ? void 0 : functionParent.is("async");
  104245. const isParentGenerator = functionParent == null ? void 0 : functionParent.is("generator");
  104246. const container = t2.arrowFunctionExpression([], t2.blockStatement(nodes));
  104247. this.replaceWith(t2.callExpression(container, []));
  104248. const callee = this.get("callee");
  104249. (0, _helperHoistVariables.default)(callee.get("body"), (id) => {
  104250. this.scope.push({
  104251. id
  104252. });
  104253. }, "var");
  104254. const completionRecords = this.get("callee").getCompletionRecords();
  104255. for (const path of completionRecords) {
  104256. if (!path.isExpressionStatement())
  104257. continue;
  104258. const loop = path.findParent((path2) => path2.isLoop());
  104259. if (loop) {
  104260. let uid = loop.getData("expressionReplacementReturnUid");
  104261. if (!uid) {
  104262. uid = callee.scope.generateDeclaredUidIdentifier("ret");
  104263. callee.get("body").pushContainer("body", t2.returnStatement(t2.cloneNode(uid)));
  104264. loop.setData("expressionReplacementReturnUid", uid);
  104265. } else {
  104266. uid = t2.identifier(uid.name);
  104267. }
  104268. path.get("expression").replaceWith(t2.assignmentExpression("=", t2.cloneNode(uid), path.node.expression));
  104269. } else {
  104270. path.replaceWith(t2.returnStatement(path.node.expression));
  104271. }
  104272. }
  104273. callee.arrowFunctionToExpression();
  104274. const newCallee = callee;
  104275. const needToAwaitFunction = isParentAsync && _index.default.hasType(this.get("callee.body").node, "AwaitExpression", t2.FUNCTION_TYPES);
  104276. const needToYieldFunction = isParentGenerator && _index.default.hasType(this.get("callee.body").node, "YieldExpression", t2.FUNCTION_TYPES);
  104277. if (needToAwaitFunction) {
  104278. newCallee.set("async", true);
  104279. if (!needToYieldFunction) {
  104280. this.replaceWith(t2.awaitExpression(this.node));
  104281. }
  104282. }
  104283. if (needToYieldFunction) {
  104284. newCallee.set("generator", true);
  104285. this.replaceWith(t2.yieldExpression(this.node, true));
  104286. }
  104287. return newCallee.get("body.body");
  104288. }
  104289. function replaceInline(nodes) {
  104290. this.resync();
  104291. if (Array.isArray(nodes)) {
  104292. if (Array.isArray(this.container)) {
  104293. nodes = this._verifyNodeList(nodes);
  104294. const paths = this._containerInsertAfter(nodes);
  104295. this.remove();
  104296. return paths;
  104297. } else {
  104298. return this.replaceWithMultiple(nodes);
  104299. }
  104300. } else {
  104301. return this.replaceWith(nodes);
  104302. }
  104303. }
  104304. }
  104305. });
  104306. // node_modules/@babel/traverse/lib/path/evaluation.js
  104307. var require_evaluation2 = __commonJS({
  104308. "node_modules/@babel/traverse/lib/path/evaluation.js"(exports) {
  104309. "use strict";
  104310. Object.defineProperty(exports, "__esModule", {
  104311. value: true
  104312. });
  104313. exports.evaluateTruthy = evaluateTruthy;
  104314. exports.evaluate = evaluate;
  104315. var VALID_CALLEES = ["String", "Number", "Math"];
  104316. var INVALID_METHODS = ["random"];
  104317. function evaluateTruthy() {
  104318. const res = this.evaluate();
  104319. if (res.confident)
  104320. return !!res.value;
  104321. }
  104322. function deopt(path, state) {
  104323. if (!state.confident)
  104324. return;
  104325. state.deoptPath = path;
  104326. state.confident = false;
  104327. }
  104328. function evaluateCached(path, state) {
  104329. const {
  104330. node
  104331. } = path;
  104332. const {
  104333. seen
  104334. } = state;
  104335. if (seen.has(node)) {
  104336. const existing = seen.get(node);
  104337. if (existing.resolved) {
  104338. return existing.value;
  104339. } else {
  104340. deopt(path, state);
  104341. return;
  104342. }
  104343. } else {
  104344. const item = {
  104345. resolved: false
  104346. };
  104347. seen.set(node, item);
  104348. const val = _evaluate(path, state);
  104349. if (state.confident) {
  104350. item.resolved = true;
  104351. item.value = val;
  104352. }
  104353. return val;
  104354. }
  104355. }
  104356. function _evaluate(path, state) {
  104357. if (!state.confident)
  104358. return;
  104359. if (path.isSequenceExpression()) {
  104360. const exprs = path.get("expressions");
  104361. return evaluateCached(exprs[exprs.length - 1], state);
  104362. }
  104363. if (path.isStringLiteral() || path.isNumericLiteral() || path.isBooleanLiteral()) {
  104364. return path.node.value;
  104365. }
  104366. if (path.isNullLiteral()) {
  104367. return null;
  104368. }
  104369. if (path.isTemplateLiteral()) {
  104370. return evaluateQuasis(path, path.node.quasis, state);
  104371. }
  104372. if (path.isTaggedTemplateExpression() && path.get("tag").isMemberExpression()) {
  104373. const object = path.get("tag.object");
  104374. const {
  104375. node: {
  104376. name: name2
  104377. }
  104378. } = object;
  104379. const property = path.get("tag.property");
  104380. if (object.isIdentifier() && name2 === "String" && !path.scope.getBinding(name2) && property.isIdentifier() && property.node.name === "raw") {
  104381. return evaluateQuasis(path, path.node.quasi.quasis, state, true);
  104382. }
  104383. }
  104384. if (path.isConditionalExpression()) {
  104385. const testResult = evaluateCached(path.get("test"), state);
  104386. if (!state.confident)
  104387. return;
  104388. if (testResult) {
  104389. return evaluateCached(path.get("consequent"), state);
  104390. } else {
  104391. return evaluateCached(path.get("alternate"), state);
  104392. }
  104393. }
  104394. if (path.isExpressionWrapper()) {
  104395. return evaluateCached(path.get("expression"), state);
  104396. }
  104397. if (path.isMemberExpression() && !path.parentPath.isCallExpression({
  104398. callee: path.node
  104399. })) {
  104400. const property = path.get("property");
  104401. const object = path.get("object");
  104402. if (object.isLiteral() && property.isIdentifier()) {
  104403. const value = object.node.value;
  104404. const type = typeof value;
  104405. if (type === "number" || type === "string") {
  104406. return value[property.node.name];
  104407. }
  104408. }
  104409. }
  104410. if (path.isReferencedIdentifier()) {
  104411. const binding = path.scope.getBinding(path.node.name);
  104412. if (binding && binding.constantViolations.length > 0) {
  104413. return deopt(binding.path, state);
  104414. }
  104415. if (binding && path.node.start < binding.path.node.end) {
  104416. return deopt(binding.path, state);
  104417. }
  104418. if (binding != null && binding.hasValue) {
  104419. return binding.value;
  104420. } else {
  104421. if (path.node.name === "undefined") {
  104422. return binding ? deopt(binding.path, state) : void 0;
  104423. } else if (path.node.name === "Infinity") {
  104424. return binding ? deopt(binding.path, state) : Infinity;
  104425. } else if (path.node.name === "NaN") {
  104426. return binding ? deopt(binding.path, state) : NaN;
  104427. }
  104428. const resolved = path.resolve();
  104429. if (resolved === path) {
  104430. return deopt(path, state);
  104431. } else {
  104432. return evaluateCached(resolved, state);
  104433. }
  104434. }
  104435. }
  104436. if (path.isUnaryExpression({
  104437. prefix: true
  104438. })) {
  104439. if (path.node.operator === "void") {
  104440. return void 0;
  104441. }
  104442. const argument = path.get("argument");
  104443. if (path.node.operator === "typeof" && (argument.isFunction() || argument.isClass())) {
  104444. return "function";
  104445. }
  104446. const arg = evaluateCached(argument, state);
  104447. if (!state.confident)
  104448. return;
  104449. switch (path.node.operator) {
  104450. case "!":
  104451. return !arg;
  104452. case "+":
  104453. return +arg;
  104454. case "-":
  104455. return -arg;
  104456. case "~":
  104457. return ~arg;
  104458. case "typeof":
  104459. return typeof arg;
  104460. }
  104461. }
  104462. if (path.isArrayExpression()) {
  104463. const arr = [];
  104464. const elems = path.get("elements");
  104465. for (const elem of elems) {
  104466. const elemValue = elem.evaluate();
  104467. if (elemValue.confident) {
  104468. arr.push(elemValue.value);
  104469. } else {
  104470. return deopt(elemValue.deopt, state);
  104471. }
  104472. }
  104473. return arr;
  104474. }
  104475. if (path.isObjectExpression()) {
  104476. const obj = {};
  104477. const props = path.get("properties");
  104478. for (const prop of props) {
  104479. if (prop.isObjectMethod() || prop.isSpreadElement()) {
  104480. return deopt(prop, state);
  104481. }
  104482. const keyPath = prop.get("key");
  104483. let key = keyPath;
  104484. if (prop.node.computed) {
  104485. key = key.evaluate();
  104486. if (!key.confident) {
  104487. return deopt(key.deopt, state);
  104488. }
  104489. key = key.value;
  104490. } else if (key.isIdentifier()) {
  104491. key = key.node.name;
  104492. } else {
  104493. key = key.node.value;
  104494. }
  104495. const valuePath = prop.get("value");
  104496. let value = valuePath.evaluate();
  104497. if (!value.confident) {
  104498. return deopt(value.deopt, state);
  104499. }
  104500. value = value.value;
  104501. obj[key] = value;
  104502. }
  104503. return obj;
  104504. }
  104505. if (path.isLogicalExpression()) {
  104506. const wasConfident = state.confident;
  104507. const left = evaluateCached(path.get("left"), state);
  104508. const leftConfident = state.confident;
  104509. state.confident = wasConfident;
  104510. const right = evaluateCached(path.get("right"), state);
  104511. const rightConfident = state.confident;
  104512. switch (path.node.operator) {
  104513. case "||":
  104514. state.confident = leftConfident && (!!left || rightConfident);
  104515. if (!state.confident)
  104516. return;
  104517. return left || right;
  104518. case "&&":
  104519. state.confident = leftConfident && (!left || rightConfident);
  104520. if (!state.confident)
  104521. return;
  104522. return left && right;
  104523. }
  104524. }
  104525. if (path.isBinaryExpression()) {
  104526. const left = evaluateCached(path.get("left"), state);
  104527. if (!state.confident)
  104528. return;
  104529. const right = evaluateCached(path.get("right"), state);
  104530. if (!state.confident)
  104531. return;
  104532. switch (path.node.operator) {
  104533. case "-":
  104534. return left - right;
  104535. case "+":
  104536. return left + right;
  104537. case "/":
  104538. return left / right;
  104539. case "*":
  104540. return left * right;
  104541. case "%":
  104542. return left % right;
  104543. case "**":
  104544. return Math.pow(left, right);
  104545. case "<":
  104546. return left < right;
  104547. case ">":
  104548. return left > right;
  104549. case "<=":
  104550. return left <= right;
  104551. case ">=":
  104552. return left >= right;
  104553. case "==":
  104554. return left == right;
  104555. case "!=":
  104556. return left != right;
  104557. case "===":
  104558. return left === right;
  104559. case "!==":
  104560. return left !== right;
  104561. case "|":
  104562. return left | right;
  104563. case "&":
  104564. return left & right;
  104565. case "^":
  104566. return left ^ right;
  104567. case "<<":
  104568. return left << right;
  104569. case ">>":
  104570. return left >> right;
  104571. case ">>>":
  104572. return left >>> right;
  104573. }
  104574. }
  104575. if (path.isCallExpression()) {
  104576. const callee = path.get("callee");
  104577. let context;
  104578. let func;
  104579. if (callee.isIdentifier() && !path.scope.getBinding(callee.node.name) && VALID_CALLEES.indexOf(callee.node.name) >= 0) {
  104580. func = global[callee.node.name];
  104581. }
  104582. if (callee.isMemberExpression()) {
  104583. const object = callee.get("object");
  104584. const property = callee.get("property");
  104585. if (object.isIdentifier() && property.isIdentifier() && VALID_CALLEES.indexOf(object.node.name) >= 0 && INVALID_METHODS.indexOf(property.node.name) < 0) {
  104586. context = global[object.node.name];
  104587. func = context[property.node.name];
  104588. }
  104589. if (object.isLiteral() && property.isIdentifier()) {
  104590. const type = typeof object.node.value;
  104591. if (type === "string" || type === "number") {
  104592. context = object.node.value;
  104593. func = context[property.node.name];
  104594. }
  104595. }
  104596. }
  104597. if (func) {
  104598. const args = path.get("arguments").map((arg) => evaluateCached(arg, state));
  104599. if (!state.confident)
  104600. return;
  104601. return func.apply(context, args);
  104602. }
  104603. }
  104604. deopt(path, state);
  104605. }
  104606. function evaluateQuasis(path, quasis, state, raw = false) {
  104607. let str = "";
  104608. let i = 0;
  104609. const exprs = path.get("expressions");
  104610. for (const elem of quasis) {
  104611. if (!state.confident)
  104612. break;
  104613. str += raw ? elem.value.raw : elem.value.cooked;
  104614. const expr = exprs[i++];
  104615. if (expr)
  104616. str += String(evaluateCached(expr, state));
  104617. }
  104618. if (!state.confident)
  104619. return;
  104620. return str;
  104621. }
  104622. function evaluate() {
  104623. const state = {
  104624. confident: true,
  104625. deoptPath: null,
  104626. seen: /* @__PURE__ */ new Map()
  104627. };
  104628. let value = evaluateCached(this, state);
  104629. if (!state.confident)
  104630. value = void 0;
  104631. return {
  104632. confident: state.confident,
  104633. deopt: state.deoptPath,
  104634. value
  104635. };
  104636. }
  104637. }
  104638. });
  104639. // node_modules/@babel/helper-get-function-arity/node_modules/@babel/types/lib/utils/shallowEqual.js
  104640. var require_shallowEqual5 = __commonJS({
  104641. "node_modules/@babel/helper-get-function-arity/node_modules/@babel/types/lib/utils/shallowEqual.js"(exports) {
  104642. "use strict";
  104643. Object.defineProperty(exports, "__esModule", {
  104644. value: true
  104645. });
  104646. exports.default = shallowEqual;
  104647. function shallowEqual(actual, expected) {
  104648. const keys2 = Object.keys(expected);
  104649. for (const key of keys2) {
  104650. if (actual[key] !== expected[key]) {
  104651. return false;
  104652. }
  104653. }
  104654. return true;
  104655. }
  104656. }
  104657. });
  104658. // node_modules/@babel/helper-get-function-arity/node_modules/@babel/types/lib/validators/generated/index.js
  104659. var require_generated21 = __commonJS({
  104660. "node_modules/@babel/helper-get-function-arity/node_modules/@babel/types/lib/validators/generated/index.js"(exports) {
  104661. "use strict";
  104662. Object.defineProperty(exports, "__esModule", {
  104663. value: true
  104664. });
  104665. exports.isArrayExpression = isArrayExpression;
  104666. exports.isAssignmentExpression = isAssignmentExpression;
  104667. exports.isBinaryExpression = isBinaryExpression;
  104668. exports.isInterpreterDirective = isInterpreterDirective;
  104669. exports.isDirective = isDirective;
  104670. exports.isDirectiveLiteral = isDirectiveLiteral;
  104671. exports.isBlockStatement = isBlockStatement;
  104672. exports.isBreakStatement = isBreakStatement;
  104673. exports.isCallExpression = isCallExpression;
  104674. exports.isCatchClause = isCatchClause;
  104675. exports.isConditionalExpression = isConditionalExpression;
  104676. exports.isContinueStatement = isContinueStatement;
  104677. exports.isDebuggerStatement = isDebuggerStatement;
  104678. exports.isDoWhileStatement = isDoWhileStatement;
  104679. exports.isEmptyStatement = isEmptyStatement;
  104680. exports.isExpressionStatement = isExpressionStatement2;
  104681. exports.isFile = isFile;
  104682. exports.isForInStatement = isForInStatement;
  104683. exports.isForStatement = isForStatement;
  104684. exports.isFunctionDeclaration = isFunctionDeclaration;
  104685. exports.isFunctionExpression = isFunctionExpression;
  104686. exports.isIdentifier = isIdentifier2;
  104687. exports.isIfStatement = isIfStatement;
  104688. exports.isLabeledStatement = isLabeledStatement;
  104689. exports.isStringLiteral = isStringLiteral2;
  104690. exports.isNumericLiteral = isNumericLiteral;
  104691. exports.isNullLiteral = isNullLiteral;
  104692. exports.isBooleanLiteral = isBooleanLiteral2;
  104693. exports.isRegExpLiteral = isRegExpLiteral;
  104694. exports.isLogicalExpression = isLogicalExpression;
  104695. exports.isMemberExpression = isMemberExpression;
  104696. exports.isNewExpression = isNewExpression;
  104697. exports.isProgram = isProgram;
  104698. exports.isObjectExpression = isObjectExpression;
  104699. exports.isObjectMethod = isObjectMethod;
  104700. exports.isObjectProperty = isObjectProperty;
  104701. exports.isRestElement = isRestElement;
  104702. exports.isReturnStatement = isReturnStatement;
  104703. exports.isSequenceExpression = isSequenceExpression;
  104704. exports.isParenthesizedExpression = isParenthesizedExpression;
  104705. exports.isSwitchCase = isSwitchCase;
  104706. exports.isSwitchStatement = isSwitchStatement;
  104707. exports.isThisExpression = isThisExpression;
  104708. exports.isThrowStatement = isThrowStatement;
  104709. exports.isTryStatement = isTryStatement;
  104710. exports.isUnaryExpression = isUnaryExpression;
  104711. exports.isUpdateExpression = isUpdateExpression;
  104712. exports.isVariableDeclaration = isVariableDeclaration;
  104713. exports.isVariableDeclarator = isVariableDeclarator;
  104714. exports.isWhileStatement = isWhileStatement;
  104715. exports.isWithStatement = isWithStatement;
  104716. exports.isAssignmentPattern = isAssignmentPattern;
  104717. exports.isArrayPattern = isArrayPattern;
  104718. exports.isArrowFunctionExpression = isArrowFunctionExpression;
  104719. exports.isClassBody = isClassBody;
  104720. exports.isClassExpression = isClassExpression;
  104721. exports.isClassDeclaration = isClassDeclaration;
  104722. exports.isExportAllDeclaration = isExportAllDeclaration;
  104723. exports.isExportDefaultDeclaration = isExportDefaultDeclaration;
  104724. exports.isExportNamedDeclaration = isExportNamedDeclaration;
  104725. exports.isExportSpecifier = isExportSpecifier;
  104726. exports.isForOfStatement = isForOfStatement;
  104727. exports.isImportDeclaration = isImportDeclaration;
  104728. exports.isImportDefaultSpecifier = isImportDefaultSpecifier;
  104729. exports.isImportNamespaceSpecifier = isImportNamespaceSpecifier;
  104730. exports.isImportSpecifier = isImportSpecifier;
  104731. exports.isMetaProperty = isMetaProperty;
  104732. exports.isClassMethod = isClassMethod;
  104733. exports.isObjectPattern = isObjectPattern;
  104734. exports.isSpreadElement = isSpreadElement;
  104735. exports.isSuper = isSuper;
  104736. exports.isTaggedTemplateExpression = isTaggedTemplateExpression;
  104737. exports.isTemplateElement = isTemplateElement;
  104738. exports.isTemplateLiteral = isTemplateLiteral;
  104739. exports.isYieldExpression = isYieldExpression;
  104740. exports.isAwaitExpression = isAwaitExpression;
  104741. exports.isImport = isImport;
  104742. exports.isBigIntLiteral = isBigIntLiteral;
  104743. exports.isExportNamespaceSpecifier = isExportNamespaceSpecifier;
  104744. exports.isOptionalMemberExpression = isOptionalMemberExpression;
  104745. exports.isOptionalCallExpression = isOptionalCallExpression;
  104746. exports.isAnyTypeAnnotation = isAnyTypeAnnotation;
  104747. exports.isArrayTypeAnnotation = isArrayTypeAnnotation;
  104748. exports.isBooleanTypeAnnotation = isBooleanTypeAnnotation;
  104749. exports.isBooleanLiteralTypeAnnotation = isBooleanLiteralTypeAnnotation;
  104750. exports.isNullLiteralTypeAnnotation = isNullLiteralTypeAnnotation;
  104751. exports.isClassImplements = isClassImplements;
  104752. exports.isDeclareClass = isDeclareClass;
  104753. exports.isDeclareFunction = isDeclareFunction;
  104754. exports.isDeclareInterface = isDeclareInterface;
  104755. exports.isDeclareModule = isDeclareModule;
  104756. exports.isDeclareModuleExports = isDeclareModuleExports;
  104757. exports.isDeclareTypeAlias = isDeclareTypeAlias;
  104758. exports.isDeclareOpaqueType = isDeclareOpaqueType;
  104759. exports.isDeclareVariable = isDeclareVariable;
  104760. exports.isDeclareExportDeclaration = isDeclareExportDeclaration;
  104761. exports.isDeclareExportAllDeclaration = isDeclareExportAllDeclaration;
  104762. exports.isDeclaredPredicate = isDeclaredPredicate;
  104763. exports.isExistsTypeAnnotation = isExistsTypeAnnotation;
  104764. exports.isFunctionTypeAnnotation = isFunctionTypeAnnotation;
  104765. exports.isFunctionTypeParam = isFunctionTypeParam;
  104766. exports.isGenericTypeAnnotation = isGenericTypeAnnotation;
  104767. exports.isInferredPredicate = isInferredPredicate;
  104768. exports.isInterfaceExtends = isInterfaceExtends;
  104769. exports.isInterfaceDeclaration = isInterfaceDeclaration;
  104770. exports.isInterfaceTypeAnnotation = isInterfaceTypeAnnotation;
  104771. exports.isIntersectionTypeAnnotation = isIntersectionTypeAnnotation;
  104772. exports.isMixedTypeAnnotation = isMixedTypeAnnotation;
  104773. exports.isEmptyTypeAnnotation = isEmptyTypeAnnotation;
  104774. exports.isNullableTypeAnnotation = isNullableTypeAnnotation;
  104775. exports.isNumberLiteralTypeAnnotation = isNumberLiteralTypeAnnotation;
  104776. exports.isNumberTypeAnnotation = isNumberTypeAnnotation;
  104777. exports.isObjectTypeAnnotation = isObjectTypeAnnotation;
  104778. exports.isObjectTypeInternalSlot = isObjectTypeInternalSlot;
  104779. exports.isObjectTypeCallProperty = isObjectTypeCallProperty;
  104780. exports.isObjectTypeIndexer = isObjectTypeIndexer;
  104781. exports.isObjectTypeProperty = isObjectTypeProperty;
  104782. exports.isObjectTypeSpreadProperty = isObjectTypeSpreadProperty;
  104783. exports.isOpaqueType = isOpaqueType;
  104784. exports.isQualifiedTypeIdentifier = isQualifiedTypeIdentifier;
  104785. exports.isStringLiteralTypeAnnotation = isStringLiteralTypeAnnotation;
  104786. exports.isStringTypeAnnotation = isStringTypeAnnotation;
  104787. exports.isSymbolTypeAnnotation = isSymbolTypeAnnotation;
  104788. exports.isThisTypeAnnotation = isThisTypeAnnotation;
  104789. exports.isTupleTypeAnnotation = isTupleTypeAnnotation;
  104790. exports.isTypeofTypeAnnotation = isTypeofTypeAnnotation;
  104791. exports.isTypeAlias = isTypeAlias;
  104792. exports.isTypeAnnotation = isTypeAnnotation;
  104793. exports.isTypeCastExpression = isTypeCastExpression;
  104794. exports.isTypeParameter = isTypeParameter;
  104795. exports.isTypeParameterDeclaration = isTypeParameterDeclaration;
  104796. exports.isTypeParameterInstantiation = isTypeParameterInstantiation;
  104797. exports.isUnionTypeAnnotation = isUnionTypeAnnotation;
  104798. exports.isVariance = isVariance;
  104799. exports.isVoidTypeAnnotation = isVoidTypeAnnotation;
  104800. exports.isEnumDeclaration = isEnumDeclaration;
  104801. exports.isEnumBooleanBody = isEnumBooleanBody;
  104802. exports.isEnumNumberBody = isEnumNumberBody;
  104803. exports.isEnumStringBody = isEnumStringBody;
  104804. exports.isEnumSymbolBody = isEnumSymbolBody;
  104805. exports.isEnumBooleanMember = isEnumBooleanMember;
  104806. exports.isEnumNumberMember = isEnumNumberMember;
  104807. exports.isEnumStringMember = isEnumStringMember;
  104808. exports.isEnumDefaultedMember = isEnumDefaultedMember;
  104809. exports.isIndexedAccessType = isIndexedAccessType;
  104810. exports.isOptionalIndexedAccessType = isOptionalIndexedAccessType;
  104811. exports.isJSXAttribute = isJSXAttribute;
  104812. exports.isJSXClosingElement = isJSXClosingElement;
  104813. exports.isJSXElement = isJSXElement2;
  104814. exports.isJSXEmptyExpression = isJSXEmptyExpression;
  104815. exports.isJSXExpressionContainer = isJSXExpressionContainer2;
  104816. exports.isJSXSpreadChild = isJSXSpreadChild;
  104817. exports.isJSXIdentifier = isJSXIdentifier2;
  104818. exports.isJSXMemberExpression = isJSXMemberExpression;
  104819. exports.isJSXNamespacedName = isJSXNamespacedName;
  104820. exports.isJSXOpeningElement = isJSXOpeningElement;
  104821. exports.isJSXSpreadAttribute = isJSXSpreadAttribute;
  104822. exports.isJSXText = isJSXText;
  104823. exports.isJSXFragment = isJSXFragment2;
  104824. exports.isJSXOpeningFragment = isJSXOpeningFragment;
  104825. exports.isJSXClosingFragment = isJSXClosingFragment;
  104826. exports.isNoop = isNoop;
  104827. exports.isPlaceholder = isPlaceholder;
  104828. exports.isV8IntrinsicIdentifier = isV8IntrinsicIdentifier;
  104829. exports.isArgumentPlaceholder = isArgumentPlaceholder;
  104830. exports.isBindExpression = isBindExpression;
  104831. exports.isClassProperty = isClassProperty;
  104832. exports.isPipelineTopicExpression = isPipelineTopicExpression;
  104833. exports.isPipelineBareFunction = isPipelineBareFunction;
  104834. exports.isPipelinePrimaryTopicReference = isPipelinePrimaryTopicReference;
  104835. exports.isClassPrivateProperty = isClassPrivateProperty;
  104836. exports.isClassPrivateMethod = isClassPrivateMethod;
  104837. exports.isImportAttribute = isImportAttribute;
  104838. exports.isDecorator = isDecorator;
  104839. exports.isDoExpression = isDoExpression;
  104840. exports.isExportDefaultSpecifier = isExportDefaultSpecifier;
  104841. exports.isPrivateName = isPrivateName;
  104842. exports.isRecordExpression = isRecordExpression;
  104843. exports.isTupleExpression = isTupleExpression;
  104844. exports.isDecimalLiteral = isDecimalLiteral;
  104845. exports.isStaticBlock = isStaticBlock;
  104846. exports.isModuleExpression = isModuleExpression;
  104847. exports.isTSParameterProperty = isTSParameterProperty;
  104848. exports.isTSDeclareFunction = isTSDeclareFunction;
  104849. exports.isTSDeclareMethod = isTSDeclareMethod;
  104850. exports.isTSQualifiedName = isTSQualifiedName;
  104851. exports.isTSCallSignatureDeclaration = isTSCallSignatureDeclaration;
  104852. exports.isTSConstructSignatureDeclaration = isTSConstructSignatureDeclaration;
  104853. exports.isTSPropertySignature = isTSPropertySignature;
  104854. exports.isTSMethodSignature = isTSMethodSignature;
  104855. exports.isTSIndexSignature = isTSIndexSignature;
  104856. exports.isTSAnyKeyword = isTSAnyKeyword;
  104857. exports.isTSBooleanKeyword = isTSBooleanKeyword;
  104858. exports.isTSBigIntKeyword = isTSBigIntKeyword;
  104859. exports.isTSIntrinsicKeyword = isTSIntrinsicKeyword;
  104860. exports.isTSNeverKeyword = isTSNeverKeyword;
  104861. exports.isTSNullKeyword = isTSNullKeyword;
  104862. exports.isTSNumberKeyword = isTSNumberKeyword;
  104863. exports.isTSObjectKeyword = isTSObjectKeyword;
  104864. exports.isTSStringKeyword = isTSStringKeyword;
  104865. exports.isTSSymbolKeyword = isTSSymbolKeyword;
  104866. exports.isTSUndefinedKeyword = isTSUndefinedKeyword;
  104867. exports.isTSUnknownKeyword = isTSUnknownKeyword;
  104868. exports.isTSVoidKeyword = isTSVoidKeyword;
  104869. exports.isTSThisType = isTSThisType;
  104870. exports.isTSFunctionType = isTSFunctionType;
  104871. exports.isTSConstructorType = isTSConstructorType;
  104872. exports.isTSTypeReference = isTSTypeReference;
  104873. exports.isTSTypePredicate = isTSTypePredicate;
  104874. exports.isTSTypeQuery = isTSTypeQuery;
  104875. exports.isTSTypeLiteral = isTSTypeLiteral;
  104876. exports.isTSArrayType = isTSArrayType;
  104877. exports.isTSTupleType = isTSTupleType;
  104878. exports.isTSOptionalType = isTSOptionalType;
  104879. exports.isTSRestType = isTSRestType;
  104880. exports.isTSNamedTupleMember = isTSNamedTupleMember;
  104881. exports.isTSUnionType = isTSUnionType;
  104882. exports.isTSIntersectionType = isTSIntersectionType;
  104883. exports.isTSConditionalType = isTSConditionalType;
  104884. exports.isTSInferType = isTSInferType;
  104885. exports.isTSParenthesizedType = isTSParenthesizedType;
  104886. exports.isTSTypeOperator = isTSTypeOperator;
  104887. exports.isTSIndexedAccessType = isTSIndexedAccessType;
  104888. exports.isTSMappedType = isTSMappedType;
  104889. exports.isTSLiteralType = isTSLiteralType;
  104890. exports.isTSExpressionWithTypeArguments = isTSExpressionWithTypeArguments;
  104891. exports.isTSInterfaceDeclaration = isTSInterfaceDeclaration;
  104892. exports.isTSInterfaceBody = isTSInterfaceBody;
  104893. exports.isTSTypeAliasDeclaration = isTSTypeAliasDeclaration;
  104894. exports.isTSAsExpression = isTSAsExpression;
  104895. exports.isTSTypeAssertion = isTSTypeAssertion;
  104896. exports.isTSEnumDeclaration = isTSEnumDeclaration;
  104897. exports.isTSEnumMember = isTSEnumMember;
  104898. exports.isTSModuleDeclaration = isTSModuleDeclaration;
  104899. exports.isTSModuleBlock = isTSModuleBlock;
  104900. exports.isTSImportType = isTSImportType;
  104901. exports.isTSImportEqualsDeclaration = isTSImportEqualsDeclaration;
  104902. exports.isTSExternalModuleReference = isTSExternalModuleReference;
  104903. exports.isTSNonNullExpression = isTSNonNullExpression;
  104904. exports.isTSExportAssignment = isTSExportAssignment;
  104905. exports.isTSNamespaceExportDeclaration = isTSNamespaceExportDeclaration;
  104906. exports.isTSTypeAnnotation = isTSTypeAnnotation;
  104907. exports.isTSTypeParameterInstantiation = isTSTypeParameterInstantiation;
  104908. exports.isTSTypeParameterDeclaration = isTSTypeParameterDeclaration;
  104909. exports.isTSTypeParameter = isTSTypeParameter;
  104910. exports.isExpression = isExpression;
  104911. exports.isBinary = isBinary;
  104912. exports.isScopable = isScopable;
  104913. exports.isBlockParent = isBlockParent;
  104914. exports.isBlock = isBlock;
  104915. exports.isStatement = isStatement;
  104916. exports.isTerminatorless = isTerminatorless;
  104917. exports.isCompletionStatement = isCompletionStatement;
  104918. exports.isConditional = isConditional;
  104919. exports.isLoop = isLoop;
  104920. exports.isWhile = isWhile;
  104921. exports.isExpressionWrapper = isExpressionWrapper;
  104922. exports.isFor = isFor;
  104923. exports.isForXStatement = isForXStatement;
  104924. exports.isFunction = isFunction;
  104925. exports.isFunctionParent = isFunctionParent;
  104926. exports.isPureish = isPureish;
  104927. exports.isDeclaration = isDeclaration2;
  104928. exports.isPatternLike = isPatternLike;
  104929. exports.isLVal = isLVal;
  104930. exports.isTSEntityName = isTSEntityName;
  104931. exports.isLiteral = isLiteral;
  104932. exports.isImmutable = isImmutable;
  104933. exports.isUserWhitespacable = isUserWhitespacable;
  104934. exports.isMethod = isMethod;
  104935. exports.isObjectMember = isObjectMember;
  104936. exports.isProperty = isProperty;
  104937. exports.isUnaryLike = isUnaryLike;
  104938. exports.isPattern = isPattern;
  104939. exports.isClass = isClass;
  104940. exports.isModuleDeclaration = isModuleDeclaration;
  104941. exports.isExportDeclaration = isExportDeclaration;
  104942. exports.isModuleSpecifier = isModuleSpecifier;
  104943. exports.isFlow = isFlow;
  104944. exports.isFlowType = isFlowType;
  104945. exports.isFlowBaseAnnotation = isFlowBaseAnnotation;
  104946. exports.isFlowDeclaration = isFlowDeclaration;
  104947. exports.isFlowPredicate = isFlowPredicate;
  104948. exports.isEnumBody = isEnumBody;
  104949. exports.isEnumMember = isEnumMember;
  104950. exports.isJSX = isJSX;
  104951. exports.isPrivate = isPrivate;
  104952. exports.isTSTypeElement = isTSTypeElement;
  104953. exports.isTSType = isTSType;
  104954. exports.isTSBaseType = isTSBaseType;
  104955. exports.isNumberLiteral = isNumberLiteral;
  104956. exports.isRegexLiteral = isRegexLiteral;
  104957. exports.isRestProperty = isRestProperty;
  104958. exports.isSpreadProperty = isSpreadProperty;
  104959. var _shallowEqual = require_shallowEqual5();
  104960. function isArrayExpression(node, opts) {
  104961. if (!node)
  104962. return false;
  104963. const nodeType = node.type;
  104964. if (nodeType === "ArrayExpression") {
  104965. if (typeof opts === "undefined") {
  104966. return true;
  104967. } else {
  104968. return (0, _shallowEqual.default)(node, opts);
  104969. }
  104970. }
  104971. return false;
  104972. }
  104973. function isAssignmentExpression(node, opts) {
  104974. if (!node)
  104975. return false;
  104976. const nodeType = node.type;
  104977. if (nodeType === "AssignmentExpression") {
  104978. if (typeof opts === "undefined") {
  104979. return true;
  104980. } else {
  104981. return (0, _shallowEqual.default)(node, opts);
  104982. }
  104983. }
  104984. return false;
  104985. }
  104986. function isBinaryExpression(node, opts) {
  104987. if (!node)
  104988. return false;
  104989. const nodeType = node.type;
  104990. if (nodeType === "BinaryExpression") {
  104991. if (typeof opts === "undefined") {
  104992. return true;
  104993. } else {
  104994. return (0, _shallowEqual.default)(node, opts);
  104995. }
  104996. }
  104997. return false;
  104998. }
  104999. function isInterpreterDirective(node, opts) {
  105000. if (!node)
  105001. return false;
  105002. const nodeType = node.type;
  105003. if (nodeType === "InterpreterDirective") {
  105004. if (typeof opts === "undefined") {
  105005. return true;
  105006. } else {
  105007. return (0, _shallowEqual.default)(node, opts);
  105008. }
  105009. }
  105010. return false;
  105011. }
  105012. function isDirective(node, opts) {
  105013. if (!node)
  105014. return false;
  105015. const nodeType = node.type;
  105016. if (nodeType === "Directive") {
  105017. if (typeof opts === "undefined") {
  105018. return true;
  105019. } else {
  105020. return (0, _shallowEqual.default)(node, opts);
  105021. }
  105022. }
  105023. return false;
  105024. }
  105025. function isDirectiveLiteral(node, opts) {
  105026. if (!node)
  105027. return false;
  105028. const nodeType = node.type;
  105029. if (nodeType === "DirectiveLiteral") {
  105030. if (typeof opts === "undefined") {
  105031. return true;
  105032. } else {
  105033. return (0, _shallowEqual.default)(node, opts);
  105034. }
  105035. }
  105036. return false;
  105037. }
  105038. function isBlockStatement(node, opts) {
  105039. if (!node)
  105040. return false;
  105041. const nodeType = node.type;
  105042. if (nodeType === "BlockStatement") {
  105043. if (typeof opts === "undefined") {
  105044. return true;
  105045. } else {
  105046. return (0, _shallowEqual.default)(node, opts);
  105047. }
  105048. }
  105049. return false;
  105050. }
  105051. function isBreakStatement(node, opts) {
  105052. if (!node)
  105053. return false;
  105054. const nodeType = node.type;
  105055. if (nodeType === "BreakStatement") {
  105056. if (typeof opts === "undefined") {
  105057. return true;
  105058. } else {
  105059. return (0, _shallowEqual.default)(node, opts);
  105060. }
  105061. }
  105062. return false;
  105063. }
  105064. function isCallExpression(node, opts) {
  105065. if (!node)
  105066. return false;
  105067. const nodeType = node.type;
  105068. if (nodeType === "CallExpression") {
  105069. if (typeof opts === "undefined") {
  105070. return true;
  105071. } else {
  105072. return (0, _shallowEqual.default)(node, opts);
  105073. }
  105074. }
  105075. return false;
  105076. }
  105077. function isCatchClause(node, opts) {
  105078. if (!node)
  105079. return false;
  105080. const nodeType = node.type;
  105081. if (nodeType === "CatchClause") {
  105082. if (typeof opts === "undefined") {
  105083. return true;
  105084. } else {
  105085. return (0, _shallowEqual.default)(node, opts);
  105086. }
  105087. }
  105088. return false;
  105089. }
  105090. function isConditionalExpression(node, opts) {
  105091. if (!node)
  105092. return false;
  105093. const nodeType = node.type;
  105094. if (nodeType === "ConditionalExpression") {
  105095. if (typeof opts === "undefined") {
  105096. return true;
  105097. } else {
  105098. return (0, _shallowEqual.default)(node, opts);
  105099. }
  105100. }
  105101. return false;
  105102. }
  105103. function isContinueStatement(node, opts) {
  105104. if (!node)
  105105. return false;
  105106. const nodeType = node.type;
  105107. if (nodeType === "ContinueStatement") {
  105108. if (typeof opts === "undefined") {
  105109. return true;
  105110. } else {
  105111. return (0, _shallowEqual.default)(node, opts);
  105112. }
  105113. }
  105114. return false;
  105115. }
  105116. function isDebuggerStatement(node, opts) {
  105117. if (!node)
  105118. return false;
  105119. const nodeType = node.type;
  105120. if (nodeType === "DebuggerStatement") {
  105121. if (typeof opts === "undefined") {
  105122. return true;
  105123. } else {
  105124. return (0, _shallowEqual.default)(node, opts);
  105125. }
  105126. }
  105127. return false;
  105128. }
  105129. function isDoWhileStatement(node, opts) {
  105130. if (!node)
  105131. return false;
  105132. const nodeType = node.type;
  105133. if (nodeType === "DoWhileStatement") {
  105134. if (typeof opts === "undefined") {
  105135. return true;
  105136. } else {
  105137. return (0, _shallowEqual.default)(node, opts);
  105138. }
  105139. }
  105140. return false;
  105141. }
  105142. function isEmptyStatement(node, opts) {
  105143. if (!node)
  105144. return false;
  105145. const nodeType = node.type;
  105146. if (nodeType === "EmptyStatement") {
  105147. if (typeof opts === "undefined") {
  105148. return true;
  105149. } else {
  105150. return (0, _shallowEqual.default)(node, opts);
  105151. }
  105152. }
  105153. return false;
  105154. }
  105155. function isExpressionStatement2(node, opts) {
  105156. if (!node)
  105157. return false;
  105158. const nodeType = node.type;
  105159. if (nodeType === "ExpressionStatement") {
  105160. if (typeof opts === "undefined") {
  105161. return true;
  105162. } else {
  105163. return (0, _shallowEqual.default)(node, opts);
  105164. }
  105165. }
  105166. return false;
  105167. }
  105168. function isFile(node, opts) {
  105169. if (!node)
  105170. return false;
  105171. const nodeType = node.type;
  105172. if (nodeType === "File") {
  105173. if (typeof opts === "undefined") {
  105174. return true;
  105175. } else {
  105176. return (0, _shallowEqual.default)(node, opts);
  105177. }
  105178. }
  105179. return false;
  105180. }
  105181. function isForInStatement(node, opts) {
  105182. if (!node)
  105183. return false;
  105184. const nodeType = node.type;
  105185. if (nodeType === "ForInStatement") {
  105186. if (typeof opts === "undefined") {
  105187. return true;
  105188. } else {
  105189. return (0, _shallowEqual.default)(node, opts);
  105190. }
  105191. }
  105192. return false;
  105193. }
  105194. function isForStatement(node, opts) {
  105195. if (!node)
  105196. return false;
  105197. const nodeType = node.type;
  105198. if (nodeType === "ForStatement") {
  105199. if (typeof opts === "undefined") {
  105200. return true;
  105201. } else {
  105202. return (0, _shallowEqual.default)(node, opts);
  105203. }
  105204. }
  105205. return false;
  105206. }
  105207. function isFunctionDeclaration(node, opts) {
  105208. if (!node)
  105209. return false;
  105210. const nodeType = node.type;
  105211. if (nodeType === "FunctionDeclaration") {
  105212. if (typeof opts === "undefined") {
  105213. return true;
  105214. } else {
  105215. return (0, _shallowEqual.default)(node, opts);
  105216. }
  105217. }
  105218. return false;
  105219. }
  105220. function isFunctionExpression(node, opts) {
  105221. if (!node)
  105222. return false;
  105223. const nodeType = node.type;
  105224. if (nodeType === "FunctionExpression") {
  105225. if (typeof opts === "undefined") {
  105226. return true;
  105227. } else {
  105228. return (0, _shallowEqual.default)(node, opts);
  105229. }
  105230. }
  105231. return false;
  105232. }
  105233. function isIdentifier2(node, opts) {
  105234. if (!node)
  105235. return false;
  105236. const nodeType = node.type;
  105237. if (nodeType === "Identifier") {
  105238. if (typeof opts === "undefined") {
  105239. return true;
  105240. } else {
  105241. return (0, _shallowEqual.default)(node, opts);
  105242. }
  105243. }
  105244. return false;
  105245. }
  105246. function isIfStatement(node, opts) {
  105247. if (!node)
  105248. return false;
  105249. const nodeType = node.type;
  105250. if (nodeType === "IfStatement") {
  105251. if (typeof opts === "undefined") {
  105252. return true;
  105253. } else {
  105254. return (0, _shallowEqual.default)(node, opts);
  105255. }
  105256. }
  105257. return false;
  105258. }
  105259. function isLabeledStatement(node, opts) {
  105260. if (!node)
  105261. return false;
  105262. const nodeType = node.type;
  105263. if (nodeType === "LabeledStatement") {
  105264. if (typeof opts === "undefined") {
  105265. return true;
  105266. } else {
  105267. return (0, _shallowEqual.default)(node, opts);
  105268. }
  105269. }
  105270. return false;
  105271. }
  105272. function isStringLiteral2(node, opts) {
  105273. if (!node)
  105274. return false;
  105275. const nodeType = node.type;
  105276. if (nodeType === "StringLiteral") {
  105277. if (typeof opts === "undefined") {
  105278. return true;
  105279. } else {
  105280. return (0, _shallowEqual.default)(node, opts);
  105281. }
  105282. }
  105283. return false;
  105284. }
  105285. function isNumericLiteral(node, opts) {
  105286. if (!node)
  105287. return false;
  105288. const nodeType = node.type;
  105289. if (nodeType === "NumericLiteral") {
  105290. if (typeof opts === "undefined") {
  105291. return true;
  105292. } else {
  105293. return (0, _shallowEqual.default)(node, opts);
  105294. }
  105295. }
  105296. return false;
  105297. }
  105298. function isNullLiteral(node, opts) {
  105299. if (!node)
  105300. return false;
  105301. const nodeType = node.type;
  105302. if (nodeType === "NullLiteral") {
  105303. if (typeof opts === "undefined") {
  105304. return true;
  105305. } else {
  105306. return (0, _shallowEqual.default)(node, opts);
  105307. }
  105308. }
  105309. return false;
  105310. }
  105311. function isBooleanLiteral2(node, opts) {
  105312. if (!node)
  105313. return false;
  105314. const nodeType = node.type;
  105315. if (nodeType === "BooleanLiteral") {
  105316. if (typeof opts === "undefined") {
  105317. return true;
  105318. } else {
  105319. return (0, _shallowEqual.default)(node, opts);
  105320. }
  105321. }
  105322. return false;
  105323. }
  105324. function isRegExpLiteral(node, opts) {
  105325. if (!node)
  105326. return false;
  105327. const nodeType = node.type;
  105328. if (nodeType === "RegExpLiteral") {
  105329. if (typeof opts === "undefined") {
  105330. return true;
  105331. } else {
  105332. return (0, _shallowEqual.default)(node, opts);
  105333. }
  105334. }
  105335. return false;
  105336. }
  105337. function isLogicalExpression(node, opts) {
  105338. if (!node)
  105339. return false;
  105340. const nodeType = node.type;
  105341. if (nodeType === "LogicalExpression") {
  105342. if (typeof opts === "undefined") {
  105343. return true;
  105344. } else {
  105345. return (0, _shallowEqual.default)(node, opts);
  105346. }
  105347. }
  105348. return false;
  105349. }
  105350. function isMemberExpression(node, opts) {
  105351. if (!node)
  105352. return false;
  105353. const nodeType = node.type;
  105354. if (nodeType === "MemberExpression") {
  105355. if (typeof opts === "undefined") {
  105356. return true;
  105357. } else {
  105358. return (0, _shallowEqual.default)(node, opts);
  105359. }
  105360. }
  105361. return false;
  105362. }
  105363. function isNewExpression(node, opts) {
  105364. if (!node)
  105365. return false;
  105366. const nodeType = node.type;
  105367. if (nodeType === "NewExpression") {
  105368. if (typeof opts === "undefined") {
  105369. return true;
  105370. } else {
  105371. return (0, _shallowEqual.default)(node, opts);
  105372. }
  105373. }
  105374. return false;
  105375. }
  105376. function isProgram(node, opts) {
  105377. if (!node)
  105378. return false;
  105379. const nodeType = node.type;
  105380. if (nodeType === "Program") {
  105381. if (typeof opts === "undefined") {
  105382. return true;
  105383. } else {
  105384. return (0, _shallowEqual.default)(node, opts);
  105385. }
  105386. }
  105387. return false;
  105388. }
  105389. function isObjectExpression(node, opts) {
  105390. if (!node)
  105391. return false;
  105392. const nodeType = node.type;
  105393. if (nodeType === "ObjectExpression") {
  105394. if (typeof opts === "undefined") {
  105395. return true;
  105396. } else {
  105397. return (0, _shallowEqual.default)(node, opts);
  105398. }
  105399. }
  105400. return false;
  105401. }
  105402. function isObjectMethod(node, opts) {
  105403. if (!node)
  105404. return false;
  105405. const nodeType = node.type;
  105406. if (nodeType === "ObjectMethod") {
  105407. if (typeof opts === "undefined") {
  105408. return true;
  105409. } else {
  105410. return (0, _shallowEqual.default)(node, opts);
  105411. }
  105412. }
  105413. return false;
  105414. }
  105415. function isObjectProperty(node, opts) {
  105416. if (!node)
  105417. return false;
  105418. const nodeType = node.type;
  105419. if (nodeType === "ObjectProperty") {
  105420. if (typeof opts === "undefined") {
  105421. return true;
  105422. } else {
  105423. return (0, _shallowEqual.default)(node, opts);
  105424. }
  105425. }
  105426. return false;
  105427. }
  105428. function isRestElement(node, opts) {
  105429. if (!node)
  105430. return false;
  105431. const nodeType = node.type;
  105432. if (nodeType === "RestElement") {
  105433. if (typeof opts === "undefined") {
  105434. return true;
  105435. } else {
  105436. return (0, _shallowEqual.default)(node, opts);
  105437. }
  105438. }
  105439. return false;
  105440. }
  105441. function isReturnStatement(node, opts) {
  105442. if (!node)
  105443. return false;
  105444. const nodeType = node.type;
  105445. if (nodeType === "ReturnStatement") {
  105446. if (typeof opts === "undefined") {
  105447. return true;
  105448. } else {
  105449. return (0, _shallowEqual.default)(node, opts);
  105450. }
  105451. }
  105452. return false;
  105453. }
  105454. function isSequenceExpression(node, opts) {
  105455. if (!node)
  105456. return false;
  105457. const nodeType = node.type;
  105458. if (nodeType === "SequenceExpression") {
  105459. if (typeof opts === "undefined") {
  105460. return true;
  105461. } else {
  105462. return (0, _shallowEqual.default)(node, opts);
  105463. }
  105464. }
  105465. return false;
  105466. }
  105467. function isParenthesizedExpression(node, opts) {
  105468. if (!node)
  105469. return false;
  105470. const nodeType = node.type;
  105471. if (nodeType === "ParenthesizedExpression") {
  105472. if (typeof opts === "undefined") {
  105473. return true;
  105474. } else {
  105475. return (0, _shallowEqual.default)(node, opts);
  105476. }
  105477. }
  105478. return false;
  105479. }
  105480. function isSwitchCase(node, opts) {
  105481. if (!node)
  105482. return false;
  105483. const nodeType = node.type;
  105484. if (nodeType === "SwitchCase") {
  105485. if (typeof opts === "undefined") {
  105486. return true;
  105487. } else {
  105488. return (0, _shallowEqual.default)(node, opts);
  105489. }
  105490. }
  105491. return false;
  105492. }
  105493. function isSwitchStatement(node, opts) {
  105494. if (!node)
  105495. return false;
  105496. const nodeType = node.type;
  105497. if (nodeType === "SwitchStatement") {
  105498. if (typeof opts === "undefined") {
  105499. return true;
  105500. } else {
  105501. return (0, _shallowEqual.default)(node, opts);
  105502. }
  105503. }
  105504. return false;
  105505. }
  105506. function isThisExpression(node, opts) {
  105507. if (!node)
  105508. return false;
  105509. const nodeType = node.type;
  105510. if (nodeType === "ThisExpression") {
  105511. if (typeof opts === "undefined") {
  105512. return true;
  105513. } else {
  105514. return (0, _shallowEqual.default)(node, opts);
  105515. }
  105516. }
  105517. return false;
  105518. }
  105519. function isThrowStatement(node, opts) {
  105520. if (!node)
  105521. return false;
  105522. const nodeType = node.type;
  105523. if (nodeType === "ThrowStatement") {
  105524. if (typeof opts === "undefined") {
  105525. return true;
  105526. } else {
  105527. return (0, _shallowEqual.default)(node, opts);
  105528. }
  105529. }
  105530. return false;
  105531. }
  105532. function isTryStatement(node, opts) {
  105533. if (!node)
  105534. return false;
  105535. const nodeType = node.type;
  105536. if (nodeType === "TryStatement") {
  105537. if (typeof opts === "undefined") {
  105538. return true;
  105539. } else {
  105540. return (0, _shallowEqual.default)(node, opts);
  105541. }
  105542. }
  105543. return false;
  105544. }
  105545. function isUnaryExpression(node, opts) {
  105546. if (!node)
  105547. return false;
  105548. const nodeType = node.type;
  105549. if (nodeType === "UnaryExpression") {
  105550. if (typeof opts === "undefined") {
  105551. return true;
  105552. } else {
  105553. return (0, _shallowEqual.default)(node, opts);
  105554. }
  105555. }
  105556. return false;
  105557. }
  105558. function isUpdateExpression(node, opts) {
  105559. if (!node)
  105560. return false;
  105561. const nodeType = node.type;
  105562. if (nodeType === "UpdateExpression") {
  105563. if (typeof opts === "undefined") {
  105564. return true;
  105565. } else {
  105566. return (0, _shallowEqual.default)(node, opts);
  105567. }
  105568. }
  105569. return false;
  105570. }
  105571. function isVariableDeclaration(node, opts) {
  105572. if (!node)
  105573. return false;
  105574. const nodeType = node.type;
  105575. if (nodeType === "VariableDeclaration") {
  105576. if (typeof opts === "undefined") {
  105577. return true;
  105578. } else {
  105579. return (0, _shallowEqual.default)(node, opts);
  105580. }
  105581. }
  105582. return false;
  105583. }
  105584. function isVariableDeclarator(node, opts) {
  105585. if (!node)
  105586. return false;
  105587. const nodeType = node.type;
  105588. if (nodeType === "VariableDeclarator") {
  105589. if (typeof opts === "undefined") {
  105590. return true;
  105591. } else {
  105592. return (0, _shallowEqual.default)(node, opts);
  105593. }
  105594. }
  105595. return false;
  105596. }
  105597. function isWhileStatement(node, opts) {
  105598. if (!node)
  105599. return false;
  105600. const nodeType = node.type;
  105601. if (nodeType === "WhileStatement") {
  105602. if (typeof opts === "undefined") {
  105603. return true;
  105604. } else {
  105605. return (0, _shallowEqual.default)(node, opts);
  105606. }
  105607. }
  105608. return false;
  105609. }
  105610. function isWithStatement(node, opts) {
  105611. if (!node)
  105612. return false;
  105613. const nodeType = node.type;
  105614. if (nodeType === "WithStatement") {
  105615. if (typeof opts === "undefined") {
  105616. return true;
  105617. } else {
  105618. return (0, _shallowEqual.default)(node, opts);
  105619. }
  105620. }
  105621. return false;
  105622. }
  105623. function isAssignmentPattern(node, opts) {
  105624. if (!node)
  105625. return false;
  105626. const nodeType = node.type;
  105627. if (nodeType === "AssignmentPattern") {
  105628. if (typeof opts === "undefined") {
  105629. return true;
  105630. } else {
  105631. return (0, _shallowEqual.default)(node, opts);
  105632. }
  105633. }
  105634. return false;
  105635. }
  105636. function isArrayPattern(node, opts) {
  105637. if (!node)
  105638. return false;
  105639. const nodeType = node.type;
  105640. if (nodeType === "ArrayPattern") {
  105641. if (typeof opts === "undefined") {
  105642. return true;
  105643. } else {
  105644. return (0, _shallowEqual.default)(node, opts);
  105645. }
  105646. }
  105647. return false;
  105648. }
  105649. function isArrowFunctionExpression(node, opts) {
  105650. if (!node)
  105651. return false;
  105652. const nodeType = node.type;
  105653. if (nodeType === "ArrowFunctionExpression") {
  105654. if (typeof opts === "undefined") {
  105655. return true;
  105656. } else {
  105657. return (0, _shallowEqual.default)(node, opts);
  105658. }
  105659. }
  105660. return false;
  105661. }
  105662. function isClassBody(node, opts) {
  105663. if (!node)
  105664. return false;
  105665. const nodeType = node.type;
  105666. if (nodeType === "ClassBody") {
  105667. if (typeof opts === "undefined") {
  105668. return true;
  105669. } else {
  105670. return (0, _shallowEqual.default)(node, opts);
  105671. }
  105672. }
  105673. return false;
  105674. }
  105675. function isClassExpression(node, opts) {
  105676. if (!node)
  105677. return false;
  105678. const nodeType = node.type;
  105679. if (nodeType === "ClassExpression") {
  105680. if (typeof opts === "undefined") {
  105681. return true;
  105682. } else {
  105683. return (0, _shallowEqual.default)(node, opts);
  105684. }
  105685. }
  105686. return false;
  105687. }
  105688. function isClassDeclaration(node, opts) {
  105689. if (!node)
  105690. return false;
  105691. const nodeType = node.type;
  105692. if (nodeType === "ClassDeclaration") {
  105693. if (typeof opts === "undefined") {
  105694. return true;
  105695. } else {
  105696. return (0, _shallowEqual.default)(node, opts);
  105697. }
  105698. }
  105699. return false;
  105700. }
  105701. function isExportAllDeclaration(node, opts) {
  105702. if (!node)
  105703. return false;
  105704. const nodeType = node.type;
  105705. if (nodeType === "ExportAllDeclaration") {
  105706. if (typeof opts === "undefined") {
  105707. return true;
  105708. } else {
  105709. return (0, _shallowEqual.default)(node, opts);
  105710. }
  105711. }
  105712. return false;
  105713. }
  105714. function isExportDefaultDeclaration(node, opts) {
  105715. if (!node)
  105716. return false;
  105717. const nodeType = node.type;
  105718. if (nodeType === "ExportDefaultDeclaration") {
  105719. if (typeof opts === "undefined") {
  105720. return true;
  105721. } else {
  105722. return (0, _shallowEqual.default)(node, opts);
  105723. }
  105724. }
  105725. return false;
  105726. }
  105727. function isExportNamedDeclaration(node, opts) {
  105728. if (!node)
  105729. return false;
  105730. const nodeType = node.type;
  105731. if (nodeType === "ExportNamedDeclaration") {
  105732. if (typeof opts === "undefined") {
  105733. return true;
  105734. } else {
  105735. return (0, _shallowEqual.default)(node, opts);
  105736. }
  105737. }
  105738. return false;
  105739. }
  105740. function isExportSpecifier(node, opts) {
  105741. if (!node)
  105742. return false;
  105743. const nodeType = node.type;
  105744. if (nodeType === "ExportSpecifier") {
  105745. if (typeof opts === "undefined") {
  105746. return true;
  105747. } else {
  105748. return (0, _shallowEqual.default)(node, opts);
  105749. }
  105750. }
  105751. return false;
  105752. }
  105753. function isForOfStatement(node, opts) {
  105754. if (!node)
  105755. return false;
  105756. const nodeType = node.type;
  105757. if (nodeType === "ForOfStatement") {
  105758. if (typeof opts === "undefined") {
  105759. return true;
  105760. } else {
  105761. return (0, _shallowEqual.default)(node, opts);
  105762. }
  105763. }
  105764. return false;
  105765. }
  105766. function isImportDeclaration(node, opts) {
  105767. if (!node)
  105768. return false;
  105769. const nodeType = node.type;
  105770. if (nodeType === "ImportDeclaration") {
  105771. if (typeof opts === "undefined") {
  105772. return true;
  105773. } else {
  105774. return (0, _shallowEqual.default)(node, opts);
  105775. }
  105776. }
  105777. return false;
  105778. }
  105779. function isImportDefaultSpecifier(node, opts) {
  105780. if (!node)
  105781. return false;
  105782. const nodeType = node.type;
  105783. if (nodeType === "ImportDefaultSpecifier") {
  105784. if (typeof opts === "undefined") {
  105785. return true;
  105786. } else {
  105787. return (0, _shallowEqual.default)(node, opts);
  105788. }
  105789. }
  105790. return false;
  105791. }
  105792. function isImportNamespaceSpecifier(node, opts) {
  105793. if (!node)
  105794. return false;
  105795. const nodeType = node.type;
  105796. if (nodeType === "ImportNamespaceSpecifier") {
  105797. if (typeof opts === "undefined") {
  105798. return true;
  105799. } else {
  105800. return (0, _shallowEqual.default)(node, opts);
  105801. }
  105802. }
  105803. return false;
  105804. }
  105805. function isImportSpecifier(node, opts) {
  105806. if (!node)
  105807. return false;
  105808. const nodeType = node.type;
  105809. if (nodeType === "ImportSpecifier") {
  105810. if (typeof opts === "undefined") {
  105811. return true;
  105812. } else {
  105813. return (0, _shallowEqual.default)(node, opts);
  105814. }
  105815. }
  105816. return false;
  105817. }
  105818. function isMetaProperty(node, opts) {
  105819. if (!node)
  105820. return false;
  105821. const nodeType = node.type;
  105822. if (nodeType === "MetaProperty") {
  105823. if (typeof opts === "undefined") {
  105824. return true;
  105825. } else {
  105826. return (0, _shallowEqual.default)(node, opts);
  105827. }
  105828. }
  105829. return false;
  105830. }
  105831. function isClassMethod(node, opts) {
  105832. if (!node)
  105833. return false;
  105834. const nodeType = node.type;
  105835. if (nodeType === "ClassMethod") {
  105836. if (typeof opts === "undefined") {
  105837. return true;
  105838. } else {
  105839. return (0, _shallowEqual.default)(node, opts);
  105840. }
  105841. }
  105842. return false;
  105843. }
  105844. function isObjectPattern(node, opts) {
  105845. if (!node)
  105846. return false;
  105847. const nodeType = node.type;
  105848. if (nodeType === "ObjectPattern") {
  105849. if (typeof opts === "undefined") {
  105850. return true;
  105851. } else {
  105852. return (0, _shallowEqual.default)(node, opts);
  105853. }
  105854. }
  105855. return false;
  105856. }
  105857. function isSpreadElement(node, opts) {
  105858. if (!node)
  105859. return false;
  105860. const nodeType = node.type;
  105861. if (nodeType === "SpreadElement") {
  105862. if (typeof opts === "undefined") {
  105863. return true;
  105864. } else {
  105865. return (0, _shallowEqual.default)(node, opts);
  105866. }
  105867. }
  105868. return false;
  105869. }
  105870. function isSuper(node, opts) {
  105871. if (!node)
  105872. return false;
  105873. const nodeType = node.type;
  105874. if (nodeType === "Super") {
  105875. if (typeof opts === "undefined") {
  105876. return true;
  105877. } else {
  105878. return (0, _shallowEqual.default)(node, opts);
  105879. }
  105880. }
  105881. return false;
  105882. }
  105883. function isTaggedTemplateExpression(node, opts) {
  105884. if (!node)
  105885. return false;
  105886. const nodeType = node.type;
  105887. if (nodeType === "TaggedTemplateExpression") {
  105888. if (typeof opts === "undefined") {
  105889. return true;
  105890. } else {
  105891. return (0, _shallowEqual.default)(node, opts);
  105892. }
  105893. }
  105894. return false;
  105895. }
  105896. function isTemplateElement(node, opts) {
  105897. if (!node)
  105898. return false;
  105899. const nodeType = node.type;
  105900. if (nodeType === "TemplateElement") {
  105901. if (typeof opts === "undefined") {
  105902. return true;
  105903. } else {
  105904. return (0, _shallowEqual.default)(node, opts);
  105905. }
  105906. }
  105907. return false;
  105908. }
  105909. function isTemplateLiteral(node, opts) {
  105910. if (!node)
  105911. return false;
  105912. const nodeType = node.type;
  105913. if (nodeType === "TemplateLiteral") {
  105914. if (typeof opts === "undefined") {
  105915. return true;
  105916. } else {
  105917. return (0, _shallowEqual.default)(node, opts);
  105918. }
  105919. }
  105920. return false;
  105921. }
  105922. function isYieldExpression(node, opts) {
  105923. if (!node)
  105924. return false;
  105925. const nodeType = node.type;
  105926. if (nodeType === "YieldExpression") {
  105927. if (typeof opts === "undefined") {
  105928. return true;
  105929. } else {
  105930. return (0, _shallowEqual.default)(node, opts);
  105931. }
  105932. }
  105933. return false;
  105934. }
  105935. function isAwaitExpression(node, opts) {
  105936. if (!node)
  105937. return false;
  105938. const nodeType = node.type;
  105939. if (nodeType === "AwaitExpression") {
  105940. if (typeof opts === "undefined") {
  105941. return true;
  105942. } else {
  105943. return (0, _shallowEqual.default)(node, opts);
  105944. }
  105945. }
  105946. return false;
  105947. }
  105948. function isImport(node, opts) {
  105949. if (!node)
  105950. return false;
  105951. const nodeType = node.type;
  105952. if (nodeType === "Import") {
  105953. if (typeof opts === "undefined") {
  105954. return true;
  105955. } else {
  105956. return (0, _shallowEqual.default)(node, opts);
  105957. }
  105958. }
  105959. return false;
  105960. }
  105961. function isBigIntLiteral(node, opts) {
  105962. if (!node)
  105963. return false;
  105964. const nodeType = node.type;
  105965. if (nodeType === "BigIntLiteral") {
  105966. if (typeof opts === "undefined") {
  105967. return true;
  105968. } else {
  105969. return (0, _shallowEqual.default)(node, opts);
  105970. }
  105971. }
  105972. return false;
  105973. }
  105974. function isExportNamespaceSpecifier(node, opts) {
  105975. if (!node)
  105976. return false;
  105977. const nodeType = node.type;
  105978. if (nodeType === "ExportNamespaceSpecifier") {
  105979. if (typeof opts === "undefined") {
  105980. return true;
  105981. } else {
  105982. return (0, _shallowEqual.default)(node, opts);
  105983. }
  105984. }
  105985. return false;
  105986. }
  105987. function isOptionalMemberExpression(node, opts) {
  105988. if (!node)
  105989. return false;
  105990. const nodeType = node.type;
  105991. if (nodeType === "OptionalMemberExpression") {
  105992. if (typeof opts === "undefined") {
  105993. return true;
  105994. } else {
  105995. return (0, _shallowEqual.default)(node, opts);
  105996. }
  105997. }
  105998. return false;
  105999. }
  106000. function isOptionalCallExpression(node, opts) {
  106001. if (!node)
  106002. return false;
  106003. const nodeType = node.type;
  106004. if (nodeType === "OptionalCallExpression") {
  106005. if (typeof opts === "undefined") {
  106006. return true;
  106007. } else {
  106008. return (0, _shallowEqual.default)(node, opts);
  106009. }
  106010. }
  106011. return false;
  106012. }
  106013. function isAnyTypeAnnotation(node, opts) {
  106014. if (!node)
  106015. return false;
  106016. const nodeType = node.type;
  106017. if (nodeType === "AnyTypeAnnotation") {
  106018. if (typeof opts === "undefined") {
  106019. return true;
  106020. } else {
  106021. return (0, _shallowEqual.default)(node, opts);
  106022. }
  106023. }
  106024. return false;
  106025. }
  106026. function isArrayTypeAnnotation(node, opts) {
  106027. if (!node)
  106028. return false;
  106029. const nodeType = node.type;
  106030. if (nodeType === "ArrayTypeAnnotation") {
  106031. if (typeof opts === "undefined") {
  106032. return true;
  106033. } else {
  106034. return (0, _shallowEqual.default)(node, opts);
  106035. }
  106036. }
  106037. return false;
  106038. }
  106039. function isBooleanTypeAnnotation(node, opts) {
  106040. if (!node)
  106041. return false;
  106042. const nodeType = node.type;
  106043. if (nodeType === "BooleanTypeAnnotation") {
  106044. if (typeof opts === "undefined") {
  106045. return true;
  106046. } else {
  106047. return (0, _shallowEqual.default)(node, opts);
  106048. }
  106049. }
  106050. return false;
  106051. }
  106052. function isBooleanLiteralTypeAnnotation(node, opts) {
  106053. if (!node)
  106054. return false;
  106055. const nodeType = node.type;
  106056. if (nodeType === "BooleanLiteralTypeAnnotation") {
  106057. if (typeof opts === "undefined") {
  106058. return true;
  106059. } else {
  106060. return (0, _shallowEqual.default)(node, opts);
  106061. }
  106062. }
  106063. return false;
  106064. }
  106065. function isNullLiteralTypeAnnotation(node, opts) {
  106066. if (!node)
  106067. return false;
  106068. const nodeType = node.type;
  106069. if (nodeType === "NullLiteralTypeAnnotation") {
  106070. if (typeof opts === "undefined") {
  106071. return true;
  106072. } else {
  106073. return (0, _shallowEqual.default)(node, opts);
  106074. }
  106075. }
  106076. return false;
  106077. }
  106078. function isClassImplements(node, opts) {
  106079. if (!node)
  106080. return false;
  106081. const nodeType = node.type;
  106082. if (nodeType === "ClassImplements") {
  106083. if (typeof opts === "undefined") {
  106084. return true;
  106085. } else {
  106086. return (0, _shallowEqual.default)(node, opts);
  106087. }
  106088. }
  106089. return false;
  106090. }
  106091. function isDeclareClass(node, opts) {
  106092. if (!node)
  106093. return false;
  106094. const nodeType = node.type;
  106095. if (nodeType === "DeclareClass") {
  106096. if (typeof opts === "undefined") {
  106097. return true;
  106098. } else {
  106099. return (0, _shallowEqual.default)(node, opts);
  106100. }
  106101. }
  106102. return false;
  106103. }
  106104. function isDeclareFunction(node, opts) {
  106105. if (!node)
  106106. return false;
  106107. const nodeType = node.type;
  106108. if (nodeType === "DeclareFunction") {
  106109. if (typeof opts === "undefined") {
  106110. return true;
  106111. } else {
  106112. return (0, _shallowEqual.default)(node, opts);
  106113. }
  106114. }
  106115. return false;
  106116. }
  106117. function isDeclareInterface(node, opts) {
  106118. if (!node)
  106119. return false;
  106120. const nodeType = node.type;
  106121. if (nodeType === "DeclareInterface") {
  106122. if (typeof opts === "undefined") {
  106123. return true;
  106124. } else {
  106125. return (0, _shallowEqual.default)(node, opts);
  106126. }
  106127. }
  106128. return false;
  106129. }
  106130. function isDeclareModule(node, opts) {
  106131. if (!node)
  106132. return false;
  106133. const nodeType = node.type;
  106134. if (nodeType === "DeclareModule") {
  106135. if (typeof opts === "undefined") {
  106136. return true;
  106137. } else {
  106138. return (0, _shallowEqual.default)(node, opts);
  106139. }
  106140. }
  106141. return false;
  106142. }
  106143. function isDeclareModuleExports(node, opts) {
  106144. if (!node)
  106145. return false;
  106146. const nodeType = node.type;
  106147. if (nodeType === "DeclareModuleExports") {
  106148. if (typeof opts === "undefined") {
  106149. return true;
  106150. } else {
  106151. return (0, _shallowEqual.default)(node, opts);
  106152. }
  106153. }
  106154. return false;
  106155. }
  106156. function isDeclareTypeAlias(node, opts) {
  106157. if (!node)
  106158. return false;
  106159. const nodeType = node.type;
  106160. if (nodeType === "DeclareTypeAlias") {
  106161. if (typeof opts === "undefined") {
  106162. return true;
  106163. } else {
  106164. return (0, _shallowEqual.default)(node, opts);
  106165. }
  106166. }
  106167. return false;
  106168. }
  106169. function isDeclareOpaqueType(node, opts) {
  106170. if (!node)
  106171. return false;
  106172. const nodeType = node.type;
  106173. if (nodeType === "DeclareOpaqueType") {
  106174. if (typeof opts === "undefined") {
  106175. return true;
  106176. } else {
  106177. return (0, _shallowEqual.default)(node, opts);
  106178. }
  106179. }
  106180. return false;
  106181. }
  106182. function isDeclareVariable(node, opts) {
  106183. if (!node)
  106184. return false;
  106185. const nodeType = node.type;
  106186. if (nodeType === "DeclareVariable") {
  106187. if (typeof opts === "undefined") {
  106188. return true;
  106189. } else {
  106190. return (0, _shallowEqual.default)(node, opts);
  106191. }
  106192. }
  106193. return false;
  106194. }
  106195. function isDeclareExportDeclaration(node, opts) {
  106196. if (!node)
  106197. return false;
  106198. const nodeType = node.type;
  106199. if (nodeType === "DeclareExportDeclaration") {
  106200. if (typeof opts === "undefined") {
  106201. return true;
  106202. } else {
  106203. return (0, _shallowEqual.default)(node, opts);
  106204. }
  106205. }
  106206. return false;
  106207. }
  106208. function isDeclareExportAllDeclaration(node, opts) {
  106209. if (!node)
  106210. return false;
  106211. const nodeType = node.type;
  106212. if (nodeType === "DeclareExportAllDeclaration") {
  106213. if (typeof opts === "undefined") {
  106214. return true;
  106215. } else {
  106216. return (0, _shallowEqual.default)(node, opts);
  106217. }
  106218. }
  106219. return false;
  106220. }
  106221. function isDeclaredPredicate(node, opts) {
  106222. if (!node)
  106223. return false;
  106224. const nodeType = node.type;
  106225. if (nodeType === "DeclaredPredicate") {
  106226. if (typeof opts === "undefined") {
  106227. return true;
  106228. } else {
  106229. return (0, _shallowEqual.default)(node, opts);
  106230. }
  106231. }
  106232. return false;
  106233. }
  106234. function isExistsTypeAnnotation(node, opts) {
  106235. if (!node)
  106236. return false;
  106237. const nodeType = node.type;
  106238. if (nodeType === "ExistsTypeAnnotation") {
  106239. if (typeof opts === "undefined") {
  106240. return true;
  106241. } else {
  106242. return (0, _shallowEqual.default)(node, opts);
  106243. }
  106244. }
  106245. return false;
  106246. }
  106247. function isFunctionTypeAnnotation(node, opts) {
  106248. if (!node)
  106249. return false;
  106250. const nodeType = node.type;
  106251. if (nodeType === "FunctionTypeAnnotation") {
  106252. if (typeof opts === "undefined") {
  106253. return true;
  106254. } else {
  106255. return (0, _shallowEqual.default)(node, opts);
  106256. }
  106257. }
  106258. return false;
  106259. }
  106260. function isFunctionTypeParam(node, opts) {
  106261. if (!node)
  106262. return false;
  106263. const nodeType = node.type;
  106264. if (nodeType === "FunctionTypeParam") {
  106265. if (typeof opts === "undefined") {
  106266. return true;
  106267. } else {
  106268. return (0, _shallowEqual.default)(node, opts);
  106269. }
  106270. }
  106271. return false;
  106272. }
  106273. function isGenericTypeAnnotation(node, opts) {
  106274. if (!node)
  106275. return false;
  106276. const nodeType = node.type;
  106277. if (nodeType === "GenericTypeAnnotation") {
  106278. if (typeof opts === "undefined") {
  106279. return true;
  106280. } else {
  106281. return (0, _shallowEqual.default)(node, opts);
  106282. }
  106283. }
  106284. return false;
  106285. }
  106286. function isInferredPredicate(node, opts) {
  106287. if (!node)
  106288. return false;
  106289. const nodeType = node.type;
  106290. if (nodeType === "InferredPredicate") {
  106291. if (typeof opts === "undefined") {
  106292. return true;
  106293. } else {
  106294. return (0, _shallowEqual.default)(node, opts);
  106295. }
  106296. }
  106297. return false;
  106298. }
  106299. function isInterfaceExtends(node, opts) {
  106300. if (!node)
  106301. return false;
  106302. const nodeType = node.type;
  106303. if (nodeType === "InterfaceExtends") {
  106304. if (typeof opts === "undefined") {
  106305. return true;
  106306. } else {
  106307. return (0, _shallowEqual.default)(node, opts);
  106308. }
  106309. }
  106310. return false;
  106311. }
  106312. function isInterfaceDeclaration(node, opts) {
  106313. if (!node)
  106314. return false;
  106315. const nodeType = node.type;
  106316. if (nodeType === "InterfaceDeclaration") {
  106317. if (typeof opts === "undefined") {
  106318. return true;
  106319. } else {
  106320. return (0, _shallowEqual.default)(node, opts);
  106321. }
  106322. }
  106323. return false;
  106324. }
  106325. function isInterfaceTypeAnnotation(node, opts) {
  106326. if (!node)
  106327. return false;
  106328. const nodeType = node.type;
  106329. if (nodeType === "InterfaceTypeAnnotation") {
  106330. if (typeof opts === "undefined") {
  106331. return true;
  106332. } else {
  106333. return (0, _shallowEqual.default)(node, opts);
  106334. }
  106335. }
  106336. return false;
  106337. }
  106338. function isIntersectionTypeAnnotation(node, opts) {
  106339. if (!node)
  106340. return false;
  106341. const nodeType = node.type;
  106342. if (nodeType === "IntersectionTypeAnnotation") {
  106343. if (typeof opts === "undefined") {
  106344. return true;
  106345. } else {
  106346. return (0, _shallowEqual.default)(node, opts);
  106347. }
  106348. }
  106349. return false;
  106350. }
  106351. function isMixedTypeAnnotation(node, opts) {
  106352. if (!node)
  106353. return false;
  106354. const nodeType = node.type;
  106355. if (nodeType === "MixedTypeAnnotation") {
  106356. if (typeof opts === "undefined") {
  106357. return true;
  106358. } else {
  106359. return (0, _shallowEqual.default)(node, opts);
  106360. }
  106361. }
  106362. return false;
  106363. }
  106364. function isEmptyTypeAnnotation(node, opts) {
  106365. if (!node)
  106366. return false;
  106367. const nodeType = node.type;
  106368. if (nodeType === "EmptyTypeAnnotation") {
  106369. if (typeof opts === "undefined") {
  106370. return true;
  106371. } else {
  106372. return (0, _shallowEqual.default)(node, opts);
  106373. }
  106374. }
  106375. return false;
  106376. }
  106377. function isNullableTypeAnnotation(node, opts) {
  106378. if (!node)
  106379. return false;
  106380. const nodeType = node.type;
  106381. if (nodeType === "NullableTypeAnnotation") {
  106382. if (typeof opts === "undefined") {
  106383. return true;
  106384. } else {
  106385. return (0, _shallowEqual.default)(node, opts);
  106386. }
  106387. }
  106388. return false;
  106389. }
  106390. function isNumberLiteralTypeAnnotation(node, opts) {
  106391. if (!node)
  106392. return false;
  106393. const nodeType = node.type;
  106394. if (nodeType === "NumberLiteralTypeAnnotation") {
  106395. if (typeof opts === "undefined") {
  106396. return true;
  106397. } else {
  106398. return (0, _shallowEqual.default)(node, opts);
  106399. }
  106400. }
  106401. return false;
  106402. }
  106403. function isNumberTypeAnnotation(node, opts) {
  106404. if (!node)
  106405. return false;
  106406. const nodeType = node.type;
  106407. if (nodeType === "NumberTypeAnnotation") {
  106408. if (typeof opts === "undefined") {
  106409. return true;
  106410. } else {
  106411. return (0, _shallowEqual.default)(node, opts);
  106412. }
  106413. }
  106414. return false;
  106415. }
  106416. function isObjectTypeAnnotation(node, opts) {
  106417. if (!node)
  106418. return false;
  106419. const nodeType = node.type;
  106420. if (nodeType === "ObjectTypeAnnotation") {
  106421. if (typeof opts === "undefined") {
  106422. return true;
  106423. } else {
  106424. return (0, _shallowEqual.default)(node, opts);
  106425. }
  106426. }
  106427. return false;
  106428. }
  106429. function isObjectTypeInternalSlot(node, opts) {
  106430. if (!node)
  106431. return false;
  106432. const nodeType = node.type;
  106433. if (nodeType === "ObjectTypeInternalSlot") {
  106434. if (typeof opts === "undefined") {
  106435. return true;
  106436. } else {
  106437. return (0, _shallowEqual.default)(node, opts);
  106438. }
  106439. }
  106440. return false;
  106441. }
  106442. function isObjectTypeCallProperty(node, opts) {
  106443. if (!node)
  106444. return false;
  106445. const nodeType = node.type;
  106446. if (nodeType === "ObjectTypeCallProperty") {
  106447. if (typeof opts === "undefined") {
  106448. return true;
  106449. } else {
  106450. return (0, _shallowEqual.default)(node, opts);
  106451. }
  106452. }
  106453. return false;
  106454. }
  106455. function isObjectTypeIndexer(node, opts) {
  106456. if (!node)
  106457. return false;
  106458. const nodeType = node.type;
  106459. if (nodeType === "ObjectTypeIndexer") {
  106460. if (typeof opts === "undefined") {
  106461. return true;
  106462. } else {
  106463. return (0, _shallowEqual.default)(node, opts);
  106464. }
  106465. }
  106466. return false;
  106467. }
  106468. function isObjectTypeProperty(node, opts) {
  106469. if (!node)
  106470. return false;
  106471. const nodeType = node.type;
  106472. if (nodeType === "ObjectTypeProperty") {
  106473. if (typeof opts === "undefined") {
  106474. return true;
  106475. } else {
  106476. return (0, _shallowEqual.default)(node, opts);
  106477. }
  106478. }
  106479. return false;
  106480. }
  106481. function isObjectTypeSpreadProperty(node, opts) {
  106482. if (!node)
  106483. return false;
  106484. const nodeType = node.type;
  106485. if (nodeType === "ObjectTypeSpreadProperty") {
  106486. if (typeof opts === "undefined") {
  106487. return true;
  106488. } else {
  106489. return (0, _shallowEqual.default)(node, opts);
  106490. }
  106491. }
  106492. return false;
  106493. }
  106494. function isOpaqueType(node, opts) {
  106495. if (!node)
  106496. return false;
  106497. const nodeType = node.type;
  106498. if (nodeType === "OpaqueType") {
  106499. if (typeof opts === "undefined") {
  106500. return true;
  106501. } else {
  106502. return (0, _shallowEqual.default)(node, opts);
  106503. }
  106504. }
  106505. return false;
  106506. }
  106507. function isQualifiedTypeIdentifier(node, opts) {
  106508. if (!node)
  106509. return false;
  106510. const nodeType = node.type;
  106511. if (nodeType === "QualifiedTypeIdentifier") {
  106512. if (typeof opts === "undefined") {
  106513. return true;
  106514. } else {
  106515. return (0, _shallowEqual.default)(node, opts);
  106516. }
  106517. }
  106518. return false;
  106519. }
  106520. function isStringLiteralTypeAnnotation(node, opts) {
  106521. if (!node)
  106522. return false;
  106523. const nodeType = node.type;
  106524. if (nodeType === "StringLiteralTypeAnnotation") {
  106525. if (typeof opts === "undefined") {
  106526. return true;
  106527. } else {
  106528. return (0, _shallowEqual.default)(node, opts);
  106529. }
  106530. }
  106531. return false;
  106532. }
  106533. function isStringTypeAnnotation(node, opts) {
  106534. if (!node)
  106535. return false;
  106536. const nodeType = node.type;
  106537. if (nodeType === "StringTypeAnnotation") {
  106538. if (typeof opts === "undefined") {
  106539. return true;
  106540. } else {
  106541. return (0, _shallowEqual.default)(node, opts);
  106542. }
  106543. }
  106544. return false;
  106545. }
  106546. function isSymbolTypeAnnotation(node, opts) {
  106547. if (!node)
  106548. return false;
  106549. const nodeType = node.type;
  106550. if (nodeType === "SymbolTypeAnnotation") {
  106551. if (typeof opts === "undefined") {
  106552. return true;
  106553. } else {
  106554. return (0, _shallowEqual.default)(node, opts);
  106555. }
  106556. }
  106557. return false;
  106558. }
  106559. function isThisTypeAnnotation(node, opts) {
  106560. if (!node)
  106561. return false;
  106562. const nodeType = node.type;
  106563. if (nodeType === "ThisTypeAnnotation") {
  106564. if (typeof opts === "undefined") {
  106565. return true;
  106566. } else {
  106567. return (0, _shallowEqual.default)(node, opts);
  106568. }
  106569. }
  106570. return false;
  106571. }
  106572. function isTupleTypeAnnotation(node, opts) {
  106573. if (!node)
  106574. return false;
  106575. const nodeType = node.type;
  106576. if (nodeType === "TupleTypeAnnotation") {
  106577. if (typeof opts === "undefined") {
  106578. return true;
  106579. } else {
  106580. return (0, _shallowEqual.default)(node, opts);
  106581. }
  106582. }
  106583. return false;
  106584. }
  106585. function isTypeofTypeAnnotation(node, opts) {
  106586. if (!node)
  106587. return false;
  106588. const nodeType = node.type;
  106589. if (nodeType === "TypeofTypeAnnotation") {
  106590. if (typeof opts === "undefined") {
  106591. return true;
  106592. } else {
  106593. return (0, _shallowEqual.default)(node, opts);
  106594. }
  106595. }
  106596. return false;
  106597. }
  106598. function isTypeAlias(node, opts) {
  106599. if (!node)
  106600. return false;
  106601. const nodeType = node.type;
  106602. if (nodeType === "TypeAlias") {
  106603. if (typeof opts === "undefined") {
  106604. return true;
  106605. } else {
  106606. return (0, _shallowEqual.default)(node, opts);
  106607. }
  106608. }
  106609. return false;
  106610. }
  106611. function isTypeAnnotation(node, opts) {
  106612. if (!node)
  106613. return false;
  106614. const nodeType = node.type;
  106615. if (nodeType === "TypeAnnotation") {
  106616. if (typeof opts === "undefined") {
  106617. return true;
  106618. } else {
  106619. return (0, _shallowEqual.default)(node, opts);
  106620. }
  106621. }
  106622. return false;
  106623. }
  106624. function isTypeCastExpression(node, opts) {
  106625. if (!node)
  106626. return false;
  106627. const nodeType = node.type;
  106628. if (nodeType === "TypeCastExpression") {
  106629. if (typeof opts === "undefined") {
  106630. return true;
  106631. } else {
  106632. return (0, _shallowEqual.default)(node, opts);
  106633. }
  106634. }
  106635. return false;
  106636. }
  106637. function isTypeParameter(node, opts) {
  106638. if (!node)
  106639. return false;
  106640. const nodeType = node.type;
  106641. if (nodeType === "TypeParameter") {
  106642. if (typeof opts === "undefined") {
  106643. return true;
  106644. } else {
  106645. return (0, _shallowEqual.default)(node, opts);
  106646. }
  106647. }
  106648. return false;
  106649. }
  106650. function isTypeParameterDeclaration(node, opts) {
  106651. if (!node)
  106652. return false;
  106653. const nodeType = node.type;
  106654. if (nodeType === "TypeParameterDeclaration") {
  106655. if (typeof opts === "undefined") {
  106656. return true;
  106657. } else {
  106658. return (0, _shallowEqual.default)(node, opts);
  106659. }
  106660. }
  106661. return false;
  106662. }
  106663. function isTypeParameterInstantiation(node, opts) {
  106664. if (!node)
  106665. return false;
  106666. const nodeType = node.type;
  106667. if (nodeType === "TypeParameterInstantiation") {
  106668. if (typeof opts === "undefined") {
  106669. return true;
  106670. } else {
  106671. return (0, _shallowEqual.default)(node, opts);
  106672. }
  106673. }
  106674. return false;
  106675. }
  106676. function isUnionTypeAnnotation(node, opts) {
  106677. if (!node)
  106678. return false;
  106679. const nodeType = node.type;
  106680. if (nodeType === "UnionTypeAnnotation") {
  106681. if (typeof opts === "undefined") {
  106682. return true;
  106683. } else {
  106684. return (0, _shallowEqual.default)(node, opts);
  106685. }
  106686. }
  106687. return false;
  106688. }
  106689. function isVariance(node, opts) {
  106690. if (!node)
  106691. return false;
  106692. const nodeType = node.type;
  106693. if (nodeType === "Variance") {
  106694. if (typeof opts === "undefined") {
  106695. return true;
  106696. } else {
  106697. return (0, _shallowEqual.default)(node, opts);
  106698. }
  106699. }
  106700. return false;
  106701. }
  106702. function isVoidTypeAnnotation(node, opts) {
  106703. if (!node)
  106704. return false;
  106705. const nodeType = node.type;
  106706. if (nodeType === "VoidTypeAnnotation") {
  106707. if (typeof opts === "undefined") {
  106708. return true;
  106709. } else {
  106710. return (0, _shallowEqual.default)(node, opts);
  106711. }
  106712. }
  106713. return false;
  106714. }
  106715. function isEnumDeclaration(node, opts) {
  106716. if (!node)
  106717. return false;
  106718. const nodeType = node.type;
  106719. if (nodeType === "EnumDeclaration") {
  106720. if (typeof opts === "undefined") {
  106721. return true;
  106722. } else {
  106723. return (0, _shallowEqual.default)(node, opts);
  106724. }
  106725. }
  106726. return false;
  106727. }
  106728. function isEnumBooleanBody(node, opts) {
  106729. if (!node)
  106730. return false;
  106731. const nodeType = node.type;
  106732. if (nodeType === "EnumBooleanBody") {
  106733. if (typeof opts === "undefined") {
  106734. return true;
  106735. } else {
  106736. return (0, _shallowEqual.default)(node, opts);
  106737. }
  106738. }
  106739. return false;
  106740. }
  106741. function isEnumNumberBody(node, opts) {
  106742. if (!node)
  106743. return false;
  106744. const nodeType = node.type;
  106745. if (nodeType === "EnumNumberBody") {
  106746. if (typeof opts === "undefined") {
  106747. return true;
  106748. } else {
  106749. return (0, _shallowEqual.default)(node, opts);
  106750. }
  106751. }
  106752. return false;
  106753. }
  106754. function isEnumStringBody(node, opts) {
  106755. if (!node)
  106756. return false;
  106757. const nodeType = node.type;
  106758. if (nodeType === "EnumStringBody") {
  106759. if (typeof opts === "undefined") {
  106760. return true;
  106761. } else {
  106762. return (0, _shallowEqual.default)(node, opts);
  106763. }
  106764. }
  106765. return false;
  106766. }
  106767. function isEnumSymbolBody(node, opts) {
  106768. if (!node)
  106769. return false;
  106770. const nodeType = node.type;
  106771. if (nodeType === "EnumSymbolBody") {
  106772. if (typeof opts === "undefined") {
  106773. return true;
  106774. } else {
  106775. return (0, _shallowEqual.default)(node, opts);
  106776. }
  106777. }
  106778. return false;
  106779. }
  106780. function isEnumBooleanMember(node, opts) {
  106781. if (!node)
  106782. return false;
  106783. const nodeType = node.type;
  106784. if (nodeType === "EnumBooleanMember") {
  106785. if (typeof opts === "undefined") {
  106786. return true;
  106787. } else {
  106788. return (0, _shallowEqual.default)(node, opts);
  106789. }
  106790. }
  106791. return false;
  106792. }
  106793. function isEnumNumberMember(node, opts) {
  106794. if (!node)
  106795. return false;
  106796. const nodeType = node.type;
  106797. if (nodeType === "EnumNumberMember") {
  106798. if (typeof opts === "undefined") {
  106799. return true;
  106800. } else {
  106801. return (0, _shallowEqual.default)(node, opts);
  106802. }
  106803. }
  106804. return false;
  106805. }
  106806. function isEnumStringMember(node, opts) {
  106807. if (!node)
  106808. return false;
  106809. const nodeType = node.type;
  106810. if (nodeType === "EnumStringMember") {
  106811. if (typeof opts === "undefined") {
  106812. return true;
  106813. } else {
  106814. return (0, _shallowEqual.default)(node, opts);
  106815. }
  106816. }
  106817. return false;
  106818. }
  106819. function isEnumDefaultedMember(node, opts) {
  106820. if (!node)
  106821. return false;
  106822. const nodeType = node.type;
  106823. if (nodeType === "EnumDefaultedMember") {
  106824. if (typeof opts === "undefined") {
  106825. return true;
  106826. } else {
  106827. return (0, _shallowEqual.default)(node, opts);
  106828. }
  106829. }
  106830. return false;
  106831. }
  106832. function isIndexedAccessType(node, opts) {
  106833. if (!node)
  106834. return false;
  106835. const nodeType = node.type;
  106836. if (nodeType === "IndexedAccessType") {
  106837. if (typeof opts === "undefined") {
  106838. return true;
  106839. } else {
  106840. return (0, _shallowEqual.default)(node, opts);
  106841. }
  106842. }
  106843. return false;
  106844. }
  106845. function isOptionalIndexedAccessType(node, opts) {
  106846. if (!node)
  106847. return false;
  106848. const nodeType = node.type;
  106849. if (nodeType === "OptionalIndexedAccessType") {
  106850. if (typeof opts === "undefined") {
  106851. return true;
  106852. } else {
  106853. return (0, _shallowEqual.default)(node, opts);
  106854. }
  106855. }
  106856. return false;
  106857. }
  106858. function isJSXAttribute(node, opts) {
  106859. if (!node)
  106860. return false;
  106861. const nodeType = node.type;
  106862. if (nodeType === "JSXAttribute") {
  106863. if (typeof opts === "undefined") {
  106864. return true;
  106865. } else {
  106866. return (0, _shallowEqual.default)(node, opts);
  106867. }
  106868. }
  106869. return false;
  106870. }
  106871. function isJSXClosingElement(node, opts) {
  106872. if (!node)
  106873. return false;
  106874. const nodeType = node.type;
  106875. if (nodeType === "JSXClosingElement") {
  106876. if (typeof opts === "undefined") {
  106877. return true;
  106878. } else {
  106879. return (0, _shallowEqual.default)(node, opts);
  106880. }
  106881. }
  106882. return false;
  106883. }
  106884. function isJSXElement2(node, opts) {
  106885. if (!node)
  106886. return false;
  106887. const nodeType = node.type;
  106888. if (nodeType === "JSXElement") {
  106889. if (typeof opts === "undefined") {
  106890. return true;
  106891. } else {
  106892. return (0, _shallowEqual.default)(node, opts);
  106893. }
  106894. }
  106895. return false;
  106896. }
  106897. function isJSXEmptyExpression(node, opts) {
  106898. if (!node)
  106899. return false;
  106900. const nodeType = node.type;
  106901. if (nodeType === "JSXEmptyExpression") {
  106902. if (typeof opts === "undefined") {
  106903. return true;
  106904. } else {
  106905. return (0, _shallowEqual.default)(node, opts);
  106906. }
  106907. }
  106908. return false;
  106909. }
  106910. function isJSXExpressionContainer2(node, opts) {
  106911. if (!node)
  106912. return false;
  106913. const nodeType = node.type;
  106914. if (nodeType === "JSXExpressionContainer") {
  106915. if (typeof opts === "undefined") {
  106916. return true;
  106917. } else {
  106918. return (0, _shallowEqual.default)(node, opts);
  106919. }
  106920. }
  106921. return false;
  106922. }
  106923. function isJSXSpreadChild(node, opts) {
  106924. if (!node)
  106925. return false;
  106926. const nodeType = node.type;
  106927. if (nodeType === "JSXSpreadChild") {
  106928. if (typeof opts === "undefined") {
  106929. return true;
  106930. } else {
  106931. return (0, _shallowEqual.default)(node, opts);
  106932. }
  106933. }
  106934. return false;
  106935. }
  106936. function isJSXIdentifier2(node, opts) {
  106937. if (!node)
  106938. return false;
  106939. const nodeType = node.type;
  106940. if (nodeType === "JSXIdentifier") {
  106941. if (typeof opts === "undefined") {
  106942. return true;
  106943. } else {
  106944. return (0, _shallowEqual.default)(node, opts);
  106945. }
  106946. }
  106947. return false;
  106948. }
  106949. function isJSXMemberExpression(node, opts) {
  106950. if (!node)
  106951. return false;
  106952. const nodeType = node.type;
  106953. if (nodeType === "JSXMemberExpression") {
  106954. if (typeof opts === "undefined") {
  106955. return true;
  106956. } else {
  106957. return (0, _shallowEqual.default)(node, opts);
  106958. }
  106959. }
  106960. return false;
  106961. }
  106962. function isJSXNamespacedName(node, opts) {
  106963. if (!node)
  106964. return false;
  106965. const nodeType = node.type;
  106966. if (nodeType === "JSXNamespacedName") {
  106967. if (typeof opts === "undefined") {
  106968. return true;
  106969. } else {
  106970. return (0, _shallowEqual.default)(node, opts);
  106971. }
  106972. }
  106973. return false;
  106974. }
  106975. function isJSXOpeningElement(node, opts) {
  106976. if (!node)
  106977. return false;
  106978. const nodeType = node.type;
  106979. if (nodeType === "JSXOpeningElement") {
  106980. if (typeof opts === "undefined") {
  106981. return true;
  106982. } else {
  106983. return (0, _shallowEqual.default)(node, opts);
  106984. }
  106985. }
  106986. return false;
  106987. }
  106988. function isJSXSpreadAttribute(node, opts) {
  106989. if (!node)
  106990. return false;
  106991. const nodeType = node.type;
  106992. if (nodeType === "JSXSpreadAttribute") {
  106993. if (typeof opts === "undefined") {
  106994. return true;
  106995. } else {
  106996. return (0, _shallowEqual.default)(node, opts);
  106997. }
  106998. }
  106999. return false;
  107000. }
  107001. function isJSXText(node, opts) {
  107002. if (!node)
  107003. return false;
  107004. const nodeType = node.type;
  107005. if (nodeType === "JSXText") {
  107006. if (typeof opts === "undefined") {
  107007. return true;
  107008. } else {
  107009. return (0, _shallowEqual.default)(node, opts);
  107010. }
  107011. }
  107012. return false;
  107013. }
  107014. function isJSXFragment2(node, opts) {
  107015. if (!node)
  107016. return false;
  107017. const nodeType = node.type;
  107018. if (nodeType === "JSXFragment") {
  107019. if (typeof opts === "undefined") {
  107020. return true;
  107021. } else {
  107022. return (0, _shallowEqual.default)(node, opts);
  107023. }
  107024. }
  107025. return false;
  107026. }
  107027. function isJSXOpeningFragment(node, opts) {
  107028. if (!node)
  107029. return false;
  107030. const nodeType = node.type;
  107031. if (nodeType === "JSXOpeningFragment") {
  107032. if (typeof opts === "undefined") {
  107033. return true;
  107034. } else {
  107035. return (0, _shallowEqual.default)(node, opts);
  107036. }
  107037. }
  107038. return false;
  107039. }
  107040. function isJSXClosingFragment(node, opts) {
  107041. if (!node)
  107042. return false;
  107043. const nodeType = node.type;
  107044. if (nodeType === "JSXClosingFragment") {
  107045. if (typeof opts === "undefined") {
  107046. return true;
  107047. } else {
  107048. return (0, _shallowEqual.default)(node, opts);
  107049. }
  107050. }
  107051. return false;
  107052. }
  107053. function isNoop(node, opts) {
  107054. if (!node)
  107055. return false;
  107056. const nodeType = node.type;
  107057. if (nodeType === "Noop") {
  107058. if (typeof opts === "undefined") {
  107059. return true;
  107060. } else {
  107061. return (0, _shallowEqual.default)(node, opts);
  107062. }
  107063. }
  107064. return false;
  107065. }
  107066. function isPlaceholder(node, opts) {
  107067. if (!node)
  107068. return false;
  107069. const nodeType = node.type;
  107070. if (nodeType === "Placeholder") {
  107071. if (typeof opts === "undefined") {
  107072. return true;
  107073. } else {
  107074. return (0, _shallowEqual.default)(node, opts);
  107075. }
  107076. }
  107077. return false;
  107078. }
  107079. function isV8IntrinsicIdentifier(node, opts) {
  107080. if (!node)
  107081. return false;
  107082. const nodeType = node.type;
  107083. if (nodeType === "V8IntrinsicIdentifier") {
  107084. if (typeof opts === "undefined") {
  107085. return true;
  107086. } else {
  107087. return (0, _shallowEqual.default)(node, opts);
  107088. }
  107089. }
  107090. return false;
  107091. }
  107092. function isArgumentPlaceholder(node, opts) {
  107093. if (!node)
  107094. return false;
  107095. const nodeType = node.type;
  107096. if (nodeType === "ArgumentPlaceholder") {
  107097. if (typeof opts === "undefined") {
  107098. return true;
  107099. } else {
  107100. return (0, _shallowEqual.default)(node, opts);
  107101. }
  107102. }
  107103. return false;
  107104. }
  107105. function isBindExpression(node, opts) {
  107106. if (!node)
  107107. return false;
  107108. const nodeType = node.type;
  107109. if (nodeType === "BindExpression") {
  107110. if (typeof opts === "undefined") {
  107111. return true;
  107112. } else {
  107113. return (0, _shallowEqual.default)(node, opts);
  107114. }
  107115. }
  107116. return false;
  107117. }
  107118. function isClassProperty(node, opts) {
  107119. if (!node)
  107120. return false;
  107121. const nodeType = node.type;
  107122. if (nodeType === "ClassProperty") {
  107123. if (typeof opts === "undefined") {
  107124. return true;
  107125. } else {
  107126. return (0, _shallowEqual.default)(node, opts);
  107127. }
  107128. }
  107129. return false;
  107130. }
  107131. function isPipelineTopicExpression(node, opts) {
  107132. if (!node)
  107133. return false;
  107134. const nodeType = node.type;
  107135. if (nodeType === "PipelineTopicExpression") {
  107136. if (typeof opts === "undefined") {
  107137. return true;
  107138. } else {
  107139. return (0, _shallowEqual.default)(node, opts);
  107140. }
  107141. }
  107142. return false;
  107143. }
  107144. function isPipelineBareFunction(node, opts) {
  107145. if (!node)
  107146. return false;
  107147. const nodeType = node.type;
  107148. if (nodeType === "PipelineBareFunction") {
  107149. if (typeof opts === "undefined") {
  107150. return true;
  107151. } else {
  107152. return (0, _shallowEqual.default)(node, opts);
  107153. }
  107154. }
  107155. return false;
  107156. }
  107157. function isPipelinePrimaryTopicReference(node, opts) {
  107158. if (!node)
  107159. return false;
  107160. const nodeType = node.type;
  107161. if (nodeType === "PipelinePrimaryTopicReference") {
  107162. if (typeof opts === "undefined") {
  107163. return true;
  107164. } else {
  107165. return (0, _shallowEqual.default)(node, opts);
  107166. }
  107167. }
  107168. return false;
  107169. }
  107170. function isClassPrivateProperty(node, opts) {
  107171. if (!node)
  107172. return false;
  107173. const nodeType = node.type;
  107174. if (nodeType === "ClassPrivateProperty") {
  107175. if (typeof opts === "undefined") {
  107176. return true;
  107177. } else {
  107178. return (0, _shallowEqual.default)(node, opts);
  107179. }
  107180. }
  107181. return false;
  107182. }
  107183. function isClassPrivateMethod(node, opts) {
  107184. if (!node)
  107185. return false;
  107186. const nodeType = node.type;
  107187. if (nodeType === "ClassPrivateMethod") {
  107188. if (typeof opts === "undefined") {
  107189. return true;
  107190. } else {
  107191. return (0, _shallowEqual.default)(node, opts);
  107192. }
  107193. }
  107194. return false;
  107195. }
  107196. function isImportAttribute(node, opts) {
  107197. if (!node)
  107198. return false;
  107199. const nodeType = node.type;
  107200. if (nodeType === "ImportAttribute") {
  107201. if (typeof opts === "undefined") {
  107202. return true;
  107203. } else {
  107204. return (0, _shallowEqual.default)(node, opts);
  107205. }
  107206. }
  107207. return false;
  107208. }
  107209. function isDecorator(node, opts) {
  107210. if (!node)
  107211. return false;
  107212. const nodeType = node.type;
  107213. if (nodeType === "Decorator") {
  107214. if (typeof opts === "undefined") {
  107215. return true;
  107216. } else {
  107217. return (0, _shallowEqual.default)(node, opts);
  107218. }
  107219. }
  107220. return false;
  107221. }
  107222. function isDoExpression(node, opts) {
  107223. if (!node)
  107224. return false;
  107225. const nodeType = node.type;
  107226. if (nodeType === "DoExpression") {
  107227. if (typeof opts === "undefined") {
  107228. return true;
  107229. } else {
  107230. return (0, _shallowEqual.default)(node, opts);
  107231. }
  107232. }
  107233. return false;
  107234. }
  107235. function isExportDefaultSpecifier(node, opts) {
  107236. if (!node)
  107237. return false;
  107238. const nodeType = node.type;
  107239. if (nodeType === "ExportDefaultSpecifier") {
  107240. if (typeof opts === "undefined") {
  107241. return true;
  107242. } else {
  107243. return (0, _shallowEqual.default)(node, opts);
  107244. }
  107245. }
  107246. return false;
  107247. }
  107248. function isPrivateName(node, opts) {
  107249. if (!node)
  107250. return false;
  107251. const nodeType = node.type;
  107252. if (nodeType === "PrivateName") {
  107253. if (typeof opts === "undefined") {
  107254. return true;
  107255. } else {
  107256. return (0, _shallowEqual.default)(node, opts);
  107257. }
  107258. }
  107259. return false;
  107260. }
  107261. function isRecordExpression(node, opts) {
  107262. if (!node)
  107263. return false;
  107264. const nodeType = node.type;
  107265. if (nodeType === "RecordExpression") {
  107266. if (typeof opts === "undefined") {
  107267. return true;
  107268. } else {
  107269. return (0, _shallowEqual.default)(node, opts);
  107270. }
  107271. }
  107272. return false;
  107273. }
  107274. function isTupleExpression(node, opts) {
  107275. if (!node)
  107276. return false;
  107277. const nodeType = node.type;
  107278. if (nodeType === "TupleExpression") {
  107279. if (typeof opts === "undefined") {
  107280. return true;
  107281. } else {
  107282. return (0, _shallowEqual.default)(node, opts);
  107283. }
  107284. }
  107285. return false;
  107286. }
  107287. function isDecimalLiteral(node, opts) {
  107288. if (!node)
  107289. return false;
  107290. const nodeType = node.type;
  107291. if (nodeType === "DecimalLiteral") {
  107292. if (typeof opts === "undefined") {
  107293. return true;
  107294. } else {
  107295. return (0, _shallowEqual.default)(node, opts);
  107296. }
  107297. }
  107298. return false;
  107299. }
  107300. function isStaticBlock(node, opts) {
  107301. if (!node)
  107302. return false;
  107303. const nodeType = node.type;
  107304. if (nodeType === "StaticBlock") {
  107305. if (typeof opts === "undefined") {
  107306. return true;
  107307. } else {
  107308. return (0, _shallowEqual.default)(node, opts);
  107309. }
  107310. }
  107311. return false;
  107312. }
  107313. function isModuleExpression(node, opts) {
  107314. if (!node)
  107315. return false;
  107316. const nodeType = node.type;
  107317. if (nodeType === "ModuleExpression") {
  107318. if (typeof opts === "undefined") {
  107319. return true;
  107320. } else {
  107321. return (0, _shallowEqual.default)(node, opts);
  107322. }
  107323. }
  107324. return false;
  107325. }
  107326. function isTSParameterProperty(node, opts) {
  107327. if (!node)
  107328. return false;
  107329. const nodeType = node.type;
  107330. if (nodeType === "TSParameterProperty") {
  107331. if (typeof opts === "undefined") {
  107332. return true;
  107333. } else {
  107334. return (0, _shallowEqual.default)(node, opts);
  107335. }
  107336. }
  107337. return false;
  107338. }
  107339. function isTSDeclareFunction(node, opts) {
  107340. if (!node)
  107341. return false;
  107342. const nodeType = node.type;
  107343. if (nodeType === "TSDeclareFunction") {
  107344. if (typeof opts === "undefined") {
  107345. return true;
  107346. } else {
  107347. return (0, _shallowEqual.default)(node, opts);
  107348. }
  107349. }
  107350. return false;
  107351. }
  107352. function isTSDeclareMethod(node, opts) {
  107353. if (!node)
  107354. return false;
  107355. const nodeType = node.type;
  107356. if (nodeType === "TSDeclareMethod") {
  107357. if (typeof opts === "undefined") {
  107358. return true;
  107359. } else {
  107360. return (0, _shallowEqual.default)(node, opts);
  107361. }
  107362. }
  107363. return false;
  107364. }
  107365. function isTSQualifiedName(node, opts) {
  107366. if (!node)
  107367. return false;
  107368. const nodeType = node.type;
  107369. if (nodeType === "TSQualifiedName") {
  107370. if (typeof opts === "undefined") {
  107371. return true;
  107372. } else {
  107373. return (0, _shallowEqual.default)(node, opts);
  107374. }
  107375. }
  107376. return false;
  107377. }
  107378. function isTSCallSignatureDeclaration(node, opts) {
  107379. if (!node)
  107380. return false;
  107381. const nodeType = node.type;
  107382. if (nodeType === "TSCallSignatureDeclaration") {
  107383. if (typeof opts === "undefined") {
  107384. return true;
  107385. } else {
  107386. return (0, _shallowEqual.default)(node, opts);
  107387. }
  107388. }
  107389. return false;
  107390. }
  107391. function isTSConstructSignatureDeclaration(node, opts) {
  107392. if (!node)
  107393. return false;
  107394. const nodeType = node.type;
  107395. if (nodeType === "TSConstructSignatureDeclaration") {
  107396. if (typeof opts === "undefined") {
  107397. return true;
  107398. } else {
  107399. return (0, _shallowEqual.default)(node, opts);
  107400. }
  107401. }
  107402. return false;
  107403. }
  107404. function isTSPropertySignature(node, opts) {
  107405. if (!node)
  107406. return false;
  107407. const nodeType = node.type;
  107408. if (nodeType === "TSPropertySignature") {
  107409. if (typeof opts === "undefined") {
  107410. return true;
  107411. } else {
  107412. return (0, _shallowEqual.default)(node, opts);
  107413. }
  107414. }
  107415. return false;
  107416. }
  107417. function isTSMethodSignature(node, opts) {
  107418. if (!node)
  107419. return false;
  107420. const nodeType = node.type;
  107421. if (nodeType === "TSMethodSignature") {
  107422. if (typeof opts === "undefined") {
  107423. return true;
  107424. } else {
  107425. return (0, _shallowEqual.default)(node, opts);
  107426. }
  107427. }
  107428. return false;
  107429. }
  107430. function isTSIndexSignature(node, opts) {
  107431. if (!node)
  107432. return false;
  107433. const nodeType = node.type;
  107434. if (nodeType === "TSIndexSignature") {
  107435. if (typeof opts === "undefined") {
  107436. return true;
  107437. } else {
  107438. return (0, _shallowEqual.default)(node, opts);
  107439. }
  107440. }
  107441. return false;
  107442. }
  107443. function isTSAnyKeyword(node, opts) {
  107444. if (!node)
  107445. return false;
  107446. const nodeType = node.type;
  107447. if (nodeType === "TSAnyKeyword") {
  107448. if (typeof opts === "undefined") {
  107449. return true;
  107450. } else {
  107451. return (0, _shallowEqual.default)(node, opts);
  107452. }
  107453. }
  107454. return false;
  107455. }
  107456. function isTSBooleanKeyword(node, opts) {
  107457. if (!node)
  107458. return false;
  107459. const nodeType = node.type;
  107460. if (nodeType === "TSBooleanKeyword") {
  107461. if (typeof opts === "undefined") {
  107462. return true;
  107463. } else {
  107464. return (0, _shallowEqual.default)(node, opts);
  107465. }
  107466. }
  107467. return false;
  107468. }
  107469. function isTSBigIntKeyword(node, opts) {
  107470. if (!node)
  107471. return false;
  107472. const nodeType = node.type;
  107473. if (nodeType === "TSBigIntKeyword") {
  107474. if (typeof opts === "undefined") {
  107475. return true;
  107476. } else {
  107477. return (0, _shallowEqual.default)(node, opts);
  107478. }
  107479. }
  107480. return false;
  107481. }
  107482. function isTSIntrinsicKeyword(node, opts) {
  107483. if (!node)
  107484. return false;
  107485. const nodeType = node.type;
  107486. if (nodeType === "TSIntrinsicKeyword") {
  107487. if (typeof opts === "undefined") {
  107488. return true;
  107489. } else {
  107490. return (0, _shallowEqual.default)(node, opts);
  107491. }
  107492. }
  107493. return false;
  107494. }
  107495. function isTSNeverKeyword(node, opts) {
  107496. if (!node)
  107497. return false;
  107498. const nodeType = node.type;
  107499. if (nodeType === "TSNeverKeyword") {
  107500. if (typeof opts === "undefined") {
  107501. return true;
  107502. } else {
  107503. return (0, _shallowEqual.default)(node, opts);
  107504. }
  107505. }
  107506. return false;
  107507. }
  107508. function isTSNullKeyword(node, opts) {
  107509. if (!node)
  107510. return false;
  107511. const nodeType = node.type;
  107512. if (nodeType === "TSNullKeyword") {
  107513. if (typeof opts === "undefined") {
  107514. return true;
  107515. } else {
  107516. return (0, _shallowEqual.default)(node, opts);
  107517. }
  107518. }
  107519. return false;
  107520. }
  107521. function isTSNumberKeyword(node, opts) {
  107522. if (!node)
  107523. return false;
  107524. const nodeType = node.type;
  107525. if (nodeType === "TSNumberKeyword") {
  107526. if (typeof opts === "undefined") {
  107527. return true;
  107528. } else {
  107529. return (0, _shallowEqual.default)(node, opts);
  107530. }
  107531. }
  107532. return false;
  107533. }
  107534. function isTSObjectKeyword(node, opts) {
  107535. if (!node)
  107536. return false;
  107537. const nodeType = node.type;
  107538. if (nodeType === "TSObjectKeyword") {
  107539. if (typeof opts === "undefined") {
  107540. return true;
  107541. } else {
  107542. return (0, _shallowEqual.default)(node, opts);
  107543. }
  107544. }
  107545. return false;
  107546. }
  107547. function isTSStringKeyword(node, opts) {
  107548. if (!node)
  107549. return false;
  107550. const nodeType = node.type;
  107551. if (nodeType === "TSStringKeyword") {
  107552. if (typeof opts === "undefined") {
  107553. return true;
  107554. } else {
  107555. return (0, _shallowEqual.default)(node, opts);
  107556. }
  107557. }
  107558. return false;
  107559. }
  107560. function isTSSymbolKeyword(node, opts) {
  107561. if (!node)
  107562. return false;
  107563. const nodeType = node.type;
  107564. if (nodeType === "TSSymbolKeyword") {
  107565. if (typeof opts === "undefined") {
  107566. return true;
  107567. } else {
  107568. return (0, _shallowEqual.default)(node, opts);
  107569. }
  107570. }
  107571. return false;
  107572. }
  107573. function isTSUndefinedKeyword(node, opts) {
  107574. if (!node)
  107575. return false;
  107576. const nodeType = node.type;
  107577. if (nodeType === "TSUndefinedKeyword") {
  107578. if (typeof opts === "undefined") {
  107579. return true;
  107580. } else {
  107581. return (0, _shallowEqual.default)(node, opts);
  107582. }
  107583. }
  107584. return false;
  107585. }
  107586. function isTSUnknownKeyword(node, opts) {
  107587. if (!node)
  107588. return false;
  107589. const nodeType = node.type;
  107590. if (nodeType === "TSUnknownKeyword") {
  107591. if (typeof opts === "undefined") {
  107592. return true;
  107593. } else {
  107594. return (0, _shallowEqual.default)(node, opts);
  107595. }
  107596. }
  107597. return false;
  107598. }
  107599. function isTSVoidKeyword(node, opts) {
  107600. if (!node)
  107601. return false;
  107602. const nodeType = node.type;
  107603. if (nodeType === "TSVoidKeyword") {
  107604. if (typeof opts === "undefined") {
  107605. return true;
  107606. } else {
  107607. return (0, _shallowEqual.default)(node, opts);
  107608. }
  107609. }
  107610. return false;
  107611. }
  107612. function isTSThisType(node, opts) {
  107613. if (!node)
  107614. return false;
  107615. const nodeType = node.type;
  107616. if (nodeType === "TSThisType") {
  107617. if (typeof opts === "undefined") {
  107618. return true;
  107619. } else {
  107620. return (0, _shallowEqual.default)(node, opts);
  107621. }
  107622. }
  107623. return false;
  107624. }
  107625. function isTSFunctionType(node, opts) {
  107626. if (!node)
  107627. return false;
  107628. const nodeType = node.type;
  107629. if (nodeType === "TSFunctionType") {
  107630. if (typeof opts === "undefined") {
  107631. return true;
  107632. } else {
  107633. return (0, _shallowEqual.default)(node, opts);
  107634. }
  107635. }
  107636. return false;
  107637. }
  107638. function isTSConstructorType(node, opts) {
  107639. if (!node)
  107640. return false;
  107641. const nodeType = node.type;
  107642. if (nodeType === "TSConstructorType") {
  107643. if (typeof opts === "undefined") {
  107644. return true;
  107645. } else {
  107646. return (0, _shallowEqual.default)(node, opts);
  107647. }
  107648. }
  107649. return false;
  107650. }
  107651. function isTSTypeReference(node, opts) {
  107652. if (!node)
  107653. return false;
  107654. const nodeType = node.type;
  107655. if (nodeType === "TSTypeReference") {
  107656. if (typeof opts === "undefined") {
  107657. return true;
  107658. } else {
  107659. return (0, _shallowEqual.default)(node, opts);
  107660. }
  107661. }
  107662. return false;
  107663. }
  107664. function isTSTypePredicate(node, opts) {
  107665. if (!node)
  107666. return false;
  107667. const nodeType = node.type;
  107668. if (nodeType === "TSTypePredicate") {
  107669. if (typeof opts === "undefined") {
  107670. return true;
  107671. } else {
  107672. return (0, _shallowEqual.default)(node, opts);
  107673. }
  107674. }
  107675. return false;
  107676. }
  107677. function isTSTypeQuery(node, opts) {
  107678. if (!node)
  107679. return false;
  107680. const nodeType = node.type;
  107681. if (nodeType === "TSTypeQuery") {
  107682. if (typeof opts === "undefined") {
  107683. return true;
  107684. } else {
  107685. return (0, _shallowEqual.default)(node, opts);
  107686. }
  107687. }
  107688. return false;
  107689. }
  107690. function isTSTypeLiteral(node, opts) {
  107691. if (!node)
  107692. return false;
  107693. const nodeType = node.type;
  107694. if (nodeType === "TSTypeLiteral") {
  107695. if (typeof opts === "undefined") {
  107696. return true;
  107697. } else {
  107698. return (0, _shallowEqual.default)(node, opts);
  107699. }
  107700. }
  107701. return false;
  107702. }
  107703. function isTSArrayType(node, opts) {
  107704. if (!node)
  107705. return false;
  107706. const nodeType = node.type;
  107707. if (nodeType === "TSArrayType") {
  107708. if (typeof opts === "undefined") {
  107709. return true;
  107710. } else {
  107711. return (0, _shallowEqual.default)(node, opts);
  107712. }
  107713. }
  107714. return false;
  107715. }
  107716. function isTSTupleType(node, opts) {
  107717. if (!node)
  107718. return false;
  107719. const nodeType = node.type;
  107720. if (nodeType === "TSTupleType") {
  107721. if (typeof opts === "undefined") {
  107722. return true;
  107723. } else {
  107724. return (0, _shallowEqual.default)(node, opts);
  107725. }
  107726. }
  107727. return false;
  107728. }
  107729. function isTSOptionalType(node, opts) {
  107730. if (!node)
  107731. return false;
  107732. const nodeType = node.type;
  107733. if (nodeType === "TSOptionalType") {
  107734. if (typeof opts === "undefined") {
  107735. return true;
  107736. } else {
  107737. return (0, _shallowEqual.default)(node, opts);
  107738. }
  107739. }
  107740. return false;
  107741. }
  107742. function isTSRestType(node, opts) {
  107743. if (!node)
  107744. return false;
  107745. const nodeType = node.type;
  107746. if (nodeType === "TSRestType") {
  107747. if (typeof opts === "undefined") {
  107748. return true;
  107749. } else {
  107750. return (0, _shallowEqual.default)(node, opts);
  107751. }
  107752. }
  107753. return false;
  107754. }
  107755. function isTSNamedTupleMember(node, opts) {
  107756. if (!node)
  107757. return false;
  107758. const nodeType = node.type;
  107759. if (nodeType === "TSNamedTupleMember") {
  107760. if (typeof opts === "undefined") {
  107761. return true;
  107762. } else {
  107763. return (0, _shallowEqual.default)(node, opts);
  107764. }
  107765. }
  107766. return false;
  107767. }
  107768. function isTSUnionType(node, opts) {
  107769. if (!node)
  107770. return false;
  107771. const nodeType = node.type;
  107772. if (nodeType === "TSUnionType") {
  107773. if (typeof opts === "undefined") {
  107774. return true;
  107775. } else {
  107776. return (0, _shallowEqual.default)(node, opts);
  107777. }
  107778. }
  107779. return false;
  107780. }
  107781. function isTSIntersectionType(node, opts) {
  107782. if (!node)
  107783. return false;
  107784. const nodeType = node.type;
  107785. if (nodeType === "TSIntersectionType") {
  107786. if (typeof opts === "undefined") {
  107787. return true;
  107788. } else {
  107789. return (0, _shallowEqual.default)(node, opts);
  107790. }
  107791. }
  107792. return false;
  107793. }
  107794. function isTSConditionalType(node, opts) {
  107795. if (!node)
  107796. return false;
  107797. const nodeType = node.type;
  107798. if (nodeType === "TSConditionalType") {
  107799. if (typeof opts === "undefined") {
  107800. return true;
  107801. } else {
  107802. return (0, _shallowEqual.default)(node, opts);
  107803. }
  107804. }
  107805. return false;
  107806. }
  107807. function isTSInferType(node, opts) {
  107808. if (!node)
  107809. return false;
  107810. const nodeType = node.type;
  107811. if (nodeType === "TSInferType") {
  107812. if (typeof opts === "undefined") {
  107813. return true;
  107814. } else {
  107815. return (0, _shallowEqual.default)(node, opts);
  107816. }
  107817. }
  107818. return false;
  107819. }
  107820. function isTSParenthesizedType(node, opts) {
  107821. if (!node)
  107822. return false;
  107823. const nodeType = node.type;
  107824. if (nodeType === "TSParenthesizedType") {
  107825. if (typeof opts === "undefined") {
  107826. return true;
  107827. } else {
  107828. return (0, _shallowEqual.default)(node, opts);
  107829. }
  107830. }
  107831. return false;
  107832. }
  107833. function isTSTypeOperator(node, opts) {
  107834. if (!node)
  107835. return false;
  107836. const nodeType = node.type;
  107837. if (nodeType === "TSTypeOperator") {
  107838. if (typeof opts === "undefined") {
  107839. return true;
  107840. } else {
  107841. return (0, _shallowEqual.default)(node, opts);
  107842. }
  107843. }
  107844. return false;
  107845. }
  107846. function isTSIndexedAccessType(node, opts) {
  107847. if (!node)
  107848. return false;
  107849. const nodeType = node.type;
  107850. if (nodeType === "TSIndexedAccessType") {
  107851. if (typeof opts === "undefined") {
  107852. return true;
  107853. } else {
  107854. return (0, _shallowEqual.default)(node, opts);
  107855. }
  107856. }
  107857. return false;
  107858. }
  107859. function isTSMappedType(node, opts) {
  107860. if (!node)
  107861. return false;
  107862. const nodeType = node.type;
  107863. if (nodeType === "TSMappedType") {
  107864. if (typeof opts === "undefined") {
  107865. return true;
  107866. } else {
  107867. return (0, _shallowEqual.default)(node, opts);
  107868. }
  107869. }
  107870. return false;
  107871. }
  107872. function isTSLiteralType(node, opts) {
  107873. if (!node)
  107874. return false;
  107875. const nodeType = node.type;
  107876. if (nodeType === "TSLiteralType") {
  107877. if (typeof opts === "undefined") {
  107878. return true;
  107879. } else {
  107880. return (0, _shallowEqual.default)(node, opts);
  107881. }
  107882. }
  107883. return false;
  107884. }
  107885. function isTSExpressionWithTypeArguments(node, opts) {
  107886. if (!node)
  107887. return false;
  107888. const nodeType = node.type;
  107889. if (nodeType === "TSExpressionWithTypeArguments") {
  107890. if (typeof opts === "undefined") {
  107891. return true;
  107892. } else {
  107893. return (0, _shallowEqual.default)(node, opts);
  107894. }
  107895. }
  107896. return false;
  107897. }
  107898. function isTSInterfaceDeclaration(node, opts) {
  107899. if (!node)
  107900. return false;
  107901. const nodeType = node.type;
  107902. if (nodeType === "TSInterfaceDeclaration") {
  107903. if (typeof opts === "undefined") {
  107904. return true;
  107905. } else {
  107906. return (0, _shallowEqual.default)(node, opts);
  107907. }
  107908. }
  107909. return false;
  107910. }
  107911. function isTSInterfaceBody(node, opts) {
  107912. if (!node)
  107913. return false;
  107914. const nodeType = node.type;
  107915. if (nodeType === "TSInterfaceBody") {
  107916. if (typeof opts === "undefined") {
  107917. return true;
  107918. } else {
  107919. return (0, _shallowEqual.default)(node, opts);
  107920. }
  107921. }
  107922. return false;
  107923. }
  107924. function isTSTypeAliasDeclaration(node, opts) {
  107925. if (!node)
  107926. return false;
  107927. const nodeType = node.type;
  107928. if (nodeType === "TSTypeAliasDeclaration") {
  107929. if (typeof opts === "undefined") {
  107930. return true;
  107931. } else {
  107932. return (0, _shallowEqual.default)(node, opts);
  107933. }
  107934. }
  107935. return false;
  107936. }
  107937. function isTSAsExpression(node, opts) {
  107938. if (!node)
  107939. return false;
  107940. const nodeType = node.type;
  107941. if (nodeType === "TSAsExpression") {
  107942. if (typeof opts === "undefined") {
  107943. return true;
  107944. } else {
  107945. return (0, _shallowEqual.default)(node, opts);
  107946. }
  107947. }
  107948. return false;
  107949. }
  107950. function isTSTypeAssertion(node, opts) {
  107951. if (!node)
  107952. return false;
  107953. const nodeType = node.type;
  107954. if (nodeType === "TSTypeAssertion") {
  107955. if (typeof opts === "undefined") {
  107956. return true;
  107957. } else {
  107958. return (0, _shallowEqual.default)(node, opts);
  107959. }
  107960. }
  107961. return false;
  107962. }
  107963. function isTSEnumDeclaration(node, opts) {
  107964. if (!node)
  107965. return false;
  107966. const nodeType = node.type;
  107967. if (nodeType === "TSEnumDeclaration") {
  107968. if (typeof opts === "undefined") {
  107969. return true;
  107970. } else {
  107971. return (0, _shallowEqual.default)(node, opts);
  107972. }
  107973. }
  107974. return false;
  107975. }
  107976. function isTSEnumMember(node, opts) {
  107977. if (!node)
  107978. return false;
  107979. const nodeType = node.type;
  107980. if (nodeType === "TSEnumMember") {
  107981. if (typeof opts === "undefined") {
  107982. return true;
  107983. } else {
  107984. return (0, _shallowEqual.default)(node, opts);
  107985. }
  107986. }
  107987. return false;
  107988. }
  107989. function isTSModuleDeclaration(node, opts) {
  107990. if (!node)
  107991. return false;
  107992. const nodeType = node.type;
  107993. if (nodeType === "TSModuleDeclaration") {
  107994. if (typeof opts === "undefined") {
  107995. return true;
  107996. } else {
  107997. return (0, _shallowEqual.default)(node, opts);
  107998. }
  107999. }
  108000. return false;
  108001. }
  108002. function isTSModuleBlock(node, opts) {
  108003. if (!node)
  108004. return false;
  108005. const nodeType = node.type;
  108006. if (nodeType === "TSModuleBlock") {
  108007. if (typeof opts === "undefined") {
  108008. return true;
  108009. } else {
  108010. return (0, _shallowEqual.default)(node, opts);
  108011. }
  108012. }
  108013. return false;
  108014. }
  108015. function isTSImportType(node, opts) {
  108016. if (!node)
  108017. return false;
  108018. const nodeType = node.type;
  108019. if (nodeType === "TSImportType") {
  108020. if (typeof opts === "undefined") {
  108021. return true;
  108022. } else {
  108023. return (0, _shallowEqual.default)(node, opts);
  108024. }
  108025. }
  108026. return false;
  108027. }
  108028. function isTSImportEqualsDeclaration(node, opts) {
  108029. if (!node)
  108030. return false;
  108031. const nodeType = node.type;
  108032. if (nodeType === "TSImportEqualsDeclaration") {
  108033. if (typeof opts === "undefined") {
  108034. return true;
  108035. } else {
  108036. return (0, _shallowEqual.default)(node, opts);
  108037. }
  108038. }
  108039. return false;
  108040. }
  108041. function isTSExternalModuleReference(node, opts) {
  108042. if (!node)
  108043. return false;
  108044. const nodeType = node.type;
  108045. if (nodeType === "TSExternalModuleReference") {
  108046. if (typeof opts === "undefined") {
  108047. return true;
  108048. } else {
  108049. return (0, _shallowEqual.default)(node, opts);
  108050. }
  108051. }
  108052. return false;
  108053. }
  108054. function isTSNonNullExpression(node, opts) {
  108055. if (!node)
  108056. return false;
  108057. const nodeType = node.type;
  108058. if (nodeType === "TSNonNullExpression") {
  108059. if (typeof opts === "undefined") {
  108060. return true;
  108061. } else {
  108062. return (0, _shallowEqual.default)(node, opts);
  108063. }
  108064. }
  108065. return false;
  108066. }
  108067. function isTSExportAssignment(node, opts) {
  108068. if (!node)
  108069. return false;
  108070. const nodeType = node.type;
  108071. if (nodeType === "TSExportAssignment") {
  108072. if (typeof opts === "undefined") {
  108073. return true;
  108074. } else {
  108075. return (0, _shallowEqual.default)(node, opts);
  108076. }
  108077. }
  108078. return false;
  108079. }
  108080. function isTSNamespaceExportDeclaration(node, opts) {
  108081. if (!node)
  108082. return false;
  108083. const nodeType = node.type;
  108084. if (nodeType === "TSNamespaceExportDeclaration") {
  108085. if (typeof opts === "undefined") {
  108086. return true;
  108087. } else {
  108088. return (0, _shallowEqual.default)(node, opts);
  108089. }
  108090. }
  108091. return false;
  108092. }
  108093. function isTSTypeAnnotation(node, opts) {
  108094. if (!node)
  108095. return false;
  108096. const nodeType = node.type;
  108097. if (nodeType === "TSTypeAnnotation") {
  108098. if (typeof opts === "undefined") {
  108099. return true;
  108100. } else {
  108101. return (0, _shallowEqual.default)(node, opts);
  108102. }
  108103. }
  108104. return false;
  108105. }
  108106. function isTSTypeParameterInstantiation(node, opts) {
  108107. if (!node)
  108108. return false;
  108109. const nodeType = node.type;
  108110. if (nodeType === "TSTypeParameterInstantiation") {
  108111. if (typeof opts === "undefined") {
  108112. return true;
  108113. } else {
  108114. return (0, _shallowEqual.default)(node, opts);
  108115. }
  108116. }
  108117. return false;
  108118. }
  108119. function isTSTypeParameterDeclaration(node, opts) {
  108120. if (!node)
  108121. return false;
  108122. const nodeType = node.type;
  108123. if (nodeType === "TSTypeParameterDeclaration") {
  108124. if (typeof opts === "undefined") {
  108125. return true;
  108126. } else {
  108127. return (0, _shallowEqual.default)(node, opts);
  108128. }
  108129. }
  108130. return false;
  108131. }
  108132. function isTSTypeParameter(node, opts) {
  108133. if (!node)
  108134. return false;
  108135. const nodeType = node.type;
  108136. if (nodeType === "TSTypeParameter") {
  108137. if (typeof opts === "undefined") {
  108138. return true;
  108139. } else {
  108140. return (0, _shallowEqual.default)(node, opts);
  108141. }
  108142. }
  108143. return false;
  108144. }
  108145. function isExpression(node, opts) {
  108146. if (!node)
  108147. return false;
  108148. const nodeType = node.type;
  108149. if ("ArrayExpression" === nodeType || "AssignmentExpression" === nodeType || "BinaryExpression" === nodeType || "CallExpression" === nodeType || "ConditionalExpression" === nodeType || "FunctionExpression" === nodeType || "Identifier" === nodeType || "StringLiteral" === nodeType || "NumericLiteral" === nodeType || "NullLiteral" === nodeType || "BooleanLiteral" === nodeType || "RegExpLiteral" === nodeType || "LogicalExpression" === nodeType || "MemberExpression" === nodeType || "NewExpression" === nodeType || "ObjectExpression" === nodeType || "SequenceExpression" === nodeType || "ParenthesizedExpression" === nodeType || "ThisExpression" === nodeType || "UnaryExpression" === nodeType || "UpdateExpression" === nodeType || "ArrowFunctionExpression" === nodeType || "ClassExpression" === nodeType || "MetaProperty" === nodeType || "Super" === nodeType || "TaggedTemplateExpression" === nodeType || "TemplateLiteral" === nodeType || "YieldExpression" === nodeType || "AwaitExpression" === nodeType || "Import" === nodeType || "BigIntLiteral" === nodeType || "OptionalMemberExpression" === nodeType || "OptionalCallExpression" === nodeType || "TypeCastExpression" === nodeType || "JSXElement" === nodeType || "JSXFragment" === nodeType || "BindExpression" === nodeType || "PipelinePrimaryTopicReference" === nodeType || "DoExpression" === nodeType || "RecordExpression" === nodeType || "TupleExpression" === nodeType || "DecimalLiteral" === nodeType || "ModuleExpression" === nodeType || "TSAsExpression" === nodeType || "TSTypeAssertion" === nodeType || "TSNonNullExpression" === nodeType || nodeType === "Placeholder" && ("Expression" === node.expectedNode || "Identifier" === node.expectedNode || "StringLiteral" === node.expectedNode)) {
  108150. if (typeof opts === "undefined") {
  108151. return true;
  108152. } else {
  108153. return (0, _shallowEqual.default)(node, opts);
  108154. }
  108155. }
  108156. return false;
  108157. }
  108158. function isBinary(node, opts) {
  108159. if (!node)
  108160. return false;
  108161. const nodeType = node.type;
  108162. if ("BinaryExpression" === nodeType || "LogicalExpression" === nodeType) {
  108163. if (typeof opts === "undefined") {
  108164. return true;
  108165. } else {
  108166. return (0, _shallowEqual.default)(node, opts);
  108167. }
  108168. }
  108169. return false;
  108170. }
  108171. function isScopable(node, opts) {
  108172. if (!node)
  108173. return false;
  108174. const nodeType = node.type;
  108175. if ("BlockStatement" === nodeType || "CatchClause" === nodeType || "DoWhileStatement" === nodeType || "ForInStatement" === nodeType || "ForStatement" === nodeType || "FunctionDeclaration" === nodeType || "FunctionExpression" === nodeType || "Program" === nodeType || "ObjectMethod" === nodeType || "SwitchStatement" === nodeType || "WhileStatement" === nodeType || "ArrowFunctionExpression" === nodeType || "ClassExpression" === nodeType || "ClassDeclaration" === nodeType || "ForOfStatement" === nodeType || "ClassMethod" === nodeType || "ClassPrivateMethod" === nodeType || "StaticBlock" === nodeType || "TSModuleBlock" === nodeType || nodeType === "Placeholder" && "BlockStatement" === node.expectedNode) {
  108176. if (typeof opts === "undefined") {
  108177. return true;
  108178. } else {
  108179. return (0, _shallowEqual.default)(node, opts);
  108180. }
  108181. }
  108182. return false;
  108183. }
  108184. function isBlockParent(node, opts) {
  108185. if (!node)
  108186. return false;
  108187. const nodeType = node.type;
  108188. if ("BlockStatement" === nodeType || "CatchClause" === nodeType || "DoWhileStatement" === nodeType || "ForInStatement" === nodeType || "ForStatement" === nodeType || "FunctionDeclaration" === nodeType || "FunctionExpression" === nodeType || "Program" === nodeType || "ObjectMethod" === nodeType || "SwitchStatement" === nodeType || "WhileStatement" === nodeType || "ArrowFunctionExpression" === nodeType || "ForOfStatement" === nodeType || "ClassMethod" === nodeType || "ClassPrivateMethod" === nodeType || "StaticBlock" === nodeType || "TSModuleBlock" === nodeType || nodeType === "Placeholder" && "BlockStatement" === node.expectedNode) {
  108189. if (typeof opts === "undefined") {
  108190. return true;
  108191. } else {
  108192. return (0, _shallowEqual.default)(node, opts);
  108193. }
  108194. }
  108195. return false;
  108196. }
  108197. function isBlock(node, opts) {
  108198. if (!node)
  108199. return false;
  108200. const nodeType = node.type;
  108201. if ("BlockStatement" === nodeType || "Program" === nodeType || "TSModuleBlock" === nodeType || nodeType === "Placeholder" && "BlockStatement" === node.expectedNode) {
  108202. if (typeof opts === "undefined") {
  108203. return true;
  108204. } else {
  108205. return (0, _shallowEqual.default)(node, opts);
  108206. }
  108207. }
  108208. return false;
  108209. }
  108210. function isStatement(node, opts) {
  108211. if (!node)
  108212. return false;
  108213. const nodeType = node.type;
  108214. if ("BlockStatement" === nodeType || "BreakStatement" === nodeType || "ContinueStatement" === nodeType || "DebuggerStatement" === nodeType || "DoWhileStatement" === nodeType || "EmptyStatement" === nodeType || "ExpressionStatement" === nodeType || "ForInStatement" === nodeType || "ForStatement" === nodeType || "FunctionDeclaration" === nodeType || "IfStatement" === nodeType || "LabeledStatement" === nodeType || "ReturnStatement" === nodeType || "SwitchStatement" === nodeType || "ThrowStatement" === nodeType || "TryStatement" === nodeType || "VariableDeclaration" === nodeType || "WhileStatement" === nodeType || "WithStatement" === nodeType || "ClassDeclaration" === nodeType || "ExportAllDeclaration" === nodeType || "ExportDefaultDeclaration" === nodeType || "ExportNamedDeclaration" === nodeType || "ForOfStatement" === nodeType || "ImportDeclaration" === nodeType || "DeclareClass" === nodeType || "DeclareFunction" === nodeType || "DeclareInterface" === nodeType || "DeclareModule" === nodeType || "DeclareModuleExports" === nodeType || "DeclareTypeAlias" === nodeType || "DeclareOpaqueType" === nodeType || "DeclareVariable" === nodeType || "DeclareExportDeclaration" === nodeType || "DeclareExportAllDeclaration" === nodeType || "InterfaceDeclaration" === nodeType || "OpaqueType" === nodeType || "TypeAlias" === nodeType || "EnumDeclaration" === nodeType || "TSDeclareFunction" === nodeType || "TSInterfaceDeclaration" === nodeType || "TSTypeAliasDeclaration" === nodeType || "TSEnumDeclaration" === nodeType || "TSModuleDeclaration" === nodeType || "TSImportEqualsDeclaration" === nodeType || "TSExportAssignment" === nodeType || "TSNamespaceExportDeclaration" === nodeType || nodeType === "Placeholder" && ("Statement" === node.expectedNode || "Declaration" === node.expectedNode || "BlockStatement" === node.expectedNode)) {
  108215. if (typeof opts === "undefined") {
  108216. return true;
  108217. } else {
  108218. return (0, _shallowEqual.default)(node, opts);
  108219. }
  108220. }
  108221. return false;
  108222. }
  108223. function isTerminatorless(node, opts) {
  108224. if (!node)
  108225. return false;
  108226. const nodeType = node.type;
  108227. if ("BreakStatement" === nodeType || "ContinueStatement" === nodeType || "ReturnStatement" === nodeType || "ThrowStatement" === nodeType || "YieldExpression" === nodeType || "AwaitExpression" === nodeType) {
  108228. if (typeof opts === "undefined") {
  108229. return true;
  108230. } else {
  108231. return (0, _shallowEqual.default)(node, opts);
  108232. }
  108233. }
  108234. return false;
  108235. }
  108236. function isCompletionStatement(node, opts) {
  108237. if (!node)
  108238. return false;
  108239. const nodeType = node.type;
  108240. if ("BreakStatement" === nodeType || "ContinueStatement" === nodeType || "ReturnStatement" === nodeType || "ThrowStatement" === nodeType) {
  108241. if (typeof opts === "undefined") {
  108242. return true;
  108243. } else {
  108244. return (0, _shallowEqual.default)(node, opts);
  108245. }
  108246. }
  108247. return false;
  108248. }
  108249. function isConditional(node, opts) {
  108250. if (!node)
  108251. return false;
  108252. const nodeType = node.type;
  108253. if ("ConditionalExpression" === nodeType || "IfStatement" === nodeType) {
  108254. if (typeof opts === "undefined") {
  108255. return true;
  108256. } else {
  108257. return (0, _shallowEqual.default)(node, opts);
  108258. }
  108259. }
  108260. return false;
  108261. }
  108262. function isLoop(node, opts) {
  108263. if (!node)
  108264. return false;
  108265. const nodeType = node.type;
  108266. if ("DoWhileStatement" === nodeType || "ForInStatement" === nodeType || "ForStatement" === nodeType || "WhileStatement" === nodeType || "ForOfStatement" === nodeType) {
  108267. if (typeof opts === "undefined") {
  108268. return true;
  108269. } else {
  108270. return (0, _shallowEqual.default)(node, opts);
  108271. }
  108272. }
  108273. return false;
  108274. }
  108275. function isWhile(node, opts) {
  108276. if (!node)
  108277. return false;
  108278. const nodeType = node.type;
  108279. if ("DoWhileStatement" === nodeType || "WhileStatement" === nodeType) {
  108280. if (typeof opts === "undefined") {
  108281. return true;
  108282. } else {
  108283. return (0, _shallowEqual.default)(node, opts);
  108284. }
  108285. }
  108286. return false;
  108287. }
  108288. function isExpressionWrapper(node, opts) {
  108289. if (!node)
  108290. return false;
  108291. const nodeType = node.type;
  108292. if ("ExpressionStatement" === nodeType || "ParenthesizedExpression" === nodeType || "TypeCastExpression" === nodeType) {
  108293. if (typeof opts === "undefined") {
  108294. return true;
  108295. } else {
  108296. return (0, _shallowEqual.default)(node, opts);
  108297. }
  108298. }
  108299. return false;
  108300. }
  108301. function isFor(node, opts) {
  108302. if (!node)
  108303. return false;
  108304. const nodeType = node.type;
  108305. if ("ForInStatement" === nodeType || "ForStatement" === nodeType || "ForOfStatement" === nodeType) {
  108306. if (typeof opts === "undefined") {
  108307. return true;
  108308. } else {
  108309. return (0, _shallowEqual.default)(node, opts);
  108310. }
  108311. }
  108312. return false;
  108313. }
  108314. function isForXStatement(node, opts) {
  108315. if (!node)
  108316. return false;
  108317. const nodeType = node.type;
  108318. if ("ForInStatement" === nodeType || "ForOfStatement" === nodeType) {
  108319. if (typeof opts === "undefined") {
  108320. return true;
  108321. } else {
  108322. return (0, _shallowEqual.default)(node, opts);
  108323. }
  108324. }
  108325. return false;
  108326. }
  108327. function isFunction(node, opts) {
  108328. if (!node)
  108329. return false;
  108330. const nodeType = node.type;
  108331. if ("FunctionDeclaration" === nodeType || "FunctionExpression" === nodeType || "ObjectMethod" === nodeType || "ArrowFunctionExpression" === nodeType || "ClassMethod" === nodeType || "ClassPrivateMethod" === nodeType) {
  108332. if (typeof opts === "undefined") {
  108333. return true;
  108334. } else {
  108335. return (0, _shallowEqual.default)(node, opts);
  108336. }
  108337. }
  108338. return false;
  108339. }
  108340. function isFunctionParent(node, opts) {
  108341. if (!node)
  108342. return false;
  108343. const nodeType = node.type;
  108344. if ("FunctionDeclaration" === nodeType || "FunctionExpression" === nodeType || "ObjectMethod" === nodeType || "ArrowFunctionExpression" === nodeType || "ClassMethod" === nodeType || "ClassPrivateMethod" === nodeType) {
  108345. if (typeof opts === "undefined") {
  108346. return true;
  108347. } else {
  108348. return (0, _shallowEqual.default)(node, opts);
  108349. }
  108350. }
  108351. return false;
  108352. }
  108353. function isPureish(node, opts) {
  108354. if (!node)
  108355. return false;
  108356. const nodeType = node.type;
  108357. if ("FunctionDeclaration" === nodeType || "FunctionExpression" === nodeType || "StringLiteral" === nodeType || "NumericLiteral" === nodeType || "NullLiteral" === nodeType || "BooleanLiteral" === nodeType || "RegExpLiteral" === nodeType || "ArrowFunctionExpression" === nodeType || "BigIntLiteral" === nodeType || "DecimalLiteral" === nodeType || nodeType === "Placeholder" && "StringLiteral" === node.expectedNode) {
  108358. if (typeof opts === "undefined") {
  108359. return true;
  108360. } else {
  108361. return (0, _shallowEqual.default)(node, opts);
  108362. }
  108363. }
  108364. return false;
  108365. }
  108366. function isDeclaration2(node, opts) {
  108367. if (!node)
  108368. return false;
  108369. const nodeType = node.type;
  108370. if ("FunctionDeclaration" === nodeType || "VariableDeclaration" === nodeType || "ClassDeclaration" === nodeType || "ExportAllDeclaration" === nodeType || "ExportDefaultDeclaration" === nodeType || "ExportNamedDeclaration" === nodeType || "ImportDeclaration" === nodeType || "DeclareClass" === nodeType || "DeclareFunction" === nodeType || "DeclareInterface" === nodeType || "DeclareModule" === nodeType || "DeclareModuleExports" === nodeType || "DeclareTypeAlias" === nodeType || "DeclareOpaqueType" === nodeType || "DeclareVariable" === nodeType || "DeclareExportDeclaration" === nodeType || "DeclareExportAllDeclaration" === nodeType || "InterfaceDeclaration" === nodeType || "OpaqueType" === nodeType || "TypeAlias" === nodeType || "EnumDeclaration" === nodeType || "TSDeclareFunction" === nodeType || "TSInterfaceDeclaration" === nodeType || "TSTypeAliasDeclaration" === nodeType || "TSEnumDeclaration" === nodeType || "TSModuleDeclaration" === nodeType || nodeType === "Placeholder" && "Declaration" === node.expectedNode) {
  108371. if (typeof opts === "undefined") {
  108372. return true;
  108373. } else {
  108374. return (0, _shallowEqual.default)(node, opts);
  108375. }
  108376. }
  108377. return false;
  108378. }
  108379. function isPatternLike(node, opts) {
  108380. if (!node)
  108381. return false;
  108382. const nodeType = node.type;
  108383. if ("Identifier" === nodeType || "RestElement" === nodeType || "AssignmentPattern" === nodeType || "ArrayPattern" === nodeType || "ObjectPattern" === nodeType || nodeType === "Placeholder" && ("Pattern" === node.expectedNode || "Identifier" === node.expectedNode)) {
  108384. if (typeof opts === "undefined") {
  108385. return true;
  108386. } else {
  108387. return (0, _shallowEqual.default)(node, opts);
  108388. }
  108389. }
  108390. return false;
  108391. }
  108392. function isLVal(node, opts) {
  108393. if (!node)
  108394. return false;
  108395. const nodeType = node.type;
  108396. if ("Identifier" === nodeType || "MemberExpression" === nodeType || "RestElement" === nodeType || "AssignmentPattern" === nodeType || "ArrayPattern" === nodeType || "ObjectPattern" === nodeType || "TSParameterProperty" === nodeType || nodeType === "Placeholder" && ("Pattern" === node.expectedNode || "Identifier" === node.expectedNode)) {
  108397. if (typeof opts === "undefined") {
  108398. return true;
  108399. } else {
  108400. return (0, _shallowEqual.default)(node, opts);
  108401. }
  108402. }
  108403. return false;
  108404. }
  108405. function isTSEntityName(node, opts) {
  108406. if (!node)
  108407. return false;
  108408. const nodeType = node.type;
  108409. if ("Identifier" === nodeType || "TSQualifiedName" === nodeType || nodeType === "Placeholder" && "Identifier" === node.expectedNode) {
  108410. if (typeof opts === "undefined") {
  108411. return true;
  108412. } else {
  108413. return (0, _shallowEqual.default)(node, opts);
  108414. }
  108415. }
  108416. return false;
  108417. }
  108418. function isLiteral(node, opts) {
  108419. if (!node)
  108420. return false;
  108421. const nodeType = node.type;
  108422. if ("StringLiteral" === nodeType || "NumericLiteral" === nodeType || "NullLiteral" === nodeType || "BooleanLiteral" === nodeType || "RegExpLiteral" === nodeType || "TemplateLiteral" === nodeType || "BigIntLiteral" === nodeType || "DecimalLiteral" === nodeType || nodeType === "Placeholder" && "StringLiteral" === node.expectedNode) {
  108423. if (typeof opts === "undefined") {
  108424. return true;
  108425. } else {
  108426. return (0, _shallowEqual.default)(node, opts);
  108427. }
  108428. }
  108429. return false;
  108430. }
  108431. function isImmutable(node, opts) {
  108432. if (!node)
  108433. return false;
  108434. const nodeType = node.type;
  108435. if ("StringLiteral" === nodeType || "NumericLiteral" === nodeType || "NullLiteral" === nodeType || "BooleanLiteral" === nodeType || "BigIntLiteral" === nodeType || "JSXAttribute" === nodeType || "JSXClosingElement" === nodeType || "JSXElement" === nodeType || "JSXExpressionContainer" === nodeType || "JSXSpreadChild" === nodeType || "JSXOpeningElement" === nodeType || "JSXText" === nodeType || "JSXFragment" === nodeType || "JSXOpeningFragment" === nodeType || "JSXClosingFragment" === nodeType || "DecimalLiteral" === nodeType || nodeType === "Placeholder" && "StringLiteral" === node.expectedNode) {
  108436. if (typeof opts === "undefined") {
  108437. return true;
  108438. } else {
  108439. return (0, _shallowEqual.default)(node, opts);
  108440. }
  108441. }
  108442. return false;
  108443. }
  108444. function isUserWhitespacable(node, opts) {
  108445. if (!node)
  108446. return false;
  108447. const nodeType = node.type;
  108448. if ("ObjectMethod" === nodeType || "ObjectProperty" === nodeType || "ObjectTypeInternalSlot" === nodeType || "ObjectTypeCallProperty" === nodeType || "ObjectTypeIndexer" === nodeType || "ObjectTypeProperty" === nodeType || "ObjectTypeSpreadProperty" === nodeType) {
  108449. if (typeof opts === "undefined") {
  108450. return true;
  108451. } else {
  108452. return (0, _shallowEqual.default)(node, opts);
  108453. }
  108454. }
  108455. return false;
  108456. }
  108457. function isMethod(node, opts) {
  108458. if (!node)
  108459. return false;
  108460. const nodeType = node.type;
  108461. if ("ObjectMethod" === nodeType || "ClassMethod" === nodeType || "ClassPrivateMethod" === nodeType) {
  108462. if (typeof opts === "undefined") {
  108463. return true;
  108464. } else {
  108465. return (0, _shallowEqual.default)(node, opts);
  108466. }
  108467. }
  108468. return false;
  108469. }
  108470. function isObjectMember(node, opts) {
  108471. if (!node)
  108472. return false;
  108473. const nodeType = node.type;
  108474. if ("ObjectMethod" === nodeType || "ObjectProperty" === nodeType) {
  108475. if (typeof opts === "undefined") {
  108476. return true;
  108477. } else {
  108478. return (0, _shallowEqual.default)(node, opts);
  108479. }
  108480. }
  108481. return false;
  108482. }
  108483. function isProperty(node, opts) {
  108484. if (!node)
  108485. return false;
  108486. const nodeType = node.type;
  108487. if ("ObjectProperty" === nodeType || "ClassProperty" === nodeType || "ClassPrivateProperty" === nodeType) {
  108488. if (typeof opts === "undefined") {
  108489. return true;
  108490. } else {
  108491. return (0, _shallowEqual.default)(node, opts);
  108492. }
  108493. }
  108494. return false;
  108495. }
  108496. function isUnaryLike(node, opts) {
  108497. if (!node)
  108498. return false;
  108499. const nodeType = node.type;
  108500. if ("UnaryExpression" === nodeType || "SpreadElement" === nodeType) {
  108501. if (typeof opts === "undefined") {
  108502. return true;
  108503. } else {
  108504. return (0, _shallowEqual.default)(node, opts);
  108505. }
  108506. }
  108507. return false;
  108508. }
  108509. function isPattern(node, opts) {
  108510. if (!node)
  108511. return false;
  108512. const nodeType = node.type;
  108513. if ("AssignmentPattern" === nodeType || "ArrayPattern" === nodeType || "ObjectPattern" === nodeType || nodeType === "Placeholder" && "Pattern" === node.expectedNode) {
  108514. if (typeof opts === "undefined") {
  108515. return true;
  108516. } else {
  108517. return (0, _shallowEqual.default)(node, opts);
  108518. }
  108519. }
  108520. return false;
  108521. }
  108522. function isClass(node, opts) {
  108523. if (!node)
  108524. return false;
  108525. const nodeType = node.type;
  108526. if ("ClassExpression" === nodeType || "ClassDeclaration" === nodeType) {
  108527. if (typeof opts === "undefined") {
  108528. return true;
  108529. } else {
  108530. return (0, _shallowEqual.default)(node, opts);
  108531. }
  108532. }
  108533. return false;
  108534. }
  108535. function isModuleDeclaration(node, opts) {
  108536. if (!node)
  108537. return false;
  108538. const nodeType = node.type;
  108539. if ("ExportAllDeclaration" === nodeType || "ExportDefaultDeclaration" === nodeType || "ExportNamedDeclaration" === nodeType || "ImportDeclaration" === nodeType) {
  108540. if (typeof opts === "undefined") {
  108541. return true;
  108542. } else {
  108543. return (0, _shallowEqual.default)(node, opts);
  108544. }
  108545. }
  108546. return false;
  108547. }
  108548. function isExportDeclaration(node, opts) {
  108549. if (!node)
  108550. return false;
  108551. const nodeType = node.type;
  108552. if ("ExportAllDeclaration" === nodeType || "ExportDefaultDeclaration" === nodeType || "ExportNamedDeclaration" === nodeType) {
  108553. if (typeof opts === "undefined") {
  108554. return true;
  108555. } else {
  108556. return (0, _shallowEqual.default)(node, opts);
  108557. }
  108558. }
  108559. return false;
  108560. }
  108561. function isModuleSpecifier(node, opts) {
  108562. if (!node)
  108563. return false;
  108564. const nodeType = node.type;
  108565. if ("ExportSpecifier" === nodeType || "ImportDefaultSpecifier" === nodeType || "ImportNamespaceSpecifier" === nodeType || "ImportSpecifier" === nodeType || "ExportNamespaceSpecifier" === nodeType || "ExportDefaultSpecifier" === nodeType) {
  108566. if (typeof opts === "undefined") {
  108567. return true;
  108568. } else {
  108569. return (0, _shallowEqual.default)(node, opts);
  108570. }
  108571. }
  108572. return false;
  108573. }
  108574. function isFlow(node, opts) {
  108575. if (!node)
  108576. return false;
  108577. const nodeType = node.type;
  108578. if ("AnyTypeAnnotation" === nodeType || "ArrayTypeAnnotation" === nodeType || "BooleanTypeAnnotation" === nodeType || "BooleanLiteralTypeAnnotation" === nodeType || "NullLiteralTypeAnnotation" === nodeType || "ClassImplements" === nodeType || "DeclareClass" === nodeType || "DeclareFunction" === nodeType || "DeclareInterface" === nodeType || "DeclareModule" === nodeType || "DeclareModuleExports" === nodeType || "DeclareTypeAlias" === nodeType || "DeclareOpaqueType" === nodeType || "DeclareVariable" === nodeType || "DeclareExportDeclaration" === nodeType || "DeclareExportAllDeclaration" === nodeType || "DeclaredPredicate" === nodeType || "ExistsTypeAnnotation" === nodeType || "FunctionTypeAnnotation" === nodeType || "FunctionTypeParam" === nodeType || "GenericTypeAnnotation" === nodeType || "InferredPredicate" === nodeType || "InterfaceExtends" === nodeType || "InterfaceDeclaration" === nodeType || "InterfaceTypeAnnotation" === nodeType || "IntersectionTypeAnnotation" === nodeType || "MixedTypeAnnotation" === nodeType || "EmptyTypeAnnotation" === nodeType || "NullableTypeAnnotation" === nodeType || "NumberLiteralTypeAnnotation" === nodeType || "NumberTypeAnnotation" === nodeType || "ObjectTypeAnnotation" === nodeType || "ObjectTypeInternalSlot" === nodeType || "ObjectTypeCallProperty" === nodeType || "ObjectTypeIndexer" === nodeType || "ObjectTypeProperty" === nodeType || "ObjectTypeSpreadProperty" === nodeType || "OpaqueType" === nodeType || "QualifiedTypeIdentifier" === nodeType || "StringLiteralTypeAnnotation" === nodeType || "StringTypeAnnotation" === nodeType || "SymbolTypeAnnotation" === nodeType || "ThisTypeAnnotation" === nodeType || "TupleTypeAnnotation" === nodeType || "TypeofTypeAnnotation" === nodeType || "TypeAlias" === nodeType || "TypeAnnotation" === nodeType || "TypeCastExpression" === nodeType || "TypeParameter" === nodeType || "TypeParameterDeclaration" === nodeType || "TypeParameterInstantiation" === nodeType || "UnionTypeAnnotation" === nodeType || "Variance" === nodeType || "VoidTypeAnnotation" === nodeType || "IndexedAccessType" === nodeType || "OptionalIndexedAccessType" === nodeType) {
  108579. if (typeof opts === "undefined") {
  108580. return true;
  108581. } else {
  108582. return (0, _shallowEqual.default)(node, opts);
  108583. }
  108584. }
  108585. return false;
  108586. }
  108587. function isFlowType(node, opts) {
  108588. if (!node)
  108589. return false;
  108590. const nodeType = node.type;
  108591. if ("AnyTypeAnnotation" === nodeType || "ArrayTypeAnnotation" === nodeType || "BooleanTypeAnnotation" === nodeType || "BooleanLiteralTypeAnnotation" === nodeType || "NullLiteralTypeAnnotation" === nodeType || "ExistsTypeAnnotation" === nodeType || "FunctionTypeAnnotation" === nodeType || "GenericTypeAnnotation" === nodeType || "InterfaceTypeAnnotation" === nodeType || "IntersectionTypeAnnotation" === nodeType || "MixedTypeAnnotation" === nodeType || "EmptyTypeAnnotation" === nodeType || "NullableTypeAnnotation" === nodeType || "NumberLiteralTypeAnnotation" === nodeType || "NumberTypeAnnotation" === nodeType || "ObjectTypeAnnotation" === nodeType || "StringLiteralTypeAnnotation" === nodeType || "StringTypeAnnotation" === nodeType || "SymbolTypeAnnotation" === nodeType || "ThisTypeAnnotation" === nodeType || "TupleTypeAnnotation" === nodeType || "TypeofTypeAnnotation" === nodeType || "UnionTypeAnnotation" === nodeType || "VoidTypeAnnotation" === nodeType || "IndexedAccessType" === nodeType || "OptionalIndexedAccessType" === nodeType) {
  108592. if (typeof opts === "undefined") {
  108593. return true;
  108594. } else {
  108595. return (0, _shallowEqual.default)(node, opts);
  108596. }
  108597. }
  108598. return false;
  108599. }
  108600. function isFlowBaseAnnotation(node, opts) {
  108601. if (!node)
  108602. return false;
  108603. const nodeType = node.type;
  108604. if ("AnyTypeAnnotation" === nodeType || "BooleanTypeAnnotation" === nodeType || "NullLiteralTypeAnnotation" === nodeType || "MixedTypeAnnotation" === nodeType || "EmptyTypeAnnotation" === nodeType || "NumberTypeAnnotation" === nodeType || "StringTypeAnnotation" === nodeType || "SymbolTypeAnnotation" === nodeType || "ThisTypeAnnotation" === nodeType || "VoidTypeAnnotation" === nodeType) {
  108605. if (typeof opts === "undefined") {
  108606. return true;
  108607. } else {
  108608. return (0, _shallowEqual.default)(node, opts);
  108609. }
  108610. }
  108611. return false;
  108612. }
  108613. function isFlowDeclaration(node, opts) {
  108614. if (!node)
  108615. return false;
  108616. const nodeType = node.type;
  108617. if ("DeclareClass" === nodeType || "DeclareFunction" === nodeType || "DeclareInterface" === nodeType || "DeclareModule" === nodeType || "DeclareModuleExports" === nodeType || "DeclareTypeAlias" === nodeType || "DeclareOpaqueType" === nodeType || "DeclareVariable" === nodeType || "DeclareExportDeclaration" === nodeType || "DeclareExportAllDeclaration" === nodeType || "InterfaceDeclaration" === nodeType || "OpaqueType" === nodeType || "TypeAlias" === nodeType) {
  108618. if (typeof opts === "undefined") {
  108619. return true;
  108620. } else {
  108621. return (0, _shallowEqual.default)(node, opts);
  108622. }
  108623. }
  108624. return false;
  108625. }
  108626. function isFlowPredicate(node, opts) {
  108627. if (!node)
  108628. return false;
  108629. const nodeType = node.type;
  108630. if ("DeclaredPredicate" === nodeType || "InferredPredicate" === nodeType) {
  108631. if (typeof opts === "undefined") {
  108632. return true;
  108633. } else {
  108634. return (0, _shallowEqual.default)(node, opts);
  108635. }
  108636. }
  108637. return false;
  108638. }
  108639. function isEnumBody(node, opts) {
  108640. if (!node)
  108641. return false;
  108642. const nodeType = node.type;
  108643. if ("EnumBooleanBody" === nodeType || "EnumNumberBody" === nodeType || "EnumStringBody" === nodeType || "EnumSymbolBody" === nodeType) {
  108644. if (typeof opts === "undefined") {
  108645. return true;
  108646. } else {
  108647. return (0, _shallowEqual.default)(node, opts);
  108648. }
  108649. }
  108650. return false;
  108651. }
  108652. function isEnumMember(node, opts) {
  108653. if (!node)
  108654. return false;
  108655. const nodeType = node.type;
  108656. if ("EnumBooleanMember" === nodeType || "EnumNumberMember" === nodeType || "EnumStringMember" === nodeType || "EnumDefaultedMember" === nodeType) {
  108657. if (typeof opts === "undefined") {
  108658. return true;
  108659. } else {
  108660. return (0, _shallowEqual.default)(node, opts);
  108661. }
  108662. }
  108663. return false;
  108664. }
  108665. function isJSX(node, opts) {
  108666. if (!node)
  108667. return false;
  108668. const nodeType = node.type;
  108669. if ("JSXAttribute" === nodeType || "JSXClosingElement" === nodeType || "JSXElement" === nodeType || "JSXEmptyExpression" === nodeType || "JSXExpressionContainer" === nodeType || "JSXSpreadChild" === nodeType || "JSXIdentifier" === nodeType || "JSXMemberExpression" === nodeType || "JSXNamespacedName" === nodeType || "JSXOpeningElement" === nodeType || "JSXSpreadAttribute" === nodeType || "JSXText" === nodeType || "JSXFragment" === nodeType || "JSXOpeningFragment" === nodeType || "JSXClosingFragment" === nodeType) {
  108670. if (typeof opts === "undefined") {
  108671. return true;
  108672. } else {
  108673. return (0, _shallowEqual.default)(node, opts);
  108674. }
  108675. }
  108676. return false;
  108677. }
  108678. function isPrivate(node, opts) {
  108679. if (!node)
  108680. return false;
  108681. const nodeType = node.type;
  108682. if ("ClassPrivateProperty" === nodeType || "ClassPrivateMethod" === nodeType || "PrivateName" === nodeType) {
  108683. if (typeof opts === "undefined") {
  108684. return true;
  108685. } else {
  108686. return (0, _shallowEqual.default)(node, opts);
  108687. }
  108688. }
  108689. return false;
  108690. }
  108691. function isTSTypeElement(node, opts) {
  108692. if (!node)
  108693. return false;
  108694. const nodeType = node.type;
  108695. if ("TSCallSignatureDeclaration" === nodeType || "TSConstructSignatureDeclaration" === nodeType || "TSPropertySignature" === nodeType || "TSMethodSignature" === nodeType || "TSIndexSignature" === nodeType) {
  108696. if (typeof opts === "undefined") {
  108697. return true;
  108698. } else {
  108699. return (0, _shallowEqual.default)(node, opts);
  108700. }
  108701. }
  108702. return false;
  108703. }
  108704. function isTSType(node, opts) {
  108705. if (!node)
  108706. return false;
  108707. const nodeType = node.type;
  108708. if ("TSAnyKeyword" === nodeType || "TSBooleanKeyword" === nodeType || "TSBigIntKeyword" === nodeType || "TSIntrinsicKeyword" === nodeType || "TSNeverKeyword" === nodeType || "TSNullKeyword" === nodeType || "TSNumberKeyword" === nodeType || "TSObjectKeyword" === nodeType || "TSStringKeyword" === nodeType || "TSSymbolKeyword" === nodeType || "TSUndefinedKeyword" === nodeType || "TSUnknownKeyword" === nodeType || "TSVoidKeyword" === nodeType || "TSThisType" === nodeType || "TSFunctionType" === nodeType || "TSConstructorType" === nodeType || "TSTypeReference" === nodeType || "TSTypePredicate" === nodeType || "TSTypeQuery" === nodeType || "TSTypeLiteral" === nodeType || "TSArrayType" === nodeType || "TSTupleType" === nodeType || "TSOptionalType" === nodeType || "TSRestType" === nodeType || "TSUnionType" === nodeType || "TSIntersectionType" === nodeType || "TSConditionalType" === nodeType || "TSInferType" === nodeType || "TSParenthesizedType" === nodeType || "TSTypeOperator" === nodeType || "TSIndexedAccessType" === nodeType || "TSMappedType" === nodeType || "TSLiteralType" === nodeType || "TSExpressionWithTypeArguments" === nodeType || "TSImportType" === nodeType) {
  108709. if (typeof opts === "undefined") {
  108710. return true;
  108711. } else {
  108712. return (0, _shallowEqual.default)(node, opts);
  108713. }
  108714. }
  108715. return false;
  108716. }
  108717. function isTSBaseType(node, opts) {
  108718. if (!node)
  108719. return false;
  108720. const nodeType = node.type;
  108721. if ("TSAnyKeyword" === nodeType || "TSBooleanKeyword" === nodeType || "TSBigIntKeyword" === nodeType || "TSIntrinsicKeyword" === nodeType || "TSNeverKeyword" === nodeType || "TSNullKeyword" === nodeType || "TSNumberKeyword" === nodeType || "TSObjectKeyword" === nodeType || "TSStringKeyword" === nodeType || "TSSymbolKeyword" === nodeType || "TSUndefinedKeyword" === nodeType || "TSUnknownKeyword" === nodeType || "TSVoidKeyword" === nodeType || "TSThisType" === nodeType || "TSLiteralType" === nodeType) {
  108722. if (typeof opts === "undefined") {
  108723. return true;
  108724. } else {
  108725. return (0, _shallowEqual.default)(node, opts);
  108726. }
  108727. }
  108728. return false;
  108729. }
  108730. function isNumberLiteral(node, opts) {
  108731. console.trace("The node type NumberLiteral has been renamed to NumericLiteral");
  108732. if (!node)
  108733. return false;
  108734. const nodeType = node.type;
  108735. if (nodeType === "NumberLiteral") {
  108736. if (typeof opts === "undefined") {
  108737. return true;
  108738. } else {
  108739. return (0, _shallowEqual.default)(node, opts);
  108740. }
  108741. }
  108742. return false;
  108743. }
  108744. function isRegexLiteral(node, opts) {
  108745. console.trace("The node type RegexLiteral has been renamed to RegExpLiteral");
  108746. if (!node)
  108747. return false;
  108748. const nodeType = node.type;
  108749. if (nodeType === "RegexLiteral") {
  108750. if (typeof opts === "undefined") {
  108751. return true;
  108752. } else {
  108753. return (0, _shallowEqual.default)(node, opts);
  108754. }
  108755. }
  108756. return false;
  108757. }
  108758. function isRestProperty(node, opts) {
  108759. console.trace("The node type RestProperty has been renamed to RestElement");
  108760. if (!node)
  108761. return false;
  108762. const nodeType = node.type;
  108763. if (nodeType === "RestProperty") {
  108764. if (typeof opts === "undefined") {
  108765. return true;
  108766. } else {
  108767. return (0, _shallowEqual.default)(node, opts);
  108768. }
  108769. }
  108770. return false;
  108771. }
  108772. function isSpreadProperty(node, opts) {
  108773. console.trace("The node type SpreadProperty has been renamed to SpreadElement");
  108774. if (!node)
  108775. return false;
  108776. const nodeType = node.type;
  108777. if (nodeType === "SpreadProperty") {
  108778. if (typeof opts === "undefined") {
  108779. return true;
  108780. } else {
  108781. return (0, _shallowEqual.default)(node, opts);
  108782. }
  108783. }
  108784. return false;
  108785. }
  108786. }
  108787. });
  108788. // node_modules/@babel/helper-get-function-arity/node_modules/@babel/types/lib/validators/matchesPattern.js
  108789. var require_matchesPattern5 = __commonJS({
  108790. "node_modules/@babel/helper-get-function-arity/node_modules/@babel/types/lib/validators/matchesPattern.js"(exports) {
  108791. "use strict";
  108792. Object.defineProperty(exports, "__esModule", {
  108793. value: true
  108794. });
  108795. exports.default = matchesPattern;
  108796. var _generated = require_generated21();
  108797. function matchesPattern(member, match, allowPartial) {
  108798. if (!(0, _generated.isMemberExpression)(member))
  108799. return false;
  108800. const parts = Array.isArray(match) ? match : match.split(".");
  108801. const nodes = [];
  108802. let node;
  108803. for (node = member; (0, _generated.isMemberExpression)(node); node = node.object) {
  108804. nodes.push(node.property);
  108805. }
  108806. nodes.push(node);
  108807. if (nodes.length < parts.length)
  108808. return false;
  108809. if (!allowPartial && nodes.length > parts.length)
  108810. return false;
  108811. for (let i = 0, j = nodes.length - 1; i < parts.length; i++, j--) {
  108812. const node2 = nodes[j];
  108813. let value;
  108814. if ((0, _generated.isIdentifier)(node2)) {
  108815. value = node2.name;
  108816. } else if ((0, _generated.isStringLiteral)(node2)) {
  108817. value = node2.value;
  108818. } else if ((0, _generated.isThisExpression)(node2)) {
  108819. value = "this";
  108820. } else {
  108821. return false;
  108822. }
  108823. if (parts[i] !== value)
  108824. return false;
  108825. }
  108826. return true;
  108827. }
  108828. }
  108829. });
  108830. // node_modules/@babel/helper-get-function-arity/node_modules/@babel/types/lib/validators/buildMatchMemberExpression.js
  108831. var require_buildMatchMemberExpression5 = __commonJS({
  108832. "node_modules/@babel/helper-get-function-arity/node_modules/@babel/types/lib/validators/buildMatchMemberExpression.js"(exports) {
  108833. "use strict";
  108834. Object.defineProperty(exports, "__esModule", {
  108835. value: true
  108836. });
  108837. exports.default = buildMatchMemberExpression;
  108838. var _matchesPattern = require_matchesPattern5();
  108839. function buildMatchMemberExpression(match, allowPartial) {
  108840. const parts = match.split(".");
  108841. return (member) => (0, _matchesPattern.default)(member, parts, allowPartial);
  108842. }
  108843. }
  108844. });
  108845. // node_modules/@babel/helper-get-function-arity/node_modules/@babel/types/lib/validators/react/isReactComponent.js
  108846. var require_isReactComponent5 = __commonJS({
  108847. "node_modules/@babel/helper-get-function-arity/node_modules/@babel/types/lib/validators/react/isReactComponent.js"(exports) {
  108848. "use strict";
  108849. Object.defineProperty(exports, "__esModule", {
  108850. value: true
  108851. });
  108852. exports.default = void 0;
  108853. var _buildMatchMemberExpression = require_buildMatchMemberExpression5();
  108854. var isReactComponent = (0, _buildMatchMemberExpression.default)("React.Component");
  108855. var _default = isReactComponent;
  108856. exports.default = _default;
  108857. }
  108858. });
  108859. // node_modules/@babel/helper-get-function-arity/node_modules/@babel/types/lib/validators/react/isCompatTag.js
  108860. var require_isCompatTag5 = __commonJS({
  108861. "node_modules/@babel/helper-get-function-arity/node_modules/@babel/types/lib/validators/react/isCompatTag.js"(exports) {
  108862. "use strict";
  108863. Object.defineProperty(exports, "__esModule", {
  108864. value: true
  108865. });
  108866. exports.default = isCompatTag;
  108867. function isCompatTag(tagName) {
  108868. return !!tagName && /^[a-z]/.test(tagName);
  108869. }
  108870. }
  108871. });
  108872. // node_modules/@babel/helper-get-function-arity/node_modules/@babel/types/lib/validators/isType.js
  108873. var require_isType5 = __commonJS({
  108874. "node_modules/@babel/helper-get-function-arity/node_modules/@babel/types/lib/validators/isType.js"(exports) {
  108875. "use strict";
  108876. Object.defineProperty(exports, "__esModule", {
  108877. value: true
  108878. });
  108879. exports.default = isType;
  108880. var _definitions = require_definitions5();
  108881. function isType(nodeType, targetType) {
  108882. if (nodeType === targetType)
  108883. return true;
  108884. if (_definitions.ALIAS_KEYS[targetType])
  108885. return false;
  108886. const aliases = _definitions.FLIPPED_ALIAS_KEYS[targetType];
  108887. if (aliases) {
  108888. if (aliases[0] === nodeType)
  108889. return true;
  108890. for (const alias of aliases) {
  108891. if (nodeType === alias)
  108892. return true;
  108893. }
  108894. }
  108895. return false;
  108896. }
  108897. }
  108898. });
  108899. // node_modules/@babel/helper-get-function-arity/node_modules/@babel/types/lib/validators/isPlaceholderType.js
  108900. var require_isPlaceholderType5 = __commonJS({
  108901. "node_modules/@babel/helper-get-function-arity/node_modules/@babel/types/lib/validators/isPlaceholderType.js"(exports) {
  108902. "use strict";
  108903. Object.defineProperty(exports, "__esModule", {
  108904. value: true
  108905. });
  108906. exports.default = isPlaceholderType;
  108907. var _definitions = require_definitions5();
  108908. function isPlaceholderType(placeholderType, targetType) {
  108909. if (placeholderType === targetType)
  108910. return true;
  108911. const aliases = _definitions.PLACEHOLDERS_ALIAS[placeholderType];
  108912. if (aliases) {
  108913. for (const alias of aliases) {
  108914. if (targetType === alias)
  108915. return true;
  108916. }
  108917. }
  108918. return false;
  108919. }
  108920. }
  108921. });
  108922. // node_modules/@babel/helper-get-function-arity/node_modules/@babel/types/lib/validators/is.js
  108923. var require_is5 = __commonJS({
  108924. "node_modules/@babel/helper-get-function-arity/node_modules/@babel/types/lib/validators/is.js"(exports) {
  108925. "use strict";
  108926. Object.defineProperty(exports, "__esModule", {
  108927. value: true
  108928. });
  108929. exports.default = is;
  108930. var _shallowEqual = require_shallowEqual5();
  108931. var _isType = require_isType5();
  108932. var _isPlaceholderType = require_isPlaceholderType5();
  108933. var _definitions = require_definitions5();
  108934. function is(type, node, opts) {
  108935. if (!node)
  108936. return false;
  108937. const matches = (0, _isType.default)(node.type, type);
  108938. if (!matches) {
  108939. if (!opts && node.type === "Placeholder" && type in _definitions.FLIPPED_ALIAS_KEYS) {
  108940. return (0, _isPlaceholderType.default)(node.expectedNode, type);
  108941. }
  108942. return false;
  108943. }
  108944. if (typeof opts === "undefined") {
  108945. return true;
  108946. } else {
  108947. return (0, _shallowEqual.default)(node, opts);
  108948. }
  108949. }
  108950. }
  108951. });
  108952. // node_modules/@babel/helper-get-function-arity/node_modules/@babel/helper-validator-identifier/lib/identifier.js
  108953. var require_identifier7 = __commonJS({
  108954. "node_modules/@babel/helper-get-function-arity/node_modules/@babel/helper-validator-identifier/lib/identifier.js"(exports) {
  108955. "use strict";
  108956. Object.defineProperty(exports, "__esModule", {
  108957. value: true
  108958. });
  108959. exports.isIdentifierStart = isIdentifierStart2;
  108960. exports.isIdentifierChar = isIdentifierChar2;
  108961. exports.isIdentifierName = isIdentifierName;
  108962. var nonASCIIidentifierStartChars2 = "\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u08A0-\u08B4\u08B6-\u08C7\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1878\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309B-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u31BF\u31F0-\u31FF\u3400-\u4DBF\u4E00-\u9FFC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7BF\uA7C2-\uA7CA\uA7F5-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC";
  108963. var nonASCIIidentifierChars2 = "\u200C\u200D\xB7\u0300-\u036F\u0387\u0483-\u0487\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u0669\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u06F0-\u06F9\u0711\u0730-\u074A\u07A6-\u07B0\u07C0-\u07C9\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u08D3-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0966-\u096F\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u09E6-\u09EF\u09FE\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A66-\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0AE6-\u0AEF\u0AFA-\u0AFF\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B55-\u0B57\u0B62\u0B63\u0B66-\u0B6F\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0BE6-\u0BEF\u0C00-\u0C04\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C66-\u0C6F\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0CE6-\u0CEF\u0D00-\u0D03\u0D3B\u0D3C\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D66-\u0D6F\u0D81-\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0E50-\u0E59\u0EB1\u0EB4-\u0EBC\u0EC8-\u0ECD\u0ED0-\u0ED9\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1040-\u1049\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F-\u109D\u135D-\u135F\u1369-\u1371\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u18A9\u1920-\u192B\u1930-\u193B\u1946-\u194F\u19D0-\u19DA\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AB0-\u1ABD\u1ABF\u1AC0\u1B00-\u1B04\u1B34-\u1B44\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BB0-\u1BB9\u1BE6-\u1BF3\u1C24-\u1C37\u1C40-\u1C49\u1C50-\u1C59\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF4\u1CF7-\u1CF9\u1DC0-\u1DF9\u1DFB-\u1DFF\u203F\u2040\u2054\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA620-\uA629\uA66F\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA82C\uA880\uA881\uA8B4-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F1\uA8FF-\uA909\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9D0-\uA9D9\uA9E5\uA9F0-\uA9F9\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA50-\uAA59\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uABF0-\uABF9\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFF10-\uFF19\uFF3F";
  108964. var nonASCIIidentifierStart2 = new RegExp("[" + nonASCIIidentifierStartChars2 + "]");
  108965. var nonASCIIidentifier2 = new RegExp("[" + nonASCIIidentifierStartChars2 + nonASCIIidentifierChars2 + "]");
  108966. nonASCIIidentifierStartChars2 = nonASCIIidentifierChars2 = null;
  108967. var astralIdentifierStartCodes2 = [0, 11, 2, 25, 2, 18, 2, 1, 2, 14, 3, 13, 35, 122, 70, 52, 268, 28, 4, 48, 48, 31, 14, 29, 6, 37, 11, 29, 3, 35, 5, 7, 2, 4, 43, 157, 19, 35, 5, 35, 5, 39, 9, 51, 157, 310, 10, 21, 11, 7, 153, 5, 3, 0, 2, 43, 2, 1, 4, 0, 3, 22, 11, 22, 10, 30, 66, 18, 2, 1, 11, 21, 11, 25, 71, 55, 7, 1, 65, 0, 16, 3, 2, 2, 2, 28, 43, 28, 4, 28, 36, 7, 2, 27, 28, 53, 11, 21, 11, 18, 14, 17, 111, 72, 56, 50, 14, 50, 14, 35, 349, 41, 7, 1, 79, 28, 11, 0, 9, 21, 107, 20, 28, 22, 13, 52, 76, 44, 33, 24, 27, 35, 30, 0, 3, 0, 9, 34, 4, 0, 13, 47, 15, 3, 22, 0, 2, 0, 36, 17, 2, 24, 85, 6, 2, 0, 2, 3, 2, 14, 2, 9, 8, 46, 39, 7, 3, 1, 3, 21, 2, 6, 2, 1, 2, 4, 4, 0, 19, 0, 13, 4, 159, 52, 19, 3, 21, 2, 31, 47, 21, 1, 2, 0, 185, 46, 42, 3, 37, 47, 21, 0, 60, 42, 14, 0, 72, 26, 230, 43, 117, 63, 32, 7, 3, 0, 3, 7, 2, 1, 2, 23, 16, 0, 2, 0, 95, 7, 3, 38, 17, 0, 2, 0, 29, 0, 11, 39, 8, 0, 22, 0, 12, 45, 20, 0, 35, 56, 264, 8, 2, 36, 18, 0, 50, 29, 113, 6, 2, 1, 2, 37, 22, 0, 26, 5, 2, 1, 2, 31, 15, 0, 328, 18, 190, 0, 80, 921, 103, 110, 18, 195, 2749, 1070, 4050, 582, 8634, 568, 8, 30, 114, 29, 19, 47, 17, 3, 32, 20, 6, 18, 689, 63, 129, 74, 6, 0, 67, 12, 65, 1, 2, 0, 29, 6135, 9, 1237, 43, 8, 8952, 286, 50, 2, 18, 3, 9, 395, 2309, 106, 6, 12, 4, 8, 8, 9, 5991, 84, 2, 70, 2, 1, 3, 0, 3, 1, 3, 3, 2, 11, 2, 0, 2, 6, 2, 64, 2, 3, 3, 7, 2, 6, 2, 27, 2, 3, 2, 4, 2, 0, 4, 6, 2, 339, 3, 24, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 7, 2357, 44, 11, 6, 17, 0, 370, 43, 1301, 196, 60, 67, 8, 0, 1205, 3, 2, 26, 2, 1, 2, 0, 3, 0, 2, 9, 2, 3, 2, 0, 2, 0, 7, 0, 5, 0, 2, 0, 2, 0, 2, 2, 2, 1, 2, 0, 3, 0, 2, 0, 2, 0, 2, 0, 2, 0, 2, 1, 2, 0, 3, 3, 2, 6, 2, 3, 2, 3, 2, 0, 2, 9, 2, 16, 6, 2, 2, 4, 2, 16, 4421, 42717, 35, 4148, 12, 221, 3, 5761, 15, 7472, 3104, 541, 1507, 4938];
  108968. var astralIdentifierCodes2 = [509, 0, 227, 0, 150, 4, 294, 9, 1368, 2, 2, 1, 6, 3, 41, 2, 5, 0, 166, 1, 574, 3, 9, 9, 370, 1, 154, 10, 176, 2, 54, 14, 32, 9, 16, 3, 46, 10, 54, 9, 7, 2, 37, 13, 2, 9, 6, 1, 45, 0, 13, 2, 49, 13, 9, 3, 2, 11, 83, 11, 7, 0, 161, 11, 6, 9, 7, 3, 56, 1, 2, 6, 3, 1, 3, 2, 10, 0, 11, 1, 3, 6, 4, 4, 193, 17, 10, 9, 5, 0, 82, 19, 13, 9, 214, 6, 3, 8, 28, 1, 83, 16, 16, 9, 82, 12, 9, 9, 84, 14, 5, 9, 243, 14, 166, 9, 71, 5, 2, 1, 3, 3, 2, 0, 2, 1, 13, 9, 120, 6, 3, 6, 4, 0, 29, 9, 41, 6, 2, 3, 9, 0, 10, 10, 47, 15, 406, 7, 2, 7, 17, 9, 57, 21, 2, 13, 123, 5, 4, 0, 2, 1, 2, 6, 2, 0, 9, 9, 49, 4, 2, 1, 2, 4, 9, 9, 330, 3, 19306, 9, 135, 4, 60, 6, 26, 9, 1014, 0, 2, 54, 8, 3, 82, 0, 12, 1, 19628, 1, 5319, 4, 4, 5, 9, 7, 3, 6, 31, 3, 149, 2, 1418, 49, 513, 54, 5, 49, 9, 0, 15, 0, 23, 4, 2, 14, 1361, 6, 2, 16, 3, 6, 2, 1, 2, 4, 262, 6, 10, 9, 419, 13, 1495, 6, 110, 6, 6, 9, 4759, 9, 787719, 239];
  108969. function isInAstralSet2(code2, set) {
  108970. let pos = 65536;
  108971. for (let i = 0, length = set.length; i < length; i += 2) {
  108972. pos += set[i];
  108973. if (pos > code2)
  108974. return false;
  108975. pos += set[i + 1];
  108976. if (pos >= code2)
  108977. return true;
  108978. }
  108979. return false;
  108980. }
  108981. function isIdentifierStart2(code2) {
  108982. if (code2 < 65)
  108983. return code2 === 36;
  108984. if (code2 <= 90)
  108985. return true;
  108986. if (code2 < 97)
  108987. return code2 === 95;
  108988. if (code2 <= 122)
  108989. return true;
  108990. if (code2 <= 65535) {
  108991. return code2 >= 170 && nonASCIIidentifierStart2.test(String.fromCharCode(code2));
  108992. }
  108993. return isInAstralSet2(code2, astralIdentifierStartCodes2);
  108994. }
  108995. function isIdentifierChar2(code2) {
  108996. if (code2 < 48)
  108997. return code2 === 36;
  108998. if (code2 < 58)
  108999. return true;
  109000. if (code2 < 65)
  109001. return false;
  109002. if (code2 <= 90)
  109003. return true;
  109004. if (code2 < 97)
  109005. return code2 === 95;
  109006. if (code2 <= 122)
  109007. return true;
  109008. if (code2 <= 65535) {
  109009. return code2 >= 170 && nonASCIIidentifier2.test(String.fromCharCode(code2));
  109010. }
  109011. return isInAstralSet2(code2, astralIdentifierStartCodes2) || isInAstralSet2(code2, astralIdentifierCodes2);
  109012. }
  109013. function isIdentifierName(name2) {
  109014. let isFirst = true;
  109015. for (let i = 0; i < name2.length; i++) {
  109016. let cp = name2.charCodeAt(i);
  109017. if ((cp & 64512) === 55296 && i + 1 < name2.length) {
  109018. const trail = name2.charCodeAt(++i);
  109019. if ((trail & 64512) === 56320) {
  109020. cp = 65536 + ((cp & 1023) << 10) + (trail & 1023);
  109021. }
  109022. }
  109023. if (isFirst) {
  109024. isFirst = false;
  109025. if (!isIdentifierStart2(cp)) {
  109026. return false;
  109027. }
  109028. } else if (!isIdentifierChar2(cp)) {
  109029. return false;
  109030. }
  109031. }
  109032. return !isFirst;
  109033. }
  109034. }
  109035. });
  109036. // node_modules/@babel/helper-get-function-arity/node_modules/@babel/helper-validator-identifier/lib/keyword.js
  109037. var require_keyword7 = __commonJS({
  109038. "node_modules/@babel/helper-get-function-arity/node_modules/@babel/helper-validator-identifier/lib/keyword.js"(exports) {
  109039. "use strict";
  109040. Object.defineProperty(exports, "__esModule", {
  109041. value: true
  109042. });
  109043. exports.isReservedWord = isReservedWord;
  109044. exports.isStrictReservedWord = isStrictReservedWord;
  109045. exports.isStrictBindOnlyReservedWord = isStrictBindOnlyReservedWord;
  109046. exports.isStrictBindReservedWord = isStrictBindReservedWord;
  109047. exports.isKeyword = isKeyword;
  109048. var reservedWords2 = {
  109049. keyword: ["break", "case", "catch", "continue", "debugger", "default", "do", "else", "finally", "for", "function", "if", "return", "switch", "throw", "try", "var", "const", "while", "with", "new", "this", "super", "class", "extends", "export", "import", "null", "true", "false", "in", "instanceof", "typeof", "void", "delete"],
  109050. strict: ["implements", "interface", "let", "package", "private", "protected", "public", "static", "yield"],
  109051. strictBind: ["eval", "arguments"]
  109052. };
  109053. var keywords2 = new Set(reservedWords2.keyword);
  109054. var reservedWordsStrictSet = new Set(reservedWords2.strict);
  109055. var reservedWordsStrictBindSet = new Set(reservedWords2.strictBind);
  109056. function isReservedWord(word, inModule) {
  109057. return inModule && word === "await" || word === "enum";
  109058. }
  109059. function isStrictReservedWord(word, inModule) {
  109060. return isReservedWord(word, inModule) || reservedWordsStrictSet.has(word);
  109061. }
  109062. function isStrictBindOnlyReservedWord(word) {
  109063. return reservedWordsStrictBindSet.has(word);
  109064. }
  109065. function isStrictBindReservedWord(word, inModule) {
  109066. return isStrictReservedWord(word, inModule) || isStrictBindOnlyReservedWord(word);
  109067. }
  109068. function isKeyword(word) {
  109069. return keywords2.has(word);
  109070. }
  109071. }
  109072. });
  109073. // node_modules/@babel/helper-get-function-arity/node_modules/@babel/helper-validator-identifier/lib/index.js
  109074. var require_lib26 = __commonJS({
  109075. "node_modules/@babel/helper-get-function-arity/node_modules/@babel/helper-validator-identifier/lib/index.js"(exports) {
  109076. "use strict";
  109077. Object.defineProperty(exports, "__esModule", {
  109078. value: true
  109079. });
  109080. Object.defineProperty(exports, "isIdentifierName", {
  109081. enumerable: true,
  109082. get: function() {
  109083. return _identifier.isIdentifierName;
  109084. }
  109085. });
  109086. Object.defineProperty(exports, "isIdentifierChar", {
  109087. enumerable: true,
  109088. get: function() {
  109089. return _identifier.isIdentifierChar;
  109090. }
  109091. });
  109092. Object.defineProperty(exports, "isIdentifierStart", {
  109093. enumerable: true,
  109094. get: function() {
  109095. return _identifier.isIdentifierStart;
  109096. }
  109097. });
  109098. Object.defineProperty(exports, "isReservedWord", {
  109099. enumerable: true,
  109100. get: function() {
  109101. return _keyword.isReservedWord;
  109102. }
  109103. });
  109104. Object.defineProperty(exports, "isStrictBindOnlyReservedWord", {
  109105. enumerable: true,
  109106. get: function() {
  109107. return _keyword.isStrictBindOnlyReservedWord;
  109108. }
  109109. });
  109110. Object.defineProperty(exports, "isStrictBindReservedWord", {
  109111. enumerable: true,
  109112. get: function() {
  109113. return _keyword.isStrictBindReservedWord;
  109114. }
  109115. });
  109116. Object.defineProperty(exports, "isStrictReservedWord", {
  109117. enumerable: true,
  109118. get: function() {
  109119. return _keyword.isStrictReservedWord;
  109120. }
  109121. });
  109122. Object.defineProperty(exports, "isKeyword", {
  109123. enumerable: true,
  109124. get: function() {
  109125. return _keyword.isKeyword;
  109126. }
  109127. });
  109128. var _identifier = require_identifier7();
  109129. var _keyword = require_keyword7();
  109130. }
  109131. });
  109132. // node_modules/@babel/helper-get-function-arity/node_modules/@babel/types/lib/validators/isValidIdentifier.js
  109133. var require_isValidIdentifier5 = __commonJS({
  109134. "node_modules/@babel/helper-get-function-arity/node_modules/@babel/types/lib/validators/isValidIdentifier.js"(exports) {
  109135. "use strict";
  109136. Object.defineProperty(exports, "__esModule", {
  109137. value: true
  109138. });
  109139. exports.default = isValidIdentifier;
  109140. var _helperValidatorIdentifier = require_lib26();
  109141. function isValidIdentifier(name2, reserved = true) {
  109142. if (typeof name2 !== "string")
  109143. return false;
  109144. if (reserved) {
  109145. if ((0, _helperValidatorIdentifier.isKeyword)(name2) || (0, _helperValidatorIdentifier.isStrictReservedWord)(name2, true)) {
  109146. return false;
  109147. }
  109148. }
  109149. return (0, _helperValidatorIdentifier.isIdentifierName)(name2);
  109150. }
  109151. }
  109152. });
  109153. // node_modules/@babel/helper-get-function-arity/node_modules/@babel/types/lib/constants/index.js
  109154. var require_constants5 = __commonJS({
  109155. "node_modules/@babel/helper-get-function-arity/node_modules/@babel/types/lib/constants/index.js"(exports) {
  109156. "use strict";
  109157. Object.defineProperty(exports, "__esModule", {
  109158. value: true
  109159. });
  109160. exports.NOT_LOCAL_BINDING = exports.BLOCK_SCOPED_SYMBOL = exports.INHERIT_KEYS = exports.UNARY_OPERATORS = exports.STRING_UNARY_OPERATORS = exports.NUMBER_UNARY_OPERATORS = exports.BOOLEAN_UNARY_OPERATORS = exports.ASSIGNMENT_OPERATORS = exports.BINARY_OPERATORS = exports.NUMBER_BINARY_OPERATORS = exports.BOOLEAN_BINARY_OPERATORS = exports.COMPARISON_BINARY_OPERATORS = exports.EQUALITY_BINARY_OPERATORS = exports.BOOLEAN_NUMBER_BINARY_OPERATORS = exports.UPDATE_OPERATORS = exports.LOGICAL_OPERATORS = exports.COMMENT_KEYS = exports.FOR_INIT_KEYS = exports.FLATTENABLE_KEYS = exports.STATEMENT_OR_BLOCK_KEYS = void 0;
  109161. var STATEMENT_OR_BLOCK_KEYS = ["consequent", "body", "alternate"];
  109162. exports.STATEMENT_OR_BLOCK_KEYS = STATEMENT_OR_BLOCK_KEYS;
  109163. var FLATTENABLE_KEYS = ["body", "expressions"];
  109164. exports.FLATTENABLE_KEYS = FLATTENABLE_KEYS;
  109165. var FOR_INIT_KEYS = ["left", "init"];
  109166. exports.FOR_INIT_KEYS = FOR_INIT_KEYS;
  109167. var COMMENT_KEYS = ["leadingComments", "trailingComments", "innerComments"];
  109168. exports.COMMENT_KEYS = COMMENT_KEYS;
  109169. var LOGICAL_OPERATORS = ["||", "&&", "??"];
  109170. exports.LOGICAL_OPERATORS = LOGICAL_OPERATORS;
  109171. var UPDATE_OPERATORS = ["++", "--"];
  109172. exports.UPDATE_OPERATORS = UPDATE_OPERATORS;
  109173. var BOOLEAN_NUMBER_BINARY_OPERATORS = [">", "<", ">=", "<="];
  109174. exports.BOOLEAN_NUMBER_BINARY_OPERATORS = BOOLEAN_NUMBER_BINARY_OPERATORS;
  109175. var EQUALITY_BINARY_OPERATORS = ["==", "===", "!=", "!=="];
  109176. exports.EQUALITY_BINARY_OPERATORS = EQUALITY_BINARY_OPERATORS;
  109177. var COMPARISON_BINARY_OPERATORS = [...EQUALITY_BINARY_OPERATORS, "in", "instanceof"];
  109178. exports.COMPARISON_BINARY_OPERATORS = COMPARISON_BINARY_OPERATORS;
  109179. var BOOLEAN_BINARY_OPERATORS = [...COMPARISON_BINARY_OPERATORS, ...BOOLEAN_NUMBER_BINARY_OPERATORS];
  109180. exports.BOOLEAN_BINARY_OPERATORS = BOOLEAN_BINARY_OPERATORS;
  109181. var NUMBER_BINARY_OPERATORS = ["-", "/", "%", "*", "**", "&", "|", ">>", ">>>", "<<", "^"];
  109182. exports.NUMBER_BINARY_OPERATORS = NUMBER_BINARY_OPERATORS;
  109183. var BINARY_OPERATORS = ["+", ...NUMBER_BINARY_OPERATORS, ...BOOLEAN_BINARY_OPERATORS];
  109184. exports.BINARY_OPERATORS = BINARY_OPERATORS;
  109185. var ASSIGNMENT_OPERATORS = ["=", "+=", ...NUMBER_BINARY_OPERATORS.map((op) => op + "="), ...LOGICAL_OPERATORS.map((op) => op + "=")];
  109186. exports.ASSIGNMENT_OPERATORS = ASSIGNMENT_OPERATORS;
  109187. var BOOLEAN_UNARY_OPERATORS = ["delete", "!"];
  109188. exports.BOOLEAN_UNARY_OPERATORS = BOOLEAN_UNARY_OPERATORS;
  109189. var NUMBER_UNARY_OPERATORS = ["+", "-", "~"];
  109190. exports.NUMBER_UNARY_OPERATORS = NUMBER_UNARY_OPERATORS;
  109191. var STRING_UNARY_OPERATORS = ["typeof"];
  109192. exports.STRING_UNARY_OPERATORS = STRING_UNARY_OPERATORS;
  109193. var UNARY_OPERATORS = ["void", "throw", ...BOOLEAN_UNARY_OPERATORS, ...NUMBER_UNARY_OPERATORS, ...STRING_UNARY_OPERATORS];
  109194. exports.UNARY_OPERATORS = UNARY_OPERATORS;
  109195. var INHERIT_KEYS = {
  109196. optional: ["typeAnnotation", "typeParameters", "returnType"],
  109197. force: ["start", "loc", "end"]
  109198. };
  109199. exports.INHERIT_KEYS = INHERIT_KEYS;
  109200. var BLOCK_SCOPED_SYMBOL = Symbol.for("var used to be block scoped");
  109201. exports.BLOCK_SCOPED_SYMBOL = BLOCK_SCOPED_SYMBOL;
  109202. var NOT_LOCAL_BINDING = Symbol.for("should not be considered a local binding");
  109203. exports.NOT_LOCAL_BINDING = NOT_LOCAL_BINDING;
  109204. }
  109205. });
  109206. // node_modules/@babel/helper-get-function-arity/node_modules/@babel/types/lib/validators/validate.js
  109207. var require_validate5 = __commonJS({
  109208. "node_modules/@babel/helper-get-function-arity/node_modules/@babel/types/lib/validators/validate.js"(exports) {
  109209. "use strict";
  109210. Object.defineProperty(exports, "__esModule", {
  109211. value: true
  109212. });
  109213. exports.default = validate;
  109214. exports.validateField = validateField;
  109215. exports.validateChild = validateChild;
  109216. var _definitions = require_definitions5();
  109217. function validate(node, key, val) {
  109218. if (!node)
  109219. return;
  109220. const fields = _definitions.NODE_FIELDS[node.type];
  109221. if (!fields)
  109222. return;
  109223. const field = fields[key];
  109224. validateField(node, key, val, field);
  109225. validateChild(node, key, val);
  109226. }
  109227. function validateField(node, key, val, field) {
  109228. if (!(field != null && field.validate))
  109229. return;
  109230. if (field.optional && val == null)
  109231. return;
  109232. field.validate(node, key, val);
  109233. }
  109234. function validateChild(node, key, val) {
  109235. if (val == null)
  109236. return;
  109237. const validate2 = _definitions.NODE_PARENT_VALIDATIONS[val.type];
  109238. if (!validate2)
  109239. return;
  109240. validate2(node, key, val);
  109241. }
  109242. }
  109243. });
  109244. // node_modules/@babel/helper-get-function-arity/node_modules/@babel/types/lib/definitions/utils.js
  109245. var require_utils5 = __commonJS({
  109246. "node_modules/@babel/helper-get-function-arity/node_modules/@babel/types/lib/definitions/utils.js"(exports) {
  109247. "use strict";
  109248. Object.defineProperty(exports, "__esModule", {
  109249. value: true
  109250. });
  109251. exports.validate = validate;
  109252. exports.typeIs = typeIs;
  109253. exports.validateType = validateType;
  109254. exports.validateOptional = validateOptional;
  109255. exports.validateOptionalType = validateOptionalType;
  109256. exports.arrayOf = arrayOf;
  109257. exports.arrayOfType = arrayOfType;
  109258. exports.validateArrayOfType = validateArrayOfType;
  109259. exports.assertEach = assertEach;
  109260. exports.assertOneOf = assertOneOf;
  109261. exports.assertNodeType = assertNodeType;
  109262. exports.assertNodeOrValueType = assertNodeOrValueType;
  109263. exports.assertValueType = assertValueType;
  109264. exports.assertShape = assertShape;
  109265. exports.assertOptionalChainStart = assertOptionalChainStart;
  109266. exports.chain = chain;
  109267. exports.default = defineType;
  109268. exports.NODE_PARENT_VALIDATIONS = exports.DEPRECATED_KEYS = exports.BUILDER_KEYS = exports.NODE_FIELDS = exports.FLIPPED_ALIAS_KEYS = exports.ALIAS_KEYS = exports.VISITOR_KEYS = void 0;
  109269. var _is = require_is5();
  109270. var _validate = require_validate5();
  109271. var VISITOR_KEYS = {};
  109272. exports.VISITOR_KEYS = VISITOR_KEYS;
  109273. var ALIAS_KEYS = {};
  109274. exports.ALIAS_KEYS = ALIAS_KEYS;
  109275. var FLIPPED_ALIAS_KEYS = {};
  109276. exports.FLIPPED_ALIAS_KEYS = FLIPPED_ALIAS_KEYS;
  109277. var NODE_FIELDS = {};
  109278. exports.NODE_FIELDS = NODE_FIELDS;
  109279. var BUILDER_KEYS = {};
  109280. exports.BUILDER_KEYS = BUILDER_KEYS;
  109281. var DEPRECATED_KEYS = {};
  109282. exports.DEPRECATED_KEYS = DEPRECATED_KEYS;
  109283. var NODE_PARENT_VALIDATIONS = {};
  109284. exports.NODE_PARENT_VALIDATIONS = NODE_PARENT_VALIDATIONS;
  109285. function getType(val) {
  109286. if (Array.isArray(val)) {
  109287. return "array";
  109288. } else if (val === null) {
  109289. return "null";
  109290. } else {
  109291. return typeof val;
  109292. }
  109293. }
  109294. function validate(validate2) {
  109295. return {
  109296. validate: validate2
  109297. };
  109298. }
  109299. function typeIs(typeName) {
  109300. return typeof typeName === "string" ? assertNodeType(typeName) : assertNodeType(...typeName);
  109301. }
  109302. function validateType(typeName) {
  109303. return validate(typeIs(typeName));
  109304. }
  109305. function validateOptional(validate2) {
  109306. return {
  109307. validate: validate2,
  109308. optional: true
  109309. };
  109310. }
  109311. function validateOptionalType(typeName) {
  109312. return {
  109313. validate: typeIs(typeName),
  109314. optional: true
  109315. };
  109316. }
  109317. function arrayOf(elementType) {
  109318. return chain(assertValueType("array"), assertEach(elementType));
  109319. }
  109320. function arrayOfType(typeName) {
  109321. return arrayOf(typeIs(typeName));
  109322. }
  109323. function validateArrayOfType(typeName) {
  109324. return validate(arrayOfType(typeName));
  109325. }
  109326. function assertEach(callback) {
  109327. function validator(node, key, val) {
  109328. if (!Array.isArray(val))
  109329. return;
  109330. for (let i = 0; i < val.length; i++) {
  109331. const subkey = `${key}[${i}]`;
  109332. const v = val[i];
  109333. callback(node, subkey, v);
  109334. if (process.env.BABEL_TYPES_8_BREAKING)
  109335. (0, _validate.validateChild)(node, subkey, v);
  109336. }
  109337. }
  109338. validator.each = callback;
  109339. return validator;
  109340. }
  109341. function assertOneOf(...values) {
  109342. function validate2(node, key, val) {
  109343. if (values.indexOf(val) < 0) {
  109344. throw new TypeError(`Property ${key} expected value to be one of ${JSON.stringify(values)} but got ${JSON.stringify(val)}`);
  109345. }
  109346. }
  109347. validate2.oneOf = values;
  109348. return validate2;
  109349. }
  109350. function assertNodeType(...types2) {
  109351. function validate2(node, key, val) {
  109352. for (const type of types2) {
  109353. if ((0, _is.default)(type, val)) {
  109354. (0, _validate.validateChild)(node, key, val);
  109355. return;
  109356. }
  109357. }
  109358. throw new TypeError(`Property ${key} of ${node.type} expected node to be of a type ${JSON.stringify(types2)} but instead got ${JSON.stringify(val == null ? void 0 : val.type)}`);
  109359. }
  109360. validate2.oneOfNodeTypes = types2;
  109361. return validate2;
  109362. }
  109363. function assertNodeOrValueType(...types2) {
  109364. function validate2(node, key, val) {
  109365. for (const type of types2) {
  109366. if (getType(val) === type || (0, _is.default)(type, val)) {
  109367. (0, _validate.validateChild)(node, key, val);
  109368. return;
  109369. }
  109370. }
  109371. throw new TypeError(`Property ${key} of ${node.type} expected node to be of a type ${JSON.stringify(types2)} but instead got ${JSON.stringify(val == null ? void 0 : val.type)}`);
  109372. }
  109373. validate2.oneOfNodeOrValueTypes = types2;
  109374. return validate2;
  109375. }
  109376. function assertValueType(type) {
  109377. function validate2(node, key, val) {
  109378. const valid2 = getType(val) === type;
  109379. if (!valid2) {
  109380. throw new TypeError(`Property ${key} expected type of ${type} but got ${getType(val)}`);
  109381. }
  109382. }
  109383. validate2.type = type;
  109384. return validate2;
  109385. }
  109386. function assertShape(shape) {
  109387. function validate2(node, key, val) {
  109388. const errors = [];
  109389. for (const property of Object.keys(shape)) {
  109390. try {
  109391. (0, _validate.validateField)(node, property, val[property], shape[property]);
  109392. } catch (error) {
  109393. if (error instanceof TypeError) {
  109394. errors.push(error.message);
  109395. continue;
  109396. }
  109397. throw error;
  109398. }
  109399. }
  109400. if (errors.length) {
  109401. throw new TypeError(`Property ${key} of ${node.type} expected to have the following:
  109402. ${errors.join("\n")}`);
  109403. }
  109404. }
  109405. validate2.shapeOf = shape;
  109406. return validate2;
  109407. }
  109408. function assertOptionalChainStart() {
  109409. function validate2(node) {
  109410. var _current;
  109411. let current2 = node;
  109412. while (node) {
  109413. const {
  109414. type
  109415. } = current2;
  109416. if (type === "OptionalCallExpression") {
  109417. if (current2.optional)
  109418. return;
  109419. current2 = current2.callee;
  109420. continue;
  109421. }
  109422. if (type === "OptionalMemberExpression") {
  109423. if (current2.optional)
  109424. return;
  109425. current2 = current2.object;
  109426. continue;
  109427. }
  109428. break;
  109429. }
  109430. throw new TypeError(`Non-optional ${node.type} must chain from an optional OptionalMemberExpression or OptionalCallExpression. Found chain from ${(_current = current2) == null ? void 0 : _current.type}`);
  109431. }
  109432. return validate2;
  109433. }
  109434. function chain(...fns) {
  109435. function validate2(...args) {
  109436. for (const fn of fns) {
  109437. fn(...args);
  109438. }
  109439. }
  109440. validate2.chainOf = fns;
  109441. if (fns.length >= 2 && "type" in fns[0] && fns[0].type === "array" && !("each" in fns[1])) {
  109442. throw new Error(`An assertValueType("array") validator can only be followed by an assertEach(...) validator.`);
  109443. }
  109444. return validate2;
  109445. }
  109446. var validTypeOpts = ["aliases", "builder", "deprecatedAlias", "fields", "inherits", "visitor", "validate"];
  109447. var validFieldKeys = ["default", "optional", "validate"];
  109448. function defineType(type, opts = {}) {
  109449. const inherits = opts.inherits && store[opts.inherits] || {};
  109450. let fields = opts.fields;
  109451. if (!fields) {
  109452. fields = {};
  109453. if (inherits.fields) {
  109454. const keys2 = Object.getOwnPropertyNames(inherits.fields);
  109455. for (const key of keys2) {
  109456. const field = inherits.fields[key];
  109457. const def = field.default;
  109458. if (Array.isArray(def) ? def.length > 0 : def && typeof def === "object") {
  109459. throw new Error("field defaults can only be primitives or empty arrays currently");
  109460. }
  109461. fields[key] = {
  109462. default: Array.isArray(def) ? [] : def,
  109463. optional: field.optional,
  109464. validate: field.validate
  109465. };
  109466. }
  109467. }
  109468. }
  109469. const visitor = opts.visitor || inherits.visitor || [];
  109470. const aliases = opts.aliases || inherits.aliases || [];
  109471. const builder = opts.builder || inherits.builder || opts.visitor || [];
  109472. for (const k of Object.keys(opts)) {
  109473. if (validTypeOpts.indexOf(k) === -1) {
  109474. throw new Error(`Unknown type option "${k}" on ${type}`);
  109475. }
  109476. }
  109477. if (opts.deprecatedAlias) {
  109478. DEPRECATED_KEYS[opts.deprecatedAlias] = type;
  109479. }
  109480. for (const key of visitor.concat(builder)) {
  109481. fields[key] = fields[key] || {};
  109482. }
  109483. for (const key of Object.keys(fields)) {
  109484. const field = fields[key];
  109485. if (field.default !== void 0 && builder.indexOf(key) === -1) {
  109486. field.optional = true;
  109487. }
  109488. if (field.default === void 0) {
  109489. field.default = null;
  109490. } else if (!field.validate && field.default != null) {
  109491. field.validate = assertValueType(getType(field.default));
  109492. }
  109493. for (const k of Object.keys(field)) {
  109494. if (validFieldKeys.indexOf(k) === -1) {
  109495. throw new Error(`Unknown field key "${k}" on ${type}.${key}`);
  109496. }
  109497. }
  109498. }
  109499. VISITOR_KEYS[type] = opts.visitor = visitor;
  109500. BUILDER_KEYS[type] = opts.builder = builder;
  109501. NODE_FIELDS[type] = opts.fields = fields;
  109502. ALIAS_KEYS[type] = opts.aliases = aliases;
  109503. aliases.forEach((alias) => {
  109504. FLIPPED_ALIAS_KEYS[alias] = FLIPPED_ALIAS_KEYS[alias] || [];
  109505. FLIPPED_ALIAS_KEYS[alias].push(type);
  109506. });
  109507. if (opts.validate) {
  109508. NODE_PARENT_VALIDATIONS[type] = opts.validate;
  109509. }
  109510. store[type] = opts;
  109511. }
  109512. var store = {};
  109513. }
  109514. });
  109515. // node_modules/@babel/helper-get-function-arity/node_modules/@babel/types/lib/definitions/core.js
  109516. var require_core5 = __commonJS({
  109517. "node_modules/@babel/helper-get-function-arity/node_modules/@babel/types/lib/definitions/core.js"(exports) {
  109518. "use strict";
  109519. Object.defineProperty(exports, "__esModule", {
  109520. value: true
  109521. });
  109522. exports.classMethodOrDeclareMethodCommon = exports.classMethodOrPropertyCommon = exports.patternLikeCommon = exports.functionDeclarationCommon = exports.functionTypeAnnotationCommon = exports.functionCommon = void 0;
  109523. var _is = require_is5();
  109524. var _isValidIdentifier = require_isValidIdentifier5();
  109525. var _helperValidatorIdentifier = require_lib26();
  109526. var _constants = require_constants5();
  109527. var _utils = require_utils5();
  109528. (0, _utils.default)("ArrayExpression", {
  109529. fields: {
  109530. elements: {
  109531. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeOrValueType)("null", "Expression", "SpreadElement"))),
  109532. default: !process.env.BABEL_TYPES_8_BREAKING ? [] : void 0
  109533. }
  109534. },
  109535. visitor: ["elements"],
  109536. aliases: ["Expression"]
  109537. });
  109538. (0, _utils.default)("AssignmentExpression", {
  109539. fields: {
  109540. operator: {
  109541. validate: function() {
  109542. if (!process.env.BABEL_TYPES_8_BREAKING) {
  109543. return (0, _utils.assertValueType)("string");
  109544. }
  109545. const identifier = (0, _utils.assertOneOf)(..._constants.ASSIGNMENT_OPERATORS);
  109546. const pattern = (0, _utils.assertOneOf)("=");
  109547. return function(node, key, val) {
  109548. const validator = (0, _is.default)("Pattern", node.left) ? pattern : identifier;
  109549. validator(node, key, val);
  109550. };
  109551. }()
  109552. },
  109553. left: {
  109554. validate: !process.env.BABEL_TYPES_8_BREAKING ? (0, _utils.assertNodeType)("LVal") : (0, _utils.assertNodeType)("Identifier", "MemberExpression", "ArrayPattern", "ObjectPattern")
  109555. },
  109556. right: {
  109557. validate: (0, _utils.assertNodeType)("Expression")
  109558. }
  109559. },
  109560. builder: ["operator", "left", "right"],
  109561. visitor: ["left", "right"],
  109562. aliases: ["Expression"]
  109563. });
  109564. (0, _utils.default)("BinaryExpression", {
  109565. builder: ["operator", "left", "right"],
  109566. fields: {
  109567. operator: {
  109568. validate: (0, _utils.assertOneOf)(..._constants.BINARY_OPERATORS)
  109569. },
  109570. left: {
  109571. validate: function() {
  109572. const expression = (0, _utils.assertNodeType)("Expression");
  109573. const inOp = (0, _utils.assertNodeType)("Expression", "PrivateName");
  109574. const validator = function(node, key, val) {
  109575. const validator2 = node.operator === "in" ? inOp : expression;
  109576. validator2(node, key, val);
  109577. };
  109578. validator.oneOfNodeTypes = ["Expression", "PrivateName"];
  109579. return validator;
  109580. }()
  109581. },
  109582. right: {
  109583. validate: (0, _utils.assertNodeType)("Expression")
  109584. }
  109585. },
  109586. visitor: ["left", "right"],
  109587. aliases: ["Binary", "Expression"]
  109588. });
  109589. (0, _utils.default)("InterpreterDirective", {
  109590. builder: ["value"],
  109591. fields: {
  109592. value: {
  109593. validate: (0, _utils.assertValueType)("string")
  109594. }
  109595. }
  109596. });
  109597. (0, _utils.default)("Directive", {
  109598. visitor: ["value"],
  109599. fields: {
  109600. value: {
  109601. validate: (0, _utils.assertNodeType)("DirectiveLiteral")
  109602. }
  109603. }
  109604. });
  109605. (0, _utils.default)("DirectiveLiteral", {
  109606. builder: ["value"],
  109607. fields: {
  109608. value: {
  109609. validate: (0, _utils.assertValueType)("string")
  109610. }
  109611. }
  109612. });
  109613. (0, _utils.default)("BlockStatement", {
  109614. builder: ["body", "directives"],
  109615. visitor: ["directives", "body"],
  109616. fields: {
  109617. directives: {
  109618. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Directive"))),
  109619. default: []
  109620. },
  109621. body: {
  109622. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Statement")))
  109623. }
  109624. },
  109625. aliases: ["Scopable", "BlockParent", "Block", "Statement"]
  109626. });
  109627. (0, _utils.default)("BreakStatement", {
  109628. visitor: ["label"],
  109629. fields: {
  109630. label: {
  109631. validate: (0, _utils.assertNodeType)("Identifier"),
  109632. optional: true
  109633. }
  109634. },
  109635. aliases: ["Statement", "Terminatorless", "CompletionStatement"]
  109636. });
  109637. (0, _utils.default)("CallExpression", {
  109638. visitor: ["callee", "arguments", "typeParameters", "typeArguments"],
  109639. builder: ["callee", "arguments"],
  109640. aliases: ["Expression"],
  109641. fields: Object.assign({
  109642. callee: {
  109643. validate: (0, _utils.assertNodeType)("Expression", "V8IntrinsicIdentifier")
  109644. },
  109645. arguments: {
  109646. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Expression", "SpreadElement", "JSXNamespacedName", "ArgumentPlaceholder")))
  109647. }
  109648. }, !process.env.BABEL_TYPES_8_BREAKING ? {
  109649. optional: {
  109650. validate: (0, _utils.assertOneOf)(true, false),
  109651. optional: true
  109652. }
  109653. } : {}, {
  109654. typeArguments: {
  109655. validate: (0, _utils.assertNodeType)("TypeParameterInstantiation"),
  109656. optional: true
  109657. },
  109658. typeParameters: {
  109659. validate: (0, _utils.assertNodeType)("TSTypeParameterInstantiation"),
  109660. optional: true
  109661. }
  109662. })
  109663. });
  109664. (0, _utils.default)("CatchClause", {
  109665. visitor: ["param", "body"],
  109666. fields: {
  109667. param: {
  109668. validate: (0, _utils.assertNodeType)("Identifier", "ArrayPattern", "ObjectPattern"),
  109669. optional: true
  109670. },
  109671. body: {
  109672. validate: (0, _utils.assertNodeType)("BlockStatement")
  109673. }
  109674. },
  109675. aliases: ["Scopable", "BlockParent"]
  109676. });
  109677. (0, _utils.default)("ConditionalExpression", {
  109678. visitor: ["test", "consequent", "alternate"],
  109679. fields: {
  109680. test: {
  109681. validate: (0, _utils.assertNodeType)("Expression")
  109682. },
  109683. consequent: {
  109684. validate: (0, _utils.assertNodeType)("Expression")
  109685. },
  109686. alternate: {
  109687. validate: (0, _utils.assertNodeType)("Expression")
  109688. }
  109689. },
  109690. aliases: ["Expression", "Conditional"]
  109691. });
  109692. (0, _utils.default)("ContinueStatement", {
  109693. visitor: ["label"],
  109694. fields: {
  109695. label: {
  109696. validate: (0, _utils.assertNodeType)("Identifier"),
  109697. optional: true
  109698. }
  109699. },
  109700. aliases: ["Statement", "Terminatorless", "CompletionStatement"]
  109701. });
  109702. (0, _utils.default)("DebuggerStatement", {
  109703. aliases: ["Statement"]
  109704. });
  109705. (0, _utils.default)("DoWhileStatement", {
  109706. visitor: ["test", "body"],
  109707. fields: {
  109708. test: {
  109709. validate: (0, _utils.assertNodeType)("Expression")
  109710. },
  109711. body: {
  109712. validate: (0, _utils.assertNodeType)("Statement")
  109713. }
  109714. },
  109715. aliases: ["Statement", "BlockParent", "Loop", "While", "Scopable"]
  109716. });
  109717. (0, _utils.default)("EmptyStatement", {
  109718. aliases: ["Statement"]
  109719. });
  109720. (0, _utils.default)("ExpressionStatement", {
  109721. visitor: ["expression"],
  109722. fields: {
  109723. expression: {
  109724. validate: (0, _utils.assertNodeType)("Expression")
  109725. }
  109726. },
  109727. aliases: ["Statement", "ExpressionWrapper"]
  109728. });
  109729. (0, _utils.default)("File", {
  109730. builder: ["program", "comments", "tokens"],
  109731. visitor: ["program"],
  109732. fields: {
  109733. program: {
  109734. validate: (0, _utils.assertNodeType)("Program")
  109735. },
  109736. comments: {
  109737. validate: !process.env.BABEL_TYPES_8_BREAKING ? Object.assign(() => {
  109738. }, {
  109739. each: {
  109740. oneOfNodeTypes: ["CommentBlock", "CommentLine"]
  109741. }
  109742. }) : (0, _utils.assertEach)((0, _utils.assertNodeType)("CommentBlock", "CommentLine")),
  109743. optional: true
  109744. },
  109745. tokens: {
  109746. validate: (0, _utils.assertEach)(Object.assign(() => {
  109747. }, {
  109748. type: "any"
  109749. })),
  109750. optional: true
  109751. }
  109752. }
  109753. });
  109754. (0, _utils.default)("ForInStatement", {
  109755. visitor: ["left", "right", "body"],
  109756. aliases: ["Scopable", "Statement", "For", "BlockParent", "Loop", "ForXStatement"],
  109757. fields: {
  109758. left: {
  109759. validate: !process.env.BABEL_TYPES_8_BREAKING ? (0, _utils.assertNodeType)("VariableDeclaration", "LVal") : (0, _utils.assertNodeType)("VariableDeclaration", "Identifier", "MemberExpression", "ArrayPattern", "ObjectPattern")
  109760. },
  109761. right: {
  109762. validate: (0, _utils.assertNodeType)("Expression")
  109763. },
  109764. body: {
  109765. validate: (0, _utils.assertNodeType)("Statement")
  109766. }
  109767. }
  109768. });
  109769. (0, _utils.default)("ForStatement", {
  109770. visitor: ["init", "test", "update", "body"],
  109771. aliases: ["Scopable", "Statement", "For", "BlockParent", "Loop"],
  109772. fields: {
  109773. init: {
  109774. validate: (0, _utils.assertNodeType)("VariableDeclaration", "Expression"),
  109775. optional: true
  109776. },
  109777. test: {
  109778. validate: (0, _utils.assertNodeType)("Expression"),
  109779. optional: true
  109780. },
  109781. update: {
  109782. validate: (0, _utils.assertNodeType)("Expression"),
  109783. optional: true
  109784. },
  109785. body: {
  109786. validate: (0, _utils.assertNodeType)("Statement")
  109787. }
  109788. }
  109789. });
  109790. var functionCommon = {
  109791. params: {
  109792. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Identifier", "Pattern", "RestElement")))
  109793. },
  109794. generator: {
  109795. default: false
  109796. },
  109797. async: {
  109798. default: false
  109799. }
  109800. };
  109801. exports.functionCommon = functionCommon;
  109802. var functionTypeAnnotationCommon = {
  109803. returnType: {
  109804. validate: (0, _utils.assertNodeType)("TypeAnnotation", "TSTypeAnnotation", "Noop"),
  109805. optional: true
  109806. },
  109807. typeParameters: {
  109808. validate: (0, _utils.assertNodeType)("TypeParameterDeclaration", "TSTypeParameterDeclaration", "Noop"),
  109809. optional: true
  109810. }
  109811. };
  109812. exports.functionTypeAnnotationCommon = functionTypeAnnotationCommon;
  109813. var functionDeclarationCommon = Object.assign({}, functionCommon, {
  109814. declare: {
  109815. validate: (0, _utils.assertValueType)("boolean"),
  109816. optional: true
  109817. },
  109818. id: {
  109819. validate: (0, _utils.assertNodeType)("Identifier"),
  109820. optional: true
  109821. }
  109822. });
  109823. exports.functionDeclarationCommon = functionDeclarationCommon;
  109824. (0, _utils.default)("FunctionDeclaration", {
  109825. builder: ["id", "params", "body", "generator", "async"],
  109826. visitor: ["id", "params", "body", "returnType", "typeParameters"],
  109827. fields: Object.assign({}, functionDeclarationCommon, functionTypeAnnotationCommon, {
  109828. body: {
  109829. validate: (0, _utils.assertNodeType)("BlockStatement")
  109830. }
  109831. }),
  109832. aliases: ["Scopable", "Function", "BlockParent", "FunctionParent", "Statement", "Pureish", "Declaration"],
  109833. validate: function() {
  109834. if (!process.env.BABEL_TYPES_8_BREAKING)
  109835. return () => {
  109836. };
  109837. const identifier = (0, _utils.assertNodeType)("Identifier");
  109838. return function(parent, key, node) {
  109839. if (!(0, _is.default)("ExportDefaultDeclaration", parent)) {
  109840. identifier(node, "id", node.id);
  109841. }
  109842. };
  109843. }()
  109844. });
  109845. (0, _utils.default)("FunctionExpression", {
  109846. inherits: "FunctionDeclaration",
  109847. aliases: ["Scopable", "Function", "BlockParent", "FunctionParent", "Expression", "Pureish"],
  109848. fields: Object.assign({}, functionCommon, functionTypeAnnotationCommon, {
  109849. id: {
  109850. validate: (0, _utils.assertNodeType)("Identifier"),
  109851. optional: true
  109852. },
  109853. body: {
  109854. validate: (0, _utils.assertNodeType)("BlockStatement")
  109855. }
  109856. })
  109857. });
  109858. var patternLikeCommon = {
  109859. typeAnnotation: {
  109860. validate: (0, _utils.assertNodeType)("TypeAnnotation", "TSTypeAnnotation", "Noop"),
  109861. optional: true
  109862. },
  109863. decorators: {
  109864. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Decorator")))
  109865. }
  109866. };
  109867. exports.patternLikeCommon = patternLikeCommon;
  109868. (0, _utils.default)("Identifier", {
  109869. builder: ["name"],
  109870. visitor: ["typeAnnotation", "decorators"],
  109871. aliases: ["Expression", "PatternLike", "LVal", "TSEntityName"],
  109872. fields: Object.assign({}, patternLikeCommon, {
  109873. name: {
  109874. validate: (0, _utils.chain)((0, _utils.assertValueType)("string"), Object.assign(function(node, key, val) {
  109875. if (!process.env.BABEL_TYPES_8_BREAKING)
  109876. return;
  109877. if (!(0, _isValidIdentifier.default)(val, false)) {
  109878. throw new TypeError(`"${val}" is not a valid identifier name`);
  109879. }
  109880. }, {
  109881. type: "string"
  109882. }))
  109883. },
  109884. optional: {
  109885. validate: (0, _utils.assertValueType)("boolean"),
  109886. optional: true
  109887. }
  109888. }),
  109889. validate(parent, key, node) {
  109890. if (!process.env.BABEL_TYPES_8_BREAKING)
  109891. return;
  109892. const match = /\.(\w+)$/.exec(key);
  109893. if (!match)
  109894. return;
  109895. const [, parentKey] = match;
  109896. const nonComp = {
  109897. computed: false
  109898. };
  109899. if (parentKey === "property") {
  109900. if ((0, _is.default)("MemberExpression", parent, nonComp))
  109901. return;
  109902. if ((0, _is.default)("OptionalMemberExpression", parent, nonComp))
  109903. return;
  109904. } else if (parentKey === "key") {
  109905. if ((0, _is.default)("Property", parent, nonComp))
  109906. return;
  109907. if ((0, _is.default)("Method", parent, nonComp))
  109908. return;
  109909. } else if (parentKey === "exported") {
  109910. if ((0, _is.default)("ExportSpecifier", parent))
  109911. return;
  109912. } else if (parentKey === "imported") {
  109913. if ((0, _is.default)("ImportSpecifier", parent, {
  109914. imported: node
  109915. }))
  109916. return;
  109917. } else if (parentKey === "meta") {
  109918. if ((0, _is.default)("MetaProperty", parent, {
  109919. meta: node
  109920. }))
  109921. return;
  109922. }
  109923. if (((0, _helperValidatorIdentifier.isKeyword)(node.name) || (0, _helperValidatorIdentifier.isReservedWord)(node.name, false)) && node.name !== "this") {
  109924. throw new TypeError(`"${node.name}" is not a valid identifier`);
  109925. }
  109926. }
  109927. });
  109928. (0, _utils.default)("IfStatement", {
  109929. visitor: ["test", "consequent", "alternate"],
  109930. aliases: ["Statement", "Conditional"],
  109931. fields: {
  109932. test: {
  109933. validate: (0, _utils.assertNodeType)("Expression")
  109934. },
  109935. consequent: {
  109936. validate: (0, _utils.assertNodeType)("Statement")
  109937. },
  109938. alternate: {
  109939. optional: true,
  109940. validate: (0, _utils.assertNodeType)("Statement")
  109941. }
  109942. }
  109943. });
  109944. (0, _utils.default)("LabeledStatement", {
  109945. visitor: ["label", "body"],
  109946. aliases: ["Statement"],
  109947. fields: {
  109948. label: {
  109949. validate: (0, _utils.assertNodeType)("Identifier")
  109950. },
  109951. body: {
  109952. validate: (0, _utils.assertNodeType)("Statement")
  109953. }
  109954. }
  109955. });
  109956. (0, _utils.default)("StringLiteral", {
  109957. builder: ["value"],
  109958. fields: {
  109959. value: {
  109960. validate: (0, _utils.assertValueType)("string")
  109961. }
  109962. },
  109963. aliases: ["Expression", "Pureish", "Literal", "Immutable"]
  109964. });
  109965. (0, _utils.default)("NumericLiteral", {
  109966. builder: ["value"],
  109967. deprecatedAlias: "NumberLiteral",
  109968. fields: {
  109969. value: {
  109970. validate: (0, _utils.assertValueType)("number")
  109971. }
  109972. },
  109973. aliases: ["Expression", "Pureish", "Literal", "Immutable"]
  109974. });
  109975. (0, _utils.default)("NullLiteral", {
  109976. aliases: ["Expression", "Pureish", "Literal", "Immutable"]
  109977. });
  109978. (0, _utils.default)("BooleanLiteral", {
  109979. builder: ["value"],
  109980. fields: {
  109981. value: {
  109982. validate: (0, _utils.assertValueType)("boolean")
  109983. }
  109984. },
  109985. aliases: ["Expression", "Pureish", "Literal", "Immutable"]
  109986. });
  109987. (0, _utils.default)("RegExpLiteral", {
  109988. builder: ["pattern", "flags"],
  109989. deprecatedAlias: "RegexLiteral",
  109990. aliases: ["Expression", "Pureish", "Literal"],
  109991. fields: {
  109992. pattern: {
  109993. validate: (0, _utils.assertValueType)("string")
  109994. },
  109995. flags: {
  109996. validate: (0, _utils.chain)((0, _utils.assertValueType)("string"), Object.assign(function(node, key, val) {
  109997. if (!process.env.BABEL_TYPES_8_BREAKING)
  109998. return;
  109999. const invalid2 = /[^gimsuy]/.exec(val);
  110000. if (invalid2) {
  110001. throw new TypeError(`"${invalid2[0]}" is not a valid RegExp flag`);
  110002. }
  110003. }, {
  110004. type: "string"
  110005. })),
  110006. default: ""
  110007. }
  110008. }
  110009. });
  110010. (0, _utils.default)("LogicalExpression", {
  110011. builder: ["operator", "left", "right"],
  110012. visitor: ["left", "right"],
  110013. aliases: ["Binary", "Expression"],
  110014. fields: {
  110015. operator: {
  110016. validate: (0, _utils.assertOneOf)(..._constants.LOGICAL_OPERATORS)
  110017. },
  110018. left: {
  110019. validate: (0, _utils.assertNodeType)("Expression")
  110020. },
  110021. right: {
  110022. validate: (0, _utils.assertNodeType)("Expression")
  110023. }
  110024. }
  110025. });
  110026. (0, _utils.default)("MemberExpression", {
  110027. builder: ["object", "property", "computed", ...!process.env.BABEL_TYPES_8_BREAKING ? ["optional"] : []],
  110028. visitor: ["object", "property"],
  110029. aliases: ["Expression", "LVal"],
  110030. fields: Object.assign({
  110031. object: {
  110032. validate: (0, _utils.assertNodeType)("Expression")
  110033. },
  110034. property: {
  110035. validate: function() {
  110036. const normal = (0, _utils.assertNodeType)("Identifier", "PrivateName");
  110037. const computed = (0, _utils.assertNodeType)("Expression");
  110038. const validator = function(node, key, val) {
  110039. const validator2 = node.computed ? computed : normal;
  110040. validator2(node, key, val);
  110041. };
  110042. validator.oneOfNodeTypes = ["Expression", "Identifier", "PrivateName"];
  110043. return validator;
  110044. }()
  110045. },
  110046. computed: {
  110047. default: false
  110048. }
  110049. }, !process.env.BABEL_TYPES_8_BREAKING ? {
  110050. optional: {
  110051. validate: (0, _utils.assertOneOf)(true, false),
  110052. optional: true
  110053. }
  110054. } : {})
  110055. });
  110056. (0, _utils.default)("NewExpression", {
  110057. inherits: "CallExpression"
  110058. });
  110059. (0, _utils.default)("Program", {
  110060. visitor: ["directives", "body"],
  110061. builder: ["body", "directives", "sourceType", "interpreter"],
  110062. fields: {
  110063. sourceFile: {
  110064. validate: (0, _utils.assertValueType)("string")
  110065. },
  110066. sourceType: {
  110067. validate: (0, _utils.assertOneOf)("script", "module"),
  110068. default: "script"
  110069. },
  110070. interpreter: {
  110071. validate: (0, _utils.assertNodeType)("InterpreterDirective"),
  110072. default: null,
  110073. optional: true
  110074. },
  110075. directives: {
  110076. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Directive"))),
  110077. default: []
  110078. },
  110079. body: {
  110080. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Statement")))
  110081. }
  110082. },
  110083. aliases: ["Scopable", "BlockParent", "Block"]
  110084. });
  110085. (0, _utils.default)("ObjectExpression", {
  110086. visitor: ["properties"],
  110087. aliases: ["Expression"],
  110088. fields: {
  110089. properties: {
  110090. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("ObjectMethod", "ObjectProperty", "SpreadElement")))
  110091. }
  110092. }
  110093. });
  110094. (0, _utils.default)("ObjectMethod", {
  110095. builder: ["kind", "key", "params", "body", "computed", "generator", "async"],
  110096. fields: Object.assign({}, functionCommon, functionTypeAnnotationCommon, {
  110097. kind: Object.assign({
  110098. validate: (0, _utils.assertOneOf)("method", "get", "set")
  110099. }, !process.env.BABEL_TYPES_8_BREAKING ? {
  110100. default: "method"
  110101. } : {}),
  110102. computed: {
  110103. default: false
  110104. },
  110105. key: {
  110106. validate: function() {
  110107. const normal = (0, _utils.assertNodeType)("Identifier", "StringLiteral", "NumericLiteral");
  110108. const computed = (0, _utils.assertNodeType)("Expression");
  110109. const validator = function(node, key, val) {
  110110. const validator2 = node.computed ? computed : normal;
  110111. validator2(node, key, val);
  110112. };
  110113. validator.oneOfNodeTypes = ["Expression", "Identifier", "StringLiteral", "NumericLiteral"];
  110114. return validator;
  110115. }()
  110116. },
  110117. decorators: {
  110118. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Decorator"))),
  110119. optional: true
  110120. },
  110121. body: {
  110122. validate: (0, _utils.assertNodeType)("BlockStatement")
  110123. }
  110124. }),
  110125. visitor: ["key", "params", "body", "decorators", "returnType", "typeParameters"],
  110126. aliases: ["UserWhitespacable", "Function", "Scopable", "BlockParent", "FunctionParent", "Method", "ObjectMember"]
  110127. });
  110128. (0, _utils.default)("ObjectProperty", {
  110129. builder: ["key", "value", "computed", "shorthand", ...!process.env.BABEL_TYPES_8_BREAKING ? ["decorators"] : []],
  110130. fields: {
  110131. computed: {
  110132. default: false
  110133. },
  110134. key: {
  110135. validate: function() {
  110136. const normal = (0, _utils.assertNodeType)("Identifier", "StringLiteral", "NumericLiteral");
  110137. const computed = (0, _utils.assertNodeType)("Expression");
  110138. const validator = function(node, key, val) {
  110139. const validator2 = node.computed ? computed : normal;
  110140. validator2(node, key, val);
  110141. };
  110142. validator.oneOfNodeTypes = ["Expression", "Identifier", "StringLiteral", "NumericLiteral"];
  110143. return validator;
  110144. }()
  110145. },
  110146. value: {
  110147. validate: (0, _utils.assertNodeType)("Expression", "PatternLike")
  110148. },
  110149. shorthand: {
  110150. validate: (0, _utils.chain)((0, _utils.assertValueType)("boolean"), Object.assign(function(node, key, val) {
  110151. if (!process.env.BABEL_TYPES_8_BREAKING)
  110152. return;
  110153. if (val && node.computed) {
  110154. throw new TypeError("Property shorthand of ObjectProperty cannot be true if computed is true");
  110155. }
  110156. }, {
  110157. type: "boolean"
  110158. }), function(node, key, val) {
  110159. if (!process.env.BABEL_TYPES_8_BREAKING)
  110160. return;
  110161. if (val && !(0, _is.default)("Identifier", node.key)) {
  110162. throw new TypeError("Property shorthand of ObjectProperty cannot be true if key is not an Identifier");
  110163. }
  110164. }),
  110165. default: false
  110166. },
  110167. decorators: {
  110168. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Decorator"))),
  110169. optional: true
  110170. }
  110171. },
  110172. visitor: ["key", "value", "decorators"],
  110173. aliases: ["UserWhitespacable", "Property", "ObjectMember"],
  110174. validate: function() {
  110175. const pattern = (0, _utils.assertNodeType)("Identifier", "Pattern");
  110176. const expression = (0, _utils.assertNodeType)("Expression");
  110177. return function(parent, key, node) {
  110178. if (!process.env.BABEL_TYPES_8_BREAKING)
  110179. return;
  110180. const validator = (0, _is.default)("ObjectPattern", parent) ? pattern : expression;
  110181. validator(node, "value", node.value);
  110182. };
  110183. }()
  110184. });
  110185. (0, _utils.default)("RestElement", {
  110186. visitor: ["argument", "typeAnnotation"],
  110187. builder: ["argument"],
  110188. aliases: ["LVal", "PatternLike"],
  110189. deprecatedAlias: "RestProperty",
  110190. fields: Object.assign({}, patternLikeCommon, {
  110191. argument: {
  110192. validate: !process.env.BABEL_TYPES_8_BREAKING ? (0, _utils.assertNodeType)("LVal") : (0, _utils.assertNodeType)("Identifier", "Pattern", "MemberExpression")
  110193. }
  110194. }),
  110195. validate(parent, key) {
  110196. if (!process.env.BABEL_TYPES_8_BREAKING)
  110197. return;
  110198. const match = /(\w+)\[(\d+)\]/.exec(key);
  110199. if (!match)
  110200. throw new Error("Internal Babel error: malformed key.");
  110201. const [, listKey, index2] = match;
  110202. if (parent[listKey].length > index2 + 1) {
  110203. throw new TypeError(`RestElement must be last element of ${listKey}`);
  110204. }
  110205. }
  110206. });
  110207. (0, _utils.default)("ReturnStatement", {
  110208. visitor: ["argument"],
  110209. aliases: ["Statement", "Terminatorless", "CompletionStatement"],
  110210. fields: {
  110211. argument: {
  110212. validate: (0, _utils.assertNodeType)("Expression"),
  110213. optional: true
  110214. }
  110215. }
  110216. });
  110217. (0, _utils.default)("SequenceExpression", {
  110218. visitor: ["expressions"],
  110219. fields: {
  110220. expressions: {
  110221. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Expression")))
  110222. }
  110223. },
  110224. aliases: ["Expression"]
  110225. });
  110226. (0, _utils.default)("ParenthesizedExpression", {
  110227. visitor: ["expression"],
  110228. aliases: ["Expression", "ExpressionWrapper"],
  110229. fields: {
  110230. expression: {
  110231. validate: (0, _utils.assertNodeType)("Expression")
  110232. }
  110233. }
  110234. });
  110235. (0, _utils.default)("SwitchCase", {
  110236. visitor: ["test", "consequent"],
  110237. fields: {
  110238. test: {
  110239. validate: (0, _utils.assertNodeType)("Expression"),
  110240. optional: true
  110241. },
  110242. consequent: {
  110243. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Statement")))
  110244. }
  110245. }
  110246. });
  110247. (0, _utils.default)("SwitchStatement", {
  110248. visitor: ["discriminant", "cases"],
  110249. aliases: ["Statement", "BlockParent", "Scopable"],
  110250. fields: {
  110251. discriminant: {
  110252. validate: (0, _utils.assertNodeType)("Expression")
  110253. },
  110254. cases: {
  110255. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("SwitchCase")))
  110256. }
  110257. }
  110258. });
  110259. (0, _utils.default)("ThisExpression", {
  110260. aliases: ["Expression"]
  110261. });
  110262. (0, _utils.default)("ThrowStatement", {
  110263. visitor: ["argument"],
  110264. aliases: ["Statement", "Terminatorless", "CompletionStatement"],
  110265. fields: {
  110266. argument: {
  110267. validate: (0, _utils.assertNodeType)("Expression")
  110268. }
  110269. }
  110270. });
  110271. (0, _utils.default)("TryStatement", {
  110272. visitor: ["block", "handler", "finalizer"],
  110273. aliases: ["Statement"],
  110274. fields: {
  110275. block: {
  110276. validate: (0, _utils.chain)((0, _utils.assertNodeType)("BlockStatement"), Object.assign(function(node) {
  110277. if (!process.env.BABEL_TYPES_8_BREAKING)
  110278. return;
  110279. if (!node.handler && !node.finalizer) {
  110280. throw new TypeError("TryStatement expects either a handler or finalizer, or both");
  110281. }
  110282. }, {
  110283. oneOfNodeTypes: ["BlockStatement"]
  110284. }))
  110285. },
  110286. handler: {
  110287. optional: true,
  110288. validate: (0, _utils.assertNodeType)("CatchClause")
  110289. },
  110290. finalizer: {
  110291. optional: true,
  110292. validate: (0, _utils.assertNodeType)("BlockStatement")
  110293. }
  110294. }
  110295. });
  110296. (0, _utils.default)("UnaryExpression", {
  110297. builder: ["operator", "argument", "prefix"],
  110298. fields: {
  110299. prefix: {
  110300. default: true
  110301. },
  110302. argument: {
  110303. validate: (0, _utils.assertNodeType)("Expression")
  110304. },
  110305. operator: {
  110306. validate: (0, _utils.assertOneOf)(..._constants.UNARY_OPERATORS)
  110307. }
  110308. },
  110309. visitor: ["argument"],
  110310. aliases: ["UnaryLike", "Expression"]
  110311. });
  110312. (0, _utils.default)("UpdateExpression", {
  110313. builder: ["operator", "argument", "prefix"],
  110314. fields: {
  110315. prefix: {
  110316. default: false
  110317. },
  110318. argument: {
  110319. validate: !process.env.BABEL_TYPES_8_BREAKING ? (0, _utils.assertNodeType)("Expression") : (0, _utils.assertNodeType)("Identifier", "MemberExpression")
  110320. },
  110321. operator: {
  110322. validate: (0, _utils.assertOneOf)(..._constants.UPDATE_OPERATORS)
  110323. }
  110324. },
  110325. visitor: ["argument"],
  110326. aliases: ["Expression"]
  110327. });
  110328. (0, _utils.default)("VariableDeclaration", {
  110329. builder: ["kind", "declarations"],
  110330. visitor: ["declarations"],
  110331. aliases: ["Statement", "Declaration"],
  110332. fields: {
  110333. declare: {
  110334. validate: (0, _utils.assertValueType)("boolean"),
  110335. optional: true
  110336. },
  110337. kind: {
  110338. validate: (0, _utils.assertOneOf)("var", "let", "const")
  110339. },
  110340. declarations: {
  110341. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("VariableDeclarator")))
  110342. }
  110343. },
  110344. validate(parent, key, node) {
  110345. if (!process.env.BABEL_TYPES_8_BREAKING)
  110346. return;
  110347. if (!(0, _is.default)("ForXStatement", parent, {
  110348. left: node
  110349. }))
  110350. return;
  110351. if (node.declarations.length !== 1) {
  110352. throw new TypeError(`Exactly one VariableDeclarator is required in the VariableDeclaration of a ${parent.type}`);
  110353. }
  110354. }
  110355. });
  110356. (0, _utils.default)("VariableDeclarator", {
  110357. visitor: ["id", "init"],
  110358. fields: {
  110359. id: {
  110360. validate: function() {
  110361. if (!process.env.BABEL_TYPES_8_BREAKING) {
  110362. return (0, _utils.assertNodeType)("LVal");
  110363. }
  110364. const normal = (0, _utils.assertNodeType)("Identifier", "ArrayPattern", "ObjectPattern");
  110365. const without = (0, _utils.assertNodeType)("Identifier");
  110366. return function(node, key, val) {
  110367. const validator = node.init ? normal : without;
  110368. validator(node, key, val);
  110369. };
  110370. }()
  110371. },
  110372. definite: {
  110373. optional: true,
  110374. validate: (0, _utils.assertValueType)("boolean")
  110375. },
  110376. init: {
  110377. optional: true,
  110378. validate: (0, _utils.assertNodeType)("Expression")
  110379. }
  110380. }
  110381. });
  110382. (0, _utils.default)("WhileStatement", {
  110383. visitor: ["test", "body"],
  110384. aliases: ["Statement", "BlockParent", "Loop", "While", "Scopable"],
  110385. fields: {
  110386. test: {
  110387. validate: (0, _utils.assertNodeType)("Expression")
  110388. },
  110389. body: {
  110390. validate: (0, _utils.assertNodeType)("Statement")
  110391. }
  110392. }
  110393. });
  110394. (0, _utils.default)("WithStatement", {
  110395. visitor: ["object", "body"],
  110396. aliases: ["Statement"],
  110397. fields: {
  110398. object: {
  110399. validate: (0, _utils.assertNodeType)("Expression")
  110400. },
  110401. body: {
  110402. validate: (0, _utils.assertNodeType)("Statement")
  110403. }
  110404. }
  110405. });
  110406. (0, _utils.default)("AssignmentPattern", {
  110407. visitor: ["left", "right", "decorators"],
  110408. builder: ["left", "right"],
  110409. aliases: ["Pattern", "PatternLike", "LVal"],
  110410. fields: Object.assign({}, patternLikeCommon, {
  110411. left: {
  110412. validate: (0, _utils.assertNodeType)("Identifier", "ObjectPattern", "ArrayPattern", "MemberExpression")
  110413. },
  110414. right: {
  110415. validate: (0, _utils.assertNodeType)("Expression")
  110416. },
  110417. decorators: {
  110418. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Decorator"))),
  110419. optional: true
  110420. }
  110421. })
  110422. });
  110423. (0, _utils.default)("ArrayPattern", {
  110424. visitor: ["elements", "typeAnnotation"],
  110425. builder: ["elements"],
  110426. aliases: ["Pattern", "PatternLike", "LVal"],
  110427. fields: Object.assign({}, patternLikeCommon, {
  110428. elements: {
  110429. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeOrValueType)("null", "PatternLike")))
  110430. },
  110431. decorators: {
  110432. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Decorator"))),
  110433. optional: true
  110434. }
  110435. })
  110436. });
  110437. (0, _utils.default)("ArrowFunctionExpression", {
  110438. builder: ["params", "body", "async"],
  110439. visitor: ["params", "body", "returnType", "typeParameters"],
  110440. aliases: ["Scopable", "Function", "BlockParent", "FunctionParent", "Expression", "Pureish"],
  110441. fields: Object.assign({}, functionCommon, functionTypeAnnotationCommon, {
  110442. expression: {
  110443. validate: (0, _utils.assertValueType)("boolean")
  110444. },
  110445. body: {
  110446. validate: (0, _utils.assertNodeType)("BlockStatement", "Expression")
  110447. }
  110448. })
  110449. });
  110450. (0, _utils.default)("ClassBody", {
  110451. visitor: ["body"],
  110452. fields: {
  110453. body: {
  110454. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("ClassMethod", "ClassPrivateMethod", "ClassProperty", "ClassPrivateProperty", "TSDeclareMethod", "TSIndexSignature")))
  110455. }
  110456. }
  110457. });
  110458. (0, _utils.default)("ClassExpression", {
  110459. builder: ["id", "superClass", "body", "decorators"],
  110460. visitor: ["id", "body", "superClass", "mixins", "typeParameters", "superTypeParameters", "implements", "decorators"],
  110461. aliases: ["Scopable", "Class", "Expression"],
  110462. fields: {
  110463. id: {
  110464. validate: (0, _utils.assertNodeType)("Identifier"),
  110465. optional: true
  110466. },
  110467. typeParameters: {
  110468. validate: (0, _utils.assertNodeType)("TypeParameterDeclaration", "TSTypeParameterDeclaration", "Noop"),
  110469. optional: true
  110470. },
  110471. body: {
  110472. validate: (0, _utils.assertNodeType)("ClassBody")
  110473. },
  110474. superClass: {
  110475. optional: true,
  110476. validate: (0, _utils.assertNodeType)("Expression")
  110477. },
  110478. superTypeParameters: {
  110479. validate: (0, _utils.assertNodeType)("TypeParameterInstantiation", "TSTypeParameterInstantiation"),
  110480. optional: true
  110481. },
  110482. implements: {
  110483. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("TSExpressionWithTypeArguments", "ClassImplements"))),
  110484. optional: true
  110485. },
  110486. decorators: {
  110487. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Decorator"))),
  110488. optional: true
  110489. },
  110490. mixins: {
  110491. validate: (0, _utils.assertNodeType)("InterfaceExtends"),
  110492. optional: true
  110493. }
  110494. }
  110495. });
  110496. (0, _utils.default)("ClassDeclaration", {
  110497. inherits: "ClassExpression",
  110498. aliases: ["Scopable", "Class", "Statement", "Declaration"],
  110499. fields: {
  110500. id: {
  110501. validate: (0, _utils.assertNodeType)("Identifier")
  110502. },
  110503. typeParameters: {
  110504. validate: (0, _utils.assertNodeType)("TypeParameterDeclaration", "TSTypeParameterDeclaration", "Noop"),
  110505. optional: true
  110506. },
  110507. body: {
  110508. validate: (0, _utils.assertNodeType)("ClassBody")
  110509. },
  110510. superClass: {
  110511. optional: true,
  110512. validate: (0, _utils.assertNodeType)("Expression")
  110513. },
  110514. superTypeParameters: {
  110515. validate: (0, _utils.assertNodeType)("TypeParameterInstantiation", "TSTypeParameterInstantiation"),
  110516. optional: true
  110517. },
  110518. implements: {
  110519. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("TSExpressionWithTypeArguments", "ClassImplements"))),
  110520. optional: true
  110521. },
  110522. decorators: {
  110523. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Decorator"))),
  110524. optional: true
  110525. },
  110526. mixins: {
  110527. validate: (0, _utils.assertNodeType)("InterfaceExtends"),
  110528. optional: true
  110529. },
  110530. declare: {
  110531. validate: (0, _utils.assertValueType)("boolean"),
  110532. optional: true
  110533. },
  110534. abstract: {
  110535. validate: (0, _utils.assertValueType)("boolean"),
  110536. optional: true
  110537. }
  110538. },
  110539. validate: function() {
  110540. const identifier = (0, _utils.assertNodeType)("Identifier");
  110541. return function(parent, key, node) {
  110542. if (!process.env.BABEL_TYPES_8_BREAKING)
  110543. return;
  110544. if (!(0, _is.default)("ExportDefaultDeclaration", parent)) {
  110545. identifier(node, "id", node.id);
  110546. }
  110547. };
  110548. }()
  110549. });
  110550. (0, _utils.default)("ExportAllDeclaration", {
  110551. visitor: ["source"],
  110552. aliases: ["Statement", "Declaration", "ModuleDeclaration", "ExportDeclaration"],
  110553. fields: {
  110554. source: {
  110555. validate: (0, _utils.assertNodeType)("StringLiteral")
  110556. },
  110557. exportKind: (0, _utils.validateOptional)((0, _utils.assertOneOf)("type", "value")),
  110558. assertions: {
  110559. optional: true,
  110560. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("ImportAttribute")))
  110561. }
  110562. }
  110563. });
  110564. (0, _utils.default)("ExportDefaultDeclaration", {
  110565. visitor: ["declaration"],
  110566. aliases: ["Statement", "Declaration", "ModuleDeclaration", "ExportDeclaration"],
  110567. fields: {
  110568. declaration: {
  110569. validate: (0, _utils.assertNodeType)("FunctionDeclaration", "TSDeclareFunction", "ClassDeclaration", "Expression")
  110570. }
  110571. }
  110572. });
  110573. (0, _utils.default)("ExportNamedDeclaration", {
  110574. visitor: ["declaration", "specifiers", "source"],
  110575. aliases: ["Statement", "Declaration", "ModuleDeclaration", "ExportDeclaration"],
  110576. fields: {
  110577. declaration: {
  110578. optional: true,
  110579. validate: (0, _utils.chain)((0, _utils.assertNodeType)("Declaration"), Object.assign(function(node, key, val) {
  110580. if (!process.env.BABEL_TYPES_8_BREAKING)
  110581. return;
  110582. if (val && node.specifiers.length) {
  110583. throw new TypeError("Only declaration or specifiers is allowed on ExportNamedDeclaration");
  110584. }
  110585. }, {
  110586. oneOfNodeTypes: ["Declaration"]
  110587. }), function(node, key, val) {
  110588. if (!process.env.BABEL_TYPES_8_BREAKING)
  110589. return;
  110590. if (val && node.source) {
  110591. throw new TypeError("Cannot export a declaration from a source");
  110592. }
  110593. })
  110594. },
  110595. assertions: {
  110596. optional: true,
  110597. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("ImportAttribute")))
  110598. },
  110599. specifiers: {
  110600. default: [],
  110601. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)(function() {
  110602. const sourced = (0, _utils.assertNodeType)("ExportSpecifier", "ExportDefaultSpecifier", "ExportNamespaceSpecifier");
  110603. const sourceless = (0, _utils.assertNodeType)("ExportSpecifier");
  110604. if (!process.env.BABEL_TYPES_8_BREAKING)
  110605. return sourced;
  110606. return function(node, key, val) {
  110607. const validator = node.source ? sourced : sourceless;
  110608. validator(node, key, val);
  110609. };
  110610. }()))
  110611. },
  110612. source: {
  110613. validate: (0, _utils.assertNodeType)("StringLiteral"),
  110614. optional: true
  110615. },
  110616. exportKind: (0, _utils.validateOptional)((0, _utils.assertOneOf)("type", "value"))
  110617. }
  110618. });
  110619. (0, _utils.default)("ExportSpecifier", {
  110620. visitor: ["local", "exported"],
  110621. aliases: ["ModuleSpecifier"],
  110622. fields: {
  110623. local: {
  110624. validate: (0, _utils.assertNodeType)("Identifier")
  110625. },
  110626. exported: {
  110627. validate: (0, _utils.assertNodeType)("Identifier", "StringLiteral")
  110628. }
  110629. }
  110630. });
  110631. (0, _utils.default)("ForOfStatement", {
  110632. visitor: ["left", "right", "body"],
  110633. builder: ["left", "right", "body", "await"],
  110634. aliases: ["Scopable", "Statement", "For", "BlockParent", "Loop", "ForXStatement"],
  110635. fields: {
  110636. left: {
  110637. validate: function() {
  110638. if (!process.env.BABEL_TYPES_8_BREAKING) {
  110639. return (0, _utils.assertNodeType)("VariableDeclaration", "LVal");
  110640. }
  110641. const declaration = (0, _utils.assertNodeType)("VariableDeclaration");
  110642. const lval = (0, _utils.assertNodeType)("Identifier", "MemberExpression", "ArrayPattern", "ObjectPattern");
  110643. return function(node, key, val) {
  110644. if ((0, _is.default)("VariableDeclaration", val)) {
  110645. declaration(node, key, val);
  110646. } else {
  110647. lval(node, key, val);
  110648. }
  110649. };
  110650. }()
  110651. },
  110652. right: {
  110653. validate: (0, _utils.assertNodeType)("Expression")
  110654. },
  110655. body: {
  110656. validate: (0, _utils.assertNodeType)("Statement")
  110657. },
  110658. await: {
  110659. default: false
  110660. }
  110661. }
  110662. });
  110663. (0, _utils.default)("ImportDeclaration", {
  110664. visitor: ["specifiers", "source"],
  110665. aliases: ["Statement", "Declaration", "ModuleDeclaration"],
  110666. fields: {
  110667. assertions: {
  110668. optional: true,
  110669. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("ImportAttribute")))
  110670. },
  110671. specifiers: {
  110672. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("ImportSpecifier", "ImportDefaultSpecifier", "ImportNamespaceSpecifier")))
  110673. },
  110674. source: {
  110675. validate: (0, _utils.assertNodeType)("StringLiteral")
  110676. },
  110677. importKind: {
  110678. validate: (0, _utils.assertOneOf)("type", "typeof", "value"),
  110679. optional: true
  110680. }
  110681. }
  110682. });
  110683. (0, _utils.default)("ImportDefaultSpecifier", {
  110684. visitor: ["local"],
  110685. aliases: ["ModuleSpecifier"],
  110686. fields: {
  110687. local: {
  110688. validate: (0, _utils.assertNodeType)("Identifier")
  110689. }
  110690. }
  110691. });
  110692. (0, _utils.default)("ImportNamespaceSpecifier", {
  110693. visitor: ["local"],
  110694. aliases: ["ModuleSpecifier"],
  110695. fields: {
  110696. local: {
  110697. validate: (0, _utils.assertNodeType)("Identifier")
  110698. }
  110699. }
  110700. });
  110701. (0, _utils.default)("ImportSpecifier", {
  110702. visitor: ["local", "imported"],
  110703. aliases: ["ModuleSpecifier"],
  110704. fields: {
  110705. local: {
  110706. validate: (0, _utils.assertNodeType)("Identifier")
  110707. },
  110708. imported: {
  110709. validate: (0, _utils.assertNodeType)("Identifier", "StringLiteral")
  110710. },
  110711. importKind: {
  110712. validate: (0, _utils.assertOneOf)("type", "typeof"),
  110713. optional: true
  110714. }
  110715. }
  110716. });
  110717. (0, _utils.default)("MetaProperty", {
  110718. visitor: ["meta", "property"],
  110719. aliases: ["Expression"],
  110720. fields: {
  110721. meta: {
  110722. validate: (0, _utils.chain)((0, _utils.assertNodeType)("Identifier"), Object.assign(function(node, key, val) {
  110723. if (!process.env.BABEL_TYPES_8_BREAKING)
  110724. return;
  110725. let property;
  110726. switch (val.name) {
  110727. case "function":
  110728. property = "sent";
  110729. break;
  110730. case "new":
  110731. property = "target";
  110732. break;
  110733. case "import":
  110734. property = "meta";
  110735. break;
  110736. }
  110737. if (!(0, _is.default)("Identifier", node.property, {
  110738. name: property
  110739. })) {
  110740. throw new TypeError("Unrecognised MetaProperty");
  110741. }
  110742. }, {
  110743. oneOfNodeTypes: ["Identifier"]
  110744. }))
  110745. },
  110746. property: {
  110747. validate: (0, _utils.assertNodeType)("Identifier")
  110748. }
  110749. }
  110750. });
  110751. var classMethodOrPropertyCommon = {
  110752. abstract: {
  110753. validate: (0, _utils.assertValueType)("boolean"),
  110754. optional: true
  110755. },
  110756. accessibility: {
  110757. validate: (0, _utils.assertOneOf)("public", "private", "protected"),
  110758. optional: true
  110759. },
  110760. static: {
  110761. default: false
  110762. },
  110763. override: {
  110764. default: false
  110765. },
  110766. computed: {
  110767. default: false
  110768. },
  110769. optional: {
  110770. validate: (0, _utils.assertValueType)("boolean"),
  110771. optional: true
  110772. },
  110773. key: {
  110774. validate: (0, _utils.chain)(function() {
  110775. const normal = (0, _utils.assertNodeType)("Identifier", "StringLiteral", "NumericLiteral");
  110776. const computed = (0, _utils.assertNodeType)("Expression");
  110777. return function(node, key, val) {
  110778. const validator = node.computed ? computed : normal;
  110779. validator(node, key, val);
  110780. };
  110781. }(), (0, _utils.assertNodeType)("Identifier", "StringLiteral", "NumericLiteral", "Expression"))
  110782. }
  110783. };
  110784. exports.classMethodOrPropertyCommon = classMethodOrPropertyCommon;
  110785. var classMethodOrDeclareMethodCommon = Object.assign({}, functionCommon, classMethodOrPropertyCommon, {
  110786. params: {
  110787. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Identifier", "Pattern", "RestElement", "TSParameterProperty")))
  110788. },
  110789. kind: {
  110790. validate: (0, _utils.assertOneOf)("get", "set", "method", "constructor"),
  110791. default: "method"
  110792. },
  110793. access: {
  110794. validate: (0, _utils.chain)((0, _utils.assertValueType)("string"), (0, _utils.assertOneOf)("public", "private", "protected")),
  110795. optional: true
  110796. },
  110797. decorators: {
  110798. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Decorator"))),
  110799. optional: true
  110800. }
  110801. });
  110802. exports.classMethodOrDeclareMethodCommon = classMethodOrDeclareMethodCommon;
  110803. (0, _utils.default)("ClassMethod", {
  110804. aliases: ["Function", "Scopable", "BlockParent", "FunctionParent", "Method"],
  110805. builder: ["kind", "key", "params", "body", "computed", "static", "generator", "async"],
  110806. visitor: ["key", "params", "body", "decorators", "returnType", "typeParameters"],
  110807. fields: Object.assign({}, classMethodOrDeclareMethodCommon, functionTypeAnnotationCommon, {
  110808. body: {
  110809. validate: (0, _utils.assertNodeType)("BlockStatement")
  110810. }
  110811. })
  110812. });
  110813. (0, _utils.default)("ObjectPattern", {
  110814. visitor: ["properties", "typeAnnotation", "decorators"],
  110815. builder: ["properties"],
  110816. aliases: ["Pattern", "PatternLike", "LVal"],
  110817. fields: Object.assign({}, patternLikeCommon, {
  110818. properties: {
  110819. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("RestElement", "ObjectProperty")))
  110820. }
  110821. })
  110822. });
  110823. (0, _utils.default)("SpreadElement", {
  110824. visitor: ["argument"],
  110825. aliases: ["UnaryLike"],
  110826. deprecatedAlias: "SpreadProperty",
  110827. fields: {
  110828. argument: {
  110829. validate: (0, _utils.assertNodeType)("Expression")
  110830. }
  110831. }
  110832. });
  110833. (0, _utils.default)("Super", {
  110834. aliases: ["Expression"]
  110835. });
  110836. (0, _utils.default)("TaggedTemplateExpression", {
  110837. visitor: ["tag", "quasi"],
  110838. aliases: ["Expression"],
  110839. fields: {
  110840. tag: {
  110841. validate: (0, _utils.assertNodeType)("Expression")
  110842. },
  110843. quasi: {
  110844. validate: (0, _utils.assertNodeType)("TemplateLiteral")
  110845. },
  110846. typeParameters: {
  110847. validate: (0, _utils.assertNodeType)("TypeParameterInstantiation", "TSTypeParameterInstantiation"),
  110848. optional: true
  110849. }
  110850. }
  110851. });
  110852. (0, _utils.default)("TemplateElement", {
  110853. builder: ["value", "tail"],
  110854. fields: {
  110855. value: {
  110856. validate: (0, _utils.assertShape)({
  110857. raw: {
  110858. validate: (0, _utils.assertValueType)("string")
  110859. },
  110860. cooked: {
  110861. validate: (0, _utils.assertValueType)("string"),
  110862. optional: true
  110863. }
  110864. })
  110865. },
  110866. tail: {
  110867. default: false
  110868. }
  110869. }
  110870. });
  110871. (0, _utils.default)("TemplateLiteral", {
  110872. visitor: ["quasis", "expressions"],
  110873. aliases: ["Expression", "Literal"],
  110874. fields: {
  110875. quasis: {
  110876. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("TemplateElement")))
  110877. },
  110878. expressions: {
  110879. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Expression", "TSType")), function(node, key, val) {
  110880. if (node.quasis.length !== val.length + 1) {
  110881. throw new TypeError(`Number of ${node.type} quasis should be exactly one more than the number of expressions.
  110882. Expected ${val.length + 1} quasis but got ${node.quasis.length}`);
  110883. }
  110884. })
  110885. }
  110886. }
  110887. });
  110888. (0, _utils.default)("YieldExpression", {
  110889. builder: ["argument", "delegate"],
  110890. visitor: ["argument"],
  110891. aliases: ["Expression", "Terminatorless"],
  110892. fields: {
  110893. delegate: {
  110894. validate: (0, _utils.chain)((0, _utils.assertValueType)("boolean"), Object.assign(function(node, key, val) {
  110895. if (!process.env.BABEL_TYPES_8_BREAKING)
  110896. return;
  110897. if (val && !node.argument) {
  110898. throw new TypeError("Property delegate of YieldExpression cannot be true if there is no argument");
  110899. }
  110900. }, {
  110901. type: "boolean"
  110902. })),
  110903. default: false
  110904. },
  110905. argument: {
  110906. optional: true,
  110907. validate: (0, _utils.assertNodeType)("Expression")
  110908. }
  110909. }
  110910. });
  110911. (0, _utils.default)("AwaitExpression", {
  110912. builder: ["argument"],
  110913. visitor: ["argument"],
  110914. aliases: ["Expression", "Terminatorless"],
  110915. fields: {
  110916. argument: {
  110917. validate: (0, _utils.assertNodeType)("Expression")
  110918. }
  110919. }
  110920. });
  110921. (0, _utils.default)("Import", {
  110922. aliases: ["Expression"]
  110923. });
  110924. (0, _utils.default)("BigIntLiteral", {
  110925. builder: ["value"],
  110926. fields: {
  110927. value: {
  110928. validate: (0, _utils.assertValueType)("string")
  110929. }
  110930. },
  110931. aliases: ["Expression", "Pureish", "Literal", "Immutable"]
  110932. });
  110933. (0, _utils.default)("ExportNamespaceSpecifier", {
  110934. visitor: ["exported"],
  110935. aliases: ["ModuleSpecifier"],
  110936. fields: {
  110937. exported: {
  110938. validate: (0, _utils.assertNodeType)("Identifier")
  110939. }
  110940. }
  110941. });
  110942. (0, _utils.default)("OptionalMemberExpression", {
  110943. builder: ["object", "property", "computed", "optional"],
  110944. visitor: ["object", "property"],
  110945. aliases: ["Expression"],
  110946. fields: {
  110947. object: {
  110948. validate: (0, _utils.assertNodeType)("Expression")
  110949. },
  110950. property: {
  110951. validate: function() {
  110952. const normal = (0, _utils.assertNodeType)("Identifier");
  110953. const computed = (0, _utils.assertNodeType)("Expression");
  110954. const validator = function(node, key, val) {
  110955. const validator2 = node.computed ? computed : normal;
  110956. validator2(node, key, val);
  110957. };
  110958. validator.oneOfNodeTypes = ["Expression", "Identifier"];
  110959. return validator;
  110960. }()
  110961. },
  110962. computed: {
  110963. default: false
  110964. },
  110965. optional: {
  110966. validate: !process.env.BABEL_TYPES_8_BREAKING ? (0, _utils.assertValueType)("boolean") : (0, _utils.chain)((0, _utils.assertValueType)("boolean"), (0, _utils.assertOptionalChainStart)())
  110967. }
  110968. }
  110969. });
  110970. (0, _utils.default)("OptionalCallExpression", {
  110971. visitor: ["callee", "arguments", "typeParameters", "typeArguments"],
  110972. builder: ["callee", "arguments", "optional"],
  110973. aliases: ["Expression"],
  110974. fields: {
  110975. callee: {
  110976. validate: (0, _utils.assertNodeType)("Expression")
  110977. },
  110978. arguments: {
  110979. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Expression", "SpreadElement", "JSXNamespacedName", "ArgumentPlaceholder")))
  110980. },
  110981. optional: {
  110982. validate: !process.env.BABEL_TYPES_8_BREAKING ? (0, _utils.assertValueType)("boolean") : (0, _utils.chain)((0, _utils.assertValueType)("boolean"), (0, _utils.assertOptionalChainStart)())
  110983. },
  110984. typeArguments: {
  110985. validate: (0, _utils.assertNodeType)("TypeParameterInstantiation"),
  110986. optional: true
  110987. },
  110988. typeParameters: {
  110989. validate: (0, _utils.assertNodeType)("TSTypeParameterInstantiation"),
  110990. optional: true
  110991. }
  110992. }
  110993. });
  110994. }
  110995. });
  110996. // node_modules/@babel/helper-get-function-arity/node_modules/@babel/types/lib/definitions/flow.js
  110997. var require_flow7 = __commonJS({
  110998. "node_modules/@babel/helper-get-function-arity/node_modules/@babel/types/lib/definitions/flow.js"() {
  110999. "use strict";
  111000. var _utils = require_utils5();
  111001. var defineInterfaceishType = (name2, typeParameterType = "TypeParameterDeclaration") => {
  111002. (0, _utils.default)(name2, {
  111003. builder: ["id", "typeParameters", "extends", "body"],
  111004. visitor: ["id", "typeParameters", "extends", "mixins", "implements", "body"],
  111005. aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"],
  111006. fields: {
  111007. id: (0, _utils.validateType)("Identifier"),
  111008. typeParameters: (0, _utils.validateOptionalType)(typeParameterType),
  111009. extends: (0, _utils.validateOptional)((0, _utils.arrayOfType)("InterfaceExtends")),
  111010. mixins: (0, _utils.validateOptional)((0, _utils.arrayOfType)("InterfaceExtends")),
  111011. implements: (0, _utils.validateOptional)((0, _utils.arrayOfType)("ClassImplements")),
  111012. body: (0, _utils.validateType)("ObjectTypeAnnotation")
  111013. }
  111014. });
  111015. };
  111016. (0, _utils.default)("AnyTypeAnnotation", {
  111017. aliases: ["Flow", "FlowType", "FlowBaseAnnotation"]
  111018. });
  111019. (0, _utils.default)("ArrayTypeAnnotation", {
  111020. visitor: ["elementType"],
  111021. aliases: ["Flow", "FlowType"],
  111022. fields: {
  111023. elementType: (0, _utils.validateType)("FlowType")
  111024. }
  111025. });
  111026. (0, _utils.default)("BooleanTypeAnnotation", {
  111027. aliases: ["Flow", "FlowType", "FlowBaseAnnotation"]
  111028. });
  111029. (0, _utils.default)("BooleanLiteralTypeAnnotation", {
  111030. builder: ["value"],
  111031. aliases: ["Flow", "FlowType"],
  111032. fields: {
  111033. value: (0, _utils.validate)((0, _utils.assertValueType)("boolean"))
  111034. }
  111035. });
  111036. (0, _utils.default)("NullLiteralTypeAnnotation", {
  111037. aliases: ["Flow", "FlowType", "FlowBaseAnnotation"]
  111038. });
  111039. (0, _utils.default)("ClassImplements", {
  111040. visitor: ["id", "typeParameters"],
  111041. aliases: ["Flow"],
  111042. fields: {
  111043. id: (0, _utils.validateType)("Identifier"),
  111044. typeParameters: (0, _utils.validateOptionalType)("TypeParameterInstantiation")
  111045. }
  111046. });
  111047. defineInterfaceishType("DeclareClass");
  111048. (0, _utils.default)("DeclareFunction", {
  111049. visitor: ["id"],
  111050. aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"],
  111051. fields: {
  111052. id: (0, _utils.validateType)("Identifier"),
  111053. predicate: (0, _utils.validateOptionalType)("DeclaredPredicate")
  111054. }
  111055. });
  111056. defineInterfaceishType("DeclareInterface");
  111057. (0, _utils.default)("DeclareModule", {
  111058. builder: ["id", "body", "kind"],
  111059. visitor: ["id", "body"],
  111060. aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"],
  111061. fields: {
  111062. id: (0, _utils.validateType)(["Identifier", "StringLiteral"]),
  111063. body: (0, _utils.validateType)("BlockStatement"),
  111064. kind: (0, _utils.validateOptional)((0, _utils.assertOneOf)("CommonJS", "ES"))
  111065. }
  111066. });
  111067. (0, _utils.default)("DeclareModuleExports", {
  111068. visitor: ["typeAnnotation"],
  111069. aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"],
  111070. fields: {
  111071. typeAnnotation: (0, _utils.validateType)("TypeAnnotation")
  111072. }
  111073. });
  111074. (0, _utils.default)("DeclareTypeAlias", {
  111075. visitor: ["id", "typeParameters", "right"],
  111076. aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"],
  111077. fields: {
  111078. id: (0, _utils.validateType)("Identifier"),
  111079. typeParameters: (0, _utils.validateOptionalType)("TypeParameterDeclaration"),
  111080. right: (0, _utils.validateType)("FlowType")
  111081. }
  111082. });
  111083. (0, _utils.default)("DeclareOpaqueType", {
  111084. visitor: ["id", "typeParameters", "supertype"],
  111085. aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"],
  111086. fields: {
  111087. id: (0, _utils.validateType)("Identifier"),
  111088. typeParameters: (0, _utils.validateOptionalType)("TypeParameterDeclaration"),
  111089. supertype: (0, _utils.validateOptionalType)("FlowType")
  111090. }
  111091. });
  111092. (0, _utils.default)("DeclareVariable", {
  111093. visitor: ["id"],
  111094. aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"],
  111095. fields: {
  111096. id: (0, _utils.validateType)("Identifier")
  111097. }
  111098. });
  111099. (0, _utils.default)("DeclareExportDeclaration", {
  111100. visitor: ["declaration", "specifiers", "source"],
  111101. aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"],
  111102. fields: {
  111103. declaration: (0, _utils.validateOptionalType)("Flow"),
  111104. specifiers: (0, _utils.validateOptional)((0, _utils.arrayOfType)(["ExportSpecifier", "ExportNamespaceSpecifier"])),
  111105. source: (0, _utils.validateOptionalType)("StringLiteral"),
  111106. default: (0, _utils.validateOptional)((0, _utils.assertValueType)("boolean"))
  111107. }
  111108. });
  111109. (0, _utils.default)("DeclareExportAllDeclaration", {
  111110. visitor: ["source"],
  111111. aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"],
  111112. fields: {
  111113. source: (0, _utils.validateType)("StringLiteral"),
  111114. exportKind: (0, _utils.validateOptional)((0, _utils.assertOneOf)("type", "value"))
  111115. }
  111116. });
  111117. (0, _utils.default)("DeclaredPredicate", {
  111118. visitor: ["value"],
  111119. aliases: ["Flow", "FlowPredicate"],
  111120. fields: {
  111121. value: (0, _utils.validateType)("Flow")
  111122. }
  111123. });
  111124. (0, _utils.default)("ExistsTypeAnnotation", {
  111125. aliases: ["Flow", "FlowType"]
  111126. });
  111127. (0, _utils.default)("FunctionTypeAnnotation", {
  111128. visitor: ["typeParameters", "params", "rest", "returnType"],
  111129. aliases: ["Flow", "FlowType"],
  111130. fields: {
  111131. typeParameters: (0, _utils.validateOptionalType)("TypeParameterDeclaration"),
  111132. params: (0, _utils.validate)((0, _utils.arrayOfType)("FunctionTypeParam")),
  111133. rest: (0, _utils.validateOptionalType)("FunctionTypeParam"),
  111134. this: (0, _utils.validateOptionalType)("FunctionTypeParam"),
  111135. returnType: (0, _utils.validateType)("FlowType")
  111136. }
  111137. });
  111138. (0, _utils.default)("FunctionTypeParam", {
  111139. visitor: ["name", "typeAnnotation"],
  111140. aliases: ["Flow"],
  111141. fields: {
  111142. name: (0, _utils.validateOptionalType)("Identifier"),
  111143. typeAnnotation: (0, _utils.validateType)("FlowType"),
  111144. optional: (0, _utils.validateOptional)((0, _utils.assertValueType)("boolean"))
  111145. }
  111146. });
  111147. (0, _utils.default)("GenericTypeAnnotation", {
  111148. visitor: ["id", "typeParameters"],
  111149. aliases: ["Flow", "FlowType"],
  111150. fields: {
  111151. id: (0, _utils.validateType)(["Identifier", "QualifiedTypeIdentifier"]),
  111152. typeParameters: (0, _utils.validateOptionalType)("TypeParameterInstantiation")
  111153. }
  111154. });
  111155. (0, _utils.default)("InferredPredicate", {
  111156. aliases: ["Flow", "FlowPredicate"]
  111157. });
  111158. (0, _utils.default)("InterfaceExtends", {
  111159. visitor: ["id", "typeParameters"],
  111160. aliases: ["Flow"],
  111161. fields: {
  111162. id: (0, _utils.validateType)(["Identifier", "QualifiedTypeIdentifier"]),
  111163. typeParameters: (0, _utils.validateOptionalType)("TypeParameterInstantiation")
  111164. }
  111165. });
  111166. defineInterfaceishType("InterfaceDeclaration");
  111167. (0, _utils.default)("InterfaceTypeAnnotation", {
  111168. visitor: ["extends", "body"],
  111169. aliases: ["Flow", "FlowType"],
  111170. fields: {
  111171. extends: (0, _utils.validateOptional)((0, _utils.arrayOfType)("InterfaceExtends")),
  111172. body: (0, _utils.validateType)("ObjectTypeAnnotation")
  111173. }
  111174. });
  111175. (0, _utils.default)("IntersectionTypeAnnotation", {
  111176. visitor: ["types"],
  111177. aliases: ["Flow", "FlowType"],
  111178. fields: {
  111179. types: (0, _utils.validate)((0, _utils.arrayOfType)("FlowType"))
  111180. }
  111181. });
  111182. (0, _utils.default)("MixedTypeAnnotation", {
  111183. aliases: ["Flow", "FlowType", "FlowBaseAnnotation"]
  111184. });
  111185. (0, _utils.default)("EmptyTypeAnnotation", {
  111186. aliases: ["Flow", "FlowType", "FlowBaseAnnotation"]
  111187. });
  111188. (0, _utils.default)("NullableTypeAnnotation", {
  111189. visitor: ["typeAnnotation"],
  111190. aliases: ["Flow", "FlowType"],
  111191. fields: {
  111192. typeAnnotation: (0, _utils.validateType)("FlowType")
  111193. }
  111194. });
  111195. (0, _utils.default)("NumberLiteralTypeAnnotation", {
  111196. builder: ["value"],
  111197. aliases: ["Flow", "FlowType"],
  111198. fields: {
  111199. value: (0, _utils.validate)((0, _utils.assertValueType)("number"))
  111200. }
  111201. });
  111202. (0, _utils.default)("NumberTypeAnnotation", {
  111203. aliases: ["Flow", "FlowType", "FlowBaseAnnotation"]
  111204. });
  111205. (0, _utils.default)("ObjectTypeAnnotation", {
  111206. visitor: ["properties", "indexers", "callProperties", "internalSlots"],
  111207. aliases: ["Flow", "FlowType"],
  111208. builder: ["properties", "indexers", "callProperties", "internalSlots", "exact"],
  111209. fields: {
  111210. properties: (0, _utils.validate)((0, _utils.arrayOfType)(["ObjectTypeProperty", "ObjectTypeSpreadProperty"])),
  111211. indexers: (0, _utils.validateOptional)((0, _utils.arrayOfType)("ObjectTypeIndexer")),
  111212. callProperties: (0, _utils.validateOptional)((0, _utils.arrayOfType)("ObjectTypeCallProperty")),
  111213. internalSlots: (0, _utils.validateOptional)((0, _utils.arrayOfType)("ObjectTypeInternalSlot")),
  111214. exact: {
  111215. validate: (0, _utils.assertValueType)("boolean"),
  111216. default: false
  111217. },
  111218. inexact: (0, _utils.validateOptional)((0, _utils.assertValueType)("boolean"))
  111219. }
  111220. });
  111221. (0, _utils.default)("ObjectTypeInternalSlot", {
  111222. visitor: ["id", "value", "optional", "static", "method"],
  111223. aliases: ["Flow", "UserWhitespacable"],
  111224. fields: {
  111225. id: (0, _utils.validateType)("Identifier"),
  111226. value: (0, _utils.validateType)("FlowType"),
  111227. optional: (0, _utils.validate)((0, _utils.assertValueType)("boolean")),
  111228. static: (0, _utils.validate)((0, _utils.assertValueType)("boolean")),
  111229. method: (0, _utils.validate)((0, _utils.assertValueType)("boolean"))
  111230. }
  111231. });
  111232. (0, _utils.default)("ObjectTypeCallProperty", {
  111233. visitor: ["value"],
  111234. aliases: ["Flow", "UserWhitespacable"],
  111235. fields: {
  111236. value: (0, _utils.validateType)("FlowType"),
  111237. static: (0, _utils.validate)((0, _utils.assertValueType)("boolean"))
  111238. }
  111239. });
  111240. (0, _utils.default)("ObjectTypeIndexer", {
  111241. visitor: ["id", "key", "value", "variance"],
  111242. aliases: ["Flow", "UserWhitespacable"],
  111243. fields: {
  111244. id: (0, _utils.validateOptionalType)("Identifier"),
  111245. key: (0, _utils.validateType)("FlowType"),
  111246. value: (0, _utils.validateType)("FlowType"),
  111247. static: (0, _utils.validate)((0, _utils.assertValueType)("boolean")),
  111248. variance: (0, _utils.validateOptionalType)("Variance")
  111249. }
  111250. });
  111251. (0, _utils.default)("ObjectTypeProperty", {
  111252. visitor: ["key", "value", "variance"],
  111253. aliases: ["Flow", "UserWhitespacable"],
  111254. fields: {
  111255. key: (0, _utils.validateType)(["Identifier", "StringLiteral"]),
  111256. value: (0, _utils.validateType)("FlowType"),
  111257. kind: (0, _utils.validate)((0, _utils.assertOneOf)("init", "get", "set")),
  111258. static: (0, _utils.validate)((0, _utils.assertValueType)("boolean")),
  111259. proto: (0, _utils.validate)((0, _utils.assertValueType)("boolean")),
  111260. optional: (0, _utils.validate)((0, _utils.assertValueType)("boolean")),
  111261. variance: (0, _utils.validateOptionalType)("Variance"),
  111262. method: (0, _utils.validate)((0, _utils.assertValueType)("boolean"))
  111263. }
  111264. });
  111265. (0, _utils.default)("ObjectTypeSpreadProperty", {
  111266. visitor: ["argument"],
  111267. aliases: ["Flow", "UserWhitespacable"],
  111268. fields: {
  111269. argument: (0, _utils.validateType)("FlowType")
  111270. }
  111271. });
  111272. (0, _utils.default)("OpaqueType", {
  111273. visitor: ["id", "typeParameters", "supertype", "impltype"],
  111274. aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"],
  111275. fields: {
  111276. id: (0, _utils.validateType)("Identifier"),
  111277. typeParameters: (0, _utils.validateOptionalType)("TypeParameterDeclaration"),
  111278. supertype: (0, _utils.validateOptionalType)("FlowType"),
  111279. impltype: (0, _utils.validateType)("FlowType")
  111280. }
  111281. });
  111282. (0, _utils.default)("QualifiedTypeIdentifier", {
  111283. visitor: ["id", "qualification"],
  111284. aliases: ["Flow"],
  111285. fields: {
  111286. id: (0, _utils.validateType)("Identifier"),
  111287. qualification: (0, _utils.validateType)(["Identifier", "QualifiedTypeIdentifier"])
  111288. }
  111289. });
  111290. (0, _utils.default)("StringLiteralTypeAnnotation", {
  111291. builder: ["value"],
  111292. aliases: ["Flow", "FlowType"],
  111293. fields: {
  111294. value: (0, _utils.validate)((0, _utils.assertValueType)("string"))
  111295. }
  111296. });
  111297. (0, _utils.default)("StringTypeAnnotation", {
  111298. aliases: ["Flow", "FlowType", "FlowBaseAnnotation"]
  111299. });
  111300. (0, _utils.default)("SymbolTypeAnnotation", {
  111301. aliases: ["Flow", "FlowType", "FlowBaseAnnotation"]
  111302. });
  111303. (0, _utils.default)("ThisTypeAnnotation", {
  111304. aliases: ["Flow", "FlowType", "FlowBaseAnnotation"]
  111305. });
  111306. (0, _utils.default)("TupleTypeAnnotation", {
  111307. visitor: ["types"],
  111308. aliases: ["Flow", "FlowType"],
  111309. fields: {
  111310. types: (0, _utils.validate)((0, _utils.arrayOfType)("FlowType"))
  111311. }
  111312. });
  111313. (0, _utils.default)("TypeofTypeAnnotation", {
  111314. visitor: ["argument"],
  111315. aliases: ["Flow", "FlowType"],
  111316. fields: {
  111317. argument: (0, _utils.validateType)("FlowType")
  111318. }
  111319. });
  111320. (0, _utils.default)("TypeAlias", {
  111321. visitor: ["id", "typeParameters", "right"],
  111322. aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"],
  111323. fields: {
  111324. id: (0, _utils.validateType)("Identifier"),
  111325. typeParameters: (0, _utils.validateOptionalType)("TypeParameterDeclaration"),
  111326. right: (0, _utils.validateType)("FlowType")
  111327. }
  111328. });
  111329. (0, _utils.default)("TypeAnnotation", {
  111330. aliases: ["Flow"],
  111331. visitor: ["typeAnnotation"],
  111332. fields: {
  111333. typeAnnotation: (0, _utils.validateType)("FlowType")
  111334. }
  111335. });
  111336. (0, _utils.default)("TypeCastExpression", {
  111337. visitor: ["expression", "typeAnnotation"],
  111338. aliases: ["Flow", "ExpressionWrapper", "Expression"],
  111339. fields: {
  111340. expression: (0, _utils.validateType)("Expression"),
  111341. typeAnnotation: (0, _utils.validateType)("TypeAnnotation")
  111342. }
  111343. });
  111344. (0, _utils.default)("TypeParameter", {
  111345. aliases: ["Flow"],
  111346. visitor: ["bound", "default", "variance"],
  111347. fields: {
  111348. name: (0, _utils.validate)((0, _utils.assertValueType)("string")),
  111349. bound: (0, _utils.validateOptionalType)("TypeAnnotation"),
  111350. default: (0, _utils.validateOptionalType)("FlowType"),
  111351. variance: (0, _utils.validateOptionalType)("Variance")
  111352. }
  111353. });
  111354. (0, _utils.default)("TypeParameterDeclaration", {
  111355. aliases: ["Flow"],
  111356. visitor: ["params"],
  111357. fields: {
  111358. params: (0, _utils.validate)((0, _utils.arrayOfType)("TypeParameter"))
  111359. }
  111360. });
  111361. (0, _utils.default)("TypeParameterInstantiation", {
  111362. aliases: ["Flow"],
  111363. visitor: ["params"],
  111364. fields: {
  111365. params: (0, _utils.validate)((0, _utils.arrayOfType)("FlowType"))
  111366. }
  111367. });
  111368. (0, _utils.default)("UnionTypeAnnotation", {
  111369. visitor: ["types"],
  111370. aliases: ["Flow", "FlowType"],
  111371. fields: {
  111372. types: (0, _utils.validate)((0, _utils.arrayOfType)("FlowType"))
  111373. }
  111374. });
  111375. (0, _utils.default)("Variance", {
  111376. aliases: ["Flow"],
  111377. builder: ["kind"],
  111378. fields: {
  111379. kind: (0, _utils.validate)((0, _utils.assertOneOf)("minus", "plus"))
  111380. }
  111381. });
  111382. (0, _utils.default)("VoidTypeAnnotation", {
  111383. aliases: ["Flow", "FlowType", "FlowBaseAnnotation"]
  111384. });
  111385. (0, _utils.default)("EnumDeclaration", {
  111386. aliases: ["Statement", "Declaration"],
  111387. visitor: ["id", "body"],
  111388. fields: {
  111389. id: (0, _utils.validateType)("Identifier"),
  111390. body: (0, _utils.validateType)(["EnumBooleanBody", "EnumNumberBody", "EnumStringBody", "EnumSymbolBody"])
  111391. }
  111392. });
  111393. (0, _utils.default)("EnumBooleanBody", {
  111394. aliases: ["EnumBody"],
  111395. visitor: ["members"],
  111396. fields: {
  111397. explicitType: (0, _utils.validate)((0, _utils.assertValueType)("boolean")),
  111398. members: (0, _utils.validateArrayOfType)("EnumBooleanMember"),
  111399. hasUnknownMembers: (0, _utils.validate)((0, _utils.assertValueType)("boolean"))
  111400. }
  111401. });
  111402. (0, _utils.default)("EnumNumberBody", {
  111403. aliases: ["EnumBody"],
  111404. visitor: ["members"],
  111405. fields: {
  111406. explicitType: (0, _utils.validate)((0, _utils.assertValueType)("boolean")),
  111407. members: (0, _utils.validateArrayOfType)("EnumNumberMember"),
  111408. hasUnknownMembers: (0, _utils.validate)((0, _utils.assertValueType)("boolean"))
  111409. }
  111410. });
  111411. (0, _utils.default)("EnumStringBody", {
  111412. aliases: ["EnumBody"],
  111413. visitor: ["members"],
  111414. fields: {
  111415. explicitType: (0, _utils.validate)((0, _utils.assertValueType)("boolean")),
  111416. members: (0, _utils.validateArrayOfType)(["EnumStringMember", "EnumDefaultedMember"]),
  111417. hasUnknownMembers: (0, _utils.validate)((0, _utils.assertValueType)("boolean"))
  111418. }
  111419. });
  111420. (0, _utils.default)("EnumSymbolBody", {
  111421. aliases: ["EnumBody"],
  111422. visitor: ["members"],
  111423. fields: {
  111424. members: (0, _utils.validateArrayOfType)("EnumDefaultedMember"),
  111425. hasUnknownMembers: (0, _utils.validate)((0, _utils.assertValueType)("boolean"))
  111426. }
  111427. });
  111428. (0, _utils.default)("EnumBooleanMember", {
  111429. aliases: ["EnumMember"],
  111430. visitor: ["id"],
  111431. fields: {
  111432. id: (0, _utils.validateType)("Identifier"),
  111433. init: (0, _utils.validateType)("BooleanLiteral")
  111434. }
  111435. });
  111436. (0, _utils.default)("EnumNumberMember", {
  111437. aliases: ["EnumMember"],
  111438. visitor: ["id", "init"],
  111439. fields: {
  111440. id: (0, _utils.validateType)("Identifier"),
  111441. init: (0, _utils.validateType)("NumericLiteral")
  111442. }
  111443. });
  111444. (0, _utils.default)("EnumStringMember", {
  111445. aliases: ["EnumMember"],
  111446. visitor: ["id", "init"],
  111447. fields: {
  111448. id: (0, _utils.validateType)("Identifier"),
  111449. init: (0, _utils.validateType)("StringLiteral")
  111450. }
  111451. });
  111452. (0, _utils.default)("EnumDefaultedMember", {
  111453. aliases: ["EnumMember"],
  111454. visitor: ["id"],
  111455. fields: {
  111456. id: (0, _utils.validateType)("Identifier")
  111457. }
  111458. });
  111459. (0, _utils.default)("IndexedAccessType", {
  111460. visitor: ["objectType", "indexType"],
  111461. aliases: ["Flow", "FlowType"],
  111462. fields: {
  111463. objectType: (0, _utils.validateType)("FlowType"),
  111464. indexType: (0, _utils.validateType)("FlowType")
  111465. }
  111466. });
  111467. (0, _utils.default)("OptionalIndexedAccessType", {
  111468. visitor: ["objectType", "indexType"],
  111469. aliases: ["Flow", "FlowType"],
  111470. fields: {
  111471. objectType: (0, _utils.validateType)("FlowType"),
  111472. indexType: (0, _utils.validateType)("FlowType"),
  111473. optional: (0, _utils.validate)((0, _utils.assertValueType)("boolean"))
  111474. }
  111475. });
  111476. }
  111477. });
  111478. // node_modules/@babel/helper-get-function-arity/node_modules/@babel/types/lib/definitions/jsx.js
  111479. var require_jsx7 = __commonJS({
  111480. "node_modules/@babel/helper-get-function-arity/node_modules/@babel/types/lib/definitions/jsx.js"() {
  111481. "use strict";
  111482. var _utils = require_utils5();
  111483. (0, _utils.default)("JSXAttribute", {
  111484. visitor: ["name", "value"],
  111485. aliases: ["JSX", "Immutable"],
  111486. fields: {
  111487. name: {
  111488. validate: (0, _utils.assertNodeType)("JSXIdentifier", "JSXNamespacedName")
  111489. },
  111490. value: {
  111491. optional: true,
  111492. validate: (0, _utils.assertNodeType)("JSXElement", "JSXFragment", "StringLiteral", "JSXExpressionContainer")
  111493. }
  111494. }
  111495. });
  111496. (0, _utils.default)("JSXClosingElement", {
  111497. visitor: ["name"],
  111498. aliases: ["JSX", "Immutable"],
  111499. fields: {
  111500. name: {
  111501. validate: (0, _utils.assertNodeType)("JSXIdentifier", "JSXMemberExpression", "JSXNamespacedName")
  111502. }
  111503. }
  111504. });
  111505. (0, _utils.default)("JSXElement", {
  111506. builder: ["openingElement", "closingElement", "children", "selfClosing"],
  111507. visitor: ["openingElement", "children", "closingElement"],
  111508. aliases: ["JSX", "Immutable", "Expression"],
  111509. fields: {
  111510. openingElement: {
  111511. validate: (0, _utils.assertNodeType)("JSXOpeningElement")
  111512. },
  111513. closingElement: {
  111514. optional: true,
  111515. validate: (0, _utils.assertNodeType)("JSXClosingElement")
  111516. },
  111517. children: {
  111518. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("JSXText", "JSXExpressionContainer", "JSXSpreadChild", "JSXElement", "JSXFragment")))
  111519. },
  111520. selfClosing: {
  111521. validate: (0, _utils.assertValueType)("boolean"),
  111522. optional: true
  111523. }
  111524. }
  111525. });
  111526. (0, _utils.default)("JSXEmptyExpression", {
  111527. aliases: ["JSX"]
  111528. });
  111529. (0, _utils.default)("JSXExpressionContainer", {
  111530. visitor: ["expression"],
  111531. aliases: ["JSX", "Immutable"],
  111532. fields: {
  111533. expression: {
  111534. validate: (0, _utils.assertNodeType)("Expression", "JSXEmptyExpression")
  111535. }
  111536. }
  111537. });
  111538. (0, _utils.default)("JSXSpreadChild", {
  111539. visitor: ["expression"],
  111540. aliases: ["JSX", "Immutable"],
  111541. fields: {
  111542. expression: {
  111543. validate: (0, _utils.assertNodeType)("Expression")
  111544. }
  111545. }
  111546. });
  111547. (0, _utils.default)("JSXIdentifier", {
  111548. builder: ["name"],
  111549. aliases: ["JSX"],
  111550. fields: {
  111551. name: {
  111552. validate: (0, _utils.assertValueType)("string")
  111553. }
  111554. }
  111555. });
  111556. (0, _utils.default)("JSXMemberExpression", {
  111557. visitor: ["object", "property"],
  111558. aliases: ["JSX"],
  111559. fields: {
  111560. object: {
  111561. validate: (0, _utils.assertNodeType)("JSXMemberExpression", "JSXIdentifier")
  111562. },
  111563. property: {
  111564. validate: (0, _utils.assertNodeType)("JSXIdentifier")
  111565. }
  111566. }
  111567. });
  111568. (0, _utils.default)("JSXNamespacedName", {
  111569. visitor: ["namespace", "name"],
  111570. aliases: ["JSX"],
  111571. fields: {
  111572. namespace: {
  111573. validate: (0, _utils.assertNodeType)("JSXIdentifier")
  111574. },
  111575. name: {
  111576. validate: (0, _utils.assertNodeType)("JSXIdentifier")
  111577. }
  111578. }
  111579. });
  111580. (0, _utils.default)("JSXOpeningElement", {
  111581. builder: ["name", "attributes", "selfClosing"],
  111582. visitor: ["name", "attributes"],
  111583. aliases: ["JSX", "Immutable"],
  111584. fields: {
  111585. name: {
  111586. validate: (0, _utils.assertNodeType)("JSXIdentifier", "JSXMemberExpression", "JSXNamespacedName")
  111587. },
  111588. selfClosing: {
  111589. default: false
  111590. },
  111591. attributes: {
  111592. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("JSXAttribute", "JSXSpreadAttribute")))
  111593. },
  111594. typeParameters: {
  111595. validate: (0, _utils.assertNodeType)("TypeParameterInstantiation", "TSTypeParameterInstantiation"),
  111596. optional: true
  111597. }
  111598. }
  111599. });
  111600. (0, _utils.default)("JSXSpreadAttribute", {
  111601. visitor: ["argument"],
  111602. aliases: ["JSX"],
  111603. fields: {
  111604. argument: {
  111605. validate: (0, _utils.assertNodeType)("Expression")
  111606. }
  111607. }
  111608. });
  111609. (0, _utils.default)("JSXText", {
  111610. aliases: ["JSX", "Immutable"],
  111611. builder: ["value"],
  111612. fields: {
  111613. value: {
  111614. validate: (0, _utils.assertValueType)("string")
  111615. }
  111616. }
  111617. });
  111618. (0, _utils.default)("JSXFragment", {
  111619. builder: ["openingFragment", "closingFragment", "children"],
  111620. visitor: ["openingFragment", "children", "closingFragment"],
  111621. aliases: ["JSX", "Immutable", "Expression"],
  111622. fields: {
  111623. openingFragment: {
  111624. validate: (0, _utils.assertNodeType)("JSXOpeningFragment")
  111625. },
  111626. closingFragment: {
  111627. validate: (0, _utils.assertNodeType)("JSXClosingFragment")
  111628. },
  111629. children: {
  111630. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("JSXText", "JSXExpressionContainer", "JSXSpreadChild", "JSXElement", "JSXFragment")))
  111631. }
  111632. }
  111633. });
  111634. (0, _utils.default)("JSXOpeningFragment", {
  111635. aliases: ["JSX", "Immutable"]
  111636. });
  111637. (0, _utils.default)("JSXClosingFragment", {
  111638. aliases: ["JSX", "Immutable"]
  111639. });
  111640. }
  111641. });
  111642. // node_modules/@babel/helper-get-function-arity/node_modules/@babel/types/lib/definitions/placeholders.js
  111643. var require_placeholders5 = __commonJS({
  111644. "node_modules/@babel/helper-get-function-arity/node_modules/@babel/types/lib/definitions/placeholders.js"(exports) {
  111645. "use strict";
  111646. Object.defineProperty(exports, "__esModule", {
  111647. value: true
  111648. });
  111649. exports.PLACEHOLDERS_FLIPPED_ALIAS = exports.PLACEHOLDERS_ALIAS = exports.PLACEHOLDERS = void 0;
  111650. var _utils = require_utils5();
  111651. var PLACEHOLDERS = ["Identifier", "StringLiteral", "Expression", "Statement", "Declaration", "BlockStatement", "ClassBody", "Pattern"];
  111652. exports.PLACEHOLDERS = PLACEHOLDERS;
  111653. var PLACEHOLDERS_ALIAS = {
  111654. Declaration: ["Statement"],
  111655. Pattern: ["PatternLike", "LVal"]
  111656. };
  111657. exports.PLACEHOLDERS_ALIAS = PLACEHOLDERS_ALIAS;
  111658. for (const type of PLACEHOLDERS) {
  111659. const alias = _utils.ALIAS_KEYS[type];
  111660. if (alias != null && alias.length)
  111661. PLACEHOLDERS_ALIAS[type] = alias;
  111662. }
  111663. var PLACEHOLDERS_FLIPPED_ALIAS = {};
  111664. exports.PLACEHOLDERS_FLIPPED_ALIAS = PLACEHOLDERS_FLIPPED_ALIAS;
  111665. Object.keys(PLACEHOLDERS_ALIAS).forEach((type) => {
  111666. PLACEHOLDERS_ALIAS[type].forEach((alias) => {
  111667. if (!Object.hasOwnProperty.call(PLACEHOLDERS_FLIPPED_ALIAS, alias)) {
  111668. PLACEHOLDERS_FLIPPED_ALIAS[alias] = [];
  111669. }
  111670. PLACEHOLDERS_FLIPPED_ALIAS[alias].push(type);
  111671. });
  111672. });
  111673. }
  111674. });
  111675. // node_modules/@babel/helper-get-function-arity/node_modules/@babel/types/lib/definitions/misc.js
  111676. var require_misc5 = __commonJS({
  111677. "node_modules/@babel/helper-get-function-arity/node_modules/@babel/types/lib/definitions/misc.js"() {
  111678. "use strict";
  111679. var _utils = require_utils5();
  111680. var _placeholders = require_placeholders5();
  111681. {
  111682. (0, _utils.default)("Noop", {
  111683. visitor: []
  111684. });
  111685. }
  111686. (0, _utils.default)("Placeholder", {
  111687. visitor: [],
  111688. builder: ["expectedNode", "name"],
  111689. fields: {
  111690. name: {
  111691. validate: (0, _utils.assertNodeType)("Identifier")
  111692. },
  111693. expectedNode: {
  111694. validate: (0, _utils.assertOneOf)(..._placeholders.PLACEHOLDERS)
  111695. }
  111696. }
  111697. });
  111698. (0, _utils.default)("V8IntrinsicIdentifier", {
  111699. builder: ["name"],
  111700. fields: {
  111701. name: {
  111702. validate: (0, _utils.assertValueType)("string")
  111703. }
  111704. }
  111705. });
  111706. }
  111707. });
  111708. // node_modules/@babel/helper-get-function-arity/node_modules/@babel/types/lib/definitions/experimental.js
  111709. var require_experimental5 = __commonJS({
  111710. "node_modules/@babel/helper-get-function-arity/node_modules/@babel/types/lib/definitions/experimental.js"() {
  111711. "use strict";
  111712. var _utils = require_utils5();
  111713. var _core = require_core5();
  111714. (0, _utils.default)("ArgumentPlaceholder", {});
  111715. (0, _utils.default)("BindExpression", {
  111716. visitor: ["object", "callee"],
  111717. aliases: ["Expression"],
  111718. fields: !process.env.BABEL_TYPES_8_BREAKING ? {
  111719. object: {
  111720. validate: Object.assign(() => {
  111721. }, {
  111722. oneOfNodeTypes: ["Expression"]
  111723. })
  111724. },
  111725. callee: {
  111726. validate: Object.assign(() => {
  111727. }, {
  111728. oneOfNodeTypes: ["Expression"]
  111729. })
  111730. }
  111731. } : {
  111732. object: {
  111733. validate: (0, _utils.assertNodeType)("Expression")
  111734. },
  111735. callee: {
  111736. validate: (0, _utils.assertNodeType)("Expression")
  111737. }
  111738. }
  111739. });
  111740. (0, _utils.default)("ClassProperty", {
  111741. visitor: ["key", "value", "typeAnnotation", "decorators"],
  111742. builder: ["key", "value", "typeAnnotation", "decorators", "computed", "static"],
  111743. aliases: ["Property"],
  111744. fields: Object.assign({}, _core.classMethodOrPropertyCommon, {
  111745. value: {
  111746. validate: (0, _utils.assertNodeType)("Expression"),
  111747. optional: true
  111748. },
  111749. definite: {
  111750. validate: (0, _utils.assertValueType)("boolean"),
  111751. optional: true
  111752. },
  111753. typeAnnotation: {
  111754. validate: (0, _utils.assertNodeType)("TypeAnnotation", "TSTypeAnnotation", "Noop"),
  111755. optional: true
  111756. },
  111757. decorators: {
  111758. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Decorator"))),
  111759. optional: true
  111760. },
  111761. readonly: {
  111762. validate: (0, _utils.assertValueType)("boolean"),
  111763. optional: true
  111764. },
  111765. declare: {
  111766. validate: (0, _utils.assertValueType)("boolean"),
  111767. optional: true
  111768. }
  111769. })
  111770. });
  111771. (0, _utils.default)("PipelineTopicExpression", {
  111772. builder: ["expression"],
  111773. visitor: ["expression"],
  111774. fields: {
  111775. expression: {
  111776. validate: (0, _utils.assertNodeType)("Expression")
  111777. }
  111778. }
  111779. });
  111780. (0, _utils.default)("PipelineBareFunction", {
  111781. builder: ["callee"],
  111782. visitor: ["callee"],
  111783. fields: {
  111784. callee: {
  111785. validate: (0, _utils.assertNodeType)("Expression")
  111786. }
  111787. }
  111788. });
  111789. (0, _utils.default)("PipelinePrimaryTopicReference", {
  111790. aliases: ["Expression"]
  111791. });
  111792. (0, _utils.default)("ClassPrivateProperty", {
  111793. visitor: ["key", "value", "decorators"],
  111794. builder: ["key", "value", "decorators", "static"],
  111795. aliases: ["Property", "Private"],
  111796. fields: {
  111797. key: {
  111798. validate: (0, _utils.assertNodeType)("PrivateName")
  111799. },
  111800. value: {
  111801. validate: (0, _utils.assertNodeType)("Expression"),
  111802. optional: true
  111803. },
  111804. typeAnnotation: {
  111805. validate: (0, _utils.assertNodeType)("TypeAnnotation", "TSTypeAnnotation", "Noop"),
  111806. optional: true
  111807. },
  111808. decorators: {
  111809. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Decorator"))),
  111810. optional: true
  111811. }
  111812. }
  111813. });
  111814. (0, _utils.default)("ClassPrivateMethod", {
  111815. builder: ["kind", "key", "params", "body", "static"],
  111816. visitor: ["key", "params", "body", "decorators", "returnType", "typeParameters"],
  111817. aliases: ["Function", "Scopable", "BlockParent", "FunctionParent", "Method", "Private"],
  111818. fields: Object.assign({}, _core.classMethodOrDeclareMethodCommon, _core.functionTypeAnnotationCommon, {
  111819. key: {
  111820. validate: (0, _utils.assertNodeType)("PrivateName")
  111821. },
  111822. body: {
  111823. validate: (0, _utils.assertNodeType)("BlockStatement")
  111824. }
  111825. })
  111826. });
  111827. (0, _utils.default)("ImportAttribute", {
  111828. visitor: ["key", "value"],
  111829. fields: {
  111830. key: {
  111831. validate: (0, _utils.assertNodeType)("Identifier", "StringLiteral")
  111832. },
  111833. value: {
  111834. validate: (0, _utils.assertNodeType)("StringLiteral")
  111835. }
  111836. }
  111837. });
  111838. (0, _utils.default)("Decorator", {
  111839. visitor: ["expression"],
  111840. fields: {
  111841. expression: {
  111842. validate: (0, _utils.assertNodeType)("Expression")
  111843. }
  111844. }
  111845. });
  111846. (0, _utils.default)("DoExpression", {
  111847. visitor: ["body"],
  111848. builder: ["body", "async"],
  111849. aliases: ["Expression"],
  111850. fields: {
  111851. body: {
  111852. validate: (0, _utils.assertNodeType)("BlockStatement")
  111853. },
  111854. async: {
  111855. validate: (0, _utils.assertValueType)("boolean"),
  111856. default: false
  111857. }
  111858. }
  111859. });
  111860. (0, _utils.default)("ExportDefaultSpecifier", {
  111861. visitor: ["exported"],
  111862. aliases: ["ModuleSpecifier"],
  111863. fields: {
  111864. exported: {
  111865. validate: (0, _utils.assertNodeType)("Identifier")
  111866. }
  111867. }
  111868. });
  111869. (0, _utils.default)("PrivateName", {
  111870. visitor: ["id"],
  111871. aliases: ["Private"],
  111872. fields: {
  111873. id: {
  111874. validate: (0, _utils.assertNodeType)("Identifier")
  111875. }
  111876. }
  111877. });
  111878. (0, _utils.default)("RecordExpression", {
  111879. visitor: ["properties"],
  111880. aliases: ["Expression"],
  111881. fields: {
  111882. properties: {
  111883. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("ObjectProperty", "SpreadElement")))
  111884. }
  111885. }
  111886. });
  111887. (0, _utils.default)("TupleExpression", {
  111888. fields: {
  111889. elements: {
  111890. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Expression", "SpreadElement"))),
  111891. default: []
  111892. }
  111893. },
  111894. visitor: ["elements"],
  111895. aliases: ["Expression"]
  111896. });
  111897. (0, _utils.default)("DecimalLiteral", {
  111898. builder: ["value"],
  111899. fields: {
  111900. value: {
  111901. validate: (0, _utils.assertValueType)("string")
  111902. }
  111903. },
  111904. aliases: ["Expression", "Pureish", "Literal", "Immutable"]
  111905. });
  111906. (0, _utils.default)("StaticBlock", {
  111907. visitor: ["body"],
  111908. fields: {
  111909. body: {
  111910. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Statement")))
  111911. }
  111912. },
  111913. aliases: ["Scopable", "BlockParent"]
  111914. });
  111915. (0, _utils.default)("ModuleExpression", {
  111916. visitor: ["body"],
  111917. fields: {
  111918. body: {
  111919. validate: (0, _utils.assertNodeType)("Program")
  111920. }
  111921. },
  111922. aliases: ["Expression"]
  111923. });
  111924. }
  111925. });
  111926. // node_modules/@babel/helper-get-function-arity/node_modules/@babel/types/lib/definitions/typescript.js
  111927. var require_typescript7 = __commonJS({
  111928. "node_modules/@babel/helper-get-function-arity/node_modules/@babel/types/lib/definitions/typescript.js"() {
  111929. "use strict";
  111930. var _utils = require_utils5();
  111931. var _core = require_core5();
  111932. var bool = (0, _utils.assertValueType)("boolean");
  111933. var tSFunctionTypeAnnotationCommon = {
  111934. returnType: {
  111935. validate: (0, _utils.assertNodeType)("TSTypeAnnotation", "Noop"),
  111936. optional: true
  111937. },
  111938. typeParameters: {
  111939. validate: (0, _utils.assertNodeType)("TSTypeParameterDeclaration", "Noop"),
  111940. optional: true
  111941. }
  111942. };
  111943. (0, _utils.default)("TSParameterProperty", {
  111944. aliases: ["LVal"],
  111945. visitor: ["parameter"],
  111946. fields: {
  111947. accessibility: {
  111948. validate: (0, _utils.assertOneOf)("public", "private", "protected"),
  111949. optional: true
  111950. },
  111951. readonly: {
  111952. validate: (0, _utils.assertValueType)("boolean"),
  111953. optional: true
  111954. },
  111955. parameter: {
  111956. validate: (0, _utils.assertNodeType)("Identifier", "AssignmentPattern")
  111957. }
  111958. }
  111959. });
  111960. (0, _utils.default)("TSDeclareFunction", {
  111961. aliases: ["Statement", "Declaration"],
  111962. visitor: ["id", "typeParameters", "params", "returnType"],
  111963. fields: Object.assign({}, _core.functionDeclarationCommon, tSFunctionTypeAnnotationCommon)
  111964. });
  111965. (0, _utils.default)("TSDeclareMethod", {
  111966. visitor: ["decorators", "key", "typeParameters", "params", "returnType"],
  111967. fields: Object.assign({}, _core.classMethodOrDeclareMethodCommon, tSFunctionTypeAnnotationCommon)
  111968. });
  111969. (0, _utils.default)("TSQualifiedName", {
  111970. aliases: ["TSEntityName"],
  111971. visitor: ["left", "right"],
  111972. fields: {
  111973. left: (0, _utils.validateType)("TSEntityName"),
  111974. right: (0, _utils.validateType)("Identifier")
  111975. }
  111976. });
  111977. var signatureDeclarationCommon = {
  111978. typeParameters: (0, _utils.validateOptionalType)("TSTypeParameterDeclaration"),
  111979. parameters: (0, _utils.validateArrayOfType)(["Identifier", "RestElement"]),
  111980. typeAnnotation: (0, _utils.validateOptionalType)("TSTypeAnnotation")
  111981. };
  111982. var callConstructSignatureDeclaration = {
  111983. aliases: ["TSTypeElement"],
  111984. visitor: ["typeParameters", "parameters", "typeAnnotation"],
  111985. fields: signatureDeclarationCommon
  111986. };
  111987. (0, _utils.default)("TSCallSignatureDeclaration", callConstructSignatureDeclaration);
  111988. (0, _utils.default)("TSConstructSignatureDeclaration", callConstructSignatureDeclaration);
  111989. var namedTypeElementCommon = {
  111990. key: (0, _utils.validateType)("Expression"),
  111991. computed: (0, _utils.validate)(bool),
  111992. optional: (0, _utils.validateOptional)(bool)
  111993. };
  111994. (0, _utils.default)("TSPropertySignature", {
  111995. aliases: ["TSTypeElement"],
  111996. visitor: ["key", "typeAnnotation", "initializer"],
  111997. fields: Object.assign({}, namedTypeElementCommon, {
  111998. readonly: (0, _utils.validateOptional)(bool),
  111999. typeAnnotation: (0, _utils.validateOptionalType)("TSTypeAnnotation"),
  112000. initializer: (0, _utils.validateOptionalType)("Expression")
  112001. })
  112002. });
  112003. (0, _utils.default)("TSMethodSignature", {
  112004. aliases: ["TSTypeElement"],
  112005. visitor: ["key", "typeParameters", "parameters", "typeAnnotation"],
  112006. fields: Object.assign({}, signatureDeclarationCommon, namedTypeElementCommon, {
  112007. kind: {
  112008. validate: (0, _utils.assertOneOf)("method", "get", "set")
  112009. }
  112010. })
  112011. });
  112012. (0, _utils.default)("TSIndexSignature", {
  112013. aliases: ["TSTypeElement"],
  112014. visitor: ["parameters", "typeAnnotation"],
  112015. fields: {
  112016. readonly: (0, _utils.validateOptional)(bool),
  112017. static: (0, _utils.validateOptional)(bool),
  112018. parameters: (0, _utils.validateArrayOfType)("Identifier"),
  112019. typeAnnotation: (0, _utils.validateOptionalType)("TSTypeAnnotation")
  112020. }
  112021. });
  112022. var tsKeywordTypes = ["TSAnyKeyword", "TSBooleanKeyword", "TSBigIntKeyword", "TSIntrinsicKeyword", "TSNeverKeyword", "TSNullKeyword", "TSNumberKeyword", "TSObjectKeyword", "TSStringKeyword", "TSSymbolKeyword", "TSUndefinedKeyword", "TSUnknownKeyword", "TSVoidKeyword"];
  112023. for (const type of tsKeywordTypes) {
  112024. (0, _utils.default)(type, {
  112025. aliases: ["TSType", "TSBaseType"],
  112026. visitor: [],
  112027. fields: {}
  112028. });
  112029. }
  112030. (0, _utils.default)("TSThisType", {
  112031. aliases: ["TSType", "TSBaseType"],
  112032. visitor: [],
  112033. fields: {}
  112034. });
  112035. var fnOrCtrBase = {
  112036. aliases: ["TSType"],
  112037. visitor: ["typeParameters", "parameters", "typeAnnotation"]
  112038. };
  112039. (0, _utils.default)("TSFunctionType", Object.assign({}, fnOrCtrBase, {
  112040. fields: signatureDeclarationCommon
  112041. }));
  112042. (0, _utils.default)("TSConstructorType", Object.assign({}, fnOrCtrBase, {
  112043. fields: Object.assign({}, signatureDeclarationCommon, {
  112044. abstract: (0, _utils.validateOptional)(bool)
  112045. })
  112046. }));
  112047. (0, _utils.default)("TSTypeReference", {
  112048. aliases: ["TSType"],
  112049. visitor: ["typeName", "typeParameters"],
  112050. fields: {
  112051. typeName: (0, _utils.validateType)("TSEntityName"),
  112052. typeParameters: (0, _utils.validateOptionalType)("TSTypeParameterInstantiation")
  112053. }
  112054. });
  112055. (0, _utils.default)("TSTypePredicate", {
  112056. aliases: ["TSType"],
  112057. visitor: ["parameterName", "typeAnnotation"],
  112058. builder: ["parameterName", "typeAnnotation", "asserts"],
  112059. fields: {
  112060. parameterName: (0, _utils.validateType)(["Identifier", "TSThisType"]),
  112061. typeAnnotation: (0, _utils.validateOptionalType)("TSTypeAnnotation"),
  112062. asserts: (0, _utils.validateOptional)(bool)
  112063. }
  112064. });
  112065. (0, _utils.default)("TSTypeQuery", {
  112066. aliases: ["TSType"],
  112067. visitor: ["exprName"],
  112068. fields: {
  112069. exprName: (0, _utils.validateType)(["TSEntityName", "TSImportType"])
  112070. }
  112071. });
  112072. (0, _utils.default)("TSTypeLiteral", {
  112073. aliases: ["TSType"],
  112074. visitor: ["members"],
  112075. fields: {
  112076. members: (0, _utils.validateArrayOfType)("TSTypeElement")
  112077. }
  112078. });
  112079. (0, _utils.default)("TSArrayType", {
  112080. aliases: ["TSType"],
  112081. visitor: ["elementType"],
  112082. fields: {
  112083. elementType: (0, _utils.validateType)("TSType")
  112084. }
  112085. });
  112086. (0, _utils.default)("TSTupleType", {
  112087. aliases: ["TSType"],
  112088. visitor: ["elementTypes"],
  112089. fields: {
  112090. elementTypes: (0, _utils.validateArrayOfType)(["TSType", "TSNamedTupleMember"])
  112091. }
  112092. });
  112093. (0, _utils.default)("TSOptionalType", {
  112094. aliases: ["TSType"],
  112095. visitor: ["typeAnnotation"],
  112096. fields: {
  112097. typeAnnotation: (0, _utils.validateType)("TSType")
  112098. }
  112099. });
  112100. (0, _utils.default)("TSRestType", {
  112101. aliases: ["TSType"],
  112102. visitor: ["typeAnnotation"],
  112103. fields: {
  112104. typeAnnotation: (0, _utils.validateType)("TSType")
  112105. }
  112106. });
  112107. (0, _utils.default)("TSNamedTupleMember", {
  112108. visitor: ["label", "elementType"],
  112109. builder: ["label", "elementType", "optional"],
  112110. fields: {
  112111. label: (0, _utils.validateType)("Identifier"),
  112112. optional: {
  112113. validate: bool,
  112114. default: false
  112115. },
  112116. elementType: (0, _utils.validateType)("TSType")
  112117. }
  112118. });
  112119. var unionOrIntersection = {
  112120. aliases: ["TSType"],
  112121. visitor: ["types"],
  112122. fields: {
  112123. types: (0, _utils.validateArrayOfType)("TSType")
  112124. }
  112125. };
  112126. (0, _utils.default)("TSUnionType", unionOrIntersection);
  112127. (0, _utils.default)("TSIntersectionType", unionOrIntersection);
  112128. (0, _utils.default)("TSConditionalType", {
  112129. aliases: ["TSType"],
  112130. visitor: ["checkType", "extendsType", "trueType", "falseType"],
  112131. fields: {
  112132. checkType: (0, _utils.validateType)("TSType"),
  112133. extendsType: (0, _utils.validateType)("TSType"),
  112134. trueType: (0, _utils.validateType)("TSType"),
  112135. falseType: (0, _utils.validateType)("TSType")
  112136. }
  112137. });
  112138. (0, _utils.default)("TSInferType", {
  112139. aliases: ["TSType"],
  112140. visitor: ["typeParameter"],
  112141. fields: {
  112142. typeParameter: (0, _utils.validateType)("TSTypeParameter")
  112143. }
  112144. });
  112145. (0, _utils.default)("TSParenthesizedType", {
  112146. aliases: ["TSType"],
  112147. visitor: ["typeAnnotation"],
  112148. fields: {
  112149. typeAnnotation: (0, _utils.validateType)("TSType")
  112150. }
  112151. });
  112152. (0, _utils.default)("TSTypeOperator", {
  112153. aliases: ["TSType"],
  112154. visitor: ["typeAnnotation"],
  112155. fields: {
  112156. operator: (0, _utils.validate)((0, _utils.assertValueType)("string")),
  112157. typeAnnotation: (0, _utils.validateType)("TSType")
  112158. }
  112159. });
  112160. (0, _utils.default)("TSIndexedAccessType", {
  112161. aliases: ["TSType"],
  112162. visitor: ["objectType", "indexType"],
  112163. fields: {
  112164. objectType: (0, _utils.validateType)("TSType"),
  112165. indexType: (0, _utils.validateType)("TSType")
  112166. }
  112167. });
  112168. (0, _utils.default)("TSMappedType", {
  112169. aliases: ["TSType"],
  112170. visitor: ["typeParameter", "typeAnnotation", "nameType"],
  112171. fields: {
  112172. readonly: (0, _utils.validateOptional)(bool),
  112173. typeParameter: (0, _utils.validateType)("TSTypeParameter"),
  112174. optional: (0, _utils.validateOptional)(bool),
  112175. typeAnnotation: (0, _utils.validateOptionalType)("TSType"),
  112176. nameType: (0, _utils.validateOptionalType)("TSType")
  112177. }
  112178. });
  112179. (0, _utils.default)("TSLiteralType", {
  112180. aliases: ["TSType", "TSBaseType"],
  112181. visitor: ["literal"],
  112182. fields: {
  112183. literal: (0, _utils.validateType)(["NumericLiteral", "StringLiteral", "BooleanLiteral", "BigIntLiteral"])
  112184. }
  112185. });
  112186. (0, _utils.default)("TSExpressionWithTypeArguments", {
  112187. aliases: ["TSType"],
  112188. visitor: ["expression", "typeParameters"],
  112189. fields: {
  112190. expression: (0, _utils.validateType)("TSEntityName"),
  112191. typeParameters: (0, _utils.validateOptionalType)("TSTypeParameterInstantiation")
  112192. }
  112193. });
  112194. (0, _utils.default)("TSInterfaceDeclaration", {
  112195. aliases: ["Statement", "Declaration"],
  112196. visitor: ["id", "typeParameters", "extends", "body"],
  112197. fields: {
  112198. declare: (0, _utils.validateOptional)(bool),
  112199. id: (0, _utils.validateType)("Identifier"),
  112200. typeParameters: (0, _utils.validateOptionalType)("TSTypeParameterDeclaration"),
  112201. extends: (0, _utils.validateOptional)((0, _utils.arrayOfType)("TSExpressionWithTypeArguments")),
  112202. body: (0, _utils.validateType)("TSInterfaceBody")
  112203. }
  112204. });
  112205. (0, _utils.default)("TSInterfaceBody", {
  112206. visitor: ["body"],
  112207. fields: {
  112208. body: (0, _utils.validateArrayOfType)("TSTypeElement")
  112209. }
  112210. });
  112211. (0, _utils.default)("TSTypeAliasDeclaration", {
  112212. aliases: ["Statement", "Declaration"],
  112213. visitor: ["id", "typeParameters", "typeAnnotation"],
  112214. fields: {
  112215. declare: (0, _utils.validateOptional)(bool),
  112216. id: (0, _utils.validateType)("Identifier"),
  112217. typeParameters: (0, _utils.validateOptionalType)("TSTypeParameterDeclaration"),
  112218. typeAnnotation: (0, _utils.validateType)("TSType")
  112219. }
  112220. });
  112221. (0, _utils.default)("TSAsExpression", {
  112222. aliases: ["Expression"],
  112223. visitor: ["expression", "typeAnnotation"],
  112224. fields: {
  112225. expression: (0, _utils.validateType)("Expression"),
  112226. typeAnnotation: (0, _utils.validateType)("TSType")
  112227. }
  112228. });
  112229. (0, _utils.default)("TSTypeAssertion", {
  112230. aliases: ["Expression"],
  112231. visitor: ["typeAnnotation", "expression"],
  112232. fields: {
  112233. typeAnnotation: (0, _utils.validateType)("TSType"),
  112234. expression: (0, _utils.validateType)("Expression")
  112235. }
  112236. });
  112237. (0, _utils.default)("TSEnumDeclaration", {
  112238. aliases: ["Statement", "Declaration"],
  112239. visitor: ["id", "members"],
  112240. fields: {
  112241. declare: (0, _utils.validateOptional)(bool),
  112242. const: (0, _utils.validateOptional)(bool),
  112243. id: (0, _utils.validateType)("Identifier"),
  112244. members: (0, _utils.validateArrayOfType)("TSEnumMember"),
  112245. initializer: (0, _utils.validateOptionalType)("Expression")
  112246. }
  112247. });
  112248. (0, _utils.default)("TSEnumMember", {
  112249. visitor: ["id", "initializer"],
  112250. fields: {
  112251. id: (0, _utils.validateType)(["Identifier", "StringLiteral"]),
  112252. initializer: (0, _utils.validateOptionalType)("Expression")
  112253. }
  112254. });
  112255. (0, _utils.default)("TSModuleDeclaration", {
  112256. aliases: ["Statement", "Declaration"],
  112257. visitor: ["id", "body"],
  112258. fields: {
  112259. declare: (0, _utils.validateOptional)(bool),
  112260. global: (0, _utils.validateOptional)(bool),
  112261. id: (0, _utils.validateType)(["Identifier", "StringLiteral"]),
  112262. body: (0, _utils.validateType)(["TSModuleBlock", "TSModuleDeclaration"])
  112263. }
  112264. });
  112265. (0, _utils.default)("TSModuleBlock", {
  112266. aliases: ["Scopable", "Block", "BlockParent"],
  112267. visitor: ["body"],
  112268. fields: {
  112269. body: (0, _utils.validateArrayOfType)("Statement")
  112270. }
  112271. });
  112272. (0, _utils.default)("TSImportType", {
  112273. aliases: ["TSType"],
  112274. visitor: ["argument", "qualifier", "typeParameters"],
  112275. fields: {
  112276. argument: (0, _utils.validateType)("StringLiteral"),
  112277. qualifier: (0, _utils.validateOptionalType)("TSEntityName"),
  112278. typeParameters: (0, _utils.validateOptionalType)("TSTypeParameterInstantiation")
  112279. }
  112280. });
  112281. (0, _utils.default)("TSImportEqualsDeclaration", {
  112282. aliases: ["Statement"],
  112283. visitor: ["id", "moduleReference"],
  112284. fields: {
  112285. isExport: (0, _utils.validate)(bool),
  112286. id: (0, _utils.validateType)("Identifier"),
  112287. moduleReference: (0, _utils.validateType)(["TSEntityName", "TSExternalModuleReference"])
  112288. }
  112289. });
  112290. (0, _utils.default)("TSExternalModuleReference", {
  112291. visitor: ["expression"],
  112292. fields: {
  112293. expression: (0, _utils.validateType)("StringLiteral")
  112294. }
  112295. });
  112296. (0, _utils.default)("TSNonNullExpression", {
  112297. aliases: ["Expression"],
  112298. visitor: ["expression"],
  112299. fields: {
  112300. expression: (0, _utils.validateType)("Expression")
  112301. }
  112302. });
  112303. (0, _utils.default)("TSExportAssignment", {
  112304. aliases: ["Statement"],
  112305. visitor: ["expression"],
  112306. fields: {
  112307. expression: (0, _utils.validateType)("Expression")
  112308. }
  112309. });
  112310. (0, _utils.default)("TSNamespaceExportDeclaration", {
  112311. aliases: ["Statement"],
  112312. visitor: ["id"],
  112313. fields: {
  112314. id: (0, _utils.validateType)("Identifier")
  112315. }
  112316. });
  112317. (0, _utils.default)("TSTypeAnnotation", {
  112318. visitor: ["typeAnnotation"],
  112319. fields: {
  112320. typeAnnotation: {
  112321. validate: (0, _utils.assertNodeType)("TSType")
  112322. }
  112323. }
  112324. });
  112325. (0, _utils.default)("TSTypeParameterInstantiation", {
  112326. visitor: ["params"],
  112327. fields: {
  112328. params: {
  112329. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("TSType")))
  112330. }
  112331. }
  112332. });
  112333. (0, _utils.default)("TSTypeParameterDeclaration", {
  112334. visitor: ["params"],
  112335. fields: {
  112336. params: {
  112337. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("TSTypeParameter")))
  112338. }
  112339. }
  112340. });
  112341. (0, _utils.default)("TSTypeParameter", {
  112342. builder: ["constraint", "default", "name"],
  112343. visitor: ["constraint", "default"],
  112344. fields: {
  112345. name: {
  112346. validate: (0, _utils.assertValueType)("string")
  112347. },
  112348. constraint: {
  112349. validate: (0, _utils.assertNodeType)("TSType"),
  112350. optional: true
  112351. },
  112352. default: {
  112353. validate: (0, _utils.assertNodeType)("TSType"),
  112354. optional: true
  112355. }
  112356. }
  112357. });
  112358. }
  112359. });
  112360. // node_modules/@babel/helper-get-function-arity/node_modules/@babel/types/lib/definitions/index.js
  112361. var require_definitions5 = __commonJS({
  112362. "node_modules/@babel/helper-get-function-arity/node_modules/@babel/types/lib/definitions/index.js"(exports) {
  112363. "use strict";
  112364. Object.defineProperty(exports, "__esModule", {
  112365. value: true
  112366. });
  112367. Object.defineProperty(exports, "VISITOR_KEYS", {
  112368. enumerable: true,
  112369. get: function() {
  112370. return _utils.VISITOR_KEYS;
  112371. }
  112372. });
  112373. Object.defineProperty(exports, "ALIAS_KEYS", {
  112374. enumerable: true,
  112375. get: function() {
  112376. return _utils.ALIAS_KEYS;
  112377. }
  112378. });
  112379. Object.defineProperty(exports, "FLIPPED_ALIAS_KEYS", {
  112380. enumerable: true,
  112381. get: function() {
  112382. return _utils.FLIPPED_ALIAS_KEYS;
  112383. }
  112384. });
  112385. Object.defineProperty(exports, "NODE_FIELDS", {
  112386. enumerable: true,
  112387. get: function() {
  112388. return _utils.NODE_FIELDS;
  112389. }
  112390. });
  112391. Object.defineProperty(exports, "BUILDER_KEYS", {
  112392. enumerable: true,
  112393. get: function() {
  112394. return _utils.BUILDER_KEYS;
  112395. }
  112396. });
  112397. Object.defineProperty(exports, "DEPRECATED_KEYS", {
  112398. enumerable: true,
  112399. get: function() {
  112400. return _utils.DEPRECATED_KEYS;
  112401. }
  112402. });
  112403. Object.defineProperty(exports, "NODE_PARENT_VALIDATIONS", {
  112404. enumerable: true,
  112405. get: function() {
  112406. return _utils.NODE_PARENT_VALIDATIONS;
  112407. }
  112408. });
  112409. Object.defineProperty(exports, "PLACEHOLDERS", {
  112410. enumerable: true,
  112411. get: function() {
  112412. return _placeholders.PLACEHOLDERS;
  112413. }
  112414. });
  112415. Object.defineProperty(exports, "PLACEHOLDERS_ALIAS", {
  112416. enumerable: true,
  112417. get: function() {
  112418. return _placeholders.PLACEHOLDERS_ALIAS;
  112419. }
  112420. });
  112421. Object.defineProperty(exports, "PLACEHOLDERS_FLIPPED_ALIAS", {
  112422. enumerable: true,
  112423. get: function() {
  112424. return _placeholders.PLACEHOLDERS_FLIPPED_ALIAS;
  112425. }
  112426. });
  112427. exports.TYPES = void 0;
  112428. var _toFastProperties = require_to_fast_properties();
  112429. require_core5();
  112430. require_flow7();
  112431. require_jsx7();
  112432. require_misc5();
  112433. require_experimental5();
  112434. require_typescript7();
  112435. var _utils = require_utils5();
  112436. var _placeholders = require_placeholders5();
  112437. _toFastProperties(_utils.VISITOR_KEYS);
  112438. _toFastProperties(_utils.ALIAS_KEYS);
  112439. _toFastProperties(_utils.FLIPPED_ALIAS_KEYS);
  112440. _toFastProperties(_utils.NODE_FIELDS);
  112441. _toFastProperties(_utils.BUILDER_KEYS);
  112442. _toFastProperties(_utils.DEPRECATED_KEYS);
  112443. _toFastProperties(_placeholders.PLACEHOLDERS_ALIAS);
  112444. _toFastProperties(_placeholders.PLACEHOLDERS_FLIPPED_ALIAS);
  112445. var TYPES = Object.keys(_utils.VISITOR_KEYS).concat(Object.keys(_utils.FLIPPED_ALIAS_KEYS)).concat(Object.keys(_utils.DEPRECATED_KEYS));
  112446. exports.TYPES = TYPES;
  112447. }
  112448. });
  112449. // node_modules/@babel/helper-get-function-arity/node_modules/@babel/types/lib/builders/builder.js
  112450. var require_builder6 = __commonJS({
  112451. "node_modules/@babel/helper-get-function-arity/node_modules/@babel/types/lib/builders/builder.js"(exports) {
  112452. "use strict";
  112453. Object.defineProperty(exports, "__esModule", {
  112454. value: true
  112455. });
  112456. exports.default = builder;
  112457. var _definitions = require_definitions5();
  112458. var _validate = require_validate5();
  112459. function builder(type, ...args) {
  112460. const keys2 = _definitions.BUILDER_KEYS[type];
  112461. const countArgs = args.length;
  112462. if (countArgs > keys2.length) {
  112463. throw new Error(`${type}: Too many arguments passed. Received ${countArgs} but can receive no more than ${keys2.length}`);
  112464. }
  112465. const node = {
  112466. type
  112467. };
  112468. let i = 0;
  112469. keys2.forEach((key) => {
  112470. const field = _definitions.NODE_FIELDS[type][key];
  112471. let arg;
  112472. if (i < countArgs)
  112473. arg = args[i];
  112474. if (arg === void 0) {
  112475. arg = Array.isArray(field.default) ? [] : field.default;
  112476. }
  112477. node[key] = arg;
  112478. i++;
  112479. });
  112480. for (const key of Object.keys(node)) {
  112481. (0, _validate.default)(node, key, node[key]);
  112482. }
  112483. return node;
  112484. }
  112485. }
  112486. });
  112487. // node_modules/@babel/helper-get-function-arity/node_modules/@babel/types/lib/builders/generated/index.js
  112488. var require_generated22 = __commonJS({
  112489. "node_modules/@babel/helper-get-function-arity/node_modules/@babel/types/lib/builders/generated/index.js"(exports) {
  112490. "use strict";
  112491. Object.defineProperty(exports, "__esModule", {
  112492. value: true
  112493. });
  112494. exports.arrayExpression = arrayExpression;
  112495. exports.assignmentExpression = assignmentExpression;
  112496. exports.binaryExpression = binaryExpression;
  112497. exports.interpreterDirective = interpreterDirective;
  112498. exports.directive = directive;
  112499. exports.directiveLiteral = directiveLiteral;
  112500. exports.blockStatement = blockStatement;
  112501. exports.breakStatement = breakStatement;
  112502. exports.callExpression = callExpression;
  112503. exports.catchClause = catchClause;
  112504. exports.conditionalExpression = conditionalExpression;
  112505. exports.continueStatement = continueStatement;
  112506. exports.debuggerStatement = debuggerStatement;
  112507. exports.doWhileStatement = doWhileStatement;
  112508. exports.emptyStatement = emptyStatement;
  112509. exports.expressionStatement = expressionStatement;
  112510. exports.file = file;
  112511. exports.forInStatement = forInStatement;
  112512. exports.forStatement = forStatement;
  112513. exports.functionDeclaration = functionDeclaration;
  112514. exports.functionExpression = functionExpression;
  112515. exports.identifier = identifier;
  112516. exports.ifStatement = ifStatement;
  112517. exports.labeledStatement = labeledStatement;
  112518. exports.stringLiteral = stringLiteral;
  112519. exports.numericLiteral = numericLiteral;
  112520. exports.nullLiteral = nullLiteral;
  112521. exports.booleanLiteral = booleanLiteral;
  112522. exports.regExpLiteral = regExpLiteral;
  112523. exports.logicalExpression = logicalExpression;
  112524. exports.memberExpression = memberExpression;
  112525. exports.newExpression = newExpression;
  112526. exports.program = program;
  112527. exports.objectExpression = objectExpression;
  112528. exports.objectMethod = objectMethod;
  112529. exports.objectProperty = objectProperty;
  112530. exports.restElement = restElement;
  112531. exports.returnStatement = returnStatement;
  112532. exports.sequenceExpression = sequenceExpression;
  112533. exports.parenthesizedExpression = parenthesizedExpression;
  112534. exports.switchCase = switchCase;
  112535. exports.switchStatement = switchStatement;
  112536. exports.thisExpression = thisExpression;
  112537. exports.throwStatement = throwStatement;
  112538. exports.tryStatement = tryStatement;
  112539. exports.unaryExpression = unaryExpression;
  112540. exports.updateExpression = updateExpression;
  112541. exports.variableDeclaration = variableDeclaration;
  112542. exports.variableDeclarator = variableDeclarator;
  112543. exports.whileStatement = whileStatement;
  112544. exports.withStatement = withStatement;
  112545. exports.assignmentPattern = assignmentPattern;
  112546. exports.arrayPattern = arrayPattern;
  112547. exports.arrowFunctionExpression = arrowFunctionExpression;
  112548. exports.classBody = classBody;
  112549. exports.classExpression = classExpression;
  112550. exports.classDeclaration = classDeclaration;
  112551. exports.exportAllDeclaration = exportAllDeclaration;
  112552. exports.exportDefaultDeclaration = exportDefaultDeclaration;
  112553. exports.exportNamedDeclaration = exportNamedDeclaration;
  112554. exports.exportSpecifier = exportSpecifier;
  112555. exports.forOfStatement = forOfStatement;
  112556. exports.importDeclaration = importDeclaration;
  112557. exports.importDefaultSpecifier = importDefaultSpecifier;
  112558. exports.importNamespaceSpecifier = importNamespaceSpecifier;
  112559. exports.importSpecifier = importSpecifier;
  112560. exports.metaProperty = metaProperty;
  112561. exports.classMethod = classMethod;
  112562. exports.objectPattern = objectPattern;
  112563. exports.spreadElement = spreadElement;
  112564. exports.super = _super;
  112565. exports.taggedTemplateExpression = taggedTemplateExpression;
  112566. exports.templateElement = templateElement;
  112567. exports.templateLiteral = templateLiteral;
  112568. exports.yieldExpression = yieldExpression;
  112569. exports.awaitExpression = awaitExpression;
  112570. exports.import = _import;
  112571. exports.bigIntLiteral = bigIntLiteral;
  112572. exports.exportNamespaceSpecifier = exportNamespaceSpecifier;
  112573. exports.optionalMemberExpression = optionalMemberExpression;
  112574. exports.optionalCallExpression = optionalCallExpression;
  112575. exports.anyTypeAnnotation = anyTypeAnnotation;
  112576. exports.arrayTypeAnnotation = arrayTypeAnnotation;
  112577. exports.booleanTypeAnnotation = booleanTypeAnnotation;
  112578. exports.booleanLiteralTypeAnnotation = booleanLiteralTypeAnnotation;
  112579. exports.nullLiteralTypeAnnotation = nullLiteralTypeAnnotation;
  112580. exports.classImplements = classImplements;
  112581. exports.declareClass = declareClass;
  112582. exports.declareFunction = declareFunction;
  112583. exports.declareInterface = declareInterface;
  112584. exports.declareModule = declareModule;
  112585. exports.declareModuleExports = declareModuleExports;
  112586. exports.declareTypeAlias = declareTypeAlias;
  112587. exports.declareOpaqueType = declareOpaqueType;
  112588. exports.declareVariable = declareVariable;
  112589. exports.declareExportDeclaration = declareExportDeclaration;
  112590. exports.declareExportAllDeclaration = declareExportAllDeclaration;
  112591. exports.declaredPredicate = declaredPredicate;
  112592. exports.existsTypeAnnotation = existsTypeAnnotation;
  112593. exports.functionTypeAnnotation = functionTypeAnnotation;
  112594. exports.functionTypeParam = functionTypeParam;
  112595. exports.genericTypeAnnotation = genericTypeAnnotation;
  112596. exports.inferredPredicate = inferredPredicate;
  112597. exports.interfaceExtends = interfaceExtends;
  112598. exports.interfaceDeclaration = interfaceDeclaration;
  112599. exports.interfaceTypeAnnotation = interfaceTypeAnnotation;
  112600. exports.intersectionTypeAnnotation = intersectionTypeAnnotation;
  112601. exports.mixedTypeAnnotation = mixedTypeAnnotation;
  112602. exports.emptyTypeAnnotation = emptyTypeAnnotation;
  112603. exports.nullableTypeAnnotation = nullableTypeAnnotation;
  112604. exports.numberLiteralTypeAnnotation = numberLiteralTypeAnnotation;
  112605. exports.numberTypeAnnotation = numberTypeAnnotation;
  112606. exports.objectTypeAnnotation = objectTypeAnnotation;
  112607. exports.objectTypeInternalSlot = objectTypeInternalSlot;
  112608. exports.objectTypeCallProperty = objectTypeCallProperty;
  112609. exports.objectTypeIndexer = objectTypeIndexer;
  112610. exports.objectTypeProperty = objectTypeProperty;
  112611. exports.objectTypeSpreadProperty = objectTypeSpreadProperty;
  112612. exports.opaqueType = opaqueType;
  112613. exports.qualifiedTypeIdentifier = qualifiedTypeIdentifier;
  112614. exports.stringLiteralTypeAnnotation = stringLiteralTypeAnnotation;
  112615. exports.stringTypeAnnotation = stringTypeAnnotation;
  112616. exports.symbolTypeAnnotation = symbolTypeAnnotation;
  112617. exports.thisTypeAnnotation = thisTypeAnnotation;
  112618. exports.tupleTypeAnnotation = tupleTypeAnnotation;
  112619. exports.typeofTypeAnnotation = typeofTypeAnnotation;
  112620. exports.typeAlias = typeAlias;
  112621. exports.typeAnnotation = typeAnnotation;
  112622. exports.typeCastExpression = typeCastExpression;
  112623. exports.typeParameter = typeParameter;
  112624. exports.typeParameterDeclaration = typeParameterDeclaration;
  112625. exports.typeParameterInstantiation = typeParameterInstantiation;
  112626. exports.unionTypeAnnotation = unionTypeAnnotation;
  112627. exports.variance = variance;
  112628. exports.voidTypeAnnotation = voidTypeAnnotation;
  112629. exports.enumDeclaration = enumDeclaration;
  112630. exports.enumBooleanBody = enumBooleanBody;
  112631. exports.enumNumberBody = enumNumberBody;
  112632. exports.enumStringBody = enumStringBody;
  112633. exports.enumSymbolBody = enumSymbolBody;
  112634. exports.enumBooleanMember = enumBooleanMember;
  112635. exports.enumNumberMember = enumNumberMember;
  112636. exports.enumStringMember = enumStringMember;
  112637. exports.enumDefaultedMember = enumDefaultedMember;
  112638. exports.indexedAccessType = indexedAccessType;
  112639. exports.optionalIndexedAccessType = optionalIndexedAccessType;
  112640. exports.jSXAttribute = exports.jsxAttribute = jsxAttribute;
  112641. exports.jSXClosingElement = exports.jsxClosingElement = jsxClosingElement;
  112642. exports.jSXElement = exports.jsxElement = jsxElement;
  112643. exports.jSXEmptyExpression = exports.jsxEmptyExpression = jsxEmptyExpression;
  112644. exports.jSXExpressionContainer = exports.jsxExpressionContainer = jsxExpressionContainer;
  112645. exports.jSXSpreadChild = exports.jsxSpreadChild = jsxSpreadChild;
  112646. exports.jSXIdentifier = exports.jsxIdentifier = jsxIdentifier;
  112647. exports.jSXMemberExpression = exports.jsxMemberExpression = jsxMemberExpression;
  112648. exports.jSXNamespacedName = exports.jsxNamespacedName = jsxNamespacedName;
  112649. exports.jSXOpeningElement = exports.jsxOpeningElement = jsxOpeningElement;
  112650. exports.jSXSpreadAttribute = exports.jsxSpreadAttribute = jsxSpreadAttribute;
  112651. exports.jSXText = exports.jsxText = jsxText2;
  112652. exports.jSXFragment = exports.jsxFragment = jsxFragment;
  112653. exports.jSXOpeningFragment = exports.jsxOpeningFragment = jsxOpeningFragment;
  112654. exports.jSXClosingFragment = exports.jsxClosingFragment = jsxClosingFragment;
  112655. exports.noop = noop;
  112656. exports.placeholder = placeholder;
  112657. exports.v8IntrinsicIdentifier = v8IntrinsicIdentifier;
  112658. exports.argumentPlaceholder = argumentPlaceholder;
  112659. exports.bindExpression = bindExpression;
  112660. exports.classProperty = classProperty;
  112661. exports.pipelineTopicExpression = pipelineTopicExpression;
  112662. exports.pipelineBareFunction = pipelineBareFunction;
  112663. exports.pipelinePrimaryTopicReference = pipelinePrimaryTopicReference;
  112664. exports.classPrivateProperty = classPrivateProperty;
  112665. exports.classPrivateMethod = classPrivateMethod;
  112666. exports.importAttribute = importAttribute;
  112667. exports.decorator = decorator;
  112668. exports.doExpression = doExpression;
  112669. exports.exportDefaultSpecifier = exportDefaultSpecifier;
  112670. exports.privateName = privateName;
  112671. exports.recordExpression = recordExpression;
  112672. exports.tupleExpression = tupleExpression;
  112673. exports.decimalLiteral = decimalLiteral;
  112674. exports.staticBlock = staticBlock;
  112675. exports.moduleExpression = moduleExpression;
  112676. exports.tSParameterProperty = exports.tsParameterProperty = tsParameterProperty;
  112677. exports.tSDeclareFunction = exports.tsDeclareFunction = tsDeclareFunction;
  112678. exports.tSDeclareMethod = exports.tsDeclareMethod = tsDeclareMethod;
  112679. exports.tSQualifiedName = exports.tsQualifiedName = tsQualifiedName;
  112680. exports.tSCallSignatureDeclaration = exports.tsCallSignatureDeclaration = tsCallSignatureDeclaration;
  112681. exports.tSConstructSignatureDeclaration = exports.tsConstructSignatureDeclaration = tsConstructSignatureDeclaration;
  112682. exports.tSPropertySignature = exports.tsPropertySignature = tsPropertySignature;
  112683. exports.tSMethodSignature = exports.tsMethodSignature = tsMethodSignature;
  112684. exports.tSIndexSignature = exports.tsIndexSignature = tsIndexSignature;
  112685. exports.tSAnyKeyword = exports.tsAnyKeyword = tsAnyKeyword;
  112686. exports.tSBooleanKeyword = exports.tsBooleanKeyword = tsBooleanKeyword;
  112687. exports.tSBigIntKeyword = exports.tsBigIntKeyword = tsBigIntKeyword;
  112688. exports.tSIntrinsicKeyword = exports.tsIntrinsicKeyword = tsIntrinsicKeyword;
  112689. exports.tSNeverKeyword = exports.tsNeverKeyword = tsNeverKeyword;
  112690. exports.tSNullKeyword = exports.tsNullKeyword = tsNullKeyword;
  112691. exports.tSNumberKeyword = exports.tsNumberKeyword = tsNumberKeyword;
  112692. exports.tSObjectKeyword = exports.tsObjectKeyword = tsObjectKeyword;
  112693. exports.tSStringKeyword = exports.tsStringKeyword = tsStringKeyword;
  112694. exports.tSSymbolKeyword = exports.tsSymbolKeyword = tsSymbolKeyword;
  112695. exports.tSUndefinedKeyword = exports.tsUndefinedKeyword = tsUndefinedKeyword;
  112696. exports.tSUnknownKeyword = exports.tsUnknownKeyword = tsUnknownKeyword;
  112697. exports.tSVoidKeyword = exports.tsVoidKeyword = tsVoidKeyword;
  112698. exports.tSThisType = exports.tsThisType = tsThisType;
  112699. exports.tSFunctionType = exports.tsFunctionType = tsFunctionType;
  112700. exports.tSConstructorType = exports.tsConstructorType = tsConstructorType;
  112701. exports.tSTypeReference = exports.tsTypeReference = tsTypeReference;
  112702. exports.tSTypePredicate = exports.tsTypePredicate = tsTypePredicate;
  112703. exports.tSTypeQuery = exports.tsTypeQuery = tsTypeQuery;
  112704. exports.tSTypeLiteral = exports.tsTypeLiteral = tsTypeLiteral;
  112705. exports.tSArrayType = exports.tsArrayType = tsArrayType;
  112706. exports.tSTupleType = exports.tsTupleType = tsTupleType;
  112707. exports.tSOptionalType = exports.tsOptionalType = tsOptionalType;
  112708. exports.tSRestType = exports.tsRestType = tsRestType;
  112709. exports.tSNamedTupleMember = exports.tsNamedTupleMember = tsNamedTupleMember;
  112710. exports.tSUnionType = exports.tsUnionType = tsUnionType;
  112711. exports.tSIntersectionType = exports.tsIntersectionType = tsIntersectionType;
  112712. exports.tSConditionalType = exports.tsConditionalType = tsConditionalType;
  112713. exports.tSInferType = exports.tsInferType = tsInferType;
  112714. exports.tSParenthesizedType = exports.tsParenthesizedType = tsParenthesizedType;
  112715. exports.tSTypeOperator = exports.tsTypeOperator = tsTypeOperator;
  112716. exports.tSIndexedAccessType = exports.tsIndexedAccessType = tsIndexedAccessType;
  112717. exports.tSMappedType = exports.tsMappedType = tsMappedType;
  112718. exports.tSLiteralType = exports.tsLiteralType = tsLiteralType;
  112719. exports.tSExpressionWithTypeArguments = exports.tsExpressionWithTypeArguments = tsExpressionWithTypeArguments;
  112720. exports.tSInterfaceDeclaration = exports.tsInterfaceDeclaration = tsInterfaceDeclaration;
  112721. exports.tSInterfaceBody = exports.tsInterfaceBody = tsInterfaceBody;
  112722. exports.tSTypeAliasDeclaration = exports.tsTypeAliasDeclaration = tsTypeAliasDeclaration;
  112723. exports.tSAsExpression = exports.tsAsExpression = tsAsExpression;
  112724. exports.tSTypeAssertion = exports.tsTypeAssertion = tsTypeAssertion;
  112725. exports.tSEnumDeclaration = exports.tsEnumDeclaration = tsEnumDeclaration;
  112726. exports.tSEnumMember = exports.tsEnumMember = tsEnumMember;
  112727. exports.tSModuleDeclaration = exports.tsModuleDeclaration = tsModuleDeclaration;
  112728. exports.tSModuleBlock = exports.tsModuleBlock = tsModuleBlock;
  112729. exports.tSImportType = exports.tsImportType = tsImportType;
  112730. exports.tSImportEqualsDeclaration = exports.tsImportEqualsDeclaration = tsImportEqualsDeclaration;
  112731. exports.tSExternalModuleReference = exports.tsExternalModuleReference = tsExternalModuleReference;
  112732. exports.tSNonNullExpression = exports.tsNonNullExpression = tsNonNullExpression;
  112733. exports.tSExportAssignment = exports.tsExportAssignment = tsExportAssignment;
  112734. exports.tSNamespaceExportDeclaration = exports.tsNamespaceExportDeclaration = tsNamespaceExportDeclaration;
  112735. exports.tSTypeAnnotation = exports.tsTypeAnnotation = tsTypeAnnotation;
  112736. exports.tSTypeParameterInstantiation = exports.tsTypeParameterInstantiation = tsTypeParameterInstantiation;
  112737. exports.tSTypeParameterDeclaration = exports.tsTypeParameterDeclaration = tsTypeParameterDeclaration;
  112738. exports.tSTypeParameter = exports.tsTypeParameter = tsTypeParameter;
  112739. exports.numberLiteral = NumberLiteral;
  112740. exports.regexLiteral = RegexLiteral;
  112741. exports.restProperty = RestProperty;
  112742. exports.spreadProperty = SpreadProperty;
  112743. var _builder = require_builder6();
  112744. function arrayExpression(elements) {
  112745. return (0, _builder.default)("ArrayExpression", ...arguments);
  112746. }
  112747. function assignmentExpression(operator, left, right) {
  112748. return (0, _builder.default)("AssignmentExpression", ...arguments);
  112749. }
  112750. function binaryExpression(operator, left, right) {
  112751. return (0, _builder.default)("BinaryExpression", ...arguments);
  112752. }
  112753. function interpreterDirective(value) {
  112754. return (0, _builder.default)("InterpreterDirective", ...arguments);
  112755. }
  112756. function directive(value) {
  112757. return (0, _builder.default)("Directive", ...arguments);
  112758. }
  112759. function directiveLiteral(value) {
  112760. return (0, _builder.default)("DirectiveLiteral", ...arguments);
  112761. }
  112762. function blockStatement(body, directives) {
  112763. return (0, _builder.default)("BlockStatement", ...arguments);
  112764. }
  112765. function breakStatement(label) {
  112766. return (0, _builder.default)("BreakStatement", ...arguments);
  112767. }
  112768. function callExpression(callee, _arguments) {
  112769. return (0, _builder.default)("CallExpression", ...arguments);
  112770. }
  112771. function catchClause(param, body) {
  112772. return (0, _builder.default)("CatchClause", ...arguments);
  112773. }
  112774. function conditionalExpression(test, consequent, alternate) {
  112775. return (0, _builder.default)("ConditionalExpression", ...arguments);
  112776. }
  112777. function continueStatement(label) {
  112778. return (0, _builder.default)("ContinueStatement", ...arguments);
  112779. }
  112780. function debuggerStatement() {
  112781. return (0, _builder.default)("DebuggerStatement", ...arguments);
  112782. }
  112783. function doWhileStatement(test, body) {
  112784. return (0, _builder.default)("DoWhileStatement", ...arguments);
  112785. }
  112786. function emptyStatement() {
  112787. return (0, _builder.default)("EmptyStatement", ...arguments);
  112788. }
  112789. function expressionStatement(expression) {
  112790. return (0, _builder.default)("ExpressionStatement", ...arguments);
  112791. }
  112792. function file(program2, comments, tokens) {
  112793. return (0, _builder.default)("File", ...arguments);
  112794. }
  112795. function forInStatement(left, right, body) {
  112796. return (0, _builder.default)("ForInStatement", ...arguments);
  112797. }
  112798. function forStatement(init, test, update, body) {
  112799. return (0, _builder.default)("ForStatement", ...arguments);
  112800. }
  112801. function functionDeclaration(id, params, body, generator, async) {
  112802. return (0, _builder.default)("FunctionDeclaration", ...arguments);
  112803. }
  112804. function functionExpression(id, params, body, generator, async) {
  112805. return (0, _builder.default)("FunctionExpression", ...arguments);
  112806. }
  112807. function identifier(name2) {
  112808. return (0, _builder.default)("Identifier", ...arguments);
  112809. }
  112810. function ifStatement(test, consequent, alternate) {
  112811. return (0, _builder.default)("IfStatement", ...arguments);
  112812. }
  112813. function labeledStatement(label, body) {
  112814. return (0, _builder.default)("LabeledStatement", ...arguments);
  112815. }
  112816. function stringLiteral(value) {
  112817. return (0, _builder.default)("StringLiteral", ...arguments);
  112818. }
  112819. function numericLiteral(value) {
  112820. return (0, _builder.default)("NumericLiteral", ...arguments);
  112821. }
  112822. function nullLiteral() {
  112823. return (0, _builder.default)("NullLiteral", ...arguments);
  112824. }
  112825. function booleanLiteral(value) {
  112826. return (0, _builder.default)("BooleanLiteral", ...arguments);
  112827. }
  112828. function regExpLiteral(pattern, flags) {
  112829. return (0, _builder.default)("RegExpLiteral", ...arguments);
  112830. }
  112831. function logicalExpression(operator, left, right) {
  112832. return (0, _builder.default)("LogicalExpression", ...arguments);
  112833. }
  112834. function memberExpression(object, property, computed, optional) {
  112835. return (0, _builder.default)("MemberExpression", ...arguments);
  112836. }
  112837. function newExpression(callee, _arguments) {
  112838. return (0, _builder.default)("NewExpression", ...arguments);
  112839. }
  112840. function program(body, directives, sourceType, interpreter) {
  112841. return (0, _builder.default)("Program", ...arguments);
  112842. }
  112843. function objectExpression(properties) {
  112844. return (0, _builder.default)("ObjectExpression", ...arguments);
  112845. }
  112846. function objectMethod(kind, key, params, body, computed, generator, async) {
  112847. return (0, _builder.default)("ObjectMethod", ...arguments);
  112848. }
  112849. function objectProperty(key, value, computed, shorthand, decorators) {
  112850. return (0, _builder.default)("ObjectProperty", ...arguments);
  112851. }
  112852. function restElement(argument) {
  112853. return (0, _builder.default)("RestElement", ...arguments);
  112854. }
  112855. function returnStatement(argument) {
  112856. return (0, _builder.default)("ReturnStatement", ...arguments);
  112857. }
  112858. function sequenceExpression(expressions) {
  112859. return (0, _builder.default)("SequenceExpression", ...arguments);
  112860. }
  112861. function parenthesizedExpression(expression) {
  112862. return (0, _builder.default)("ParenthesizedExpression", ...arguments);
  112863. }
  112864. function switchCase(test, consequent) {
  112865. return (0, _builder.default)("SwitchCase", ...arguments);
  112866. }
  112867. function switchStatement(discriminant, cases) {
  112868. return (0, _builder.default)("SwitchStatement", ...arguments);
  112869. }
  112870. function thisExpression() {
  112871. return (0, _builder.default)("ThisExpression", ...arguments);
  112872. }
  112873. function throwStatement(argument) {
  112874. return (0, _builder.default)("ThrowStatement", ...arguments);
  112875. }
  112876. function tryStatement(block, handler, finalizer) {
  112877. return (0, _builder.default)("TryStatement", ...arguments);
  112878. }
  112879. function unaryExpression(operator, argument, prefix) {
  112880. return (0, _builder.default)("UnaryExpression", ...arguments);
  112881. }
  112882. function updateExpression(operator, argument, prefix) {
  112883. return (0, _builder.default)("UpdateExpression", ...arguments);
  112884. }
  112885. function variableDeclaration(kind, declarations) {
  112886. return (0, _builder.default)("VariableDeclaration", ...arguments);
  112887. }
  112888. function variableDeclarator(id, init) {
  112889. return (0, _builder.default)("VariableDeclarator", ...arguments);
  112890. }
  112891. function whileStatement(test, body) {
  112892. return (0, _builder.default)("WhileStatement", ...arguments);
  112893. }
  112894. function withStatement(object, body) {
  112895. return (0, _builder.default)("WithStatement", ...arguments);
  112896. }
  112897. function assignmentPattern(left, right) {
  112898. return (0, _builder.default)("AssignmentPattern", ...arguments);
  112899. }
  112900. function arrayPattern(elements) {
  112901. return (0, _builder.default)("ArrayPattern", ...arguments);
  112902. }
  112903. function arrowFunctionExpression(params, body, async) {
  112904. return (0, _builder.default)("ArrowFunctionExpression", ...arguments);
  112905. }
  112906. function classBody(body) {
  112907. return (0, _builder.default)("ClassBody", ...arguments);
  112908. }
  112909. function classExpression(id, superClass, body, decorators) {
  112910. return (0, _builder.default)("ClassExpression", ...arguments);
  112911. }
  112912. function classDeclaration(id, superClass, body, decorators) {
  112913. return (0, _builder.default)("ClassDeclaration", ...arguments);
  112914. }
  112915. function exportAllDeclaration(source) {
  112916. return (0, _builder.default)("ExportAllDeclaration", ...arguments);
  112917. }
  112918. function exportDefaultDeclaration(declaration) {
  112919. return (0, _builder.default)("ExportDefaultDeclaration", ...arguments);
  112920. }
  112921. function exportNamedDeclaration(declaration, specifiers, source) {
  112922. return (0, _builder.default)("ExportNamedDeclaration", ...arguments);
  112923. }
  112924. function exportSpecifier(local, exported) {
  112925. return (0, _builder.default)("ExportSpecifier", ...arguments);
  112926. }
  112927. function forOfStatement(left, right, body, _await) {
  112928. return (0, _builder.default)("ForOfStatement", ...arguments);
  112929. }
  112930. function importDeclaration(specifiers, source) {
  112931. return (0, _builder.default)("ImportDeclaration", ...arguments);
  112932. }
  112933. function importDefaultSpecifier(local) {
  112934. return (0, _builder.default)("ImportDefaultSpecifier", ...arguments);
  112935. }
  112936. function importNamespaceSpecifier(local) {
  112937. return (0, _builder.default)("ImportNamespaceSpecifier", ...arguments);
  112938. }
  112939. function importSpecifier(local, imported) {
  112940. return (0, _builder.default)("ImportSpecifier", ...arguments);
  112941. }
  112942. function metaProperty(meta, property) {
  112943. return (0, _builder.default)("MetaProperty", ...arguments);
  112944. }
  112945. function classMethod(kind, key, params, body, computed, _static, generator, async) {
  112946. return (0, _builder.default)("ClassMethod", ...arguments);
  112947. }
  112948. function objectPattern(properties) {
  112949. return (0, _builder.default)("ObjectPattern", ...arguments);
  112950. }
  112951. function spreadElement(argument) {
  112952. return (0, _builder.default)("SpreadElement", ...arguments);
  112953. }
  112954. function _super() {
  112955. return (0, _builder.default)("Super", ...arguments);
  112956. }
  112957. function taggedTemplateExpression(tag, quasi) {
  112958. return (0, _builder.default)("TaggedTemplateExpression", ...arguments);
  112959. }
  112960. function templateElement(value, tail) {
  112961. return (0, _builder.default)("TemplateElement", ...arguments);
  112962. }
  112963. function templateLiteral(quasis, expressions) {
  112964. return (0, _builder.default)("TemplateLiteral", ...arguments);
  112965. }
  112966. function yieldExpression(argument, delegate) {
  112967. return (0, _builder.default)("YieldExpression", ...arguments);
  112968. }
  112969. function awaitExpression(argument) {
  112970. return (0, _builder.default)("AwaitExpression", ...arguments);
  112971. }
  112972. function _import() {
  112973. return (0, _builder.default)("Import", ...arguments);
  112974. }
  112975. function bigIntLiteral(value) {
  112976. return (0, _builder.default)("BigIntLiteral", ...arguments);
  112977. }
  112978. function exportNamespaceSpecifier(exported) {
  112979. return (0, _builder.default)("ExportNamespaceSpecifier", ...arguments);
  112980. }
  112981. function optionalMemberExpression(object, property, computed, optional) {
  112982. return (0, _builder.default)("OptionalMemberExpression", ...arguments);
  112983. }
  112984. function optionalCallExpression(callee, _arguments, optional) {
  112985. return (0, _builder.default)("OptionalCallExpression", ...arguments);
  112986. }
  112987. function anyTypeAnnotation() {
  112988. return (0, _builder.default)("AnyTypeAnnotation", ...arguments);
  112989. }
  112990. function arrayTypeAnnotation(elementType) {
  112991. return (0, _builder.default)("ArrayTypeAnnotation", ...arguments);
  112992. }
  112993. function booleanTypeAnnotation() {
  112994. return (0, _builder.default)("BooleanTypeAnnotation", ...arguments);
  112995. }
  112996. function booleanLiteralTypeAnnotation(value) {
  112997. return (0, _builder.default)("BooleanLiteralTypeAnnotation", ...arguments);
  112998. }
  112999. function nullLiteralTypeAnnotation() {
  113000. return (0, _builder.default)("NullLiteralTypeAnnotation", ...arguments);
  113001. }
  113002. function classImplements(id, typeParameters) {
  113003. return (0, _builder.default)("ClassImplements", ...arguments);
  113004. }
  113005. function declareClass(id, typeParameters, _extends, body) {
  113006. return (0, _builder.default)("DeclareClass", ...arguments);
  113007. }
  113008. function declareFunction(id) {
  113009. return (0, _builder.default)("DeclareFunction", ...arguments);
  113010. }
  113011. function declareInterface(id, typeParameters, _extends, body) {
  113012. return (0, _builder.default)("DeclareInterface", ...arguments);
  113013. }
  113014. function declareModule(id, body, kind) {
  113015. return (0, _builder.default)("DeclareModule", ...arguments);
  113016. }
  113017. function declareModuleExports(typeAnnotation2) {
  113018. return (0, _builder.default)("DeclareModuleExports", ...arguments);
  113019. }
  113020. function declareTypeAlias(id, typeParameters, right) {
  113021. return (0, _builder.default)("DeclareTypeAlias", ...arguments);
  113022. }
  113023. function declareOpaqueType(id, typeParameters, supertype) {
  113024. return (0, _builder.default)("DeclareOpaqueType", ...arguments);
  113025. }
  113026. function declareVariable(id) {
  113027. return (0, _builder.default)("DeclareVariable", ...arguments);
  113028. }
  113029. function declareExportDeclaration(declaration, specifiers, source) {
  113030. return (0, _builder.default)("DeclareExportDeclaration", ...arguments);
  113031. }
  113032. function declareExportAllDeclaration(source) {
  113033. return (0, _builder.default)("DeclareExportAllDeclaration", ...arguments);
  113034. }
  113035. function declaredPredicate(value) {
  113036. return (0, _builder.default)("DeclaredPredicate", ...arguments);
  113037. }
  113038. function existsTypeAnnotation() {
  113039. return (0, _builder.default)("ExistsTypeAnnotation", ...arguments);
  113040. }
  113041. function functionTypeAnnotation(typeParameters, params, rest, returnType) {
  113042. return (0, _builder.default)("FunctionTypeAnnotation", ...arguments);
  113043. }
  113044. function functionTypeParam(name2, typeAnnotation2) {
  113045. return (0, _builder.default)("FunctionTypeParam", ...arguments);
  113046. }
  113047. function genericTypeAnnotation(id, typeParameters) {
  113048. return (0, _builder.default)("GenericTypeAnnotation", ...arguments);
  113049. }
  113050. function inferredPredicate() {
  113051. return (0, _builder.default)("InferredPredicate", ...arguments);
  113052. }
  113053. function interfaceExtends(id, typeParameters) {
  113054. return (0, _builder.default)("InterfaceExtends", ...arguments);
  113055. }
  113056. function interfaceDeclaration(id, typeParameters, _extends, body) {
  113057. return (0, _builder.default)("InterfaceDeclaration", ...arguments);
  113058. }
  113059. function interfaceTypeAnnotation(_extends, body) {
  113060. return (0, _builder.default)("InterfaceTypeAnnotation", ...arguments);
  113061. }
  113062. function intersectionTypeAnnotation(types2) {
  113063. return (0, _builder.default)("IntersectionTypeAnnotation", ...arguments);
  113064. }
  113065. function mixedTypeAnnotation() {
  113066. return (0, _builder.default)("MixedTypeAnnotation", ...arguments);
  113067. }
  113068. function emptyTypeAnnotation() {
  113069. return (0, _builder.default)("EmptyTypeAnnotation", ...arguments);
  113070. }
  113071. function nullableTypeAnnotation(typeAnnotation2) {
  113072. return (0, _builder.default)("NullableTypeAnnotation", ...arguments);
  113073. }
  113074. function numberLiteralTypeAnnotation(value) {
  113075. return (0, _builder.default)("NumberLiteralTypeAnnotation", ...arguments);
  113076. }
  113077. function numberTypeAnnotation() {
  113078. return (0, _builder.default)("NumberTypeAnnotation", ...arguments);
  113079. }
  113080. function objectTypeAnnotation(properties, indexers, callProperties, internalSlots, exact) {
  113081. return (0, _builder.default)("ObjectTypeAnnotation", ...arguments);
  113082. }
  113083. function objectTypeInternalSlot(id, value, optional, _static, method) {
  113084. return (0, _builder.default)("ObjectTypeInternalSlot", ...arguments);
  113085. }
  113086. function objectTypeCallProperty(value) {
  113087. return (0, _builder.default)("ObjectTypeCallProperty", ...arguments);
  113088. }
  113089. function objectTypeIndexer(id, key, value, variance2) {
  113090. return (0, _builder.default)("ObjectTypeIndexer", ...arguments);
  113091. }
  113092. function objectTypeProperty(key, value, variance2) {
  113093. return (0, _builder.default)("ObjectTypeProperty", ...arguments);
  113094. }
  113095. function objectTypeSpreadProperty(argument) {
  113096. return (0, _builder.default)("ObjectTypeSpreadProperty", ...arguments);
  113097. }
  113098. function opaqueType(id, typeParameters, supertype, impltype) {
  113099. return (0, _builder.default)("OpaqueType", ...arguments);
  113100. }
  113101. function qualifiedTypeIdentifier(id, qualification) {
  113102. return (0, _builder.default)("QualifiedTypeIdentifier", ...arguments);
  113103. }
  113104. function stringLiteralTypeAnnotation(value) {
  113105. return (0, _builder.default)("StringLiteralTypeAnnotation", ...arguments);
  113106. }
  113107. function stringTypeAnnotation() {
  113108. return (0, _builder.default)("StringTypeAnnotation", ...arguments);
  113109. }
  113110. function symbolTypeAnnotation() {
  113111. return (0, _builder.default)("SymbolTypeAnnotation", ...arguments);
  113112. }
  113113. function thisTypeAnnotation() {
  113114. return (0, _builder.default)("ThisTypeAnnotation", ...arguments);
  113115. }
  113116. function tupleTypeAnnotation(types2) {
  113117. return (0, _builder.default)("TupleTypeAnnotation", ...arguments);
  113118. }
  113119. function typeofTypeAnnotation(argument) {
  113120. return (0, _builder.default)("TypeofTypeAnnotation", ...arguments);
  113121. }
  113122. function typeAlias(id, typeParameters, right) {
  113123. return (0, _builder.default)("TypeAlias", ...arguments);
  113124. }
  113125. function typeAnnotation(typeAnnotation2) {
  113126. return (0, _builder.default)("TypeAnnotation", ...arguments);
  113127. }
  113128. function typeCastExpression(expression, typeAnnotation2) {
  113129. return (0, _builder.default)("TypeCastExpression", ...arguments);
  113130. }
  113131. function typeParameter(bound, _default, variance2) {
  113132. return (0, _builder.default)("TypeParameter", ...arguments);
  113133. }
  113134. function typeParameterDeclaration(params) {
  113135. return (0, _builder.default)("TypeParameterDeclaration", ...arguments);
  113136. }
  113137. function typeParameterInstantiation(params) {
  113138. return (0, _builder.default)("TypeParameterInstantiation", ...arguments);
  113139. }
  113140. function unionTypeAnnotation(types2) {
  113141. return (0, _builder.default)("UnionTypeAnnotation", ...arguments);
  113142. }
  113143. function variance(kind) {
  113144. return (0, _builder.default)("Variance", ...arguments);
  113145. }
  113146. function voidTypeAnnotation() {
  113147. return (0, _builder.default)("VoidTypeAnnotation", ...arguments);
  113148. }
  113149. function enumDeclaration(id, body) {
  113150. return (0, _builder.default)("EnumDeclaration", ...arguments);
  113151. }
  113152. function enumBooleanBody(members) {
  113153. return (0, _builder.default)("EnumBooleanBody", ...arguments);
  113154. }
  113155. function enumNumberBody(members) {
  113156. return (0, _builder.default)("EnumNumberBody", ...arguments);
  113157. }
  113158. function enumStringBody(members) {
  113159. return (0, _builder.default)("EnumStringBody", ...arguments);
  113160. }
  113161. function enumSymbolBody(members) {
  113162. return (0, _builder.default)("EnumSymbolBody", ...arguments);
  113163. }
  113164. function enumBooleanMember(id) {
  113165. return (0, _builder.default)("EnumBooleanMember", ...arguments);
  113166. }
  113167. function enumNumberMember(id, init) {
  113168. return (0, _builder.default)("EnumNumberMember", ...arguments);
  113169. }
  113170. function enumStringMember(id, init) {
  113171. return (0, _builder.default)("EnumStringMember", ...arguments);
  113172. }
  113173. function enumDefaultedMember(id) {
  113174. return (0, _builder.default)("EnumDefaultedMember", ...arguments);
  113175. }
  113176. function indexedAccessType(objectType, indexType) {
  113177. return (0, _builder.default)("IndexedAccessType", ...arguments);
  113178. }
  113179. function optionalIndexedAccessType(objectType, indexType) {
  113180. return (0, _builder.default)("OptionalIndexedAccessType", ...arguments);
  113181. }
  113182. function jsxAttribute(name2, value) {
  113183. return (0, _builder.default)("JSXAttribute", ...arguments);
  113184. }
  113185. function jsxClosingElement(name2) {
  113186. return (0, _builder.default)("JSXClosingElement", ...arguments);
  113187. }
  113188. function jsxElement(openingElement, closingElement, children, selfClosing) {
  113189. return (0, _builder.default)("JSXElement", ...arguments);
  113190. }
  113191. function jsxEmptyExpression() {
  113192. return (0, _builder.default)("JSXEmptyExpression", ...arguments);
  113193. }
  113194. function jsxExpressionContainer(expression) {
  113195. return (0, _builder.default)("JSXExpressionContainer", ...arguments);
  113196. }
  113197. function jsxSpreadChild(expression) {
  113198. return (0, _builder.default)("JSXSpreadChild", ...arguments);
  113199. }
  113200. function jsxIdentifier(name2) {
  113201. return (0, _builder.default)("JSXIdentifier", ...arguments);
  113202. }
  113203. function jsxMemberExpression(object, property) {
  113204. return (0, _builder.default)("JSXMemberExpression", ...arguments);
  113205. }
  113206. function jsxNamespacedName(namespace, name2) {
  113207. return (0, _builder.default)("JSXNamespacedName", ...arguments);
  113208. }
  113209. function jsxOpeningElement(name2, attributes, selfClosing) {
  113210. return (0, _builder.default)("JSXOpeningElement", ...arguments);
  113211. }
  113212. function jsxSpreadAttribute(argument) {
  113213. return (0, _builder.default)("JSXSpreadAttribute", ...arguments);
  113214. }
  113215. function jsxText2(value) {
  113216. return (0, _builder.default)("JSXText", ...arguments);
  113217. }
  113218. function jsxFragment(openingFragment, closingFragment, children) {
  113219. return (0, _builder.default)("JSXFragment", ...arguments);
  113220. }
  113221. function jsxOpeningFragment() {
  113222. return (0, _builder.default)("JSXOpeningFragment", ...arguments);
  113223. }
  113224. function jsxClosingFragment() {
  113225. return (0, _builder.default)("JSXClosingFragment", ...arguments);
  113226. }
  113227. function noop() {
  113228. return (0, _builder.default)("Noop", ...arguments);
  113229. }
  113230. function placeholder(expectedNode, name2) {
  113231. return (0, _builder.default)("Placeholder", ...arguments);
  113232. }
  113233. function v8IntrinsicIdentifier(name2) {
  113234. return (0, _builder.default)("V8IntrinsicIdentifier", ...arguments);
  113235. }
  113236. function argumentPlaceholder() {
  113237. return (0, _builder.default)("ArgumentPlaceholder", ...arguments);
  113238. }
  113239. function bindExpression(object, callee) {
  113240. return (0, _builder.default)("BindExpression", ...arguments);
  113241. }
  113242. function classProperty(key, value, typeAnnotation2, decorators, computed, _static) {
  113243. return (0, _builder.default)("ClassProperty", ...arguments);
  113244. }
  113245. function pipelineTopicExpression(expression) {
  113246. return (0, _builder.default)("PipelineTopicExpression", ...arguments);
  113247. }
  113248. function pipelineBareFunction(callee) {
  113249. return (0, _builder.default)("PipelineBareFunction", ...arguments);
  113250. }
  113251. function pipelinePrimaryTopicReference() {
  113252. return (0, _builder.default)("PipelinePrimaryTopicReference", ...arguments);
  113253. }
  113254. function classPrivateProperty(key, value, decorators, _static) {
  113255. return (0, _builder.default)("ClassPrivateProperty", ...arguments);
  113256. }
  113257. function classPrivateMethod(kind, key, params, body, _static) {
  113258. return (0, _builder.default)("ClassPrivateMethod", ...arguments);
  113259. }
  113260. function importAttribute(key, value) {
  113261. return (0, _builder.default)("ImportAttribute", ...arguments);
  113262. }
  113263. function decorator(expression) {
  113264. return (0, _builder.default)("Decorator", ...arguments);
  113265. }
  113266. function doExpression(body, async) {
  113267. return (0, _builder.default)("DoExpression", ...arguments);
  113268. }
  113269. function exportDefaultSpecifier(exported) {
  113270. return (0, _builder.default)("ExportDefaultSpecifier", ...arguments);
  113271. }
  113272. function privateName(id) {
  113273. return (0, _builder.default)("PrivateName", ...arguments);
  113274. }
  113275. function recordExpression(properties) {
  113276. return (0, _builder.default)("RecordExpression", ...arguments);
  113277. }
  113278. function tupleExpression(elements) {
  113279. return (0, _builder.default)("TupleExpression", ...arguments);
  113280. }
  113281. function decimalLiteral(value) {
  113282. return (0, _builder.default)("DecimalLiteral", ...arguments);
  113283. }
  113284. function staticBlock(body) {
  113285. return (0, _builder.default)("StaticBlock", ...arguments);
  113286. }
  113287. function moduleExpression(body) {
  113288. return (0, _builder.default)("ModuleExpression", ...arguments);
  113289. }
  113290. function tsParameterProperty(parameter) {
  113291. return (0, _builder.default)("TSParameterProperty", ...arguments);
  113292. }
  113293. function tsDeclareFunction(id, typeParameters, params, returnType) {
  113294. return (0, _builder.default)("TSDeclareFunction", ...arguments);
  113295. }
  113296. function tsDeclareMethod(decorators, key, typeParameters, params, returnType) {
  113297. return (0, _builder.default)("TSDeclareMethod", ...arguments);
  113298. }
  113299. function tsQualifiedName(left, right) {
  113300. return (0, _builder.default)("TSQualifiedName", ...arguments);
  113301. }
  113302. function tsCallSignatureDeclaration(typeParameters, parameters, typeAnnotation2) {
  113303. return (0, _builder.default)("TSCallSignatureDeclaration", ...arguments);
  113304. }
  113305. function tsConstructSignatureDeclaration(typeParameters, parameters, typeAnnotation2) {
  113306. return (0, _builder.default)("TSConstructSignatureDeclaration", ...arguments);
  113307. }
  113308. function tsPropertySignature(key, typeAnnotation2, initializer) {
  113309. return (0, _builder.default)("TSPropertySignature", ...arguments);
  113310. }
  113311. function tsMethodSignature(key, typeParameters, parameters, typeAnnotation2) {
  113312. return (0, _builder.default)("TSMethodSignature", ...arguments);
  113313. }
  113314. function tsIndexSignature(parameters, typeAnnotation2) {
  113315. return (0, _builder.default)("TSIndexSignature", ...arguments);
  113316. }
  113317. function tsAnyKeyword() {
  113318. return (0, _builder.default)("TSAnyKeyword", ...arguments);
  113319. }
  113320. function tsBooleanKeyword() {
  113321. return (0, _builder.default)("TSBooleanKeyword", ...arguments);
  113322. }
  113323. function tsBigIntKeyword() {
  113324. return (0, _builder.default)("TSBigIntKeyword", ...arguments);
  113325. }
  113326. function tsIntrinsicKeyword() {
  113327. return (0, _builder.default)("TSIntrinsicKeyword", ...arguments);
  113328. }
  113329. function tsNeverKeyword() {
  113330. return (0, _builder.default)("TSNeverKeyword", ...arguments);
  113331. }
  113332. function tsNullKeyword() {
  113333. return (0, _builder.default)("TSNullKeyword", ...arguments);
  113334. }
  113335. function tsNumberKeyword() {
  113336. return (0, _builder.default)("TSNumberKeyword", ...arguments);
  113337. }
  113338. function tsObjectKeyword() {
  113339. return (0, _builder.default)("TSObjectKeyword", ...arguments);
  113340. }
  113341. function tsStringKeyword() {
  113342. return (0, _builder.default)("TSStringKeyword", ...arguments);
  113343. }
  113344. function tsSymbolKeyword() {
  113345. return (0, _builder.default)("TSSymbolKeyword", ...arguments);
  113346. }
  113347. function tsUndefinedKeyword() {
  113348. return (0, _builder.default)("TSUndefinedKeyword", ...arguments);
  113349. }
  113350. function tsUnknownKeyword() {
  113351. return (0, _builder.default)("TSUnknownKeyword", ...arguments);
  113352. }
  113353. function tsVoidKeyword() {
  113354. return (0, _builder.default)("TSVoidKeyword", ...arguments);
  113355. }
  113356. function tsThisType() {
  113357. return (0, _builder.default)("TSThisType", ...arguments);
  113358. }
  113359. function tsFunctionType(typeParameters, parameters, typeAnnotation2) {
  113360. return (0, _builder.default)("TSFunctionType", ...arguments);
  113361. }
  113362. function tsConstructorType(typeParameters, parameters, typeAnnotation2) {
  113363. return (0, _builder.default)("TSConstructorType", ...arguments);
  113364. }
  113365. function tsTypeReference(typeName, typeParameters) {
  113366. return (0, _builder.default)("TSTypeReference", ...arguments);
  113367. }
  113368. function tsTypePredicate(parameterName, typeAnnotation2, asserts) {
  113369. return (0, _builder.default)("TSTypePredicate", ...arguments);
  113370. }
  113371. function tsTypeQuery(exprName) {
  113372. return (0, _builder.default)("TSTypeQuery", ...arguments);
  113373. }
  113374. function tsTypeLiteral(members) {
  113375. return (0, _builder.default)("TSTypeLiteral", ...arguments);
  113376. }
  113377. function tsArrayType(elementType) {
  113378. return (0, _builder.default)("TSArrayType", ...arguments);
  113379. }
  113380. function tsTupleType(elementTypes) {
  113381. return (0, _builder.default)("TSTupleType", ...arguments);
  113382. }
  113383. function tsOptionalType(typeAnnotation2) {
  113384. return (0, _builder.default)("TSOptionalType", ...arguments);
  113385. }
  113386. function tsRestType(typeAnnotation2) {
  113387. return (0, _builder.default)("TSRestType", ...arguments);
  113388. }
  113389. function tsNamedTupleMember(label, elementType, optional) {
  113390. return (0, _builder.default)("TSNamedTupleMember", ...arguments);
  113391. }
  113392. function tsUnionType(types2) {
  113393. return (0, _builder.default)("TSUnionType", ...arguments);
  113394. }
  113395. function tsIntersectionType(types2) {
  113396. return (0, _builder.default)("TSIntersectionType", ...arguments);
  113397. }
  113398. function tsConditionalType(checkType, extendsType, trueType, falseType) {
  113399. return (0, _builder.default)("TSConditionalType", ...arguments);
  113400. }
  113401. function tsInferType(typeParameter2) {
  113402. return (0, _builder.default)("TSInferType", ...arguments);
  113403. }
  113404. function tsParenthesizedType(typeAnnotation2) {
  113405. return (0, _builder.default)("TSParenthesizedType", ...arguments);
  113406. }
  113407. function tsTypeOperator(typeAnnotation2) {
  113408. return (0, _builder.default)("TSTypeOperator", ...arguments);
  113409. }
  113410. function tsIndexedAccessType(objectType, indexType) {
  113411. return (0, _builder.default)("TSIndexedAccessType", ...arguments);
  113412. }
  113413. function tsMappedType(typeParameter2, typeAnnotation2, nameType) {
  113414. return (0, _builder.default)("TSMappedType", ...arguments);
  113415. }
  113416. function tsLiteralType(literal2) {
  113417. return (0, _builder.default)("TSLiteralType", ...arguments);
  113418. }
  113419. function tsExpressionWithTypeArguments(expression, typeParameters) {
  113420. return (0, _builder.default)("TSExpressionWithTypeArguments", ...arguments);
  113421. }
  113422. function tsInterfaceDeclaration(id, typeParameters, _extends, body) {
  113423. return (0, _builder.default)("TSInterfaceDeclaration", ...arguments);
  113424. }
  113425. function tsInterfaceBody(body) {
  113426. return (0, _builder.default)("TSInterfaceBody", ...arguments);
  113427. }
  113428. function tsTypeAliasDeclaration(id, typeParameters, typeAnnotation2) {
  113429. return (0, _builder.default)("TSTypeAliasDeclaration", ...arguments);
  113430. }
  113431. function tsAsExpression(expression, typeAnnotation2) {
  113432. return (0, _builder.default)("TSAsExpression", ...arguments);
  113433. }
  113434. function tsTypeAssertion(typeAnnotation2, expression) {
  113435. return (0, _builder.default)("TSTypeAssertion", ...arguments);
  113436. }
  113437. function tsEnumDeclaration(id, members) {
  113438. return (0, _builder.default)("TSEnumDeclaration", ...arguments);
  113439. }
  113440. function tsEnumMember(id, initializer) {
  113441. return (0, _builder.default)("TSEnumMember", ...arguments);
  113442. }
  113443. function tsModuleDeclaration(id, body) {
  113444. return (0, _builder.default)("TSModuleDeclaration", ...arguments);
  113445. }
  113446. function tsModuleBlock(body) {
  113447. return (0, _builder.default)("TSModuleBlock", ...arguments);
  113448. }
  113449. function tsImportType(argument, qualifier, typeParameters) {
  113450. return (0, _builder.default)("TSImportType", ...arguments);
  113451. }
  113452. function tsImportEqualsDeclaration(id, moduleReference) {
  113453. return (0, _builder.default)("TSImportEqualsDeclaration", ...arguments);
  113454. }
  113455. function tsExternalModuleReference(expression) {
  113456. return (0, _builder.default)("TSExternalModuleReference", ...arguments);
  113457. }
  113458. function tsNonNullExpression(expression) {
  113459. return (0, _builder.default)("TSNonNullExpression", ...arguments);
  113460. }
  113461. function tsExportAssignment(expression) {
  113462. return (0, _builder.default)("TSExportAssignment", ...arguments);
  113463. }
  113464. function tsNamespaceExportDeclaration(id) {
  113465. return (0, _builder.default)("TSNamespaceExportDeclaration", ...arguments);
  113466. }
  113467. function tsTypeAnnotation(typeAnnotation2) {
  113468. return (0, _builder.default)("TSTypeAnnotation", ...arguments);
  113469. }
  113470. function tsTypeParameterInstantiation(params) {
  113471. return (0, _builder.default)("TSTypeParameterInstantiation", ...arguments);
  113472. }
  113473. function tsTypeParameterDeclaration(params) {
  113474. return (0, _builder.default)("TSTypeParameterDeclaration", ...arguments);
  113475. }
  113476. function tsTypeParameter(constraint, _default, name2) {
  113477. return (0, _builder.default)("TSTypeParameter", ...arguments);
  113478. }
  113479. function NumberLiteral(...args) {
  113480. console.trace("The node type NumberLiteral has been renamed to NumericLiteral");
  113481. return (0, _builder.default)("NumberLiteral", ...args);
  113482. }
  113483. function RegexLiteral(...args) {
  113484. console.trace("The node type RegexLiteral has been renamed to RegExpLiteral");
  113485. return (0, _builder.default)("RegexLiteral", ...args);
  113486. }
  113487. function RestProperty(...args) {
  113488. console.trace("The node type RestProperty has been renamed to RestElement");
  113489. return (0, _builder.default)("RestProperty", ...args);
  113490. }
  113491. function SpreadProperty(...args) {
  113492. console.trace("The node type SpreadProperty has been renamed to SpreadElement");
  113493. return (0, _builder.default)("SpreadProperty", ...args);
  113494. }
  113495. }
  113496. });
  113497. // node_modules/@babel/helper-get-function-arity/node_modules/@babel/types/lib/utils/react/cleanJSXElementLiteralChild.js
  113498. var require_cleanJSXElementLiteralChild5 = __commonJS({
  113499. "node_modules/@babel/helper-get-function-arity/node_modules/@babel/types/lib/utils/react/cleanJSXElementLiteralChild.js"(exports) {
  113500. "use strict";
  113501. Object.defineProperty(exports, "__esModule", {
  113502. value: true
  113503. });
  113504. exports.default = cleanJSXElementLiteralChild;
  113505. var _generated = require_generated22();
  113506. function cleanJSXElementLiteralChild(child, args) {
  113507. const lines = child.value.split(/\r\n|\n|\r/);
  113508. let lastNonEmptyLine = 0;
  113509. for (let i = 0; i < lines.length; i++) {
  113510. if (lines[i].match(/[^ \t]/)) {
  113511. lastNonEmptyLine = i;
  113512. }
  113513. }
  113514. let str = "";
  113515. for (let i = 0; i < lines.length; i++) {
  113516. const line = lines[i];
  113517. const isFirstLine = i === 0;
  113518. const isLastLine = i === lines.length - 1;
  113519. const isLastNonEmptyLine = i === lastNonEmptyLine;
  113520. let trimmedLine = line.replace(/\t/g, " ");
  113521. if (!isFirstLine) {
  113522. trimmedLine = trimmedLine.replace(/^[ ]+/, "");
  113523. }
  113524. if (!isLastLine) {
  113525. trimmedLine = trimmedLine.replace(/[ ]+$/, "");
  113526. }
  113527. if (trimmedLine) {
  113528. if (!isLastNonEmptyLine) {
  113529. trimmedLine += " ";
  113530. }
  113531. str += trimmedLine;
  113532. }
  113533. }
  113534. if (str)
  113535. args.push((0, _generated.stringLiteral)(str));
  113536. }
  113537. }
  113538. });
  113539. // node_modules/@babel/helper-get-function-arity/node_modules/@babel/types/lib/builders/react/buildChildren.js
  113540. var require_buildChildren5 = __commonJS({
  113541. "node_modules/@babel/helper-get-function-arity/node_modules/@babel/types/lib/builders/react/buildChildren.js"(exports) {
  113542. "use strict";
  113543. Object.defineProperty(exports, "__esModule", {
  113544. value: true
  113545. });
  113546. exports.default = buildChildren;
  113547. var _generated = require_generated21();
  113548. var _cleanJSXElementLiteralChild = require_cleanJSXElementLiteralChild5();
  113549. function buildChildren(node) {
  113550. const elements = [];
  113551. for (let i = 0; i < node.children.length; i++) {
  113552. let child = node.children[i];
  113553. if ((0, _generated.isJSXText)(child)) {
  113554. (0, _cleanJSXElementLiteralChild.default)(child, elements);
  113555. continue;
  113556. }
  113557. if ((0, _generated.isJSXExpressionContainer)(child))
  113558. child = child.expression;
  113559. if ((0, _generated.isJSXEmptyExpression)(child))
  113560. continue;
  113561. elements.push(child);
  113562. }
  113563. return elements;
  113564. }
  113565. }
  113566. });
  113567. // node_modules/@babel/helper-get-function-arity/node_modules/@babel/types/lib/validators/isNode.js
  113568. var require_isNode5 = __commonJS({
  113569. "node_modules/@babel/helper-get-function-arity/node_modules/@babel/types/lib/validators/isNode.js"(exports) {
  113570. "use strict";
  113571. Object.defineProperty(exports, "__esModule", {
  113572. value: true
  113573. });
  113574. exports.default = isNode;
  113575. var _definitions = require_definitions5();
  113576. function isNode(node) {
  113577. return !!(node && _definitions.VISITOR_KEYS[node.type]);
  113578. }
  113579. }
  113580. });
  113581. // node_modules/@babel/helper-get-function-arity/node_modules/@babel/types/lib/asserts/assertNode.js
  113582. var require_assertNode5 = __commonJS({
  113583. "node_modules/@babel/helper-get-function-arity/node_modules/@babel/types/lib/asserts/assertNode.js"(exports) {
  113584. "use strict";
  113585. Object.defineProperty(exports, "__esModule", {
  113586. value: true
  113587. });
  113588. exports.default = assertNode2;
  113589. var _isNode = require_isNode5();
  113590. function assertNode2(node) {
  113591. if (!(0, _isNode.default)(node)) {
  113592. var _node$type;
  113593. const type = (_node$type = node == null ? void 0 : node.type) != null ? _node$type : JSON.stringify(node);
  113594. throw new TypeError(`Not a valid node of type "${type}"`);
  113595. }
  113596. }
  113597. }
  113598. });
  113599. // node_modules/@babel/helper-get-function-arity/node_modules/@babel/types/lib/asserts/generated/index.js
  113600. var require_generated23 = __commonJS({
  113601. "node_modules/@babel/helper-get-function-arity/node_modules/@babel/types/lib/asserts/generated/index.js"(exports) {
  113602. "use strict";
  113603. Object.defineProperty(exports, "__esModule", {
  113604. value: true
  113605. });
  113606. exports.assertArrayExpression = assertArrayExpression;
  113607. exports.assertAssignmentExpression = assertAssignmentExpression;
  113608. exports.assertBinaryExpression = assertBinaryExpression;
  113609. exports.assertInterpreterDirective = assertInterpreterDirective;
  113610. exports.assertDirective = assertDirective;
  113611. exports.assertDirectiveLiteral = assertDirectiveLiteral;
  113612. exports.assertBlockStatement = assertBlockStatement;
  113613. exports.assertBreakStatement = assertBreakStatement;
  113614. exports.assertCallExpression = assertCallExpression;
  113615. exports.assertCatchClause = assertCatchClause;
  113616. exports.assertConditionalExpression = assertConditionalExpression;
  113617. exports.assertContinueStatement = assertContinueStatement;
  113618. exports.assertDebuggerStatement = assertDebuggerStatement;
  113619. exports.assertDoWhileStatement = assertDoWhileStatement;
  113620. exports.assertEmptyStatement = assertEmptyStatement;
  113621. exports.assertExpressionStatement = assertExpressionStatement;
  113622. exports.assertFile = assertFile;
  113623. exports.assertForInStatement = assertForInStatement;
  113624. exports.assertForStatement = assertForStatement;
  113625. exports.assertFunctionDeclaration = assertFunctionDeclaration;
  113626. exports.assertFunctionExpression = assertFunctionExpression;
  113627. exports.assertIdentifier = assertIdentifier;
  113628. exports.assertIfStatement = assertIfStatement;
  113629. exports.assertLabeledStatement = assertLabeledStatement;
  113630. exports.assertStringLiteral = assertStringLiteral;
  113631. exports.assertNumericLiteral = assertNumericLiteral;
  113632. exports.assertNullLiteral = assertNullLiteral;
  113633. exports.assertBooleanLiteral = assertBooleanLiteral;
  113634. exports.assertRegExpLiteral = assertRegExpLiteral;
  113635. exports.assertLogicalExpression = assertLogicalExpression;
  113636. exports.assertMemberExpression = assertMemberExpression;
  113637. exports.assertNewExpression = assertNewExpression;
  113638. exports.assertProgram = assertProgram;
  113639. exports.assertObjectExpression = assertObjectExpression;
  113640. exports.assertObjectMethod = assertObjectMethod;
  113641. exports.assertObjectProperty = assertObjectProperty;
  113642. exports.assertRestElement = assertRestElement;
  113643. exports.assertReturnStatement = assertReturnStatement;
  113644. exports.assertSequenceExpression = assertSequenceExpression;
  113645. exports.assertParenthesizedExpression = assertParenthesizedExpression;
  113646. exports.assertSwitchCase = assertSwitchCase;
  113647. exports.assertSwitchStatement = assertSwitchStatement;
  113648. exports.assertThisExpression = assertThisExpression;
  113649. exports.assertThrowStatement = assertThrowStatement;
  113650. exports.assertTryStatement = assertTryStatement;
  113651. exports.assertUnaryExpression = assertUnaryExpression;
  113652. exports.assertUpdateExpression = assertUpdateExpression;
  113653. exports.assertVariableDeclaration = assertVariableDeclaration;
  113654. exports.assertVariableDeclarator = assertVariableDeclarator;
  113655. exports.assertWhileStatement = assertWhileStatement;
  113656. exports.assertWithStatement = assertWithStatement;
  113657. exports.assertAssignmentPattern = assertAssignmentPattern;
  113658. exports.assertArrayPattern = assertArrayPattern;
  113659. exports.assertArrowFunctionExpression = assertArrowFunctionExpression;
  113660. exports.assertClassBody = assertClassBody;
  113661. exports.assertClassExpression = assertClassExpression;
  113662. exports.assertClassDeclaration = assertClassDeclaration;
  113663. exports.assertExportAllDeclaration = assertExportAllDeclaration;
  113664. exports.assertExportDefaultDeclaration = assertExportDefaultDeclaration;
  113665. exports.assertExportNamedDeclaration = assertExportNamedDeclaration;
  113666. exports.assertExportSpecifier = assertExportSpecifier;
  113667. exports.assertForOfStatement = assertForOfStatement;
  113668. exports.assertImportDeclaration = assertImportDeclaration;
  113669. exports.assertImportDefaultSpecifier = assertImportDefaultSpecifier;
  113670. exports.assertImportNamespaceSpecifier = assertImportNamespaceSpecifier;
  113671. exports.assertImportSpecifier = assertImportSpecifier;
  113672. exports.assertMetaProperty = assertMetaProperty;
  113673. exports.assertClassMethod = assertClassMethod;
  113674. exports.assertObjectPattern = assertObjectPattern;
  113675. exports.assertSpreadElement = assertSpreadElement;
  113676. exports.assertSuper = assertSuper;
  113677. exports.assertTaggedTemplateExpression = assertTaggedTemplateExpression;
  113678. exports.assertTemplateElement = assertTemplateElement;
  113679. exports.assertTemplateLiteral = assertTemplateLiteral;
  113680. exports.assertYieldExpression = assertYieldExpression;
  113681. exports.assertAwaitExpression = assertAwaitExpression;
  113682. exports.assertImport = assertImport;
  113683. exports.assertBigIntLiteral = assertBigIntLiteral;
  113684. exports.assertExportNamespaceSpecifier = assertExportNamespaceSpecifier;
  113685. exports.assertOptionalMemberExpression = assertOptionalMemberExpression;
  113686. exports.assertOptionalCallExpression = assertOptionalCallExpression;
  113687. exports.assertAnyTypeAnnotation = assertAnyTypeAnnotation;
  113688. exports.assertArrayTypeAnnotation = assertArrayTypeAnnotation;
  113689. exports.assertBooleanTypeAnnotation = assertBooleanTypeAnnotation;
  113690. exports.assertBooleanLiteralTypeAnnotation = assertBooleanLiteralTypeAnnotation;
  113691. exports.assertNullLiteralTypeAnnotation = assertNullLiteralTypeAnnotation;
  113692. exports.assertClassImplements = assertClassImplements;
  113693. exports.assertDeclareClass = assertDeclareClass;
  113694. exports.assertDeclareFunction = assertDeclareFunction;
  113695. exports.assertDeclareInterface = assertDeclareInterface;
  113696. exports.assertDeclareModule = assertDeclareModule;
  113697. exports.assertDeclareModuleExports = assertDeclareModuleExports;
  113698. exports.assertDeclareTypeAlias = assertDeclareTypeAlias;
  113699. exports.assertDeclareOpaqueType = assertDeclareOpaqueType;
  113700. exports.assertDeclareVariable = assertDeclareVariable;
  113701. exports.assertDeclareExportDeclaration = assertDeclareExportDeclaration;
  113702. exports.assertDeclareExportAllDeclaration = assertDeclareExportAllDeclaration;
  113703. exports.assertDeclaredPredicate = assertDeclaredPredicate;
  113704. exports.assertExistsTypeAnnotation = assertExistsTypeAnnotation;
  113705. exports.assertFunctionTypeAnnotation = assertFunctionTypeAnnotation;
  113706. exports.assertFunctionTypeParam = assertFunctionTypeParam;
  113707. exports.assertGenericTypeAnnotation = assertGenericTypeAnnotation;
  113708. exports.assertInferredPredicate = assertInferredPredicate;
  113709. exports.assertInterfaceExtends = assertInterfaceExtends;
  113710. exports.assertInterfaceDeclaration = assertInterfaceDeclaration;
  113711. exports.assertInterfaceTypeAnnotation = assertInterfaceTypeAnnotation;
  113712. exports.assertIntersectionTypeAnnotation = assertIntersectionTypeAnnotation;
  113713. exports.assertMixedTypeAnnotation = assertMixedTypeAnnotation;
  113714. exports.assertEmptyTypeAnnotation = assertEmptyTypeAnnotation;
  113715. exports.assertNullableTypeAnnotation = assertNullableTypeAnnotation;
  113716. exports.assertNumberLiteralTypeAnnotation = assertNumberLiteralTypeAnnotation;
  113717. exports.assertNumberTypeAnnotation = assertNumberTypeAnnotation;
  113718. exports.assertObjectTypeAnnotation = assertObjectTypeAnnotation;
  113719. exports.assertObjectTypeInternalSlot = assertObjectTypeInternalSlot;
  113720. exports.assertObjectTypeCallProperty = assertObjectTypeCallProperty;
  113721. exports.assertObjectTypeIndexer = assertObjectTypeIndexer;
  113722. exports.assertObjectTypeProperty = assertObjectTypeProperty;
  113723. exports.assertObjectTypeSpreadProperty = assertObjectTypeSpreadProperty;
  113724. exports.assertOpaqueType = assertOpaqueType;
  113725. exports.assertQualifiedTypeIdentifier = assertQualifiedTypeIdentifier;
  113726. exports.assertStringLiteralTypeAnnotation = assertStringLiteralTypeAnnotation;
  113727. exports.assertStringTypeAnnotation = assertStringTypeAnnotation;
  113728. exports.assertSymbolTypeAnnotation = assertSymbolTypeAnnotation;
  113729. exports.assertThisTypeAnnotation = assertThisTypeAnnotation;
  113730. exports.assertTupleTypeAnnotation = assertTupleTypeAnnotation;
  113731. exports.assertTypeofTypeAnnotation = assertTypeofTypeAnnotation;
  113732. exports.assertTypeAlias = assertTypeAlias;
  113733. exports.assertTypeAnnotation = assertTypeAnnotation;
  113734. exports.assertTypeCastExpression = assertTypeCastExpression;
  113735. exports.assertTypeParameter = assertTypeParameter;
  113736. exports.assertTypeParameterDeclaration = assertTypeParameterDeclaration;
  113737. exports.assertTypeParameterInstantiation = assertTypeParameterInstantiation;
  113738. exports.assertUnionTypeAnnotation = assertUnionTypeAnnotation;
  113739. exports.assertVariance = assertVariance;
  113740. exports.assertVoidTypeAnnotation = assertVoidTypeAnnotation;
  113741. exports.assertEnumDeclaration = assertEnumDeclaration;
  113742. exports.assertEnumBooleanBody = assertEnumBooleanBody;
  113743. exports.assertEnumNumberBody = assertEnumNumberBody;
  113744. exports.assertEnumStringBody = assertEnumStringBody;
  113745. exports.assertEnumSymbolBody = assertEnumSymbolBody;
  113746. exports.assertEnumBooleanMember = assertEnumBooleanMember;
  113747. exports.assertEnumNumberMember = assertEnumNumberMember;
  113748. exports.assertEnumStringMember = assertEnumStringMember;
  113749. exports.assertEnumDefaultedMember = assertEnumDefaultedMember;
  113750. exports.assertIndexedAccessType = assertIndexedAccessType;
  113751. exports.assertOptionalIndexedAccessType = assertOptionalIndexedAccessType;
  113752. exports.assertJSXAttribute = assertJSXAttribute;
  113753. exports.assertJSXClosingElement = assertJSXClosingElement;
  113754. exports.assertJSXElement = assertJSXElement;
  113755. exports.assertJSXEmptyExpression = assertJSXEmptyExpression;
  113756. exports.assertJSXExpressionContainer = assertJSXExpressionContainer;
  113757. exports.assertJSXSpreadChild = assertJSXSpreadChild;
  113758. exports.assertJSXIdentifier = assertJSXIdentifier;
  113759. exports.assertJSXMemberExpression = assertJSXMemberExpression;
  113760. exports.assertJSXNamespacedName = assertJSXNamespacedName;
  113761. exports.assertJSXOpeningElement = assertJSXOpeningElement;
  113762. exports.assertJSXSpreadAttribute = assertJSXSpreadAttribute;
  113763. exports.assertJSXText = assertJSXText;
  113764. exports.assertJSXFragment = assertJSXFragment;
  113765. exports.assertJSXOpeningFragment = assertJSXOpeningFragment;
  113766. exports.assertJSXClosingFragment = assertJSXClosingFragment;
  113767. exports.assertNoop = assertNoop;
  113768. exports.assertPlaceholder = assertPlaceholder;
  113769. exports.assertV8IntrinsicIdentifier = assertV8IntrinsicIdentifier;
  113770. exports.assertArgumentPlaceholder = assertArgumentPlaceholder;
  113771. exports.assertBindExpression = assertBindExpression;
  113772. exports.assertClassProperty = assertClassProperty;
  113773. exports.assertPipelineTopicExpression = assertPipelineTopicExpression;
  113774. exports.assertPipelineBareFunction = assertPipelineBareFunction;
  113775. exports.assertPipelinePrimaryTopicReference = assertPipelinePrimaryTopicReference;
  113776. exports.assertClassPrivateProperty = assertClassPrivateProperty;
  113777. exports.assertClassPrivateMethod = assertClassPrivateMethod;
  113778. exports.assertImportAttribute = assertImportAttribute;
  113779. exports.assertDecorator = assertDecorator;
  113780. exports.assertDoExpression = assertDoExpression;
  113781. exports.assertExportDefaultSpecifier = assertExportDefaultSpecifier;
  113782. exports.assertPrivateName = assertPrivateName;
  113783. exports.assertRecordExpression = assertRecordExpression;
  113784. exports.assertTupleExpression = assertTupleExpression;
  113785. exports.assertDecimalLiteral = assertDecimalLiteral;
  113786. exports.assertStaticBlock = assertStaticBlock;
  113787. exports.assertModuleExpression = assertModuleExpression;
  113788. exports.assertTSParameterProperty = assertTSParameterProperty;
  113789. exports.assertTSDeclareFunction = assertTSDeclareFunction;
  113790. exports.assertTSDeclareMethod = assertTSDeclareMethod;
  113791. exports.assertTSQualifiedName = assertTSQualifiedName;
  113792. exports.assertTSCallSignatureDeclaration = assertTSCallSignatureDeclaration;
  113793. exports.assertTSConstructSignatureDeclaration = assertTSConstructSignatureDeclaration;
  113794. exports.assertTSPropertySignature = assertTSPropertySignature;
  113795. exports.assertTSMethodSignature = assertTSMethodSignature;
  113796. exports.assertTSIndexSignature = assertTSIndexSignature;
  113797. exports.assertTSAnyKeyword = assertTSAnyKeyword;
  113798. exports.assertTSBooleanKeyword = assertTSBooleanKeyword;
  113799. exports.assertTSBigIntKeyword = assertTSBigIntKeyword;
  113800. exports.assertTSIntrinsicKeyword = assertTSIntrinsicKeyword;
  113801. exports.assertTSNeverKeyword = assertTSNeverKeyword;
  113802. exports.assertTSNullKeyword = assertTSNullKeyword;
  113803. exports.assertTSNumberKeyword = assertTSNumberKeyword;
  113804. exports.assertTSObjectKeyword = assertTSObjectKeyword;
  113805. exports.assertTSStringKeyword = assertTSStringKeyword;
  113806. exports.assertTSSymbolKeyword = assertTSSymbolKeyword;
  113807. exports.assertTSUndefinedKeyword = assertTSUndefinedKeyword;
  113808. exports.assertTSUnknownKeyword = assertTSUnknownKeyword;
  113809. exports.assertTSVoidKeyword = assertTSVoidKeyword;
  113810. exports.assertTSThisType = assertTSThisType;
  113811. exports.assertTSFunctionType = assertTSFunctionType;
  113812. exports.assertTSConstructorType = assertTSConstructorType;
  113813. exports.assertTSTypeReference = assertTSTypeReference;
  113814. exports.assertTSTypePredicate = assertTSTypePredicate;
  113815. exports.assertTSTypeQuery = assertTSTypeQuery;
  113816. exports.assertTSTypeLiteral = assertTSTypeLiteral;
  113817. exports.assertTSArrayType = assertTSArrayType;
  113818. exports.assertTSTupleType = assertTSTupleType;
  113819. exports.assertTSOptionalType = assertTSOptionalType;
  113820. exports.assertTSRestType = assertTSRestType;
  113821. exports.assertTSNamedTupleMember = assertTSNamedTupleMember;
  113822. exports.assertTSUnionType = assertTSUnionType;
  113823. exports.assertTSIntersectionType = assertTSIntersectionType;
  113824. exports.assertTSConditionalType = assertTSConditionalType;
  113825. exports.assertTSInferType = assertTSInferType;
  113826. exports.assertTSParenthesizedType = assertTSParenthesizedType;
  113827. exports.assertTSTypeOperator = assertTSTypeOperator;
  113828. exports.assertTSIndexedAccessType = assertTSIndexedAccessType;
  113829. exports.assertTSMappedType = assertTSMappedType;
  113830. exports.assertTSLiteralType = assertTSLiteralType;
  113831. exports.assertTSExpressionWithTypeArguments = assertTSExpressionWithTypeArguments;
  113832. exports.assertTSInterfaceDeclaration = assertTSInterfaceDeclaration;
  113833. exports.assertTSInterfaceBody = assertTSInterfaceBody;
  113834. exports.assertTSTypeAliasDeclaration = assertTSTypeAliasDeclaration;
  113835. exports.assertTSAsExpression = assertTSAsExpression;
  113836. exports.assertTSTypeAssertion = assertTSTypeAssertion;
  113837. exports.assertTSEnumDeclaration = assertTSEnumDeclaration;
  113838. exports.assertTSEnumMember = assertTSEnumMember;
  113839. exports.assertTSModuleDeclaration = assertTSModuleDeclaration;
  113840. exports.assertTSModuleBlock = assertTSModuleBlock;
  113841. exports.assertTSImportType = assertTSImportType;
  113842. exports.assertTSImportEqualsDeclaration = assertTSImportEqualsDeclaration;
  113843. exports.assertTSExternalModuleReference = assertTSExternalModuleReference;
  113844. exports.assertTSNonNullExpression = assertTSNonNullExpression;
  113845. exports.assertTSExportAssignment = assertTSExportAssignment;
  113846. exports.assertTSNamespaceExportDeclaration = assertTSNamespaceExportDeclaration;
  113847. exports.assertTSTypeAnnotation = assertTSTypeAnnotation;
  113848. exports.assertTSTypeParameterInstantiation = assertTSTypeParameterInstantiation;
  113849. exports.assertTSTypeParameterDeclaration = assertTSTypeParameterDeclaration;
  113850. exports.assertTSTypeParameter = assertTSTypeParameter;
  113851. exports.assertExpression = assertExpression;
  113852. exports.assertBinary = assertBinary;
  113853. exports.assertScopable = assertScopable;
  113854. exports.assertBlockParent = assertBlockParent;
  113855. exports.assertBlock = assertBlock;
  113856. exports.assertStatement = assertStatement;
  113857. exports.assertTerminatorless = assertTerminatorless;
  113858. exports.assertCompletionStatement = assertCompletionStatement;
  113859. exports.assertConditional = assertConditional;
  113860. exports.assertLoop = assertLoop;
  113861. exports.assertWhile = assertWhile;
  113862. exports.assertExpressionWrapper = assertExpressionWrapper;
  113863. exports.assertFor = assertFor;
  113864. exports.assertForXStatement = assertForXStatement;
  113865. exports.assertFunction = assertFunction;
  113866. exports.assertFunctionParent = assertFunctionParent;
  113867. exports.assertPureish = assertPureish;
  113868. exports.assertDeclaration = assertDeclaration;
  113869. exports.assertPatternLike = assertPatternLike;
  113870. exports.assertLVal = assertLVal;
  113871. exports.assertTSEntityName = assertTSEntityName;
  113872. exports.assertLiteral = assertLiteral;
  113873. exports.assertImmutable = assertImmutable;
  113874. exports.assertUserWhitespacable = assertUserWhitespacable;
  113875. exports.assertMethod = assertMethod;
  113876. exports.assertObjectMember = assertObjectMember;
  113877. exports.assertProperty = assertProperty;
  113878. exports.assertUnaryLike = assertUnaryLike;
  113879. exports.assertPattern = assertPattern;
  113880. exports.assertClass = assertClass;
  113881. exports.assertModuleDeclaration = assertModuleDeclaration;
  113882. exports.assertExportDeclaration = assertExportDeclaration;
  113883. exports.assertModuleSpecifier = assertModuleSpecifier;
  113884. exports.assertFlow = assertFlow;
  113885. exports.assertFlowType = assertFlowType;
  113886. exports.assertFlowBaseAnnotation = assertFlowBaseAnnotation;
  113887. exports.assertFlowDeclaration = assertFlowDeclaration;
  113888. exports.assertFlowPredicate = assertFlowPredicate;
  113889. exports.assertEnumBody = assertEnumBody;
  113890. exports.assertEnumMember = assertEnumMember;
  113891. exports.assertJSX = assertJSX;
  113892. exports.assertPrivate = assertPrivate;
  113893. exports.assertTSTypeElement = assertTSTypeElement;
  113894. exports.assertTSType = assertTSType;
  113895. exports.assertTSBaseType = assertTSBaseType;
  113896. exports.assertNumberLiteral = assertNumberLiteral;
  113897. exports.assertRegexLiteral = assertRegexLiteral;
  113898. exports.assertRestProperty = assertRestProperty;
  113899. exports.assertSpreadProperty = assertSpreadProperty;
  113900. var _is = require_is5();
  113901. function assert(type, node, opts) {
  113902. if (!(0, _is.default)(type, node, opts)) {
  113903. throw new Error(`Expected type "${type}" with option ${JSON.stringify(opts)}, but instead got "${node.type}".`);
  113904. }
  113905. }
  113906. function assertArrayExpression(node, opts) {
  113907. assert("ArrayExpression", node, opts);
  113908. }
  113909. function assertAssignmentExpression(node, opts) {
  113910. assert("AssignmentExpression", node, opts);
  113911. }
  113912. function assertBinaryExpression(node, opts) {
  113913. assert("BinaryExpression", node, opts);
  113914. }
  113915. function assertInterpreterDirective(node, opts) {
  113916. assert("InterpreterDirective", node, opts);
  113917. }
  113918. function assertDirective(node, opts) {
  113919. assert("Directive", node, opts);
  113920. }
  113921. function assertDirectiveLiteral(node, opts) {
  113922. assert("DirectiveLiteral", node, opts);
  113923. }
  113924. function assertBlockStatement(node, opts) {
  113925. assert("BlockStatement", node, opts);
  113926. }
  113927. function assertBreakStatement(node, opts) {
  113928. assert("BreakStatement", node, opts);
  113929. }
  113930. function assertCallExpression(node, opts) {
  113931. assert("CallExpression", node, opts);
  113932. }
  113933. function assertCatchClause(node, opts) {
  113934. assert("CatchClause", node, opts);
  113935. }
  113936. function assertConditionalExpression(node, opts) {
  113937. assert("ConditionalExpression", node, opts);
  113938. }
  113939. function assertContinueStatement(node, opts) {
  113940. assert("ContinueStatement", node, opts);
  113941. }
  113942. function assertDebuggerStatement(node, opts) {
  113943. assert("DebuggerStatement", node, opts);
  113944. }
  113945. function assertDoWhileStatement(node, opts) {
  113946. assert("DoWhileStatement", node, opts);
  113947. }
  113948. function assertEmptyStatement(node, opts) {
  113949. assert("EmptyStatement", node, opts);
  113950. }
  113951. function assertExpressionStatement(node, opts) {
  113952. assert("ExpressionStatement", node, opts);
  113953. }
  113954. function assertFile(node, opts) {
  113955. assert("File", node, opts);
  113956. }
  113957. function assertForInStatement(node, opts) {
  113958. assert("ForInStatement", node, opts);
  113959. }
  113960. function assertForStatement(node, opts) {
  113961. assert("ForStatement", node, opts);
  113962. }
  113963. function assertFunctionDeclaration(node, opts) {
  113964. assert("FunctionDeclaration", node, opts);
  113965. }
  113966. function assertFunctionExpression(node, opts) {
  113967. assert("FunctionExpression", node, opts);
  113968. }
  113969. function assertIdentifier(node, opts) {
  113970. assert("Identifier", node, opts);
  113971. }
  113972. function assertIfStatement(node, opts) {
  113973. assert("IfStatement", node, opts);
  113974. }
  113975. function assertLabeledStatement(node, opts) {
  113976. assert("LabeledStatement", node, opts);
  113977. }
  113978. function assertStringLiteral(node, opts) {
  113979. assert("StringLiteral", node, opts);
  113980. }
  113981. function assertNumericLiteral(node, opts) {
  113982. assert("NumericLiteral", node, opts);
  113983. }
  113984. function assertNullLiteral(node, opts) {
  113985. assert("NullLiteral", node, opts);
  113986. }
  113987. function assertBooleanLiteral(node, opts) {
  113988. assert("BooleanLiteral", node, opts);
  113989. }
  113990. function assertRegExpLiteral(node, opts) {
  113991. assert("RegExpLiteral", node, opts);
  113992. }
  113993. function assertLogicalExpression(node, opts) {
  113994. assert("LogicalExpression", node, opts);
  113995. }
  113996. function assertMemberExpression(node, opts) {
  113997. assert("MemberExpression", node, opts);
  113998. }
  113999. function assertNewExpression(node, opts) {
  114000. assert("NewExpression", node, opts);
  114001. }
  114002. function assertProgram(node, opts) {
  114003. assert("Program", node, opts);
  114004. }
  114005. function assertObjectExpression(node, opts) {
  114006. assert("ObjectExpression", node, opts);
  114007. }
  114008. function assertObjectMethod(node, opts) {
  114009. assert("ObjectMethod", node, opts);
  114010. }
  114011. function assertObjectProperty(node, opts) {
  114012. assert("ObjectProperty", node, opts);
  114013. }
  114014. function assertRestElement(node, opts) {
  114015. assert("RestElement", node, opts);
  114016. }
  114017. function assertReturnStatement(node, opts) {
  114018. assert("ReturnStatement", node, opts);
  114019. }
  114020. function assertSequenceExpression(node, opts) {
  114021. assert("SequenceExpression", node, opts);
  114022. }
  114023. function assertParenthesizedExpression(node, opts) {
  114024. assert("ParenthesizedExpression", node, opts);
  114025. }
  114026. function assertSwitchCase(node, opts) {
  114027. assert("SwitchCase", node, opts);
  114028. }
  114029. function assertSwitchStatement(node, opts) {
  114030. assert("SwitchStatement", node, opts);
  114031. }
  114032. function assertThisExpression(node, opts) {
  114033. assert("ThisExpression", node, opts);
  114034. }
  114035. function assertThrowStatement(node, opts) {
  114036. assert("ThrowStatement", node, opts);
  114037. }
  114038. function assertTryStatement(node, opts) {
  114039. assert("TryStatement", node, opts);
  114040. }
  114041. function assertUnaryExpression(node, opts) {
  114042. assert("UnaryExpression", node, opts);
  114043. }
  114044. function assertUpdateExpression(node, opts) {
  114045. assert("UpdateExpression", node, opts);
  114046. }
  114047. function assertVariableDeclaration(node, opts) {
  114048. assert("VariableDeclaration", node, opts);
  114049. }
  114050. function assertVariableDeclarator(node, opts) {
  114051. assert("VariableDeclarator", node, opts);
  114052. }
  114053. function assertWhileStatement(node, opts) {
  114054. assert("WhileStatement", node, opts);
  114055. }
  114056. function assertWithStatement(node, opts) {
  114057. assert("WithStatement", node, opts);
  114058. }
  114059. function assertAssignmentPattern(node, opts) {
  114060. assert("AssignmentPattern", node, opts);
  114061. }
  114062. function assertArrayPattern(node, opts) {
  114063. assert("ArrayPattern", node, opts);
  114064. }
  114065. function assertArrowFunctionExpression(node, opts) {
  114066. assert("ArrowFunctionExpression", node, opts);
  114067. }
  114068. function assertClassBody(node, opts) {
  114069. assert("ClassBody", node, opts);
  114070. }
  114071. function assertClassExpression(node, opts) {
  114072. assert("ClassExpression", node, opts);
  114073. }
  114074. function assertClassDeclaration(node, opts) {
  114075. assert("ClassDeclaration", node, opts);
  114076. }
  114077. function assertExportAllDeclaration(node, opts) {
  114078. assert("ExportAllDeclaration", node, opts);
  114079. }
  114080. function assertExportDefaultDeclaration(node, opts) {
  114081. assert("ExportDefaultDeclaration", node, opts);
  114082. }
  114083. function assertExportNamedDeclaration(node, opts) {
  114084. assert("ExportNamedDeclaration", node, opts);
  114085. }
  114086. function assertExportSpecifier(node, opts) {
  114087. assert("ExportSpecifier", node, opts);
  114088. }
  114089. function assertForOfStatement(node, opts) {
  114090. assert("ForOfStatement", node, opts);
  114091. }
  114092. function assertImportDeclaration(node, opts) {
  114093. assert("ImportDeclaration", node, opts);
  114094. }
  114095. function assertImportDefaultSpecifier(node, opts) {
  114096. assert("ImportDefaultSpecifier", node, opts);
  114097. }
  114098. function assertImportNamespaceSpecifier(node, opts) {
  114099. assert("ImportNamespaceSpecifier", node, opts);
  114100. }
  114101. function assertImportSpecifier(node, opts) {
  114102. assert("ImportSpecifier", node, opts);
  114103. }
  114104. function assertMetaProperty(node, opts) {
  114105. assert("MetaProperty", node, opts);
  114106. }
  114107. function assertClassMethod(node, opts) {
  114108. assert("ClassMethod", node, opts);
  114109. }
  114110. function assertObjectPattern(node, opts) {
  114111. assert("ObjectPattern", node, opts);
  114112. }
  114113. function assertSpreadElement(node, opts) {
  114114. assert("SpreadElement", node, opts);
  114115. }
  114116. function assertSuper(node, opts) {
  114117. assert("Super", node, opts);
  114118. }
  114119. function assertTaggedTemplateExpression(node, opts) {
  114120. assert("TaggedTemplateExpression", node, opts);
  114121. }
  114122. function assertTemplateElement(node, opts) {
  114123. assert("TemplateElement", node, opts);
  114124. }
  114125. function assertTemplateLiteral(node, opts) {
  114126. assert("TemplateLiteral", node, opts);
  114127. }
  114128. function assertYieldExpression(node, opts) {
  114129. assert("YieldExpression", node, opts);
  114130. }
  114131. function assertAwaitExpression(node, opts) {
  114132. assert("AwaitExpression", node, opts);
  114133. }
  114134. function assertImport(node, opts) {
  114135. assert("Import", node, opts);
  114136. }
  114137. function assertBigIntLiteral(node, opts) {
  114138. assert("BigIntLiteral", node, opts);
  114139. }
  114140. function assertExportNamespaceSpecifier(node, opts) {
  114141. assert("ExportNamespaceSpecifier", node, opts);
  114142. }
  114143. function assertOptionalMemberExpression(node, opts) {
  114144. assert("OptionalMemberExpression", node, opts);
  114145. }
  114146. function assertOptionalCallExpression(node, opts) {
  114147. assert("OptionalCallExpression", node, opts);
  114148. }
  114149. function assertAnyTypeAnnotation(node, opts) {
  114150. assert("AnyTypeAnnotation", node, opts);
  114151. }
  114152. function assertArrayTypeAnnotation(node, opts) {
  114153. assert("ArrayTypeAnnotation", node, opts);
  114154. }
  114155. function assertBooleanTypeAnnotation(node, opts) {
  114156. assert("BooleanTypeAnnotation", node, opts);
  114157. }
  114158. function assertBooleanLiteralTypeAnnotation(node, opts) {
  114159. assert("BooleanLiteralTypeAnnotation", node, opts);
  114160. }
  114161. function assertNullLiteralTypeAnnotation(node, opts) {
  114162. assert("NullLiteralTypeAnnotation", node, opts);
  114163. }
  114164. function assertClassImplements(node, opts) {
  114165. assert("ClassImplements", node, opts);
  114166. }
  114167. function assertDeclareClass(node, opts) {
  114168. assert("DeclareClass", node, opts);
  114169. }
  114170. function assertDeclareFunction(node, opts) {
  114171. assert("DeclareFunction", node, opts);
  114172. }
  114173. function assertDeclareInterface(node, opts) {
  114174. assert("DeclareInterface", node, opts);
  114175. }
  114176. function assertDeclareModule(node, opts) {
  114177. assert("DeclareModule", node, opts);
  114178. }
  114179. function assertDeclareModuleExports(node, opts) {
  114180. assert("DeclareModuleExports", node, opts);
  114181. }
  114182. function assertDeclareTypeAlias(node, opts) {
  114183. assert("DeclareTypeAlias", node, opts);
  114184. }
  114185. function assertDeclareOpaqueType(node, opts) {
  114186. assert("DeclareOpaqueType", node, opts);
  114187. }
  114188. function assertDeclareVariable(node, opts) {
  114189. assert("DeclareVariable", node, opts);
  114190. }
  114191. function assertDeclareExportDeclaration(node, opts) {
  114192. assert("DeclareExportDeclaration", node, opts);
  114193. }
  114194. function assertDeclareExportAllDeclaration(node, opts) {
  114195. assert("DeclareExportAllDeclaration", node, opts);
  114196. }
  114197. function assertDeclaredPredicate(node, opts) {
  114198. assert("DeclaredPredicate", node, opts);
  114199. }
  114200. function assertExistsTypeAnnotation(node, opts) {
  114201. assert("ExistsTypeAnnotation", node, opts);
  114202. }
  114203. function assertFunctionTypeAnnotation(node, opts) {
  114204. assert("FunctionTypeAnnotation", node, opts);
  114205. }
  114206. function assertFunctionTypeParam(node, opts) {
  114207. assert("FunctionTypeParam", node, opts);
  114208. }
  114209. function assertGenericTypeAnnotation(node, opts) {
  114210. assert("GenericTypeAnnotation", node, opts);
  114211. }
  114212. function assertInferredPredicate(node, opts) {
  114213. assert("InferredPredicate", node, opts);
  114214. }
  114215. function assertInterfaceExtends(node, opts) {
  114216. assert("InterfaceExtends", node, opts);
  114217. }
  114218. function assertInterfaceDeclaration(node, opts) {
  114219. assert("InterfaceDeclaration", node, opts);
  114220. }
  114221. function assertInterfaceTypeAnnotation(node, opts) {
  114222. assert("InterfaceTypeAnnotation", node, opts);
  114223. }
  114224. function assertIntersectionTypeAnnotation(node, opts) {
  114225. assert("IntersectionTypeAnnotation", node, opts);
  114226. }
  114227. function assertMixedTypeAnnotation(node, opts) {
  114228. assert("MixedTypeAnnotation", node, opts);
  114229. }
  114230. function assertEmptyTypeAnnotation(node, opts) {
  114231. assert("EmptyTypeAnnotation", node, opts);
  114232. }
  114233. function assertNullableTypeAnnotation(node, opts) {
  114234. assert("NullableTypeAnnotation", node, opts);
  114235. }
  114236. function assertNumberLiteralTypeAnnotation(node, opts) {
  114237. assert("NumberLiteralTypeAnnotation", node, opts);
  114238. }
  114239. function assertNumberTypeAnnotation(node, opts) {
  114240. assert("NumberTypeAnnotation", node, opts);
  114241. }
  114242. function assertObjectTypeAnnotation(node, opts) {
  114243. assert("ObjectTypeAnnotation", node, opts);
  114244. }
  114245. function assertObjectTypeInternalSlot(node, opts) {
  114246. assert("ObjectTypeInternalSlot", node, opts);
  114247. }
  114248. function assertObjectTypeCallProperty(node, opts) {
  114249. assert("ObjectTypeCallProperty", node, opts);
  114250. }
  114251. function assertObjectTypeIndexer(node, opts) {
  114252. assert("ObjectTypeIndexer", node, opts);
  114253. }
  114254. function assertObjectTypeProperty(node, opts) {
  114255. assert("ObjectTypeProperty", node, opts);
  114256. }
  114257. function assertObjectTypeSpreadProperty(node, opts) {
  114258. assert("ObjectTypeSpreadProperty", node, opts);
  114259. }
  114260. function assertOpaqueType(node, opts) {
  114261. assert("OpaqueType", node, opts);
  114262. }
  114263. function assertQualifiedTypeIdentifier(node, opts) {
  114264. assert("QualifiedTypeIdentifier", node, opts);
  114265. }
  114266. function assertStringLiteralTypeAnnotation(node, opts) {
  114267. assert("StringLiteralTypeAnnotation", node, opts);
  114268. }
  114269. function assertStringTypeAnnotation(node, opts) {
  114270. assert("StringTypeAnnotation", node, opts);
  114271. }
  114272. function assertSymbolTypeAnnotation(node, opts) {
  114273. assert("SymbolTypeAnnotation", node, opts);
  114274. }
  114275. function assertThisTypeAnnotation(node, opts) {
  114276. assert("ThisTypeAnnotation", node, opts);
  114277. }
  114278. function assertTupleTypeAnnotation(node, opts) {
  114279. assert("TupleTypeAnnotation", node, opts);
  114280. }
  114281. function assertTypeofTypeAnnotation(node, opts) {
  114282. assert("TypeofTypeAnnotation", node, opts);
  114283. }
  114284. function assertTypeAlias(node, opts) {
  114285. assert("TypeAlias", node, opts);
  114286. }
  114287. function assertTypeAnnotation(node, opts) {
  114288. assert("TypeAnnotation", node, opts);
  114289. }
  114290. function assertTypeCastExpression(node, opts) {
  114291. assert("TypeCastExpression", node, opts);
  114292. }
  114293. function assertTypeParameter(node, opts) {
  114294. assert("TypeParameter", node, opts);
  114295. }
  114296. function assertTypeParameterDeclaration(node, opts) {
  114297. assert("TypeParameterDeclaration", node, opts);
  114298. }
  114299. function assertTypeParameterInstantiation(node, opts) {
  114300. assert("TypeParameterInstantiation", node, opts);
  114301. }
  114302. function assertUnionTypeAnnotation(node, opts) {
  114303. assert("UnionTypeAnnotation", node, opts);
  114304. }
  114305. function assertVariance(node, opts) {
  114306. assert("Variance", node, opts);
  114307. }
  114308. function assertVoidTypeAnnotation(node, opts) {
  114309. assert("VoidTypeAnnotation", node, opts);
  114310. }
  114311. function assertEnumDeclaration(node, opts) {
  114312. assert("EnumDeclaration", node, opts);
  114313. }
  114314. function assertEnumBooleanBody(node, opts) {
  114315. assert("EnumBooleanBody", node, opts);
  114316. }
  114317. function assertEnumNumberBody(node, opts) {
  114318. assert("EnumNumberBody", node, opts);
  114319. }
  114320. function assertEnumStringBody(node, opts) {
  114321. assert("EnumStringBody", node, opts);
  114322. }
  114323. function assertEnumSymbolBody(node, opts) {
  114324. assert("EnumSymbolBody", node, opts);
  114325. }
  114326. function assertEnumBooleanMember(node, opts) {
  114327. assert("EnumBooleanMember", node, opts);
  114328. }
  114329. function assertEnumNumberMember(node, opts) {
  114330. assert("EnumNumberMember", node, opts);
  114331. }
  114332. function assertEnumStringMember(node, opts) {
  114333. assert("EnumStringMember", node, opts);
  114334. }
  114335. function assertEnumDefaultedMember(node, opts) {
  114336. assert("EnumDefaultedMember", node, opts);
  114337. }
  114338. function assertIndexedAccessType(node, opts) {
  114339. assert("IndexedAccessType", node, opts);
  114340. }
  114341. function assertOptionalIndexedAccessType(node, opts) {
  114342. assert("OptionalIndexedAccessType", node, opts);
  114343. }
  114344. function assertJSXAttribute(node, opts) {
  114345. assert("JSXAttribute", node, opts);
  114346. }
  114347. function assertJSXClosingElement(node, opts) {
  114348. assert("JSXClosingElement", node, opts);
  114349. }
  114350. function assertJSXElement(node, opts) {
  114351. assert("JSXElement", node, opts);
  114352. }
  114353. function assertJSXEmptyExpression(node, opts) {
  114354. assert("JSXEmptyExpression", node, opts);
  114355. }
  114356. function assertJSXExpressionContainer(node, opts) {
  114357. assert("JSXExpressionContainer", node, opts);
  114358. }
  114359. function assertJSXSpreadChild(node, opts) {
  114360. assert("JSXSpreadChild", node, opts);
  114361. }
  114362. function assertJSXIdentifier(node, opts) {
  114363. assert("JSXIdentifier", node, opts);
  114364. }
  114365. function assertJSXMemberExpression(node, opts) {
  114366. assert("JSXMemberExpression", node, opts);
  114367. }
  114368. function assertJSXNamespacedName(node, opts) {
  114369. assert("JSXNamespacedName", node, opts);
  114370. }
  114371. function assertJSXOpeningElement(node, opts) {
  114372. assert("JSXOpeningElement", node, opts);
  114373. }
  114374. function assertJSXSpreadAttribute(node, opts) {
  114375. assert("JSXSpreadAttribute", node, opts);
  114376. }
  114377. function assertJSXText(node, opts) {
  114378. assert("JSXText", node, opts);
  114379. }
  114380. function assertJSXFragment(node, opts) {
  114381. assert("JSXFragment", node, opts);
  114382. }
  114383. function assertJSXOpeningFragment(node, opts) {
  114384. assert("JSXOpeningFragment", node, opts);
  114385. }
  114386. function assertJSXClosingFragment(node, opts) {
  114387. assert("JSXClosingFragment", node, opts);
  114388. }
  114389. function assertNoop(node, opts) {
  114390. assert("Noop", node, opts);
  114391. }
  114392. function assertPlaceholder(node, opts) {
  114393. assert("Placeholder", node, opts);
  114394. }
  114395. function assertV8IntrinsicIdentifier(node, opts) {
  114396. assert("V8IntrinsicIdentifier", node, opts);
  114397. }
  114398. function assertArgumentPlaceholder(node, opts) {
  114399. assert("ArgumentPlaceholder", node, opts);
  114400. }
  114401. function assertBindExpression(node, opts) {
  114402. assert("BindExpression", node, opts);
  114403. }
  114404. function assertClassProperty(node, opts) {
  114405. assert("ClassProperty", node, opts);
  114406. }
  114407. function assertPipelineTopicExpression(node, opts) {
  114408. assert("PipelineTopicExpression", node, opts);
  114409. }
  114410. function assertPipelineBareFunction(node, opts) {
  114411. assert("PipelineBareFunction", node, opts);
  114412. }
  114413. function assertPipelinePrimaryTopicReference(node, opts) {
  114414. assert("PipelinePrimaryTopicReference", node, opts);
  114415. }
  114416. function assertClassPrivateProperty(node, opts) {
  114417. assert("ClassPrivateProperty", node, opts);
  114418. }
  114419. function assertClassPrivateMethod(node, opts) {
  114420. assert("ClassPrivateMethod", node, opts);
  114421. }
  114422. function assertImportAttribute(node, opts) {
  114423. assert("ImportAttribute", node, opts);
  114424. }
  114425. function assertDecorator(node, opts) {
  114426. assert("Decorator", node, opts);
  114427. }
  114428. function assertDoExpression(node, opts) {
  114429. assert("DoExpression", node, opts);
  114430. }
  114431. function assertExportDefaultSpecifier(node, opts) {
  114432. assert("ExportDefaultSpecifier", node, opts);
  114433. }
  114434. function assertPrivateName(node, opts) {
  114435. assert("PrivateName", node, opts);
  114436. }
  114437. function assertRecordExpression(node, opts) {
  114438. assert("RecordExpression", node, opts);
  114439. }
  114440. function assertTupleExpression(node, opts) {
  114441. assert("TupleExpression", node, opts);
  114442. }
  114443. function assertDecimalLiteral(node, opts) {
  114444. assert("DecimalLiteral", node, opts);
  114445. }
  114446. function assertStaticBlock(node, opts) {
  114447. assert("StaticBlock", node, opts);
  114448. }
  114449. function assertModuleExpression(node, opts) {
  114450. assert("ModuleExpression", node, opts);
  114451. }
  114452. function assertTSParameterProperty(node, opts) {
  114453. assert("TSParameterProperty", node, opts);
  114454. }
  114455. function assertTSDeclareFunction(node, opts) {
  114456. assert("TSDeclareFunction", node, opts);
  114457. }
  114458. function assertTSDeclareMethod(node, opts) {
  114459. assert("TSDeclareMethod", node, opts);
  114460. }
  114461. function assertTSQualifiedName(node, opts) {
  114462. assert("TSQualifiedName", node, opts);
  114463. }
  114464. function assertTSCallSignatureDeclaration(node, opts) {
  114465. assert("TSCallSignatureDeclaration", node, opts);
  114466. }
  114467. function assertTSConstructSignatureDeclaration(node, opts) {
  114468. assert("TSConstructSignatureDeclaration", node, opts);
  114469. }
  114470. function assertTSPropertySignature(node, opts) {
  114471. assert("TSPropertySignature", node, opts);
  114472. }
  114473. function assertTSMethodSignature(node, opts) {
  114474. assert("TSMethodSignature", node, opts);
  114475. }
  114476. function assertTSIndexSignature(node, opts) {
  114477. assert("TSIndexSignature", node, opts);
  114478. }
  114479. function assertTSAnyKeyword(node, opts) {
  114480. assert("TSAnyKeyword", node, opts);
  114481. }
  114482. function assertTSBooleanKeyword(node, opts) {
  114483. assert("TSBooleanKeyword", node, opts);
  114484. }
  114485. function assertTSBigIntKeyword(node, opts) {
  114486. assert("TSBigIntKeyword", node, opts);
  114487. }
  114488. function assertTSIntrinsicKeyword(node, opts) {
  114489. assert("TSIntrinsicKeyword", node, opts);
  114490. }
  114491. function assertTSNeverKeyword(node, opts) {
  114492. assert("TSNeverKeyword", node, opts);
  114493. }
  114494. function assertTSNullKeyword(node, opts) {
  114495. assert("TSNullKeyword", node, opts);
  114496. }
  114497. function assertTSNumberKeyword(node, opts) {
  114498. assert("TSNumberKeyword", node, opts);
  114499. }
  114500. function assertTSObjectKeyword(node, opts) {
  114501. assert("TSObjectKeyword", node, opts);
  114502. }
  114503. function assertTSStringKeyword(node, opts) {
  114504. assert("TSStringKeyword", node, opts);
  114505. }
  114506. function assertTSSymbolKeyword(node, opts) {
  114507. assert("TSSymbolKeyword", node, opts);
  114508. }
  114509. function assertTSUndefinedKeyword(node, opts) {
  114510. assert("TSUndefinedKeyword", node, opts);
  114511. }
  114512. function assertTSUnknownKeyword(node, opts) {
  114513. assert("TSUnknownKeyword", node, opts);
  114514. }
  114515. function assertTSVoidKeyword(node, opts) {
  114516. assert("TSVoidKeyword", node, opts);
  114517. }
  114518. function assertTSThisType(node, opts) {
  114519. assert("TSThisType", node, opts);
  114520. }
  114521. function assertTSFunctionType(node, opts) {
  114522. assert("TSFunctionType", node, opts);
  114523. }
  114524. function assertTSConstructorType(node, opts) {
  114525. assert("TSConstructorType", node, opts);
  114526. }
  114527. function assertTSTypeReference(node, opts) {
  114528. assert("TSTypeReference", node, opts);
  114529. }
  114530. function assertTSTypePredicate(node, opts) {
  114531. assert("TSTypePredicate", node, opts);
  114532. }
  114533. function assertTSTypeQuery(node, opts) {
  114534. assert("TSTypeQuery", node, opts);
  114535. }
  114536. function assertTSTypeLiteral(node, opts) {
  114537. assert("TSTypeLiteral", node, opts);
  114538. }
  114539. function assertTSArrayType(node, opts) {
  114540. assert("TSArrayType", node, opts);
  114541. }
  114542. function assertTSTupleType(node, opts) {
  114543. assert("TSTupleType", node, opts);
  114544. }
  114545. function assertTSOptionalType(node, opts) {
  114546. assert("TSOptionalType", node, opts);
  114547. }
  114548. function assertTSRestType(node, opts) {
  114549. assert("TSRestType", node, opts);
  114550. }
  114551. function assertTSNamedTupleMember(node, opts) {
  114552. assert("TSNamedTupleMember", node, opts);
  114553. }
  114554. function assertTSUnionType(node, opts) {
  114555. assert("TSUnionType", node, opts);
  114556. }
  114557. function assertTSIntersectionType(node, opts) {
  114558. assert("TSIntersectionType", node, opts);
  114559. }
  114560. function assertTSConditionalType(node, opts) {
  114561. assert("TSConditionalType", node, opts);
  114562. }
  114563. function assertTSInferType(node, opts) {
  114564. assert("TSInferType", node, opts);
  114565. }
  114566. function assertTSParenthesizedType(node, opts) {
  114567. assert("TSParenthesizedType", node, opts);
  114568. }
  114569. function assertTSTypeOperator(node, opts) {
  114570. assert("TSTypeOperator", node, opts);
  114571. }
  114572. function assertTSIndexedAccessType(node, opts) {
  114573. assert("TSIndexedAccessType", node, opts);
  114574. }
  114575. function assertTSMappedType(node, opts) {
  114576. assert("TSMappedType", node, opts);
  114577. }
  114578. function assertTSLiteralType(node, opts) {
  114579. assert("TSLiteralType", node, opts);
  114580. }
  114581. function assertTSExpressionWithTypeArguments(node, opts) {
  114582. assert("TSExpressionWithTypeArguments", node, opts);
  114583. }
  114584. function assertTSInterfaceDeclaration(node, opts) {
  114585. assert("TSInterfaceDeclaration", node, opts);
  114586. }
  114587. function assertTSInterfaceBody(node, opts) {
  114588. assert("TSInterfaceBody", node, opts);
  114589. }
  114590. function assertTSTypeAliasDeclaration(node, opts) {
  114591. assert("TSTypeAliasDeclaration", node, opts);
  114592. }
  114593. function assertTSAsExpression(node, opts) {
  114594. assert("TSAsExpression", node, opts);
  114595. }
  114596. function assertTSTypeAssertion(node, opts) {
  114597. assert("TSTypeAssertion", node, opts);
  114598. }
  114599. function assertTSEnumDeclaration(node, opts) {
  114600. assert("TSEnumDeclaration", node, opts);
  114601. }
  114602. function assertTSEnumMember(node, opts) {
  114603. assert("TSEnumMember", node, opts);
  114604. }
  114605. function assertTSModuleDeclaration(node, opts) {
  114606. assert("TSModuleDeclaration", node, opts);
  114607. }
  114608. function assertTSModuleBlock(node, opts) {
  114609. assert("TSModuleBlock", node, opts);
  114610. }
  114611. function assertTSImportType(node, opts) {
  114612. assert("TSImportType", node, opts);
  114613. }
  114614. function assertTSImportEqualsDeclaration(node, opts) {
  114615. assert("TSImportEqualsDeclaration", node, opts);
  114616. }
  114617. function assertTSExternalModuleReference(node, opts) {
  114618. assert("TSExternalModuleReference", node, opts);
  114619. }
  114620. function assertTSNonNullExpression(node, opts) {
  114621. assert("TSNonNullExpression", node, opts);
  114622. }
  114623. function assertTSExportAssignment(node, opts) {
  114624. assert("TSExportAssignment", node, opts);
  114625. }
  114626. function assertTSNamespaceExportDeclaration(node, opts) {
  114627. assert("TSNamespaceExportDeclaration", node, opts);
  114628. }
  114629. function assertTSTypeAnnotation(node, opts) {
  114630. assert("TSTypeAnnotation", node, opts);
  114631. }
  114632. function assertTSTypeParameterInstantiation(node, opts) {
  114633. assert("TSTypeParameterInstantiation", node, opts);
  114634. }
  114635. function assertTSTypeParameterDeclaration(node, opts) {
  114636. assert("TSTypeParameterDeclaration", node, opts);
  114637. }
  114638. function assertTSTypeParameter(node, opts) {
  114639. assert("TSTypeParameter", node, opts);
  114640. }
  114641. function assertExpression(node, opts) {
  114642. assert("Expression", node, opts);
  114643. }
  114644. function assertBinary(node, opts) {
  114645. assert("Binary", node, opts);
  114646. }
  114647. function assertScopable(node, opts) {
  114648. assert("Scopable", node, opts);
  114649. }
  114650. function assertBlockParent(node, opts) {
  114651. assert("BlockParent", node, opts);
  114652. }
  114653. function assertBlock(node, opts) {
  114654. assert("Block", node, opts);
  114655. }
  114656. function assertStatement(node, opts) {
  114657. assert("Statement", node, opts);
  114658. }
  114659. function assertTerminatorless(node, opts) {
  114660. assert("Terminatorless", node, opts);
  114661. }
  114662. function assertCompletionStatement(node, opts) {
  114663. assert("CompletionStatement", node, opts);
  114664. }
  114665. function assertConditional(node, opts) {
  114666. assert("Conditional", node, opts);
  114667. }
  114668. function assertLoop(node, opts) {
  114669. assert("Loop", node, opts);
  114670. }
  114671. function assertWhile(node, opts) {
  114672. assert("While", node, opts);
  114673. }
  114674. function assertExpressionWrapper(node, opts) {
  114675. assert("ExpressionWrapper", node, opts);
  114676. }
  114677. function assertFor(node, opts) {
  114678. assert("For", node, opts);
  114679. }
  114680. function assertForXStatement(node, opts) {
  114681. assert("ForXStatement", node, opts);
  114682. }
  114683. function assertFunction(node, opts) {
  114684. assert("Function", node, opts);
  114685. }
  114686. function assertFunctionParent(node, opts) {
  114687. assert("FunctionParent", node, opts);
  114688. }
  114689. function assertPureish(node, opts) {
  114690. assert("Pureish", node, opts);
  114691. }
  114692. function assertDeclaration(node, opts) {
  114693. assert("Declaration", node, opts);
  114694. }
  114695. function assertPatternLike(node, opts) {
  114696. assert("PatternLike", node, opts);
  114697. }
  114698. function assertLVal(node, opts) {
  114699. assert("LVal", node, opts);
  114700. }
  114701. function assertTSEntityName(node, opts) {
  114702. assert("TSEntityName", node, opts);
  114703. }
  114704. function assertLiteral(node, opts) {
  114705. assert("Literal", node, opts);
  114706. }
  114707. function assertImmutable(node, opts) {
  114708. assert("Immutable", node, opts);
  114709. }
  114710. function assertUserWhitespacable(node, opts) {
  114711. assert("UserWhitespacable", node, opts);
  114712. }
  114713. function assertMethod(node, opts) {
  114714. assert("Method", node, opts);
  114715. }
  114716. function assertObjectMember(node, opts) {
  114717. assert("ObjectMember", node, opts);
  114718. }
  114719. function assertProperty(node, opts) {
  114720. assert("Property", node, opts);
  114721. }
  114722. function assertUnaryLike(node, opts) {
  114723. assert("UnaryLike", node, opts);
  114724. }
  114725. function assertPattern(node, opts) {
  114726. assert("Pattern", node, opts);
  114727. }
  114728. function assertClass(node, opts) {
  114729. assert("Class", node, opts);
  114730. }
  114731. function assertModuleDeclaration(node, opts) {
  114732. assert("ModuleDeclaration", node, opts);
  114733. }
  114734. function assertExportDeclaration(node, opts) {
  114735. assert("ExportDeclaration", node, opts);
  114736. }
  114737. function assertModuleSpecifier(node, opts) {
  114738. assert("ModuleSpecifier", node, opts);
  114739. }
  114740. function assertFlow(node, opts) {
  114741. assert("Flow", node, opts);
  114742. }
  114743. function assertFlowType(node, opts) {
  114744. assert("FlowType", node, opts);
  114745. }
  114746. function assertFlowBaseAnnotation(node, opts) {
  114747. assert("FlowBaseAnnotation", node, opts);
  114748. }
  114749. function assertFlowDeclaration(node, opts) {
  114750. assert("FlowDeclaration", node, opts);
  114751. }
  114752. function assertFlowPredicate(node, opts) {
  114753. assert("FlowPredicate", node, opts);
  114754. }
  114755. function assertEnumBody(node, opts) {
  114756. assert("EnumBody", node, opts);
  114757. }
  114758. function assertEnumMember(node, opts) {
  114759. assert("EnumMember", node, opts);
  114760. }
  114761. function assertJSX(node, opts) {
  114762. assert("JSX", node, opts);
  114763. }
  114764. function assertPrivate(node, opts) {
  114765. assert("Private", node, opts);
  114766. }
  114767. function assertTSTypeElement(node, opts) {
  114768. assert("TSTypeElement", node, opts);
  114769. }
  114770. function assertTSType(node, opts) {
  114771. assert("TSType", node, opts);
  114772. }
  114773. function assertTSBaseType(node, opts) {
  114774. assert("TSBaseType", node, opts);
  114775. }
  114776. function assertNumberLiteral(node, opts) {
  114777. console.trace("The node type NumberLiteral has been renamed to NumericLiteral");
  114778. assert("NumberLiteral", node, opts);
  114779. }
  114780. function assertRegexLiteral(node, opts) {
  114781. console.trace("The node type RegexLiteral has been renamed to RegExpLiteral");
  114782. assert("RegexLiteral", node, opts);
  114783. }
  114784. function assertRestProperty(node, opts) {
  114785. console.trace("The node type RestProperty has been renamed to RestElement");
  114786. assert("RestProperty", node, opts);
  114787. }
  114788. function assertSpreadProperty(node, opts) {
  114789. console.trace("The node type SpreadProperty has been renamed to SpreadElement");
  114790. assert("SpreadProperty", node, opts);
  114791. }
  114792. }
  114793. });
  114794. // node_modules/@babel/helper-get-function-arity/node_modules/@babel/types/lib/builders/flow/createTypeAnnotationBasedOnTypeof.js
  114795. var require_createTypeAnnotationBasedOnTypeof5 = __commonJS({
  114796. "node_modules/@babel/helper-get-function-arity/node_modules/@babel/types/lib/builders/flow/createTypeAnnotationBasedOnTypeof.js"(exports) {
  114797. "use strict";
  114798. Object.defineProperty(exports, "__esModule", {
  114799. value: true
  114800. });
  114801. exports.default = createTypeAnnotationBasedOnTypeof;
  114802. var _generated = require_generated22();
  114803. function createTypeAnnotationBasedOnTypeof(type) {
  114804. if (type === "string") {
  114805. return (0, _generated.stringTypeAnnotation)();
  114806. } else if (type === "number") {
  114807. return (0, _generated.numberTypeAnnotation)();
  114808. } else if (type === "undefined") {
  114809. return (0, _generated.voidTypeAnnotation)();
  114810. } else if (type === "boolean") {
  114811. return (0, _generated.booleanTypeAnnotation)();
  114812. } else if (type === "function") {
  114813. return (0, _generated.genericTypeAnnotation)((0, _generated.identifier)("Function"));
  114814. } else if (type === "object") {
  114815. return (0, _generated.genericTypeAnnotation)((0, _generated.identifier)("Object"));
  114816. } else if (type === "symbol") {
  114817. return (0, _generated.genericTypeAnnotation)((0, _generated.identifier)("Symbol"));
  114818. } else if (type === "bigint") {
  114819. return (0, _generated.anyTypeAnnotation)();
  114820. } else {
  114821. throw new Error("Invalid typeof value: " + type);
  114822. }
  114823. }
  114824. }
  114825. });
  114826. // node_modules/@babel/helper-get-function-arity/node_modules/@babel/types/lib/modifications/flow/removeTypeDuplicates.js
  114827. var require_removeTypeDuplicates9 = __commonJS({
  114828. "node_modules/@babel/helper-get-function-arity/node_modules/@babel/types/lib/modifications/flow/removeTypeDuplicates.js"(exports) {
  114829. "use strict";
  114830. Object.defineProperty(exports, "__esModule", {
  114831. value: true
  114832. });
  114833. exports.default = removeTypeDuplicates;
  114834. var _generated = require_generated21();
  114835. function getQualifiedName(node) {
  114836. return (0, _generated.isIdentifier)(node) ? node.name : `${node.id.name}.${getQualifiedName(node.qualification)}`;
  114837. }
  114838. function removeTypeDuplicates(nodes) {
  114839. const generics = {};
  114840. const bases = {};
  114841. const typeGroups = [];
  114842. const types2 = [];
  114843. for (let i = 0; i < nodes.length; i++) {
  114844. const node = nodes[i];
  114845. if (!node)
  114846. continue;
  114847. if (types2.indexOf(node) >= 0) {
  114848. continue;
  114849. }
  114850. if ((0, _generated.isAnyTypeAnnotation)(node)) {
  114851. return [node];
  114852. }
  114853. if ((0, _generated.isFlowBaseAnnotation)(node)) {
  114854. bases[node.type] = node;
  114855. continue;
  114856. }
  114857. if ((0, _generated.isUnionTypeAnnotation)(node)) {
  114858. if (typeGroups.indexOf(node.types) < 0) {
  114859. nodes = nodes.concat(node.types);
  114860. typeGroups.push(node.types);
  114861. }
  114862. continue;
  114863. }
  114864. if ((0, _generated.isGenericTypeAnnotation)(node)) {
  114865. const name2 = getQualifiedName(node.id);
  114866. if (generics[name2]) {
  114867. let existing = generics[name2];
  114868. if (existing.typeParameters) {
  114869. if (node.typeParameters) {
  114870. existing.typeParameters.params = removeTypeDuplicates(existing.typeParameters.params.concat(node.typeParameters.params));
  114871. }
  114872. } else {
  114873. existing = node.typeParameters;
  114874. }
  114875. } else {
  114876. generics[name2] = node;
  114877. }
  114878. continue;
  114879. }
  114880. types2.push(node);
  114881. }
  114882. for (const type of Object.keys(bases)) {
  114883. types2.push(bases[type]);
  114884. }
  114885. for (const name2 of Object.keys(generics)) {
  114886. types2.push(generics[name2]);
  114887. }
  114888. return types2;
  114889. }
  114890. }
  114891. });
  114892. // node_modules/@babel/helper-get-function-arity/node_modules/@babel/types/lib/builders/flow/createFlowUnionType.js
  114893. var require_createFlowUnionType5 = __commonJS({
  114894. "node_modules/@babel/helper-get-function-arity/node_modules/@babel/types/lib/builders/flow/createFlowUnionType.js"(exports) {
  114895. "use strict";
  114896. Object.defineProperty(exports, "__esModule", {
  114897. value: true
  114898. });
  114899. exports.default = createFlowUnionType;
  114900. var _generated = require_generated22();
  114901. var _removeTypeDuplicates = require_removeTypeDuplicates9();
  114902. function createFlowUnionType(types2) {
  114903. const flattened = (0, _removeTypeDuplicates.default)(types2);
  114904. if (flattened.length === 1) {
  114905. return flattened[0];
  114906. } else {
  114907. return (0, _generated.unionTypeAnnotation)(flattened);
  114908. }
  114909. }
  114910. }
  114911. });
  114912. // node_modules/@babel/helper-get-function-arity/node_modules/@babel/types/lib/modifications/typescript/removeTypeDuplicates.js
  114913. var require_removeTypeDuplicates10 = __commonJS({
  114914. "node_modules/@babel/helper-get-function-arity/node_modules/@babel/types/lib/modifications/typescript/removeTypeDuplicates.js"(exports) {
  114915. "use strict";
  114916. Object.defineProperty(exports, "__esModule", {
  114917. value: true
  114918. });
  114919. exports.default = removeTypeDuplicates;
  114920. var _generated = require_generated21();
  114921. function removeTypeDuplicates(nodes) {
  114922. const generics = {};
  114923. const bases = {};
  114924. const typeGroups = [];
  114925. const types2 = [];
  114926. for (let i = 0; i < nodes.length; i++) {
  114927. const node = nodes[i];
  114928. if (!node)
  114929. continue;
  114930. if (types2.indexOf(node) >= 0) {
  114931. continue;
  114932. }
  114933. if ((0, _generated.isTSAnyKeyword)(node)) {
  114934. return [node];
  114935. }
  114936. if ((0, _generated.isTSBaseType)(node)) {
  114937. bases[node.type] = node;
  114938. continue;
  114939. }
  114940. if ((0, _generated.isTSUnionType)(node)) {
  114941. if (typeGroups.indexOf(node.types) < 0) {
  114942. nodes = nodes.concat(node.types);
  114943. typeGroups.push(node.types);
  114944. }
  114945. continue;
  114946. }
  114947. types2.push(node);
  114948. }
  114949. for (const type of Object.keys(bases)) {
  114950. types2.push(bases[type]);
  114951. }
  114952. for (const name2 of Object.keys(generics)) {
  114953. types2.push(generics[name2]);
  114954. }
  114955. return types2;
  114956. }
  114957. }
  114958. });
  114959. // node_modules/@babel/helper-get-function-arity/node_modules/@babel/types/lib/builders/typescript/createTSUnionType.js
  114960. var require_createTSUnionType5 = __commonJS({
  114961. "node_modules/@babel/helper-get-function-arity/node_modules/@babel/types/lib/builders/typescript/createTSUnionType.js"(exports) {
  114962. "use strict";
  114963. Object.defineProperty(exports, "__esModule", {
  114964. value: true
  114965. });
  114966. exports.default = createTSUnionType;
  114967. var _generated = require_generated22();
  114968. var _removeTypeDuplicates = require_removeTypeDuplicates10();
  114969. function createTSUnionType(typeAnnotations) {
  114970. const types2 = typeAnnotations.map((type) => type.typeAnnotation);
  114971. const flattened = (0, _removeTypeDuplicates.default)(types2);
  114972. if (flattened.length === 1) {
  114973. return flattened[0];
  114974. } else {
  114975. return (0, _generated.tsUnionType)(flattened);
  114976. }
  114977. }
  114978. }
  114979. });
  114980. // node_modules/@babel/helper-get-function-arity/node_modules/@babel/types/lib/builders/generated/uppercase.js
  114981. var require_uppercase5 = __commonJS({
  114982. "node_modules/@babel/helper-get-function-arity/node_modules/@babel/types/lib/builders/generated/uppercase.js"(exports) {
  114983. "use strict";
  114984. Object.defineProperty(exports, "__esModule", {
  114985. value: true
  114986. });
  114987. Object.defineProperty(exports, "ArrayExpression", {
  114988. enumerable: true,
  114989. get: function() {
  114990. return _index.arrayExpression;
  114991. }
  114992. });
  114993. Object.defineProperty(exports, "AssignmentExpression", {
  114994. enumerable: true,
  114995. get: function() {
  114996. return _index.assignmentExpression;
  114997. }
  114998. });
  114999. Object.defineProperty(exports, "BinaryExpression", {
  115000. enumerable: true,
  115001. get: function() {
  115002. return _index.binaryExpression;
  115003. }
  115004. });
  115005. Object.defineProperty(exports, "InterpreterDirective", {
  115006. enumerable: true,
  115007. get: function() {
  115008. return _index.interpreterDirective;
  115009. }
  115010. });
  115011. Object.defineProperty(exports, "Directive", {
  115012. enumerable: true,
  115013. get: function() {
  115014. return _index.directive;
  115015. }
  115016. });
  115017. Object.defineProperty(exports, "DirectiveLiteral", {
  115018. enumerable: true,
  115019. get: function() {
  115020. return _index.directiveLiteral;
  115021. }
  115022. });
  115023. Object.defineProperty(exports, "BlockStatement", {
  115024. enumerable: true,
  115025. get: function() {
  115026. return _index.blockStatement;
  115027. }
  115028. });
  115029. Object.defineProperty(exports, "BreakStatement", {
  115030. enumerable: true,
  115031. get: function() {
  115032. return _index.breakStatement;
  115033. }
  115034. });
  115035. Object.defineProperty(exports, "CallExpression", {
  115036. enumerable: true,
  115037. get: function() {
  115038. return _index.callExpression;
  115039. }
  115040. });
  115041. Object.defineProperty(exports, "CatchClause", {
  115042. enumerable: true,
  115043. get: function() {
  115044. return _index.catchClause;
  115045. }
  115046. });
  115047. Object.defineProperty(exports, "ConditionalExpression", {
  115048. enumerable: true,
  115049. get: function() {
  115050. return _index.conditionalExpression;
  115051. }
  115052. });
  115053. Object.defineProperty(exports, "ContinueStatement", {
  115054. enumerable: true,
  115055. get: function() {
  115056. return _index.continueStatement;
  115057. }
  115058. });
  115059. Object.defineProperty(exports, "DebuggerStatement", {
  115060. enumerable: true,
  115061. get: function() {
  115062. return _index.debuggerStatement;
  115063. }
  115064. });
  115065. Object.defineProperty(exports, "DoWhileStatement", {
  115066. enumerable: true,
  115067. get: function() {
  115068. return _index.doWhileStatement;
  115069. }
  115070. });
  115071. Object.defineProperty(exports, "EmptyStatement", {
  115072. enumerable: true,
  115073. get: function() {
  115074. return _index.emptyStatement;
  115075. }
  115076. });
  115077. Object.defineProperty(exports, "ExpressionStatement", {
  115078. enumerable: true,
  115079. get: function() {
  115080. return _index.expressionStatement;
  115081. }
  115082. });
  115083. Object.defineProperty(exports, "File", {
  115084. enumerable: true,
  115085. get: function() {
  115086. return _index.file;
  115087. }
  115088. });
  115089. Object.defineProperty(exports, "ForInStatement", {
  115090. enumerable: true,
  115091. get: function() {
  115092. return _index.forInStatement;
  115093. }
  115094. });
  115095. Object.defineProperty(exports, "ForStatement", {
  115096. enumerable: true,
  115097. get: function() {
  115098. return _index.forStatement;
  115099. }
  115100. });
  115101. Object.defineProperty(exports, "FunctionDeclaration", {
  115102. enumerable: true,
  115103. get: function() {
  115104. return _index.functionDeclaration;
  115105. }
  115106. });
  115107. Object.defineProperty(exports, "FunctionExpression", {
  115108. enumerable: true,
  115109. get: function() {
  115110. return _index.functionExpression;
  115111. }
  115112. });
  115113. Object.defineProperty(exports, "Identifier", {
  115114. enumerable: true,
  115115. get: function() {
  115116. return _index.identifier;
  115117. }
  115118. });
  115119. Object.defineProperty(exports, "IfStatement", {
  115120. enumerable: true,
  115121. get: function() {
  115122. return _index.ifStatement;
  115123. }
  115124. });
  115125. Object.defineProperty(exports, "LabeledStatement", {
  115126. enumerable: true,
  115127. get: function() {
  115128. return _index.labeledStatement;
  115129. }
  115130. });
  115131. Object.defineProperty(exports, "StringLiteral", {
  115132. enumerable: true,
  115133. get: function() {
  115134. return _index.stringLiteral;
  115135. }
  115136. });
  115137. Object.defineProperty(exports, "NumericLiteral", {
  115138. enumerable: true,
  115139. get: function() {
  115140. return _index.numericLiteral;
  115141. }
  115142. });
  115143. Object.defineProperty(exports, "NullLiteral", {
  115144. enumerable: true,
  115145. get: function() {
  115146. return _index.nullLiteral;
  115147. }
  115148. });
  115149. Object.defineProperty(exports, "BooleanLiteral", {
  115150. enumerable: true,
  115151. get: function() {
  115152. return _index.booleanLiteral;
  115153. }
  115154. });
  115155. Object.defineProperty(exports, "RegExpLiteral", {
  115156. enumerable: true,
  115157. get: function() {
  115158. return _index.regExpLiteral;
  115159. }
  115160. });
  115161. Object.defineProperty(exports, "LogicalExpression", {
  115162. enumerable: true,
  115163. get: function() {
  115164. return _index.logicalExpression;
  115165. }
  115166. });
  115167. Object.defineProperty(exports, "MemberExpression", {
  115168. enumerable: true,
  115169. get: function() {
  115170. return _index.memberExpression;
  115171. }
  115172. });
  115173. Object.defineProperty(exports, "NewExpression", {
  115174. enumerable: true,
  115175. get: function() {
  115176. return _index.newExpression;
  115177. }
  115178. });
  115179. Object.defineProperty(exports, "Program", {
  115180. enumerable: true,
  115181. get: function() {
  115182. return _index.program;
  115183. }
  115184. });
  115185. Object.defineProperty(exports, "ObjectExpression", {
  115186. enumerable: true,
  115187. get: function() {
  115188. return _index.objectExpression;
  115189. }
  115190. });
  115191. Object.defineProperty(exports, "ObjectMethod", {
  115192. enumerable: true,
  115193. get: function() {
  115194. return _index.objectMethod;
  115195. }
  115196. });
  115197. Object.defineProperty(exports, "ObjectProperty", {
  115198. enumerable: true,
  115199. get: function() {
  115200. return _index.objectProperty;
  115201. }
  115202. });
  115203. Object.defineProperty(exports, "RestElement", {
  115204. enumerable: true,
  115205. get: function() {
  115206. return _index.restElement;
  115207. }
  115208. });
  115209. Object.defineProperty(exports, "ReturnStatement", {
  115210. enumerable: true,
  115211. get: function() {
  115212. return _index.returnStatement;
  115213. }
  115214. });
  115215. Object.defineProperty(exports, "SequenceExpression", {
  115216. enumerable: true,
  115217. get: function() {
  115218. return _index.sequenceExpression;
  115219. }
  115220. });
  115221. Object.defineProperty(exports, "ParenthesizedExpression", {
  115222. enumerable: true,
  115223. get: function() {
  115224. return _index.parenthesizedExpression;
  115225. }
  115226. });
  115227. Object.defineProperty(exports, "SwitchCase", {
  115228. enumerable: true,
  115229. get: function() {
  115230. return _index.switchCase;
  115231. }
  115232. });
  115233. Object.defineProperty(exports, "SwitchStatement", {
  115234. enumerable: true,
  115235. get: function() {
  115236. return _index.switchStatement;
  115237. }
  115238. });
  115239. Object.defineProperty(exports, "ThisExpression", {
  115240. enumerable: true,
  115241. get: function() {
  115242. return _index.thisExpression;
  115243. }
  115244. });
  115245. Object.defineProperty(exports, "ThrowStatement", {
  115246. enumerable: true,
  115247. get: function() {
  115248. return _index.throwStatement;
  115249. }
  115250. });
  115251. Object.defineProperty(exports, "TryStatement", {
  115252. enumerable: true,
  115253. get: function() {
  115254. return _index.tryStatement;
  115255. }
  115256. });
  115257. Object.defineProperty(exports, "UnaryExpression", {
  115258. enumerable: true,
  115259. get: function() {
  115260. return _index.unaryExpression;
  115261. }
  115262. });
  115263. Object.defineProperty(exports, "UpdateExpression", {
  115264. enumerable: true,
  115265. get: function() {
  115266. return _index.updateExpression;
  115267. }
  115268. });
  115269. Object.defineProperty(exports, "VariableDeclaration", {
  115270. enumerable: true,
  115271. get: function() {
  115272. return _index.variableDeclaration;
  115273. }
  115274. });
  115275. Object.defineProperty(exports, "VariableDeclarator", {
  115276. enumerable: true,
  115277. get: function() {
  115278. return _index.variableDeclarator;
  115279. }
  115280. });
  115281. Object.defineProperty(exports, "WhileStatement", {
  115282. enumerable: true,
  115283. get: function() {
  115284. return _index.whileStatement;
  115285. }
  115286. });
  115287. Object.defineProperty(exports, "WithStatement", {
  115288. enumerable: true,
  115289. get: function() {
  115290. return _index.withStatement;
  115291. }
  115292. });
  115293. Object.defineProperty(exports, "AssignmentPattern", {
  115294. enumerable: true,
  115295. get: function() {
  115296. return _index.assignmentPattern;
  115297. }
  115298. });
  115299. Object.defineProperty(exports, "ArrayPattern", {
  115300. enumerable: true,
  115301. get: function() {
  115302. return _index.arrayPattern;
  115303. }
  115304. });
  115305. Object.defineProperty(exports, "ArrowFunctionExpression", {
  115306. enumerable: true,
  115307. get: function() {
  115308. return _index.arrowFunctionExpression;
  115309. }
  115310. });
  115311. Object.defineProperty(exports, "ClassBody", {
  115312. enumerable: true,
  115313. get: function() {
  115314. return _index.classBody;
  115315. }
  115316. });
  115317. Object.defineProperty(exports, "ClassExpression", {
  115318. enumerable: true,
  115319. get: function() {
  115320. return _index.classExpression;
  115321. }
  115322. });
  115323. Object.defineProperty(exports, "ClassDeclaration", {
  115324. enumerable: true,
  115325. get: function() {
  115326. return _index.classDeclaration;
  115327. }
  115328. });
  115329. Object.defineProperty(exports, "ExportAllDeclaration", {
  115330. enumerable: true,
  115331. get: function() {
  115332. return _index.exportAllDeclaration;
  115333. }
  115334. });
  115335. Object.defineProperty(exports, "ExportDefaultDeclaration", {
  115336. enumerable: true,
  115337. get: function() {
  115338. return _index.exportDefaultDeclaration;
  115339. }
  115340. });
  115341. Object.defineProperty(exports, "ExportNamedDeclaration", {
  115342. enumerable: true,
  115343. get: function() {
  115344. return _index.exportNamedDeclaration;
  115345. }
  115346. });
  115347. Object.defineProperty(exports, "ExportSpecifier", {
  115348. enumerable: true,
  115349. get: function() {
  115350. return _index.exportSpecifier;
  115351. }
  115352. });
  115353. Object.defineProperty(exports, "ForOfStatement", {
  115354. enumerable: true,
  115355. get: function() {
  115356. return _index.forOfStatement;
  115357. }
  115358. });
  115359. Object.defineProperty(exports, "ImportDeclaration", {
  115360. enumerable: true,
  115361. get: function() {
  115362. return _index.importDeclaration;
  115363. }
  115364. });
  115365. Object.defineProperty(exports, "ImportDefaultSpecifier", {
  115366. enumerable: true,
  115367. get: function() {
  115368. return _index.importDefaultSpecifier;
  115369. }
  115370. });
  115371. Object.defineProperty(exports, "ImportNamespaceSpecifier", {
  115372. enumerable: true,
  115373. get: function() {
  115374. return _index.importNamespaceSpecifier;
  115375. }
  115376. });
  115377. Object.defineProperty(exports, "ImportSpecifier", {
  115378. enumerable: true,
  115379. get: function() {
  115380. return _index.importSpecifier;
  115381. }
  115382. });
  115383. Object.defineProperty(exports, "MetaProperty", {
  115384. enumerable: true,
  115385. get: function() {
  115386. return _index.metaProperty;
  115387. }
  115388. });
  115389. Object.defineProperty(exports, "ClassMethod", {
  115390. enumerable: true,
  115391. get: function() {
  115392. return _index.classMethod;
  115393. }
  115394. });
  115395. Object.defineProperty(exports, "ObjectPattern", {
  115396. enumerable: true,
  115397. get: function() {
  115398. return _index.objectPattern;
  115399. }
  115400. });
  115401. Object.defineProperty(exports, "SpreadElement", {
  115402. enumerable: true,
  115403. get: function() {
  115404. return _index.spreadElement;
  115405. }
  115406. });
  115407. Object.defineProperty(exports, "Super", {
  115408. enumerable: true,
  115409. get: function() {
  115410. return _index.super;
  115411. }
  115412. });
  115413. Object.defineProperty(exports, "TaggedTemplateExpression", {
  115414. enumerable: true,
  115415. get: function() {
  115416. return _index.taggedTemplateExpression;
  115417. }
  115418. });
  115419. Object.defineProperty(exports, "TemplateElement", {
  115420. enumerable: true,
  115421. get: function() {
  115422. return _index.templateElement;
  115423. }
  115424. });
  115425. Object.defineProperty(exports, "TemplateLiteral", {
  115426. enumerable: true,
  115427. get: function() {
  115428. return _index.templateLiteral;
  115429. }
  115430. });
  115431. Object.defineProperty(exports, "YieldExpression", {
  115432. enumerable: true,
  115433. get: function() {
  115434. return _index.yieldExpression;
  115435. }
  115436. });
  115437. Object.defineProperty(exports, "AwaitExpression", {
  115438. enumerable: true,
  115439. get: function() {
  115440. return _index.awaitExpression;
  115441. }
  115442. });
  115443. Object.defineProperty(exports, "Import", {
  115444. enumerable: true,
  115445. get: function() {
  115446. return _index.import;
  115447. }
  115448. });
  115449. Object.defineProperty(exports, "BigIntLiteral", {
  115450. enumerable: true,
  115451. get: function() {
  115452. return _index.bigIntLiteral;
  115453. }
  115454. });
  115455. Object.defineProperty(exports, "ExportNamespaceSpecifier", {
  115456. enumerable: true,
  115457. get: function() {
  115458. return _index.exportNamespaceSpecifier;
  115459. }
  115460. });
  115461. Object.defineProperty(exports, "OptionalMemberExpression", {
  115462. enumerable: true,
  115463. get: function() {
  115464. return _index.optionalMemberExpression;
  115465. }
  115466. });
  115467. Object.defineProperty(exports, "OptionalCallExpression", {
  115468. enumerable: true,
  115469. get: function() {
  115470. return _index.optionalCallExpression;
  115471. }
  115472. });
  115473. Object.defineProperty(exports, "AnyTypeAnnotation", {
  115474. enumerable: true,
  115475. get: function() {
  115476. return _index.anyTypeAnnotation;
  115477. }
  115478. });
  115479. Object.defineProperty(exports, "ArrayTypeAnnotation", {
  115480. enumerable: true,
  115481. get: function() {
  115482. return _index.arrayTypeAnnotation;
  115483. }
  115484. });
  115485. Object.defineProperty(exports, "BooleanTypeAnnotation", {
  115486. enumerable: true,
  115487. get: function() {
  115488. return _index.booleanTypeAnnotation;
  115489. }
  115490. });
  115491. Object.defineProperty(exports, "BooleanLiteralTypeAnnotation", {
  115492. enumerable: true,
  115493. get: function() {
  115494. return _index.booleanLiteralTypeAnnotation;
  115495. }
  115496. });
  115497. Object.defineProperty(exports, "NullLiteralTypeAnnotation", {
  115498. enumerable: true,
  115499. get: function() {
  115500. return _index.nullLiteralTypeAnnotation;
  115501. }
  115502. });
  115503. Object.defineProperty(exports, "ClassImplements", {
  115504. enumerable: true,
  115505. get: function() {
  115506. return _index.classImplements;
  115507. }
  115508. });
  115509. Object.defineProperty(exports, "DeclareClass", {
  115510. enumerable: true,
  115511. get: function() {
  115512. return _index.declareClass;
  115513. }
  115514. });
  115515. Object.defineProperty(exports, "DeclareFunction", {
  115516. enumerable: true,
  115517. get: function() {
  115518. return _index.declareFunction;
  115519. }
  115520. });
  115521. Object.defineProperty(exports, "DeclareInterface", {
  115522. enumerable: true,
  115523. get: function() {
  115524. return _index.declareInterface;
  115525. }
  115526. });
  115527. Object.defineProperty(exports, "DeclareModule", {
  115528. enumerable: true,
  115529. get: function() {
  115530. return _index.declareModule;
  115531. }
  115532. });
  115533. Object.defineProperty(exports, "DeclareModuleExports", {
  115534. enumerable: true,
  115535. get: function() {
  115536. return _index.declareModuleExports;
  115537. }
  115538. });
  115539. Object.defineProperty(exports, "DeclareTypeAlias", {
  115540. enumerable: true,
  115541. get: function() {
  115542. return _index.declareTypeAlias;
  115543. }
  115544. });
  115545. Object.defineProperty(exports, "DeclareOpaqueType", {
  115546. enumerable: true,
  115547. get: function() {
  115548. return _index.declareOpaqueType;
  115549. }
  115550. });
  115551. Object.defineProperty(exports, "DeclareVariable", {
  115552. enumerable: true,
  115553. get: function() {
  115554. return _index.declareVariable;
  115555. }
  115556. });
  115557. Object.defineProperty(exports, "DeclareExportDeclaration", {
  115558. enumerable: true,
  115559. get: function() {
  115560. return _index.declareExportDeclaration;
  115561. }
  115562. });
  115563. Object.defineProperty(exports, "DeclareExportAllDeclaration", {
  115564. enumerable: true,
  115565. get: function() {
  115566. return _index.declareExportAllDeclaration;
  115567. }
  115568. });
  115569. Object.defineProperty(exports, "DeclaredPredicate", {
  115570. enumerable: true,
  115571. get: function() {
  115572. return _index.declaredPredicate;
  115573. }
  115574. });
  115575. Object.defineProperty(exports, "ExistsTypeAnnotation", {
  115576. enumerable: true,
  115577. get: function() {
  115578. return _index.existsTypeAnnotation;
  115579. }
  115580. });
  115581. Object.defineProperty(exports, "FunctionTypeAnnotation", {
  115582. enumerable: true,
  115583. get: function() {
  115584. return _index.functionTypeAnnotation;
  115585. }
  115586. });
  115587. Object.defineProperty(exports, "FunctionTypeParam", {
  115588. enumerable: true,
  115589. get: function() {
  115590. return _index.functionTypeParam;
  115591. }
  115592. });
  115593. Object.defineProperty(exports, "GenericTypeAnnotation", {
  115594. enumerable: true,
  115595. get: function() {
  115596. return _index.genericTypeAnnotation;
  115597. }
  115598. });
  115599. Object.defineProperty(exports, "InferredPredicate", {
  115600. enumerable: true,
  115601. get: function() {
  115602. return _index.inferredPredicate;
  115603. }
  115604. });
  115605. Object.defineProperty(exports, "InterfaceExtends", {
  115606. enumerable: true,
  115607. get: function() {
  115608. return _index.interfaceExtends;
  115609. }
  115610. });
  115611. Object.defineProperty(exports, "InterfaceDeclaration", {
  115612. enumerable: true,
  115613. get: function() {
  115614. return _index.interfaceDeclaration;
  115615. }
  115616. });
  115617. Object.defineProperty(exports, "InterfaceTypeAnnotation", {
  115618. enumerable: true,
  115619. get: function() {
  115620. return _index.interfaceTypeAnnotation;
  115621. }
  115622. });
  115623. Object.defineProperty(exports, "IntersectionTypeAnnotation", {
  115624. enumerable: true,
  115625. get: function() {
  115626. return _index.intersectionTypeAnnotation;
  115627. }
  115628. });
  115629. Object.defineProperty(exports, "MixedTypeAnnotation", {
  115630. enumerable: true,
  115631. get: function() {
  115632. return _index.mixedTypeAnnotation;
  115633. }
  115634. });
  115635. Object.defineProperty(exports, "EmptyTypeAnnotation", {
  115636. enumerable: true,
  115637. get: function() {
  115638. return _index.emptyTypeAnnotation;
  115639. }
  115640. });
  115641. Object.defineProperty(exports, "NullableTypeAnnotation", {
  115642. enumerable: true,
  115643. get: function() {
  115644. return _index.nullableTypeAnnotation;
  115645. }
  115646. });
  115647. Object.defineProperty(exports, "NumberLiteralTypeAnnotation", {
  115648. enumerable: true,
  115649. get: function() {
  115650. return _index.numberLiteralTypeAnnotation;
  115651. }
  115652. });
  115653. Object.defineProperty(exports, "NumberTypeAnnotation", {
  115654. enumerable: true,
  115655. get: function() {
  115656. return _index.numberTypeAnnotation;
  115657. }
  115658. });
  115659. Object.defineProperty(exports, "ObjectTypeAnnotation", {
  115660. enumerable: true,
  115661. get: function() {
  115662. return _index.objectTypeAnnotation;
  115663. }
  115664. });
  115665. Object.defineProperty(exports, "ObjectTypeInternalSlot", {
  115666. enumerable: true,
  115667. get: function() {
  115668. return _index.objectTypeInternalSlot;
  115669. }
  115670. });
  115671. Object.defineProperty(exports, "ObjectTypeCallProperty", {
  115672. enumerable: true,
  115673. get: function() {
  115674. return _index.objectTypeCallProperty;
  115675. }
  115676. });
  115677. Object.defineProperty(exports, "ObjectTypeIndexer", {
  115678. enumerable: true,
  115679. get: function() {
  115680. return _index.objectTypeIndexer;
  115681. }
  115682. });
  115683. Object.defineProperty(exports, "ObjectTypeProperty", {
  115684. enumerable: true,
  115685. get: function() {
  115686. return _index.objectTypeProperty;
  115687. }
  115688. });
  115689. Object.defineProperty(exports, "ObjectTypeSpreadProperty", {
  115690. enumerable: true,
  115691. get: function() {
  115692. return _index.objectTypeSpreadProperty;
  115693. }
  115694. });
  115695. Object.defineProperty(exports, "OpaqueType", {
  115696. enumerable: true,
  115697. get: function() {
  115698. return _index.opaqueType;
  115699. }
  115700. });
  115701. Object.defineProperty(exports, "QualifiedTypeIdentifier", {
  115702. enumerable: true,
  115703. get: function() {
  115704. return _index.qualifiedTypeIdentifier;
  115705. }
  115706. });
  115707. Object.defineProperty(exports, "StringLiteralTypeAnnotation", {
  115708. enumerable: true,
  115709. get: function() {
  115710. return _index.stringLiteralTypeAnnotation;
  115711. }
  115712. });
  115713. Object.defineProperty(exports, "StringTypeAnnotation", {
  115714. enumerable: true,
  115715. get: function() {
  115716. return _index.stringTypeAnnotation;
  115717. }
  115718. });
  115719. Object.defineProperty(exports, "SymbolTypeAnnotation", {
  115720. enumerable: true,
  115721. get: function() {
  115722. return _index.symbolTypeAnnotation;
  115723. }
  115724. });
  115725. Object.defineProperty(exports, "ThisTypeAnnotation", {
  115726. enumerable: true,
  115727. get: function() {
  115728. return _index.thisTypeAnnotation;
  115729. }
  115730. });
  115731. Object.defineProperty(exports, "TupleTypeAnnotation", {
  115732. enumerable: true,
  115733. get: function() {
  115734. return _index.tupleTypeAnnotation;
  115735. }
  115736. });
  115737. Object.defineProperty(exports, "TypeofTypeAnnotation", {
  115738. enumerable: true,
  115739. get: function() {
  115740. return _index.typeofTypeAnnotation;
  115741. }
  115742. });
  115743. Object.defineProperty(exports, "TypeAlias", {
  115744. enumerable: true,
  115745. get: function() {
  115746. return _index.typeAlias;
  115747. }
  115748. });
  115749. Object.defineProperty(exports, "TypeAnnotation", {
  115750. enumerable: true,
  115751. get: function() {
  115752. return _index.typeAnnotation;
  115753. }
  115754. });
  115755. Object.defineProperty(exports, "TypeCastExpression", {
  115756. enumerable: true,
  115757. get: function() {
  115758. return _index.typeCastExpression;
  115759. }
  115760. });
  115761. Object.defineProperty(exports, "TypeParameter", {
  115762. enumerable: true,
  115763. get: function() {
  115764. return _index.typeParameter;
  115765. }
  115766. });
  115767. Object.defineProperty(exports, "TypeParameterDeclaration", {
  115768. enumerable: true,
  115769. get: function() {
  115770. return _index.typeParameterDeclaration;
  115771. }
  115772. });
  115773. Object.defineProperty(exports, "TypeParameterInstantiation", {
  115774. enumerable: true,
  115775. get: function() {
  115776. return _index.typeParameterInstantiation;
  115777. }
  115778. });
  115779. Object.defineProperty(exports, "UnionTypeAnnotation", {
  115780. enumerable: true,
  115781. get: function() {
  115782. return _index.unionTypeAnnotation;
  115783. }
  115784. });
  115785. Object.defineProperty(exports, "Variance", {
  115786. enumerable: true,
  115787. get: function() {
  115788. return _index.variance;
  115789. }
  115790. });
  115791. Object.defineProperty(exports, "VoidTypeAnnotation", {
  115792. enumerable: true,
  115793. get: function() {
  115794. return _index.voidTypeAnnotation;
  115795. }
  115796. });
  115797. Object.defineProperty(exports, "EnumDeclaration", {
  115798. enumerable: true,
  115799. get: function() {
  115800. return _index.enumDeclaration;
  115801. }
  115802. });
  115803. Object.defineProperty(exports, "EnumBooleanBody", {
  115804. enumerable: true,
  115805. get: function() {
  115806. return _index.enumBooleanBody;
  115807. }
  115808. });
  115809. Object.defineProperty(exports, "EnumNumberBody", {
  115810. enumerable: true,
  115811. get: function() {
  115812. return _index.enumNumberBody;
  115813. }
  115814. });
  115815. Object.defineProperty(exports, "EnumStringBody", {
  115816. enumerable: true,
  115817. get: function() {
  115818. return _index.enumStringBody;
  115819. }
  115820. });
  115821. Object.defineProperty(exports, "EnumSymbolBody", {
  115822. enumerable: true,
  115823. get: function() {
  115824. return _index.enumSymbolBody;
  115825. }
  115826. });
  115827. Object.defineProperty(exports, "EnumBooleanMember", {
  115828. enumerable: true,
  115829. get: function() {
  115830. return _index.enumBooleanMember;
  115831. }
  115832. });
  115833. Object.defineProperty(exports, "EnumNumberMember", {
  115834. enumerable: true,
  115835. get: function() {
  115836. return _index.enumNumberMember;
  115837. }
  115838. });
  115839. Object.defineProperty(exports, "EnumStringMember", {
  115840. enumerable: true,
  115841. get: function() {
  115842. return _index.enumStringMember;
  115843. }
  115844. });
  115845. Object.defineProperty(exports, "EnumDefaultedMember", {
  115846. enumerable: true,
  115847. get: function() {
  115848. return _index.enumDefaultedMember;
  115849. }
  115850. });
  115851. Object.defineProperty(exports, "IndexedAccessType", {
  115852. enumerable: true,
  115853. get: function() {
  115854. return _index.indexedAccessType;
  115855. }
  115856. });
  115857. Object.defineProperty(exports, "OptionalIndexedAccessType", {
  115858. enumerable: true,
  115859. get: function() {
  115860. return _index.optionalIndexedAccessType;
  115861. }
  115862. });
  115863. Object.defineProperty(exports, "JSXAttribute", {
  115864. enumerable: true,
  115865. get: function() {
  115866. return _index.jsxAttribute;
  115867. }
  115868. });
  115869. Object.defineProperty(exports, "JSXClosingElement", {
  115870. enumerable: true,
  115871. get: function() {
  115872. return _index.jsxClosingElement;
  115873. }
  115874. });
  115875. Object.defineProperty(exports, "JSXElement", {
  115876. enumerable: true,
  115877. get: function() {
  115878. return _index.jsxElement;
  115879. }
  115880. });
  115881. Object.defineProperty(exports, "JSXEmptyExpression", {
  115882. enumerable: true,
  115883. get: function() {
  115884. return _index.jsxEmptyExpression;
  115885. }
  115886. });
  115887. Object.defineProperty(exports, "JSXExpressionContainer", {
  115888. enumerable: true,
  115889. get: function() {
  115890. return _index.jsxExpressionContainer;
  115891. }
  115892. });
  115893. Object.defineProperty(exports, "JSXSpreadChild", {
  115894. enumerable: true,
  115895. get: function() {
  115896. return _index.jsxSpreadChild;
  115897. }
  115898. });
  115899. Object.defineProperty(exports, "JSXIdentifier", {
  115900. enumerable: true,
  115901. get: function() {
  115902. return _index.jsxIdentifier;
  115903. }
  115904. });
  115905. Object.defineProperty(exports, "JSXMemberExpression", {
  115906. enumerable: true,
  115907. get: function() {
  115908. return _index.jsxMemberExpression;
  115909. }
  115910. });
  115911. Object.defineProperty(exports, "JSXNamespacedName", {
  115912. enumerable: true,
  115913. get: function() {
  115914. return _index.jsxNamespacedName;
  115915. }
  115916. });
  115917. Object.defineProperty(exports, "JSXOpeningElement", {
  115918. enumerable: true,
  115919. get: function() {
  115920. return _index.jsxOpeningElement;
  115921. }
  115922. });
  115923. Object.defineProperty(exports, "JSXSpreadAttribute", {
  115924. enumerable: true,
  115925. get: function() {
  115926. return _index.jsxSpreadAttribute;
  115927. }
  115928. });
  115929. Object.defineProperty(exports, "JSXText", {
  115930. enumerable: true,
  115931. get: function() {
  115932. return _index.jsxText;
  115933. }
  115934. });
  115935. Object.defineProperty(exports, "JSXFragment", {
  115936. enumerable: true,
  115937. get: function() {
  115938. return _index.jsxFragment;
  115939. }
  115940. });
  115941. Object.defineProperty(exports, "JSXOpeningFragment", {
  115942. enumerable: true,
  115943. get: function() {
  115944. return _index.jsxOpeningFragment;
  115945. }
  115946. });
  115947. Object.defineProperty(exports, "JSXClosingFragment", {
  115948. enumerable: true,
  115949. get: function() {
  115950. return _index.jsxClosingFragment;
  115951. }
  115952. });
  115953. Object.defineProperty(exports, "Noop", {
  115954. enumerable: true,
  115955. get: function() {
  115956. return _index.noop;
  115957. }
  115958. });
  115959. Object.defineProperty(exports, "Placeholder", {
  115960. enumerable: true,
  115961. get: function() {
  115962. return _index.placeholder;
  115963. }
  115964. });
  115965. Object.defineProperty(exports, "V8IntrinsicIdentifier", {
  115966. enumerable: true,
  115967. get: function() {
  115968. return _index.v8IntrinsicIdentifier;
  115969. }
  115970. });
  115971. Object.defineProperty(exports, "ArgumentPlaceholder", {
  115972. enumerable: true,
  115973. get: function() {
  115974. return _index.argumentPlaceholder;
  115975. }
  115976. });
  115977. Object.defineProperty(exports, "BindExpression", {
  115978. enumerable: true,
  115979. get: function() {
  115980. return _index.bindExpression;
  115981. }
  115982. });
  115983. Object.defineProperty(exports, "ClassProperty", {
  115984. enumerable: true,
  115985. get: function() {
  115986. return _index.classProperty;
  115987. }
  115988. });
  115989. Object.defineProperty(exports, "PipelineTopicExpression", {
  115990. enumerable: true,
  115991. get: function() {
  115992. return _index.pipelineTopicExpression;
  115993. }
  115994. });
  115995. Object.defineProperty(exports, "PipelineBareFunction", {
  115996. enumerable: true,
  115997. get: function() {
  115998. return _index.pipelineBareFunction;
  115999. }
  116000. });
  116001. Object.defineProperty(exports, "PipelinePrimaryTopicReference", {
  116002. enumerable: true,
  116003. get: function() {
  116004. return _index.pipelinePrimaryTopicReference;
  116005. }
  116006. });
  116007. Object.defineProperty(exports, "ClassPrivateProperty", {
  116008. enumerable: true,
  116009. get: function() {
  116010. return _index.classPrivateProperty;
  116011. }
  116012. });
  116013. Object.defineProperty(exports, "ClassPrivateMethod", {
  116014. enumerable: true,
  116015. get: function() {
  116016. return _index.classPrivateMethod;
  116017. }
  116018. });
  116019. Object.defineProperty(exports, "ImportAttribute", {
  116020. enumerable: true,
  116021. get: function() {
  116022. return _index.importAttribute;
  116023. }
  116024. });
  116025. Object.defineProperty(exports, "Decorator", {
  116026. enumerable: true,
  116027. get: function() {
  116028. return _index.decorator;
  116029. }
  116030. });
  116031. Object.defineProperty(exports, "DoExpression", {
  116032. enumerable: true,
  116033. get: function() {
  116034. return _index.doExpression;
  116035. }
  116036. });
  116037. Object.defineProperty(exports, "ExportDefaultSpecifier", {
  116038. enumerable: true,
  116039. get: function() {
  116040. return _index.exportDefaultSpecifier;
  116041. }
  116042. });
  116043. Object.defineProperty(exports, "PrivateName", {
  116044. enumerable: true,
  116045. get: function() {
  116046. return _index.privateName;
  116047. }
  116048. });
  116049. Object.defineProperty(exports, "RecordExpression", {
  116050. enumerable: true,
  116051. get: function() {
  116052. return _index.recordExpression;
  116053. }
  116054. });
  116055. Object.defineProperty(exports, "TupleExpression", {
  116056. enumerable: true,
  116057. get: function() {
  116058. return _index.tupleExpression;
  116059. }
  116060. });
  116061. Object.defineProperty(exports, "DecimalLiteral", {
  116062. enumerable: true,
  116063. get: function() {
  116064. return _index.decimalLiteral;
  116065. }
  116066. });
  116067. Object.defineProperty(exports, "StaticBlock", {
  116068. enumerable: true,
  116069. get: function() {
  116070. return _index.staticBlock;
  116071. }
  116072. });
  116073. Object.defineProperty(exports, "ModuleExpression", {
  116074. enumerable: true,
  116075. get: function() {
  116076. return _index.moduleExpression;
  116077. }
  116078. });
  116079. Object.defineProperty(exports, "TSParameterProperty", {
  116080. enumerable: true,
  116081. get: function() {
  116082. return _index.tsParameterProperty;
  116083. }
  116084. });
  116085. Object.defineProperty(exports, "TSDeclareFunction", {
  116086. enumerable: true,
  116087. get: function() {
  116088. return _index.tsDeclareFunction;
  116089. }
  116090. });
  116091. Object.defineProperty(exports, "TSDeclareMethod", {
  116092. enumerable: true,
  116093. get: function() {
  116094. return _index.tsDeclareMethod;
  116095. }
  116096. });
  116097. Object.defineProperty(exports, "TSQualifiedName", {
  116098. enumerable: true,
  116099. get: function() {
  116100. return _index.tsQualifiedName;
  116101. }
  116102. });
  116103. Object.defineProperty(exports, "TSCallSignatureDeclaration", {
  116104. enumerable: true,
  116105. get: function() {
  116106. return _index.tsCallSignatureDeclaration;
  116107. }
  116108. });
  116109. Object.defineProperty(exports, "TSConstructSignatureDeclaration", {
  116110. enumerable: true,
  116111. get: function() {
  116112. return _index.tsConstructSignatureDeclaration;
  116113. }
  116114. });
  116115. Object.defineProperty(exports, "TSPropertySignature", {
  116116. enumerable: true,
  116117. get: function() {
  116118. return _index.tsPropertySignature;
  116119. }
  116120. });
  116121. Object.defineProperty(exports, "TSMethodSignature", {
  116122. enumerable: true,
  116123. get: function() {
  116124. return _index.tsMethodSignature;
  116125. }
  116126. });
  116127. Object.defineProperty(exports, "TSIndexSignature", {
  116128. enumerable: true,
  116129. get: function() {
  116130. return _index.tsIndexSignature;
  116131. }
  116132. });
  116133. Object.defineProperty(exports, "TSAnyKeyword", {
  116134. enumerable: true,
  116135. get: function() {
  116136. return _index.tsAnyKeyword;
  116137. }
  116138. });
  116139. Object.defineProperty(exports, "TSBooleanKeyword", {
  116140. enumerable: true,
  116141. get: function() {
  116142. return _index.tsBooleanKeyword;
  116143. }
  116144. });
  116145. Object.defineProperty(exports, "TSBigIntKeyword", {
  116146. enumerable: true,
  116147. get: function() {
  116148. return _index.tsBigIntKeyword;
  116149. }
  116150. });
  116151. Object.defineProperty(exports, "TSIntrinsicKeyword", {
  116152. enumerable: true,
  116153. get: function() {
  116154. return _index.tsIntrinsicKeyword;
  116155. }
  116156. });
  116157. Object.defineProperty(exports, "TSNeverKeyword", {
  116158. enumerable: true,
  116159. get: function() {
  116160. return _index.tsNeverKeyword;
  116161. }
  116162. });
  116163. Object.defineProperty(exports, "TSNullKeyword", {
  116164. enumerable: true,
  116165. get: function() {
  116166. return _index.tsNullKeyword;
  116167. }
  116168. });
  116169. Object.defineProperty(exports, "TSNumberKeyword", {
  116170. enumerable: true,
  116171. get: function() {
  116172. return _index.tsNumberKeyword;
  116173. }
  116174. });
  116175. Object.defineProperty(exports, "TSObjectKeyword", {
  116176. enumerable: true,
  116177. get: function() {
  116178. return _index.tsObjectKeyword;
  116179. }
  116180. });
  116181. Object.defineProperty(exports, "TSStringKeyword", {
  116182. enumerable: true,
  116183. get: function() {
  116184. return _index.tsStringKeyword;
  116185. }
  116186. });
  116187. Object.defineProperty(exports, "TSSymbolKeyword", {
  116188. enumerable: true,
  116189. get: function() {
  116190. return _index.tsSymbolKeyword;
  116191. }
  116192. });
  116193. Object.defineProperty(exports, "TSUndefinedKeyword", {
  116194. enumerable: true,
  116195. get: function() {
  116196. return _index.tsUndefinedKeyword;
  116197. }
  116198. });
  116199. Object.defineProperty(exports, "TSUnknownKeyword", {
  116200. enumerable: true,
  116201. get: function() {
  116202. return _index.tsUnknownKeyword;
  116203. }
  116204. });
  116205. Object.defineProperty(exports, "TSVoidKeyword", {
  116206. enumerable: true,
  116207. get: function() {
  116208. return _index.tsVoidKeyword;
  116209. }
  116210. });
  116211. Object.defineProperty(exports, "TSThisType", {
  116212. enumerable: true,
  116213. get: function() {
  116214. return _index.tsThisType;
  116215. }
  116216. });
  116217. Object.defineProperty(exports, "TSFunctionType", {
  116218. enumerable: true,
  116219. get: function() {
  116220. return _index.tsFunctionType;
  116221. }
  116222. });
  116223. Object.defineProperty(exports, "TSConstructorType", {
  116224. enumerable: true,
  116225. get: function() {
  116226. return _index.tsConstructorType;
  116227. }
  116228. });
  116229. Object.defineProperty(exports, "TSTypeReference", {
  116230. enumerable: true,
  116231. get: function() {
  116232. return _index.tsTypeReference;
  116233. }
  116234. });
  116235. Object.defineProperty(exports, "TSTypePredicate", {
  116236. enumerable: true,
  116237. get: function() {
  116238. return _index.tsTypePredicate;
  116239. }
  116240. });
  116241. Object.defineProperty(exports, "TSTypeQuery", {
  116242. enumerable: true,
  116243. get: function() {
  116244. return _index.tsTypeQuery;
  116245. }
  116246. });
  116247. Object.defineProperty(exports, "TSTypeLiteral", {
  116248. enumerable: true,
  116249. get: function() {
  116250. return _index.tsTypeLiteral;
  116251. }
  116252. });
  116253. Object.defineProperty(exports, "TSArrayType", {
  116254. enumerable: true,
  116255. get: function() {
  116256. return _index.tsArrayType;
  116257. }
  116258. });
  116259. Object.defineProperty(exports, "TSTupleType", {
  116260. enumerable: true,
  116261. get: function() {
  116262. return _index.tsTupleType;
  116263. }
  116264. });
  116265. Object.defineProperty(exports, "TSOptionalType", {
  116266. enumerable: true,
  116267. get: function() {
  116268. return _index.tsOptionalType;
  116269. }
  116270. });
  116271. Object.defineProperty(exports, "TSRestType", {
  116272. enumerable: true,
  116273. get: function() {
  116274. return _index.tsRestType;
  116275. }
  116276. });
  116277. Object.defineProperty(exports, "TSNamedTupleMember", {
  116278. enumerable: true,
  116279. get: function() {
  116280. return _index.tsNamedTupleMember;
  116281. }
  116282. });
  116283. Object.defineProperty(exports, "TSUnionType", {
  116284. enumerable: true,
  116285. get: function() {
  116286. return _index.tsUnionType;
  116287. }
  116288. });
  116289. Object.defineProperty(exports, "TSIntersectionType", {
  116290. enumerable: true,
  116291. get: function() {
  116292. return _index.tsIntersectionType;
  116293. }
  116294. });
  116295. Object.defineProperty(exports, "TSConditionalType", {
  116296. enumerable: true,
  116297. get: function() {
  116298. return _index.tsConditionalType;
  116299. }
  116300. });
  116301. Object.defineProperty(exports, "TSInferType", {
  116302. enumerable: true,
  116303. get: function() {
  116304. return _index.tsInferType;
  116305. }
  116306. });
  116307. Object.defineProperty(exports, "TSParenthesizedType", {
  116308. enumerable: true,
  116309. get: function() {
  116310. return _index.tsParenthesizedType;
  116311. }
  116312. });
  116313. Object.defineProperty(exports, "TSTypeOperator", {
  116314. enumerable: true,
  116315. get: function() {
  116316. return _index.tsTypeOperator;
  116317. }
  116318. });
  116319. Object.defineProperty(exports, "TSIndexedAccessType", {
  116320. enumerable: true,
  116321. get: function() {
  116322. return _index.tsIndexedAccessType;
  116323. }
  116324. });
  116325. Object.defineProperty(exports, "TSMappedType", {
  116326. enumerable: true,
  116327. get: function() {
  116328. return _index.tsMappedType;
  116329. }
  116330. });
  116331. Object.defineProperty(exports, "TSLiteralType", {
  116332. enumerable: true,
  116333. get: function() {
  116334. return _index.tsLiteralType;
  116335. }
  116336. });
  116337. Object.defineProperty(exports, "TSExpressionWithTypeArguments", {
  116338. enumerable: true,
  116339. get: function() {
  116340. return _index.tsExpressionWithTypeArguments;
  116341. }
  116342. });
  116343. Object.defineProperty(exports, "TSInterfaceDeclaration", {
  116344. enumerable: true,
  116345. get: function() {
  116346. return _index.tsInterfaceDeclaration;
  116347. }
  116348. });
  116349. Object.defineProperty(exports, "TSInterfaceBody", {
  116350. enumerable: true,
  116351. get: function() {
  116352. return _index.tsInterfaceBody;
  116353. }
  116354. });
  116355. Object.defineProperty(exports, "TSTypeAliasDeclaration", {
  116356. enumerable: true,
  116357. get: function() {
  116358. return _index.tsTypeAliasDeclaration;
  116359. }
  116360. });
  116361. Object.defineProperty(exports, "TSAsExpression", {
  116362. enumerable: true,
  116363. get: function() {
  116364. return _index.tsAsExpression;
  116365. }
  116366. });
  116367. Object.defineProperty(exports, "TSTypeAssertion", {
  116368. enumerable: true,
  116369. get: function() {
  116370. return _index.tsTypeAssertion;
  116371. }
  116372. });
  116373. Object.defineProperty(exports, "TSEnumDeclaration", {
  116374. enumerable: true,
  116375. get: function() {
  116376. return _index.tsEnumDeclaration;
  116377. }
  116378. });
  116379. Object.defineProperty(exports, "TSEnumMember", {
  116380. enumerable: true,
  116381. get: function() {
  116382. return _index.tsEnumMember;
  116383. }
  116384. });
  116385. Object.defineProperty(exports, "TSModuleDeclaration", {
  116386. enumerable: true,
  116387. get: function() {
  116388. return _index.tsModuleDeclaration;
  116389. }
  116390. });
  116391. Object.defineProperty(exports, "TSModuleBlock", {
  116392. enumerable: true,
  116393. get: function() {
  116394. return _index.tsModuleBlock;
  116395. }
  116396. });
  116397. Object.defineProperty(exports, "TSImportType", {
  116398. enumerable: true,
  116399. get: function() {
  116400. return _index.tsImportType;
  116401. }
  116402. });
  116403. Object.defineProperty(exports, "TSImportEqualsDeclaration", {
  116404. enumerable: true,
  116405. get: function() {
  116406. return _index.tsImportEqualsDeclaration;
  116407. }
  116408. });
  116409. Object.defineProperty(exports, "TSExternalModuleReference", {
  116410. enumerable: true,
  116411. get: function() {
  116412. return _index.tsExternalModuleReference;
  116413. }
  116414. });
  116415. Object.defineProperty(exports, "TSNonNullExpression", {
  116416. enumerable: true,
  116417. get: function() {
  116418. return _index.tsNonNullExpression;
  116419. }
  116420. });
  116421. Object.defineProperty(exports, "TSExportAssignment", {
  116422. enumerable: true,
  116423. get: function() {
  116424. return _index.tsExportAssignment;
  116425. }
  116426. });
  116427. Object.defineProperty(exports, "TSNamespaceExportDeclaration", {
  116428. enumerable: true,
  116429. get: function() {
  116430. return _index.tsNamespaceExportDeclaration;
  116431. }
  116432. });
  116433. Object.defineProperty(exports, "TSTypeAnnotation", {
  116434. enumerable: true,
  116435. get: function() {
  116436. return _index.tsTypeAnnotation;
  116437. }
  116438. });
  116439. Object.defineProperty(exports, "TSTypeParameterInstantiation", {
  116440. enumerable: true,
  116441. get: function() {
  116442. return _index.tsTypeParameterInstantiation;
  116443. }
  116444. });
  116445. Object.defineProperty(exports, "TSTypeParameterDeclaration", {
  116446. enumerable: true,
  116447. get: function() {
  116448. return _index.tsTypeParameterDeclaration;
  116449. }
  116450. });
  116451. Object.defineProperty(exports, "TSTypeParameter", {
  116452. enumerable: true,
  116453. get: function() {
  116454. return _index.tsTypeParameter;
  116455. }
  116456. });
  116457. Object.defineProperty(exports, "NumberLiteral", {
  116458. enumerable: true,
  116459. get: function() {
  116460. return _index.numberLiteral;
  116461. }
  116462. });
  116463. Object.defineProperty(exports, "RegexLiteral", {
  116464. enumerable: true,
  116465. get: function() {
  116466. return _index.regexLiteral;
  116467. }
  116468. });
  116469. Object.defineProperty(exports, "RestProperty", {
  116470. enumerable: true,
  116471. get: function() {
  116472. return _index.restProperty;
  116473. }
  116474. });
  116475. Object.defineProperty(exports, "SpreadProperty", {
  116476. enumerable: true,
  116477. get: function() {
  116478. return _index.spreadProperty;
  116479. }
  116480. });
  116481. var _index = require_generated22();
  116482. }
  116483. });
  116484. // node_modules/@babel/helper-get-function-arity/node_modules/@babel/types/lib/clone/cloneNode.js
  116485. var require_cloneNode5 = __commonJS({
  116486. "node_modules/@babel/helper-get-function-arity/node_modules/@babel/types/lib/clone/cloneNode.js"(exports) {
  116487. "use strict";
  116488. Object.defineProperty(exports, "__esModule", {
  116489. value: true
  116490. });
  116491. exports.default = cloneNode;
  116492. var _definitions = require_definitions5();
  116493. var _generated = require_generated21();
  116494. var has = Function.call.bind(Object.prototype.hasOwnProperty);
  116495. function cloneIfNode(obj, deep, withoutLoc) {
  116496. if (obj && typeof obj.type === "string") {
  116497. return cloneNode(obj, deep, withoutLoc);
  116498. }
  116499. return obj;
  116500. }
  116501. function cloneIfNodeOrArray(obj, deep, withoutLoc) {
  116502. if (Array.isArray(obj)) {
  116503. return obj.map((node) => cloneIfNode(node, deep, withoutLoc));
  116504. }
  116505. return cloneIfNode(obj, deep, withoutLoc);
  116506. }
  116507. function cloneNode(node, deep = true, withoutLoc = false) {
  116508. if (!node)
  116509. return node;
  116510. const {
  116511. type
  116512. } = node;
  116513. const newNode = {
  116514. type: node.type
  116515. };
  116516. if ((0, _generated.isIdentifier)(node)) {
  116517. newNode.name = node.name;
  116518. if (has(node, "optional") && typeof node.optional === "boolean") {
  116519. newNode.optional = node.optional;
  116520. }
  116521. if (has(node, "typeAnnotation")) {
  116522. newNode.typeAnnotation = deep ? cloneIfNodeOrArray(node.typeAnnotation, true, withoutLoc) : node.typeAnnotation;
  116523. }
  116524. } else if (!has(_definitions.NODE_FIELDS, type)) {
  116525. throw new Error(`Unknown node type: "${type}"`);
  116526. } else {
  116527. for (const field of Object.keys(_definitions.NODE_FIELDS[type])) {
  116528. if (has(node, field)) {
  116529. if (deep) {
  116530. newNode[field] = (0, _generated.isFile)(node) && field === "comments" ? maybeCloneComments(node.comments, deep, withoutLoc) : cloneIfNodeOrArray(node[field], true, withoutLoc);
  116531. } else {
  116532. newNode[field] = node[field];
  116533. }
  116534. }
  116535. }
  116536. }
  116537. if (has(node, "loc")) {
  116538. if (withoutLoc) {
  116539. newNode.loc = null;
  116540. } else {
  116541. newNode.loc = node.loc;
  116542. }
  116543. }
  116544. if (has(node, "leadingComments")) {
  116545. newNode.leadingComments = maybeCloneComments(node.leadingComments, deep, withoutLoc);
  116546. }
  116547. if (has(node, "innerComments")) {
  116548. newNode.innerComments = maybeCloneComments(node.innerComments, deep, withoutLoc);
  116549. }
  116550. if (has(node, "trailingComments")) {
  116551. newNode.trailingComments = maybeCloneComments(node.trailingComments, deep, withoutLoc);
  116552. }
  116553. if (has(node, "extra")) {
  116554. newNode.extra = Object.assign({}, node.extra);
  116555. }
  116556. return newNode;
  116557. }
  116558. function maybeCloneComments(comments, deep, withoutLoc) {
  116559. if (!comments || !deep) {
  116560. return comments;
  116561. }
  116562. return comments.map(({
  116563. type,
  116564. value,
  116565. loc
  116566. }) => {
  116567. if (withoutLoc) {
  116568. return {
  116569. type,
  116570. value,
  116571. loc: null
  116572. };
  116573. }
  116574. return {
  116575. type,
  116576. value,
  116577. loc
  116578. };
  116579. });
  116580. }
  116581. }
  116582. });
  116583. // node_modules/@babel/helper-get-function-arity/node_modules/@babel/types/lib/clone/clone.js
  116584. var require_clone5 = __commonJS({
  116585. "node_modules/@babel/helper-get-function-arity/node_modules/@babel/types/lib/clone/clone.js"(exports) {
  116586. "use strict";
  116587. Object.defineProperty(exports, "__esModule", {
  116588. value: true
  116589. });
  116590. exports.default = clone;
  116591. var _cloneNode = require_cloneNode5();
  116592. function clone(node) {
  116593. return (0, _cloneNode.default)(node, false);
  116594. }
  116595. }
  116596. });
  116597. // node_modules/@babel/helper-get-function-arity/node_modules/@babel/types/lib/clone/cloneDeep.js
  116598. var require_cloneDeep5 = __commonJS({
  116599. "node_modules/@babel/helper-get-function-arity/node_modules/@babel/types/lib/clone/cloneDeep.js"(exports) {
  116600. "use strict";
  116601. Object.defineProperty(exports, "__esModule", {
  116602. value: true
  116603. });
  116604. exports.default = cloneDeep2;
  116605. var _cloneNode = require_cloneNode5();
  116606. function cloneDeep2(node) {
  116607. return (0, _cloneNode.default)(node);
  116608. }
  116609. }
  116610. });
  116611. // node_modules/@babel/helper-get-function-arity/node_modules/@babel/types/lib/clone/cloneDeepWithoutLoc.js
  116612. var require_cloneDeepWithoutLoc5 = __commonJS({
  116613. "node_modules/@babel/helper-get-function-arity/node_modules/@babel/types/lib/clone/cloneDeepWithoutLoc.js"(exports) {
  116614. "use strict";
  116615. Object.defineProperty(exports, "__esModule", {
  116616. value: true
  116617. });
  116618. exports.default = cloneDeepWithoutLoc;
  116619. var _cloneNode = require_cloneNode5();
  116620. function cloneDeepWithoutLoc(node) {
  116621. return (0, _cloneNode.default)(node, true, true);
  116622. }
  116623. }
  116624. });
  116625. // node_modules/@babel/helper-get-function-arity/node_modules/@babel/types/lib/clone/cloneWithoutLoc.js
  116626. var require_cloneWithoutLoc5 = __commonJS({
  116627. "node_modules/@babel/helper-get-function-arity/node_modules/@babel/types/lib/clone/cloneWithoutLoc.js"(exports) {
  116628. "use strict";
  116629. Object.defineProperty(exports, "__esModule", {
  116630. value: true
  116631. });
  116632. exports.default = cloneWithoutLoc;
  116633. var _cloneNode = require_cloneNode5();
  116634. function cloneWithoutLoc(node) {
  116635. return (0, _cloneNode.default)(node, false, true);
  116636. }
  116637. }
  116638. });
  116639. // node_modules/@babel/helper-get-function-arity/node_modules/@babel/types/lib/comments/addComments.js
  116640. var require_addComments5 = __commonJS({
  116641. "node_modules/@babel/helper-get-function-arity/node_modules/@babel/types/lib/comments/addComments.js"(exports) {
  116642. "use strict";
  116643. Object.defineProperty(exports, "__esModule", {
  116644. value: true
  116645. });
  116646. exports.default = addComments;
  116647. function addComments(node, type, comments) {
  116648. if (!comments || !node)
  116649. return node;
  116650. const key = `${type}Comments`;
  116651. if (node[key]) {
  116652. if (type === "leading") {
  116653. node[key] = comments.concat(node[key]);
  116654. } else {
  116655. node[key] = node[key].concat(comments);
  116656. }
  116657. } else {
  116658. node[key] = comments;
  116659. }
  116660. return node;
  116661. }
  116662. }
  116663. });
  116664. // node_modules/@babel/helper-get-function-arity/node_modules/@babel/types/lib/comments/addComment.js
  116665. var require_addComment5 = __commonJS({
  116666. "node_modules/@babel/helper-get-function-arity/node_modules/@babel/types/lib/comments/addComment.js"(exports) {
  116667. "use strict";
  116668. Object.defineProperty(exports, "__esModule", {
  116669. value: true
  116670. });
  116671. exports.default = addComment;
  116672. var _addComments = require_addComments5();
  116673. function addComment(node, type, content3, line) {
  116674. return (0, _addComments.default)(node, type, [{
  116675. type: line ? "CommentLine" : "CommentBlock",
  116676. value: content3
  116677. }]);
  116678. }
  116679. }
  116680. });
  116681. // node_modules/@babel/helper-get-function-arity/node_modules/@babel/types/lib/utils/inherit.js
  116682. var require_inherit5 = __commonJS({
  116683. "node_modules/@babel/helper-get-function-arity/node_modules/@babel/types/lib/utils/inherit.js"(exports) {
  116684. "use strict";
  116685. Object.defineProperty(exports, "__esModule", {
  116686. value: true
  116687. });
  116688. exports.default = inherit2;
  116689. function inherit2(key, child, parent) {
  116690. if (child && parent) {
  116691. child[key] = Array.from(new Set([].concat(child[key], parent[key]).filter(Boolean)));
  116692. }
  116693. }
  116694. }
  116695. });
  116696. // node_modules/@babel/helper-get-function-arity/node_modules/@babel/types/lib/comments/inheritInnerComments.js
  116697. var require_inheritInnerComments5 = __commonJS({
  116698. "node_modules/@babel/helper-get-function-arity/node_modules/@babel/types/lib/comments/inheritInnerComments.js"(exports) {
  116699. "use strict";
  116700. Object.defineProperty(exports, "__esModule", {
  116701. value: true
  116702. });
  116703. exports.default = inheritInnerComments;
  116704. var _inherit = require_inherit5();
  116705. function inheritInnerComments(child, parent) {
  116706. (0, _inherit.default)("innerComments", child, parent);
  116707. }
  116708. }
  116709. });
  116710. // node_modules/@babel/helper-get-function-arity/node_modules/@babel/types/lib/comments/inheritLeadingComments.js
  116711. var require_inheritLeadingComments5 = __commonJS({
  116712. "node_modules/@babel/helper-get-function-arity/node_modules/@babel/types/lib/comments/inheritLeadingComments.js"(exports) {
  116713. "use strict";
  116714. Object.defineProperty(exports, "__esModule", {
  116715. value: true
  116716. });
  116717. exports.default = inheritLeadingComments;
  116718. var _inherit = require_inherit5();
  116719. function inheritLeadingComments(child, parent) {
  116720. (0, _inherit.default)("leadingComments", child, parent);
  116721. }
  116722. }
  116723. });
  116724. // node_modules/@babel/helper-get-function-arity/node_modules/@babel/types/lib/comments/inheritTrailingComments.js
  116725. var require_inheritTrailingComments5 = __commonJS({
  116726. "node_modules/@babel/helper-get-function-arity/node_modules/@babel/types/lib/comments/inheritTrailingComments.js"(exports) {
  116727. "use strict";
  116728. Object.defineProperty(exports, "__esModule", {
  116729. value: true
  116730. });
  116731. exports.default = inheritTrailingComments;
  116732. var _inherit = require_inherit5();
  116733. function inheritTrailingComments(child, parent) {
  116734. (0, _inherit.default)("trailingComments", child, parent);
  116735. }
  116736. }
  116737. });
  116738. // node_modules/@babel/helper-get-function-arity/node_modules/@babel/types/lib/comments/inheritsComments.js
  116739. var require_inheritsComments5 = __commonJS({
  116740. "node_modules/@babel/helper-get-function-arity/node_modules/@babel/types/lib/comments/inheritsComments.js"(exports) {
  116741. "use strict";
  116742. Object.defineProperty(exports, "__esModule", {
  116743. value: true
  116744. });
  116745. exports.default = inheritsComments;
  116746. var _inheritTrailingComments = require_inheritTrailingComments5();
  116747. var _inheritLeadingComments = require_inheritLeadingComments5();
  116748. var _inheritInnerComments = require_inheritInnerComments5();
  116749. function inheritsComments(child, parent) {
  116750. (0, _inheritTrailingComments.default)(child, parent);
  116751. (0, _inheritLeadingComments.default)(child, parent);
  116752. (0, _inheritInnerComments.default)(child, parent);
  116753. return child;
  116754. }
  116755. }
  116756. });
  116757. // node_modules/@babel/helper-get-function-arity/node_modules/@babel/types/lib/comments/removeComments.js
  116758. var require_removeComments5 = __commonJS({
  116759. "node_modules/@babel/helper-get-function-arity/node_modules/@babel/types/lib/comments/removeComments.js"(exports) {
  116760. "use strict";
  116761. Object.defineProperty(exports, "__esModule", {
  116762. value: true
  116763. });
  116764. exports.default = removeComments;
  116765. var _constants = require_constants5();
  116766. function removeComments(node) {
  116767. _constants.COMMENT_KEYS.forEach((key) => {
  116768. node[key] = null;
  116769. });
  116770. return node;
  116771. }
  116772. }
  116773. });
  116774. // node_modules/@babel/helper-get-function-arity/node_modules/@babel/types/lib/constants/generated/index.js
  116775. var require_generated24 = __commonJS({
  116776. "node_modules/@babel/helper-get-function-arity/node_modules/@babel/types/lib/constants/generated/index.js"(exports) {
  116777. "use strict";
  116778. Object.defineProperty(exports, "__esModule", {
  116779. value: true
  116780. });
  116781. exports.TSBASETYPE_TYPES = exports.TSTYPE_TYPES = exports.TSTYPEELEMENT_TYPES = exports.PRIVATE_TYPES = exports.JSX_TYPES = exports.ENUMMEMBER_TYPES = exports.ENUMBODY_TYPES = exports.FLOWPREDICATE_TYPES = exports.FLOWDECLARATION_TYPES = exports.FLOWBASEANNOTATION_TYPES = exports.FLOWTYPE_TYPES = exports.FLOW_TYPES = exports.MODULESPECIFIER_TYPES = exports.EXPORTDECLARATION_TYPES = exports.MODULEDECLARATION_TYPES = exports.CLASS_TYPES = exports.PATTERN_TYPES = exports.UNARYLIKE_TYPES = exports.PROPERTY_TYPES = exports.OBJECTMEMBER_TYPES = exports.METHOD_TYPES = exports.USERWHITESPACABLE_TYPES = exports.IMMUTABLE_TYPES = exports.LITERAL_TYPES = exports.TSENTITYNAME_TYPES = exports.LVAL_TYPES = exports.PATTERNLIKE_TYPES = exports.DECLARATION_TYPES = exports.PUREISH_TYPES = exports.FUNCTIONPARENT_TYPES = exports.FUNCTION_TYPES = exports.FORXSTATEMENT_TYPES = exports.FOR_TYPES = exports.EXPRESSIONWRAPPER_TYPES = exports.WHILE_TYPES = exports.LOOP_TYPES = exports.CONDITIONAL_TYPES = exports.COMPLETIONSTATEMENT_TYPES = exports.TERMINATORLESS_TYPES = exports.STATEMENT_TYPES = exports.BLOCK_TYPES = exports.BLOCKPARENT_TYPES = exports.SCOPABLE_TYPES = exports.BINARY_TYPES = exports.EXPRESSION_TYPES = void 0;
  116782. var _definitions = require_definitions5();
  116783. var EXPRESSION_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Expression"];
  116784. exports.EXPRESSION_TYPES = EXPRESSION_TYPES;
  116785. var BINARY_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Binary"];
  116786. exports.BINARY_TYPES = BINARY_TYPES;
  116787. var SCOPABLE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Scopable"];
  116788. exports.SCOPABLE_TYPES = SCOPABLE_TYPES;
  116789. var BLOCKPARENT_TYPES = _definitions.FLIPPED_ALIAS_KEYS["BlockParent"];
  116790. exports.BLOCKPARENT_TYPES = BLOCKPARENT_TYPES;
  116791. var BLOCK_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Block"];
  116792. exports.BLOCK_TYPES = BLOCK_TYPES;
  116793. var STATEMENT_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Statement"];
  116794. exports.STATEMENT_TYPES = STATEMENT_TYPES;
  116795. var TERMINATORLESS_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Terminatorless"];
  116796. exports.TERMINATORLESS_TYPES = TERMINATORLESS_TYPES;
  116797. var COMPLETIONSTATEMENT_TYPES = _definitions.FLIPPED_ALIAS_KEYS["CompletionStatement"];
  116798. exports.COMPLETIONSTATEMENT_TYPES = COMPLETIONSTATEMENT_TYPES;
  116799. var CONDITIONAL_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Conditional"];
  116800. exports.CONDITIONAL_TYPES = CONDITIONAL_TYPES;
  116801. var LOOP_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Loop"];
  116802. exports.LOOP_TYPES = LOOP_TYPES;
  116803. var WHILE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["While"];
  116804. exports.WHILE_TYPES = WHILE_TYPES;
  116805. var EXPRESSIONWRAPPER_TYPES = _definitions.FLIPPED_ALIAS_KEYS["ExpressionWrapper"];
  116806. exports.EXPRESSIONWRAPPER_TYPES = EXPRESSIONWRAPPER_TYPES;
  116807. var FOR_TYPES = _definitions.FLIPPED_ALIAS_KEYS["For"];
  116808. exports.FOR_TYPES = FOR_TYPES;
  116809. var FORXSTATEMENT_TYPES = _definitions.FLIPPED_ALIAS_KEYS["ForXStatement"];
  116810. exports.FORXSTATEMENT_TYPES = FORXSTATEMENT_TYPES;
  116811. var FUNCTION_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Function"];
  116812. exports.FUNCTION_TYPES = FUNCTION_TYPES;
  116813. var FUNCTIONPARENT_TYPES = _definitions.FLIPPED_ALIAS_KEYS["FunctionParent"];
  116814. exports.FUNCTIONPARENT_TYPES = FUNCTIONPARENT_TYPES;
  116815. var PUREISH_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Pureish"];
  116816. exports.PUREISH_TYPES = PUREISH_TYPES;
  116817. var DECLARATION_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Declaration"];
  116818. exports.DECLARATION_TYPES = DECLARATION_TYPES;
  116819. var PATTERNLIKE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["PatternLike"];
  116820. exports.PATTERNLIKE_TYPES = PATTERNLIKE_TYPES;
  116821. var LVAL_TYPES = _definitions.FLIPPED_ALIAS_KEYS["LVal"];
  116822. exports.LVAL_TYPES = LVAL_TYPES;
  116823. var TSENTITYNAME_TYPES = _definitions.FLIPPED_ALIAS_KEYS["TSEntityName"];
  116824. exports.TSENTITYNAME_TYPES = TSENTITYNAME_TYPES;
  116825. var LITERAL_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Literal"];
  116826. exports.LITERAL_TYPES = LITERAL_TYPES;
  116827. var IMMUTABLE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Immutable"];
  116828. exports.IMMUTABLE_TYPES = IMMUTABLE_TYPES;
  116829. var USERWHITESPACABLE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["UserWhitespacable"];
  116830. exports.USERWHITESPACABLE_TYPES = USERWHITESPACABLE_TYPES;
  116831. var METHOD_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Method"];
  116832. exports.METHOD_TYPES = METHOD_TYPES;
  116833. var OBJECTMEMBER_TYPES = _definitions.FLIPPED_ALIAS_KEYS["ObjectMember"];
  116834. exports.OBJECTMEMBER_TYPES = OBJECTMEMBER_TYPES;
  116835. var PROPERTY_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Property"];
  116836. exports.PROPERTY_TYPES = PROPERTY_TYPES;
  116837. var UNARYLIKE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["UnaryLike"];
  116838. exports.UNARYLIKE_TYPES = UNARYLIKE_TYPES;
  116839. var PATTERN_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Pattern"];
  116840. exports.PATTERN_TYPES = PATTERN_TYPES;
  116841. var CLASS_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Class"];
  116842. exports.CLASS_TYPES = CLASS_TYPES;
  116843. var MODULEDECLARATION_TYPES = _definitions.FLIPPED_ALIAS_KEYS["ModuleDeclaration"];
  116844. exports.MODULEDECLARATION_TYPES = MODULEDECLARATION_TYPES;
  116845. var EXPORTDECLARATION_TYPES = _definitions.FLIPPED_ALIAS_KEYS["ExportDeclaration"];
  116846. exports.EXPORTDECLARATION_TYPES = EXPORTDECLARATION_TYPES;
  116847. var MODULESPECIFIER_TYPES = _definitions.FLIPPED_ALIAS_KEYS["ModuleSpecifier"];
  116848. exports.MODULESPECIFIER_TYPES = MODULESPECIFIER_TYPES;
  116849. var FLOW_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Flow"];
  116850. exports.FLOW_TYPES = FLOW_TYPES;
  116851. var FLOWTYPE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["FlowType"];
  116852. exports.FLOWTYPE_TYPES = FLOWTYPE_TYPES;
  116853. var FLOWBASEANNOTATION_TYPES = _definitions.FLIPPED_ALIAS_KEYS["FlowBaseAnnotation"];
  116854. exports.FLOWBASEANNOTATION_TYPES = FLOWBASEANNOTATION_TYPES;
  116855. var FLOWDECLARATION_TYPES = _definitions.FLIPPED_ALIAS_KEYS["FlowDeclaration"];
  116856. exports.FLOWDECLARATION_TYPES = FLOWDECLARATION_TYPES;
  116857. var FLOWPREDICATE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["FlowPredicate"];
  116858. exports.FLOWPREDICATE_TYPES = FLOWPREDICATE_TYPES;
  116859. var ENUMBODY_TYPES = _definitions.FLIPPED_ALIAS_KEYS["EnumBody"];
  116860. exports.ENUMBODY_TYPES = ENUMBODY_TYPES;
  116861. var ENUMMEMBER_TYPES = _definitions.FLIPPED_ALIAS_KEYS["EnumMember"];
  116862. exports.ENUMMEMBER_TYPES = ENUMMEMBER_TYPES;
  116863. var JSX_TYPES = _definitions.FLIPPED_ALIAS_KEYS["JSX"];
  116864. exports.JSX_TYPES = JSX_TYPES;
  116865. var PRIVATE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Private"];
  116866. exports.PRIVATE_TYPES = PRIVATE_TYPES;
  116867. var TSTYPEELEMENT_TYPES = _definitions.FLIPPED_ALIAS_KEYS["TSTypeElement"];
  116868. exports.TSTYPEELEMENT_TYPES = TSTYPEELEMENT_TYPES;
  116869. var TSTYPE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["TSType"];
  116870. exports.TSTYPE_TYPES = TSTYPE_TYPES;
  116871. var TSBASETYPE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["TSBaseType"];
  116872. exports.TSBASETYPE_TYPES = TSBASETYPE_TYPES;
  116873. }
  116874. });
  116875. // node_modules/@babel/helper-get-function-arity/node_modules/@babel/types/lib/converters/toBlock.js
  116876. var require_toBlock5 = __commonJS({
  116877. "node_modules/@babel/helper-get-function-arity/node_modules/@babel/types/lib/converters/toBlock.js"(exports) {
  116878. "use strict";
  116879. Object.defineProperty(exports, "__esModule", {
  116880. value: true
  116881. });
  116882. exports.default = toBlock;
  116883. var _generated = require_generated21();
  116884. var _generated2 = require_generated22();
  116885. function toBlock(node, parent) {
  116886. if ((0, _generated.isBlockStatement)(node)) {
  116887. return node;
  116888. }
  116889. let blockNodes = [];
  116890. if ((0, _generated.isEmptyStatement)(node)) {
  116891. blockNodes = [];
  116892. } else {
  116893. if (!(0, _generated.isStatement)(node)) {
  116894. if ((0, _generated.isFunction)(parent)) {
  116895. node = (0, _generated2.returnStatement)(node);
  116896. } else {
  116897. node = (0, _generated2.expressionStatement)(node);
  116898. }
  116899. }
  116900. blockNodes = [node];
  116901. }
  116902. return (0, _generated2.blockStatement)(blockNodes);
  116903. }
  116904. }
  116905. });
  116906. // node_modules/@babel/helper-get-function-arity/node_modules/@babel/types/lib/converters/ensureBlock.js
  116907. var require_ensureBlock5 = __commonJS({
  116908. "node_modules/@babel/helper-get-function-arity/node_modules/@babel/types/lib/converters/ensureBlock.js"(exports) {
  116909. "use strict";
  116910. Object.defineProperty(exports, "__esModule", {
  116911. value: true
  116912. });
  116913. exports.default = ensureBlock;
  116914. var _toBlock = require_toBlock5();
  116915. function ensureBlock(node, key = "body") {
  116916. return node[key] = (0, _toBlock.default)(node[key], node);
  116917. }
  116918. }
  116919. });
  116920. // node_modules/@babel/helper-get-function-arity/node_modules/@babel/types/lib/converters/toIdentifier.js
  116921. var require_toIdentifier5 = __commonJS({
  116922. "node_modules/@babel/helper-get-function-arity/node_modules/@babel/types/lib/converters/toIdentifier.js"(exports) {
  116923. "use strict";
  116924. Object.defineProperty(exports, "__esModule", {
  116925. value: true
  116926. });
  116927. exports.default = toIdentifier2;
  116928. var _isValidIdentifier = require_isValidIdentifier5();
  116929. var _helperValidatorIdentifier = require_lib26();
  116930. function toIdentifier2(input) {
  116931. input = input + "";
  116932. let name2 = "";
  116933. for (const c of input) {
  116934. name2 += (0, _helperValidatorIdentifier.isIdentifierChar)(c.codePointAt(0)) ? c : "-";
  116935. }
  116936. name2 = name2.replace(/^[-0-9]+/, "");
  116937. name2 = name2.replace(/[-\s]+(.)?/g, function(match, c) {
  116938. return c ? c.toUpperCase() : "";
  116939. });
  116940. if (!(0, _isValidIdentifier.default)(name2)) {
  116941. name2 = `_${name2}`;
  116942. }
  116943. return name2 || "_";
  116944. }
  116945. }
  116946. });
  116947. // node_modules/@babel/helper-get-function-arity/node_modules/@babel/types/lib/converters/toBindingIdentifierName.js
  116948. var require_toBindingIdentifierName5 = __commonJS({
  116949. "node_modules/@babel/helper-get-function-arity/node_modules/@babel/types/lib/converters/toBindingIdentifierName.js"(exports) {
  116950. "use strict";
  116951. Object.defineProperty(exports, "__esModule", {
  116952. value: true
  116953. });
  116954. exports.default = toBindingIdentifierName;
  116955. var _toIdentifier = require_toIdentifier5();
  116956. function toBindingIdentifierName(name2) {
  116957. name2 = (0, _toIdentifier.default)(name2);
  116958. if (name2 === "eval" || name2 === "arguments")
  116959. name2 = "_" + name2;
  116960. return name2;
  116961. }
  116962. }
  116963. });
  116964. // node_modules/@babel/helper-get-function-arity/node_modules/@babel/types/lib/converters/toComputedKey.js
  116965. var require_toComputedKey5 = __commonJS({
  116966. "node_modules/@babel/helper-get-function-arity/node_modules/@babel/types/lib/converters/toComputedKey.js"(exports) {
  116967. "use strict";
  116968. Object.defineProperty(exports, "__esModule", {
  116969. value: true
  116970. });
  116971. exports.default = toComputedKey;
  116972. var _generated = require_generated21();
  116973. var _generated2 = require_generated22();
  116974. function toComputedKey(node, key = node.key || node.property) {
  116975. if (!node.computed && (0, _generated.isIdentifier)(key))
  116976. key = (0, _generated2.stringLiteral)(key.name);
  116977. return key;
  116978. }
  116979. }
  116980. });
  116981. // node_modules/@babel/helper-get-function-arity/node_modules/@babel/types/lib/converters/toExpression.js
  116982. var require_toExpression5 = __commonJS({
  116983. "node_modules/@babel/helper-get-function-arity/node_modules/@babel/types/lib/converters/toExpression.js"(exports) {
  116984. "use strict";
  116985. Object.defineProperty(exports, "__esModule", {
  116986. value: true
  116987. });
  116988. exports.default = void 0;
  116989. var _generated = require_generated21();
  116990. var _default = toExpression;
  116991. exports.default = _default;
  116992. function toExpression(node) {
  116993. if ((0, _generated.isExpressionStatement)(node)) {
  116994. node = node.expression;
  116995. }
  116996. if ((0, _generated.isExpression)(node)) {
  116997. return node;
  116998. }
  116999. if ((0, _generated.isClass)(node)) {
  117000. node.type = "ClassExpression";
  117001. } else if ((0, _generated.isFunction)(node)) {
  117002. node.type = "FunctionExpression";
  117003. }
  117004. if (!(0, _generated.isExpression)(node)) {
  117005. throw new Error(`cannot turn ${node.type} to an expression`);
  117006. }
  117007. return node;
  117008. }
  117009. }
  117010. });
  117011. // node_modules/@babel/helper-get-function-arity/node_modules/@babel/types/lib/traverse/traverseFast.js
  117012. var require_traverseFast5 = __commonJS({
  117013. "node_modules/@babel/helper-get-function-arity/node_modules/@babel/types/lib/traverse/traverseFast.js"(exports) {
  117014. "use strict";
  117015. Object.defineProperty(exports, "__esModule", {
  117016. value: true
  117017. });
  117018. exports.default = traverseFast;
  117019. var _definitions = require_definitions5();
  117020. function traverseFast(node, enter, opts) {
  117021. if (!node)
  117022. return;
  117023. const keys2 = _definitions.VISITOR_KEYS[node.type];
  117024. if (!keys2)
  117025. return;
  117026. opts = opts || {};
  117027. enter(node, opts);
  117028. for (const key of keys2) {
  117029. const subNode = node[key];
  117030. if (Array.isArray(subNode)) {
  117031. for (const node2 of subNode) {
  117032. traverseFast(node2, enter, opts);
  117033. }
  117034. } else {
  117035. traverseFast(subNode, enter, opts);
  117036. }
  117037. }
  117038. }
  117039. }
  117040. });
  117041. // node_modules/@babel/helper-get-function-arity/node_modules/@babel/types/lib/modifications/removeProperties.js
  117042. var require_removeProperties5 = __commonJS({
  117043. "node_modules/@babel/helper-get-function-arity/node_modules/@babel/types/lib/modifications/removeProperties.js"(exports) {
  117044. "use strict";
  117045. Object.defineProperty(exports, "__esModule", {
  117046. value: true
  117047. });
  117048. exports.default = removeProperties;
  117049. var _constants = require_constants5();
  117050. var CLEAR_KEYS = ["tokens", "start", "end", "loc", "raw", "rawValue"];
  117051. var CLEAR_KEYS_PLUS_COMMENTS = _constants.COMMENT_KEYS.concat(["comments"]).concat(CLEAR_KEYS);
  117052. function removeProperties(node, opts = {}) {
  117053. const map = opts.preserveComments ? CLEAR_KEYS : CLEAR_KEYS_PLUS_COMMENTS;
  117054. for (const key of map) {
  117055. if (node[key] != null)
  117056. node[key] = void 0;
  117057. }
  117058. for (const key of Object.keys(node)) {
  117059. if (key[0] === "_" && node[key] != null)
  117060. node[key] = void 0;
  117061. }
  117062. const symbols = Object.getOwnPropertySymbols(node);
  117063. for (const sym of symbols) {
  117064. node[sym] = null;
  117065. }
  117066. }
  117067. }
  117068. });
  117069. // node_modules/@babel/helper-get-function-arity/node_modules/@babel/types/lib/modifications/removePropertiesDeep.js
  117070. var require_removePropertiesDeep5 = __commonJS({
  117071. "node_modules/@babel/helper-get-function-arity/node_modules/@babel/types/lib/modifications/removePropertiesDeep.js"(exports) {
  117072. "use strict";
  117073. Object.defineProperty(exports, "__esModule", {
  117074. value: true
  117075. });
  117076. exports.default = removePropertiesDeep;
  117077. var _traverseFast = require_traverseFast5();
  117078. var _removeProperties = require_removeProperties5();
  117079. function removePropertiesDeep(tree, opts) {
  117080. (0, _traverseFast.default)(tree, _removeProperties.default, opts);
  117081. return tree;
  117082. }
  117083. }
  117084. });
  117085. // node_modules/@babel/helper-get-function-arity/node_modules/@babel/types/lib/converters/toKeyAlias.js
  117086. var require_toKeyAlias5 = __commonJS({
  117087. "node_modules/@babel/helper-get-function-arity/node_modules/@babel/types/lib/converters/toKeyAlias.js"(exports) {
  117088. "use strict";
  117089. Object.defineProperty(exports, "__esModule", {
  117090. value: true
  117091. });
  117092. exports.default = toKeyAlias;
  117093. var _generated = require_generated21();
  117094. var _cloneNode = require_cloneNode5();
  117095. var _removePropertiesDeep = require_removePropertiesDeep5();
  117096. function toKeyAlias(node, key = node.key) {
  117097. let alias;
  117098. if (node.kind === "method") {
  117099. return toKeyAlias.increment() + "";
  117100. } else if ((0, _generated.isIdentifier)(key)) {
  117101. alias = key.name;
  117102. } else if ((0, _generated.isStringLiteral)(key)) {
  117103. alias = JSON.stringify(key.value);
  117104. } else {
  117105. alias = JSON.stringify((0, _removePropertiesDeep.default)((0, _cloneNode.default)(key)));
  117106. }
  117107. if (node.computed) {
  117108. alias = `[${alias}]`;
  117109. }
  117110. if (node.static) {
  117111. alias = `static:${alias}`;
  117112. }
  117113. return alias;
  117114. }
  117115. toKeyAlias.uid = 0;
  117116. toKeyAlias.increment = function() {
  117117. if (toKeyAlias.uid >= Number.MAX_SAFE_INTEGER) {
  117118. return toKeyAlias.uid = 0;
  117119. } else {
  117120. return toKeyAlias.uid++;
  117121. }
  117122. };
  117123. }
  117124. });
  117125. // node_modules/@babel/helper-get-function-arity/node_modules/@babel/types/lib/retrievers/getBindingIdentifiers.js
  117126. var require_getBindingIdentifiers5 = __commonJS({
  117127. "node_modules/@babel/helper-get-function-arity/node_modules/@babel/types/lib/retrievers/getBindingIdentifiers.js"(exports) {
  117128. "use strict";
  117129. Object.defineProperty(exports, "__esModule", {
  117130. value: true
  117131. });
  117132. exports.default = getBindingIdentifiers;
  117133. var _generated = require_generated21();
  117134. function getBindingIdentifiers(node, duplicates, outerOnly) {
  117135. let search2 = [].concat(node);
  117136. const ids = /* @__PURE__ */ Object.create(null);
  117137. while (search2.length) {
  117138. const id = search2.shift();
  117139. if (!id)
  117140. continue;
  117141. const keys2 = getBindingIdentifiers.keys[id.type];
  117142. if ((0, _generated.isIdentifier)(id)) {
  117143. if (duplicates) {
  117144. const _ids = ids[id.name] = ids[id.name] || [];
  117145. _ids.push(id);
  117146. } else {
  117147. ids[id.name] = id;
  117148. }
  117149. continue;
  117150. }
  117151. if ((0, _generated.isExportDeclaration)(id) && !(0, _generated.isExportAllDeclaration)(id)) {
  117152. if ((0, _generated.isDeclaration)(id.declaration)) {
  117153. search2.push(id.declaration);
  117154. }
  117155. continue;
  117156. }
  117157. if (outerOnly) {
  117158. if ((0, _generated.isFunctionDeclaration)(id)) {
  117159. search2.push(id.id);
  117160. continue;
  117161. }
  117162. if ((0, _generated.isFunctionExpression)(id)) {
  117163. continue;
  117164. }
  117165. }
  117166. if (keys2) {
  117167. for (let i = 0; i < keys2.length; i++) {
  117168. const key = keys2[i];
  117169. if (id[key]) {
  117170. search2 = search2.concat(id[key]);
  117171. }
  117172. }
  117173. }
  117174. }
  117175. return ids;
  117176. }
  117177. getBindingIdentifiers.keys = {
  117178. DeclareClass: ["id"],
  117179. DeclareFunction: ["id"],
  117180. DeclareModule: ["id"],
  117181. DeclareVariable: ["id"],
  117182. DeclareInterface: ["id"],
  117183. DeclareTypeAlias: ["id"],
  117184. DeclareOpaqueType: ["id"],
  117185. InterfaceDeclaration: ["id"],
  117186. TypeAlias: ["id"],
  117187. OpaqueType: ["id"],
  117188. CatchClause: ["param"],
  117189. LabeledStatement: ["label"],
  117190. UnaryExpression: ["argument"],
  117191. AssignmentExpression: ["left"],
  117192. ImportSpecifier: ["local"],
  117193. ImportNamespaceSpecifier: ["local"],
  117194. ImportDefaultSpecifier: ["local"],
  117195. ImportDeclaration: ["specifiers"],
  117196. ExportSpecifier: ["exported"],
  117197. ExportNamespaceSpecifier: ["exported"],
  117198. ExportDefaultSpecifier: ["exported"],
  117199. FunctionDeclaration: ["id", "params"],
  117200. FunctionExpression: ["id", "params"],
  117201. ArrowFunctionExpression: ["params"],
  117202. ObjectMethod: ["params"],
  117203. ClassMethod: ["params"],
  117204. ForInStatement: ["left"],
  117205. ForOfStatement: ["left"],
  117206. ClassDeclaration: ["id"],
  117207. ClassExpression: ["id"],
  117208. RestElement: ["argument"],
  117209. UpdateExpression: ["argument"],
  117210. ObjectProperty: ["value"],
  117211. AssignmentPattern: ["left"],
  117212. ArrayPattern: ["elements"],
  117213. ObjectPattern: ["properties"],
  117214. VariableDeclaration: ["declarations"],
  117215. VariableDeclarator: ["id"]
  117216. };
  117217. }
  117218. });
  117219. // node_modules/@babel/helper-get-function-arity/node_modules/@babel/types/lib/converters/gatherSequenceExpressions.js
  117220. var require_gatherSequenceExpressions5 = __commonJS({
  117221. "node_modules/@babel/helper-get-function-arity/node_modules/@babel/types/lib/converters/gatherSequenceExpressions.js"(exports) {
  117222. "use strict";
  117223. Object.defineProperty(exports, "__esModule", {
  117224. value: true
  117225. });
  117226. exports.default = gatherSequenceExpressions;
  117227. var _getBindingIdentifiers = require_getBindingIdentifiers5();
  117228. var _generated = require_generated21();
  117229. var _generated2 = require_generated22();
  117230. var _cloneNode = require_cloneNode5();
  117231. function gatherSequenceExpressions(nodes, scope, declars) {
  117232. const exprs = [];
  117233. let ensureLastUndefined = true;
  117234. for (const node of nodes) {
  117235. if (!(0, _generated.isEmptyStatement)(node)) {
  117236. ensureLastUndefined = false;
  117237. }
  117238. if ((0, _generated.isExpression)(node)) {
  117239. exprs.push(node);
  117240. } else if ((0, _generated.isExpressionStatement)(node)) {
  117241. exprs.push(node.expression);
  117242. } else if ((0, _generated.isVariableDeclaration)(node)) {
  117243. if (node.kind !== "var")
  117244. return;
  117245. for (const declar of node.declarations) {
  117246. const bindings = (0, _getBindingIdentifiers.default)(declar);
  117247. for (const key of Object.keys(bindings)) {
  117248. declars.push({
  117249. kind: node.kind,
  117250. id: (0, _cloneNode.default)(bindings[key])
  117251. });
  117252. }
  117253. if (declar.init) {
  117254. exprs.push((0, _generated2.assignmentExpression)("=", declar.id, declar.init));
  117255. }
  117256. }
  117257. ensureLastUndefined = true;
  117258. } else if ((0, _generated.isIfStatement)(node)) {
  117259. const consequent = node.consequent ? gatherSequenceExpressions([node.consequent], scope, declars) : scope.buildUndefinedNode();
  117260. const alternate = node.alternate ? gatherSequenceExpressions([node.alternate], scope, declars) : scope.buildUndefinedNode();
  117261. if (!consequent || !alternate)
  117262. return;
  117263. exprs.push((0, _generated2.conditionalExpression)(node.test, consequent, alternate));
  117264. } else if ((0, _generated.isBlockStatement)(node)) {
  117265. const body = gatherSequenceExpressions(node.body, scope, declars);
  117266. if (!body)
  117267. return;
  117268. exprs.push(body);
  117269. } else if ((0, _generated.isEmptyStatement)(node)) {
  117270. if (nodes.indexOf(node) === 0) {
  117271. ensureLastUndefined = true;
  117272. }
  117273. } else {
  117274. return;
  117275. }
  117276. }
  117277. if (ensureLastUndefined) {
  117278. exprs.push(scope.buildUndefinedNode());
  117279. }
  117280. if (exprs.length === 1) {
  117281. return exprs[0];
  117282. } else {
  117283. return (0, _generated2.sequenceExpression)(exprs);
  117284. }
  117285. }
  117286. }
  117287. });
  117288. // node_modules/@babel/helper-get-function-arity/node_modules/@babel/types/lib/converters/toSequenceExpression.js
  117289. var require_toSequenceExpression5 = __commonJS({
  117290. "node_modules/@babel/helper-get-function-arity/node_modules/@babel/types/lib/converters/toSequenceExpression.js"(exports) {
  117291. "use strict";
  117292. Object.defineProperty(exports, "__esModule", {
  117293. value: true
  117294. });
  117295. exports.default = toSequenceExpression;
  117296. var _gatherSequenceExpressions = require_gatherSequenceExpressions5();
  117297. function toSequenceExpression(nodes, scope) {
  117298. if (!(nodes != null && nodes.length))
  117299. return;
  117300. const declars = [];
  117301. const result = (0, _gatherSequenceExpressions.default)(nodes, scope, declars);
  117302. if (!result)
  117303. return;
  117304. for (const declar of declars) {
  117305. scope.push(declar);
  117306. }
  117307. return result;
  117308. }
  117309. }
  117310. });
  117311. // node_modules/@babel/helper-get-function-arity/node_modules/@babel/types/lib/converters/toStatement.js
  117312. var require_toStatement5 = __commonJS({
  117313. "node_modules/@babel/helper-get-function-arity/node_modules/@babel/types/lib/converters/toStatement.js"(exports) {
  117314. "use strict";
  117315. Object.defineProperty(exports, "__esModule", {
  117316. value: true
  117317. });
  117318. exports.default = void 0;
  117319. var _generated = require_generated21();
  117320. var _generated2 = require_generated22();
  117321. var _default = toStatement;
  117322. exports.default = _default;
  117323. function toStatement(node, ignore3) {
  117324. if ((0, _generated.isStatement)(node)) {
  117325. return node;
  117326. }
  117327. let mustHaveId = false;
  117328. let newType;
  117329. if ((0, _generated.isClass)(node)) {
  117330. mustHaveId = true;
  117331. newType = "ClassDeclaration";
  117332. } else if ((0, _generated.isFunction)(node)) {
  117333. mustHaveId = true;
  117334. newType = "FunctionDeclaration";
  117335. } else if ((0, _generated.isAssignmentExpression)(node)) {
  117336. return (0, _generated2.expressionStatement)(node);
  117337. }
  117338. if (mustHaveId && !node.id) {
  117339. newType = false;
  117340. }
  117341. if (!newType) {
  117342. if (ignore3) {
  117343. return false;
  117344. } else {
  117345. throw new Error(`cannot turn ${node.type} to a statement`);
  117346. }
  117347. }
  117348. node.type = newType;
  117349. return node;
  117350. }
  117351. }
  117352. });
  117353. // node_modules/@babel/helper-get-function-arity/node_modules/@babel/types/lib/converters/valueToNode.js
  117354. var require_valueToNode5 = __commonJS({
  117355. "node_modules/@babel/helper-get-function-arity/node_modules/@babel/types/lib/converters/valueToNode.js"(exports) {
  117356. "use strict";
  117357. Object.defineProperty(exports, "__esModule", {
  117358. value: true
  117359. });
  117360. exports.default = void 0;
  117361. var _isValidIdentifier = require_isValidIdentifier5();
  117362. var _generated = require_generated22();
  117363. var _default = valueToNode;
  117364. exports.default = _default;
  117365. var objectToString = Function.call.bind(Object.prototype.toString);
  117366. function isRegExp(value) {
  117367. return objectToString(value) === "[object RegExp]";
  117368. }
  117369. function isPlainObject2(value) {
  117370. if (typeof value !== "object" || value === null || Object.prototype.toString.call(value) !== "[object Object]") {
  117371. return false;
  117372. }
  117373. const proto = Object.getPrototypeOf(value);
  117374. return proto === null || Object.getPrototypeOf(proto) === null;
  117375. }
  117376. function valueToNode(value) {
  117377. if (value === void 0) {
  117378. return (0, _generated.identifier)("undefined");
  117379. }
  117380. if (value === true || value === false) {
  117381. return (0, _generated.booleanLiteral)(value);
  117382. }
  117383. if (value === null) {
  117384. return (0, _generated.nullLiteral)();
  117385. }
  117386. if (typeof value === "string") {
  117387. return (0, _generated.stringLiteral)(value);
  117388. }
  117389. if (typeof value === "number") {
  117390. let result;
  117391. if (Number.isFinite(value)) {
  117392. result = (0, _generated.numericLiteral)(Math.abs(value));
  117393. } else {
  117394. let numerator;
  117395. if (Number.isNaN(value)) {
  117396. numerator = (0, _generated.numericLiteral)(0);
  117397. } else {
  117398. numerator = (0, _generated.numericLiteral)(1);
  117399. }
  117400. result = (0, _generated.binaryExpression)("/", numerator, (0, _generated.numericLiteral)(0));
  117401. }
  117402. if (value < 0 || Object.is(value, -0)) {
  117403. result = (0, _generated.unaryExpression)("-", result);
  117404. }
  117405. return result;
  117406. }
  117407. if (isRegExp(value)) {
  117408. const pattern = value.source;
  117409. const flags = value.toString().match(/\/([a-z]+|)$/)[1];
  117410. return (0, _generated.regExpLiteral)(pattern, flags);
  117411. }
  117412. if (Array.isArray(value)) {
  117413. return (0, _generated.arrayExpression)(value.map(valueToNode));
  117414. }
  117415. if (isPlainObject2(value)) {
  117416. const props = [];
  117417. for (const key of Object.keys(value)) {
  117418. let nodeKey;
  117419. if ((0, _isValidIdentifier.default)(key)) {
  117420. nodeKey = (0, _generated.identifier)(key);
  117421. } else {
  117422. nodeKey = (0, _generated.stringLiteral)(key);
  117423. }
  117424. props.push((0, _generated.objectProperty)(nodeKey, valueToNode(value[key])));
  117425. }
  117426. return (0, _generated.objectExpression)(props);
  117427. }
  117428. throw new Error("don't know how to turn this value into a node");
  117429. }
  117430. }
  117431. });
  117432. // node_modules/@babel/helper-get-function-arity/node_modules/@babel/types/lib/modifications/appendToMemberExpression.js
  117433. var require_appendToMemberExpression5 = __commonJS({
  117434. "node_modules/@babel/helper-get-function-arity/node_modules/@babel/types/lib/modifications/appendToMemberExpression.js"(exports) {
  117435. "use strict";
  117436. Object.defineProperty(exports, "__esModule", {
  117437. value: true
  117438. });
  117439. exports.default = appendToMemberExpression;
  117440. var _generated = require_generated22();
  117441. function appendToMemberExpression(member, append, computed = false) {
  117442. member.object = (0, _generated.memberExpression)(member.object, member.property, member.computed);
  117443. member.property = append;
  117444. member.computed = !!computed;
  117445. return member;
  117446. }
  117447. }
  117448. });
  117449. // node_modules/@babel/helper-get-function-arity/node_modules/@babel/types/lib/modifications/inherits.js
  117450. var require_inherits5 = __commonJS({
  117451. "node_modules/@babel/helper-get-function-arity/node_modules/@babel/types/lib/modifications/inherits.js"(exports) {
  117452. "use strict";
  117453. Object.defineProperty(exports, "__esModule", {
  117454. value: true
  117455. });
  117456. exports.default = inherits;
  117457. var _constants = require_constants5();
  117458. var _inheritsComments = require_inheritsComments5();
  117459. function inherits(child, parent) {
  117460. if (!child || !parent)
  117461. return child;
  117462. for (const key of _constants.INHERIT_KEYS.optional) {
  117463. if (child[key] == null) {
  117464. child[key] = parent[key];
  117465. }
  117466. }
  117467. for (const key of Object.keys(parent)) {
  117468. if (key[0] === "_" && key !== "__clone")
  117469. child[key] = parent[key];
  117470. }
  117471. for (const key of _constants.INHERIT_KEYS.force) {
  117472. child[key] = parent[key];
  117473. }
  117474. (0, _inheritsComments.default)(child, parent);
  117475. return child;
  117476. }
  117477. }
  117478. });
  117479. // node_modules/@babel/helper-get-function-arity/node_modules/@babel/types/lib/modifications/prependToMemberExpression.js
  117480. var require_prependToMemberExpression5 = __commonJS({
  117481. "node_modules/@babel/helper-get-function-arity/node_modules/@babel/types/lib/modifications/prependToMemberExpression.js"(exports) {
  117482. "use strict";
  117483. Object.defineProperty(exports, "__esModule", {
  117484. value: true
  117485. });
  117486. exports.default = prependToMemberExpression;
  117487. var _generated = require_generated22();
  117488. function prependToMemberExpression(member, prepend) {
  117489. member.object = (0, _generated.memberExpression)(prepend, member.object);
  117490. return member;
  117491. }
  117492. }
  117493. });
  117494. // node_modules/@babel/helper-get-function-arity/node_modules/@babel/types/lib/retrievers/getOuterBindingIdentifiers.js
  117495. var require_getOuterBindingIdentifiers5 = __commonJS({
  117496. "node_modules/@babel/helper-get-function-arity/node_modules/@babel/types/lib/retrievers/getOuterBindingIdentifiers.js"(exports) {
  117497. "use strict";
  117498. Object.defineProperty(exports, "__esModule", {
  117499. value: true
  117500. });
  117501. exports.default = void 0;
  117502. var _getBindingIdentifiers = require_getBindingIdentifiers5();
  117503. var _default = getOuterBindingIdentifiers;
  117504. exports.default = _default;
  117505. function getOuterBindingIdentifiers(node, duplicates) {
  117506. return (0, _getBindingIdentifiers.default)(node, duplicates, true);
  117507. }
  117508. }
  117509. });
  117510. // node_modules/@babel/helper-get-function-arity/node_modules/@babel/types/lib/traverse/traverse.js
  117511. var require_traverse5 = __commonJS({
  117512. "node_modules/@babel/helper-get-function-arity/node_modules/@babel/types/lib/traverse/traverse.js"(exports) {
  117513. "use strict";
  117514. Object.defineProperty(exports, "__esModule", {
  117515. value: true
  117516. });
  117517. exports.default = traverse;
  117518. var _definitions = require_definitions5();
  117519. function traverse(node, handlers2, state) {
  117520. if (typeof handlers2 === "function") {
  117521. handlers2 = {
  117522. enter: handlers2
  117523. };
  117524. }
  117525. const {
  117526. enter,
  117527. exit: exit2
  117528. } = handlers2;
  117529. traverseSimpleImpl(node, enter, exit2, state, []);
  117530. }
  117531. function traverseSimpleImpl(node, enter, exit2, state, ancestors) {
  117532. const keys2 = _definitions.VISITOR_KEYS[node.type];
  117533. if (!keys2)
  117534. return;
  117535. if (enter)
  117536. enter(node, ancestors, state);
  117537. for (const key of keys2) {
  117538. const subNode = node[key];
  117539. if (Array.isArray(subNode)) {
  117540. for (let i = 0; i < subNode.length; i++) {
  117541. const child = subNode[i];
  117542. if (!child)
  117543. continue;
  117544. ancestors.push({
  117545. node,
  117546. key,
  117547. index: i
  117548. });
  117549. traverseSimpleImpl(child, enter, exit2, state, ancestors);
  117550. ancestors.pop();
  117551. }
  117552. } else if (subNode) {
  117553. ancestors.push({
  117554. node,
  117555. key
  117556. });
  117557. traverseSimpleImpl(subNode, enter, exit2, state, ancestors);
  117558. ancestors.pop();
  117559. }
  117560. }
  117561. if (exit2)
  117562. exit2(node, ancestors, state);
  117563. }
  117564. }
  117565. });
  117566. // node_modules/@babel/helper-get-function-arity/node_modules/@babel/types/lib/validators/isBinding.js
  117567. var require_isBinding5 = __commonJS({
  117568. "node_modules/@babel/helper-get-function-arity/node_modules/@babel/types/lib/validators/isBinding.js"(exports) {
  117569. "use strict";
  117570. Object.defineProperty(exports, "__esModule", {
  117571. value: true
  117572. });
  117573. exports.default = isBinding;
  117574. var _getBindingIdentifiers = require_getBindingIdentifiers5();
  117575. function isBinding(node, parent, grandparent) {
  117576. if (grandparent && node.type === "Identifier" && parent.type === "ObjectProperty" && grandparent.type === "ObjectExpression") {
  117577. return false;
  117578. }
  117579. const keys2 = _getBindingIdentifiers.default.keys[parent.type];
  117580. if (keys2) {
  117581. for (let i = 0; i < keys2.length; i++) {
  117582. const key = keys2[i];
  117583. const val = parent[key];
  117584. if (Array.isArray(val)) {
  117585. if (val.indexOf(node) >= 0)
  117586. return true;
  117587. } else {
  117588. if (val === node)
  117589. return true;
  117590. }
  117591. }
  117592. }
  117593. return false;
  117594. }
  117595. }
  117596. });
  117597. // node_modules/@babel/helper-get-function-arity/node_modules/@babel/types/lib/validators/isLet.js
  117598. var require_isLet5 = __commonJS({
  117599. "node_modules/@babel/helper-get-function-arity/node_modules/@babel/types/lib/validators/isLet.js"(exports) {
  117600. "use strict";
  117601. Object.defineProperty(exports, "__esModule", {
  117602. value: true
  117603. });
  117604. exports.default = isLet;
  117605. var _generated = require_generated21();
  117606. var _constants = require_constants5();
  117607. function isLet(node) {
  117608. return (0, _generated.isVariableDeclaration)(node) && (node.kind !== "var" || node[_constants.BLOCK_SCOPED_SYMBOL]);
  117609. }
  117610. }
  117611. });
  117612. // node_modules/@babel/helper-get-function-arity/node_modules/@babel/types/lib/validators/isBlockScoped.js
  117613. var require_isBlockScoped5 = __commonJS({
  117614. "node_modules/@babel/helper-get-function-arity/node_modules/@babel/types/lib/validators/isBlockScoped.js"(exports) {
  117615. "use strict";
  117616. Object.defineProperty(exports, "__esModule", {
  117617. value: true
  117618. });
  117619. exports.default = isBlockScoped;
  117620. var _generated = require_generated21();
  117621. var _isLet = require_isLet5();
  117622. function isBlockScoped(node) {
  117623. return (0, _generated.isFunctionDeclaration)(node) || (0, _generated.isClassDeclaration)(node) || (0, _isLet.default)(node);
  117624. }
  117625. }
  117626. });
  117627. // node_modules/@babel/helper-get-function-arity/node_modules/@babel/types/lib/validators/isImmutable.js
  117628. var require_isImmutable5 = __commonJS({
  117629. "node_modules/@babel/helper-get-function-arity/node_modules/@babel/types/lib/validators/isImmutable.js"(exports) {
  117630. "use strict";
  117631. Object.defineProperty(exports, "__esModule", {
  117632. value: true
  117633. });
  117634. exports.default = isImmutable;
  117635. var _isType = require_isType5();
  117636. var _generated = require_generated21();
  117637. function isImmutable(node) {
  117638. if ((0, _isType.default)(node.type, "Immutable"))
  117639. return true;
  117640. if ((0, _generated.isIdentifier)(node)) {
  117641. if (node.name === "undefined") {
  117642. return true;
  117643. } else {
  117644. return false;
  117645. }
  117646. }
  117647. return false;
  117648. }
  117649. }
  117650. });
  117651. // node_modules/@babel/helper-get-function-arity/node_modules/@babel/types/lib/validators/isNodesEquivalent.js
  117652. var require_isNodesEquivalent5 = __commonJS({
  117653. "node_modules/@babel/helper-get-function-arity/node_modules/@babel/types/lib/validators/isNodesEquivalent.js"(exports) {
  117654. "use strict";
  117655. Object.defineProperty(exports, "__esModule", {
  117656. value: true
  117657. });
  117658. exports.default = isNodesEquivalent;
  117659. var _definitions = require_definitions5();
  117660. function isNodesEquivalent(a, b) {
  117661. if (typeof a !== "object" || typeof b !== "object" || a == null || b == null) {
  117662. return a === b;
  117663. }
  117664. if (a.type !== b.type) {
  117665. return false;
  117666. }
  117667. const fields = Object.keys(_definitions.NODE_FIELDS[a.type] || a.type);
  117668. const visitorKeys = _definitions.VISITOR_KEYS[a.type];
  117669. for (const field of fields) {
  117670. if (typeof a[field] !== typeof b[field]) {
  117671. return false;
  117672. }
  117673. if (a[field] == null && b[field] == null) {
  117674. continue;
  117675. } else if (a[field] == null || b[field] == null) {
  117676. return false;
  117677. }
  117678. if (Array.isArray(a[field])) {
  117679. if (!Array.isArray(b[field])) {
  117680. return false;
  117681. }
  117682. if (a[field].length !== b[field].length) {
  117683. return false;
  117684. }
  117685. for (let i = 0; i < a[field].length; i++) {
  117686. if (!isNodesEquivalent(a[field][i], b[field][i])) {
  117687. return false;
  117688. }
  117689. }
  117690. continue;
  117691. }
  117692. if (typeof a[field] === "object" && !(visitorKeys != null && visitorKeys.includes(field))) {
  117693. for (const key of Object.keys(a[field])) {
  117694. if (a[field][key] !== b[field][key]) {
  117695. return false;
  117696. }
  117697. }
  117698. continue;
  117699. }
  117700. if (!isNodesEquivalent(a[field], b[field])) {
  117701. return false;
  117702. }
  117703. }
  117704. return true;
  117705. }
  117706. }
  117707. });
  117708. // node_modules/@babel/helper-get-function-arity/node_modules/@babel/types/lib/validators/isReferenced.js
  117709. var require_isReferenced5 = __commonJS({
  117710. "node_modules/@babel/helper-get-function-arity/node_modules/@babel/types/lib/validators/isReferenced.js"(exports) {
  117711. "use strict";
  117712. Object.defineProperty(exports, "__esModule", {
  117713. value: true
  117714. });
  117715. exports.default = isReferenced;
  117716. function isReferenced(node, parent, grandparent) {
  117717. switch (parent.type) {
  117718. case "MemberExpression":
  117719. case "JSXMemberExpression":
  117720. case "OptionalMemberExpression":
  117721. if (parent.property === node) {
  117722. return !!parent.computed;
  117723. }
  117724. return parent.object === node;
  117725. case "VariableDeclarator":
  117726. return parent.init === node;
  117727. case "ArrowFunctionExpression":
  117728. return parent.body === node;
  117729. case "PrivateName":
  117730. return false;
  117731. case "ClassMethod":
  117732. case "ClassPrivateMethod":
  117733. case "ObjectMethod":
  117734. if (parent.params.includes(node)) {
  117735. return false;
  117736. }
  117737. case "ObjectProperty":
  117738. case "ClassProperty":
  117739. case "ClassPrivateProperty":
  117740. if (parent.key === node) {
  117741. return !!parent.computed;
  117742. }
  117743. if (parent.value === node) {
  117744. return !grandparent || grandparent.type !== "ObjectPattern";
  117745. }
  117746. return true;
  117747. case "ClassDeclaration":
  117748. case "ClassExpression":
  117749. return parent.superClass === node;
  117750. case "AssignmentExpression":
  117751. return parent.right === node;
  117752. case "AssignmentPattern":
  117753. return parent.right === node;
  117754. case "LabeledStatement":
  117755. return false;
  117756. case "CatchClause":
  117757. return false;
  117758. case "RestElement":
  117759. return false;
  117760. case "BreakStatement":
  117761. case "ContinueStatement":
  117762. return false;
  117763. case "FunctionDeclaration":
  117764. case "FunctionExpression":
  117765. return false;
  117766. case "ExportNamespaceSpecifier":
  117767. case "ExportDefaultSpecifier":
  117768. return false;
  117769. case "ExportSpecifier":
  117770. if (grandparent != null && grandparent.source) {
  117771. return false;
  117772. }
  117773. return parent.local === node;
  117774. case "ImportDefaultSpecifier":
  117775. case "ImportNamespaceSpecifier":
  117776. case "ImportSpecifier":
  117777. return false;
  117778. case "JSXAttribute":
  117779. return false;
  117780. case "ObjectPattern":
  117781. case "ArrayPattern":
  117782. return false;
  117783. case "MetaProperty":
  117784. return false;
  117785. case "ObjectTypeProperty":
  117786. return parent.key !== node;
  117787. case "TSEnumMember":
  117788. return parent.id !== node;
  117789. case "TSPropertySignature":
  117790. if (parent.key === node) {
  117791. return !!parent.computed;
  117792. }
  117793. return true;
  117794. }
  117795. return true;
  117796. }
  117797. }
  117798. });
  117799. // node_modules/@babel/helper-get-function-arity/node_modules/@babel/types/lib/validators/isScope.js
  117800. var require_isScope5 = __commonJS({
  117801. "node_modules/@babel/helper-get-function-arity/node_modules/@babel/types/lib/validators/isScope.js"(exports) {
  117802. "use strict";
  117803. Object.defineProperty(exports, "__esModule", {
  117804. value: true
  117805. });
  117806. exports.default = isScope;
  117807. var _generated = require_generated21();
  117808. function isScope(node, parent) {
  117809. if ((0, _generated.isBlockStatement)(node) && ((0, _generated.isFunction)(parent) || (0, _generated.isCatchClause)(parent))) {
  117810. return false;
  117811. }
  117812. if ((0, _generated.isPattern)(node) && ((0, _generated.isFunction)(parent) || (0, _generated.isCatchClause)(parent))) {
  117813. return true;
  117814. }
  117815. return (0, _generated.isScopable)(node);
  117816. }
  117817. }
  117818. });
  117819. // node_modules/@babel/helper-get-function-arity/node_modules/@babel/types/lib/validators/isSpecifierDefault.js
  117820. var require_isSpecifierDefault5 = __commonJS({
  117821. "node_modules/@babel/helper-get-function-arity/node_modules/@babel/types/lib/validators/isSpecifierDefault.js"(exports) {
  117822. "use strict";
  117823. Object.defineProperty(exports, "__esModule", {
  117824. value: true
  117825. });
  117826. exports.default = isSpecifierDefault;
  117827. var _generated = require_generated21();
  117828. function isSpecifierDefault(specifier) {
  117829. return (0, _generated.isImportDefaultSpecifier)(specifier) || (0, _generated.isIdentifier)(specifier.imported || specifier.exported, {
  117830. name: "default"
  117831. });
  117832. }
  117833. }
  117834. });
  117835. // node_modules/@babel/helper-get-function-arity/node_modules/@babel/types/lib/validators/isValidES3Identifier.js
  117836. var require_isValidES3Identifier5 = __commonJS({
  117837. "node_modules/@babel/helper-get-function-arity/node_modules/@babel/types/lib/validators/isValidES3Identifier.js"(exports) {
  117838. "use strict";
  117839. Object.defineProperty(exports, "__esModule", {
  117840. value: true
  117841. });
  117842. exports.default = isValidES3Identifier;
  117843. var _isValidIdentifier = require_isValidIdentifier5();
  117844. var RESERVED_WORDS_ES3_ONLY = /* @__PURE__ */ new Set(["abstract", "boolean", "byte", "char", "double", "enum", "final", "float", "goto", "implements", "int", "interface", "long", "native", "package", "private", "protected", "public", "short", "static", "synchronized", "throws", "transient", "volatile"]);
  117845. function isValidES3Identifier(name2) {
  117846. return (0, _isValidIdentifier.default)(name2) && !RESERVED_WORDS_ES3_ONLY.has(name2);
  117847. }
  117848. }
  117849. });
  117850. // node_modules/@babel/helper-get-function-arity/node_modules/@babel/types/lib/validators/isVar.js
  117851. var require_isVar5 = __commonJS({
  117852. "node_modules/@babel/helper-get-function-arity/node_modules/@babel/types/lib/validators/isVar.js"(exports) {
  117853. "use strict";
  117854. Object.defineProperty(exports, "__esModule", {
  117855. value: true
  117856. });
  117857. exports.default = isVar;
  117858. var _generated = require_generated21();
  117859. var _constants = require_constants5();
  117860. function isVar(node) {
  117861. return (0, _generated.isVariableDeclaration)(node, {
  117862. kind: "var"
  117863. }) && !node[_constants.BLOCK_SCOPED_SYMBOL];
  117864. }
  117865. }
  117866. });
  117867. // node_modules/@babel/helper-get-function-arity/node_modules/@babel/types/lib/ast-types/generated/index.js
  117868. var require_generated25 = __commonJS({
  117869. "node_modules/@babel/helper-get-function-arity/node_modules/@babel/types/lib/ast-types/generated/index.js"() {
  117870. }
  117871. });
  117872. // node_modules/@babel/helper-get-function-arity/node_modules/@babel/types/lib/index.js
  117873. var require_lib27 = __commonJS({
  117874. "node_modules/@babel/helper-get-function-arity/node_modules/@babel/types/lib/index.js"(exports) {
  117875. "use strict";
  117876. Object.defineProperty(exports, "__esModule", {
  117877. value: true
  117878. });
  117879. var _exportNames = {
  117880. react: true,
  117881. assertNode: true,
  117882. createTypeAnnotationBasedOnTypeof: true,
  117883. createUnionTypeAnnotation: true,
  117884. createFlowUnionType: true,
  117885. createTSUnionType: true,
  117886. cloneNode: true,
  117887. clone: true,
  117888. cloneDeep: true,
  117889. cloneDeepWithoutLoc: true,
  117890. cloneWithoutLoc: true,
  117891. addComment: true,
  117892. addComments: true,
  117893. inheritInnerComments: true,
  117894. inheritLeadingComments: true,
  117895. inheritsComments: true,
  117896. inheritTrailingComments: true,
  117897. removeComments: true,
  117898. ensureBlock: true,
  117899. toBindingIdentifierName: true,
  117900. toBlock: true,
  117901. toComputedKey: true,
  117902. toExpression: true,
  117903. toIdentifier: true,
  117904. toKeyAlias: true,
  117905. toSequenceExpression: true,
  117906. toStatement: true,
  117907. valueToNode: true,
  117908. appendToMemberExpression: true,
  117909. inherits: true,
  117910. prependToMemberExpression: true,
  117911. removeProperties: true,
  117912. removePropertiesDeep: true,
  117913. removeTypeDuplicates: true,
  117914. getBindingIdentifiers: true,
  117915. getOuterBindingIdentifiers: true,
  117916. traverse: true,
  117917. traverseFast: true,
  117918. shallowEqual: true,
  117919. is: true,
  117920. isBinding: true,
  117921. isBlockScoped: true,
  117922. isImmutable: true,
  117923. isLet: true,
  117924. isNode: true,
  117925. isNodesEquivalent: true,
  117926. isPlaceholderType: true,
  117927. isReferenced: true,
  117928. isScope: true,
  117929. isSpecifierDefault: true,
  117930. isType: true,
  117931. isValidES3Identifier: true,
  117932. isValidIdentifier: true,
  117933. isVar: true,
  117934. matchesPattern: true,
  117935. validate: true,
  117936. buildMatchMemberExpression: true
  117937. };
  117938. Object.defineProperty(exports, "assertNode", {
  117939. enumerable: true,
  117940. get: function() {
  117941. return _assertNode.default;
  117942. }
  117943. });
  117944. Object.defineProperty(exports, "createTypeAnnotationBasedOnTypeof", {
  117945. enumerable: true,
  117946. get: function() {
  117947. return _createTypeAnnotationBasedOnTypeof.default;
  117948. }
  117949. });
  117950. Object.defineProperty(exports, "createUnionTypeAnnotation", {
  117951. enumerable: true,
  117952. get: function() {
  117953. return _createFlowUnionType.default;
  117954. }
  117955. });
  117956. Object.defineProperty(exports, "createFlowUnionType", {
  117957. enumerable: true,
  117958. get: function() {
  117959. return _createFlowUnionType.default;
  117960. }
  117961. });
  117962. Object.defineProperty(exports, "createTSUnionType", {
  117963. enumerable: true,
  117964. get: function() {
  117965. return _createTSUnionType.default;
  117966. }
  117967. });
  117968. Object.defineProperty(exports, "cloneNode", {
  117969. enumerable: true,
  117970. get: function() {
  117971. return _cloneNode.default;
  117972. }
  117973. });
  117974. Object.defineProperty(exports, "clone", {
  117975. enumerable: true,
  117976. get: function() {
  117977. return _clone.default;
  117978. }
  117979. });
  117980. Object.defineProperty(exports, "cloneDeep", {
  117981. enumerable: true,
  117982. get: function() {
  117983. return _cloneDeep.default;
  117984. }
  117985. });
  117986. Object.defineProperty(exports, "cloneDeepWithoutLoc", {
  117987. enumerable: true,
  117988. get: function() {
  117989. return _cloneDeepWithoutLoc.default;
  117990. }
  117991. });
  117992. Object.defineProperty(exports, "cloneWithoutLoc", {
  117993. enumerable: true,
  117994. get: function() {
  117995. return _cloneWithoutLoc.default;
  117996. }
  117997. });
  117998. Object.defineProperty(exports, "addComment", {
  117999. enumerable: true,
  118000. get: function() {
  118001. return _addComment.default;
  118002. }
  118003. });
  118004. Object.defineProperty(exports, "addComments", {
  118005. enumerable: true,
  118006. get: function() {
  118007. return _addComments.default;
  118008. }
  118009. });
  118010. Object.defineProperty(exports, "inheritInnerComments", {
  118011. enumerable: true,
  118012. get: function() {
  118013. return _inheritInnerComments.default;
  118014. }
  118015. });
  118016. Object.defineProperty(exports, "inheritLeadingComments", {
  118017. enumerable: true,
  118018. get: function() {
  118019. return _inheritLeadingComments.default;
  118020. }
  118021. });
  118022. Object.defineProperty(exports, "inheritsComments", {
  118023. enumerable: true,
  118024. get: function() {
  118025. return _inheritsComments.default;
  118026. }
  118027. });
  118028. Object.defineProperty(exports, "inheritTrailingComments", {
  118029. enumerable: true,
  118030. get: function() {
  118031. return _inheritTrailingComments.default;
  118032. }
  118033. });
  118034. Object.defineProperty(exports, "removeComments", {
  118035. enumerable: true,
  118036. get: function() {
  118037. return _removeComments.default;
  118038. }
  118039. });
  118040. Object.defineProperty(exports, "ensureBlock", {
  118041. enumerable: true,
  118042. get: function() {
  118043. return _ensureBlock.default;
  118044. }
  118045. });
  118046. Object.defineProperty(exports, "toBindingIdentifierName", {
  118047. enumerable: true,
  118048. get: function() {
  118049. return _toBindingIdentifierName.default;
  118050. }
  118051. });
  118052. Object.defineProperty(exports, "toBlock", {
  118053. enumerable: true,
  118054. get: function() {
  118055. return _toBlock.default;
  118056. }
  118057. });
  118058. Object.defineProperty(exports, "toComputedKey", {
  118059. enumerable: true,
  118060. get: function() {
  118061. return _toComputedKey.default;
  118062. }
  118063. });
  118064. Object.defineProperty(exports, "toExpression", {
  118065. enumerable: true,
  118066. get: function() {
  118067. return _toExpression.default;
  118068. }
  118069. });
  118070. Object.defineProperty(exports, "toIdentifier", {
  118071. enumerable: true,
  118072. get: function() {
  118073. return _toIdentifier.default;
  118074. }
  118075. });
  118076. Object.defineProperty(exports, "toKeyAlias", {
  118077. enumerable: true,
  118078. get: function() {
  118079. return _toKeyAlias.default;
  118080. }
  118081. });
  118082. Object.defineProperty(exports, "toSequenceExpression", {
  118083. enumerable: true,
  118084. get: function() {
  118085. return _toSequenceExpression.default;
  118086. }
  118087. });
  118088. Object.defineProperty(exports, "toStatement", {
  118089. enumerable: true,
  118090. get: function() {
  118091. return _toStatement.default;
  118092. }
  118093. });
  118094. Object.defineProperty(exports, "valueToNode", {
  118095. enumerable: true,
  118096. get: function() {
  118097. return _valueToNode.default;
  118098. }
  118099. });
  118100. Object.defineProperty(exports, "appendToMemberExpression", {
  118101. enumerable: true,
  118102. get: function() {
  118103. return _appendToMemberExpression.default;
  118104. }
  118105. });
  118106. Object.defineProperty(exports, "inherits", {
  118107. enumerable: true,
  118108. get: function() {
  118109. return _inherits.default;
  118110. }
  118111. });
  118112. Object.defineProperty(exports, "prependToMemberExpression", {
  118113. enumerable: true,
  118114. get: function() {
  118115. return _prependToMemberExpression.default;
  118116. }
  118117. });
  118118. Object.defineProperty(exports, "removeProperties", {
  118119. enumerable: true,
  118120. get: function() {
  118121. return _removeProperties.default;
  118122. }
  118123. });
  118124. Object.defineProperty(exports, "removePropertiesDeep", {
  118125. enumerable: true,
  118126. get: function() {
  118127. return _removePropertiesDeep.default;
  118128. }
  118129. });
  118130. Object.defineProperty(exports, "removeTypeDuplicates", {
  118131. enumerable: true,
  118132. get: function() {
  118133. return _removeTypeDuplicates.default;
  118134. }
  118135. });
  118136. Object.defineProperty(exports, "getBindingIdentifiers", {
  118137. enumerable: true,
  118138. get: function() {
  118139. return _getBindingIdentifiers.default;
  118140. }
  118141. });
  118142. Object.defineProperty(exports, "getOuterBindingIdentifiers", {
  118143. enumerable: true,
  118144. get: function() {
  118145. return _getOuterBindingIdentifiers.default;
  118146. }
  118147. });
  118148. Object.defineProperty(exports, "traverse", {
  118149. enumerable: true,
  118150. get: function() {
  118151. return _traverse.default;
  118152. }
  118153. });
  118154. Object.defineProperty(exports, "traverseFast", {
  118155. enumerable: true,
  118156. get: function() {
  118157. return _traverseFast.default;
  118158. }
  118159. });
  118160. Object.defineProperty(exports, "shallowEqual", {
  118161. enumerable: true,
  118162. get: function() {
  118163. return _shallowEqual.default;
  118164. }
  118165. });
  118166. Object.defineProperty(exports, "is", {
  118167. enumerable: true,
  118168. get: function() {
  118169. return _is.default;
  118170. }
  118171. });
  118172. Object.defineProperty(exports, "isBinding", {
  118173. enumerable: true,
  118174. get: function() {
  118175. return _isBinding.default;
  118176. }
  118177. });
  118178. Object.defineProperty(exports, "isBlockScoped", {
  118179. enumerable: true,
  118180. get: function() {
  118181. return _isBlockScoped.default;
  118182. }
  118183. });
  118184. Object.defineProperty(exports, "isImmutable", {
  118185. enumerable: true,
  118186. get: function() {
  118187. return _isImmutable.default;
  118188. }
  118189. });
  118190. Object.defineProperty(exports, "isLet", {
  118191. enumerable: true,
  118192. get: function() {
  118193. return _isLet.default;
  118194. }
  118195. });
  118196. Object.defineProperty(exports, "isNode", {
  118197. enumerable: true,
  118198. get: function() {
  118199. return _isNode.default;
  118200. }
  118201. });
  118202. Object.defineProperty(exports, "isNodesEquivalent", {
  118203. enumerable: true,
  118204. get: function() {
  118205. return _isNodesEquivalent.default;
  118206. }
  118207. });
  118208. Object.defineProperty(exports, "isPlaceholderType", {
  118209. enumerable: true,
  118210. get: function() {
  118211. return _isPlaceholderType.default;
  118212. }
  118213. });
  118214. Object.defineProperty(exports, "isReferenced", {
  118215. enumerable: true,
  118216. get: function() {
  118217. return _isReferenced.default;
  118218. }
  118219. });
  118220. Object.defineProperty(exports, "isScope", {
  118221. enumerable: true,
  118222. get: function() {
  118223. return _isScope.default;
  118224. }
  118225. });
  118226. Object.defineProperty(exports, "isSpecifierDefault", {
  118227. enumerable: true,
  118228. get: function() {
  118229. return _isSpecifierDefault.default;
  118230. }
  118231. });
  118232. Object.defineProperty(exports, "isType", {
  118233. enumerable: true,
  118234. get: function() {
  118235. return _isType.default;
  118236. }
  118237. });
  118238. Object.defineProperty(exports, "isValidES3Identifier", {
  118239. enumerable: true,
  118240. get: function() {
  118241. return _isValidES3Identifier.default;
  118242. }
  118243. });
  118244. Object.defineProperty(exports, "isValidIdentifier", {
  118245. enumerable: true,
  118246. get: function() {
  118247. return _isValidIdentifier.default;
  118248. }
  118249. });
  118250. Object.defineProperty(exports, "isVar", {
  118251. enumerable: true,
  118252. get: function() {
  118253. return _isVar.default;
  118254. }
  118255. });
  118256. Object.defineProperty(exports, "matchesPattern", {
  118257. enumerable: true,
  118258. get: function() {
  118259. return _matchesPattern.default;
  118260. }
  118261. });
  118262. Object.defineProperty(exports, "validate", {
  118263. enumerable: true,
  118264. get: function() {
  118265. return _validate.default;
  118266. }
  118267. });
  118268. Object.defineProperty(exports, "buildMatchMemberExpression", {
  118269. enumerable: true,
  118270. get: function() {
  118271. return _buildMatchMemberExpression.default;
  118272. }
  118273. });
  118274. exports.react = void 0;
  118275. var _isReactComponent = require_isReactComponent5();
  118276. var _isCompatTag = require_isCompatTag5();
  118277. var _buildChildren = require_buildChildren5();
  118278. var _assertNode = require_assertNode5();
  118279. var _generated = require_generated23();
  118280. Object.keys(_generated).forEach(function(key) {
  118281. if (key === "default" || key === "__esModule")
  118282. return;
  118283. if (Object.prototype.hasOwnProperty.call(_exportNames, key))
  118284. return;
  118285. if (key in exports && exports[key] === _generated[key])
  118286. return;
  118287. Object.defineProperty(exports, key, {
  118288. enumerable: true,
  118289. get: function() {
  118290. return _generated[key];
  118291. }
  118292. });
  118293. });
  118294. var _createTypeAnnotationBasedOnTypeof = require_createTypeAnnotationBasedOnTypeof5();
  118295. var _createFlowUnionType = require_createFlowUnionType5();
  118296. var _createTSUnionType = require_createTSUnionType5();
  118297. var _generated2 = require_generated22();
  118298. Object.keys(_generated2).forEach(function(key) {
  118299. if (key === "default" || key === "__esModule")
  118300. return;
  118301. if (Object.prototype.hasOwnProperty.call(_exportNames, key))
  118302. return;
  118303. if (key in exports && exports[key] === _generated2[key])
  118304. return;
  118305. Object.defineProperty(exports, key, {
  118306. enumerable: true,
  118307. get: function() {
  118308. return _generated2[key];
  118309. }
  118310. });
  118311. });
  118312. var _uppercase = require_uppercase5();
  118313. Object.keys(_uppercase).forEach(function(key) {
  118314. if (key === "default" || key === "__esModule")
  118315. return;
  118316. if (Object.prototype.hasOwnProperty.call(_exportNames, key))
  118317. return;
  118318. if (key in exports && exports[key] === _uppercase[key])
  118319. return;
  118320. Object.defineProperty(exports, key, {
  118321. enumerable: true,
  118322. get: function() {
  118323. return _uppercase[key];
  118324. }
  118325. });
  118326. });
  118327. var _cloneNode = require_cloneNode5();
  118328. var _clone = require_clone5();
  118329. var _cloneDeep = require_cloneDeep5();
  118330. var _cloneDeepWithoutLoc = require_cloneDeepWithoutLoc5();
  118331. var _cloneWithoutLoc = require_cloneWithoutLoc5();
  118332. var _addComment = require_addComment5();
  118333. var _addComments = require_addComments5();
  118334. var _inheritInnerComments = require_inheritInnerComments5();
  118335. var _inheritLeadingComments = require_inheritLeadingComments5();
  118336. var _inheritsComments = require_inheritsComments5();
  118337. var _inheritTrailingComments = require_inheritTrailingComments5();
  118338. var _removeComments = require_removeComments5();
  118339. var _generated3 = require_generated24();
  118340. Object.keys(_generated3).forEach(function(key) {
  118341. if (key === "default" || key === "__esModule")
  118342. return;
  118343. if (Object.prototype.hasOwnProperty.call(_exportNames, key))
  118344. return;
  118345. if (key in exports && exports[key] === _generated3[key])
  118346. return;
  118347. Object.defineProperty(exports, key, {
  118348. enumerable: true,
  118349. get: function() {
  118350. return _generated3[key];
  118351. }
  118352. });
  118353. });
  118354. var _constants = require_constants5();
  118355. Object.keys(_constants).forEach(function(key) {
  118356. if (key === "default" || key === "__esModule")
  118357. return;
  118358. if (Object.prototype.hasOwnProperty.call(_exportNames, key))
  118359. return;
  118360. if (key in exports && exports[key] === _constants[key])
  118361. return;
  118362. Object.defineProperty(exports, key, {
  118363. enumerable: true,
  118364. get: function() {
  118365. return _constants[key];
  118366. }
  118367. });
  118368. });
  118369. var _ensureBlock = require_ensureBlock5();
  118370. var _toBindingIdentifierName = require_toBindingIdentifierName5();
  118371. var _toBlock = require_toBlock5();
  118372. var _toComputedKey = require_toComputedKey5();
  118373. var _toExpression = require_toExpression5();
  118374. var _toIdentifier = require_toIdentifier5();
  118375. var _toKeyAlias = require_toKeyAlias5();
  118376. var _toSequenceExpression = require_toSequenceExpression5();
  118377. var _toStatement = require_toStatement5();
  118378. var _valueToNode = require_valueToNode5();
  118379. var _definitions = require_definitions5();
  118380. Object.keys(_definitions).forEach(function(key) {
  118381. if (key === "default" || key === "__esModule")
  118382. return;
  118383. if (Object.prototype.hasOwnProperty.call(_exportNames, key))
  118384. return;
  118385. if (key in exports && exports[key] === _definitions[key])
  118386. return;
  118387. Object.defineProperty(exports, key, {
  118388. enumerable: true,
  118389. get: function() {
  118390. return _definitions[key];
  118391. }
  118392. });
  118393. });
  118394. var _appendToMemberExpression = require_appendToMemberExpression5();
  118395. var _inherits = require_inherits5();
  118396. var _prependToMemberExpression = require_prependToMemberExpression5();
  118397. var _removeProperties = require_removeProperties5();
  118398. var _removePropertiesDeep = require_removePropertiesDeep5();
  118399. var _removeTypeDuplicates = require_removeTypeDuplicates9();
  118400. var _getBindingIdentifiers = require_getBindingIdentifiers5();
  118401. var _getOuterBindingIdentifiers = require_getOuterBindingIdentifiers5();
  118402. var _traverse = require_traverse5();
  118403. Object.keys(_traverse).forEach(function(key) {
  118404. if (key === "default" || key === "__esModule")
  118405. return;
  118406. if (Object.prototype.hasOwnProperty.call(_exportNames, key))
  118407. return;
  118408. if (key in exports && exports[key] === _traverse[key])
  118409. return;
  118410. Object.defineProperty(exports, key, {
  118411. enumerable: true,
  118412. get: function() {
  118413. return _traverse[key];
  118414. }
  118415. });
  118416. });
  118417. var _traverseFast = require_traverseFast5();
  118418. var _shallowEqual = require_shallowEqual5();
  118419. var _is = require_is5();
  118420. var _isBinding = require_isBinding5();
  118421. var _isBlockScoped = require_isBlockScoped5();
  118422. var _isImmutable = require_isImmutable5();
  118423. var _isLet = require_isLet5();
  118424. var _isNode = require_isNode5();
  118425. var _isNodesEquivalent = require_isNodesEquivalent5();
  118426. var _isPlaceholderType = require_isPlaceholderType5();
  118427. var _isReferenced = require_isReferenced5();
  118428. var _isScope = require_isScope5();
  118429. var _isSpecifierDefault = require_isSpecifierDefault5();
  118430. var _isType = require_isType5();
  118431. var _isValidES3Identifier = require_isValidES3Identifier5();
  118432. var _isValidIdentifier = require_isValidIdentifier5();
  118433. var _isVar = require_isVar5();
  118434. var _matchesPattern = require_matchesPattern5();
  118435. var _validate = require_validate5();
  118436. var _buildMatchMemberExpression = require_buildMatchMemberExpression5();
  118437. var _generated4 = require_generated21();
  118438. Object.keys(_generated4).forEach(function(key) {
  118439. if (key === "default" || key === "__esModule")
  118440. return;
  118441. if (Object.prototype.hasOwnProperty.call(_exportNames, key))
  118442. return;
  118443. if (key in exports && exports[key] === _generated4[key])
  118444. return;
  118445. Object.defineProperty(exports, key, {
  118446. enumerable: true,
  118447. get: function() {
  118448. return _generated4[key];
  118449. }
  118450. });
  118451. });
  118452. var _generated5 = require_generated25();
  118453. Object.keys(_generated5).forEach(function(key) {
  118454. if (key === "default" || key === "__esModule")
  118455. return;
  118456. if (Object.prototype.hasOwnProperty.call(_exportNames, key))
  118457. return;
  118458. if (key in exports && exports[key] === _generated5[key])
  118459. return;
  118460. Object.defineProperty(exports, key, {
  118461. enumerable: true,
  118462. get: function() {
  118463. return _generated5[key];
  118464. }
  118465. });
  118466. });
  118467. var react = {
  118468. isReactComponent: _isReactComponent.default,
  118469. isCompatTag: _isCompatTag.default,
  118470. buildChildren: _buildChildren.default
  118471. };
  118472. exports.react = react;
  118473. }
  118474. });
  118475. // node_modules/@babel/helper-get-function-arity/lib/index.js
  118476. var require_lib28 = __commonJS({
  118477. "node_modules/@babel/helper-get-function-arity/lib/index.js"(exports) {
  118478. "use strict";
  118479. Object.defineProperty(exports, "__esModule", {
  118480. value: true
  118481. });
  118482. exports.default = _default;
  118483. var t2 = require_lib27();
  118484. function _default(node) {
  118485. const params = node.params;
  118486. for (let i = 0; i < params.length; i++) {
  118487. const param = params[i];
  118488. if (t2.isAssignmentPattern(param) || t2.isRestElement(param)) {
  118489. return i;
  118490. }
  118491. }
  118492. return params.length;
  118493. }
  118494. }
  118495. });
  118496. // node_modules/@babel/template/node_modules/@babel/types/lib/utils/shallowEqual.js
  118497. var require_shallowEqual6 = __commonJS({
  118498. "node_modules/@babel/template/node_modules/@babel/types/lib/utils/shallowEqual.js"(exports) {
  118499. "use strict";
  118500. Object.defineProperty(exports, "__esModule", {
  118501. value: true
  118502. });
  118503. exports.default = shallowEqual;
  118504. function shallowEqual(actual, expected) {
  118505. const keys2 = Object.keys(expected);
  118506. for (const key of keys2) {
  118507. if (actual[key] !== expected[key]) {
  118508. return false;
  118509. }
  118510. }
  118511. return true;
  118512. }
  118513. }
  118514. });
  118515. // node_modules/@babel/template/node_modules/@babel/types/lib/validators/generated/index.js
  118516. var require_generated26 = __commonJS({
  118517. "node_modules/@babel/template/node_modules/@babel/types/lib/validators/generated/index.js"(exports) {
  118518. "use strict";
  118519. Object.defineProperty(exports, "__esModule", {
  118520. value: true
  118521. });
  118522. exports.isArrayExpression = isArrayExpression;
  118523. exports.isAssignmentExpression = isAssignmentExpression;
  118524. exports.isBinaryExpression = isBinaryExpression;
  118525. exports.isInterpreterDirective = isInterpreterDirective;
  118526. exports.isDirective = isDirective;
  118527. exports.isDirectiveLiteral = isDirectiveLiteral;
  118528. exports.isBlockStatement = isBlockStatement;
  118529. exports.isBreakStatement = isBreakStatement;
  118530. exports.isCallExpression = isCallExpression;
  118531. exports.isCatchClause = isCatchClause;
  118532. exports.isConditionalExpression = isConditionalExpression;
  118533. exports.isContinueStatement = isContinueStatement;
  118534. exports.isDebuggerStatement = isDebuggerStatement;
  118535. exports.isDoWhileStatement = isDoWhileStatement;
  118536. exports.isEmptyStatement = isEmptyStatement;
  118537. exports.isExpressionStatement = isExpressionStatement2;
  118538. exports.isFile = isFile;
  118539. exports.isForInStatement = isForInStatement;
  118540. exports.isForStatement = isForStatement;
  118541. exports.isFunctionDeclaration = isFunctionDeclaration;
  118542. exports.isFunctionExpression = isFunctionExpression;
  118543. exports.isIdentifier = isIdentifier2;
  118544. exports.isIfStatement = isIfStatement;
  118545. exports.isLabeledStatement = isLabeledStatement;
  118546. exports.isStringLiteral = isStringLiteral2;
  118547. exports.isNumericLiteral = isNumericLiteral;
  118548. exports.isNullLiteral = isNullLiteral;
  118549. exports.isBooleanLiteral = isBooleanLiteral2;
  118550. exports.isRegExpLiteral = isRegExpLiteral;
  118551. exports.isLogicalExpression = isLogicalExpression;
  118552. exports.isMemberExpression = isMemberExpression;
  118553. exports.isNewExpression = isNewExpression;
  118554. exports.isProgram = isProgram;
  118555. exports.isObjectExpression = isObjectExpression;
  118556. exports.isObjectMethod = isObjectMethod;
  118557. exports.isObjectProperty = isObjectProperty;
  118558. exports.isRestElement = isRestElement;
  118559. exports.isReturnStatement = isReturnStatement;
  118560. exports.isSequenceExpression = isSequenceExpression;
  118561. exports.isParenthesizedExpression = isParenthesizedExpression;
  118562. exports.isSwitchCase = isSwitchCase;
  118563. exports.isSwitchStatement = isSwitchStatement;
  118564. exports.isThisExpression = isThisExpression;
  118565. exports.isThrowStatement = isThrowStatement;
  118566. exports.isTryStatement = isTryStatement;
  118567. exports.isUnaryExpression = isUnaryExpression;
  118568. exports.isUpdateExpression = isUpdateExpression;
  118569. exports.isVariableDeclaration = isVariableDeclaration;
  118570. exports.isVariableDeclarator = isVariableDeclarator;
  118571. exports.isWhileStatement = isWhileStatement;
  118572. exports.isWithStatement = isWithStatement;
  118573. exports.isAssignmentPattern = isAssignmentPattern;
  118574. exports.isArrayPattern = isArrayPattern;
  118575. exports.isArrowFunctionExpression = isArrowFunctionExpression;
  118576. exports.isClassBody = isClassBody;
  118577. exports.isClassExpression = isClassExpression;
  118578. exports.isClassDeclaration = isClassDeclaration;
  118579. exports.isExportAllDeclaration = isExportAllDeclaration;
  118580. exports.isExportDefaultDeclaration = isExportDefaultDeclaration;
  118581. exports.isExportNamedDeclaration = isExportNamedDeclaration;
  118582. exports.isExportSpecifier = isExportSpecifier;
  118583. exports.isForOfStatement = isForOfStatement;
  118584. exports.isImportDeclaration = isImportDeclaration;
  118585. exports.isImportDefaultSpecifier = isImportDefaultSpecifier;
  118586. exports.isImportNamespaceSpecifier = isImportNamespaceSpecifier;
  118587. exports.isImportSpecifier = isImportSpecifier;
  118588. exports.isMetaProperty = isMetaProperty;
  118589. exports.isClassMethod = isClassMethod;
  118590. exports.isObjectPattern = isObjectPattern;
  118591. exports.isSpreadElement = isSpreadElement;
  118592. exports.isSuper = isSuper;
  118593. exports.isTaggedTemplateExpression = isTaggedTemplateExpression;
  118594. exports.isTemplateElement = isTemplateElement;
  118595. exports.isTemplateLiteral = isTemplateLiteral;
  118596. exports.isYieldExpression = isYieldExpression;
  118597. exports.isAwaitExpression = isAwaitExpression;
  118598. exports.isImport = isImport;
  118599. exports.isBigIntLiteral = isBigIntLiteral;
  118600. exports.isExportNamespaceSpecifier = isExportNamespaceSpecifier;
  118601. exports.isOptionalMemberExpression = isOptionalMemberExpression;
  118602. exports.isOptionalCallExpression = isOptionalCallExpression;
  118603. exports.isAnyTypeAnnotation = isAnyTypeAnnotation;
  118604. exports.isArrayTypeAnnotation = isArrayTypeAnnotation;
  118605. exports.isBooleanTypeAnnotation = isBooleanTypeAnnotation;
  118606. exports.isBooleanLiteralTypeAnnotation = isBooleanLiteralTypeAnnotation;
  118607. exports.isNullLiteralTypeAnnotation = isNullLiteralTypeAnnotation;
  118608. exports.isClassImplements = isClassImplements;
  118609. exports.isDeclareClass = isDeclareClass;
  118610. exports.isDeclareFunction = isDeclareFunction;
  118611. exports.isDeclareInterface = isDeclareInterface;
  118612. exports.isDeclareModule = isDeclareModule;
  118613. exports.isDeclareModuleExports = isDeclareModuleExports;
  118614. exports.isDeclareTypeAlias = isDeclareTypeAlias;
  118615. exports.isDeclareOpaqueType = isDeclareOpaqueType;
  118616. exports.isDeclareVariable = isDeclareVariable;
  118617. exports.isDeclareExportDeclaration = isDeclareExportDeclaration;
  118618. exports.isDeclareExportAllDeclaration = isDeclareExportAllDeclaration;
  118619. exports.isDeclaredPredicate = isDeclaredPredicate;
  118620. exports.isExistsTypeAnnotation = isExistsTypeAnnotation;
  118621. exports.isFunctionTypeAnnotation = isFunctionTypeAnnotation;
  118622. exports.isFunctionTypeParam = isFunctionTypeParam;
  118623. exports.isGenericTypeAnnotation = isGenericTypeAnnotation;
  118624. exports.isInferredPredicate = isInferredPredicate;
  118625. exports.isInterfaceExtends = isInterfaceExtends;
  118626. exports.isInterfaceDeclaration = isInterfaceDeclaration;
  118627. exports.isInterfaceTypeAnnotation = isInterfaceTypeAnnotation;
  118628. exports.isIntersectionTypeAnnotation = isIntersectionTypeAnnotation;
  118629. exports.isMixedTypeAnnotation = isMixedTypeAnnotation;
  118630. exports.isEmptyTypeAnnotation = isEmptyTypeAnnotation;
  118631. exports.isNullableTypeAnnotation = isNullableTypeAnnotation;
  118632. exports.isNumberLiteralTypeAnnotation = isNumberLiteralTypeAnnotation;
  118633. exports.isNumberTypeAnnotation = isNumberTypeAnnotation;
  118634. exports.isObjectTypeAnnotation = isObjectTypeAnnotation;
  118635. exports.isObjectTypeInternalSlot = isObjectTypeInternalSlot;
  118636. exports.isObjectTypeCallProperty = isObjectTypeCallProperty;
  118637. exports.isObjectTypeIndexer = isObjectTypeIndexer;
  118638. exports.isObjectTypeProperty = isObjectTypeProperty;
  118639. exports.isObjectTypeSpreadProperty = isObjectTypeSpreadProperty;
  118640. exports.isOpaqueType = isOpaqueType;
  118641. exports.isQualifiedTypeIdentifier = isQualifiedTypeIdentifier;
  118642. exports.isStringLiteralTypeAnnotation = isStringLiteralTypeAnnotation;
  118643. exports.isStringTypeAnnotation = isStringTypeAnnotation;
  118644. exports.isSymbolTypeAnnotation = isSymbolTypeAnnotation;
  118645. exports.isThisTypeAnnotation = isThisTypeAnnotation;
  118646. exports.isTupleTypeAnnotation = isTupleTypeAnnotation;
  118647. exports.isTypeofTypeAnnotation = isTypeofTypeAnnotation;
  118648. exports.isTypeAlias = isTypeAlias;
  118649. exports.isTypeAnnotation = isTypeAnnotation;
  118650. exports.isTypeCastExpression = isTypeCastExpression;
  118651. exports.isTypeParameter = isTypeParameter;
  118652. exports.isTypeParameterDeclaration = isTypeParameterDeclaration;
  118653. exports.isTypeParameterInstantiation = isTypeParameterInstantiation;
  118654. exports.isUnionTypeAnnotation = isUnionTypeAnnotation;
  118655. exports.isVariance = isVariance;
  118656. exports.isVoidTypeAnnotation = isVoidTypeAnnotation;
  118657. exports.isEnumDeclaration = isEnumDeclaration;
  118658. exports.isEnumBooleanBody = isEnumBooleanBody;
  118659. exports.isEnumNumberBody = isEnumNumberBody;
  118660. exports.isEnumStringBody = isEnumStringBody;
  118661. exports.isEnumSymbolBody = isEnumSymbolBody;
  118662. exports.isEnumBooleanMember = isEnumBooleanMember;
  118663. exports.isEnumNumberMember = isEnumNumberMember;
  118664. exports.isEnumStringMember = isEnumStringMember;
  118665. exports.isEnumDefaultedMember = isEnumDefaultedMember;
  118666. exports.isIndexedAccessType = isIndexedAccessType;
  118667. exports.isOptionalIndexedAccessType = isOptionalIndexedAccessType;
  118668. exports.isJSXAttribute = isJSXAttribute;
  118669. exports.isJSXClosingElement = isJSXClosingElement;
  118670. exports.isJSXElement = isJSXElement2;
  118671. exports.isJSXEmptyExpression = isJSXEmptyExpression;
  118672. exports.isJSXExpressionContainer = isJSXExpressionContainer2;
  118673. exports.isJSXSpreadChild = isJSXSpreadChild;
  118674. exports.isJSXIdentifier = isJSXIdentifier2;
  118675. exports.isJSXMemberExpression = isJSXMemberExpression;
  118676. exports.isJSXNamespacedName = isJSXNamespacedName;
  118677. exports.isJSXOpeningElement = isJSXOpeningElement;
  118678. exports.isJSXSpreadAttribute = isJSXSpreadAttribute;
  118679. exports.isJSXText = isJSXText;
  118680. exports.isJSXFragment = isJSXFragment2;
  118681. exports.isJSXOpeningFragment = isJSXOpeningFragment;
  118682. exports.isJSXClosingFragment = isJSXClosingFragment;
  118683. exports.isNoop = isNoop;
  118684. exports.isPlaceholder = isPlaceholder;
  118685. exports.isV8IntrinsicIdentifier = isV8IntrinsicIdentifier;
  118686. exports.isArgumentPlaceholder = isArgumentPlaceholder;
  118687. exports.isBindExpression = isBindExpression;
  118688. exports.isClassProperty = isClassProperty;
  118689. exports.isPipelineTopicExpression = isPipelineTopicExpression;
  118690. exports.isPipelineBareFunction = isPipelineBareFunction;
  118691. exports.isPipelinePrimaryTopicReference = isPipelinePrimaryTopicReference;
  118692. exports.isClassPrivateProperty = isClassPrivateProperty;
  118693. exports.isClassPrivateMethod = isClassPrivateMethod;
  118694. exports.isImportAttribute = isImportAttribute;
  118695. exports.isDecorator = isDecorator;
  118696. exports.isDoExpression = isDoExpression;
  118697. exports.isExportDefaultSpecifier = isExportDefaultSpecifier;
  118698. exports.isPrivateName = isPrivateName;
  118699. exports.isRecordExpression = isRecordExpression;
  118700. exports.isTupleExpression = isTupleExpression;
  118701. exports.isDecimalLiteral = isDecimalLiteral;
  118702. exports.isStaticBlock = isStaticBlock;
  118703. exports.isModuleExpression = isModuleExpression;
  118704. exports.isTSParameterProperty = isTSParameterProperty;
  118705. exports.isTSDeclareFunction = isTSDeclareFunction;
  118706. exports.isTSDeclareMethod = isTSDeclareMethod;
  118707. exports.isTSQualifiedName = isTSQualifiedName;
  118708. exports.isTSCallSignatureDeclaration = isTSCallSignatureDeclaration;
  118709. exports.isTSConstructSignatureDeclaration = isTSConstructSignatureDeclaration;
  118710. exports.isTSPropertySignature = isTSPropertySignature;
  118711. exports.isTSMethodSignature = isTSMethodSignature;
  118712. exports.isTSIndexSignature = isTSIndexSignature;
  118713. exports.isTSAnyKeyword = isTSAnyKeyword;
  118714. exports.isTSBooleanKeyword = isTSBooleanKeyword;
  118715. exports.isTSBigIntKeyword = isTSBigIntKeyword;
  118716. exports.isTSIntrinsicKeyword = isTSIntrinsicKeyword;
  118717. exports.isTSNeverKeyword = isTSNeverKeyword;
  118718. exports.isTSNullKeyword = isTSNullKeyword;
  118719. exports.isTSNumberKeyword = isTSNumberKeyword;
  118720. exports.isTSObjectKeyword = isTSObjectKeyword;
  118721. exports.isTSStringKeyword = isTSStringKeyword;
  118722. exports.isTSSymbolKeyword = isTSSymbolKeyword;
  118723. exports.isTSUndefinedKeyword = isTSUndefinedKeyword;
  118724. exports.isTSUnknownKeyword = isTSUnknownKeyword;
  118725. exports.isTSVoidKeyword = isTSVoidKeyword;
  118726. exports.isTSThisType = isTSThisType;
  118727. exports.isTSFunctionType = isTSFunctionType;
  118728. exports.isTSConstructorType = isTSConstructorType;
  118729. exports.isTSTypeReference = isTSTypeReference;
  118730. exports.isTSTypePredicate = isTSTypePredicate;
  118731. exports.isTSTypeQuery = isTSTypeQuery;
  118732. exports.isTSTypeLiteral = isTSTypeLiteral;
  118733. exports.isTSArrayType = isTSArrayType;
  118734. exports.isTSTupleType = isTSTupleType;
  118735. exports.isTSOptionalType = isTSOptionalType;
  118736. exports.isTSRestType = isTSRestType;
  118737. exports.isTSNamedTupleMember = isTSNamedTupleMember;
  118738. exports.isTSUnionType = isTSUnionType;
  118739. exports.isTSIntersectionType = isTSIntersectionType;
  118740. exports.isTSConditionalType = isTSConditionalType;
  118741. exports.isTSInferType = isTSInferType;
  118742. exports.isTSParenthesizedType = isTSParenthesizedType;
  118743. exports.isTSTypeOperator = isTSTypeOperator;
  118744. exports.isTSIndexedAccessType = isTSIndexedAccessType;
  118745. exports.isTSMappedType = isTSMappedType;
  118746. exports.isTSLiteralType = isTSLiteralType;
  118747. exports.isTSExpressionWithTypeArguments = isTSExpressionWithTypeArguments;
  118748. exports.isTSInterfaceDeclaration = isTSInterfaceDeclaration;
  118749. exports.isTSInterfaceBody = isTSInterfaceBody;
  118750. exports.isTSTypeAliasDeclaration = isTSTypeAliasDeclaration;
  118751. exports.isTSAsExpression = isTSAsExpression;
  118752. exports.isTSTypeAssertion = isTSTypeAssertion;
  118753. exports.isTSEnumDeclaration = isTSEnumDeclaration;
  118754. exports.isTSEnumMember = isTSEnumMember;
  118755. exports.isTSModuleDeclaration = isTSModuleDeclaration;
  118756. exports.isTSModuleBlock = isTSModuleBlock;
  118757. exports.isTSImportType = isTSImportType;
  118758. exports.isTSImportEqualsDeclaration = isTSImportEqualsDeclaration;
  118759. exports.isTSExternalModuleReference = isTSExternalModuleReference;
  118760. exports.isTSNonNullExpression = isTSNonNullExpression;
  118761. exports.isTSExportAssignment = isTSExportAssignment;
  118762. exports.isTSNamespaceExportDeclaration = isTSNamespaceExportDeclaration;
  118763. exports.isTSTypeAnnotation = isTSTypeAnnotation;
  118764. exports.isTSTypeParameterInstantiation = isTSTypeParameterInstantiation;
  118765. exports.isTSTypeParameterDeclaration = isTSTypeParameterDeclaration;
  118766. exports.isTSTypeParameter = isTSTypeParameter;
  118767. exports.isExpression = isExpression;
  118768. exports.isBinary = isBinary;
  118769. exports.isScopable = isScopable;
  118770. exports.isBlockParent = isBlockParent;
  118771. exports.isBlock = isBlock;
  118772. exports.isStatement = isStatement;
  118773. exports.isTerminatorless = isTerminatorless;
  118774. exports.isCompletionStatement = isCompletionStatement;
  118775. exports.isConditional = isConditional;
  118776. exports.isLoop = isLoop;
  118777. exports.isWhile = isWhile;
  118778. exports.isExpressionWrapper = isExpressionWrapper;
  118779. exports.isFor = isFor;
  118780. exports.isForXStatement = isForXStatement;
  118781. exports.isFunction = isFunction;
  118782. exports.isFunctionParent = isFunctionParent;
  118783. exports.isPureish = isPureish;
  118784. exports.isDeclaration = isDeclaration2;
  118785. exports.isPatternLike = isPatternLike;
  118786. exports.isLVal = isLVal;
  118787. exports.isTSEntityName = isTSEntityName;
  118788. exports.isLiteral = isLiteral;
  118789. exports.isImmutable = isImmutable;
  118790. exports.isUserWhitespacable = isUserWhitespacable;
  118791. exports.isMethod = isMethod;
  118792. exports.isObjectMember = isObjectMember;
  118793. exports.isProperty = isProperty;
  118794. exports.isUnaryLike = isUnaryLike;
  118795. exports.isPattern = isPattern;
  118796. exports.isClass = isClass;
  118797. exports.isModuleDeclaration = isModuleDeclaration;
  118798. exports.isExportDeclaration = isExportDeclaration;
  118799. exports.isModuleSpecifier = isModuleSpecifier;
  118800. exports.isFlow = isFlow;
  118801. exports.isFlowType = isFlowType;
  118802. exports.isFlowBaseAnnotation = isFlowBaseAnnotation;
  118803. exports.isFlowDeclaration = isFlowDeclaration;
  118804. exports.isFlowPredicate = isFlowPredicate;
  118805. exports.isEnumBody = isEnumBody;
  118806. exports.isEnumMember = isEnumMember;
  118807. exports.isJSX = isJSX;
  118808. exports.isPrivate = isPrivate;
  118809. exports.isTSTypeElement = isTSTypeElement;
  118810. exports.isTSType = isTSType;
  118811. exports.isTSBaseType = isTSBaseType;
  118812. exports.isNumberLiteral = isNumberLiteral;
  118813. exports.isRegexLiteral = isRegexLiteral;
  118814. exports.isRestProperty = isRestProperty;
  118815. exports.isSpreadProperty = isSpreadProperty;
  118816. var _shallowEqual = require_shallowEqual6();
  118817. function isArrayExpression(node, opts) {
  118818. if (!node)
  118819. return false;
  118820. const nodeType = node.type;
  118821. if (nodeType === "ArrayExpression") {
  118822. if (typeof opts === "undefined") {
  118823. return true;
  118824. } else {
  118825. return (0, _shallowEqual.default)(node, opts);
  118826. }
  118827. }
  118828. return false;
  118829. }
  118830. function isAssignmentExpression(node, opts) {
  118831. if (!node)
  118832. return false;
  118833. const nodeType = node.type;
  118834. if (nodeType === "AssignmentExpression") {
  118835. if (typeof opts === "undefined") {
  118836. return true;
  118837. } else {
  118838. return (0, _shallowEqual.default)(node, opts);
  118839. }
  118840. }
  118841. return false;
  118842. }
  118843. function isBinaryExpression(node, opts) {
  118844. if (!node)
  118845. return false;
  118846. const nodeType = node.type;
  118847. if (nodeType === "BinaryExpression") {
  118848. if (typeof opts === "undefined") {
  118849. return true;
  118850. } else {
  118851. return (0, _shallowEqual.default)(node, opts);
  118852. }
  118853. }
  118854. return false;
  118855. }
  118856. function isInterpreterDirective(node, opts) {
  118857. if (!node)
  118858. return false;
  118859. const nodeType = node.type;
  118860. if (nodeType === "InterpreterDirective") {
  118861. if (typeof opts === "undefined") {
  118862. return true;
  118863. } else {
  118864. return (0, _shallowEqual.default)(node, opts);
  118865. }
  118866. }
  118867. return false;
  118868. }
  118869. function isDirective(node, opts) {
  118870. if (!node)
  118871. return false;
  118872. const nodeType = node.type;
  118873. if (nodeType === "Directive") {
  118874. if (typeof opts === "undefined") {
  118875. return true;
  118876. } else {
  118877. return (0, _shallowEqual.default)(node, opts);
  118878. }
  118879. }
  118880. return false;
  118881. }
  118882. function isDirectiveLiteral(node, opts) {
  118883. if (!node)
  118884. return false;
  118885. const nodeType = node.type;
  118886. if (nodeType === "DirectiveLiteral") {
  118887. if (typeof opts === "undefined") {
  118888. return true;
  118889. } else {
  118890. return (0, _shallowEqual.default)(node, opts);
  118891. }
  118892. }
  118893. return false;
  118894. }
  118895. function isBlockStatement(node, opts) {
  118896. if (!node)
  118897. return false;
  118898. const nodeType = node.type;
  118899. if (nodeType === "BlockStatement") {
  118900. if (typeof opts === "undefined") {
  118901. return true;
  118902. } else {
  118903. return (0, _shallowEqual.default)(node, opts);
  118904. }
  118905. }
  118906. return false;
  118907. }
  118908. function isBreakStatement(node, opts) {
  118909. if (!node)
  118910. return false;
  118911. const nodeType = node.type;
  118912. if (nodeType === "BreakStatement") {
  118913. if (typeof opts === "undefined") {
  118914. return true;
  118915. } else {
  118916. return (0, _shallowEqual.default)(node, opts);
  118917. }
  118918. }
  118919. return false;
  118920. }
  118921. function isCallExpression(node, opts) {
  118922. if (!node)
  118923. return false;
  118924. const nodeType = node.type;
  118925. if (nodeType === "CallExpression") {
  118926. if (typeof opts === "undefined") {
  118927. return true;
  118928. } else {
  118929. return (0, _shallowEqual.default)(node, opts);
  118930. }
  118931. }
  118932. return false;
  118933. }
  118934. function isCatchClause(node, opts) {
  118935. if (!node)
  118936. return false;
  118937. const nodeType = node.type;
  118938. if (nodeType === "CatchClause") {
  118939. if (typeof opts === "undefined") {
  118940. return true;
  118941. } else {
  118942. return (0, _shallowEqual.default)(node, opts);
  118943. }
  118944. }
  118945. return false;
  118946. }
  118947. function isConditionalExpression(node, opts) {
  118948. if (!node)
  118949. return false;
  118950. const nodeType = node.type;
  118951. if (nodeType === "ConditionalExpression") {
  118952. if (typeof opts === "undefined") {
  118953. return true;
  118954. } else {
  118955. return (0, _shallowEqual.default)(node, opts);
  118956. }
  118957. }
  118958. return false;
  118959. }
  118960. function isContinueStatement(node, opts) {
  118961. if (!node)
  118962. return false;
  118963. const nodeType = node.type;
  118964. if (nodeType === "ContinueStatement") {
  118965. if (typeof opts === "undefined") {
  118966. return true;
  118967. } else {
  118968. return (0, _shallowEqual.default)(node, opts);
  118969. }
  118970. }
  118971. return false;
  118972. }
  118973. function isDebuggerStatement(node, opts) {
  118974. if (!node)
  118975. return false;
  118976. const nodeType = node.type;
  118977. if (nodeType === "DebuggerStatement") {
  118978. if (typeof opts === "undefined") {
  118979. return true;
  118980. } else {
  118981. return (0, _shallowEqual.default)(node, opts);
  118982. }
  118983. }
  118984. return false;
  118985. }
  118986. function isDoWhileStatement(node, opts) {
  118987. if (!node)
  118988. return false;
  118989. const nodeType = node.type;
  118990. if (nodeType === "DoWhileStatement") {
  118991. if (typeof opts === "undefined") {
  118992. return true;
  118993. } else {
  118994. return (0, _shallowEqual.default)(node, opts);
  118995. }
  118996. }
  118997. return false;
  118998. }
  118999. function isEmptyStatement(node, opts) {
  119000. if (!node)
  119001. return false;
  119002. const nodeType = node.type;
  119003. if (nodeType === "EmptyStatement") {
  119004. if (typeof opts === "undefined") {
  119005. return true;
  119006. } else {
  119007. return (0, _shallowEqual.default)(node, opts);
  119008. }
  119009. }
  119010. return false;
  119011. }
  119012. function isExpressionStatement2(node, opts) {
  119013. if (!node)
  119014. return false;
  119015. const nodeType = node.type;
  119016. if (nodeType === "ExpressionStatement") {
  119017. if (typeof opts === "undefined") {
  119018. return true;
  119019. } else {
  119020. return (0, _shallowEqual.default)(node, opts);
  119021. }
  119022. }
  119023. return false;
  119024. }
  119025. function isFile(node, opts) {
  119026. if (!node)
  119027. return false;
  119028. const nodeType = node.type;
  119029. if (nodeType === "File") {
  119030. if (typeof opts === "undefined") {
  119031. return true;
  119032. } else {
  119033. return (0, _shallowEqual.default)(node, opts);
  119034. }
  119035. }
  119036. return false;
  119037. }
  119038. function isForInStatement(node, opts) {
  119039. if (!node)
  119040. return false;
  119041. const nodeType = node.type;
  119042. if (nodeType === "ForInStatement") {
  119043. if (typeof opts === "undefined") {
  119044. return true;
  119045. } else {
  119046. return (0, _shallowEqual.default)(node, opts);
  119047. }
  119048. }
  119049. return false;
  119050. }
  119051. function isForStatement(node, opts) {
  119052. if (!node)
  119053. return false;
  119054. const nodeType = node.type;
  119055. if (nodeType === "ForStatement") {
  119056. if (typeof opts === "undefined") {
  119057. return true;
  119058. } else {
  119059. return (0, _shallowEqual.default)(node, opts);
  119060. }
  119061. }
  119062. return false;
  119063. }
  119064. function isFunctionDeclaration(node, opts) {
  119065. if (!node)
  119066. return false;
  119067. const nodeType = node.type;
  119068. if (nodeType === "FunctionDeclaration") {
  119069. if (typeof opts === "undefined") {
  119070. return true;
  119071. } else {
  119072. return (0, _shallowEqual.default)(node, opts);
  119073. }
  119074. }
  119075. return false;
  119076. }
  119077. function isFunctionExpression(node, opts) {
  119078. if (!node)
  119079. return false;
  119080. const nodeType = node.type;
  119081. if (nodeType === "FunctionExpression") {
  119082. if (typeof opts === "undefined") {
  119083. return true;
  119084. } else {
  119085. return (0, _shallowEqual.default)(node, opts);
  119086. }
  119087. }
  119088. return false;
  119089. }
  119090. function isIdentifier2(node, opts) {
  119091. if (!node)
  119092. return false;
  119093. const nodeType = node.type;
  119094. if (nodeType === "Identifier") {
  119095. if (typeof opts === "undefined") {
  119096. return true;
  119097. } else {
  119098. return (0, _shallowEqual.default)(node, opts);
  119099. }
  119100. }
  119101. return false;
  119102. }
  119103. function isIfStatement(node, opts) {
  119104. if (!node)
  119105. return false;
  119106. const nodeType = node.type;
  119107. if (nodeType === "IfStatement") {
  119108. if (typeof opts === "undefined") {
  119109. return true;
  119110. } else {
  119111. return (0, _shallowEqual.default)(node, opts);
  119112. }
  119113. }
  119114. return false;
  119115. }
  119116. function isLabeledStatement(node, opts) {
  119117. if (!node)
  119118. return false;
  119119. const nodeType = node.type;
  119120. if (nodeType === "LabeledStatement") {
  119121. if (typeof opts === "undefined") {
  119122. return true;
  119123. } else {
  119124. return (0, _shallowEqual.default)(node, opts);
  119125. }
  119126. }
  119127. return false;
  119128. }
  119129. function isStringLiteral2(node, opts) {
  119130. if (!node)
  119131. return false;
  119132. const nodeType = node.type;
  119133. if (nodeType === "StringLiteral") {
  119134. if (typeof opts === "undefined") {
  119135. return true;
  119136. } else {
  119137. return (0, _shallowEqual.default)(node, opts);
  119138. }
  119139. }
  119140. return false;
  119141. }
  119142. function isNumericLiteral(node, opts) {
  119143. if (!node)
  119144. return false;
  119145. const nodeType = node.type;
  119146. if (nodeType === "NumericLiteral") {
  119147. if (typeof opts === "undefined") {
  119148. return true;
  119149. } else {
  119150. return (0, _shallowEqual.default)(node, opts);
  119151. }
  119152. }
  119153. return false;
  119154. }
  119155. function isNullLiteral(node, opts) {
  119156. if (!node)
  119157. return false;
  119158. const nodeType = node.type;
  119159. if (nodeType === "NullLiteral") {
  119160. if (typeof opts === "undefined") {
  119161. return true;
  119162. } else {
  119163. return (0, _shallowEqual.default)(node, opts);
  119164. }
  119165. }
  119166. return false;
  119167. }
  119168. function isBooleanLiteral2(node, opts) {
  119169. if (!node)
  119170. return false;
  119171. const nodeType = node.type;
  119172. if (nodeType === "BooleanLiteral") {
  119173. if (typeof opts === "undefined") {
  119174. return true;
  119175. } else {
  119176. return (0, _shallowEqual.default)(node, opts);
  119177. }
  119178. }
  119179. return false;
  119180. }
  119181. function isRegExpLiteral(node, opts) {
  119182. if (!node)
  119183. return false;
  119184. const nodeType = node.type;
  119185. if (nodeType === "RegExpLiteral") {
  119186. if (typeof opts === "undefined") {
  119187. return true;
  119188. } else {
  119189. return (0, _shallowEqual.default)(node, opts);
  119190. }
  119191. }
  119192. return false;
  119193. }
  119194. function isLogicalExpression(node, opts) {
  119195. if (!node)
  119196. return false;
  119197. const nodeType = node.type;
  119198. if (nodeType === "LogicalExpression") {
  119199. if (typeof opts === "undefined") {
  119200. return true;
  119201. } else {
  119202. return (0, _shallowEqual.default)(node, opts);
  119203. }
  119204. }
  119205. return false;
  119206. }
  119207. function isMemberExpression(node, opts) {
  119208. if (!node)
  119209. return false;
  119210. const nodeType = node.type;
  119211. if (nodeType === "MemberExpression") {
  119212. if (typeof opts === "undefined") {
  119213. return true;
  119214. } else {
  119215. return (0, _shallowEqual.default)(node, opts);
  119216. }
  119217. }
  119218. return false;
  119219. }
  119220. function isNewExpression(node, opts) {
  119221. if (!node)
  119222. return false;
  119223. const nodeType = node.type;
  119224. if (nodeType === "NewExpression") {
  119225. if (typeof opts === "undefined") {
  119226. return true;
  119227. } else {
  119228. return (0, _shallowEqual.default)(node, opts);
  119229. }
  119230. }
  119231. return false;
  119232. }
  119233. function isProgram(node, opts) {
  119234. if (!node)
  119235. return false;
  119236. const nodeType = node.type;
  119237. if (nodeType === "Program") {
  119238. if (typeof opts === "undefined") {
  119239. return true;
  119240. } else {
  119241. return (0, _shallowEqual.default)(node, opts);
  119242. }
  119243. }
  119244. return false;
  119245. }
  119246. function isObjectExpression(node, opts) {
  119247. if (!node)
  119248. return false;
  119249. const nodeType = node.type;
  119250. if (nodeType === "ObjectExpression") {
  119251. if (typeof opts === "undefined") {
  119252. return true;
  119253. } else {
  119254. return (0, _shallowEqual.default)(node, opts);
  119255. }
  119256. }
  119257. return false;
  119258. }
  119259. function isObjectMethod(node, opts) {
  119260. if (!node)
  119261. return false;
  119262. const nodeType = node.type;
  119263. if (nodeType === "ObjectMethod") {
  119264. if (typeof opts === "undefined") {
  119265. return true;
  119266. } else {
  119267. return (0, _shallowEqual.default)(node, opts);
  119268. }
  119269. }
  119270. return false;
  119271. }
  119272. function isObjectProperty(node, opts) {
  119273. if (!node)
  119274. return false;
  119275. const nodeType = node.type;
  119276. if (nodeType === "ObjectProperty") {
  119277. if (typeof opts === "undefined") {
  119278. return true;
  119279. } else {
  119280. return (0, _shallowEqual.default)(node, opts);
  119281. }
  119282. }
  119283. return false;
  119284. }
  119285. function isRestElement(node, opts) {
  119286. if (!node)
  119287. return false;
  119288. const nodeType = node.type;
  119289. if (nodeType === "RestElement") {
  119290. if (typeof opts === "undefined") {
  119291. return true;
  119292. } else {
  119293. return (0, _shallowEqual.default)(node, opts);
  119294. }
  119295. }
  119296. return false;
  119297. }
  119298. function isReturnStatement(node, opts) {
  119299. if (!node)
  119300. return false;
  119301. const nodeType = node.type;
  119302. if (nodeType === "ReturnStatement") {
  119303. if (typeof opts === "undefined") {
  119304. return true;
  119305. } else {
  119306. return (0, _shallowEqual.default)(node, opts);
  119307. }
  119308. }
  119309. return false;
  119310. }
  119311. function isSequenceExpression(node, opts) {
  119312. if (!node)
  119313. return false;
  119314. const nodeType = node.type;
  119315. if (nodeType === "SequenceExpression") {
  119316. if (typeof opts === "undefined") {
  119317. return true;
  119318. } else {
  119319. return (0, _shallowEqual.default)(node, opts);
  119320. }
  119321. }
  119322. return false;
  119323. }
  119324. function isParenthesizedExpression(node, opts) {
  119325. if (!node)
  119326. return false;
  119327. const nodeType = node.type;
  119328. if (nodeType === "ParenthesizedExpression") {
  119329. if (typeof opts === "undefined") {
  119330. return true;
  119331. } else {
  119332. return (0, _shallowEqual.default)(node, opts);
  119333. }
  119334. }
  119335. return false;
  119336. }
  119337. function isSwitchCase(node, opts) {
  119338. if (!node)
  119339. return false;
  119340. const nodeType = node.type;
  119341. if (nodeType === "SwitchCase") {
  119342. if (typeof opts === "undefined") {
  119343. return true;
  119344. } else {
  119345. return (0, _shallowEqual.default)(node, opts);
  119346. }
  119347. }
  119348. return false;
  119349. }
  119350. function isSwitchStatement(node, opts) {
  119351. if (!node)
  119352. return false;
  119353. const nodeType = node.type;
  119354. if (nodeType === "SwitchStatement") {
  119355. if (typeof opts === "undefined") {
  119356. return true;
  119357. } else {
  119358. return (0, _shallowEqual.default)(node, opts);
  119359. }
  119360. }
  119361. return false;
  119362. }
  119363. function isThisExpression(node, opts) {
  119364. if (!node)
  119365. return false;
  119366. const nodeType = node.type;
  119367. if (nodeType === "ThisExpression") {
  119368. if (typeof opts === "undefined") {
  119369. return true;
  119370. } else {
  119371. return (0, _shallowEqual.default)(node, opts);
  119372. }
  119373. }
  119374. return false;
  119375. }
  119376. function isThrowStatement(node, opts) {
  119377. if (!node)
  119378. return false;
  119379. const nodeType = node.type;
  119380. if (nodeType === "ThrowStatement") {
  119381. if (typeof opts === "undefined") {
  119382. return true;
  119383. } else {
  119384. return (0, _shallowEqual.default)(node, opts);
  119385. }
  119386. }
  119387. return false;
  119388. }
  119389. function isTryStatement(node, opts) {
  119390. if (!node)
  119391. return false;
  119392. const nodeType = node.type;
  119393. if (nodeType === "TryStatement") {
  119394. if (typeof opts === "undefined") {
  119395. return true;
  119396. } else {
  119397. return (0, _shallowEqual.default)(node, opts);
  119398. }
  119399. }
  119400. return false;
  119401. }
  119402. function isUnaryExpression(node, opts) {
  119403. if (!node)
  119404. return false;
  119405. const nodeType = node.type;
  119406. if (nodeType === "UnaryExpression") {
  119407. if (typeof opts === "undefined") {
  119408. return true;
  119409. } else {
  119410. return (0, _shallowEqual.default)(node, opts);
  119411. }
  119412. }
  119413. return false;
  119414. }
  119415. function isUpdateExpression(node, opts) {
  119416. if (!node)
  119417. return false;
  119418. const nodeType = node.type;
  119419. if (nodeType === "UpdateExpression") {
  119420. if (typeof opts === "undefined") {
  119421. return true;
  119422. } else {
  119423. return (0, _shallowEqual.default)(node, opts);
  119424. }
  119425. }
  119426. return false;
  119427. }
  119428. function isVariableDeclaration(node, opts) {
  119429. if (!node)
  119430. return false;
  119431. const nodeType = node.type;
  119432. if (nodeType === "VariableDeclaration") {
  119433. if (typeof opts === "undefined") {
  119434. return true;
  119435. } else {
  119436. return (0, _shallowEqual.default)(node, opts);
  119437. }
  119438. }
  119439. return false;
  119440. }
  119441. function isVariableDeclarator(node, opts) {
  119442. if (!node)
  119443. return false;
  119444. const nodeType = node.type;
  119445. if (nodeType === "VariableDeclarator") {
  119446. if (typeof opts === "undefined") {
  119447. return true;
  119448. } else {
  119449. return (0, _shallowEqual.default)(node, opts);
  119450. }
  119451. }
  119452. return false;
  119453. }
  119454. function isWhileStatement(node, opts) {
  119455. if (!node)
  119456. return false;
  119457. const nodeType = node.type;
  119458. if (nodeType === "WhileStatement") {
  119459. if (typeof opts === "undefined") {
  119460. return true;
  119461. } else {
  119462. return (0, _shallowEqual.default)(node, opts);
  119463. }
  119464. }
  119465. return false;
  119466. }
  119467. function isWithStatement(node, opts) {
  119468. if (!node)
  119469. return false;
  119470. const nodeType = node.type;
  119471. if (nodeType === "WithStatement") {
  119472. if (typeof opts === "undefined") {
  119473. return true;
  119474. } else {
  119475. return (0, _shallowEqual.default)(node, opts);
  119476. }
  119477. }
  119478. return false;
  119479. }
  119480. function isAssignmentPattern(node, opts) {
  119481. if (!node)
  119482. return false;
  119483. const nodeType = node.type;
  119484. if (nodeType === "AssignmentPattern") {
  119485. if (typeof opts === "undefined") {
  119486. return true;
  119487. } else {
  119488. return (0, _shallowEqual.default)(node, opts);
  119489. }
  119490. }
  119491. return false;
  119492. }
  119493. function isArrayPattern(node, opts) {
  119494. if (!node)
  119495. return false;
  119496. const nodeType = node.type;
  119497. if (nodeType === "ArrayPattern") {
  119498. if (typeof opts === "undefined") {
  119499. return true;
  119500. } else {
  119501. return (0, _shallowEqual.default)(node, opts);
  119502. }
  119503. }
  119504. return false;
  119505. }
  119506. function isArrowFunctionExpression(node, opts) {
  119507. if (!node)
  119508. return false;
  119509. const nodeType = node.type;
  119510. if (nodeType === "ArrowFunctionExpression") {
  119511. if (typeof opts === "undefined") {
  119512. return true;
  119513. } else {
  119514. return (0, _shallowEqual.default)(node, opts);
  119515. }
  119516. }
  119517. return false;
  119518. }
  119519. function isClassBody(node, opts) {
  119520. if (!node)
  119521. return false;
  119522. const nodeType = node.type;
  119523. if (nodeType === "ClassBody") {
  119524. if (typeof opts === "undefined") {
  119525. return true;
  119526. } else {
  119527. return (0, _shallowEqual.default)(node, opts);
  119528. }
  119529. }
  119530. return false;
  119531. }
  119532. function isClassExpression(node, opts) {
  119533. if (!node)
  119534. return false;
  119535. const nodeType = node.type;
  119536. if (nodeType === "ClassExpression") {
  119537. if (typeof opts === "undefined") {
  119538. return true;
  119539. } else {
  119540. return (0, _shallowEqual.default)(node, opts);
  119541. }
  119542. }
  119543. return false;
  119544. }
  119545. function isClassDeclaration(node, opts) {
  119546. if (!node)
  119547. return false;
  119548. const nodeType = node.type;
  119549. if (nodeType === "ClassDeclaration") {
  119550. if (typeof opts === "undefined") {
  119551. return true;
  119552. } else {
  119553. return (0, _shallowEqual.default)(node, opts);
  119554. }
  119555. }
  119556. return false;
  119557. }
  119558. function isExportAllDeclaration(node, opts) {
  119559. if (!node)
  119560. return false;
  119561. const nodeType = node.type;
  119562. if (nodeType === "ExportAllDeclaration") {
  119563. if (typeof opts === "undefined") {
  119564. return true;
  119565. } else {
  119566. return (0, _shallowEqual.default)(node, opts);
  119567. }
  119568. }
  119569. return false;
  119570. }
  119571. function isExportDefaultDeclaration(node, opts) {
  119572. if (!node)
  119573. return false;
  119574. const nodeType = node.type;
  119575. if (nodeType === "ExportDefaultDeclaration") {
  119576. if (typeof opts === "undefined") {
  119577. return true;
  119578. } else {
  119579. return (0, _shallowEqual.default)(node, opts);
  119580. }
  119581. }
  119582. return false;
  119583. }
  119584. function isExportNamedDeclaration(node, opts) {
  119585. if (!node)
  119586. return false;
  119587. const nodeType = node.type;
  119588. if (nodeType === "ExportNamedDeclaration") {
  119589. if (typeof opts === "undefined") {
  119590. return true;
  119591. } else {
  119592. return (0, _shallowEqual.default)(node, opts);
  119593. }
  119594. }
  119595. return false;
  119596. }
  119597. function isExportSpecifier(node, opts) {
  119598. if (!node)
  119599. return false;
  119600. const nodeType = node.type;
  119601. if (nodeType === "ExportSpecifier") {
  119602. if (typeof opts === "undefined") {
  119603. return true;
  119604. } else {
  119605. return (0, _shallowEqual.default)(node, opts);
  119606. }
  119607. }
  119608. return false;
  119609. }
  119610. function isForOfStatement(node, opts) {
  119611. if (!node)
  119612. return false;
  119613. const nodeType = node.type;
  119614. if (nodeType === "ForOfStatement") {
  119615. if (typeof opts === "undefined") {
  119616. return true;
  119617. } else {
  119618. return (0, _shallowEqual.default)(node, opts);
  119619. }
  119620. }
  119621. return false;
  119622. }
  119623. function isImportDeclaration(node, opts) {
  119624. if (!node)
  119625. return false;
  119626. const nodeType = node.type;
  119627. if (nodeType === "ImportDeclaration") {
  119628. if (typeof opts === "undefined") {
  119629. return true;
  119630. } else {
  119631. return (0, _shallowEqual.default)(node, opts);
  119632. }
  119633. }
  119634. return false;
  119635. }
  119636. function isImportDefaultSpecifier(node, opts) {
  119637. if (!node)
  119638. return false;
  119639. const nodeType = node.type;
  119640. if (nodeType === "ImportDefaultSpecifier") {
  119641. if (typeof opts === "undefined") {
  119642. return true;
  119643. } else {
  119644. return (0, _shallowEqual.default)(node, opts);
  119645. }
  119646. }
  119647. return false;
  119648. }
  119649. function isImportNamespaceSpecifier(node, opts) {
  119650. if (!node)
  119651. return false;
  119652. const nodeType = node.type;
  119653. if (nodeType === "ImportNamespaceSpecifier") {
  119654. if (typeof opts === "undefined") {
  119655. return true;
  119656. } else {
  119657. return (0, _shallowEqual.default)(node, opts);
  119658. }
  119659. }
  119660. return false;
  119661. }
  119662. function isImportSpecifier(node, opts) {
  119663. if (!node)
  119664. return false;
  119665. const nodeType = node.type;
  119666. if (nodeType === "ImportSpecifier") {
  119667. if (typeof opts === "undefined") {
  119668. return true;
  119669. } else {
  119670. return (0, _shallowEqual.default)(node, opts);
  119671. }
  119672. }
  119673. return false;
  119674. }
  119675. function isMetaProperty(node, opts) {
  119676. if (!node)
  119677. return false;
  119678. const nodeType = node.type;
  119679. if (nodeType === "MetaProperty") {
  119680. if (typeof opts === "undefined") {
  119681. return true;
  119682. } else {
  119683. return (0, _shallowEqual.default)(node, opts);
  119684. }
  119685. }
  119686. return false;
  119687. }
  119688. function isClassMethod(node, opts) {
  119689. if (!node)
  119690. return false;
  119691. const nodeType = node.type;
  119692. if (nodeType === "ClassMethod") {
  119693. if (typeof opts === "undefined") {
  119694. return true;
  119695. } else {
  119696. return (0, _shallowEqual.default)(node, opts);
  119697. }
  119698. }
  119699. return false;
  119700. }
  119701. function isObjectPattern(node, opts) {
  119702. if (!node)
  119703. return false;
  119704. const nodeType = node.type;
  119705. if (nodeType === "ObjectPattern") {
  119706. if (typeof opts === "undefined") {
  119707. return true;
  119708. } else {
  119709. return (0, _shallowEqual.default)(node, opts);
  119710. }
  119711. }
  119712. return false;
  119713. }
  119714. function isSpreadElement(node, opts) {
  119715. if (!node)
  119716. return false;
  119717. const nodeType = node.type;
  119718. if (nodeType === "SpreadElement") {
  119719. if (typeof opts === "undefined") {
  119720. return true;
  119721. } else {
  119722. return (0, _shallowEqual.default)(node, opts);
  119723. }
  119724. }
  119725. return false;
  119726. }
  119727. function isSuper(node, opts) {
  119728. if (!node)
  119729. return false;
  119730. const nodeType = node.type;
  119731. if (nodeType === "Super") {
  119732. if (typeof opts === "undefined") {
  119733. return true;
  119734. } else {
  119735. return (0, _shallowEqual.default)(node, opts);
  119736. }
  119737. }
  119738. return false;
  119739. }
  119740. function isTaggedTemplateExpression(node, opts) {
  119741. if (!node)
  119742. return false;
  119743. const nodeType = node.type;
  119744. if (nodeType === "TaggedTemplateExpression") {
  119745. if (typeof opts === "undefined") {
  119746. return true;
  119747. } else {
  119748. return (0, _shallowEqual.default)(node, opts);
  119749. }
  119750. }
  119751. return false;
  119752. }
  119753. function isTemplateElement(node, opts) {
  119754. if (!node)
  119755. return false;
  119756. const nodeType = node.type;
  119757. if (nodeType === "TemplateElement") {
  119758. if (typeof opts === "undefined") {
  119759. return true;
  119760. } else {
  119761. return (0, _shallowEqual.default)(node, opts);
  119762. }
  119763. }
  119764. return false;
  119765. }
  119766. function isTemplateLiteral(node, opts) {
  119767. if (!node)
  119768. return false;
  119769. const nodeType = node.type;
  119770. if (nodeType === "TemplateLiteral") {
  119771. if (typeof opts === "undefined") {
  119772. return true;
  119773. } else {
  119774. return (0, _shallowEqual.default)(node, opts);
  119775. }
  119776. }
  119777. return false;
  119778. }
  119779. function isYieldExpression(node, opts) {
  119780. if (!node)
  119781. return false;
  119782. const nodeType = node.type;
  119783. if (nodeType === "YieldExpression") {
  119784. if (typeof opts === "undefined") {
  119785. return true;
  119786. } else {
  119787. return (0, _shallowEqual.default)(node, opts);
  119788. }
  119789. }
  119790. return false;
  119791. }
  119792. function isAwaitExpression(node, opts) {
  119793. if (!node)
  119794. return false;
  119795. const nodeType = node.type;
  119796. if (nodeType === "AwaitExpression") {
  119797. if (typeof opts === "undefined") {
  119798. return true;
  119799. } else {
  119800. return (0, _shallowEqual.default)(node, opts);
  119801. }
  119802. }
  119803. return false;
  119804. }
  119805. function isImport(node, opts) {
  119806. if (!node)
  119807. return false;
  119808. const nodeType = node.type;
  119809. if (nodeType === "Import") {
  119810. if (typeof opts === "undefined") {
  119811. return true;
  119812. } else {
  119813. return (0, _shallowEqual.default)(node, opts);
  119814. }
  119815. }
  119816. return false;
  119817. }
  119818. function isBigIntLiteral(node, opts) {
  119819. if (!node)
  119820. return false;
  119821. const nodeType = node.type;
  119822. if (nodeType === "BigIntLiteral") {
  119823. if (typeof opts === "undefined") {
  119824. return true;
  119825. } else {
  119826. return (0, _shallowEqual.default)(node, opts);
  119827. }
  119828. }
  119829. return false;
  119830. }
  119831. function isExportNamespaceSpecifier(node, opts) {
  119832. if (!node)
  119833. return false;
  119834. const nodeType = node.type;
  119835. if (nodeType === "ExportNamespaceSpecifier") {
  119836. if (typeof opts === "undefined") {
  119837. return true;
  119838. } else {
  119839. return (0, _shallowEqual.default)(node, opts);
  119840. }
  119841. }
  119842. return false;
  119843. }
  119844. function isOptionalMemberExpression(node, opts) {
  119845. if (!node)
  119846. return false;
  119847. const nodeType = node.type;
  119848. if (nodeType === "OptionalMemberExpression") {
  119849. if (typeof opts === "undefined") {
  119850. return true;
  119851. } else {
  119852. return (0, _shallowEqual.default)(node, opts);
  119853. }
  119854. }
  119855. return false;
  119856. }
  119857. function isOptionalCallExpression(node, opts) {
  119858. if (!node)
  119859. return false;
  119860. const nodeType = node.type;
  119861. if (nodeType === "OptionalCallExpression") {
  119862. if (typeof opts === "undefined") {
  119863. return true;
  119864. } else {
  119865. return (0, _shallowEqual.default)(node, opts);
  119866. }
  119867. }
  119868. return false;
  119869. }
  119870. function isAnyTypeAnnotation(node, opts) {
  119871. if (!node)
  119872. return false;
  119873. const nodeType = node.type;
  119874. if (nodeType === "AnyTypeAnnotation") {
  119875. if (typeof opts === "undefined") {
  119876. return true;
  119877. } else {
  119878. return (0, _shallowEqual.default)(node, opts);
  119879. }
  119880. }
  119881. return false;
  119882. }
  119883. function isArrayTypeAnnotation(node, opts) {
  119884. if (!node)
  119885. return false;
  119886. const nodeType = node.type;
  119887. if (nodeType === "ArrayTypeAnnotation") {
  119888. if (typeof opts === "undefined") {
  119889. return true;
  119890. } else {
  119891. return (0, _shallowEqual.default)(node, opts);
  119892. }
  119893. }
  119894. return false;
  119895. }
  119896. function isBooleanTypeAnnotation(node, opts) {
  119897. if (!node)
  119898. return false;
  119899. const nodeType = node.type;
  119900. if (nodeType === "BooleanTypeAnnotation") {
  119901. if (typeof opts === "undefined") {
  119902. return true;
  119903. } else {
  119904. return (0, _shallowEqual.default)(node, opts);
  119905. }
  119906. }
  119907. return false;
  119908. }
  119909. function isBooleanLiteralTypeAnnotation(node, opts) {
  119910. if (!node)
  119911. return false;
  119912. const nodeType = node.type;
  119913. if (nodeType === "BooleanLiteralTypeAnnotation") {
  119914. if (typeof opts === "undefined") {
  119915. return true;
  119916. } else {
  119917. return (0, _shallowEqual.default)(node, opts);
  119918. }
  119919. }
  119920. return false;
  119921. }
  119922. function isNullLiteralTypeAnnotation(node, opts) {
  119923. if (!node)
  119924. return false;
  119925. const nodeType = node.type;
  119926. if (nodeType === "NullLiteralTypeAnnotation") {
  119927. if (typeof opts === "undefined") {
  119928. return true;
  119929. } else {
  119930. return (0, _shallowEqual.default)(node, opts);
  119931. }
  119932. }
  119933. return false;
  119934. }
  119935. function isClassImplements(node, opts) {
  119936. if (!node)
  119937. return false;
  119938. const nodeType = node.type;
  119939. if (nodeType === "ClassImplements") {
  119940. if (typeof opts === "undefined") {
  119941. return true;
  119942. } else {
  119943. return (0, _shallowEqual.default)(node, opts);
  119944. }
  119945. }
  119946. return false;
  119947. }
  119948. function isDeclareClass(node, opts) {
  119949. if (!node)
  119950. return false;
  119951. const nodeType = node.type;
  119952. if (nodeType === "DeclareClass") {
  119953. if (typeof opts === "undefined") {
  119954. return true;
  119955. } else {
  119956. return (0, _shallowEqual.default)(node, opts);
  119957. }
  119958. }
  119959. return false;
  119960. }
  119961. function isDeclareFunction(node, opts) {
  119962. if (!node)
  119963. return false;
  119964. const nodeType = node.type;
  119965. if (nodeType === "DeclareFunction") {
  119966. if (typeof opts === "undefined") {
  119967. return true;
  119968. } else {
  119969. return (0, _shallowEqual.default)(node, opts);
  119970. }
  119971. }
  119972. return false;
  119973. }
  119974. function isDeclareInterface(node, opts) {
  119975. if (!node)
  119976. return false;
  119977. const nodeType = node.type;
  119978. if (nodeType === "DeclareInterface") {
  119979. if (typeof opts === "undefined") {
  119980. return true;
  119981. } else {
  119982. return (0, _shallowEqual.default)(node, opts);
  119983. }
  119984. }
  119985. return false;
  119986. }
  119987. function isDeclareModule(node, opts) {
  119988. if (!node)
  119989. return false;
  119990. const nodeType = node.type;
  119991. if (nodeType === "DeclareModule") {
  119992. if (typeof opts === "undefined") {
  119993. return true;
  119994. } else {
  119995. return (0, _shallowEqual.default)(node, opts);
  119996. }
  119997. }
  119998. return false;
  119999. }
  120000. function isDeclareModuleExports(node, opts) {
  120001. if (!node)
  120002. return false;
  120003. const nodeType = node.type;
  120004. if (nodeType === "DeclareModuleExports") {
  120005. if (typeof opts === "undefined") {
  120006. return true;
  120007. } else {
  120008. return (0, _shallowEqual.default)(node, opts);
  120009. }
  120010. }
  120011. return false;
  120012. }
  120013. function isDeclareTypeAlias(node, opts) {
  120014. if (!node)
  120015. return false;
  120016. const nodeType = node.type;
  120017. if (nodeType === "DeclareTypeAlias") {
  120018. if (typeof opts === "undefined") {
  120019. return true;
  120020. } else {
  120021. return (0, _shallowEqual.default)(node, opts);
  120022. }
  120023. }
  120024. return false;
  120025. }
  120026. function isDeclareOpaqueType(node, opts) {
  120027. if (!node)
  120028. return false;
  120029. const nodeType = node.type;
  120030. if (nodeType === "DeclareOpaqueType") {
  120031. if (typeof opts === "undefined") {
  120032. return true;
  120033. } else {
  120034. return (0, _shallowEqual.default)(node, opts);
  120035. }
  120036. }
  120037. return false;
  120038. }
  120039. function isDeclareVariable(node, opts) {
  120040. if (!node)
  120041. return false;
  120042. const nodeType = node.type;
  120043. if (nodeType === "DeclareVariable") {
  120044. if (typeof opts === "undefined") {
  120045. return true;
  120046. } else {
  120047. return (0, _shallowEqual.default)(node, opts);
  120048. }
  120049. }
  120050. return false;
  120051. }
  120052. function isDeclareExportDeclaration(node, opts) {
  120053. if (!node)
  120054. return false;
  120055. const nodeType = node.type;
  120056. if (nodeType === "DeclareExportDeclaration") {
  120057. if (typeof opts === "undefined") {
  120058. return true;
  120059. } else {
  120060. return (0, _shallowEqual.default)(node, opts);
  120061. }
  120062. }
  120063. return false;
  120064. }
  120065. function isDeclareExportAllDeclaration(node, opts) {
  120066. if (!node)
  120067. return false;
  120068. const nodeType = node.type;
  120069. if (nodeType === "DeclareExportAllDeclaration") {
  120070. if (typeof opts === "undefined") {
  120071. return true;
  120072. } else {
  120073. return (0, _shallowEqual.default)(node, opts);
  120074. }
  120075. }
  120076. return false;
  120077. }
  120078. function isDeclaredPredicate(node, opts) {
  120079. if (!node)
  120080. return false;
  120081. const nodeType = node.type;
  120082. if (nodeType === "DeclaredPredicate") {
  120083. if (typeof opts === "undefined") {
  120084. return true;
  120085. } else {
  120086. return (0, _shallowEqual.default)(node, opts);
  120087. }
  120088. }
  120089. return false;
  120090. }
  120091. function isExistsTypeAnnotation(node, opts) {
  120092. if (!node)
  120093. return false;
  120094. const nodeType = node.type;
  120095. if (nodeType === "ExistsTypeAnnotation") {
  120096. if (typeof opts === "undefined") {
  120097. return true;
  120098. } else {
  120099. return (0, _shallowEqual.default)(node, opts);
  120100. }
  120101. }
  120102. return false;
  120103. }
  120104. function isFunctionTypeAnnotation(node, opts) {
  120105. if (!node)
  120106. return false;
  120107. const nodeType = node.type;
  120108. if (nodeType === "FunctionTypeAnnotation") {
  120109. if (typeof opts === "undefined") {
  120110. return true;
  120111. } else {
  120112. return (0, _shallowEqual.default)(node, opts);
  120113. }
  120114. }
  120115. return false;
  120116. }
  120117. function isFunctionTypeParam(node, opts) {
  120118. if (!node)
  120119. return false;
  120120. const nodeType = node.type;
  120121. if (nodeType === "FunctionTypeParam") {
  120122. if (typeof opts === "undefined") {
  120123. return true;
  120124. } else {
  120125. return (0, _shallowEqual.default)(node, opts);
  120126. }
  120127. }
  120128. return false;
  120129. }
  120130. function isGenericTypeAnnotation(node, opts) {
  120131. if (!node)
  120132. return false;
  120133. const nodeType = node.type;
  120134. if (nodeType === "GenericTypeAnnotation") {
  120135. if (typeof opts === "undefined") {
  120136. return true;
  120137. } else {
  120138. return (0, _shallowEqual.default)(node, opts);
  120139. }
  120140. }
  120141. return false;
  120142. }
  120143. function isInferredPredicate(node, opts) {
  120144. if (!node)
  120145. return false;
  120146. const nodeType = node.type;
  120147. if (nodeType === "InferredPredicate") {
  120148. if (typeof opts === "undefined") {
  120149. return true;
  120150. } else {
  120151. return (0, _shallowEqual.default)(node, opts);
  120152. }
  120153. }
  120154. return false;
  120155. }
  120156. function isInterfaceExtends(node, opts) {
  120157. if (!node)
  120158. return false;
  120159. const nodeType = node.type;
  120160. if (nodeType === "InterfaceExtends") {
  120161. if (typeof opts === "undefined") {
  120162. return true;
  120163. } else {
  120164. return (0, _shallowEqual.default)(node, opts);
  120165. }
  120166. }
  120167. return false;
  120168. }
  120169. function isInterfaceDeclaration(node, opts) {
  120170. if (!node)
  120171. return false;
  120172. const nodeType = node.type;
  120173. if (nodeType === "InterfaceDeclaration") {
  120174. if (typeof opts === "undefined") {
  120175. return true;
  120176. } else {
  120177. return (0, _shallowEqual.default)(node, opts);
  120178. }
  120179. }
  120180. return false;
  120181. }
  120182. function isInterfaceTypeAnnotation(node, opts) {
  120183. if (!node)
  120184. return false;
  120185. const nodeType = node.type;
  120186. if (nodeType === "InterfaceTypeAnnotation") {
  120187. if (typeof opts === "undefined") {
  120188. return true;
  120189. } else {
  120190. return (0, _shallowEqual.default)(node, opts);
  120191. }
  120192. }
  120193. return false;
  120194. }
  120195. function isIntersectionTypeAnnotation(node, opts) {
  120196. if (!node)
  120197. return false;
  120198. const nodeType = node.type;
  120199. if (nodeType === "IntersectionTypeAnnotation") {
  120200. if (typeof opts === "undefined") {
  120201. return true;
  120202. } else {
  120203. return (0, _shallowEqual.default)(node, opts);
  120204. }
  120205. }
  120206. return false;
  120207. }
  120208. function isMixedTypeAnnotation(node, opts) {
  120209. if (!node)
  120210. return false;
  120211. const nodeType = node.type;
  120212. if (nodeType === "MixedTypeAnnotation") {
  120213. if (typeof opts === "undefined") {
  120214. return true;
  120215. } else {
  120216. return (0, _shallowEqual.default)(node, opts);
  120217. }
  120218. }
  120219. return false;
  120220. }
  120221. function isEmptyTypeAnnotation(node, opts) {
  120222. if (!node)
  120223. return false;
  120224. const nodeType = node.type;
  120225. if (nodeType === "EmptyTypeAnnotation") {
  120226. if (typeof opts === "undefined") {
  120227. return true;
  120228. } else {
  120229. return (0, _shallowEqual.default)(node, opts);
  120230. }
  120231. }
  120232. return false;
  120233. }
  120234. function isNullableTypeAnnotation(node, opts) {
  120235. if (!node)
  120236. return false;
  120237. const nodeType = node.type;
  120238. if (nodeType === "NullableTypeAnnotation") {
  120239. if (typeof opts === "undefined") {
  120240. return true;
  120241. } else {
  120242. return (0, _shallowEqual.default)(node, opts);
  120243. }
  120244. }
  120245. return false;
  120246. }
  120247. function isNumberLiteralTypeAnnotation(node, opts) {
  120248. if (!node)
  120249. return false;
  120250. const nodeType = node.type;
  120251. if (nodeType === "NumberLiteralTypeAnnotation") {
  120252. if (typeof opts === "undefined") {
  120253. return true;
  120254. } else {
  120255. return (0, _shallowEqual.default)(node, opts);
  120256. }
  120257. }
  120258. return false;
  120259. }
  120260. function isNumberTypeAnnotation(node, opts) {
  120261. if (!node)
  120262. return false;
  120263. const nodeType = node.type;
  120264. if (nodeType === "NumberTypeAnnotation") {
  120265. if (typeof opts === "undefined") {
  120266. return true;
  120267. } else {
  120268. return (0, _shallowEqual.default)(node, opts);
  120269. }
  120270. }
  120271. return false;
  120272. }
  120273. function isObjectTypeAnnotation(node, opts) {
  120274. if (!node)
  120275. return false;
  120276. const nodeType = node.type;
  120277. if (nodeType === "ObjectTypeAnnotation") {
  120278. if (typeof opts === "undefined") {
  120279. return true;
  120280. } else {
  120281. return (0, _shallowEqual.default)(node, opts);
  120282. }
  120283. }
  120284. return false;
  120285. }
  120286. function isObjectTypeInternalSlot(node, opts) {
  120287. if (!node)
  120288. return false;
  120289. const nodeType = node.type;
  120290. if (nodeType === "ObjectTypeInternalSlot") {
  120291. if (typeof opts === "undefined") {
  120292. return true;
  120293. } else {
  120294. return (0, _shallowEqual.default)(node, opts);
  120295. }
  120296. }
  120297. return false;
  120298. }
  120299. function isObjectTypeCallProperty(node, opts) {
  120300. if (!node)
  120301. return false;
  120302. const nodeType = node.type;
  120303. if (nodeType === "ObjectTypeCallProperty") {
  120304. if (typeof opts === "undefined") {
  120305. return true;
  120306. } else {
  120307. return (0, _shallowEqual.default)(node, opts);
  120308. }
  120309. }
  120310. return false;
  120311. }
  120312. function isObjectTypeIndexer(node, opts) {
  120313. if (!node)
  120314. return false;
  120315. const nodeType = node.type;
  120316. if (nodeType === "ObjectTypeIndexer") {
  120317. if (typeof opts === "undefined") {
  120318. return true;
  120319. } else {
  120320. return (0, _shallowEqual.default)(node, opts);
  120321. }
  120322. }
  120323. return false;
  120324. }
  120325. function isObjectTypeProperty(node, opts) {
  120326. if (!node)
  120327. return false;
  120328. const nodeType = node.type;
  120329. if (nodeType === "ObjectTypeProperty") {
  120330. if (typeof opts === "undefined") {
  120331. return true;
  120332. } else {
  120333. return (0, _shallowEqual.default)(node, opts);
  120334. }
  120335. }
  120336. return false;
  120337. }
  120338. function isObjectTypeSpreadProperty(node, opts) {
  120339. if (!node)
  120340. return false;
  120341. const nodeType = node.type;
  120342. if (nodeType === "ObjectTypeSpreadProperty") {
  120343. if (typeof opts === "undefined") {
  120344. return true;
  120345. } else {
  120346. return (0, _shallowEqual.default)(node, opts);
  120347. }
  120348. }
  120349. return false;
  120350. }
  120351. function isOpaqueType(node, opts) {
  120352. if (!node)
  120353. return false;
  120354. const nodeType = node.type;
  120355. if (nodeType === "OpaqueType") {
  120356. if (typeof opts === "undefined") {
  120357. return true;
  120358. } else {
  120359. return (0, _shallowEqual.default)(node, opts);
  120360. }
  120361. }
  120362. return false;
  120363. }
  120364. function isQualifiedTypeIdentifier(node, opts) {
  120365. if (!node)
  120366. return false;
  120367. const nodeType = node.type;
  120368. if (nodeType === "QualifiedTypeIdentifier") {
  120369. if (typeof opts === "undefined") {
  120370. return true;
  120371. } else {
  120372. return (0, _shallowEqual.default)(node, opts);
  120373. }
  120374. }
  120375. return false;
  120376. }
  120377. function isStringLiteralTypeAnnotation(node, opts) {
  120378. if (!node)
  120379. return false;
  120380. const nodeType = node.type;
  120381. if (nodeType === "StringLiteralTypeAnnotation") {
  120382. if (typeof opts === "undefined") {
  120383. return true;
  120384. } else {
  120385. return (0, _shallowEqual.default)(node, opts);
  120386. }
  120387. }
  120388. return false;
  120389. }
  120390. function isStringTypeAnnotation(node, opts) {
  120391. if (!node)
  120392. return false;
  120393. const nodeType = node.type;
  120394. if (nodeType === "StringTypeAnnotation") {
  120395. if (typeof opts === "undefined") {
  120396. return true;
  120397. } else {
  120398. return (0, _shallowEqual.default)(node, opts);
  120399. }
  120400. }
  120401. return false;
  120402. }
  120403. function isSymbolTypeAnnotation(node, opts) {
  120404. if (!node)
  120405. return false;
  120406. const nodeType = node.type;
  120407. if (nodeType === "SymbolTypeAnnotation") {
  120408. if (typeof opts === "undefined") {
  120409. return true;
  120410. } else {
  120411. return (0, _shallowEqual.default)(node, opts);
  120412. }
  120413. }
  120414. return false;
  120415. }
  120416. function isThisTypeAnnotation(node, opts) {
  120417. if (!node)
  120418. return false;
  120419. const nodeType = node.type;
  120420. if (nodeType === "ThisTypeAnnotation") {
  120421. if (typeof opts === "undefined") {
  120422. return true;
  120423. } else {
  120424. return (0, _shallowEqual.default)(node, opts);
  120425. }
  120426. }
  120427. return false;
  120428. }
  120429. function isTupleTypeAnnotation(node, opts) {
  120430. if (!node)
  120431. return false;
  120432. const nodeType = node.type;
  120433. if (nodeType === "TupleTypeAnnotation") {
  120434. if (typeof opts === "undefined") {
  120435. return true;
  120436. } else {
  120437. return (0, _shallowEqual.default)(node, opts);
  120438. }
  120439. }
  120440. return false;
  120441. }
  120442. function isTypeofTypeAnnotation(node, opts) {
  120443. if (!node)
  120444. return false;
  120445. const nodeType = node.type;
  120446. if (nodeType === "TypeofTypeAnnotation") {
  120447. if (typeof opts === "undefined") {
  120448. return true;
  120449. } else {
  120450. return (0, _shallowEqual.default)(node, opts);
  120451. }
  120452. }
  120453. return false;
  120454. }
  120455. function isTypeAlias(node, opts) {
  120456. if (!node)
  120457. return false;
  120458. const nodeType = node.type;
  120459. if (nodeType === "TypeAlias") {
  120460. if (typeof opts === "undefined") {
  120461. return true;
  120462. } else {
  120463. return (0, _shallowEqual.default)(node, opts);
  120464. }
  120465. }
  120466. return false;
  120467. }
  120468. function isTypeAnnotation(node, opts) {
  120469. if (!node)
  120470. return false;
  120471. const nodeType = node.type;
  120472. if (nodeType === "TypeAnnotation") {
  120473. if (typeof opts === "undefined") {
  120474. return true;
  120475. } else {
  120476. return (0, _shallowEqual.default)(node, opts);
  120477. }
  120478. }
  120479. return false;
  120480. }
  120481. function isTypeCastExpression(node, opts) {
  120482. if (!node)
  120483. return false;
  120484. const nodeType = node.type;
  120485. if (nodeType === "TypeCastExpression") {
  120486. if (typeof opts === "undefined") {
  120487. return true;
  120488. } else {
  120489. return (0, _shallowEqual.default)(node, opts);
  120490. }
  120491. }
  120492. return false;
  120493. }
  120494. function isTypeParameter(node, opts) {
  120495. if (!node)
  120496. return false;
  120497. const nodeType = node.type;
  120498. if (nodeType === "TypeParameter") {
  120499. if (typeof opts === "undefined") {
  120500. return true;
  120501. } else {
  120502. return (0, _shallowEqual.default)(node, opts);
  120503. }
  120504. }
  120505. return false;
  120506. }
  120507. function isTypeParameterDeclaration(node, opts) {
  120508. if (!node)
  120509. return false;
  120510. const nodeType = node.type;
  120511. if (nodeType === "TypeParameterDeclaration") {
  120512. if (typeof opts === "undefined") {
  120513. return true;
  120514. } else {
  120515. return (0, _shallowEqual.default)(node, opts);
  120516. }
  120517. }
  120518. return false;
  120519. }
  120520. function isTypeParameterInstantiation(node, opts) {
  120521. if (!node)
  120522. return false;
  120523. const nodeType = node.type;
  120524. if (nodeType === "TypeParameterInstantiation") {
  120525. if (typeof opts === "undefined") {
  120526. return true;
  120527. } else {
  120528. return (0, _shallowEqual.default)(node, opts);
  120529. }
  120530. }
  120531. return false;
  120532. }
  120533. function isUnionTypeAnnotation(node, opts) {
  120534. if (!node)
  120535. return false;
  120536. const nodeType = node.type;
  120537. if (nodeType === "UnionTypeAnnotation") {
  120538. if (typeof opts === "undefined") {
  120539. return true;
  120540. } else {
  120541. return (0, _shallowEqual.default)(node, opts);
  120542. }
  120543. }
  120544. return false;
  120545. }
  120546. function isVariance(node, opts) {
  120547. if (!node)
  120548. return false;
  120549. const nodeType = node.type;
  120550. if (nodeType === "Variance") {
  120551. if (typeof opts === "undefined") {
  120552. return true;
  120553. } else {
  120554. return (0, _shallowEqual.default)(node, opts);
  120555. }
  120556. }
  120557. return false;
  120558. }
  120559. function isVoidTypeAnnotation(node, opts) {
  120560. if (!node)
  120561. return false;
  120562. const nodeType = node.type;
  120563. if (nodeType === "VoidTypeAnnotation") {
  120564. if (typeof opts === "undefined") {
  120565. return true;
  120566. } else {
  120567. return (0, _shallowEqual.default)(node, opts);
  120568. }
  120569. }
  120570. return false;
  120571. }
  120572. function isEnumDeclaration(node, opts) {
  120573. if (!node)
  120574. return false;
  120575. const nodeType = node.type;
  120576. if (nodeType === "EnumDeclaration") {
  120577. if (typeof opts === "undefined") {
  120578. return true;
  120579. } else {
  120580. return (0, _shallowEqual.default)(node, opts);
  120581. }
  120582. }
  120583. return false;
  120584. }
  120585. function isEnumBooleanBody(node, opts) {
  120586. if (!node)
  120587. return false;
  120588. const nodeType = node.type;
  120589. if (nodeType === "EnumBooleanBody") {
  120590. if (typeof opts === "undefined") {
  120591. return true;
  120592. } else {
  120593. return (0, _shallowEqual.default)(node, opts);
  120594. }
  120595. }
  120596. return false;
  120597. }
  120598. function isEnumNumberBody(node, opts) {
  120599. if (!node)
  120600. return false;
  120601. const nodeType = node.type;
  120602. if (nodeType === "EnumNumberBody") {
  120603. if (typeof opts === "undefined") {
  120604. return true;
  120605. } else {
  120606. return (0, _shallowEqual.default)(node, opts);
  120607. }
  120608. }
  120609. return false;
  120610. }
  120611. function isEnumStringBody(node, opts) {
  120612. if (!node)
  120613. return false;
  120614. const nodeType = node.type;
  120615. if (nodeType === "EnumStringBody") {
  120616. if (typeof opts === "undefined") {
  120617. return true;
  120618. } else {
  120619. return (0, _shallowEqual.default)(node, opts);
  120620. }
  120621. }
  120622. return false;
  120623. }
  120624. function isEnumSymbolBody(node, opts) {
  120625. if (!node)
  120626. return false;
  120627. const nodeType = node.type;
  120628. if (nodeType === "EnumSymbolBody") {
  120629. if (typeof opts === "undefined") {
  120630. return true;
  120631. } else {
  120632. return (0, _shallowEqual.default)(node, opts);
  120633. }
  120634. }
  120635. return false;
  120636. }
  120637. function isEnumBooleanMember(node, opts) {
  120638. if (!node)
  120639. return false;
  120640. const nodeType = node.type;
  120641. if (nodeType === "EnumBooleanMember") {
  120642. if (typeof opts === "undefined") {
  120643. return true;
  120644. } else {
  120645. return (0, _shallowEqual.default)(node, opts);
  120646. }
  120647. }
  120648. return false;
  120649. }
  120650. function isEnumNumberMember(node, opts) {
  120651. if (!node)
  120652. return false;
  120653. const nodeType = node.type;
  120654. if (nodeType === "EnumNumberMember") {
  120655. if (typeof opts === "undefined") {
  120656. return true;
  120657. } else {
  120658. return (0, _shallowEqual.default)(node, opts);
  120659. }
  120660. }
  120661. return false;
  120662. }
  120663. function isEnumStringMember(node, opts) {
  120664. if (!node)
  120665. return false;
  120666. const nodeType = node.type;
  120667. if (nodeType === "EnumStringMember") {
  120668. if (typeof opts === "undefined") {
  120669. return true;
  120670. } else {
  120671. return (0, _shallowEqual.default)(node, opts);
  120672. }
  120673. }
  120674. return false;
  120675. }
  120676. function isEnumDefaultedMember(node, opts) {
  120677. if (!node)
  120678. return false;
  120679. const nodeType = node.type;
  120680. if (nodeType === "EnumDefaultedMember") {
  120681. if (typeof opts === "undefined") {
  120682. return true;
  120683. } else {
  120684. return (0, _shallowEqual.default)(node, opts);
  120685. }
  120686. }
  120687. return false;
  120688. }
  120689. function isIndexedAccessType(node, opts) {
  120690. if (!node)
  120691. return false;
  120692. const nodeType = node.type;
  120693. if (nodeType === "IndexedAccessType") {
  120694. if (typeof opts === "undefined") {
  120695. return true;
  120696. } else {
  120697. return (0, _shallowEqual.default)(node, opts);
  120698. }
  120699. }
  120700. return false;
  120701. }
  120702. function isOptionalIndexedAccessType(node, opts) {
  120703. if (!node)
  120704. return false;
  120705. const nodeType = node.type;
  120706. if (nodeType === "OptionalIndexedAccessType") {
  120707. if (typeof opts === "undefined") {
  120708. return true;
  120709. } else {
  120710. return (0, _shallowEqual.default)(node, opts);
  120711. }
  120712. }
  120713. return false;
  120714. }
  120715. function isJSXAttribute(node, opts) {
  120716. if (!node)
  120717. return false;
  120718. const nodeType = node.type;
  120719. if (nodeType === "JSXAttribute") {
  120720. if (typeof opts === "undefined") {
  120721. return true;
  120722. } else {
  120723. return (0, _shallowEqual.default)(node, opts);
  120724. }
  120725. }
  120726. return false;
  120727. }
  120728. function isJSXClosingElement(node, opts) {
  120729. if (!node)
  120730. return false;
  120731. const nodeType = node.type;
  120732. if (nodeType === "JSXClosingElement") {
  120733. if (typeof opts === "undefined") {
  120734. return true;
  120735. } else {
  120736. return (0, _shallowEqual.default)(node, opts);
  120737. }
  120738. }
  120739. return false;
  120740. }
  120741. function isJSXElement2(node, opts) {
  120742. if (!node)
  120743. return false;
  120744. const nodeType = node.type;
  120745. if (nodeType === "JSXElement") {
  120746. if (typeof opts === "undefined") {
  120747. return true;
  120748. } else {
  120749. return (0, _shallowEqual.default)(node, opts);
  120750. }
  120751. }
  120752. return false;
  120753. }
  120754. function isJSXEmptyExpression(node, opts) {
  120755. if (!node)
  120756. return false;
  120757. const nodeType = node.type;
  120758. if (nodeType === "JSXEmptyExpression") {
  120759. if (typeof opts === "undefined") {
  120760. return true;
  120761. } else {
  120762. return (0, _shallowEqual.default)(node, opts);
  120763. }
  120764. }
  120765. return false;
  120766. }
  120767. function isJSXExpressionContainer2(node, opts) {
  120768. if (!node)
  120769. return false;
  120770. const nodeType = node.type;
  120771. if (nodeType === "JSXExpressionContainer") {
  120772. if (typeof opts === "undefined") {
  120773. return true;
  120774. } else {
  120775. return (0, _shallowEqual.default)(node, opts);
  120776. }
  120777. }
  120778. return false;
  120779. }
  120780. function isJSXSpreadChild(node, opts) {
  120781. if (!node)
  120782. return false;
  120783. const nodeType = node.type;
  120784. if (nodeType === "JSXSpreadChild") {
  120785. if (typeof opts === "undefined") {
  120786. return true;
  120787. } else {
  120788. return (0, _shallowEqual.default)(node, opts);
  120789. }
  120790. }
  120791. return false;
  120792. }
  120793. function isJSXIdentifier2(node, opts) {
  120794. if (!node)
  120795. return false;
  120796. const nodeType = node.type;
  120797. if (nodeType === "JSXIdentifier") {
  120798. if (typeof opts === "undefined") {
  120799. return true;
  120800. } else {
  120801. return (0, _shallowEqual.default)(node, opts);
  120802. }
  120803. }
  120804. return false;
  120805. }
  120806. function isJSXMemberExpression(node, opts) {
  120807. if (!node)
  120808. return false;
  120809. const nodeType = node.type;
  120810. if (nodeType === "JSXMemberExpression") {
  120811. if (typeof opts === "undefined") {
  120812. return true;
  120813. } else {
  120814. return (0, _shallowEqual.default)(node, opts);
  120815. }
  120816. }
  120817. return false;
  120818. }
  120819. function isJSXNamespacedName(node, opts) {
  120820. if (!node)
  120821. return false;
  120822. const nodeType = node.type;
  120823. if (nodeType === "JSXNamespacedName") {
  120824. if (typeof opts === "undefined") {
  120825. return true;
  120826. } else {
  120827. return (0, _shallowEqual.default)(node, opts);
  120828. }
  120829. }
  120830. return false;
  120831. }
  120832. function isJSXOpeningElement(node, opts) {
  120833. if (!node)
  120834. return false;
  120835. const nodeType = node.type;
  120836. if (nodeType === "JSXOpeningElement") {
  120837. if (typeof opts === "undefined") {
  120838. return true;
  120839. } else {
  120840. return (0, _shallowEqual.default)(node, opts);
  120841. }
  120842. }
  120843. return false;
  120844. }
  120845. function isJSXSpreadAttribute(node, opts) {
  120846. if (!node)
  120847. return false;
  120848. const nodeType = node.type;
  120849. if (nodeType === "JSXSpreadAttribute") {
  120850. if (typeof opts === "undefined") {
  120851. return true;
  120852. } else {
  120853. return (0, _shallowEqual.default)(node, opts);
  120854. }
  120855. }
  120856. return false;
  120857. }
  120858. function isJSXText(node, opts) {
  120859. if (!node)
  120860. return false;
  120861. const nodeType = node.type;
  120862. if (nodeType === "JSXText") {
  120863. if (typeof opts === "undefined") {
  120864. return true;
  120865. } else {
  120866. return (0, _shallowEqual.default)(node, opts);
  120867. }
  120868. }
  120869. return false;
  120870. }
  120871. function isJSXFragment2(node, opts) {
  120872. if (!node)
  120873. return false;
  120874. const nodeType = node.type;
  120875. if (nodeType === "JSXFragment") {
  120876. if (typeof opts === "undefined") {
  120877. return true;
  120878. } else {
  120879. return (0, _shallowEqual.default)(node, opts);
  120880. }
  120881. }
  120882. return false;
  120883. }
  120884. function isJSXOpeningFragment(node, opts) {
  120885. if (!node)
  120886. return false;
  120887. const nodeType = node.type;
  120888. if (nodeType === "JSXOpeningFragment") {
  120889. if (typeof opts === "undefined") {
  120890. return true;
  120891. } else {
  120892. return (0, _shallowEqual.default)(node, opts);
  120893. }
  120894. }
  120895. return false;
  120896. }
  120897. function isJSXClosingFragment(node, opts) {
  120898. if (!node)
  120899. return false;
  120900. const nodeType = node.type;
  120901. if (nodeType === "JSXClosingFragment") {
  120902. if (typeof opts === "undefined") {
  120903. return true;
  120904. } else {
  120905. return (0, _shallowEqual.default)(node, opts);
  120906. }
  120907. }
  120908. return false;
  120909. }
  120910. function isNoop(node, opts) {
  120911. if (!node)
  120912. return false;
  120913. const nodeType = node.type;
  120914. if (nodeType === "Noop") {
  120915. if (typeof opts === "undefined") {
  120916. return true;
  120917. } else {
  120918. return (0, _shallowEqual.default)(node, opts);
  120919. }
  120920. }
  120921. return false;
  120922. }
  120923. function isPlaceholder(node, opts) {
  120924. if (!node)
  120925. return false;
  120926. const nodeType = node.type;
  120927. if (nodeType === "Placeholder") {
  120928. if (typeof opts === "undefined") {
  120929. return true;
  120930. } else {
  120931. return (0, _shallowEqual.default)(node, opts);
  120932. }
  120933. }
  120934. return false;
  120935. }
  120936. function isV8IntrinsicIdentifier(node, opts) {
  120937. if (!node)
  120938. return false;
  120939. const nodeType = node.type;
  120940. if (nodeType === "V8IntrinsicIdentifier") {
  120941. if (typeof opts === "undefined") {
  120942. return true;
  120943. } else {
  120944. return (0, _shallowEqual.default)(node, opts);
  120945. }
  120946. }
  120947. return false;
  120948. }
  120949. function isArgumentPlaceholder(node, opts) {
  120950. if (!node)
  120951. return false;
  120952. const nodeType = node.type;
  120953. if (nodeType === "ArgumentPlaceholder") {
  120954. if (typeof opts === "undefined") {
  120955. return true;
  120956. } else {
  120957. return (0, _shallowEqual.default)(node, opts);
  120958. }
  120959. }
  120960. return false;
  120961. }
  120962. function isBindExpression(node, opts) {
  120963. if (!node)
  120964. return false;
  120965. const nodeType = node.type;
  120966. if (nodeType === "BindExpression") {
  120967. if (typeof opts === "undefined") {
  120968. return true;
  120969. } else {
  120970. return (0, _shallowEqual.default)(node, opts);
  120971. }
  120972. }
  120973. return false;
  120974. }
  120975. function isClassProperty(node, opts) {
  120976. if (!node)
  120977. return false;
  120978. const nodeType = node.type;
  120979. if (nodeType === "ClassProperty") {
  120980. if (typeof opts === "undefined") {
  120981. return true;
  120982. } else {
  120983. return (0, _shallowEqual.default)(node, opts);
  120984. }
  120985. }
  120986. return false;
  120987. }
  120988. function isPipelineTopicExpression(node, opts) {
  120989. if (!node)
  120990. return false;
  120991. const nodeType = node.type;
  120992. if (nodeType === "PipelineTopicExpression") {
  120993. if (typeof opts === "undefined") {
  120994. return true;
  120995. } else {
  120996. return (0, _shallowEqual.default)(node, opts);
  120997. }
  120998. }
  120999. return false;
  121000. }
  121001. function isPipelineBareFunction(node, opts) {
  121002. if (!node)
  121003. return false;
  121004. const nodeType = node.type;
  121005. if (nodeType === "PipelineBareFunction") {
  121006. if (typeof opts === "undefined") {
  121007. return true;
  121008. } else {
  121009. return (0, _shallowEqual.default)(node, opts);
  121010. }
  121011. }
  121012. return false;
  121013. }
  121014. function isPipelinePrimaryTopicReference(node, opts) {
  121015. if (!node)
  121016. return false;
  121017. const nodeType = node.type;
  121018. if (nodeType === "PipelinePrimaryTopicReference") {
  121019. if (typeof opts === "undefined") {
  121020. return true;
  121021. } else {
  121022. return (0, _shallowEqual.default)(node, opts);
  121023. }
  121024. }
  121025. return false;
  121026. }
  121027. function isClassPrivateProperty(node, opts) {
  121028. if (!node)
  121029. return false;
  121030. const nodeType = node.type;
  121031. if (nodeType === "ClassPrivateProperty") {
  121032. if (typeof opts === "undefined") {
  121033. return true;
  121034. } else {
  121035. return (0, _shallowEqual.default)(node, opts);
  121036. }
  121037. }
  121038. return false;
  121039. }
  121040. function isClassPrivateMethod(node, opts) {
  121041. if (!node)
  121042. return false;
  121043. const nodeType = node.type;
  121044. if (nodeType === "ClassPrivateMethod") {
  121045. if (typeof opts === "undefined") {
  121046. return true;
  121047. } else {
  121048. return (0, _shallowEqual.default)(node, opts);
  121049. }
  121050. }
  121051. return false;
  121052. }
  121053. function isImportAttribute(node, opts) {
  121054. if (!node)
  121055. return false;
  121056. const nodeType = node.type;
  121057. if (nodeType === "ImportAttribute") {
  121058. if (typeof opts === "undefined") {
  121059. return true;
  121060. } else {
  121061. return (0, _shallowEqual.default)(node, opts);
  121062. }
  121063. }
  121064. return false;
  121065. }
  121066. function isDecorator(node, opts) {
  121067. if (!node)
  121068. return false;
  121069. const nodeType = node.type;
  121070. if (nodeType === "Decorator") {
  121071. if (typeof opts === "undefined") {
  121072. return true;
  121073. } else {
  121074. return (0, _shallowEqual.default)(node, opts);
  121075. }
  121076. }
  121077. return false;
  121078. }
  121079. function isDoExpression(node, opts) {
  121080. if (!node)
  121081. return false;
  121082. const nodeType = node.type;
  121083. if (nodeType === "DoExpression") {
  121084. if (typeof opts === "undefined") {
  121085. return true;
  121086. } else {
  121087. return (0, _shallowEqual.default)(node, opts);
  121088. }
  121089. }
  121090. return false;
  121091. }
  121092. function isExportDefaultSpecifier(node, opts) {
  121093. if (!node)
  121094. return false;
  121095. const nodeType = node.type;
  121096. if (nodeType === "ExportDefaultSpecifier") {
  121097. if (typeof opts === "undefined") {
  121098. return true;
  121099. } else {
  121100. return (0, _shallowEqual.default)(node, opts);
  121101. }
  121102. }
  121103. return false;
  121104. }
  121105. function isPrivateName(node, opts) {
  121106. if (!node)
  121107. return false;
  121108. const nodeType = node.type;
  121109. if (nodeType === "PrivateName") {
  121110. if (typeof opts === "undefined") {
  121111. return true;
  121112. } else {
  121113. return (0, _shallowEqual.default)(node, opts);
  121114. }
  121115. }
  121116. return false;
  121117. }
  121118. function isRecordExpression(node, opts) {
  121119. if (!node)
  121120. return false;
  121121. const nodeType = node.type;
  121122. if (nodeType === "RecordExpression") {
  121123. if (typeof opts === "undefined") {
  121124. return true;
  121125. } else {
  121126. return (0, _shallowEqual.default)(node, opts);
  121127. }
  121128. }
  121129. return false;
  121130. }
  121131. function isTupleExpression(node, opts) {
  121132. if (!node)
  121133. return false;
  121134. const nodeType = node.type;
  121135. if (nodeType === "TupleExpression") {
  121136. if (typeof opts === "undefined") {
  121137. return true;
  121138. } else {
  121139. return (0, _shallowEqual.default)(node, opts);
  121140. }
  121141. }
  121142. return false;
  121143. }
  121144. function isDecimalLiteral(node, opts) {
  121145. if (!node)
  121146. return false;
  121147. const nodeType = node.type;
  121148. if (nodeType === "DecimalLiteral") {
  121149. if (typeof opts === "undefined") {
  121150. return true;
  121151. } else {
  121152. return (0, _shallowEqual.default)(node, opts);
  121153. }
  121154. }
  121155. return false;
  121156. }
  121157. function isStaticBlock(node, opts) {
  121158. if (!node)
  121159. return false;
  121160. const nodeType = node.type;
  121161. if (nodeType === "StaticBlock") {
  121162. if (typeof opts === "undefined") {
  121163. return true;
  121164. } else {
  121165. return (0, _shallowEqual.default)(node, opts);
  121166. }
  121167. }
  121168. return false;
  121169. }
  121170. function isModuleExpression(node, opts) {
  121171. if (!node)
  121172. return false;
  121173. const nodeType = node.type;
  121174. if (nodeType === "ModuleExpression") {
  121175. if (typeof opts === "undefined") {
  121176. return true;
  121177. } else {
  121178. return (0, _shallowEqual.default)(node, opts);
  121179. }
  121180. }
  121181. return false;
  121182. }
  121183. function isTSParameterProperty(node, opts) {
  121184. if (!node)
  121185. return false;
  121186. const nodeType = node.type;
  121187. if (nodeType === "TSParameterProperty") {
  121188. if (typeof opts === "undefined") {
  121189. return true;
  121190. } else {
  121191. return (0, _shallowEqual.default)(node, opts);
  121192. }
  121193. }
  121194. return false;
  121195. }
  121196. function isTSDeclareFunction(node, opts) {
  121197. if (!node)
  121198. return false;
  121199. const nodeType = node.type;
  121200. if (nodeType === "TSDeclareFunction") {
  121201. if (typeof opts === "undefined") {
  121202. return true;
  121203. } else {
  121204. return (0, _shallowEqual.default)(node, opts);
  121205. }
  121206. }
  121207. return false;
  121208. }
  121209. function isTSDeclareMethod(node, opts) {
  121210. if (!node)
  121211. return false;
  121212. const nodeType = node.type;
  121213. if (nodeType === "TSDeclareMethod") {
  121214. if (typeof opts === "undefined") {
  121215. return true;
  121216. } else {
  121217. return (0, _shallowEqual.default)(node, opts);
  121218. }
  121219. }
  121220. return false;
  121221. }
  121222. function isTSQualifiedName(node, opts) {
  121223. if (!node)
  121224. return false;
  121225. const nodeType = node.type;
  121226. if (nodeType === "TSQualifiedName") {
  121227. if (typeof opts === "undefined") {
  121228. return true;
  121229. } else {
  121230. return (0, _shallowEqual.default)(node, opts);
  121231. }
  121232. }
  121233. return false;
  121234. }
  121235. function isTSCallSignatureDeclaration(node, opts) {
  121236. if (!node)
  121237. return false;
  121238. const nodeType = node.type;
  121239. if (nodeType === "TSCallSignatureDeclaration") {
  121240. if (typeof opts === "undefined") {
  121241. return true;
  121242. } else {
  121243. return (0, _shallowEqual.default)(node, opts);
  121244. }
  121245. }
  121246. return false;
  121247. }
  121248. function isTSConstructSignatureDeclaration(node, opts) {
  121249. if (!node)
  121250. return false;
  121251. const nodeType = node.type;
  121252. if (nodeType === "TSConstructSignatureDeclaration") {
  121253. if (typeof opts === "undefined") {
  121254. return true;
  121255. } else {
  121256. return (0, _shallowEqual.default)(node, opts);
  121257. }
  121258. }
  121259. return false;
  121260. }
  121261. function isTSPropertySignature(node, opts) {
  121262. if (!node)
  121263. return false;
  121264. const nodeType = node.type;
  121265. if (nodeType === "TSPropertySignature") {
  121266. if (typeof opts === "undefined") {
  121267. return true;
  121268. } else {
  121269. return (0, _shallowEqual.default)(node, opts);
  121270. }
  121271. }
  121272. return false;
  121273. }
  121274. function isTSMethodSignature(node, opts) {
  121275. if (!node)
  121276. return false;
  121277. const nodeType = node.type;
  121278. if (nodeType === "TSMethodSignature") {
  121279. if (typeof opts === "undefined") {
  121280. return true;
  121281. } else {
  121282. return (0, _shallowEqual.default)(node, opts);
  121283. }
  121284. }
  121285. return false;
  121286. }
  121287. function isTSIndexSignature(node, opts) {
  121288. if (!node)
  121289. return false;
  121290. const nodeType = node.type;
  121291. if (nodeType === "TSIndexSignature") {
  121292. if (typeof opts === "undefined") {
  121293. return true;
  121294. } else {
  121295. return (0, _shallowEqual.default)(node, opts);
  121296. }
  121297. }
  121298. return false;
  121299. }
  121300. function isTSAnyKeyword(node, opts) {
  121301. if (!node)
  121302. return false;
  121303. const nodeType = node.type;
  121304. if (nodeType === "TSAnyKeyword") {
  121305. if (typeof opts === "undefined") {
  121306. return true;
  121307. } else {
  121308. return (0, _shallowEqual.default)(node, opts);
  121309. }
  121310. }
  121311. return false;
  121312. }
  121313. function isTSBooleanKeyword(node, opts) {
  121314. if (!node)
  121315. return false;
  121316. const nodeType = node.type;
  121317. if (nodeType === "TSBooleanKeyword") {
  121318. if (typeof opts === "undefined") {
  121319. return true;
  121320. } else {
  121321. return (0, _shallowEqual.default)(node, opts);
  121322. }
  121323. }
  121324. return false;
  121325. }
  121326. function isTSBigIntKeyword(node, opts) {
  121327. if (!node)
  121328. return false;
  121329. const nodeType = node.type;
  121330. if (nodeType === "TSBigIntKeyword") {
  121331. if (typeof opts === "undefined") {
  121332. return true;
  121333. } else {
  121334. return (0, _shallowEqual.default)(node, opts);
  121335. }
  121336. }
  121337. return false;
  121338. }
  121339. function isTSIntrinsicKeyword(node, opts) {
  121340. if (!node)
  121341. return false;
  121342. const nodeType = node.type;
  121343. if (nodeType === "TSIntrinsicKeyword") {
  121344. if (typeof opts === "undefined") {
  121345. return true;
  121346. } else {
  121347. return (0, _shallowEqual.default)(node, opts);
  121348. }
  121349. }
  121350. return false;
  121351. }
  121352. function isTSNeverKeyword(node, opts) {
  121353. if (!node)
  121354. return false;
  121355. const nodeType = node.type;
  121356. if (nodeType === "TSNeverKeyword") {
  121357. if (typeof opts === "undefined") {
  121358. return true;
  121359. } else {
  121360. return (0, _shallowEqual.default)(node, opts);
  121361. }
  121362. }
  121363. return false;
  121364. }
  121365. function isTSNullKeyword(node, opts) {
  121366. if (!node)
  121367. return false;
  121368. const nodeType = node.type;
  121369. if (nodeType === "TSNullKeyword") {
  121370. if (typeof opts === "undefined") {
  121371. return true;
  121372. } else {
  121373. return (0, _shallowEqual.default)(node, opts);
  121374. }
  121375. }
  121376. return false;
  121377. }
  121378. function isTSNumberKeyword(node, opts) {
  121379. if (!node)
  121380. return false;
  121381. const nodeType = node.type;
  121382. if (nodeType === "TSNumberKeyword") {
  121383. if (typeof opts === "undefined") {
  121384. return true;
  121385. } else {
  121386. return (0, _shallowEqual.default)(node, opts);
  121387. }
  121388. }
  121389. return false;
  121390. }
  121391. function isTSObjectKeyword(node, opts) {
  121392. if (!node)
  121393. return false;
  121394. const nodeType = node.type;
  121395. if (nodeType === "TSObjectKeyword") {
  121396. if (typeof opts === "undefined") {
  121397. return true;
  121398. } else {
  121399. return (0, _shallowEqual.default)(node, opts);
  121400. }
  121401. }
  121402. return false;
  121403. }
  121404. function isTSStringKeyword(node, opts) {
  121405. if (!node)
  121406. return false;
  121407. const nodeType = node.type;
  121408. if (nodeType === "TSStringKeyword") {
  121409. if (typeof opts === "undefined") {
  121410. return true;
  121411. } else {
  121412. return (0, _shallowEqual.default)(node, opts);
  121413. }
  121414. }
  121415. return false;
  121416. }
  121417. function isTSSymbolKeyword(node, opts) {
  121418. if (!node)
  121419. return false;
  121420. const nodeType = node.type;
  121421. if (nodeType === "TSSymbolKeyword") {
  121422. if (typeof opts === "undefined") {
  121423. return true;
  121424. } else {
  121425. return (0, _shallowEqual.default)(node, opts);
  121426. }
  121427. }
  121428. return false;
  121429. }
  121430. function isTSUndefinedKeyword(node, opts) {
  121431. if (!node)
  121432. return false;
  121433. const nodeType = node.type;
  121434. if (nodeType === "TSUndefinedKeyword") {
  121435. if (typeof opts === "undefined") {
  121436. return true;
  121437. } else {
  121438. return (0, _shallowEqual.default)(node, opts);
  121439. }
  121440. }
  121441. return false;
  121442. }
  121443. function isTSUnknownKeyword(node, opts) {
  121444. if (!node)
  121445. return false;
  121446. const nodeType = node.type;
  121447. if (nodeType === "TSUnknownKeyword") {
  121448. if (typeof opts === "undefined") {
  121449. return true;
  121450. } else {
  121451. return (0, _shallowEqual.default)(node, opts);
  121452. }
  121453. }
  121454. return false;
  121455. }
  121456. function isTSVoidKeyword(node, opts) {
  121457. if (!node)
  121458. return false;
  121459. const nodeType = node.type;
  121460. if (nodeType === "TSVoidKeyword") {
  121461. if (typeof opts === "undefined") {
  121462. return true;
  121463. } else {
  121464. return (0, _shallowEqual.default)(node, opts);
  121465. }
  121466. }
  121467. return false;
  121468. }
  121469. function isTSThisType(node, opts) {
  121470. if (!node)
  121471. return false;
  121472. const nodeType = node.type;
  121473. if (nodeType === "TSThisType") {
  121474. if (typeof opts === "undefined") {
  121475. return true;
  121476. } else {
  121477. return (0, _shallowEqual.default)(node, opts);
  121478. }
  121479. }
  121480. return false;
  121481. }
  121482. function isTSFunctionType(node, opts) {
  121483. if (!node)
  121484. return false;
  121485. const nodeType = node.type;
  121486. if (nodeType === "TSFunctionType") {
  121487. if (typeof opts === "undefined") {
  121488. return true;
  121489. } else {
  121490. return (0, _shallowEqual.default)(node, opts);
  121491. }
  121492. }
  121493. return false;
  121494. }
  121495. function isTSConstructorType(node, opts) {
  121496. if (!node)
  121497. return false;
  121498. const nodeType = node.type;
  121499. if (nodeType === "TSConstructorType") {
  121500. if (typeof opts === "undefined") {
  121501. return true;
  121502. } else {
  121503. return (0, _shallowEqual.default)(node, opts);
  121504. }
  121505. }
  121506. return false;
  121507. }
  121508. function isTSTypeReference(node, opts) {
  121509. if (!node)
  121510. return false;
  121511. const nodeType = node.type;
  121512. if (nodeType === "TSTypeReference") {
  121513. if (typeof opts === "undefined") {
  121514. return true;
  121515. } else {
  121516. return (0, _shallowEqual.default)(node, opts);
  121517. }
  121518. }
  121519. return false;
  121520. }
  121521. function isTSTypePredicate(node, opts) {
  121522. if (!node)
  121523. return false;
  121524. const nodeType = node.type;
  121525. if (nodeType === "TSTypePredicate") {
  121526. if (typeof opts === "undefined") {
  121527. return true;
  121528. } else {
  121529. return (0, _shallowEqual.default)(node, opts);
  121530. }
  121531. }
  121532. return false;
  121533. }
  121534. function isTSTypeQuery(node, opts) {
  121535. if (!node)
  121536. return false;
  121537. const nodeType = node.type;
  121538. if (nodeType === "TSTypeQuery") {
  121539. if (typeof opts === "undefined") {
  121540. return true;
  121541. } else {
  121542. return (0, _shallowEqual.default)(node, opts);
  121543. }
  121544. }
  121545. return false;
  121546. }
  121547. function isTSTypeLiteral(node, opts) {
  121548. if (!node)
  121549. return false;
  121550. const nodeType = node.type;
  121551. if (nodeType === "TSTypeLiteral") {
  121552. if (typeof opts === "undefined") {
  121553. return true;
  121554. } else {
  121555. return (0, _shallowEqual.default)(node, opts);
  121556. }
  121557. }
  121558. return false;
  121559. }
  121560. function isTSArrayType(node, opts) {
  121561. if (!node)
  121562. return false;
  121563. const nodeType = node.type;
  121564. if (nodeType === "TSArrayType") {
  121565. if (typeof opts === "undefined") {
  121566. return true;
  121567. } else {
  121568. return (0, _shallowEqual.default)(node, opts);
  121569. }
  121570. }
  121571. return false;
  121572. }
  121573. function isTSTupleType(node, opts) {
  121574. if (!node)
  121575. return false;
  121576. const nodeType = node.type;
  121577. if (nodeType === "TSTupleType") {
  121578. if (typeof opts === "undefined") {
  121579. return true;
  121580. } else {
  121581. return (0, _shallowEqual.default)(node, opts);
  121582. }
  121583. }
  121584. return false;
  121585. }
  121586. function isTSOptionalType(node, opts) {
  121587. if (!node)
  121588. return false;
  121589. const nodeType = node.type;
  121590. if (nodeType === "TSOptionalType") {
  121591. if (typeof opts === "undefined") {
  121592. return true;
  121593. } else {
  121594. return (0, _shallowEqual.default)(node, opts);
  121595. }
  121596. }
  121597. return false;
  121598. }
  121599. function isTSRestType(node, opts) {
  121600. if (!node)
  121601. return false;
  121602. const nodeType = node.type;
  121603. if (nodeType === "TSRestType") {
  121604. if (typeof opts === "undefined") {
  121605. return true;
  121606. } else {
  121607. return (0, _shallowEqual.default)(node, opts);
  121608. }
  121609. }
  121610. return false;
  121611. }
  121612. function isTSNamedTupleMember(node, opts) {
  121613. if (!node)
  121614. return false;
  121615. const nodeType = node.type;
  121616. if (nodeType === "TSNamedTupleMember") {
  121617. if (typeof opts === "undefined") {
  121618. return true;
  121619. } else {
  121620. return (0, _shallowEqual.default)(node, opts);
  121621. }
  121622. }
  121623. return false;
  121624. }
  121625. function isTSUnionType(node, opts) {
  121626. if (!node)
  121627. return false;
  121628. const nodeType = node.type;
  121629. if (nodeType === "TSUnionType") {
  121630. if (typeof opts === "undefined") {
  121631. return true;
  121632. } else {
  121633. return (0, _shallowEqual.default)(node, opts);
  121634. }
  121635. }
  121636. return false;
  121637. }
  121638. function isTSIntersectionType(node, opts) {
  121639. if (!node)
  121640. return false;
  121641. const nodeType = node.type;
  121642. if (nodeType === "TSIntersectionType") {
  121643. if (typeof opts === "undefined") {
  121644. return true;
  121645. } else {
  121646. return (0, _shallowEqual.default)(node, opts);
  121647. }
  121648. }
  121649. return false;
  121650. }
  121651. function isTSConditionalType(node, opts) {
  121652. if (!node)
  121653. return false;
  121654. const nodeType = node.type;
  121655. if (nodeType === "TSConditionalType") {
  121656. if (typeof opts === "undefined") {
  121657. return true;
  121658. } else {
  121659. return (0, _shallowEqual.default)(node, opts);
  121660. }
  121661. }
  121662. return false;
  121663. }
  121664. function isTSInferType(node, opts) {
  121665. if (!node)
  121666. return false;
  121667. const nodeType = node.type;
  121668. if (nodeType === "TSInferType") {
  121669. if (typeof opts === "undefined") {
  121670. return true;
  121671. } else {
  121672. return (0, _shallowEqual.default)(node, opts);
  121673. }
  121674. }
  121675. return false;
  121676. }
  121677. function isTSParenthesizedType(node, opts) {
  121678. if (!node)
  121679. return false;
  121680. const nodeType = node.type;
  121681. if (nodeType === "TSParenthesizedType") {
  121682. if (typeof opts === "undefined") {
  121683. return true;
  121684. } else {
  121685. return (0, _shallowEqual.default)(node, opts);
  121686. }
  121687. }
  121688. return false;
  121689. }
  121690. function isTSTypeOperator(node, opts) {
  121691. if (!node)
  121692. return false;
  121693. const nodeType = node.type;
  121694. if (nodeType === "TSTypeOperator") {
  121695. if (typeof opts === "undefined") {
  121696. return true;
  121697. } else {
  121698. return (0, _shallowEqual.default)(node, opts);
  121699. }
  121700. }
  121701. return false;
  121702. }
  121703. function isTSIndexedAccessType(node, opts) {
  121704. if (!node)
  121705. return false;
  121706. const nodeType = node.type;
  121707. if (nodeType === "TSIndexedAccessType") {
  121708. if (typeof opts === "undefined") {
  121709. return true;
  121710. } else {
  121711. return (0, _shallowEqual.default)(node, opts);
  121712. }
  121713. }
  121714. return false;
  121715. }
  121716. function isTSMappedType(node, opts) {
  121717. if (!node)
  121718. return false;
  121719. const nodeType = node.type;
  121720. if (nodeType === "TSMappedType") {
  121721. if (typeof opts === "undefined") {
  121722. return true;
  121723. } else {
  121724. return (0, _shallowEqual.default)(node, opts);
  121725. }
  121726. }
  121727. return false;
  121728. }
  121729. function isTSLiteralType(node, opts) {
  121730. if (!node)
  121731. return false;
  121732. const nodeType = node.type;
  121733. if (nodeType === "TSLiteralType") {
  121734. if (typeof opts === "undefined") {
  121735. return true;
  121736. } else {
  121737. return (0, _shallowEqual.default)(node, opts);
  121738. }
  121739. }
  121740. return false;
  121741. }
  121742. function isTSExpressionWithTypeArguments(node, opts) {
  121743. if (!node)
  121744. return false;
  121745. const nodeType = node.type;
  121746. if (nodeType === "TSExpressionWithTypeArguments") {
  121747. if (typeof opts === "undefined") {
  121748. return true;
  121749. } else {
  121750. return (0, _shallowEqual.default)(node, opts);
  121751. }
  121752. }
  121753. return false;
  121754. }
  121755. function isTSInterfaceDeclaration(node, opts) {
  121756. if (!node)
  121757. return false;
  121758. const nodeType = node.type;
  121759. if (nodeType === "TSInterfaceDeclaration") {
  121760. if (typeof opts === "undefined") {
  121761. return true;
  121762. } else {
  121763. return (0, _shallowEqual.default)(node, opts);
  121764. }
  121765. }
  121766. return false;
  121767. }
  121768. function isTSInterfaceBody(node, opts) {
  121769. if (!node)
  121770. return false;
  121771. const nodeType = node.type;
  121772. if (nodeType === "TSInterfaceBody") {
  121773. if (typeof opts === "undefined") {
  121774. return true;
  121775. } else {
  121776. return (0, _shallowEqual.default)(node, opts);
  121777. }
  121778. }
  121779. return false;
  121780. }
  121781. function isTSTypeAliasDeclaration(node, opts) {
  121782. if (!node)
  121783. return false;
  121784. const nodeType = node.type;
  121785. if (nodeType === "TSTypeAliasDeclaration") {
  121786. if (typeof opts === "undefined") {
  121787. return true;
  121788. } else {
  121789. return (0, _shallowEqual.default)(node, opts);
  121790. }
  121791. }
  121792. return false;
  121793. }
  121794. function isTSAsExpression(node, opts) {
  121795. if (!node)
  121796. return false;
  121797. const nodeType = node.type;
  121798. if (nodeType === "TSAsExpression") {
  121799. if (typeof opts === "undefined") {
  121800. return true;
  121801. } else {
  121802. return (0, _shallowEqual.default)(node, opts);
  121803. }
  121804. }
  121805. return false;
  121806. }
  121807. function isTSTypeAssertion(node, opts) {
  121808. if (!node)
  121809. return false;
  121810. const nodeType = node.type;
  121811. if (nodeType === "TSTypeAssertion") {
  121812. if (typeof opts === "undefined") {
  121813. return true;
  121814. } else {
  121815. return (0, _shallowEqual.default)(node, opts);
  121816. }
  121817. }
  121818. return false;
  121819. }
  121820. function isTSEnumDeclaration(node, opts) {
  121821. if (!node)
  121822. return false;
  121823. const nodeType = node.type;
  121824. if (nodeType === "TSEnumDeclaration") {
  121825. if (typeof opts === "undefined") {
  121826. return true;
  121827. } else {
  121828. return (0, _shallowEqual.default)(node, opts);
  121829. }
  121830. }
  121831. return false;
  121832. }
  121833. function isTSEnumMember(node, opts) {
  121834. if (!node)
  121835. return false;
  121836. const nodeType = node.type;
  121837. if (nodeType === "TSEnumMember") {
  121838. if (typeof opts === "undefined") {
  121839. return true;
  121840. } else {
  121841. return (0, _shallowEqual.default)(node, opts);
  121842. }
  121843. }
  121844. return false;
  121845. }
  121846. function isTSModuleDeclaration(node, opts) {
  121847. if (!node)
  121848. return false;
  121849. const nodeType = node.type;
  121850. if (nodeType === "TSModuleDeclaration") {
  121851. if (typeof opts === "undefined") {
  121852. return true;
  121853. } else {
  121854. return (0, _shallowEqual.default)(node, opts);
  121855. }
  121856. }
  121857. return false;
  121858. }
  121859. function isTSModuleBlock(node, opts) {
  121860. if (!node)
  121861. return false;
  121862. const nodeType = node.type;
  121863. if (nodeType === "TSModuleBlock") {
  121864. if (typeof opts === "undefined") {
  121865. return true;
  121866. } else {
  121867. return (0, _shallowEqual.default)(node, opts);
  121868. }
  121869. }
  121870. return false;
  121871. }
  121872. function isTSImportType(node, opts) {
  121873. if (!node)
  121874. return false;
  121875. const nodeType = node.type;
  121876. if (nodeType === "TSImportType") {
  121877. if (typeof opts === "undefined") {
  121878. return true;
  121879. } else {
  121880. return (0, _shallowEqual.default)(node, opts);
  121881. }
  121882. }
  121883. return false;
  121884. }
  121885. function isTSImportEqualsDeclaration(node, opts) {
  121886. if (!node)
  121887. return false;
  121888. const nodeType = node.type;
  121889. if (nodeType === "TSImportEqualsDeclaration") {
  121890. if (typeof opts === "undefined") {
  121891. return true;
  121892. } else {
  121893. return (0, _shallowEqual.default)(node, opts);
  121894. }
  121895. }
  121896. return false;
  121897. }
  121898. function isTSExternalModuleReference(node, opts) {
  121899. if (!node)
  121900. return false;
  121901. const nodeType = node.type;
  121902. if (nodeType === "TSExternalModuleReference") {
  121903. if (typeof opts === "undefined") {
  121904. return true;
  121905. } else {
  121906. return (0, _shallowEqual.default)(node, opts);
  121907. }
  121908. }
  121909. return false;
  121910. }
  121911. function isTSNonNullExpression(node, opts) {
  121912. if (!node)
  121913. return false;
  121914. const nodeType = node.type;
  121915. if (nodeType === "TSNonNullExpression") {
  121916. if (typeof opts === "undefined") {
  121917. return true;
  121918. } else {
  121919. return (0, _shallowEqual.default)(node, opts);
  121920. }
  121921. }
  121922. return false;
  121923. }
  121924. function isTSExportAssignment(node, opts) {
  121925. if (!node)
  121926. return false;
  121927. const nodeType = node.type;
  121928. if (nodeType === "TSExportAssignment") {
  121929. if (typeof opts === "undefined") {
  121930. return true;
  121931. } else {
  121932. return (0, _shallowEqual.default)(node, opts);
  121933. }
  121934. }
  121935. return false;
  121936. }
  121937. function isTSNamespaceExportDeclaration(node, opts) {
  121938. if (!node)
  121939. return false;
  121940. const nodeType = node.type;
  121941. if (nodeType === "TSNamespaceExportDeclaration") {
  121942. if (typeof opts === "undefined") {
  121943. return true;
  121944. } else {
  121945. return (0, _shallowEqual.default)(node, opts);
  121946. }
  121947. }
  121948. return false;
  121949. }
  121950. function isTSTypeAnnotation(node, opts) {
  121951. if (!node)
  121952. return false;
  121953. const nodeType = node.type;
  121954. if (nodeType === "TSTypeAnnotation") {
  121955. if (typeof opts === "undefined") {
  121956. return true;
  121957. } else {
  121958. return (0, _shallowEqual.default)(node, opts);
  121959. }
  121960. }
  121961. return false;
  121962. }
  121963. function isTSTypeParameterInstantiation(node, opts) {
  121964. if (!node)
  121965. return false;
  121966. const nodeType = node.type;
  121967. if (nodeType === "TSTypeParameterInstantiation") {
  121968. if (typeof opts === "undefined") {
  121969. return true;
  121970. } else {
  121971. return (0, _shallowEqual.default)(node, opts);
  121972. }
  121973. }
  121974. return false;
  121975. }
  121976. function isTSTypeParameterDeclaration(node, opts) {
  121977. if (!node)
  121978. return false;
  121979. const nodeType = node.type;
  121980. if (nodeType === "TSTypeParameterDeclaration") {
  121981. if (typeof opts === "undefined") {
  121982. return true;
  121983. } else {
  121984. return (0, _shallowEqual.default)(node, opts);
  121985. }
  121986. }
  121987. return false;
  121988. }
  121989. function isTSTypeParameter(node, opts) {
  121990. if (!node)
  121991. return false;
  121992. const nodeType = node.type;
  121993. if (nodeType === "TSTypeParameter") {
  121994. if (typeof opts === "undefined") {
  121995. return true;
  121996. } else {
  121997. return (0, _shallowEqual.default)(node, opts);
  121998. }
  121999. }
  122000. return false;
  122001. }
  122002. function isExpression(node, opts) {
  122003. if (!node)
  122004. return false;
  122005. const nodeType = node.type;
  122006. if ("ArrayExpression" === nodeType || "AssignmentExpression" === nodeType || "BinaryExpression" === nodeType || "CallExpression" === nodeType || "ConditionalExpression" === nodeType || "FunctionExpression" === nodeType || "Identifier" === nodeType || "StringLiteral" === nodeType || "NumericLiteral" === nodeType || "NullLiteral" === nodeType || "BooleanLiteral" === nodeType || "RegExpLiteral" === nodeType || "LogicalExpression" === nodeType || "MemberExpression" === nodeType || "NewExpression" === nodeType || "ObjectExpression" === nodeType || "SequenceExpression" === nodeType || "ParenthesizedExpression" === nodeType || "ThisExpression" === nodeType || "UnaryExpression" === nodeType || "UpdateExpression" === nodeType || "ArrowFunctionExpression" === nodeType || "ClassExpression" === nodeType || "MetaProperty" === nodeType || "Super" === nodeType || "TaggedTemplateExpression" === nodeType || "TemplateLiteral" === nodeType || "YieldExpression" === nodeType || "AwaitExpression" === nodeType || "Import" === nodeType || "BigIntLiteral" === nodeType || "OptionalMemberExpression" === nodeType || "OptionalCallExpression" === nodeType || "TypeCastExpression" === nodeType || "JSXElement" === nodeType || "JSXFragment" === nodeType || "BindExpression" === nodeType || "PipelinePrimaryTopicReference" === nodeType || "DoExpression" === nodeType || "RecordExpression" === nodeType || "TupleExpression" === nodeType || "DecimalLiteral" === nodeType || "ModuleExpression" === nodeType || "TSAsExpression" === nodeType || "TSTypeAssertion" === nodeType || "TSNonNullExpression" === nodeType || nodeType === "Placeholder" && ("Expression" === node.expectedNode || "Identifier" === node.expectedNode || "StringLiteral" === node.expectedNode)) {
  122007. if (typeof opts === "undefined") {
  122008. return true;
  122009. } else {
  122010. return (0, _shallowEqual.default)(node, opts);
  122011. }
  122012. }
  122013. return false;
  122014. }
  122015. function isBinary(node, opts) {
  122016. if (!node)
  122017. return false;
  122018. const nodeType = node.type;
  122019. if ("BinaryExpression" === nodeType || "LogicalExpression" === nodeType) {
  122020. if (typeof opts === "undefined") {
  122021. return true;
  122022. } else {
  122023. return (0, _shallowEqual.default)(node, opts);
  122024. }
  122025. }
  122026. return false;
  122027. }
  122028. function isScopable(node, opts) {
  122029. if (!node)
  122030. return false;
  122031. const nodeType = node.type;
  122032. if ("BlockStatement" === nodeType || "CatchClause" === nodeType || "DoWhileStatement" === nodeType || "ForInStatement" === nodeType || "ForStatement" === nodeType || "FunctionDeclaration" === nodeType || "FunctionExpression" === nodeType || "Program" === nodeType || "ObjectMethod" === nodeType || "SwitchStatement" === nodeType || "WhileStatement" === nodeType || "ArrowFunctionExpression" === nodeType || "ClassExpression" === nodeType || "ClassDeclaration" === nodeType || "ForOfStatement" === nodeType || "ClassMethod" === nodeType || "ClassPrivateMethod" === nodeType || "StaticBlock" === nodeType || "TSModuleBlock" === nodeType || nodeType === "Placeholder" && "BlockStatement" === node.expectedNode) {
  122033. if (typeof opts === "undefined") {
  122034. return true;
  122035. } else {
  122036. return (0, _shallowEqual.default)(node, opts);
  122037. }
  122038. }
  122039. return false;
  122040. }
  122041. function isBlockParent(node, opts) {
  122042. if (!node)
  122043. return false;
  122044. const nodeType = node.type;
  122045. if ("BlockStatement" === nodeType || "CatchClause" === nodeType || "DoWhileStatement" === nodeType || "ForInStatement" === nodeType || "ForStatement" === nodeType || "FunctionDeclaration" === nodeType || "FunctionExpression" === nodeType || "Program" === nodeType || "ObjectMethod" === nodeType || "SwitchStatement" === nodeType || "WhileStatement" === nodeType || "ArrowFunctionExpression" === nodeType || "ForOfStatement" === nodeType || "ClassMethod" === nodeType || "ClassPrivateMethod" === nodeType || "StaticBlock" === nodeType || "TSModuleBlock" === nodeType || nodeType === "Placeholder" && "BlockStatement" === node.expectedNode) {
  122046. if (typeof opts === "undefined") {
  122047. return true;
  122048. } else {
  122049. return (0, _shallowEqual.default)(node, opts);
  122050. }
  122051. }
  122052. return false;
  122053. }
  122054. function isBlock(node, opts) {
  122055. if (!node)
  122056. return false;
  122057. const nodeType = node.type;
  122058. if ("BlockStatement" === nodeType || "Program" === nodeType || "TSModuleBlock" === nodeType || nodeType === "Placeholder" && "BlockStatement" === node.expectedNode) {
  122059. if (typeof opts === "undefined") {
  122060. return true;
  122061. } else {
  122062. return (0, _shallowEqual.default)(node, opts);
  122063. }
  122064. }
  122065. return false;
  122066. }
  122067. function isStatement(node, opts) {
  122068. if (!node)
  122069. return false;
  122070. const nodeType = node.type;
  122071. if ("BlockStatement" === nodeType || "BreakStatement" === nodeType || "ContinueStatement" === nodeType || "DebuggerStatement" === nodeType || "DoWhileStatement" === nodeType || "EmptyStatement" === nodeType || "ExpressionStatement" === nodeType || "ForInStatement" === nodeType || "ForStatement" === nodeType || "FunctionDeclaration" === nodeType || "IfStatement" === nodeType || "LabeledStatement" === nodeType || "ReturnStatement" === nodeType || "SwitchStatement" === nodeType || "ThrowStatement" === nodeType || "TryStatement" === nodeType || "VariableDeclaration" === nodeType || "WhileStatement" === nodeType || "WithStatement" === nodeType || "ClassDeclaration" === nodeType || "ExportAllDeclaration" === nodeType || "ExportDefaultDeclaration" === nodeType || "ExportNamedDeclaration" === nodeType || "ForOfStatement" === nodeType || "ImportDeclaration" === nodeType || "DeclareClass" === nodeType || "DeclareFunction" === nodeType || "DeclareInterface" === nodeType || "DeclareModule" === nodeType || "DeclareModuleExports" === nodeType || "DeclareTypeAlias" === nodeType || "DeclareOpaqueType" === nodeType || "DeclareVariable" === nodeType || "DeclareExportDeclaration" === nodeType || "DeclareExportAllDeclaration" === nodeType || "InterfaceDeclaration" === nodeType || "OpaqueType" === nodeType || "TypeAlias" === nodeType || "EnumDeclaration" === nodeType || "TSDeclareFunction" === nodeType || "TSInterfaceDeclaration" === nodeType || "TSTypeAliasDeclaration" === nodeType || "TSEnumDeclaration" === nodeType || "TSModuleDeclaration" === nodeType || "TSImportEqualsDeclaration" === nodeType || "TSExportAssignment" === nodeType || "TSNamespaceExportDeclaration" === nodeType || nodeType === "Placeholder" && ("Statement" === node.expectedNode || "Declaration" === node.expectedNode || "BlockStatement" === node.expectedNode)) {
  122072. if (typeof opts === "undefined") {
  122073. return true;
  122074. } else {
  122075. return (0, _shallowEqual.default)(node, opts);
  122076. }
  122077. }
  122078. return false;
  122079. }
  122080. function isTerminatorless(node, opts) {
  122081. if (!node)
  122082. return false;
  122083. const nodeType = node.type;
  122084. if ("BreakStatement" === nodeType || "ContinueStatement" === nodeType || "ReturnStatement" === nodeType || "ThrowStatement" === nodeType || "YieldExpression" === nodeType || "AwaitExpression" === nodeType) {
  122085. if (typeof opts === "undefined") {
  122086. return true;
  122087. } else {
  122088. return (0, _shallowEqual.default)(node, opts);
  122089. }
  122090. }
  122091. return false;
  122092. }
  122093. function isCompletionStatement(node, opts) {
  122094. if (!node)
  122095. return false;
  122096. const nodeType = node.type;
  122097. if ("BreakStatement" === nodeType || "ContinueStatement" === nodeType || "ReturnStatement" === nodeType || "ThrowStatement" === nodeType) {
  122098. if (typeof opts === "undefined") {
  122099. return true;
  122100. } else {
  122101. return (0, _shallowEqual.default)(node, opts);
  122102. }
  122103. }
  122104. return false;
  122105. }
  122106. function isConditional(node, opts) {
  122107. if (!node)
  122108. return false;
  122109. const nodeType = node.type;
  122110. if ("ConditionalExpression" === nodeType || "IfStatement" === nodeType) {
  122111. if (typeof opts === "undefined") {
  122112. return true;
  122113. } else {
  122114. return (0, _shallowEqual.default)(node, opts);
  122115. }
  122116. }
  122117. return false;
  122118. }
  122119. function isLoop(node, opts) {
  122120. if (!node)
  122121. return false;
  122122. const nodeType = node.type;
  122123. if ("DoWhileStatement" === nodeType || "ForInStatement" === nodeType || "ForStatement" === nodeType || "WhileStatement" === nodeType || "ForOfStatement" === nodeType) {
  122124. if (typeof opts === "undefined") {
  122125. return true;
  122126. } else {
  122127. return (0, _shallowEqual.default)(node, opts);
  122128. }
  122129. }
  122130. return false;
  122131. }
  122132. function isWhile(node, opts) {
  122133. if (!node)
  122134. return false;
  122135. const nodeType = node.type;
  122136. if ("DoWhileStatement" === nodeType || "WhileStatement" === nodeType) {
  122137. if (typeof opts === "undefined") {
  122138. return true;
  122139. } else {
  122140. return (0, _shallowEqual.default)(node, opts);
  122141. }
  122142. }
  122143. return false;
  122144. }
  122145. function isExpressionWrapper(node, opts) {
  122146. if (!node)
  122147. return false;
  122148. const nodeType = node.type;
  122149. if ("ExpressionStatement" === nodeType || "ParenthesizedExpression" === nodeType || "TypeCastExpression" === nodeType) {
  122150. if (typeof opts === "undefined") {
  122151. return true;
  122152. } else {
  122153. return (0, _shallowEqual.default)(node, opts);
  122154. }
  122155. }
  122156. return false;
  122157. }
  122158. function isFor(node, opts) {
  122159. if (!node)
  122160. return false;
  122161. const nodeType = node.type;
  122162. if ("ForInStatement" === nodeType || "ForStatement" === nodeType || "ForOfStatement" === nodeType) {
  122163. if (typeof opts === "undefined") {
  122164. return true;
  122165. } else {
  122166. return (0, _shallowEqual.default)(node, opts);
  122167. }
  122168. }
  122169. return false;
  122170. }
  122171. function isForXStatement(node, opts) {
  122172. if (!node)
  122173. return false;
  122174. const nodeType = node.type;
  122175. if ("ForInStatement" === nodeType || "ForOfStatement" === nodeType) {
  122176. if (typeof opts === "undefined") {
  122177. return true;
  122178. } else {
  122179. return (0, _shallowEqual.default)(node, opts);
  122180. }
  122181. }
  122182. return false;
  122183. }
  122184. function isFunction(node, opts) {
  122185. if (!node)
  122186. return false;
  122187. const nodeType = node.type;
  122188. if ("FunctionDeclaration" === nodeType || "FunctionExpression" === nodeType || "ObjectMethod" === nodeType || "ArrowFunctionExpression" === nodeType || "ClassMethod" === nodeType || "ClassPrivateMethod" === nodeType) {
  122189. if (typeof opts === "undefined") {
  122190. return true;
  122191. } else {
  122192. return (0, _shallowEqual.default)(node, opts);
  122193. }
  122194. }
  122195. return false;
  122196. }
  122197. function isFunctionParent(node, opts) {
  122198. if (!node)
  122199. return false;
  122200. const nodeType = node.type;
  122201. if ("FunctionDeclaration" === nodeType || "FunctionExpression" === nodeType || "ObjectMethod" === nodeType || "ArrowFunctionExpression" === nodeType || "ClassMethod" === nodeType || "ClassPrivateMethod" === nodeType) {
  122202. if (typeof opts === "undefined") {
  122203. return true;
  122204. } else {
  122205. return (0, _shallowEqual.default)(node, opts);
  122206. }
  122207. }
  122208. return false;
  122209. }
  122210. function isPureish(node, opts) {
  122211. if (!node)
  122212. return false;
  122213. const nodeType = node.type;
  122214. if ("FunctionDeclaration" === nodeType || "FunctionExpression" === nodeType || "StringLiteral" === nodeType || "NumericLiteral" === nodeType || "NullLiteral" === nodeType || "BooleanLiteral" === nodeType || "RegExpLiteral" === nodeType || "ArrowFunctionExpression" === nodeType || "BigIntLiteral" === nodeType || "DecimalLiteral" === nodeType || nodeType === "Placeholder" && "StringLiteral" === node.expectedNode) {
  122215. if (typeof opts === "undefined") {
  122216. return true;
  122217. } else {
  122218. return (0, _shallowEqual.default)(node, opts);
  122219. }
  122220. }
  122221. return false;
  122222. }
  122223. function isDeclaration2(node, opts) {
  122224. if (!node)
  122225. return false;
  122226. const nodeType = node.type;
  122227. if ("FunctionDeclaration" === nodeType || "VariableDeclaration" === nodeType || "ClassDeclaration" === nodeType || "ExportAllDeclaration" === nodeType || "ExportDefaultDeclaration" === nodeType || "ExportNamedDeclaration" === nodeType || "ImportDeclaration" === nodeType || "DeclareClass" === nodeType || "DeclareFunction" === nodeType || "DeclareInterface" === nodeType || "DeclareModule" === nodeType || "DeclareModuleExports" === nodeType || "DeclareTypeAlias" === nodeType || "DeclareOpaqueType" === nodeType || "DeclareVariable" === nodeType || "DeclareExportDeclaration" === nodeType || "DeclareExportAllDeclaration" === nodeType || "InterfaceDeclaration" === nodeType || "OpaqueType" === nodeType || "TypeAlias" === nodeType || "EnumDeclaration" === nodeType || "TSDeclareFunction" === nodeType || "TSInterfaceDeclaration" === nodeType || "TSTypeAliasDeclaration" === nodeType || "TSEnumDeclaration" === nodeType || "TSModuleDeclaration" === nodeType || nodeType === "Placeholder" && "Declaration" === node.expectedNode) {
  122228. if (typeof opts === "undefined") {
  122229. return true;
  122230. } else {
  122231. return (0, _shallowEqual.default)(node, opts);
  122232. }
  122233. }
  122234. return false;
  122235. }
  122236. function isPatternLike(node, opts) {
  122237. if (!node)
  122238. return false;
  122239. const nodeType = node.type;
  122240. if ("Identifier" === nodeType || "RestElement" === nodeType || "AssignmentPattern" === nodeType || "ArrayPattern" === nodeType || "ObjectPattern" === nodeType || nodeType === "Placeholder" && ("Pattern" === node.expectedNode || "Identifier" === node.expectedNode)) {
  122241. if (typeof opts === "undefined") {
  122242. return true;
  122243. } else {
  122244. return (0, _shallowEqual.default)(node, opts);
  122245. }
  122246. }
  122247. return false;
  122248. }
  122249. function isLVal(node, opts) {
  122250. if (!node)
  122251. return false;
  122252. const nodeType = node.type;
  122253. if ("Identifier" === nodeType || "MemberExpression" === nodeType || "RestElement" === nodeType || "AssignmentPattern" === nodeType || "ArrayPattern" === nodeType || "ObjectPattern" === nodeType || "TSParameterProperty" === nodeType || nodeType === "Placeholder" && ("Pattern" === node.expectedNode || "Identifier" === node.expectedNode)) {
  122254. if (typeof opts === "undefined") {
  122255. return true;
  122256. } else {
  122257. return (0, _shallowEqual.default)(node, opts);
  122258. }
  122259. }
  122260. return false;
  122261. }
  122262. function isTSEntityName(node, opts) {
  122263. if (!node)
  122264. return false;
  122265. const nodeType = node.type;
  122266. if ("Identifier" === nodeType || "TSQualifiedName" === nodeType || nodeType === "Placeholder" && "Identifier" === node.expectedNode) {
  122267. if (typeof opts === "undefined") {
  122268. return true;
  122269. } else {
  122270. return (0, _shallowEqual.default)(node, opts);
  122271. }
  122272. }
  122273. return false;
  122274. }
  122275. function isLiteral(node, opts) {
  122276. if (!node)
  122277. return false;
  122278. const nodeType = node.type;
  122279. if ("StringLiteral" === nodeType || "NumericLiteral" === nodeType || "NullLiteral" === nodeType || "BooleanLiteral" === nodeType || "RegExpLiteral" === nodeType || "TemplateLiteral" === nodeType || "BigIntLiteral" === nodeType || "DecimalLiteral" === nodeType || nodeType === "Placeholder" && "StringLiteral" === node.expectedNode) {
  122280. if (typeof opts === "undefined") {
  122281. return true;
  122282. } else {
  122283. return (0, _shallowEqual.default)(node, opts);
  122284. }
  122285. }
  122286. return false;
  122287. }
  122288. function isImmutable(node, opts) {
  122289. if (!node)
  122290. return false;
  122291. const nodeType = node.type;
  122292. if ("StringLiteral" === nodeType || "NumericLiteral" === nodeType || "NullLiteral" === nodeType || "BooleanLiteral" === nodeType || "BigIntLiteral" === nodeType || "JSXAttribute" === nodeType || "JSXClosingElement" === nodeType || "JSXElement" === nodeType || "JSXExpressionContainer" === nodeType || "JSXSpreadChild" === nodeType || "JSXOpeningElement" === nodeType || "JSXText" === nodeType || "JSXFragment" === nodeType || "JSXOpeningFragment" === nodeType || "JSXClosingFragment" === nodeType || "DecimalLiteral" === nodeType || nodeType === "Placeholder" && "StringLiteral" === node.expectedNode) {
  122293. if (typeof opts === "undefined") {
  122294. return true;
  122295. } else {
  122296. return (0, _shallowEqual.default)(node, opts);
  122297. }
  122298. }
  122299. return false;
  122300. }
  122301. function isUserWhitespacable(node, opts) {
  122302. if (!node)
  122303. return false;
  122304. const nodeType = node.type;
  122305. if ("ObjectMethod" === nodeType || "ObjectProperty" === nodeType || "ObjectTypeInternalSlot" === nodeType || "ObjectTypeCallProperty" === nodeType || "ObjectTypeIndexer" === nodeType || "ObjectTypeProperty" === nodeType || "ObjectTypeSpreadProperty" === nodeType) {
  122306. if (typeof opts === "undefined") {
  122307. return true;
  122308. } else {
  122309. return (0, _shallowEqual.default)(node, opts);
  122310. }
  122311. }
  122312. return false;
  122313. }
  122314. function isMethod(node, opts) {
  122315. if (!node)
  122316. return false;
  122317. const nodeType = node.type;
  122318. if ("ObjectMethod" === nodeType || "ClassMethod" === nodeType || "ClassPrivateMethod" === nodeType) {
  122319. if (typeof opts === "undefined") {
  122320. return true;
  122321. } else {
  122322. return (0, _shallowEqual.default)(node, opts);
  122323. }
  122324. }
  122325. return false;
  122326. }
  122327. function isObjectMember(node, opts) {
  122328. if (!node)
  122329. return false;
  122330. const nodeType = node.type;
  122331. if ("ObjectMethod" === nodeType || "ObjectProperty" === nodeType) {
  122332. if (typeof opts === "undefined") {
  122333. return true;
  122334. } else {
  122335. return (0, _shallowEqual.default)(node, opts);
  122336. }
  122337. }
  122338. return false;
  122339. }
  122340. function isProperty(node, opts) {
  122341. if (!node)
  122342. return false;
  122343. const nodeType = node.type;
  122344. if ("ObjectProperty" === nodeType || "ClassProperty" === nodeType || "ClassPrivateProperty" === nodeType) {
  122345. if (typeof opts === "undefined") {
  122346. return true;
  122347. } else {
  122348. return (0, _shallowEqual.default)(node, opts);
  122349. }
  122350. }
  122351. return false;
  122352. }
  122353. function isUnaryLike(node, opts) {
  122354. if (!node)
  122355. return false;
  122356. const nodeType = node.type;
  122357. if ("UnaryExpression" === nodeType || "SpreadElement" === nodeType) {
  122358. if (typeof opts === "undefined") {
  122359. return true;
  122360. } else {
  122361. return (0, _shallowEqual.default)(node, opts);
  122362. }
  122363. }
  122364. return false;
  122365. }
  122366. function isPattern(node, opts) {
  122367. if (!node)
  122368. return false;
  122369. const nodeType = node.type;
  122370. if ("AssignmentPattern" === nodeType || "ArrayPattern" === nodeType || "ObjectPattern" === nodeType || nodeType === "Placeholder" && "Pattern" === node.expectedNode) {
  122371. if (typeof opts === "undefined") {
  122372. return true;
  122373. } else {
  122374. return (0, _shallowEqual.default)(node, opts);
  122375. }
  122376. }
  122377. return false;
  122378. }
  122379. function isClass(node, opts) {
  122380. if (!node)
  122381. return false;
  122382. const nodeType = node.type;
  122383. if ("ClassExpression" === nodeType || "ClassDeclaration" === nodeType) {
  122384. if (typeof opts === "undefined") {
  122385. return true;
  122386. } else {
  122387. return (0, _shallowEqual.default)(node, opts);
  122388. }
  122389. }
  122390. return false;
  122391. }
  122392. function isModuleDeclaration(node, opts) {
  122393. if (!node)
  122394. return false;
  122395. const nodeType = node.type;
  122396. if ("ExportAllDeclaration" === nodeType || "ExportDefaultDeclaration" === nodeType || "ExportNamedDeclaration" === nodeType || "ImportDeclaration" === nodeType) {
  122397. if (typeof opts === "undefined") {
  122398. return true;
  122399. } else {
  122400. return (0, _shallowEqual.default)(node, opts);
  122401. }
  122402. }
  122403. return false;
  122404. }
  122405. function isExportDeclaration(node, opts) {
  122406. if (!node)
  122407. return false;
  122408. const nodeType = node.type;
  122409. if ("ExportAllDeclaration" === nodeType || "ExportDefaultDeclaration" === nodeType || "ExportNamedDeclaration" === nodeType) {
  122410. if (typeof opts === "undefined") {
  122411. return true;
  122412. } else {
  122413. return (0, _shallowEqual.default)(node, opts);
  122414. }
  122415. }
  122416. return false;
  122417. }
  122418. function isModuleSpecifier(node, opts) {
  122419. if (!node)
  122420. return false;
  122421. const nodeType = node.type;
  122422. if ("ExportSpecifier" === nodeType || "ImportDefaultSpecifier" === nodeType || "ImportNamespaceSpecifier" === nodeType || "ImportSpecifier" === nodeType || "ExportNamespaceSpecifier" === nodeType || "ExportDefaultSpecifier" === nodeType) {
  122423. if (typeof opts === "undefined") {
  122424. return true;
  122425. } else {
  122426. return (0, _shallowEqual.default)(node, opts);
  122427. }
  122428. }
  122429. return false;
  122430. }
  122431. function isFlow(node, opts) {
  122432. if (!node)
  122433. return false;
  122434. const nodeType = node.type;
  122435. if ("AnyTypeAnnotation" === nodeType || "ArrayTypeAnnotation" === nodeType || "BooleanTypeAnnotation" === nodeType || "BooleanLiteralTypeAnnotation" === nodeType || "NullLiteralTypeAnnotation" === nodeType || "ClassImplements" === nodeType || "DeclareClass" === nodeType || "DeclareFunction" === nodeType || "DeclareInterface" === nodeType || "DeclareModule" === nodeType || "DeclareModuleExports" === nodeType || "DeclareTypeAlias" === nodeType || "DeclareOpaqueType" === nodeType || "DeclareVariable" === nodeType || "DeclareExportDeclaration" === nodeType || "DeclareExportAllDeclaration" === nodeType || "DeclaredPredicate" === nodeType || "ExistsTypeAnnotation" === nodeType || "FunctionTypeAnnotation" === nodeType || "FunctionTypeParam" === nodeType || "GenericTypeAnnotation" === nodeType || "InferredPredicate" === nodeType || "InterfaceExtends" === nodeType || "InterfaceDeclaration" === nodeType || "InterfaceTypeAnnotation" === nodeType || "IntersectionTypeAnnotation" === nodeType || "MixedTypeAnnotation" === nodeType || "EmptyTypeAnnotation" === nodeType || "NullableTypeAnnotation" === nodeType || "NumberLiteralTypeAnnotation" === nodeType || "NumberTypeAnnotation" === nodeType || "ObjectTypeAnnotation" === nodeType || "ObjectTypeInternalSlot" === nodeType || "ObjectTypeCallProperty" === nodeType || "ObjectTypeIndexer" === nodeType || "ObjectTypeProperty" === nodeType || "ObjectTypeSpreadProperty" === nodeType || "OpaqueType" === nodeType || "QualifiedTypeIdentifier" === nodeType || "StringLiteralTypeAnnotation" === nodeType || "StringTypeAnnotation" === nodeType || "SymbolTypeAnnotation" === nodeType || "ThisTypeAnnotation" === nodeType || "TupleTypeAnnotation" === nodeType || "TypeofTypeAnnotation" === nodeType || "TypeAlias" === nodeType || "TypeAnnotation" === nodeType || "TypeCastExpression" === nodeType || "TypeParameter" === nodeType || "TypeParameterDeclaration" === nodeType || "TypeParameterInstantiation" === nodeType || "UnionTypeAnnotation" === nodeType || "Variance" === nodeType || "VoidTypeAnnotation" === nodeType || "IndexedAccessType" === nodeType || "OptionalIndexedAccessType" === nodeType) {
  122436. if (typeof opts === "undefined") {
  122437. return true;
  122438. } else {
  122439. return (0, _shallowEqual.default)(node, opts);
  122440. }
  122441. }
  122442. return false;
  122443. }
  122444. function isFlowType(node, opts) {
  122445. if (!node)
  122446. return false;
  122447. const nodeType = node.type;
  122448. if ("AnyTypeAnnotation" === nodeType || "ArrayTypeAnnotation" === nodeType || "BooleanTypeAnnotation" === nodeType || "BooleanLiteralTypeAnnotation" === nodeType || "NullLiteralTypeAnnotation" === nodeType || "ExistsTypeAnnotation" === nodeType || "FunctionTypeAnnotation" === nodeType || "GenericTypeAnnotation" === nodeType || "InterfaceTypeAnnotation" === nodeType || "IntersectionTypeAnnotation" === nodeType || "MixedTypeAnnotation" === nodeType || "EmptyTypeAnnotation" === nodeType || "NullableTypeAnnotation" === nodeType || "NumberLiteralTypeAnnotation" === nodeType || "NumberTypeAnnotation" === nodeType || "ObjectTypeAnnotation" === nodeType || "StringLiteralTypeAnnotation" === nodeType || "StringTypeAnnotation" === nodeType || "SymbolTypeAnnotation" === nodeType || "ThisTypeAnnotation" === nodeType || "TupleTypeAnnotation" === nodeType || "TypeofTypeAnnotation" === nodeType || "UnionTypeAnnotation" === nodeType || "VoidTypeAnnotation" === nodeType || "IndexedAccessType" === nodeType || "OptionalIndexedAccessType" === nodeType) {
  122449. if (typeof opts === "undefined") {
  122450. return true;
  122451. } else {
  122452. return (0, _shallowEqual.default)(node, opts);
  122453. }
  122454. }
  122455. return false;
  122456. }
  122457. function isFlowBaseAnnotation(node, opts) {
  122458. if (!node)
  122459. return false;
  122460. const nodeType = node.type;
  122461. if ("AnyTypeAnnotation" === nodeType || "BooleanTypeAnnotation" === nodeType || "NullLiteralTypeAnnotation" === nodeType || "MixedTypeAnnotation" === nodeType || "EmptyTypeAnnotation" === nodeType || "NumberTypeAnnotation" === nodeType || "StringTypeAnnotation" === nodeType || "SymbolTypeAnnotation" === nodeType || "ThisTypeAnnotation" === nodeType || "VoidTypeAnnotation" === nodeType) {
  122462. if (typeof opts === "undefined") {
  122463. return true;
  122464. } else {
  122465. return (0, _shallowEqual.default)(node, opts);
  122466. }
  122467. }
  122468. return false;
  122469. }
  122470. function isFlowDeclaration(node, opts) {
  122471. if (!node)
  122472. return false;
  122473. const nodeType = node.type;
  122474. if ("DeclareClass" === nodeType || "DeclareFunction" === nodeType || "DeclareInterface" === nodeType || "DeclareModule" === nodeType || "DeclareModuleExports" === nodeType || "DeclareTypeAlias" === nodeType || "DeclareOpaqueType" === nodeType || "DeclareVariable" === nodeType || "DeclareExportDeclaration" === nodeType || "DeclareExportAllDeclaration" === nodeType || "InterfaceDeclaration" === nodeType || "OpaqueType" === nodeType || "TypeAlias" === nodeType) {
  122475. if (typeof opts === "undefined") {
  122476. return true;
  122477. } else {
  122478. return (0, _shallowEqual.default)(node, opts);
  122479. }
  122480. }
  122481. return false;
  122482. }
  122483. function isFlowPredicate(node, opts) {
  122484. if (!node)
  122485. return false;
  122486. const nodeType = node.type;
  122487. if ("DeclaredPredicate" === nodeType || "InferredPredicate" === nodeType) {
  122488. if (typeof opts === "undefined") {
  122489. return true;
  122490. } else {
  122491. return (0, _shallowEqual.default)(node, opts);
  122492. }
  122493. }
  122494. return false;
  122495. }
  122496. function isEnumBody(node, opts) {
  122497. if (!node)
  122498. return false;
  122499. const nodeType = node.type;
  122500. if ("EnumBooleanBody" === nodeType || "EnumNumberBody" === nodeType || "EnumStringBody" === nodeType || "EnumSymbolBody" === nodeType) {
  122501. if (typeof opts === "undefined") {
  122502. return true;
  122503. } else {
  122504. return (0, _shallowEqual.default)(node, opts);
  122505. }
  122506. }
  122507. return false;
  122508. }
  122509. function isEnumMember(node, opts) {
  122510. if (!node)
  122511. return false;
  122512. const nodeType = node.type;
  122513. if ("EnumBooleanMember" === nodeType || "EnumNumberMember" === nodeType || "EnumStringMember" === nodeType || "EnumDefaultedMember" === nodeType) {
  122514. if (typeof opts === "undefined") {
  122515. return true;
  122516. } else {
  122517. return (0, _shallowEqual.default)(node, opts);
  122518. }
  122519. }
  122520. return false;
  122521. }
  122522. function isJSX(node, opts) {
  122523. if (!node)
  122524. return false;
  122525. const nodeType = node.type;
  122526. if ("JSXAttribute" === nodeType || "JSXClosingElement" === nodeType || "JSXElement" === nodeType || "JSXEmptyExpression" === nodeType || "JSXExpressionContainer" === nodeType || "JSXSpreadChild" === nodeType || "JSXIdentifier" === nodeType || "JSXMemberExpression" === nodeType || "JSXNamespacedName" === nodeType || "JSXOpeningElement" === nodeType || "JSXSpreadAttribute" === nodeType || "JSXText" === nodeType || "JSXFragment" === nodeType || "JSXOpeningFragment" === nodeType || "JSXClosingFragment" === nodeType) {
  122527. if (typeof opts === "undefined") {
  122528. return true;
  122529. } else {
  122530. return (0, _shallowEqual.default)(node, opts);
  122531. }
  122532. }
  122533. return false;
  122534. }
  122535. function isPrivate(node, opts) {
  122536. if (!node)
  122537. return false;
  122538. const nodeType = node.type;
  122539. if ("ClassPrivateProperty" === nodeType || "ClassPrivateMethod" === nodeType || "PrivateName" === nodeType) {
  122540. if (typeof opts === "undefined") {
  122541. return true;
  122542. } else {
  122543. return (0, _shallowEqual.default)(node, opts);
  122544. }
  122545. }
  122546. return false;
  122547. }
  122548. function isTSTypeElement(node, opts) {
  122549. if (!node)
  122550. return false;
  122551. const nodeType = node.type;
  122552. if ("TSCallSignatureDeclaration" === nodeType || "TSConstructSignatureDeclaration" === nodeType || "TSPropertySignature" === nodeType || "TSMethodSignature" === nodeType || "TSIndexSignature" === nodeType) {
  122553. if (typeof opts === "undefined") {
  122554. return true;
  122555. } else {
  122556. return (0, _shallowEqual.default)(node, opts);
  122557. }
  122558. }
  122559. return false;
  122560. }
  122561. function isTSType(node, opts) {
  122562. if (!node)
  122563. return false;
  122564. const nodeType = node.type;
  122565. if ("TSAnyKeyword" === nodeType || "TSBooleanKeyword" === nodeType || "TSBigIntKeyword" === nodeType || "TSIntrinsicKeyword" === nodeType || "TSNeverKeyword" === nodeType || "TSNullKeyword" === nodeType || "TSNumberKeyword" === nodeType || "TSObjectKeyword" === nodeType || "TSStringKeyword" === nodeType || "TSSymbolKeyword" === nodeType || "TSUndefinedKeyword" === nodeType || "TSUnknownKeyword" === nodeType || "TSVoidKeyword" === nodeType || "TSThisType" === nodeType || "TSFunctionType" === nodeType || "TSConstructorType" === nodeType || "TSTypeReference" === nodeType || "TSTypePredicate" === nodeType || "TSTypeQuery" === nodeType || "TSTypeLiteral" === nodeType || "TSArrayType" === nodeType || "TSTupleType" === nodeType || "TSOptionalType" === nodeType || "TSRestType" === nodeType || "TSUnionType" === nodeType || "TSIntersectionType" === nodeType || "TSConditionalType" === nodeType || "TSInferType" === nodeType || "TSParenthesizedType" === nodeType || "TSTypeOperator" === nodeType || "TSIndexedAccessType" === nodeType || "TSMappedType" === nodeType || "TSLiteralType" === nodeType || "TSExpressionWithTypeArguments" === nodeType || "TSImportType" === nodeType) {
  122566. if (typeof opts === "undefined") {
  122567. return true;
  122568. } else {
  122569. return (0, _shallowEqual.default)(node, opts);
  122570. }
  122571. }
  122572. return false;
  122573. }
  122574. function isTSBaseType(node, opts) {
  122575. if (!node)
  122576. return false;
  122577. const nodeType = node.type;
  122578. if ("TSAnyKeyword" === nodeType || "TSBooleanKeyword" === nodeType || "TSBigIntKeyword" === nodeType || "TSIntrinsicKeyword" === nodeType || "TSNeverKeyword" === nodeType || "TSNullKeyword" === nodeType || "TSNumberKeyword" === nodeType || "TSObjectKeyword" === nodeType || "TSStringKeyword" === nodeType || "TSSymbolKeyword" === nodeType || "TSUndefinedKeyword" === nodeType || "TSUnknownKeyword" === nodeType || "TSVoidKeyword" === nodeType || "TSThisType" === nodeType || "TSLiteralType" === nodeType) {
  122579. if (typeof opts === "undefined") {
  122580. return true;
  122581. } else {
  122582. return (0, _shallowEqual.default)(node, opts);
  122583. }
  122584. }
  122585. return false;
  122586. }
  122587. function isNumberLiteral(node, opts) {
  122588. console.trace("The node type NumberLiteral has been renamed to NumericLiteral");
  122589. if (!node)
  122590. return false;
  122591. const nodeType = node.type;
  122592. if (nodeType === "NumberLiteral") {
  122593. if (typeof opts === "undefined") {
  122594. return true;
  122595. } else {
  122596. return (0, _shallowEqual.default)(node, opts);
  122597. }
  122598. }
  122599. return false;
  122600. }
  122601. function isRegexLiteral(node, opts) {
  122602. console.trace("The node type RegexLiteral has been renamed to RegExpLiteral");
  122603. if (!node)
  122604. return false;
  122605. const nodeType = node.type;
  122606. if (nodeType === "RegexLiteral") {
  122607. if (typeof opts === "undefined") {
  122608. return true;
  122609. } else {
  122610. return (0, _shallowEqual.default)(node, opts);
  122611. }
  122612. }
  122613. return false;
  122614. }
  122615. function isRestProperty(node, opts) {
  122616. console.trace("The node type RestProperty has been renamed to RestElement");
  122617. if (!node)
  122618. return false;
  122619. const nodeType = node.type;
  122620. if (nodeType === "RestProperty") {
  122621. if (typeof opts === "undefined") {
  122622. return true;
  122623. } else {
  122624. return (0, _shallowEqual.default)(node, opts);
  122625. }
  122626. }
  122627. return false;
  122628. }
  122629. function isSpreadProperty(node, opts) {
  122630. console.trace("The node type SpreadProperty has been renamed to SpreadElement");
  122631. if (!node)
  122632. return false;
  122633. const nodeType = node.type;
  122634. if (nodeType === "SpreadProperty") {
  122635. if (typeof opts === "undefined") {
  122636. return true;
  122637. } else {
  122638. return (0, _shallowEqual.default)(node, opts);
  122639. }
  122640. }
  122641. return false;
  122642. }
  122643. }
  122644. });
  122645. // node_modules/@babel/template/node_modules/@babel/types/lib/validators/matchesPattern.js
  122646. var require_matchesPattern6 = __commonJS({
  122647. "node_modules/@babel/template/node_modules/@babel/types/lib/validators/matchesPattern.js"(exports) {
  122648. "use strict";
  122649. Object.defineProperty(exports, "__esModule", {
  122650. value: true
  122651. });
  122652. exports.default = matchesPattern;
  122653. var _generated = require_generated26();
  122654. function matchesPattern(member, match, allowPartial) {
  122655. if (!(0, _generated.isMemberExpression)(member))
  122656. return false;
  122657. const parts = Array.isArray(match) ? match : match.split(".");
  122658. const nodes = [];
  122659. let node;
  122660. for (node = member; (0, _generated.isMemberExpression)(node); node = node.object) {
  122661. nodes.push(node.property);
  122662. }
  122663. nodes.push(node);
  122664. if (nodes.length < parts.length)
  122665. return false;
  122666. if (!allowPartial && nodes.length > parts.length)
  122667. return false;
  122668. for (let i = 0, j = nodes.length - 1; i < parts.length; i++, j--) {
  122669. const node2 = nodes[j];
  122670. let value;
  122671. if ((0, _generated.isIdentifier)(node2)) {
  122672. value = node2.name;
  122673. } else if ((0, _generated.isStringLiteral)(node2)) {
  122674. value = node2.value;
  122675. } else if ((0, _generated.isThisExpression)(node2)) {
  122676. value = "this";
  122677. } else {
  122678. return false;
  122679. }
  122680. if (parts[i] !== value)
  122681. return false;
  122682. }
  122683. return true;
  122684. }
  122685. }
  122686. });
  122687. // node_modules/@babel/template/node_modules/@babel/types/lib/validators/buildMatchMemberExpression.js
  122688. var require_buildMatchMemberExpression6 = __commonJS({
  122689. "node_modules/@babel/template/node_modules/@babel/types/lib/validators/buildMatchMemberExpression.js"(exports) {
  122690. "use strict";
  122691. Object.defineProperty(exports, "__esModule", {
  122692. value: true
  122693. });
  122694. exports.default = buildMatchMemberExpression;
  122695. var _matchesPattern = require_matchesPattern6();
  122696. function buildMatchMemberExpression(match, allowPartial) {
  122697. const parts = match.split(".");
  122698. return (member) => (0, _matchesPattern.default)(member, parts, allowPartial);
  122699. }
  122700. }
  122701. });
  122702. // node_modules/@babel/template/node_modules/@babel/types/lib/validators/react/isReactComponent.js
  122703. var require_isReactComponent6 = __commonJS({
  122704. "node_modules/@babel/template/node_modules/@babel/types/lib/validators/react/isReactComponent.js"(exports) {
  122705. "use strict";
  122706. Object.defineProperty(exports, "__esModule", {
  122707. value: true
  122708. });
  122709. exports.default = void 0;
  122710. var _buildMatchMemberExpression = require_buildMatchMemberExpression6();
  122711. var isReactComponent = (0, _buildMatchMemberExpression.default)("React.Component");
  122712. var _default = isReactComponent;
  122713. exports.default = _default;
  122714. }
  122715. });
  122716. // node_modules/@babel/template/node_modules/@babel/types/lib/validators/react/isCompatTag.js
  122717. var require_isCompatTag6 = __commonJS({
  122718. "node_modules/@babel/template/node_modules/@babel/types/lib/validators/react/isCompatTag.js"(exports) {
  122719. "use strict";
  122720. Object.defineProperty(exports, "__esModule", {
  122721. value: true
  122722. });
  122723. exports.default = isCompatTag;
  122724. function isCompatTag(tagName) {
  122725. return !!tagName && /^[a-z]/.test(tagName);
  122726. }
  122727. }
  122728. });
  122729. // node_modules/@babel/template/node_modules/@babel/types/lib/validators/isType.js
  122730. var require_isType6 = __commonJS({
  122731. "node_modules/@babel/template/node_modules/@babel/types/lib/validators/isType.js"(exports) {
  122732. "use strict";
  122733. Object.defineProperty(exports, "__esModule", {
  122734. value: true
  122735. });
  122736. exports.default = isType;
  122737. var _definitions = require_definitions6();
  122738. function isType(nodeType, targetType) {
  122739. if (nodeType === targetType)
  122740. return true;
  122741. if (_definitions.ALIAS_KEYS[targetType])
  122742. return false;
  122743. const aliases = _definitions.FLIPPED_ALIAS_KEYS[targetType];
  122744. if (aliases) {
  122745. if (aliases[0] === nodeType)
  122746. return true;
  122747. for (const alias of aliases) {
  122748. if (nodeType === alias)
  122749. return true;
  122750. }
  122751. }
  122752. return false;
  122753. }
  122754. }
  122755. });
  122756. // node_modules/@babel/template/node_modules/@babel/types/lib/validators/isPlaceholderType.js
  122757. var require_isPlaceholderType6 = __commonJS({
  122758. "node_modules/@babel/template/node_modules/@babel/types/lib/validators/isPlaceholderType.js"(exports) {
  122759. "use strict";
  122760. Object.defineProperty(exports, "__esModule", {
  122761. value: true
  122762. });
  122763. exports.default = isPlaceholderType;
  122764. var _definitions = require_definitions6();
  122765. function isPlaceholderType(placeholderType, targetType) {
  122766. if (placeholderType === targetType)
  122767. return true;
  122768. const aliases = _definitions.PLACEHOLDERS_ALIAS[placeholderType];
  122769. if (aliases) {
  122770. for (const alias of aliases) {
  122771. if (targetType === alias)
  122772. return true;
  122773. }
  122774. }
  122775. return false;
  122776. }
  122777. }
  122778. });
  122779. // node_modules/@babel/template/node_modules/@babel/types/lib/validators/is.js
  122780. var require_is6 = __commonJS({
  122781. "node_modules/@babel/template/node_modules/@babel/types/lib/validators/is.js"(exports) {
  122782. "use strict";
  122783. Object.defineProperty(exports, "__esModule", {
  122784. value: true
  122785. });
  122786. exports.default = is;
  122787. var _shallowEqual = require_shallowEqual6();
  122788. var _isType = require_isType6();
  122789. var _isPlaceholderType = require_isPlaceholderType6();
  122790. var _definitions = require_definitions6();
  122791. function is(type, node, opts) {
  122792. if (!node)
  122793. return false;
  122794. const matches = (0, _isType.default)(node.type, type);
  122795. if (!matches) {
  122796. if (!opts && node.type === "Placeholder" && type in _definitions.FLIPPED_ALIAS_KEYS) {
  122797. return (0, _isPlaceholderType.default)(node.expectedNode, type);
  122798. }
  122799. return false;
  122800. }
  122801. if (typeof opts === "undefined") {
  122802. return true;
  122803. } else {
  122804. return (0, _shallowEqual.default)(node, opts);
  122805. }
  122806. }
  122807. }
  122808. });
  122809. // node_modules/@babel/template/node_modules/@babel/helper-validator-identifier/lib/identifier.js
  122810. var require_identifier8 = __commonJS({
  122811. "node_modules/@babel/template/node_modules/@babel/helper-validator-identifier/lib/identifier.js"(exports) {
  122812. "use strict";
  122813. Object.defineProperty(exports, "__esModule", {
  122814. value: true
  122815. });
  122816. exports.isIdentifierStart = isIdentifierStart2;
  122817. exports.isIdentifierChar = isIdentifierChar2;
  122818. exports.isIdentifierName = isIdentifierName;
  122819. var nonASCIIidentifierStartChars2 = "\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u08A0-\u08B4\u08B6-\u08C7\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1878\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309B-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u31BF\u31F0-\u31FF\u3400-\u4DBF\u4E00-\u9FFC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7BF\uA7C2-\uA7CA\uA7F5-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC";
  122820. var nonASCIIidentifierChars2 = "\u200C\u200D\xB7\u0300-\u036F\u0387\u0483-\u0487\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u0669\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u06F0-\u06F9\u0711\u0730-\u074A\u07A6-\u07B0\u07C0-\u07C9\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u08D3-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0966-\u096F\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u09E6-\u09EF\u09FE\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A66-\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0AE6-\u0AEF\u0AFA-\u0AFF\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B55-\u0B57\u0B62\u0B63\u0B66-\u0B6F\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0BE6-\u0BEF\u0C00-\u0C04\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C66-\u0C6F\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0CE6-\u0CEF\u0D00-\u0D03\u0D3B\u0D3C\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D66-\u0D6F\u0D81-\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0E50-\u0E59\u0EB1\u0EB4-\u0EBC\u0EC8-\u0ECD\u0ED0-\u0ED9\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1040-\u1049\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F-\u109D\u135D-\u135F\u1369-\u1371\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u18A9\u1920-\u192B\u1930-\u193B\u1946-\u194F\u19D0-\u19DA\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AB0-\u1ABD\u1ABF\u1AC0\u1B00-\u1B04\u1B34-\u1B44\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BB0-\u1BB9\u1BE6-\u1BF3\u1C24-\u1C37\u1C40-\u1C49\u1C50-\u1C59\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF4\u1CF7-\u1CF9\u1DC0-\u1DF9\u1DFB-\u1DFF\u203F\u2040\u2054\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA620-\uA629\uA66F\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA82C\uA880\uA881\uA8B4-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F1\uA8FF-\uA909\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9D0-\uA9D9\uA9E5\uA9F0-\uA9F9\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA50-\uAA59\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uABF0-\uABF9\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFF10-\uFF19\uFF3F";
  122821. var nonASCIIidentifierStart2 = new RegExp("[" + nonASCIIidentifierStartChars2 + "]");
  122822. var nonASCIIidentifier2 = new RegExp("[" + nonASCIIidentifierStartChars2 + nonASCIIidentifierChars2 + "]");
  122823. nonASCIIidentifierStartChars2 = nonASCIIidentifierChars2 = null;
  122824. var astralIdentifierStartCodes2 = [0, 11, 2, 25, 2, 18, 2, 1, 2, 14, 3, 13, 35, 122, 70, 52, 268, 28, 4, 48, 48, 31, 14, 29, 6, 37, 11, 29, 3, 35, 5, 7, 2, 4, 43, 157, 19, 35, 5, 35, 5, 39, 9, 51, 157, 310, 10, 21, 11, 7, 153, 5, 3, 0, 2, 43, 2, 1, 4, 0, 3, 22, 11, 22, 10, 30, 66, 18, 2, 1, 11, 21, 11, 25, 71, 55, 7, 1, 65, 0, 16, 3, 2, 2, 2, 28, 43, 28, 4, 28, 36, 7, 2, 27, 28, 53, 11, 21, 11, 18, 14, 17, 111, 72, 56, 50, 14, 50, 14, 35, 349, 41, 7, 1, 79, 28, 11, 0, 9, 21, 107, 20, 28, 22, 13, 52, 76, 44, 33, 24, 27, 35, 30, 0, 3, 0, 9, 34, 4, 0, 13, 47, 15, 3, 22, 0, 2, 0, 36, 17, 2, 24, 85, 6, 2, 0, 2, 3, 2, 14, 2, 9, 8, 46, 39, 7, 3, 1, 3, 21, 2, 6, 2, 1, 2, 4, 4, 0, 19, 0, 13, 4, 159, 52, 19, 3, 21, 2, 31, 47, 21, 1, 2, 0, 185, 46, 42, 3, 37, 47, 21, 0, 60, 42, 14, 0, 72, 26, 230, 43, 117, 63, 32, 7, 3, 0, 3, 7, 2, 1, 2, 23, 16, 0, 2, 0, 95, 7, 3, 38, 17, 0, 2, 0, 29, 0, 11, 39, 8, 0, 22, 0, 12, 45, 20, 0, 35, 56, 264, 8, 2, 36, 18, 0, 50, 29, 113, 6, 2, 1, 2, 37, 22, 0, 26, 5, 2, 1, 2, 31, 15, 0, 328, 18, 190, 0, 80, 921, 103, 110, 18, 195, 2749, 1070, 4050, 582, 8634, 568, 8, 30, 114, 29, 19, 47, 17, 3, 32, 20, 6, 18, 689, 63, 129, 74, 6, 0, 67, 12, 65, 1, 2, 0, 29, 6135, 9, 1237, 43, 8, 8952, 286, 50, 2, 18, 3, 9, 395, 2309, 106, 6, 12, 4, 8, 8, 9, 5991, 84, 2, 70, 2, 1, 3, 0, 3, 1, 3, 3, 2, 11, 2, 0, 2, 6, 2, 64, 2, 3, 3, 7, 2, 6, 2, 27, 2, 3, 2, 4, 2, 0, 4, 6, 2, 339, 3, 24, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 7, 2357, 44, 11, 6, 17, 0, 370, 43, 1301, 196, 60, 67, 8, 0, 1205, 3, 2, 26, 2, 1, 2, 0, 3, 0, 2, 9, 2, 3, 2, 0, 2, 0, 7, 0, 5, 0, 2, 0, 2, 0, 2, 2, 2, 1, 2, 0, 3, 0, 2, 0, 2, 0, 2, 0, 2, 0, 2, 1, 2, 0, 3, 3, 2, 6, 2, 3, 2, 3, 2, 0, 2, 9, 2, 16, 6, 2, 2, 4, 2, 16, 4421, 42717, 35, 4148, 12, 221, 3, 5761, 15, 7472, 3104, 541, 1507, 4938];
  122825. var astralIdentifierCodes2 = [509, 0, 227, 0, 150, 4, 294, 9, 1368, 2, 2, 1, 6, 3, 41, 2, 5, 0, 166, 1, 574, 3, 9, 9, 370, 1, 154, 10, 176, 2, 54, 14, 32, 9, 16, 3, 46, 10, 54, 9, 7, 2, 37, 13, 2, 9, 6, 1, 45, 0, 13, 2, 49, 13, 9, 3, 2, 11, 83, 11, 7, 0, 161, 11, 6, 9, 7, 3, 56, 1, 2, 6, 3, 1, 3, 2, 10, 0, 11, 1, 3, 6, 4, 4, 193, 17, 10, 9, 5, 0, 82, 19, 13, 9, 214, 6, 3, 8, 28, 1, 83, 16, 16, 9, 82, 12, 9, 9, 84, 14, 5, 9, 243, 14, 166, 9, 71, 5, 2, 1, 3, 3, 2, 0, 2, 1, 13, 9, 120, 6, 3, 6, 4, 0, 29, 9, 41, 6, 2, 3, 9, 0, 10, 10, 47, 15, 406, 7, 2, 7, 17, 9, 57, 21, 2, 13, 123, 5, 4, 0, 2, 1, 2, 6, 2, 0, 9, 9, 49, 4, 2, 1, 2, 4, 9, 9, 330, 3, 19306, 9, 135, 4, 60, 6, 26, 9, 1014, 0, 2, 54, 8, 3, 82, 0, 12, 1, 19628, 1, 5319, 4, 4, 5, 9, 7, 3, 6, 31, 3, 149, 2, 1418, 49, 513, 54, 5, 49, 9, 0, 15, 0, 23, 4, 2, 14, 1361, 6, 2, 16, 3, 6, 2, 1, 2, 4, 262, 6, 10, 9, 419, 13, 1495, 6, 110, 6, 6, 9, 4759, 9, 787719, 239];
  122826. function isInAstralSet2(code2, set) {
  122827. let pos = 65536;
  122828. for (let i = 0, length = set.length; i < length; i += 2) {
  122829. pos += set[i];
  122830. if (pos > code2)
  122831. return false;
  122832. pos += set[i + 1];
  122833. if (pos >= code2)
  122834. return true;
  122835. }
  122836. return false;
  122837. }
  122838. function isIdentifierStart2(code2) {
  122839. if (code2 < 65)
  122840. return code2 === 36;
  122841. if (code2 <= 90)
  122842. return true;
  122843. if (code2 < 97)
  122844. return code2 === 95;
  122845. if (code2 <= 122)
  122846. return true;
  122847. if (code2 <= 65535) {
  122848. return code2 >= 170 && nonASCIIidentifierStart2.test(String.fromCharCode(code2));
  122849. }
  122850. return isInAstralSet2(code2, astralIdentifierStartCodes2);
  122851. }
  122852. function isIdentifierChar2(code2) {
  122853. if (code2 < 48)
  122854. return code2 === 36;
  122855. if (code2 < 58)
  122856. return true;
  122857. if (code2 < 65)
  122858. return false;
  122859. if (code2 <= 90)
  122860. return true;
  122861. if (code2 < 97)
  122862. return code2 === 95;
  122863. if (code2 <= 122)
  122864. return true;
  122865. if (code2 <= 65535) {
  122866. return code2 >= 170 && nonASCIIidentifier2.test(String.fromCharCode(code2));
  122867. }
  122868. return isInAstralSet2(code2, astralIdentifierStartCodes2) || isInAstralSet2(code2, astralIdentifierCodes2);
  122869. }
  122870. function isIdentifierName(name2) {
  122871. let isFirst = true;
  122872. for (let i = 0; i < name2.length; i++) {
  122873. let cp = name2.charCodeAt(i);
  122874. if ((cp & 64512) === 55296 && i + 1 < name2.length) {
  122875. const trail = name2.charCodeAt(++i);
  122876. if ((trail & 64512) === 56320) {
  122877. cp = 65536 + ((cp & 1023) << 10) + (trail & 1023);
  122878. }
  122879. }
  122880. if (isFirst) {
  122881. isFirst = false;
  122882. if (!isIdentifierStart2(cp)) {
  122883. return false;
  122884. }
  122885. } else if (!isIdentifierChar2(cp)) {
  122886. return false;
  122887. }
  122888. }
  122889. return !isFirst;
  122890. }
  122891. }
  122892. });
  122893. // node_modules/@babel/template/node_modules/@babel/helper-validator-identifier/lib/keyword.js
  122894. var require_keyword8 = __commonJS({
  122895. "node_modules/@babel/template/node_modules/@babel/helper-validator-identifier/lib/keyword.js"(exports) {
  122896. "use strict";
  122897. Object.defineProperty(exports, "__esModule", {
  122898. value: true
  122899. });
  122900. exports.isReservedWord = isReservedWord;
  122901. exports.isStrictReservedWord = isStrictReservedWord;
  122902. exports.isStrictBindOnlyReservedWord = isStrictBindOnlyReservedWord;
  122903. exports.isStrictBindReservedWord = isStrictBindReservedWord;
  122904. exports.isKeyword = isKeyword;
  122905. var reservedWords2 = {
  122906. keyword: ["break", "case", "catch", "continue", "debugger", "default", "do", "else", "finally", "for", "function", "if", "return", "switch", "throw", "try", "var", "const", "while", "with", "new", "this", "super", "class", "extends", "export", "import", "null", "true", "false", "in", "instanceof", "typeof", "void", "delete"],
  122907. strict: ["implements", "interface", "let", "package", "private", "protected", "public", "static", "yield"],
  122908. strictBind: ["eval", "arguments"]
  122909. };
  122910. var keywords2 = new Set(reservedWords2.keyword);
  122911. var reservedWordsStrictSet = new Set(reservedWords2.strict);
  122912. var reservedWordsStrictBindSet = new Set(reservedWords2.strictBind);
  122913. function isReservedWord(word, inModule) {
  122914. return inModule && word === "await" || word === "enum";
  122915. }
  122916. function isStrictReservedWord(word, inModule) {
  122917. return isReservedWord(word, inModule) || reservedWordsStrictSet.has(word);
  122918. }
  122919. function isStrictBindOnlyReservedWord(word) {
  122920. return reservedWordsStrictBindSet.has(word);
  122921. }
  122922. function isStrictBindReservedWord(word, inModule) {
  122923. return isStrictReservedWord(word, inModule) || isStrictBindOnlyReservedWord(word);
  122924. }
  122925. function isKeyword(word) {
  122926. return keywords2.has(word);
  122927. }
  122928. }
  122929. });
  122930. // node_modules/@babel/template/node_modules/@babel/helper-validator-identifier/lib/index.js
  122931. var require_lib29 = __commonJS({
  122932. "node_modules/@babel/template/node_modules/@babel/helper-validator-identifier/lib/index.js"(exports) {
  122933. "use strict";
  122934. Object.defineProperty(exports, "__esModule", {
  122935. value: true
  122936. });
  122937. Object.defineProperty(exports, "isIdentifierName", {
  122938. enumerable: true,
  122939. get: function() {
  122940. return _identifier.isIdentifierName;
  122941. }
  122942. });
  122943. Object.defineProperty(exports, "isIdentifierChar", {
  122944. enumerable: true,
  122945. get: function() {
  122946. return _identifier.isIdentifierChar;
  122947. }
  122948. });
  122949. Object.defineProperty(exports, "isIdentifierStart", {
  122950. enumerable: true,
  122951. get: function() {
  122952. return _identifier.isIdentifierStart;
  122953. }
  122954. });
  122955. Object.defineProperty(exports, "isReservedWord", {
  122956. enumerable: true,
  122957. get: function() {
  122958. return _keyword.isReservedWord;
  122959. }
  122960. });
  122961. Object.defineProperty(exports, "isStrictBindOnlyReservedWord", {
  122962. enumerable: true,
  122963. get: function() {
  122964. return _keyword.isStrictBindOnlyReservedWord;
  122965. }
  122966. });
  122967. Object.defineProperty(exports, "isStrictBindReservedWord", {
  122968. enumerable: true,
  122969. get: function() {
  122970. return _keyword.isStrictBindReservedWord;
  122971. }
  122972. });
  122973. Object.defineProperty(exports, "isStrictReservedWord", {
  122974. enumerable: true,
  122975. get: function() {
  122976. return _keyword.isStrictReservedWord;
  122977. }
  122978. });
  122979. Object.defineProperty(exports, "isKeyword", {
  122980. enumerable: true,
  122981. get: function() {
  122982. return _keyword.isKeyword;
  122983. }
  122984. });
  122985. var _identifier = require_identifier8();
  122986. var _keyword = require_keyword8();
  122987. }
  122988. });
  122989. // node_modules/@babel/template/node_modules/@babel/types/lib/validators/isValidIdentifier.js
  122990. var require_isValidIdentifier6 = __commonJS({
  122991. "node_modules/@babel/template/node_modules/@babel/types/lib/validators/isValidIdentifier.js"(exports) {
  122992. "use strict";
  122993. Object.defineProperty(exports, "__esModule", {
  122994. value: true
  122995. });
  122996. exports.default = isValidIdentifier;
  122997. var _helperValidatorIdentifier = require_lib29();
  122998. function isValidIdentifier(name2, reserved = true) {
  122999. if (typeof name2 !== "string")
  123000. return false;
  123001. if (reserved) {
  123002. if ((0, _helperValidatorIdentifier.isKeyword)(name2) || (0, _helperValidatorIdentifier.isStrictReservedWord)(name2, true)) {
  123003. return false;
  123004. }
  123005. }
  123006. return (0, _helperValidatorIdentifier.isIdentifierName)(name2);
  123007. }
  123008. }
  123009. });
  123010. // node_modules/@babel/template/node_modules/@babel/types/lib/constants/index.js
  123011. var require_constants6 = __commonJS({
  123012. "node_modules/@babel/template/node_modules/@babel/types/lib/constants/index.js"(exports) {
  123013. "use strict";
  123014. Object.defineProperty(exports, "__esModule", {
  123015. value: true
  123016. });
  123017. exports.NOT_LOCAL_BINDING = exports.BLOCK_SCOPED_SYMBOL = exports.INHERIT_KEYS = exports.UNARY_OPERATORS = exports.STRING_UNARY_OPERATORS = exports.NUMBER_UNARY_OPERATORS = exports.BOOLEAN_UNARY_OPERATORS = exports.ASSIGNMENT_OPERATORS = exports.BINARY_OPERATORS = exports.NUMBER_BINARY_OPERATORS = exports.BOOLEAN_BINARY_OPERATORS = exports.COMPARISON_BINARY_OPERATORS = exports.EQUALITY_BINARY_OPERATORS = exports.BOOLEAN_NUMBER_BINARY_OPERATORS = exports.UPDATE_OPERATORS = exports.LOGICAL_OPERATORS = exports.COMMENT_KEYS = exports.FOR_INIT_KEYS = exports.FLATTENABLE_KEYS = exports.STATEMENT_OR_BLOCK_KEYS = void 0;
  123018. var STATEMENT_OR_BLOCK_KEYS = ["consequent", "body", "alternate"];
  123019. exports.STATEMENT_OR_BLOCK_KEYS = STATEMENT_OR_BLOCK_KEYS;
  123020. var FLATTENABLE_KEYS = ["body", "expressions"];
  123021. exports.FLATTENABLE_KEYS = FLATTENABLE_KEYS;
  123022. var FOR_INIT_KEYS = ["left", "init"];
  123023. exports.FOR_INIT_KEYS = FOR_INIT_KEYS;
  123024. var COMMENT_KEYS = ["leadingComments", "trailingComments", "innerComments"];
  123025. exports.COMMENT_KEYS = COMMENT_KEYS;
  123026. var LOGICAL_OPERATORS = ["||", "&&", "??"];
  123027. exports.LOGICAL_OPERATORS = LOGICAL_OPERATORS;
  123028. var UPDATE_OPERATORS = ["++", "--"];
  123029. exports.UPDATE_OPERATORS = UPDATE_OPERATORS;
  123030. var BOOLEAN_NUMBER_BINARY_OPERATORS = [">", "<", ">=", "<="];
  123031. exports.BOOLEAN_NUMBER_BINARY_OPERATORS = BOOLEAN_NUMBER_BINARY_OPERATORS;
  123032. var EQUALITY_BINARY_OPERATORS = ["==", "===", "!=", "!=="];
  123033. exports.EQUALITY_BINARY_OPERATORS = EQUALITY_BINARY_OPERATORS;
  123034. var COMPARISON_BINARY_OPERATORS = [...EQUALITY_BINARY_OPERATORS, "in", "instanceof"];
  123035. exports.COMPARISON_BINARY_OPERATORS = COMPARISON_BINARY_OPERATORS;
  123036. var BOOLEAN_BINARY_OPERATORS = [...COMPARISON_BINARY_OPERATORS, ...BOOLEAN_NUMBER_BINARY_OPERATORS];
  123037. exports.BOOLEAN_BINARY_OPERATORS = BOOLEAN_BINARY_OPERATORS;
  123038. var NUMBER_BINARY_OPERATORS = ["-", "/", "%", "*", "**", "&", "|", ">>", ">>>", "<<", "^"];
  123039. exports.NUMBER_BINARY_OPERATORS = NUMBER_BINARY_OPERATORS;
  123040. var BINARY_OPERATORS = ["+", ...NUMBER_BINARY_OPERATORS, ...BOOLEAN_BINARY_OPERATORS];
  123041. exports.BINARY_OPERATORS = BINARY_OPERATORS;
  123042. var ASSIGNMENT_OPERATORS = ["=", "+=", ...NUMBER_BINARY_OPERATORS.map((op) => op + "="), ...LOGICAL_OPERATORS.map((op) => op + "=")];
  123043. exports.ASSIGNMENT_OPERATORS = ASSIGNMENT_OPERATORS;
  123044. var BOOLEAN_UNARY_OPERATORS = ["delete", "!"];
  123045. exports.BOOLEAN_UNARY_OPERATORS = BOOLEAN_UNARY_OPERATORS;
  123046. var NUMBER_UNARY_OPERATORS = ["+", "-", "~"];
  123047. exports.NUMBER_UNARY_OPERATORS = NUMBER_UNARY_OPERATORS;
  123048. var STRING_UNARY_OPERATORS = ["typeof"];
  123049. exports.STRING_UNARY_OPERATORS = STRING_UNARY_OPERATORS;
  123050. var UNARY_OPERATORS = ["void", "throw", ...BOOLEAN_UNARY_OPERATORS, ...NUMBER_UNARY_OPERATORS, ...STRING_UNARY_OPERATORS];
  123051. exports.UNARY_OPERATORS = UNARY_OPERATORS;
  123052. var INHERIT_KEYS = {
  123053. optional: ["typeAnnotation", "typeParameters", "returnType"],
  123054. force: ["start", "loc", "end"]
  123055. };
  123056. exports.INHERIT_KEYS = INHERIT_KEYS;
  123057. var BLOCK_SCOPED_SYMBOL = Symbol.for("var used to be block scoped");
  123058. exports.BLOCK_SCOPED_SYMBOL = BLOCK_SCOPED_SYMBOL;
  123059. var NOT_LOCAL_BINDING = Symbol.for("should not be considered a local binding");
  123060. exports.NOT_LOCAL_BINDING = NOT_LOCAL_BINDING;
  123061. }
  123062. });
  123063. // node_modules/@babel/template/node_modules/@babel/types/lib/validators/validate.js
  123064. var require_validate6 = __commonJS({
  123065. "node_modules/@babel/template/node_modules/@babel/types/lib/validators/validate.js"(exports) {
  123066. "use strict";
  123067. Object.defineProperty(exports, "__esModule", {
  123068. value: true
  123069. });
  123070. exports.default = validate;
  123071. exports.validateField = validateField;
  123072. exports.validateChild = validateChild;
  123073. var _definitions = require_definitions6();
  123074. function validate(node, key, val) {
  123075. if (!node)
  123076. return;
  123077. const fields = _definitions.NODE_FIELDS[node.type];
  123078. if (!fields)
  123079. return;
  123080. const field = fields[key];
  123081. validateField(node, key, val, field);
  123082. validateChild(node, key, val);
  123083. }
  123084. function validateField(node, key, val, field) {
  123085. if (!(field != null && field.validate))
  123086. return;
  123087. if (field.optional && val == null)
  123088. return;
  123089. field.validate(node, key, val);
  123090. }
  123091. function validateChild(node, key, val) {
  123092. if (val == null)
  123093. return;
  123094. const validate2 = _definitions.NODE_PARENT_VALIDATIONS[val.type];
  123095. if (!validate2)
  123096. return;
  123097. validate2(node, key, val);
  123098. }
  123099. }
  123100. });
  123101. // node_modules/@babel/template/node_modules/@babel/types/lib/definitions/utils.js
  123102. var require_utils6 = __commonJS({
  123103. "node_modules/@babel/template/node_modules/@babel/types/lib/definitions/utils.js"(exports) {
  123104. "use strict";
  123105. Object.defineProperty(exports, "__esModule", {
  123106. value: true
  123107. });
  123108. exports.validate = validate;
  123109. exports.typeIs = typeIs;
  123110. exports.validateType = validateType;
  123111. exports.validateOptional = validateOptional;
  123112. exports.validateOptionalType = validateOptionalType;
  123113. exports.arrayOf = arrayOf;
  123114. exports.arrayOfType = arrayOfType;
  123115. exports.validateArrayOfType = validateArrayOfType;
  123116. exports.assertEach = assertEach;
  123117. exports.assertOneOf = assertOneOf;
  123118. exports.assertNodeType = assertNodeType;
  123119. exports.assertNodeOrValueType = assertNodeOrValueType;
  123120. exports.assertValueType = assertValueType;
  123121. exports.assertShape = assertShape;
  123122. exports.assertOptionalChainStart = assertOptionalChainStart;
  123123. exports.chain = chain;
  123124. exports.default = defineType;
  123125. exports.NODE_PARENT_VALIDATIONS = exports.DEPRECATED_KEYS = exports.BUILDER_KEYS = exports.NODE_FIELDS = exports.FLIPPED_ALIAS_KEYS = exports.ALIAS_KEYS = exports.VISITOR_KEYS = void 0;
  123126. var _is = require_is6();
  123127. var _validate = require_validate6();
  123128. var VISITOR_KEYS = {};
  123129. exports.VISITOR_KEYS = VISITOR_KEYS;
  123130. var ALIAS_KEYS = {};
  123131. exports.ALIAS_KEYS = ALIAS_KEYS;
  123132. var FLIPPED_ALIAS_KEYS = {};
  123133. exports.FLIPPED_ALIAS_KEYS = FLIPPED_ALIAS_KEYS;
  123134. var NODE_FIELDS = {};
  123135. exports.NODE_FIELDS = NODE_FIELDS;
  123136. var BUILDER_KEYS = {};
  123137. exports.BUILDER_KEYS = BUILDER_KEYS;
  123138. var DEPRECATED_KEYS = {};
  123139. exports.DEPRECATED_KEYS = DEPRECATED_KEYS;
  123140. var NODE_PARENT_VALIDATIONS = {};
  123141. exports.NODE_PARENT_VALIDATIONS = NODE_PARENT_VALIDATIONS;
  123142. function getType(val) {
  123143. if (Array.isArray(val)) {
  123144. return "array";
  123145. } else if (val === null) {
  123146. return "null";
  123147. } else {
  123148. return typeof val;
  123149. }
  123150. }
  123151. function validate(validate2) {
  123152. return {
  123153. validate: validate2
  123154. };
  123155. }
  123156. function typeIs(typeName) {
  123157. return typeof typeName === "string" ? assertNodeType(typeName) : assertNodeType(...typeName);
  123158. }
  123159. function validateType(typeName) {
  123160. return validate(typeIs(typeName));
  123161. }
  123162. function validateOptional(validate2) {
  123163. return {
  123164. validate: validate2,
  123165. optional: true
  123166. };
  123167. }
  123168. function validateOptionalType(typeName) {
  123169. return {
  123170. validate: typeIs(typeName),
  123171. optional: true
  123172. };
  123173. }
  123174. function arrayOf(elementType) {
  123175. return chain(assertValueType("array"), assertEach(elementType));
  123176. }
  123177. function arrayOfType(typeName) {
  123178. return arrayOf(typeIs(typeName));
  123179. }
  123180. function validateArrayOfType(typeName) {
  123181. return validate(arrayOfType(typeName));
  123182. }
  123183. function assertEach(callback) {
  123184. function validator(node, key, val) {
  123185. if (!Array.isArray(val))
  123186. return;
  123187. for (let i = 0; i < val.length; i++) {
  123188. const subkey = `${key}[${i}]`;
  123189. const v = val[i];
  123190. callback(node, subkey, v);
  123191. if (process.env.BABEL_TYPES_8_BREAKING)
  123192. (0, _validate.validateChild)(node, subkey, v);
  123193. }
  123194. }
  123195. validator.each = callback;
  123196. return validator;
  123197. }
  123198. function assertOneOf(...values) {
  123199. function validate2(node, key, val) {
  123200. if (values.indexOf(val) < 0) {
  123201. throw new TypeError(`Property ${key} expected value to be one of ${JSON.stringify(values)} but got ${JSON.stringify(val)}`);
  123202. }
  123203. }
  123204. validate2.oneOf = values;
  123205. return validate2;
  123206. }
  123207. function assertNodeType(...types2) {
  123208. function validate2(node, key, val) {
  123209. for (const type of types2) {
  123210. if ((0, _is.default)(type, val)) {
  123211. (0, _validate.validateChild)(node, key, val);
  123212. return;
  123213. }
  123214. }
  123215. throw new TypeError(`Property ${key} of ${node.type} expected node to be of a type ${JSON.stringify(types2)} but instead got ${JSON.stringify(val == null ? void 0 : val.type)}`);
  123216. }
  123217. validate2.oneOfNodeTypes = types2;
  123218. return validate2;
  123219. }
  123220. function assertNodeOrValueType(...types2) {
  123221. function validate2(node, key, val) {
  123222. for (const type of types2) {
  123223. if (getType(val) === type || (0, _is.default)(type, val)) {
  123224. (0, _validate.validateChild)(node, key, val);
  123225. return;
  123226. }
  123227. }
  123228. throw new TypeError(`Property ${key} of ${node.type} expected node to be of a type ${JSON.stringify(types2)} but instead got ${JSON.stringify(val == null ? void 0 : val.type)}`);
  123229. }
  123230. validate2.oneOfNodeOrValueTypes = types2;
  123231. return validate2;
  123232. }
  123233. function assertValueType(type) {
  123234. function validate2(node, key, val) {
  123235. const valid2 = getType(val) === type;
  123236. if (!valid2) {
  123237. throw new TypeError(`Property ${key} expected type of ${type} but got ${getType(val)}`);
  123238. }
  123239. }
  123240. validate2.type = type;
  123241. return validate2;
  123242. }
  123243. function assertShape(shape) {
  123244. function validate2(node, key, val) {
  123245. const errors = [];
  123246. for (const property of Object.keys(shape)) {
  123247. try {
  123248. (0, _validate.validateField)(node, property, val[property], shape[property]);
  123249. } catch (error) {
  123250. if (error instanceof TypeError) {
  123251. errors.push(error.message);
  123252. continue;
  123253. }
  123254. throw error;
  123255. }
  123256. }
  123257. if (errors.length) {
  123258. throw new TypeError(`Property ${key} of ${node.type} expected to have the following:
  123259. ${errors.join("\n")}`);
  123260. }
  123261. }
  123262. validate2.shapeOf = shape;
  123263. return validate2;
  123264. }
  123265. function assertOptionalChainStart() {
  123266. function validate2(node) {
  123267. var _current;
  123268. let current2 = node;
  123269. while (node) {
  123270. const {
  123271. type
  123272. } = current2;
  123273. if (type === "OptionalCallExpression") {
  123274. if (current2.optional)
  123275. return;
  123276. current2 = current2.callee;
  123277. continue;
  123278. }
  123279. if (type === "OptionalMemberExpression") {
  123280. if (current2.optional)
  123281. return;
  123282. current2 = current2.object;
  123283. continue;
  123284. }
  123285. break;
  123286. }
  123287. throw new TypeError(`Non-optional ${node.type} must chain from an optional OptionalMemberExpression or OptionalCallExpression. Found chain from ${(_current = current2) == null ? void 0 : _current.type}`);
  123288. }
  123289. return validate2;
  123290. }
  123291. function chain(...fns) {
  123292. function validate2(...args) {
  123293. for (const fn of fns) {
  123294. fn(...args);
  123295. }
  123296. }
  123297. validate2.chainOf = fns;
  123298. if (fns.length >= 2 && "type" in fns[0] && fns[0].type === "array" && !("each" in fns[1])) {
  123299. throw new Error(`An assertValueType("array") validator can only be followed by an assertEach(...) validator.`);
  123300. }
  123301. return validate2;
  123302. }
  123303. var validTypeOpts = ["aliases", "builder", "deprecatedAlias", "fields", "inherits", "visitor", "validate"];
  123304. var validFieldKeys = ["default", "optional", "validate"];
  123305. function defineType(type, opts = {}) {
  123306. const inherits = opts.inherits && store[opts.inherits] || {};
  123307. let fields = opts.fields;
  123308. if (!fields) {
  123309. fields = {};
  123310. if (inherits.fields) {
  123311. const keys2 = Object.getOwnPropertyNames(inherits.fields);
  123312. for (const key of keys2) {
  123313. const field = inherits.fields[key];
  123314. const def = field.default;
  123315. if (Array.isArray(def) ? def.length > 0 : def && typeof def === "object") {
  123316. throw new Error("field defaults can only be primitives or empty arrays currently");
  123317. }
  123318. fields[key] = {
  123319. default: Array.isArray(def) ? [] : def,
  123320. optional: field.optional,
  123321. validate: field.validate
  123322. };
  123323. }
  123324. }
  123325. }
  123326. const visitor = opts.visitor || inherits.visitor || [];
  123327. const aliases = opts.aliases || inherits.aliases || [];
  123328. const builder = opts.builder || inherits.builder || opts.visitor || [];
  123329. for (const k of Object.keys(opts)) {
  123330. if (validTypeOpts.indexOf(k) === -1) {
  123331. throw new Error(`Unknown type option "${k}" on ${type}`);
  123332. }
  123333. }
  123334. if (opts.deprecatedAlias) {
  123335. DEPRECATED_KEYS[opts.deprecatedAlias] = type;
  123336. }
  123337. for (const key of visitor.concat(builder)) {
  123338. fields[key] = fields[key] || {};
  123339. }
  123340. for (const key of Object.keys(fields)) {
  123341. const field = fields[key];
  123342. if (field.default !== void 0 && builder.indexOf(key) === -1) {
  123343. field.optional = true;
  123344. }
  123345. if (field.default === void 0) {
  123346. field.default = null;
  123347. } else if (!field.validate && field.default != null) {
  123348. field.validate = assertValueType(getType(field.default));
  123349. }
  123350. for (const k of Object.keys(field)) {
  123351. if (validFieldKeys.indexOf(k) === -1) {
  123352. throw new Error(`Unknown field key "${k}" on ${type}.${key}`);
  123353. }
  123354. }
  123355. }
  123356. VISITOR_KEYS[type] = opts.visitor = visitor;
  123357. BUILDER_KEYS[type] = opts.builder = builder;
  123358. NODE_FIELDS[type] = opts.fields = fields;
  123359. ALIAS_KEYS[type] = opts.aliases = aliases;
  123360. aliases.forEach((alias) => {
  123361. FLIPPED_ALIAS_KEYS[alias] = FLIPPED_ALIAS_KEYS[alias] || [];
  123362. FLIPPED_ALIAS_KEYS[alias].push(type);
  123363. });
  123364. if (opts.validate) {
  123365. NODE_PARENT_VALIDATIONS[type] = opts.validate;
  123366. }
  123367. store[type] = opts;
  123368. }
  123369. var store = {};
  123370. }
  123371. });
  123372. // node_modules/@babel/template/node_modules/@babel/types/lib/definitions/core.js
  123373. var require_core6 = __commonJS({
  123374. "node_modules/@babel/template/node_modules/@babel/types/lib/definitions/core.js"(exports) {
  123375. "use strict";
  123376. Object.defineProperty(exports, "__esModule", {
  123377. value: true
  123378. });
  123379. exports.classMethodOrDeclareMethodCommon = exports.classMethodOrPropertyCommon = exports.patternLikeCommon = exports.functionDeclarationCommon = exports.functionTypeAnnotationCommon = exports.functionCommon = void 0;
  123380. var _is = require_is6();
  123381. var _isValidIdentifier = require_isValidIdentifier6();
  123382. var _helperValidatorIdentifier = require_lib29();
  123383. var _constants = require_constants6();
  123384. var _utils = require_utils6();
  123385. (0, _utils.default)("ArrayExpression", {
  123386. fields: {
  123387. elements: {
  123388. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeOrValueType)("null", "Expression", "SpreadElement"))),
  123389. default: !process.env.BABEL_TYPES_8_BREAKING ? [] : void 0
  123390. }
  123391. },
  123392. visitor: ["elements"],
  123393. aliases: ["Expression"]
  123394. });
  123395. (0, _utils.default)("AssignmentExpression", {
  123396. fields: {
  123397. operator: {
  123398. validate: function() {
  123399. if (!process.env.BABEL_TYPES_8_BREAKING) {
  123400. return (0, _utils.assertValueType)("string");
  123401. }
  123402. const identifier = (0, _utils.assertOneOf)(..._constants.ASSIGNMENT_OPERATORS);
  123403. const pattern = (0, _utils.assertOneOf)("=");
  123404. return function(node, key, val) {
  123405. const validator = (0, _is.default)("Pattern", node.left) ? pattern : identifier;
  123406. validator(node, key, val);
  123407. };
  123408. }()
  123409. },
  123410. left: {
  123411. validate: !process.env.BABEL_TYPES_8_BREAKING ? (0, _utils.assertNodeType)("LVal") : (0, _utils.assertNodeType)("Identifier", "MemberExpression", "ArrayPattern", "ObjectPattern")
  123412. },
  123413. right: {
  123414. validate: (0, _utils.assertNodeType)("Expression")
  123415. }
  123416. },
  123417. builder: ["operator", "left", "right"],
  123418. visitor: ["left", "right"],
  123419. aliases: ["Expression"]
  123420. });
  123421. (0, _utils.default)("BinaryExpression", {
  123422. builder: ["operator", "left", "right"],
  123423. fields: {
  123424. operator: {
  123425. validate: (0, _utils.assertOneOf)(..._constants.BINARY_OPERATORS)
  123426. },
  123427. left: {
  123428. validate: function() {
  123429. const expression = (0, _utils.assertNodeType)("Expression");
  123430. const inOp = (0, _utils.assertNodeType)("Expression", "PrivateName");
  123431. const validator = function(node, key, val) {
  123432. const validator2 = node.operator === "in" ? inOp : expression;
  123433. validator2(node, key, val);
  123434. };
  123435. validator.oneOfNodeTypes = ["Expression", "PrivateName"];
  123436. return validator;
  123437. }()
  123438. },
  123439. right: {
  123440. validate: (0, _utils.assertNodeType)("Expression")
  123441. }
  123442. },
  123443. visitor: ["left", "right"],
  123444. aliases: ["Binary", "Expression"]
  123445. });
  123446. (0, _utils.default)("InterpreterDirective", {
  123447. builder: ["value"],
  123448. fields: {
  123449. value: {
  123450. validate: (0, _utils.assertValueType)("string")
  123451. }
  123452. }
  123453. });
  123454. (0, _utils.default)("Directive", {
  123455. visitor: ["value"],
  123456. fields: {
  123457. value: {
  123458. validate: (0, _utils.assertNodeType)("DirectiveLiteral")
  123459. }
  123460. }
  123461. });
  123462. (0, _utils.default)("DirectiveLiteral", {
  123463. builder: ["value"],
  123464. fields: {
  123465. value: {
  123466. validate: (0, _utils.assertValueType)("string")
  123467. }
  123468. }
  123469. });
  123470. (0, _utils.default)("BlockStatement", {
  123471. builder: ["body", "directives"],
  123472. visitor: ["directives", "body"],
  123473. fields: {
  123474. directives: {
  123475. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Directive"))),
  123476. default: []
  123477. },
  123478. body: {
  123479. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Statement")))
  123480. }
  123481. },
  123482. aliases: ["Scopable", "BlockParent", "Block", "Statement"]
  123483. });
  123484. (0, _utils.default)("BreakStatement", {
  123485. visitor: ["label"],
  123486. fields: {
  123487. label: {
  123488. validate: (0, _utils.assertNodeType)("Identifier"),
  123489. optional: true
  123490. }
  123491. },
  123492. aliases: ["Statement", "Terminatorless", "CompletionStatement"]
  123493. });
  123494. (0, _utils.default)("CallExpression", {
  123495. visitor: ["callee", "arguments", "typeParameters", "typeArguments"],
  123496. builder: ["callee", "arguments"],
  123497. aliases: ["Expression"],
  123498. fields: Object.assign({
  123499. callee: {
  123500. validate: (0, _utils.assertNodeType)("Expression", "V8IntrinsicIdentifier")
  123501. },
  123502. arguments: {
  123503. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Expression", "SpreadElement", "JSXNamespacedName", "ArgumentPlaceholder")))
  123504. }
  123505. }, !process.env.BABEL_TYPES_8_BREAKING ? {
  123506. optional: {
  123507. validate: (0, _utils.assertOneOf)(true, false),
  123508. optional: true
  123509. }
  123510. } : {}, {
  123511. typeArguments: {
  123512. validate: (0, _utils.assertNodeType)("TypeParameterInstantiation"),
  123513. optional: true
  123514. },
  123515. typeParameters: {
  123516. validate: (0, _utils.assertNodeType)("TSTypeParameterInstantiation"),
  123517. optional: true
  123518. }
  123519. })
  123520. });
  123521. (0, _utils.default)("CatchClause", {
  123522. visitor: ["param", "body"],
  123523. fields: {
  123524. param: {
  123525. validate: (0, _utils.assertNodeType)("Identifier", "ArrayPattern", "ObjectPattern"),
  123526. optional: true
  123527. },
  123528. body: {
  123529. validate: (0, _utils.assertNodeType)("BlockStatement")
  123530. }
  123531. },
  123532. aliases: ["Scopable", "BlockParent"]
  123533. });
  123534. (0, _utils.default)("ConditionalExpression", {
  123535. visitor: ["test", "consequent", "alternate"],
  123536. fields: {
  123537. test: {
  123538. validate: (0, _utils.assertNodeType)("Expression")
  123539. },
  123540. consequent: {
  123541. validate: (0, _utils.assertNodeType)("Expression")
  123542. },
  123543. alternate: {
  123544. validate: (0, _utils.assertNodeType)("Expression")
  123545. }
  123546. },
  123547. aliases: ["Expression", "Conditional"]
  123548. });
  123549. (0, _utils.default)("ContinueStatement", {
  123550. visitor: ["label"],
  123551. fields: {
  123552. label: {
  123553. validate: (0, _utils.assertNodeType)("Identifier"),
  123554. optional: true
  123555. }
  123556. },
  123557. aliases: ["Statement", "Terminatorless", "CompletionStatement"]
  123558. });
  123559. (0, _utils.default)("DebuggerStatement", {
  123560. aliases: ["Statement"]
  123561. });
  123562. (0, _utils.default)("DoWhileStatement", {
  123563. visitor: ["test", "body"],
  123564. fields: {
  123565. test: {
  123566. validate: (0, _utils.assertNodeType)("Expression")
  123567. },
  123568. body: {
  123569. validate: (0, _utils.assertNodeType)("Statement")
  123570. }
  123571. },
  123572. aliases: ["Statement", "BlockParent", "Loop", "While", "Scopable"]
  123573. });
  123574. (0, _utils.default)("EmptyStatement", {
  123575. aliases: ["Statement"]
  123576. });
  123577. (0, _utils.default)("ExpressionStatement", {
  123578. visitor: ["expression"],
  123579. fields: {
  123580. expression: {
  123581. validate: (0, _utils.assertNodeType)("Expression")
  123582. }
  123583. },
  123584. aliases: ["Statement", "ExpressionWrapper"]
  123585. });
  123586. (0, _utils.default)("File", {
  123587. builder: ["program", "comments", "tokens"],
  123588. visitor: ["program"],
  123589. fields: {
  123590. program: {
  123591. validate: (0, _utils.assertNodeType)("Program")
  123592. },
  123593. comments: {
  123594. validate: !process.env.BABEL_TYPES_8_BREAKING ? Object.assign(() => {
  123595. }, {
  123596. each: {
  123597. oneOfNodeTypes: ["CommentBlock", "CommentLine"]
  123598. }
  123599. }) : (0, _utils.assertEach)((0, _utils.assertNodeType)("CommentBlock", "CommentLine")),
  123600. optional: true
  123601. },
  123602. tokens: {
  123603. validate: (0, _utils.assertEach)(Object.assign(() => {
  123604. }, {
  123605. type: "any"
  123606. })),
  123607. optional: true
  123608. }
  123609. }
  123610. });
  123611. (0, _utils.default)("ForInStatement", {
  123612. visitor: ["left", "right", "body"],
  123613. aliases: ["Scopable", "Statement", "For", "BlockParent", "Loop", "ForXStatement"],
  123614. fields: {
  123615. left: {
  123616. validate: !process.env.BABEL_TYPES_8_BREAKING ? (0, _utils.assertNodeType)("VariableDeclaration", "LVal") : (0, _utils.assertNodeType)("VariableDeclaration", "Identifier", "MemberExpression", "ArrayPattern", "ObjectPattern")
  123617. },
  123618. right: {
  123619. validate: (0, _utils.assertNodeType)("Expression")
  123620. },
  123621. body: {
  123622. validate: (0, _utils.assertNodeType)("Statement")
  123623. }
  123624. }
  123625. });
  123626. (0, _utils.default)("ForStatement", {
  123627. visitor: ["init", "test", "update", "body"],
  123628. aliases: ["Scopable", "Statement", "For", "BlockParent", "Loop"],
  123629. fields: {
  123630. init: {
  123631. validate: (0, _utils.assertNodeType)("VariableDeclaration", "Expression"),
  123632. optional: true
  123633. },
  123634. test: {
  123635. validate: (0, _utils.assertNodeType)("Expression"),
  123636. optional: true
  123637. },
  123638. update: {
  123639. validate: (0, _utils.assertNodeType)("Expression"),
  123640. optional: true
  123641. },
  123642. body: {
  123643. validate: (0, _utils.assertNodeType)("Statement")
  123644. }
  123645. }
  123646. });
  123647. var functionCommon = {
  123648. params: {
  123649. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Identifier", "Pattern", "RestElement")))
  123650. },
  123651. generator: {
  123652. default: false
  123653. },
  123654. async: {
  123655. default: false
  123656. }
  123657. };
  123658. exports.functionCommon = functionCommon;
  123659. var functionTypeAnnotationCommon = {
  123660. returnType: {
  123661. validate: (0, _utils.assertNodeType)("TypeAnnotation", "TSTypeAnnotation", "Noop"),
  123662. optional: true
  123663. },
  123664. typeParameters: {
  123665. validate: (0, _utils.assertNodeType)("TypeParameterDeclaration", "TSTypeParameterDeclaration", "Noop"),
  123666. optional: true
  123667. }
  123668. };
  123669. exports.functionTypeAnnotationCommon = functionTypeAnnotationCommon;
  123670. var functionDeclarationCommon = Object.assign({}, functionCommon, {
  123671. declare: {
  123672. validate: (0, _utils.assertValueType)("boolean"),
  123673. optional: true
  123674. },
  123675. id: {
  123676. validate: (0, _utils.assertNodeType)("Identifier"),
  123677. optional: true
  123678. }
  123679. });
  123680. exports.functionDeclarationCommon = functionDeclarationCommon;
  123681. (0, _utils.default)("FunctionDeclaration", {
  123682. builder: ["id", "params", "body", "generator", "async"],
  123683. visitor: ["id", "params", "body", "returnType", "typeParameters"],
  123684. fields: Object.assign({}, functionDeclarationCommon, functionTypeAnnotationCommon, {
  123685. body: {
  123686. validate: (0, _utils.assertNodeType)("BlockStatement")
  123687. }
  123688. }),
  123689. aliases: ["Scopable", "Function", "BlockParent", "FunctionParent", "Statement", "Pureish", "Declaration"],
  123690. validate: function() {
  123691. if (!process.env.BABEL_TYPES_8_BREAKING)
  123692. return () => {
  123693. };
  123694. const identifier = (0, _utils.assertNodeType)("Identifier");
  123695. return function(parent, key, node) {
  123696. if (!(0, _is.default)("ExportDefaultDeclaration", parent)) {
  123697. identifier(node, "id", node.id);
  123698. }
  123699. };
  123700. }()
  123701. });
  123702. (0, _utils.default)("FunctionExpression", {
  123703. inherits: "FunctionDeclaration",
  123704. aliases: ["Scopable", "Function", "BlockParent", "FunctionParent", "Expression", "Pureish"],
  123705. fields: Object.assign({}, functionCommon, functionTypeAnnotationCommon, {
  123706. id: {
  123707. validate: (0, _utils.assertNodeType)("Identifier"),
  123708. optional: true
  123709. },
  123710. body: {
  123711. validate: (0, _utils.assertNodeType)("BlockStatement")
  123712. }
  123713. })
  123714. });
  123715. var patternLikeCommon = {
  123716. typeAnnotation: {
  123717. validate: (0, _utils.assertNodeType)("TypeAnnotation", "TSTypeAnnotation", "Noop"),
  123718. optional: true
  123719. },
  123720. decorators: {
  123721. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Decorator")))
  123722. }
  123723. };
  123724. exports.patternLikeCommon = patternLikeCommon;
  123725. (0, _utils.default)("Identifier", {
  123726. builder: ["name"],
  123727. visitor: ["typeAnnotation", "decorators"],
  123728. aliases: ["Expression", "PatternLike", "LVal", "TSEntityName"],
  123729. fields: Object.assign({}, patternLikeCommon, {
  123730. name: {
  123731. validate: (0, _utils.chain)((0, _utils.assertValueType)("string"), Object.assign(function(node, key, val) {
  123732. if (!process.env.BABEL_TYPES_8_BREAKING)
  123733. return;
  123734. if (!(0, _isValidIdentifier.default)(val, false)) {
  123735. throw new TypeError(`"${val}" is not a valid identifier name`);
  123736. }
  123737. }, {
  123738. type: "string"
  123739. }))
  123740. },
  123741. optional: {
  123742. validate: (0, _utils.assertValueType)("boolean"),
  123743. optional: true
  123744. }
  123745. }),
  123746. validate(parent, key, node) {
  123747. if (!process.env.BABEL_TYPES_8_BREAKING)
  123748. return;
  123749. const match = /\.(\w+)$/.exec(key);
  123750. if (!match)
  123751. return;
  123752. const [, parentKey] = match;
  123753. const nonComp = {
  123754. computed: false
  123755. };
  123756. if (parentKey === "property") {
  123757. if ((0, _is.default)("MemberExpression", parent, nonComp))
  123758. return;
  123759. if ((0, _is.default)("OptionalMemberExpression", parent, nonComp))
  123760. return;
  123761. } else if (parentKey === "key") {
  123762. if ((0, _is.default)("Property", parent, nonComp))
  123763. return;
  123764. if ((0, _is.default)("Method", parent, nonComp))
  123765. return;
  123766. } else if (parentKey === "exported") {
  123767. if ((0, _is.default)("ExportSpecifier", parent))
  123768. return;
  123769. } else if (parentKey === "imported") {
  123770. if ((0, _is.default)("ImportSpecifier", parent, {
  123771. imported: node
  123772. }))
  123773. return;
  123774. } else if (parentKey === "meta") {
  123775. if ((0, _is.default)("MetaProperty", parent, {
  123776. meta: node
  123777. }))
  123778. return;
  123779. }
  123780. if (((0, _helperValidatorIdentifier.isKeyword)(node.name) || (0, _helperValidatorIdentifier.isReservedWord)(node.name, false)) && node.name !== "this") {
  123781. throw new TypeError(`"${node.name}" is not a valid identifier`);
  123782. }
  123783. }
  123784. });
  123785. (0, _utils.default)("IfStatement", {
  123786. visitor: ["test", "consequent", "alternate"],
  123787. aliases: ["Statement", "Conditional"],
  123788. fields: {
  123789. test: {
  123790. validate: (0, _utils.assertNodeType)("Expression")
  123791. },
  123792. consequent: {
  123793. validate: (0, _utils.assertNodeType)("Statement")
  123794. },
  123795. alternate: {
  123796. optional: true,
  123797. validate: (0, _utils.assertNodeType)("Statement")
  123798. }
  123799. }
  123800. });
  123801. (0, _utils.default)("LabeledStatement", {
  123802. visitor: ["label", "body"],
  123803. aliases: ["Statement"],
  123804. fields: {
  123805. label: {
  123806. validate: (0, _utils.assertNodeType)("Identifier")
  123807. },
  123808. body: {
  123809. validate: (0, _utils.assertNodeType)("Statement")
  123810. }
  123811. }
  123812. });
  123813. (0, _utils.default)("StringLiteral", {
  123814. builder: ["value"],
  123815. fields: {
  123816. value: {
  123817. validate: (0, _utils.assertValueType)("string")
  123818. }
  123819. },
  123820. aliases: ["Expression", "Pureish", "Literal", "Immutable"]
  123821. });
  123822. (0, _utils.default)("NumericLiteral", {
  123823. builder: ["value"],
  123824. deprecatedAlias: "NumberLiteral",
  123825. fields: {
  123826. value: {
  123827. validate: (0, _utils.assertValueType)("number")
  123828. }
  123829. },
  123830. aliases: ["Expression", "Pureish", "Literal", "Immutable"]
  123831. });
  123832. (0, _utils.default)("NullLiteral", {
  123833. aliases: ["Expression", "Pureish", "Literal", "Immutable"]
  123834. });
  123835. (0, _utils.default)("BooleanLiteral", {
  123836. builder: ["value"],
  123837. fields: {
  123838. value: {
  123839. validate: (0, _utils.assertValueType)("boolean")
  123840. }
  123841. },
  123842. aliases: ["Expression", "Pureish", "Literal", "Immutable"]
  123843. });
  123844. (0, _utils.default)("RegExpLiteral", {
  123845. builder: ["pattern", "flags"],
  123846. deprecatedAlias: "RegexLiteral",
  123847. aliases: ["Expression", "Pureish", "Literal"],
  123848. fields: {
  123849. pattern: {
  123850. validate: (0, _utils.assertValueType)("string")
  123851. },
  123852. flags: {
  123853. validate: (0, _utils.chain)((0, _utils.assertValueType)("string"), Object.assign(function(node, key, val) {
  123854. if (!process.env.BABEL_TYPES_8_BREAKING)
  123855. return;
  123856. const invalid2 = /[^gimsuy]/.exec(val);
  123857. if (invalid2) {
  123858. throw new TypeError(`"${invalid2[0]}" is not a valid RegExp flag`);
  123859. }
  123860. }, {
  123861. type: "string"
  123862. })),
  123863. default: ""
  123864. }
  123865. }
  123866. });
  123867. (0, _utils.default)("LogicalExpression", {
  123868. builder: ["operator", "left", "right"],
  123869. visitor: ["left", "right"],
  123870. aliases: ["Binary", "Expression"],
  123871. fields: {
  123872. operator: {
  123873. validate: (0, _utils.assertOneOf)(..._constants.LOGICAL_OPERATORS)
  123874. },
  123875. left: {
  123876. validate: (0, _utils.assertNodeType)("Expression")
  123877. },
  123878. right: {
  123879. validate: (0, _utils.assertNodeType)("Expression")
  123880. }
  123881. }
  123882. });
  123883. (0, _utils.default)("MemberExpression", {
  123884. builder: ["object", "property", "computed", ...!process.env.BABEL_TYPES_8_BREAKING ? ["optional"] : []],
  123885. visitor: ["object", "property"],
  123886. aliases: ["Expression", "LVal"],
  123887. fields: Object.assign({
  123888. object: {
  123889. validate: (0, _utils.assertNodeType)("Expression")
  123890. },
  123891. property: {
  123892. validate: function() {
  123893. const normal = (0, _utils.assertNodeType)("Identifier", "PrivateName");
  123894. const computed = (0, _utils.assertNodeType)("Expression");
  123895. const validator = function(node, key, val) {
  123896. const validator2 = node.computed ? computed : normal;
  123897. validator2(node, key, val);
  123898. };
  123899. validator.oneOfNodeTypes = ["Expression", "Identifier", "PrivateName"];
  123900. return validator;
  123901. }()
  123902. },
  123903. computed: {
  123904. default: false
  123905. }
  123906. }, !process.env.BABEL_TYPES_8_BREAKING ? {
  123907. optional: {
  123908. validate: (0, _utils.assertOneOf)(true, false),
  123909. optional: true
  123910. }
  123911. } : {})
  123912. });
  123913. (0, _utils.default)("NewExpression", {
  123914. inherits: "CallExpression"
  123915. });
  123916. (0, _utils.default)("Program", {
  123917. visitor: ["directives", "body"],
  123918. builder: ["body", "directives", "sourceType", "interpreter"],
  123919. fields: {
  123920. sourceFile: {
  123921. validate: (0, _utils.assertValueType)("string")
  123922. },
  123923. sourceType: {
  123924. validate: (0, _utils.assertOneOf)("script", "module"),
  123925. default: "script"
  123926. },
  123927. interpreter: {
  123928. validate: (0, _utils.assertNodeType)("InterpreterDirective"),
  123929. default: null,
  123930. optional: true
  123931. },
  123932. directives: {
  123933. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Directive"))),
  123934. default: []
  123935. },
  123936. body: {
  123937. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Statement")))
  123938. }
  123939. },
  123940. aliases: ["Scopable", "BlockParent", "Block"]
  123941. });
  123942. (0, _utils.default)("ObjectExpression", {
  123943. visitor: ["properties"],
  123944. aliases: ["Expression"],
  123945. fields: {
  123946. properties: {
  123947. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("ObjectMethod", "ObjectProperty", "SpreadElement")))
  123948. }
  123949. }
  123950. });
  123951. (0, _utils.default)("ObjectMethod", {
  123952. builder: ["kind", "key", "params", "body", "computed", "generator", "async"],
  123953. fields: Object.assign({}, functionCommon, functionTypeAnnotationCommon, {
  123954. kind: Object.assign({
  123955. validate: (0, _utils.assertOneOf)("method", "get", "set")
  123956. }, !process.env.BABEL_TYPES_8_BREAKING ? {
  123957. default: "method"
  123958. } : {}),
  123959. computed: {
  123960. default: false
  123961. },
  123962. key: {
  123963. validate: function() {
  123964. const normal = (0, _utils.assertNodeType)("Identifier", "StringLiteral", "NumericLiteral");
  123965. const computed = (0, _utils.assertNodeType)("Expression");
  123966. const validator = function(node, key, val) {
  123967. const validator2 = node.computed ? computed : normal;
  123968. validator2(node, key, val);
  123969. };
  123970. validator.oneOfNodeTypes = ["Expression", "Identifier", "StringLiteral", "NumericLiteral"];
  123971. return validator;
  123972. }()
  123973. },
  123974. decorators: {
  123975. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Decorator"))),
  123976. optional: true
  123977. },
  123978. body: {
  123979. validate: (0, _utils.assertNodeType)("BlockStatement")
  123980. }
  123981. }),
  123982. visitor: ["key", "params", "body", "decorators", "returnType", "typeParameters"],
  123983. aliases: ["UserWhitespacable", "Function", "Scopable", "BlockParent", "FunctionParent", "Method", "ObjectMember"]
  123984. });
  123985. (0, _utils.default)("ObjectProperty", {
  123986. builder: ["key", "value", "computed", "shorthand", ...!process.env.BABEL_TYPES_8_BREAKING ? ["decorators"] : []],
  123987. fields: {
  123988. computed: {
  123989. default: false
  123990. },
  123991. key: {
  123992. validate: function() {
  123993. const normal = (0, _utils.assertNodeType)("Identifier", "StringLiteral", "NumericLiteral");
  123994. const computed = (0, _utils.assertNodeType)("Expression");
  123995. const validator = function(node, key, val) {
  123996. const validator2 = node.computed ? computed : normal;
  123997. validator2(node, key, val);
  123998. };
  123999. validator.oneOfNodeTypes = ["Expression", "Identifier", "StringLiteral", "NumericLiteral"];
  124000. return validator;
  124001. }()
  124002. },
  124003. value: {
  124004. validate: (0, _utils.assertNodeType)("Expression", "PatternLike")
  124005. },
  124006. shorthand: {
  124007. validate: (0, _utils.chain)((0, _utils.assertValueType)("boolean"), Object.assign(function(node, key, val) {
  124008. if (!process.env.BABEL_TYPES_8_BREAKING)
  124009. return;
  124010. if (val && node.computed) {
  124011. throw new TypeError("Property shorthand of ObjectProperty cannot be true if computed is true");
  124012. }
  124013. }, {
  124014. type: "boolean"
  124015. }), function(node, key, val) {
  124016. if (!process.env.BABEL_TYPES_8_BREAKING)
  124017. return;
  124018. if (val && !(0, _is.default)("Identifier", node.key)) {
  124019. throw new TypeError("Property shorthand of ObjectProperty cannot be true if key is not an Identifier");
  124020. }
  124021. }),
  124022. default: false
  124023. },
  124024. decorators: {
  124025. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Decorator"))),
  124026. optional: true
  124027. }
  124028. },
  124029. visitor: ["key", "value", "decorators"],
  124030. aliases: ["UserWhitespacable", "Property", "ObjectMember"],
  124031. validate: function() {
  124032. const pattern = (0, _utils.assertNodeType)("Identifier", "Pattern");
  124033. const expression = (0, _utils.assertNodeType)("Expression");
  124034. return function(parent, key, node) {
  124035. if (!process.env.BABEL_TYPES_8_BREAKING)
  124036. return;
  124037. const validator = (0, _is.default)("ObjectPattern", parent) ? pattern : expression;
  124038. validator(node, "value", node.value);
  124039. };
  124040. }()
  124041. });
  124042. (0, _utils.default)("RestElement", {
  124043. visitor: ["argument", "typeAnnotation"],
  124044. builder: ["argument"],
  124045. aliases: ["LVal", "PatternLike"],
  124046. deprecatedAlias: "RestProperty",
  124047. fields: Object.assign({}, patternLikeCommon, {
  124048. argument: {
  124049. validate: !process.env.BABEL_TYPES_8_BREAKING ? (0, _utils.assertNodeType)("LVal") : (0, _utils.assertNodeType)("Identifier", "Pattern", "MemberExpression")
  124050. }
  124051. }),
  124052. validate(parent, key) {
  124053. if (!process.env.BABEL_TYPES_8_BREAKING)
  124054. return;
  124055. const match = /(\w+)\[(\d+)\]/.exec(key);
  124056. if (!match)
  124057. throw new Error("Internal Babel error: malformed key.");
  124058. const [, listKey, index2] = match;
  124059. if (parent[listKey].length > index2 + 1) {
  124060. throw new TypeError(`RestElement must be last element of ${listKey}`);
  124061. }
  124062. }
  124063. });
  124064. (0, _utils.default)("ReturnStatement", {
  124065. visitor: ["argument"],
  124066. aliases: ["Statement", "Terminatorless", "CompletionStatement"],
  124067. fields: {
  124068. argument: {
  124069. validate: (0, _utils.assertNodeType)("Expression"),
  124070. optional: true
  124071. }
  124072. }
  124073. });
  124074. (0, _utils.default)("SequenceExpression", {
  124075. visitor: ["expressions"],
  124076. fields: {
  124077. expressions: {
  124078. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Expression")))
  124079. }
  124080. },
  124081. aliases: ["Expression"]
  124082. });
  124083. (0, _utils.default)("ParenthesizedExpression", {
  124084. visitor: ["expression"],
  124085. aliases: ["Expression", "ExpressionWrapper"],
  124086. fields: {
  124087. expression: {
  124088. validate: (0, _utils.assertNodeType)("Expression")
  124089. }
  124090. }
  124091. });
  124092. (0, _utils.default)("SwitchCase", {
  124093. visitor: ["test", "consequent"],
  124094. fields: {
  124095. test: {
  124096. validate: (0, _utils.assertNodeType)("Expression"),
  124097. optional: true
  124098. },
  124099. consequent: {
  124100. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Statement")))
  124101. }
  124102. }
  124103. });
  124104. (0, _utils.default)("SwitchStatement", {
  124105. visitor: ["discriminant", "cases"],
  124106. aliases: ["Statement", "BlockParent", "Scopable"],
  124107. fields: {
  124108. discriminant: {
  124109. validate: (0, _utils.assertNodeType)("Expression")
  124110. },
  124111. cases: {
  124112. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("SwitchCase")))
  124113. }
  124114. }
  124115. });
  124116. (0, _utils.default)("ThisExpression", {
  124117. aliases: ["Expression"]
  124118. });
  124119. (0, _utils.default)("ThrowStatement", {
  124120. visitor: ["argument"],
  124121. aliases: ["Statement", "Terminatorless", "CompletionStatement"],
  124122. fields: {
  124123. argument: {
  124124. validate: (0, _utils.assertNodeType)("Expression")
  124125. }
  124126. }
  124127. });
  124128. (0, _utils.default)("TryStatement", {
  124129. visitor: ["block", "handler", "finalizer"],
  124130. aliases: ["Statement"],
  124131. fields: {
  124132. block: {
  124133. validate: (0, _utils.chain)((0, _utils.assertNodeType)("BlockStatement"), Object.assign(function(node) {
  124134. if (!process.env.BABEL_TYPES_8_BREAKING)
  124135. return;
  124136. if (!node.handler && !node.finalizer) {
  124137. throw new TypeError("TryStatement expects either a handler or finalizer, or both");
  124138. }
  124139. }, {
  124140. oneOfNodeTypes: ["BlockStatement"]
  124141. }))
  124142. },
  124143. handler: {
  124144. optional: true,
  124145. validate: (0, _utils.assertNodeType)("CatchClause")
  124146. },
  124147. finalizer: {
  124148. optional: true,
  124149. validate: (0, _utils.assertNodeType)("BlockStatement")
  124150. }
  124151. }
  124152. });
  124153. (0, _utils.default)("UnaryExpression", {
  124154. builder: ["operator", "argument", "prefix"],
  124155. fields: {
  124156. prefix: {
  124157. default: true
  124158. },
  124159. argument: {
  124160. validate: (0, _utils.assertNodeType)("Expression")
  124161. },
  124162. operator: {
  124163. validate: (0, _utils.assertOneOf)(..._constants.UNARY_OPERATORS)
  124164. }
  124165. },
  124166. visitor: ["argument"],
  124167. aliases: ["UnaryLike", "Expression"]
  124168. });
  124169. (0, _utils.default)("UpdateExpression", {
  124170. builder: ["operator", "argument", "prefix"],
  124171. fields: {
  124172. prefix: {
  124173. default: false
  124174. },
  124175. argument: {
  124176. validate: !process.env.BABEL_TYPES_8_BREAKING ? (0, _utils.assertNodeType)("Expression") : (0, _utils.assertNodeType)("Identifier", "MemberExpression")
  124177. },
  124178. operator: {
  124179. validate: (0, _utils.assertOneOf)(..._constants.UPDATE_OPERATORS)
  124180. }
  124181. },
  124182. visitor: ["argument"],
  124183. aliases: ["Expression"]
  124184. });
  124185. (0, _utils.default)("VariableDeclaration", {
  124186. builder: ["kind", "declarations"],
  124187. visitor: ["declarations"],
  124188. aliases: ["Statement", "Declaration"],
  124189. fields: {
  124190. declare: {
  124191. validate: (0, _utils.assertValueType)("boolean"),
  124192. optional: true
  124193. },
  124194. kind: {
  124195. validate: (0, _utils.assertOneOf)("var", "let", "const")
  124196. },
  124197. declarations: {
  124198. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("VariableDeclarator")))
  124199. }
  124200. },
  124201. validate(parent, key, node) {
  124202. if (!process.env.BABEL_TYPES_8_BREAKING)
  124203. return;
  124204. if (!(0, _is.default)("ForXStatement", parent, {
  124205. left: node
  124206. }))
  124207. return;
  124208. if (node.declarations.length !== 1) {
  124209. throw new TypeError(`Exactly one VariableDeclarator is required in the VariableDeclaration of a ${parent.type}`);
  124210. }
  124211. }
  124212. });
  124213. (0, _utils.default)("VariableDeclarator", {
  124214. visitor: ["id", "init"],
  124215. fields: {
  124216. id: {
  124217. validate: function() {
  124218. if (!process.env.BABEL_TYPES_8_BREAKING) {
  124219. return (0, _utils.assertNodeType)("LVal");
  124220. }
  124221. const normal = (0, _utils.assertNodeType)("Identifier", "ArrayPattern", "ObjectPattern");
  124222. const without = (0, _utils.assertNodeType)("Identifier");
  124223. return function(node, key, val) {
  124224. const validator = node.init ? normal : without;
  124225. validator(node, key, val);
  124226. };
  124227. }()
  124228. },
  124229. definite: {
  124230. optional: true,
  124231. validate: (0, _utils.assertValueType)("boolean")
  124232. },
  124233. init: {
  124234. optional: true,
  124235. validate: (0, _utils.assertNodeType)("Expression")
  124236. }
  124237. }
  124238. });
  124239. (0, _utils.default)("WhileStatement", {
  124240. visitor: ["test", "body"],
  124241. aliases: ["Statement", "BlockParent", "Loop", "While", "Scopable"],
  124242. fields: {
  124243. test: {
  124244. validate: (0, _utils.assertNodeType)("Expression")
  124245. },
  124246. body: {
  124247. validate: (0, _utils.assertNodeType)("Statement")
  124248. }
  124249. }
  124250. });
  124251. (0, _utils.default)("WithStatement", {
  124252. visitor: ["object", "body"],
  124253. aliases: ["Statement"],
  124254. fields: {
  124255. object: {
  124256. validate: (0, _utils.assertNodeType)("Expression")
  124257. },
  124258. body: {
  124259. validate: (0, _utils.assertNodeType)("Statement")
  124260. }
  124261. }
  124262. });
  124263. (0, _utils.default)("AssignmentPattern", {
  124264. visitor: ["left", "right", "decorators"],
  124265. builder: ["left", "right"],
  124266. aliases: ["Pattern", "PatternLike", "LVal"],
  124267. fields: Object.assign({}, patternLikeCommon, {
  124268. left: {
  124269. validate: (0, _utils.assertNodeType)("Identifier", "ObjectPattern", "ArrayPattern", "MemberExpression")
  124270. },
  124271. right: {
  124272. validate: (0, _utils.assertNodeType)("Expression")
  124273. },
  124274. decorators: {
  124275. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Decorator"))),
  124276. optional: true
  124277. }
  124278. })
  124279. });
  124280. (0, _utils.default)("ArrayPattern", {
  124281. visitor: ["elements", "typeAnnotation"],
  124282. builder: ["elements"],
  124283. aliases: ["Pattern", "PatternLike", "LVal"],
  124284. fields: Object.assign({}, patternLikeCommon, {
  124285. elements: {
  124286. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeOrValueType)("null", "PatternLike")))
  124287. },
  124288. decorators: {
  124289. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Decorator"))),
  124290. optional: true
  124291. }
  124292. })
  124293. });
  124294. (0, _utils.default)("ArrowFunctionExpression", {
  124295. builder: ["params", "body", "async"],
  124296. visitor: ["params", "body", "returnType", "typeParameters"],
  124297. aliases: ["Scopable", "Function", "BlockParent", "FunctionParent", "Expression", "Pureish"],
  124298. fields: Object.assign({}, functionCommon, functionTypeAnnotationCommon, {
  124299. expression: {
  124300. validate: (0, _utils.assertValueType)("boolean")
  124301. },
  124302. body: {
  124303. validate: (0, _utils.assertNodeType)("BlockStatement", "Expression")
  124304. }
  124305. })
  124306. });
  124307. (0, _utils.default)("ClassBody", {
  124308. visitor: ["body"],
  124309. fields: {
  124310. body: {
  124311. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("ClassMethod", "ClassPrivateMethod", "ClassProperty", "ClassPrivateProperty", "TSDeclareMethod", "TSIndexSignature")))
  124312. }
  124313. }
  124314. });
  124315. (0, _utils.default)("ClassExpression", {
  124316. builder: ["id", "superClass", "body", "decorators"],
  124317. visitor: ["id", "body", "superClass", "mixins", "typeParameters", "superTypeParameters", "implements", "decorators"],
  124318. aliases: ["Scopable", "Class", "Expression"],
  124319. fields: {
  124320. id: {
  124321. validate: (0, _utils.assertNodeType)("Identifier"),
  124322. optional: true
  124323. },
  124324. typeParameters: {
  124325. validate: (0, _utils.assertNodeType)("TypeParameterDeclaration", "TSTypeParameterDeclaration", "Noop"),
  124326. optional: true
  124327. },
  124328. body: {
  124329. validate: (0, _utils.assertNodeType)("ClassBody")
  124330. },
  124331. superClass: {
  124332. optional: true,
  124333. validate: (0, _utils.assertNodeType)("Expression")
  124334. },
  124335. superTypeParameters: {
  124336. validate: (0, _utils.assertNodeType)("TypeParameterInstantiation", "TSTypeParameterInstantiation"),
  124337. optional: true
  124338. },
  124339. implements: {
  124340. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("TSExpressionWithTypeArguments", "ClassImplements"))),
  124341. optional: true
  124342. },
  124343. decorators: {
  124344. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Decorator"))),
  124345. optional: true
  124346. },
  124347. mixins: {
  124348. validate: (0, _utils.assertNodeType)("InterfaceExtends"),
  124349. optional: true
  124350. }
  124351. }
  124352. });
  124353. (0, _utils.default)("ClassDeclaration", {
  124354. inherits: "ClassExpression",
  124355. aliases: ["Scopable", "Class", "Statement", "Declaration"],
  124356. fields: {
  124357. id: {
  124358. validate: (0, _utils.assertNodeType)("Identifier")
  124359. },
  124360. typeParameters: {
  124361. validate: (0, _utils.assertNodeType)("TypeParameterDeclaration", "TSTypeParameterDeclaration", "Noop"),
  124362. optional: true
  124363. },
  124364. body: {
  124365. validate: (0, _utils.assertNodeType)("ClassBody")
  124366. },
  124367. superClass: {
  124368. optional: true,
  124369. validate: (0, _utils.assertNodeType)("Expression")
  124370. },
  124371. superTypeParameters: {
  124372. validate: (0, _utils.assertNodeType)("TypeParameterInstantiation", "TSTypeParameterInstantiation"),
  124373. optional: true
  124374. },
  124375. implements: {
  124376. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("TSExpressionWithTypeArguments", "ClassImplements"))),
  124377. optional: true
  124378. },
  124379. decorators: {
  124380. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Decorator"))),
  124381. optional: true
  124382. },
  124383. mixins: {
  124384. validate: (0, _utils.assertNodeType)("InterfaceExtends"),
  124385. optional: true
  124386. },
  124387. declare: {
  124388. validate: (0, _utils.assertValueType)("boolean"),
  124389. optional: true
  124390. },
  124391. abstract: {
  124392. validate: (0, _utils.assertValueType)("boolean"),
  124393. optional: true
  124394. }
  124395. },
  124396. validate: function() {
  124397. const identifier = (0, _utils.assertNodeType)("Identifier");
  124398. return function(parent, key, node) {
  124399. if (!process.env.BABEL_TYPES_8_BREAKING)
  124400. return;
  124401. if (!(0, _is.default)("ExportDefaultDeclaration", parent)) {
  124402. identifier(node, "id", node.id);
  124403. }
  124404. };
  124405. }()
  124406. });
  124407. (0, _utils.default)("ExportAllDeclaration", {
  124408. visitor: ["source"],
  124409. aliases: ["Statement", "Declaration", "ModuleDeclaration", "ExportDeclaration"],
  124410. fields: {
  124411. source: {
  124412. validate: (0, _utils.assertNodeType)("StringLiteral")
  124413. },
  124414. exportKind: (0, _utils.validateOptional)((0, _utils.assertOneOf)("type", "value")),
  124415. assertions: {
  124416. optional: true,
  124417. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("ImportAttribute")))
  124418. }
  124419. }
  124420. });
  124421. (0, _utils.default)("ExportDefaultDeclaration", {
  124422. visitor: ["declaration"],
  124423. aliases: ["Statement", "Declaration", "ModuleDeclaration", "ExportDeclaration"],
  124424. fields: {
  124425. declaration: {
  124426. validate: (0, _utils.assertNodeType)("FunctionDeclaration", "TSDeclareFunction", "ClassDeclaration", "Expression")
  124427. }
  124428. }
  124429. });
  124430. (0, _utils.default)("ExportNamedDeclaration", {
  124431. visitor: ["declaration", "specifiers", "source"],
  124432. aliases: ["Statement", "Declaration", "ModuleDeclaration", "ExportDeclaration"],
  124433. fields: {
  124434. declaration: {
  124435. optional: true,
  124436. validate: (0, _utils.chain)((0, _utils.assertNodeType)("Declaration"), Object.assign(function(node, key, val) {
  124437. if (!process.env.BABEL_TYPES_8_BREAKING)
  124438. return;
  124439. if (val && node.specifiers.length) {
  124440. throw new TypeError("Only declaration or specifiers is allowed on ExportNamedDeclaration");
  124441. }
  124442. }, {
  124443. oneOfNodeTypes: ["Declaration"]
  124444. }), function(node, key, val) {
  124445. if (!process.env.BABEL_TYPES_8_BREAKING)
  124446. return;
  124447. if (val && node.source) {
  124448. throw new TypeError("Cannot export a declaration from a source");
  124449. }
  124450. })
  124451. },
  124452. assertions: {
  124453. optional: true,
  124454. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("ImportAttribute")))
  124455. },
  124456. specifiers: {
  124457. default: [],
  124458. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)(function() {
  124459. const sourced = (0, _utils.assertNodeType)("ExportSpecifier", "ExportDefaultSpecifier", "ExportNamespaceSpecifier");
  124460. const sourceless = (0, _utils.assertNodeType)("ExportSpecifier");
  124461. if (!process.env.BABEL_TYPES_8_BREAKING)
  124462. return sourced;
  124463. return function(node, key, val) {
  124464. const validator = node.source ? sourced : sourceless;
  124465. validator(node, key, val);
  124466. };
  124467. }()))
  124468. },
  124469. source: {
  124470. validate: (0, _utils.assertNodeType)("StringLiteral"),
  124471. optional: true
  124472. },
  124473. exportKind: (0, _utils.validateOptional)((0, _utils.assertOneOf)("type", "value"))
  124474. }
  124475. });
  124476. (0, _utils.default)("ExportSpecifier", {
  124477. visitor: ["local", "exported"],
  124478. aliases: ["ModuleSpecifier"],
  124479. fields: {
  124480. local: {
  124481. validate: (0, _utils.assertNodeType)("Identifier")
  124482. },
  124483. exported: {
  124484. validate: (0, _utils.assertNodeType)("Identifier", "StringLiteral")
  124485. }
  124486. }
  124487. });
  124488. (0, _utils.default)("ForOfStatement", {
  124489. visitor: ["left", "right", "body"],
  124490. builder: ["left", "right", "body", "await"],
  124491. aliases: ["Scopable", "Statement", "For", "BlockParent", "Loop", "ForXStatement"],
  124492. fields: {
  124493. left: {
  124494. validate: function() {
  124495. if (!process.env.BABEL_TYPES_8_BREAKING) {
  124496. return (0, _utils.assertNodeType)("VariableDeclaration", "LVal");
  124497. }
  124498. const declaration = (0, _utils.assertNodeType)("VariableDeclaration");
  124499. const lval = (0, _utils.assertNodeType)("Identifier", "MemberExpression", "ArrayPattern", "ObjectPattern");
  124500. return function(node, key, val) {
  124501. if ((0, _is.default)("VariableDeclaration", val)) {
  124502. declaration(node, key, val);
  124503. } else {
  124504. lval(node, key, val);
  124505. }
  124506. };
  124507. }()
  124508. },
  124509. right: {
  124510. validate: (0, _utils.assertNodeType)("Expression")
  124511. },
  124512. body: {
  124513. validate: (0, _utils.assertNodeType)("Statement")
  124514. },
  124515. await: {
  124516. default: false
  124517. }
  124518. }
  124519. });
  124520. (0, _utils.default)("ImportDeclaration", {
  124521. visitor: ["specifiers", "source"],
  124522. aliases: ["Statement", "Declaration", "ModuleDeclaration"],
  124523. fields: {
  124524. assertions: {
  124525. optional: true,
  124526. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("ImportAttribute")))
  124527. },
  124528. specifiers: {
  124529. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("ImportSpecifier", "ImportDefaultSpecifier", "ImportNamespaceSpecifier")))
  124530. },
  124531. source: {
  124532. validate: (0, _utils.assertNodeType)("StringLiteral")
  124533. },
  124534. importKind: {
  124535. validate: (0, _utils.assertOneOf)("type", "typeof", "value"),
  124536. optional: true
  124537. }
  124538. }
  124539. });
  124540. (0, _utils.default)("ImportDefaultSpecifier", {
  124541. visitor: ["local"],
  124542. aliases: ["ModuleSpecifier"],
  124543. fields: {
  124544. local: {
  124545. validate: (0, _utils.assertNodeType)("Identifier")
  124546. }
  124547. }
  124548. });
  124549. (0, _utils.default)("ImportNamespaceSpecifier", {
  124550. visitor: ["local"],
  124551. aliases: ["ModuleSpecifier"],
  124552. fields: {
  124553. local: {
  124554. validate: (0, _utils.assertNodeType)("Identifier")
  124555. }
  124556. }
  124557. });
  124558. (0, _utils.default)("ImportSpecifier", {
  124559. visitor: ["local", "imported"],
  124560. aliases: ["ModuleSpecifier"],
  124561. fields: {
  124562. local: {
  124563. validate: (0, _utils.assertNodeType)("Identifier")
  124564. },
  124565. imported: {
  124566. validate: (0, _utils.assertNodeType)("Identifier", "StringLiteral")
  124567. },
  124568. importKind: {
  124569. validate: (0, _utils.assertOneOf)("type", "typeof"),
  124570. optional: true
  124571. }
  124572. }
  124573. });
  124574. (0, _utils.default)("MetaProperty", {
  124575. visitor: ["meta", "property"],
  124576. aliases: ["Expression"],
  124577. fields: {
  124578. meta: {
  124579. validate: (0, _utils.chain)((0, _utils.assertNodeType)("Identifier"), Object.assign(function(node, key, val) {
  124580. if (!process.env.BABEL_TYPES_8_BREAKING)
  124581. return;
  124582. let property;
  124583. switch (val.name) {
  124584. case "function":
  124585. property = "sent";
  124586. break;
  124587. case "new":
  124588. property = "target";
  124589. break;
  124590. case "import":
  124591. property = "meta";
  124592. break;
  124593. }
  124594. if (!(0, _is.default)("Identifier", node.property, {
  124595. name: property
  124596. })) {
  124597. throw new TypeError("Unrecognised MetaProperty");
  124598. }
  124599. }, {
  124600. oneOfNodeTypes: ["Identifier"]
  124601. }))
  124602. },
  124603. property: {
  124604. validate: (0, _utils.assertNodeType)("Identifier")
  124605. }
  124606. }
  124607. });
  124608. var classMethodOrPropertyCommon = {
  124609. abstract: {
  124610. validate: (0, _utils.assertValueType)("boolean"),
  124611. optional: true
  124612. },
  124613. accessibility: {
  124614. validate: (0, _utils.assertOneOf)("public", "private", "protected"),
  124615. optional: true
  124616. },
  124617. static: {
  124618. default: false
  124619. },
  124620. override: {
  124621. default: false
  124622. },
  124623. computed: {
  124624. default: false
  124625. },
  124626. optional: {
  124627. validate: (0, _utils.assertValueType)("boolean"),
  124628. optional: true
  124629. },
  124630. key: {
  124631. validate: (0, _utils.chain)(function() {
  124632. const normal = (0, _utils.assertNodeType)("Identifier", "StringLiteral", "NumericLiteral");
  124633. const computed = (0, _utils.assertNodeType)("Expression");
  124634. return function(node, key, val) {
  124635. const validator = node.computed ? computed : normal;
  124636. validator(node, key, val);
  124637. };
  124638. }(), (0, _utils.assertNodeType)("Identifier", "StringLiteral", "NumericLiteral", "Expression"))
  124639. }
  124640. };
  124641. exports.classMethodOrPropertyCommon = classMethodOrPropertyCommon;
  124642. var classMethodOrDeclareMethodCommon = Object.assign({}, functionCommon, classMethodOrPropertyCommon, {
  124643. params: {
  124644. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Identifier", "Pattern", "RestElement", "TSParameterProperty")))
  124645. },
  124646. kind: {
  124647. validate: (0, _utils.assertOneOf)("get", "set", "method", "constructor"),
  124648. default: "method"
  124649. },
  124650. access: {
  124651. validate: (0, _utils.chain)((0, _utils.assertValueType)("string"), (0, _utils.assertOneOf)("public", "private", "protected")),
  124652. optional: true
  124653. },
  124654. decorators: {
  124655. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Decorator"))),
  124656. optional: true
  124657. }
  124658. });
  124659. exports.classMethodOrDeclareMethodCommon = classMethodOrDeclareMethodCommon;
  124660. (0, _utils.default)("ClassMethod", {
  124661. aliases: ["Function", "Scopable", "BlockParent", "FunctionParent", "Method"],
  124662. builder: ["kind", "key", "params", "body", "computed", "static", "generator", "async"],
  124663. visitor: ["key", "params", "body", "decorators", "returnType", "typeParameters"],
  124664. fields: Object.assign({}, classMethodOrDeclareMethodCommon, functionTypeAnnotationCommon, {
  124665. body: {
  124666. validate: (0, _utils.assertNodeType)("BlockStatement")
  124667. }
  124668. })
  124669. });
  124670. (0, _utils.default)("ObjectPattern", {
  124671. visitor: ["properties", "typeAnnotation", "decorators"],
  124672. builder: ["properties"],
  124673. aliases: ["Pattern", "PatternLike", "LVal"],
  124674. fields: Object.assign({}, patternLikeCommon, {
  124675. properties: {
  124676. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("RestElement", "ObjectProperty")))
  124677. }
  124678. })
  124679. });
  124680. (0, _utils.default)("SpreadElement", {
  124681. visitor: ["argument"],
  124682. aliases: ["UnaryLike"],
  124683. deprecatedAlias: "SpreadProperty",
  124684. fields: {
  124685. argument: {
  124686. validate: (0, _utils.assertNodeType)("Expression")
  124687. }
  124688. }
  124689. });
  124690. (0, _utils.default)("Super", {
  124691. aliases: ["Expression"]
  124692. });
  124693. (0, _utils.default)("TaggedTemplateExpression", {
  124694. visitor: ["tag", "quasi"],
  124695. aliases: ["Expression"],
  124696. fields: {
  124697. tag: {
  124698. validate: (0, _utils.assertNodeType)("Expression")
  124699. },
  124700. quasi: {
  124701. validate: (0, _utils.assertNodeType)("TemplateLiteral")
  124702. },
  124703. typeParameters: {
  124704. validate: (0, _utils.assertNodeType)("TypeParameterInstantiation", "TSTypeParameterInstantiation"),
  124705. optional: true
  124706. }
  124707. }
  124708. });
  124709. (0, _utils.default)("TemplateElement", {
  124710. builder: ["value", "tail"],
  124711. fields: {
  124712. value: {
  124713. validate: (0, _utils.assertShape)({
  124714. raw: {
  124715. validate: (0, _utils.assertValueType)("string")
  124716. },
  124717. cooked: {
  124718. validate: (0, _utils.assertValueType)("string"),
  124719. optional: true
  124720. }
  124721. })
  124722. },
  124723. tail: {
  124724. default: false
  124725. }
  124726. }
  124727. });
  124728. (0, _utils.default)("TemplateLiteral", {
  124729. visitor: ["quasis", "expressions"],
  124730. aliases: ["Expression", "Literal"],
  124731. fields: {
  124732. quasis: {
  124733. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("TemplateElement")))
  124734. },
  124735. expressions: {
  124736. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Expression", "TSType")), function(node, key, val) {
  124737. if (node.quasis.length !== val.length + 1) {
  124738. throw new TypeError(`Number of ${node.type} quasis should be exactly one more than the number of expressions.
  124739. Expected ${val.length + 1} quasis but got ${node.quasis.length}`);
  124740. }
  124741. })
  124742. }
  124743. }
  124744. });
  124745. (0, _utils.default)("YieldExpression", {
  124746. builder: ["argument", "delegate"],
  124747. visitor: ["argument"],
  124748. aliases: ["Expression", "Terminatorless"],
  124749. fields: {
  124750. delegate: {
  124751. validate: (0, _utils.chain)((0, _utils.assertValueType)("boolean"), Object.assign(function(node, key, val) {
  124752. if (!process.env.BABEL_TYPES_8_BREAKING)
  124753. return;
  124754. if (val && !node.argument) {
  124755. throw new TypeError("Property delegate of YieldExpression cannot be true if there is no argument");
  124756. }
  124757. }, {
  124758. type: "boolean"
  124759. })),
  124760. default: false
  124761. },
  124762. argument: {
  124763. optional: true,
  124764. validate: (0, _utils.assertNodeType)("Expression")
  124765. }
  124766. }
  124767. });
  124768. (0, _utils.default)("AwaitExpression", {
  124769. builder: ["argument"],
  124770. visitor: ["argument"],
  124771. aliases: ["Expression", "Terminatorless"],
  124772. fields: {
  124773. argument: {
  124774. validate: (0, _utils.assertNodeType)("Expression")
  124775. }
  124776. }
  124777. });
  124778. (0, _utils.default)("Import", {
  124779. aliases: ["Expression"]
  124780. });
  124781. (0, _utils.default)("BigIntLiteral", {
  124782. builder: ["value"],
  124783. fields: {
  124784. value: {
  124785. validate: (0, _utils.assertValueType)("string")
  124786. }
  124787. },
  124788. aliases: ["Expression", "Pureish", "Literal", "Immutable"]
  124789. });
  124790. (0, _utils.default)("ExportNamespaceSpecifier", {
  124791. visitor: ["exported"],
  124792. aliases: ["ModuleSpecifier"],
  124793. fields: {
  124794. exported: {
  124795. validate: (0, _utils.assertNodeType)("Identifier")
  124796. }
  124797. }
  124798. });
  124799. (0, _utils.default)("OptionalMemberExpression", {
  124800. builder: ["object", "property", "computed", "optional"],
  124801. visitor: ["object", "property"],
  124802. aliases: ["Expression"],
  124803. fields: {
  124804. object: {
  124805. validate: (0, _utils.assertNodeType)("Expression")
  124806. },
  124807. property: {
  124808. validate: function() {
  124809. const normal = (0, _utils.assertNodeType)("Identifier");
  124810. const computed = (0, _utils.assertNodeType)("Expression");
  124811. const validator = function(node, key, val) {
  124812. const validator2 = node.computed ? computed : normal;
  124813. validator2(node, key, val);
  124814. };
  124815. validator.oneOfNodeTypes = ["Expression", "Identifier"];
  124816. return validator;
  124817. }()
  124818. },
  124819. computed: {
  124820. default: false
  124821. },
  124822. optional: {
  124823. validate: !process.env.BABEL_TYPES_8_BREAKING ? (0, _utils.assertValueType)("boolean") : (0, _utils.chain)((0, _utils.assertValueType)("boolean"), (0, _utils.assertOptionalChainStart)())
  124824. }
  124825. }
  124826. });
  124827. (0, _utils.default)("OptionalCallExpression", {
  124828. visitor: ["callee", "arguments", "typeParameters", "typeArguments"],
  124829. builder: ["callee", "arguments", "optional"],
  124830. aliases: ["Expression"],
  124831. fields: {
  124832. callee: {
  124833. validate: (0, _utils.assertNodeType)("Expression")
  124834. },
  124835. arguments: {
  124836. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Expression", "SpreadElement", "JSXNamespacedName", "ArgumentPlaceholder")))
  124837. },
  124838. optional: {
  124839. validate: !process.env.BABEL_TYPES_8_BREAKING ? (0, _utils.assertValueType)("boolean") : (0, _utils.chain)((0, _utils.assertValueType)("boolean"), (0, _utils.assertOptionalChainStart)())
  124840. },
  124841. typeArguments: {
  124842. validate: (0, _utils.assertNodeType)("TypeParameterInstantiation"),
  124843. optional: true
  124844. },
  124845. typeParameters: {
  124846. validate: (0, _utils.assertNodeType)("TSTypeParameterInstantiation"),
  124847. optional: true
  124848. }
  124849. }
  124850. });
  124851. }
  124852. });
  124853. // node_modules/@babel/template/node_modules/@babel/types/lib/definitions/flow.js
  124854. var require_flow8 = __commonJS({
  124855. "node_modules/@babel/template/node_modules/@babel/types/lib/definitions/flow.js"() {
  124856. "use strict";
  124857. var _utils = require_utils6();
  124858. var defineInterfaceishType = (name2, typeParameterType = "TypeParameterDeclaration") => {
  124859. (0, _utils.default)(name2, {
  124860. builder: ["id", "typeParameters", "extends", "body"],
  124861. visitor: ["id", "typeParameters", "extends", "mixins", "implements", "body"],
  124862. aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"],
  124863. fields: {
  124864. id: (0, _utils.validateType)("Identifier"),
  124865. typeParameters: (0, _utils.validateOptionalType)(typeParameterType),
  124866. extends: (0, _utils.validateOptional)((0, _utils.arrayOfType)("InterfaceExtends")),
  124867. mixins: (0, _utils.validateOptional)((0, _utils.arrayOfType)("InterfaceExtends")),
  124868. implements: (0, _utils.validateOptional)((0, _utils.arrayOfType)("ClassImplements")),
  124869. body: (0, _utils.validateType)("ObjectTypeAnnotation")
  124870. }
  124871. });
  124872. };
  124873. (0, _utils.default)("AnyTypeAnnotation", {
  124874. aliases: ["Flow", "FlowType", "FlowBaseAnnotation"]
  124875. });
  124876. (0, _utils.default)("ArrayTypeAnnotation", {
  124877. visitor: ["elementType"],
  124878. aliases: ["Flow", "FlowType"],
  124879. fields: {
  124880. elementType: (0, _utils.validateType)("FlowType")
  124881. }
  124882. });
  124883. (0, _utils.default)("BooleanTypeAnnotation", {
  124884. aliases: ["Flow", "FlowType", "FlowBaseAnnotation"]
  124885. });
  124886. (0, _utils.default)("BooleanLiteralTypeAnnotation", {
  124887. builder: ["value"],
  124888. aliases: ["Flow", "FlowType"],
  124889. fields: {
  124890. value: (0, _utils.validate)((0, _utils.assertValueType)("boolean"))
  124891. }
  124892. });
  124893. (0, _utils.default)("NullLiteralTypeAnnotation", {
  124894. aliases: ["Flow", "FlowType", "FlowBaseAnnotation"]
  124895. });
  124896. (0, _utils.default)("ClassImplements", {
  124897. visitor: ["id", "typeParameters"],
  124898. aliases: ["Flow"],
  124899. fields: {
  124900. id: (0, _utils.validateType)("Identifier"),
  124901. typeParameters: (0, _utils.validateOptionalType)("TypeParameterInstantiation")
  124902. }
  124903. });
  124904. defineInterfaceishType("DeclareClass");
  124905. (0, _utils.default)("DeclareFunction", {
  124906. visitor: ["id"],
  124907. aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"],
  124908. fields: {
  124909. id: (0, _utils.validateType)("Identifier"),
  124910. predicate: (0, _utils.validateOptionalType)("DeclaredPredicate")
  124911. }
  124912. });
  124913. defineInterfaceishType("DeclareInterface");
  124914. (0, _utils.default)("DeclareModule", {
  124915. builder: ["id", "body", "kind"],
  124916. visitor: ["id", "body"],
  124917. aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"],
  124918. fields: {
  124919. id: (0, _utils.validateType)(["Identifier", "StringLiteral"]),
  124920. body: (0, _utils.validateType)("BlockStatement"),
  124921. kind: (0, _utils.validateOptional)((0, _utils.assertOneOf)("CommonJS", "ES"))
  124922. }
  124923. });
  124924. (0, _utils.default)("DeclareModuleExports", {
  124925. visitor: ["typeAnnotation"],
  124926. aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"],
  124927. fields: {
  124928. typeAnnotation: (0, _utils.validateType)("TypeAnnotation")
  124929. }
  124930. });
  124931. (0, _utils.default)("DeclareTypeAlias", {
  124932. visitor: ["id", "typeParameters", "right"],
  124933. aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"],
  124934. fields: {
  124935. id: (0, _utils.validateType)("Identifier"),
  124936. typeParameters: (0, _utils.validateOptionalType)("TypeParameterDeclaration"),
  124937. right: (0, _utils.validateType)("FlowType")
  124938. }
  124939. });
  124940. (0, _utils.default)("DeclareOpaqueType", {
  124941. visitor: ["id", "typeParameters", "supertype"],
  124942. aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"],
  124943. fields: {
  124944. id: (0, _utils.validateType)("Identifier"),
  124945. typeParameters: (0, _utils.validateOptionalType)("TypeParameterDeclaration"),
  124946. supertype: (0, _utils.validateOptionalType)("FlowType")
  124947. }
  124948. });
  124949. (0, _utils.default)("DeclareVariable", {
  124950. visitor: ["id"],
  124951. aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"],
  124952. fields: {
  124953. id: (0, _utils.validateType)("Identifier")
  124954. }
  124955. });
  124956. (0, _utils.default)("DeclareExportDeclaration", {
  124957. visitor: ["declaration", "specifiers", "source"],
  124958. aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"],
  124959. fields: {
  124960. declaration: (0, _utils.validateOptionalType)("Flow"),
  124961. specifiers: (0, _utils.validateOptional)((0, _utils.arrayOfType)(["ExportSpecifier", "ExportNamespaceSpecifier"])),
  124962. source: (0, _utils.validateOptionalType)("StringLiteral"),
  124963. default: (0, _utils.validateOptional)((0, _utils.assertValueType)("boolean"))
  124964. }
  124965. });
  124966. (0, _utils.default)("DeclareExportAllDeclaration", {
  124967. visitor: ["source"],
  124968. aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"],
  124969. fields: {
  124970. source: (0, _utils.validateType)("StringLiteral"),
  124971. exportKind: (0, _utils.validateOptional)((0, _utils.assertOneOf)("type", "value"))
  124972. }
  124973. });
  124974. (0, _utils.default)("DeclaredPredicate", {
  124975. visitor: ["value"],
  124976. aliases: ["Flow", "FlowPredicate"],
  124977. fields: {
  124978. value: (0, _utils.validateType)("Flow")
  124979. }
  124980. });
  124981. (0, _utils.default)("ExistsTypeAnnotation", {
  124982. aliases: ["Flow", "FlowType"]
  124983. });
  124984. (0, _utils.default)("FunctionTypeAnnotation", {
  124985. visitor: ["typeParameters", "params", "rest", "returnType"],
  124986. aliases: ["Flow", "FlowType"],
  124987. fields: {
  124988. typeParameters: (0, _utils.validateOptionalType)("TypeParameterDeclaration"),
  124989. params: (0, _utils.validate)((0, _utils.arrayOfType)("FunctionTypeParam")),
  124990. rest: (0, _utils.validateOptionalType)("FunctionTypeParam"),
  124991. this: (0, _utils.validateOptionalType)("FunctionTypeParam"),
  124992. returnType: (0, _utils.validateType)("FlowType")
  124993. }
  124994. });
  124995. (0, _utils.default)("FunctionTypeParam", {
  124996. visitor: ["name", "typeAnnotation"],
  124997. aliases: ["Flow"],
  124998. fields: {
  124999. name: (0, _utils.validateOptionalType)("Identifier"),
  125000. typeAnnotation: (0, _utils.validateType)("FlowType"),
  125001. optional: (0, _utils.validateOptional)((0, _utils.assertValueType)("boolean"))
  125002. }
  125003. });
  125004. (0, _utils.default)("GenericTypeAnnotation", {
  125005. visitor: ["id", "typeParameters"],
  125006. aliases: ["Flow", "FlowType"],
  125007. fields: {
  125008. id: (0, _utils.validateType)(["Identifier", "QualifiedTypeIdentifier"]),
  125009. typeParameters: (0, _utils.validateOptionalType)("TypeParameterInstantiation")
  125010. }
  125011. });
  125012. (0, _utils.default)("InferredPredicate", {
  125013. aliases: ["Flow", "FlowPredicate"]
  125014. });
  125015. (0, _utils.default)("InterfaceExtends", {
  125016. visitor: ["id", "typeParameters"],
  125017. aliases: ["Flow"],
  125018. fields: {
  125019. id: (0, _utils.validateType)(["Identifier", "QualifiedTypeIdentifier"]),
  125020. typeParameters: (0, _utils.validateOptionalType)("TypeParameterInstantiation")
  125021. }
  125022. });
  125023. defineInterfaceishType("InterfaceDeclaration");
  125024. (0, _utils.default)("InterfaceTypeAnnotation", {
  125025. visitor: ["extends", "body"],
  125026. aliases: ["Flow", "FlowType"],
  125027. fields: {
  125028. extends: (0, _utils.validateOptional)((0, _utils.arrayOfType)("InterfaceExtends")),
  125029. body: (0, _utils.validateType)("ObjectTypeAnnotation")
  125030. }
  125031. });
  125032. (0, _utils.default)("IntersectionTypeAnnotation", {
  125033. visitor: ["types"],
  125034. aliases: ["Flow", "FlowType"],
  125035. fields: {
  125036. types: (0, _utils.validate)((0, _utils.arrayOfType)("FlowType"))
  125037. }
  125038. });
  125039. (0, _utils.default)("MixedTypeAnnotation", {
  125040. aliases: ["Flow", "FlowType", "FlowBaseAnnotation"]
  125041. });
  125042. (0, _utils.default)("EmptyTypeAnnotation", {
  125043. aliases: ["Flow", "FlowType", "FlowBaseAnnotation"]
  125044. });
  125045. (0, _utils.default)("NullableTypeAnnotation", {
  125046. visitor: ["typeAnnotation"],
  125047. aliases: ["Flow", "FlowType"],
  125048. fields: {
  125049. typeAnnotation: (0, _utils.validateType)("FlowType")
  125050. }
  125051. });
  125052. (0, _utils.default)("NumberLiteralTypeAnnotation", {
  125053. builder: ["value"],
  125054. aliases: ["Flow", "FlowType"],
  125055. fields: {
  125056. value: (0, _utils.validate)((0, _utils.assertValueType)("number"))
  125057. }
  125058. });
  125059. (0, _utils.default)("NumberTypeAnnotation", {
  125060. aliases: ["Flow", "FlowType", "FlowBaseAnnotation"]
  125061. });
  125062. (0, _utils.default)("ObjectTypeAnnotation", {
  125063. visitor: ["properties", "indexers", "callProperties", "internalSlots"],
  125064. aliases: ["Flow", "FlowType"],
  125065. builder: ["properties", "indexers", "callProperties", "internalSlots", "exact"],
  125066. fields: {
  125067. properties: (0, _utils.validate)((0, _utils.arrayOfType)(["ObjectTypeProperty", "ObjectTypeSpreadProperty"])),
  125068. indexers: (0, _utils.validateOptional)((0, _utils.arrayOfType)("ObjectTypeIndexer")),
  125069. callProperties: (0, _utils.validateOptional)((0, _utils.arrayOfType)("ObjectTypeCallProperty")),
  125070. internalSlots: (0, _utils.validateOptional)((0, _utils.arrayOfType)("ObjectTypeInternalSlot")),
  125071. exact: {
  125072. validate: (0, _utils.assertValueType)("boolean"),
  125073. default: false
  125074. },
  125075. inexact: (0, _utils.validateOptional)((0, _utils.assertValueType)("boolean"))
  125076. }
  125077. });
  125078. (0, _utils.default)("ObjectTypeInternalSlot", {
  125079. visitor: ["id", "value", "optional", "static", "method"],
  125080. aliases: ["Flow", "UserWhitespacable"],
  125081. fields: {
  125082. id: (0, _utils.validateType)("Identifier"),
  125083. value: (0, _utils.validateType)("FlowType"),
  125084. optional: (0, _utils.validate)((0, _utils.assertValueType)("boolean")),
  125085. static: (0, _utils.validate)((0, _utils.assertValueType)("boolean")),
  125086. method: (0, _utils.validate)((0, _utils.assertValueType)("boolean"))
  125087. }
  125088. });
  125089. (0, _utils.default)("ObjectTypeCallProperty", {
  125090. visitor: ["value"],
  125091. aliases: ["Flow", "UserWhitespacable"],
  125092. fields: {
  125093. value: (0, _utils.validateType)("FlowType"),
  125094. static: (0, _utils.validate)((0, _utils.assertValueType)("boolean"))
  125095. }
  125096. });
  125097. (0, _utils.default)("ObjectTypeIndexer", {
  125098. visitor: ["id", "key", "value", "variance"],
  125099. aliases: ["Flow", "UserWhitespacable"],
  125100. fields: {
  125101. id: (0, _utils.validateOptionalType)("Identifier"),
  125102. key: (0, _utils.validateType)("FlowType"),
  125103. value: (0, _utils.validateType)("FlowType"),
  125104. static: (0, _utils.validate)((0, _utils.assertValueType)("boolean")),
  125105. variance: (0, _utils.validateOptionalType)("Variance")
  125106. }
  125107. });
  125108. (0, _utils.default)("ObjectTypeProperty", {
  125109. visitor: ["key", "value", "variance"],
  125110. aliases: ["Flow", "UserWhitespacable"],
  125111. fields: {
  125112. key: (0, _utils.validateType)(["Identifier", "StringLiteral"]),
  125113. value: (0, _utils.validateType)("FlowType"),
  125114. kind: (0, _utils.validate)((0, _utils.assertOneOf)("init", "get", "set")),
  125115. static: (0, _utils.validate)((0, _utils.assertValueType)("boolean")),
  125116. proto: (0, _utils.validate)((0, _utils.assertValueType)("boolean")),
  125117. optional: (0, _utils.validate)((0, _utils.assertValueType)("boolean")),
  125118. variance: (0, _utils.validateOptionalType)("Variance"),
  125119. method: (0, _utils.validate)((0, _utils.assertValueType)("boolean"))
  125120. }
  125121. });
  125122. (0, _utils.default)("ObjectTypeSpreadProperty", {
  125123. visitor: ["argument"],
  125124. aliases: ["Flow", "UserWhitespacable"],
  125125. fields: {
  125126. argument: (0, _utils.validateType)("FlowType")
  125127. }
  125128. });
  125129. (0, _utils.default)("OpaqueType", {
  125130. visitor: ["id", "typeParameters", "supertype", "impltype"],
  125131. aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"],
  125132. fields: {
  125133. id: (0, _utils.validateType)("Identifier"),
  125134. typeParameters: (0, _utils.validateOptionalType)("TypeParameterDeclaration"),
  125135. supertype: (0, _utils.validateOptionalType)("FlowType"),
  125136. impltype: (0, _utils.validateType)("FlowType")
  125137. }
  125138. });
  125139. (0, _utils.default)("QualifiedTypeIdentifier", {
  125140. visitor: ["id", "qualification"],
  125141. aliases: ["Flow"],
  125142. fields: {
  125143. id: (0, _utils.validateType)("Identifier"),
  125144. qualification: (0, _utils.validateType)(["Identifier", "QualifiedTypeIdentifier"])
  125145. }
  125146. });
  125147. (0, _utils.default)("StringLiteralTypeAnnotation", {
  125148. builder: ["value"],
  125149. aliases: ["Flow", "FlowType"],
  125150. fields: {
  125151. value: (0, _utils.validate)((0, _utils.assertValueType)("string"))
  125152. }
  125153. });
  125154. (0, _utils.default)("StringTypeAnnotation", {
  125155. aliases: ["Flow", "FlowType", "FlowBaseAnnotation"]
  125156. });
  125157. (0, _utils.default)("SymbolTypeAnnotation", {
  125158. aliases: ["Flow", "FlowType", "FlowBaseAnnotation"]
  125159. });
  125160. (0, _utils.default)("ThisTypeAnnotation", {
  125161. aliases: ["Flow", "FlowType", "FlowBaseAnnotation"]
  125162. });
  125163. (0, _utils.default)("TupleTypeAnnotation", {
  125164. visitor: ["types"],
  125165. aliases: ["Flow", "FlowType"],
  125166. fields: {
  125167. types: (0, _utils.validate)((0, _utils.arrayOfType)("FlowType"))
  125168. }
  125169. });
  125170. (0, _utils.default)("TypeofTypeAnnotation", {
  125171. visitor: ["argument"],
  125172. aliases: ["Flow", "FlowType"],
  125173. fields: {
  125174. argument: (0, _utils.validateType)("FlowType")
  125175. }
  125176. });
  125177. (0, _utils.default)("TypeAlias", {
  125178. visitor: ["id", "typeParameters", "right"],
  125179. aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"],
  125180. fields: {
  125181. id: (0, _utils.validateType)("Identifier"),
  125182. typeParameters: (0, _utils.validateOptionalType)("TypeParameterDeclaration"),
  125183. right: (0, _utils.validateType)("FlowType")
  125184. }
  125185. });
  125186. (0, _utils.default)("TypeAnnotation", {
  125187. aliases: ["Flow"],
  125188. visitor: ["typeAnnotation"],
  125189. fields: {
  125190. typeAnnotation: (0, _utils.validateType)("FlowType")
  125191. }
  125192. });
  125193. (0, _utils.default)("TypeCastExpression", {
  125194. visitor: ["expression", "typeAnnotation"],
  125195. aliases: ["Flow", "ExpressionWrapper", "Expression"],
  125196. fields: {
  125197. expression: (0, _utils.validateType)("Expression"),
  125198. typeAnnotation: (0, _utils.validateType)("TypeAnnotation")
  125199. }
  125200. });
  125201. (0, _utils.default)("TypeParameter", {
  125202. aliases: ["Flow"],
  125203. visitor: ["bound", "default", "variance"],
  125204. fields: {
  125205. name: (0, _utils.validate)((0, _utils.assertValueType)("string")),
  125206. bound: (0, _utils.validateOptionalType)("TypeAnnotation"),
  125207. default: (0, _utils.validateOptionalType)("FlowType"),
  125208. variance: (0, _utils.validateOptionalType)("Variance")
  125209. }
  125210. });
  125211. (0, _utils.default)("TypeParameterDeclaration", {
  125212. aliases: ["Flow"],
  125213. visitor: ["params"],
  125214. fields: {
  125215. params: (0, _utils.validate)((0, _utils.arrayOfType)("TypeParameter"))
  125216. }
  125217. });
  125218. (0, _utils.default)("TypeParameterInstantiation", {
  125219. aliases: ["Flow"],
  125220. visitor: ["params"],
  125221. fields: {
  125222. params: (0, _utils.validate)((0, _utils.arrayOfType)("FlowType"))
  125223. }
  125224. });
  125225. (0, _utils.default)("UnionTypeAnnotation", {
  125226. visitor: ["types"],
  125227. aliases: ["Flow", "FlowType"],
  125228. fields: {
  125229. types: (0, _utils.validate)((0, _utils.arrayOfType)("FlowType"))
  125230. }
  125231. });
  125232. (0, _utils.default)("Variance", {
  125233. aliases: ["Flow"],
  125234. builder: ["kind"],
  125235. fields: {
  125236. kind: (0, _utils.validate)((0, _utils.assertOneOf)("minus", "plus"))
  125237. }
  125238. });
  125239. (0, _utils.default)("VoidTypeAnnotation", {
  125240. aliases: ["Flow", "FlowType", "FlowBaseAnnotation"]
  125241. });
  125242. (0, _utils.default)("EnumDeclaration", {
  125243. aliases: ["Statement", "Declaration"],
  125244. visitor: ["id", "body"],
  125245. fields: {
  125246. id: (0, _utils.validateType)("Identifier"),
  125247. body: (0, _utils.validateType)(["EnumBooleanBody", "EnumNumberBody", "EnumStringBody", "EnumSymbolBody"])
  125248. }
  125249. });
  125250. (0, _utils.default)("EnumBooleanBody", {
  125251. aliases: ["EnumBody"],
  125252. visitor: ["members"],
  125253. fields: {
  125254. explicitType: (0, _utils.validate)((0, _utils.assertValueType)("boolean")),
  125255. members: (0, _utils.validateArrayOfType)("EnumBooleanMember"),
  125256. hasUnknownMembers: (0, _utils.validate)((0, _utils.assertValueType)("boolean"))
  125257. }
  125258. });
  125259. (0, _utils.default)("EnumNumberBody", {
  125260. aliases: ["EnumBody"],
  125261. visitor: ["members"],
  125262. fields: {
  125263. explicitType: (0, _utils.validate)((0, _utils.assertValueType)("boolean")),
  125264. members: (0, _utils.validateArrayOfType)("EnumNumberMember"),
  125265. hasUnknownMembers: (0, _utils.validate)((0, _utils.assertValueType)("boolean"))
  125266. }
  125267. });
  125268. (0, _utils.default)("EnumStringBody", {
  125269. aliases: ["EnumBody"],
  125270. visitor: ["members"],
  125271. fields: {
  125272. explicitType: (0, _utils.validate)((0, _utils.assertValueType)("boolean")),
  125273. members: (0, _utils.validateArrayOfType)(["EnumStringMember", "EnumDefaultedMember"]),
  125274. hasUnknownMembers: (0, _utils.validate)((0, _utils.assertValueType)("boolean"))
  125275. }
  125276. });
  125277. (0, _utils.default)("EnumSymbolBody", {
  125278. aliases: ["EnumBody"],
  125279. visitor: ["members"],
  125280. fields: {
  125281. members: (0, _utils.validateArrayOfType)("EnumDefaultedMember"),
  125282. hasUnknownMembers: (0, _utils.validate)((0, _utils.assertValueType)("boolean"))
  125283. }
  125284. });
  125285. (0, _utils.default)("EnumBooleanMember", {
  125286. aliases: ["EnumMember"],
  125287. visitor: ["id"],
  125288. fields: {
  125289. id: (0, _utils.validateType)("Identifier"),
  125290. init: (0, _utils.validateType)("BooleanLiteral")
  125291. }
  125292. });
  125293. (0, _utils.default)("EnumNumberMember", {
  125294. aliases: ["EnumMember"],
  125295. visitor: ["id", "init"],
  125296. fields: {
  125297. id: (0, _utils.validateType)("Identifier"),
  125298. init: (0, _utils.validateType)("NumericLiteral")
  125299. }
  125300. });
  125301. (0, _utils.default)("EnumStringMember", {
  125302. aliases: ["EnumMember"],
  125303. visitor: ["id", "init"],
  125304. fields: {
  125305. id: (0, _utils.validateType)("Identifier"),
  125306. init: (0, _utils.validateType)("StringLiteral")
  125307. }
  125308. });
  125309. (0, _utils.default)("EnumDefaultedMember", {
  125310. aliases: ["EnumMember"],
  125311. visitor: ["id"],
  125312. fields: {
  125313. id: (0, _utils.validateType)("Identifier")
  125314. }
  125315. });
  125316. (0, _utils.default)("IndexedAccessType", {
  125317. visitor: ["objectType", "indexType"],
  125318. aliases: ["Flow", "FlowType"],
  125319. fields: {
  125320. objectType: (0, _utils.validateType)("FlowType"),
  125321. indexType: (0, _utils.validateType)("FlowType")
  125322. }
  125323. });
  125324. (0, _utils.default)("OptionalIndexedAccessType", {
  125325. visitor: ["objectType", "indexType"],
  125326. aliases: ["Flow", "FlowType"],
  125327. fields: {
  125328. objectType: (0, _utils.validateType)("FlowType"),
  125329. indexType: (0, _utils.validateType)("FlowType"),
  125330. optional: (0, _utils.validate)((0, _utils.assertValueType)("boolean"))
  125331. }
  125332. });
  125333. }
  125334. });
  125335. // node_modules/@babel/template/node_modules/@babel/types/lib/definitions/jsx.js
  125336. var require_jsx8 = __commonJS({
  125337. "node_modules/@babel/template/node_modules/@babel/types/lib/definitions/jsx.js"() {
  125338. "use strict";
  125339. var _utils = require_utils6();
  125340. (0, _utils.default)("JSXAttribute", {
  125341. visitor: ["name", "value"],
  125342. aliases: ["JSX", "Immutable"],
  125343. fields: {
  125344. name: {
  125345. validate: (0, _utils.assertNodeType)("JSXIdentifier", "JSXNamespacedName")
  125346. },
  125347. value: {
  125348. optional: true,
  125349. validate: (0, _utils.assertNodeType)("JSXElement", "JSXFragment", "StringLiteral", "JSXExpressionContainer")
  125350. }
  125351. }
  125352. });
  125353. (0, _utils.default)("JSXClosingElement", {
  125354. visitor: ["name"],
  125355. aliases: ["JSX", "Immutable"],
  125356. fields: {
  125357. name: {
  125358. validate: (0, _utils.assertNodeType)("JSXIdentifier", "JSXMemberExpression", "JSXNamespacedName")
  125359. }
  125360. }
  125361. });
  125362. (0, _utils.default)("JSXElement", {
  125363. builder: ["openingElement", "closingElement", "children", "selfClosing"],
  125364. visitor: ["openingElement", "children", "closingElement"],
  125365. aliases: ["JSX", "Immutable", "Expression"],
  125366. fields: {
  125367. openingElement: {
  125368. validate: (0, _utils.assertNodeType)("JSXOpeningElement")
  125369. },
  125370. closingElement: {
  125371. optional: true,
  125372. validate: (0, _utils.assertNodeType)("JSXClosingElement")
  125373. },
  125374. children: {
  125375. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("JSXText", "JSXExpressionContainer", "JSXSpreadChild", "JSXElement", "JSXFragment")))
  125376. },
  125377. selfClosing: {
  125378. validate: (0, _utils.assertValueType)("boolean"),
  125379. optional: true
  125380. }
  125381. }
  125382. });
  125383. (0, _utils.default)("JSXEmptyExpression", {
  125384. aliases: ["JSX"]
  125385. });
  125386. (0, _utils.default)("JSXExpressionContainer", {
  125387. visitor: ["expression"],
  125388. aliases: ["JSX", "Immutable"],
  125389. fields: {
  125390. expression: {
  125391. validate: (0, _utils.assertNodeType)("Expression", "JSXEmptyExpression")
  125392. }
  125393. }
  125394. });
  125395. (0, _utils.default)("JSXSpreadChild", {
  125396. visitor: ["expression"],
  125397. aliases: ["JSX", "Immutable"],
  125398. fields: {
  125399. expression: {
  125400. validate: (0, _utils.assertNodeType)("Expression")
  125401. }
  125402. }
  125403. });
  125404. (0, _utils.default)("JSXIdentifier", {
  125405. builder: ["name"],
  125406. aliases: ["JSX"],
  125407. fields: {
  125408. name: {
  125409. validate: (0, _utils.assertValueType)("string")
  125410. }
  125411. }
  125412. });
  125413. (0, _utils.default)("JSXMemberExpression", {
  125414. visitor: ["object", "property"],
  125415. aliases: ["JSX"],
  125416. fields: {
  125417. object: {
  125418. validate: (0, _utils.assertNodeType)("JSXMemberExpression", "JSXIdentifier")
  125419. },
  125420. property: {
  125421. validate: (0, _utils.assertNodeType)("JSXIdentifier")
  125422. }
  125423. }
  125424. });
  125425. (0, _utils.default)("JSXNamespacedName", {
  125426. visitor: ["namespace", "name"],
  125427. aliases: ["JSX"],
  125428. fields: {
  125429. namespace: {
  125430. validate: (0, _utils.assertNodeType)("JSXIdentifier")
  125431. },
  125432. name: {
  125433. validate: (0, _utils.assertNodeType)("JSXIdentifier")
  125434. }
  125435. }
  125436. });
  125437. (0, _utils.default)("JSXOpeningElement", {
  125438. builder: ["name", "attributes", "selfClosing"],
  125439. visitor: ["name", "attributes"],
  125440. aliases: ["JSX", "Immutable"],
  125441. fields: {
  125442. name: {
  125443. validate: (0, _utils.assertNodeType)("JSXIdentifier", "JSXMemberExpression", "JSXNamespacedName")
  125444. },
  125445. selfClosing: {
  125446. default: false
  125447. },
  125448. attributes: {
  125449. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("JSXAttribute", "JSXSpreadAttribute")))
  125450. },
  125451. typeParameters: {
  125452. validate: (0, _utils.assertNodeType)("TypeParameterInstantiation", "TSTypeParameterInstantiation"),
  125453. optional: true
  125454. }
  125455. }
  125456. });
  125457. (0, _utils.default)("JSXSpreadAttribute", {
  125458. visitor: ["argument"],
  125459. aliases: ["JSX"],
  125460. fields: {
  125461. argument: {
  125462. validate: (0, _utils.assertNodeType)("Expression")
  125463. }
  125464. }
  125465. });
  125466. (0, _utils.default)("JSXText", {
  125467. aliases: ["JSX", "Immutable"],
  125468. builder: ["value"],
  125469. fields: {
  125470. value: {
  125471. validate: (0, _utils.assertValueType)("string")
  125472. }
  125473. }
  125474. });
  125475. (0, _utils.default)("JSXFragment", {
  125476. builder: ["openingFragment", "closingFragment", "children"],
  125477. visitor: ["openingFragment", "children", "closingFragment"],
  125478. aliases: ["JSX", "Immutable", "Expression"],
  125479. fields: {
  125480. openingFragment: {
  125481. validate: (0, _utils.assertNodeType)("JSXOpeningFragment")
  125482. },
  125483. closingFragment: {
  125484. validate: (0, _utils.assertNodeType)("JSXClosingFragment")
  125485. },
  125486. children: {
  125487. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("JSXText", "JSXExpressionContainer", "JSXSpreadChild", "JSXElement", "JSXFragment")))
  125488. }
  125489. }
  125490. });
  125491. (0, _utils.default)("JSXOpeningFragment", {
  125492. aliases: ["JSX", "Immutable"]
  125493. });
  125494. (0, _utils.default)("JSXClosingFragment", {
  125495. aliases: ["JSX", "Immutable"]
  125496. });
  125497. }
  125498. });
  125499. // node_modules/@babel/template/node_modules/@babel/types/lib/definitions/placeholders.js
  125500. var require_placeholders6 = __commonJS({
  125501. "node_modules/@babel/template/node_modules/@babel/types/lib/definitions/placeholders.js"(exports) {
  125502. "use strict";
  125503. Object.defineProperty(exports, "__esModule", {
  125504. value: true
  125505. });
  125506. exports.PLACEHOLDERS_FLIPPED_ALIAS = exports.PLACEHOLDERS_ALIAS = exports.PLACEHOLDERS = void 0;
  125507. var _utils = require_utils6();
  125508. var PLACEHOLDERS = ["Identifier", "StringLiteral", "Expression", "Statement", "Declaration", "BlockStatement", "ClassBody", "Pattern"];
  125509. exports.PLACEHOLDERS = PLACEHOLDERS;
  125510. var PLACEHOLDERS_ALIAS = {
  125511. Declaration: ["Statement"],
  125512. Pattern: ["PatternLike", "LVal"]
  125513. };
  125514. exports.PLACEHOLDERS_ALIAS = PLACEHOLDERS_ALIAS;
  125515. for (const type of PLACEHOLDERS) {
  125516. const alias = _utils.ALIAS_KEYS[type];
  125517. if (alias != null && alias.length)
  125518. PLACEHOLDERS_ALIAS[type] = alias;
  125519. }
  125520. var PLACEHOLDERS_FLIPPED_ALIAS = {};
  125521. exports.PLACEHOLDERS_FLIPPED_ALIAS = PLACEHOLDERS_FLIPPED_ALIAS;
  125522. Object.keys(PLACEHOLDERS_ALIAS).forEach((type) => {
  125523. PLACEHOLDERS_ALIAS[type].forEach((alias) => {
  125524. if (!Object.hasOwnProperty.call(PLACEHOLDERS_FLIPPED_ALIAS, alias)) {
  125525. PLACEHOLDERS_FLIPPED_ALIAS[alias] = [];
  125526. }
  125527. PLACEHOLDERS_FLIPPED_ALIAS[alias].push(type);
  125528. });
  125529. });
  125530. }
  125531. });
  125532. // node_modules/@babel/template/node_modules/@babel/types/lib/definitions/misc.js
  125533. var require_misc6 = __commonJS({
  125534. "node_modules/@babel/template/node_modules/@babel/types/lib/definitions/misc.js"() {
  125535. "use strict";
  125536. var _utils = require_utils6();
  125537. var _placeholders = require_placeholders6();
  125538. {
  125539. (0, _utils.default)("Noop", {
  125540. visitor: []
  125541. });
  125542. }
  125543. (0, _utils.default)("Placeholder", {
  125544. visitor: [],
  125545. builder: ["expectedNode", "name"],
  125546. fields: {
  125547. name: {
  125548. validate: (0, _utils.assertNodeType)("Identifier")
  125549. },
  125550. expectedNode: {
  125551. validate: (0, _utils.assertOneOf)(..._placeholders.PLACEHOLDERS)
  125552. }
  125553. }
  125554. });
  125555. (0, _utils.default)("V8IntrinsicIdentifier", {
  125556. builder: ["name"],
  125557. fields: {
  125558. name: {
  125559. validate: (0, _utils.assertValueType)("string")
  125560. }
  125561. }
  125562. });
  125563. }
  125564. });
  125565. // node_modules/@babel/template/node_modules/@babel/types/lib/definitions/experimental.js
  125566. var require_experimental6 = __commonJS({
  125567. "node_modules/@babel/template/node_modules/@babel/types/lib/definitions/experimental.js"() {
  125568. "use strict";
  125569. var _utils = require_utils6();
  125570. var _core = require_core6();
  125571. (0, _utils.default)("ArgumentPlaceholder", {});
  125572. (0, _utils.default)("BindExpression", {
  125573. visitor: ["object", "callee"],
  125574. aliases: ["Expression"],
  125575. fields: !process.env.BABEL_TYPES_8_BREAKING ? {
  125576. object: {
  125577. validate: Object.assign(() => {
  125578. }, {
  125579. oneOfNodeTypes: ["Expression"]
  125580. })
  125581. },
  125582. callee: {
  125583. validate: Object.assign(() => {
  125584. }, {
  125585. oneOfNodeTypes: ["Expression"]
  125586. })
  125587. }
  125588. } : {
  125589. object: {
  125590. validate: (0, _utils.assertNodeType)("Expression")
  125591. },
  125592. callee: {
  125593. validate: (0, _utils.assertNodeType)("Expression")
  125594. }
  125595. }
  125596. });
  125597. (0, _utils.default)("ClassProperty", {
  125598. visitor: ["key", "value", "typeAnnotation", "decorators"],
  125599. builder: ["key", "value", "typeAnnotation", "decorators", "computed", "static"],
  125600. aliases: ["Property"],
  125601. fields: Object.assign({}, _core.classMethodOrPropertyCommon, {
  125602. value: {
  125603. validate: (0, _utils.assertNodeType)("Expression"),
  125604. optional: true
  125605. },
  125606. definite: {
  125607. validate: (0, _utils.assertValueType)("boolean"),
  125608. optional: true
  125609. },
  125610. typeAnnotation: {
  125611. validate: (0, _utils.assertNodeType)("TypeAnnotation", "TSTypeAnnotation", "Noop"),
  125612. optional: true
  125613. },
  125614. decorators: {
  125615. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Decorator"))),
  125616. optional: true
  125617. },
  125618. readonly: {
  125619. validate: (0, _utils.assertValueType)("boolean"),
  125620. optional: true
  125621. },
  125622. declare: {
  125623. validate: (0, _utils.assertValueType)("boolean"),
  125624. optional: true
  125625. }
  125626. })
  125627. });
  125628. (0, _utils.default)("PipelineTopicExpression", {
  125629. builder: ["expression"],
  125630. visitor: ["expression"],
  125631. fields: {
  125632. expression: {
  125633. validate: (0, _utils.assertNodeType)("Expression")
  125634. }
  125635. }
  125636. });
  125637. (0, _utils.default)("PipelineBareFunction", {
  125638. builder: ["callee"],
  125639. visitor: ["callee"],
  125640. fields: {
  125641. callee: {
  125642. validate: (0, _utils.assertNodeType)("Expression")
  125643. }
  125644. }
  125645. });
  125646. (0, _utils.default)("PipelinePrimaryTopicReference", {
  125647. aliases: ["Expression"]
  125648. });
  125649. (0, _utils.default)("ClassPrivateProperty", {
  125650. visitor: ["key", "value", "decorators"],
  125651. builder: ["key", "value", "decorators", "static"],
  125652. aliases: ["Property", "Private"],
  125653. fields: {
  125654. key: {
  125655. validate: (0, _utils.assertNodeType)("PrivateName")
  125656. },
  125657. value: {
  125658. validate: (0, _utils.assertNodeType)("Expression"),
  125659. optional: true
  125660. },
  125661. typeAnnotation: {
  125662. validate: (0, _utils.assertNodeType)("TypeAnnotation", "TSTypeAnnotation", "Noop"),
  125663. optional: true
  125664. },
  125665. decorators: {
  125666. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Decorator"))),
  125667. optional: true
  125668. }
  125669. }
  125670. });
  125671. (0, _utils.default)("ClassPrivateMethod", {
  125672. builder: ["kind", "key", "params", "body", "static"],
  125673. visitor: ["key", "params", "body", "decorators", "returnType", "typeParameters"],
  125674. aliases: ["Function", "Scopable", "BlockParent", "FunctionParent", "Method", "Private"],
  125675. fields: Object.assign({}, _core.classMethodOrDeclareMethodCommon, _core.functionTypeAnnotationCommon, {
  125676. key: {
  125677. validate: (0, _utils.assertNodeType)("PrivateName")
  125678. },
  125679. body: {
  125680. validate: (0, _utils.assertNodeType)("BlockStatement")
  125681. }
  125682. })
  125683. });
  125684. (0, _utils.default)("ImportAttribute", {
  125685. visitor: ["key", "value"],
  125686. fields: {
  125687. key: {
  125688. validate: (0, _utils.assertNodeType)("Identifier", "StringLiteral")
  125689. },
  125690. value: {
  125691. validate: (0, _utils.assertNodeType)("StringLiteral")
  125692. }
  125693. }
  125694. });
  125695. (0, _utils.default)("Decorator", {
  125696. visitor: ["expression"],
  125697. fields: {
  125698. expression: {
  125699. validate: (0, _utils.assertNodeType)("Expression")
  125700. }
  125701. }
  125702. });
  125703. (0, _utils.default)("DoExpression", {
  125704. visitor: ["body"],
  125705. builder: ["body", "async"],
  125706. aliases: ["Expression"],
  125707. fields: {
  125708. body: {
  125709. validate: (0, _utils.assertNodeType)("BlockStatement")
  125710. },
  125711. async: {
  125712. validate: (0, _utils.assertValueType)("boolean"),
  125713. default: false
  125714. }
  125715. }
  125716. });
  125717. (0, _utils.default)("ExportDefaultSpecifier", {
  125718. visitor: ["exported"],
  125719. aliases: ["ModuleSpecifier"],
  125720. fields: {
  125721. exported: {
  125722. validate: (0, _utils.assertNodeType)("Identifier")
  125723. }
  125724. }
  125725. });
  125726. (0, _utils.default)("PrivateName", {
  125727. visitor: ["id"],
  125728. aliases: ["Private"],
  125729. fields: {
  125730. id: {
  125731. validate: (0, _utils.assertNodeType)("Identifier")
  125732. }
  125733. }
  125734. });
  125735. (0, _utils.default)("RecordExpression", {
  125736. visitor: ["properties"],
  125737. aliases: ["Expression"],
  125738. fields: {
  125739. properties: {
  125740. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("ObjectProperty", "SpreadElement")))
  125741. }
  125742. }
  125743. });
  125744. (0, _utils.default)("TupleExpression", {
  125745. fields: {
  125746. elements: {
  125747. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Expression", "SpreadElement"))),
  125748. default: []
  125749. }
  125750. },
  125751. visitor: ["elements"],
  125752. aliases: ["Expression"]
  125753. });
  125754. (0, _utils.default)("DecimalLiteral", {
  125755. builder: ["value"],
  125756. fields: {
  125757. value: {
  125758. validate: (0, _utils.assertValueType)("string")
  125759. }
  125760. },
  125761. aliases: ["Expression", "Pureish", "Literal", "Immutable"]
  125762. });
  125763. (0, _utils.default)("StaticBlock", {
  125764. visitor: ["body"],
  125765. fields: {
  125766. body: {
  125767. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Statement")))
  125768. }
  125769. },
  125770. aliases: ["Scopable", "BlockParent"]
  125771. });
  125772. (0, _utils.default)("ModuleExpression", {
  125773. visitor: ["body"],
  125774. fields: {
  125775. body: {
  125776. validate: (0, _utils.assertNodeType)("Program")
  125777. }
  125778. },
  125779. aliases: ["Expression"]
  125780. });
  125781. }
  125782. });
  125783. // node_modules/@babel/template/node_modules/@babel/types/lib/definitions/typescript.js
  125784. var require_typescript8 = __commonJS({
  125785. "node_modules/@babel/template/node_modules/@babel/types/lib/definitions/typescript.js"() {
  125786. "use strict";
  125787. var _utils = require_utils6();
  125788. var _core = require_core6();
  125789. var bool = (0, _utils.assertValueType)("boolean");
  125790. var tSFunctionTypeAnnotationCommon = {
  125791. returnType: {
  125792. validate: (0, _utils.assertNodeType)("TSTypeAnnotation", "Noop"),
  125793. optional: true
  125794. },
  125795. typeParameters: {
  125796. validate: (0, _utils.assertNodeType)("TSTypeParameterDeclaration", "Noop"),
  125797. optional: true
  125798. }
  125799. };
  125800. (0, _utils.default)("TSParameterProperty", {
  125801. aliases: ["LVal"],
  125802. visitor: ["parameter"],
  125803. fields: {
  125804. accessibility: {
  125805. validate: (0, _utils.assertOneOf)("public", "private", "protected"),
  125806. optional: true
  125807. },
  125808. readonly: {
  125809. validate: (0, _utils.assertValueType)("boolean"),
  125810. optional: true
  125811. },
  125812. parameter: {
  125813. validate: (0, _utils.assertNodeType)("Identifier", "AssignmentPattern")
  125814. }
  125815. }
  125816. });
  125817. (0, _utils.default)("TSDeclareFunction", {
  125818. aliases: ["Statement", "Declaration"],
  125819. visitor: ["id", "typeParameters", "params", "returnType"],
  125820. fields: Object.assign({}, _core.functionDeclarationCommon, tSFunctionTypeAnnotationCommon)
  125821. });
  125822. (0, _utils.default)("TSDeclareMethod", {
  125823. visitor: ["decorators", "key", "typeParameters", "params", "returnType"],
  125824. fields: Object.assign({}, _core.classMethodOrDeclareMethodCommon, tSFunctionTypeAnnotationCommon)
  125825. });
  125826. (0, _utils.default)("TSQualifiedName", {
  125827. aliases: ["TSEntityName"],
  125828. visitor: ["left", "right"],
  125829. fields: {
  125830. left: (0, _utils.validateType)("TSEntityName"),
  125831. right: (0, _utils.validateType)("Identifier")
  125832. }
  125833. });
  125834. var signatureDeclarationCommon = {
  125835. typeParameters: (0, _utils.validateOptionalType)("TSTypeParameterDeclaration"),
  125836. parameters: (0, _utils.validateArrayOfType)(["Identifier", "RestElement"]),
  125837. typeAnnotation: (0, _utils.validateOptionalType)("TSTypeAnnotation")
  125838. };
  125839. var callConstructSignatureDeclaration = {
  125840. aliases: ["TSTypeElement"],
  125841. visitor: ["typeParameters", "parameters", "typeAnnotation"],
  125842. fields: signatureDeclarationCommon
  125843. };
  125844. (0, _utils.default)("TSCallSignatureDeclaration", callConstructSignatureDeclaration);
  125845. (0, _utils.default)("TSConstructSignatureDeclaration", callConstructSignatureDeclaration);
  125846. var namedTypeElementCommon = {
  125847. key: (0, _utils.validateType)("Expression"),
  125848. computed: (0, _utils.validate)(bool),
  125849. optional: (0, _utils.validateOptional)(bool)
  125850. };
  125851. (0, _utils.default)("TSPropertySignature", {
  125852. aliases: ["TSTypeElement"],
  125853. visitor: ["key", "typeAnnotation", "initializer"],
  125854. fields: Object.assign({}, namedTypeElementCommon, {
  125855. readonly: (0, _utils.validateOptional)(bool),
  125856. typeAnnotation: (0, _utils.validateOptionalType)("TSTypeAnnotation"),
  125857. initializer: (0, _utils.validateOptionalType)("Expression")
  125858. })
  125859. });
  125860. (0, _utils.default)("TSMethodSignature", {
  125861. aliases: ["TSTypeElement"],
  125862. visitor: ["key", "typeParameters", "parameters", "typeAnnotation"],
  125863. fields: Object.assign({}, signatureDeclarationCommon, namedTypeElementCommon, {
  125864. kind: {
  125865. validate: (0, _utils.assertOneOf)("method", "get", "set")
  125866. }
  125867. })
  125868. });
  125869. (0, _utils.default)("TSIndexSignature", {
  125870. aliases: ["TSTypeElement"],
  125871. visitor: ["parameters", "typeAnnotation"],
  125872. fields: {
  125873. readonly: (0, _utils.validateOptional)(bool),
  125874. static: (0, _utils.validateOptional)(bool),
  125875. parameters: (0, _utils.validateArrayOfType)("Identifier"),
  125876. typeAnnotation: (0, _utils.validateOptionalType)("TSTypeAnnotation")
  125877. }
  125878. });
  125879. var tsKeywordTypes = ["TSAnyKeyword", "TSBooleanKeyword", "TSBigIntKeyword", "TSIntrinsicKeyword", "TSNeverKeyword", "TSNullKeyword", "TSNumberKeyword", "TSObjectKeyword", "TSStringKeyword", "TSSymbolKeyword", "TSUndefinedKeyword", "TSUnknownKeyword", "TSVoidKeyword"];
  125880. for (const type of tsKeywordTypes) {
  125881. (0, _utils.default)(type, {
  125882. aliases: ["TSType", "TSBaseType"],
  125883. visitor: [],
  125884. fields: {}
  125885. });
  125886. }
  125887. (0, _utils.default)("TSThisType", {
  125888. aliases: ["TSType", "TSBaseType"],
  125889. visitor: [],
  125890. fields: {}
  125891. });
  125892. var fnOrCtrBase = {
  125893. aliases: ["TSType"],
  125894. visitor: ["typeParameters", "parameters", "typeAnnotation"]
  125895. };
  125896. (0, _utils.default)("TSFunctionType", Object.assign({}, fnOrCtrBase, {
  125897. fields: signatureDeclarationCommon
  125898. }));
  125899. (0, _utils.default)("TSConstructorType", Object.assign({}, fnOrCtrBase, {
  125900. fields: Object.assign({}, signatureDeclarationCommon, {
  125901. abstract: (0, _utils.validateOptional)(bool)
  125902. })
  125903. }));
  125904. (0, _utils.default)("TSTypeReference", {
  125905. aliases: ["TSType"],
  125906. visitor: ["typeName", "typeParameters"],
  125907. fields: {
  125908. typeName: (0, _utils.validateType)("TSEntityName"),
  125909. typeParameters: (0, _utils.validateOptionalType)("TSTypeParameterInstantiation")
  125910. }
  125911. });
  125912. (0, _utils.default)("TSTypePredicate", {
  125913. aliases: ["TSType"],
  125914. visitor: ["parameterName", "typeAnnotation"],
  125915. builder: ["parameterName", "typeAnnotation", "asserts"],
  125916. fields: {
  125917. parameterName: (0, _utils.validateType)(["Identifier", "TSThisType"]),
  125918. typeAnnotation: (0, _utils.validateOptionalType)("TSTypeAnnotation"),
  125919. asserts: (0, _utils.validateOptional)(bool)
  125920. }
  125921. });
  125922. (0, _utils.default)("TSTypeQuery", {
  125923. aliases: ["TSType"],
  125924. visitor: ["exprName"],
  125925. fields: {
  125926. exprName: (0, _utils.validateType)(["TSEntityName", "TSImportType"])
  125927. }
  125928. });
  125929. (0, _utils.default)("TSTypeLiteral", {
  125930. aliases: ["TSType"],
  125931. visitor: ["members"],
  125932. fields: {
  125933. members: (0, _utils.validateArrayOfType)("TSTypeElement")
  125934. }
  125935. });
  125936. (0, _utils.default)("TSArrayType", {
  125937. aliases: ["TSType"],
  125938. visitor: ["elementType"],
  125939. fields: {
  125940. elementType: (0, _utils.validateType)("TSType")
  125941. }
  125942. });
  125943. (0, _utils.default)("TSTupleType", {
  125944. aliases: ["TSType"],
  125945. visitor: ["elementTypes"],
  125946. fields: {
  125947. elementTypes: (0, _utils.validateArrayOfType)(["TSType", "TSNamedTupleMember"])
  125948. }
  125949. });
  125950. (0, _utils.default)("TSOptionalType", {
  125951. aliases: ["TSType"],
  125952. visitor: ["typeAnnotation"],
  125953. fields: {
  125954. typeAnnotation: (0, _utils.validateType)("TSType")
  125955. }
  125956. });
  125957. (0, _utils.default)("TSRestType", {
  125958. aliases: ["TSType"],
  125959. visitor: ["typeAnnotation"],
  125960. fields: {
  125961. typeAnnotation: (0, _utils.validateType)("TSType")
  125962. }
  125963. });
  125964. (0, _utils.default)("TSNamedTupleMember", {
  125965. visitor: ["label", "elementType"],
  125966. builder: ["label", "elementType", "optional"],
  125967. fields: {
  125968. label: (0, _utils.validateType)("Identifier"),
  125969. optional: {
  125970. validate: bool,
  125971. default: false
  125972. },
  125973. elementType: (0, _utils.validateType)("TSType")
  125974. }
  125975. });
  125976. var unionOrIntersection = {
  125977. aliases: ["TSType"],
  125978. visitor: ["types"],
  125979. fields: {
  125980. types: (0, _utils.validateArrayOfType)("TSType")
  125981. }
  125982. };
  125983. (0, _utils.default)("TSUnionType", unionOrIntersection);
  125984. (0, _utils.default)("TSIntersectionType", unionOrIntersection);
  125985. (0, _utils.default)("TSConditionalType", {
  125986. aliases: ["TSType"],
  125987. visitor: ["checkType", "extendsType", "trueType", "falseType"],
  125988. fields: {
  125989. checkType: (0, _utils.validateType)("TSType"),
  125990. extendsType: (0, _utils.validateType)("TSType"),
  125991. trueType: (0, _utils.validateType)("TSType"),
  125992. falseType: (0, _utils.validateType)("TSType")
  125993. }
  125994. });
  125995. (0, _utils.default)("TSInferType", {
  125996. aliases: ["TSType"],
  125997. visitor: ["typeParameter"],
  125998. fields: {
  125999. typeParameter: (0, _utils.validateType)("TSTypeParameter")
  126000. }
  126001. });
  126002. (0, _utils.default)("TSParenthesizedType", {
  126003. aliases: ["TSType"],
  126004. visitor: ["typeAnnotation"],
  126005. fields: {
  126006. typeAnnotation: (0, _utils.validateType)("TSType")
  126007. }
  126008. });
  126009. (0, _utils.default)("TSTypeOperator", {
  126010. aliases: ["TSType"],
  126011. visitor: ["typeAnnotation"],
  126012. fields: {
  126013. operator: (0, _utils.validate)((0, _utils.assertValueType)("string")),
  126014. typeAnnotation: (0, _utils.validateType)("TSType")
  126015. }
  126016. });
  126017. (0, _utils.default)("TSIndexedAccessType", {
  126018. aliases: ["TSType"],
  126019. visitor: ["objectType", "indexType"],
  126020. fields: {
  126021. objectType: (0, _utils.validateType)("TSType"),
  126022. indexType: (0, _utils.validateType)("TSType")
  126023. }
  126024. });
  126025. (0, _utils.default)("TSMappedType", {
  126026. aliases: ["TSType"],
  126027. visitor: ["typeParameter", "typeAnnotation", "nameType"],
  126028. fields: {
  126029. readonly: (0, _utils.validateOptional)(bool),
  126030. typeParameter: (0, _utils.validateType)("TSTypeParameter"),
  126031. optional: (0, _utils.validateOptional)(bool),
  126032. typeAnnotation: (0, _utils.validateOptionalType)("TSType"),
  126033. nameType: (0, _utils.validateOptionalType)("TSType")
  126034. }
  126035. });
  126036. (0, _utils.default)("TSLiteralType", {
  126037. aliases: ["TSType", "TSBaseType"],
  126038. visitor: ["literal"],
  126039. fields: {
  126040. literal: (0, _utils.validateType)(["NumericLiteral", "StringLiteral", "BooleanLiteral", "BigIntLiteral"])
  126041. }
  126042. });
  126043. (0, _utils.default)("TSExpressionWithTypeArguments", {
  126044. aliases: ["TSType"],
  126045. visitor: ["expression", "typeParameters"],
  126046. fields: {
  126047. expression: (0, _utils.validateType)("TSEntityName"),
  126048. typeParameters: (0, _utils.validateOptionalType)("TSTypeParameterInstantiation")
  126049. }
  126050. });
  126051. (0, _utils.default)("TSInterfaceDeclaration", {
  126052. aliases: ["Statement", "Declaration"],
  126053. visitor: ["id", "typeParameters", "extends", "body"],
  126054. fields: {
  126055. declare: (0, _utils.validateOptional)(bool),
  126056. id: (0, _utils.validateType)("Identifier"),
  126057. typeParameters: (0, _utils.validateOptionalType)("TSTypeParameterDeclaration"),
  126058. extends: (0, _utils.validateOptional)((0, _utils.arrayOfType)("TSExpressionWithTypeArguments")),
  126059. body: (0, _utils.validateType)("TSInterfaceBody")
  126060. }
  126061. });
  126062. (0, _utils.default)("TSInterfaceBody", {
  126063. visitor: ["body"],
  126064. fields: {
  126065. body: (0, _utils.validateArrayOfType)("TSTypeElement")
  126066. }
  126067. });
  126068. (0, _utils.default)("TSTypeAliasDeclaration", {
  126069. aliases: ["Statement", "Declaration"],
  126070. visitor: ["id", "typeParameters", "typeAnnotation"],
  126071. fields: {
  126072. declare: (0, _utils.validateOptional)(bool),
  126073. id: (0, _utils.validateType)("Identifier"),
  126074. typeParameters: (0, _utils.validateOptionalType)("TSTypeParameterDeclaration"),
  126075. typeAnnotation: (0, _utils.validateType)("TSType")
  126076. }
  126077. });
  126078. (0, _utils.default)("TSAsExpression", {
  126079. aliases: ["Expression"],
  126080. visitor: ["expression", "typeAnnotation"],
  126081. fields: {
  126082. expression: (0, _utils.validateType)("Expression"),
  126083. typeAnnotation: (0, _utils.validateType)("TSType")
  126084. }
  126085. });
  126086. (0, _utils.default)("TSTypeAssertion", {
  126087. aliases: ["Expression"],
  126088. visitor: ["typeAnnotation", "expression"],
  126089. fields: {
  126090. typeAnnotation: (0, _utils.validateType)("TSType"),
  126091. expression: (0, _utils.validateType)("Expression")
  126092. }
  126093. });
  126094. (0, _utils.default)("TSEnumDeclaration", {
  126095. aliases: ["Statement", "Declaration"],
  126096. visitor: ["id", "members"],
  126097. fields: {
  126098. declare: (0, _utils.validateOptional)(bool),
  126099. const: (0, _utils.validateOptional)(bool),
  126100. id: (0, _utils.validateType)("Identifier"),
  126101. members: (0, _utils.validateArrayOfType)("TSEnumMember"),
  126102. initializer: (0, _utils.validateOptionalType)("Expression")
  126103. }
  126104. });
  126105. (0, _utils.default)("TSEnumMember", {
  126106. visitor: ["id", "initializer"],
  126107. fields: {
  126108. id: (0, _utils.validateType)(["Identifier", "StringLiteral"]),
  126109. initializer: (0, _utils.validateOptionalType)("Expression")
  126110. }
  126111. });
  126112. (0, _utils.default)("TSModuleDeclaration", {
  126113. aliases: ["Statement", "Declaration"],
  126114. visitor: ["id", "body"],
  126115. fields: {
  126116. declare: (0, _utils.validateOptional)(bool),
  126117. global: (0, _utils.validateOptional)(bool),
  126118. id: (0, _utils.validateType)(["Identifier", "StringLiteral"]),
  126119. body: (0, _utils.validateType)(["TSModuleBlock", "TSModuleDeclaration"])
  126120. }
  126121. });
  126122. (0, _utils.default)("TSModuleBlock", {
  126123. aliases: ["Scopable", "Block", "BlockParent"],
  126124. visitor: ["body"],
  126125. fields: {
  126126. body: (0, _utils.validateArrayOfType)("Statement")
  126127. }
  126128. });
  126129. (0, _utils.default)("TSImportType", {
  126130. aliases: ["TSType"],
  126131. visitor: ["argument", "qualifier", "typeParameters"],
  126132. fields: {
  126133. argument: (0, _utils.validateType)("StringLiteral"),
  126134. qualifier: (0, _utils.validateOptionalType)("TSEntityName"),
  126135. typeParameters: (0, _utils.validateOptionalType)("TSTypeParameterInstantiation")
  126136. }
  126137. });
  126138. (0, _utils.default)("TSImportEqualsDeclaration", {
  126139. aliases: ["Statement"],
  126140. visitor: ["id", "moduleReference"],
  126141. fields: {
  126142. isExport: (0, _utils.validate)(bool),
  126143. id: (0, _utils.validateType)("Identifier"),
  126144. moduleReference: (0, _utils.validateType)(["TSEntityName", "TSExternalModuleReference"])
  126145. }
  126146. });
  126147. (0, _utils.default)("TSExternalModuleReference", {
  126148. visitor: ["expression"],
  126149. fields: {
  126150. expression: (0, _utils.validateType)("StringLiteral")
  126151. }
  126152. });
  126153. (0, _utils.default)("TSNonNullExpression", {
  126154. aliases: ["Expression"],
  126155. visitor: ["expression"],
  126156. fields: {
  126157. expression: (0, _utils.validateType)("Expression")
  126158. }
  126159. });
  126160. (0, _utils.default)("TSExportAssignment", {
  126161. aliases: ["Statement"],
  126162. visitor: ["expression"],
  126163. fields: {
  126164. expression: (0, _utils.validateType)("Expression")
  126165. }
  126166. });
  126167. (0, _utils.default)("TSNamespaceExportDeclaration", {
  126168. aliases: ["Statement"],
  126169. visitor: ["id"],
  126170. fields: {
  126171. id: (0, _utils.validateType)("Identifier")
  126172. }
  126173. });
  126174. (0, _utils.default)("TSTypeAnnotation", {
  126175. visitor: ["typeAnnotation"],
  126176. fields: {
  126177. typeAnnotation: {
  126178. validate: (0, _utils.assertNodeType)("TSType")
  126179. }
  126180. }
  126181. });
  126182. (0, _utils.default)("TSTypeParameterInstantiation", {
  126183. visitor: ["params"],
  126184. fields: {
  126185. params: {
  126186. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("TSType")))
  126187. }
  126188. }
  126189. });
  126190. (0, _utils.default)("TSTypeParameterDeclaration", {
  126191. visitor: ["params"],
  126192. fields: {
  126193. params: {
  126194. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("TSTypeParameter")))
  126195. }
  126196. }
  126197. });
  126198. (0, _utils.default)("TSTypeParameter", {
  126199. builder: ["constraint", "default", "name"],
  126200. visitor: ["constraint", "default"],
  126201. fields: {
  126202. name: {
  126203. validate: (0, _utils.assertValueType)("string")
  126204. },
  126205. constraint: {
  126206. validate: (0, _utils.assertNodeType)("TSType"),
  126207. optional: true
  126208. },
  126209. default: {
  126210. validate: (0, _utils.assertNodeType)("TSType"),
  126211. optional: true
  126212. }
  126213. }
  126214. });
  126215. }
  126216. });
  126217. // node_modules/@babel/template/node_modules/@babel/types/lib/definitions/index.js
  126218. var require_definitions6 = __commonJS({
  126219. "node_modules/@babel/template/node_modules/@babel/types/lib/definitions/index.js"(exports) {
  126220. "use strict";
  126221. Object.defineProperty(exports, "__esModule", {
  126222. value: true
  126223. });
  126224. Object.defineProperty(exports, "VISITOR_KEYS", {
  126225. enumerable: true,
  126226. get: function() {
  126227. return _utils.VISITOR_KEYS;
  126228. }
  126229. });
  126230. Object.defineProperty(exports, "ALIAS_KEYS", {
  126231. enumerable: true,
  126232. get: function() {
  126233. return _utils.ALIAS_KEYS;
  126234. }
  126235. });
  126236. Object.defineProperty(exports, "FLIPPED_ALIAS_KEYS", {
  126237. enumerable: true,
  126238. get: function() {
  126239. return _utils.FLIPPED_ALIAS_KEYS;
  126240. }
  126241. });
  126242. Object.defineProperty(exports, "NODE_FIELDS", {
  126243. enumerable: true,
  126244. get: function() {
  126245. return _utils.NODE_FIELDS;
  126246. }
  126247. });
  126248. Object.defineProperty(exports, "BUILDER_KEYS", {
  126249. enumerable: true,
  126250. get: function() {
  126251. return _utils.BUILDER_KEYS;
  126252. }
  126253. });
  126254. Object.defineProperty(exports, "DEPRECATED_KEYS", {
  126255. enumerable: true,
  126256. get: function() {
  126257. return _utils.DEPRECATED_KEYS;
  126258. }
  126259. });
  126260. Object.defineProperty(exports, "NODE_PARENT_VALIDATIONS", {
  126261. enumerable: true,
  126262. get: function() {
  126263. return _utils.NODE_PARENT_VALIDATIONS;
  126264. }
  126265. });
  126266. Object.defineProperty(exports, "PLACEHOLDERS", {
  126267. enumerable: true,
  126268. get: function() {
  126269. return _placeholders.PLACEHOLDERS;
  126270. }
  126271. });
  126272. Object.defineProperty(exports, "PLACEHOLDERS_ALIAS", {
  126273. enumerable: true,
  126274. get: function() {
  126275. return _placeholders.PLACEHOLDERS_ALIAS;
  126276. }
  126277. });
  126278. Object.defineProperty(exports, "PLACEHOLDERS_FLIPPED_ALIAS", {
  126279. enumerable: true,
  126280. get: function() {
  126281. return _placeholders.PLACEHOLDERS_FLIPPED_ALIAS;
  126282. }
  126283. });
  126284. exports.TYPES = void 0;
  126285. var _toFastProperties = require_to_fast_properties();
  126286. require_core6();
  126287. require_flow8();
  126288. require_jsx8();
  126289. require_misc6();
  126290. require_experimental6();
  126291. require_typescript8();
  126292. var _utils = require_utils6();
  126293. var _placeholders = require_placeholders6();
  126294. _toFastProperties(_utils.VISITOR_KEYS);
  126295. _toFastProperties(_utils.ALIAS_KEYS);
  126296. _toFastProperties(_utils.FLIPPED_ALIAS_KEYS);
  126297. _toFastProperties(_utils.NODE_FIELDS);
  126298. _toFastProperties(_utils.BUILDER_KEYS);
  126299. _toFastProperties(_utils.DEPRECATED_KEYS);
  126300. _toFastProperties(_placeholders.PLACEHOLDERS_ALIAS);
  126301. _toFastProperties(_placeholders.PLACEHOLDERS_FLIPPED_ALIAS);
  126302. var TYPES = Object.keys(_utils.VISITOR_KEYS).concat(Object.keys(_utils.FLIPPED_ALIAS_KEYS)).concat(Object.keys(_utils.DEPRECATED_KEYS));
  126303. exports.TYPES = TYPES;
  126304. }
  126305. });
  126306. // node_modules/@babel/template/node_modules/@babel/types/lib/builders/builder.js
  126307. var require_builder7 = __commonJS({
  126308. "node_modules/@babel/template/node_modules/@babel/types/lib/builders/builder.js"(exports) {
  126309. "use strict";
  126310. Object.defineProperty(exports, "__esModule", {
  126311. value: true
  126312. });
  126313. exports.default = builder;
  126314. var _definitions = require_definitions6();
  126315. var _validate = require_validate6();
  126316. function builder(type, ...args) {
  126317. const keys2 = _definitions.BUILDER_KEYS[type];
  126318. const countArgs = args.length;
  126319. if (countArgs > keys2.length) {
  126320. throw new Error(`${type}: Too many arguments passed. Received ${countArgs} but can receive no more than ${keys2.length}`);
  126321. }
  126322. const node = {
  126323. type
  126324. };
  126325. let i = 0;
  126326. keys2.forEach((key) => {
  126327. const field = _definitions.NODE_FIELDS[type][key];
  126328. let arg;
  126329. if (i < countArgs)
  126330. arg = args[i];
  126331. if (arg === void 0) {
  126332. arg = Array.isArray(field.default) ? [] : field.default;
  126333. }
  126334. node[key] = arg;
  126335. i++;
  126336. });
  126337. for (const key of Object.keys(node)) {
  126338. (0, _validate.default)(node, key, node[key]);
  126339. }
  126340. return node;
  126341. }
  126342. }
  126343. });
  126344. // node_modules/@babel/template/node_modules/@babel/types/lib/builders/generated/index.js
  126345. var require_generated27 = __commonJS({
  126346. "node_modules/@babel/template/node_modules/@babel/types/lib/builders/generated/index.js"(exports) {
  126347. "use strict";
  126348. Object.defineProperty(exports, "__esModule", {
  126349. value: true
  126350. });
  126351. exports.arrayExpression = arrayExpression;
  126352. exports.assignmentExpression = assignmentExpression;
  126353. exports.binaryExpression = binaryExpression;
  126354. exports.interpreterDirective = interpreterDirective;
  126355. exports.directive = directive;
  126356. exports.directiveLiteral = directiveLiteral;
  126357. exports.blockStatement = blockStatement;
  126358. exports.breakStatement = breakStatement;
  126359. exports.callExpression = callExpression;
  126360. exports.catchClause = catchClause;
  126361. exports.conditionalExpression = conditionalExpression;
  126362. exports.continueStatement = continueStatement;
  126363. exports.debuggerStatement = debuggerStatement;
  126364. exports.doWhileStatement = doWhileStatement;
  126365. exports.emptyStatement = emptyStatement;
  126366. exports.expressionStatement = expressionStatement;
  126367. exports.file = file;
  126368. exports.forInStatement = forInStatement;
  126369. exports.forStatement = forStatement;
  126370. exports.functionDeclaration = functionDeclaration;
  126371. exports.functionExpression = functionExpression;
  126372. exports.identifier = identifier;
  126373. exports.ifStatement = ifStatement;
  126374. exports.labeledStatement = labeledStatement;
  126375. exports.stringLiteral = stringLiteral;
  126376. exports.numericLiteral = numericLiteral;
  126377. exports.nullLiteral = nullLiteral;
  126378. exports.booleanLiteral = booleanLiteral;
  126379. exports.regExpLiteral = regExpLiteral;
  126380. exports.logicalExpression = logicalExpression;
  126381. exports.memberExpression = memberExpression;
  126382. exports.newExpression = newExpression;
  126383. exports.program = program;
  126384. exports.objectExpression = objectExpression;
  126385. exports.objectMethod = objectMethod;
  126386. exports.objectProperty = objectProperty;
  126387. exports.restElement = restElement;
  126388. exports.returnStatement = returnStatement;
  126389. exports.sequenceExpression = sequenceExpression;
  126390. exports.parenthesizedExpression = parenthesizedExpression;
  126391. exports.switchCase = switchCase;
  126392. exports.switchStatement = switchStatement;
  126393. exports.thisExpression = thisExpression;
  126394. exports.throwStatement = throwStatement;
  126395. exports.tryStatement = tryStatement;
  126396. exports.unaryExpression = unaryExpression;
  126397. exports.updateExpression = updateExpression;
  126398. exports.variableDeclaration = variableDeclaration;
  126399. exports.variableDeclarator = variableDeclarator;
  126400. exports.whileStatement = whileStatement;
  126401. exports.withStatement = withStatement;
  126402. exports.assignmentPattern = assignmentPattern;
  126403. exports.arrayPattern = arrayPattern;
  126404. exports.arrowFunctionExpression = arrowFunctionExpression;
  126405. exports.classBody = classBody;
  126406. exports.classExpression = classExpression;
  126407. exports.classDeclaration = classDeclaration;
  126408. exports.exportAllDeclaration = exportAllDeclaration;
  126409. exports.exportDefaultDeclaration = exportDefaultDeclaration;
  126410. exports.exportNamedDeclaration = exportNamedDeclaration;
  126411. exports.exportSpecifier = exportSpecifier;
  126412. exports.forOfStatement = forOfStatement;
  126413. exports.importDeclaration = importDeclaration;
  126414. exports.importDefaultSpecifier = importDefaultSpecifier;
  126415. exports.importNamespaceSpecifier = importNamespaceSpecifier;
  126416. exports.importSpecifier = importSpecifier;
  126417. exports.metaProperty = metaProperty;
  126418. exports.classMethod = classMethod;
  126419. exports.objectPattern = objectPattern;
  126420. exports.spreadElement = spreadElement;
  126421. exports.super = _super;
  126422. exports.taggedTemplateExpression = taggedTemplateExpression;
  126423. exports.templateElement = templateElement;
  126424. exports.templateLiteral = templateLiteral;
  126425. exports.yieldExpression = yieldExpression;
  126426. exports.awaitExpression = awaitExpression;
  126427. exports.import = _import;
  126428. exports.bigIntLiteral = bigIntLiteral;
  126429. exports.exportNamespaceSpecifier = exportNamespaceSpecifier;
  126430. exports.optionalMemberExpression = optionalMemberExpression;
  126431. exports.optionalCallExpression = optionalCallExpression;
  126432. exports.anyTypeAnnotation = anyTypeAnnotation;
  126433. exports.arrayTypeAnnotation = arrayTypeAnnotation;
  126434. exports.booleanTypeAnnotation = booleanTypeAnnotation;
  126435. exports.booleanLiteralTypeAnnotation = booleanLiteralTypeAnnotation;
  126436. exports.nullLiteralTypeAnnotation = nullLiteralTypeAnnotation;
  126437. exports.classImplements = classImplements;
  126438. exports.declareClass = declareClass;
  126439. exports.declareFunction = declareFunction;
  126440. exports.declareInterface = declareInterface;
  126441. exports.declareModule = declareModule;
  126442. exports.declareModuleExports = declareModuleExports;
  126443. exports.declareTypeAlias = declareTypeAlias;
  126444. exports.declareOpaqueType = declareOpaqueType;
  126445. exports.declareVariable = declareVariable;
  126446. exports.declareExportDeclaration = declareExportDeclaration;
  126447. exports.declareExportAllDeclaration = declareExportAllDeclaration;
  126448. exports.declaredPredicate = declaredPredicate;
  126449. exports.existsTypeAnnotation = existsTypeAnnotation;
  126450. exports.functionTypeAnnotation = functionTypeAnnotation;
  126451. exports.functionTypeParam = functionTypeParam;
  126452. exports.genericTypeAnnotation = genericTypeAnnotation;
  126453. exports.inferredPredicate = inferredPredicate;
  126454. exports.interfaceExtends = interfaceExtends;
  126455. exports.interfaceDeclaration = interfaceDeclaration;
  126456. exports.interfaceTypeAnnotation = interfaceTypeAnnotation;
  126457. exports.intersectionTypeAnnotation = intersectionTypeAnnotation;
  126458. exports.mixedTypeAnnotation = mixedTypeAnnotation;
  126459. exports.emptyTypeAnnotation = emptyTypeAnnotation;
  126460. exports.nullableTypeAnnotation = nullableTypeAnnotation;
  126461. exports.numberLiteralTypeAnnotation = numberLiteralTypeAnnotation;
  126462. exports.numberTypeAnnotation = numberTypeAnnotation;
  126463. exports.objectTypeAnnotation = objectTypeAnnotation;
  126464. exports.objectTypeInternalSlot = objectTypeInternalSlot;
  126465. exports.objectTypeCallProperty = objectTypeCallProperty;
  126466. exports.objectTypeIndexer = objectTypeIndexer;
  126467. exports.objectTypeProperty = objectTypeProperty;
  126468. exports.objectTypeSpreadProperty = objectTypeSpreadProperty;
  126469. exports.opaqueType = opaqueType;
  126470. exports.qualifiedTypeIdentifier = qualifiedTypeIdentifier;
  126471. exports.stringLiteralTypeAnnotation = stringLiteralTypeAnnotation;
  126472. exports.stringTypeAnnotation = stringTypeAnnotation;
  126473. exports.symbolTypeAnnotation = symbolTypeAnnotation;
  126474. exports.thisTypeAnnotation = thisTypeAnnotation;
  126475. exports.tupleTypeAnnotation = tupleTypeAnnotation;
  126476. exports.typeofTypeAnnotation = typeofTypeAnnotation;
  126477. exports.typeAlias = typeAlias;
  126478. exports.typeAnnotation = typeAnnotation;
  126479. exports.typeCastExpression = typeCastExpression;
  126480. exports.typeParameter = typeParameter;
  126481. exports.typeParameterDeclaration = typeParameterDeclaration;
  126482. exports.typeParameterInstantiation = typeParameterInstantiation;
  126483. exports.unionTypeAnnotation = unionTypeAnnotation;
  126484. exports.variance = variance;
  126485. exports.voidTypeAnnotation = voidTypeAnnotation;
  126486. exports.enumDeclaration = enumDeclaration;
  126487. exports.enumBooleanBody = enumBooleanBody;
  126488. exports.enumNumberBody = enumNumberBody;
  126489. exports.enumStringBody = enumStringBody;
  126490. exports.enumSymbolBody = enumSymbolBody;
  126491. exports.enumBooleanMember = enumBooleanMember;
  126492. exports.enumNumberMember = enumNumberMember;
  126493. exports.enumStringMember = enumStringMember;
  126494. exports.enumDefaultedMember = enumDefaultedMember;
  126495. exports.indexedAccessType = indexedAccessType;
  126496. exports.optionalIndexedAccessType = optionalIndexedAccessType;
  126497. exports.jSXAttribute = exports.jsxAttribute = jsxAttribute;
  126498. exports.jSXClosingElement = exports.jsxClosingElement = jsxClosingElement;
  126499. exports.jSXElement = exports.jsxElement = jsxElement;
  126500. exports.jSXEmptyExpression = exports.jsxEmptyExpression = jsxEmptyExpression;
  126501. exports.jSXExpressionContainer = exports.jsxExpressionContainer = jsxExpressionContainer;
  126502. exports.jSXSpreadChild = exports.jsxSpreadChild = jsxSpreadChild;
  126503. exports.jSXIdentifier = exports.jsxIdentifier = jsxIdentifier;
  126504. exports.jSXMemberExpression = exports.jsxMemberExpression = jsxMemberExpression;
  126505. exports.jSXNamespacedName = exports.jsxNamespacedName = jsxNamespacedName;
  126506. exports.jSXOpeningElement = exports.jsxOpeningElement = jsxOpeningElement;
  126507. exports.jSXSpreadAttribute = exports.jsxSpreadAttribute = jsxSpreadAttribute;
  126508. exports.jSXText = exports.jsxText = jsxText2;
  126509. exports.jSXFragment = exports.jsxFragment = jsxFragment;
  126510. exports.jSXOpeningFragment = exports.jsxOpeningFragment = jsxOpeningFragment;
  126511. exports.jSXClosingFragment = exports.jsxClosingFragment = jsxClosingFragment;
  126512. exports.noop = noop;
  126513. exports.placeholder = placeholder;
  126514. exports.v8IntrinsicIdentifier = v8IntrinsicIdentifier;
  126515. exports.argumentPlaceholder = argumentPlaceholder;
  126516. exports.bindExpression = bindExpression;
  126517. exports.classProperty = classProperty;
  126518. exports.pipelineTopicExpression = pipelineTopicExpression;
  126519. exports.pipelineBareFunction = pipelineBareFunction;
  126520. exports.pipelinePrimaryTopicReference = pipelinePrimaryTopicReference;
  126521. exports.classPrivateProperty = classPrivateProperty;
  126522. exports.classPrivateMethod = classPrivateMethod;
  126523. exports.importAttribute = importAttribute;
  126524. exports.decorator = decorator;
  126525. exports.doExpression = doExpression;
  126526. exports.exportDefaultSpecifier = exportDefaultSpecifier;
  126527. exports.privateName = privateName;
  126528. exports.recordExpression = recordExpression;
  126529. exports.tupleExpression = tupleExpression;
  126530. exports.decimalLiteral = decimalLiteral;
  126531. exports.staticBlock = staticBlock;
  126532. exports.moduleExpression = moduleExpression;
  126533. exports.tSParameterProperty = exports.tsParameterProperty = tsParameterProperty;
  126534. exports.tSDeclareFunction = exports.tsDeclareFunction = tsDeclareFunction;
  126535. exports.tSDeclareMethod = exports.tsDeclareMethod = tsDeclareMethod;
  126536. exports.tSQualifiedName = exports.tsQualifiedName = tsQualifiedName;
  126537. exports.tSCallSignatureDeclaration = exports.tsCallSignatureDeclaration = tsCallSignatureDeclaration;
  126538. exports.tSConstructSignatureDeclaration = exports.tsConstructSignatureDeclaration = tsConstructSignatureDeclaration;
  126539. exports.tSPropertySignature = exports.tsPropertySignature = tsPropertySignature;
  126540. exports.tSMethodSignature = exports.tsMethodSignature = tsMethodSignature;
  126541. exports.tSIndexSignature = exports.tsIndexSignature = tsIndexSignature;
  126542. exports.tSAnyKeyword = exports.tsAnyKeyword = tsAnyKeyword;
  126543. exports.tSBooleanKeyword = exports.tsBooleanKeyword = tsBooleanKeyword;
  126544. exports.tSBigIntKeyword = exports.tsBigIntKeyword = tsBigIntKeyword;
  126545. exports.tSIntrinsicKeyword = exports.tsIntrinsicKeyword = tsIntrinsicKeyword;
  126546. exports.tSNeverKeyword = exports.tsNeverKeyword = tsNeverKeyword;
  126547. exports.tSNullKeyword = exports.tsNullKeyword = tsNullKeyword;
  126548. exports.tSNumberKeyword = exports.tsNumberKeyword = tsNumberKeyword;
  126549. exports.tSObjectKeyword = exports.tsObjectKeyword = tsObjectKeyword;
  126550. exports.tSStringKeyword = exports.tsStringKeyword = tsStringKeyword;
  126551. exports.tSSymbolKeyword = exports.tsSymbolKeyword = tsSymbolKeyword;
  126552. exports.tSUndefinedKeyword = exports.tsUndefinedKeyword = tsUndefinedKeyword;
  126553. exports.tSUnknownKeyword = exports.tsUnknownKeyword = tsUnknownKeyword;
  126554. exports.tSVoidKeyword = exports.tsVoidKeyword = tsVoidKeyword;
  126555. exports.tSThisType = exports.tsThisType = tsThisType;
  126556. exports.tSFunctionType = exports.tsFunctionType = tsFunctionType;
  126557. exports.tSConstructorType = exports.tsConstructorType = tsConstructorType;
  126558. exports.tSTypeReference = exports.tsTypeReference = tsTypeReference;
  126559. exports.tSTypePredicate = exports.tsTypePredicate = tsTypePredicate;
  126560. exports.tSTypeQuery = exports.tsTypeQuery = tsTypeQuery;
  126561. exports.tSTypeLiteral = exports.tsTypeLiteral = tsTypeLiteral;
  126562. exports.tSArrayType = exports.tsArrayType = tsArrayType;
  126563. exports.tSTupleType = exports.tsTupleType = tsTupleType;
  126564. exports.tSOptionalType = exports.tsOptionalType = tsOptionalType;
  126565. exports.tSRestType = exports.tsRestType = tsRestType;
  126566. exports.tSNamedTupleMember = exports.tsNamedTupleMember = tsNamedTupleMember;
  126567. exports.tSUnionType = exports.tsUnionType = tsUnionType;
  126568. exports.tSIntersectionType = exports.tsIntersectionType = tsIntersectionType;
  126569. exports.tSConditionalType = exports.tsConditionalType = tsConditionalType;
  126570. exports.tSInferType = exports.tsInferType = tsInferType;
  126571. exports.tSParenthesizedType = exports.tsParenthesizedType = tsParenthesizedType;
  126572. exports.tSTypeOperator = exports.tsTypeOperator = tsTypeOperator;
  126573. exports.tSIndexedAccessType = exports.tsIndexedAccessType = tsIndexedAccessType;
  126574. exports.tSMappedType = exports.tsMappedType = tsMappedType;
  126575. exports.tSLiteralType = exports.tsLiteralType = tsLiteralType;
  126576. exports.tSExpressionWithTypeArguments = exports.tsExpressionWithTypeArguments = tsExpressionWithTypeArguments;
  126577. exports.tSInterfaceDeclaration = exports.tsInterfaceDeclaration = tsInterfaceDeclaration;
  126578. exports.tSInterfaceBody = exports.tsInterfaceBody = tsInterfaceBody;
  126579. exports.tSTypeAliasDeclaration = exports.tsTypeAliasDeclaration = tsTypeAliasDeclaration;
  126580. exports.tSAsExpression = exports.tsAsExpression = tsAsExpression;
  126581. exports.tSTypeAssertion = exports.tsTypeAssertion = tsTypeAssertion;
  126582. exports.tSEnumDeclaration = exports.tsEnumDeclaration = tsEnumDeclaration;
  126583. exports.tSEnumMember = exports.tsEnumMember = tsEnumMember;
  126584. exports.tSModuleDeclaration = exports.tsModuleDeclaration = tsModuleDeclaration;
  126585. exports.tSModuleBlock = exports.tsModuleBlock = tsModuleBlock;
  126586. exports.tSImportType = exports.tsImportType = tsImportType;
  126587. exports.tSImportEqualsDeclaration = exports.tsImportEqualsDeclaration = tsImportEqualsDeclaration;
  126588. exports.tSExternalModuleReference = exports.tsExternalModuleReference = tsExternalModuleReference;
  126589. exports.tSNonNullExpression = exports.tsNonNullExpression = tsNonNullExpression;
  126590. exports.tSExportAssignment = exports.tsExportAssignment = tsExportAssignment;
  126591. exports.tSNamespaceExportDeclaration = exports.tsNamespaceExportDeclaration = tsNamespaceExportDeclaration;
  126592. exports.tSTypeAnnotation = exports.tsTypeAnnotation = tsTypeAnnotation;
  126593. exports.tSTypeParameterInstantiation = exports.tsTypeParameterInstantiation = tsTypeParameterInstantiation;
  126594. exports.tSTypeParameterDeclaration = exports.tsTypeParameterDeclaration = tsTypeParameterDeclaration;
  126595. exports.tSTypeParameter = exports.tsTypeParameter = tsTypeParameter;
  126596. exports.numberLiteral = NumberLiteral;
  126597. exports.regexLiteral = RegexLiteral;
  126598. exports.restProperty = RestProperty;
  126599. exports.spreadProperty = SpreadProperty;
  126600. var _builder = require_builder7();
  126601. function arrayExpression(elements) {
  126602. return (0, _builder.default)("ArrayExpression", ...arguments);
  126603. }
  126604. function assignmentExpression(operator, left, right) {
  126605. return (0, _builder.default)("AssignmentExpression", ...arguments);
  126606. }
  126607. function binaryExpression(operator, left, right) {
  126608. return (0, _builder.default)("BinaryExpression", ...arguments);
  126609. }
  126610. function interpreterDirective(value) {
  126611. return (0, _builder.default)("InterpreterDirective", ...arguments);
  126612. }
  126613. function directive(value) {
  126614. return (0, _builder.default)("Directive", ...arguments);
  126615. }
  126616. function directiveLiteral(value) {
  126617. return (0, _builder.default)("DirectiveLiteral", ...arguments);
  126618. }
  126619. function blockStatement(body, directives) {
  126620. return (0, _builder.default)("BlockStatement", ...arguments);
  126621. }
  126622. function breakStatement(label) {
  126623. return (0, _builder.default)("BreakStatement", ...arguments);
  126624. }
  126625. function callExpression(callee, _arguments) {
  126626. return (0, _builder.default)("CallExpression", ...arguments);
  126627. }
  126628. function catchClause(param, body) {
  126629. return (0, _builder.default)("CatchClause", ...arguments);
  126630. }
  126631. function conditionalExpression(test, consequent, alternate) {
  126632. return (0, _builder.default)("ConditionalExpression", ...arguments);
  126633. }
  126634. function continueStatement(label) {
  126635. return (0, _builder.default)("ContinueStatement", ...arguments);
  126636. }
  126637. function debuggerStatement() {
  126638. return (0, _builder.default)("DebuggerStatement", ...arguments);
  126639. }
  126640. function doWhileStatement(test, body) {
  126641. return (0, _builder.default)("DoWhileStatement", ...arguments);
  126642. }
  126643. function emptyStatement() {
  126644. return (0, _builder.default)("EmptyStatement", ...arguments);
  126645. }
  126646. function expressionStatement(expression) {
  126647. return (0, _builder.default)("ExpressionStatement", ...arguments);
  126648. }
  126649. function file(program2, comments, tokens) {
  126650. return (0, _builder.default)("File", ...arguments);
  126651. }
  126652. function forInStatement(left, right, body) {
  126653. return (0, _builder.default)("ForInStatement", ...arguments);
  126654. }
  126655. function forStatement(init, test, update, body) {
  126656. return (0, _builder.default)("ForStatement", ...arguments);
  126657. }
  126658. function functionDeclaration(id, params, body, generator, async) {
  126659. return (0, _builder.default)("FunctionDeclaration", ...arguments);
  126660. }
  126661. function functionExpression(id, params, body, generator, async) {
  126662. return (0, _builder.default)("FunctionExpression", ...arguments);
  126663. }
  126664. function identifier(name2) {
  126665. return (0, _builder.default)("Identifier", ...arguments);
  126666. }
  126667. function ifStatement(test, consequent, alternate) {
  126668. return (0, _builder.default)("IfStatement", ...arguments);
  126669. }
  126670. function labeledStatement(label, body) {
  126671. return (0, _builder.default)("LabeledStatement", ...arguments);
  126672. }
  126673. function stringLiteral(value) {
  126674. return (0, _builder.default)("StringLiteral", ...arguments);
  126675. }
  126676. function numericLiteral(value) {
  126677. return (0, _builder.default)("NumericLiteral", ...arguments);
  126678. }
  126679. function nullLiteral() {
  126680. return (0, _builder.default)("NullLiteral", ...arguments);
  126681. }
  126682. function booleanLiteral(value) {
  126683. return (0, _builder.default)("BooleanLiteral", ...arguments);
  126684. }
  126685. function regExpLiteral(pattern, flags) {
  126686. return (0, _builder.default)("RegExpLiteral", ...arguments);
  126687. }
  126688. function logicalExpression(operator, left, right) {
  126689. return (0, _builder.default)("LogicalExpression", ...arguments);
  126690. }
  126691. function memberExpression(object, property, computed, optional) {
  126692. return (0, _builder.default)("MemberExpression", ...arguments);
  126693. }
  126694. function newExpression(callee, _arguments) {
  126695. return (0, _builder.default)("NewExpression", ...arguments);
  126696. }
  126697. function program(body, directives, sourceType, interpreter) {
  126698. return (0, _builder.default)("Program", ...arguments);
  126699. }
  126700. function objectExpression(properties) {
  126701. return (0, _builder.default)("ObjectExpression", ...arguments);
  126702. }
  126703. function objectMethod(kind, key, params, body, computed, generator, async) {
  126704. return (0, _builder.default)("ObjectMethod", ...arguments);
  126705. }
  126706. function objectProperty(key, value, computed, shorthand, decorators) {
  126707. return (0, _builder.default)("ObjectProperty", ...arguments);
  126708. }
  126709. function restElement(argument) {
  126710. return (0, _builder.default)("RestElement", ...arguments);
  126711. }
  126712. function returnStatement(argument) {
  126713. return (0, _builder.default)("ReturnStatement", ...arguments);
  126714. }
  126715. function sequenceExpression(expressions) {
  126716. return (0, _builder.default)("SequenceExpression", ...arguments);
  126717. }
  126718. function parenthesizedExpression(expression) {
  126719. return (0, _builder.default)("ParenthesizedExpression", ...arguments);
  126720. }
  126721. function switchCase(test, consequent) {
  126722. return (0, _builder.default)("SwitchCase", ...arguments);
  126723. }
  126724. function switchStatement(discriminant, cases) {
  126725. return (0, _builder.default)("SwitchStatement", ...arguments);
  126726. }
  126727. function thisExpression() {
  126728. return (0, _builder.default)("ThisExpression", ...arguments);
  126729. }
  126730. function throwStatement(argument) {
  126731. return (0, _builder.default)("ThrowStatement", ...arguments);
  126732. }
  126733. function tryStatement(block, handler, finalizer) {
  126734. return (0, _builder.default)("TryStatement", ...arguments);
  126735. }
  126736. function unaryExpression(operator, argument, prefix) {
  126737. return (0, _builder.default)("UnaryExpression", ...arguments);
  126738. }
  126739. function updateExpression(operator, argument, prefix) {
  126740. return (0, _builder.default)("UpdateExpression", ...arguments);
  126741. }
  126742. function variableDeclaration(kind, declarations) {
  126743. return (0, _builder.default)("VariableDeclaration", ...arguments);
  126744. }
  126745. function variableDeclarator(id, init) {
  126746. return (0, _builder.default)("VariableDeclarator", ...arguments);
  126747. }
  126748. function whileStatement(test, body) {
  126749. return (0, _builder.default)("WhileStatement", ...arguments);
  126750. }
  126751. function withStatement(object, body) {
  126752. return (0, _builder.default)("WithStatement", ...arguments);
  126753. }
  126754. function assignmentPattern(left, right) {
  126755. return (0, _builder.default)("AssignmentPattern", ...arguments);
  126756. }
  126757. function arrayPattern(elements) {
  126758. return (0, _builder.default)("ArrayPattern", ...arguments);
  126759. }
  126760. function arrowFunctionExpression(params, body, async) {
  126761. return (0, _builder.default)("ArrowFunctionExpression", ...arguments);
  126762. }
  126763. function classBody(body) {
  126764. return (0, _builder.default)("ClassBody", ...arguments);
  126765. }
  126766. function classExpression(id, superClass, body, decorators) {
  126767. return (0, _builder.default)("ClassExpression", ...arguments);
  126768. }
  126769. function classDeclaration(id, superClass, body, decorators) {
  126770. return (0, _builder.default)("ClassDeclaration", ...arguments);
  126771. }
  126772. function exportAllDeclaration(source) {
  126773. return (0, _builder.default)("ExportAllDeclaration", ...arguments);
  126774. }
  126775. function exportDefaultDeclaration(declaration) {
  126776. return (0, _builder.default)("ExportDefaultDeclaration", ...arguments);
  126777. }
  126778. function exportNamedDeclaration(declaration, specifiers, source) {
  126779. return (0, _builder.default)("ExportNamedDeclaration", ...arguments);
  126780. }
  126781. function exportSpecifier(local, exported) {
  126782. return (0, _builder.default)("ExportSpecifier", ...arguments);
  126783. }
  126784. function forOfStatement(left, right, body, _await) {
  126785. return (0, _builder.default)("ForOfStatement", ...arguments);
  126786. }
  126787. function importDeclaration(specifiers, source) {
  126788. return (0, _builder.default)("ImportDeclaration", ...arguments);
  126789. }
  126790. function importDefaultSpecifier(local) {
  126791. return (0, _builder.default)("ImportDefaultSpecifier", ...arguments);
  126792. }
  126793. function importNamespaceSpecifier(local) {
  126794. return (0, _builder.default)("ImportNamespaceSpecifier", ...arguments);
  126795. }
  126796. function importSpecifier(local, imported) {
  126797. return (0, _builder.default)("ImportSpecifier", ...arguments);
  126798. }
  126799. function metaProperty(meta, property) {
  126800. return (0, _builder.default)("MetaProperty", ...arguments);
  126801. }
  126802. function classMethod(kind, key, params, body, computed, _static, generator, async) {
  126803. return (0, _builder.default)("ClassMethod", ...arguments);
  126804. }
  126805. function objectPattern(properties) {
  126806. return (0, _builder.default)("ObjectPattern", ...arguments);
  126807. }
  126808. function spreadElement(argument) {
  126809. return (0, _builder.default)("SpreadElement", ...arguments);
  126810. }
  126811. function _super() {
  126812. return (0, _builder.default)("Super", ...arguments);
  126813. }
  126814. function taggedTemplateExpression(tag, quasi) {
  126815. return (0, _builder.default)("TaggedTemplateExpression", ...arguments);
  126816. }
  126817. function templateElement(value, tail) {
  126818. return (0, _builder.default)("TemplateElement", ...arguments);
  126819. }
  126820. function templateLiteral(quasis, expressions) {
  126821. return (0, _builder.default)("TemplateLiteral", ...arguments);
  126822. }
  126823. function yieldExpression(argument, delegate) {
  126824. return (0, _builder.default)("YieldExpression", ...arguments);
  126825. }
  126826. function awaitExpression(argument) {
  126827. return (0, _builder.default)("AwaitExpression", ...arguments);
  126828. }
  126829. function _import() {
  126830. return (0, _builder.default)("Import", ...arguments);
  126831. }
  126832. function bigIntLiteral(value) {
  126833. return (0, _builder.default)("BigIntLiteral", ...arguments);
  126834. }
  126835. function exportNamespaceSpecifier(exported) {
  126836. return (0, _builder.default)("ExportNamespaceSpecifier", ...arguments);
  126837. }
  126838. function optionalMemberExpression(object, property, computed, optional) {
  126839. return (0, _builder.default)("OptionalMemberExpression", ...arguments);
  126840. }
  126841. function optionalCallExpression(callee, _arguments, optional) {
  126842. return (0, _builder.default)("OptionalCallExpression", ...arguments);
  126843. }
  126844. function anyTypeAnnotation() {
  126845. return (0, _builder.default)("AnyTypeAnnotation", ...arguments);
  126846. }
  126847. function arrayTypeAnnotation(elementType) {
  126848. return (0, _builder.default)("ArrayTypeAnnotation", ...arguments);
  126849. }
  126850. function booleanTypeAnnotation() {
  126851. return (0, _builder.default)("BooleanTypeAnnotation", ...arguments);
  126852. }
  126853. function booleanLiteralTypeAnnotation(value) {
  126854. return (0, _builder.default)("BooleanLiteralTypeAnnotation", ...arguments);
  126855. }
  126856. function nullLiteralTypeAnnotation() {
  126857. return (0, _builder.default)("NullLiteralTypeAnnotation", ...arguments);
  126858. }
  126859. function classImplements(id, typeParameters) {
  126860. return (0, _builder.default)("ClassImplements", ...arguments);
  126861. }
  126862. function declareClass(id, typeParameters, _extends, body) {
  126863. return (0, _builder.default)("DeclareClass", ...arguments);
  126864. }
  126865. function declareFunction(id) {
  126866. return (0, _builder.default)("DeclareFunction", ...arguments);
  126867. }
  126868. function declareInterface(id, typeParameters, _extends, body) {
  126869. return (0, _builder.default)("DeclareInterface", ...arguments);
  126870. }
  126871. function declareModule(id, body, kind) {
  126872. return (0, _builder.default)("DeclareModule", ...arguments);
  126873. }
  126874. function declareModuleExports(typeAnnotation2) {
  126875. return (0, _builder.default)("DeclareModuleExports", ...arguments);
  126876. }
  126877. function declareTypeAlias(id, typeParameters, right) {
  126878. return (0, _builder.default)("DeclareTypeAlias", ...arguments);
  126879. }
  126880. function declareOpaqueType(id, typeParameters, supertype) {
  126881. return (0, _builder.default)("DeclareOpaqueType", ...arguments);
  126882. }
  126883. function declareVariable(id) {
  126884. return (0, _builder.default)("DeclareVariable", ...arguments);
  126885. }
  126886. function declareExportDeclaration(declaration, specifiers, source) {
  126887. return (0, _builder.default)("DeclareExportDeclaration", ...arguments);
  126888. }
  126889. function declareExportAllDeclaration(source) {
  126890. return (0, _builder.default)("DeclareExportAllDeclaration", ...arguments);
  126891. }
  126892. function declaredPredicate(value) {
  126893. return (0, _builder.default)("DeclaredPredicate", ...arguments);
  126894. }
  126895. function existsTypeAnnotation() {
  126896. return (0, _builder.default)("ExistsTypeAnnotation", ...arguments);
  126897. }
  126898. function functionTypeAnnotation(typeParameters, params, rest, returnType) {
  126899. return (0, _builder.default)("FunctionTypeAnnotation", ...arguments);
  126900. }
  126901. function functionTypeParam(name2, typeAnnotation2) {
  126902. return (0, _builder.default)("FunctionTypeParam", ...arguments);
  126903. }
  126904. function genericTypeAnnotation(id, typeParameters) {
  126905. return (0, _builder.default)("GenericTypeAnnotation", ...arguments);
  126906. }
  126907. function inferredPredicate() {
  126908. return (0, _builder.default)("InferredPredicate", ...arguments);
  126909. }
  126910. function interfaceExtends(id, typeParameters) {
  126911. return (0, _builder.default)("InterfaceExtends", ...arguments);
  126912. }
  126913. function interfaceDeclaration(id, typeParameters, _extends, body) {
  126914. return (0, _builder.default)("InterfaceDeclaration", ...arguments);
  126915. }
  126916. function interfaceTypeAnnotation(_extends, body) {
  126917. return (0, _builder.default)("InterfaceTypeAnnotation", ...arguments);
  126918. }
  126919. function intersectionTypeAnnotation(types2) {
  126920. return (0, _builder.default)("IntersectionTypeAnnotation", ...arguments);
  126921. }
  126922. function mixedTypeAnnotation() {
  126923. return (0, _builder.default)("MixedTypeAnnotation", ...arguments);
  126924. }
  126925. function emptyTypeAnnotation() {
  126926. return (0, _builder.default)("EmptyTypeAnnotation", ...arguments);
  126927. }
  126928. function nullableTypeAnnotation(typeAnnotation2) {
  126929. return (0, _builder.default)("NullableTypeAnnotation", ...arguments);
  126930. }
  126931. function numberLiteralTypeAnnotation(value) {
  126932. return (0, _builder.default)("NumberLiteralTypeAnnotation", ...arguments);
  126933. }
  126934. function numberTypeAnnotation() {
  126935. return (0, _builder.default)("NumberTypeAnnotation", ...arguments);
  126936. }
  126937. function objectTypeAnnotation(properties, indexers, callProperties, internalSlots, exact) {
  126938. return (0, _builder.default)("ObjectTypeAnnotation", ...arguments);
  126939. }
  126940. function objectTypeInternalSlot(id, value, optional, _static, method) {
  126941. return (0, _builder.default)("ObjectTypeInternalSlot", ...arguments);
  126942. }
  126943. function objectTypeCallProperty(value) {
  126944. return (0, _builder.default)("ObjectTypeCallProperty", ...arguments);
  126945. }
  126946. function objectTypeIndexer(id, key, value, variance2) {
  126947. return (0, _builder.default)("ObjectTypeIndexer", ...arguments);
  126948. }
  126949. function objectTypeProperty(key, value, variance2) {
  126950. return (0, _builder.default)("ObjectTypeProperty", ...arguments);
  126951. }
  126952. function objectTypeSpreadProperty(argument) {
  126953. return (0, _builder.default)("ObjectTypeSpreadProperty", ...arguments);
  126954. }
  126955. function opaqueType(id, typeParameters, supertype, impltype) {
  126956. return (0, _builder.default)("OpaqueType", ...arguments);
  126957. }
  126958. function qualifiedTypeIdentifier(id, qualification) {
  126959. return (0, _builder.default)("QualifiedTypeIdentifier", ...arguments);
  126960. }
  126961. function stringLiteralTypeAnnotation(value) {
  126962. return (0, _builder.default)("StringLiteralTypeAnnotation", ...arguments);
  126963. }
  126964. function stringTypeAnnotation() {
  126965. return (0, _builder.default)("StringTypeAnnotation", ...arguments);
  126966. }
  126967. function symbolTypeAnnotation() {
  126968. return (0, _builder.default)("SymbolTypeAnnotation", ...arguments);
  126969. }
  126970. function thisTypeAnnotation() {
  126971. return (0, _builder.default)("ThisTypeAnnotation", ...arguments);
  126972. }
  126973. function tupleTypeAnnotation(types2) {
  126974. return (0, _builder.default)("TupleTypeAnnotation", ...arguments);
  126975. }
  126976. function typeofTypeAnnotation(argument) {
  126977. return (0, _builder.default)("TypeofTypeAnnotation", ...arguments);
  126978. }
  126979. function typeAlias(id, typeParameters, right) {
  126980. return (0, _builder.default)("TypeAlias", ...arguments);
  126981. }
  126982. function typeAnnotation(typeAnnotation2) {
  126983. return (0, _builder.default)("TypeAnnotation", ...arguments);
  126984. }
  126985. function typeCastExpression(expression, typeAnnotation2) {
  126986. return (0, _builder.default)("TypeCastExpression", ...arguments);
  126987. }
  126988. function typeParameter(bound, _default, variance2) {
  126989. return (0, _builder.default)("TypeParameter", ...arguments);
  126990. }
  126991. function typeParameterDeclaration(params) {
  126992. return (0, _builder.default)("TypeParameterDeclaration", ...arguments);
  126993. }
  126994. function typeParameterInstantiation(params) {
  126995. return (0, _builder.default)("TypeParameterInstantiation", ...arguments);
  126996. }
  126997. function unionTypeAnnotation(types2) {
  126998. return (0, _builder.default)("UnionTypeAnnotation", ...arguments);
  126999. }
  127000. function variance(kind) {
  127001. return (0, _builder.default)("Variance", ...arguments);
  127002. }
  127003. function voidTypeAnnotation() {
  127004. return (0, _builder.default)("VoidTypeAnnotation", ...arguments);
  127005. }
  127006. function enumDeclaration(id, body) {
  127007. return (0, _builder.default)("EnumDeclaration", ...arguments);
  127008. }
  127009. function enumBooleanBody(members) {
  127010. return (0, _builder.default)("EnumBooleanBody", ...arguments);
  127011. }
  127012. function enumNumberBody(members) {
  127013. return (0, _builder.default)("EnumNumberBody", ...arguments);
  127014. }
  127015. function enumStringBody(members) {
  127016. return (0, _builder.default)("EnumStringBody", ...arguments);
  127017. }
  127018. function enumSymbolBody(members) {
  127019. return (0, _builder.default)("EnumSymbolBody", ...arguments);
  127020. }
  127021. function enumBooleanMember(id) {
  127022. return (0, _builder.default)("EnumBooleanMember", ...arguments);
  127023. }
  127024. function enumNumberMember(id, init) {
  127025. return (0, _builder.default)("EnumNumberMember", ...arguments);
  127026. }
  127027. function enumStringMember(id, init) {
  127028. return (0, _builder.default)("EnumStringMember", ...arguments);
  127029. }
  127030. function enumDefaultedMember(id) {
  127031. return (0, _builder.default)("EnumDefaultedMember", ...arguments);
  127032. }
  127033. function indexedAccessType(objectType, indexType) {
  127034. return (0, _builder.default)("IndexedAccessType", ...arguments);
  127035. }
  127036. function optionalIndexedAccessType(objectType, indexType) {
  127037. return (0, _builder.default)("OptionalIndexedAccessType", ...arguments);
  127038. }
  127039. function jsxAttribute(name2, value) {
  127040. return (0, _builder.default)("JSXAttribute", ...arguments);
  127041. }
  127042. function jsxClosingElement(name2) {
  127043. return (0, _builder.default)("JSXClosingElement", ...arguments);
  127044. }
  127045. function jsxElement(openingElement, closingElement, children, selfClosing) {
  127046. return (0, _builder.default)("JSXElement", ...arguments);
  127047. }
  127048. function jsxEmptyExpression() {
  127049. return (0, _builder.default)("JSXEmptyExpression", ...arguments);
  127050. }
  127051. function jsxExpressionContainer(expression) {
  127052. return (0, _builder.default)("JSXExpressionContainer", ...arguments);
  127053. }
  127054. function jsxSpreadChild(expression) {
  127055. return (0, _builder.default)("JSXSpreadChild", ...arguments);
  127056. }
  127057. function jsxIdentifier(name2) {
  127058. return (0, _builder.default)("JSXIdentifier", ...arguments);
  127059. }
  127060. function jsxMemberExpression(object, property) {
  127061. return (0, _builder.default)("JSXMemberExpression", ...arguments);
  127062. }
  127063. function jsxNamespacedName(namespace, name2) {
  127064. return (0, _builder.default)("JSXNamespacedName", ...arguments);
  127065. }
  127066. function jsxOpeningElement(name2, attributes, selfClosing) {
  127067. return (0, _builder.default)("JSXOpeningElement", ...arguments);
  127068. }
  127069. function jsxSpreadAttribute(argument) {
  127070. return (0, _builder.default)("JSXSpreadAttribute", ...arguments);
  127071. }
  127072. function jsxText2(value) {
  127073. return (0, _builder.default)("JSXText", ...arguments);
  127074. }
  127075. function jsxFragment(openingFragment, closingFragment, children) {
  127076. return (0, _builder.default)("JSXFragment", ...arguments);
  127077. }
  127078. function jsxOpeningFragment() {
  127079. return (0, _builder.default)("JSXOpeningFragment", ...arguments);
  127080. }
  127081. function jsxClosingFragment() {
  127082. return (0, _builder.default)("JSXClosingFragment", ...arguments);
  127083. }
  127084. function noop() {
  127085. return (0, _builder.default)("Noop", ...arguments);
  127086. }
  127087. function placeholder(expectedNode, name2) {
  127088. return (0, _builder.default)("Placeholder", ...arguments);
  127089. }
  127090. function v8IntrinsicIdentifier(name2) {
  127091. return (0, _builder.default)("V8IntrinsicIdentifier", ...arguments);
  127092. }
  127093. function argumentPlaceholder() {
  127094. return (0, _builder.default)("ArgumentPlaceholder", ...arguments);
  127095. }
  127096. function bindExpression(object, callee) {
  127097. return (0, _builder.default)("BindExpression", ...arguments);
  127098. }
  127099. function classProperty(key, value, typeAnnotation2, decorators, computed, _static) {
  127100. return (0, _builder.default)("ClassProperty", ...arguments);
  127101. }
  127102. function pipelineTopicExpression(expression) {
  127103. return (0, _builder.default)("PipelineTopicExpression", ...arguments);
  127104. }
  127105. function pipelineBareFunction(callee) {
  127106. return (0, _builder.default)("PipelineBareFunction", ...arguments);
  127107. }
  127108. function pipelinePrimaryTopicReference() {
  127109. return (0, _builder.default)("PipelinePrimaryTopicReference", ...arguments);
  127110. }
  127111. function classPrivateProperty(key, value, decorators, _static) {
  127112. return (0, _builder.default)("ClassPrivateProperty", ...arguments);
  127113. }
  127114. function classPrivateMethod(kind, key, params, body, _static) {
  127115. return (0, _builder.default)("ClassPrivateMethod", ...arguments);
  127116. }
  127117. function importAttribute(key, value) {
  127118. return (0, _builder.default)("ImportAttribute", ...arguments);
  127119. }
  127120. function decorator(expression) {
  127121. return (0, _builder.default)("Decorator", ...arguments);
  127122. }
  127123. function doExpression(body, async) {
  127124. return (0, _builder.default)("DoExpression", ...arguments);
  127125. }
  127126. function exportDefaultSpecifier(exported) {
  127127. return (0, _builder.default)("ExportDefaultSpecifier", ...arguments);
  127128. }
  127129. function privateName(id) {
  127130. return (0, _builder.default)("PrivateName", ...arguments);
  127131. }
  127132. function recordExpression(properties) {
  127133. return (0, _builder.default)("RecordExpression", ...arguments);
  127134. }
  127135. function tupleExpression(elements) {
  127136. return (0, _builder.default)("TupleExpression", ...arguments);
  127137. }
  127138. function decimalLiteral(value) {
  127139. return (0, _builder.default)("DecimalLiteral", ...arguments);
  127140. }
  127141. function staticBlock(body) {
  127142. return (0, _builder.default)("StaticBlock", ...arguments);
  127143. }
  127144. function moduleExpression(body) {
  127145. return (0, _builder.default)("ModuleExpression", ...arguments);
  127146. }
  127147. function tsParameterProperty(parameter) {
  127148. return (0, _builder.default)("TSParameterProperty", ...arguments);
  127149. }
  127150. function tsDeclareFunction(id, typeParameters, params, returnType) {
  127151. return (0, _builder.default)("TSDeclareFunction", ...arguments);
  127152. }
  127153. function tsDeclareMethod(decorators, key, typeParameters, params, returnType) {
  127154. return (0, _builder.default)("TSDeclareMethod", ...arguments);
  127155. }
  127156. function tsQualifiedName(left, right) {
  127157. return (0, _builder.default)("TSQualifiedName", ...arguments);
  127158. }
  127159. function tsCallSignatureDeclaration(typeParameters, parameters, typeAnnotation2) {
  127160. return (0, _builder.default)("TSCallSignatureDeclaration", ...arguments);
  127161. }
  127162. function tsConstructSignatureDeclaration(typeParameters, parameters, typeAnnotation2) {
  127163. return (0, _builder.default)("TSConstructSignatureDeclaration", ...arguments);
  127164. }
  127165. function tsPropertySignature(key, typeAnnotation2, initializer) {
  127166. return (0, _builder.default)("TSPropertySignature", ...arguments);
  127167. }
  127168. function tsMethodSignature(key, typeParameters, parameters, typeAnnotation2) {
  127169. return (0, _builder.default)("TSMethodSignature", ...arguments);
  127170. }
  127171. function tsIndexSignature(parameters, typeAnnotation2) {
  127172. return (0, _builder.default)("TSIndexSignature", ...arguments);
  127173. }
  127174. function tsAnyKeyword() {
  127175. return (0, _builder.default)("TSAnyKeyword", ...arguments);
  127176. }
  127177. function tsBooleanKeyword() {
  127178. return (0, _builder.default)("TSBooleanKeyword", ...arguments);
  127179. }
  127180. function tsBigIntKeyword() {
  127181. return (0, _builder.default)("TSBigIntKeyword", ...arguments);
  127182. }
  127183. function tsIntrinsicKeyword() {
  127184. return (0, _builder.default)("TSIntrinsicKeyword", ...arguments);
  127185. }
  127186. function tsNeverKeyword() {
  127187. return (0, _builder.default)("TSNeverKeyword", ...arguments);
  127188. }
  127189. function tsNullKeyword() {
  127190. return (0, _builder.default)("TSNullKeyword", ...arguments);
  127191. }
  127192. function tsNumberKeyword() {
  127193. return (0, _builder.default)("TSNumberKeyword", ...arguments);
  127194. }
  127195. function tsObjectKeyword() {
  127196. return (0, _builder.default)("TSObjectKeyword", ...arguments);
  127197. }
  127198. function tsStringKeyword() {
  127199. return (0, _builder.default)("TSStringKeyword", ...arguments);
  127200. }
  127201. function tsSymbolKeyword() {
  127202. return (0, _builder.default)("TSSymbolKeyword", ...arguments);
  127203. }
  127204. function tsUndefinedKeyword() {
  127205. return (0, _builder.default)("TSUndefinedKeyword", ...arguments);
  127206. }
  127207. function tsUnknownKeyword() {
  127208. return (0, _builder.default)("TSUnknownKeyword", ...arguments);
  127209. }
  127210. function tsVoidKeyword() {
  127211. return (0, _builder.default)("TSVoidKeyword", ...arguments);
  127212. }
  127213. function tsThisType() {
  127214. return (0, _builder.default)("TSThisType", ...arguments);
  127215. }
  127216. function tsFunctionType(typeParameters, parameters, typeAnnotation2) {
  127217. return (0, _builder.default)("TSFunctionType", ...arguments);
  127218. }
  127219. function tsConstructorType(typeParameters, parameters, typeAnnotation2) {
  127220. return (0, _builder.default)("TSConstructorType", ...arguments);
  127221. }
  127222. function tsTypeReference(typeName, typeParameters) {
  127223. return (0, _builder.default)("TSTypeReference", ...arguments);
  127224. }
  127225. function tsTypePredicate(parameterName, typeAnnotation2, asserts) {
  127226. return (0, _builder.default)("TSTypePredicate", ...arguments);
  127227. }
  127228. function tsTypeQuery(exprName) {
  127229. return (0, _builder.default)("TSTypeQuery", ...arguments);
  127230. }
  127231. function tsTypeLiteral(members) {
  127232. return (0, _builder.default)("TSTypeLiteral", ...arguments);
  127233. }
  127234. function tsArrayType(elementType) {
  127235. return (0, _builder.default)("TSArrayType", ...arguments);
  127236. }
  127237. function tsTupleType(elementTypes) {
  127238. return (0, _builder.default)("TSTupleType", ...arguments);
  127239. }
  127240. function tsOptionalType(typeAnnotation2) {
  127241. return (0, _builder.default)("TSOptionalType", ...arguments);
  127242. }
  127243. function tsRestType(typeAnnotation2) {
  127244. return (0, _builder.default)("TSRestType", ...arguments);
  127245. }
  127246. function tsNamedTupleMember(label, elementType, optional) {
  127247. return (0, _builder.default)("TSNamedTupleMember", ...arguments);
  127248. }
  127249. function tsUnionType(types2) {
  127250. return (0, _builder.default)("TSUnionType", ...arguments);
  127251. }
  127252. function tsIntersectionType(types2) {
  127253. return (0, _builder.default)("TSIntersectionType", ...arguments);
  127254. }
  127255. function tsConditionalType(checkType, extendsType, trueType, falseType) {
  127256. return (0, _builder.default)("TSConditionalType", ...arguments);
  127257. }
  127258. function tsInferType(typeParameter2) {
  127259. return (0, _builder.default)("TSInferType", ...arguments);
  127260. }
  127261. function tsParenthesizedType(typeAnnotation2) {
  127262. return (0, _builder.default)("TSParenthesizedType", ...arguments);
  127263. }
  127264. function tsTypeOperator(typeAnnotation2) {
  127265. return (0, _builder.default)("TSTypeOperator", ...arguments);
  127266. }
  127267. function tsIndexedAccessType(objectType, indexType) {
  127268. return (0, _builder.default)("TSIndexedAccessType", ...arguments);
  127269. }
  127270. function tsMappedType(typeParameter2, typeAnnotation2, nameType) {
  127271. return (0, _builder.default)("TSMappedType", ...arguments);
  127272. }
  127273. function tsLiteralType(literal2) {
  127274. return (0, _builder.default)("TSLiteralType", ...arguments);
  127275. }
  127276. function tsExpressionWithTypeArguments(expression, typeParameters) {
  127277. return (0, _builder.default)("TSExpressionWithTypeArguments", ...arguments);
  127278. }
  127279. function tsInterfaceDeclaration(id, typeParameters, _extends, body) {
  127280. return (0, _builder.default)("TSInterfaceDeclaration", ...arguments);
  127281. }
  127282. function tsInterfaceBody(body) {
  127283. return (0, _builder.default)("TSInterfaceBody", ...arguments);
  127284. }
  127285. function tsTypeAliasDeclaration(id, typeParameters, typeAnnotation2) {
  127286. return (0, _builder.default)("TSTypeAliasDeclaration", ...arguments);
  127287. }
  127288. function tsAsExpression(expression, typeAnnotation2) {
  127289. return (0, _builder.default)("TSAsExpression", ...arguments);
  127290. }
  127291. function tsTypeAssertion(typeAnnotation2, expression) {
  127292. return (0, _builder.default)("TSTypeAssertion", ...arguments);
  127293. }
  127294. function tsEnumDeclaration(id, members) {
  127295. return (0, _builder.default)("TSEnumDeclaration", ...arguments);
  127296. }
  127297. function tsEnumMember(id, initializer) {
  127298. return (0, _builder.default)("TSEnumMember", ...arguments);
  127299. }
  127300. function tsModuleDeclaration(id, body) {
  127301. return (0, _builder.default)("TSModuleDeclaration", ...arguments);
  127302. }
  127303. function tsModuleBlock(body) {
  127304. return (0, _builder.default)("TSModuleBlock", ...arguments);
  127305. }
  127306. function tsImportType(argument, qualifier, typeParameters) {
  127307. return (0, _builder.default)("TSImportType", ...arguments);
  127308. }
  127309. function tsImportEqualsDeclaration(id, moduleReference) {
  127310. return (0, _builder.default)("TSImportEqualsDeclaration", ...arguments);
  127311. }
  127312. function tsExternalModuleReference(expression) {
  127313. return (0, _builder.default)("TSExternalModuleReference", ...arguments);
  127314. }
  127315. function tsNonNullExpression(expression) {
  127316. return (0, _builder.default)("TSNonNullExpression", ...arguments);
  127317. }
  127318. function tsExportAssignment(expression) {
  127319. return (0, _builder.default)("TSExportAssignment", ...arguments);
  127320. }
  127321. function tsNamespaceExportDeclaration(id) {
  127322. return (0, _builder.default)("TSNamespaceExportDeclaration", ...arguments);
  127323. }
  127324. function tsTypeAnnotation(typeAnnotation2) {
  127325. return (0, _builder.default)("TSTypeAnnotation", ...arguments);
  127326. }
  127327. function tsTypeParameterInstantiation(params) {
  127328. return (0, _builder.default)("TSTypeParameterInstantiation", ...arguments);
  127329. }
  127330. function tsTypeParameterDeclaration(params) {
  127331. return (0, _builder.default)("TSTypeParameterDeclaration", ...arguments);
  127332. }
  127333. function tsTypeParameter(constraint, _default, name2) {
  127334. return (0, _builder.default)("TSTypeParameter", ...arguments);
  127335. }
  127336. function NumberLiteral(...args) {
  127337. console.trace("The node type NumberLiteral has been renamed to NumericLiteral");
  127338. return (0, _builder.default)("NumberLiteral", ...args);
  127339. }
  127340. function RegexLiteral(...args) {
  127341. console.trace("The node type RegexLiteral has been renamed to RegExpLiteral");
  127342. return (0, _builder.default)("RegexLiteral", ...args);
  127343. }
  127344. function RestProperty(...args) {
  127345. console.trace("The node type RestProperty has been renamed to RestElement");
  127346. return (0, _builder.default)("RestProperty", ...args);
  127347. }
  127348. function SpreadProperty(...args) {
  127349. console.trace("The node type SpreadProperty has been renamed to SpreadElement");
  127350. return (0, _builder.default)("SpreadProperty", ...args);
  127351. }
  127352. }
  127353. });
  127354. // node_modules/@babel/template/node_modules/@babel/types/lib/utils/react/cleanJSXElementLiteralChild.js
  127355. var require_cleanJSXElementLiteralChild6 = __commonJS({
  127356. "node_modules/@babel/template/node_modules/@babel/types/lib/utils/react/cleanJSXElementLiteralChild.js"(exports) {
  127357. "use strict";
  127358. Object.defineProperty(exports, "__esModule", {
  127359. value: true
  127360. });
  127361. exports.default = cleanJSXElementLiteralChild;
  127362. var _generated = require_generated27();
  127363. function cleanJSXElementLiteralChild(child, args) {
  127364. const lines = child.value.split(/\r\n|\n|\r/);
  127365. let lastNonEmptyLine = 0;
  127366. for (let i = 0; i < lines.length; i++) {
  127367. if (lines[i].match(/[^ \t]/)) {
  127368. lastNonEmptyLine = i;
  127369. }
  127370. }
  127371. let str = "";
  127372. for (let i = 0; i < lines.length; i++) {
  127373. const line = lines[i];
  127374. const isFirstLine = i === 0;
  127375. const isLastLine = i === lines.length - 1;
  127376. const isLastNonEmptyLine = i === lastNonEmptyLine;
  127377. let trimmedLine = line.replace(/\t/g, " ");
  127378. if (!isFirstLine) {
  127379. trimmedLine = trimmedLine.replace(/^[ ]+/, "");
  127380. }
  127381. if (!isLastLine) {
  127382. trimmedLine = trimmedLine.replace(/[ ]+$/, "");
  127383. }
  127384. if (trimmedLine) {
  127385. if (!isLastNonEmptyLine) {
  127386. trimmedLine += " ";
  127387. }
  127388. str += trimmedLine;
  127389. }
  127390. }
  127391. if (str)
  127392. args.push((0, _generated.stringLiteral)(str));
  127393. }
  127394. }
  127395. });
  127396. // node_modules/@babel/template/node_modules/@babel/types/lib/builders/react/buildChildren.js
  127397. var require_buildChildren6 = __commonJS({
  127398. "node_modules/@babel/template/node_modules/@babel/types/lib/builders/react/buildChildren.js"(exports) {
  127399. "use strict";
  127400. Object.defineProperty(exports, "__esModule", {
  127401. value: true
  127402. });
  127403. exports.default = buildChildren;
  127404. var _generated = require_generated26();
  127405. var _cleanJSXElementLiteralChild = require_cleanJSXElementLiteralChild6();
  127406. function buildChildren(node) {
  127407. const elements = [];
  127408. for (let i = 0; i < node.children.length; i++) {
  127409. let child = node.children[i];
  127410. if ((0, _generated.isJSXText)(child)) {
  127411. (0, _cleanJSXElementLiteralChild.default)(child, elements);
  127412. continue;
  127413. }
  127414. if ((0, _generated.isJSXExpressionContainer)(child))
  127415. child = child.expression;
  127416. if ((0, _generated.isJSXEmptyExpression)(child))
  127417. continue;
  127418. elements.push(child);
  127419. }
  127420. return elements;
  127421. }
  127422. }
  127423. });
  127424. // node_modules/@babel/template/node_modules/@babel/types/lib/validators/isNode.js
  127425. var require_isNode6 = __commonJS({
  127426. "node_modules/@babel/template/node_modules/@babel/types/lib/validators/isNode.js"(exports) {
  127427. "use strict";
  127428. Object.defineProperty(exports, "__esModule", {
  127429. value: true
  127430. });
  127431. exports.default = isNode;
  127432. var _definitions = require_definitions6();
  127433. function isNode(node) {
  127434. return !!(node && _definitions.VISITOR_KEYS[node.type]);
  127435. }
  127436. }
  127437. });
  127438. // node_modules/@babel/template/node_modules/@babel/types/lib/asserts/assertNode.js
  127439. var require_assertNode6 = __commonJS({
  127440. "node_modules/@babel/template/node_modules/@babel/types/lib/asserts/assertNode.js"(exports) {
  127441. "use strict";
  127442. Object.defineProperty(exports, "__esModule", {
  127443. value: true
  127444. });
  127445. exports.default = assertNode2;
  127446. var _isNode = require_isNode6();
  127447. function assertNode2(node) {
  127448. if (!(0, _isNode.default)(node)) {
  127449. var _node$type;
  127450. const type = (_node$type = node == null ? void 0 : node.type) != null ? _node$type : JSON.stringify(node);
  127451. throw new TypeError(`Not a valid node of type "${type}"`);
  127452. }
  127453. }
  127454. }
  127455. });
  127456. // node_modules/@babel/template/node_modules/@babel/types/lib/asserts/generated/index.js
  127457. var require_generated28 = __commonJS({
  127458. "node_modules/@babel/template/node_modules/@babel/types/lib/asserts/generated/index.js"(exports) {
  127459. "use strict";
  127460. Object.defineProperty(exports, "__esModule", {
  127461. value: true
  127462. });
  127463. exports.assertArrayExpression = assertArrayExpression;
  127464. exports.assertAssignmentExpression = assertAssignmentExpression;
  127465. exports.assertBinaryExpression = assertBinaryExpression;
  127466. exports.assertInterpreterDirective = assertInterpreterDirective;
  127467. exports.assertDirective = assertDirective;
  127468. exports.assertDirectiveLiteral = assertDirectiveLiteral;
  127469. exports.assertBlockStatement = assertBlockStatement;
  127470. exports.assertBreakStatement = assertBreakStatement;
  127471. exports.assertCallExpression = assertCallExpression;
  127472. exports.assertCatchClause = assertCatchClause;
  127473. exports.assertConditionalExpression = assertConditionalExpression;
  127474. exports.assertContinueStatement = assertContinueStatement;
  127475. exports.assertDebuggerStatement = assertDebuggerStatement;
  127476. exports.assertDoWhileStatement = assertDoWhileStatement;
  127477. exports.assertEmptyStatement = assertEmptyStatement;
  127478. exports.assertExpressionStatement = assertExpressionStatement;
  127479. exports.assertFile = assertFile;
  127480. exports.assertForInStatement = assertForInStatement;
  127481. exports.assertForStatement = assertForStatement;
  127482. exports.assertFunctionDeclaration = assertFunctionDeclaration;
  127483. exports.assertFunctionExpression = assertFunctionExpression;
  127484. exports.assertIdentifier = assertIdentifier;
  127485. exports.assertIfStatement = assertIfStatement;
  127486. exports.assertLabeledStatement = assertLabeledStatement;
  127487. exports.assertStringLiteral = assertStringLiteral;
  127488. exports.assertNumericLiteral = assertNumericLiteral;
  127489. exports.assertNullLiteral = assertNullLiteral;
  127490. exports.assertBooleanLiteral = assertBooleanLiteral;
  127491. exports.assertRegExpLiteral = assertRegExpLiteral;
  127492. exports.assertLogicalExpression = assertLogicalExpression;
  127493. exports.assertMemberExpression = assertMemberExpression;
  127494. exports.assertNewExpression = assertNewExpression;
  127495. exports.assertProgram = assertProgram;
  127496. exports.assertObjectExpression = assertObjectExpression;
  127497. exports.assertObjectMethod = assertObjectMethod;
  127498. exports.assertObjectProperty = assertObjectProperty;
  127499. exports.assertRestElement = assertRestElement;
  127500. exports.assertReturnStatement = assertReturnStatement;
  127501. exports.assertSequenceExpression = assertSequenceExpression;
  127502. exports.assertParenthesizedExpression = assertParenthesizedExpression;
  127503. exports.assertSwitchCase = assertSwitchCase;
  127504. exports.assertSwitchStatement = assertSwitchStatement;
  127505. exports.assertThisExpression = assertThisExpression;
  127506. exports.assertThrowStatement = assertThrowStatement;
  127507. exports.assertTryStatement = assertTryStatement;
  127508. exports.assertUnaryExpression = assertUnaryExpression;
  127509. exports.assertUpdateExpression = assertUpdateExpression;
  127510. exports.assertVariableDeclaration = assertVariableDeclaration;
  127511. exports.assertVariableDeclarator = assertVariableDeclarator;
  127512. exports.assertWhileStatement = assertWhileStatement;
  127513. exports.assertWithStatement = assertWithStatement;
  127514. exports.assertAssignmentPattern = assertAssignmentPattern;
  127515. exports.assertArrayPattern = assertArrayPattern;
  127516. exports.assertArrowFunctionExpression = assertArrowFunctionExpression;
  127517. exports.assertClassBody = assertClassBody;
  127518. exports.assertClassExpression = assertClassExpression;
  127519. exports.assertClassDeclaration = assertClassDeclaration;
  127520. exports.assertExportAllDeclaration = assertExportAllDeclaration;
  127521. exports.assertExportDefaultDeclaration = assertExportDefaultDeclaration;
  127522. exports.assertExportNamedDeclaration = assertExportNamedDeclaration;
  127523. exports.assertExportSpecifier = assertExportSpecifier;
  127524. exports.assertForOfStatement = assertForOfStatement;
  127525. exports.assertImportDeclaration = assertImportDeclaration;
  127526. exports.assertImportDefaultSpecifier = assertImportDefaultSpecifier;
  127527. exports.assertImportNamespaceSpecifier = assertImportNamespaceSpecifier;
  127528. exports.assertImportSpecifier = assertImportSpecifier;
  127529. exports.assertMetaProperty = assertMetaProperty;
  127530. exports.assertClassMethod = assertClassMethod;
  127531. exports.assertObjectPattern = assertObjectPattern;
  127532. exports.assertSpreadElement = assertSpreadElement;
  127533. exports.assertSuper = assertSuper;
  127534. exports.assertTaggedTemplateExpression = assertTaggedTemplateExpression;
  127535. exports.assertTemplateElement = assertTemplateElement;
  127536. exports.assertTemplateLiteral = assertTemplateLiteral;
  127537. exports.assertYieldExpression = assertYieldExpression;
  127538. exports.assertAwaitExpression = assertAwaitExpression;
  127539. exports.assertImport = assertImport;
  127540. exports.assertBigIntLiteral = assertBigIntLiteral;
  127541. exports.assertExportNamespaceSpecifier = assertExportNamespaceSpecifier;
  127542. exports.assertOptionalMemberExpression = assertOptionalMemberExpression;
  127543. exports.assertOptionalCallExpression = assertOptionalCallExpression;
  127544. exports.assertAnyTypeAnnotation = assertAnyTypeAnnotation;
  127545. exports.assertArrayTypeAnnotation = assertArrayTypeAnnotation;
  127546. exports.assertBooleanTypeAnnotation = assertBooleanTypeAnnotation;
  127547. exports.assertBooleanLiteralTypeAnnotation = assertBooleanLiteralTypeAnnotation;
  127548. exports.assertNullLiteralTypeAnnotation = assertNullLiteralTypeAnnotation;
  127549. exports.assertClassImplements = assertClassImplements;
  127550. exports.assertDeclareClass = assertDeclareClass;
  127551. exports.assertDeclareFunction = assertDeclareFunction;
  127552. exports.assertDeclareInterface = assertDeclareInterface;
  127553. exports.assertDeclareModule = assertDeclareModule;
  127554. exports.assertDeclareModuleExports = assertDeclareModuleExports;
  127555. exports.assertDeclareTypeAlias = assertDeclareTypeAlias;
  127556. exports.assertDeclareOpaqueType = assertDeclareOpaqueType;
  127557. exports.assertDeclareVariable = assertDeclareVariable;
  127558. exports.assertDeclareExportDeclaration = assertDeclareExportDeclaration;
  127559. exports.assertDeclareExportAllDeclaration = assertDeclareExportAllDeclaration;
  127560. exports.assertDeclaredPredicate = assertDeclaredPredicate;
  127561. exports.assertExistsTypeAnnotation = assertExistsTypeAnnotation;
  127562. exports.assertFunctionTypeAnnotation = assertFunctionTypeAnnotation;
  127563. exports.assertFunctionTypeParam = assertFunctionTypeParam;
  127564. exports.assertGenericTypeAnnotation = assertGenericTypeAnnotation;
  127565. exports.assertInferredPredicate = assertInferredPredicate;
  127566. exports.assertInterfaceExtends = assertInterfaceExtends;
  127567. exports.assertInterfaceDeclaration = assertInterfaceDeclaration;
  127568. exports.assertInterfaceTypeAnnotation = assertInterfaceTypeAnnotation;
  127569. exports.assertIntersectionTypeAnnotation = assertIntersectionTypeAnnotation;
  127570. exports.assertMixedTypeAnnotation = assertMixedTypeAnnotation;
  127571. exports.assertEmptyTypeAnnotation = assertEmptyTypeAnnotation;
  127572. exports.assertNullableTypeAnnotation = assertNullableTypeAnnotation;
  127573. exports.assertNumberLiteralTypeAnnotation = assertNumberLiteralTypeAnnotation;
  127574. exports.assertNumberTypeAnnotation = assertNumberTypeAnnotation;
  127575. exports.assertObjectTypeAnnotation = assertObjectTypeAnnotation;
  127576. exports.assertObjectTypeInternalSlot = assertObjectTypeInternalSlot;
  127577. exports.assertObjectTypeCallProperty = assertObjectTypeCallProperty;
  127578. exports.assertObjectTypeIndexer = assertObjectTypeIndexer;
  127579. exports.assertObjectTypeProperty = assertObjectTypeProperty;
  127580. exports.assertObjectTypeSpreadProperty = assertObjectTypeSpreadProperty;
  127581. exports.assertOpaqueType = assertOpaqueType;
  127582. exports.assertQualifiedTypeIdentifier = assertQualifiedTypeIdentifier;
  127583. exports.assertStringLiteralTypeAnnotation = assertStringLiteralTypeAnnotation;
  127584. exports.assertStringTypeAnnotation = assertStringTypeAnnotation;
  127585. exports.assertSymbolTypeAnnotation = assertSymbolTypeAnnotation;
  127586. exports.assertThisTypeAnnotation = assertThisTypeAnnotation;
  127587. exports.assertTupleTypeAnnotation = assertTupleTypeAnnotation;
  127588. exports.assertTypeofTypeAnnotation = assertTypeofTypeAnnotation;
  127589. exports.assertTypeAlias = assertTypeAlias;
  127590. exports.assertTypeAnnotation = assertTypeAnnotation;
  127591. exports.assertTypeCastExpression = assertTypeCastExpression;
  127592. exports.assertTypeParameter = assertTypeParameter;
  127593. exports.assertTypeParameterDeclaration = assertTypeParameterDeclaration;
  127594. exports.assertTypeParameterInstantiation = assertTypeParameterInstantiation;
  127595. exports.assertUnionTypeAnnotation = assertUnionTypeAnnotation;
  127596. exports.assertVariance = assertVariance;
  127597. exports.assertVoidTypeAnnotation = assertVoidTypeAnnotation;
  127598. exports.assertEnumDeclaration = assertEnumDeclaration;
  127599. exports.assertEnumBooleanBody = assertEnumBooleanBody;
  127600. exports.assertEnumNumberBody = assertEnumNumberBody;
  127601. exports.assertEnumStringBody = assertEnumStringBody;
  127602. exports.assertEnumSymbolBody = assertEnumSymbolBody;
  127603. exports.assertEnumBooleanMember = assertEnumBooleanMember;
  127604. exports.assertEnumNumberMember = assertEnumNumberMember;
  127605. exports.assertEnumStringMember = assertEnumStringMember;
  127606. exports.assertEnumDefaultedMember = assertEnumDefaultedMember;
  127607. exports.assertIndexedAccessType = assertIndexedAccessType;
  127608. exports.assertOptionalIndexedAccessType = assertOptionalIndexedAccessType;
  127609. exports.assertJSXAttribute = assertJSXAttribute;
  127610. exports.assertJSXClosingElement = assertJSXClosingElement;
  127611. exports.assertJSXElement = assertJSXElement;
  127612. exports.assertJSXEmptyExpression = assertJSXEmptyExpression;
  127613. exports.assertJSXExpressionContainer = assertJSXExpressionContainer;
  127614. exports.assertJSXSpreadChild = assertJSXSpreadChild;
  127615. exports.assertJSXIdentifier = assertJSXIdentifier;
  127616. exports.assertJSXMemberExpression = assertJSXMemberExpression;
  127617. exports.assertJSXNamespacedName = assertJSXNamespacedName;
  127618. exports.assertJSXOpeningElement = assertJSXOpeningElement;
  127619. exports.assertJSXSpreadAttribute = assertJSXSpreadAttribute;
  127620. exports.assertJSXText = assertJSXText;
  127621. exports.assertJSXFragment = assertJSXFragment;
  127622. exports.assertJSXOpeningFragment = assertJSXOpeningFragment;
  127623. exports.assertJSXClosingFragment = assertJSXClosingFragment;
  127624. exports.assertNoop = assertNoop;
  127625. exports.assertPlaceholder = assertPlaceholder;
  127626. exports.assertV8IntrinsicIdentifier = assertV8IntrinsicIdentifier;
  127627. exports.assertArgumentPlaceholder = assertArgumentPlaceholder;
  127628. exports.assertBindExpression = assertBindExpression;
  127629. exports.assertClassProperty = assertClassProperty;
  127630. exports.assertPipelineTopicExpression = assertPipelineTopicExpression;
  127631. exports.assertPipelineBareFunction = assertPipelineBareFunction;
  127632. exports.assertPipelinePrimaryTopicReference = assertPipelinePrimaryTopicReference;
  127633. exports.assertClassPrivateProperty = assertClassPrivateProperty;
  127634. exports.assertClassPrivateMethod = assertClassPrivateMethod;
  127635. exports.assertImportAttribute = assertImportAttribute;
  127636. exports.assertDecorator = assertDecorator;
  127637. exports.assertDoExpression = assertDoExpression;
  127638. exports.assertExportDefaultSpecifier = assertExportDefaultSpecifier;
  127639. exports.assertPrivateName = assertPrivateName;
  127640. exports.assertRecordExpression = assertRecordExpression;
  127641. exports.assertTupleExpression = assertTupleExpression;
  127642. exports.assertDecimalLiteral = assertDecimalLiteral;
  127643. exports.assertStaticBlock = assertStaticBlock;
  127644. exports.assertModuleExpression = assertModuleExpression;
  127645. exports.assertTSParameterProperty = assertTSParameterProperty;
  127646. exports.assertTSDeclareFunction = assertTSDeclareFunction;
  127647. exports.assertTSDeclareMethod = assertTSDeclareMethod;
  127648. exports.assertTSQualifiedName = assertTSQualifiedName;
  127649. exports.assertTSCallSignatureDeclaration = assertTSCallSignatureDeclaration;
  127650. exports.assertTSConstructSignatureDeclaration = assertTSConstructSignatureDeclaration;
  127651. exports.assertTSPropertySignature = assertTSPropertySignature;
  127652. exports.assertTSMethodSignature = assertTSMethodSignature;
  127653. exports.assertTSIndexSignature = assertTSIndexSignature;
  127654. exports.assertTSAnyKeyword = assertTSAnyKeyword;
  127655. exports.assertTSBooleanKeyword = assertTSBooleanKeyword;
  127656. exports.assertTSBigIntKeyword = assertTSBigIntKeyword;
  127657. exports.assertTSIntrinsicKeyword = assertTSIntrinsicKeyword;
  127658. exports.assertTSNeverKeyword = assertTSNeverKeyword;
  127659. exports.assertTSNullKeyword = assertTSNullKeyword;
  127660. exports.assertTSNumberKeyword = assertTSNumberKeyword;
  127661. exports.assertTSObjectKeyword = assertTSObjectKeyword;
  127662. exports.assertTSStringKeyword = assertTSStringKeyword;
  127663. exports.assertTSSymbolKeyword = assertTSSymbolKeyword;
  127664. exports.assertTSUndefinedKeyword = assertTSUndefinedKeyword;
  127665. exports.assertTSUnknownKeyword = assertTSUnknownKeyword;
  127666. exports.assertTSVoidKeyword = assertTSVoidKeyword;
  127667. exports.assertTSThisType = assertTSThisType;
  127668. exports.assertTSFunctionType = assertTSFunctionType;
  127669. exports.assertTSConstructorType = assertTSConstructorType;
  127670. exports.assertTSTypeReference = assertTSTypeReference;
  127671. exports.assertTSTypePredicate = assertTSTypePredicate;
  127672. exports.assertTSTypeQuery = assertTSTypeQuery;
  127673. exports.assertTSTypeLiteral = assertTSTypeLiteral;
  127674. exports.assertTSArrayType = assertTSArrayType;
  127675. exports.assertTSTupleType = assertTSTupleType;
  127676. exports.assertTSOptionalType = assertTSOptionalType;
  127677. exports.assertTSRestType = assertTSRestType;
  127678. exports.assertTSNamedTupleMember = assertTSNamedTupleMember;
  127679. exports.assertTSUnionType = assertTSUnionType;
  127680. exports.assertTSIntersectionType = assertTSIntersectionType;
  127681. exports.assertTSConditionalType = assertTSConditionalType;
  127682. exports.assertTSInferType = assertTSInferType;
  127683. exports.assertTSParenthesizedType = assertTSParenthesizedType;
  127684. exports.assertTSTypeOperator = assertTSTypeOperator;
  127685. exports.assertTSIndexedAccessType = assertTSIndexedAccessType;
  127686. exports.assertTSMappedType = assertTSMappedType;
  127687. exports.assertTSLiteralType = assertTSLiteralType;
  127688. exports.assertTSExpressionWithTypeArguments = assertTSExpressionWithTypeArguments;
  127689. exports.assertTSInterfaceDeclaration = assertTSInterfaceDeclaration;
  127690. exports.assertTSInterfaceBody = assertTSInterfaceBody;
  127691. exports.assertTSTypeAliasDeclaration = assertTSTypeAliasDeclaration;
  127692. exports.assertTSAsExpression = assertTSAsExpression;
  127693. exports.assertTSTypeAssertion = assertTSTypeAssertion;
  127694. exports.assertTSEnumDeclaration = assertTSEnumDeclaration;
  127695. exports.assertTSEnumMember = assertTSEnumMember;
  127696. exports.assertTSModuleDeclaration = assertTSModuleDeclaration;
  127697. exports.assertTSModuleBlock = assertTSModuleBlock;
  127698. exports.assertTSImportType = assertTSImportType;
  127699. exports.assertTSImportEqualsDeclaration = assertTSImportEqualsDeclaration;
  127700. exports.assertTSExternalModuleReference = assertTSExternalModuleReference;
  127701. exports.assertTSNonNullExpression = assertTSNonNullExpression;
  127702. exports.assertTSExportAssignment = assertTSExportAssignment;
  127703. exports.assertTSNamespaceExportDeclaration = assertTSNamespaceExportDeclaration;
  127704. exports.assertTSTypeAnnotation = assertTSTypeAnnotation;
  127705. exports.assertTSTypeParameterInstantiation = assertTSTypeParameterInstantiation;
  127706. exports.assertTSTypeParameterDeclaration = assertTSTypeParameterDeclaration;
  127707. exports.assertTSTypeParameter = assertTSTypeParameter;
  127708. exports.assertExpression = assertExpression;
  127709. exports.assertBinary = assertBinary;
  127710. exports.assertScopable = assertScopable;
  127711. exports.assertBlockParent = assertBlockParent;
  127712. exports.assertBlock = assertBlock;
  127713. exports.assertStatement = assertStatement;
  127714. exports.assertTerminatorless = assertTerminatorless;
  127715. exports.assertCompletionStatement = assertCompletionStatement;
  127716. exports.assertConditional = assertConditional;
  127717. exports.assertLoop = assertLoop;
  127718. exports.assertWhile = assertWhile;
  127719. exports.assertExpressionWrapper = assertExpressionWrapper;
  127720. exports.assertFor = assertFor;
  127721. exports.assertForXStatement = assertForXStatement;
  127722. exports.assertFunction = assertFunction;
  127723. exports.assertFunctionParent = assertFunctionParent;
  127724. exports.assertPureish = assertPureish;
  127725. exports.assertDeclaration = assertDeclaration;
  127726. exports.assertPatternLike = assertPatternLike;
  127727. exports.assertLVal = assertLVal;
  127728. exports.assertTSEntityName = assertTSEntityName;
  127729. exports.assertLiteral = assertLiteral;
  127730. exports.assertImmutable = assertImmutable;
  127731. exports.assertUserWhitespacable = assertUserWhitespacable;
  127732. exports.assertMethod = assertMethod;
  127733. exports.assertObjectMember = assertObjectMember;
  127734. exports.assertProperty = assertProperty;
  127735. exports.assertUnaryLike = assertUnaryLike;
  127736. exports.assertPattern = assertPattern;
  127737. exports.assertClass = assertClass;
  127738. exports.assertModuleDeclaration = assertModuleDeclaration;
  127739. exports.assertExportDeclaration = assertExportDeclaration;
  127740. exports.assertModuleSpecifier = assertModuleSpecifier;
  127741. exports.assertFlow = assertFlow;
  127742. exports.assertFlowType = assertFlowType;
  127743. exports.assertFlowBaseAnnotation = assertFlowBaseAnnotation;
  127744. exports.assertFlowDeclaration = assertFlowDeclaration;
  127745. exports.assertFlowPredicate = assertFlowPredicate;
  127746. exports.assertEnumBody = assertEnumBody;
  127747. exports.assertEnumMember = assertEnumMember;
  127748. exports.assertJSX = assertJSX;
  127749. exports.assertPrivate = assertPrivate;
  127750. exports.assertTSTypeElement = assertTSTypeElement;
  127751. exports.assertTSType = assertTSType;
  127752. exports.assertTSBaseType = assertTSBaseType;
  127753. exports.assertNumberLiteral = assertNumberLiteral;
  127754. exports.assertRegexLiteral = assertRegexLiteral;
  127755. exports.assertRestProperty = assertRestProperty;
  127756. exports.assertSpreadProperty = assertSpreadProperty;
  127757. var _is = require_is6();
  127758. function assert(type, node, opts) {
  127759. if (!(0, _is.default)(type, node, opts)) {
  127760. throw new Error(`Expected type "${type}" with option ${JSON.stringify(opts)}, but instead got "${node.type}".`);
  127761. }
  127762. }
  127763. function assertArrayExpression(node, opts) {
  127764. assert("ArrayExpression", node, opts);
  127765. }
  127766. function assertAssignmentExpression(node, opts) {
  127767. assert("AssignmentExpression", node, opts);
  127768. }
  127769. function assertBinaryExpression(node, opts) {
  127770. assert("BinaryExpression", node, opts);
  127771. }
  127772. function assertInterpreterDirective(node, opts) {
  127773. assert("InterpreterDirective", node, opts);
  127774. }
  127775. function assertDirective(node, opts) {
  127776. assert("Directive", node, opts);
  127777. }
  127778. function assertDirectiveLiteral(node, opts) {
  127779. assert("DirectiveLiteral", node, opts);
  127780. }
  127781. function assertBlockStatement(node, opts) {
  127782. assert("BlockStatement", node, opts);
  127783. }
  127784. function assertBreakStatement(node, opts) {
  127785. assert("BreakStatement", node, opts);
  127786. }
  127787. function assertCallExpression(node, opts) {
  127788. assert("CallExpression", node, opts);
  127789. }
  127790. function assertCatchClause(node, opts) {
  127791. assert("CatchClause", node, opts);
  127792. }
  127793. function assertConditionalExpression(node, opts) {
  127794. assert("ConditionalExpression", node, opts);
  127795. }
  127796. function assertContinueStatement(node, opts) {
  127797. assert("ContinueStatement", node, opts);
  127798. }
  127799. function assertDebuggerStatement(node, opts) {
  127800. assert("DebuggerStatement", node, opts);
  127801. }
  127802. function assertDoWhileStatement(node, opts) {
  127803. assert("DoWhileStatement", node, opts);
  127804. }
  127805. function assertEmptyStatement(node, opts) {
  127806. assert("EmptyStatement", node, opts);
  127807. }
  127808. function assertExpressionStatement(node, opts) {
  127809. assert("ExpressionStatement", node, opts);
  127810. }
  127811. function assertFile(node, opts) {
  127812. assert("File", node, opts);
  127813. }
  127814. function assertForInStatement(node, opts) {
  127815. assert("ForInStatement", node, opts);
  127816. }
  127817. function assertForStatement(node, opts) {
  127818. assert("ForStatement", node, opts);
  127819. }
  127820. function assertFunctionDeclaration(node, opts) {
  127821. assert("FunctionDeclaration", node, opts);
  127822. }
  127823. function assertFunctionExpression(node, opts) {
  127824. assert("FunctionExpression", node, opts);
  127825. }
  127826. function assertIdentifier(node, opts) {
  127827. assert("Identifier", node, opts);
  127828. }
  127829. function assertIfStatement(node, opts) {
  127830. assert("IfStatement", node, opts);
  127831. }
  127832. function assertLabeledStatement(node, opts) {
  127833. assert("LabeledStatement", node, opts);
  127834. }
  127835. function assertStringLiteral(node, opts) {
  127836. assert("StringLiteral", node, opts);
  127837. }
  127838. function assertNumericLiteral(node, opts) {
  127839. assert("NumericLiteral", node, opts);
  127840. }
  127841. function assertNullLiteral(node, opts) {
  127842. assert("NullLiteral", node, opts);
  127843. }
  127844. function assertBooleanLiteral(node, opts) {
  127845. assert("BooleanLiteral", node, opts);
  127846. }
  127847. function assertRegExpLiteral(node, opts) {
  127848. assert("RegExpLiteral", node, opts);
  127849. }
  127850. function assertLogicalExpression(node, opts) {
  127851. assert("LogicalExpression", node, opts);
  127852. }
  127853. function assertMemberExpression(node, opts) {
  127854. assert("MemberExpression", node, opts);
  127855. }
  127856. function assertNewExpression(node, opts) {
  127857. assert("NewExpression", node, opts);
  127858. }
  127859. function assertProgram(node, opts) {
  127860. assert("Program", node, opts);
  127861. }
  127862. function assertObjectExpression(node, opts) {
  127863. assert("ObjectExpression", node, opts);
  127864. }
  127865. function assertObjectMethod(node, opts) {
  127866. assert("ObjectMethod", node, opts);
  127867. }
  127868. function assertObjectProperty(node, opts) {
  127869. assert("ObjectProperty", node, opts);
  127870. }
  127871. function assertRestElement(node, opts) {
  127872. assert("RestElement", node, opts);
  127873. }
  127874. function assertReturnStatement(node, opts) {
  127875. assert("ReturnStatement", node, opts);
  127876. }
  127877. function assertSequenceExpression(node, opts) {
  127878. assert("SequenceExpression", node, opts);
  127879. }
  127880. function assertParenthesizedExpression(node, opts) {
  127881. assert("ParenthesizedExpression", node, opts);
  127882. }
  127883. function assertSwitchCase(node, opts) {
  127884. assert("SwitchCase", node, opts);
  127885. }
  127886. function assertSwitchStatement(node, opts) {
  127887. assert("SwitchStatement", node, opts);
  127888. }
  127889. function assertThisExpression(node, opts) {
  127890. assert("ThisExpression", node, opts);
  127891. }
  127892. function assertThrowStatement(node, opts) {
  127893. assert("ThrowStatement", node, opts);
  127894. }
  127895. function assertTryStatement(node, opts) {
  127896. assert("TryStatement", node, opts);
  127897. }
  127898. function assertUnaryExpression(node, opts) {
  127899. assert("UnaryExpression", node, opts);
  127900. }
  127901. function assertUpdateExpression(node, opts) {
  127902. assert("UpdateExpression", node, opts);
  127903. }
  127904. function assertVariableDeclaration(node, opts) {
  127905. assert("VariableDeclaration", node, opts);
  127906. }
  127907. function assertVariableDeclarator(node, opts) {
  127908. assert("VariableDeclarator", node, opts);
  127909. }
  127910. function assertWhileStatement(node, opts) {
  127911. assert("WhileStatement", node, opts);
  127912. }
  127913. function assertWithStatement(node, opts) {
  127914. assert("WithStatement", node, opts);
  127915. }
  127916. function assertAssignmentPattern(node, opts) {
  127917. assert("AssignmentPattern", node, opts);
  127918. }
  127919. function assertArrayPattern(node, opts) {
  127920. assert("ArrayPattern", node, opts);
  127921. }
  127922. function assertArrowFunctionExpression(node, opts) {
  127923. assert("ArrowFunctionExpression", node, opts);
  127924. }
  127925. function assertClassBody(node, opts) {
  127926. assert("ClassBody", node, opts);
  127927. }
  127928. function assertClassExpression(node, opts) {
  127929. assert("ClassExpression", node, opts);
  127930. }
  127931. function assertClassDeclaration(node, opts) {
  127932. assert("ClassDeclaration", node, opts);
  127933. }
  127934. function assertExportAllDeclaration(node, opts) {
  127935. assert("ExportAllDeclaration", node, opts);
  127936. }
  127937. function assertExportDefaultDeclaration(node, opts) {
  127938. assert("ExportDefaultDeclaration", node, opts);
  127939. }
  127940. function assertExportNamedDeclaration(node, opts) {
  127941. assert("ExportNamedDeclaration", node, opts);
  127942. }
  127943. function assertExportSpecifier(node, opts) {
  127944. assert("ExportSpecifier", node, opts);
  127945. }
  127946. function assertForOfStatement(node, opts) {
  127947. assert("ForOfStatement", node, opts);
  127948. }
  127949. function assertImportDeclaration(node, opts) {
  127950. assert("ImportDeclaration", node, opts);
  127951. }
  127952. function assertImportDefaultSpecifier(node, opts) {
  127953. assert("ImportDefaultSpecifier", node, opts);
  127954. }
  127955. function assertImportNamespaceSpecifier(node, opts) {
  127956. assert("ImportNamespaceSpecifier", node, opts);
  127957. }
  127958. function assertImportSpecifier(node, opts) {
  127959. assert("ImportSpecifier", node, opts);
  127960. }
  127961. function assertMetaProperty(node, opts) {
  127962. assert("MetaProperty", node, opts);
  127963. }
  127964. function assertClassMethod(node, opts) {
  127965. assert("ClassMethod", node, opts);
  127966. }
  127967. function assertObjectPattern(node, opts) {
  127968. assert("ObjectPattern", node, opts);
  127969. }
  127970. function assertSpreadElement(node, opts) {
  127971. assert("SpreadElement", node, opts);
  127972. }
  127973. function assertSuper(node, opts) {
  127974. assert("Super", node, opts);
  127975. }
  127976. function assertTaggedTemplateExpression(node, opts) {
  127977. assert("TaggedTemplateExpression", node, opts);
  127978. }
  127979. function assertTemplateElement(node, opts) {
  127980. assert("TemplateElement", node, opts);
  127981. }
  127982. function assertTemplateLiteral(node, opts) {
  127983. assert("TemplateLiteral", node, opts);
  127984. }
  127985. function assertYieldExpression(node, opts) {
  127986. assert("YieldExpression", node, opts);
  127987. }
  127988. function assertAwaitExpression(node, opts) {
  127989. assert("AwaitExpression", node, opts);
  127990. }
  127991. function assertImport(node, opts) {
  127992. assert("Import", node, opts);
  127993. }
  127994. function assertBigIntLiteral(node, opts) {
  127995. assert("BigIntLiteral", node, opts);
  127996. }
  127997. function assertExportNamespaceSpecifier(node, opts) {
  127998. assert("ExportNamespaceSpecifier", node, opts);
  127999. }
  128000. function assertOptionalMemberExpression(node, opts) {
  128001. assert("OptionalMemberExpression", node, opts);
  128002. }
  128003. function assertOptionalCallExpression(node, opts) {
  128004. assert("OptionalCallExpression", node, opts);
  128005. }
  128006. function assertAnyTypeAnnotation(node, opts) {
  128007. assert("AnyTypeAnnotation", node, opts);
  128008. }
  128009. function assertArrayTypeAnnotation(node, opts) {
  128010. assert("ArrayTypeAnnotation", node, opts);
  128011. }
  128012. function assertBooleanTypeAnnotation(node, opts) {
  128013. assert("BooleanTypeAnnotation", node, opts);
  128014. }
  128015. function assertBooleanLiteralTypeAnnotation(node, opts) {
  128016. assert("BooleanLiteralTypeAnnotation", node, opts);
  128017. }
  128018. function assertNullLiteralTypeAnnotation(node, opts) {
  128019. assert("NullLiteralTypeAnnotation", node, opts);
  128020. }
  128021. function assertClassImplements(node, opts) {
  128022. assert("ClassImplements", node, opts);
  128023. }
  128024. function assertDeclareClass(node, opts) {
  128025. assert("DeclareClass", node, opts);
  128026. }
  128027. function assertDeclareFunction(node, opts) {
  128028. assert("DeclareFunction", node, opts);
  128029. }
  128030. function assertDeclareInterface(node, opts) {
  128031. assert("DeclareInterface", node, opts);
  128032. }
  128033. function assertDeclareModule(node, opts) {
  128034. assert("DeclareModule", node, opts);
  128035. }
  128036. function assertDeclareModuleExports(node, opts) {
  128037. assert("DeclareModuleExports", node, opts);
  128038. }
  128039. function assertDeclareTypeAlias(node, opts) {
  128040. assert("DeclareTypeAlias", node, opts);
  128041. }
  128042. function assertDeclareOpaqueType(node, opts) {
  128043. assert("DeclareOpaqueType", node, opts);
  128044. }
  128045. function assertDeclareVariable(node, opts) {
  128046. assert("DeclareVariable", node, opts);
  128047. }
  128048. function assertDeclareExportDeclaration(node, opts) {
  128049. assert("DeclareExportDeclaration", node, opts);
  128050. }
  128051. function assertDeclareExportAllDeclaration(node, opts) {
  128052. assert("DeclareExportAllDeclaration", node, opts);
  128053. }
  128054. function assertDeclaredPredicate(node, opts) {
  128055. assert("DeclaredPredicate", node, opts);
  128056. }
  128057. function assertExistsTypeAnnotation(node, opts) {
  128058. assert("ExistsTypeAnnotation", node, opts);
  128059. }
  128060. function assertFunctionTypeAnnotation(node, opts) {
  128061. assert("FunctionTypeAnnotation", node, opts);
  128062. }
  128063. function assertFunctionTypeParam(node, opts) {
  128064. assert("FunctionTypeParam", node, opts);
  128065. }
  128066. function assertGenericTypeAnnotation(node, opts) {
  128067. assert("GenericTypeAnnotation", node, opts);
  128068. }
  128069. function assertInferredPredicate(node, opts) {
  128070. assert("InferredPredicate", node, opts);
  128071. }
  128072. function assertInterfaceExtends(node, opts) {
  128073. assert("InterfaceExtends", node, opts);
  128074. }
  128075. function assertInterfaceDeclaration(node, opts) {
  128076. assert("InterfaceDeclaration", node, opts);
  128077. }
  128078. function assertInterfaceTypeAnnotation(node, opts) {
  128079. assert("InterfaceTypeAnnotation", node, opts);
  128080. }
  128081. function assertIntersectionTypeAnnotation(node, opts) {
  128082. assert("IntersectionTypeAnnotation", node, opts);
  128083. }
  128084. function assertMixedTypeAnnotation(node, opts) {
  128085. assert("MixedTypeAnnotation", node, opts);
  128086. }
  128087. function assertEmptyTypeAnnotation(node, opts) {
  128088. assert("EmptyTypeAnnotation", node, opts);
  128089. }
  128090. function assertNullableTypeAnnotation(node, opts) {
  128091. assert("NullableTypeAnnotation", node, opts);
  128092. }
  128093. function assertNumberLiteralTypeAnnotation(node, opts) {
  128094. assert("NumberLiteralTypeAnnotation", node, opts);
  128095. }
  128096. function assertNumberTypeAnnotation(node, opts) {
  128097. assert("NumberTypeAnnotation", node, opts);
  128098. }
  128099. function assertObjectTypeAnnotation(node, opts) {
  128100. assert("ObjectTypeAnnotation", node, opts);
  128101. }
  128102. function assertObjectTypeInternalSlot(node, opts) {
  128103. assert("ObjectTypeInternalSlot", node, opts);
  128104. }
  128105. function assertObjectTypeCallProperty(node, opts) {
  128106. assert("ObjectTypeCallProperty", node, opts);
  128107. }
  128108. function assertObjectTypeIndexer(node, opts) {
  128109. assert("ObjectTypeIndexer", node, opts);
  128110. }
  128111. function assertObjectTypeProperty(node, opts) {
  128112. assert("ObjectTypeProperty", node, opts);
  128113. }
  128114. function assertObjectTypeSpreadProperty(node, opts) {
  128115. assert("ObjectTypeSpreadProperty", node, opts);
  128116. }
  128117. function assertOpaqueType(node, opts) {
  128118. assert("OpaqueType", node, opts);
  128119. }
  128120. function assertQualifiedTypeIdentifier(node, opts) {
  128121. assert("QualifiedTypeIdentifier", node, opts);
  128122. }
  128123. function assertStringLiteralTypeAnnotation(node, opts) {
  128124. assert("StringLiteralTypeAnnotation", node, opts);
  128125. }
  128126. function assertStringTypeAnnotation(node, opts) {
  128127. assert("StringTypeAnnotation", node, opts);
  128128. }
  128129. function assertSymbolTypeAnnotation(node, opts) {
  128130. assert("SymbolTypeAnnotation", node, opts);
  128131. }
  128132. function assertThisTypeAnnotation(node, opts) {
  128133. assert("ThisTypeAnnotation", node, opts);
  128134. }
  128135. function assertTupleTypeAnnotation(node, opts) {
  128136. assert("TupleTypeAnnotation", node, opts);
  128137. }
  128138. function assertTypeofTypeAnnotation(node, opts) {
  128139. assert("TypeofTypeAnnotation", node, opts);
  128140. }
  128141. function assertTypeAlias(node, opts) {
  128142. assert("TypeAlias", node, opts);
  128143. }
  128144. function assertTypeAnnotation(node, opts) {
  128145. assert("TypeAnnotation", node, opts);
  128146. }
  128147. function assertTypeCastExpression(node, opts) {
  128148. assert("TypeCastExpression", node, opts);
  128149. }
  128150. function assertTypeParameter(node, opts) {
  128151. assert("TypeParameter", node, opts);
  128152. }
  128153. function assertTypeParameterDeclaration(node, opts) {
  128154. assert("TypeParameterDeclaration", node, opts);
  128155. }
  128156. function assertTypeParameterInstantiation(node, opts) {
  128157. assert("TypeParameterInstantiation", node, opts);
  128158. }
  128159. function assertUnionTypeAnnotation(node, opts) {
  128160. assert("UnionTypeAnnotation", node, opts);
  128161. }
  128162. function assertVariance(node, opts) {
  128163. assert("Variance", node, opts);
  128164. }
  128165. function assertVoidTypeAnnotation(node, opts) {
  128166. assert("VoidTypeAnnotation", node, opts);
  128167. }
  128168. function assertEnumDeclaration(node, opts) {
  128169. assert("EnumDeclaration", node, opts);
  128170. }
  128171. function assertEnumBooleanBody(node, opts) {
  128172. assert("EnumBooleanBody", node, opts);
  128173. }
  128174. function assertEnumNumberBody(node, opts) {
  128175. assert("EnumNumberBody", node, opts);
  128176. }
  128177. function assertEnumStringBody(node, opts) {
  128178. assert("EnumStringBody", node, opts);
  128179. }
  128180. function assertEnumSymbolBody(node, opts) {
  128181. assert("EnumSymbolBody", node, opts);
  128182. }
  128183. function assertEnumBooleanMember(node, opts) {
  128184. assert("EnumBooleanMember", node, opts);
  128185. }
  128186. function assertEnumNumberMember(node, opts) {
  128187. assert("EnumNumberMember", node, opts);
  128188. }
  128189. function assertEnumStringMember(node, opts) {
  128190. assert("EnumStringMember", node, opts);
  128191. }
  128192. function assertEnumDefaultedMember(node, opts) {
  128193. assert("EnumDefaultedMember", node, opts);
  128194. }
  128195. function assertIndexedAccessType(node, opts) {
  128196. assert("IndexedAccessType", node, opts);
  128197. }
  128198. function assertOptionalIndexedAccessType(node, opts) {
  128199. assert("OptionalIndexedAccessType", node, opts);
  128200. }
  128201. function assertJSXAttribute(node, opts) {
  128202. assert("JSXAttribute", node, opts);
  128203. }
  128204. function assertJSXClosingElement(node, opts) {
  128205. assert("JSXClosingElement", node, opts);
  128206. }
  128207. function assertJSXElement(node, opts) {
  128208. assert("JSXElement", node, opts);
  128209. }
  128210. function assertJSXEmptyExpression(node, opts) {
  128211. assert("JSXEmptyExpression", node, opts);
  128212. }
  128213. function assertJSXExpressionContainer(node, opts) {
  128214. assert("JSXExpressionContainer", node, opts);
  128215. }
  128216. function assertJSXSpreadChild(node, opts) {
  128217. assert("JSXSpreadChild", node, opts);
  128218. }
  128219. function assertJSXIdentifier(node, opts) {
  128220. assert("JSXIdentifier", node, opts);
  128221. }
  128222. function assertJSXMemberExpression(node, opts) {
  128223. assert("JSXMemberExpression", node, opts);
  128224. }
  128225. function assertJSXNamespacedName(node, opts) {
  128226. assert("JSXNamespacedName", node, opts);
  128227. }
  128228. function assertJSXOpeningElement(node, opts) {
  128229. assert("JSXOpeningElement", node, opts);
  128230. }
  128231. function assertJSXSpreadAttribute(node, opts) {
  128232. assert("JSXSpreadAttribute", node, opts);
  128233. }
  128234. function assertJSXText(node, opts) {
  128235. assert("JSXText", node, opts);
  128236. }
  128237. function assertJSXFragment(node, opts) {
  128238. assert("JSXFragment", node, opts);
  128239. }
  128240. function assertJSXOpeningFragment(node, opts) {
  128241. assert("JSXOpeningFragment", node, opts);
  128242. }
  128243. function assertJSXClosingFragment(node, opts) {
  128244. assert("JSXClosingFragment", node, opts);
  128245. }
  128246. function assertNoop(node, opts) {
  128247. assert("Noop", node, opts);
  128248. }
  128249. function assertPlaceholder(node, opts) {
  128250. assert("Placeholder", node, opts);
  128251. }
  128252. function assertV8IntrinsicIdentifier(node, opts) {
  128253. assert("V8IntrinsicIdentifier", node, opts);
  128254. }
  128255. function assertArgumentPlaceholder(node, opts) {
  128256. assert("ArgumentPlaceholder", node, opts);
  128257. }
  128258. function assertBindExpression(node, opts) {
  128259. assert("BindExpression", node, opts);
  128260. }
  128261. function assertClassProperty(node, opts) {
  128262. assert("ClassProperty", node, opts);
  128263. }
  128264. function assertPipelineTopicExpression(node, opts) {
  128265. assert("PipelineTopicExpression", node, opts);
  128266. }
  128267. function assertPipelineBareFunction(node, opts) {
  128268. assert("PipelineBareFunction", node, opts);
  128269. }
  128270. function assertPipelinePrimaryTopicReference(node, opts) {
  128271. assert("PipelinePrimaryTopicReference", node, opts);
  128272. }
  128273. function assertClassPrivateProperty(node, opts) {
  128274. assert("ClassPrivateProperty", node, opts);
  128275. }
  128276. function assertClassPrivateMethod(node, opts) {
  128277. assert("ClassPrivateMethod", node, opts);
  128278. }
  128279. function assertImportAttribute(node, opts) {
  128280. assert("ImportAttribute", node, opts);
  128281. }
  128282. function assertDecorator(node, opts) {
  128283. assert("Decorator", node, opts);
  128284. }
  128285. function assertDoExpression(node, opts) {
  128286. assert("DoExpression", node, opts);
  128287. }
  128288. function assertExportDefaultSpecifier(node, opts) {
  128289. assert("ExportDefaultSpecifier", node, opts);
  128290. }
  128291. function assertPrivateName(node, opts) {
  128292. assert("PrivateName", node, opts);
  128293. }
  128294. function assertRecordExpression(node, opts) {
  128295. assert("RecordExpression", node, opts);
  128296. }
  128297. function assertTupleExpression(node, opts) {
  128298. assert("TupleExpression", node, opts);
  128299. }
  128300. function assertDecimalLiteral(node, opts) {
  128301. assert("DecimalLiteral", node, opts);
  128302. }
  128303. function assertStaticBlock(node, opts) {
  128304. assert("StaticBlock", node, opts);
  128305. }
  128306. function assertModuleExpression(node, opts) {
  128307. assert("ModuleExpression", node, opts);
  128308. }
  128309. function assertTSParameterProperty(node, opts) {
  128310. assert("TSParameterProperty", node, opts);
  128311. }
  128312. function assertTSDeclareFunction(node, opts) {
  128313. assert("TSDeclareFunction", node, opts);
  128314. }
  128315. function assertTSDeclareMethod(node, opts) {
  128316. assert("TSDeclareMethod", node, opts);
  128317. }
  128318. function assertTSQualifiedName(node, opts) {
  128319. assert("TSQualifiedName", node, opts);
  128320. }
  128321. function assertTSCallSignatureDeclaration(node, opts) {
  128322. assert("TSCallSignatureDeclaration", node, opts);
  128323. }
  128324. function assertTSConstructSignatureDeclaration(node, opts) {
  128325. assert("TSConstructSignatureDeclaration", node, opts);
  128326. }
  128327. function assertTSPropertySignature(node, opts) {
  128328. assert("TSPropertySignature", node, opts);
  128329. }
  128330. function assertTSMethodSignature(node, opts) {
  128331. assert("TSMethodSignature", node, opts);
  128332. }
  128333. function assertTSIndexSignature(node, opts) {
  128334. assert("TSIndexSignature", node, opts);
  128335. }
  128336. function assertTSAnyKeyword(node, opts) {
  128337. assert("TSAnyKeyword", node, opts);
  128338. }
  128339. function assertTSBooleanKeyword(node, opts) {
  128340. assert("TSBooleanKeyword", node, opts);
  128341. }
  128342. function assertTSBigIntKeyword(node, opts) {
  128343. assert("TSBigIntKeyword", node, opts);
  128344. }
  128345. function assertTSIntrinsicKeyword(node, opts) {
  128346. assert("TSIntrinsicKeyword", node, opts);
  128347. }
  128348. function assertTSNeverKeyword(node, opts) {
  128349. assert("TSNeverKeyword", node, opts);
  128350. }
  128351. function assertTSNullKeyword(node, opts) {
  128352. assert("TSNullKeyword", node, opts);
  128353. }
  128354. function assertTSNumberKeyword(node, opts) {
  128355. assert("TSNumberKeyword", node, opts);
  128356. }
  128357. function assertTSObjectKeyword(node, opts) {
  128358. assert("TSObjectKeyword", node, opts);
  128359. }
  128360. function assertTSStringKeyword(node, opts) {
  128361. assert("TSStringKeyword", node, opts);
  128362. }
  128363. function assertTSSymbolKeyword(node, opts) {
  128364. assert("TSSymbolKeyword", node, opts);
  128365. }
  128366. function assertTSUndefinedKeyword(node, opts) {
  128367. assert("TSUndefinedKeyword", node, opts);
  128368. }
  128369. function assertTSUnknownKeyword(node, opts) {
  128370. assert("TSUnknownKeyword", node, opts);
  128371. }
  128372. function assertTSVoidKeyword(node, opts) {
  128373. assert("TSVoidKeyword", node, opts);
  128374. }
  128375. function assertTSThisType(node, opts) {
  128376. assert("TSThisType", node, opts);
  128377. }
  128378. function assertTSFunctionType(node, opts) {
  128379. assert("TSFunctionType", node, opts);
  128380. }
  128381. function assertTSConstructorType(node, opts) {
  128382. assert("TSConstructorType", node, opts);
  128383. }
  128384. function assertTSTypeReference(node, opts) {
  128385. assert("TSTypeReference", node, opts);
  128386. }
  128387. function assertTSTypePredicate(node, opts) {
  128388. assert("TSTypePredicate", node, opts);
  128389. }
  128390. function assertTSTypeQuery(node, opts) {
  128391. assert("TSTypeQuery", node, opts);
  128392. }
  128393. function assertTSTypeLiteral(node, opts) {
  128394. assert("TSTypeLiteral", node, opts);
  128395. }
  128396. function assertTSArrayType(node, opts) {
  128397. assert("TSArrayType", node, opts);
  128398. }
  128399. function assertTSTupleType(node, opts) {
  128400. assert("TSTupleType", node, opts);
  128401. }
  128402. function assertTSOptionalType(node, opts) {
  128403. assert("TSOptionalType", node, opts);
  128404. }
  128405. function assertTSRestType(node, opts) {
  128406. assert("TSRestType", node, opts);
  128407. }
  128408. function assertTSNamedTupleMember(node, opts) {
  128409. assert("TSNamedTupleMember", node, opts);
  128410. }
  128411. function assertTSUnionType(node, opts) {
  128412. assert("TSUnionType", node, opts);
  128413. }
  128414. function assertTSIntersectionType(node, opts) {
  128415. assert("TSIntersectionType", node, opts);
  128416. }
  128417. function assertTSConditionalType(node, opts) {
  128418. assert("TSConditionalType", node, opts);
  128419. }
  128420. function assertTSInferType(node, opts) {
  128421. assert("TSInferType", node, opts);
  128422. }
  128423. function assertTSParenthesizedType(node, opts) {
  128424. assert("TSParenthesizedType", node, opts);
  128425. }
  128426. function assertTSTypeOperator(node, opts) {
  128427. assert("TSTypeOperator", node, opts);
  128428. }
  128429. function assertTSIndexedAccessType(node, opts) {
  128430. assert("TSIndexedAccessType", node, opts);
  128431. }
  128432. function assertTSMappedType(node, opts) {
  128433. assert("TSMappedType", node, opts);
  128434. }
  128435. function assertTSLiteralType(node, opts) {
  128436. assert("TSLiteralType", node, opts);
  128437. }
  128438. function assertTSExpressionWithTypeArguments(node, opts) {
  128439. assert("TSExpressionWithTypeArguments", node, opts);
  128440. }
  128441. function assertTSInterfaceDeclaration(node, opts) {
  128442. assert("TSInterfaceDeclaration", node, opts);
  128443. }
  128444. function assertTSInterfaceBody(node, opts) {
  128445. assert("TSInterfaceBody", node, opts);
  128446. }
  128447. function assertTSTypeAliasDeclaration(node, opts) {
  128448. assert("TSTypeAliasDeclaration", node, opts);
  128449. }
  128450. function assertTSAsExpression(node, opts) {
  128451. assert("TSAsExpression", node, opts);
  128452. }
  128453. function assertTSTypeAssertion(node, opts) {
  128454. assert("TSTypeAssertion", node, opts);
  128455. }
  128456. function assertTSEnumDeclaration(node, opts) {
  128457. assert("TSEnumDeclaration", node, opts);
  128458. }
  128459. function assertTSEnumMember(node, opts) {
  128460. assert("TSEnumMember", node, opts);
  128461. }
  128462. function assertTSModuleDeclaration(node, opts) {
  128463. assert("TSModuleDeclaration", node, opts);
  128464. }
  128465. function assertTSModuleBlock(node, opts) {
  128466. assert("TSModuleBlock", node, opts);
  128467. }
  128468. function assertTSImportType(node, opts) {
  128469. assert("TSImportType", node, opts);
  128470. }
  128471. function assertTSImportEqualsDeclaration(node, opts) {
  128472. assert("TSImportEqualsDeclaration", node, opts);
  128473. }
  128474. function assertTSExternalModuleReference(node, opts) {
  128475. assert("TSExternalModuleReference", node, opts);
  128476. }
  128477. function assertTSNonNullExpression(node, opts) {
  128478. assert("TSNonNullExpression", node, opts);
  128479. }
  128480. function assertTSExportAssignment(node, opts) {
  128481. assert("TSExportAssignment", node, opts);
  128482. }
  128483. function assertTSNamespaceExportDeclaration(node, opts) {
  128484. assert("TSNamespaceExportDeclaration", node, opts);
  128485. }
  128486. function assertTSTypeAnnotation(node, opts) {
  128487. assert("TSTypeAnnotation", node, opts);
  128488. }
  128489. function assertTSTypeParameterInstantiation(node, opts) {
  128490. assert("TSTypeParameterInstantiation", node, opts);
  128491. }
  128492. function assertTSTypeParameterDeclaration(node, opts) {
  128493. assert("TSTypeParameterDeclaration", node, opts);
  128494. }
  128495. function assertTSTypeParameter(node, opts) {
  128496. assert("TSTypeParameter", node, opts);
  128497. }
  128498. function assertExpression(node, opts) {
  128499. assert("Expression", node, opts);
  128500. }
  128501. function assertBinary(node, opts) {
  128502. assert("Binary", node, opts);
  128503. }
  128504. function assertScopable(node, opts) {
  128505. assert("Scopable", node, opts);
  128506. }
  128507. function assertBlockParent(node, opts) {
  128508. assert("BlockParent", node, opts);
  128509. }
  128510. function assertBlock(node, opts) {
  128511. assert("Block", node, opts);
  128512. }
  128513. function assertStatement(node, opts) {
  128514. assert("Statement", node, opts);
  128515. }
  128516. function assertTerminatorless(node, opts) {
  128517. assert("Terminatorless", node, opts);
  128518. }
  128519. function assertCompletionStatement(node, opts) {
  128520. assert("CompletionStatement", node, opts);
  128521. }
  128522. function assertConditional(node, opts) {
  128523. assert("Conditional", node, opts);
  128524. }
  128525. function assertLoop(node, opts) {
  128526. assert("Loop", node, opts);
  128527. }
  128528. function assertWhile(node, opts) {
  128529. assert("While", node, opts);
  128530. }
  128531. function assertExpressionWrapper(node, opts) {
  128532. assert("ExpressionWrapper", node, opts);
  128533. }
  128534. function assertFor(node, opts) {
  128535. assert("For", node, opts);
  128536. }
  128537. function assertForXStatement(node, opts) {
  128538. assert("ForXStatement", node, opts);
  128539. }
  128540. function assertFunction(node, opts) {
  128541. assert("Function", node, opts);
  128542. }
  128543. function assertFunctionParent(node, opts) {
  128544. assert("FunctionParent", node, opts);
  128545. }
  128546. function assertPureish(node, opts) {
  128547. assert("Pureish", node, opts);
  128548. }
  128549. function assertDeclaration(node, opts) {
  128550. assert("Declaration", node, opts);
  128551. }
  128552. function assertPatternLike(node, opts) {
  128553. assert("PatternLike", node, opts);
  128554. }
  128555. function assertLVal(node, opts) {
  128556. assert("LVal", node, opts);
  128557. }
  128558. function assertTSEntityName(node, opts) {
  128559. assert("TSEntityName", node, opts);
  128560. }
  128561. function assertLiteral(node, opts) {
  128562. assert("Literal", node, opts);
  128563. }
  128564. function assertImmutable(node, opts) {
  128565. assert("Immutable", node, opts);
  128566. }
  128567. function assertUserWhitespacable(node, opts) {
  128568. assert("UserWhitespacable", node, opts);
  128569. }
  128570. function assertMethod(node, opts) {
  128571. assert("Method", node, opts);
  128572. }
  128573. function assertObjectMember(node, opts) {
  128574. assert("ObjectMember", node, opts);
  128575. }
  128576. function assertProperty(node, opts) {
  128577. assert("Property", node, opts);
  128578. }
  128579. function assertUnaryLike(node, opts) {
  128580. assert("UnaryLike", node, opts);
  128581. }
  128582. function assertPattern(node, opts) {
  128583. assert("Pattern", node, opts);
  128584. }
  128585. function assertClass(node, opts) {
  128586. assert("Class", node, opts);
  128587. }
  128588. function assertModuleDeclaration(node, opts) {
  128589. assert("ModuleDeclaration", node, opts);
  128590. }
  128591. function assertExportDeclaration(node, opts) {
  128592. assert("ExportDeclaration", node, opts);
  128593. }
  128594. function assertModuleSpecifier(node, opts) {
  128595. assert("ModuleSpecifier", node, opts);
  128596. }
  128597. function assertFlow(node, opts) {
  128598. assert("Flow", node, opts);
  128599. }
  128600. function assertFlowType(node, opts) {
  128601. assert("FlowType", node, opts);
  128602. }
  128603. function assertFlowBaseAnnotation(node, opts) {
  128604. assert("FlowBaseAnnotation", node, opts);
  128605. }
  128606. function assertFlowDeclaration(node, opts) {
  128607. assert("FlowDeclaration", node, opts);
  128608. }
  128609. function assertFlowPredicate(node, opts) {
  128610. assert("FlowPredicate", node, opts);
  128611. }
  128612. function assertEnumBody(node, opts) {
  128613. assert("EnumBody", node, opts);
  128614. }
  128615. function assertEnumMember(node, opts) {
  128616. assert("EnumMember", node, opts);
  128617. }
  128618. function assertJSX(node, opts) {
  128619. assert("JSX", node, opts);
  128620. }
  128621. function assertPrivate(node, opts) {
  128622. assert("Private", node, opts);
  128623. }
  128624. function assertTSTypeElement(node, opts) {
  128625. assert("TSTypeElement", node, opts);
  128626. }
  128627. function assertTSType(node, opts) {
  128628. assert("TSType", node, opts);
  128629. }
  128630. function assertTSBaseType(node, opts) {
  128631. assert("TSBaseType", node, opts);
  128632. }
  128633. function assertNumberLiteral(node, opts) {
  128634. console.trace("The node type NumberLiteral has been renamed to NumericLiteral");
  128635. assert("NumberLiteral", node, opts);
  128636. }
  128637. function assertRegexLiteral(node, opts) {
  128638. console.trace("The node type RegexLiteral has been renamed to RegExpLiteral");
  128639. assert("RegexLiteral", node, opts);
  128640. }
  128641. function assertRestProperty(node, opts) {
  128642. console.trace("The node type RestProperty has been renamed to RestElement");
  128643. assert("RestProperty", node, opts);
  128644. }
  128645. function assertSpreadProperty(node, opts) {
  128646. console.trace("The node type SpreadProperty has been renamed to SpreadElement");
  128647. assert("SpreadProperty", node, opts);
  128648. }
  128649. }
  128650. });
  128651. // node_modules/@babel/template/node_modules/@babel/types/lib/builders/flow/createTypeAnnotationBasedOnTypeof.js
  128652. var require_createTypeAnnotationBasedOnTypeof6 = __commonJS({
  128653. "node_modules/@babel/template/node_modules/@babel/types/lib/builders/flow/createTypeAnnotationBasedOnTypeof.js"(exports) {
  128654. "use strict";
  128655. Object.defineProperty(exports, "__esModule", {
  128656. value: true
  128657. });
  128658. exports.default = createTypeAnnotationBasedOnTypeof;
  128659. var _generated = require_generated27();
  128660. function createTypeAnnotationBasedOnTypeof(type) {
  128661. if (type === "string") {
  128662. return (0, _generated.stringTypeAnnotation)();
  128663. } else if (type === "number") {
  128664. return (0, _generated.numberTypeAnnotation)();
  128665. } else if (type === "undefined") {
  128666. return (0, _generated.voidTypeAnnotation)();
  128667. } else if (type === "boolean") {
  128668. return (0, _generated.booleanTypeAnnotation)();
  128669. } else if (type === "function") {
  128670. return (0, _generated.genericTypeAnnotation)((0, _generated.identifier)("Function"));
  128671. } else if (type === "object") {
  128672. return (0, _generated.genericTypeAnnotation)((0, _generated.identifier)("Object"));
  128673. } else if (type === "symbol") {
  128674. return (0, _generated.genericTypeAnnotation)((0, _generated.identifier)("Symbol"));
  128675. } else if (type === "bigint") {
  128676. return (0, _generated.anyTypeAnnotation)();
  128677. } else {
  128678. throw new Error("Invalid typeof value: " + type);
  128679. }
  128680. }
  128681. }
  128682. });
  128683. // node_modules/@babel/template/node_modules/@babel/types/lib/modifications/flow/removeTypeDuplicates.js
  128684. var require_removeTypeDuplicates11 = __commonJS({
  128685. "node_modules/@babel/template/node_modules/@babel/types/lib/modifications/flow/removeTypeDuplicates.js"(exports) {
  128686. "use strict";
  128687. Object.defineProperty(exports, "__esModule", {
  128688. value: true
  128689. });
  128690. exports.default = removeTypeDuplicates;
  128691. var _generated = require_generated26();
  128692. function getQualifiedName(node) {
  128693. return (0, _generated.isIdentifier)(node) ? node.name : `${node.id.name}.${getQualifiedName(node.qualification)}`;
  128694. }
  128695. function removeTypeDuplicates(nodes) {
  128696. const generics = {};
  128697. const bases = {};
  128698. const typeGroups = [];
  128699. const types2 = [];
  128700. for (let i = 0; i < nodes.length; i++) {
  128701. const node = nodes[i];
  128702. if (!node)
  128703. continue;
  128704. if (types2.indexOf(node) >= 0) {
  128705. continue;
  128706. }
  128707. if ((0, _generated.isAnyTypeAnnotation)(node)) {
  128708. return [node];
  128709. }
  128710. if ((0, _generated.isFlowBaseAnnotation)(node)) {
  128711. bases[node.type] = node;
  128712. continue;
  128713. }
  128714. if ((0, _generated.isUnionTypeAnnotation)(node)) {
  128715. if (typeGroups.indexOf(node.types) < 0) {
  128716. nodes = nodes.concat(node.types);
  128717. typeGroups.push(node.types);
  128718. }
  128719. continue;
  128720. }
  128721. if ((0, _generated.isGenericTypeAnnotation)(node)) {
  128722. const name2 = getQualifiedName(node.id);
  128723. if (generics[name2]) {
  128724. let existing = generics[name2];
  128725. if (existing.typeParameters) {
  128726. if (node.typeParameters) {
  128727. existing.typeParameters.params = removeTypeDuplicates(existing.typeParameters.params.concat(node.typeParameters.params));
  128728. }
  128729. } else {
  128730. existing = node.typeParameters;
  128731. }
  128732. } else {
  128733. generics[name2] = node;
  128734. }
  128735. continue;
  128736. }
  128737. types2.push(node);
  128738. }
  128739. for (const type of Object.keys(bases)) {
  128740. types2.push(bases[type]);
  128741. }
  128742. for (const name2 of Object.keys(generics)) {
  128743. types2.push(generics[name2]);
  128744. }
  128745. return types2;
  128746. }
  128747. }
  128748. });
  128749. // node_modules/@babel/template/node_modules/@babel/types/lib/builders/flow/createFlowUnionType.js
  128750. var require_createFlowUnionType6 = __commonJS({
  128751. "node_modules/@babel/template/node_modules/@babel/types/lib/builders/flow/createFlowUnionType.js"(exports) {
  128752. "use strict";
  128753. Object.defineProperty(exports, "__esModule", {
  128754. value: true
  128755. });
  128756. exports.default = createFlowUnionType;
  128757. var _generated = require_generated27();
  128758. var _removeTypeDuplicates = require_removeTypeDuplicates11();
  128759. function createFlowUnionType(types2) {
  128760. const flattened = (0, _removeTypeDuplicates.default)(types2);
  128761. if (flattened.length === 1) {
  128762. return flattened[0];
  128763. } else {
  128764. return (0, _generated.unionTypeAnnotation)(flattened);
  128765. }
  128766. }
  128767. }
  128768. });
  128769. // node_modules/@babel/template/node_modules/@babel/types/lib/modifications/typescript/removeTypeDuplicates.js
  128770. var require_removeTypeDuplicates12 = __commonJS({
  128771. "node_modules/@babel/template/node_modules/@babel/types/lib/modifications/typescript/removeTypeDuplicates.js"(exports) {
  128772. "use strict";
  128773. Object.defineProperty(exports, "__esModule", {
  128774. value: true
  128775. });
  128776. exports.default = removeTypeDuplicates;
  128777. var _generated = require_generated26();
  128778. function removeTypeDuplicates(nodes) {
  128779. const generics = {};
  128780. const bases = {};
  128781. const typeGroups = [];
  128782. const types2 = [];
  128783. for (let i = 0; i < nodes.length; i++) {
  128784. const node = nodes[i];
  128785. if (!node)
  128786. continue;
  128787. if (types2.indexOf(node) >= 0) {
  128788. continue;
  128789. }
  128790. if ((0, _generated.isTSAnyKeyword)(node)) {
  128791. return [node];
  128792. }
  128793. if ((0, _generated.isTSBaseType)(node)) {
  128794. bases[node.type] = node;
  128795. continue;
  128796. }
  128797. if ((0, _generated.isTSUnionType)(node)) {
  128798. if (typeGroups.indexOf(node.types) < 0) {
  128799. nodes = nodes.concat(node.types);
  128800. typeGroups.push(node.types);
  128801. }
  128802. continue;
  128803. }
  128804. types2.push(node);
  128805. }
  128806. for (const type of Object.keys(bases)) {
  128807. types2.push(bases[type]);
  128808. }
  128809. for (const name2 of Object.keys(generics)) {
  128810. types2.push(generics[name2]);
  128811. }
  128812. return types2;
  128813. }
  128814. }
  128815. });
  128816. // node_modules/@babel/template/node_modules/@babel/types/lib/builders/typescript/createTSUnionType.js
  128817. var require_createTSUnionType6 = __commonJS({
  128818. "node_modules/@babel/template/node_modules/@babel/types/lib/builders/typescript/createTSUnionType.js"(exports) {
  128819. "use strict";
  128820. Object.defineProperty(exports, "__esModule", {
  128821. value: true
  128822. });
  128823. exports.default = createTSUnionType;
  128824. var _generated = require_generated27();
  128825. var _removeTypeDuplicates = require_removeTypeDuplicates12();
  128826. function createTSUnionType(typeAnnotations) {
  128827. const types2 = typeAnnotations.map((type) => type.typeAnnotation);
  128828. const flattened = (0, _removeTypeDuplicates.default)(types2);
  128829. if (flattened.length === 1) {
  128830. return flattened[0];
  128831. } else {
  128832. return (0, _generated.tsUnionType)(flattened);
  128833. }
  128834. }
  128835. }
  128836. });
  128837. // node_modules/@babel/template/node_modules/@babel/types/lib/builders/generated/uppercase.js
  128838. var require_uppercase6 = __commonJS({
  128839. "node_modules/@babel/template/node_modules/@babel/types/lib/builders/generated/uppercase.js"(exports) {
  128840. "use strict";
  128841. Object.defineProperty(exports, "__esModule", {
  128842. value: true
  128843. });
  128844. Object.defineProperty(exports, "ArrayExpression", {
  128845. enumerable: true,
  128846. get: function() {
  128847. return _index.arrayExpression;
  128848. }
  128849. });
  128850. Object.defineProperty(exports, "AssignmentExpression", {
  128851. enumerable: true,
  128852. get: function() {
  128853. return _index.assignmentExpression;
  128854. }
  128855. });
  128856. Object.defineProperty(exports, "BinaryExpression", {
  128857. enumerable: true,
  128858. get: function() {
  128859. return _index.binaryExpression;
  128860. }
  128861. });
  128862. Object.defineProperty(exports, "InterpreterDirective", {
  128863. enumerable: true,
  128864. get: function() {
  128865. return _index.interpreterDirective;
  128866. }
  128867. });
  128868. Object.defineProperty(exports, "Directive", {
  128869. enumerable: true,
  128870. get: function() {
  128871. return _index.directive;
  128872. }
  128873. });
  128874. Object.defineProperty(exports, "DirectiveLiteral", {
  128875. enumerable: true,
  128876. get: function() {
  128877. return _index.directiveLiteral;
  128878. }
  128879. });
  128880. Object.defineProperty(exports, "BlockStatement", {
  128881. enumerable: true,
  128882. get: function() {
  128883. return _index.blockStatement;
  128884. }
  128885. });
  128886. Object.defineProperty(exports, "BreakStatement", {
  128887. enumerable: true,
  128888. get: function() {
  128889. return _index.breakStatement;
  128890. }
  128891. });
  128892. Object.defineProperty(exports, "CallExpression", {
  128893. enumerable: true,
  128894. get: function() {
  128895. return _index.callExpression;
  128896. }
  128897. });
  128898. Object.defineProperty(exports, "CatchClause", {
  128899. enumerable: true,
  128900. get: function() {
  128901. return _index.catchClause;
  128902. }
  128903. });
  128904. Object.defineProperty(exports, "ConditionalExpression", {
  128905. enumerable: true,
  128906. get: function() {
  128907. return _index.conditionalExpression;
  128908. }
  128909. });
  128910. Object.defineProperty(exports, "ContinueStatement", {
  128911. enumerable: true,
  128912. get: function() {
  128913. return _index.continueStatement;
  128914. }
  128915. });
  128916. Object.defineProperty(exports, "DebuggerStatement", {
  128917. enumerable: true,
  128918. get: function() {
  128919. return _index.debuggerStatement;
  128920. }
  128921. });
  128922. Object.defineProperty(exports, "DoWhileStatement", {
  128923. enumerable: true,
  128924. get: function() {
  128925. return _index.doWhileStatement;
  128926. }
  128927. });
  128928. Object.defineProperty(exports, "EmptyStatement", {
  128929. enumerable: true,
  128930. get: function() {
  128931. return _index.emptyStatement;
  128932. }
  128933. });
  128934. Object.defineProperty(exports, "ExpressionStatement", {
  128935. enumerable: true,
  128936. get: function() {
  128937. return _index.expressionStatement;
  128938. }
  128939. });
  128940. Object.defineProperty(exports, "File", {
  128941. enumerable: true,
  128942. get: function() {
  128943. return _index.file;
  128944. }
  128945. });
  128946. Object.defineProperty(exports, "ForInStatement", {
  128947. enumerable: true,
  128948. get: function() {
  128949. return _index.forInStatement;
  128950. }
  128951. });
  128952. Object.defineProperty(exports, "ForStatement", {
  128953. enumerable: true,
  128954. get: function() {
  128955. return _index.forStatement;
  128956. }
  128957. });
  128958. Object.defineProperty(exports, "FunctionDeclaration", {
  128959. enumerable: true,
  128960. get: function() {
  128961. return _index.functionDeclaration;
  128962. }
  128963. });
  128964. Object.defineProperty(exports, "FunctionExpression", {
  128965. enumerable: true,
  128966. get: function() {
  128967. return _index.functionExpression;
  128968. }
  128969. });
  128970. Object.defineProperty(exports, "Identifier", {
  128971. enumerable: true,
  128972. get: function() {
  128973. return _index.identifier;
  128974. }
  128975. });
  128976. Object.defineProperty(exports, "IfStatement", {
  128977. enumerable: true,
  128978. get: function() {
  128979. return _index.ifStatement;
  128980. }
  128981. });
  128982. Object.defineProperty(exports, "LabeledStatement", {
  128983. enumerable: true,
  128984. get: function() {
  128985. return _index.labeledStatement;
  128986. }
  128987. });
  128988. Object.defineProperty(exports, "StringLiteral", {
  128989. enumerable: true,
  128990. get: function() {
  128991. return _index.stringLiteral;
  128992. }
  128993. });
  128994. Object.defineProperty(exports, "NumericLiteral", {
  128995. enumerable: true,
  128996. get: function() {
  128997. return _index.numericLiteral;
  128998. }
  128999. });
  129000. Object.defineProperty(exports, "NullLiteral", {
  129001. enumerable: true,
  129002. get: function() {
  129003. return _index.nullLiteral;
  129004. }
  129005. });
  129006. Object.defineProperty(exports, "BooleanLiteral", {
  129007. enumerable: true,
  129008. get: function() {
  129009. return _index.booleanLiteral;
  129010. }
  129011. });
  129012. Object.defineProperty(exports, "RegExpLiteral", {
  129013. enumerable: true,
  129014. get: function() {
  129015. return _index.regExpLiteral;
  129016. }
  129017. });
  129018. Object.defineProperty(exports, "LogicalExpression", {
  129019. enumerable: true,
  129020. get: function() {
  129021. return _index.logicalExpression;
  129022. }
  129023. });
  129024. Object.defineProperty(exports, "MemberExpression", {
  129025. enumerable: true,
  129026. get: function() {
  129027. return _index.memberExpression;
  129028. }
  129029. });
  129030. Object.defineProperty(exports, "NewExpression", {
  129031. enumerable: true,
  129032. get: function() {
  129033. return _index.newExpression;
  129034. }
  129035. });
  129036. Object.defineProperty(exports, "Program", {
  129037. enumerable: true,
  129038. get: function() {
  129039. return _index.program;
  129040. }
  129041. });
  129042. Object.defineProperty(exports, "ObjectExpression", {
  129043. enumerable: true,
  129044. get: function() {
  129045. return _index.objectExpression;
  129046. }
  129047. });
  129048. Object.defineProperty(exports, "ObjectMethod", {
  129049. enumerable: true,
  129050. get: function() {
  129051. return _index.objectMethod;
  129052. }
  129053. });
  129054. Object.defineProperty(exports, "ObjectProperty", {
  129055. enumerable: true,
  129056. get: function() {
  129057. return _index.objectProperty;
  129058. }
  129059. });
  129060. Object.defineProperty(exports, "RestElement", {
  129061. enumerable: true,
  129062. get: function() {
  129063. return _index.restElement;
  129064. }
  129065. });
  129066. Object.defineProperty(exports, "ReturnStatement", {
  129067. enumerable: true,
  129068. get: function() {
  129069. return _index.returnStatement;
  129070. }
  129071. });
  129072. Object.defineProperty(exports, "SequenceExpression", {
  129073. enumerable: true,
  129074. get: function() {
  129075. return _index.sequenceExpression;
  129076. }
  129077. });
  129078. Object.defineProperty(exports, "ParenthesizedExpression", {
  129079. enumerable: true,
  129080. get: function() {
  129081. return _index.parenthesizedExpression;
  129082. }
  129083. });
  129084. Object.defineProperty(exports, "SwitchCase", {
  129085. enumerable: true,
  129086. get: function() {
  129087. return _index.switchCase;
  129088. }
  129089. });
  129090. Object.defineProperty(exports, "SwitchStatement", {
  129091. enumerable: true,
  129092. get: function() {
  129093. return _index.switchStatement;
  129094. }
  129095. });
  129096. Object.defineProperty(exports, "ThisExpression", {
  129097. enumerable: true,
  129098. get: function() {
  129099. return _index.thisExpression;
  129100. }
  129101. });
  129102. Object.defineProperty(exports, "ThrowStatement", {
  129103. enumerable: true,
  129104. get: function() {
  129105. return _index.throwStatement;
  129106. }
  129107. });
  129108. Object.defineProperty(exports, "TryStatement", {
  129109. enumerable: true,
  129110. get: function() {
  129111. return _index.tryStatement;
  129112. }
  129113. });
  129114. Object.defineProperty(exports, "UnaryExpression", {
  129115. enumerable: true,
  129116. get: function() {
  129117. return _index.unaryExpression;
  129118. }
  129119. });
  129120. Object.defineProperty(exports, "UpdateExpression", {
  129121. enumerable: true,
  129122. get: function() {
  129123. return _index.updateExpression;
  129124. }
  129125. });
  129126. Object.defineProperty(exports, "VariableDeclaration", {
  129127. enumerable: true,
  129128. get: function() {
  129129. return _index.variableDeclaration;
  129130. }
  129131. });
  129132. Object.defineProperty(exports, "VariableDeclarator", {
  129133. enumerable: true,
  129134. get: function() {
  129135. return _index.variableDeclarator;
  129136. }
  129137. });
  129138. Object.defineProperty(exports, "WhileStatement", {
  129139. enumerable: true,
  129140. get: function() {
  129141. return _index.whileStatement;
  129142. }
  129143. });
  129144. Object.defineProperty(exports, "WithStatement", {
  129145. enumerable: true,
  129146. get: function() {
  129147. return _index.withStatement;
  129148. }
  129149. });
  129150. Object.defineProperty(exports, "AssignmentPattern", {
  129151. enumerable: true,
  129152. get: function() {
  129153. return _index.assignmentPattern;
  129154. }
  129155. });
  129156. Object.defineProperty(exports, "ArrayPattern", {
  129157. enumerable: true,
  129158. get: function() {
  129159. return _index.arrayPattern;
  129160. }
  129161. });
  129162. Object.defineProperty(exports, "ArrowFunctionExpression", {
  129163. enumerable: true,
  129164. get: function() {
  129165. return _index.arrowFunctionExpression;
  129166. }
  129167. });
  129168. Object.defineProperty(exports, "ClassBody", {
  129169. enumerable: true,
  129170. get: function() {
  129171. return _index.classBody;
  129172. }
  129173. });
  129174. Object.defineProperty(exports, "ClassExpression", {
  129175. enumerable: true,
  129176. get: function() {
  129177. return _index.classExpression;
  129178. }
  129179. });
  129180. Object.defineProperty(exports, "ClassDeclaration", {
  129181. enumerable: true,
  129182. get: function() {
  129183. return _index.classDeclaration;
  129184. }
  129185. });
  129186. Object.defineProperty(exports, "ExportAllDeclaration", {
  129187. enumerable: true,
  129188. get: function() {
  129189. return _index.exportAllDeclaration;
  129190. }
  129191. });
  129192. Object.defineProperty(exports, "ExportDefaultDeclaration", {
  129193. enumerable: true,
  129194. get: function() {
  129195. return _index.exportDefaultDeclaration;
  129196. }
  129197. });
  129198. Object.defineProperty(exports, "ExportNamedDeclaration", {
  129199. enumerable: true,
  129200. get: function() {
  129201. return _index.exportNamedDeclaration;
  129202. }
  129203. });
  129204. Object.defineProperty(exports, "ExportSpecifier", {
  129205. enumerable: true,
  129206. get: function() {
  129207. return _index.exportSpecifier;
  129208. }
  129209. });
  129210. Object.defineProperty(exports, "ForOfStatement", {
  129211. enumerable: true,
  129212. get: function() {
  129213. return _index.forOfStatement;
  129214. }
  129215. });
  129216. Object.defineProperty(exports, "ImportDeclaration", {
  129217. enumerable: true,
  129218. get: function() {
  129219. return _index.importDeclaration;
  129220. }
  129221. });
  129222. Object.defineProperty(exports, "ImportDefaultSpecifier", {
  129223. enumerable: true,
  129224. get: function() {
  129225. return _index.importDefaultSpecifier;
  129226. }
  129227. });
  129228. Object.defineProperty(exports, "ImportNamespaceSpecifier", {
  129229. enumerable: true,
  129230. get: function() {
  129231. return _index.importNamespaceSpecifier;
  129232. }
  129233. });
  129234. Object.defineProperty(exports, "ImportSpecifier", {
  129235. enumerable: true,
  129236. get: function() {
  129237. return _index.importSpecifier;
  129238. }
  129239. });
  129240. Object.defineProperty(exports, "MetaProperty", {
  129241. enumerable: true,
  129242. get: function() {
  129243. return _index.metaProperty;
  129244. }
  129245. });
  129246. Object.defineProperty(exports, "ClassMethod", {
  129247. enumerable: true,
  129248. get: function() {
  129249. return _index.classMethod;
  129250. }
  129251. });
  129252. Object.defineProperty(exports, "ObjectPattern", {
  129253. enumerable: true,
  129254. get: function() {
  129255. return _index.objectPattern;
  129256. }
  129257. });
  129258. Object.defineProperty(exports, "SpreadElement", {
  129259. enumerable: true,
  129260. get: function() {
  129261. return _index.spreadElement;
  129262. }
  129263. });
  129264. Object.defineProperty(exports, "Super", {
  129265. enumerable: true,
  129266. get: function() {
  129267. return _index.super;
  129268. }
  129269. });
  129270. Object.defineProperty(exports, "TaggedTemplateExpression", {
  129271. enumerable: true,
  129272. get: function() {
  129273. return _index.taggedTemplateExpression;
  129274. }
  129275. });
  129276. Object.defineProperty(exports, "TemplateElement", {
  129277. enumerable: true,
  129278. get: function() {
  129279. return _index.templateElement;
  129280. }
  129281. });
  129282. Object.defineProperty(exports, "TemplateLiteral", {
  129283. enumerable: true,
  129284. get: function() {
  129285. return _index.templateLiteral;
  129286. }
  129287. });
  129288. Object.defineProperty(exports, "YieldExpression", {
  129289. enumerable: true,
  129290. get: function() {
  129291. return _index.yieldExpression;
  129292. }
  129293. });
  129294. Object.defineProperty(exports, "AwaitExpression", {
  129295. enumerable: true,
  129296. get: function() {
  129297. return _index.awaitExpression;
  129298. }
  129299. });
  129300. Object.defineProperty(exports, "Import", {
  129301. enumerable: true,
  129302. get: function() {
  129303. return _index.import;
  129304. }
  129305. });
  129306. Object.defineProperty(exports, "BigIntLiteral", {
  129307. enumerable: true,
  129308. get: function() {
  129309. return _index.bigIntLiteral;
  129310. }
  129311. });
  129312. Object.defineProperty(exports, "ExportNamespaceSpecifier", {
  129313. enumerable: true,
  129314. get: function() {
  129315. return _index.exportNamespaceSpecifier;
  129316. }
  129317. });
  129318. Object.defineProperty(exports, "OptionalMemberExpression", {
  129319. enumerable: true,
  129320. get: function() {
  129321. return _index.optionalMemberExpression;
  129322. }
  129323. });
  129324. Object.defineProperty(exports, "OptionalCallExpression", {
  129325. enumerable: true,
  129326. get: function() {
  129327. return _index.optionalCallExpression;
  129328. }
  129329. });
  129330. Object.defineProperty(exports, "AnyTypeAnnotation", {
  129331. enumerable: true,
  129332. get: function() {
  129333. return _index.anyTypeAnnotation;
  129334. }
  129335. });
  129336. Object.defineProperty(exports, "ArrayTypeAnnotation", {
  129337. enumerable: true,
  129338. get: function() {
  129339. return _index.arrayTypeAnnotation;
  129340. }
  129341. });
  129342. Object.defineProperty(exports, "BooleanTypeAnnotation", {
  129343. enumerable: true,
  129344. get: function() {
  129345. return _index.booleanTypeAnnotation;
  129346. }
  129347. });
  129348. Object.defineProperty(exports, "BooleanLiteralTypeAnnotation", {
  129349. enumerable: true,
  129350. get: function() {
  129351. return _index.booleanLiteralTypeAnnotation;
  129352. }
  129353. });
  129354. Object.defineProperty(exports, "NullLiteralTypeAnnotation", {
  129355. enumerable: true,
  129356. get: function() {
  129357. return _index.nullLiteralTypeAnnotation;
  129358. }
  129359. });
  129360. Object.defineProperty(exports, "ClassImplements", {
  129361. enumerable: true,
  129362. get: function() {
  129363. return _index.classImplements;
  129364. }
  129365. });
  129366. Object.defineProperty(exports, "DeclareClass", {
  129367. enumerable: true,
  129368. get: function() {
  129369. return _index.declareClass;
  129370. }
  129371. });
  129372. Object.defineProperty(exports, "DeclareFunction", {
  129373. enumerable: true,
  129374. get: function() {
  129375. return _index.declareFunction;
  129376. }
  129377. });
  129378. Object.defineProperty(exports, "DeclareInterface", {
  129379. enumerable: true,
  129380. get: function() {
  129381. return _index.declareInterface;
  129382. }
  129383. });
  129384. Object.defineProperty(exports, "DeclareModule", {
  129385. enumerable: true,
  129386. get: function() {
  129387. return _index.declareModule;
  129388. }
  129389. });
  129390. Object.defineProperty(exports, "DeclareModuleExports", {
  129391. enumerable: true,
  129392. get: function() {
  129393. return _index.declareModuleExports;
  129394. }
  129395. });
  129396. Object.defineProperty(exports, "DeclareTypeAlias", {
  129397. enumerable: true,
  129398. get: function() {
  129399. return _index.declareTypeAlias;
  129400. }
  129401. });
  129402. Object.defineProperty(exports, "DeclareOpaqueType", {
  129403. enumerable: true,
  129404. get: function() {
  129405. return _index.declareOpaqueType;
  129406. }
  129407. });
  129408. Object.defineProperty(exports, "DeclareVariable", {
  129409. enumerable: true,
  129410. get: function() {
  129411. return _index.declareVariable;
  129412. }
  129413. });
  129414. Object.defineProperty(exports, "DeclareExportDeclaration", {
  129415. enumerable: true,
  129416. get: function() {
  129417. return _index.declareExportDeclaration;
  129418. }
  129419. });
  129420. Object.defineProperty(exports, "DeclareExportAllDeclaration", {
  129421. enumerable: true,
  129422. get: function() {
  129423. return _index.declareExportAllDeclaration;
  129424. }
  129425. });
  129426. Object.defineProperty(exports, "DeclaredPredicate", {
  129427. enumerable: true,
  129428. get: function() {
  129429. return _index.declaredPredicate;
  129430. }
  129431. });
  129432. Object.defineProperty(exports, "ExistsTypeAnnotation", {
  129433. enumerable: true,
  129434. get: function() {
  129435. return _index.existsTypeAnnotation;
  129436. }
  129437. });
  129438. Object.defineProperty(exports, "FunctionTypeAnnotation", {
  129439. enumerable: true,
  129440. get: function() {
  129441. return _index.functionTypeAnnotation;
  129442. }
  129443. });
  129444. Object.defineProperty(exports, "FunctionTypeParam", {
  129445. enumerable: true,
  129446. get: function() {
  129447. return _index.functionTypeParam;
  129448. }
  129449. });
  129450. Object.defineProperty(exports, "GenericTypeAnnotation", {
  129451. enumerable: true,
  129452. get: function() {
  129453. return _index.genericTypeAnnotation;
  129454. }
  129455. });
  129456. Object.defineProperty(exports, "InferredPredicate", {
  129457. enumerable: true,
  129458. get: function() {
  129459. return _index.inferredPredicate;
  129460. }
  129461. });
  129462. Object.defineProperty(exports, "InterfaceExtends", {
  129463. enumerable: true,
  129464. get: function() {
  129465. return _index.interfaceExtends;
  129466. }
  129467. });
  129468. Object.defineProperty(exports, "InterfaceDeclaration", {
  129469. enumerable: true,
  129470. get: function() {
  129471. return _index.interfaceDeclaration;
  129472. }
  129473. });
  129474. Object.defineProperty(exports, "InterfaceTypeAnnotation", {
  129475. enumerable: true,
  129476. get: function() {
  129477. return _index.interfaceTypeAnnotation;
  129478. }
  129479. });
  129480. Object.defineProperty(exports, "IntersectionTypeAnnotation", {
  129481. enumerable: true,
  129482. get: function() {
  129483. return _index.intersectionTypeAnnotation;
  129484. }
  129485. });
  129486. Object.defineProperty(exports, "MixedTypeAnnotation", {
  129487. enumerable: true,
  129488. get: function() {
  129489. return _index.mixedTypeAnnotation;
  129490. }
  129491. });
  129492. Object.defineProperty(exports, "EmptyTypeAnnotation", {
  129493. enumerable: true,
  129494. get: function() {
  129495. return _index.emptyTypeAnnotation;
  129496. }
  129497. });
  129498. Object.defineProperty(exports, "NullableTypeAnnotation", {
  129499. enumerable: true,
  129500. get: function() {
  129501. return _index.nullableTypeAnnotation;
  129502. }
  129503. });
  129504. Object.defineProperty(exports, "NumberLiteralTypeAnnotation", {
  129505. enumerable: true,
  129506. get: function() {
  129507. return _index.numberLiteralTypeAnnotation;
  129508. }
  129509. });
  129510. Object.defineProperty(exports, "NumberTypeAnnotation", {
  129511. enumerable: true,
  129512. get: function() {
  129513. return _index.numberTypeAnnotation;
  129514. }
  129515. });
  129516. Object.defineProperty(exports, "ObjectTypeAnnotation", {
  129517. enumerable: true,
  129518. get: function() {
  129519. return _index.objectTypeAnnotation;
  129520. }
  129521. });
  129522. Object.defineProperty(exports, "ObjectTypeInternalSlot", {
  129523. enumerable: true,
  129524. get: function() {
  129525. return _index.objectTypeInternalSlot;
  129526. }
  129527. });
  129528. Object.defineProperty(exports, "ObjectTypeCallProperty", {
  129529. enumerable: true,
  129530. get: function() {
  129531. return _index.objectTypeCallProperty;
  129532. }
  129533. });
  129534. Object.defineProperty(exports, "ObjectTypeIndexer", {
  129535. enumerable: true,
  129536. get: function() {
  129537. return _index.objectTypeIndexer;
  129538. }
  129539. });
  129540. Object.defineProperty(exports, "ObjectTypeProperty", {
  129541. enumerable: true,
  129542. get: function() {
  129543. return _index.objectTypeProperty;
  129544. }
  129545. });
  129546. Object.defineProperty(exports, "ObjectTypeSpreadProperty", {
  129547. enumerable: true,
  129548. get: function() {
  129549. return _index.objectTypeSpreadProperty;
  129550. }
  129551. });
  129552. Object.defineProperty(exports, "OpaqueType", {
  129553. enumerable: true,
  129554. get: function() {
  129555. return _index.opaqueType;
  129556. }
  129557. });
  129558. Object.defineProperty(exports, "QualifiedTypeIdentifier", {
  129559. enumerable: true,
  129560. get: function() {
  129561. return _index.qualifiedTypeIdentifier;
  129562. }
  129563. });
  129564. Object.defineProperty(exports, "StringLiteralTypeAnnotation", {
  129565. enumerable: true,
  129566. get: function() {
  129567. return _index.stringLiteralTypeAnnotation;
  129568. }
  129569. });
  129570. Object.defineProperty(exports, "StringTypeAnnotation", {
  129571. enumerable: true,
  129572. get: function() {
  129573. return _index.stringTypeAnnotation;
  129574. }
  129575. });
  129576. Object.defineProperty(exports, "SymbolTypeAnnotation", {
  129577. enumerable: true,
  129578. get: function() {
  129579. return _index.symbolTypeAnnotation;
  129580. }
  129581. });
  129582. Object.defineProperty(exports, "ThisTypeAnnotation", {
  129583. enumerable: true,
  129584. get: function() {
  129585. return _index.thisTypeAnnotation;
  129586. }
  129587. });
  129588. Object.defineProperty(exports, "TupleTypeAnnotation", {
  129589. enumerable: true,
  129590. get: function() {
  129591. return _index.tupleTypeAnnotation;
  129592. }
  129593. });
  129594. Object.defineProperty(exports, "TypeofTypeAnnotation", {
  129595. enumerable: true,
  129596. get: function() {
  129597. return _index.typeofTypeAnnotation;
  129598. }
  129599. });
  129600. Object.defineProperty(exports, "TypeAlias", {
  129601. enumerable: true,
  129602. get: function() {
  129603. return _index.typeAlias;
  129604. }
  129605. });
  129606. Object.defineProperty(exports, "TypeAnnotation", {
  129607. enumerable: true,
  129608. get: function() {
  129609. return _index.typeAnnotation;
  129610. }
  129611. });
  129612. Object.defineProperty(exports, "TypeCastExpression", {
  129613. enumerable: true,
  129614. get: function() {
  129615. return _index.typeCastExpression;
  129616. }
  129617. });
  129618. Object.defineProperty(exports, "TypeParameter", {
  129619. enumerable: true,
  129620. get: function() {
  129621. return _index.typeParameter;
  129622. }
  129623. });
  129624. Object.defineProperty(exports, "TypeParameterDeclaration", {
  129625. enumerable: true,
  129626. get: function() {
  129627. return _index.typeParameterDeclaration;
  129628. }
  129629. });
  129630. Object.defineProperty(exports, "TypeParameterInstantiation", {
  129631. enumerable: true,
  129632. get: function() {
  129633. return _index.typeParameterInstantiation;
  129634. }
  129635. });
  129636. Object.defineProperty(exports, "UnionTypeAnnotation", {
  129637. enumerable: true,
  129638. get: function() {
  129639. return _index.unionTypeAnnotation;
  129640. }
  129641. });
  129642. Object.defineProperty(exports, "Variance", {
  129643. enumerable: true,
  129644. get: function() {
  129645. return _index.variance;
  129646. }
  129647. });
  129648. Object.defineProperty(exports, "VoidTypeAnnotation", {
  129649. enumerable: true,
  129650. get: function() {
  129651. return _index.voidTypeAnnotation;
  129652. }
  129653. });
  129654. Object.defineProperty(exports, "EnumDeclaration", {
  129655. enumerable: true,
  129656. get: function() {
  129657. return _index.enumDeclaration;
  129658. }
  129659. });
  129660. Object.defineProperty(exports, "EnumBooleanBody", {
  129661. enumerable: true,
  129662. get: function() {
  129663. return _index.enumBooleanBody;
  129664. }
  129665. });
  129666. Object.defineProperty(exports, "EnumNumberBody", {
  129667. enumerable: true,
  129668. get: function() {
  129669. return _index.enumNumberBody;
  129670. }
  129671. });
  129672. Object.defineProperty(exports, "EnumStringBody", {
  129673. enumerable: true,
  129674. get: function() {
  129675. return _index.enumStringBody;
  129676. }
  129677. });
  129678. Object.defineProperty(exports, "EnumSymbolBody", {
  129679. enumerable: true,
  129680. get: function() {
  129681. return _index.enumSymbolBody;
  129682. }
  129683. });
  129684. Object.defineProperty(exports, "EnumBooleanMember", {
  129685. enumerable: true,
  129686. get: function() {
  129687. return _index.enumBooleanMember;
  129688. }
  129689. });
  129690. Object.defineProperty(exports, "EnumNumberMember", {
  129691. enumerable: true,
  129692. get: function() {
  129693. return _index.enumNumberMember;
  129694. }
  129695. });
  129696. Object.defineProperty(exports, "EnumStringMember", {
  129697. enumerable: true,
  129698. get: function() {
  129699. return _index.enumStringMember;
  129700. }
  129701. });
  129702. Object.defineProperty(exports, "EnumDefaultedMember", {
  129703. enumerable: true,
  129704. get: function() {
  129705. return _index.enumDefaultedMember;
  129706. }
  129707. });
  129708. Object.defineProperty(exports, "IndexedAccessType", {
  129709. enumerable: true,
  129710. get: function() {
  129711. return _index.indexedAccessType;
  129712. }
  129713. });
  129714. Object.defineProperty(exports, "OptionalIndexedAccessType", {
  129715. enumerable: true,
  129716. get: function() {
  129717. return _index.optionalIndexedAccessType;
  129718. }
  129719. });
  129720. Object.defineProperty(exports, "JSXAttribute", {
  129721. enumerable: true,
  129722. get: function() {
  129723. return _index.jsxAttribute;
  129724. }
  129725. });
  129726. Object.defineProperty(exports, "JSXClosingElement", {
  129727. enumerable: true,
  129728. get: function() {
  129729. return _index.jsxClosingElement;
  129730. }
  129731. });
  129732. Object.defineProperty(exports, "JSXElement", {
  129733. enumerable: true,
  129734. get: function() {
  129735. return _index.jsxElement;
  129736. }
  129737. });
  129738. Object.defineProperty(exports, "JSXEmptyExpression", {
  129739. enumerable: true,
  129740. get: function() {
  129741. return _index.jsxEmptyExpression;
  129742. }
  129743. });
  129744. Object.defineProperty(exports, "JSXExpressionContainer", {
  129745. enumerable: true,
  129746. get: function() {
  129747. return _index.jsxExpressionContainer;
  129748. }
  129749. });
  129750. Object.defineProperty(exports, "JSXSpreadChild", {
  129751. enumerable: true,
  129752. get: function() {
  129753. return _index.jsxSpreadChild;
  129754. }
  129755. });
  129756. Object.defineProperty(exports, "JSXIdentifier", {
  129757. enumerable: true,
  129758. get: function() {
  129759. return _index.jsxIdentifier;
  129760. }
  129761. });
  129762. Object.defineProperty(exports, "JSXMemberExpression", {
  129763. enumerable: true,
  129764. get: function() {
  129765. return _index.jsxMemberExpression;
  129766. }
  129767. });
  129768. Object.defineProperty(exports, "JSXNamespacedName", {
  129769. enumerable: true,
  129770. get: function() {
  129771. return _index.jsxNamespacedName;
  129772. }
  129773. });
  129774. Object.defineProperty(exports, "JSXOpeningElement", {
  129775. enumerable: true,
  129776. get: function() {
  129777. return _index.jsxOpeningElement;
  129778. }
  129779. });
  129780. Object.defineProperty(exports, "JSXSpreadAttribute", {
  129781. enumerable: true,
  129782. get: function() {
  129783. return _index.jsxSpreadAttribute;
  129784. }
  129785. });
  129786. Object.defineProperty(exports, "JSXText", {
  129787. enumerable: true,
  129788. get: function() {
  129789. return _index.jsxText;
  129790. }
  129791. });
  129792. Object.defineProperty(exports, "JSXFragment", {
  129793. enumerable: true,
  129794. get: function() {
  129795. return _index.jsxFragment;
  129796. }
  129797. });
  129798. Object.defineProperty(exports, "JSXOpeningFragment", {
  129799. enumerable: true,
  129800. get: function() {
  129801. return _index.jsxOpeningFragment;
  129802. }
  129803. });
  129804. Object.defineProperty(exports, "JSXClosingFragment", {
  129805. enumerable: true,
  129806. get: function() {
  129807. return _index.jsxClosingFragment;
  129808. }
  129809. });
  129810. Object.defineProperty(exports, "Noop", {
  129811. enumerable: true,
  129812. get: function() {
  129813. return _index.noop;
  129814. }
  129815. });
  129816. Object.defineProperty(exports, "Placeholder", {
  129817. enumerable: true,
  129818. get: function() {
  129819. return _index.placeholder;
  129820. }
  129821. });
  129822. Object.defineProperty(exports, "V8IntrinsicIdentifier", {
  129823. enumerable: true,
  129824. get: function() {
  129825. return _index.v8IntrinsicIdentifier;
  129826. }
  129827. });
  129828. Object.defineProperty(exports, "ArgumentPlaceholder", {
  129829. enumerable: true,
  129830. get: function() {
  129831. return _index.argumentPlaceholder;
  129832. }
  129833. });
  129834. Object.defineProperty(exports, "BindExpression", {
  129835. enumerable: true,
  129836. get: function() {
  129837. return _index.bindExpression;
  129838. }
  129839. });
  129840. Object.defineProperty(exports, "ClassProperty", {
  129841. enumerable: true,
  129842. get: function() {
  129843. return _index.classProperty;
  129844. }
  129845. });
  129846. Object.defineProperty(exports, "PipelineTopicExpression", {
  129847. enumerable: true,
  129848. get: function() {
  129849. return _index.pipelineTopicExpression;
  129850. }
  129851. });
  129852. Object.defineProperty(exports, "PipelineBareFunction", {
  129853. enumerable: true,
  129854. get: function() {
  129855. return _index.pipelineBareFunction;
  129856. }
  129857. });
  129858. Object.defineProperty(exports, "PipelinePrimaryTopicReference", {
  129859. enumerable: true,
  129860. get: function() {
  129861. return _index.pipelinePrimaryTopicReference;
  129862. }
  129863. });
  129864. Object.defineProperty(exports, "ClassPrivateProperty", {
  129865. enumerable: true,
  129866. get: function() {
  129867. return _index.classPrivateProperty;
  129868. }
  129869. });
  129870. Object.defineProperty(exports, "ClassPrivateMethod", {
  129871. enumerable: true,
  129872. get: function() {
  129873. return _index.classPrivateMethod;
  129874. }
  129875. });
  129876. Object.defineProperty(exports, "ImportAttribute", {
  129877. enumerable: true,
  129878. get: function() {
  129879. return _index.importAttribute;
  129880. }
  129881. });
  129882. Object.defineProperty(exports, "Decorator", {
  129883. enumerable: true,
  129884. get: function() {
  129885. return _index.decorator;
  129886. }
  129887. });
  129888. Object.defineProperty(exports, "DoExpression", {
  129889. enumerable: true,
  129890. get: function() {
  129891. return _index.doExpression;
  129892. }
  129893. });
  129894. Object.defineProperty(exports, "ExportDefaultSpecifier", {
  129895. enumerable: true,
  129896. get: function() {
  129897. return _index.exportDefaultSpecifier;
  129898. }
  129899. });
  129900. Object.defineProperty(exports, "PrivateName", {
  129901. enumerable: true,
  129902. get: function() {
  129903. return _index.privateName;
  129904. }
  129905. });
  129906. Object.defineProperty(exports, "RecordExpression", {
  129907. enumerable: true,
  129908. get: function() {
  129909. return _index.recordExpression;
  129910. }
  129911. });
  129912. Object.defineProperty(exports, "TupleExpression", {
  129913. enumerable: true,
  129914. get: function() {
  129915. return _index.tupleExpression;
  129916. }
  129917. });
  129918. Object.defineProperty(exports, "DecimalLiteral", {
  129919. enumerable: true,
  129920. get: function() {
  129921. return _index.decimalLiteral;
  129922. }
  129923. });
  129924. Object.defineProperty(exports, "StaticBlock", {
  129925. enumerable: true,
  129926. get: function() {
  129927. return _index.staticBlock;
  129928. }
  129929. });
  129930. Object.defineProperty(exports, "ModuleExpression", {
  129931. enumerable: true,
  129932. get: function() {
  129933. return _index.moduleExpression;
  129934. }
  129935. });
  129936. Object.defineProperty(exports, "TSParameterProperty", {
  129937. enumerable: true,
  129938. get: function() {
  129939. return _index.tsParameterProperty;
  129940. }
  129941. });
  129942. Object.defineProperty(exports, "TSDeclareFunction", {
  129943. enumerable: true,
  129944. get: function() {
  129945. return _index.tsDeclareFunction;
  129946. }
  129947. });
  129948. Object.defineProperty(exports, "TSDeclareMethod", {
  129949. enumerable: true,
  129950. get: function() {
  129951. return _index.tsDeclareMethod;
  129952. }
  129953. });
  129954. Object.defineProperty(exports, "TSQualifiedName", {
  129955. enumerable: true,
  129956. get: function() {
  129957. return _index.tsQualifiedName;
  129958. }
  129959. });
  129960. Object.defineProperty(exports, "TSCallSignatureDeclaration", {
  129961. enumerable: true,
  129962. get: function() {
  129963. return _index.tsCallSignatureDeclaration;
  129964. }
  129965. });
  129966. Object.defineProperty(exports, "TSConstructSignatureDeclaration", {
  129967. enumerable: true,
  129968. get: function() {
  129969. return _index.tsConstructSignatureDeclaration;
  129970. }
  129971. });
  129972. Object.defineProperty(exports, "TSPropertySignature", {
  129973. enumerable: true,
  129974. get: function() {
  129975. return _index.tsPropertySignature;
  129976. }
  129977. });
  129978. Object.defineProperty(exports, "TSMethodSignature", {
  129979. enumerable: true,
  129980. get: function() {
  129981. return _index.tsMethodSignature;
  129982. }
  129983. });
  129984. Object.defineProperty(exports, "TSIndexSignature", {
  129985. enumerable: true,
  129986. get: function() {
  129987. return _index.tsIndexSignature;
  129988. }
  129989. });
  129990. Object.defineProperty(exports, "TSAnyKeyword", {
  129991. enumerable: true,
  129992. get: function() {
  129993. return _index.tsAnyKeyword;
  129994. }
  129995. });
  129996. Object.defineProperty(exports, "TSBooleanKeyword", {
  129997. enumerable: true,
  129998. get: function() {
  129999. return _index.tsBooleanKeyword;
  130000. }
  130001. });
  130002. Object.defineProperty(exports, "TSBigIntKeyword", {
  130003. enumerable: true,
  130004. get: function() {
  130005. return _index.tsBigIntKeyword;
  130006. }
  130007. });
  130008. Object.defineProperty(exports, "TSIntrinsicKeyword", {
  130009. enumerable: true,
  130010. get: function() {
  130011. return _index.tsIntrinsicKeyword;
  130012. }
  130013. });
  130014. Object.defineProperty(exports, "TSNeverKeyword", {
  130015. enumerable: true,
  130016. get: function() {
  130017. return _index.tsNeverKeyword;
  130018. }
  130019. });
  130020. Object.defineProperty(exports, "TSNullKeyword", {
  130021. enumerable: true,
  130022. get: function() {
  130023. return _index.tsNullKeyword;
  130024. }
  130025. });
  130026. Object.defineProperty(exports, "TSNumberKeyword", {
  130027. enumerable: true,
  130028. get: function() {
  130029. return _index.tsNumberKeyword;
  130030. }
  130031. });
  130032. Object.defineProperty(exports, "TSObjectKeyword", {
  130033. enumerable: true,
  130034. get: function() {
  130035. return _index.tsObjectKeyword;
  130036. }
  130037. });
  130038. Object.defineProperty(exports, "TSStringKeyword", {
  130039. enumerable: true,
  130040. get: function() {
  130041. return _index.tsStringKeyword;
  130042. }
  130043. });
  130044. Object.defineProperty(exports, "TSSymbolKeyword", {
  130045. enumerable: true,
  130046. get: function() {
  130047. return _index.tsSymbolKeyword;
  130048. }
  130049. });
  130050. Object.defineProperty(exports, "TSUndefinedKeyword", {
  130051. enumerable: true,
  130052. get: function() {
  130053. return _index.tsUndefinedKeyword;
  130054. }
  130055. });
  130056. Object.defineProperty(exports, "TSUnknownKeyword", {
  130057. enumerable: true,
  130058. get: function() {
  130059. return _index.tsUnknownKeyword;
  130060. }
  130061. });
  130062. Object.defineProperty(exports, "TSVoidKeyword", {
  130063. enumerable: true,
  130064. get: function() {
  130065. return _index.tsVoidKeyword;
  130066. }
  130067. });
  130068. Object.defineProperty(exports, "TSThisType", {
  130069. enumerable: true,
  130070. get: function() {
  130071. return _index.tsThisType;
  130072. }
  130073. });
  130074. Object.defineProperty(exports, "TSFunctionType", {
  130075. enumerable: true,
  130076. get: function() {
  130077. return _index.tsFunctionType;
  130078. }
  130079. });
  130080. Object.defineProperty(exports, "TSConstructorType", {
  130081. enumerable: true,
  130082. get: function() {
  130083. return _index.tsConstructorType;
  130084. }
  130085. });
  130086. Object.defineProperty(exports, "TSTypeReference", {
  130087. enumerable: true,
  130088. get: function() {
  130089. return _index.tsTypeReference;
  130090. }
  130091. });
  130092. Object.defineProperty(exports, "TSTypePredicate", {
  130093. enumerable: true,
  130094. get: function() {
  130095. return _index.tsTypePredicate;
  130096. }
  130097. });
  130098. Object.defineProperty(exports, "TSTypeQuery", {
  130099. enumerable: true,
  130100. get: function() {
  130101. return _index.tsTypeQuery;
  130102. }
  130103. });
  130104. Object.defineProperty(exports, "TSTypeLiteral", {
  130105. enumerable: true,
  130106. get: function() {
  130107. return _index.tsTypeLiteral;
  130108. }
  130109. });
  130110. Object.defineProperty(exports, "TSArrayType", {
  130111. enumerable: true,
  130112. get: function() {
  130113. return _index.tsArrayType;
  130114. }
  130115. });
  130116. Object.defineProperty(exports, "TSTupleType", {
  130117. enumerable: true,
  130118. get: function() {
  130119. return _index.tsTupleType;
  130120. }
  130121. });
  130122. Object.defineProperty(exports, "TSOptionalType", {
  130123. enumerable: true,
  130124. get: function() {
  130125. return _index.tsOptionalType;
  130126. }
  130127. });
  130128. Object.defineProperty(exports, "TSRestType", {
  130129. enumerable: true,
  130130. get: function() {
  130131. return _index.tsRestType;
  130132. }
  130133. });
  130134. Object.defineProperty(exports, "TSNamedTupleMember", {
  130135. enumerable: true,
  130136. get: function() {
  130137. return _index.tsNamedTupleMember;
  130138. }
  130139. });
  130140. Object.defineProperty(exports, "TSUnionType", {
  130141. enumerable: true,
  130142. get: function() {
  130143. return _index.tsUnionType;
  130144. }
  130145. });
  130146. Object.defineProperty(exports, "TSIntersectionType", {
  130147. enumerable: true,
  130148. get: function() {
  130149. return _index.tsIntersectionType;
  130150. }
  130151. });
  130152. Object.defineProperty(exports, "TSConditionalType", {
  130153. enumerable: true,
  130154. get: function() {
  130155. return _index.tsConditionalType;
  130156. }
  130157. });
  130158. Object.defineProperty(exports, "TSInferType", {
  130159. enumerable: true,
  130160. get: function() {
  130161. return _index.tsInferType;
  130162. }
  130163. });
  130164. Object.defineProperty(exports, "TSParenthesizedType", {
  130165. enumerable: true,
  130166. get: function() {
  130167. return _index.tsParenthesizedType;
  130168. }
  130169. });
  130170. Object.defineProperty(exports, "TSTypeOperator", {
  130171. enumerable: true,
  130172. get: function() {
  130173. return _index.tsTypeOperator;
  130174. }
  130175. });
  130176. Object.defineProperty(exports, "TSIndexedAccessType", {
  130177. enumerable: true,
  130178. get: function() {
  130179. return _index.tsIndexedAccessType;
  130180. }
  130181. });
  130182. Object.defineProperty(exports, "TSMappedType", {
  130183. enumerable: true,
  130184. get: function() {
  130185. return _index.tsMappedType;
  130186. }
  130187. });
  130188. Object.defineProperty(exports, "TSLiteralType", {
  130189. enumerable: true,
  130190. get: function() {
  130191. return _index.tsLiteralType;
  130192. }
  130193. });
  130194. Object.defineProperty(exports, "TSExpressionWithTypeArguments", {
  130195. enumerable: true,
  130196. get: function() {
  130197. return _index.tsExpressionWithTypeArguments;
  130198. }
  130199. });
  130200. Object.defineProperty(exports, "TSInterfaceDeclaration", {
  130201. enumerable: true,
  130202. get: function() {
  130203. return _index.tsInterfaceDeclaration;
  130204. }
  130205. });
  130206. Object.defineProperty(exports, "TSInterfaceBody", {
  130207. enumerable: true,
  130208. get: function() {
  130209. return _index.tsInterfaceBody;
  130210. }
  130211. });
  130212. Object.defineProperty(exports, "TSTypeAliasDeclaration", {
  130213. enumerable: true,
  130214. get: function() {
  130215. return _index.tsTypeAliasDeclaration;
  130216. }
  130217. });
  130218. Object.defineProperty(exports, "TSAsExpression", {
  130219. enumerable: true,
  130220. get: function() {
  130221. return _index.tsAsExpression;
  130222. }
  130223. });
  130224. Object.defineProperty(exports, "TSTypeAssertion", {
  130225. enumerable: true,
  130226. get: function() {
  130227. return _index.tsTypeAssertion;
  130228. }
  130229. });
  130230. Object.defineProperty(exports, "TSEnumDeclaration", {
  130231. enumerable: true,
  130232. get: function() {
  130233. return _index.tsEnumDeclaration;
  130234. }
  130235. });
  130236. Object.defineProperty(exports, "TSEnumMember", {
  130237. enumerable: true,
  130238. get: function() {
  130239. return _index.tsEnumMember;
  130240. }
  130241. });
  130242. Object.defineProperty(exports, "TSModuleDeclaration", {
  130243. enumerable: true,
  130244. get: function() {
  130245. return _index.tsModuleDeclaration;
  130246. }
  130247. });
  130248. Object.defineProperty(exports, "TSModuleBlock", {
  130249. enumerable: true,
  130250. get: function() {
  130251. return _index.tsModuleBlock;
  130252. }
  130253. });
  130254. Object.defineProperty(exports, "TSImportType", {
  130255. enumerable: true,
  130256. get: function() {
  130257. return _index.tsImportType;
  130258. }
  130259. });
  130260. Object.defineProperty(exports, "TSImportEqualsDeclaration", {
  130261. enumerable: true,
  130262. get: function() {
  130263. return _index.tsImportEqualsDeclaration;
  130264. }
  130265. });
  130266. Object.defineProperty(exports, "TSExternalModuleReference", {
  130267. enumerable: true,
  130268. get: function() {
  130269. return _index.tsExternalModuleReference;
  130270. }
  130271. });
  130272. Object.defineProperty(exports, "TSNonNullExpression", {
  130273. enumerable: true,
  130274. get: function() {
  130275. return _index.tsNonNullExpression;
  130276. }
  130277. });
  130278. Object.defineProperty(exports, "TSExportAssignment", {
  130279. enumerable: true,
  130280. get: function() {
  130281. return _index.tsExportAssignment;
  130282. }
  130283. });
  130284. Object.defineProperty(exports, "TSNamespaceExportDeclaration", {
  130285. enumerable: true,
  130286. get: function() {
  130287. return _index.tsNamespaceExportDeclaration;
  130288. }
  130289. });
  130290. Object.defineProperty(exports, "TSTypeAnnotation", {
  130291. enumerable: true,
  130292. get: function() {
  130293. return _index.tsTypeAnnotation;
  130294. }
  130295. });
  130296. Object.defineProperty(exports, "TSTypeParameterInstantiation", {
  130297. enumerable: true,
  130298. get: function() {
  130299. return _index.tsTypeParameterInstantiation;
  130300. }
  130301. });
  130302. Object.defineProperty(exports, "TSTypeParameterDeclaration", {
  130303. enumerable: true,
  130304. get: function() {
  130305. return _index.tsTypeParameterDeclaration;
  130306. }
  130307. });
  130308. Object.defineProperty(exports, "TSTypeParameter", {
  130309. enumerable: true,
  130310. get: function() {
  130311. return _index.tsTypeParameter;
  130312. }
  130313. });
  130314. Object.defineProperty(exports, "NumberLiteral", {
  130315. enumerable: true,
  130316. get: function() {
  130317. return _index.numberLiteral;
  130318. }
  130319. });
  130320. Object.defineProperty(exports, "RegexLiteral", {
  130321. enumerable: true,
  130322. get: function() {
  130323. return _index.regexLiteral;
  130324. }
  130325. });
  130326. Object.defineProperty(exports, "RestProperty", {
  130327. enumerable: true,
  130328. get: function() {
  130329. return _index.restProperty;
  130330. }
  130331. });
  130332. Object.defineProperty(exports, "SpreadProperty", {
  130333. enumerable: true,
  130334. get: function() {
  130335. return _index.spreadProperty;
  130336. }
  130337. });
  130338. var _index = require_generated27();
  130339. }
  130340. });
  130341. // node_modules/@babel/template/node_modules/@babel/types/lib/clone/cloneNode.js
  130342. var require_cloneNode6 = __commonJS({
  130343. "node_modules/@babel/template/node_modules/@babel/types/lib/clone/cloneNode.js"(exports) {
  130344. "use strict";
  130345. Object.defineProperty(exports, "__esModule", {
  130346. value: true
  130347. });
  130348. exports.default = cloneNode;
  130349. var _definitions = require_definitions6();
  130350. var _generated = require_generated26();
  130351. var has = Function.call.bind(Object.prototype.hasOwnProperty);
  130352. function cloneIfNode(obj, deep, withoutLoc) {
  130353. if (obj && typeof obj.type === "string") {
  130354. return cloneNode(obj, deep, withoutLoc);
  130355. }
  130356. return obj;
  130357. }
  130358. function cloneIfNodeOrArray(obj, deep, withoutLoc) {
  130359. if (Array.isArray(obj)) {
  130360. return obj.map((node) => cloneIfNode(node, deep, withoutLoc));
  130361. }
  130362. return cloneIfNode(obj, deep, withoutLoc);
  130363. }
  130364. function cloneNode(node, deep = true, withoutLoc = false) {
  130365. if (!node)
  130366. return node;
  130367. const {
  130368. type
  130369. } = node;
  130370. const newNode = {
  130371. type: node.type
  130372. };
  130373. if ((0, _generated.isIdentifier)(node)) {
  130374. newNode.name = node.name;
  130375. if (has(node, "optional") && typeof node.optional === "boolean") {
  130376. newNode.optional = node.optional;
  130377. }
  130378. if (has(node, "typeAnnotation")) {
  130379. newNode.typeAnnotation = deep ? cloneIfNodeOrArray(node.typeAnnotation, true, withoutLoc) : node.typeAnnotation;
  130380. }
  130381. } else if (!has(_definitions.NODE_FIELDS, type)) {
  130382. throw new Error(`Unknown node type: "${type}"`);
  130383. } else {
  130384. for (const field of Object.keys(_definitions.NODE_FIELDS[type])) {
  130385. if (has(node, field)) {
  130386. if (deep) {
  130387. newNode[field] = (0, _generated.isFile)(node) && field === "comments" ? maybeCloneComments(node.comments, deep, withoutLoc) : cloneIfNodeOrArray(node[field], true, withoutLoc);
  130388. } else {
  130389. newNode[field] = node[field];
  130390. }
  130391. }
  130392. }
  130393. }
  130394. if (has(node, "loc")) {
  130395. if (withoutLoc) {
  130396. newNode.loc = null;
  130397. } else {
  130398. newNode.loc = node.loc;
  130399. }
  130400. }
  130401. if (has(node, "leadingComments")) {
  130402. newNode.leadingComments = maybeCloneComments(node.leadingComments, deep, withoutLoc);
  130403. }
  130404. if (has(node, "innerComments")) {
  130405. newNode.innerComments = maybeCloneComments(node.innerComments, deep, withoutLoc);
  130406. }
  130407. if (has(node, "trailingComments")) {
  130408. newNode.trailingComments = maybeCloneComments(node.trailingComments, deep, withoutLoc);
  130409. }
  130410. if (has(node, "extra")) {
  130411. newNode.extra = Object.assign({}, node.extra);
  130412. }
  130413. return newNode;
  130414. }
  130415. function maybeCloneComments(comments, deep, withoutLoc) {
  130416. if (!comments || !deep) {
  130417. return comments;
  130418. }
  130419. return comments.map(({
  130420. type,
  130421. value,
  130422. loc
  130423. }) => {
  130424. if (withoutLoc) {
  130425. return {
  130426. type,
  130427. value,
  130428. loc: null
  130429. };
  130430. }
  130431. return {
  130432. type,
  130433. value,
  130434. loc
  130435. };
  130436. });
  130437. }
  130438. }
  130439. });
  130440. // node_modules/@babel/template/node_modules/@babel/types/lib/clone/clone.js
  130441. var require_clone6 = __commonJS({
  130442. "node_modules/@babel/template/node_modules/@babel/types/lib/clone/clone.js"(exports) {
  130443. "use strict";
  130444. Object.defineProperty(exports, "__esModule", {
  130445. value: true
  130446. });
  130447. exports.default = clone;
  130448. var _cloneNode = require_cloneNode6();
  130449. function clone(node) {
  130450. return (0, _cloneNode.default)(node, false);
  130451. }
  130452. }
  130453. });
  130454. // node_modules/@babel/template/node_modules/@babel/types/lib/clone/cloneDeep.js
  130455. var require_cloneDeep6 = __commonJS({
  130456. "node_modules/@babel/template/node_modules/@babel/types/lib/clone/cloneDeep.js"(exports) {
  130457. "use strict";
  130458. Object.defineProperty(exports, "__esModule", {
  130459. value: true
  130460. });
  130461. exports.default = cloneDeep2;
  130462. var _cloneNode = require_cloneNode6();
  130463. function cloneDeep2(node) {
  130464. return (0, _cloneNode.default)(node);
  130465. }
  130466. }
  130467. });
  130468. // node_modules/@babel/template/node_modules/@babel/types/lib/clone/cloneDeepWithoutLoc.js
  130469. var require_cloneDeepWithoutLoc6 = __commonJS({
  130470. "node_modules/@babel/template/node_modules/@babel/types/lib/clone/cloneDeepWithoutLoc.js"(exports) {
  130471. "use strict";
  130472. Object.defineProperty(exports, "__esModule", {
  130473. value: true
  130474. });
  130475. exports.default = cloneDeepWithoutLoc;
  130476. var _cloneNode = require_cloneNode6();
  130477. function cloneDeepWithoutLoc(node) {
  130478. return (0, _cloneNode.default)(node, true, true);
  130479. }
  130480. }
  130481. });
  130482. // node_modules/@babel/template/node_modules/@babel/types/lib/clone/cloneWithoutLoc.js
  130483. var require_cloneWithoutLoc6 = __commonJS({
  130484. "node_modules/@babel/template/node_modules/@babel/types/lib/clone/cloneWithoutLoc.js"(exports) {
  130485. "use strict";
  130486. Object.defineProperty(exports, "__esModule", {
  130487. value: true
  130488. });
  130489. exports.default = cloneWithoutLoc;
  130490. var _cloneNode = require_cloneNode6();
  130491. function cloneWithoutLoc(node) {
  130492. return (0, _cloneNode.default)(node, false, true);
  130493. }
  130494. }
  130495. });
  130496. // node_modules/@babel/template/node_modules/@babel/types/lib/comments/addComments.js
  130497. var require_addComments6 = __commonJS({
  130498. "node_modules/@babel/template/node_modules/@babel/types/lib/comments/addComments.js"(exports) {
  130499. "use strict";
  130500. Object.defineProperty(exports, "__esModule", {
  130501. value: true
  130502. });
  130503. exports.default = addComments;
  130504. function addComments(node, type, comments) {
  130505. if (!comments || !node)
  130506. return node;
  130507. const key = `${type}Comments`;
  130508. if (node[key]) {
  130509. if (type === "leading") {
  130510. node[key] = comments.concat(node[key]);
  130511. } else {
  130512. node[key] = node[key].concat(comments);
  130513. }
  130514. } else {
  130515. node[key] = comments;
  130516. }
  130517. return node;
  130518. }
  130519. }
  130520. });
  130521. // node_modules/@babel/template/node_modules/@babel/types/lib/comments/addComment.js
  130522. var require_addComment6 = __commonJS({
  130523. "node_modules/@babel/template/node_modules/@babel/types/lib/comments/addComment.js"(exports) {
  130524. "use strict";
  130525. Object.defineProperty(exports, "__esModule", {
  130526. value: true
  130527. });
  130528. exports.default = addComment;
  130529. var _addComments = require_addComments6();
  130530. function addComment(node, type, content3, line) {
  130531. return (0, _addComments.default)(node, type, [{
  130532. type: line ? "CommentLine" : "CommentBlock",
  130533. value: content3
  130534. }]);
  130535. }
  130536. }
  130537. });
  130538. // node_modules/@babel/template/node_modules/@babel/types/lib/utils/inherit.js
  130539. var require_inherit6 = __commonJS({
  130540. "node_modules/@babel/template/node_modules/@babel/types/lib/utils/inherit.js"(exports) {
  130541. "use strict";
  130542. Object.defineProperty(exports, "__esModule", {
  130543. value: true
  130544. });
  130545. exports.default = inherit2;
  130546. function inherit2(key, child, parent) {
  130547. if (child && parent) {
  130548. child[key] = Array.from(new Set([].concat(child[key], parent[key]).filter(Boolean)));
  130549. }
  130550. }
  130551. }
  130552. });
  130553. // node_modules/@babel/template/node_modules/@babel/types/lib/comments/inheritInnerComments.js
  130554. var require_inheritInnerComments6 = __commonJS({
  130555. "node_modules/@babel/template/node_modules/@babel/types/lib/comments/inheritInnerComments.js"(exports) {
  130556. "use strict";
  130557. Object.defineProperty(exports, "__esModule", {
  130558. value: true
  130559. });
  130560. exports.default = inheritInnerComments;
  130561. var _inherit = require_inherit6();
  130562. function inheritInnerComments(child, parent) {
  130563. (0, _inherit.default)("innerComments", child, parent);
  130564. }
  130565. }
  130566. });
  130567. // node_modules/@babel/template/node_modules/@babel/types/lib/comments/inheritLeadingComments.js
  130568. var require_inheritLeadingComments6 = __commonJS({
  130569. "node_modules/@babel/template/node_modules/@babel/types/lib/comments/inheritLeadingComments.js"(exports) {
  130570. "use strict";
  130571. Object.defineProperty(exports, "__esModule", {
  130572. value: true
  130573. });
  130574. exports.default = inheritLeadingComments;
  130575. var _inherit = require_inherit6();
  130576. function inheritLeadingComments(child, parent) {
  130577. (0, _inherit.default)("leadingComments", child, parent);
  130578. }
  130579. }
  130580. });
  130581. // node_modules/@babel/template/node_modules/@babel/types/lib/comments/inheritTrailingComments.js
  130582. var require_inheritTrailingComments6 = __commonJS({
  130583. "node_modules/@babel/template/node_modules/@babel/types/lib/comments/inheritTrailingComments.js"(exports) {
  130584. "use strict";
  130585. Object.defineProperty(exports, "__esModule", {
  130586. value: true
  130587. });
  130588. exports.default = inheritTrailingComments;
  130589. var _inherit = require_inherit6();
  130590. function inheritTrailingComments(child, parent) {
  130591. (0, _inherit.default)("trailingComments", child, parent);
  130592. }
  130593. }
  130594. });
  130595. // node_modules/@babel/template/node_modules/@babel/types/lib/comments/inheritsComments.js
  130596. var require_inheritsComments6 = __commonJS({
  130597. "node_modules/@babel/template/node_modules/@babel/types/lib/comments/inheritsComments.js"(exports) {
  130598. "use strict";
  130599. Object.defineProperty(exports, "__esModule", {
  130600. value: true
  130601. });
  130602. exports.default = inheritsComments;
  130603. var _inheritTrailingComments = require_inheritTrailingComments6();
  130604. var _inheritLeadingComments = require_inheritLeadingComments6();
  130605. var _inheritInnerComments = require_inheritInnerComments6();
  130606. function inheritsComments(child, parent) {
  130607. (0, _inheritTrailingComments.default)(child, parent);
  130608. (0, _inheritLeadingComments.default)(child, parent);
  130609. (0, _inheritInnerComments.default)(child, parent);
  130610. return child;
  130611. }
  130612. }
  130613. });
  130614. // node_modules/@babel/template/node_modules/@babel/types/lib/comments/removeComments.js
  130615. var require_removeComments6 = __commonJS({
  130616. "node_modules/@babel/template/node_modules/@babel/types/lib/comments/removeComments.js"(exports) {
  130617. "use strict";
  130618. Object.defineProperty(exports, "__esModule", {
  130619. value: true
  130620. });
  130621. exports.default = removeComments;
  130622. var _constants = require_constants6();
  130623. function removeComments(node) {
  130624. _constants.COMMENT_KEYS.forEach((key) => {
  130625. node[key] = null;
  130626. });
  130627. return node;
  130628. }
  130629. }
  130630. });
  130631. // node_modules/@babel/template/node_modules/@babel/types/lib/constants/generated/index.js
  130632. var require_generated29 = __commonJS({
  130633. "node_modules/@babel/template/node_modules/@babel/types/lib/constants/generated/index.js"(exports) {
  130634. "use strict";
  130635. Object.defineProperty(exports, "__esModule", {
  130636. value: true
  130637. });
  130638. exports.TSBASETYPE_TYPES = exports.TSTYPE_TYPES = exports.TSTYPEELEMENT_TYPES = exports.PRIVATE_TYPES = exports.JSX_TYPES = exports.ENUMMEMBER_TYPES = exports.ENUMBODY_TYPES = exports.FLOWPREDICATE_TYPES = exports.FLOWDECLARATION_TYPES = exports.FLOWBASEANNOTATION_TYPES = exports.FLOWTYPE_TYPES = exports.FLOW_TYPES = exports.MODULESPECIFIER_TYPES = exports.EXPORTDECLARATION_TYPES = exports.MODULEDECLARATION_TYPES = exports.CLASS_TYPES = exports.PATTERN_TYPES = exports.UNARYLIKE_TYPES = exports.PROPERTY_TYPES = exports.OBJECTMEMBER_TYPES = exports.METHOD_TYPES = exports.USERWHITESPACABLE_TYPES = exports.IMMUTABLE_TYPES = exports.LITERAL_TYPES = exports.TSENTITYNAME_TYPES = exports.LVAL_TYPES = exports.PATTERNLIKE_TYPES = exports.DECLARATION_TYPES = exports.PUREISH_TYPES = exports.FUNCTIONPARENT_TYPES = exports.FUNCTION_TYPES = exports.FORXSTATEMENT_TYPES = exports.FOR_TYPES = exports.EXPRESSIONWRAPPER_TYPES = exports.WHILE_TYPES = exports.LOOP_TYPES = exports.CONDITIONAL_TYPES = exports.COMPLETIONSTATEMENT_TYPES = exports.TERMINATORLESS_TYPES = exports.STATEMENT_TYPES = exports.BLOCK_TYPES = exports.BLOCKPARENT_TYPES = exports.SCOPABLE_TYPES = exports.BINARY_TYPES = exports.EXPRESSION_TYPES = void 0;
  130639. var _definitions = require_definitions6();
  130640. var EXPRESSION_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Expression"];
  130641. exports.EXPRESSION_TYPES = EXPRESSION_TYPES;
  130642. var BINARY_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Binary"];
  130643. exports.BINARY_TYPES = BINARY_TYPES;
  130644. var SCOPABLE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Scopable"];
  130645. exports.SCOPABLE_TYPES = SCOPABLE_TYPES;
  130646. var BLOCKPARENT_TYPES = _definitions.FLIPPED_ALIAS_KEYS["BlockParent"];
  130647. exports.BLOCKPARENT_TYPES = BLOCKPARENT_TYPES;
  130648. var BLOCK_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Block"];
  130649. exports.BLOCK_TYPES = BLOCK_TYPES;
  130650. var STATEMENT_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Statement"];
  130651. exports.STATEMENT_TYPES = STATEMENT_TYPES;
  130652. var TERMINATORLESS_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Terminatorless"];
  130653. exports.TERMINATORLESS_TYPES = TERMINATORLESS_TYPES;
  130654. var COMPLETIONSTATEMENT_TYPES = _definitions.FLIPPED_ALIAS_KEYS["CompletionStatement"];
  130655. exports.COMPLETIONSTATEMENT_TYPES = COMPLETIONSTATEMENT_TYPES;
  130656. var CONDITIONAL_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Conditional"];
  130657. exports.CONDITIONAL_TYPES = CONDITIONAL_TYPES;
  130658. var LOOP_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Loop"];
  130659. exports.LOOP_TYPES = LOOP_TYPES;
  130660. var WHILE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["While"];
  130661. exports.WHILE_TYPES = WHILE_TYPES;
  130662. var EXPRESSIONWRAPPER_TYPES = _definitions.FLIPPED_ALIAS_KEYS["ExpressionWrapper"];
  130663. exports.EXPRESSIONWRAPPER_TYPES = EXPRESSIONWRAPPER_TYPES;
  130664. var FOR_TYPES = _definitions.FLIPPED_ALIAS_KEYS["For"];
  130665. exports.FOR_TYPES = FOR_TYPES;
  130666. var FORXSTATEMENT_TYPES = _definitions.FLIPPED_ALIAS_KEYS["ForXStatement"];
  130667. exports.FORXSTATEMENT_TYPES = FORXSTATEMENT_TYPES;
  130668. var FUNCTION_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Function"];
  130669. exports.FUNCTION_TYPES = FUNCTION_TYPES;
  130670. var FUNCTIONPARENT_TYPES = _definitions.FLIPPED_ALIAS_KEYS["FunctionParent"];
  130671. exports.FUNCTIONPARENT_TYPES = FUNCTIONPARENT_TYPES;
  130672. var PUREISH_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Pureish"];
  130673. exports.PUREISH_TYPES = PUREISH_TYPES;
  130674. var DECLARATION_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Declaration"];
  130675. exports.DECLARATION_TYPES = DECLARATION_TYPES;
  130676. var PATTERNLIKE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["PatternLike"];
  130677. exports.PATTERNLIKE_TYPES = PATTERNLIKE_TYPES;
  130678. var LVAL_TYPES = _definitions.FLIPPED_ALIAS_KEYS["LVal"];
  130679. exports.LVAL_TYPES = LVAL_TYPES;
  130680. var TSENTITYNAME_TYPES = _definitions.FLIPPED_ALIAS_KEYS["TSEntityName"];
  130681. exports.TSENTITYNAME_TYPES = TSENTITYNAME_TYPES;
  130682. var LITERAL_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Literal"];
  130683. exports.LITERAL_TYPES = LITERAL_TYPES;
  130684. var IMMUTABLE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Immutable"];
  130685. exports.IMMUTABLE_TYPES = IMMUTABLE_TYPES;
  130686. var USERWHITESPACABLE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["UserWhitespacable"];
  130687. exports.USERWHITESPACABLE_TYPES = USERWHITESPACABLE_TYPES;
  130688. var METHOD_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Method"];
  130689. exports.METHOD_TYPES = METHOD_TYPES;
  130690. var OBJECTMEMBER_TYPES = _definitions.FLIPPED_ALIAS_KEYS["ObjectMember"];
  130691. exports.OBJECTMEMBER_TYPES = OBJECTMEMBER_TYPES;
  130692. var PROPERTY_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Property"];
  130693. exports.PROPERTY_TYPES = PROPERTY_TYPES;
  130694. var UNARYLIKE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["UnaryLike"];
  130695. exports.UNARYLIKE_TYPES = UNARYLIKE_TYPES;
  130696. var PATTERN_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Pattern"];
  130697. exports.PATTERN_TYPES = PATTERN_TYPES;
  130698. var CLASS_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Class"];
  130699. exports.CLASS_TYPES = CLASS_TYPES;
  130700. var MODULEDECLARATION_TYPES = _definitions.FLIPPED_ALIAS_KEYS["ModuleDeclaration"];
  130701. exports.MODULEDECLARATION_TYPES = MODULEDECLARATION_TYPES;
  130702. var EXPORTDECLARATION_TYPES = _definitions.FLIPPED_ALIAS_KEYS["ExportDeclaration"];
  130703. exports.EXPORTDECLARATION_TYPES = EXPORTDECLARATION_TYPES;
  130704. var MODULESPECIFIER_TYPES = _definitions.FLIPPED_ALIAS_KEYS["ModuleSpecifier"];
  130705. exports.MODULESPECIFIER_TYPES = MODULESPECIFIER_TYPES;
  130706. var FLOW_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Flow"];
  130707. exports.FLOW_TYPES = FLOW_TYPES;
  130708. var FLOWTYPE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["FlowType"];
  130709. exports.FLOWTYPE_TYPES = FLOWTYPE_TYPES;
  130710. var FLOWBASEANNOTATION_TYPES = _definitions.FLIPPED_ALIAS_KEYS["FlowBaseAnnotation"];
  130711. exports.FLOWBASEANNOTATION_TYPES = FLOWBASEANNOTATION_TYPES;
  130712. var FLOWDECLARATION_TYPES = _definitions.FLIPPED_ALIAS_KEYS["FlowDeclaration"];
  130713. exports.FLOWDECLARATION_TYPES = FLOWDECLARATION_TYPES;
  130714. var FLOWPREDICATE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["FlowPredicate"];
  130715. exports.FLOWPREDICATE_TYPES = FLOWPREDICATE_TYPES;
  130716. var ENUMBODY_TYPES = _definitions.FLIPPED_ALIAS_KEYS["EnumBody"];
  130717. exports.ENUMBODY_TYPES = ENUMBODY_TYPES;
  130718. var ENUMMEMBER_TYPES = _definitions.FLIPPED_ALIAS_KEYS["EnumMember"];
  130719. exports.ENUMMEMBER_TYPES = ENUMMEMBER_TYPES;
  130720. var JSX_TYPES = _definitions.FLIPPED_ALIAS_KEYS["JSX"];
  130721. exports.JSX_TYPES = JSX_TYPES;
  130722. var PRIVATE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Private"];
  130723. exports.PRIVATE_TYPES = PRIVATE_TYPES;
  130724. var TSTYPEELEMENT_TYPES = _definitions.FLIPPED_ALIAS_KEYS["TSTypeElement"];
  130725. exports.TSTYPEELEMENT_TYPES = TSTYPEELEMENT_TYPES;
  130726. var TSTYPE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["TSType"];
  130727. exports.TSTYPE_TYPES = TSTYPE_TYPES;
  130728. var TSBASETYPE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["TSBaseType"];
  130729. exports.TSBASETYPE_TYPES = TSBASETYPE_TYPES;
  130730. }
  130731. });
  130732. // node_modules/@babel/template/node_modules/@babel/types/lib/converters/toBlock.js
  130733. var require_toBlock6 = __commonJS({
  130734. "node_modules/@babel/template/node_modules/@babel/types/lib/converters/toBlock.js"(exports) {
  130735. "use strict";
  130736. Object.defineProperty(exports, "__esModule", {
  130737. value: true
  130738. });
  130739. exports.default = toBlock;
  130740. var _generated = require_generated26();
  130741. var _generated2 = require_generated27();
  130742. function toBlock(node, parent) {
  130743. if ((0, _generated.isBlockStatement)(node)) {
  130744. return node;
  130745. }
  130746. let blockNodes = [];
  130747. if ((0, _generated.isEmptyStatement)(node)) {
  130748. blockNodes = [];
  130749. } else {
  130750. if (!(0, _generated.isStatement)(node)) {
  130751. if ((0, _generated.isFunction)(parent)) {
  130752. node = (0, _generated2.returnStatement)(node);
  130753. } else {
  130754. node = (0, _generated2.expressionStatement)(node);
  130755. }
  130756. }
  130757. blockNodes = [node];
  130758. }
  130759. return (0, _generated2.blockStatement)(blockNodes);
  130760. }
  130761. }
  130762. });
  130763. // node_modules/@babel/template/node_modules/@babel/types/lib/converters/ensureBlock.js
  130764. var require_ensureBlock6 = __commonJS({
  130765. "node_modules/@babel/template/node_modules/@babel/types/lib/converters/ensureBlock.js"(exports) {
  130766. "use strict";
  130767. Object.defineProperty(exports, "__esModule", {
  130768. value: true
  130769. });
  130770. exports.default = ensureBlock;
  130771. var _toBlock = require_toBlock6();
  130772. function ensureBlock(node, key = "body") {
  130773. return node[key] = (0, _toBlock.default)(node[key], node);
  130774. }
  130775. }
  130776. });
  130777. // node_modules/@babel/template/node_modules/@babel/types/lib/converters/toIdentifier.js
  130778. var require_toIdentifier6 = __commonJS({
  130779. "node_modules/@babel/template/node_modules/@babel/types/lib/converters/toIdentifier.js"(exports) {
  130780. "use strict";
  130781. Object.defineProperty(exports, "__esModule", {
  130782. value: true
  130783. });
  130784. exports.default = toIdentifier2;
  130785. var _isValidIdentifier = require_isValidIdentifier6();
  130786. var _helperValidatorIdentifier = require_lib29();
  130787. function toIdentifier2(input) {
  130788. input = input + "";
  130789. let name2 = "";
  130790. for (const c of input) {
  130791. name2 += (0, _helperValidatorIdentifier.isIdentifierChar)(c.codePointAt(0)) ? c : "-";
  130792. }
  130793. name2 = name2.replace(/^[-0-9]+/, "");
  130794. name2 = name2.replace(/[-\s]+(.)?/g, function(match, c) {
  130795. return c ? c.toUpperCase() : "";
  130796. });
  130797. if (!(0, _isValidIdentifier.default)(name2)) {
  130798. name2 = `_${name2}`;
  130799. }
  130800. return name2 || "_";
  130801. }
  130802. }
  130803. });
  130804. // node_modules/@babel/template/node_modules/@babel/types/lib/converters/toBindingIdentifierName.js
  130805. var require_toBindingIdentifierName6 = __commonJS({
  130806. "node_modules/@babel/template/node_modules/@babel/types/lib/converters/toBindingIdentifierName.js"(exports) {
  130807. "use strict";
  130808. Object.defineProperty(exports, "__esModule", {
  130809. value: true
  130810. });
  130811. exports.default = toBindingIdentifierName;
  130812. var _toIdentifier = require_toIdentifier6();
  130813. function toBindingIdentifierName(name2) {
  130814. name2 = (0, _toIdentifier.default)(name2);
  130815. if (name2 === "eval" || name2 === "arguments")
  130816. name2 = "_" + name2;
  130817. return name2;
  130818. }
  130819. }
  130820. });
  130821. // node_modules/@babel/template/node_modules/@babel/types/lib/converters/toComputedKey.js
  130822. var require_toComputedKey6 = __commonJS({
  130823. "node_modules/@babel/template/node_modules/@babel/types/lib/converters/toComputedKey.js"(exports) {
  130824. "use strict";
  130825. Object.defineProperty(exports, "__esModule", {
  130826. value: true
  130827. });
  130828. exports.default = toComputedKey;
  130829. var _generated = require_generated26();
  130830. var _generated2 = require_generated27();
  130831. function toComputedKey(node, key = node.key || node.property) {
  130832. if (!node.computed && (0, _generated.isIdentifier)(key))
  130833. key = (0, _generated2.stringLiteral)(key.name);
  130834. return key;
  130835. }
  130836. }
  130837. });
  130838. // node_modules/@babel/template/node_modules/@babel/types/lib/converters/toExpression.js
  130839. var require_toExpression6 = __commonJS({
  130840. "node_modules/@babel/template/node_modules/@babel/types/lib/converters/toExpression.js"(exports) {
  130841. "use strict";
  130842. Object.defineProperty(exports, "__esModule", {
  130843. value: true
  130844. });
  130845. exports.default = void 0;
  130846. var _generated = require_generated26();
  130847. var _default = toExpression;
  130848. exports.default = _default;
  130849. function toExpression(node) {
  130850. if ((0, _generated.isExpressionStatement)(node)) {
  130851. node = node.expression;
  130852. }
  130853. if ((0, _generated.isExpression)(node)) {
  130854. return node;
  130855. }
  130856. if ((0, _generated.isClass)(node)) {
  130857. node.type = "ClassExpression";
  130858. } else if ((0, _generated.isFunction)(node)) {
  130859. node.type = "FunctionExpression";
  130860. }
  130861. if (!(0, _generated.isExpression)(node)) {
  130862. throw new Error(`cannot turn ${node.type} to an expression`);
  130863. }
  130864. return node;
  130865. }
  130866. }
  130867. });
  130868. // node_modules/@babel/template/node_modules/@babel/types/lib/traverse/traverseFast.js
  130869. var require_traverseFast6 = __commonJS({
  130870. "node_modules/@babel/template/node_modules/@babel/types/lib/traverse/traverseFast.js"(exports) {
  130871. "use strict";
  130872. Object.defineProperty(exports, "__esModule", {
  130873. value: true
  130874. });
  130875. exports.default = traverseFast;
  130876. var _definitions = require_definitions6();
  130877. function traverseFast(node, enter, opts) {
  130878. if (!node)
  130879. return;
  130880. const keys2 = _definitions.VISITOR_KEYS[node.type];
  130881. if (!keys2)
  130882. return;
  130883. opts = opts || {};
  130884. enter(node, opts);
  130885. for (const key of keys2) {
  130886. const subNode = node[key];
  130887. if (Array.isArray(subNode)) {
  130888. for (const node2 of subNode) {
  130889. traverseFast(node2, enter, opts);
  130890. }
  130891. } else {
  130892. traverseFast(subNode, enter, opts);
  130893. }
  130894. }
  130895. }
  130896. }
  130897. });
  130898. // node_modules/@babel/template/node_modules/@babel/types/lib/modifications/removeProperties.js
  130899. var require_removeProperties6 = __commonJS({
  130900. "node_modules/@babel/template/node_modules/@babel/types/lib/modifications/removeProperties.js"(exports) {
  130901. "use strict";
  130902. Object.defineProperty(exports, "__esModule", {
  130903. value: true
  130904. });
  130905. exports.default = removeProperties;
  130906. var _constants = require_constants6();
  130907. var CLEAR_KEYS = ["tokens", "start", "end", "loc", "raw", "rawValue"];
  130908. var CLEAR_KEYS_PLUS_COMMENTS = _constants.COMMENT_KEYS.concat(["comments"]).concat(CLEAR_KEYS);
  130909. function removeProperties(node, opts = {}) {
  130910. const map = opts.preserveComments ? CLEAR_KEYS : CLEAR_KEYS_PLUS_COMMENTS;
  130911. for (const key of map) {
  130912. if (node[key] != null)
  130913. node[key] = void 0;
  130914. }
  130915. for (const key of Object.keys(node)) {
  130916. if (key[0] === "_" && node[key] != null)
  130917. node[key] = void 0;
  130918. }
  130919. const symbols = Object.getOwnPropertySymbols(node);
  130920. for (const sym of symbols) {
  130921. node[sym] = null;
  130922. }
  130923. }
  130924. }
  130925. });
  130926. // node_modules/@babel/template/node_modules/@babel/types/lib/modifications/removePropertiesDeep.js
  130927. var require_removePropertiesDeep6 = __commonJS({
  130928. "node_modules/@babel/template/node_modules/@babel/types/lib/modifications/removePropertiesDeep.js"(exports) {
  130929. "use strict";
  130930. Object.defineProperty(exports, "__esModule", {
  130931. value: true
  130932. });
  130933. exports.default = removePropertiesDeep;
  130934. var _traverseFast = require_traverseFast6();
  130935. var _removeProperties = require_removeProperties6();
  130936. function removePropertiesDeep(tree, opts) {
  130937. (0, _traverseFast.default)(tree, _removeProperties.default, opts);
  130938. return tree;
  130939. }
  130940. }
  130941. });
  130942. // node_modules/@babel/template/node_modules/@babel/types/lib/converters/toKeyAlias.js
  130943. var require_toKeyAlias6 = __commonJS({
  130944. "node_modules/@babel/template/node_modules/@babel/types/lib/converters/toKeyAlias.js"(exports) {
  130945. "use strict";
  130946. Object.defineProperty(exports, "__esModule", {
  130947. value: true
  130948. });
  130949. exports.default = toKeyAlias;
  130950. var _generated = require_generated26();
  130951. var _cloneNode = require_cloneNode6();
  130952. var _removePropertiesDeep = require_removePropertiesDeep6();
  130953. function toKeyAlias(node, key = node.key) {
  130954. let alias;
  130955. if (node.kind === "method") {
  130956. return toKeyAlias.increment() + "";
  130957. } else if ((0, _generated.isIdentifier)(key)) {
  130958. alias = key.name;
  130959. } else if ((0, _generated.isStringLiteral)(key)) {
  130960. alias = JSON.stringify(key.value);
  130961. } else {
  130962. alias = JSON.stringify((0, _removePropertiesDeep.default)((0, _cloneNode.default)(key)));
  130963. }
  130964. if (node.computed) {
  130965. alias = `[${alias}]`;
  130966. }
  130967. if (node.static) {
  130968. alias = `static:${alias}`;
  130969. }
  130970. return alias;
  130971. }
  130972. toKeyAlias.uid = 0;
  130973. toKeyAlias.increment = function() {
  130974. if (toKeyAlias.uid >= Number.MAX_SAFE_INTEGER) {
  130975. return toKeyAlias.uid = 0;
  130976. } else {
  130977. return toKeyAlias.uid++;
  130978. }
  130979. };
  130980. }
  130981. });
  130982. // node_modules/@babel/template/node_modules/@babel/types/lib/retrievers/getBindingIdentifiers.js
  130983. var require_getBindingIdentifiers6 = __commonJS({
  130984. "node_modules/@babel/template/node_modules/@babel/types/lib/retrievers/getBindingIdentifiers.js"(exports) {
  130985. "use strict";
  130986. Object.defineProperty(exports, "__esModule", {
  130987. value: true
  130988. });
  130989. exports.default = getBindingIdentifiers;
  130990. var _generated = require_generated26();
  130991. function getBindingIdentifiers(node, duplicates, outerOnly) {
  130992. let search2 = [].concat(node);
  130993. const ids = /* @__PURE__ */ Object.create(null);
  130994. while (search2.length) {
  130995. const id = search2.shift();
  130996. if (!id)
  130997. continue;
  130998. const keys2 = getBindingIdentifiers.keys[id.type];
  130999. if ((0, _generated.isIdentifier)(id)) {
  131000. if (duplicates) {
  131001. const _ids = ids[id.name] = ids[id.name] || [];
  131002. _ids.push(id);
  131003. } else {
  131004. ids[id.name] = id;
  131005. }
  131006. continue;
  131007. }
  131008. if ((0, _generated.isExportDeclaration)(id) && !(0, _generated.isExportAllDeclaration)(id)) {
  131009. if ((0, _generated.isDeclaration)(id.declaration)) {
  131010. search2.push(id.declaration);
  131011. }
  131012. continue;
  131013. }
  131014. if (outerOnly) {
  131015. if ((0, _generated.isFunctionDeclaration)(id)) {
  131016. search2.push(id.id);
  131017. continue;
  131018. }
  131019. if ((0, _generated.isFunctionExpression)(id)) {
  131020. continue;
  131021. }
  131022. }
  131023. if (keys2) {
  131024. for (let i = 0; i < keys2.length; i++) {
  131025. const key = keys2[i];
  131026. if (id[key]) {
  131027. search2 = search2.concat(id[key]);
  131028. }
  131029. }
  131030. }
  131031. }
  131032. return ids;
  131033. }
  131034. getBindingIdentifiers.keys = {
  131035. DeclareClass: ["id"],
  131036. DeclareFunction: ["id"],
  131037. DeclareModule: ["id"],
  131038. DeclareVariable: ["id"],
  131039. DeclareInterface: ["id"],
  131040. DeclareTypeAlias: ["id"],
  131041. DeclareOpaqueType: ["id"],
  131042. InterfaceDeclaration: ["id"],
  131043. TypeAlias: ["id"],
  131044. OpaqueType: ["id"],
  131045. CatchClause: ["param"],
  131046. LabeledStatement: ["label"],
  131047. UnaryExpression: ["argument"],
  131048. AssignmentExpression: ["left"],
  131049. ImportSpecifier: ["local"],
  131050. ImportNamespaceSpecifier: ["local"],
  131051. ImportDefaultSpecifier: ["local"],
  131052. ImportDeclaration: ["specifiers"],
  131053. ExportSpecifier: ["exported"],
  131054. ExportNamespaceSpecifier: ["exported"],
  131055. ExportDefaultSpecifier: ["exported"],
  131056. FunctionDeclaration: ["id", "params"],
  131057. FunctionExpression: ["id", "params"],
  131058. ArrowFunctionExpression: ["params"],
  131059. ObjectMethod: ["params"],
  131060. ClassMethod: ["params"],
  131061. ForInStatement: ["left"],
  131062. ForOfStatement: ["left"],
  131063. ClassDeclaration: ["id"],
  131064. ClassExpression: ["id"],
  131065. RestElement: ["argument"],
  131066. UpdateExpression: ["argument"],
  131067. ObjectProperty: ["value"],
  131068. AssignmentPattern: ["left"],
  131069. ArrayPattern: ["elements"],
  131070. ObjectPattern: ["properties"],
  131071. VariableDeclaration: ["declarations"],
  131072. VariableDeclarator: ["id"]
  131073. };
  131074. }
  131075. });
  131076. // node_modules/@babel/template/node_modules/@babel/types/lib/converters/gatherSequenceExpressions.js
  131077. var require_gatherSequenceExpressions6 = __commonJS({
  131078. "node_modules/@babel/template/node_modules/@babel/types/lib/converters/gatherSequenceExpressions.js"(exports) {
  131079. "use strict";
  131080. Object.defineProperty(exports, "__esModule", {
  131081. value: true
  131082. });
  131083. exports.default = gatherSequenceExpressions;
  131084. var _getBindingIdentifiers = require_getBindingIdentifiers6();
  131085. var _generated = require_generated26();
  131086. var _generated2 = require_generated27();
  131087. var _cloneNode = require_cloneNode6();
  131088. function gatherSequenceExpressions(nodes, scope, declars) {
  131089. const exprs = [];
  131090. let ensureLastUndefined = true;
  131091. for (const node of nodes) {
  131092. if (!(0, _generated.isEmptyStatement)(node)) {
  131093. ensureLastUndefined = false;
  131094. }
  131095. if ((0, _generated.isExpression)(node)) {
  131096. exprs.push(node);
  131097. } else if ((0, _generated.isExpressionStatement)(node)) {
  131098. exprs.push(node.expression);
  131099. } else if ((0, _generated.isVariableDeclaration)(node)) {
  131100. if (node.kind !== "var")
  131101. return;
  131102. for (const declar of node.declarations) {
  131103. const bindings = (0, _getBindingIdentifiers.default)(declar);
  131104. for (const key of Object.keys(bindings)) {
  131105. declars.push({
  131106. kind: node.kind,
  131107. id: (0, _cloneNode.default)(bindings[key])
  131108. });
  131109. }
  131110. if (declar.init) {
  131111. exprs.push((0, _generated2.assignmentExpression)("=", declar.id, declar.init));
  131112. }
  131113. }
  131114. ensureLastUndefined = true;
  131115. } else if ((0, _generated.isIfStatement)(node)) {
  131116. const consequent = node.consequent ? gatherSequenceExpressions([node.consequent], scope, declars) : scope.buildUndefinedNode();
  131117. const alternate = node.alternate ? gatherSequenceExpressions([node.alternate], scope, declars) : scope.buildUndefinedNode();
  131118. if (!consequent || !alternate)
  131119. return;
  131120. exprs.push((0, _generated2.conditionalExpression)(node.test, consequent, alternate));
  131121. } else if ((0, _generated.isBlockStatement)(node)) {
  131122. const body = gatherSequenceExpressions(node.body, scope, declars);
  131123. if (!body)
  131124. return;
  131125. exprs.push(body);
  131126. } else if ((0, _generated.isEmptyStatement)(node)) {
  131127. if (nodes.indexOf(node) === 0) {
  131128. ensureLastUndefined = true;
  131129. }
  131130. } else {
  131131. return;
  131132. }
  131133. }
  131134. if (ensureLastUndefined) {
  131135. exprs.push(scope.buildUndefinedNode());
  131136. }
  131137. if (exprs.length === 1) {
  131138. return exprs[0];
  131139. } else {
  131140. return (0, _generated2.sequenceExpression)(exprs);
  131141. }
  131142. }
  131143. }
  131144. });
  131145. // node_modules/@babel/template/node_modules/@babel/types/lib/converters/toSequenceExpression.js
  131146. var require_toSequenceExpression6 = __commonJS({
  131147. "node_modules/@babel/template/node_modules/@babel/types/lib/converters/toSequenceExpression.js"(exports) {
  131148. "use strict";
  131149. Object.defineProperty(exports, "__esModule", {
  131150. value: true
  131151. });
  131152. exports.default = toSequenceExpression;
  131153. var _gatherSequenceExpressions = require_gatherSequenceExpressions6();
  131154. function toSequenceExpression(nodes, scope) {
  131155. if (!(nodes != null && nodes.length))
  131156. return;
  131157. const declars = [];
  131158. const result = (0, _gatherSequenceExpressions.default)(nodes, scope, declars);
  131159. if (!result)
  131160. return;
  131161. for (const declar of declars) {
  131162. scope.push(declar);
  131163. }
  131164. return result;
  131165. }
  131166. }
  131167. });
  131168. // node_modules/@babel/template/node_modules/@babel/types/lib/converters/toStatement.js
  131169. var require_toStatement6 = __commonJS({
  131170. "node_modules/@babel/template/node_modules/@babel/types/lib/converters/toStatement.js"(exports) {
  131171. "use strict";
  131172. Object.defineProperty(exports, "__esModule", {
  131173. value: true
  131174. });
  131175. exports.default = void 0;
  131176. var _generated = require_generated26();
  131177. var _generated2 = require_generated27();
  131178. var _default = toStatement;
  131179. exports.default = _default;
  131180. function toStatement(node, ignore3) {
  131181. if ((0, _generated.isStatement)(node)) {
  131182. return node;
  131183. }
  131184. let mustHaveId = false;
  131185. let newType;
  131186. if ((0, _generated.isClass)(node)) {
  131187. mustHaveId = true;
  131188. newType = "ClassDeclaration";
  131189. } else if ((0, _generated.isFunction)(node)) {
  131190. mustHaveId = true;
  131191. newType = "FunctionDeclaration";
  131192. } else if ((0, _generated.isAssignmentExpression)(node)) {
  131193. return (0, _generated2.expressionStatement)(node);
  131194. }
  131195. if (mustHaveId && !node.id) {
  131196. newType = false;
  131197. }
  131198. if (!newType) {
  131199. if (ignore3) {
  131200. return false;
  131201. } else {
  131202. throw new Error(`cannot turn ${node.type} to a statement`);
  131203. }
  131204. }
  131205. node.type = newType;
  131206. return node;
  131207. }
  131208. }
  131209. });
  131210. // node_modules/@babel/template/node_modules/@babel/types/lib/converters/valueToNode.js
  131211. var require_valueToNode6 = __commonJS({
  131212. "node_modules/@babel/template/node_modules/@babel/types/lib/converters/valueToNode.js"(exports) {
  131213. "use strict";
  131214. Object.defineProperty(exports, "__esModule", {
  131215. value: true
  131216. });
  131217. exports.default = void 0;
  131218. var _isValidIdentifier = require_isValidIdentifier6();
  131219. var _generated = require_generated27();
  131220. var _default = valueToNode;
  131221. exports.default = _default;
  131222. var objectToString = Function.call.bind(Object.prototype.toString);
  131223. function isRegExp(value) {
  131224. return objectToString(value) === "[object RegExp]";
  131225. }
  131226. function isPlainObject2(value) {
  131227. if (typeof value !== "object" || value === null || Object.prototype.toString.call(value) !== "[object Object]") {
  131228. return false;
  131229. }
  131230. const proto = Object.getPrototypeOf(value);
  131231. return proto === null || Object.getPrototypeOf(proto) === null;
  131232. }
  131233. function valueToNode(value) {
  131234. if (value === void 0) {
  131235. return (0, _generated.identifier)("undefined");
  131236. }
  131237. if (value === true || value === false) {
  131238. return (0, _generated.booleanLiteral)(value);
  131239. }
  131240. if (value === null) {
  131241. return (0, _generated.nullLiteral)();
  131242. }
  131243. if (typeof value === "string") {
  131244. return (0, _generated.stringLiteral)(value);
  131245. }
  131246. if (typeof value === "number") {
  131247. let result;
  131248. if (Number.isFinite(value)) {
  131249. result = (0, _generated.numericLiteral)(Math.abs(value));
  131250. } else {
  131251. let numerator;
  131252. if (Number.isNaN(value)) {
  131253. numerator = (0, _generated.numericLiteral)(0);
  131254. } else {
  131255. numerator = (0, _generated.numericLiteral)(1);
  131256. }
  131257. result = (0, _generated.binaryExpression)("/", numerator, (0, _generated.numericLiteral)(0));
  131258. }
  131259. if (value < 0 || Object.is(value, -0)) {
  131260. result = (0, _generated.unaryExpression)("-", result);
  131261. }
  131262. return result;
  131263. }
  131264. if (isRegExp(value)) {
  131265. const pattern = value.source;
  131266. const flags = value.toString().match(/\/([a-z]+|)$/)[1];
  131267. return (0, _generated.regExpLiteral)(pattern, flags);
  131268. }
  131269. if (Array.isArray(value)) {
  131270. return (0, _generated.arrayExpression)(value.map(valueToNode));
  131271. }
  131272. if (isPlainObject2(value)) {
  131273. const props = [];
  131274. for (const key of Object.keys(value)) {
  131275. let nodeKey;
  131276. if ((0, _isValidIdentifier.default)(key)) {
  131277. nodeKey = (0, _generated.identifier)(key);
  131278. } else {
  131279. nodeKey = (0, _generated.stringLiteral)(key);
  131280. }
  131281. props.push((0, _generated.objectProperty)(nodeKey, valueToNode(value[key])));
  131282. }
  131283. return (0, _generated.objectExpression)(props);
  131284. }
  131285. throw new Error("don't know how to turn this value into a node");
  131286. }
  131287. }
  131288. });
  131289. // node_modules/@babel/template/node_modules/@babel/types/lib/modifications/appendToMemberExpression.js
  131290. var require_appendToMemberExpression6 = __commonJS({
  131291. "node_modules/@babel/template/node_modules/@babel/types/lib/modifications/appendToMemberExpression.js"(exports) {
  131292. "use strict";
  131293. Object.defineProperty(exports, "__esModule", {
  131294. value: true
  131295. });
  131296. exports.default = appendToMemberExpression;
  131297. var _generated = require_generated27();
  131298. function appendToMemberExpression(member, append, computed = false) {
  131299. member.object = (0, _generated.memberExpression)(member.object, member.property, member.computed);
  131300. member.property = append;
  131301. member.computed = !!computed;
  131302. return member;
  131303. }
  131304. }
  131305. });
  131306. // node_modules/@babel/template/node_modules/@babel/types/lib/modifications/inherits.js
  131307. var require_inherits6 = __commonJS({
  131308. "node_modules/@babel/template/node_modules/@babel/types/lib/modifications/inherits.js"(exports) {
  131309. "use strict";
  131310. Object.defineProperty(exports, "__esModule", {
  131311. value: true
  131312. });
  131313. exports.default = inherits;
  131314. var _constants = require_constants6();
  131315. var _inheritsComments = require_inheritsComments6();
  131316. function inherits(child, parent) {
  131317. if (!child || !parent)
  131318. return child;
  131319. for (const key of _constants.INHERIT_KEYS.optional) {
  131320. if (child[key] == null) {
  131321. child[key] = parent[key];
  131322. }
  131323. }
  131324. for (const key of Object.keys(parent)) {
  131325. if (key[0] === "_" && key !== "__clone")
  131326. child[key] = parent[key];
  131327. }
  131328. for (const key of _constants.INHERIT_KEYS.force) {
  131329. child[key] = parent[key];
  131330. }
  131331. (0, _inheritsComments.default)(child, parent);
  131332. return child;
  131333. }
  131334. }
  131335. });
  131336. // node_modules/@babel/template/node_modules/@babel/types/lib/modifications/prependToMemberExpression.js
  131337. var require_prependToMemberExpression6 = __commonJS({
  131338. "node_modules/@babel/template/node_modules/@babel/types/lib/modifications/prependToMemberExpression.js"(exports) {
  131339. "use strict";
  131340. Object.defineProperty(exports, "__esModule", {
  131341. value: true
  131342. });
  131343. exports.default = prependToMemberExpression;
  131344. var _generated = require_generated27();
  131345. function prependToMemberExpression(member, prepend) {
  131346. member.object = (0, _generated.memberExpression)(prepend, member.object);
  131347. return member;
  131348. }
  131349. }
  131350. });
  131351. // node_modules/@babel/template/node_modules/@babel/types/lib/retrievers/getOuterBindingIdentifiers.js
  131352. var require_getOuterBindingIdentifiers6 = __commonJS({
  131353. "node_modules/@babel/template/node_modules/@babel/types/lib/retrievers/getOuterBindingIdentifiers.js"(exports) {
  131354. "use strict";
  131355. Object.defineProperty(exports, "__esModule", {
  131356. value: true
  131357. });
  131358. exports.default = void 0;
  131359. var _getBindingIdentifiers = require_getBindingIdentifiers6();
  131360. var _default = getOuterBindingIdentifiers;
  131361. exports.default = _default;
  131362. function getOuterBindingIdentifiers(node, duplicates) {
  131363. return (0, _getBindingIdentifiers.default)(node, duplicates, true);
  131364. }
  131365. }
  131366. });
  131367. // node_modules/@babel/template/node_modules/@babel/types/lib/traverse/traverse.js
  131368. var require_traverse6 = __commonJS({
  131369. "node_modules/@babel/template/node_modules/@babel/types/lib/traverse/traverse.js"(exports) {
  131370. "use strict";
  131371. Object.defineProperty(exports, "__esModule", {
  131372. value: true
  131373. });
  131374. exports.default = traverse;
  131375. var _definitions = require_definitions6();
  131376. function traverse(node, handlers2, state) {
  131377. if (typeof handlers2 === "function") {
  131378. handlers2 = {
  131379. enter: handlers2
  131380. };
  131381. }
  131382. const {
  131383. enter,
  131384. exit: exit2
  131385. } = handlers2;
  131386. traverseSimpleImpl(node, enter, exit2, state, []);
  131387. }
  131388. function traverseSimpleImpl(node, enter, exit2, state, ancestors) {
  131389. const keys2 = _definitions.VISITOR_KEYS[node.type];
  131390. if (!keys2)
  131391. return;
  131392. if (enter)
  131393. enter(node, ancestors, state);
  131394. for (const key of keys2) {
  131395. const subNode = node[key];
  131396. if (Array.isArray(subNode)) {
  131397. for (let i = 0; i < subNode.length; i++) {
  131398. const child = subNode[i];
  131399. if (!child)
  131400. continue;
  131401. ancestors.push({
  131402. node,
  131403. key,
  131404. index: i
  131405. });
  131406. traverseSimpleImpl(child, enter, exit2, state, ancestors);
  131407. ancestors.pop();
  131408. }
  131409. } else if (subNode) {
  131410. ancestors.push({
  131411. node,
  131412. key
  131413. });
  131414. traverseSimpleImpl(subNode, enter, exit2, state, ancestors);
  131415. ancestors.pop();
  131416. }
  131417. }
  131418. if (exit2)
  131419. exit2(node, ancestors, state);
  131420. }
  131421. }
  131422. });
  131423. // node_modules/@babel/template/node_modules/@babel/types/lib/validators/isBinding.js
  131424. var require_isBinding6 = __commonJS({
  131425. "node_modules/@babel/template/node_modules/@babel/types/lib/validators/isBinding.js"(exports) {
  131426. "use strict";
  131427. Object.defineProperty(exports, "__esModule", {
  131428. value: true
  131429. });
  131430. exports.default = isBinding;
  131431. var _getBindingIdentifiers = require_getBindingIdentifiers6();
  131432. function isBinding(node, parent, grandparent) {
  131433. if (grandparent && node.type === "Identifier" && parent.type === "ObjectProperty" && grandparent.type === "ObjectExpression") {
  131434. return false;
  131435. }
  131436. const keys2 = _getBindingIdentifiers.default.keys[parent.type];
  131437. if (keys2) {
  131438. for (let i = 0; i < keys2.length; i++) {
  131439. const key = keys2[i];
  131440. const val = parent[key];
  131441. if (Array.isArray(val)) {
  131442. if (val.indexOf(node) >= 0)
  131443. return true;
  131444. } else {
  131445. if (val === node)
  131446. return true;
  131447. }
  131448. }
  131449. }
  131450. return false;
  131451. }
  131452. }
  131453. });
  131454. // node_modules/@babel/template/node_modules/@babel/types/lib/validators/isLet.js
  131455. var require_isLet6 = __commonJS({
  131456. "node_modules/@babel/template/node_modules/@babel/types/lib/validators/isLet.js"(exports) {
  131457. "use strict";
  131458. Object.defineProperty(exports, "__esModule", {
  131459. value: true
  131460. });
  131461. exports.default = isLet;
  131462. var _generated = require_generated26();
  131463. var _constants = require_constants6();
  131464. function isLet(node) {
  131465. return (0, _generated.isVariableDeclaration)(node) && (node.kind !== "var" || node[_constants.BLOCK_SCOPED_SYMBOL]);
  131466. }
  131467. }
  131468. });
  131469. // node_modules/@babel/template/node_modules/@babel/types/lib/validators/isBlockScoped.js
  131470. var require_isBlockScoped6 = __commonJS({
  131471. "node_modules/@babel/template/node_modules/@babel/types/lib/validators/isBlockScoped.js"(exports) {
  131472. "use strict";
  131473. Object.defineProperty(exports, "__esModule", {
  131474. value: true
  131475. });
  131476. exports.default = isBlockScoped;
  131477. var _generated = require_generated26();
  131478. var _isLet = require_isLet6();
  131479. function isBlockScoped(node) {
  131480. return (0, _generated.isFunctionDeclaration)(node) || (0, _generated.isClassDeclaration)(node) || (0, _isLet.default)(node);
  131481. }
  131482. }
  131483. });
  131484. // node_modules/@babel/template/node_modules/@babel/types/lib/validators/isImmutable.js
  131485. var require_isImmutable6 = __commonJS({
  131486. "node_modules/@babel/template/node_modules/@babel/types/lib/validators/isImmutable.js"(exports) {
  131487. "use strict";
  131488. Object.defineProperty(exports, "__esModule", {
  131489. value: true
  131490. });
  131491. exports.default = isImmutable;
  131492. var _isType = require_isType6();
  131493. var _generated = require_generated26();
  131494. function isImmutable(node) {
  131495. if ((0, _isType.default)(node.type, "Immutable"))
  131496. return true;
  131497. if ((0, _generated.isIdentifier)(node)) {
  131498. if (node.name === "undefined") {
  131499. return true;
  131500. } else {
  131501. return false;
  131502. }
  131503. }
  131504. return false;
  131505. }
  131506. }
  131507. });
  131508. // node_modules/@babel/template/node_modules/@babel/types/lib/validators/isNodesEquivalent.js
  131509. var require_isNodesEquivalent6 = __commonJS({
  131510. "node_modules/@babel/template/node_modules/@babel/types/lib/validators/isNodesEquivalent.js"(exports) {
  131511. "use strict";
  131512. Object.defineProperty(exports, "__esModule", {
  131513. value: true
  131514. });
  131515. exports.default = isNodesEquivalent;
  131516. var _definitions = require_definitions6();
  131517. function isNodesEquivalent(a, b) {
  131518. if (typeof a !== "object" || typeof b !== "object" || a == null || b == null) {
  131519. return a === b;
  131520. }
  131521. if (a.type !== b.type) {
  131522. return false;
  131523. }
  131524. const fields = Object.keys(_definitions.NODE_FIELDS[a.type] || a.type);
  131525. const visitorKeys = _definitions.VISITOR_KEYS[a.type];
  131526. for (const field of fields) {
  131527. if (typeof a[field] !== typeof b[field]) {
  131528. return false;
  131529. }
  131530. if (a[field] == null && b[field] == null) {
  131531. continue;
  131532. } else if (a[field] == null || b[field] == null) {
  131533. return false;
  131534. }
  131535. if (Array.isArray(a[field])) {
  131536. if (!Array.isArray(b[field])) {
  131537. return false;
  131538. }
  131539. if (a[field].length !== b[field].length) {
  131540. return false;
  131541. }
  131542. for (let i = 0; i < a[field].length; i++) {
  131543. if (!isNodesEquivalent(a[field][i], b[field][i])) {
  131544. return false;
  131545. }
  131546. }
  131547. continue;
  131548. }
  131549. if (typeof a[field] === "object" && !(visitorKeys != null && visitorKeys.includes(field))) {
  131550. for (const key of Object.keys(a[field])) {
  131551. if (a[field][key] !== b[field][key]) {
  131552. return false;
  131553. }
  131554. }
  131555. continue;
  131556. }
  131557. if (!isNodesEquivalent(a[field], b[field])) {
  131558. return false;
  131559. }
  131560. }
  131561. return true;
  131562. }
  131563. }
  131564. });
  131565. // node_modules/@babel/template/node_modules/@babel/types/lib/validators/isReferenced.js
  131566. var require_isReferenced6 = __commonJS({
  131567. "node_modules/@babel/template/node_modules/@babel/types/lib/validators/isReferenced.js"(exports) {
  131568. "use strict";
  131569. Object.defineProperty(exports, "__esModule", {
  131570. value: true
  131571. });
  131572. exports.default = isReferenced;
  131573. function isReferenced(node, parent, grandparent) {
  131574. switch (parent.type) {
  131575. case "MemberExpression":
  131576. case "JSXMemberExpression":
  131577. case "OptionalMemberExpression":
  131578. if (parent.property === node) {
  131579. return !!parent.computed;
  131580. }
  131581. return parent.object === node;
  131582. case "VariableDeclarator":
  131583. return parent.init === node;
  131584. case "ArrowFunctionExpression":
  131585. return parent.body === node;
  131586. case "PrivateName":
  131587. return false;
  131588. case "ClassMethod":
  131589. case "ClassPrivateMethod":
  131590. case "ObjectMethod":
  131591. if (parent.params.includes(node)) {
  131592. return false;
  131593. }
  131594. case "ObjectProperty":
  131595. case "ClassProperty":
  131596. case "ClassPrivateProperty":
  131597. if (parent.key === node) {
  131598. return !!parent.computed;
  131599. }
  131600. if (parent.value === node) {
  131601. return !grandparent || grandparent.type !== "ObjectPattern";
  131602. }
  131603. return true;
  131604. case "ClassDeclaration":
  131605. case "ClassExpression":
  131606. return parent.superClass === node;
  131607. case "AssignmentExpression":
  131608. return parent.right === node;
  131609. case "AssignmentPattern":
  131610. return parent.right === node;
  131611. case "LabeledStatement":
  131612. return false;
  131613. case "CatchClause":
  131614. return false;
  131615. case "RestElement":
  131616. return false;
  131617. case "BreakStatement":
  131618. case "ContinueStatement":
  131619. return false;
  131620. case "FunctionDeclaration":
  131621. case "FunctionExpression":
  131622. return false;
  131623. case "ExportNamespaceSpecifier":
  131624. case "ExportDefaultSpecifier":
  131625. return false;
  131626. case "ExportSpecifier":
  131627. if (grandparent != null && grandparent.source) {
  131628. return false;
  131629. }
  131630. return parent.local === node;
  131631. case "ImportDefaultSpecifier":
  131632. case "ImportNamespaceSpecifier":
  131633. case "ImportSpecifier":
  131634. return false;
  131635. case "JSXAttribute":
  131636. return false;
  131637. case "ObjectPattern":
  131638. case "ArrayPattern":
  131639. return false;
  131640. case "MetaProperty":
  131641. return false;
  131642. case "ObjectTypeProperty":
  131643. return parent.key !== node;
  131644. case "TSEnumMember":
  131645. return parent.id !== node;
  131646. case "TSPropertySignature":
  131647. if (parent.key === node) {
  131648. return !!parent.computed;
  131649. }
  131650. return true;
  131651. }
  131652. return true;
  131653. }
  131654. }
  131655. });
  131656. // node_modules/@babel/template/node_modules/@babel/types/lib/validators/isScope.js
  131657. var require_isScope6 = __commonJS({
  131658. "node_modules/@babel/template/node_modules/@babel/types/lib/validators/isScope.js"(exports) {
  131659. "use strict";
  131660. Object.defineProperty(exports, "__esModule", {
  131661. value: true
  131662. });
  131663. exports.default = isScope;
  131664. var _generated = require_generated26();
  131665. function isScope(node, parent) {
  131666. if ((0, _generated.isBlockStatement)(node) && ((0, _generated.isFunction)(parent) || (0, _generated.isCatchClause)(parent))) {
  131667. return false;
  131668. }
  131669. if ((0, _generated.isPattern)(node) && ((0, _generated.isFunction)(parent) || (0, _generated.isCatchClause)(parent))) {
  131670. return true;
  131671. }
  131672. return (0, _generated.isScopable)(node);
  131673. }
  131674. }
  131675. });
  131676. // node_modules/@babel/template/node_modules/@babel/types/lib/validators/isSpecifierDefault.js
  131677. var require_isSpecifierDefault6 = __commonJS({
  131678. "node_modules/@babel/template/node_modules/@babel/types/lib/validators/isSpecifierDefault.js"(exports) {
  131679. "use strict";
  131680. Object.defineProperty(exports, "__esModule", {
  131681. value: true
  131682. });
  131683. exports.default = isSpecifierDefault;
  131684. var _generated = require_generated26();
  131685. function isSpecifierDefault(specifier) {
  131686. return (0, _generated.isImportDefaultSpecifier)(specifier) || (0, _generated.isIdentifier)(specifier.imported || specifier.exported, {
  131687. name: "default"
  131688. });
  131689. }
  131690. }
  131691. });
  131692. // node_modules/@babel/template/node_modules/@babel/types/lib/validators/isValidES3Identifier.js
  131693. var require_isValidES3Identifier6 = __commonJS({
  131694. "node_modules/@babel/template/node_modules/@babel/types/lib/validators/isValidES3Identifier.js"(exports) {
  131695. "use strict";
  131696. Object.defineProperty(exports, "__esModule", {
  131697. value: true
  131698. });
  131699. exports.default = isValidES3Identifier;
  131700. var _isValidIdentifier = require_isValidIdentifier6();
  131701. var RESERVED_WORDS_ES3_ONLY = /* @__PURE__ */ new Set(["abstract", "boolean", "byte", "char", "double", "enum", "final", "float", "goto", "implements", "int", "interface", "long", "native", "package", "private", "protected", "public", "short", "static", "synchronized", "throws", "transient", "volatile"]);
  131702. function isValidES3Identifier(name2) {
  131703. return (0, _isValidIdentifier.default)(name2) && !RESERVED_WORDS_ES3_ONLY.has(name2);
  131704. }
  131705. }
  131706. });
  131707. // node_modules/@babel/template/node_modules/@babel/types/lib/validators/isVar.js
  131708. var require_isVar6 = __commonJS({
  131709. "node_modules/@babel/template/node_modules/@babel/types/lib/validators/isVar.js"(exports) {
  131710. "use strict";
  131711. Object.defineProperty(exports, "__esModule", {
  131712. value: true
  131713. });
  131714. exports.default = isVar;
  131715. var _generated = require_generated26();
  131716. var _constants = require_constants6();
  131717. function isVar(node) {
  131718. return (0, _generated.isVariableDeclaration)(node, {
  131719. kind: "var"
  131720. }) && !node[_constants.BLOCK_SCOPED_SYMBOL];
  131721. }
  131722. }
  131723. });
  131724. // node_modules/@babel/template/node_modules/@babel/types/lib/ast-types/generated/index.js
  131725. var require_generated30 = __commonJS({
  131726. "node_modules/@babel/template/node_modules/@babel/types/lib/ast-types/generated/index.js"() {
  131727. }
  131728. });
  131729. // node_modules/@babel/template/node_modules/@babel/types/lib/index.js
  131730. var require_lib30 = __commonJS({
  131731. "node_modules/@babel/template/node_modules/@babel/types/lib/index.js"(exports) {
  131732. "use strict";
  131733. Object.defineProperty(exports, "__esModule", {
  131734. value: true
  131735. });
  131736. var _exportNames = {
  131737. react: true,
  131738. assertNode: true,
  131739. createTypeAnnotationBasedOnTypeof: true,
  131740. createUnionTypeAnnotation: true,
  131741. createFlowUnionType: true,
  131742. createTSUnionType: true,
  131743. cloneNode: true,
  131744. clone: true,
  131745. cloneDeep: true,
  131746. cloneDeepWithoutLoc: true,
  131747. cloneWithoutLoc: true,
  131748. addComment: true,
  131749. addComments: true,
  131750. inheritInnerComments: true,
  131751. inheritLeadingComments: true,
  131752. inheritsComments: true,
  131753. inheritTrailingComments: true,
  131754. removeComments: true,
  131755. ensureBlock: true,
  131756. toBindingIdentifierName: true,
  131757. toBlock: true,
  131758. toComputedKey: true,
  131759. toExpression: true,
  131760. toIdentifier: true,
  131761. toKeyAlias: true,
  131762. toSequenceExpression: true,
  131763. toStatement: true,
  131764. valueToNode: true,
  131765. appendToMemberExpression: true,
  131766. inherits: true,
  131767. prependToMemberExpression: true,
  131768. removeProperties: true,
  131769. removePropertiesDeep: true,
  131770. removeTypeDuplicates: true,
  131771. getBindingIdentifiers: true,
  131772. getOuterBindingIdentifiers: true,
  131773. traverse: true,
  131774. traverseFast: true,
  131775. shallowEqual: true,
  131776. is: true,
  131777. isBinding: true,
  131778. isBlockScoped: true,
  131779. isImmutable: true,
  131780. isLet: true,
  131781. isNode: true,
  131782. isNodesEquivalent: true,
  131783. isPlaceholderType: true,
  131784. isReferenced: true,
  131785. isScope: true,
  131786. isSpecifierDefault: true,
  131787. isType: true,
  131788. isValidES3Identifier: true,
  131789. isValidIdentifier: true,
  131790. isVar: true,
  131791. matchesPattern: true,
  131792. validate: true,
  131793. buildMatchMemberExpression: true
  131794. };
  131795. Object.defineProperty(exports, "assertNode", {
  131796. enumerable: true,
  131797. get: function() {
  131798. return _assertNode.default;
  131799. }
  131800. });
  131801. Object.defineProperty(exports, "createTypeAnnotationBasedOnTypeof", {
  131802. enumerable: true,
  131803. get: function() {
  131804. return _createTypeAnnotationBasedOnTypeof.default;
  131805. }
  131806. });
  131807. Object.defineProperty(exports, "createUnionTypeAnnotation", {
  131808. enumerable: true,
  131809. get: function() {
  131810. return _createFlowUnionType.default;
  131811. }
  131812. });
  131813. Object.defineProperty(exports, "createFlowUnionType", {
  131814. enumerable: true,
  131815. get: function() {
  131816. return _createFlowUnionType.default;
  131817. }
  131818. });
  131819. Object.defineProperty(exports, "createTSUnionType", {
  131820. enumerable: true,
  131821. get: function() {
  131822. return _createTSUnionType.default;
  131823. }
  131824. });
  131825. Object.defineProperty(exports, "cloneNode", {
  131826. enumerable: true,
  131827. get: function() {
  131828. return _cloneNode.default;
  131829. }
  131830. });
  131831. Object.defineProperty(exports, "clone", {
  131832. enumerable: true,
  131833. get: function() {
  131834. return _clone.default;
  131835. }
  131836. });
  131837. Object.defineProperty(exports, "cloneDeep", {
  131838. enumerable: true,
  131839. get: function() {
  131840. return _cloneDeep.default;
  131841. }
  131842. });
  131843. Object.defineProperty(exports, "cloneDeepWithoutLoc", {
  131844. enumerable: true,
  131845. get: function() {
  131846. return _cloneDeepWithoutLoc.default;
  131847. }
  131848. });
  131849. Object.defineProperty(exports, "cloneWithoutLoc", {
  131850. enumerable: true,
  131851. get: function() {
  131852. return _cloneWithoutLoc.default;
  131853. }
  131854. });
  131855. Object.defineProperty(exports, "addComment", {
  131856. enumerable: true,
  131857. get: function() {
  131858. return _addComment.default;
  131859. }
  131860. });
  131861. Object.defineProperty(exports, "addComments", {
  131862. enumerable: true,
  131863. get: function() {
  131864. return _addComments.default;
  131865. }
  131866. });
  131867. Object.defineProperty(exports, "inheritInnerComments", {
  131868. enumerable: true,
  131869. get: function() {
  131870. return _inheritInnerComments.default;
  131871. }
  131872. });
  131873. Object.defineProperty(exports, "inheritLeadingComments", {
  131874. enumerable: true,
  131875. get: function() {
  131876. return _inheritLeadingComments.default;
  131877. }
  131878. });
  131879. Object.defineProperty(exports, "inheritsComments", {
  131880. enumerable: true,
  131881. get: function() {
  131882. return _inheritsComments.default;
  131883. }
  131884. });
  131885. Object.defineProperty(exports, "inheritTrailingComments", {
  131886. enumerable: true,
  131887. get: function() {
  131888. return _inheritTrailingComments.default;
  131889. }
  131890. });
  131891. Object.defineProperty(exports, "removeComments", {
  131892. enumerable: true,
  131893. get: function() {
  131894. return _removeComments.default;
  131895. }
  131896. });
  131897. Object.defineProperty(exports, "ensureBlock", {
  131898. enumerable: true,
  131899. get: function() {
  131900. return _ensureBlock.default;
  131901. }
  131902. });
  131903. Object.defineProperty(exports, "toBindingIdentifierName", {
  131904. enumerable: true,
  131905. get: function() {
  131906. return _toBindingIdentifierName.default;
  131907. }
  131908. });
  131909. Object.defineProperty(exports, "toBlock", {
  131910. enumerable: true,
  131911. get: function() {
  131912. return _toBlock.default;
  131913. }
  131914. });
  131915. Object.defineProperty(exports, "toComputedKey", {
  131916. enumerable: true,
  131917. get: function() {
  131918. return _toComputedKey.default;
  131919. }
  131920. });
  131921. Object.defineProperty(exports, "toExpression", {
  131922. enumerable: true,
  131923. get: function() {
  131924. return _toExpression.default;
  131925. }
  131926. });
  131927. Object.defineProperty(exports, "toIdentifier", {
  131928. enumerable: true,
  131929. get: function() {
  131930. return _toIdentifier.default;
  131931. }
  131932. });
  131933. Object.defineProperty(exports, "toKeyAlias", {
  131934. enumerable: true,
  131935. get: function() {
  131936. return _toKeyAlias.default;
  131937. }
  131938. });
  131939. Object.defineProperty(exports, "toSequenceExpression", {
  131940. enumerable: true,
  131941. get: function() {
  131942. return _toSequenceExpression.default;
  131943. }
  131944. });
  131945. Object.defineProperty(exports, "toStatement", {
  131946. enumerable: true,
  131947. get: function() {
  131948. return _toStatement.default;
  131949. }
  131950. });
  131951. Object.defineProperty(exports, "valueToNode", {
  131952. enumerable: true,
  131953. get: function() {
  131954. return _valueToNode.default;
  131955. }
  131956. });
  131957. Object.defineProperty(exports, "appendToMemberExpression", {
  131958. enumerable: true,
  131959. get: function() {
  131960. return _appendToMemberExpression.default;
  131961. }
  131962. });
  131963. Object.defineProperty(exports, "inherits", {
  131964. enumerable: true,
  131965. get: function() {
  131966. return _inherits.default;
  131967. }
  131968. });
  131969. Object.defineProperty(exports, "prependToMemberExpression", {
  131970. enumerable: true,
  131971. get: function() {
  131972. return _prependToMemberExpression.default;
  131973. }
  131974. });
  131975. Object.defineProperty(exports, "removeProperties", {
  131976. enumerable: true,
  131977. get: function() {
  131978. return _removeProperties.default;
  131979. }
  131980. });
  131981. Object.defineProperty(exports, "removePropertiesDeep", {
  131982. enumerable: true,
  131983. get: function() {
  131984. return _removePropertiesDeep.default;
  131985. }
  131986. });
  131987. Object.defineProperty(exports, "removeTypeDuplicates", {
  131988. enumerable: true,
  131989. get: function() {
  131990. return _removeTypeDuplicates.default;
  131991. }
  131992. });
  131993. Object.defineProperty(exports, "getBindingIdentifiers", {
  131994. enumerable: true,
  131995. get: function() {
  131996. return _getBindingIdentifiers.default;
  131997. }
  131998. });
  131999. Object.defineProperty(exports, "getOuterBindingIdentifiers", {
  132000. enumerable: true,
  132001. get: function() {
  132002. return _getOuterBindingIdentifiers.default;
  132003. }
  132004. });
  132005. Object.defineProperty(exports, "traverse", {
  132006. enumerable: true,
  132007. get: function() {
  132008. return _traverse.default;
  132009. }
  132010. });
  132011. Object.defineProperty(exports, "traverseFast", {
  132012. enumerable: true,
  132013. get: function() {
  132014. return _traverseFast.default;
  132015. }
  132016. });
  132017. Object.defineProperty(exports, "shallowEqual", {
  132018. enumerable: true,
  132019. get: function() {
  132020. return _shallowEqual.default;
  132021. }
  132022. });
  132023. Object.defineProperty(exports, "is", {
  132024. enumerable: true,
  132025. get: function() {
  132026. return _is.default;
  132027. }
  132028. });
  132029. Object.defineProperty(exports, "isBinding", {
  132030. enumerable: true,
  132031. get: function() {
  132032. return _isBinding.default;
  132033. }
  132034. });
  132035. Object.defineProperty(exports, "isBlockScoped", {
  132036. enumerable: true,
  132037. get: function() {
  132038. return _isBlockScoped.default;
  132039. }
  132040. });
  132041. Object.defineProperty(exports, "isImmutable", {
  132042. enumerable: true,
  132043. get: function() {
  132044. return _isImmutable.default;
  132045. }
  132046. });
  132047. Object.defineProperty(exports, "isLet", {
  132048. enumerable: true,
  132049. get: function() {
  132050. return _isLet.default;
  132051. }
  132052. });
  132053. Object.defineProperty(exports, "isNode", {
  132054. enumerable: true,
  132055. get: function() {
  132056. return _isNode.default;
  132057. }
  132058. });
  132059. Object.defineProperty(exports, "isNodesEquivalent", {
  132060. enumerable: true,
  132061. get: function() {
  132062. return _isNodesEquivalent.default;
  132063. }
  132064. });
  132065. Object.defineProperty(exports, "isPlaceholderType", {
  132066. enumerable: true,
  132067. get: function() {
  132068. return _isPlaceholderType.default;
  132069. }
  132070. });
  132071. Object.defineProperty(exports, "isReferenced", {
  132072. enumerable: true,
  132073. get: function() {
  132074. return _isReferenced.default;
  132075. }
  132076. });
  132077. Object.defineProperty(exports, "isScope", {
  132078. enumerable: true,
  132079. get: function() {
  132080. return _isScope.default;
  132081. }
  132082. });
  132083. Object.defineProperty(exports, "isSpecifierDefault", {
  132084. enumerable: true,
  132085. get: function() {
  132086. return _isSpecifierDefault.default;
  132087. }
  132088. });
  132089. Object.defineProperty(exports, "isType", {
  132090. enumerable: true,
  132091. get: function() {
  132092. return _isType.default;
  132093. }
  132094. });
  132095. Object.defineProperty(exports, "isValidES3Identifier", {
  132096. enumerable: true,
  132097. get: function() {
  132098. return _isValidES3Identifier.default;
  132099. }
  132100. });
  132101. Object.defineProperty(exports, "isValidIdentifier", {
  132102. enumerable: true,
  132103. get: function() {
  132104. return _isValidIdentifier.default;
  132105. }
  132106. });
  132107. Object.defineProperty(exports, "isVar", {
  132108. enumerable: true,
  132109. get: function() {
  132110. return _isVar.default;
  132111. }
  132112. });
  132113. Object.defineProperty(exports, "matchesPattern", {
  132114. enumerable: true,
  132115. get: function() {
  132116. return _matchesPattern.default;
  132117. }
  132118. });
  132119. Object.defineProperty(exports, "validate", {
  132120. enumerable: true,
  132121. get: function() {
  132122. return _validate.default;
  132123. }
  132124. });
  132125. Object.defineProperty(exports, "buildMatchMemberExpression", {
  132126. enumerable: true,
  132127. get: function() {
  132128. return _buildMatchMemberExpression.default;
  132129. }
  132130. });
  132131. exports.react = void 0;
  132132. var _isReactComponent = require_isReactComponent6();
  132133. var _isCompatTag = require_isCompatTag6();
  132134. var _buildChildren = require_buildChildren6();
  132135. var _assertNode = require_assertNode6();
  132136. var _generated = require_generated28();
  132137. Object.keys(_generated).forEach(function(key) {
  132138. if (key === "default" || key === "__esModule")
  132139. return;
  132140. if (Object.prototype.hasOwnProperty.call(_exportNames, key))
  132141. return;
  132142. if (key in exports && exports[key] === _generated[key])
  132143. return;
  132144. Object.defineProperty(exports, key, {
  132145. enumerable: true,
  132146. get: function() {
  132147. return _generated[key];
  132148. }
  132149. });
  132150. });
  132151. var _createTypeAnnotationBasedOnTypeof = require_createTypeAnnotationBasedOnTypeof6();
  132152. var _createFlowUnionType = require_createFlowUnionType6();
  132153. var _createTSUnionType = require_createTSUnionType6();
  132154. var _generated2 = require_generated27();
  132155. Object.keys(_generated2).forEach(function(key) {
  132156. if (key === "default" || key === "__esModule")
  132157. return;
  132158. if (Object.prototype.hasOwnProperty.call(_exportNames, key))
  132159. return;
  132160. if (key in exports && exports[key] === _generated2[key])
  132161. return;
  132162. Object.defineProperty(exports, key, {
  132163. enumerable: true,
  132164. get: function() {
  132165. return _generated2[key];
  132166. }
  132167. });
  132168. });
  132169. var _uppercase = require_uppercase6();
  132170. Object.keys(_uppercase).forEach(function(key) {
  132171. if (key === "default" || key === "__esModule")
  132172. return;
  132173. if (Object.prototype.hasOwnProperty.call(_exportNames, key))
  132174. return;
  132175. if (key in exports && exports[key] === _uppercase[key])
  132176. return;
  132177. Object.defineProperty(exports, key, {
  132178. enumerable: true,
  132179. get: function() {
  132180. return _uppercase[key];
  132181. }
  132182. });
  132183. });
  132184. var _cloneNode = require_cloneNode6();
  132185. var _clone = require_clone6();
  132186. var _cloneDeep = require_cloneDeep6();
  132187. var _cloneDeepWithoutLoc = require_cloneDeepWithoutLoc6();
  132188. var _cloneWithoutLoc = require_cloneWithoutLoc6();
  132189. var _addComment = require_addComment6();
  132190. var _addComments = require_addComments6();
  132191. var _inheritInnerComments = require_inheritInnerComments6();
  132192. var _inheritLeadingComments = require_inheritLeadingComments6();
  132193. var _inheritsComments = require_inheritsComments6();
  132194. var _inheritTrailingComments = require_inheritTrailingComments6();
  132195. var _removeComments = require_removeComments6();
  132196. var _generated3 = require_generated29();
  132197. Object.keys(_generated3).forEach(function(key) {
  132198. if (key === "default" || key === "__esModule")
  132199. return;
  132200. if (Object.prototype.hasOwnProperty.call(_exportNames, key))
  132201. return;
  132202. if (key in exports && exports[key] === _generated3[key])
  132203. return;
  132204. Object.defineProperty(exports, key, {
  132205. enumerable: true,
  132206. get: function() {
  132207. return _generated3[key];
  132208. }
  132209. });
  132210. });
  132211. var _constants = require_constants6();
  132212. Object.keys(_constants).forEach(function(key) {
  132213. if (key === "default" || key === "__esModule")
  132214. return;
  132215. if (Object.prototype.hasOwnProperty.call(_exportNames, key))
  132216. return;
  132217. if (key in exports && exports[key] === _constants[key])
  132218. return;
  132219. Object.defineProperty(exports, key, {
  132220. enumerable: true,
  132221. get: function() {
  132222. return _constants[key];
  132223. }
  132224. });
  132225. });
  132226. var _ensureBlock = require_ensureBlock6();
  132227. var _toBindingIdentifierName = require_toBindingIdentifierName6();
  132228. var _toBlock = require_toBlock6();
  132229. var _toComputedKey = require_toComputedKey6();
  132230. var _toExpression = require_toExpression6();
  132231. var _toIdentifier = require_toIdentifier6();
  132232. var _toKeyAlias = require_toKeyAlias6();
  132233. var _toSequenceExpression = require_toSequenceExpression6();
  132234. var _toStatement = require_toStatement6();
  132235. var _valueToNode = require_valueToNode6();
  132236. var _definitions = require_definitions6();
  132237. Object.keys(_definitions).forEach(function(key) {
  132238. if (key === "default" || key === "__esModule")
  132239. return;
  132240. if (Object.prototype.hasOwnProperty.call(_exportNames, key))
  132241. return;
  132242. if (key in exports && exports[key] === _definitions[key])
  132243. return;
  132244. Object.defineProperty(exports, key, {
  132245. enumerable: true,
  132246. get: function() {
  132247. return _definitions[key];
  132248. }
  132249. });
  132250. });
  132251. var _appendToMemberExpression = require_appendToMemberExpression6();
  132252. var _inherits = require_inherits6();
  132253. var _prependToMemberExpression = require_prependToMemberExpression6();
  132254. var _removeProperties = require_removeProperties6();
  132255. var _removePropertiesDeep = require_removePropertiesDeep6();
  132256. var _removeTypeDuplicates = require_removeTypeDuplicates11();
  132257. var _getBindingIdentifiers = require_getBindingIdentifiers6();
  132258. var _getOuterBindingIdentifiers = require_getOuterBindingIdentifiers6();
  132259. var _traverse = require_traverse6();
  132260. Object.keys(_traverse).forEach(function(key) {
  132261. if (key === "default" || key === "__esModule")
  132262. return;
  132263. if (Object.prototype.hasOwnProperty.call(_exportNames, key))
  132264. return;
  132265. if (key in exports && exports[key] === _traverse[key])
  132266. return;
  132267. Object.defineProperty(exports, key, {
  132268. enumerable: true,
  132269. get: function() {
  132270. return _traverse[key];
  132271. }
  132272. });
  132273. });
  132274. var _traverseFast = require_traverseFast6();
  132275. var _shallowEqual = require_shallowEqual6();
  132276. var _is = require_is6();
  132277. var _isBinding = require_isBinding6();
  132278. var _isBlockScoped = require_isBlockScoped6();
  132279. var _isImmutable = require_isImmutable6();
  132280. var _isLet = require_isLet6();
  132281. var _isNode = require_isNode6();
  132282. var _isNodesEquivalent = require_isNodesEquivalent6();
  132283. var _isPlaceholderType = require_isPlaceholderType6();
  132284. var _isReferenced = require_isReferenced6();
  132285. var _isScope = require_isScope6();
  132286. var _isSpecifierDefault = require_isSpecifierDefault6();
  132287. var _isType = require_isType6();
  132288. var _isValidES3Identifier = require_isValidES3Identifier6();
  132289. var _isValidIdentifier = require_isValidIdentifier6();
  132290. var _isVar = require_isVar6();
  132291. var _matchesPattern = require_matchesPattern6();
  132292. var _validate = require_validate6();
  132293. var _buildMatchMemberExpression = require_buildMatchMemberExpression6();
  132294. var _generated4 = require_generated26();
  132295. Object.keys(_generated4).forEach(function(key) {
  132296. if (key === "default" || key === "__esModule")
  132297. return;
  132298. if (Object.prototype.hasOwnProperty.call(_exportNames, key))
  132299. return;
  132300. if (key in exports && exports[key] === _generated4[key])
  132301. return;
  132302. Object.defineProperty(exports, key, {
  132303. enumerable: true,
  132304. get: function() {
  132305. return _generated4[key];
  132306. }
  132307. });
  132308. });
  132309. var _generated5 = require_generated30();
  132310. Object.keys(_generated5).forEach(function(key) {
  132311. if (key === "default" || key === "__esModule")
  132312. return;
  132313. if (Object.prototype.hasOwnProperty.call(_exportNames, key))
  132314. return;
  132315. if (key in exports && exports[key] === _generated5[key])
  132316. return;
  132317. Object.defineProperty(exports, key, {
  132318. enumerable: true,
  132319. get: function() {
  132320. return _generated5[key];
  132321. }
  132322. });
  132323. });
  132324. var react = {
  132325. isReactComponent: _isReactComponent.default,
  132326. isCompatTag: _isCompatTag.default,
  132327. buildChildren: _buildChildren.default
  132328. };
  132329. exports.react = react;
  132330. }
  132331. });
  132332. // node_modules/@babel/template/lib/formatters.js
  132333. var require_formatters2 = __commonJS({
  132334. "node_modules/@babel/template/lib/formatters.js"(exports) {
  132335. "use strict";
  132336. Object.defineProperty(exports, "__esModule", {
  132337. value: true
  132338. });
  132339. exports.program = exports.expression = exports.statement = exports.statements = exports.smart = void 0;
  132340. var t2 = require_lib30();
  132341. function makeStatementFormatter(fn) {
  132342. return {
  132343. code: (str) => `/* @babel/template */;
  132344. ${str}`,
  132345. validate: () => {
  132346. },
  132347. unwrap: (ast) => {
  132348. return fn(ast.program.body.slice(1));
  132349. }
  132350. };
  132351. }
  132352. var smart = makeStatementFormatter((body) => {
  132353. if (body.length > 1) {
  132354. return body;
  132355. } else {
  132356. return body[0];
  132357. }
  132358. });
  132359. exports.smart = smart;
  132360. var statements = makeStatementFormatter((body) => body);
  132361. exports.statements = statements;
  132362. var statement = makeStatementFormatter((body) => {
  132363. if (body.length === 0) {
  132364. throw new Error("Found nothing to return.");
  132365. }
  132366. if (body.length > 1) {
  132367. throw new Error("Found multiple statements but wanted one");
  132368. }
  132369. return body[0];
  132370. });
  132371. exports.statement = statement;
  132372. var expression = {
  132373. code: (str) => `(
  132374. ${str}
  132375. )`,
  132376. validate: (ast) => {
  132377. if (ast.program.body.length > 1) {
  132378. throw new Error("Found multiple statements but wanted one");
  132379. }
  132380. if (expression.unwrap(ast).start === 0) {
  132381. throw new Error("Parse result included parens.");
  132382. }
  132383. },
  132384. unwrap: ({
  132385. program: program2
  132386. }) => {
  132387. const [stmt] = program2.body;
  132388. t2.assertExpressionStatement(stmt);
  132389. return stmt.expression;
  132390. }
  132391. };
  132392. exports.expression = expression;
  132393. var program = {
  132394. code: (str) => str,
  132395. validate: () => {
  132396. },
  132397. unwrap: (ast) => ast.program
  132398. };
  132399. exports.program = program;
  132400. }
  132401. });
  132402. // node_modules/@babel/template/lib/options.js
  132403. var require_options2 = __commonJS({
  132404. "node_modules/@babel/template/lib/options.js"(exports) {
  132405. "use strict";
  132406. Object.defineProperty(exports, "__esModule", {
  132407. value: true
  132408. });
  132409. exports.merge = merge2;
  132410. exports.validate = validate;
  132411. exports.normalizeReplacements = normalizeReplacements;
  132412. function _objectWithoutPropertiesLoose(source, excluded) {
  132413. if (source == null)
  132414. return {};
  132415. var target = {};
  132416. var sourceKeys = Object.keys(source);
  132417. var key, i;
  132418. for (i = 0; i < sourceKeys.length; i++) {
  132419. key = sourceKeys[i];
  132420. if (excluded.indexOf(key) >= 0)
  132421. continue;
  132422. target[key] = source[key];
  132423. }
  132424. return target;
  132425. }
  132426. function merge2(a, b) {
  132427. const {
  132428. placeholderWhitelist = a.placeholderWhitelist,
  132429. placeholderPattern = a.placeholderPattern,
  132430. preserveComments = a.preserveComments,
  132431. syntacticPlaceholders = a.syntacticPlaceholders
  132432. } = b;
  132433. return {
  132434. parser: Object.assign({}, a.parser, b.parser),
  132435. placeholderWhitelist,
  132436. placeholderPattern,
  132437. preserveComments,
  132438. syntacticPlaceholders
  132439. };
  132440. }
  132441. function validate(opts) {
  132442. if (opts != null && typeof opts !== "object") {
  132443. throw new Error("Unknown template options.");
  132444. }
  132445. const _ref = opts || {}, {
  132446. placeholderWhitelist,
  132447. placeholderPattern,
  132448. preserveComments,
  132449. syntacticPlaceholders
  132450. } = _ref, parser = _objectWithoutPropertiesLoose(_ref, ["placeholderWhitelist", "placeholderPattern", "preserveComments", "syntacticPlaceholders"]);
  132451. if (placeholderWhitelist != null && !(placeholderWhitelist instanceof Set)) {
  132452. throw new Error("'.placeholderWhitelist' must be a Set, null, or undefined");
  132453. }
  132454. if (placeholderPattern != null && !(placeholderPattern instanceof RegExp) && placeholderPattern !== false) {
  132455. throw new Error("'.placeholderPattern' must be a RegExp, false, null, or undefined");
  132456. }
  132457. if (preserveComments != null && typeof preserveComments !== "boolean") {
  132458. throw new Error("'.preserveComments' must be a boolean, null, or undefined");
  132459. }
  132460. if (syntacticPlaceholders != null && typeof syntacticPlaceholders !== "boolean") {
  132461. throw new Error("'.syntacticPlaceholders' must be a boolean, null, or undefined");
  132462. }
  132463. if (syntacticPlaceholders === true && (placeholderWhitelist != null || placeholderPattern != null)) {
  132464. throw new Error("'.placeholderWhitelist' and '.placeholderPattern' aren't compatible with '.syntacticPlaceholders: true'");
  132465. }
  132466. return {
  132467. parser,
  132468. placeholderWhitelist: placeholderWhitelist || void 0,
  132469. placeholderPattern: placeholderPattern == null ? void 0 : placeholderPattern,
  132470. preserveComments: preserveComments == null ? void 0 : preserveComments,
  132471. syntacticPlaceholders: syntacticPlaceholders == null ? void 0 : syntacticPlaceholders
  132472. };
  132473. }
  132474. function normalizeReplacements(replacements) {
  132475. if (Array.isArray(replacements)) {
  132476. return replacements.reduce((acc, replacement, i) => {
  132477. acc["$" + i] = replacement;
  132478. return acc;
  132479. }, {});
  132480. } else if (typeof replacements === "object" || replacements == null) {
  132481. return replacements || void 0;
  132482. }
  132483. throw new Error("Template replacements must be an array, object, null, or undefined");
  132484. }
  132485. }
  132486. });
  132487. // node_modules/@babel/parser/lib/index.js
  132488. var require_lib31 = __commonJS({
  132489. "node_modules/@babel/parser/lib/index.js"(exports) {
  132490. "use strict";
  132491. Object.defineProperty(exports, "__esModule", { value: true });
  132492. var beforeExpr2 = true;
  132493. var startsExpr2 = true;
  132494. var isLoop = true;
  132495. var isAssign = true;
  132496. var prefix = true;
  132497. var postfix = true;
  132498. var TokenType3 = class {
  132499. constructor(label, conf = {}) {
  132500. this.label = void 0;
  132501. this.keyword = void 0;
  132502. this.beforeExpr = void 0;
  132503. this.startsExpr = void 0;
  132504. this.rightAssociative = void 0;
  132505. this.isLoop = void 0;
  132506. this.isAssign = void 0;
  132507. this.prefix = void 0;
  132508. this.postfix = void 0;
  132509. this.binop = void 0;
  132510. this.updateContext = void 0;
  132511. this.label = label;
  132512. this.keyword = conf.keyword;
  132513. this.beforeExpr = !!conf.beforeExpr;
  132514. this.startsExpr = !!conf.startsExpr;
  132515. this.rightAssociative = !!conf.rightAssociative;
  132516. this.isLoop = !!conf.isLoop;
  132517. this.isAssign = !!conf.isAssign;
  132518. this.prefix = !!conf.prefix;
  132519. this.postfix = !!conf.postfix;
  132520. this.binop = conf.binop != null ? conf.binop : null;
  132521. this.updateContext = null;
  132522. }
  132523. };
  132524. var keywords$12 = /* @__PURE__ */ new Map();
  132525. function createKeyword(name2, options = {}) {
  132526. options.keyword = name2;
  132527. const token = new TokenType3(name2, options);
  132528. keywords$12.set(name2, token);
  132529. return token;
  132530. }
  132531. function createBinop(name2, binop2) {
  132532. return new TokenType3(name2, {
  132533. beforeExpr: beforeExpr2,
  132534. binop: binop2
  132535. });
  132536. }
  132537. var types$12 = {
  132538. num: new TokenType3("num", {
  132539. startsExpr: startsExpr2
  132540. }),
  132541. bigint: new TokenType3("bigint", {
  132542. startsExpr: startsExpr2
  132543. }),
  132544. decimal: new TokenType3("decimal", {
  132545. startsExpr: startsExpr2
  132546. }),
  132547. regexp: new TokenType3("regexp", {
  132548. startsExpr: startsExpr2
  132549. }),
  132550. string: new TokenType3("string", {
  132551. startsExpr: startsExpr2
  132552. }),
  132553. name: new TokenType3("name", {
  132554. startsExpr: startsExpr2
  132555. }),
  132556. privateName: new TokenType3("#name", {
  132557. startsExpr: startsExpr2
  132558. }),
  132559. eof: new TokenType3("eof"),
  132560. bracketL: new TokenType3("[", {
  132561. beforeExpr: beforeExpr2,
  132562. startsExpr: startsExpr2
  132563. }),
  132564. bracketHashL: new TokenType3("#[", {
  132565. beforeExpr: beforeExpr2,
  132566. startsExpr: startsExpr2
  132567. }),
  132568. bracketBarL: new TokenType3("[|", {
  132569. beforeExpr: beforeExpr2,
  132570. startsExpr: startsExpr2
  132571. }),
  132572. bracketR: new TokenType3("]"),
  132573. bracketBarR: new TokenType3("|]"),
  132574. braceL: new TokenType3("{", {
  132575. beforeExpr: beforeExpr2,
  132576. startsExpr: startsExpr2
  132577. }),
  132578. braceBarL: new TokenType3("{|", {
  132579. beforeExpr: beforeExpr2,
  132580. startsExpr: startsExpr2
  132581. }),
  132582. braceHashL: new TokenType3("#{", {
  132583. beforeExpr: beforeExpr2,
  132584. startsExpr: startsExpr2
  132585. }),
  132586. braceR: new TokenType3("}", {
  132587. beforeExpr: beforeExpr2
  132588. }),
  132589. braceBarR: new TokenType3("|}"),
  132590. parenL: new TokenType3("(", {
  132591. beforeExpr: beforeExpr2,
  132592. startsExpr: startsExpr2
  132593. }),
  132594. parenR: new TokenType3(")"),
  132595. comma: new TokenType3(",", {
  132596. beforeExpr: beforeExpr2
  132597. }),
  132598. semi: new TokenType3(";", {
  132599. beforeExpr: beforeExpr2
  132600. }),
  132601. colon: new TokenType3(":", {
  132602. beforeExpr: beforeExpr2
  132603. }),
  132604. doubleColon: new TokenType3("::", {
  132605. beforeExpr: beforeExpr2
  132606. }),
  132607. dot: new TokenType3("."),
  132608. question: new TokenType3("?", {
  132609. beforeExpr: beforeExpr2
  132610. }),
  132611. questionDot: new TokenType3("?."),
  132612. arrow: new TokenType3("=>", {
  132613. beforeExpr: beforeExpr2
  132614. }),
  132615. template: new TokenType3("template"),
  132616. ellipsis: new TokenType3("...", {
  132617. beforeExpr: beforeExpr2
  132618. }),
  132619. backQuote: new TokenType3("`", {
  132620. startsExpr: startsExpr2
  132621. }),
  132622. dollarBraceL: new TokenType3("${", {
  132623. beforeExpr: beforeExpr2,
  132624. startsExpr: startsExpr2
  132625. }),
  132626. at: new TokenType3("@"),
  132627. hash: new TokenType3("#", {
  132628. startsExpr: startsExpr2
  132629. }),
  132630. interpreterDirective: new TokenType3("#!..."),
  132631. eq: new TokenType3("=", {
  132632. beforeExpr: beforeExpr2,
  132633. isAssign
  132634. }),
  132635. assign: new TokenType3("_=", {
  132636. beforeExpr: beforeExpr2,
  132637. isAssign
  132638. }),
  132639. slashAssign: new TokenType3("_=", {
  132640. beforeExpr: beforeExpr2,
  132641. isAssign
  132642. }),
  132643. incDec: new TokenType3("++/--", {
  132644. prefix,
  132645. postfix,
  132646. startsExpr: startsExpr2
  132647. }),
  132648. bang: new TokenType3("!", {
  132649. beforeExpr: beforeExpr2,
  132650. prefix,
  132651. startsExpr: startsExpr2
  132652. }),
  132653. tilde: new TokenType3("~", {
  132654. beforeExpr: beforeExpr2,
  132655. prefix,
  132656. startsExpr: startsExpr2
  132657. }),
  132658. pipeline: createBinop("|>", 0),
  132659. nullishCoalescing: createBinop("??", 1),
  132660. logicalOR: createBinop("||", 1),
  132661. logicalAND: createBinop("&&", 2),
  132662. bitwiseOR: createBinop("|", 3),
  132663. bitwiseXOR: createBinop("^", 4),
  132664. bitwiseAND: createBinop("&", 5),
  132665. equality: createBinop("==/!=/===/!==", 6),
  132666. relational: createBinop("</>/<=/>=", 7),
  132667. bitShift: createBinop("<</>>/>>>", 8),
  132668. plusMin: new TokenType3("+/-", {
  132669. beforeExpr: beforeExpr2,
  132670. binop: 9,
  132671. prefix,
  132672. startsExpr: startsExpr2
  132673. }),
  132674. modulo: new TokenType3("%", {
  132675. beforeExpr: beforeExpr2,
  132676. binop: 10,
  132677. startsExpr: startsExpr2
  132678. }),
  132679. star: new TokenType3("*", {
  132680. binop: 10
  132681. }),
  132682. slash: createBinop("/", 10),
  132683. exponent: new TokenType3("**", {
  132684. beforeExpr: beforeExpr2,
  132685. binop: 11,
  132686. rightAssociative: true
  132687. }),
  132688. _break: createKeyword("break"),
  132689. _case: createKeyword("case", {
  132690. beforeExpr: beforeExpr2
  132691. }),
  132692. _catch: createKeyword("catch"),
  132693. _continue: createKeyword("continue"),
  132694. _debugger: createKeyword("debugger"),
  132695. _default: createKeyword("default", {
  132696. beforeExpr: beforeExpr2
  132697. }),
  132698. _do: createKeyword("do", {
  132699. isLoop,
  132700. beforeExpr: beforeExpr2
  132701. }),
  132702. _else: createKeyword("else", {
  132703. beforeExpr: beforeExpr2
  132704. }),
  132705. _finally: createKeyword("finally"),
  132706. _for: createKeyword("for", {
  132707. isLoop
  132708. }),
  132709. _function: createKeyword("function", {
  132710. startsExpr: startsExpr2
  132711. }),
  132712. _if: createKeyword("if"),
  132713. _return: createKeyword("return", {
  132714. beforeExpr: beforeExpr2
  132715. }),
  132716. _switch: createKeyword("switch"),
  132717. _throw: createKeyword("throw", {
  132718. beforeExpr: beforeExpr2,
  132719. prefix,
  132720. startsExpr: startsExpr2
  132721. }),
  132722. _try: createKeyword("try"),
  132723. _var: createKeyword("var"),
  132724. _const: createKeyword("const"),
  132725. _while: createKeyword("while", {
  132726. isLoop
  132727. }),
  132728. _with: createKeyword("with"),
  132729. _new: createKeyword("new", {
  132730. beforeExpr: beforeExpr2,
  132731. startsExpr: startsExpr2
  132732. }),
  132733. _this: createKeyword("this", {
  132734. startsExpr: startsExpr2
  132735. }),
  132736. _super: createKeyword("super", {
  132737. startsExpr: startsExpr2
  132738. }),
  132739. _class: createKeyword("class", {
  132740. startsExpr: startsExpr2
  132741. }),
  132742. _extends: createKeyword("extends", {
  132743. beforeExpr: beforeExpr2
  132744. }),
  132745. _export: createKeyword("export"),
  132746. _import: createKeyword("import", {
  132747. startsExpr: startsExpr2
  132748. }),
  132749. _null: createKeyword("null", {
  132750. startsExpr: startsExpr2
  132751. }),
  132752. _true: createKeyword("true", {
  132753. startsExpr: startsExpr2
  132754. }),
  132755. _false: createKeyword("false", {
  132756. startsExpr: startsExpr2
  132757. }),
  132758. _in: createKeyword("in", {
  132759. beforeExpr: beforeExpr2,
  132760. binop: 7
  132761. }),
  132762. _instanceof: createKeyword("instanceof", {
  132763. beforeExpr: beforeExpr2,
  132764. binop: 7
  132765. }),
  132766. _typeof: createKeyword("typeof", {
  132767. beforeExpr: beforeExpr2,
  132768. prefix,
  132769. startsExpr: startsExpr2
  132770. }),
  132771. _void: createKeyword("void", {
  132772. beforeExpr: beforeExpr2,
  132773. prefix,
  132774. startsExpr: startsExpr2
  132775. }),
  132776. _delete: createKeyword("delete", {
  132777. beforeExpr: beforeExpr2,
  132778. prefix,
  132779. startsExpr: startsExpr2
  132780. })
  132781. };
  132782. var lineBreak2 = /\r\n?|[\n\u2028\u2029]/;
  132783. var lineBreakG2 = new RegExp(lineBreak2.source, "g");
  132784. function isNewLine2(code2) {
  132785. switch (code2) {
  132786. case 10:
  132787. case 13:
  132788. case 8232:
  132789. case 8233:
  132790. return true;
  132791. default:
  132792. return false;
  132793. }
  132794. }
  132795. var skipWhiteSpace2 = /(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g;
  132796. function isWhitespace(code2) {
  132797. switch (code2) {
  132798. case 9:
  132799. case 11:
  132800. case 12:
  132801. case 32:
  132802. case 160:
  132803. case 5760:
  132804. case 8192:
  132805. case 8193:
  132806. case 8194:
  132807. case 8195:
  132808. case 8196:
  132809. case 8197:
  132810. case 8198:
  132811. case 8199:
  132812. case 8200:
  132813. case 8201:
  132814. case 8202:
  132815. case 8239:
  132816. case 8287:
  132817. case 12288:
  132818. case 65279:
  132819. return true;
  132820. default:
  132821. return false;
  132822. }
  132823. }
  132824. var Position3 = class {
  132825. constructor(line, col) {
  132826. this.line = void 0;
  132827. this.column = void 0;
  132828. this.line = line;
  132829. this.column = col;
  132830. }
  132831. };
  132832. var SourceLocation3 = class {
  132833. constructor(start3, end) {
  132834. this.start = void 0;
  132835. this.end = void 0;
  132836. this.filename = void 0;
  132837. this.identifierName = void 0;
  132838. this.start = start3;
  132839. this.end = end;
  132840. }
  132841. };
  132842. function getLineInfo2(input, offset2) {
  132843. let line = 1;
  132844. let lineStart = 0;
  132845. let match;
  132846. lineBreakG2.lastIndex = 0;
  132847. while ((match = lineBreakG2.exec(input)) && match.index < offset2) {
  132848. line++;
  132849. lineStart = lineBreakG2.lastIndex;
  132850. }
  132851. return new Position3(line, offset2 - lineStart);
  132852. }
  132853. var BaseParser = class {
  132854. constructor() {
  132855. this.sawUnambiguousESM = false;
  132856. this.ambiguousScriptDifferentAst = false;
  132857. }
  132858. hasPlugin(name2) {
  132859. return this.plugins.has(name2);
  132860. }
  132861. getPluginOption(plugin2, name2) {
  132862. if (this.hasPlugin(plugin2))
  132863. return this.plugins.get(plugin2)[name2];
  132864. }
  132865. };
  132866. function last(stack) {
  132867. return stack[stack.length - 1];
  132868. }
  132869. var CommentsParser = class extends BaseParser {
  132870. addComment(comment2) {
  132871. if (this.filename)
  132872. comment2.loc.filename = this.filename;
  132873. this.state.trailingComments.push(comment2);
  132874. this.state.leadingComments.push(comment2);
  132875. }
  132876. adjustCommentsAfterTrailingComma(node, elements, takeAllComments) {
  132877. if (this.state.leadingComments.length === 0) {
  132878. return;
  132879. }
  132880. let lastElement = null;
  132881. let i = elements.length;
  132882. while (lastElement === null && i > 0) {
  132883. lastElement = elements[--i];
  132884. }
  132885. if (lastElement === null) {
  132886. return;
  132887. }
  132888. for (let j = 0; j < this.state.leadingComments.length; j++) {
  132889. if (this.state.leadingComments[j].end < this.state.commentPreviousNode.end) {
  132890. this.state.leadingComments.splice(j, 1);
  132891. j--;
  132892. }
  132893. }
  132894. const newTrailingComments = [];
  132895. for (let i2 = 0; i2 < this.state.leadingComments.length; i2++) {
  132896. const leadingComment = this.state.leadingComments[i2];
  132897. if (leadingComment.end < node.end) {
  132898. newTrailingComments.push(leadingComment);
  132899. if (!takeAllComments) {
  132900. this.state.leadingComments.splice(i2, 1);
  132901. i2--;
  132902. }
  132903. } else {
  132904. if (node.trailingComments === void 0) {
  132905. node.trailingComments = [];
  132906. }
  132907. node.trailingComments.push(leadingComment);
  132908. }
  132909. }
  132910. if (takeAllComments)
  132911. this.state.leadingComments = [];
  132912. if (newTrailingComments.length > 0) {
  132913. lastElement.trailingComments = newTrailingComments;
  132914. } else if (lastElement.trailingComments !== void 0) {
  132915. lastElement.trailingComments = [];
  132916. }
  132917. }
  132918. processComment(node) {
  132919. if (node.type === "Program" && node.body.length > 0)
  132920. return;
  132921. const stack = this.state.commentStack;
  132922. let firstChild, lastChild, trailingComments, i, j;
  132923. if (this.state.trailingComments.length > 0) {
  132924. if (this.state.trailingComments[0].start >= node.end) {
  132925. trailingComments = this.state.trailingComments;
  132926. this.state.trailingComments = [];
  132927. } else {
  132928. this.state.trailingComments.length = 0;
  132929. }
  132930. } else if (stack.length > 0) {
  132931. const lastInStack = last(stack);
  132932. if (lastInStack.trailingComments && lastInStack.trailingComments[0].start >= node.end) {
  132933. trailingComments = lastInStack.trailingComments;
  132934. delete lastInStack.trailingComments;
  132935. }
  132936. }
  132937. if (stack.length > 0 && last(stack).start >= node.start) {
  132938. firstChild = stack.pop();
  132939. }
  132940. while (stack.length > 0 && last(stack).start >= node.start) {
  132941. lastChild = stack.pop();
  132942. }
  132943. if (!lastChild && firstChild)
  132944. lastChild = firstChild;
  132945. if (firstChild) {
  132946. switch (node.type) {
  132947. case "ObjectExpression":
  132948. this.adjustCommentsAfterTrailingComma(node, node.properties);
  132949. break;
  132950. case "ObjectPattern":
  132951. this.adjustCommentsAfterTrailingComma(node, node.properties, true);
  132952. break;
  132953. case "CallExpression":
  132954. this.adjustCommentsAfterTrailingComma(node, node.arguments);
  132955. break;
  132956. case "ArrayExpression":
  132957. this.adjustCommentsAfterTrailingComma(node, node.elements);
  132958. break;
  132959. case "ArrayPattern":
  132960. this.adjustCommentsAfterTrailingComma(node, node.elements, true);
  132961. break;
  132962. }
  132963. } else if (this.state.commentPreviousNode && (this.state.commentPreviousNode.type === "ImportSpecifier" && node.type !== "ImportSpecifier" || this.state.commentPreviousNode.type === "ExportSpecifier" && node.type !== "ExportSpecifier")) {
  132964. this.adjustCommentsAfterTrailingComma(node, [this.state.commentPreviousNode]);
  132965. }
  132966. if (lastChild) {
  132967. if (lastChild.leadingComments) {
  132968. if (lastChild !== node && lastChild.leadingComments.length > 0 && last(lastChild.leadingComments).end <= node.start) {
  132969. node.leadingComments = lastChild.leadingComments;
  132970. delete lastChild.leadingComments;
  132971. } else {
  132972. for (i = lastChild.leadingComments.length - 2; i >= 0; --i) {
  132973. if (lastChild.leadingComments[i].end <= node.start) {
  132974. node.leadingComments = lastChild.leadingComments.splice(0, i + 1);
  132975. break;
  132976. }
  132977. }
  132978. }
  132979. }
  132980. } else if (this.state.leadingComments.length > 0) {
  132981. if (last(this.state.leadingComments).end <= node.start) {
  132982. if (this.state.commentPreviousNode) {
  132983. for (j = 0; j < this.state.leadingComments.length; j++) {
  132984. if (this.state.leadingComments[j].end < this.state.commentPreviousNode.end) {
  132985. this.state.leadingComments.splice(j, 1);
  132986. j--;
  132987. }
  132988. }
  132989. }
  132990. if (this.state.leadingComments.length > 0) {
  132991. node.leadingComments = this.state.leadingComments;
  132992. this.state.leadingComments = [];
  132993. }
  132994. } else {
  132995. for (i = 0; i < this.state.leadingComments.length; i++) {
  132996. if (this.state.leadingComments[i].end > node.start) {
  132997. break;
  132998. }
  132999. }
  133000. const leadingComments = this.state.leadingComments.slice(0, i);
  133001. if (leadingComments.length) {
  133002. node.leadingComments = leadingComments;
  133003. }
  133004. trailingComments = this.state.leadingComments.slice(i);
  133005. if (trailingComments.length === 0) {
  133006. trailingComments = null;
  133007. }
  133008. }
  133009. }
  133010. this.state.commentPreviousNode = node;
  133011. if (trailingComments) {
  133012. if (trailingComments.length && trailingComments[0].start >= node.start && last(trailingComments).end <= node.end) {
  133013. node.innerComments = trailingComments;
  133014. } else {
  133015. const firstTrailingCommentIndex = trailingComments.findIndex((comment2) => comment2.end >= node.end);
  133016. if (firstTrailingCommentIndex > 0) {
  133017. node.innerComments = trailingComments.slice(0, firstTrailingCommentIndex);
  133018. node.trailingComments = trailingComments.slice(firstTrailingCommentIndex);
  133019. } else {
  133020. node.trailingComments = trailingComments;
  133021. }
  133022. }
  133023. }
  133024. stack.push(node);
  133025. }
  133026. };
  133027. var ErrorCodes = Object.freeze({
  133028. SyntaxError: "BABEL_PARSER_SYNTAX_ERROR",
  133029. SourceTypeModuleError: "BABEL_PARSER_SOURCETYPE_MODULE_REQUIRED"
  133030. });
  133031. var ErrorMessages = makeErrorTemplates({
  133032. AccessorIsGenerator: "A %0ter cannot be a generator.",
  133033. ArgumentsInClass: "'arguments' is only allowed in functions and class methods.",
  133034. AsyncFunctionInSingleStatementContext: "Async functions can only be declared at the top level or inside a block.",
  133035. AwaitBindingIdentifier: "Can not use 'await' as identifier inside an async function.",
  133036. AwaitBindingIdentifierInStaticBlock: "Can not use 'await' as identifier inside a static block.",
  133037. AwaitExpressionFormalParameter: "'await' is not allowed in async function parameters.",
  133038. AwaitNotInAsyncContext: "'await' is only allowed within async functions and at the top levels of modules.",
  133039. AwaitNotInAsyncFunction: "'await' is only allowed within async functions.",
  133040. BadGetterArity: "A 'get' accesor must not have any formal parameters.",
  133041. BadSetterArity: "A 'set' accesor must have exactly one formal parameter.",
  133042. BadSetterRestParameter: "A 'set' accesor function argument must not be a rest parameter.",
  133043. ConstructorClassField: "Classes may not have a field named 'constructor'.",
  133044. ConstructorClassPrivateField: "Classes may not have a private field named '#constructor'.",
  133045. ConstructorIsAccessor: "Class constructor may not be an accessor.",
  133046. ConstructorIsAsync: "Constructor can't be an async function.",
  133047. ConstructorIsGenerator: "Constructor can't be a generator.",
  133048. DeclarationMissingInitializer: "'%0' require an initialization value.",
  133049. DecoratorBeforeExport: "Decorators must be placed *before* the 'export' keyword. You can set the 'decoratorsBeforeExport' option to false to use the 'export @decorator class {}' syntax.",
  133050. DecoratorConstructor: "Decorators can't be used with a constructor. Did you mean '@dec class { ... }'?",
  133051. DecoratorExportClass: "Using the export keyword between a decorator and a class is not allowed. Please use `export @dec class` instead.",
  133052. DecoratorSemicolon: "Decorators must not be followed by a semicolon.",
  133053. DecoratorStaticBlock: "Decorators can't be used with a static block.",
  133054. DeletePrivateField: "Deleting a private field is not allowed.",
  133055. DestructureNamedImport: "ES2015 named imports do not destructure. Use another statement for destructuring after the import.",
  133056. DuplicateConstructor: "Duplicate constructor in the same class.",
  133057. DuplicateDefaultExport: "Only one default export allowed per module.",
  133058. DuplicateExport: "`%0` has already been exported. Exported identifiers must be unique.",
  133059. DuplicateProto: "Redefinition of __proto__ property.",
  133060. DuplicateRegExpFlags: "Duplicate regular expression flag.",
  133061. ElementAfterRest: "Rest element must be last element.",
  133062. EscapedCharNotAnIdentifier: "Invalid Unicode escape.",
  133063. ExportBindingIsString: "A string literal cannot be used as an exported binding without `from`.\n- Did you mean `export { '%0' as '%1' } from 'some-module'`?",
  133064. ExportDefaultFromAsIdentifier: "'from' is not allowed as an identifier after 'export default'.",
  133065. ForInOfLoopInitializer: "'%0' loop variable declaration may not have an initializer.",
  133066. ForOfAsync: "The left-hand side of a for-of loop may not be 'async'.",
  133067. ForOfLet: "The left-hand side of a for-of loop may not start with 'let'.",
  133068. GeneratorInSingleStatementContext: "Generators can only be declared at the top level or inside a block.",
  133069. IllegalBreakContinue: "Unsyntactic %0.",
  133070. IllegalLanguageModeDirective: "Illegal 'use strict' directive in function with non-simple parameter list.",
  133071. IllegalReturn: "'return' outside of function.",
  133072. ImportBindingIsString: 'A string literal cannot be used as an imported binding.\n- Did you mean `import { "%0" as foo }`?',
  133073. ImportCallArgumentTrailingComma: "Trailing comma is disallowed inside import(...) arguments.",
  133074. ImportCallArity: "`import()` requires exactly %0.",
  133075. ImportCallNotNewExpression: "Cannot use new with import(...).",
  133076. ImportCallSpreadArgument: "`...` is not allowed in `import()`.",
  133077. InvalidBigIntLiteral: "Invalid BigIntLiteral.",
  133078. InvalidCodePoint: "Code point out of bounds.",
  133079. InvalidDecimal: "Invalid decimal.",
  133080. InvalidDigit: "Expected number in radix %0.",
  133081. InvalidEscapeSequence: "Bad character escape sequence.",
  133082. InvalidEscapeSequenceTemplate: "Invalid escape sequence in template.",
  133083. InvalidEscapedReservedWord: "Escape sequence in keyword %0.",
  133084. InvalidIdentifier: "Invalid identifier %0.",
  133085. InvalidLhs: "Invalid left-hand side in %0.",
  133086. InvalidLhsBinding: "Binding invalid left-hand side in %0.",
  133087. InvalidNumber: "Invalid number.",
  133088. InvalidOrMissingExponent: "Floating-point numbers require a valid exponent after the 'e'.",
  133089. InvalidOrUnexpectedToken: "Unexpected character '%0'.",
  133090. InvalidParenthesizedAssignment: "Invalid parenthesized assignment pattern.",
  133091. InvalidPrivateFieldResolution: "Private name #%0 is not defined.",
  133092. InvalidPropertyBindingPattern: "Binding member expression.",
  133093. InvalidRecordProperty: "Only properties and spread elements are allowed in record definitions.",
  133094. InvalidRestAssignmentPattern: "Invalid rest operator's argument.",
  133095. LabelRedeclaration: "Label '%0' is already declared.",
  133096. LetInLexicalBinding: "'let' is not allowed to be used as a name in 'let' or 'const' declarations.",
  133097. LineTerminatorBeforeArrow: "No line break is allowed before '=>'.",
  133098. MalformedRegExpFlags: "Invalid regular expression flag.",
  133099. MissingClassName: "A class name is required.",
  133100. MissingEqInAssignment: "Only '=' operator can be used for specifying default value.",
  133101. MissingSemicolon: "Missing semicolon.",
  133102. MissingUnicodeEscape: "Expecting Unicode escape sequence \\uXXXX.",
  133103. MixingCoalesceWithLogical: "Nullish coalescing operator(??) requires parens when mixing with logical operators.",
  133104. ModuleAttributeDifferentFromType: "The only accepted module attribute is `type`.",
  133105. ModuleAttributeInvalidValue: "Only string literals are allowed as module attribute values.",
  133106. ModuleAttributesWithDuplicateKeys: 'Duplicate key "%0" is not allowed in module attributes.',
  133107. ModuleExportNameHasLoneSurrogate: "An export name cannot include a lone surrogate, found '\\u%0'.",
  133108. ModuleExportUndefined: "Export '%0' is not defined.",
  133109. MultipleDefaultsInSwitch: "Multiple default clauses.",
  133110. NewlineAfterThrow: "Illegal newline after throw.",
  133111. NoCatchOrFinally: "Missing catch or finally clause.",
  133112. NumberIdentifier: "Identifier directly after number.",
  133113. NumericSeparatorInEscapeSequence: "Numeric separators are not allowed inside unicode escape sequences or hex escape sequences.",
  133114. ObsoleteAwaitStar: "'await*' has been removed from the async functions proposal. Use Promise.all() instead.",
  133115. OptionalChainingNoNew: "Constructors in/after an Optional Chain are not allowed.",
  133116. OptionalChainingNoTemplate: "Tagged Template Literals are not allowed in optionalChain.",
  133117. OverrideOnConstructor: "'override' modifier cannot appear on a constructor declaration.",
  133118. ParamDupe: "Argument name clash.",
  133119. PatternHasAccessor: "Object pattern can't contain getter or setter.",
  133120. PatternHasMethod: "Object pattern can't contain methods.",
  133121. PipelineBodyNoArrow: 'Unexpected arrow "=>" after pipeline body; arrow function in pipeline body must be parenthesized.',
  133122. PipelineBodySequenceExpression: "Pipeline body may not be a comma-separated sequence expression.",
  133123. PipelineHeadSequenceExpression: "Pipeline head should not be a comma-separated sequence expression.",
  133124. PipelineTopicUnused: "Pipeline is in topic style but does not use topic reference.",
  133125. PrimaryTopicNotAllowed: "Topic reference was used in a lexical context without topic binding.",
  133126. PrimaryTopicRequiresSmartPipeline: "Primary Topic Reference found but pipelineOperator not passed 'smart' for 'proposal' option.",
  133127. PrivateInExpectedIn: "Private names are only allowed in property accesses (`obj.#%0`) or in `in` expressions (`#%0 in obj`).",
  133128. PrivateNameRedeclaration: "Duplicate private name #%0.",
  133129. RecordExpressionBarIncorrectEndSyntaxType: "Record expressions ending with '|}' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'bar'.",
  133130. RecordExpressionBarIncorrectStartSyntaxType: "Record expressions starting with '{|' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'bar'.",
  133131. RecordExpressionHashIncorrectStartSyntaxType: "Record expressions starting with '#{' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'hash'.",
  133132. RecordNoProto: "'__proto__' is not allowed in Record expressions.",
  133133. RestTrailingComma: "Unexpected trailing comma after rest element.",
  133134. SloppyFunction: "In non-strict mode code, functions can only be declared at top level, inside a block, or as the body of an if statement.",
  133135. StaticPrototype: "Classes may not have static property named prototype.",
  133136. StrictDelete: "Deleting local variable in strict mode.",
  133137. StrictEvalArguments: "Assigning to '%0' in strict mode.",
  133138. StrictEvalArgumentsBinding: "Binding '%0' in strict mode.",
  133139. StrictFunction: "In strict mode code, functions can only be declared at top level or inside a block.",
  133140. StrictNumericEscape: "The only valid numeric escape in strict mode is '\\0'.",
  133141. StrictOctalLiteral: "Legacy octal literals are not allowed in strict mode.",
  133142. StrictWith: "'with' in strict mode.",
  133143. SuperNotAllowed: "`super()` is only valid inside a class constructor of a subclass. Maybe a typo in the method name ('constructor') or not extending another class?",
  133144. SuperPrivateField: "Private fields can't be accessed on super.",
  133145. TrailingDecorator: "Decorators must be attached to a class element.",
  133146. TupleExpressionBarIncorrectEndSyntaxType: "Tuple expressions ending with '|]' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'bar'.",
  133147. TupleExpressionBarIncorrectStartSyntaxType: "Tuple expressions starting with '[|' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'bar'.",
  133148. TupleExpressionHashIncorrectStartSyntaxType: "Tuple expressions starting with '#[' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'hash'.",
  133149. UnexpectedArgumentPlaceholder: "Unexpected argument placeholder.",
  133150. UnexpectedAwaitAfterPipelineBody: 'Unexpected "await" after pipeline body; await must have parentheses in minimal proposal.',
  133151. UnexpectedDigitAfterHash: "Unexpected digit after hash token.",
  133152. UnexpectedImportExport: "'import' and 'export' may only appear at the top level.",
  133153. UnexpectedKeyword: "Unexpected keyword '%0'.",
  133154. UnexpectedLeadingDecorator: "Leading decorators must be attached to a class declaration.",
  133155. UnexpectedLexicalDeclaration: "Lexical declaration cannot appear in a single-statement context.",
  133156. UnexpectedNewTarget: "`new.target` can only be used in functions or class properties.",
  133157. UnexpectedNumericSeparator: "A numeric separator is only allowed between two digits.",
  133158. UnexpectedPrivateField: "Private names can only be used as the name of a class element (i.e. class C { #p = 42; #m() {} } )\n or a property of member expression (i.e. this.#p).",
  133159. UnexpectedReservedWord: "Unexpected reserved word '%0'.",
  133160. UnexpectedSuper: "'super' is only allowed in object methods and classes.",
  133161. UnexpectedToken: "Unexpected token '%0'.",
  133162. UnexpectedTokenUnaryExponentiation: "Illegal expression. Wrap left hand side or entire exponentiation in parentheses.",
  133163. UnsupportedBind: "Binding should be performed on object property.",
  133164. UnsupportedDecoratorExport: "A decorated export must export a class declaration.",
  133165. UnsupportedDefaultExport: "Only expressions, functions or classes are allowed as the `default` export.",
  133166. UnsupportedImport: "`import` can only be used in `import()` or `import.meta`.",
  133167. UnsupportedMetaProperty: "The only valid meta property for %0 is %0.%1.",
  133168. UnsupportedParameterDecorator: "Decorators cannot be used to decorate parameters.",
  133169. UnsupportedPropertyDecorator: "Decorators cannot be used to decorate object literal properties.",
  133170. UnsupportedSuper: "'super' can only be used with function calls (i.e. super()) or in property accesses (i.e. super.prop or super[prop]).",
  133171. UnterminatedComment: "Unterminated comment.",
  133172. UnterminatedRegExp: "Unterminated regular expression.",
  133173. UnterminatedString: "Unterminated string constant.",
  133174. UnterminatedTemplate: "Unterminated template.",
  133175. VarRedeclaration: "Identifier '%0' has already been declared.",
  133176. YieldBindingIdentifier: "Can not use 'yield' as identifier inside a generator.",
  133177. YieldInParameter: "Yield expression is not allowed in formal parameters.",
  133178. ZeroDigitNumericSeparator: "Numeric separator can not be used after leading 0."
  133179. }, ErrorCodes.SyntaxError);
  133180. var SourceTypeModuleErrorMessages = makeErrorTemplates({
  133181. ImportMetaOutsideModule: `import.meta may appear only with 'sourceType: "module"'`,
  133182. ImportOutsideModule: `'import' and 'export' may appear only with 'sourceType: "module"'`
  133183. }, ErrorCodes.SourceTypeModuleError);
  133184. function makeErrorTemplates(messages2, code2) {
  133185. const templates = {};
  133186. Object.keys(messages2).forEach((reasonCode) => {
  133187. templates[reasonCode] = Object.freeze({
  133188. code: code2,
  133189. reasonCode,
  133190. template: messages2[reasonCode]
  133191. });
  133192. });
  133193. return Object.freeze(templates);
  133194. }
  133195. var ParserError = class extends CommentsParser {
  133196. getLocationForPosition(pos) {
  133197. let loc;
  133198. if (pos === this.state.start)
  133199. loc = this.state.startLoc;
  133200. else if (pos === this.state.lastTokStart)
  133201. loc = this.state.lastTokStartLoc;
  133202. else if (pos === this.state.end)
  133203. loc = this.state.endLoc;
  133204. else if (pos === this.state.lastTokEnd)
  133205. loc = this.state.lastTokEndLoc;
  133206. else
  133207. loc = getLineInfo2(this.input, pos);
  133208. return loc;
  133209. }
  133210. raise(pos, {
  133211. code: code2,
  133212. reasonCode,
  133213. template
  133214. }, ...params) {
  133215. return this.raiseWithData(pos, {
  133216. code: code2,
  133217. reasonCode
  133218. }, template, ...params);
  133219. }
  133220. raiseOverwrite(pos, {
  133221. code: code2,
  133222. template
  133223. }, ...params) {
  133224. const loc = this.getLocationForPosition(pos);
  133225. const message = template.replace(/%(\d+)/g, (_, i) => params[i]) + ` (${loc.line}:${loc.column})`;
  133226. if (this.options.errorRecovery) {
  133227. const errors = this.state.errors;
  133228. for (let i = errors.length - 1; i >= 0; i--) {
  133229. const error = errors[i];
  133230. if (error.pos === pos) {
  133231. return Object.assign(error, {
  133232. message
  133233. });
  133234. } else if (error.pos < pos) {
  133235. break;
  133236. }
  133237. }
  133238. }
  133239. return this._raise({
  133240. code: code2,
  133241. loc,
  133242. pos
  133243. }, message);
  133244. }
  133245. raiseWithData(pos, data2, errorTemplate, ...params) {
  133246. const loc = this.getLocationForPosition(pos);
  133247. const message = errorTemplate.replace(/%(\d+)/g, (_, i) => params[i]) + ` (${loc.line}:${loc.column})`;
  133248. return this._raise(Object.assign({
  133249. loc,
  133250. pos
  133251. }, data2), message);
  133252. }
  133253. _raise(errorContext, message) {
  133254. const err = new SyntaxError(message);
  133255. Object.assign(err, errorContext);
  133256. if (this.options.errorRecovery) {
  133257. if (!this.isLookahead)
  133258. this.state.errors.push(err);
  133259. return err;
  133260. } else {
  133261. throw err;
  133262. }
  133263. }
  133264. };
  133265. var estree = (superClass) => class extends superClass {
  133266. parseRegExpLiteral({
  133267. pattern,
  133268. flags
  133269. }) {
  133270. let regex2 = null;
  133271. try {
  133272. regex2 = new RegExp(pattern, flags);
  133273. } catch (e) {
  133274. }
  133275. const node = this.estreeParseLiteral(regex2);
  133276. node.regex = {
  133277. pattern,
  133278. flags
  133279. };
  133280. return node;
  133281. }
  133282. parseBigIntLiteral(value) {
  133283. let bigInt;
  133284. try {
  133285. bigInt = BigInt(value);
  133286. } catch (_unused) {
  133287. bigInt = null;
  133288. }
  133289. const node = this.estreeParseLiteral(bigInt);
  133290. node.bigint = String(node.value || value);
  133291. return node;
  133292. }
  133293. parseDecimalLiteral(value) {
  133294. const decimal = null;
  133295. const node = this.estreeParseLiteral(decimal);
  133296. node.decimal = String(node.value || value);
  133297. return node;
  133298. }
  133299. estreeParseLiteral(value) {
  133300. return this.parseLiteral(value, "Literal");
  133301. }
  133302. parseStringLiteral(value) {
  133303. return this.estreeParseLiteral(value);
  133304. }
  133305. parseNumericLiteral(value) {
  133306. return this.estreeParseLiteral(value);
  133307. }
  133308. parseNullLiteral() {
  133309. return this.estreeParseLiteral(null);
  133310. }
  133311. parseBooleanLiteral(value) {
  133312. return this.estreeParseLiteral(value);
  133313. }
  133314. directiveToStmt(directive) {
  133315. const directiveLiteral = directive.value;
  133316. const stmt = this.startNodeAt(directive.start, directive.loc.start);
  133317. const expression = this.startNodeAt(directiveLiteral.start, directiveLiteral.loc.start);
  133318. expression.value = directiveLiteral.extra.expressionValue;
  133319. expression.raw = directiveLiteral.extra.raw;
  133320. stmt.expression = this.finishNodeAt(expression, "Literal", directiveLiteral.end, directiveLiteral.loc.end);
  133321. stmt.directive = directiveLiteral.extra.raw.slice(1, -1);
  133322. return this.finishNodeAt(stmt, "ExpressionStatement", directive.end, directive.loc.end);
  133323. }
  133324. initFunction(node, isAsync) {
  133325. super.initFunction(node, isAsync);
  133326. node.expression = false;
  133327. }
  133328. checkDeclaration(node) {
  133329. if (node != null && this.isObjectProperty(node)) {
  133330. this.checkDeclaration(node.value);
  133331. } else {
  133332. super.checkDeclaration(node);
  133333. }
  133334. }
  133335. getObjectOrClassMethodParams(method) {
  133336. return method.value.params;
  133337. }
  133338. isValidDirective(stmt) {
  133339. var _stmt$expression$extr;
  133340. return stmt.type === "ExpressionStatement" && stmt.expression.type === "Literal" && typeof stmt.expression.value === "string" && !((_stmt$expression$extr = stmt.expression.extra) != null && _stmt$expression$extr.parenthesized);
  133341. }
  133342. stmtToDirective(stmt) {
  133343. const directive = super.stmtToDirective(stmt);
  133344. const value = stmt.expression.value;
  133345. this.addExtra(directive.value, "expressionValue", value);
  133346. return directive;
  133347. }
  133348. parseBlockBody(node, ...args) {
  133349. super.parseBlockBody(node, ...args);
  133350. const directiveStatements = node.directives.map((d) => this.directiveToStmt(d));
  133351. node.body = directiveStatements.concat(node.body);
  133352. delete node.directives;
  133353. }
  133354. pushClassMethod(classBody, method, isGenerator, isAsync, isConstructor, allowsDirectSuper) {
  133355. this.parseMethod(method, isGenerator, isAsync, isConstructor, allowsDirectSuper, "ClassMethod", true);
  133356. if (method.typeParameters) {
  133357. method.value.typeParameters = method.typeParameters;
  133358. delete method.typeParameters;
  133359. }
  133360. classBody.body.push(method);
  133361. }
  133362. parseMaybePrivateName(...args) {
  133363. const node = super.parseMaybePrivateName(...args);
  133364. if (node.type === "PrivateName" && this.getPluginOption("estree", "classFeatures")) {
  133365. return this.convertPrivateNameToPrivateIdentifier(node);
  133366. }
  133367. return node;
  133368. }
  133369. convertPrivateNameToPrivateIdentifier(node) {
  133370. const name2 = super.getPrivateNameSV(node);
  133371. node = node;
  133372. delete node.id;
  133373. node.name = name2;
  133374. node.type = "PrivateIdentifier";
  133375. return node;
  133376. }
  133377. isPrivateName(node) {
  133378. if (!this.getPluginOption("estree", "classFeatures")) {
  133379. return super.isPrivateName(node);
  133380. }
  133381. return node.type === "PrivateIdentifier";
  133382. }
  133383. getPrivateNameSV(node) {
  133384. if (!this.getPluginOption("estree", "classFeatures")) {
  133385. return super.getPrivateNameSV(node);
  133386. }
  133387. return node.name;
  133388. }
  133389. parseLiteral(value, type) {
  133390. const node = super.parseLiteral(value, type);
  133391. node.raw = node.extra.raw;
  133392. delete node.extra;
  133393. return node;
  133394. }
  133395. parseFunctionBody(node, allowExpression, isMethod = false) {
  133396. super.parseFunctionBody(node, allowExpression, isMethod);
  133397. node.expression = node.body.type !== "BlockStatement";
  133398. }
  133399. parseMethod(node, isGenerator, isAsync, isConstructor, allowDirectSuper, type, inClassScope = false) {
  133400. let funcNode = this.startNode();
  133401. funcNode.kind = node.kind;
  133402. funcNode = super.parseMethod(funcNode, isGenerator, isAsync, isConstructor, allowDirectSuper, type, inClassScope);
  133403. funcNode.type = "FunctionExpression";
  133404. delete funcNode.kind;
  133405. node.value = funcNode;
  133406. if (type === "ClassPrivateMethod") {
  133407. node.computed = false;
  133408. }
  133409. type = "MethodDefinition";
  133410. return this.finishNode(node, type);
  133411. }
  133412. parseClassProperty(...args) {
  133413. const propertyNode = super.parseClassProperty(...args);
  133414. if (this.getPluginOption("estree", "classFeatures")) {
  133415. propertyNode.type = "PropertyDefinition";
  133416. }
  133417. return propertyNode;
  133418. }
  133419. parseClassPrivateProperty(...args) {
  133420. const propertyNode = super.parseClassPrivateProperty(...args);
  133421. if (this.getPluginOption("estree", "classFeatures")) {
  133422. propertyNode.type = "PropertyDefinition";
  133423. propertyNode.computed = false;
  133424. }
  133425. return propertyNode;
  133426. }
  133427. parseObjectMethod(prop, isGenerator, isAsync, isPattern, isAccessor) {
  133428. const node = super.parseObjectMethod(prop, isGenerator, isAsync, isPattern, isAccessor);
  133429. if (node) {
  133430. node.type = "Property";
  133431. if (node.kind === "method")
  133432. node.kind = "init";
  133433. node.shorthand = false;
  133434. }
  133435. return node;
  133436. }
  133437. parseObjectProperty(prop, startPos, startLoc, isPattern, refExpressionErrors) {
  133438. const node = super.parseObjectProperty(prop, startPos, startLoc, isPattern, refExpressionErrors);
  133439. if (node) {
  133440. node.kind = "init";
  133441. node.type = "Property";
  133442. }
  133443. return node;
  133444. }
  133445. toAssignable(node, isLHS = false) {
  133446. if (node != null && this.isObjectProperty(node)) {
  133447. this.toAssignable(node.value, isLHS);
  133448. return node;
  133449. }
  133450. return super.toAssignable(node, isLHS);
  133451. }
  133452. toAssignableObjectExpressionProp(prop, ...args) {
  133453. if (prop.kind === "get" || prop.kind === "set") {
  133454. this.raise(prop.key.start, ErrorMessages.PatternHasAccessor);
  133455. } else if (prop.method) {
  133456. this.raise(prop.key.start, ErrorMessages.PatternHasMethod);
  133457. } else {
  133458. super.toAssignableObjectExpressionProp(prop, ...args);
  133459. }
  133460. }
  133461. finishCallExpression(node, optional) {
  133462. super.finishCallExpression(node, optional);
  133463. if (node.callee.type === "Import") {
  133464. node.type = "ImportExpression";
  133465. node.source = node.arguments[0];
  133466. if (this.hasPlugin("importAssertions")) {
  133467. var _node$arguments$;
  133468. node.attributes = (_node$arguments$ = node.arguments[1]) != null ? _node$arguments$ : null;
  133469. }
  133470. delete node.arguments;
  133471. delete node.callee;
  133472. }
  133473. return node;
  133474. }
  133475. toReferencedArguments(node) {
  133476. if (node.type === "ImportExpression") {
  133477. return;
  133478. }
  133479. super.toReferencedArguments(node);
  133480. }
  133481. parseExport(node) {
  133482. super.parseExport(node);
  133483. switch (node.type) {
  133484. case "ExportAllDeclaration":
  133485. node.exported = null;
  133486. break;
  133487. case "ExportNamedDeclaration":
  133488. if (node.specifiers.length === 1 && node.specifiers[0].type === "ExportNamespaceSpecifier") {
  133489. node.type = "ExportAllDeclaration";
  133490. node.exported = node.specifiers[0].exported;
  133491. delete node.specifiers;
  133492. }
  133493. break;
  133494. }
  133495. return node;
  133496. }
  133497. parseSubscript(base2, startPos, startLoc, noCalls, state) {
  133498. const node = super.parseSubscript(base2, startPos, startLoc, noCalls, state);
  133499. if (state.optionalChainMember) {
  133500. if (node.type === "OptionalMemberExpression" || node.type === "OptionalCallExpression") {
  133501. node.type = node.type.substring(8);
  133502. }
  133503. if (state.stop) {
  133504. const chain = this.startNodeAtNode(node);
  133505. chain.expression = node;
  133506. return this.finishNode(chain, "ChainExpression");
  133507. }
  133508. } else if (node.type === "MemberExpression" || node.type === "CallExpression") {
  133509. node.optional = false;
  133510. }
  133511. return node;
  133512. }
  133513. hasPropertyAsPrivateName(node) {
  133514. if (node.type === "ChainExpression") {
  133515. node = node.expression;
  133516. }
  133517. return super.hasPropertyAsPrivateName(node);
  133518. }
  133519. isOptionalChain(node) {
  133520. return node.type === "ChainExpression";
  133521. }
  133522. isObjectProperty(node) {
  133523. return node.type === "Property" && node.kind === "init" && !node.method;
  133524. }
  133525. isObjectMethod(node) {
  133526. return node.method || node.kind === "get" || node.kind === "set";
  133527. }
  133528. };
  133529. var TokContext3 = class {
  133530. constructor(token, preserveSpace) {
  133531. this.token = void 0;
  133532. this.preserveSpace = void 0;
  133533. this.token = token;
  133534. this.preserveSpace = !!preserveSpace;
  133535. }
  133536. };
  133537. var types2 = {
  133538. brace: new TokContext3("{"),
  133539. templateQuasi: new TokContext3("${"),
  133540. template: new TokContext3("`", true)
  133541. };
  133542. types$12.braceR.updateContext = (context) => {
  133543. if (context.length > 1) {
  133544. context.pop();
  133545. }
  133546. };
  133547. types$12.braceL.updateContext = types$12.braceHashL.updateContext = (context) => {
  133548. context.push(types2.brace);
  133549. };
  133550. types$12.dollarBraceL.updateContext = (context) => {
  133551. context.push(types2.templateQuasi);
  133552. };
  133553. types$12.backQuote.updateContext = (context) => {
  133554. if (context[context.length - 1] === types2.template) {
  133555. context.pop();
  133556. } else {
  133557. context.push(types2.template);
  133558. }
  133559. };
  133560. var nonASCIIidentifierStartChars2 = "\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u08A0-\u08B4\u08B6-\u08C7\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1878\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309B-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u31BF\u31F0-\u31FF\u3400-\u4DBF\u4E00-\u9FFC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7BF\uA7C2-\uA7CA\uA7F5-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC";
  133561. var nonASCIIidentifierChars2 = "\u200C\u200D\xB7\u0300-\u036F\u0387\u0483-\u0487\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u0669\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u06F0-\u06F9\u0711\u0730-\u074A\u07A6-\u07B0\u07C0-\u07C9\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u08D3-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0966-\u096F\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u09E6-\u09EF\u09FE\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A66-\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0AE6-\u0AEF\u0AFA-\u0AFF\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B55-\u0B57\u0B62\u0B63\u0B66-\u0B6F\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0BE6-\u0BEF\u0C00-\u0C04\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C66-\u0C6F\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0CE6-\u0CEF\u0D00-\u0D03\u0D3B\u0D3C\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D66-\u0D6F\u0D81-\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0E50-\u0E59\u0EB1\u0EB4-\u0EBC\u0EC8-\u0ECD\u0ED0-\u0ED9\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1040-\u1049\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F-\u109D\u135D-\u135F\u1369-\u1371\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u18A9\u1920-\u192B\u1930-\u193B\u1946-\u194F\u19D0-\u19DA\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AB0-\u1ABD\u1ABF\u1AC0\u1B00-\u1B04\u1B34-\u1B44\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BB0-\u1BB9\u1BE6-\u1BF3\u1C24-\u1C37\u1C40-\u1C49\u1C50-\u1C59\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF4\u1CF7-\u1CF9\u1DC0-\u1DF9\u1DFB-\u1DFF\u203F\u2040\u2054\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA620-\uA629\uA66F\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA82C\uA880\uA881\uA8B4-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F1\uA8FF-\uA909\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9D0-\uA9D9\uA9E5\uA9F0-\uA9F9\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA50-\uAA59\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uABF0-\uABF9\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFF10-\uFF19\uFF3F";
  133562. var nonASCIIidentifierStart2 = new RegExp("[" + nonASCIIidentifierStartChars2 + "]");
  133563. var nonASCIIidentifier2 = new RegExp("[" + nonASCIIidentifierStartChars2 + nonASCIIidentifierChars2 + "]");
  133564. nonASCIIidentifierStartChars2 = nonASCIIidentifierChars2 = null;
  133565. var astralIdentifierStartCodes2 = [0, 11, 2, 25, 2, 18, 2, 1, 2, 14, 3, 13, 35, 122, 70, 52, 268, 28, 4, 48, 48, 31, 14, 29, 6, 37, 11, 29, 3, 35, 5, 7, 2, 4, 43, 157, 19, 35, 5, 35, 5, 39, 9, 51, 157, 310, 10, 21, 11, 7, 153, 5, 3, 0, 2, 43, 2, 1, 4, 0, 3, 22, 11, 22, 10, 30, 66, 18, 2, 1, 11, 21, 11, 25, 71, 55, 7, 1, 65, 0, 16, 3, 2, 2, 2, 28, 43, 28, 4, 28, 36, 7, 2, 27, 28, 53, 11, 21, 11, 18, 14, 17, 111, 72, 56, 50, 14, 50, 14, 35, 349, 41, 7, 1, 79, 28, 11, 0, 9, 21, 107, 20, 28, 22, 13, 52, 76, 44, 33, 24, 27, 35, 30, 0, 3, 0, 9, 34, 4, 0, 13, 47, 15, 3, 22, 0, 2, 0, 36, 17, 2, 24, 85, 6, 2, 0, 2, 3, 2, 14, 2, 9, 8, 46, 39, 7, 3, 1, 3, 21, 2, 6, 2, 1, 2, 4, 4, 0, 19, 0, 13, 4, 159, 52, 19, 3, 21, 2, 31, 47, 21, 1, 2, 0, 185, 46, 42, 3, 37, 47, 21, 0, 60, 42, 14, 0, 72, 26, 230, 43, 117, 63, 32, 7, 3, 0, 3, 7, 2, 1, 2, 23, 16, 0, 2, 0, 95, 7, 3, 38, 17, 0, 2, 0, 29, 0, 11, 39, 8, 0, 22, 0, 12, 45, 20, 0, 35, 56, 264, 8, 2, 36, 18, 0, 50, 29, 113, 6, 2, 1, 2, 37, 22, 0, 26, 5, 2, 1, 2, 31, 15, 0, 328, 18, 190, 0, 80, 921, 103, 110, 18, 195, 2749, 1070, 4050, 582, 8634, 568, 8, 30, 114, 29, 19, 47, 17, 3, 32, 20, 6, 18, 689, 63, 129, 74, 6, 0, 67, 12, 65, 1, 2, 0, 29, 6135, 9, 1237, 43, 8, 8952, 286, 50, 2, 18, 3, 9, 395, 2309, 106, 6, 12, 4, 8, 8, 9, 5991, 84, 2, 70, 2, 1, 3, 0, 3, 1, 3, 3, 2, 11, 2, 0, 2, 6, 2, 64, 2, 3, 3, 7, 2, 6, 2, 27, 2, 3, 2, 4, 2, 0, 4, 6, 2, 339, 3, 24, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 7, 2357, 44, 11, 6, 17, 0, 370, 43, 1301, 196, 60, 67, 8, 0, 1205, 3, 2, 26, 2, 1, 2, 0, 3, 0, 2, 9, 2, 3, 2, 0, 2, 0, 7, 0, 5, 0, 2, 0, 2, 0, 2, 2, 2, 1, 2, 0, 3, 0, 2, 0, 2, 0, 2, 0, 2, 0, 2, 1, 2, 0, 3, 3, 2, 6, 2, 3, 2, 3, 2, 0, 2, 9, 2, 16, 6, 2, 2, 4, 2, 16, 4421, 42717, 35, 4148, 12, 221, 3, 5761, 15, 7472, 3104, 541, 1507, 4938];
  133566. var astralIdentifierCodes2 = [509, 0, 227, 0, 150, 4, 294, 9, 1368, 2, 2, 1, 6, 3, 41, 2, 5, 0, 166, 1, 574, 3, 9, 9, 370, 1, 154, 10, 176, 2, 54, 14, 32, 9, 16, 3, 46, 10, 54, 9, 7, 2, 37, 13, 2, 9, 6, 1, 45, 0, 13, 2, 49, 13, 9, 3, 2, 11, 83, 11, 7, 0, 161, 11, 6, 9, 7, 3, 56, 1, 2, 6, 3, 1, 3, 2, 10, 0, 11, 1, 3, 6, 4, 4, 193, 17, 10, 9, 5, 0, 82, 19, 13, 9, 214, 6, 3, 8, 28, 1, 83, 16, 16, 9, 82, 12, 9, 9, 84, 14, 5, 9, 243, 14, 166, 9, 71, 5, 2, 1, 3, 3, 2, 0, 2, 1, 13, 9, 120, 6, 3, 6, 4, 0, 29, 9, 41, 6, 2, 3, 9, 0, 10, 10, 47, 15, 406, 7, 2, 7, 17, 9, 57, 21, 2, 13, 123, 5, 4, 0, 2, 1, 2, 6, 2, 0, 9, 9, 49, 4, 2, 1, 2, 4, 9, 9, 330, 3, 19306, 9, 135, 4, 60, 6, 26, 9, 1014, 0, 2, 54, 8, 3, 82, 0, 12, 1, 19628, 1, 5319, 4, 4, 5, 9, 7, 3, 6, 31, 3, 149, 2, 1418, 49, 513, 54, 5, 49, 9, 0, 15, 0, 23, 4, 2, 14, 1361, 6, 2, 16, 3, 6, 2, 1, 2, 4, 262, 6, 10, 9, 419, 13, 1495, 6, 110, 6, 6, 9, 4759, 9, 787719, 239];
  133567. function isInAstralSet2(code2, set) {
  133568. let pos = 65536;
  133569. for (let i = 0, length = set.length; i < length; i += 2) {
  133570. pos += set[i];
  133571. if (pos > code2)
  133572. return false;
  133573. pos += set[i + 1];
  133574. if (pos >= code2)
  133575. return true;
  133576. }
  133577. return false;
  133578. }
  133579. function isIdentifierStart2(code2) {
  133580. if (code2 < 65)
  133581. return code2 === 36;
  133582. if (code2 <= 90)
  133583. return true;
  133584. if (code2 < 97)
  133585. return code2 === 95;
  133586. if (code2 <= 122)
  133587. return true;
  133588. if (code2 <= 65535) {
  133589. return code2 >= 170 && nonASCIIidentifierStart2.test(String.fromCharCode(code2));
  133590. }
  133591. return isInAstralSet2(code2, astralIdentifierStartCodes2);
  133592. }
  133593. function isIdentifierChar2(code2) {
  133594. if (code2 < 48)
  133595. return code2 === 36;
  133596. if (code2 < 58)
  133597. return true;
  133598. if (code2 < 65)
  133599. return false;
  133600. if (code2 <= 90)
  133601. return true;
  133602. if (code2 < 97)
  133603. return code2 === 95;
  133604. if (code2 <= 122)
  133605. return true;
  133606. if (code2 <= 65535) {
  133607. return code2 >= 170 && nonASCIIidentifier2.test(String.fromCharCode(code2));
  133608. }
  133609. return isInAstralSet2(code2, astralIdentifierStartCodes2) || isInAstralSet2(code2, astralIdentifierCodes2);
  133610. }
  133611. var reservedWords2 = {
  133612. keyword: ["break", "case", "catch", "continue", "debugger", "default", "do", "else", "finally", "for", "function", "if", "return", "switch", "throw", "try", "var", "const", "while", "with", "new", "this", "super", "class", "extends", "export", "import", "null", "true", "false", "in", "instanceof", "typeof", "void", "delete"],
  133613. strict: ["implements", "interface", "let", "package", "private", "protected", "public", "static", "yield"],
  133614. strictBind: ["eval", "arguments"]
  133615. };
  133616. var keywords2 = new Set(reservedWords2.keyword);
  133617. var reservedWordsStrictSet = new Set(reservedWords2.strict);
  133618. var reservedWordsStrictBindSet = new Set(reservedWords2.strictBind);
  133619. function isReservedWord(word, inModule) {
  133620. return inModule && word === "await" || word === "enum";
  133621. }
  133622. function isStrictReservedWord(word, inModule) {
  133623. return isReservedWord(word, inModule) || reservedWordsStrictSet.has(word);
  133624. }
  133625. function isStrictBindOnlyReservedWord(word) {
  133626. return reservedWordsStrictBindSet.has(word);
  133627. }
  133628. function isStrictBindReservedWord(word, inModule) {
  133629. return isStrictReservedWord(word, inModule) || isStrictBindOnlyReservedWord(word);
  133630. }
  133631. function isKeyword(word) {
  133632. return keywords2.has(word);
  133633. }
  133634. function isIteratorStart(current2, next) {
  133635. return current2 === 64 && next === 64;
  133636. }
  133637. var reservedWordLikeSet = /* @__PURE__ */ new Set(["break", "case", "catch", "continue", "debugger", "default", "do", "else", "finally", "for", "function", "if", "return", "switch", "throw", "try", "var", "const", "while", "with", "new", "this", "super", "class", "extends", "export", "import", "null", "true", "false", "in", "instanceof", "typeof", "void", "delete", "implements", "interface", "let", "package", "private", "protected", "public", "static", "yield", "eval", "arguments", "enum", "await"]);
  133638. function canBeReservedWord(word) {
  133639. return reservedWordLikeSet.has(word);
  133640. }
  133641. var SCOPE_OTHER = 0;
  133642. var SCOPE_PROGRAM = 1;
  133643. var SCOPE_FUNCTION2 = 2;
  133644. var SCOPE_ARROW2 = 4;
  133645. var SCOPE_SIMPLE_CATCH2 = 8;
  133646. var SCOPE_SUPER2 = 16;
  133647. var SCOPE_DIRECT_SUPER2 = 32;
  133648. var SCOPE_CLASS = 64;
  133649. var SCOPE_STATIC_BLOCK = 128;
  133650. var SCOPE_TS_MODULE = 256;
  133651. var SCOPE_VAR2 = SCOPE_PROGRAM | SCOPE_FUNCTION2 | SCOPE_TS_MODULE;
  133652. var BIND_KIND_VALUE = 1;
  133653. var BIND_KIND_TYPE = 2;
  133654. var BIND_SCOPE_VAR = 4;
  133655. var BIND_SCOPE_LEXICAL = 8;
  133656. var BIND_SCOPE_FUNCTION = 16;
  133657. var BIND_FLAGS_NONE = 64;
  133658. var BIND_FLAGS_CLASS = 128;
  133659. var BIND_FLAGS_TS_ENUM = 256;
  133660. var BIND_FLAGS_TS_CONST_ENUM = 512;
  133661. var BIND_FLAGS_TS_EXPORT_ONLY = 1024;
  133662. var BIND_FLAGS_FLOW_DECLARE_FN = 2048;
  133663. var BIND_CLASS = BIND_KIND_VALUE | BIND_KIND_TYPE | BIND_SCOPE_LEXICAL | BIND_FLAGS_CLASS;
  133664. var BIND_LEXICAL2 = BIND_KIND_VALUE | 0 | BIND_SCOPE_LEXICAL | 0;
  133665. var BIND_VAR2 = BIND_KIND_VALUE | 0 | BIND_SCOPE_VAR | 0;
  133666. var BIND_FUNCTION2 = BIND_KIND_VALUE | 0 | BIND_SCOPE_FUNCTION | 0;
  133667. var BIND_TS_INTERFACE = 0 | BIND_KIND_TYPE | 0 | BIND_FLAGS_CLASS;
  133668. var BIND_TS_TYPE = 0 | BIND_KIND_TYPE | 0 | 0;
  133669. var BIND_TS_ENUM = BIND_KIND_VALUE | BIND_KIND_TYPE | BIND_SCOPE_LEXICAL | BIND_FLAGS_TS_ENUM;
  133670. var BIND_TS_AMBIENT = 0 | 0 | 0 | BIND_FLAGS_TS_EXPORT_ONLY;
  133671. var BIND_NONE2 = 0 | 0 | 0 | BIND_FLAGS_NONE;
  133672. var BIND_OUTSIDE2 = BIND_KIND_VALUE | 0 | 0 | BIND_FLAGS_NONE;
  133673. var BIND_TS_CONST_ENUM = BIND_TS_ENUM | BIND_FLAGS_TS_CONST_ENUM;
  133674. var BIND_TS_NAMESPACE = 0 | 0 | 0 | BIND_FLAGS_TS_EXPORT_ONLY;
  133675. var BIND_FLOW_DECLARE_FN = BIND_FLAGS_FLOW_DECLARE_FN;
  133676. var CLASS_ELEMENT_FLAG_STATIC = 4;
  133677. var CLASS_ELEMENT_KIND_GETTER = 2;
  133678. var CLASS_ELEMENT_KIND_SETTER = 1;
  133679. var CLASS_ELEMENT_KIND_ACCESSOR = CLASS_ELEMENT_KIND_GETTER | CLASS_ELEMENT_KIND_SETTER;
  133680. var CLASS_ELEMENT_STATIC_GETTER = CLASS_ELEMENT_KIND_GETTER | CLASS_ELEMENT_FLAG_STATIC;
  133681. var CLASS_ELEMENT_STATIC_SETTER = CLASS_ELEMENT_KIND_SETTER | CLASS_ELEMENT_FLAG_STATIC;
  133682. var CLASS_ELEMENT_INSTANCE_GETTER = CLASS_ELEMENT_KIND_GETTER;
  133683. var CLASS_ELEMENT_INSTANCE_SETTER = CLASS_ELEMENT_KIND_SETTER;
  133684. var CLASS_ELEMENT_OTHER = 0;
  133685. var Scope4 = class {
  133686. constructor(flags) {
  133687. this.var = /* @__PURE__ */ new Set();
  133688. this.lexical = /* @__PURE__ */ new Set();
  133689. this.functions = /* @__PURE__ */ new Set();
  133690. this.flags = flags;
  133691. }
  133692. };
  133693. var ScopeHandler = class {
  133694. constructor(raise2, inModule) {
  133695. this.scopeStack = [];
  133696. this.undefinedExports = /* @__PURE__ */ new Map();
  133697. this.undefinedPrivateNames = /* @__PURE__ */ new Map();
  133698. this.raise = raise2;
  133699. this.inModule = inModule;
  133700. }
  133701. get inFunction() {
  133702. return (this.currentVarScopeFlags() & SCOPE_FUNCTION2) > 0;
  133703. }
  133704. get allowSuper() {
  133705. return (this.currentThisScopeFlags() & SCOPE_SUPER2) > 0;
  133706. }
  133707. get allowDirectSuper() {
  133708. return (this.currentThisScopeFlags() & SCOPE_DIRECT_SUPER2) > 0;
  133709. }
  133710. get inClass() {
  133711. return (this.currentThisScopeFlags() & SCOPE_CLASS) > 0;
  133712. }
  133713. get inClassAndNotInNonArrowFunction() {
  133714. const flags = this.currentThisScopeFlags();
  133715. return (flags & SCOPE_CLASS) > 0 && (flags & SCOPE_FUNCTION2) === 0;
  133716. }
  133717. get inStaticBlock() {
  133718. return (this.currentThisScopeFlags() & SCOPE_STATIC_BLOCK) > 0;
  133719. }
  133720. get inNonArrowFunction() {
  133721. return (this.currentThisScopeFlags() & SCOPE_FUNCTION2) > 0;
  133722. }
  133723. get treatFunctionsAsVar() {
  133724. return this.treatFunctionsAsVarInScope(this.currentScope());
  133725. }
  133726. createScope(flags) {
  133727. return new Scope4(flags);
  133728. }
  133729. enter(flags) {
  133730. this.scopeStack.push(this.createScope(flags));
  133731. }
  133732. exit() {
  133733. this.scopeStack.pop();
  133734. }
  133735. treatFunctionsAsVarInScope(scope) {
  133736. return !!(scope.flags & SCOPE_FUNCTION2 || !this.inModule && scope.flags & SCOPE_PROGRAM);
  133737. }
  133738. declareName(name2, bindingType, pos) {
  133739. let scope = this.currentScope();
  133740. if (bindingType & BIND_SCOPE_LEXICAL || bindingType & BIND_SCOPE_FUNCTION) {
  133741. this.checkRedeclarationInScope(scope, name2, bindingType, pos);
  133742. if (bindingType & BIND_SCOPE_FUNCTION) {
  133743. scope.functions.add(name2);
  133744. } else {
  133745. scope.lexical.add(name2);
  133746. }
  133747. if (bindingType & BIND_SCOPE_LEXICAL) {
  133748. this.maybeExportDefined(scope, name2);
  133749. }
  133750. } else if (bindingType & BIND_SCOPE_VAR) {
  133751. for (let i = this.scopeStack.length - 1; i >= 0; --i) {
  133752. scope = this.scopeStack[i];
  133753. this.checkRedeclarationInScope(scope, name2, bindingType, pos);
  133754. scope.var.add(name2);
  133755. this.maybeExportDefined(scope, name2);
  133756. if (scope.flags & SCOPE_VAR2)
  133757. break;
  133758. }
  133759. }
  133760. if (this.inModule && scope.flags & SCOPE_PROGRAM) {
  133761. this.undefinedExports.delete(name2);
  133762. }
  133763. }
  133764. maybeExportDefined(scope, name2) {
  133765. if (this.inModule && scope.flags & SCOPE_PROGRAM) {
  133766. this.undefinedExports.delete(name2);
  133767. }
  133768. }
  133769. checkRedeclarationInScope(scope, name2, bindingType, pos) {
  133770. if (this.isRedeclaredInScope(scope, name2, bindingType)) {
  133771. this.raise(pos, ErrorMessages.VarRedeclaration, name2);
  133772. }
  133773. }
  133774. isRedeclaredInScope(scope, name2, bindingType) {
  133775. if (!(bindingType & BIND_KIND_VALUE))
  133776. return false;
  133777. if (bindingType & BIND_SCOPE_LEXICAL) {
  133778. return scope.lexical.has(name2) || scope.functions.has(name2) || scope.var.has(name2);
  133779. }
  133780. if (bindingType & BIND_SCOPE_FUNCTION) {
  133781. return scope.lexical.has(name2) || !this.treatFunctionsAsVarInScope(scope) && scope.var.has(name2);
  133782. }
  133783. return scope.lexical.has(name2) && !(scope.flags & SCOPE_SIMPLE_CATCH2 && scope.lexical.values().next().value === name2) || !this.treatFunctionsAsVarInScope(scope) && scope.functions.has(name2);
  133784. }
  133785. checkLocalExport(id) {
  133786. const {
  133787. name: name2
  133788. } = id;
  133789. const topLevelScope = this.scopeStack[0];
  133790. if (!topLevelScope.lexical.has(name2) && !topLevelScope.var.has(name2) && !topLevelScope.functions.has(name2)) {
  133791. this.undefinedExports.set(name2, id.start);
  133792. }
  133793. }
  133794. currentScope() {
  133795. return this.scopeStack[this.scopeStack.length - 1];
  133796. }
  133797. currentVarScopeFlags() {
  133798. for (let i = this.scopeStack.length - 1; ; i--) {
  133799. const {
  133800. flags
  133801. } = this.scopeStack[i];
  133802. if (flags & SCOPE_VAR2) {
  133803. return flags;
  133804. }
  133805. }
  133806. }
  133807. currentThisScopeFlags() {
  133808. for (let i = this.scopeStack.length - 1; ; i--) {
  133809. const {
  133810. flags
  133811. } = this.scopeStack[i];
  133812. if (flags & (SCOPE_VAR2 | SCOPE_CLASS) && !(flags & SCOPE_ARROW2)) {
  133813. return flags;
  133814. }
  133815. }
  133816. }
  133817. };
  133818. var FlowScope = class extends Scope4 {
  133819. constructor(...args) {
  133820. super(...args);
  133821. this.declareFunctions = /* @__PURE__ */ new Set();
  133822. }
  133823. };
  133824. var FlowScopeHandler = class extends ScopeHandler {
  133825. createScope(flags) {
  133826. return new FlowScope(flags);
  133827. }
  133828. declareName(name2, bindingType, pos) {
  133829. const scope = this.currentScope();
  133830. if (bindingType & BIND_FLAGS_FLOW_DECLARE_FN) {
  133831. this.checkRedeclarationInScope(scope, name2, bindingType, pos);
  133832. this.maybeExportDefined(scope, name2);
  133833. scope.declareFunctions.add(name2);
  133834. return;
  133835. }
  133836. super.declareName(...arguments);
  133837. }
  133838. isRedeclaredInScope(scope, name2, bindingType) {
  133839. if (super.isRedeclaredInScope(...arguments))
  133840. return true;
  133841. if (bindingType & BIND_FLAGS_FLOW_DECLARE_FN) {
  133842. return !scope.declareFunctions.has(name2) && (scope.lexical.has(name2) || scope.functions.has(name2));
  133843. }
  133844. return false;
  133845. }
  133846. checkLocalExport(id) {
  133847. if (!this.scopeStack[0].declareFunctions.has(id.name)) {
  133848. super.checkLocalExport(id);
  133849. }
  133850. }
  133851. };
  133852. var reservedTypes = /* @__PURE__ */ new Set(["_", "any", "bool", "boolean", "empty", "extends", "false", "interface", "mixed", "null", "number", "static", "string", "true", "typeof", "void"]);
  133853. var FlowErrors = makeErrorTemplates({
  133854. AmbiguousConditionalArrow: "Ambiguous expression: wrap the arrow functions in parentheses to disambiguate.",
  133855. AmbiguousDeclareModuleKind: "Found both `declare module.exports` and `declare export` in the same module. Modules can only have 1 since they are either an ES module or they are a CommonJS module.",
  133856. AssignReservedType: "Cannot overwrite reserved type %0.",
  133857. DeclareClassElement: "The `declare` modifier can only appear on class fields.",
  133858. DeclareClassFieldInitializer: "Initializers are not allowed in fields with the `declare` modifier.",
  133859. DuplicateDeclareModuleExports: "Duplicate `declare module.exports` statement.",
  133860. EnumBooleanMemberNotInitialized: "Boolean enum members need to be initialized. Use either `%0 = true,` or `%0 = false,` in enum `%1`.",
  133861. EnumDuplicateMemberName: "Enum member names need to be unique, but the name `%0` has already been used before in enum `%1`.",
  133862. EnumInconsistentMemberValues: "Enum `%0` has inconsistent member initializers. Either use no initializers, or consistently use literals (either booleans, numbers, or strings) for all member initializers.",
  133863. EnumInvalidExplicitType: "Enum type `%1` is not valid. Use one of `boolean`, `number`, `string`, or `symbol` in enum `%0`.",
  133864. EnumInvalidExplicitTypeUnknownSupplied: "Supplied enum type is not valid. Use one of `boolean`, `number`, `string`, or `symbol` in enum `%0`.",
  133865. EnumInvalidMemberInitializerPrimaryType: "Enum `%0` has type `%2`, so the initializer of `%1` needs to be a %2 literal.",
  133866. EnumInvalidMemberInitializerSymbolType: "Symbol enum members cannot be initialized. Use `%1,` in enum `%0`.",
  133867. EnumInvalidMemberInitializerUnknownType: "The enum member initializer for `%1` needs to be a literal (either a boolean, number, or string) in enum `%0`.",
  133868. EnumInvalidMemberName: "Enum member names cannot start with lowercase 'a' through 'z'. Instead of using `%0`, consider using `%1`, in enum `%2`.",
  133869. EnumNumberMemberNotInitialized: "Number enum members need to be initialized, e.g. `%1 = 1` in enum `%0`.",
  133870. EnumStringMemberInconsistentlyInitailized: "String enum members need to consistently either all use initializers, or use no initializers, in enum `%0`.",
  133871. GetterMayNotHaveThisParam: "A getter cannot have a `this` parameter.",
  133872. ImportTypeShorthandOnlyInPureImport: "The `type` and `typeof` keywords on named imports can only be used on regular `import` statements. It cannot be used with `import type` or `import typeof` statements.",
  133873. InexactInsideExact: "Explicit inexact syntax cannot appear inside an explicit exact object type.",
  133874. InexactInsideNonObject: "Explicit inexact syntax cannot appear in class or interface definitions.",
  133875. InexactVariance: "Explicit inexact syntax cannot have variance.",
  133876. InvalidNonTypeImportInDeclareModule: "Imports within a `declare module` body must always be `import type` or `import typeof`.",
  133877. MissingTypeParamDefault: "Type parameter declaration needs a default, since a preceding type parameter declaration has a default.",
  133878. NestedDeclareModule: "`declare module` cannot be used inside another `declare module`.",
  133879. NestedFlowComment: "Cannot have a flow comment inside another flow comment.",
  133880. OptionalBindingPattern: "A binding pattern parameter cannot be optional in an implementation signature.",
  133881. SetterMayNotHaveThisParam: "A setter cannot have a `this` parameter.",
  133882. SpreadVariance: "Spread properties cannot have variance.",
  133883. ThisParamAnnotationRequired: "A type annotation is required for the `this` parameter.",
  133884. ThisParamBannedInConstructor: "Constructors cannot have a `this` parameter; constructors don't bind `this` like other functions.",
  133885. ThisParamMayNotBeOptional: "The `this` parameter cannot be optional.",
  133886. ThisParamMustBeFirst: "The `this` parameter must be the first function parameter.",
  133887. ThisParamNoDefault: "The `this` parameter may not have a default value.",
  133888. TypeBeforeInitializer: "Type annotations must come before default assignments, e.g. instead of `age = 25: number` use `age: number = 25`.",
  133889. TypeCastInPattern: "The type cast expression is expected to be wrapped with parenthesis.",
  133890. UnexpectedExplicitInexactInObject: "Explicit inexact syntax must appear at the end of an inexact object.",
  133891. UnexpectedReservedType: "Unexpected reserved type %0.",
  133892. UnexpectedReservedUnderscore: "`_` is only allowed as a type argument to call or new.",
  133893. UnexpectedSpaceBetweenModuloChecks: "Spaces between `%` and `checks` are not allowed here.",
  133894. UnexpectedSpreadType: "Spread operator cannot appear in class or interface definitions.",
  133895. UnexpectedSubtractionOperand: 'Unexpected token, expected "number" or "bigint".',
  133896. UnexpectedTokenAfterTypeParameter: "Expected an arrow function after this type parameter declaration.",
  133897. UnexpectedTypeParameterBeforeAsyncArrowFunction: "Type parameters must come after the async keyword, e.g. instead of `<T> async () => {}`, use `async <T>() => {}`.",
  133898. UnsupportedDeclareExportKind: "`declare export %0` is not supported. Use `%1` instead.",
  133899. UnsupportedStatementInDeclareModule: "Only declares and type imports are allowed inside declare module.",
  133900. UnterminatedFlowComment: "Unterminated flow-comment."
  133901. }, ErrorCodes.SyntaxError);
  133902. function isEsModuleType(bodyElement) {
  133903. return bodyElement.type === "DeclareExportAllDeclaration" || bodyElement.type === "DeclareExportDeclaration" && (!bodyElement.declaration || bodyElement.declaration.type !== "TypeAlias" && bodyElement.declaration.type !== "InterfaceDeclaration");
  133904. }
  133905. function hasTypeImportKind(node) {
  133906. return node.importKind === "type" || node.importKind === "typeof";
  133907. }
  133908. function isMaybeDefaultImport(state) {
  133909. return (state.type === types$12.name || !!state.type.keyword) && state.value !== "from";
  133910. }
  133911. var exportSuggestions = {
  133912. const: "declare export var",
  133913. let: "declare export var",
  133914. type: "export type",
  133915. interface: "export interface"
  133916. };
  133917. function partition(list3, test) {
  133918. const list1 = [];
  133919. const list22 = [];
  133920. for (let i = 0; i < list3.length; i++) {
  133921. (test(list3[i], i, list3) ? list1 : list22).push(list3[i]);
  133922. }
  133923. return [list1, list22];
  133924. }
  133925. var FLOW_PRAGMA_REGEX = /\*?\s*@((?:no)?flow)\b/;
  133926. var flow3 = (superClass) => class extends superClass {
  133927. constructor(...args) {
  133928. super(...args);
  133929. this.flowPragma = void 0;
  133930. }
  133931. getScopeHandler() {
  133932. return FlowScopeHandler;
  133933. }
  133934. shouldParseTypes() {
  133935. return this.getPluginOption("flow", "all") || this.flowPragma === "flow";
  133936. }
  133937. shouldParseEnums() {
  133938. return !!this.getPluginOption("flow", "enums");
  133939. }
  133940. finishToken(type, val) {
  133941. if (type !== types$12.string && type !== types$12.semi && type !== types$12.interpreterDirective) {
  133942. if (this.flowPragma === void 0) {
  133943. this.flowPragma = null;
  133944. }
  133945. }
  133946. return super.finishToken(type, val);
  133947. }
  133948. addComment(comment2) {
  133949. if (this.flowPragma === void 0) {
  133950. const matches = FLOW_PRAGMA_REGEX.exec(comment2.value);
  133951. if (!matches)
  133952. ;
  133953. else if (matches[1] === "flow") {
  133954. this.flowPragma = "flow";
  133955. } else if (matches[1] === "noflow") {
  133956. this.flowPragma = "noflow";
  133957. } else {
  133958. throw new Error("Unexpected flow pragma");
  133959. }
  133960. }
  133961. return super.addComment(comment2);
  133962. }
  133963. flowParseTypeInitialiser(tok) {
  133964. const oldInType = this.state.inType;
  133965. this.state.inType = true;
  133966. this.expect(tok || types$12.colon);
  133967. const type = this.flowParseType();
  133968. this.state.inType = oldInType;
  133969. return type;
  133970. }
  133971. flowParsePredicate() {
  133972. const node = this.startNode();
  133973. const moduloPos = this.state.start;
  133974. this.next();
  133975. this.expectContextual("checks");
  133976. if (this.state.lastTokStart > moduloPos + 1) {
  133977. this.raise(moduloPos, FlowErrors.UnexpectedSpaceBetweenModuloChecks);
  133978. }
  133979. if (this.eat(types$12.parenL)) {
  133980. node.value = this.parseExpression();
  133981. this.expect(types$12.parenR);
  133982. return this.finishNode(node, "DeclaredPredicate");
  133983. } else {
  133984. return this.finishNode(node, "InferredPredicate");
  133985. }
  133986. }
  133987. flowParseTypeAndPredicateInitialiser() {
  133988. const oldInType = this.state.inType;
  133989. this.state.inType = true;
  133990. this.expect(types$12.colon);
  133991. let type = null;
  133992. let predicate = null;
  133993. if (this.match(types$12.modulo)) {
  133994. this.state.inType = oldInType;
  133995. predicate = this.flowParsePredicate();
  133996. } else {
  133997. type = this.flowParseType();
  133998. this.state.inType = oldInType;
  133999. if (this.match(types$12.modulo)) {
  134000. predicate = this.flowParsePredicate();
  134001. }
  134002. }
  134003. return [type, predicate];
  134004. }
  134005. flowParseDeclareClass(node) {
  134006. this.next();
  134007. this.flowParseInterfaceish(node, true);
  134008. return this.finishNode(node, "DeclareClass");
  134009. }
  134010. flowParseDeclareFunction(node) {
  134011. this.next();
  134012. const id = node.id = this.parseIdentifier();
  134013. const typeNode = this.startNode();
  134014. const typeContainer = this.startNode();
  134015. if (this.isRelational("<")) {
  134016. typeNode.typeParameters = this.flowParseTypeParameterDeclaration();
  134017. } else {
  134018. typeNode.typeParameters = null;
  134019. }
  134020. this.expect(types$12.parenL);
  134021. const tmp = this.flowParseFunctionTypeParams();
  134022. typeNode.params = tmp.params;
  134023. typeNode.rest = tmp.rest;
  134024. typeNode.this = tmp._this;
  134025. this.expect(types$12.parenR);
  134026. [typeNode.returnType, node.predicate] = this.flowParseTypeAndPredicateInitialiser();
  134027. typeContainer.typeAnnotation = this.finishNode(typeNode, "FunctionTypeAnnotation");
  134028. id.typeAnnotation = this.finishNode(typeContainer, "TypeAnnotation");
  134029. this.resetEndLocation(id);
  134030. this.semicolon();
  134031. this.scope.declareName(node.id.name, BIND_FLOW_DECLARE_FN, node.id.start);
  134032. return this.finishNode(node, "DeclareFunction");
  134033. }
  134034. flowParseDeclare(node, insideModule) {
  134035. if (this.match(types$12._class)) {
  134036. return this.flowParseDeclareClass(node);
  134037. } else if (this.match(types$12._function)) {
  134038. return this.flowParseDeclareFunction(node);
  134039. } else if (this.match(types$12._var)) {
  134040. return this.flowParseDeclareVariable(node);
  134041. } else if (this.eatContextual("module")) {
  134042. if (this.match(types$12.dot)) {
  134043. return this.flowParseDeclareModuleExports(node);
  134044. } else {
  134045. if (insideModule) {
  134046. this.raise(this.state.lastTokStart, FlowErrors.NestedDeclareModule);
  134047. }
  134048. return this.flowParseDeclareModule(node);
  134049. }
  134050. } else if (this.isContextual("type")) {
  134051. return this.flowParseDeclareTypeAlias(node);
  134052. } else if (this.isContextual("opaque")) {
  134053. return this.flowParseDeclareOpaqueType(node);
  134054. } else if (this.isContextual("interface")) {
  134055. return this.flowParseDeclareInterface(node);
  134056. } else if (this.match(types$12._export)) {
  134057. return this.flowParseDeclareExportDeclaration(node, insideModule);
  134058. } else {
  134059. throw this.unexpected();
  134060. }
  134061. }
  134062. flowParseDeclareVariable(node) {
  134063. this.next();
  134064. node.id = this.flowParseTypeAnnotatableIdentifier(true);
  134065. this.scope.declareName(node.id.name, BIND_VAR2, node.id.start);
  134066. this.semicolon();
  134067. return this.finishNode(node, "DeclareVariable");
  134068. }
  134069. flowParseDeclareModule(node) {
  134070. this.scope.enter(SCOPE_OTHER);
  134071. if (this.match(types$12.string)) {
  134072. node.id = this.parseExprAtom();
  134073. } else {
  134074. node.id = this.parseIdentifier();
  134075. }
  134076. const bodyNode = node.body = this.startNode();
  134077. const body = bodyNode.body = [];
  134078. this.expect(types$12.braceL);
  134079. while (!this.match(types$12.braceR)) {
  134080. let bodyNode2 = this.startNode();
  134081. if (this.match(types$12._import)) {
  134082. this.next();
  134083. if (!this.isContextual("type") && !this.match(types$12._typeof)) {
  134084. this.raise(this.state.lastTokStart, FlowErrors.InvalidNonTypeImportInDeclareModule);
  134085. }
  134086. this.parseImport(bodyNode2);
  134087. } else {
  134088. this.expectContextual("declare", FlowErrors.UnsupportedStatementInDeclareModule);
  134089. bodyNode2 = this.flowParseDeclare(bodyNode2, true);
  134090. }
  134091. body.push(bodyNode2);
  134092. }
  134093. this.scope.exit();
  134094. this.expect(types$12.braceR);
  134095. this.finishNode(bodyNode, "BlockStatement");
  134096. let kind = null;
  134097. let hasModuleExport = false;
  134098. body.forEach((bodyElement) => {
  134099. if (isEsModuleType(bodyElement)) {
  134100. if (kind === "CommonJS") {
  134101. this.raise(bodyElement.start, FlowErrors.AmbiguousDeclareModuleKind);
  134102. }
  134103. kind = "ES";
  134104. } else if (bodyElement.type === "DeclareModuleExports") {
  134105. if (hasModuleExport) {
  134106. this.raise(bodyElement.start, FlowErrors.DuplicateDeclareModuleExports);
  134107. }
  134108. if (kind === "ES") {
  134109. this.raise(bodyElement.start, FlowErrors.AmbiguousDeclareModuleKind);
  134110. }
  134111. kind = "CommonJS";
  134112. hasModuleExport = true;
  134113. }
  134114. });
  134115. node.kind = kind || "CommonJS";
  134116. return this.finishNode(node, "DeclareModule");
  134117. }
  134118. flowParseDeclareExportDeclaration(node, insideModule) {
  134119. this.expect(types$12._export);
  134120. if (this.eat(types$12._default)) {
  134121. if (this.match(types$12._function) || this.match(types$12._class)) {
  134122. node.declaration = this.flowParseDeclare(this.startNode());
  134123. } else {
  134124. node.declaration = this.flowParseType();
  134125. this.semicolon();
  134126. }
  134127. node.default = true;
  134128. return this.finishNode(node, "DeclareExportDeclaration");
  134129. } else {
  134130. if (this.match(types$12._const) || this.isLet() || (this.isContextual("type") || this.isContextual("interface")) && !insideModule) {
  134131. const label = this.state.value;
  134132. const suggestion = exportSuggestions[label];
  134133. throw this.raise(this.state.start, FlowErrors.UnsupportedDeclareExportKind, label, suggestion);
  134134. }
  134135. if (this.match(types$12._var) || this.match(types$12._function) || this.match(types$12._class) || this.isContextual("opaque")) {
  134136. node.declaration = this.flowParseDeclare(this.startNode());
  134137. node.default = false;
  134138. return this.finishNode(node, "DeclareExportDeclaration");
  134139. } else if (this.match(types$12.star) || this.match(types$12.braceL) || this.isContextual("interface") || this.isContextual("type") || this.isContextual("opaque")) {
  134140. node = this.parseExport(node);
  134141. if (node.type === "ExportNamedDeclaration") {
  134142. node.type = "ExportDeclaration";
  134143. node.default = false;
  134144. delete node.exportKind;
  134145. }
  134146. node.type = "Declare" + node.type;
  134147. return node;
  134148. }
  134149. }
  134150. throw this.unexpected();
  134151. }
  134152. flowParseDeclareModuleExports(node) {
  134153. this.next();
  134154. this.expectContextual("exports");
  134155. node.typeAnnotation = this.flowParseTypeAnnotation();
  134156. this.semicolon();
  134157. return this.finishNode(node, "DeclareModuleExports");
  134158. }
  134159. flowParseDeclareTypeAlias(node) {
  134160. this.next();
  134161. this.flowParseTypeAlias(node);
  134162. node.type = "DeclareTypeAlias";
  134163. return node;
  134164. }
  134165. flowParseDeclareOpaqueType(node) {
  134166. this.next();
  134167. this.flowParseOpaqueType(node, true);
  134168. node.type = "DeclareOpaqueType";
  134169. return node;
  134170. }
  134171. flowParseDeclareInterface(node) {
  134172. this.next();
  134173. this.flowParseInterfaceish(node);
  134174. return this.finishNode(node, "DeclareInterface");
  134175. }
  134176. flowParseInterfaceish(node, isClass = false) {
  134177. node.id = this.flowParseRestrictedIdentifier(!isClass, true);
  134178. this.scope.declareName(node.id.name, isClass ? BIND_FUNCTION2 : BIND_LEXICAL2, node.id.start);
  134179. if (this.isRelational("<")) {
  134180. node.typeParameters = this.flowParseTypeParameterDeclaration();
  134181. } else {
  134182. node.typeParameters = null;
  134183. }
  134184. node.extends = [];
  134185. node.implements = [];
  134186. node.mixins = [];
  134187. if (this.eat(types$12._extends)) {
  134188. do {
  134189. node.extends.push(this.flowParseInterfaceExtends());
  134190. } while (!isClass && this.eat(types$12.comma));
  134191. }
  134192. if (this.isContextual("mixins")) {
  134193. this.next();
  134194. do {
  134195. node.mixins.push(this.flowParseInterfaceExtends());
  134196. } while (this.eat(types$12.comma));
  134197. }
  134198. if (this.isContextual("implements")) {
  134199. this.next();
  134200. do {
  134201. node.implements.push(this.flowParseInterfaceExtends());
  134202. } while (this.eat(types$12.comma));
  134203. }
  134204. node.body = this.flowParseObjectType({
  134205. allowStatic: isClass,
  134206. allowExact: false,
  134207. allowSpread: false,
  134208. allowProto: isClass,
  134209. allowInexact: false
  134210. });
  134211. }
  134212. flowParseInterfaceExtends() {
  134213. const node = this.startNode();
  134214. node.id = this.flowParseQualifiedTypeIdentifier();
  134215. if (this.isRelational("<")) {
  134216. node.typeParameters = this.flowParseTypeParameterInstantiation();
  134217. } else {
  134218. node.typeParameters = null;
  134219. }
  134220. return this.finishNode(node, "InterfaceExtends");
  134221. }
  134222. flowParseInterface(node) {
  134223. this.flowParseInterfaceish(node);
  134224. return this.finishNode(node, "InterfaceDeclaration");
  134225. }
  134226. checkNotUnderscore(word) {
  134227. if (word === "_") {
  134228. this.raise(this.state.start, FlowErrors.UnexpectedReservedUnderscore);
  134229. }
  134230. }
  134231. checkReservedType(word, startLoc, declaration) {
  134232. if (!reservedTypes.has(word))
  134233. return;
  134234. this.raise(startLoc, declaration ? FlowErrors.AssignReservedType : FlowErrors.UnexpectedReservedType, word);
  134235. }
  134236. flowParseRestrictedIdentifier(liberal, declaration) {
  134237. this.checkReservedType(this.state.value, this.state.start, declaration);
  134238. return this.parseIdentifier(liberal);
  134239. }
  134240. flowParseTypeAlias(node) {
  134241. node.id = this.flowParseRestrictedIdentifier(false, true);
  134242. this.scope.declareName(node.id.name, BIND_LEXICAL2, node.id.start);
  134243. if (this.isRelational("<")) {
  134244. node.typeParameters = this.flowParseTypeParameterDeclaration();
  134245. } else {
  134246. node.typeParameters = null;
  134247. }
  134248. node.right = this.flowParseTypeInitialiser(types$12.eq);
  134249. this.semicolon();
  134250. return this.finishNode(node, "TypeAlias");
  134251. }
  134252. flowParseOpaqueType(node, declare) {
  134253. this.expectContextual("type");
  134254. node.id = this.flowParseRestrictedIdentifier(true, true);
  134255. this.scope.declareName(node.id.name, BIND_LEXICAL2, node.id.start);
  134256. if (this.isRelational("<")) {
  134257. node.typeParameters = this.flowParseTypeParameterDeclaration();
  134258. } else {
  134259. node.typeParameters = null;
  134260. }
  134261. node.supertype = null;
  134262. if (this.match(types$12.colon)) {
  134263. node.supertype = this.flowParseTypeInitialiser(types$12.colon);
  134264. }
  134265. node.impltype = null;
  134266. if (!declare) {
  134267. node.impltype = this.flowParseTypeInitialiser(types$12.eq);
  134268. }
  134269. this.semicolon();
  134270. return this.finishNode(node, "OpaqueType");
  134271. }
  134272. flowParseTypeParameter(requireDefault = false) {
  134273. const nodeStart = this.state.start;
  134274. const node = this.startNode();
  134275. const variance = this.flowParseVariance();
  134276. const ident = this.flowParseTypeAnnotatableIdentifier();
  134277. node.name = ident.name;
  134278. node.variance = variance;
  134279. node.bound = ident.typeAnnotation;
  134280. if (this.match(types$12.eq)) {
  134281. this.eat(types$12.eq);
  134282. node.default = this.flowParseType();
  134283. } else {
  134284. if (requireDefault) {
  134285. this.raise(nodeStart, FlowErrors.MissingTypeParamDefault);
  134286. }
  134287. }
  134288. return this.finishNode(node, "TypeParameter");
  134289. }
  134290. flowParseTypeParameterDeclaration() {
  134291. const oldInType = this.state.inType;
  134292. const node = this.startNode();
  134293. node.params = [];
  134294. this.state.inType = true;
  134295. if (this.isRelational("<") || this.match(types$12.jsxTagStart)) {
  134296. this.next();
  134297. } else {
  134298. this.unexpected();
  134299. }
  134300. let defaultRequired = false;
  134301. do {
  134302. const typeParameter = this.flowParseTypeParameter(defaultRequired);
  134303. node.params.push(typeParameter);
  134304. if (typeParameter.default) {
  134305. defaultRequired = true;
  134306. }
  134307. if (!this.isRelational(">")) {
  134308. this.expect(types$12.comma);
  134309. }
  134310. } while (!this.isRelational(">"));
  134311. this.expectRelational(">");
  134312. this.state.inType = oldInType;
  134313. return this.finishNode(node, "TypeParameterDeclaration");
  134314. }
  134315. flowParseTypeParameterInstantiation() {
  134316. const node = this.startNode();
  134317. const oldInType = this.state.inType;
  134318. node.params = [];
  134319. this.state.inType = true;
  134320. this.expectRelational("<");
  134321. const oldNoAnonFunctionType = this.state.noAnonFunctionType;
  134322. this.state.noAnonFunctionType = false;
  134323. while (!this.isRelational(">")) {
  134324. node.params.push(this.flowParseType());
  134325. if (!this.isRelational(">")) {
  134326. this.expect(types$12.comma);
  134327. }
  134328. }
  134329. this.state.noAnonFunctionType = oldNoAnonFunctionType;
  134330. this.expectRelational(">");
  134331. this.state.inType = oldInType;
  134332. return this.finishNode(node, "TypeParameterInstantiation");
  134333. }
  134334. flowParseTypeParameterInstantiationCallOrNew() {
  134335. const node = this.startNode();
  134336. const oldInType = this.state.inType;
  134337. node.params = [];
  134338. this.state.inType = true;
  134339. this.expectRelational("<");
  134340. while (!this.isRelational(">")) {
  134341. node.params.push(this.flowParseTypeOrImplicitInstantiation());
  134342. if (!this.isRelational(">")) {
  134343. this.expect(types$12.comma);
  134344. }
  134345. }
  134346. this.expectRelational(">");
  134347. this.state.inType = oldInType;
  134348. return this.finishNode(node, "TypeParameterInstantiation");
  134349. }
  134350. flowParseInterfaceType() {
  134351. const node = this.startNode();
  134352. this.expectContextual("interface");
  134353. node.extends = [];
  134354. if (this.eat(types$12._extends)) {
  134355. do {
  134356. node.extends.push(this.flowParseInterfaceExtends());
  134357. } while (this.eat(types$12.comma));
  134358. }
  134359. node.body = this.flowParseObjectType({
  134360. allowStatic: false,
  134361. allowExact: false,
  134362. allowSpread: false,
  134363. allowProto: false,
  134364. allowInexact: false
  134365. });
  134366. return this.finishNode(node, "InterfaceTypeAnnotation");
  134367. }
  134368. flowParseObjectPropertyKey() {
  134369. return this.match(types$12.num) || this.match(types$12.string) ? this.parseExprAtom() : this.parseIdentifier(true);
  134370. }
  134371. flowParseObjectTypeIndexer(node, isStatic, variance) {
  134372. node.static = isStatic;
  134373. if (this.lookahead().type === types$12.colon) {
  134374. node.id = this.flowParseObjectPropertyKey();
  134375. node.key = this.flowParseTypeInitialiser();
  134376. } else {
  134377. node.id = null;
  134378. node.key = this.flowParseType();
  134379. }
  134380. this.expect(types$12.bracketR);
  134381. node.value = this.flowParseTypeInitialiser();
  134382. node.variance = variance;
  134383. return this.finishNode(node, "ObjectTypeIndexer");
  134384. }
  134385. flowParseObjectTypeInternalSlot(node, isStatic) {
  134386. node.static = isStatic;
  134387. node.id = this.flowParseObjectPropertyKey();
  134388. this.expect(types$12.bracketR);
  134389. this.expect(types$12.bracketR);
  134390. if (this.isRelational("<") || this.match(types$12.parenL)) {
  134391. node.method = true;
  134392. node.optional = false;
  134393. node.value = this.flowParseObjectTypeMethodish(this.startNodeAt(node.start, node.loc.start));
  134394. } else {
  134395. node.method = false;
  134396. if (this.eat(types$12.question)) {
  134397. node.optional = true;
  134398. }
  134399. node.value = this.flowParseTypeInitialiser();
  134400. }
  134401. return this.finishNode(node, "ObjectTypeInternalSlot");
  134402. }
  134403. flowParseObjectTypeMethodish(node) {
  134404. node.params = [];
  134405. node.rest = null;
  134406. node.typeParameters = null;
  134407. node.this = null;
  134408. if (this.isRelational("<")) {
  134409. node.typeParameters = this.flowParseTypeParameterDeclaration();
  134410. }
  134411. this.expect(types$12.parenL);
  134412. if (this.match(types$12._this)) {
  134413. node.this = this.flowParseFunctionTypeParam(true);
  134414. node.this.name = null;
  134415. if (!this.match(types$12.parenR)) {
  134416. this.expect(types$12.comma);
  134417. }
  134418. }
  134419. while (!this.match(types$12.parenR) && !this.match(types$12.ellipsis)) {
  134420. node.params.push(this.flowParseFunctionTypeParam(false));
  134421. if (!this.match(types$12.parenR)) {
  134422. this.expect(types$12.comma);
  134423. }
  134424. }
  134425. if (this.eat(types$12.ellipsis)) {
  134426. node.rest = this.flowParseFunctionTypeParam(false);
  134427. }
  134428. this.expect(types$12.parenR);
  134429. node.returnType = this.flowParseTypeInitialiser();
  134430. return this.finishNode(node, "FunctionTypeAnnotation");
  134431. }
  134432. flowParseObjectTypeCallProperty(node, isStatic) {
  134433. const valueNode = this.startNode();
  134434. node.static = isStatic;
  134435. node.value = this.flowParseObjectTypeMethodish(valueNode);
  134436. return this.finishNode(node, "ObjectTypeCallProperty");
  134437. }
  134438. flowParseObjectType({
  134439. allowStatic,
  134440. allowExact,
  134441. allowSpread,
  134442. allowProto,
  134443. allowInexact
  134444. }) {
  134445. const oldInType = this.state.inType;
  134446. this.state.inType = true;
  134447. const nodeStart = this.startNode();
  134448. nodeStart.callProperties = [];
  134449. nodeStart.properties = [];
  134450. nodeStart.indexers = [];
  134451. nodeStart.internalSlots = [];
  134452. let endDelim;
  134453. let exact;
  134454. let inexact = false;
  134455. if (allowExact && this.match(types$12.braceBarL)) {
  134456. this.expect(types$12.braceBarL);
  134457. endDelim = types$12.braceBarR;
  134458. exact = true;
  134459. } else {
  134460. this.expect(types$12.braceL);
  134461. endDelim = types$12.braceR;
  134462. exact = false;
  134463. }
  134464. nodeStart.exact = exact;
  134465. while (!this.match(endDelim)) {
  134466. let isStatic = false;
  134467. let protoStart = null;
  134468. let inexactStart = null;
  134469. const node = this.startNode();
  134470. if (allowProto && this.isContextual("proto")) {
  134471. const lookahead2 = this.lookahead();
  134472. if (lookahead2.type !== types$12.colon && lookahead2.type !== types$12.question) {
  134473. this.next();
  134474. protoStart = this.state.start;
  134475. allowStatic = false;
  134476. }
  134477. }
  134478. if (allowStatic && this.isContextual("static")) {
  134479. const lookahead2 = this.lookahead();
  134480. if (lookahead2.type !== types$12.colon && lookahead2.type !== types$12.question) {
  134481. this.next();
  134482. isStatic = true;
  134483. }
  134484. }
  134485. const variance = this.flowParseVariance();
  134486. if (this.eat(types$12.bracketL)) {
  134487. if (protoStart != null) {
  134488. this.unexpected(protoStart);
  134489. }
  134490. if (this.eat(types$12.bracketL)) {
  134491. if (variance) {
  134492. this.unexpected(variance.start);
  134493. }
  134494. nodeStart.internalSlots.push(this.flowParseObjectTypeInternalSlot(node, isStatic));
  134495. } else {
  134496. nodeStart.indexers.push(this.flowParseObjectTypeIndexer(node, isStatic, variance));
  134497. }
  134498. } else if (this.match(types$12.parenL) || this.isRelational("<")) {
  134499. if (protoStart != null) {
  134500. this.unexpected(protoStart);
  134501. }
  134502. if (variance) {
  134503. this.unexpected(variance.start);
  134504. }
  134505. nodeStart.callProperties.push(this.flowParseObjectTypeCallProperty(node, isStatic));
  134506. } else {
  134507. let kind = "init";
  134508. if (this.isContextual("get") || this.isContextual("set")) {
  134509. const lookahead2 = this.lookahead();
  134510. if (lookahead2.type === types$12.name || lookahead2.type === types$12.string || lookahead2.type === types$12.num) {
  134511. kind = this.state.value;
  134512. this.next();
  134513. }
  134514. }
  134515. const propOrInexact = this.flowParseObjectTypeProperty(node, isStatic, protoStart, variance, kind, allowSpread, allowInexact != null ? allowInexact : !exact);
  134516. if (propOrInexact === null) {
  134517. inexact = true;
  134518. inexactStart = this.state.lastTokStart;
  134519. } else {
  134520. nodeStart.properties.push(propOrInexact);
  134521. }
  134522. }
  134523. this.flowObjectTypeSemicolon();
  134524. if (inexactStart && !this.match(types$12.braceR) && !this.match(types$12.braceBarR)) {
  134525. this.raise(inexactStart, FlowErrors.UnexpectedExplicitInexactInObject);
  134526. }
  134527. }
  134528. this.expect(endDelim);
  134529. if (allowSpread) {
  134530. nodeStart.inexact = inexact;
  134531. }
  134532. const out = this.finishNode(nodeStart, "ObjectTypeAnnotation");
  134533. this.state.inType = oldInType;
  134534. return out;
  134535. }
  134536. flowParseObjectTypeProperty(node, isStatic, protoStart, variance, kind, allowSpread, allowInexact) {
  134537. if (this.eat(types$12.ellipsis)) {
  134538. const isInexactToken = this.match(types$12.comma) || this.match(types$12.semi) || this.match(types$12.braceR) || this.match(types$12.braceBarR);
  134539. if (isInexactToken) {
  134540. if (!allowSpread) {
  134541. this.raise(this.state.lastTokStart, FlowErrors.InexactInsideNonObject);
  134542. } else if (!allowInexact) {
  134543. this.raise(this.state.lastTokStart, FlowErrors.InexactInsideExact);
  134544. }
  134545. if (variance) {
  134546. this.raise(variance.start, FlowErrors.InexactVariance);
  134547. }
  134548. return null;
  134549. }
  134550. if (!allowSpread) {
  134551. this.raise(this.state.lastTokStart, FlowErrors.UnexpectedSpreadType);
  134552. }
  134553. if (protoStart != null) {
  134554. this.unexpected(protoStart);
  134555. }
  134556. if (variance) {
  134557. this.raise(variance.start, FlowErrors.SpreadVariance);
  134558. }
  134559. node.argument = this.flowParseType();
  134560. return this.finishNode(node, "ObjectTypeSpreadProperty");
  134561. } else {
  134562. node.key = this.flowParseObjectPropertyKey();
  134563. node.static = isStatic;
  134564. node.proto = protoStart != null;
  134565. node.kind = kind;
  134566. let optional = false;
  134567. if (this.isRelational("<") || this.match(types$12.parenL)) {
  134568. node.method = true;
  134569. if (protoStart != null) {
  134570. this.unexpected(protoStart);
  134571. }
  134572. if (variance) {
  134573. this.unexpected(variance.start);
  134574. }
  134575. node.value = this.flowParseObjectTypeMethodish(this.startNodeAt(node.start, node.loc.start));
  134576. if (kind === "get" || kind === "set") {
  134577. this.flowCheckGetterSetterParams(node);
  134578. }
  134579. if (!allowSpread && node.key.name === "constructor" && node.value.this) {
  134580. this.raise(node.value.this.start, FlowErrors.ThisParamBannedInConstructor);
  134581. }
  134582. } else {
  134583. if (kind !== "init")
  134584. this.unexpected();
  134585. node.method = false;
  134586. if (this.eat(types$12.question)) {
  134587. optional = true;
  134588. }
  134589. node.value = this.flowParseTypeInitialiser();
  134590. node.variance = variance;
  134591. }
  134592. node.optional = optional;
  134593. return this.finishNode(node, "ObjectTypeProperty");
  134594. }
  134595. }
  134596. flowCheckGetterSetterParams(property) {
  134597. const paramCount = property.kind === "get" ? 0 : 1;
  134598. const start3 = property.start;
  134599. const length = property.value.params.length + (property.value.rest ? 1 : 0);
  134600. if (property.value.this) {
  134601. this.raise(property.value.this.start, property.kind === "get" ? FlowErrors.GetterMayNotHaveThisParam : FlowErrors.SetterMayNotHaveThisParam);
  134602. }
  134603. if (length !== paramCount) {
  134604. if (property.kind === "get") {
  134605. this.raise(start3, ErrorMessages.BadGetterArity);
  134606. } else {
  134607. this.raise(start3, ErrorMessages.BadSetterArity);
  134608. }
  134609. }
  134610. if (property.kind === "set" && property.value.rest) {
  134611. this.raise(start3, ErrorMessages.BadSetterRestParameter);
  134612. }
  134613. }
  134614. flowObjectTypeSemicolon() {
  134615. if (!this.eat(types$12.semi) && !this.eat(types$12.comma) && !this.match(types$12.braceR) && !this.match(types$12.braceBarR)) {
  134616. this.unexpected();
  134617. }
  134618. }
  134619. flowParseQualifiedTypeIdentifier(startPos, startLoc, id) {
  134620. startPos = startPos || this.state.start;
  134621. startLoc = startLoc || this.state.startLoc;
  134622. let node = id || this.flowParseRestrictedIdentifier(true);
  134623. while (this.eat(types$12.dot)) {
  134624. const node2 = this.startNodeAt(startPos, startLoc);
  134625. node2.qualification = node;
  134626. node2.id = this.flowParseRestrictedIdentifier(true);
  134627. node = this.finishNode(node2, "QualifiedTypeIdentifier");
  134628. }
  134629. return node;
  134630. }
  134631. flowParseGenericType(startPos, startLoc, id) {
  134632. const node = this.startNodeAt(startPos, startLoc);
  134633. node.typeParameters = null;
  134634. node.id = this.flowParseQualifiedTypeIdentifier(startPos, startLoc, id);
  134635. if (this.isRelational("<")) {
  134636. node.typeParameters = this.flowParseTypeParameterInstantiation();
  134637. }
  134638. return this.finishNode(node, "GenericTypeAnnotation");
  134639. }
  134640. flowParseTypeofType() {
  134641. const node = this.startNode();
  134642. this.expect(types$12._typeof);
  134643. node.argument = this.flowParsePrimaryType();
  134644. return this.finishNode(node, "TypeofTypeAnnotation");
  134645. }
  134646. flowParseTupleType() {
  134647. const node = this.startNode();
  134648. node.types = [];
  134649. this.expect(types$12.bracketL);
  134650. while (this.state.pos < this.length && !this.match(types$12.bracketR)) {
  134651. node.types.push(this.flowParseType());
  134652. if (this.match(types$12.bracketR))
  134653. break;
  134654. this.expect(types$12.comma);
  134655. }
  134656. this.expect(types$12.bracketR);
  134657. return this.finishNode(node, "TupleTypeAnnotation");
  134658. }
  134659. flowParseFunctionTypeParam(first) {
  134660. let name2 = null;
  134661. let optional = false;
  134662. let typeAnnotation = null;
  134663. const node = this.startNode();
  134664. const lh = this.lookahead();
  134665. const isThis = this.state.type === types$12._this;
  134666. if (lh.type === types$12.colon || lh.type === types$12.question) {
  134667. if (isThis && !first) {
  134668. this.raise(node.start, FlowErrors.ThisParamMustBeFirst);
  134669. }
  134670. name2 = this.parseIdentifier(isThis);
  134671. if (this.eat(types$12.question)) {
  134672. optional = true;
  134673. if (isThis) {
  134674. this.raise(node.start, FlowErrors.ThisParamMayNotBeOptional);
  134675. }
  134676. }
  134677. typeAnnotation = this.flowParseTypeInitialiser();
  134678. } else {
  134679. typeAnnotation = this.flowParseType();
  134680. }
  134681. node.name = name2;
  134682. node.optional = optional;
  134683. node.typeAnnotation = typeAnnotation;
  134684. return this.finishNode(node, "FunctionTypeParam");
  134685. }
  134686. reinterpretTypeAsFunctionTypeParam(type) {
  134687. const node = this.startNodeAt(type.start, type.loc.start);
  134688. node.name = null;
  134689. node.optional = false;
  134690. node.typeAnnotation = type;
  134691. return this.finishNode(node, "FunctionTypeParam");
  134692. }
  134693. flowParseFunctionTypeParams(params = []) {
  134694. let rest = null;
  134695. let _this = null;
  134696. if (this.match(types$12._this)) {
  134697. _this = this.flowParseFunctionTypeParam(true);
  134698. _this.name = null;
  134699. if (!this.match(types$12.parenR)) {
  134700. this.expect(types$12.comma);
  134701. }
  134702. }
  134703. while (!this.match(types$12.parenR) && !this.match(types$12.ellipsis)) {
  134704. params.push(this.flowParseFunctionTypeParam(false));
  134705. if (!this.match(types$12.parenR)) {
  134706. this.expect(types$12.comma);
  134707. }
  134708. }
  134709. if (this.eat(types$12.ellipsis)) {
  134710. rest = this.flowParseFunctionTypeParam(false);
  134711. }
  134712. return {
  134713. params,
  134714. rest,
  134715. _this
  134716. };
  134717. }
  134718. flowIdentToTypeAnnotation(startPos, startLoc, node, id) {
  134719. switch (id.name) {
  134720. case "any":
  134721. return this.finishNode(node, "AnyTypeAnnotation");
  134722. case "bool":
  134723. case "boolean":
  134724. return this.finishNode(node, "BooleanTypeAnnotation");
  134725. case "mixed":
  134726. return this.finishNode(node, "MixedTypeAnnotation");
  134727. case "empty":
  134728. return this.finishNode(node, "EmptyTypeAnnotation");
  134729. case "number":
  134730. return this.finishNode(node, "NumberTypeAnnotation");
  134731. case "string":
  134732. return this.finishNode(node, "StringTypeAnnotation");
  134733. case "symbol":
  134734. return this.finishNode(node, "SymbolTypeAnnotation");
  134735. default:
  134736. this.checkNotUnderscore(id.name);
  134737. return this.flowParseGenericType(startPos, startLoc, id);
  134738. }
  134739. }
  134740. flowParsePrimaryType() {
  134741. const startPos = this.state.start;
  134742. const startLoc = this.state.startLoc;
  134743. const node = this.startNode();
  134744. let tmp;
  134745. let type;
  134746. let isGroupedType = false;
  134747. const oldNoAnonFunctionType = this.state.noAnonFunctionType;
  134748. switch (this.state.type) {
  134749. case types$12.name:
  134750. if (this.isContextual("interface")) {
  134751. return this.flowParseInterfaceType();
  134752. }
  134753. return this.flowIdentToTypeAnnotation(startPos, startLoc, node, this.parseIdentifier());
  134754. case types$12.braceL:
  134755. return this.flowParseObjectType({
  134756. allowStatic: false,
  134757. allowExact: false,
  134758. allowSpread: true,
  134759. allowProto: false,
  134760. allowInexact: true
  134761. });
  134762. case types$12.braceBarL:
  134763. return this.flowParseObjectType({
  134764. allowStatic: false,
  134765. allowExact: true,
  134766. allowSpread: true,
  134767. allowProto: false,
  134768. allowInexact: false
  134769. });
  134770. case types$12.bracketL:
  134771. this.state.noAnonFunctionType = false;
  134772. type = this.flowParseTupleType();
  134773. this.state.noAnonFunctionType = oldNoAnonFunctionType;
  134774. return type;
  134775. case types$12.relational:
  134776. if (this.state.value === "<") {
  134777. node.typeParameters = this.flowParseTypeParameterDeclaration();
  134778. this.expect(types$12.parenL);
  134779. tmp = this.flowParseFunctionTypeParams();
  134780. node.params = tmp.params;
  134781. node.rest = tmp.rest;
  134782. node.this = tmp._this;
  134783. this.expect(types$12.parenR);
  134784. this.expect(types$12.arrow);
  134785. node.returnType = this.flowParseType();
  134786. return this.finishNode(node, "FunctionTypeAnnotation");
  134787. }
  134788. break;
  134789. case types$12.parenL:
  134790. this.next();
  134791. if (!this.match(types$12.parenR) && !this.match(types$12.ellipsis)) {
  134792. if (this.match(types$12.name) || this.match(types$12._this)) {
  134793. const token = this.lookahead().type;
  134794. isGroupedType = token !== types$12.question && token !== types$12.colon;
  134795. } else {
  134796. isGroupedType = true;
  134797. }
  134798. }
  134799. if (isGroupedType) {
  134800. this.state.noAnonFunctionType = false;
  134801. type = this.flowParseType();
  134802. this.state.noAnonFunctionType = oldNoAnonFunctionType;
  134803. if (this.state.noAnonFunctionType || !(this.match(types$12.comma) || this.match(types$12.parenR) && this.lookahead().type === types$12.arrow)) {
  134804. this.expect(types$12.parenR);
  134805. return type;
  134806. } else {
  134807. this.eat(types$12.comma);
  134808. }
  134809. }
  134810. if (type) {
  134811. tmp = this.flowParseFunctionTypeParams([this.reinterpretTypeAsFunctionTypeParam(type)]);
  134812. } else {
  134813. tmp = this.flowParseFunctionTypeParams();
  134814. }
  134815. node.params = tmp.params;
  134816. node.rest = tmp.rest;
  134817. node.this = tmp._this;
  134818. this.expect(types$12.parenR);
  134819. this.expect(types$12.arrow);
  134820. node.returnType = this.flowParseType();
  134821. node.typeParameters = null;
  134822. return this.finishNode(node, "FunctionTypeAnnotation");
  134823. case types$12.string:
  134824. return this.parseLiteral(this.state.value, "StringLiteralTypeAnnotation");
  134825. case types$12._true:
  134826. case types$12._false:
  134827. node.value = this.match(types$12._true);
  134828. this.next();
  134829. return this.finishNode(node, "BooleanLiteralTypeAnnotation");
  134830. case types$12.plusMin:
  134831. if (this.state.value === "-") {
  134832. this.next();
  134833. if (this.match(types$12.num)) {
  134834. return this.parseLiteralAtNode(-this.state.value, "NumberLiteralTypeAnnotation", node);
  134835. }
  134836. if (this.match(types$12.bigint)) {
  134837. return this.parseLiteralAtNode(-this.state.value, "BigIntLiteralTypeAnnotation", node);
  134838. }
  134839. throw this.raise(this.state.start, FlowErrors.UnexpectedSubtractionOperand);
  134840. }
  134841. throw this.unexpected();
  134842. case types$12.num:
  134843. return this.parseLiteral(this.state.value, "NumberLiteralTypeAnnotation");
  134844. case types$12.bigint:
  134845. return this.parseLiteral(this.state.value, "BigIntLiteralTypeAnnotation");
  134846. case types$12._void:
  134847. this.next();
  134848. return this.finishNode(node, "VoidTypeAnnotation");
  134849. case types$12._null:
  134850. this.next();
  134851. return this.finishNode(node, "NullLiteralTypeAnnotation");
  134852. case types$12._this:
  134853. this.next();
  134854. return this.finishNode(node, "ThisTypeAnnotation");
  134855. case types$12.star:
  134856. this.next();
  134857. return this.finishNode(node, "ExistsTypeAnnotation");
  134858. default:
  134859. if (this.state.type.keyword === "typeof") {
  134860. return this.flowParseTypeofType();
  134861. } else if (this.state.type.keyword) {
  134862. const label = this.state.type.label;
  134863. this.next();
  134864. return super.createIdentifier(node, label);
  134865. }
  134866. }
  134867. throw this.unexpected();
  134868. }
  134869. flowParsePostfixType() {
  134870. const startPos = this.state.start;
  134871. const startLoc = this.state.startLoc;
  134872. let type = this.flowParsePrimaryType();
  134873. let seenOptionalIndexedAccess = false;
  134874. while ((this.match(types$12.bracketL) || this.match(types$12.questionDot)) && !this.canInsertSemicolon()) {
  134875. const node = this.startNodeAt(startPos, startLoc);
  134876. const optional = this.eat(types$12.questionDot);
  134877. seenOptionalIndexedAccess = seenOptionalIndexedAccess || optional;
  134878. this.expect(types$12.bracketL);
  134879. if (!optional && this.match(types$12.bracketR)) {
  134880. node.elementType = type;
  134881. this.next();
  134882. type = this.finishNode(node, "ArrayTypeAnnotation");
  134883. } else {
  134884. node.objectType = type;
  134885. node.indexType = this.flowParseType();
  134886. this.expect(types$12.bracketR);
  134887. if (seenOptionalIndexedAccess) {
  134888. node.optional = optional;
  134889. type = this.finishNode(node, "OptionalIndexedAccessType");
  134890. } else {
  134891. type = this.finishNode(node, "IndexedAccessType");
  134892. }
  134893. }
  134894. }
  134895. return type;
  134896. }
  134897. flowParsePrefixType() {
  134898. const node = this.startNode();
  134899. if (this.eat(types$12.question)) {
  134900. node.typeAnnotation = this.flowParsePrefixType();
  134901. return this.finishNode(node, "NullableTypeAnnotation");
  134902. } else {
  134903. return this.flowParsePostfixType();
  134904. }
  134905. }
  134906. flowParseAnonFunctionWithoutParens() {
  134907. const param = this.flowParsePrefixType();
  134908. if (!this.state.noAnonFunctionType && this.eat(types$12.arrow)) {
  134909. const node = this.startNodeAt(param.start, param.loc.start);
  134910. node.params = [this.reinterpretTypeAsFunctionTypeParam(param)];
  134911. node.rest = null;
  134912. node.this = null;
  134913. node.returnType = this.flowParseType();
  134914. node.typeParameters = null;
  134915. return this.finishNode(node, "FunctionTypeAnnotation");
  134916. }
  134917. return param;
  134918. }
  134919. flowParseIntersectionType() {
  134920. const node = this.startNode();
  134921. this.eat(types$12.bitwiseAND);
  134922. const type = this.flowParseAnonFunctionWithoutParens();
  134923. node.types = [type];
  134924. while (this.eat(types$12.bitwiseAND)) {
  134925. node.types.push(this.flowParseAnonFunctionWithoutParens());
  134926. }
  134927. return node.types.length === 1 ? type : this.finishNode(node, "IntersectionTypeAnnotation");
  134928. }
  134929. flowParseUnionType() {
  134930. const node = this.startNode();
  134931. this.eat(types$12.bitwiseOR);
  134932. const type = this.flowParseIntersectionType();
  134933. node.types = [type];
  134934. while (this.eat(types$12.bitwiseOR)) {
  134935. node.types.push(this.flowParseIntersectionType());
  134936. }
  134937. return node.types.length === 1 ? type : this.finishNode(node, "UnionTypeAnnotation");
  134938. }
  134939. flowParseType() {
  134940. const oldInType = this.state.inType;
  134941. this.state.inType = true;
  134942. const type = this.flowParseUnionType();
  134943. this.state.inType = oldInType;
  134944. return type;
  134945. }
  134946. flowParseTypeOrImplicitInstantiation() {
  134947. if (this.state.type === types$12.name && this.state.value === "_") {
  134948. const startPos = this.state.start;
  134949. const startLoc = this.state.startLoc;
  134950. const node = this.parseIdentifier();
  134951. return this.flowParseGenericType(startPos, startLoc, node);
  134952. } else {
  134953. return this.flowParseType();
  134954. }
  134955. }
  134956. flowParseTypeAnnotation() {
  134957. const node = this.startNode();
  134958. node.typeAnnotation = this.flowParseTypeInitialiser();
  134959. return this.finishNode(node, "TypeAnnotation");
  134960. }
  134961. flowParseTypeAnnotatableIdentifier(allowPrimitiveOverride) {
  134962. const ident = allowPrimitiveOverride ? this.parseIdentifier() : this.flowParseRestrictedIdentifier();
  134963. if (this.match(types$12.colon)) {
  134964. ident.typeAnnotation = this.flowParseTypeAnnotation();
  134965. this.resetEndLocation(ident);
  134966. }
  134967. return ident;
  134968. }
  134969. typeCastToParameter(node) {
  134970. node.expression.typeAnnotation = node.typeAnnotation;
  134971. this.resetEndLocation(node.expression, node.typeAnnotation.end, node.typeAnnotation.loc.end);
  134972. return node.expression;
  134973. }
  134974. flowParseVariance() {
  134975. let variance = null;
  134976. if (this.match(types$12.plusMin)) {
  134977. variance = this.startNode();
  134978. if (this.state.value === "+") {
  134979. variance.kind = "plus";
  134980. } else {
  134981. variance.kind = "minus";
  134982. }
  134983. this.next();
  134984. this.finishNode(variance, "Variance");
  134985. }
  134986. return variance;
  134987. }
  134988. parseFunctionBody(node, allowExpressionBody, isMethod = false) {
  134989. if (allowExpressionBody) {
  134990. return this.forwardNoArrowParamsConversionAt(node, () => super.parseFunctionBody(node, true, isMethod));
  134991. }
  134992. return super.parseFunctionBody(node, false, isMethod);
  134993. }
  134994. parseFunctionBodyAndFinish(node, type, isMethod = false) {
  134995. if (this.match(types$12.colon)) {
  134996. const typeNode = this.startNode();
  134997. [typeNode.typeAnnotation, node.predicate] = this.flowParseTypeAndPredicateInitialiser();
  134998. node.returnType = typeNode.typeAnnotation ? this.finishNode(typeNode, "TypeAnnotation") : null;
  134999. }
  135000. super.parseFunctionBodyAndFinish(node, type, isMethod);
  135001. }
  135002. parseStatement(context, topLevel) {
  135003. if (this.state.strict && this.match(types$12.name) && this.state.value === "interface") {
  135004. const lookahead2 = this.lookahead();
  135005. if (lookahead2.type === types$12.name || isKeyword(lookahead2.value)) {
  135006. const node = this.startNode();
  135007. this.next();
  135008. return this.flowParseInterface(node);
  135009. }
  135010. } else if (this.shouldParseEnums() && this.isContextual("enum")) {
  135011. const node = this.startNode();
  135012. this.next();
  135013. return this.flowParseEnumDeclaration(node);
  135014. }
  135015. const stmt = super.parseStatement(context, topLevel);
  135016. if (this.flowPragma === void 0 && !this.isValidDirective(stmt)) {
  135017. this.flowPragma = null;
  135018. }
  135019. return stmt;
  135020. }
  135021. parseExpressionStatement(node, expr) {
  135022. if (expr.type === "Identifier") {
  135023. if (expr.name === "declare") {
  135024. if (this.match(types$12._class) || this.match(types$12.name) || this.match(types$12._function) || this.match(types$12._var) || this.match(types$12._export)) {
  135025. return this.flowParseDeclare(node);
  135026. }
  135027. } else if (this.match(types$12.name)) {
  135028. if (expr.name === "interface") {
  135029. return this.flowParseInterface(node);
  135030. } else if (expr.name === "type") {
  135031. return this.flowParseTypeAlias(node);
  135032. } else if (expr.name === "opaque") {
  135033. return this.flowParseOpaqueType(node, false);
  135034. }
  135035. }
  135036. }
  135037. return super.parseExpressionStatement(node, expr);
  135038. }
  135039. shouldParseExportDeclaration() {
  135040. return this.isContextual("type") || this.isContextual("interface") || this.isContextual("opaque") || this.shouldParseEnums() && this.isContextual("enum") || super.shouldParseExportDeclaration();
  135041. }
  135042. isExportDefaultSpecifier() {
  135043. if (this.match(types$12.name) && (this.state.value === "type" || this.state.value === "interface" || this.state.value === "opaque" || this.shouldParseEnums() && this.state.value === "enum")) {
  135044. return false;
  135045. }
  135046. return super.isExportDefaultSpecifier();
  135047. }
  135048. parseExportDefaultExpression() {
  135049. if (this.shouldParseEnums() && this.isContextual("enum")) {
  135050. const node = this.startNode();
  135051. this.next();
  135052. return this.flowParseEnumDeclaration(node);
  135053. }
  135054. return super.parseExportDefaultExpression();
  135055. }
  135056. parseConditional(expr, startPos, startLoc, refNeedsArrowPos) {
  135057. if (!this.match(types$12.question))
  135058. return expr;
  135059. if (refNeedsArrowPos) {
  135060. const result = this.tryParse(() => super.parseConditional(expr, startPos, startLoc));
  135061. if (!result.node) {
  135062. refNeedsArrowPos.start = result.error.pos || this.state.start;
  135063. return expr;
  135064. }
  135065. if (result.error)
  135066. this.state = result.failState;
  135067. return result.node;
  135068. }
  135069. this.expect(types$12.question);
  135070. const state = this.state.clone();
  135071. const originalNoArrowAt = this.state.noArrowAt;
  135072. const node = this.startNodeAt(startPos, startLoc);
  135073. let {
  135074. consequent,
  135075. failed
  135076. } = this.tryParseConditionalConsequent();
  135077. let [valid2, invalid2] = this.getArrowLikeExpressions(consequent);
  135078. if (failed || invalid2.length > 0) {
  135079. const noArrowAt = [...originalNoArrowAt];
  135080. if (invalid2.length > 0) {
  135081. this.state = state;
  135082. this.state.noArrowAt = noArrowAt;
  135083. for (let i = 0; i < invalid2.length; i++) {
  135084. noArrowAt.push(invalid2[i].start);
  135085. }
  135086. ({
  135087. consequent,
  135088. failed
  135089. } = this.tryParseConditionalConsequent());
  135090. [valid2, invalid2] = this.getArrowLikeExpressions(consequent);
  135091. }
  135092. if (failed && valid2.length > 1) {
  135093. this.raise(state.start, FlowErrors.AmbiguousConditionalArrow);
  135094. }
  135095. if (failed && valid2.length === 1) {
  135096. this.state = state;
  135097. this.state.noArrowAt = noArrowAt.concat(valid2[0].start);
  135098. ({
  135099. consequent,
  135100. failed
  135101. } = this.tryParseConditionalConsequent());
  135102. }
  135103. }
  135104. this.getArrowLikeExpressions(consequent, true);
  135105. this.state.noArrowAt = originalNoArrowAt;
  135106. this.expect(types$12.colon);
  135107. node.test = expr;
  135108. node.consequent = consequent;
  135109. node.alternate = this.forwardNoArrowParamsConversionAt(node, () => this.parseMaybeAssign(void 0, void 0, void 0));
  135110. return this.finishNode(node, "ConditionalExpression");
  135111. }
  135112. tryParseConditionalConsequent() {
  135113. this.state.noArrowParamsConversionAt.push(this.state.start);
  135114. const consequent = this.parseMaybeAssignAllowIn();
  135115. const failed = !this.match(types$12.colon);
  135116. this.state.noArrowParamsConversionAt.pop();
  135117. return {
  135118. consequent,
  135119. failed
  135120. };
  135121. }
  135122. getArrowLikeExpressions(node, disallowInvalid) {
  135123. const stack = [node];
  135124. const arrows = [];
  135125. while (stack.length !== 0) {
  135126. const node2 = stack.pop();
  135127. if (node2.type === "ArrowFunctionExpression") {
  135128. if (node2.typeParameters || !node2.returnType) {
  135129. this.finishArrowValidation(node2);
  135130. } else {
  135131. arrows.push(node2);
  135132. }
  135133. stack.push(node2.body);
  135134. } else if (node2.type === "ConditionalExpression") {
  135135. stack.push(node2.consequent);
  135136. stack.push(node2.alternate);
  135137. }
  135138. }
  135139. if (disallowInvalid) {
  135140. arrows.forEach((node2) => this.finishArrowValidation(node2));
  135141. return [arrows, []];
  135142. }
  135143. return partition(arrows, (node2) => node2.params.every((param) => this.isAssignable(param, true)));
  135144. }
  135145. finishArrowValidation(node) {
  135146. var _node$extra;
  135147. this.toAssignableList(node.params, (_node$extra = node.extra) == null ? void 0 : _node$extra.trailingComma, false);
  135148. this.scope.enter(SCOPE_FUNCTION2 | SCOPE_ARROW2);
  135149. super.checkParams(node, false, true);
  135150. this.scope.exit();
  135151. }
  135152. forwardNoArrowParamsConversionAt(node, parse5) {
  135153. let result;
  135154. if (this.state.noArrowParamsConversionAt.indexOf(node.start) !== -1) {
  135155. this.state.noArrowParamsConversionAt.push(this.state.start);
  135156. result = parse5();
  135157. this.state.noArrowParamsConversionAt.pop();
  135158. } else {
  135159. result = parse5();
  135160. }
  135161. return result;
  135162. }
  135163. parseParenItem(node, startPos, startLoc) {
  135164. node = super.parseParenItem(node, startPos, startLoc);
  135165. if (this.eat(types$12.question)) {
  135166. node.optional = true;
  135167. this.resetEndLocation(node);
  135168. }
  135169. if (this.match(types$12.colon)) {
  135170. const typeCastNode = this.startNodeAt(startPos, startLoc);
  135171. typeCastNode.expression = node;
  135172. typeCastNode.typeAnnotation = this.flowParseTypeAnnotation();
  135173. return this.finishNode(typeCastNode, "TypeCastExpression");
  135174. }
  135175. return node;
  135176. }
  135177. assertModuleNodeAllowed(node) {
  135178. if (node.type === "ImportDeclaration" && (node.importKind === "type" || node.importKind === "typeof") || node.type === "ExportNamedDeclaration" && node.exportKind === "type" || node.type === "ExportAllDeclaration" && node.exportKind === "type") {
  135179. return;
  135180. }
  135181. super.assertModuleNodeAllowed(node);
  135182. }
  135183. parseExport(node) {
  135184. const decl = super.parseExport(node);
  135185. if (decl.type === "ExportNamedDeclaration" || decl.type === "ExportAllDeclaration") {
  135186. decl.exportKind = decl.exportKind || "value";
  135187. }
  135188. return decl;
  135189. }
  135190. parseExportDeclaration(node) {
  135191. if (this.isContextual("type")) {
  135192. node.exportKind = "type";
  135193. const declarationNode = this.startNode();
  135194. this.next();
  135195. if (this.match(types$12.braceL)) {
  135196. node.specifiers = this.parseExportSpecifiers();
  135197. this.parseExportFrom(node);
  135198. return null;
  135199. } else {
  135200. return this.flowParseTypeAlias(declarationNode);
  135201. }
  135202. } else if (this.isContextual("opaque")) {
  135203. node.exportKind = "type";
  135204. const declarationNode = this.startNode();
  135205. this.next();
  135206. return this.flowParseOpaqueType(declarationNode, false);
  135207. } else if (this.isContextual("interface")) {
  135208. node.exportKind = "type";
  135209. const declarationNode = this.startNode();
  135210. this.next();
  135211. return this.flowParseInterface(declarationNode);
  135212. } else if (this.shouldParseEnums() && this.isContextual("enum")) {
  135213. node.exportKind = "value";
  135214. const declarationNode = this.startNode();
  135215. this.next();
  135216. return this.flowParseEnumDeclaration(declarationNode);
  135217. } else {
  135218. return super.parseExportDeclaration(node);
  135219. }
  135220. }
  135221. eatExportStar(node) {
  135222. if (super.eatExportStar(...arguments))
  135223. return true;
  135224. if (this.isContextual("type") && this.lookahead().type === types$12.star) {
  135225. node.exportKind = "type";
  135226. this.next();
  135227. this.next();
  135228. return true;
  135229. }
  135230. return false;
  135231. }
  135232. maybeParseExportNamespaceSpecifier(node) {
  135233. const pos = this.state.start;
  135234. const hasNamespace = super.maybeParseExportNamespaceSpecifier(node);
  135235. if (hasNamespace && node.exportKind === "type") {
  135236. this.unexpected(pos);
  135237. }
  135238. return hasNamespace;
  135239. }
  135240. parseClassId(node, isStatement, optionalId) {
  135241. super.parseClassId(node, isStatement, optionalId);
  135242. if (this.isRelational("<")) {
  135243. node.typeParameters = this.flowParseTypeParameterDeclaration();
  135244. }
  135245. }
  135246. parseClassMember(classBody, member, state) {
  135247. const pos = this.state.start;
  135248. if (this.isContextual("declare")) {
  135249. if (this.parseClassMemberFromModifier(classBody, member)) {
  135250. return;
  135251. }
  135252. member.declare = true;
  135253. }
  135254. super.parseClassMember(classBody, member, state);
  135255. if (member.declare) {
  135256. if (member.type !== "ClassProperty" && member.type !== "ClassPrivateProperty" && member.type !== "PropertyDefinition") {
  135257. this.raise(pos, FlowErrors.DeclareClassElement);
  135258. } else if (member.value) {
  135259. this.raise(member.value.start, FlowErrors.DeclareClassFieldInitializer);
  135260. }
  135261. }
  135262. }
  135263. isIterator(word) {
  135264. return word === "iterator" || word === "asyncIterator";
  135265. }
  135266. readIterator() {
  135267. const word = super.readWord1();
  135268. const fullWord = "@@" + word;
  135269. if (!this.isIterator(word) || !this.state.inType) {
  135270. this.raise(this.state.pos, ErrorMessages.InvalidIdentifier, fullWord);
  135271. }
  135272. this.finishToken(types$12.name, fullWord);
  135273. }
  135274. getTokenFromCode(code2) {
  135275. const next = this.input.charCodeAt(this.state.pos + 1);
  135276. if (code2 === 123 && next === 124) {
  135277. return this.finishOp(types$12.braceBarL, 2);
  135278. } else if (this.state.inType && (code2 === 62 || code2 === 60)) {
  135279. return this.finishOp(types$12.relational, 1);
  135280. } else if (this.state.inType && code2 === 63) {
  135281. if (next === 46) {
  135282. return this.finishOp(types$12.questionDot, 2);
  135283. }
  135284. return this.finishOp(types$12.question, 1);
  135285. } else if (isIteratorStart(code2, next)) {
  135286. this.state.pos += 2;
  135287. return this.readIterator();
  135288. } else {
  135289. return super.getTokenFromCode(code2);
  135290. }
  135291. }
  135292. isAssignable(node, isBinding) {
  135293. switch (node.type) {
  135294. case "Identifier":
  135295. case "ObjectPattern":
  135296. case "ArrayPattern":
  135297. case "AssignmentPattern":
  135298. return true;
  135299. case "ObjectExpression": {
  135300. const last2 = node.properties.length - 1;
  135301. return node.properties.every((prop, i) => {
  135302. return prop.type !== "ObjectMethod" && (i === last2 || prop.type === "SpreadElement") && this.isAssignable(prop);
  135303. });
  135304. }
  135305. case "ObjectProperty":
  135306. return this.isAssignable(node.value);
  135307. case "SpreadElement":
  135308. return this.isAssignable(node.argument);
  135309. case "ArrayExpression":
  135310. return node.elements.every((element2) => this.isAssignable(element2));
  135311. case "AssignmentExpression":
  135312. return node.operator === "=";
  135313. case "ParenthesizedExpression":
  135314. case "TypeCastExpression":
  135315. return this.isAssignable(node.expression);
  135316. case "MemberExpression":
  135317. case "OptionalMemberExpression":
  135318. return !isBinding;
  135319. default:
  135320. return false;
  135321. }
  135322. }
  135323. toAssignable(node, isLHS = false) {
  135324. if (node.type === "TypeCastExpression") {
  135325. return super.toAssignable(this.typeCastToParameter(node), isLHS);
  135326. } else {
  135327. return super.toAssignable(node, isLHS);
  135328. }
  135329. }
  135330. toAssignableList(exprList, trailingCommaPos, isLHS) {
  135331. for (let i = 0; i < exprList.length; i++) {
  135332. const expr = exprList[i];
  135333. if ((expr == null ? void 0 : expr.type) === "TypeCastExpression") {
  135334. exprList[i] = this.typeCastToParameter(expr);
  135335. }
  135336. }
  135337. return super.toAssignableList(exprList, trailingCommaPos, isLHS);
  135338. }
  135339. toReferencedList(exprList, isParenthesizedExpr) {
  135340. for (let i = 0; i < exprList.length; i++) {
  135341. var _expr$extra;
  135342. const expr = exprList[i];
  135343. if (expr && expr.type === "TypeCastExpression" && !((_expr$extra = expr.extra) != null && _expr$extra.parenthesized) && (exprList.length > 1 || !isParenthesizedExpr)) {
  135344. this.raise(expr.typeAnnotation.start, FlowErrors.TypeCastInPattern);
  135345. }
  135346. }
  135347. return exprList;
  135348. }
  135349. parseArrayLike(close, canBePattern, isTuple, refExpressionErrors) {
  135350. const node = super.parseArrayLike(close, canBePattern, isTuple, refExpressionErrors);
  135351. if (canBePattern && !this.state.maybeInArrowParameters) {
  135352. this.toReferencedList(node.elements);
  135353. }
  135354. return node;
  135355. }
  135356. checkLVal(expr, ...args) {
  135357. if (expr.type !== "TypeCastExpression") {
  135358. return super.checkLVal(expr, ...args);
  135359. }
  135360. }
  135361. parseClassProperty(node) {
  135362. if (this.match(types$12.colon)) {
  135363. node.typeAnnotation = this.flowParseTypeAnnotation();
  135364. }
  135365. return super.parseClassProperty(node);
  135366. }
  135367. parseClassPrivateProperty(node) {
  135368. if (this.match(types$12.colon)) {
  135369. node.typeAnnotation = this.flowParseTypeAnnotation();
  135370. }
  135371. return super.parseClassPrivateProperty(node);
  135372. }
  135373. isClassMethod() {
  135374. return this.isRelational("<") || super.isClassMethod();
  135375. }
  135376. isClassProperty() {
  135377. return this.match(types$12.colon) || super.isClassProperty();
  135378. }
  135379. isNonstaticConstructor(method) {
  135380. return !this.match(types$12.colon) && super.isNonstaticConstructor(method);
  135381. }
  135382. pushClassMethod(classBody, method, isGenerator, isAsync, isConstructor, allowsDirectSuper) {
  135383. if (method.variance) {
  135384. this.unexpected(method.variance.start);
  135385. }
  135386. delete method.variance;
  135387. if (this.isRelational("<")) {
  135388. method.typeParameters = this.flowParseTypeParameterDeclaration();
  135389. }
  135390. super.pushClassMethod(classBody, method, isGenerator, isAsync, isConstructor, allowsDirectSuper);
  135391. if (method.params && isConstructor) {
  135392. const params = method.params;
  135393. if (params.length > 0 && this.isThisParam(params[0])) {
  135394. this.raise(method.start, FlowErrors.ThisParamBannedInConstructor);
  135395. }
  135396. } else if (method.type === "MethodDefinition" && isConstructor && method.value.params) {
  135397. const params = method.value.params;
  135398. if (params.length > 0 && this.isThisParam(params[0])) {
  135399. this.raise(method.start, FlowErrors.ThisParamBannedInConstructor);
  135400. }
  135401. }
  135402. }
  135403. pushClassPrivateMethod(classBody, method, isGenerator, isAsync) {
  135404. if (method.variance) {
  135405. this.unexpected(method.variance.start);
  135406. }
  135407. delete method.variance;
  135408. if (this.isRelational("<")) {
  135409. method.typeParameters = this.flowParseTypeParameterDeclaration();
  135410. }
  135411. super.pushClassPrivateMethod(classBody, method, isGenerator, isAsync);
  135412. }
  135413. parseClassSuper(node) {
  135414. super.parseClassSuper(node);
  135415. if (node.superClass && this.isRelational("<")) {
  135416. node.superTypeParameters = this.flowParseTypeParameterInstantiation();
  135417. }
  135418. if (this.isContextual("implements")) {
  135419. this.next();
  135420. const implemented = node.implements = [];
  135421. do {
  135422. const node2 = this.startNode();
  135423. node2.id = this.flowParseRestrictedIdentifier(true);
  135424. if (this.isRelational("<")) {
  135425. node2.typeParameters = this.flowParseTypeParameterInstantiation();
  135426. } else {
  135427. node2.typeParameters = null;
  135428. }
  135429. implemented.push(this.finishNode(node2, "ClassImplements"));
  135430. } while (this.eat(types$12.comma));
  135431. }
  135432. }
  135433. checkGetterSetterParams(method) {
  135434. super.checkGetterSetterParams(method);
  135435. const params = this.getObjectOrClassMethodParams(method);
  135436. if (params.length > 0) {
  135437. const param = params[0];
  135438. if (this.isThisParam(param) && method.kind === "get") {
  135439. this.raise(param.start, FlowErrors.GetterMayNotHaveThisParam);
  135440. } else if (this.isThisParam(param)) {
  135441. this.raise(param.start, FlowErrors.SetterMayNotHaveThisParam);
  135442. }
  135443. }
  135444. }
  135445. parsePropertyName(node, isPrivateNameAllowed) {
  135446. const variance = this.flowParseVariance();
  135447. const key = super.parsePropertyName(node, isPrivateNameAllowed);
  135448. node.variance = variance;
  135449. return key;
  135450. }
  135451. parseObjPropValue(prop, startPos, startLoc, isGenerator, isAsync, isPattern, isAccessor, refExpressionErrors) {
  135452. if (prop.variance) {
  135453. this.unexpected(prop.variance.start);
  135454. }
  135455. delete prop.variance;
  135456. let typeParameters;
  135457. if (this.isRelational("<") && !isAccessor) {
  135458. typeParameters = this.flowParseTypeParameterDeclaration();
  135459. if (!this.match(types$12.parenL))
  135460. this.unexpected();
  135461. }
  135462. super.parseObjPropValue(prop, startPos, startLoc, isGenerator, isAsync, isPattern, isAccessor, refExpressionErrors);
  135463. if (typeParameters) {
  135464. (prop.value || prop).typeParameters = typeParameters;
  135465. }
  135466. }
  135467. parseAssignableListItemTypes(param) {
  135468. if (this.eat(types$12.question)) {
  135469. if (param.type !== "Identifier") {
  135470. this.raise(param.start, FlowErrors.OptionalBindingPattern);
  135471. }
  135472. if (this.isThisParam(param)) {
  135473. this.raise(param.start, FlowErrors.ThisParamMayNotBeOptional);
  135474. }
  135475. param.optional = true;
  135476. }
  135477. if (this.match(types$12.colon)) {
  135478. param.typeAnnotation = this.flowParseTypeAnnotation();
  135479. } else if (this.isThisParam(param)) {
  135480. this.raise(param.start, FlowErrors.ThisParamAnnotationRequired);
  135481. }
  135482. if (this.match(types$12.eq) && this.isThisParam(param)) {
  135483. this.raise(param.start, FlowErrors.ThisParamNoDefault);
  135484. }
  135485. this.resetEndLocation(param);
  135486. return param;
  135487. }
  135488. parseMaybeDefault(startPos, startLoc, left) {
  135489. const node = super.parseMaybeDefault(startPos, startLoc, left);
  135490. if (node.type === "AssignmentPattern" && node.typeAnnotation && node.right.start < node.typeAnnotation.start) {
  135491. this.raise(node.typeAnnotation.start, FlowErrors.TypeBeforeInitializer);
  135492. }
  135493. return node;
  135494. }
  135495. shouldParseDefaultImport(node) {
  135496. if (!hasTypeImportKind(node)) {
  135497. return super.shouldParseDefaultImport(node);
  135498. }
  135499. return isMaybeDefaultImport(this.state);
  135500. }
  135501. parseImportSpecifierLocal(node, specifier, type, contextDescription) {
  135502. specifier.local = hasTypeImportKind(node) ? this.flowParseRestrictedIdentifier(true, true) : this.parseIdentifier();
  135503. this.checkLVal(specifier.local, contextDescription, BIND_LEXICAL2);
  135504. node.specifiers.push(this.finishNode(specifier, type));
  135505. }
  135506. maybeParseDefaultImportSpecifier(node) {
  135507. node.importKind = "value";
  135508. let kind = null;
  135509. if (this.match(types$12._typeof)) {
  135510. kind = "typeof";
  135511. } else if (this.isContextual("type")) {
  135512. kind = "type";
  135513. }
  135514. if (kind) {
  135515. const lh = this.lookahead();
  135516. if (kind === "type" && lh.type === types$12.star) {
  135517. this.unexpected(lh.start);
  135518. }
  135519. if (isMaybeDefaultImport(lh) || lh.type === types$12.braceL || lh.type === types$12.star) {
  135520. this.next();
  135521. node.importKind = kind;
  135522. }
  135523. }
  135524. return super.maybeParseDefaultImportSpecifier(node);
  135525. }
  135526. parseImportSpecifier(node) {
  135527. const specifier = this.startNode();
  135528. const firstIdentIsString = this.match(types$12.string);
  135529. const firstIdent = this.parseModuleExportName();
  135530. let specifierTypeKind = null;
  135531. if (firstIdent.type === "Identifier") {
  135532. if (firstIdent.name === "type") {
  135533. specifierTypeKind = "type";
  135534. } else if (firstIdent.name === "typeof") {
  135535. specifierTypeKind = "typeof";
  135536. }
  135537. }
  135538. let isBinding = false;
  135539. if (this.isContextual("as") && !this.isLookaheadContextual("as")) {
  135540. const as_ident = this.parseIdentifier(true);
  135541. if (specifierTypeKind !== null && !this.match(types$12.name) && !this.state.type.keyword) {
  135542. specifier.imported = as_ident;
  135543. specifier.importKind = specifierTypeKind;
  135544. specifier.local = as_ident.__clone();
  135545. } else {
  135546. specifier.imported = firstIdent;
  135547. specifier.importKind = null;
  135548. specifier.local = this.parseIdentifier();
  135549. }
  135550. } else if (specifierTypeKind !== null && (this.match(types$12.name) || this.state.type.keyword)) {
  135551. specifier.imported = this.parseIdentifier(true);
  135552. specifier.importKind = specifierTypeKind;
  135553. if (this.eatContextual("as")) {
  135554. specifier.local = this.parseIdentifier();
  135555. } else {
  135556. isBinding = true;
  135557. specifier.local = specifier.imported.__clone();
  135558. }
  135559. } else {
  135560. if (firstIdentIsString) {
  135561. throw this.raise(specifier.start, ErrorMessages.ImportBindingIsString, firstIdent.value);
  135562. }
  135563. isBinding = true;
  135564. specifier.imported = firstIdent;
  135565. specifier.importKind = null;
  135566. specifier.local = specifier.imported.__clone();
  135567. }
  135568. const nodeIsTypeImport = hasTypeImportKind(node);
  135569. const specifierIsTypeImport = hasTypeImportKind(specifier);
  135570. if (nodeIsTypeImport && specifierIsTypeImport) {
  135571. this.raise(specifier.start, FlowErrors.ImportTypeShorthandOnlyInPureImport);
  135572. }
  135573. if (nodeIsTypeImport || specifierIsTypeImport) {
  135574. this.checkReservedType(specifier.local.name, specifier.local.start, true);
  135575. }
  135576. if (isBinding && !nodeIsTypeImport && !specifierIsTypeImport) {
  135577. this.checkReservedWord(specifier.local.name, specifier.start, true, true);
  135578. }
  135579. this.checkLVal(specifier.local, "import specifier", BIND_LEXICAL2);
  135580. node.specifiers.push(this.finishNode(specifier, "ImportSpecifier"));
  135581. }
  135582. parseBindingAtom() {
  135583. switch (this.state.type) {
  135584. case types$12._this:
  135585. return this.parseIdentifier(true);
  135586. default:
  135587. return super.parseBindingAtom();
  135588. }
  135589. }
  135590. parseFunctionParams(node, allowModifiers) {
  135591. const kind = node.kind;
  135592. if (kind !== "get" && kind !== "set" && this.isRelational("<")) {
  135593. node.typeParameters = this.flowParseTypeParameterDeclaration();
  135594. }
  135595. super.parseFunctionParams(node, allowModifiers);
  135596. }
  135597. parseVarId(decl, kind) {
  135598. super.parseVarId(decl, kind);
  135599. if (this.match(types$12.colon)) {
  135600. decl.id.typeAnnotation = this.flowParseTypeAnnotation();
  135601. this.resetEndLocation(decl.id);
  135602. }
  135603. }
  135604. parseAsyncArrowFromCallExpression(node, call) {
  135605. if (this.match(types$12.colon)) {
  135606. const oldNoAnonFunctionType = this.state.noAnonFunctionType;
  135607. this.state.noAnonFunctionType = true;
  135608. node.returnType = this.flowParseTypeAnnotation();
  135609. this.state.noAnonFunctionType = oldNoAnonFunctionType;
  135610. }
  135611. return super.parseAsyncArrowFromCallExpression(node, call);
  135612. }
  135613. shouldParseAsyncArrow() {
  135614. return this.match(types$12.colon) || super.shouldParseAsyncArrow();
  135615. }
  135616. parseMaybeAssign(refExpressionErrors, afterLeftParse, refNeedsArrowPos) {
  135617. var _jsx;
  135618. let state = null;
  135619. let jsx2;
  135620. if (this.hasPlugin("jsx") && (this.match(types$12.jsxTagStart) || this.isRelational("<"))) {
  135621. state = this.state.clone();
  135622. jsx2 = this.tryParse(() => super.parseMaybeAssign(refExpressionErrors, afterLeftParse, refNeedsArrowPos), state);
  135623. if (!jsx2.error)
  135624. return jsx2.node;
  135625. const {
  135626. context
  135627. } = this.state;
  135628. if (context[context.length - 1] === types2.j_oTag) {
  135629. context.length -= 2;
  135630. } else if (context[context.length - 1] === types2.j_expr) {
  135631. context.length -= 1;
  135632. }
  135633. }
  135634. if ((_jsx = jsx2) != null && _jsx.error || this.isRelational("<")) {
  135635. var _jsx2, _jsx3;
  135636. state = state || this.state.clone();
  135637. let typeParameters;
  135638. const arrow = this.tryParse((abort) => {
  135639. var _arrowExpression$extr;
  135640. typeParameters = this.flowParseTypeParameterDeclaration();
  135641. const arrowExpression2 = this.forwardNoArrowParamsConversionAt(typeParameters, () => {
  135642. const result = super.parseMaybeAssign(refExpressionErrors, afterLeftParse, refNeedsArrowPos);
  135643. this.resetStartLocationFromNode(result, typeParameters);
  135644. return result;
  135645. });
  135646. if (arrowExpression2.type !== "ArrowFunctionExpression" && (_arrowExpression$extr = arrowExpression2.extra) != null && _arrowExpression$extr.parenthesized) {
  135647. abort();
  135648. }
  135649. const expr = this.maybeUnwrapTypeCastExpression(arrowExpression2);
  135650. expr.typeParameters = typeParameters;
  135651. this.resetStartLocationFromNode(expr, typeParameters);
  135652. return arrowExpression2;
  135653. }, state);
  135654. let arrowExpression = null;
  135655. if (arrow.node && this.maybeUnwrapTypeCastExpression(arrow.node).type === "ArrowFunctionExpression") {
  135656. if (!arrow.error && !arrow.aborted) {
  135657. if (arrow.node.async) {
  135658. this.raise(typeParameters.start, FlowErrors.UnexpectedTypeParameterBeforeAsyncArrowFunction);
  135659. }
  135660. return arrow.node;
  135661. }
  135662. arrowExpression = arrow.node;
  135663. }
  135664. if ((_jsx2 = jsx2) != null && _jsx2.node) {
  135665. this.state = jsx2.failState;
  135666. return jsx2.node;
  135667. }
  135668. if (arrowExpression) {
  135669. this.state = arrow.failState;
  135670. return arrowExpression;
  135671. }
  135672. if ((_jsx3 = jsx2) != null && _jsx3.thrown)
  135673. throw jsx2.error;
  135674. if (arrow.thrown)
  135675. throw arrow.error;
  135676. throw this.raise(typeParameters.start, FlowErrors.UnexpectedTokenAfterTypeParameter);
  135677. }
  135678. return super.parseMaybeAssign(refExpressionErrors, afterLeftParse, refNeedsArrowPos);
  135679. }
  135680. parseArrow(node) {
  135681. if (this.match(types$12.colon)) {
  135682. const result = this.tryParse(() => {
  135683. const oldNoAnonFunctionType = this.state.noAnonFunctionType;
  135684. this.state.noAnonFunctionType = true;
  135685. const typeNode = this.startNode();
  135686. [typeNode.typeAnnotation, node.predicate] = this.flowParseTypeAndPredicateInitialiser();
  135687. this.state.noAnonFunctionType = oldNoAnonFunctionType;
  135688. if (this.canInsertSemicolon())
  135689. this.unexpected();
  135690. if (!this.match(types$12.arrow))
  135691. this.unexpected();
  135692. return typeNode;
  135693. });
  135694. if (result.thrown)
  135695. return null;
  135696. if (result.error)
  135697. this.state = result.failState;
  135698. node.returnType = result.node.typeAnnotation ? this.finishNode(result.node, "TypeAnnotation") : null;
  135699. }
  135700. return super.parseArrow(node);
  135701. }
  135702. shouldParseArrow() {
  135703. return this.match(types$12.colon) || super.shouldParseArrow();
  135704. }
  135705. setArrowFunctionParameters(node, params) {
  135706. if (this.state.noArrowParamsConversionAt.indexOf(node.start) !== -1) {
  135707. node.params = params;
  135708. } else {
  135709. super.setArrowFunctionParameters(node, params);
  135710. }
  135711. }
  135712. checkParams(node, allowDuplicates, isArrowFunction) {
  135713. if (isArrowFunction && this.state.noArrowParamsConversionAt.indexOf(node.start) !== -1) {
  135714. return;
  135715. }
  135716. for (let i = 0; i < node.params.length; i++) {
  135717. if (this.isThisParam(node.params[i]) && i > 0) {
  135718. this.raise(node.params[i].start, FlowErrors.ThisParamMustBeFirst);
  135719. }
  135720. }
  135721. return super.checkParams(...arguments);
  135722. }
  135723. parseParenAndDistinguishExpression(canBeArrow) {
  135724. return super.parseParenAndDistinguishExpression(canBeArrow && this.state.noArrowAt.indexOf(this.state.start) === -1);
  135725. }
  135726. parseSubscripts(base2, startPos, startLoc, noCalls) {
  135727. if (base2.type === "Identifier" && base2.name === "async" && this.state.noArrowAt.indexOf(startPos) !== -1) {
  135728. this.next();
  135729. const node = this.startNodeAt(startPos, startLoc);
  135730. node.callee = base2;
  135731. node.arguments = this.parseCallExpressionArguments(types$12.parenR, false);
  135732. base2 = this.finishNode(node, "CallExpression");
  135733. } else if (base2.type === "Identifier" && base2.name === "async" && this.isRelational("<")) {
  135734. const state = this.state.clone();
  135735. const arrow = this.tryParse((abort) => this.parseAsyncArrowWithTypeParameters(startPos, startLoc) || abort(), state);
  135736. if (!arrow.error && !arrow.aborted)
  135737. return arrow.node;
  135738. const result = this.tryParse(() => super.parseSubscripts(base2, startPos, startLoc, noCalls), state);
  135739. if (result.node && !result.error)
  135740. return result.node;
  135741. if (arrow.node) {
  135742. this.state = arrow.failState;
  135743. return arrow.node;
  135744. }
  135745. if (result.node) {
  135746. this.state = result.failState;
  135747. return result.node;
  135748. }
  135749. throw arrow.error || result.error;
  135750. }
  135751. return super.parseSubscripts(base2, startPos, startLoc, noCalls);
  135752. }
  135753. parseSubscript(base2, startPos, startLoc, noCalls, subscriptState) {
  135754. if (this.match(types$12.questionDot) && this.isLookaheadToken_lt()) {
  135755. subscriptState.optionalChainMember = true;
  135756. if (noCalls) {
  135757. subscriptState.stop = true;
  135758. return base2;
  135759. }
  135760. this.next();
  135761. const node = this.startNodeAt(startPos, startLoc);
  135762. node.callee = base2;
  135763. node.typeArguments = this.flowParseTypeParameterInstantiation();
  135764. this.expect(types$12.parenL);
  135765. node.arguments = this.parseCallExpressionArguments(types$12.parenR, false);
  135766. node.optional = true;
  135767. return this.finishCallExpression(node, true);
  135768. } else if (!noCalls && this.shouldParseTypes() && this.isRelational("<")) {
  135769. const node = this.startNodeAt(startPos, startLoc);
  135770. node.callee = base2;
  135771. const result = this.tryParse(() => {
  135772. node.typeArguments = this.flowParseTypeParameterInstantiationCallOrNew();
  135773. this.expect(types$12.parenL);
  135774. node.arguments = this.parseCallExpressionArguments(types$12.parenR, false);
  135775. if (subscriptState.optionalChainMember)
  135776. node.optional = false;
  135777. return this.finishCallExpression(node, subscriptState.optionalChainMember);
  135778. });
  135779. if (result.node) {
  135780. if (result.error)
  135781. this.state = result.failState;
  135782. return result.node;
  135783. }
  135784. }
  135785. return super.parseSubscript(base2, startPos, startLoc, noCalls, subscriptState);
  135786. }
  135787. parseNewArguments(node) {
  135788. let targs = null;
  135789. if (this.shouldParseTypes() && this.isRelational("<")) {
  135790. targs = this.tryParse(() => this.flowParseTypeParameterInstantiationCallOrNew()).node;
  135791. }
  135792. node.typeArguments = targs;
  135793. super.parseNewArguments(node);
  135794. }
  135795. parseAsyncArrowWithTypeParameters(startPos, startLoc) {
  135796. const node = this.startNodeAt(startPos, startLoc);
  135797. this.parseFunctionParams(node);
  135798. if (!this.parseArrow(node))
  135799. return;
  135800. return this.parseArrowExpression(node, void 0, true);
  135801. }
  135802. readToken_mult_modulo(code2) {
  135803. const next = this.input.charCodeAt(this.state.pos + 1);
  135804. if (code2 === 42 && next === 47 && this.state.hasFlowComment) {
  135805. this.state.hasFlowComment = false;
  135806. this.state.pos += 2;
  135807. this.nextToken();
  135808. return;
  135809. }
  135810. super.readToken_mult_modulo(code2);
  135811. }
  135812. readToken_pipe_amp(code2) {
  135813. const next = this.input.charCodeAt(this.state.pos + 1);
  135814. if (code2 === 124 && next === 125) {
  135815. this.finishOp(types$12.braceBarR, 2);
  135816. return;
  135817. }
  135818. super.readToken_pipe_amp(code2);
  135819. }
  135820. parseTopLevel(file, program) {
  135821. const fileNode = super.parseTopLevel(file, program);
  135822. if (this.state.hasFlowComment) {
  135823. this.raise(this.state.pos, FlowErrors.UnterminatedFlowComment);
  135824. }
  135825. return fileNode;
  135826. }
  135827. skipBlockComment() {
  135828. if (this.hasPlugin("flowComments") && this.skipFlowComment()) {
  135829. if (this.state.hasFlowComment) {
  135830. this.unexpected(null, FlowErrors.NestedFlowComment);
  135831. }
  135832. this.hasFlowCommentCompletion();
  135833. this.state.pos += this.skipFlowComment();
  135834. this.state.hasFlowComment = true;
  135835. return;
  135836. }
  135837. if (this.state.hasFlowComment) {
  135838. const end = this.input.indexOf("*-/", this.state.pos += 2);
  135839. if (end === -1) {
  135840. throw this.raise(this.state.pos - 2, ErrorMessages.UnterminatedComment);
  135841. }
  135842. this.state.pos = end + 3;
  135843. return;
  135844. }
  135845. super.skipBlockComment();
  135846. }
  135847. skipFlowComment() {
  135848. const {
  135849. pos
  135850. } = this.state;
  135851. let shiftToFirstNonWhiteSpace = 2;
  135852. while ([32, 9].includes(this.input.charCodeAt(pos + shiftToFirstNonWhiteSpace))) {
  135853. shiftToFirstNonWhiteSpace++;
  135854. }
  135855. const ch2 = this.input.charCodeAt(shiftToFirstNonWhiteSpace + pos);
  135856. const ch3 = this.input.charCodeAt(shiftToFirstNonWhiteSpace + pos + 1);
  135857. if (ch2 === 58 && ch3 === 58) {
  135858. return shiftToFirstNonWhiteSpace + 2;
  135859. }
  135860. if (this.input.slice(shiftToFirstNonWhiteSpace + pos, shiftToFirstNonWhiteSpace + pos + 12) === "flow-include") {
  135861. return shiftToFirstNonWhiteSpace + 12;
  135862. }
  135863. if (ch2 === 58 && ch3 !== 58) {
  135864. return shiftToFirstNonWhiteSpace;
  135865. }
  135866. return false;
  135867. }
  135868. hasFlowCommentCompletion() {
  135869. const end = this.input.indexOf("*/", this.state.pos);
  135870. if (end === -1) {
  135871. throw this.raise(this.state.pos, ErrorMessages.UnterminatedComment);
  135872. }
  135873. }
  135874. flowEnumErrorBooleanMemberNotInitialized(pos, {
  135875. enumName,
  135876. memberName
  135877. }) {
  135878. this.raise(pos, FlowErrors.EnumBooleanMemberNotInitialized, memberName, enumName);
  135879. }
  135880. flowEnumErrorInvalidMemberName(pos, {
  135881. enumName,
  135882. memberName
  135883. }) {
  135884. const suggestion = memberName[0].toUpperCase() + memberName.slice(1);
  135885. this.raise(pos, FlowErrors.EnumInvalidMemberName, memberName, suggestion, enumName);
  135886. }
  135887. flowEnumErrorDuplicateMemberName(pos, {
  135888. enumName,
  135889. memberName
  135890. }) {
  135891. this.raise(pos, FlowErrors.EnumDuplicateMemberName, memberName, enumName);
  135892. }
  135893. flowEnumErrorInconsistentMemberValues(pos, {
  135894. enumName
  135895. }) {
  135896. this.raise(pos, FlowErrors.EnumInconsistentMemberValues, enumName);
  135897. }
  135898. flowEnumErrorInvalidExplicitType(pos, {
  135899. enumName,
  135900. suppliedType
  135901. }) {
  135902. return this.raise(pos, suppliedType === null ? FlowErrors.EnumInvalidExplicitTypeUnknownSupplied : FlowErrors.EnumInvalidExplicitType, enumName, suppliedType);
  135903. }
  135904. flowEnumErrorInvalidMemberInitializer(pos, {
  135905. enumName,
  135906. explicitType,
  135907. memberName
  135908. }) {
  135909. let message = null;
  135910. switch (explicitType) {
  135911. case "boolean":
  135912. case "number":
  135913. case "string":
  135914. message = FlowErrors.EnumInvalidMemberInitializerPrimaryType;
  135915. break;
  135916. case "symbol":
  135917. message = FlowErrors.EnumInvalidMemberInitializerSymbolType;
  135918. break;
  135919. default:
  135920. message = FlowErrors.EnumInvalidMemberInitializerUnknownType;
  135921. }
  135922. return this.raise(pos, message, enumName, memberName, explicitType);
  135923. }
  135924. flowEnumErrorNumberMemberNotInitialized(pos, {
  135925. enumName,
  135926. memberName
  135927. }) {
  135928. this.raise(pos, FlowErrors.EnumNumberMemberNotInitialized, enumName, memberName);
  135929. }
  135930. flowEnumErrorStringMemberInconsistentlyInitailized(pos, {
  135931. enumName
  135932. }) {
  135933. this.raise(pos, FlowErrors.EnumStringMemberInconsistentlyInitailized, enumName);
  135934. }
  135935. flowEnumMemberInit() {
  135936. const startPos = this.state.start;
  135937. const endOfInit = () => this.match(types$12.comma) || this.match(types$12.braceR);
  135938. switch (this.state.type) {
  135939. case types$12.num: {
  135940. const literal2 = this.parseNumericLiteral(this.state.value);
  135941. if (endOfInit()) {
  135942. return {
  135943. type: "number",
  135944. pos: literal2.start,
  135945. value: literal2
  135946. };
  135947. }
  135948. return {
  135949. type: "invalid",
  135950. pos: startPos
  135951. };
  135952. }
  135953. case types$12.string: {
  135954. const literal2 = this.parseStringLiteral(this.state.value);
  135955. if (endOfInit()) {
  135956. return {
  135957. type: "string",
  135958. pos: literal2.start,
  135959. value: literal2
  135960. };
  135961. }
  135962. return {
  135963. type: "invalid",
  135964. pos: startPos
  135965. };
  135966. }
  135967. case types$12._true:
  135968. case types$12._false: {
  135969. const literal2 = this.parseBooleanLiteral(this.match(types$12._true));
  135970. if (endOfInit()) {
  135971. return {
  135972. type: "boolean",
  135973. pos: literal2.start,
  135974. value: literal2
  135975. };
  135976. }
  135977. return {
  135978. type: "invalid",
  135979. pos: startPos
  135980. };
  135981. }
  135982. default:
  135983. return {
  135984. type: "invalid",
  135985. pos: startPos
  135986. };
  135987. }
  135988. }
  135989. flowEnumMemberRaw() {
  135990. const pos = this.state.start;
  135991. const id = this.parseIdentifier(true);
  135992. const init = this.eat(types$12.eq) ? this.flowEnumMemberInit() : {
  135993. type: "none",
  135994. pos
  135995. };
  135996. return {
  135997. id,
  135998. init
  135999. };
  136000. }
  136001. flowEnumCheckExplicitTypeMismatch(pos, context, expectedType) {
  136002. const {
  136003. explicitType
  136004. } = context;
  136005. if (explicitType === null) {
  136006. return;
  136007. }
  136008. if (explicitType !== expectedType) {
  136009. this.flowEnumErrorInvalidMemberInitializer(pos, context);
  136010. }
  136011. }
  136012. flowEnumMembers({
  136013. enumName,
  136014. explicitType
  136015. }) {
  136016. const seenNames = /* @__PURE__ */ new Set();
  136017. const members = {
  136018. booleanMembers: [],
  136019. numberMembers: [],
  136020. stringMembers: [],
  136021. defaultedMembers: []
  136022. };
  136023. let hasUnknownMembers = false;
  136024. while (!this.match(types$12.braceR)) {
  136025. if (this.eat(types$12.ellipsis)) {
  136026. hasUnknownMembers = true;
  136027. break;
  136028. }
  136029. const memberNode = this.startNode();
  136030. const {
  136031. id,
  136032. init
  136033. } = this.flowEnumMemberRaw();
  136034. const memberName = id.name;
  136035. if (memberName === "") {
  136036. continue;
  136037. }
  136038. if (/^[a-z]/.test(memberName)) {
  136039. this.flowEnumErrorInvalidMemberName(id.start, {
  136040. enumName,
  136041. memberName
  136042. });
  136043. }
  136044. if (seenNames.has(memberName)) {
  136045. this.flowEnumErrorDuplicateMemberName(id.start, {
  136046. enumName,
  136047. memberName
  136048. });
  136049. }
  136050. seenNames.add(memberName);
  136051. const context = {
  136052. enumName,
  136053. explicitType,
  136054. memberName
  136055. };
  136056. memberNode.id = id;
  136057. switch (init.type) {
  136058. case "boolean": {
  136059. this.flowEnumCheckExplicitTypeMismatch(init.pos, context, "boolean");
  136060. memberNode.init = init.value;
  136061. members.booleanMembers.push(this.finishNode(memberNode, "EnumBooleanMember"));
  136062. break;
  136063. }
  136064. case "number": {
  136065. this.flowEnumCheckExplicitTypeMismatch(init.pos, context, "number");
  136066. memberNode.init = init.value;
  136067. members.numberMembers.push(this.finishNode(memberNode, "EnumNumberMember"));
  136068. break;
  136069. }
  136070. case "string": {
  136071. this.flowEnumCheckExplicitTypeMismatch(init.pos, context, "string");
  136072. memberNode.init = init.value;
  136073. members.stringMembers.push(this.finishNode(memberNode, "EnumStringMember"));
  136074. break;
  136075. }
  136076. case "invalid": {
  136077. throw this.flowEnumErrorInvalidMemberInitializer(init.pos, context);
  136078. }
  136079. case "none": {
  136080. switch (explicitType) {
  136081. case "boolean":
  136082. this.flowEnumErrorBooleanMemberNotInitialized(init.pos, context);
  136083. break;
  136084. case "number":
  136085. this.flowEnumErrorNumberMemberNotInitialized(init.pos, context);
  136086. break;
  136087. default:
  136088. members.defaultedMembers.push(this.finishNode(memberNode, "EnumDefaultedMember"));
  136089. }
  136090. }
  136091. }
  136092. if (!this.match(types$12.braceR)) {
  136093. this.expect(types$12.comma);
  136094. }
  136095. }
  136096. return {
  136097. members,
  136098. hasUnknownMembers
  136099. };
  136100. }
  136101. flowEnumStringMembers(initializedMembers, defaultedMembers, {
  136102. enumName
  136103. }) {
  136104. if (initializedMembers.length === 0) {
  136105. return defaultedMembers;
  136106. } else if (defaultedMembers.length === 0) {
  136107. return initializedMembers;
  136108. } else if (defaultedMembers.length > initializedMembers.length) {
  136109. for (const member of initializedMembers) {
  136110. this.flowEnumErrorStringMemberInconsistentlyInitailized(member.start, {
  136111. enumName
  136112. });
  136113. }
  136114. return defaultedMembers;
  136115. } else {
  136116. for (const member of defaultedMembers) {
  136117. this.flowEnumErrorStringMemberInconsistentlyInitailized(member.start, {
  136118. enumName
  136119. });
  136120. }
  136121. return initializedMembers;
  136122. }
  136123. }
  136124. flowEnumParseExplicitType({
  136125. enumName
  136126. }) {
  136127. if (this.eatContextual("of")) {
  136128. if (!this.match(types$12.name)) {
  136129. throw this.flowEnumErrorInvalidExplicitType(this.state.start, {
  136130. enumName,
  136131. suppliedType: null
  136132. });
  136133. }
  136134. const {
  136135. value
  136136. } = this.state;
  136137. this.next();
  136138. if (value !== "boolean" && value !== "number" && value !== "string" && value !== "symbol") {
  136139. this.flowEnumErrorInvalidExplicitType(this.state.start, {
  136140. enumName,
  136141. suppliedType: value
  136142. });
  136143. }
  136144. return value;
  136145. }
  136146. return null;
  136147. }
  136148. flowEnumBody(node, {
  136149. enumName,
  136150. nameLoc
  136151. }) {
  136152. const explicitType = this.flowEnumParseExplicitType({
  136153. enumName
  136154. });
  136155. this.expect(types$12.braceL);
  136156. const {
  136157. members,
  136158. hasUnknownMembers
  136159. } = this.flowEnumMembers({
  136160. enumName,
  136161. explicitType
  136162. });
  136163. node.hasUnknownMembers = hasUnknownMembers;
  136164. switch (explicitType) {
  136165. case "boolean":
  136166. node.explicitType = true;
  136167. node.members = members.booleanMembers;
  136168. this.expect(types$12.braceR);
  136169. return this.finishNode(node, "EnumBooleanBody");
  136170. case "number":
  136171. node.explicitType = true;
  136172. node.members = members.numberMembers;
  136173. this.expect(types$12.braceR);
  136174. return this.finishNode(node, "EnumNumberBody");
  136175. case "string":
  136176. node.explicitType = true;
  136177. node.members = this.flowEnumStringMembers(members.stringMembers, members.defaultedMembers, {
  136178. enumName
  136179. });
  136180. this.expect(types$12.braceR);
  136181. return this.finishNode(node, "EnumStringBody");
  136182. case "symbol":
  136183. node.members = members.defaultedMembers;
  136184. this.expect(types$12.braceR);
  136185. return this.finishNode(node, "EnumSymbolBody");
  136186. default: {
  136187. const empty3 = () => {
  136188. node.members = [];
  136189. this.expect(types$12.braceR);
  136190. return this.finishNode(node, "EnumStringBody");
  136191. };
  136192. node.explicitType = false;
  136193. const boolsLen = members.booleanMembers.length;
  136194. const numsLen = members.numberMembers.length;
  136195. const strsLen = members.stringMembers.length;
  136196. const defaultedLen = members.defaultedMembers.length;
  136197. if (!boolsLen && !numsLen && !strsLen && !defaultedLen) {
  136198. return empty3();
  136199. } else if (!boolsLen && !numsLen) {
  136200. node.members = this.flowEnumStringMembers(members.stringMembers, members.defaultedMembers, {
  136201. enumName
  136202. });
  136203. this.expect(types$12.braceR);
  136204. return this.finishNode(node, "EnumStringBody");
  136205. } else if (!numsLen && !strsLen && boolsLen >= defaultedLen) {
  136206. for (const member of members.defaultedMembers) {
  136207. this.flowEnumErrorBooleanMemberNotInitialized(member.start, {
  136208. enumName,
  136209. memberName: member.id.name
  136210. });
  136211. }
  136212. node.members = members.booleanMembers;
  136213. this.expect(types$12.braceR);
  136214. return this.finishNode(node, "EnumBooleanBody");
  136215. } else if (!boolsLen && !strsLen && numsLen >= defaultedLen) {
  136216. for (const member of members.defaultedMembers) {
  136217. this.flowEnumErrorNumberMemberNotInitialized(member.start, {
  136218. enumName,
  136219. memberName: member.id.name
  136220. });
  136221. }
  136222. node.members = members.numberMembers;
  136223. this.expect(types$12.braceR);
  136224. return this.finishNode(node, "EnumNumberBody");
  136225. } else {
  136226. this.flowEnumErrorInconsistentMemberValues(nameLoc, {
  136227. enumName
  136228. });
  136229. return empty3();
  136230. }
  136231. }
  136232. }
  136233. }
  136234. flowParseEnumDeclaration(node) {
  136235. const id = this.parseIdentifier();
  136236. node.id = id;
  136237. node.body = this.flowEnumBody(this.startNode(), {
  136238. enumName: id.name,
  136239. nameLoc: id.start
  136240. });
  136241. return this.finishNode(node, "EnumDeclaration");
  136242. }
  136243. isLookaheadToken_lt() {
  136244. const next = this.nextTokenStart();
  136245. if (this.input.charCodeAt(next) === 60) {
  136246. const afterNext = this.input.charCodeAt(next + 1);
  136247. return afterNext !== 60 && afterNext !== 61;
  136248. }
  136249. return false;
  136250. }
  136251. maybeUnwrapTypeCastExpression(node) {
  136252. return node.type === "TypeCastExpression" ? node.expression : node;
  136253. }
  136254. };
  136255. var entities = {
  136256. quot: '"',
  136257. amp: "&",
  136258. apos: "'",
  136259. lt: "<",
  136260. gt: ">",
  136261. nbsp: "\xA0",
  136262. iexcl: "\xA1",
  136263. cent: "\xA2",
  136264. pound: "\xA3",
  136265. curren: "\xA4",
  136266. yen: "\xA5",
  136267. brvbar: "\xA6",
  136268. sect: "\xA7",
  136269. uml: "\xA8",
  136270. copy: "\xA9",
  136271. ordf: "\xAA",
  136272. laquo: "\xAB",
  136273. not: "\xAC",
  136274. shy: "\xAD",
  136275. reg: "\xAE",
  136276. macr: "\xAF",
  136277. deg: "\xB0",
  136278. plusmn: "\xB1",
  136279. sup2: "\xB2",
  136280. sup3: "\xB3",
  136281. acute: "\xB4",
  136282. micro: "\xB5",
  136283. para: "\xB6",
  136284. middot: "\xB7",
  136285. cedil: "\xB8",
  136286. sup1: "\xB9",
  136287. ordm: "\xBA",
  136288. raquo: "\xBB",
  136289. frac14: "\xBC",
  136290. frac12: "\xBD",
  136291. frac34: "\xBE",
  136292. iquest: "\xBF",
  136293. Agrave: "\xC0",
  136294. Aacute: "\xC1",
  136295. Acirc: "\xC2",
  136296. Atilde: "\xC3",
  136297. Auml: "\xC4",
  136298. Aring: "\xC5",
  136299. AElig: "\xC6",
  136300. Ccedil: "\xC7",
  136301. Egrave: "\xC8",
  136302. Eacute: "\xC9",
  136303. Ecirc: "\xCA",
  136304. Euml: "\xCB",
  136305. Igrave: "\xCC",
  136306. Iacute: "\xCD",
  136307. Icirc: "\xCE",
  136308. Iuml: "\xCF",
  136309. ETH: "\xD0",
  136310. Ntilde: "\xD1",
  136311. Ograve: "\xD2",
  136312. Oacute: "\xD3",
  136313. Ocirc: "\xD4",
  136314. Otilde: "\xD5",
  136315. Ouml: "\xD6",
  136316. times: "\xD7",
  136317. Oslash: "\xD8",
  136318. Ugrave: "\xD9",
  136319. Uacute: "\xDA",
  136320. Ucirc: "\xDB",
  136321. Uuml: "\xDC",
  136322. Yacute: "\xDD",
  136323. THORN: "\xDE",
  136324. szlig: "\xDF",
  136325. agrave: "\xE0",
  136326. aacute: "\xE1",
  136327. acirc: "\xE2",
  136328. atilde: "\xE3",
  136329. auml: "\xE4",
  136330. aring: "\xE5",
  136331. aelig: "\xE6",
  136332. ccedil: "\xE7",
  136333. egrave: "\xE8",
  136334. eacute: "\xE9",
  136335. ecirc: "\xEA",
  136336. euml: "\xEB",
  136337. igrave: "\xEC",
  136338. iacute: "\xED",
  136339. icirc: "\xEE",
  136340. iuml: "\xEF",
  136341. eth: "\xF0",
  136342. ntilde: "\xF1",
  136343. ograve: "\xF2",
  136344. oacute: "\xF3",
  136345. ocirc: "\xF4",
  136346. otilde: "\xF5",
  136347. ouml: "\xF6",
  136348. divide: "\xF7",
  136349. oslash: "\xF8",
  136350. ugrave: "\xF9",
  136351. uacute: "\xFA",
  136352. ucirc: "\xFB",
  136353. uuml: "\xFC",
  136354. yacute: "\xFD",
  136355. thorn: "\xFE",
  136356. yuml: "\xFF",
  136357. OElig: "\u0152",
  136358. oelig: "\u0153",
  136359. Scaron: "\u0160",
  136360. scaron: "\u0161",
  136361. Yuml: "\u0178",
  136362. fnof: "\u0192",
  136363. circ: "\u02C6",
  136364. tilde: "\u02DC",
  136365. Alpha: "\u0391",
  136366. Beta: "\u0392",
  136367. Gamma: "\u0393",
  136368. Delta: "\u0394",
  136369. Epsilon: "\u0395",
  136370. Zeta: "\u0396",
  136371. Eta: "\u0397",
  136372. Theta: "\u0398",
  136373. Iota: "\u0399",
  136374. Kappa: "\u039A",
  136375. Lambda: "\u039B",
  136376. Mu: "\u039C",
  136377. Nu: "\u039D",
  136378. Xi: "\u039E",
  136379. Omicron: "\u039F",
  136380. Pi: "\u03A0",
  136381. Rho: "\u03A1",
  136382. Sigma: "\u03A3",
  136383. Tau: "\u03A4",
  136384. Upsilon: "\u03A5",
  136385. Phi: "\u03A6",
  136386. Chi: "\u03A7",
  136387. Psi: "\u03A8",
  136388. Omega: "\u03A9",
  136389. alpha: "\u03B1",
  136390. beta: "\u03B2",
  136391. gamma: "\u03B3",
  136392. delta: "\u03B4",
  136393. epsilon: "\u03B5",
  136394. zeta: "\u03B6",
  136395. eta: "\u03B7",
  136396. theta: "\u03B8",
  136397. iota: "\u03B9",
  136398. kappa: "\u03BA",
  136399. lambda: "\u03BB",
  136400. mu: "\u03BC",
  136401. nu: "\u03BD",
  136402. xi: "\u03BE",
  136403. omicron: "\u03BF",
  136404. pi: "\u03C0",
  136405. rho: "\u03C1",
  136406. sigmaf: "\u03C2",
  136407. sigma: "\u03C3",
  136408. tau: "\u03C4",
  136409. upsilon: "\u03C5",
  136410. phi: "\u03C6",
  136411. chi: "\u03C7",
  136412. psi: "\u03C8",
  136413. omega: "\u03C9",
  136414. thetasym: "\u03D1",
  136415. upsih: "\u03D2",
  136416. piv: "\u03D6",
  136417. ensp: "\u2002",
  136418. emsp: "\u2003",
  136419. thinsp: "\u2009",
  136420. zwnj: "\u200C",
  136421. zwj: "\u200D",
  136422. lrm: "\u200E",
  136423. rlm: "\u200F",
  136424. ndash: "\u2013",
  136425. mdash: "\u2014",
  136426. lsquo: "\u2018",
  136427. rsquo: "\u2019",
  136428. sbquo: "\u201A",
  136429. ldquo: "\u201C",
  136430. rdquo: "\u201D",
  136431. bdquo: "\u201E",
  136432. dagger: "\u2020",
  136433. Dagger: "\u2021",
  136434. bull: "\u2022",
  136435. hellip: "\u2026",
  136436. permil: "\u2030",
  136437. prime: "\u2032",
  136438. Prime: "\u2033",
  136439. lsaquo: "\u2039",
  136440. rsaquo: "\u203A",
  136441. oline: "\u203E",
  136442. frasl: "\u2044",
  136443. euro: "\u20AC",
  136444. image: "\u2111",
  136445. weierp: "\u2118",
  136446. real: "\u211C",
  136447. trade: "\u2122",
  136448. alefsym: "\u2135",
  136449. larr: "\u2190",
  136450. uarr: "\u2191",
  136451. rarr: "\u2192",
  136452. darr: "\u2193",
  136453. harr: "\u2194",
  136454. crarr: "\u21B5",
  136455. lArr: "\u21D0",
  136456. uArr: "\u21D1",
  136457. rArr: "\u21D2",
  136458. dArr: "\u21D3",
  136459. hArr: "\u21D4",
  136460. forall: "\u2200",
  136461. part: "\u2202",
  136462. exist: "\u2203",
  136463. empty: "\u2205",
  136464. nabla: "\u2207",
  136465. isin: "\u2208",
  136466. notin: "\u2209",
  136467. ni: "\u220B",
  136468. prod: "\u220F",
  136469. sum: "\u2211",
  136470. minus: "\u2212",
  136471. lowast: "\u2217",
  136472. radic: "\u221A",
  136473. prop: "\u221D",
  136474. infin: "\u221E",
  136475. ang: "\u2220",
  136476. and: "\u2227",
  136477. or: "\u2228",
  136478. cap: "\u2229",
  136479. cup: "\u222A",
  136480. int: "\u222B",
  136481. there4: "\u2234",
  136482. sim: "\u223C",
  136483. cong: "\u2245",
  136484. asymp: "\u2248",
  136485. ne: "\u2260",
  136486. equiv: "\u2261",
  136487. le: "\u2264",
  136488. ge: "\u2265",
  136489. sub: "\u2282",
  136490. sup: "\u2283",
  136491. nsub: "\u2284",
  136492. sube: "\u2286",
  136493. supe: "\u2287",
  136494. oplus: "\u2295",
  136495. otimes: "\u2297",
  136496. perp: "\u22A5",
  136497. sdot: "\u22C5",
  136498. lceil: "\u2308",
  136499. rceil: "\u2309",
  136500. lfloor: "\u230A",
  136501. rfloor: "\u230B",
  136502. lang: "\u2329",
  136503. rang: "\u232A",
  136504. loz: "\u25CA",
  136505. spades: "\u2660",
  136506. clubs: "\u2663",
  136507. hearts: "\u2665",
  136508. diams: "\u2666"
  136509. };
  136510. var State2 = class {
  136511. constructor() {
  136512. this.strict = void 0;
  136513. this.curLine = void 0;
  136514. this.startLoc = void 0;
  136515. this.endLoc = void 0;
  136516. this.errors = [];
  136517. this.potentialArrowAt = -1;
  136518. this.noArrowAt = [];
  136519. this.noArrowParamsConversionAt = [];
  136520. this.maybeInArrowParameters = false;
  136521. this.inPipeline = false;
  136522. this.inType = false;
  136523. this.noAnonFunctionType = false;
  136524. this.inPropertyName = false;
  136525. this.hasFlowComment = false;
  136526. this.isAmbientContext = false;
  136527. this.inAbstractClass = false;
  136528. this.topicContext = {
  136529. maxNumOfResolvableTopics: 0,
  136530. maxTopicIndex: null
  136531. };
  136532. this.soloAwait = false;
  136533. this.inFSharpPipelineDirectBody = false;
  136534. this.labels = [];
  136535. this.decoratorStack = [[]];
  136536. this.comments = [];
  136537. this.trailingComments = [];
  136538. this.leadingComments = [];
  136539. this.commentStack = [];
  136540. this.commentPreviousNode = null;
  136541. this.pos = 0;
  136542. this.lineStart = 0;
  136543. this.type = types$12.eof;
  136544. this.value = null;
  136545. this.start = 0;
  136546. this.end = 0;
  136547. this.lastTokEndLoc = null;
  136548. this.lastTokStartLoc = null;
  136549. this.lastTokStart = 0;
  136550. this.lastTokEnd = 0;
  136551. this.context = [types2.brace];
  136552. this.exprAllowed = true;
  136553. this.containsEsc = false;
  136554. this.strictErrors = /* @__PURE__ */ new Map();
  136555. this.tokensLength = 0;
  136556. }
  136557. init(options) {
  136558. this.strict = options.strictMode === false ? false : options.sourceType === "module";
  136559. this.curLine = options.startLine;
  136560. this.startLoc = this.endLoc = this.curPosition();
  136561. }
  136562. curPosition() {
  136563. return new Position3(this.curLine, this.pos - this.lineStart);
  136564. }
  136565. clone(skipArrays) {
  136566. const state = new State2();
  136567. const keys2 = Object.keys(this);
  136568. for (let i = 0, length = keys2.length; i < length; i++) {
  136569. const key = keys2[i];
  136570. let val = this[key];
  136571. if (!skipArrays && Array.isArray(val)) {
  136572. val = val.slice();
  136573. }
  136574. state[key] = val;
  136575. }
  136576. return state;
  136577. }
  136578. };
  136579. var HEX_NUMBER = /^[\da-fA-F]+$/;
  136580. var DECIMAL_NUMBER = /^\d+$/;
  136581. var JsxErrors = makeErrorTemplates({
  136582. AttributeIsEmpty: "JSX attributes must only be assigned a non-empty expression.",
  136583. MissingClosingTagElement: "Expected corresponding JSX closing tag for <%0>.",
  136584. MissingClosingTagFragment: "Expected corresponding JSX closing tag for <>.",
  136585. UnexpectedSequenceExpression: "Sequence expressions cannot be directly nested inside JSX. Did you mean to wrap it in parentheses (...)?",
  136586. UnsupportedJsxValue: "JSX value should be either an expression or a quoted JSX text.",
  136587. UnterminatedJsxContent: "Unterminated JSX contents.",
  136588. UnwrappedAdjacentJSXElements: "Adjacent JSX elements must be wrapped in an enclosing tag. Did you want a JSX fragment <>...</>?"
  136589. }, ErrorCodes.SyntaxError);
  136590. types2.j_oTag = new TokContext3("<tag");
  136591. types2.j_cTag = new TokContext3("</tag");
  136592. types2.j_expr = new TokContext3("<tag>...</tag>", true);
  136593. types$12.jsxName = new TokenType3("jsxName");
  136594. types$12.jsxText = new TokenType3("jsxText", {
  136595. beforeExpr: true
  136596. });
  136597. types$12.jsxTagStart = new TokenType3("jsxTagStart", {
  136598. startsExpr: true
  136599. });
  136600. types$12.jsxTagEnd = new TokenType3("jsxTagEnd");
  136601. types$12.jsxTagStart.updateContext = (context) => {
  136602. context.push(types2.j_expr);
  136603. context.push(types2.j_oTag);
  136604. };
  136605. function isFragment(object) {
  136606. return object ? object.type === "JSXOpeningFragment" || object.type === "JSXClosingFragment" : false;
  136607. }
  136608. function getQualifiedJSXName(object) {
  136609. if (object.type === "JSXIdentifier") {
  136610. return object.name;
  136611. }
  136612. if (object.type === "JSXNamespacedName") {
  136613. return object.namespace.name + ":" + object.name.name;
  136614. }
  136615. if (object.type === "JSXMemberExpression") {
  136616. return getQualifiedJSXName(object.object) + "." + getQualifiedJSXName(object.property);
  136617. }
  136618. throw new Error("Node had unexpected type: " + object.type);
  136619. }
  136620. var jsx = (superClass) => class extends superClass {
  136621. jsxReadToken() {
  136622. let out = "";
  136623. let chunkStart = this.state.pos;
  136624. for (; ; ) {
  136625. if (this.state.pos >= this.length) {
  136626. throw this.raise(this.state.start, JsxErrors.UnterminatedJsxContent);
  136627. }
  136628. const ch = this.input.charCodeAt(this.state.pos);
  136629. switch (ch) {
  136630. case 60:
  136631. case 123:
  136632. if (this.state.pos === this.state.start) {
  136633. if (ch === 60 && this.state.exprAllowed) {
  136634. ++this.state.pos;
  136635. return this.finishToken(types$12.jsxTagStart);
  136636. }
  136637. return super.getTokenFromCode(ch);
  136638. }
  136639. out += this.input.slice(chunkStart, this.state.pos);
  136640. return this.finishToken(types$12.jsxText, out);
  136641. case 38:
  136642. out += this.input.slice(chunkStart, this.state.pos);
  136643. out += this.jsxReadEntity();
  136644. chunkStart = this.state.pos;
  136645. break;
  136646. case 62:
  136647. case 125:
  136648. default:
  136649. if (isNewLine2(ch)) {
  136650. out += this.input.slice(chunkStart, this.state.pos);
  136651. out += this.jsxReadNewLine(true);
  136652. chunkStart = this.state.pos;
  136653. } else {
  136654. ++this.state.pos;
  136655. }
  136656. }
  136657. }
  136658. }
  136659. jsxReadNewLine(normalizeCRLF) {
  136660. const ch = this.input.charCodeAt(this.state.pos);
  136661. let out;
  136662. ++this.state.pos;
  136663. if (ch === 13 && this.input.charCodeAt(this.state.pos) === 10) {
  136664. ++this.state.pos;
  136665. out = normalizeCRLF ? "\n" : "\r\n";
  136666. } else {
  136667. out = String.fromCharCode(ch);
  136668. }
  136669. ++this.state.curLine;
  136670. this.state.lineStart = this.state.pos;
  136671. return out;
  136672. }
  136673. jsxReadString(quote) {
  136674. let out = "";
  136675. let chunkStart = ++this.state.pos;
  136676. for (; ; ) {
  136677. if (this.state.pos >= this.length) {
  136678. throw this.raise(this.state.start, ErrorMessages.UnterminatedString);
  136679. }
  136680. const ch = this.input.charCodeAt(this.state.pos);
  136681. if (ch === quote)
  136682. break;
  136683. if (ch === 38) {
  136684. out += this.input.slice(chunkStart, this.state.pos);
  136685. out += this.jsxReadEntity();
  136686. chunkStart = this.state.pos;
  136687. } else if (isNewLine2(ch)) {
  136688. out += this.input.slice(chunkStart, this.state.pos);
  136689. out += this.jsxReadNewLine(false);
  136690. chunkStart = this.state.pos;
  136691. } else {
  136692. ++this.state.pos;
  136693. }
  136694. }
  136695. out += this.input.slice(chunkStart, this.state.pos++);
  136696. return this.finishToken(types$12.string, out);
  136697. }
  136698. jsxReadEntity() {
  136699. let str = "";
  136700. let count = 0;
  136701. let entity;
  136702. let ch = this.input[this.state.pos];
  136703. const startPos = ++this.state.pos;
  136704. while (this.state.pos < this.length && count++ < 10) {
  136705. ch = this.input[this.state.pos++];
  136706. if (ch === ";") {
  136707. if (str[0] === "#") {
  136708. if (str[1] === "x") {
  136709. str = str.substr(2);
  136710. if (HEX_NUMBER.test(str)) {
  136711. entity = String.fromCodePoint(parseInt(str, 16));
  136712. }
  136713. } else {
  136714. str = str.substr(1);
  136715. if (DECIMAL_NUMBER.test(str)) {
  136716. entity = String.fromCodePoint(parseInt(str, 10));
  136717. }
  136718. }
  136719. } else {
  136720. entity = entities[str];
  136721. }
  136722. break;
  136723. }
  136724. str += ch;
  136725. }
  136726. if (!entity) {
  136727. this.state.pos = startPos;
  136728. return "&";
  136729. }
  136730. return entity;
  136731. }
  136732. jsxReadWord() {
  136733. let ch;
  136734. const start3 = this.state.pos;
  136735. do {
  136736. ch = this.input.charCodeAt(++this.state.pos);
  136737. } while (isIdentifierChar2(ch) || ch === 45);
  136738. return this.finishToken(types$12.jsxName, this.input.slice(start3, this.state.pos));
  136739. }
  136740. jsxParseIdentifier() {
  136741. const node = this.startNode();
  136742. if (this.match(types$12.jsxName)) {
  136743. node.name = this.state.value;
  136744. } else if (this.state.type.keyword) {
  136745. node.name = this.state.type.keyword;
  136746. } else {
  136747. this.unexpected();
  136748. }
  136749. this.next();
  136750. return this.finishNode(node, "JSXIdentifier");
  136751. }
  136752. jsxParseNamespacedName() {
  136753. const startPos = this.state.start;
  136754. const startLoc = this.state.startLoc;
  136755. const name2 = this.jsxParseIdentifier();
  136756. if (!this.eat(types$12.colon))
  136757. return name2;
  136758. const node = this.startNodeAt(startPos, startLoc);
  136759. node.namespace = name2;
  136760. node.name = this.jsxParseIdentifier();
  136761. return this.finishNode(node, "JSXNamespacedName");
  136762. }
  136763. jsxParseElementName() {
  136764. const startPos = this.state.start;
  136765. const startLoc = this.state.startLoc;
  136766. let node = this.jsxParseNamespacedName();
  136767. if (node.type === "JSXNamespacedName") {
  136768. return node;
  136769. }
  136770. while (this.eat(types$12.dot)) {
  136771. const newNode = this.startNodeAt(startPos, startLoc);
  136772. newNode.object = node;
  136773. newNode.property = this.jsxParseIdentifier();
  136774. node = this.finishNode(newNode, "JSXMemberExpression");
  136775. }
  136776. return node;
  136777. }
  136778. jsxParseAttributeValue() {
  136779. let node;
  136780. switch (this.state.type) {
  136781. case types$12.braceL:
  136782. node = this.startNode();
  136783. this.next();
  136784. node = this.jsxParseExpressionContainer(node);
  136785. if (node.expression.type === "JSXEmptyExpression") {
  136786. this.raise(node.start, JsxErrors.AttributeIsEmpty);
  136787. }
  136788. return node;
  136789. case types$12.jsxTagStart:
  136790. case types$12.string:
  136791. return this.parseExprAtom();
  136792. default:
  136793. throw this.raise(this.state.start, JsxErrors.UnsupportedJsxValue);
  136794. }
  136795. }
  136796. jsxParseEmptyExpression() {
  136797. const node = this.startNodeAt(this.state.lastTokEnd, this.state.lastTokEndLoc);
  136798. return this.finishNodeAt(node, "JSXEmptyExpression", this.state.start, this.state.startLoc);
  136799. }
  136800. jsxParseSpreadChild(node) {
  136801. this.next();
  136802. node.expression = this.parseExpression();
  136803. this.expect(types$12.braceR);
  136804. return this.finishNode(node, "JSXSpreadChild");
  136805. }
  136806. jsxParseExpressionContainer(node) {
  136807. if (this.match(types$12.braceR)) {
  136808. node.expression = this.jsxParseEmptyExpression();
  136809. } else {
  136810. const expression = this.parseExpression();
  136811. node.expression = expression;
  136812. }
  136813. this.expect(types$12.braceR);
  136814. return this.finishNode(node, "JSXExpressionContainer");
  136815. }
  136816. jsxParseAttribute() {
  136817. const node = this.startNode();
  136818. if (this.eat(types$12.braceL)) {
  136819. this.expect(types$12.ellipsis);
  136820. node.argument = this.parseMaybeAssignAllowIn();
  136821. this.expect(types$12.braceR);
  136822. return this.finishNode(node, "JSXSpreadAttribute");
  136823. }
  136824. node.name = this.jsxParseNamespacedName();
  136825. node.value = this.eat(types$12.eq) ? this.jsxParseAttributeValue() : null;
  136826. return this.finishNode(node, "JSXAttribute");
  136827. }
  136828. jsxParseOpeningElementAt(startPos, startLoc) {
  136829. const node = this.startNodeAt(startPos, startLoc);
  136830. if (this.match(types$12.jsxTagEnd)) {
  136831. this.expect(types$12.jsxTagEnd);
  136832. return this.finishNode(node, "JSXOpeningFragment");
  136833. }
  136834. node.name = this.jsxParseElementName();
  136835. return this.jsxParseOpeningElementAfterName(node);
  136836. }
  136837. jsxParseOpeningElementAfterName(node) {
  136838. const attributes = [];
  136839. while (!this.match(types$12.slash) && !this.match(types$12.jsxTagEnd)) {
  136840. attributes.push(this.jsxParseAttribute());
  136841. }
  136842. node.attributes = attributes;
  136843. node.selfClosing = this.eat(types$12.slash);
  136844. this.expect(types$12.jsxTagEnd);
  136845. return this.finishNode(node, "JSXOpeningElement");
  136846. }
  136847. jsxParseClosingElementAt(startPos, startLoc) {
  136848. const node = this.startNodeAt(startPos, startLoc);
  136849. if (this.match(types$12.jsxTagEnd)) {
  136850. this.expect(types$12.jsxTagEnd);
  136851. return this.finishNode(node, "JSXClosingFragment");
  136852. }
  136853. node.name = this.jsxParseElementName();
  136854. this.expect(types$12.jsxTagEnd);
  136855. return this.finishNode(node, "JSXClosingElement");
  136856. }
  136857. jsxParseElementAt(startPos, startLoc) {
  136858. const node = this.startNodeAt(startPos, startLoc);
  136859. const children = [];
  136860. const openingElement = this.jsxParseOpeningElementAt(startPos, startLoc);
  136861. let closingElement = null;
  136862. if (!openingElement.selfClosing) {
  136863. contents:
  136864. for (; ; ) {
  136865. switch (this.state.type) {
  136866. case types$12.jsxTagStart:
  136867. startPos = this.state.start;
  136868. startLoc = this.state.startLoc;
  136869. this.next();
  136870. if (this.eat(types$12.slash)) {
  136871. closingElement = this.jsxParseClosingElementAt(startPos, startLoc);
  136872. break contents;
  136873. }
  136874. children.push(this.jsxParseElementAt(startPos, startLoc));
  136875. break;
  136876. case types$12.jsxText:
  136877. children.push(this.parseExprAtom());
  136878. break;
  136879. case types$12.braceL: {
  136880. const node2 = this.startNode();
  136881. this.next();
  136882. if (this.match(types$12.ellipsis)) {
  136883. children.push(this.jsxParseSpreadChild(node2));
  136884. } else {
  136885. children.push(this.jsxParseExpressionContainer(node2));
  136886. }
  136887. break;
  136888. }
  136889. default:
  136890. throw this.unexpected();
  136891. }
  136892. }
  136893. if (isFragment(openingElement) && !isFragment(closingElement)) {
  136894. this.raise(closingElement.start, JsxErrors.MissingClosingTagFragment);
  136895. } else if (!isFragment(openingElement) && isFragment(closingElement)) {
  136896. this.raise(closingElement.start, JsxErrors.MissingClosingTagElement, getQualifiedJSXName(openingElement.name));
  136897. } else if (!isFragment(openingElement) && !isFragment(closingElement)) {
  136898. if (getQualifiedJSXName(closingElement.name) !== getQualifiedJSXName(openingElement.name)) {
  136899. this.raise(closingElement.start, JsxErrors.MissingClosingTagElement, getQualifiedJSXName(openingElement.name));
  136900. }
  136901. }
  136902. }
  136903. if (isFragment(openingElement)) {
  136904. node.openingFragment = openingElement;
  136905. node.closingFragment = closingElement;
  136906. } else {
  136907. node.openingElement = openingElement;
  136908. node.closingElement = closingElement;
  136909. }
  136910. node.children = children;
  136911. if (this.isRelational("<")) {
  136912. throw this.raise(this.state.start, JsxErrors.UnwrappedAdjacentJSXElements);
  136913. }
  136914. return isFragment(openingElement) ? this.finishNode(node, "JSXFragment") : this.finishNode(node, "JSXElement");
  136915. }
  136916. jsxParseElement() {
  136917. const startPos = this.state.start;
  136918. const startLoc = this.state.startLoc;
  136919. this.next();
  136920. return this.jsxParseElementAt(startPos, startLoc);
  136921. }
  136922. parseExprAtom(refExpressionErrors) {
  136923. if (this.match(types$12.jsxText)) {
  136924. return this.parseLiteral(this.state.value, "JSXText");
  136925. } else if (this.match(types$12.jsxTagStart)) {
  136926. return this.jsxParseElement();
  136927. } else if (this.isRelational("<") && this.input.charCodeAt(this.state.pos) !== 33) {
  136928. this.finishToken(types$12.jsxTagStart);
  136929. return this.jsxParseElement();
  136930. } else {
  136931. return super.parseExprAtom(refExpressionErrors);
  136932. }
  136933. }
  136934. createLookaheadState(state) {
  136935. const lookaheadState = super.createLookaheadState(state);
  136936. lookaheadState.inPropertyName = state.inPropertyName;
  136937. return lookaheadState;
  136938. }
  136939. getTokenFromCode(code2) {
  136940. if (this.state.inPropertyName)
  136941. return super.getTokenFromCode(code2);
  136942. const context = this.curContext();
  136943. if (context === types2.j_expr) {
  136944. return this.jsxReadToken();
  136945. }
  136946. if (context === types2.j_oTag || context === types2.j_cTag) {
  136947. if (isIdentifierStart2(code2)) {
  136948. return this.jsxReadWord();
  136949. }
  136950. if (code2 === 62) {
  136951. ++this.state.pos;
  136952. return this.finishToken(types$12.jsxTagEnd);
  136953. }
  136954. if ((code2 === 34 || code2 === 39) && context === types2.j_oTag) {
  136955. return this.jsxReadString(code2);
  136956. }
  136957. }
  136958. if (code2 === 60 && this.state.exprAllowed && this.input.charCodeAt(this.state.pos + 1) !== 33) {
  136959. ++this.state.pos;
  136960. return this.finishToken(types$12.jsxTagStart);
  136961. }
  136962. return super.getTokenFromCode(code2);
  136963. }
  136964. updateContext(prevType) {
  136965. super.updateContext(prevType);
  136966. const {
  136967. context,
  136968. type
  136969. } = this.state;
  136970. if (type === types$12.braceL) {
  136971. const curContext = context[context.length - 1];
  136972. if (curContext === types2.j_oTag) {
  136973. context.push(types2.brace);
  136974. } else if (curContext === types2.j_expr) {
  136975. context.push(types2.templateQuasi);
  136976. }
  136977. this.state.exprAllowed = true;
  136978. } else if (type === types$12.slash && prevType === types$12.jsxTagStart) {
  136979. context.length -= 2;
  136980. context.push(types2.j_cTag);
  136981. this.state.exprAllowed = false;
  136982. } else if (type === types$12.jsxTagEnd) {
  136983. const out = context.pop();
  136984. if (out === types2.j_oTag && prevType === types$12.slash || out === types2.j_cTag) {
  136985. context.pop();
  136986. this.state.exprAllowed = context[context.length - 1] === types2.j_expr;
  136987. } else {
  136988. this.state.exprAllowed = true;
  136989. }
  136990. } else if (type.keyword && (prevType === types$12.dot || prevType === types$12.questionDot)) {
  136991. this.state.exprAllowed = false;
  136992. } else {
  136993. this.state.exprAllowed = type.beforeExpr;
  136994. }
  136995. }
  136996. };
  136997. var TypeScriptScope = class extends Scope4 {
  136998. constructor(...args) {
  136999. super(...args);
  137000. this.types = /* @__PURE__ */ new Set();
  137001. this.enums = /* @__PURE__ */ new Set();
  137002. this.constEnums = /* @__PURE__ */ new Set();
  137003. this.classes = /* @__PURE__ */ new Set();
  137004. this.exportOnlyBindings = /* @__PURE__ */ new Set();
  137005. }
  137006. };
  137007. var TypeScriptScopeHandler = class extends ScopeHandler {
  137008. createScope(flags) {
  137009. return new TypeScriptScope(flags);
  137010. }
  137011. declareName(name2, bindingType, pos) {
  137012. const scope = this.currentScope();
  137013. if (bindingType & BIND_FLAGS_TS_EXPORT_ONLY) {
  137014. this.maybeExportDefined(scope, name2);
  137015. scope.exportOnlyBindings.add(name2);
  137016. return;
  137017. }
  137018. super.declareName(...arguments);
  137019. if (bindingType & BIND_KIND_TYPE) {
  137020. if (!(bindingType & BIND_KIND_VALUE)) {
  137021. this.checkRedeclarationInScope(scope, name2, bindingType, pos);
  137022. this.maybeExportDefined(scope, name2);
  137023. }
  137024. scope.types.add(name2);
  137025. }
  137026. if (bindingType & BIND_FLAGS_TS_ENUM)
  137027. scope.enums.add(name2);
  137028. if (bindingType & BIND_FLAGS_TS_CONST_ENUM)
  137029. scope.constEnums.add(name2);
  137030. if (bindingType & BIND_FLAGS_CLASS)
  137031. scope.classes.add(name2);
  137032. }
  137033. isRedeclaredInScope(scope, name2, bindingType) {
  137034. if (scope.enums.has(name2)) {
  137035. if (bindingType & BIND_FLAGS_TS_ENUM) {
  137036. const isConst = !!(bindingType & BIND_FLAGS_TS_CONST_ENUM);
  137037. const wasConst = scope.constEnums.has(name2);
  137038. return isConst !== wasConst;
  137039. }
  137040. return true;
  137041. }
  137042. if (bindingType & BIND_FLAGS_CLASS && scope.classes.has(name2)) {
  137043. if (scope.lexical.has(name2)) {
  137044. return !!(bindingType & BIND_KIND_VALUE);
  137045. } else {
  137046. return false;
  137047. }
  137048. }
  137049. if (bindingType & BIND_KIND_TYPE && scope.types.has(name2)) {
  137050. return true;
  137051. }
  137052. return super.isRedeclaredInScope(...arguments);
  137053. }
  137054. checkLocalExport(id) {
  137055. const topLevelScope = this.scopeStack[0];
  137056. const {
  137057. name: name2
  137058. } = id;
  137059. if (!topLevelScope.types.has(name2) && !topLevelScope.exportOnlyBindings.has(name2)) {
  137060. super.checkLocalExport(id);
  137061. }
  137062. }
  137063. };
  137064. var PARAM = 0;
  137065. var PARAM_YIELD = 1;
  137066. var PARAM_AWAIT = 2;
  137067. var PARAM_RETURN = 4;
  137068. var PARAM_IN = 8;
  137069. var ProductionParameterHandler = class {
  137070. constructor() {
  137071. this.stacks = [];
  137072. }
  137073. enter(flags) {
  137074. this.stacks.push(flags);
  137075. }
  137076. exit() {
  137077. this.stacks.pop();
  137078. }
  137079. currentFlags() {
  137080. return this.stacks[this.stacks.length - 1];
  137081. }
  137082. get hasAwait() {
  137083. return (this.currentFlags() & PARAM_AWAIT) > 0;
  137084. }
  137085. get hasYield() {
  137086. return (this.currentFlags() & PARAM_YIELD) > 0;
  137087. }
  137088. get hasReturn() {
  137089. return (this.currentFlags() & PARAM_RETURN) > 0;
  137090. }
  137091. get hasIn() {
  137092. return (this.currentFlags() & PARAM_IN) > 0;
  137093. }
  137094. };
  137095. function functionFlags2(isAsync, isGenerator) {
  137096. return (isAsync ? PARAM_AWAIT : 0) | (isGenerator ? PARAM_YIELD : 0);
  137097. }
  137098. function nonNull(x) {
  137099. if (x == null) {
  137100. throw new Error(`Unexpected ${x} value.`);
  137101. }
  137102. return x;
  137103. }
  137104. function assert(x) {
  137105. if (!x) {
  137106. throw new Error("Assert fail");
  137107. }
  137108. }
  137109. var TSErrors = makeErrorTemplates({
  137110. AbstractMethodHasImplementation: "Method '%0' cannot have an implementation because it is marked abstract.",
  137111. AccesorCannotDeclareThisParameter: "'get' and 'set' accessors cannot declare 'this' parameters.",
  137112. AccesorCannotHaveTypeParameters: "An accessor cannot have type parameters.",
  137113. ClassMethodHasDeclare: "Class methods cannot have the 'declare' modifier.",
  137114. ClassMethodHasReadonly: "Class methods cannot have the 'readonly' modifier.",
  137115. ConstructorHasTypeParameters: "Type parameters cannot appear on a constructor declaration.",
  137116. DeclareAccessor: "'declare' is not allowed in %0ters.",
  137117. DeclareClassFieldHasInitializer: "Initializers are not allowed in ambient contexts.",
  137118. DeclareFunctionHasImplementation: "An implementation cannot be declared in ambient contexts.",
  137119. DuplicateAccessibilityModifier: "Accessibility modifier already seen.",
  137120. DuplicateModifier: "Duplicate modifier: '%0'.",
  137121. EmptyHeritageClauseType: "'%0' list cannot be empty.",
  137122. EmptyTypeArguments: "Type argument list cannot be empty.",
  137123. EmptyTypeParameters: "Type parameter list cannot be empty.",
  137124. ExpectedAmbientAfterExportDeclare: "'export declare' must be followed by an ambient declaration.",
  137125. ImportAliasHasImportType: "An import alias can not use 'import type'.",
  137126. IncompatibleModifiers: "'%0' modifier cannot be used with '%1' modifier.",
  137127. IndexSignatureHasAbstract: "Index signatures cannot have the 'abstract' modifier.",
  137128. IndexSignatureHasAccessibility: "Index signatures cannot have an accessibility modifier ('%0').",
  137129. IndexSignatureHasDeclare: "Index signatures cannot have the 'declare' modifier.",
  137130. IndexSignatureHasOverride: "'override' modifier cannot appear on an index signature.",
  137131. IndexSignatureHasStatic: "Index signatures cannot have the 'static' modifier.",
  137132. InvalidModifierOnTypeMember: "'%0' modifier cannot appear on a type member.",
  137133. InvalidModifiersOrder: "'%0' modifier must precede '%1' modifier.",
  137134. InvalidTupleMemberLabel: "Tuple members must be labeled with a simple identifier.",
  137135. MixedLabeledAndUnlabeledElements: "Tuple members must all have names or all not have names.",
  137136. NonAbstractClassHasAbstractMethod: "Abstract methods can only appear within an abstract class.",
  137137. NonClassMethodPropertyHasAbstractModifer: "'abstract' modifier can only appear on a class, method, or property declaration.",
  137138. OptionalTypeBeforeRequired: "A required element cannot follow an optional element.",
  137139. OverrideNotInSubClass: "This member cannot have an 'override' modifier because its containing class does not extend another class.",
  137140. PatternIsOptional: "A binding pattern parameter cannot be optional in an implementation signature.",
  137141. PrivateElementHasAbstract: "Private elements cannot have the 'abstract' modifier.",
  137142. PrivateElementHasAccessibility: "Private elements cannot have an accessibility modifier ('%0').",
  137143. ReadonlyForMethodSignature: "'readonly' modifier can only appear on a property declaration or index signature.",
  137144. SetAccesorCannotHaveOptionalParameter: "A 'set' accessor cannot have an optional parameter.",
  137145. SetAccesorCannotHaveRestParameter: "A 'set' accessor cannot have rest parameter.",
  137146. SetAccesorCannotHaveReturnType: "A 'set' accessor cannot have a return type annotation.",
  137147. StaticBlockCannotHaveModifier: "Static class blocks cannot have any modifier.",
  137148. TypeAnnotationAfterAssign: "Type annotations must come before default assignments, e.g. instead of `age = 25: number` use `age: number = 25`.",
  137149. TypeImportCannotSpecifyDefaultAndNamed: "A type-only import can specify a default import or named bindings, but not both.",
  137150. UnexpectedParameterModifier: "A parameter property is only allowed in a constructor implementation.",
  137151. UnexpectedReadonly: "'readonly' type modifier is only permitted on array and tuple literal types.",
  137152. UnexpectedTypeAnnotation: "Did not expect a type annotation here.",
  137153. UnexpectedTypeCastInParameter: "Unexpected type cast in parameter position.",
  137154. UnsupportedImportTypeArgument: "Argument in a type import must be a string literal.",
  137155. UnsupportedParameterPropertyKind: "A parameter property may not be declared using a binding pattern.",
  137156. UnsupportedSignatureParameterKind: "Name in a signature must be an Identifier, ObjectPattern or ArrayPattern, instead got %0."
  137157. }, ErrorCodes.SyntaxError);
  137158. function keywordTypeFromName(value) {
  137159. switch (value) {
  137160. case "any":
  137161. return "TSAnyKeyword";
  137162. case "boolean":
  137163. return "TSBooleanKeyword";
  137164. case "bigint":
  137165. return "TSBigIntKeyword";
  137166. case "never":
  137167. return "TSNeverKeyword";
  137168. case "number":
  137169. return "TSNumberKeyword";
  137170. case "object":
  137171. return "TSObjectKeyword";
  137172. case "string":
  137173. return "TSStringKeyword";
  137174. case "symbol":
  137175. return "TSSymbolKeyword";
  137176. case "undefined":
  137177. return "TSUndefinedKeyword";
  137178. case "unknown":
  137179. return "TSUnknownKeyword";
  137180. default:
  137181. return void 0;
  137182. }
  137183. }
  137184. function tsIsAccessModifier(modifier) {
  137185. return modifier === "private" || modifier === "public" || modifier === "protected";
  137186. }
  137187. var typescript = (superClass) => class extends superClass {
  137188. getScopeHandler() {
  137189. return TypeScriptScopeHandler;
  137190. }
  137191. tsIsIdentifier() {
  137192. return this.match(types$12.name);
  137193. }
  137194. tsTokenCanFollowModifier() {
  137195. return (this.match(types$12.bracketL) || this.match(types$12.braceL) || this.match(types$12.star) || this.match(types$12.ellipsis) || this.match(types$12.privateName) || this.isLiteralPropertyName()) && !this.hasPrecedingLineBreak();
  137196. }
  137197. tsNextTokenCanFollowModifier() {
  137198. this.next();
  137199. return this.tsTokenCanFollowModifier();
  137200. }
  137201. tsParseModifier(allowedModifiers) {
  137202. if (!this.match(types$12.name)) {
  137203. return void 0;
  137204. }
  137205. const modifier = this.state.value;
  137206. if (allowedModifiers.indexOf(modifier) !== -1 && this.tsTryParse(this.tsNextTokenCanFollowModifier.bind(this))) {
  137207. return modifier;
  137208. }
  137209. return void 0;
  137210. }
  137211. tsParseModifiers(modified, allowedModifiers, disallowedModifiers, errorTemplate) {
  137212. const enforceOrder = (pos, modifier, before, after) => {
  137213. if (modifier === before && modified[after]) {
  137214. this.raise(pos, TSErrors.InvalidModifiersOrder, before, after);
  137215. }
  137216. };
  137217. const incompatible = (pos, modifier, mod1, mod2) => {
  137218. if (modified[mod1] && modifier === mod2 || modified[mod2] && modifier === mod1) {
  137219. this.raise(pos, TSErrors.IncompatibleModifiers, mod1, mod2);
  137220. }
  137221. };
  137222. for (; ; ) {
  137223. const startPos = this.state.start;
  137224. const modifier = this.tsParseModifier(allowedModifiers.concat(disallowedModifiers != null ? disallowedModifiers : []));
  137225. if (!modifier)
  137226. break;
  137227. if (tsIsAccessModifier(modifier)) {
  137228. if (modified.accessibility) {
  137229. this.raise(startPos, TSErrors.DuplicateAccessibilityModifier);
  137230. } else {
  137231. enforceOrder(startPos, modifier, modifier, "override");
  137232. enforceOrder(startPos, modifier, modifier, "static");
  137233. modified.accessibility = modifier;
  137234. }
  137235. } else {
  137236. if (Object.hasOwnProperty.call(modified, modifier)) {
  137237. this.raise(startPos, TSErrors.DuplicateModifier, modifier);
  137238. } else {
  137239. enforceOrder(startPos, modifier, "static", "readonly");
  137240. enforceOrder(startPos, modifier, "static", "override");
  137241. enforceOrder(startPos, modifier, "override", "readonly");
  137242. enforceOrder(startPos, modifier, "abstract", "override");
  137243. incompatible(startPos, modifier, "declare", "override");
  137244. incompatible(startPos, modifier, "static", "abstract");
  137245. }
  137246. modified[modifier] = true;
  137247. }
  137248. if (disallowedModifiers != null && disallowedModifiers.includes(modifier)) {
  137249. this.raise(startPos, errorTemplate, modifier);
  137250. }
  137251. }
  137252. }
  137253. tsIsListTerminator(kind) {
  137254. switch (kind) {
  137255. case "EnumMembers":
  137256. case "TypeMembers":
  137257. return this.match(types$12.braceR);
  137258. case "HeritageClauseElement":
  137259. return this.match(types$12.braceL);
  137260. case "TupleElementTypes":
  137261. return this.match(types$12.bracketR);
  137262. case "TypeParametersOrArguments":
  137263. return this.isRelational(">");
  137264. }
  137265. throw new Error("Unreachable");
  137266. }
  137267. tsParseList(kind, parseElement) {
  137268. const result = [];
  137269. while (!this.tsIsListTerminator(kind)) {
  137270. result.push(parseElement());
  137271. }
  137272. return result;
  137273. }
  137274. tsParseDelimitedList(kind, parseElement) {
  137275. return nonNull(this.tsParseDelimitedListWorker(kind, parseElement, true));
  137276. }
  137277. tsParseDelimitedListWorker(kind, parseElement, expectSuccess) {
  137278. const result = [];
  137279. for (; ; ) {
  137280. if (this.tsIsListTerminator(kind)) {
  137281. break;
  137282. }
  137283. const element2 = parseElement();
  137284. if (element2 == null) {
  137285. return void 0;
  137286. }
  137287. result.push(element2);
  137288. if (this.eat(types$12.comma)) {
  137289. continue;
  137290. }
  137291. if (this.tsIsListTerminator(kind)) {
  137292. break;
  137293. }
  137294. if (expectSuccess) {
  137295. this.expect(types$12.comma);
  137296. }
  137297. return void 0;
  137298. }
  137299. return result;
  137300. }
  137301. tsParseBracketedList(kind, parseElement, bracket, skipFirstToken) {
  137302. if (!skipFirstToken) {
  137303. if (bracket) {
  137304. this.expect(types$12.bracketL);
  137305. } else {
  137306. this.expectRelational("<");
  137307. }
  137308. }
  137309. const result = this.tsParseDelimitedList(kind, parseElement);
  137310. if (bracket) {
  137311. this.expect(types$12.bracketR);
  137312. } else {
  137313. this.expectRelational(">");
  137314. }
  137315. return result;
  137316. }
  137317. tsParseImportType() {
  137318. const node = this.startNode();
  137319. this.expect(types$12._import);
  137320. this.expect(types$12.parenL);
  137321. if (!this.match(types$12.string)) {
  137322. this.raise(this.state.start, TSErrors.UnsupportedImportTypeArgument);
  137323. }
  137324. node.argument = this.parseExprAtom();
  137325. this.expect(types$12.parenR);
  137326. if (this.eat(types$12.dot)) {
  137327. node.qualifier = this.tsParseEntityName(true);
  137328. }
  137329. if (this.isRelational("<")) {
  137330. node.typeParameters = this.tsParseTypeArguments();
  137331. }
  137332. return this.finishNode(node, "TSImportType");
  137333. }
  137334. tsParseEntityName(allowReservedWords) {
  137335. let entity = this.parseIdentifier();
  137336. while (this.eat(types$12.dot)) {
  137337. const node = this.startNodeAtNode(entity);
  137338. node.left = entity;
  137339. node.right = this.parseIdentifier(allowReservedWords);
  137340. entity = this.finishNode(node, "TSQualifiedName");
  137341. }
  137342. return entity;
  137343. }
  137344. tsParseTypeReference() {
  137345. const node = this.startNode();
  137346. node.typeName = this.tsParseEntityName(false);
  137347. if (!this.hasPrecedingLineBreak() && this.isRelational("<")) {
  137348. node.typeParameters = this.tsParseTypeArguments();
  137349. }
  137350. return this.finishNode(node, "TSTypeReference");
  137351. }
  137352. tsParseThisTypePredicate(lhs) {
  137353. this.next();
  137354. const node = this.startNodeAtNode(lhs);
  137355. node.parameterName = lhs;
  137356. node.typeAnnotation = this.tsParseTypeAnnotation(false);
  137357. node.asserts = false;
  137358. return this.finishNode(node, "TSTypePredicate");
  137359. }
  137360. tsParseThisTypeNode() {
  137361. const node = this.startNode();
  137362. this.next();
  137363. return this.finishNode(node, "TSThisType");
  137364. }
  137365. tsParseTypeQuery() {
  137366. const node = this.startNode();
  137367. this.expect(types$12._typeof);
  137368. if (this.match(types$12._import)) {
  137369. node.exprName = this.tsParseImportType();
  137370. } else {
  137371. node.exprName = this.tsParseEntityName(true);
  137372. }
  137373. return this.finishNode(node, "TSTypeQuery");
  137374. }
  137375. tsParseTypeParameter() {
  137376. const node = this.startNode();
  137377. node.name = this.parseIdentifierName(node.start);
  137378. node.constraint = this.tsEatThenParseType(types$12._extends);
  137379. node.default = this.tsEatThenParseType(types$12.eq);
  137380. return this.finishNode(node, "TSTypeParameter");
  137381. }
  137382. tsTryParseTypeParameters() {
  137383. if (this.isRelational("<")) {
  137384. return this.tsParseTypeParameters();
  137385. }
  137386. }
  137387. tsParseTypeParameters() {
  137388. const node = this.startNode();
  137389. if (this.isRelational("<") || this.match(types$12.jsxTagStart)) {
  137390. this.next();
  137391. } else {
  137392. this.unexpected();
  137393. }
  137394. node.params = this.tsParseBracketedList("TypeParametersOrArguments", this.tsParseTypeParameter.bind(this), false, true);
  137395. if (node.params.length === 0) {
  137396. this.raise(node.start, TSErrors.EmptyTypeParameters);
  137397. }
  137398. return this.finishNode(node, "TSTypeParameterDeclaration");
  137399. }
  137400. tsTryNextParseConstantContext() {
  137401. if (this.lookahead().type === types$12._const) {
  137402. this.next();
  137403. return this.tsParseTypeReference();
  137404. }
  137405. return null;
  137406. }
  137407. tsFillSignature(returnToken, signature) {
  137408. const returnTokenRequired = returnToken === types$12.arrow;
  137409. signature.typeParameters = this.tsTryParseTypeParameters();
  137410. this.expect(types$12.parenL);
  137411. signature.parameters = this.tsParseBindingListForSignature();
  137412. if (returnTokenRequired) {
  137413. signature.typeAnnotation = this.tsParseTypeOrTypePredicateAnnotation(returnToken);
  137414. } else if (this.match(returnToken)) {
  137415. signature.typeAnnotation = this.tsParseTypeOrTypePredicateAnnotation(returnToken);
  137416. }
  137417. }
  137418. tsParseBindingListForSignature() {
  137419. return this.parseBindingList(types$12.parenR, 41).map((pattern) => {
  137420. if (pattern.type !== "Identifier" && pattern.type !== "RestElement" && pattern.type !== "ObjectPattern" && pattern.type !== "ArrayPattern") {
  137421. this.raise(pattern.start, TSErrors.UnsupportedSignatureParameterKind, pattern.type);
  137422. }
  137423. return pattern;
  137424. });
  137425. }
  137426. tsParseTypeMemberSemicolon() {
  137427. if (!this.eat(types$12.comma) && !this.isLineTerminator()) {
  137428. this.expect(types$12.semi);
  137429. }
  137430. }
  137431. tsParseSignatureMember(kind, node) {
  137432. this.tsFillSignature(types$12.colon, node);
  137433. this.tsParseTypeMemberSemicolon();
  137434. return this.finishNode(node, kind);
  137435. }
  137436. tsIsUnambiguouslyIndexSignature() {
  137437. this.next();
  137438. return this.eat(types$12.name) && this.match(types$12.colon);
  137439. }
  137440. tsTryParseIndexSignature(node) {
  137441. if (!(this.match(types$12.bracketL) && this.tsLookAhead(this.tsIsUnambiguouslyIndexSignature.bind(this)))) {
  137442. return void 0;
  137443. }
  137444. this.expect(types$12.bracketL);
  137445. const id = this.parseIdentifier();
  137446. id.typeAnnotation = this.tsParseTypeAnnotation();
  137447. this.resetEndLocation(id);
  137448. this.expect(types$12.bracketR);
  137449. node.parameters = [id];
  137450. const type = this.tsTryParseTypeAnnotation();
  137451. if (type)
  137452. node.typeAnnotation = type;
  137453. this.tsParseTypeMemberSemicolon();
  137454. return this.finishNode(node, "TSIndexSignature");
  137455. }
  137456. tsParsePropertyOrMethodSignature(node, readonly) {
  137457. if (this.eat(types$12.question))
  137458. node.optional = true;
  137459. const nodeAny = node;
  137460. if (this.match(types$12.parenL) || this.isRelational("<")) {
  137461. if (readonly) {
  137462. this.raise(node.start, TSErrors.ReadonlyForMethodSignature);
  137463. }
  137464. const method = nodeAny;
  137465. if (method.kind && this.isRelational("<")) {
  137466. this.raise(this.state.pos, TSErrors.AccesorCannotHaveTypeParameters);
  137467. }
  137468. this.tsFillSignature(types$12.colon, method);
  137469. this.tsParseTypeMemberSemicolon();
  137470. if (method.kind === "get") {
  137471. if (method.parameters.length > 0) {
  137472. this.raise(this.state.pos, ErrorMessages.BadGetterArity);
  137473. if (this.isThisParam(method.parameters[0])) {
  137474. this.raise(this.state.pos, TSErrors.AccesorCannotDeclareThisParameter);
  137475. }
  137476. }
  137477. } else if (method.kind === "set") {
  137478. if (method.parameters.length !== 1) {
  137479. this.raise(this.state.pos, ErrorMessages.BadSetterArity);
  137480. } else {
  137481. const firstParameter = method.parameters[0];
  137482. if (this.isThisParam(firstParameter)) {
  137483. this.raise(this.state.pos, TSErrors.AccesorCannotDeclareThisParameter);
  137484. }
  137485. if (firstParameter.type === "Identifier" && firstParameter.optional) {
  137486. this.raise(this.state.pos, TSErrors.SetAccesorCannotHaveOptionalParameter);
  137487. }
  137488. if (firstParameter.type === "RestElement") {
  137489. this.raise(this.state.pos, TSErrors.SetAccesorCannotHaveRestParameter);
  137490. }
  137491. }
  137492. if (method.typeAnnotation) {
  137493. this.raise(method.typeAnnotation.start, TSErrors.SetAccesorCannotHaveReturnType);
  137494. }
  137495. } else {
  137496. method.kind = "method";
  137497. }
  137498. return this.finishNode(method, "TSMethodSignature");
  137499. } else {
  137500. const property = nodeAny;
  137501. if (readonly)
  137502. property.readonly = true;
  137503. const type = this.tsTryParseTypeAnnotation();
  137504. if (type)
  137505. property.typeAnnotation = type;
  137506. this.tsParseTypeMemberSemicolon();
  137507. return this.finishNode(property, "TSPropertySignature");
  137508. }
  137509. }
  137510. tsParseTypeMember() {
  137511. const node = this.startNode();
  137512. if (this.match(types$12.parenL) || this.isRelational("<")) {
  137513. return this.tsParseSignatureMember("TSCallSignatureDeclaration", node);
  137514. }
  137515. if (this.match(types$12._new)) {
  137516. const id = this.startNode();
  137517. this.next();
  137518. if (this.match(types$12.parenL) || this.isRelational("<")) {
  137519. return this.tsParseSignatureMember("TSConstructSignatureDeclaration", node);
  137520. } else {
  137521. node.key = this.createIdentifier(id, "new");
  137522. return this.tsParsePropertyOrMethodSignature(node, false);
  137523. }
  137524. }
  137525. this.tsParseModifiers(node, ["readonly"], ["declare", "abstract", "private", "protected", "public", "static", "override"], TSErrors.InvalidModifierOnTypeMember);
  137526. const idx = this.tsTryParseIndexSignature(node);
  137527. if (idx) {
  137528. return idx;
  137529. }
  137530. this.parsePropertyName(node, false);
  137531. if (!node.computed && node.key.type === "Identifier" && (node.key.name === "get" || node.key.name === "set") && this.tsTokenCanFollowModifier()) {
  137532. node.kind = node.key.name;
  137533. this.parsePropertyName(node, false);
  137534. }
  137535. return this.tsParsePropertyOrMethodSignature(node, !!node.readonly);
  137536. }
  137537. tsParseTypeLiteral() {
  137538. const node = this.startNode();
  137539. node.members = this.tsParseObjectTypeMembers();
  137540. return this.finishNode(node, "TSTypeLiteral");
  137541. }
  137542. tsParseObjectTypeMembers() {
  137543. this.expect(types$12.braceL);
  137544. const members = this.tsParseList("TypeMembers", this.tsParseTypeMember.bind(this));
  137545. this.expect(types$12.braceR);
  137546. return members;
  137547. }
  137548. tsIsStartOfMappedType() {
  137549. this.next();
  137550. if (this.eat(types$12.plusMin)) {
  137551. return this.isContextual("readonly");
  137552. }
  137553. if (this.isContextual("readonly")) {
  137554. this.next();
  137555. }
  137556. if (!this.match(types$12.bracketL)) {
  137557. return false;
  137558. }
  137559. this.next();
  137560. if (!this.tsIsIdentifier()) {
  137561. return false;
  137562. }
  137563. this.next();
  137564. return this.match(types$12._in);
  137565. }
  137566. tsParseMappedTypeParameter() {
  137567. const node = this.startNode();
  137568. node.name = this.parseIdentifierName(node.start);
  137569. node.constraint = this.tsExpectThenParseType(types$12._in);
  137570. return this.finishNode(node, "TSTypeParameter");
  137571. }
  137572. tsParseMappedType() {
  137573. const node = this.startNode();
  137574. this.expect(types$12.braceL);
  137575. if (this.match(types$12.plusMin)) {
  137576. node.readonly = this.state.value;
  137577. this.next();
  137578. this.expectContextual("readonly");
  137579. } else if (this.eatContextual("readonly")) {
  137580. node.readonly = true;
  137581. }
  137582. this.expect(types$12.bracketL);
  137583. node.typeParameter = this.tsParseMappedTypeParameter();
  137584. node.nameType = this.eatContextual("as") ? this.tsParseType() : null;
  137585. this.expect(types$12.bracketR);
  137586. if (this.match(types$12.plusMin)) {
  137587. node.optional = this.state.value;
  137588. this.next();
  137589. this.expect(types$12.question);
  137590. } else if (this.eat(types$12.question)) {
  137591. node.optional = true;
  137592. }
  137593. node.typeAnnotation = this.tsTryParseType();
  137594. this.semicolon();
  137595. this.expect(types$12.braceR);
  137596. return this.finishNode(node, "TSMappedType");
  137597. }
  137598. tsParseTupleType() {
  137599. const node = this.startNode();
  137600. node.elementTypes = this.tsParseBracketedList("TupleElementTypes", this.tsParseTupleElementType.bind(this), true, false);
  137601. let seenOptionalElement = false;
  137602. let labeledElements = null;
  137603. node.elementTypes.forEach((elementNode) => {
  137604. var _labeledElements;
  137605. let {
  137606. type
  137607. } = elementNode;
  137608. if (seenOptionalElement && type !== "TSRestType" && type !== "TSOptionalType" && !(type === "TSNamedTupleMember" && elementNode.optional)) {
  137609. this.raise(elementNode.start, TSErrors.OptionalTypeBeforeRequired);
  137610. }
  137611. seenOptionalElement = seenOptionalElement || type === "TSNamedTupleMember" && elementNode.optional || type === "TSOptionalType";
  137612. if (type === "TSRestType") {
  137613. elementNode = elementNode.typeAnnotation;
  137614. type = elementNode.type;
  137615. }
  137616. const isLabeled = type === "TSNamedTupleMember";
  137617. labeledElements = (_labeledElements = labeledElements) != null ? _labeledElements : isLabeled;
  137618. if (labeledElements !== isLabeled) {
  137619. this.raise(elementNode.start, TSErrors.MixedLabeledAndUnlabeledElements);
  137620. }
  137621. });
  137622. return this.finishNode(node, "TSTupleType");
  137623. }
  137624. tsParseTupleElementType() {
  137625. const {
  137626. start: startPos,
  137627. startLoc
  137628. } = this.state;
  137629. const rest = this.eat(types$12.ellipsis);
  137630. let type = this.tsParseType();
  137631. const optional = this.eat(types$12.question);
  137632. const labeled = this.eat(types$12.colon);
  137633. if (labeled) {
  137634. const labeledNode = this.startNodeAtNode(type);
  137635. labeledNode.optional = optional;
  137636. if (type.type === "TSTypeReference" && !type.typeParameters && type.typeName.type === "Identifier") {
  137637. labeledNode.label = type.typeName;
  137638. } else {
  137639. this.raise(type.start, TSErrors.InvalidTupleMemberLabel);
  137640. labeledNode.label = type;
  137641. }
  137642. labeledNode.elementType = this.tsParseType();
  137643. type = this.finishNode(labeledNode, "TSNamedTupleMember");
  137644. } else if (optional) {
  137645. const optionalTypeNode = this.startNodeAtNode(type);
  137646. optionalTypeNode.typeAnnotation = type;
  137647. type = this.finishNode(optionalTypeNode, "TSOptionalType");
  137648. }
  137649. if (rest) {
  137650. const restNode = this.startNodeAt(startPos, startLoc);
  137651. restNode.typeAnnotation = type;
  137652. type = this.finishNode(restNode, "TSRestType");
  137653. }
  137654. return type;
  137655. }
  137656. tsParseParenthesizedType() {
  137657. const node = this.startNode();
  137658. this.expect(types$12.parenL);
  137659. node.typeAnnotation = this.tsParseType();
  137660. this.expect(types$12.parenR);
  137661. return this.finishNode(node, "TSParenthesizedType");
  137662. }
  137663. tsParseFunctionOrConstructorType(type, abstract) {
  137664. const node = this.startNode();
  137665. if (type === "TSConstructorType") {
  137666. node.abstract = !!abstract;
  137667. if (abstract)
  137668. this.next();
  137669. this.next();
  137670. }
  137671. this.tsFillSignature(types$12.arrow, node);
  137672. return this.finishNode(node, type);
  137673. }
  137674. tsParseLiteralTypeNode() {
  137675. const node = this.startNode();
  137676. node.literal = (() => {
  137677. switch (this.state.type) {
  137678. case types$12.num:
  137679. case types$12.bigint:
  137680. case types$12.string:
  137681. case types$12._true:
  137682. case types$12._false:
  137683. return this.parseExprAtom();
  137684. default:
  137685. throw this.unexpected();
  137686. }
  137687. })();
  137688. return this.finishNode(node, "TSLiteralType");
  137689. }
  137690. tsParseTemplateLiteralType() {
  137691. const node = this.startNode();
  137692. node.literal = this.parseTemplate(false);
  137693. return this.finishNode(node, "TSLiteralType");
  137694. }
  137695. parseTemplateSubstitution() {
  137696. if (this.state.inType)
  137697. return this.tsParseType();
  137698. return super.parseTemplateSubstitution();
  137699. }
  137700. tsParseThisTypeOrThisTypePredicate() {
  137701. const thisKeyword = this.tsParseThisTypeNode();
  137702. if (this.isContextual("is") && !this.hasPrecedingLineBreak()) {
  137703. return this.tsParseThisTypePredicate(thisKeyword);
  137704. } else {
  137705. return thisKeyword;
  137706. }
  137707. }
  137708. tsParseNonArrayType() {
  137709. switch (this.state.type) {
  137710. case types$12.name:
  137711. case types$12._void:
  137712. case types$12._null: {
  137713. const type = this.match(types$12._void) ? "TSVoidKeyword" : this.match(types$12._null) ? "TSNullKeyword" : keywordTypeFromName(this.state.value);
  137714. if (type !== void 0 && this.lookaheadCharCode() !== 46) {
  137715. const node = this.startNode();
  137716. this.next();
  137717. return this.finishNode(node, type);
  137718. }
  137719. return this.tsParseTypeReference();
  137720. }
  137721. case types$12.string:
  137722. case types$12.num:
  137723. case types$12.bigint:
  137724. case types$12._true:
  137725. case types$12._false:
  137726. return this.tsParseLiteralTypeNode();
  137727. case types$12.plusMin:
  137728. if (this.state.value === "-") {
  137729. const node = this.startNode();
  137730. const nextToken = this.lookahead();
  137731. if (nextToken.type !== types$12.num && nextToken.type !== types$12.bigint) {
  137732. throw this.unexpected();
  137733. }
  137734. node.literal = this.parseMaybeUnary();
  137735. return this.finishNode(node, "TSLiteralType");
  137736. }
  137737. break;
  137738. case types$12._this:
  137739. return this.tsParseThisTypeOrThisTypePredicate();
  137740. case types$12._typeof:
  137741. return this.tsParseTypeQuery();
  137742. case types$12._import:
  137743. return this.tsParseImportType();
  137744. case types$12.braceL:
  137745. return this.tsLookAhead(this.tsIsStartOfMappedType.bind(this)) ? this.tsParseMappedType() : this.tsParseTypeLiteral();
  137746. case types$12.bracketL:
  137747. return this.tsParseTupleType();
  137748. case types$12.parenL:
  137749. return this.tsParseParenthesizedType();
  137750. case types$12.backQuote:
  137751. return this.tsParseTemplateLiteralType();
  137752. }
  137753. throw this.unexpected();
  137754. }
  137755. tsParseArrayTypeOrHigher() {
  137756. let type = this.tsParseNonArrayType();
  137757. while (!this.hasPrecedingLineBreak() && this.eat(types$12.bracketL)) {
  137758. if (this.match(types$12.bracketR)) {
  137759. const node = this.startNodeAtNode(type);
  137760. node.elementType = type;
  137761. this.expect(types$12.bracketR);
  137762. type = this.finishNode(node, "TSArrayType");
  137763. } else {
  137764. const node = this.startNodeAtNode(type);
  137765. node.objectType = type;
  137766. node.indexType = this.tsParseType();
  137767. this.expect(types$12.bracketR);
  137768. type = this.finishNode(node, "TSIndexedAccessType");
  137769. }
  137770. }
  137771. return type;
  137772. }
  137773. tsParseTypeOperator(operator) {
  137774. const node = this.startNode();
  137775. this.expectContextual(operator);
  137776. node.operator = operator;
  137777. node.typeAnnotation = this.tsParseTypeOperatorOrHigher();
  137778. if (operator === "readonly") {
  137779. this.tsCheckTypeAnnotationForReadOnly(node);
  137780. }
  137781. return this.finishNode(node, "TSTypeOperator");
  137782. }
  137783. tsCheckTypeAnnotationForReadOnly(node) {
  137784. switch (node.typeAnnotation.type) {
  137785. case "TSTupleType":
  137786. case "TSArrayType":
  137787. return;
  137788. default:
  137789. this.raise(node.start, TSErrors.UnexpectedReadonly);
  137790. }
  137791. }
  137792. tsParseInferType() {
  137793. const node = this.startNode();
  137794. this.expectContextual("infer");
  137795. const typeParameter = this.startNode();
  137796. typeParameter.name = this.parseIdentifierName(typeParameter.start);
  137797. node.typeParameter = this.finishNode(typeParameter, "TSTypeParameter");
  137798. return this.finishNode(node, "TSInferType");
  137799. }
  137800. tsParseTypeOperatorOrHigher() {
  137801. const operator = ["keyof", "unique", "readonly"].find((kw2) => this.isContextual(kw2));
  137802. return operator ? this.tsParseTypeOperator(operator) : this.isContextual("infer") ? this.tsParseInferType() : this.tsParseArrayTypeOrHigher();
  137803. }
  137804. tsParseUnionOrIntersectionType(kind, parseConstituentType, operator) {
  137805. const node = this.startNode();
  137806. const hasLeadingOperator = this.eat(operator);
  137807. const types3 = [];
  137808. do {
  137809. types3.push(parseConstituentType());
  137810. } while (this.eat(operator));
  137811. if (types3.length === 1 && !hasLeadingOperator) {
  137812. return types3[0];
  137813. }
  137814. node.types = types3;
  137815. return this.finishNode(node, kind);
  137816. }
  137817. tsParseIntersectionTypeOrHigher() {
  137818. return this.tsParseUnionOrIntersectionType("TSIntersectionType", this.tsParseTypeOperatorOrHigher.bind(this), types$12.bitwiseAND);
  137819. }
  137820. tsParseUnionTypeOrHigher() {
  137821. return this.tsParseUnionOrIntersectionType("TSUnionType", this.tsParseIntersectionTypeOrHigher.bind(this), types$12.bitwiseOR);
  137822. }
  137823. tsIsStartOfFunctionType() {
  137824. if (this.isRelational("<")) {
  137825. return true;
  137826. }
  137827. return this.match(types$12.parenL) && this.tsLookAhead(this.tsIsUnambiguouslyStartOfFunctionType.bind(this));
  137828. }
  137829. tsSkipParameterStart() {
  137830. if (this.match(types$12.name) || this.match(types$12._this)) {
  137831. this.next();
  137832. return true;
  137833. }
  137834. if (this.match(types$12.braceL)) {
  137835. let braceStackCounter = 1;
  137836. this.next();
  137837. while (braceStackCounter > 0) {
  137838. if (this.match(types$12.braceL)) {
  137839. ++braceStackCounter;
  137840. } else if (this.match(types$12.braceR)) {
  137841. --braceStackCounter;
  137842. }
  137843. this.next();
  137844. }
  137845. return true;
  137846. }
  137847. if (this.match(types$12.bracketL)) {
  137848. let braceStackCounter = 1;
  137849. this.next();
  137850. while (braceStackCounter > 0) {
  137851. if (this.match(types$12.bracketL)) {
  137852. ++braceStackCounter;
  137853. } else if (this.match(types$12.bracketR)) {
  137854. --braceStackCounter;
  137855. }
  137856. this.next();
  137857. }
  137858. return true;
  137859. }
  137860. return false;
  137861. }
  137862. tsIsUnambiguouslyStartOfFunctionType() {
  137863. this.next();
  137864. if (this.match(types$12.parenR) || this.match(types$12.ellipsis)) {
  137865. return true;
  137866. }
  137867. if (this.tsSkipParameterStart()) {
  137868. if (this.match(types$12.colon) || this.match(types$12.comma) || this.match(types$12.question) || this.match(types$12.eq)) {
  137869. return true;
  137870. }
  137871. if (this.match(types$12.parenR)) {
  137872. this.next();
  137873. if (this.match(types$12.arrow)) {
  137874. return true;
  137875. }
  137876. }
  137877. }
  137878. return false;
  137879. }
  137880. tsParseTypeOrTypePredicateAnnotation(returnToken) {
  137881. return this.tsInType(() => {
  137882. const t2 = this.startNode();
  137883. this.expect(returnToken);
  137884. const node = this.startNode();
  137885. const asserts = !!this.tsTryParse(this.tsParseTypePredicateAsserts.bind(this));
  137886. if (asserts && this.match(types$12._this)) {
  137887. let thisTypePredicate = this.tsParseThisTypeOrThisTypePredicate();
  137888. if (thisTypePredicate.type === "TSThisType") {
  137889. node.parameterName = thisTypePredicate;
  137890. node.asserts = true;
  137891. node.typeAnnotation = null;
  137892. thisTypePredicate = this.finishNode(node, "TSTypePredicate");
  137893. } else {
  137894. this.resetStartLocationFromNode(thisTypePredicate, node);
  137895. thisTypePredicate.asserts = true;
  137896. }
  137897. t2.typeAnnotation = thisTypePredicate;
  137898. return this.finishNode(t2, "TSTypeAnnotation");
  137899. }
  137900. const typePredicateVariable = this.tsIsIdentifier() && this.tsTryParse(this.tsParseTypePredicatePrefix.bind(this));
  137901. if (!typePredicateVariable) {
  137902. if (!asserts) {
  137903. return this.tsParseTypeAnnotation(false, t2);
  137904. }
  137905. node.parameterName = this.parseIdentifier();
  137906. node.asserts = asserts;
  137907. node.typeAnnotation = null;
  137908. t2.typeAnnotation = this.finishNode(node, "TSTypePredicate");
  137909. return this.finishNode(t2, "TSTypeAnnotation");
  137910. }
  137911. const type = this.tsParseTypeAnnotation(false);
  137912. node.parameterName = typePredicateVariable;
  137913. node.typeAnnotation = type;
  137914. node.asserts = asserts;
  137915. t2.typeAnnotation = this.finishNode(node, "TSTypePredicate");
  137916. return this.finishNode(t2, "TSTypeAnnotation");
  137917. });
  137918. }
  137919. tsTryParseTypeOrTypePredicateAnnotation() {
  137920. return this.match(types$12.colon) ? this.tsParseTypeOrTypePredicateAnnotation(types$12.colon) : void 0;
  137921. }
  137922. tsTryParseTypeAnnotation() {
  137923. return this.match(types$12.colon) ? this.tsParseTypeAnnotation() : void 0;
  137924. }
  137925. tsTryParseType() {
  137926. return this.tsEatThenParseType(types$12.colon);
  137927. }
  137928. tsParseTypePredicatePrefix() {
  137929. const id = this.parseIdentifier();
  137930. if (this.isContextual("is") && !this.hasPrecedingLineBreak()) {
  137931. this.next();
  137932. return id;
  137933. }
  137934. }
  137935. tsParseTypePredicateAsserts() {
  137936. if (!this.match(types$12.name) || this.state.value !== "asserts" || this.hasPrecedingLineBreak()) {
  137937. return false;
  137938. }
  137939. const containsEsc = this.state.containsEsc;
  137940. this.next();
  137941. if (!this.match(types$12.name) && !this.match(types$12._this)) {
  137942. return false;
  137943. }
  137944. if (containsEsc) {
  137945. this.raise(this.state.lastTokStart, ErrorMessages.InvalidEscapedReservedWord, "asserts");
  137946. }
  137947. return true;
  137948. }
  137949. tsParseTypeAnnotation(eatColon = true, t2 = this.startNode()) {
  137950. this.tsInType(() => {
  137951. if (eatColon)
  137952. this.expect(types$12.colon);
  137953. t2.typeAnnotation = this.tsParseType();
  137954. });
  137955. return this.finishNode(t2, "TSTypeAnnotation");
  137956. }
  137957. tsParseType() {
  137958. assert(this.state.inType);
  137959. const type = this.tsParseNonConditionalType();
  137960. if (this.hasPrecedingLineBreak() || !this.eat(types$12._extends)) {
  137961. return type;
  137962. }
  137963. const node = this.startNodeAtNode(type);
  137964. node.checkType = type;
  137965. node.extendsType = this.tsParseNonConditionalType();
  137966. this.expect(types$12.question);
  137967. node.trueType = this.tsParseType();
  137968. this.expect(types$12.colon);
  137969. node.falseType = this.tsParseType();
  137970. return this.finishNode(node, "TSConditionalType");
  137971. }
  137972. isAbstractConstructorSignature() {
  137973. return this.isContextual("abstract") && this.lookahead().type === types$12._new;
  137974. }
  137975. tsParseNonConditionalType() {
  137976. if (this.tsIsStartOfFunctionType()) {
  137977. return this.tsParseFunctionOrConstructorType("TSFunctionType");
  137978. }
  137979. if (this.match(types$12._new)) {
  137980. return this.tsParseFunctionOrConstructorType("TSConstructorType");
  137981. } else if (this.isAbstractConstructorSignature()) {
  137982. return this.tsParseFunctionOrConstructorType("TSConstructorType", true);
  137983. }
  137984. return this.tsParseUnionTypeOrHigher();
  137985. }
  137986. tsParseTypeAssertion() {
  137987. const node = this.startNode();
  137988. const _const = this.tsTryNextParseConstantContext();
  137989. node.typeAnnotation = _const || this.tsNextThenParseType();
  137990. this.expectRelational(">");
  137991. node.expression = this.parseMaybeUnary();
  137992. return this.finishNode(node, "TSTypeAssertion");
  137993. }
  137994. tsParseHeritageClause(descriptor) {
  137995. const originalStart = this.state.start;
  137996. const delimitedList = this.tsParseDelimitedList("HeritageClauseElement", this.tsParseExpressionWithTypeArguments.bind(this));
  137997. if (!delimitedList.length) {
  137998. this.raise(originalStart, TSErrors.EmptyHeritageClauseType, descriptor);
  137999. }
  138000. return delimitedList;
  138001. }
  138002. tsParseExpressionWithTypeArguments() {
  138003. const node = this.startNode();
  138004. node.expression = this.tsParseEntityName(false);
  138005. if (this.isRelational("<")) {
  138006. node.typeParameters = this.tsParseTypeArguments();
  138007. }
  138008. return this.finishNode(node, "TSExpressionWithTypeArguments");
  138009. }
  138010. tsParseInterfaceDeclaration(node) {
  138011. node.id = this.parseIdentifier();
  138012. this.checkLVal(node.id, "typescript interface declaration", BIND_TS_INTERFACE);
  138013. node.typeParameters = this.tsTryParseTypeParameters();
  138014. if (this.eat(types$12._extends)) {
  138015. node.extends = this.tsParseHeritageClause("extends");
  138016. }
  138017. const body = this.startNode();
  138018. body.body = this.tsInType(this.tsParseObjectTypeMembers.bind(this));
  138019. node.body = this.finishNode(body, "TSInterfaceBody");
  138020. return this.finishNode(node, "TSInterfaceDeclaration");
  138021. }
  138022. tsParseTypeAliasDeclaration(node) {
  138023. node.id = this.parseIdentifier();
  138024. this.checkLVal(node.id, "typescript type alias", BIND_TS_TYPE);
  138025. node.typeParameters = this.tsTryParseTypeParameters();
  138026. node.typeAnnotation = this.tsInType(() => {
  138027. this.expect(types$12.eq);
  138028. if (this.isContextual("intrinsic") && this.lookahead().type !== types$12.dot) {
  138029. const node2 = this.startNode();
  138030. this.next();
  138031. return this.finishNode(node2, "TSIntrinsicKeyword");
  138032. }
  138033. return this.tsParseType();
  138034. });
  138035. this.semicolon();
  138036. return this.finishNode(node, "TSTypeAliasDeclaration");
  138037. }
  138038. tsInNoContext(cb) {
  138039. const oldContext = this.state.context;
  138040. this.state.context = [oldContext[0]];
  138041. try {
  138042. return cb();
  138043. } finally {
  138044. this.state.context = oldContext;
  138045. }
  138046. }
  138047. tsInType(cb) {
  138048. const oldInType = this.state.inType;
  138049. this.state.inType = true;
  138050. try {
  138051. return cb();
  138052. } finally {
  138053. this.state.inType = oldInType;
  138054. }
  138055. }
  138056. tsEatThenParseType(token) {
  138057. return !this.match(token) ? void 0 : this.tsNextThenParseType();
  138058. }
  138059. tsExpectThenParseType(token) {
  138060. return this.tsDoThenParseType(() => this.expect(token));
  138061. }
  138062. tsNextThenParseType() {
  138063. return this.tsDoThenParseType(() => this.next());
  138064. }
  138065. tsDoThenParseType(cb) {
  138066. return this.tsInType(() => {
  138067. cb();
  138068. return this.tsParseType();
  138069. });
  138070. }
  138071. tsParseEnumMember() {
  138072. const node = this.startNode();
  138073. node.id = this.match(types$12.string) ? this.parseExprAtom() : this.parseIdentifier(true);
  138074. if (this.eat(types$12.eq)) {
  138075. node.initializer = this.parseMaybeAssignAllowIn();
  138076. }
  138077. return this.finishNode(node, "TSEnumMember");
  138078. }
  138079. tsParseEnumDeclaration(node, isConst) {
  138080. if (isConst)
  138081. node.const = true;
  138082. node.id = this.parseIdentifier();
  138083. this.checkLVal(node.id, "typescript enum declaration", isConst ? BIND_TS_CONST_ENUM : BIND_TS_ENUM);
  138084. this.expect(types$12.braceL);
  138085. node.members = this.tsParseDelimitedList("EnumMembers", this.tsParseEnumMember.bind(this));
  138086. this.expect(types$12.braceR);
  138087. return this.finishNode(node, "TSEnumDeclaration");
  138088. }
  138089. tsParseModuleBlock() {
  138090. const node = this.startNode();
  138091. this.scope.enter(SCOPE_OTHER);
  138092. this.expect(types$12.braceL);
  138093. this.parseBlockOrModuleBlockBody(node.body = [], void 0, true, types$12.braceR);
  138094. this.scope.exit();
  138095. return this.finishNode(node, "TSModuleBlock");
  138096. }
  138097. tsParseModuleOrNamespaceDeclaration(node, nested = false) {
  138098. node.id = this.parseIdentifier();
  138099. if (!nested) {
  138100. this.checkLVal(node.id, "module or namespace declaration", BIND_TS_NAMESPACE);
  138101. }
  138102. if (this.eat(types$12.dot)) {
  138103. const inner = this.startNode();
  138104. this.tsParseModuleOrNamespaceDeclaration(inner, true);
  138105. node.body = inner;
  138106. } else {
  138107. this.scope.enter(SCOPE_TS_MODULE);
  138108. this.prodParam.enter(PARAM);
  138109. node.body = this.tsParseModuleBlock();
  138110. this.prodParam.exit();
  138111. this.scope.exit();
  138112. }
  138113. return this.finishNode(node, "TSModuleDeclaration");
  138114. }
  138115. tsParseAmbientExternalModuleDeclaration(node) {
  138116. if (this.isContextual("global")) {
  138117. node.global = true;
  138118. node.id = this.parseIdentifier();
  138119. } else if (this.match(types$12.string)) {
  138120. node.id = this.parseExprAtom();
  138121. } else {
  138122. this.unexpected();
  138123. }
  138124. if (this.match(types$12.braceL)) {
  138125. this.scope.enter(SCOPE_TS_MODULE);
  138126. this.prodParam.enter(PARAM);
  138127. node.body = this.tsParseModuleBlock();
  138128. this.prodParam.exit();
  138129. this.scope.exit();
  138130. } else {
  138131. this.semicolon();
  138132. }
  138133. return this.finishNode(node, "TSModuleDeclaration");
  138134. }
  138135. tsParseImportEqualsDeclaration(node, isExport) {
  138136. node.isExport = isExport || false;
  138137. node.id = this.parseIdentifier();
  138138. this.checkLVal(node.id, "import equals declaration", BIND_LEXICAL2);
  138139. this.expect(types$12.eq);
  138140. const moduleReference = this.tsParseModuleReference();
  138141. if (node.importKind === "type" && moduleReference.type !== "TSExternalModuleReference") {
  138142. this.raise(moduleReference.start, TSErrors.ImportAliasHasImportType);
  138143. }
  138144. node.moduleReference = moduleReference;
  138145. this.semicolon();
  138146. return this.finishNode(node, "TSImportEqualsDeclaration");
  138147. }
  138148. tsIsExternalModuleReference() {
  138149. return this.isContextual("require") && this.lookaheadCharCode() === 40;
  138150. }
  138151. tsParseModuleReference() {
  138152. return this.tsIsExternalModuleReference() ? this.tsParseExternalModuleReference() : this.tsParseEntityName(false);
  138153. }
  138154. tsParseExternalModuleReference() {
  138155. const node = this.startNode();
  138156. this.expectContextual("require");
  138157. this.expect(types$12.parenL);
  138158. if (!this.match(types$12.string)) {
  138159. throw this.unexpected();
  138160. }
  138161. node.expression = this.parseExprAtom();
  138162. this.expect(types$12.parenR);
  138163. return this.finishNode(node, "TSExternalModuleReference");
  138164. }
  138165. tsLookAhead(f) {
  138166. const state = this.state.clone();
  138167. const res = f();
  138168. this.state = state;
  138169. return res;
  138170. }
  138171. tsTryParseAndCatch(f) {
  138172. const result = this.tryParse((abort) => f() || abort());
  138173. if (result.aborted || !result.node)
  138174. return void 0;
  138175. if (result.error)
  138176. this.state = result.failState;
  138177. return result.node;
  138178. }
  138179. tsTryParse(f) {
  138180. const state = this.state.clone();
  138181. const result = f();
  138182. if (result !== void 0 && result !== false) {
  138183. return result;
  138184. } else {
  138185. this.state = state;
  138186. return void 0;
  138187. }
  138188. }
  138189. tsTryParseDeclare(nany) {
  138190. if (this.isLineTerminator()) {
  138191. return;
  138192. }
  138193. let starttype = this.state.type;
  138194. let kind;
  138195. if (this.isContextual("let")) {
  138196. starttype = types$12._var;
  138197. kind = "let";
  138198. }
  138199. return this.tsInAmbientContext(() => {
  138200. switch (starttype) {
  138201. case types$12._function:
  138202. nany.declare = true;
  138203. return this.parseFunctionStatement(nany, false, true);
  138204. case types$12._class:
  138205. nany.declare = true;
  138206. return this.parseClass(nany, true, false);
  138207. case types$12._const:
  138208. if (this.match(types$12._const) && this.isLookaheadContextual("enum")) {
  138209. this.expect(types$12._const);
  138210. this.expectContextual("enum");
  138211. return this.tsParseEnumDeclaration(nany, true);
  138212. }
  138213. case types$12._var:
  138214. kind = kind || this.state.value;
  138215. return this.parseVarStatement(nany, kind);
  138216. case types$12.name: {
  138217. const value = this.state.value;
  138218. if (value === "global") {
  138219. return this.tsParseAmbientExternalModuleDeclaration(nany);
  138220. } else {
  138221. return this.tsParseDeclaration(nany, value, true);
  138222. }
  138223. }
  138224. }
  138225. });
  138226. }
  138227. tsTryParseExportDeclaration() {
  138228. return this.tsParseDeclaration(this.startNode(), this.state.value, true);
  138229. }
  138230. tsParseExpressionStatement(node, expr) {
  138231. switch (expr.name) {
  138232. case "declare": {
  138233. const declaration = this.tsTryParseDeclare(node);
  138234. if (declaration) {
  138235. declaration.declare = true;
  138236. return declaration;
  138237. }
  138238. break;
  138239. }
  138240. case "global":
  138241. if (this.match(types$12.braceL)) {
  138242. this.scope.enter(SCOPE_TS_MODULE);
  138243. this.prodParam.enter(PARAM);
  138244. const mod = node;
  138245. mod.global = true;
  138246. mod.id = expr;
  138247. mod.body = this.tsParseModuleBlock();
  138248. this.scope.exit();
  138249. this.prodParam.exit();
  138250. return this.finishNode(mod, "TSModuleDeclaration");
  138251. }
  138252. break;
  138253. default:
  138254. return this.tsParseDeclaration(node, expr.name, false);
  138255. }
  138256. }
  138257. tsParseDeclaration(node, value, next) {
  138258. switch (value) {
  138259. case "abstract":
  138260. if (this.tsCheckLineTerminator(next) && (this.match(types$12._class) || this.match(types$12.name))) {
  138261. return this.tsParseAbstractDeclaration(node);
  138262. }
  138263. break;
  138264. case "enum":
  138265. if (next || this.match(types$12.name)) {
  138266. if (next)
  138267. this.next();
  138268. return this.tsParseEnumDeclaration(node, false);
  138269. }
  138270. break;
  138271. case "interface":
  138272. if (this.tsCheckLineTerminator(next) && this.match(types$12.name)) {
  138273. return this.tsParseInterfaceDeclaration(node);
  138274. }
  138275. break;
  138276. case "module":
  138277. if (this.tsCheckLineTerminator(next)) {
  138278. if (this.match(types$12.string)) {
  138279. return this.tsParseAmbientExternalModuleDeclaration(node);
  138280. } else if (this.match(types$12.name)) {
  138281. return this.tsParseModuleOrNamespaceDeclaration(node);
  138282. }
  138283. }
  138284. break;
  138285. case "namespace":
  138286. if (this.tsCheckLineTerminator(next) && this.match(types$12.name)) {
  138287. return this.tsParseModuleOrNamespaceDeclaration(node);
  138288. }
  138289. break;
  138290. case "type":
  138291. if (this.tsCheckLineTerminator(next) && this.match(types$12.name)) {
  138292. return this.tsParseTypeAliasDeclaration(node);
  138293. }
  138294. break;
  138295. }
  138296. }
  138297. tsCheckLineTerminator(next) {
  138298. if (next) {
  138299. if (this.hasFollowingLineBreak())
  138300. return false;
  138301. this.next();
  138302. return true;
  138303. }
  138304. return !this.isLineTerminator();
  138305. }
  138306. tsTryParseGenericAsyncArrowFunction(startPos, startLoc) {
  138307. if (!this.isRelational("<")) {
  138308. return void 0;
  138309. }
  138310. const oldMaybeInArrowParameters = this.state.maybeInArrowParameters;
  138311. this.state.maybeInArrowParameters = true;
  138312. const res = this.tsTryParseAndCatch(() => {
  138313. const node = this.startNodeAt(startPos, startLoc);
  138314. node.typeParameters = this.tsParseTypeParameters();
  138315. super.parseFunctionParams(node);
  138316. node.returnType = this.tsTryParseTypeOrTypePredicateAnnotation();
  138317. this.expect(types$12.arrow);
  138318. return node;
  138319. });
  138320. this.state.maybeInArrowParameters = oldMaybeInArrowParameters;
  138321. if (!res) {
  138322. return void 0;
  138323. }
  138324. return this.parseArrowExpression(res, null, true);
  138325. }
  138326. tsParseTypeArguments() {
  138327. const node = this.startNode();
  138328. node.params = this.tsInType(() => this.tsInNoContext(() => {
  138329. this.expectRelational("<");
  138330. return this.tsParseDelimitedList("TypeParametersOrArguments", this.tsParseType.bind(this));
  138331. }));
  138332. if (node.params.length === 0) {
  138333. this.raise(node.start, TSErrors.EmptyTypeArguments);
  138334. }
  138335. this.expectRelational(">");
  138336. return this.finishNode(node, "TSTypeParameterInstantiation");
  138337. }
  138338. tsIsDeclarationStart() {
  138339. if (this.match(types$12.name)) {
  138340. switch (this.state.value) {
  138341. case "abstract":
  138342. case "declare":
  138343. case "enum":
  138344. case "interface":
  138345. case "module":
  138346. case "namespace":
  138347. case "type":
  138348. return true;
  138349. }
  138350. }
  138351. return false;
  138352. }
  138353. isExportDefaultSpecifier() {
  138354. if (this.tsIsDeclarationStart())
  138355. return false;
  138356. return super.isExportDefaultSpecifier();
  138357. }
  138358. parseAssignableListItem(allowModifiers, decorators) {
  138359. const startPos = this.state.start;
  138360. const startLoc = this.state.startLoc;
  138361. let accessibility;
  138362. let readonly = false;
  138363. if (allowModifiers !== void 0) {
  138364. accessibility = this.parseAccessModifier();
  138365. readonly = !!this.tsParseModifier(["readonly"]);
  138366. if (allowModifiers === false && (accessibility || readonly)) {
  138367. this.raise(startPos, TSErrors.UnexpectedParameterModifier);
  138368. }
  138369. }
  138370. const left = this.parseMaybeDefault();
  138371. this.parseAssignableListItemTypes(left);
  138372. const elt = this.parseMaybeDefault(left.start, left.loc.start, left);
  138373. if (accessibility || readonly) {
  138374. const pp2 = this.startNodeAt(startPos, startLoc);
  138375. if (decorators.length) {
  138376. pp2.decorators = decorators;
  138377. }
  138378. if (accessibility)
  138379. pp2.accessibility = accessibility;
  138380. if (readonly)
  138381. pp2.readonly = readonly;
  138382. if (elt.type !== "Identifier" && elt.type !== "AssignmentPattern") {
  138383. this.raise(pp2.start, TSErrors.UnsupportedParameterPropertyKind);
  138384. }
  138385. pp2.parameter = elt;
  138386. return this.finishNode(pp2, "TSParameterProperty");
  138387. }
  138388. if (decorators.length) {
  138389. left.decorators = decorators;
  138390. }
  138391. return elt;
  138392. }
  138393. parseFunctionBodyAndFinish(node, type, isMethod = false) {
  138394. if (this.match(types$12.colon)) {
  138395. node.returnType = this.tsParseTypeOrTypePredicateAnnotation(types$12.colon);
  138396. }
  138397. const bodilessType = type === "FunctionDeclaration" ? "TSDeclareFunction" : type === "ClassMethod" ? "TSDeclareMethod" : void 0;
  138398. if (bodilessType && !this.match(types$12.braceL) && this.isLineTerminator()) {
  138399. this.finishNode(node, bodilessType);
  138400. return;
  138401. }
  138402. if (bodilessType === "TSDeclareFunction" && this.state.isAmbientContext) {
  138403. this.raise(node.start, TSErrors.DeclareFunctionHasImplementation);
  138404. if (node.declare) {
  138405. super.parseFunctionBodyAndFinish(node, bodilessType, isMethod);
  138406. return;
  138407. }
  138408. }
  138409. super.parseFunctionBodyAndFinish(node, type, isMethod);
  138410. }
  138411. registerFunctionStatementId(node) {
  138412. if (!node.body && node.id) {
  138413. this.checkLVal(node.id, "function name", BIND_TS_AMBIENT);
  138414. } else {
  138415. super.registerFunctionStatementId(...arguments);
  138416. }
  138417. }
  138418. tsCheckForInvalidTypeCasts(items) {
  138419. items.forEach((node) => {
  138420. if ((node == null ? void 0 : node.type) === "TSTypeCastExpression") {
  138421. this.raise(node.typeAnnotation.start, TSErrors.UnexpectedTypeAnnotation);
  138422. }
  138423. });
  138424. }
  138425. toReferencedList(exprList, isInParens) {
  138426. this.tsCheckForInvalidTypeCasts(exprList);
  138427. return exprList;
  138428. }
  138429. parseArrayLike(...args) {
  138430. const node = super.parseArrayLike(...args);
  138431. if (node.type === "ArrayExpression") {
  138432. this.tsCheckForInvalidTypeCasts(node.elements);
  138433. }
  138434. return node;
  138435. }
  138436. parseSubscript(base2, startPos, startLoc, noCalls, state) {
  138437. if (!this.hasPrecedingLineBreak() && this.match(types$12.bang)) {
  138438. this.next();
  138439. const nonNullExpression = this.startNodeAt(startPos, startLoc);
  138440. nonNullExpression.expression = base2;
  138441. return this.finishNode(nonNullExpression, "TSNonNullExpression");
  138442. }
  138443. if (this.isRelational("<")) {
  138444. const result = this.tsTryParseAndCatch(() => {
  138445. if (!noCalls && this.atPossibleAsyncArrow(base2)) {
  138446. const asyncArrowFn = this.tsTryParseGenericAsyncArrowFunction(startPos, startLoc);
  138447. if (asyncArrowFn) {
  138448. return asyncArrowFn;
  138449. }
  138450. }
  138451. const node = this.startNodeAt(startPos, startLoc);
  138452. node.callee = base2;
  138453. const typeArguments = this.tsParseTypeArguments();
  138454. if (typeArguments) {
  138455. if (!noCalls && this.eat(types$12.parenL)) {
  138456. node.arguments = this.parseCallExpressionArguments(types$12.parenR, false);
  138457. this.tsCheckForInvalidTypeCasts(node.arguments);
  138458. node.typeParameters = typeArguments;
  138459. if (state.optionalChainMember) {
  138460. node.optional = false;
  138461. }
  138462. return this.finishCallExpression(node, state.optionalChainMember);
  138463. } else if (this.match(types$12.backQuote)) {
  138464. const result2 = this.parseTaggedTemplateExpression(base2, startPos, startLoc, state);
  138465. result2.typeParameters = typeArguments;
  138466. return result2;
  138467. }
  138468. }
  138469. this.unexpected();
  138470. });
  138471. if (result)
  138472. return result;
  138473. }
  138474. return super.parseSubscript(base2, startPos, startLoc, noCalls, state);
  138475. }
  138476. parseNewArguments(node) {
  138477. if (this.isRelational("<")) {
  138478. const typeParameters = this.tsTryParseAndCatch(() => {
  138479. const args = this.tsParseTypeArguments();
  138480. if (!this.match(types$12.parenL))
  138481. this.unexpected();
  138482. return args;
  138483. });
  138484. if (typeParameters) {
  138485. node.typeParameters = typeParameters;
  138486. }
  138487. }
  138488. super.parseNewArguments(node);
  138489. }
  138490. parseExprOp(left, leftStartPos, leftStartLoc, minPrec) {
  138491. if (nonNull(types$12._in.binop) > minPrec && !this.hasPrecedingLineBreak() && this.isContextual("as")) {
  138492. const node = this.startNodeAt(leftStartPos, leftStartLoc);
  138493. node.expression = left;
  138494. const _const = this.tsTryNextParseConstantContext();
  138495. if (_const) {
  138496. node.typeAnnotation = _const;
  138497. } else {
  138498. node.typeAnnotation = this.tsNextThenParseType();
  138499. }
  138500. this.finishNode(node, "TSAsExpression");
  138501. this.reScan_lt_gt();
  138502. return this.parseExprOp(node, leftStartPos, leftStartLoc, minPrec);
  138503. }
  138504. return super.parseExprOp(left, leftStartPos, leftStartLoc, minPrec);
  138505. }
  138506. checkReservedWord(word, startLoc, checkKeywords, isBinding) {
  138507. }
  138508. checkDuplicateExports() {
  138509. }
  138510. parseImport(node) {
  138511. node.importKind = "value";
  138512. if (this.match(types$12.name) || this.match(types$12.star) || this.match(types$12.braceL)) {
  138513. let ahead = this.lookahead();
  138514. if (this.isContextual("type") && ahead.type !== types$12.comma && !(ahead.type === types$12.name && ahead.value === "from") && ahead.type !== types$12.eq) {
  138515. node.importKind = "type";
  138516. this.next();
  138517. ahead = this.lookahead();
  138518. }
  138519. if (this.match(types$12.name) && ahead.type === types$12.eq) {
  138520. return this.tsParseImportEqualsDeclaration(node);
  138521. }
  138522. }
  138523. const importNode = super.parseImport(node);
  138524. if (importNode.importKind === "type" && importNode.specifiers.length > 1 && importNode.specifiers[0].type === "ImportDefaultSpecifier") {
  138525. this.raise(importNode.start, TSErrors.TypeImportCannotSpecifyDefaultAndNamed);
  138526. }
  138527. return importNode;
  138528. }
  138529. parseExport(node) {
  138530. if (this.match(types$12._import)) {
  138531. this.next();
  138532. if (this.isContextual("type") && this.lookaheadCharCode() !== 61) {
  138533. node.importKind = "type";
  138534. this.next();
  138535. } else {
  138536. node.importKind = "value";
  138537. }
  138538. return this.tsParseImportEqualsDeclaration(node, true);
  138539. } else if (this.eat(types$12.eq)) {
  138540. const assign = node;
  138541. assign.expression = this.parseExpression();
  138542. this.semicolon();
  138543. return this.finishNode(assign, "TSExportAssignment");
  138544. } else if (this.eatContextual("as")) {
  138545. const decl = node;
  138546. this.expectContextual("namespace");
  138547. decl.id = this.parseIdentifier();
  138548. this.semicolon();
  138549. return this.finishNode(decl, "TSNamespaceExportDeclaration");
  138550. } else {
  138551. if (this.isContextual("type") && this.lookahead().type === types$12.braceL) {
  138552. this.next();
  138553. node.exportKind = "type";
  138554. } else {
  138555. node.exportKind = "value";
  138556. }
  138557. return super.parseExport(node);
  138558. }
  138559. }
  138560. isAbstractClass() {
  138561. return this.isContextual("abstract") && this.lookahead().type === types$12._class;
  138562. }
  138563. parseExportDefaultExpression() {
  138564. if (this.isAbstractClass()) {
  138565. const cls = this.startNode();
  138566. this.next();
  138567. cls.abstract = true;
  138568. this.parseClass(cls, true, true);
  138569. return cls;
  138570. }
  138571. if (this.state.value === "interface") {
  138572. const result = this.tsParseDeclaration(this.startNode(), this.state.value, true);
  138573. if (result)
  138574. return result;
  138575. }
  138576. return super.parseExportDefaultExpression();
  138577. }
  138578. parseStatementContent(context, topLevel) {
  138579. if (this.state.type === types$12._const) {
  138580. const ahead = this.lookahead();
  138581. if (ahead.type === types$12.name && ahead.value === "enum") {
  138582. const node = this.startNode();
  138583. this.expect(types$12._const);
  138584. this.expectContextual("enum");
  138585. return this.tsParseEnumDeclaration(node, true);
  138586. }
  138587. }
  138588. return super.parseStatementContent(context, topLevel);
  138589. }
  138590. parseAccessModifier() {
  138591. return this.tsParseModifier(["public", "protected", "private"]);
  138592. }
  138593. tsHasSomeModifiers(member, modifiers) {
  138594. return modifiers.some((modifier) => {
  138595. if (tsIsAccessModifier(modifier)) {
  138596. return member.accessibility === modifier;
  138597. }
  138598. return !!member[modifier];
  138599. });
  138600. }
  138601. parseClassMember(classBody, member, state) {
  138602. const invalidModifersForStaticBlocks = ["declare", "private", "public", "protected", "override", "abstract", "readonly"];
  138603. this.tsParseModifiers(member, invalidModifersForStaticBlocks.concat(["static"]));
  138604. const callParseClassMemberWithIsStatic = () => {
  138605. const isStatic = !!member.static;
  138606. if (isStatic && this.eat(types$12.braceL)) {
  138607. if (this.tsHasSomeModifiers(member, invalidModifersForStaticBlocks)) {
  138608. this.raise(this.state.pos, TSErrors.StaticBlockCannotHaveModifier);
  138609. }
  138610. this.parseClassStaticBlock(classBody, member);
  138611. } else {
  138612. this.parseClassMemberWithIsStatic(classBody, member, state, isStatic);
  138613. }
  138614. };
  138615. if (member.declare) {
  138616. this.tsInAmbientContext(callParseClassMemberWithIsStatic);
  138617. } else {
  138618. callParseClassMemberWithIsStatic();
  138619. }
  138620. }
  138621. parseClassMemberWithIsStatic(classBody, member, state, isStatic) {
  138622. const idx = this.tsTryParseIndexSignature(member);
  138623. if (idx) {
  138624. classBody.body.push(idx);
  138625. if (member.abstract) {
  138626. this.raise(member.start, TSErrors.IndexSignatureHasAbstract);
  138627. }
  138628. if (member.accessibility) {
  138629. this.raise(member.start, TSErrors.IndexSignatureHasAccessibility, member.accessibility);
  138630. }
  138631. if (member.declare) {
  138632. this.raise(member.start, TSErrors.IndexSignatureHasDeclare);
  138633. }
  138634. if (member.override) {
  138635. this.raise(member.start, TSErrors.IndexSignatureHasOverride);
  138636. }
  138637. return;
  138638. }
  138639. if (!this.state.inAbstractClass && member.abstract) {
  138640. this.raise(member.start, TSErrors.NonAbstractClassHasAbstractMethod);
  138641. }
  138642. if (member.override) {
  138643. if (!state.hadSuperClass) {
  138644. this.raise(member.start, TSErrors.OverrideNotInSubClass);
  138645. }
  138646. }
  138647. super.parseClassMemberWithIsStatic(classBody, member, state, isStatic);
  138648. }
  138649. parsePostMemberNameModifiers(methodOrProp) {
  138650. const optional = this.eat(types$12.question);
  138651. if (optional)
  138652. methodOrProp.optional = true;
  138653. if (methodOrProp.readonly && this.match(types$12.parenL)) {
  138654. this.raise(methodOrProp.start, TSErrors.ClassMethodHasReadonly);
  138655. }
  138656. if (methodOrProp.declare && this.match(types$12.parenL)) {
  138657. this.raise(methodOrProp.start, TSErrors.ClassMethodHasDeclare);
  138658. }
  138659. }
  138660. parseExpressionStatement(node, expr) {
  138661. const decl = expr.type === "Identifier" ? this.tsParseExpressionStatement(node, expr) : void 0;
  138662. return decl || super.parseExpressionStatement(node, expr);
  138663. }
  138664. shouldParseExportDeclaration() {
  138665. if (this.tsIsDeclarationStart())
  138666. return true;
  138667. return super.shouldParseExportDeclaration();
  138668. }
  138669. parseConditional(expr, startPos, startLoc, refNeedsArrowPos) {
  138670. if (!refNeedsArrowPos || !this.match(types$12.question)) {
  138671. return super.parseConditional(expr, startPos, startLoc, refNeedsArrowPos);
  138672. }
  138673. const result = this.tryParse(() => super.parseConditional(expr, startPos, startLoc));
  138674. if (!result.node) {
  138675. refNeedsArrowPos.start = result.error.pos || this.state.start;
  138676. return expr;
  138677. }
  138678. if (result.error)
  138679. this.state = result.failState;
  138680. return result.node;
  138681. }
  138682. parseParenItem(node, startPos, startLoc) {
  138683. node = super.parseParenItem(node, startPos, startLoc);
  138684. if (this.eat(types$12.question)) {
  138685. node.optional = true;
  138686. this.resetEndLocation(node);
  138687. }
  138688. if (this.match(types$12.colon)) {
  138689. const typeCastNode = this.startNodeAt(startPos, startLoc);
  138690. typeCastNode.expression = node;
  138691. typeCastNode.typeAnnotation = this.tsParseTypeAnnotation();
  138692. return this.finishNode(typeCastNode, "TSTypeCastExpression");
  138693. }
  138694. return node;
  138695. }
  138696. parseExportDeclaration(node) {
  138697. const startPos = this.state.start;
  138698. const startLoc = this.state.startLoc;
  138699. const isDeclare = this.eatContextual("declare");
  138700. if (isDeclare && (this.isContextual("declare") || !this.shouldParseExportDeclaration())) {
  138701. throw this.raise(this.state.start, TSErrors.ExpectedAmbientAfterExportDeclare);
  138702. }
  138703. let declaration;
  138704. if (this.match(types$12.name)) {
  138705. declaration = this.tsTryParseExportDeclaration();
  138706. }
  138707. if (!declaration) {
  138708. declaration = super.parseExportDeclaration(node);
  138709. }
  138710. if (declaration && (declaration.type === "TSInterfaceDeclaration" || declaration.type === "TSTypeAliasDeclaration" || isDeclare)) {
  138711. node.exportKind = "type";
  138712. }
  138713. if (declaration && isDeclare) {
  138714. this.resetStartLocation(declaration, startPos, startLoc);
  138715. declaration.declare = true;
  138716. }
  138717. return declaration;
  138718. }
  138719. parseClassId(node, isStatement, optionalId) {
  138720. if ((!isStatement || optionalId) && this.isContextual("implements")) {
  138721. return;
  138722. }
  138723. super.parseClassId(node, isStatement, optionalId, node.declare ? BIND_TS_AMBIENT : BIND_CLASS);
  138724. const typeParameters = this.tsTryParseTypeParameters();
  138725. if (typeParameters)
  138726. node.typeParameters = typeParameters;
  138727. }
  138728. parseClassPropertyAnnotation(node) {
  138729. if (!node.optional && this.eat(types$12.bang)) {
  138730. node.definite = true;
  138731. }
  138732. const type = this.tsTryParseTypeAnnotation();
  138733. if (type)
  138734. node.typeAnnotation = type;
  138735. }
  138736. parseClassProperty(node) {
  138737. this.parseClassPropertyAnnotation(node);
  138738. if (this.state.isAmbientContext && this.match(types$12.eq)) {
  138739. this.raise(this.state.start, TSErrors.DeclareClassFieldHasInitializer);
  138740. }
  138741. return super.parseClassProperty(node);
  138742. }
  138743. parseClassPrivateProperty(node) {
  138744. if (node.abstract) {
  138745. this.raise(node.start, TSErrors.PrivateElementHasAbstract);
  138746. }
  138747. if (node.accessibility) {
  138748. this.raise(node.start, TSErrors.PrivateElementHasAccessibility, node.accessibility);
  138749. }
  138750. this.parseClassPropertyAnnotation(node);
  138751. return super.parseClassPrivateProperty(node);
  138752. }
  138753. pushClassMethod(classBody, method, isGenerator, isAsync, isConstructor, allowsDirectSuper) {
  138754. const typeParameters = this.tsTryParseTypeParameters();
  138755. if (typeParameters && isConstructor) {
  138756. this.raise(typeParameters.start, TSErrors.ConstructorHasTypeParameters);
  138757. }
  138758. if (method.declare && (method.kind === "get" || method.kind === "set")) {
  138759. this.raise(method.start, TSErrors.DeclareAccessor, method.kind);
  138760. }
  138761. if (typeParameters)
  138762. method.typeParameters = typeParameters;
  138763. super.pushClassMethod(classBody, method, isGenerator, isAsync, isConstructor, allowsDirectSuper);
  138764. }
  138765. pushClassPrivateMethod(classBody, method, isGenerator, isAsync) {
  138766. const typeParameters = this.tsTryParseTypeParameters();
  138767. if (typeParameters)
  138768. method.typeParameters = typeParameters;
  138769. super.pushClassPrivateMethod(classBody, method, isGenerator, isAsync);
  138770. }
  138771. parseClassSuper(node) {
  138772. super.parseClassSuper(node);
  138773. if (node.superClass && this.isRelational("<")) {
  138774. node.superTypeParameters = this.tsParseTypeArguments();
  138775. }
  138776. if (this.eatContextual("implements")) {
  138777. node.implements = this.tsParseHeritageClause("implements");
  138778. }
  138779. }
  138780. parseObjPropValue(prop, ...args) {
  138781. const typeParameters = this.tsTryParseTypeParameters();
  138782. if (typeParameters)
  138783. prop.typeParameters = typeParameters;
  138784. super.parseObjPropValue(prop, ...args);
  138785. }
  138786. parseFunctionParams(node, allowModifiers) {
  138787. const typeParameters = this.tsTryParseTypeParameters();
  138788. if (typeParameters)
  138789. node.typeParameters = typeParameters;
  138790. super.parseFunctionParams(node, allowModifiers);
  138791. }
  138792. parseVarId(decl, kind) {
  138793. super.parseVarId(decl, kind);
  138794. if (decl.id.type === "Identifier" && this.eat(types$12.bang)) {
  138795. decl.definite = true;
  138796. }
  138797. const type = this.tsTryParseTypeAnnotation();
  138798. if (type) {
  138799. decl.id.typeAnnotation = type;
  138800. this.resetEndLocation(decl.id);
  138801. }
  138802. }
  138803. parseAsyncArrowFromCallExpression(node, call) {
  138804. if (this.match(types$12.colon)) {
  138805. node.returnType = this.tsParseTypeAnnotation();
  138806. }
  138807. return super.parseAsyncArrowFromCallExpression(node, call);
  138808. }
  138809. parseMaybeAssign(...args) {
  138810. var _jsx, _jsx2, _typeCast, _jsx3, _typeCast2, _jsx4, _typeCast3;
  138811. let state;
  138812. let jsx2;
  138813. let typeCast;
  138814. if (this.hasPlugin("jsx") && (this.match(types$12.jsxTagStart) || this.isRelational("<"))) {
  138815. state = this.state.clone();
  138816. jsx2 = this.tryParse(() => super.parseMaybeAssign(...args), state);
  138817. if (!jsx2.error)
  138818. return jsx2.node;
  138819. const {
  138820. context
  138821. } = this.state;
  138822. if (context[context.length - 1] === types2.j_oTag) {
  138823. context.length -= 2;
  138824. } else if (context[context.length - 1] === types2.j_expr) {
  138825. context.length -= 1;
  138826. }
  138827. }
  138828. if (!((_jsx = jsx2) != null && _jsx.error) && !this.isRelational("<")) {
  138829. return super.parseMaybeAssign(...args);
  138830. }
  138831. let typeParameters;
  138832. state = state || this.state.clone();
  138833. const arrow = this.tryParse((abort) => {
  138834. var _expr$extra, _typeParameters;
  138835. typeParameters = this.tsParseTypeParameters();
  138836. const expr = super.parseMaybeAssign(...args);
  138837. if (expr.type !== "ArrowFunctionExpression" || (_expr$extra = expr.extra) != null && _expr$extra.parenthesized) {
  138838. abort();
  138839. }
  138840. if (((_typeParameters = typeParameters) == null ? void 0 : _typeParameters.params.length) !== 0) {
  138841. this.resetStartLocationFromNode(expr, typeParameters);
  138842. }
  138843. expr.typeParameters = typeParameters;
  138844. return expr;
  138845. }, state);
  138846. if (!arrow.error && !arrow.aborted)
  138847. return arrow.node;
  138848. if (!jsx2) {
  138849. assert(!this.hasPlugin("jsx"));
  138850. typeCast = this.tryParse(() => super.parseMaybeAssign(...args), state);
  138851. if (!typeCast.error)
  138852. return typeCast.node;
  138853. }
  138854. if ((_jsx2 = jsx2) != null && _jsx2.node) {
  138855. this.state = jsx2.failState;
  138856. return jsx2.node;
  138857. }
  138858. if (arrow.node) {
  138859. this.state = arrow.failState;
  138860. return arrow.node;
  138861. }
  138862. if ((_typeCast = typeCast) != null && _typeCast.node) {
  138863. this.state = typeCast.failState;
  138864. return typeCast.node;
  138865. }
  138866. if ((_jsx3 = jsx2) != null && _jsx3.thrown)
  138867. throw jsx2.error;
  138868. if (arrow.thrown)
  138869. throw arrow.error;
  138870. if ((_typeCast2 = typeCast) != null && _typeCast2.thrown)
  138871. throw typeCast.error;
  138872. throw ((_jsx4 = jsx2) == null ? void 0 : _jsx4.error) || arrow.error || ((_typeCast3 = typeCast) == null ? void 0 : _typeCast3.error);
  138873. }
  138874. parseMaybeUnary(refExpressionErrors) {
  138875. if (!this.hasPlugin("jsx") && this.isRelational("<")) {
  138876. return this.tsParseTypeAssertion();
  138877. } else {
  138878. return super.parseMaybeUnary(refExpressionErrors);
  138879. }
  138880. }
  138881. parseArrow(node) {
  138882. if (this.match(types$12.colon)) {
  138883. const result = this.tryParse((abort) => {
  138884. const returnType = this.tsParseTypeOrTypePredicateAnnotation(types$12.colon);
  138885. if (this.canInsertSemicolon() || !this.match(types$12.arrow))
  138886. abort();
  138887. return returnType;
  138888. });
  138889. if (result.aborted)
  138890. return;
  138891. if (!result.thrown) {
  138892. if (result.error)
  138893. this.state = result.failState;
  138894. node.returnType = result.node;
  138895. }
  138896. }
  138897. return super.parseArrow(node);
  138898. }
  138899. parseAssignableListItemTypes(param) {
  138900. if (this.eat(types$12.question)) {
  138901. if (param.type !== "Identifier" && !this.state.isAmbientContext && !this.state.inType) {
  138902. this.raise(param.start, TSErrors.PatternIsOptional);
  138903. }
  138904. param.optional = true;
  138905. }
  138906. const type = this.tsTryParseTypeAnnotation();
  138907. if (type)
  138908. param.typeAnnotation = type;
  138909. this.resetEndLocation(param);
  138910. return param;
  138911. }
  138912. toAssignable(node, isLHS = false) {
  138913. switch (node.type) {
  138914. case "TSTypeCastExpression":
  138915. return super.toAssignable(this.typeCastToParameter(node), isLHS);
  138916. case "TSParameterProperty":
  138917. return super.toAssignable(node, isLHS);
  138918. case "ParenthesizedExpression":
  138919. return this.toAssignableParenthesizedExpression(node, isLHS);
  138920. case "TSAsExpression":
  138921. case "TSNonNullExpression":
  138922. case "TSTypeAssertion":
  138923. node.expression = this.toAssignable(node.expression, isLHS);
  138924. return node;
  138925. default:
  138926. return super.toAssignable(node, isLHS);
  138927. }
  138928. }
  138929. toAssignableParenthesizedExpression(node, isLHS) {
  138930. switch (node.expression.type) {
  138931. case "TSAsExpression":
  138932. case "TSNonNullExpression":
  138933. case "TSTypeAssertion":
  138934. case "ParenthesizedExpression":
  138935. node.expression = this.toAssignable(node.expression, isLHS);
  138936. return node;
  138937. default:
  138938. return super.toAssignable(node, isLHS);
  138939. }
  138940. }
  138941. checkLVal(expr, contextDescription, ...args) {
  138942. var _expr$extra2;
  138943. switch (expr.type) {
  138944. case "TSTypeCastExpression":
  138945. return;
  138946. case "TSParameterProperty":
  138947. this.checkLVal(expr.parameter, "parameter property", ...args);
  138948. return;
  138949. case "TSAsExpression":
  138950. case "TSTypeAssertion":
  138951. if (!args[0] && contextDescription !== "parenthesized expression" && !((_expr$extra2 = expr.extra) != null && _expr$extra2.parenthesized)) {
  138952. this.raise(expr.start, ErrorMessages.InvalidLhs, contextDescription);
  138953. break;
  138954. }
  138955. this.checkLVal(expr.expression, "parenthesized expression", ...args);
  138956. return;
  138957. case "TSNonNullExpression":
  138958. this.checkLVal(expr.expression, contextDescription, ...args);
  138959. return;
  138960. default:
  138961. super.checkLVal(expr, contextDescription, ...args);
  138962. return;
  138963. }
  138964. }
  138965. parseBindingAtom() {
  138966. switch (this.state.type) {
  138967. case types$12._this:
  138968. return this.parseIdentifier(true);
  138969. default:
  138970. return super.parseBindingAtom();
  138971. }
  138972. }
  138973. parseMaybeDecoratorArguments(expr) {
  138974. if (this.isRelational("<")) {
  138975. const typeArguments = this.tsParseTypeArguments();
  138976. if (this.match(types$12.parenL)) {
  138977. const call = super.parseMaybeDecoratorArguments(expr);
  138978. call.typeParameters = typeArguments;
  138979. return call;
  138980. }
  138981. this.unexpected(this.state.start, types$12.parenL);
  138982. }
  138983. return super.parseMaybeDecoratorArguments(expr);
  138984. }
  138985. checkCommaAfterRest(close) {
  138986. if (this.state.isAmbientContext && this.match(types$12.comma) && this.lookaheadCharCode() === close) {
  138987. this.next();
  138988. } else {
  138989. super.checkCommaAfterRest(close);
  138990. }
  138991. }
  138992. isClassMethod() {
  138993. return this.isRelational("<") || super.isClassMethod();
  138994. }
  138995. isClassProperty() {
  138996. return this.match(types$12.bang) || this.match(types$12.colon) || super.isClassProperty();
  138997. }
  138998. parseMaybeDefault(...args) {
  138999. const node = super.parseMaybeDefault(...args);
  139000. if (node.type === "AssignmentPattern" && node.typeAnnotation && node.right.start < node.typeAnnotation.start) {
  139001. this.raise(node.typeAnnotation.start, TSErrors.TypeAnnotationAfterAssign);
  139002. }
  139003. return node;
  139004. }
  139005. getTokenFromCode(code2) {
  139006. if (this.state.inType && (code2 === 62 || code2 === 60)) {
  139007. return this.finishOp(types$12.relational, 1);
  139008. } else {
  139009. return super.getTokenFromCode(code2);
  139010. }
  139011. }
  139012. reScan_lt_gt() {
  139013. if (this.match(types$12.relational)) {
  139014. const code2 = this.input.charCodeAt(this.state.start);
  139015. if (code2 === 60 || code2 === 62) {
  139016. this.state.pos -= 1;
  139017. this.readToken_lt_gt(code2);
  139018. }
  139019. }
  139020. }
  139021. toAssignableList(exprList) {
  139022. for (let i = 0; i < exprList.length; i++) {
  139023. const expr = exprList[i];
  139024. if (!expr)
  139025. continue;
  139026. switch (expr.type) {
  139027. case "TSTypeCastExpression":
  139028. exprList[i] = this.typeCastToParameter(expr);
  139029. break;
  139030. case "TSAsExpression":
  139031. case "TSTypeAssertion":
  139032. if (!this.state.maybeInArrowParameters) {
  139033. exprList[i] = this.typeCastToParameter(expr);
  139034. } else {
  139035. this.raise(expr.start, TSErrors.UnexpectedTypeCastInParameter);
  139036. }
  139037. break;
  139038. }
  139039. }
  139040. return super.toAssignableList(...arguments);
  139041. }
  139042. typeCastToParameter(node) {
  139043. node.expression.typeAnnotation = node.typeAnnotation;
  139044. this.resetEndLocation(node.expression, node.typeAnnotation.end, node.typeAnnotation.loc.end);
  139045. return node.expression;
  139046. }
  139047. shouldParseArrow() {
  139048. return this.match(types$12.colon) || super.shouldParseArrow();
  139049. }
  139050. shouldParseAsyncArrow() {
  139051. return this.match(types$12.colon) || super.shouldParseAsyncArrow();
  139052. }
  139053. canHaveLeadingDecorator() {
  139054. return super.canHaveLeadingDecorator() || this.isAbstractClass();
  139055. }
  139056. jsxParseOpeningElementAfterName(node) {
  139057. if (this.isRelational("<")) {
  139058. const typeArguments = this.tsTryParseAndCatch(() => this.tsParseTypeArguments());
  139059. if (typeArguments)
  139060. node.typeParameters = typeArguments;
  139061. }
  139062. return super.jsxParseOpeningElementAfterName(node);
  139063. }
  139064. getGetterSetterExpectedParamCount(method) {
  139065. const baseCount = super.getGetterSetterExpectedParamCount(method);
  139066. const params = this.getObjectOrClassMethodParams(method);
  139067. const firstParam = params[0];
  139068. const hasContextParam = firstParam && this.isThisParam(firstParam);
  139069. return hasContextParam ? baseCount + 1 : baseCount;
  139070. }
  139071. parseCatchClauseParam() {
  139072. const param = super.parseCatchClauseParam();
  139073. const type = this.tsTryParseTypeAnnotation();
  139074. if (type) {
  139075. param.typeAnnotation = type;
  139076. this.resetEndLocation(param);
  139077. }
  139078. return param;
  139079. }
  139080. tsInAmbientContext(cb) {
  139081. const oldIsAmbientContext = this.state.isAmbientContext;
  139082. this.state.isAmbientContext = true;
  139083. try {
  139084. return cb();
  139085. } finally {
  139086. this.state.isAmbientContext = oldIsAmbientContext;
  139087. }
  139088. }
  139089. parseClass(node, ...args) {
  139090. const oldInAbstractClass = this.state.inAbstractClass;
  139091. this.state.inAbstractClass = !!node.abstract;
  139092. try {
  139093. return super.parseClass(node, ...args);
  139094. } finally {
  139095. this.state.inAbstractClass = oldInAbstractClass;
  139096. }
  139097. }
  139098. tsParseAbstractDeclaration(node) {
  139099. if (this.match(types$12._class)) {
  139100. node.abstract = true;
  139101. return this.parseClass(node, true, false);
  139102. } else if (this.isContextual("interface")) {
  139103. if (!this.hasFollowingLineBreak()) {
  139104. node.abstract = true;
  139105. this.raise(node.start, TSErrors.NonClassMethodPropertyHasAbstractModifer);
  139106. this.next();
  139107. return this.tsParseInterfaceDeclaration(node);
  139108. }
  139109. } else {
  139110. this.unexpected(null, types$12._class);
  139111. }
  139112. }
  139113. parseMethod(...args) {
  139114. const method = super.parseMethod(...args);
  139115. if (method.abstract) {
  139116. const hasBody = this.hasPlugin("estree") ? !!method.value.body : !!method.body;
  139117. if (hasBody) {
  139118. const {
  139119. key
  139120. } = method;
  139121. this.raise(method.start, TSErrors.AbstractMethodHasImplementation, key.type === "Identifier" ? key.name : `[${this.input.slice(key.start, key.end)}]`);
  139122. }
  139123. }
  139124. return method;
  139125. }
  139126. shouldParseAsAmbientContext() {
  139127. return !!this.getPluginOption("typescript", "dts");
  139128. }
  139129. parse() {
  139130. if (this.shouldParseAsAmbientContext()) {
  139131. this.state.isAmbientContext = true;
  139132. }
  139133. return super.parse();
  139134. }
  139135. getExpression() {
  139136. if (this.shouldParseAsAmbientContext()) {
  139137. this.state.isAmbientContext = true;
  139138. }
  139139. return super.getExpression();
  139140. }
  139141. };
  139142. types$12.placeholder = new TokenType3("%%", {
  139143. startsExpr: true
  139144. });
  139145. var PlaceHolderErrors = makeErrorTemplates({
  139146. ClassNameIsRequired: "A class name is required."
  139147. }, ErrorCodes.SyntaxError);
  139148. var placeholders = (superClass) => class extends superClass {
  139149. parsePlaceholder(expectedNode) {
  139150. if (this.match(types$12.placeholder)) {
  139151. const node = this.startNode();
  139152. this.next();
  139153. this.assertNoSpace("Unexpected space in placeholder.");
  139154. node.name = super.parseIdentifier(true);
  139155. this.assertNoSpace("Unexpected space in placeholder.");
  139156. this.expect(types$12.placeholder);
  139157. return this.finishPlaceholder(node, expectedNode);
  139158. }
  139159. }
  139160. finishPlaceholder(node, expectedNode) {
  139161. const isFinished = !!(node.expectedNode && node.type === "Placeholder");
  139162. node.expectedNode = expectedNode;
  139163. return isFinished ? node : this.finishNode(node, "Placeholder");
  139164. }
  139165. getTokenFromCode(code2) {
  139166. if (code2 === 37 && this.input.charCodeAt(this.state.pos + 1) === 37) {
  139167. return this.finishOp(types$12.placeholder, 2);
  139168. }
  139169. return super.getTokenFromCode(...arguments);
  139170. }
  139171. parseExprAtom() {
  139172. return this.parsePlaceholder("Expression") || super.parseExprAtom(...arguments);
  139173. }
  139174. parseIdentifier() {
  139175. return this.parsePlaceholder("Identifier") || super.parseIdentifier(...arguments);
  139176. }
  139177. checkReservedWord(word) {
  139178. if (word !== void 0)
  139179. super.checkReservedWord(...arguments);
  139180. }
  139181. parseBindingAtom() {
  139182. return this.parsePlaceholder("Pattern") || super.parseBindingAtom(...arguments);
  139183. }
  139184. checkLVal(expr) {
  139185. if (expr.type !== "Placeholder")
  139186. super.checkLVal(...arguments);
  139187. }
  139188. toAssignable(node) {
  139189. if (node && node.type === "Placeholder" && node.expectedNode === "Expression") {
  139190. node.expectedNode = "Pattern";
  139191. return node;
  139192. }
  139193. return super.toAssignable(...arguments);
  139194. }
  139195. isLet(context) {
  139196. if (super.isLet(context)) {
  139197. return true;
  139198. }
  139199. if (!this.isContextual("let")) {
  139200. return false;
  139201. }
  139202. if (context)
  139203. return false;
  139204. const nextToken = this.lookahead();
  139205. if (nextToken.type === types$12.placeholder) {
  139206. return true;
  139207. }
  139208. return false;
  139209. }
  139210. verifyBreakContinue(node) {
  139211. if (node.label && node.label.type === "Placeholder")
  139212. return;
  139213. super.verifyBreakContinue(...arguments);
  139214. }
  139215. parseExpressionStatement(node, expr) {
  139216. if (expr.type !== "Placeholder" || expr.extra && expr.extra.parenthesized) {
  139217. return super.parseExpressionStatement(...arguments);
  139218. }
  139219. if (this.match(types$12.colon)) {
  139220. const stmt = node;
  139221. stmt.label = this.finishPlaceholder(expr, "Identifier");
  139222. this.next();
  139223. stmt.body = this.parseStatement("label");
  139224. return this.finishNode(stmt, "LabeledStatement");
  139225. }
  139226. this.semicolon();
  139227. node.name = expr.name;
  139228. return this.finishPlaceholder(node, "Statement");
  139229. }
  139230. parseBlock() {
  139231. return this.parsePlaceholder("BlockStatement") || super.parseBlock(...arguments);
  139232. }
  139233. parseFunctionId() {
  139234. return this.parsePlaceholder("Identifier") || super.parseFunctionId(...arguments);
  139235. }
  139236. parseClass(node, isStatement, optionalId) {
  139237. const type = isStatement ? "ClassDeclaration" : "ClassExpression";
  139238. this.next();
  139239. this.takeDecorators(node);
  139240. const oldStrict = this.state.strict;
  139241. const placeholder = this.parsePlaceholder("Identifier");
  139242. if (placeholder) {
  139243. if (this.match(types$12._extends) || this.match(types$12.placeholder) || this.match(types$12.braceL)) {
  139244. node.id = placeholder;
  139245. } else if (optionalId || !isStatement) {
  139246. node.id = null;
  139247. node.body = this.finishPlaceholder(placeholder, "ClassBody");
  139248. return this.finishNode(node, type);
  139249. } else {
  139250. this.unexpected(null, PlaceHolderErrors.ClassNameIsRequired);
  139251. }
  139252. } else {
  139253. this.parseClassId(node, isStatement, optionalId);
  139254. }
  139255. this.parseClassSuper(node);
  139256. node.body = this.parsePlaceholder("ClassBody") || this.parseClassBody(!!node.superClass, oldStrict);
  139257. return this.finishNode(node, type);
  139258. }
  139259. parseExport(node) {
  139260. const placeholder = this.parsePlaceholder("Identifier");
  139261. if (!placeholder)
  139262. return super.parseExport(...arguments);
  139263. if (!this.isContextual("from") && !this.match(types$12.comma)) {
  139264. node.specifiers = [];
  139265. node.source = null;
  139266. node.declaration = this.finishPlaceholder(placeholder, "Declaration");
  139267. return this.finishNode(node, "ExportNamedDeclaration");
  139268. }
  139269. this.expectPlugin("exportDefaultFrom");
  139270. const specifier = this.startNode();
  139271. specifier.exported = placeholder;
  139272. node.specifiers = [this.finishNode(specifier, "ExportDefaultSpecifier")];
  139273. return super.parseExport(node);
  139274. }
  139275. isExportDefaultSpecifier() {
  139276. if (this.match(types$12._default)) {
  139277. const next = this.nextTokenStart();
  139278. if (this.isUnparsedContextual(next, "from")) {
  139279. if (this.input.startsWith(types$12.placeholder.label, this.nextTokenStartSince(next + 4))) {
  139280. return true;
  139281. }
  139282. }
  139283. }
  139284. return super.isExportDefaultSpecifier();
  139285. }
  139286. maybeParseExportDefaultSpecifier(node) {
  139287. if (node.specifiers && node.specifiers.length > 0) {
  139288. return true;
  139289. }
  139290. return super.maybeParseExportDefaultSpecifier(...arguments);
  139291. }
  139292. checkExport(node) {
  139293. const {
  139294. specifiers
  139295. } = node;
  139296. if (specifiers != null && specifiers.length) {
  139297. node.specifiers = specifiers.filter((node2) => node2.exported.type === "Placeholder");
  139298. }
  139299. super.checkExport(node);
  139300. node.specifiers = specifiers;
  139301. }
  139302. parseImport(node) {
  139303. const placeholder = this.parsePlaceholder("Identifier");
  139304. if (!placeholder)
  139305. return super.parseImport(...arguments);
  139306. node.specifiers = [];
  139307. if (!this.isContextual("from") && !this.match(types$12.comma)) {
  139308. node.source = this.finishPlaceholder(placeholder, "StringLiteral");
  139309. this.semicolon();
  139310. return this.finishNode(node, "ImportDeclaration");
  139311. }
  139312. const specifier = this.startNodeAtNode(placeholder);
  139313. specifier.local = placeholder;
  139314. this.finishNode(specifier, "ImportDefaultSpecifier");
  139315. node.specifiers.push(specifier);
  139316. if (this.eat(types$12.comma)) {
  139317. const hasStarImport = this.maybeParseStarImportSpecifier(node);
  139318. if (!hasStarImport)
  139319. this.parseNamedImportSpecifiers(node);
  139320. }
  139321. this.expectContextual("from");
  139322. node.source = this.parseImportSource();
  139323. this.semicolon();
  139324. return this.finishNode(node, "ImportDeclaration");
  139325. }
  139326. parseImportSource() {
  139327. return this.parsePlaceholder("StringLiteral") || super.parseImportSource(...arguments);
  139328. }
  139329. };
  139330. var v8intrinsic = (superClass) => class extends superClass {
  139331. parseV8Intrinsic() {
  139332. if (this.match(types$12.modulo)) {
  139333. const v8IntrinsicStart = this.state.start;
  139334. const node = this.startNode();
  139335. this.eat(types$12.modulo);
  139336. if (this.match(types$12.name)) {
  139337. const name2 = this.parseIdentifierName(this.state.start);
  139338. const identifier = this.createIdentifier(node, name2);
  139339. identifier.type = "V8IntrinsicIdentifier";
  139340. if (this.match(types$12.parenL)) {
  139341. return identifier;
  139342. }
  139343. }
  139344. this.unexpected(v8IntrinsicStart);
  139345. }
  139346. }
  139347. parseExprAtom() {
  139348. return this.parseV8Intrinsic() || super.parseExprAtom(...arguments);
  139349. }
  139350. };
  139351. function hasPlugin(plugins, name2) {
  139352. return plugins.some((plugin2) => {
  139353. if (Array.isArray(plugin2)) {
  139354. return plugin2[0] === name2;
  139355. } else {
  139356. return plugin2 === name2;
  139357. }
  139358. });
  139359. }
  139360. function getPluginOption(plugins, name2, option) {
  139361. const plugin2 = plugins.find((plugin3) => {
  139362. if (Array.isArray(plugin3)) {
  139363. return plugin3[0] === name2;
  139364. } else {
  139365. return plugin3 === name2;
  139366. }
  139367. });
  139368. if (plugin2 && Array.isArray(plugin2)) {
  139369. return plugin2[1][option];
  139370. }
  139371. return null;
  139372. }
  139373. var PIPELINE_PROPOSALS = ["minimal", "smart", "fsharp"];
  139374. var RECORD_AND_TUPLE_SYNTAX_TYPES = ["hash", "bar"];
  139375. function validatePlugins(plugins) {
  139376. if (hasPlugin(plugins, "decorators")) {
  139377. if (hasPlugin(plugins, "decorators-legacy")) {
  139378. throw new Error("Cannot use the decorators and decorators-legacy plugin together");
  139379. }
  139380. const decoratorsBeforeExport = getPluginOption(plugins, "decorators", "decoratorsBeforeExport");
  139381. if (decoratorsBeforeExport == null) {
  139382. throw new Error("The 'decorators' plugin requires a 'decoratorsBeforeExport' option, whose value must be a boolean. If you are migrating from Babylon/Babel 6 or want to use the old decorators proposal, you should use the 'decorators-legacy' plugin instead of 'decorators'.");
  139383. } else if (typeof decoratorsBeforeExport !== "boolean") {
  139384. throw new Error("'decoratorsBeforeExport' must be a boolean.");
  139385. }
  139386. }
  139387. if (hasPlugin(plugins, "flow") && hasPlugin(plugins, "typescript")) {
  139388. throw new Error("Cannot combine flow and typescript plugins.");
  139389. }
  139390. if (hasPlugin(plugins, "placeholders") && hasPlugin(plugins, "v8intrinsic")) {
  139391. throw new Error("Cannot combine placeholders and v8intrinsic plugins.");
  139392. }
  139393. if (hasPlugin(plugins, "pipelineOperator") && !PIPELINE_PROPOSALS.includes(getPluginOption(plugins, "pipelineOperator", "proposal"))) {
  139394. throw new Error("'pipelineOperator' requires 'proposal' option whose value should be one of: " + PIPELINE_PROPOSALS.map((p) => `'${p}'`).join(", "));
  139395. }
  139396. if (hasPlugin(plugins, "moduleAttributes")) {
  139397. {
  139398. if (hasPlugin(plugins, "importAssertions")) {
  139399. throw new Error("Cannot combine importAssertions and moduleAttributes plugins.");
  139400. }
  139401. const moduleAttributesVerionPluginOption = getPluginOption(plugins, "moduleAttributes", "version");
  139402. if (moduleAttributesVerionPluginOption !== "may-2020") {
  139403. throw new Error("The 'moduleAttributes' plugin requires a 'version' option, representing the last proposal update. Currently, the only supported value is 'may-2020'.");
  139404. }
  139405. }
  139406. }
  139407. if (hasPlugin(plugins, "recordAndTuple") && !RECORD_AND_TUPLE_SYNTAX_TYPES.includes(getPluginOption(plugins, "recordAndTuple", "syntaxType"))) {
  139408. throw new Error("'recordAndTuple' requires 'syntaxType' option whose value should be one of: " + RECORD_AND_TUPLE_SYNTAX_TYPES.map((p) => `'${p}'`).join(", "));
  139409. }
  139410. if (hasPlugin(plugins, "asyncDoExpressions") && !hasPlugin(plugins, "doExpressions")) {
  139411. const error = new Error("'asyncDoExpressions' requires 'doExpressions', please add 'doExpressions' to parser plugins.");
  139412. error.missingPlugins = "doExpressions";
  139413. throw error;
  139414. }
  139415. }
  139416. var mixinPlugins = {
  139417. estree,
  139418. jsx,
  139419. flow: flow3,
  139420. typescript,
  139421. v8intrinsic,
  139422. placeholders
  139423. };
  139424. var mixinPluginNames = Object.keys(mixinPlugins);
  139425. var defaultOptions2 = {
  139426. sourceType: "script",
  139427. sourceFilename: void 0,
  139428. startLine: 1,
  139429. allowAwaitOutsideFunction: false,
  139430. allowReturnOutsideFunction: false,
  139431. allowImportExportEverywhere: false,
  139432. allowSuperOutsideMethod: false,
  139433. allowUndeclaredExports: false,
  139434. plugins: [],
  139435. strictMode: null,
  139436. ranges: false,
  139437. tokens: false,
  139438. createParenthesizedExpressions: false,
  139439. errorRecovery: false
  139440. };
  139441. function getOptions2(opts) {
  139442. const options = {};
  139443. for (const key of Object.keys(defaultOptions2)) {
  139444. options[key] = opts && opts[key] != null ? opts[key] : defaultOptions2[key];
  139445. }
  139446. return options;
  139447. }
  139448. var _isDigit = function isDigit(code2) {
  139449. return code2 >= 48 && code2 <= 57;
  139450. };
  139451. var VALID_REGEX_FLAGS = /* @__PURE__ */ new Set(["g", "m", "s", "i", "y", "u", "d"]);
  139452. var forbiddenNumericSeparatorSiblings = {
  139453. decBinOct: [46, 66, 69, 79, 95, 98, 101, 111],
  139454. hex: [46, 88, 95, 120]
  139455. };
  139456. var allowedNumericSeparatorSiblings = {};
  139457. allowedNumericSeparatorSiblings.bin = [48, 49];
  139458. allowedNumericSeparatorSiblings.oct = [...allowedNumericSeparatorSiblings.bin, 50, 51, 52, 53, 54, 55];
  139459. allowedNumericSeparatorSiblings.dec = [...allowedNumericSeparatorSiblings.oct, 56, 57];
  139460. allowedNumericSeparatorSiblings.hex = [...allowedNumericSeparatorSiblings.dec, 65, 66, 67, 68, 69, 70, 97, 98, 99, 100, 101, 102];
  139461. var Token3 = class {
  139462. constructor(state) {
  139463. this.type = state.type;
  139464. this.value = state.value;
  139465. this.start = state.start;
  139466. this.end = state.end;
  139467. this.loc = new SourceLocation3(state.startLoc, state.endLoc);
  139468. }
  139469. };
  139470. var Tokenizer = class extends ParserError {
  139471. constructor(options, input) {
  139472. super();
  139473. this.isLookahead = void 0;
  139474. this.tokens = [];
  139475. this.state = new State2();
  139476. this.state.init(options);
  139477. this.input = input;
  139478. this.length = input.length;
  139479. this.isLookahead = false;
  139480. }
  139481. pushToken(token) {
  139482. this.tokens.length = this.state.tokensLength;
  139483. this.tokens.push(token);
  139484. ++this.state.tokensLength;
  139485. }
  139486. next() {
  139487. this.checkKeywordEscapes();
  139488. if (this.options.tokens) {
  139489. this.pushToken(new Token3(this.state));
  139490. }
  139491. this.state.lastTokEnd = this.state.end;
  139492. this.state.lastTokStart = this.state.start;
  139493. this.state.lastTokEndLoc = this.state.endLoc;
  139494. this.state.lastTokStartLoc = this.state.startLoc;
  139495. this.nextToken();
  139496. }
  139497. eat(type) {
  139498. if (this.match(type)) {
  139499. this.next();
  139500. return true;
  139501. } else {
  139502. return false;
  139503. }
  139504. }
  139505. match(type) {
  139506. return this.state.type === type;
  139507. }
  139508. createLookaheadState(state) {
  139509. return {
  139510. pos: state.pos,
  139511. value: null,
  139512. type: state.type,
  139513. start: state.start,
  139514. end: state.end,
  139515. lastTokEnd: state.end,
  139516. context: [this.curContext()],
  139517. inType: state.inType
  139518. };
  139519. }
  139520. lookahead() {
  139521. const old = this.state;
  139522. this.state = this.createLookaheadState(old);
  139523. this.isLookahead = true;
  139524. this.nextToken();
  139525. this.isLookahead = false;
  139526. const curr = this.state;
  139527. this.state = old;
  139528. return curr;
  139529. }
  139530. nextTokenStart() {
  139531. return this.nextTokenStartSince(this.state.pos);
  139532. }
  139533. nextTokenStartSince(pos) {
  139534. skipWhiteSpace2.lastIndex = pos;
  139535. const skip = skipWhiteSpace2.exec(this.input);
  139536. return pos + skip[0].length;
  139537. }
  139538. lookaheadCharCode() {
  139539. return this.input.charCodeAt(this.nextTokenStart());
  139540. }
  139541. codePointAtPos(pos) {
  139542. let cp = this.input.charCodeAt(pos);
  139543. if ((cp & 64512) === 55296 && ++pos < this.input.length) {
  139544. const trail = this.input.charCodeAt(pos);
  139545. if ((trail & 64512) === 56320) {
  139546. cp = 65536 + ((cp & 1023) << 10) + (trail & 1023);
  139547. }
  139548. }
  139549. return cp;
  139550. }
  139551. setStrict(strict) {
  139552. this.state.strict = strict;
  139553. if (strict) {
  139554. this.state.strictErrors.forEach((message, pos) => this.raise(pos, message));
  139555. this.state.strictErrors.clear();
  139556. }
  139557. }
  139558. curContext() {
  139559. return this.state.context[this.state.context.length - 1];
  139560. }
  139561. nextToken() {
  139562. const curContext = this.curContext();
  139563. if (!curContext.preserveSpace)
  139564. this.skipSpace();
  139565. this.state.start = this.state.pos;
  139566. if (!this.isLookahead)
  139567. this.state.startLoc = this.state.curPosition();
  139568. if (this.state.pos >= this.length) {
  139569. this.finishToken(types$12.eof);
  139570. return;
  139571. }
  139572. if (curContext === types2.template) {
  139573. this.readTmplToken();
  139574. } else {
  139575. this.getTokenFromCode(this.codePointAtPos(this.state.pos));
  139576. }
  139577. }
  139578. pushComment(block, text5, start3, end, startLoc, endLoc) {
  139579. const comment2 = {
  139580. type: block ? "CommentBlock" : "CommentLine",
  139581. value: text5,
  139582. start: start3,
  139583. end,
  139584. loc: new SourceLocation3(startLoc, endLoc)
  139585. };
  139586. if (this.options.tokens)
  139587. this.pushToken(comment2);
  139588. this.state.comments.push(comment2);
  139589. this.addComment(comment2);
  139590. }
  139591. skipBlockComment() {
  139592. let startLoc;
  139593. if (!this.isLookahead)
  139594. startLoc = this.state.curPosition();
  139595. const start3 = this.state.pos;
  139596. const end = this.input.indexOf("*/", this.state.pos + 2);
  139597. if (end === -1)
  139598. throw this.raise(start3, ErrorMessages.UnterminatedComment);
  139599. this.state.pos = end + 2;
  139600. lineBreakG2.lastIndex = start3;
  139601. let match;
  139602. while ((match = lineBreakG2.exec(this.input)) && match.index < this.state.pos) {
  139603. ++this.state.curLine;
  139604. this.state.lineStart = match.index + match[0].length;
  139605. }
  139606. if (this.isLookahead)
  139607. return;
  139608. this.pushComment(true, this.input.slice(start3 + 2, end), start3, this.state.pos, startLoc, this.state.curPosition());
  139609. }
  139610. skipLineComment(startSkip) {
  139611. const start3 = this.state.pos;
  139612. let startLoc;
  139613. if (!this.isLookahead)
  139614. startLoc = this.state.curPosition();
  139615. let ch = this.input.charCodeAt(this.state.pos += startSkip);
  139616. if (this.state.pos < this.length) {
  139617. while (!isNewLine2(ch) && ++this.state.pos < this.length) {
  139618. ch = this.input.charCodeAt(this.state.pos);
  139619. }
  139620. }
  139621. if (this.isLookahead)
  139622. return;
  139623. this.pushComment(false, this.input.slice(start3 + startSkip, this.state.pos), start3, this.state.pos, startLoc, this.state.curPosition());
  139624. }
  139625. skipSpace() {
  139626. loop:
  139627. while (this.state.pos < this.length) {
  139628. const ch = this.input.charCodeAt(this.state.pos);
  139629. switch (ch) {
  139630. case 32:
  139631. case 160:
  139632. case 9:
  139633. ++this.state.pos;
  139634. break;
  139635. case 13:
  139636. if (this.input.charCodeAt(this.state.pos + 1) === 10) {
  139637. ++this.state.pos;
  139638. }
  139639. case 10:
  139640. case 8232:
  139641. case 8233:
  139642. ++this.state.pos;
  139643. ++this.state.curLine;
  139644. this.state.lineStart = this.state.pos;
  139645. break;
  139646. case 47:
  139647. switch (this.input.charCodeAt(this.state.pos + 1)) {
  139648. case 42:
  139649. this.skipBlockComment();
  139650. break;
  139651. case 47:
  139652. this.skipLineComment(2);
  139653. break;
  139654. default:
  139655. break loop;
  139656. }
  139657. break;
  139658. default:
  139659. if (isWhitespace(ch)) {
  139660. ++this.state.pos;
  139661. } else {
  139662. break loop;
  139663. }
  139664. }
  139665. }
  139666. }
  139667. finishToken(type, val) {
  139668. this.state.end = this.state.pos;
  139669. const prevType = this.state.type;
  139670. this.state.type = type;
  139671. this.state.value = val;
  139672. if (!this.isLookahead) {
  139673. this.state.endLoc = this.state.curPosition();
  139674. this.updateContext(prevType);
  139675. }
  139676. }
  139677. readToken_numberSign() {
  139678. if (this.state.pos === 0 && this.readToken_interpreter()) {
  139679. return;
  139680. }
  139681. const nextPos = this.state.pos + 1;
  139682. const next = this.codePointAtPos(nextPos);
  139683. if (next >= 48 && next <= 57) {
  139684. throw this.raise(this.state.pos, ErrorMessages.UnexpectedDigitAfterHash);
  139685. }
  139686. if (next === 123 || next === 91 && this.hasPlugin("recordAndTuple")) {
  139687. this.expectPlugin("recordAndTuple");
  139688. if (this.getPluginOption("recordAndTuple", "syntaxType") !== "hash") {
  139689. throw this.raise(this.state.pos, next === 123 ? ErrorMessages.RecordExpressionHashIncorrectStartSyntaxType : ErrorMessages.TupleExpressionHashIncorrectStartSyntaxType);
  139690. }
  139691. this.state.pos += 2;
  139692. if (next === 123) {
  139693. this.finishToken(types$12.braceHashL);
  139694. } else {
  139695. this.finishToken(types$12.bracketHashL);
  139696. }
  139697. } else if (isIdentifierStart2(next)) {
  139698. ++this.state.pos;
  139699. this.finishToken(types$12.privateName, this.readWord1(next));
  139700. } else if (next === 92) {
  139701. ++this.state.pos;
  139702. this.finishToken(types$12.privateName, this.readWord1());
  139703. } else {
  139704. this.finishOp(types$12.hash, 1);
  139705. }
  139706. }
  139707. readToken_dot() {
  139708. const next = this.input.charCodeAt(this.state.pos + 1);
  139709. if (next >= 48 && next <= 57) {
  139710. this.readNumber(true);
  139711. return;
  139712. }
  139713. if (next === 46 && this.input.charCodeAt(this.state.pos + 2) === 46) {
  139714. this.state.pos += 3;
  139715. this.finishToken(types$12.ellipsis);
  139716. } else {
  139717. ++this.state.pos;
  139718. this.finishToken(types$12.dot);
  139719. }
  139720. }
  139721. readToken_slash() {
  139722. const next = this.input.charCodeAt(this.state.pos + 1);
  139723. if (next === 61) {
  139724. this.finishOp(types$12.slashAssign, 2);
  139725. } else {
  139726. this.finishOp(types$12.slash, 1);
  139727. }
  139728. }
  139729. readToken_interpreter() {
  139730. if (this.state.pos !== 0 || this.length < 2)
  139731. return false;
  139732. let ch = this.input.charCodeAt(this.state.pos + 1);
  139733. if (ch !== 33)
  139734. return false;
  139735. const start3 = this.state.pos;
  139736. this.state.pos += 1;
  139737. while (!isNewLine2(ch) && ++this.state.pos < this.length) {
  139738. ch = this.input.charCodeAt(this.state.pos);
  139739. }
  139740. const value = this.input.slice(start3 + 2, this.state.pos);
  139741. this.finishToken(types$12.interpreterDirective, value);
  139742. return true;
  139743. }
  139744. readToken_mult_modulo(code2) {
  139745. let type = code2 === 42 ? types$12.star : types$12.modulo;
  139746. let width = 1;
  139747. let next = this.input.charCodeAt(this.state.pos + 1);
  139748. if (code2 === 42 && next === 42) {
  139749. width++;
  139750. next = this.input.charCodeAt(this.state.pos + 2);
  139751. type = types$12.exponent;
  139752. }
  139753. if (next === 61 && !this.state.inType) {
  139754. width++;
  139755. type = types$12.assign;
  139756. }
  139757. this.finishOp(type, width);
  139758. }
  139759. readToken_pipe_amp(code2) {
  139760. const next = this.input.charCodeAt(this.state.pos + 1);
  139761. if (next === code2) {
  139762. if (this.input.charCodeAt(this.state.pos + 2) === 61) {
  139763. this.finishOp(types$12.assign, 3);
  139764. } else {
  139765. this.finishOp(code2 === 124 ? types$12.logicalOR : types$12.logicalAND, 2);
  139766. }
  139767. return;
  139768. }
  139769. if (code2 === 124) {
  139770. if (next === 62) {
  139771. this.finishOp(types$12.pipeline, 2);
  139772. return;
  139773. }
  139774. if (this.hasPlugin("recordAndTuple") && next === 125) {
  139775. if (this.getPluginOption("recordAndTuple", "syntaxType") !== "bar") {
  139776. throw this.raise(this.state.pos, ErrorMessages.RecordExpressionBarIncorrectEndSyntaxType);
  139777. }
  139778. this.state.pos += 2;
  139779. this.finishToken(types$12.braceBarR);
  139780. return;
  139781. }
  139782. if (this.hasPlugin("recordAndTuple") && next === 93) {
  139783. if (this.getPluginOption("recordAndTuple", "syntaxType") !== "bar") {
  139784. throw this.raise(this.state.pos, ErrorMessages.TupleExpressionBarIncorrectEndSyntaxType);
  139785. }
  139786. this.state.pos += 2;
  139787. this.finishToken(types$12.bracketBarR);
  139788. return;
  139789. }
  139790. }
  139791. if (next === 61) {
  139792. this.finishOp(types$12.assign, 2);
  139793. return;
  139794. }
  139795. this.finishOp(code2 === 124 ? types$12.bitwiseOR : types$12.bitwiseAND, 1);
  139796. }
  139797. readToken_caret() {
  139798. const next = this.input.charCodeAt(this.state.pos + 1);
  139799. if (next === 61) {
  139800. this.finishOp(types$12.assign, 2);
  139801. } else {
  139802. this.finishOp(types$12.bitwiseXOR, 1);
  139803. }
  139804. }
  139805. readToken_plus_min(code2) {
  139806. const next = this.input.charCodeAt(this.state.pos + 1);
  139807. if (next === code2) {
  139808. if (next === 45 && !this.inModule && this.input.charCodeAt(this.state.pos + 2) === 62 && (this.state.lastTokEnd === 0 || this.hasPrecedingLineBreak())) {
  139809. this.skipLineComment(3);
  139810. this.skipSpace();
  139811. this.nextToken();
  139812. return;
  139813. }
  139814. this.finishOp(types$12.incDec, 2);
  139815. return;
  139816. }
  139817. if (next === 61) {
  139818. this.finishOp(types$12.assign, 2);
  139819. } else {
  139820. this.finishOp(types$12.plusMin, 1);
  139821. }
  139822. }
  139823. readToken_lt_gt(code2) {
  139824. const next = this.input.charCodeAt(this.state.pos + 1);
  139825. let size = 1;
  139826. if (next === code2) {
  139827. size = code2 === 62 && this.input.charCodeAt(this.state.pos + 2) === 62 ? 3 : 2;
  139828. if (this.input.charCodeAt(this.state.pos + size) === 61) {
  139829. this.finishOp(types$12.assign, size + 1);
  139830. return;
  139831. }
  139832. this.finishOp(types$12.bitShift, size);
  139833. return;
  139834. }
  139835. if (next === 33 && code2 === 60 && !this.inModule && this.input.charCodeAt(this.state.pos + 2) === 45 && this.input.charCodeAt(this.state.pos + 3) === 45) {
  139836. this.skipLineComment(4);
  139837. this.skipSpace();
  139838. this.nextToken();
  139839. return;
  139840. }
  139841. if (next === 61) {
  139842. size = 2;
  139843. }
  139844. this.finishOp(types$12.relational, size);
  139845. }
  139846. readToken_eq_excl(code2) {
  139847. const next = this.input.charCodeAt(this.state.pos + 1);
  139848. if (next === 61) {
  139849. this.finishOp(types$12.equality, this.input.charCodeAt(this.state.pos + 2) === 61 ? 3 : 2);
  139850. return;
  139851. }
  139852. if (code2 === 61 && next === 62) {
  139853. this.state.pos += 2;
  139854. this.finishToken(types$12.arrow);
  139855. return;
  139856. }
  139857. this.finishOp(code2 === 61 ? types$12.eq : types$12.bang, 1);
  139858. }
  139859. readToken_question() {
  139860. const next = this.input.charCodeAt(this.state.pos + 1);
  139861. const next2 = this.input.charCodeAt(this.state.pos + 2);
  139862. if (next === 63) {
  139863. if (next2 === 61) {
  139864. this.finishOp(types$12.assign, 3);
  139865. } else {
  139866. this.finishOp(types$12.nullishCoalescing, 2);
  139867. }
  139868. } else if (next === 46 && !(next2 >= 48 && next2 <= 57)) {
  139869. this.state.pos += 2;
  139870. this.finishToken(types$12.questionDot);
  139871. } else {
  139872. ++this.state.pos;
  139873. this.finishToken(types$12.question);
  139874. }
  139875. }
  139876. getTokenFromCode(code2) {
  139877. switch (code2) {
  139878. case 46:
  139879. this.readToken_dot();
  139880. return;
  139881. case 40:
  139882. ++this.state.pos;
  139883. this.finishToken(types$12.parenL);
  139884. return;
  139885. case 41:
  139886. ++this.state.pos;
  139887. this.finishToken(types$12.parenR);
  139888. return;
  139889. case 59:
  139890. ++this.state.pos;
  139891. this.finishToken(types$12.semi);
  139892. return;
  139893. case 44:
  139894. ++this.state.pos;
  139895. this.finishToken(types$12.comma);
  139896. return;
  139897. case 91:
  139898. if (this.hasPlugin("recordAndTuple") && this.input.charCodeAt(this.state.pos + 1) === 124) {
  139899. if (this.getPluginOption("recordAndTuple", "syntaxType") !== "bar") {
  139900. throw this.raise(this.state.pos, ErrorMessages.TupleExpressionBarIncorrectStartSyntaxType);
  139901. }
  139902. this.state.pos += 2;
  139903. this.finishToken(types$12.bracketBarL);
  139904. } else {
  139905. ++this.state.pos;
  139906. this.finishToken(types$12.bracketL);
  139907. }
  139908. return;
  139909. case 93:
  139910. ++this.state.pos;
  139911. this.finishToken(types$12.bracketR);
  139912. return;
  139913. case 123:
  139914. if (this.hasPlugin("recordAndTuple") && this.input.charCodeAt(this.state.pos + 1) === 124) {
  139915. if (this.getPluginOption("recordAndTuple", "syntaxType") !== "bar") {
  139916. throw this.raise(this.state.pos, ErrorMessages.RecordExpressionBarIncorrectStartSyntaxType);
  139917. }
  139918. this.state.pos += 2;
  139919. this.finishToken(types$12.braceBarL);
  139920. } else {
  139921. ++this.state.pos;
  139922. this.finishToken(types$12.braceL);
  139923. }
  139924. return;
  139925. case 125:
  139926. ++this.state.pos;
  139927. this.finishToken(types$12.braceR);
  139928. return;
  139929. case 58:
  139930. if (this.hasPlugin("functionBind") && this.input.charCodeAt(this.state.pos + 1) === 58) {
  139931. this.finishOp(types$12.doubleColon, 2);
  139932. } else {
  139933. ++this.state.pos;
  139934. this.finishToken(types$12.colon);
  139935. }
  139936. return;
  139937. case 63:
  139938. this.readToken_question();
  139939. return;
  139940. case 96:
  139941. ++this.state.pos;
  139942. this.finishToken(types$12.backQuote);
  139943. return;
  139944. case 48: {
  139945. const next = this.input.charCodeAt(this.state.pos + 1);
  139946. if (next === 120 || next === 88) {
  139947. this.readRadixNumber(16);
  139948. return;
  139949. }
  139950. if (next === 111 || next === 79) {
  139951. this.readRadixNumber(8);
  139952. return;
  139953. }
  139954. if (next === 98 || next === 66) {
  139955. this.readRadixNumber(2);
  139956. return;
  139957. }
  139958. }
  139959. case 49:
  139960. case 50:
  139961. case 51:
  139962. case 52:
  139963. case 53:
  139964. case 54:
  139965. case 55:
  139966. case 56:
  139967. case 57:
  139968. this.readNumber(false);
  139969. return;
  139970. case 34:
  139971. case 39:
  139972. this.readString(code2);
  139973. return;
  139974. case 47:
  139975. this.readToken_slash();
  139976. return;
  139977. case 37:
  139978. case 42:
  139979. this.readToken_mult_modulo(code2);
  139980. return;
  139981. case 124:
  139982. case 38:
  139983. this.readToken_pipe_amp(code2);
  139984. return;
  139985. case 94:
  139986. this.readToken_caret();
  139987. return;
  139988. case 43:
  139989. case 45:
  139990. this.readToken_plus_min(code2);
  139991. return;
  139992. case 60:
  139993. case 62:
  139994. this.readToken_lt_gt(code2);
  139995. return;
  139996. case 61:
  139997. case 33:
  139998. this.readToken_eq_excl(code2);
  139999. return;
  140000. case 126:
  140001. this.finishOp(types$12.tilde, 1);
  140002. return;
  140003. case 64:
  140004. ++this.state.pos;
  140005. this.finishToken(types$12.at);
  140006. return;
  140007. case 35:
  140008. this.readToken_numberSign();
  140009. return;
  140010. case 92:
  140011. this.readWord();
  140012. return;
  140013. default:
  140014. if (isIdentifierStart2(code2)) {
  140015. this.readWord(code2);
  140016. return;
  140017. }
  140018. }
  140019. throw this.raise(this.state.pos, ErrorMessages.InvalidOrUnexpectedToken, String.fromCodePoint(code2));
  140020. }
  140021. finishOp(type, size) {
  140022. const str = this.input.slice(this.state.pos, this.state.pos + size);
  140023. this.state.pos += size;
  140024. this.finishToken(type, str);
  140025. }
  140026. readRegexp() {
  140027. const start3 = this.state.start + 1;
  140028. let escaped, inClass;
  140029. for (; ; ) {
  140030. if (this.state.pos >= this.length) {
  140031. throw this.raise(start3, ErrorMessages.UnterminatedRegExp);
  140032. }
  140033. const ch = this.input.charAt(this.state.pos);
  140034. if (lineBreak2.test(ch)) {
  140035. throw this.raise(start3, ErrorMessages.UnterminatedRegExp);
  140036. }
  140037. if (escaped) {
  140038. escaped = false;
  140039. } else {
  140040. if (ch === "[") {
  140041. inClass = true;
  140042. } else if (ch === "]" && inClass) {
  140043. inClass = false;
  140044. } else if (ch === "/" && !inClass) {
  140045. break;
  140046. }
  140047. escaped = ch === "\\";
  140048. }
  140049. ++this.state.pos;
  140050. }
  140051. const content3 = this.input.slice(start3, this.state.pos);
  140052. ++this.state.pos;
  140053. let mods = "";
  140054. while (this.state.pos < this.length) {
  140055. const char = this.input[this.state.pos];
  140056. const charCode = this.codePointAtPos(this.state.pos);
  140057. if (VALID_REGEX_FLAGS.has(char)) {
  140058. if (mods.indexOf(char) > -1) {
  140059. this.raise(this.state.pos + 1, ErrorMessages.DuplicateRegExpFlags);
  140060. }
  140061. } else if (isIdentifierChar2(charCode) || charCode === 92) {
  140062. this.raise(this.state.pos + 1, ErrorMessages.MalformedRegExpFlags);
  140063. } else {
  140064. break;
  140065. }
  140066. ++this.state.pos;
  140067. mods += char;
  140068. }
  140069. this.finishToken(types$12.regexp, {
  140070. pattern: content3,
  140071. flags: mods
  140072. });
  140073. }
  140074. readInt(radix, len, forceLen, allowNumSeparator = true) {
  140075. const start3 = this.state.pos;
  140076. const forbiddenSiblings = radix === 16 ? forbiddenNumericSeparatorSiblings.hex : forbiddenNumericSeparatorSiblings.decBinOct;
  140077. const allowedSiblings = radix === 16 ? allowedNumericSeparatorSiblings.hex : radix === 10 ? allowedNumericSeparatorSiblings.dec : radix === 8 ? allowedNumericSeparatorSiblings.oct : allowedNumericSeparatorSiblings.bin;
  140078. let invalid2 = false;
  140079. let total = 0;
  140080. for (let i = 0, e = len == null ? Infinity : len; i < e; ++i) {
  140081. const code2 = this.input.charCodeAt(this.state.pos);
  140082. let val;
  140083. if (code2 === 95) {
  140084. const prev = this.input.charCodeAt(this.state.pos - 1);
  140085. const next = this.input.charCodeAt(this.state.pos + 1);
  140086. if (allowedSiblings.indexOf(next) === -1) {
  140087. this.raise(this.state.pos, ErrorMessages.UnexpectedNumericSeparator);
  140088. } else if (forbiddenSiblings.indexOf(prev) > -1 || forbiddenSiblings.indexOf(next) > -1 || Number.isNaN(next)) {
  140089. this.raise(this.state.pos, ErrorMessages.UnexpectedNumericSeparator);
  140090. }
  140091. if (!allowNumSeparator) {
  140092. this.raise(this.state.pos, ErrorMessages.NumericSeparatorInEscapeSequence);
  140093. }
  140094. ++this.state.pos;
  140095. continue;
  140096. }
  140097. if (code2 >= 97) {
  140098. val = code2 - 97 + 10;
  140099. } else if (code2 >= 65) {
  140100. val = code2 - 65 + 10;
  140101. } else if (_isDigit(code2)) {
  140102. val = code2 - 48;
  140103. } else {
  140104. val = Infinity;
  140105. }
  140106. if (val >= radix) {
  140107. if (this.options.errorRecovery && val <= 9) {
  140108. val = 0;
  140109. this.raise(this.state.start + i + 2, ErrorMessages.InvalidDigit, radix);
  140110. } else if (forceLen) {
  140111. val = 0;
  140112. invalid2 = true;
  140113. } else {
  140114. break;
  140115. }
  140116. }
  140117. ++this.state.pos;
  140118. total = total * radix + val;
  140119. }
  140120. if (this.state.pos === start3 || len != null && this.state.pos - start3 !== len || invalid2) {
  140121. return null;
  140122. }
  140123. return total;
  140124. }
  140125. readRadixNumber(radix) {
  140126. const start3 = this.state.pos;
  140127. let isBigInt = false;
  140128. this.state.pos += 2;
  140129. const val = this.readInt(radix);
  140130. if (val == null) {
  140131. this.raise(this.state.start + 2, ErrorMessages.InvalidDigit, radix);
  140132. }
  140133. const next = this.input.charCodeAt(this.state.pos);
  140134. if (next === 110) {
  140135. ++this.state.pos;
  140136. isBigInt = true;
  140137. } else if (next === 109) {
  140138. throw this.raise(start3, ErrorMessages.InvalidDecimal);
  140139. }
  140140. if (isIdentifierStart2(this.codePointAtPos(this.state.pos))) {
  140141. throw this.raise(this.state.pos, ErrorMessages.NumberIdentifier);
  140142. }
  140143. if (isBigInt) {
  140144. const str = this.input.slice(start3, this.state.pos).replace(/[_n]/g, "");
  140145. this.finishToken(types$12.bigint, str);
  140146. return;
  140147. }
  140148. this.finishToken(types$12.num, val);
  140149. }
  140150. readNumber(startsWithDot) {
  140151. const start3 = this.state.pos;
  140152. let isFloat = false;
  140153. let isBigInt = false;
  140154. let isDecimal2 = false;
  140155. let hasExponent = false;
  140156. let isOctal = false;
  140157. if (!startsWithDot && this.readInt(10) === null) {
  140158. this.raise(start3, ErrorMessages.InvalidNumber);
  140159. }
  140160. const hasLeadingZero = this.state.pos - start3 >= 2 && this.input.charCodeAt(start3) === 48;
  140161. if (hasLeadingZero) {
  140162. const integer = this.input.slice(start3, this.state.pos);
  140163. this.recordStrictModeErrors(start3, ErrorMessages.StrictOctalLiteral);
  140164. if (!this.state.strict) {
  140165. const underscorePos = integer.indexOf("_");
  140166. if (underscorePos > 0) {
  140167. this.raise(underscorePos + start3, ErrorMessages.ZeroDigitNumericSeparator);
  140168. }
  140169. }
  140170. isOctal = hasLeadingZero && !/[89]/.test(integer);
  140171. }
  140172. let next = this.input.charCodeAt(this.state.pos);
  140173. if (next === 46 && !isOctal) {
  140174. ++this.state.pos;
  140175. this.readInt(10);
  140176. isFloat = true;
  140177. next = this.input.charCodeAt(this.state.pos);
  140178. }
  140179. if ((next === 69 || next === 101) && !isOctal) {
  140180. next = this.input.charCodeAt(++this.state.pos);
  140181. if (next === 43 || next === 45) {
  140182. ++this.state.pos;
  140183. }
  140184. if (this.readInt(10) === null) {
  140185. this.raise(start3, ErrorMessages.InvalidOrMissingExponent);
  140186. }
  140187. isFloat = true;
  140188. hasExponent = true;
  140189. next = this.input.charCodeAt(this.state.pos);
  140190. }
  140191. if (next === 110) {
  140192. if (isFloat || hasLeadingZero) {
  140193. this.raise(start3, ErrorMessages.InvalidBigIntLiteral);
  140194. }
  140195. ++this.state.pos;
  140196. isBigInt = true;
  140197. }
  140198. if (next === 109) {
  140199. this.expectPlugin("decimal", this.state.pos);
  140200. if (hasExponent || hasLeadingZero) {
  140201. this.raise(start3, ErrorMessages.InvalidDecimal);
  140202. }
  140203. ++this.state.pos;
  140204. isDecimal2 = true;
  140205. }
  140206. if (isIdentifierStart2(this.codePointAtPos(this.state.pos))) {
  140207. throw this.raise(this.state.pos, ErrorMessages.NumberIdentifier);
  140208. }
  140209. const str = this.input.slice(start3, this.state.pos).replace(/[_mn]/g, "");
  140210. if (isBigInt) {
  140211. this.finishToken(types$12.bigint, str);
  140212. return;
  140213. }
  140214. if (isDecimal2) {
  140215. this.finishToken(types$12.decimal, str);
  140216. return;
  140217. }
  140218. const val = isOctal ? parseInt(str, 8) : parseFloat(str);
  140219. this.finishToken(types$12.num, val);
  140220. }
  140221. readCodePoint(throwOnInvalid) {
  140222. const ch = this.input.charCodeAt(this.state.pos);
  140223. let code2;
  140224. if (ch === 123) {
  140225. const codePos = ++this.state.pos;
  140226. code2 = this.readHexChar(this.input.indexOf("}", this.state.pos) - this.state.pos, true, throwOnInvalid);
  140227. ++this.state.pos;
  140228. if (code2 !== null && code2 > 1114111) {
  140229. if (throwOnInvalid) {
  140230. this.raise(codePos, ErrorMessages.InvalidCodePoint);
  140231. } else {
  140232. return null;
  140233. }
  140234. }
  140235. } else {
  140236. code2 = this.readHexChar(4, false, throwOnInvalid);
  140237. }
  140238. return code2;
  140239. }
  140240. readString(quote) {
  140241. let out = "", chunkStart = ++this.state.pos;
  140242. for (; ; ) {
  140243. if (this.state.pos >= this.length) {
  140244. throw this.raise(this.state.start, ErrorMessages.UnterminatedString);
  140245. }
  140246. const ch = this.input.charCodeAt(this.state.pos);
  140247. if (ch === quote)
  140248. break;
  140249. if (ch === 92) {
  140250. out += this.input.slice(chunkStart, this.state.pos);
  140251. out += this.readEscapedChar(false);
  140252. chunkStart = this.state.pos;
  140253. } else if (ch === 8232 || ch === 8233) {
  140254. ++this.state.pos;
  140255. ++this.state.curLine;
  140256. this.state.lineStart = this.state.pos;
  140257. } else if (isNewLine2(ch)) {
  140258. throw this.raise(this.state.start, ErrorMessages.UnterminatedString);
  140259. } else {
  140260. ++this.state.pos;
  140261. }
  140262. }
  140263. out += this.input.slice(chunkStart, this.state.pos++);
  140264. this.finishToken(types$12.string, out);
  140265. }
  140266. readTmplToken() {
  140267. let out = "", chunkStart = this.state.pos, containsInvalid = false;
  140268. for (; ; ) {
  140269. if (this.state.pos >= this.length) {
  140270. throw this.raise(this.state.start, ErrorMessages.UnterminatedTemplate);
  140271. }
  140272. const ch = this.input.charCodeAt(this.state.pos);
  140273. if (ch === 96 || ch === 36 && this.input.charCodeAt(this.state.pos + 1) === 123) {
  140274. if (this.state.pos === this.state.start && this.match(types$12.template)) {
  140275. if (ch === 36) {
  140276. this.state.pos += 2;
  140277. this.finishToken(types$12.dollarBraceL);
  140278. return;
  140279. } else {
  140280. ++this.state.pos;
  140281. this.finishToken(types$12.backQuote);
  140282. return;
  140283. }
  140284. }
  140285. out += this.input.slice(chunkStart, this.state.pos);
  140286. this.finishToken(types$12.template, containsInvalid ? null : out);
  140287. return;
  140288. }
  140289. if (ch === 92) {
  140290. out += this.input.slice(chunkStart, this.state.pos);
  140291. const escaped = this.readEscapedChar(true);
  140292. if (escaped === null) {
  140293. containsInvalid = true;
  140294. } else {
  140295. out += escaped;
  140296. }
  140297. chunkStart = this.state.pos;
  140298. } else if (isNewLine2(ch)) {
  140299. out += this.input.slice(chunkStart, this.state.pos);
  140300. ++this.state.pos;
  140301. switch (ch) {
  140302. case 13:
  140303. if (this.input.charCodeAt(this.state.pos) === 10) {
  140304. ++this.state.pos;
  140305. }
  140306. case 10:
  140307. out += "\n";
  140308. break;
  140309. default:
  140310. out += String.fromCharCode(ch);
  140311. break;
  140312. }
  140313. ++this.state.curLine;
  140314. this.state.lineStart = this.state.pos;
  140315. chunkStart = this.state.pos;
  140316. } else {
  140317. ++this.state.pos;
  140318. }
  140319. }
  140320. }
  140321. recordStrictModeErrors(pos, message) {
  140322. if (this.state.strict && !this.state.strictErrors.has(pos)) {
  140323. this.raise(pos, message);
  140324. } else {
  140325. this.state.strictErrors.set(pos, message);
  140326. }
  140327. }
  140328. readEscapedChar(inTemplate) {
  140329. const throwOnInvalid = !inTemplate;
  140330. const ch = this.input.charCodeAt(++this.state.pos);
  140331. ++this.state.pos;
  140332. switch (ch) {
  140333. case 110:
  140334. return "\n";
  140335. case 114:
  140336. return "\r";
  140337. case 120: {
  140338. const code2 = this.readHexChar(2, false, throwOnInvalid);
  140339. return code2 === null ? null : String.fromCharCode(code2);
  140340. }
  140341. case 117: {
  140342. const code2 = this.readCodePoint(throwOnInvalid);
  140343. return code2 === null ? null : String.fromCodePoint(code2);
  140344. }
  140345. case 116:
  140346. return " ";
  140347. case 98:
  140348. return "\b";
  140349. case 118:
  140350. return "\v";
  140351. case 102:
  140352. return "\f";
  140353. case 13:
  140354. if (this.input.charCodeAt(this.state.pos) === 10) {
  140355. ++this.state.pos;
  140356. }
  140357. case 10:
  140358. this.state.lineStart = this.state.pos;
  140359. ++this.state.curLine;
  140360. case 8232:
  140361. case 8233:
  140362. return "";
  140363. case 56:
  140364. case 57:
  140365. if (inTemplate) {
  140366. return null;
  140367. } else {
  140368. this.recordStrictModeErrors(this.state.pos - 1, ErrorMessages.StrictNumericEscape);
  140369. }
  140370. default:
  140371. if (ch >= 48 && ch <= 55) {
  140372. const codePos = this.state.pos - 1;
  140373. const match = this.input.substr(this.state.pos - 1, 3).match(/^[0-7]+/);
  140374. let octalStr = match[0];
  140375. let octal = parseInt(octalStr, 8);
  140376. if (octal > 255) {
  140377. octalStr = octalStr.slice(0, -1);
  140378. octal = parseInt(octalStr, 8);
  140379. }
  140380. this.state.pos += octalStr.length - 1;
  140381. const next = this.input.charCodeAt(this.state.pos);
  140382. if (octalStr !== "0" || next === 56 || next === 57) {
  140383. if (inTemplate) {
  140384. return null;
  140385. } else {
  140386. this.recordStrictModeErrors(codePos, ErrorMessages.StrictNumericEscape);
  140387. }
  140388. }
  140389. return String.fromCharCode(octal);
  140390. }
  140391. return String.fromCharCode(ch);
  140392. }
  140393. }
  140394. readHexChar(len, forceLen, throwOnInvalid) {
  140395. const codePos = this.state.pos;
  140396. const n = this.readInt(16, len, forceLen, false);
  140397. if (n === null) {
  140398. if (throwOnInvalid) {
  140399. this.raise(codePos, ErrorMessages.InvalidEscapeSequence);
  140400. } else {
  140401. this.state.pos = codePos - 1;
  140402. }
  140403. }
  140404. return n;
  140405. }
  140406. readWord1(firstCode) {
  140407. this.state.containsEsc = false;
  140408. let word = "";
  140409. const start3 = this.state.pos;
  140410. let chunkStart = this.state.pos;
  140411. if (firstCode !== void 0) {
  140412. this.state.pos += firstCode <= 65535 ? 1 : 2;
  140413. }
  140414. while (this.state.pos < this.length) {
  140415. const ch = this.codePointAtPos(this.state.pos);
  140416. if (isIdentifierChar2(ch)) {
  140417. this.state.pos += ch <= 65535 ? 1 : 2;
  140418. } else if (ch === 92) {
  140419. this.state.containsEsc = true;
  140420. word += this.input.slice(chunkStart, this.state.pos);
  140421. const escStart = this.state.pos;
  140422. const identifierCheck = this.state.pos === start3 ? isIdentifierStart2 : isIdentifierChar2;
  140423. if (this.input.charCodeAt(++this.state.pos) !== 117) {
  140424. this.raise(this.state.pos, ErrorMessages.MissingUnicodeEscape);
  140425. chunkStart = this.state.pos - 1;
  140426. continue;
  140427. }
  140428. ++this.state.pos;
  140429. const esc = this.readCodePoint(true);
  140430. if (esc !== null) {
  140431. if (!identifierCheck(esc)) {
  140432. this.raise(escStart, ErrorMessages.EscapedCharNotAnIdentifier);
  140433. }
  140434. word += String.fromCodePoint(esc);
  140435. }
  140436. chunkStart = this.state.pos;
  140437. } else {
  140438. break;
  140439. }
  140440. }
  140441. return word + this.input.slice(chunkStart, this.state.pos);
  140442. }
  140443. readWord(firstCode) {
  140444. const word = this.readWord1(firstCode);
  140445. const type = keywords$12.get(word) || types$12.name;
  140446. this.finishToken(type, word);
  140447. }
  140448. checkKeywordEscapes() {
  140449. const kw2 = this.state.type.keyword;
  140450. if (kw2 && this.state.containsEsc) {
  140451. this.raise(this.state.start, ErrorMessages.InvalidEscapedReservedWord, kw2);
  140452. }
  140453. }
  140454. updateContext(prevType) {
  140455. var _this$state$type$upda, _this$state$type;
  140456. (_this$state$type$upda = (_this$state$type = this.state.type).updateContext) == null ? void 0 : _this$state$type$upda.call(_this$state$type, this.state.context);
  140457. }
  140458. };
  140459. var ClassScope = class {
  140460. constructor() {
  140461. this.privateNames = /* @__PURE__ */ new Set();
  140462. this.loneAccessors = /* @__PURE__ */ new Map();
  140463. this.undefinedPrivateNames = /* @__PURE__ */ new Map();
  140464. }
  140465. };
  140466. var ClassScopeHandler = class {
  140467. constructor(raise2) {
  140468. this.stack = [];
  140469. this.undefinedPrivateNames = /* @__PURE__ */ new Map();
  140470. this.raise = raise2;
  140471. }
  140472. current() {
  140473. return this.stack[this.stack.length - 1];
  140474. }
  140475. enter() {
  140476. this.stack.push(new ClassScope());
  140477. }
  140478. exit() {
  140479. const oldClassScope = this.stack.pop();
  140480. const current2 = this.current();
  140481. for (const [name2, pos] of Array.from(oldClassScope.undefinedPrivateNames)) {
  140482. if (current2) {
  140483. if (!current2.undefinedPrivateNames.has(name2)) {
  140484. current2.undefinedPrivateNames.set(name2, pos);
  140485. }
  140486. } else {
  140487. this.raise(pos, ErrorMessages.InvalidPrivateFieldResolution, name2);
  140488. }
  140489. }
  140490. }
  140491. declarePrivateName(name2, elementType, pos) {
  140492. const classScope = this.current();
  140493. let redefined = classScope.privateNames.has(name2);
  140494. if (elementType & CLASS_ELEMENT_KIND_ACCESSOR) {
  140495. const accessor = redefined && classScope.loneAccessors.get(name2);
  140496. if (accessor) {
  140497. const oldStatic = accessor & CLASS_ELEMENT_FLAG_STATIC;
  140498. const newStatic = elementType & CLASS_ELEMENT_FLAG_STATIC;
  140499. const oldKind = accessor & CLASS_ELEMENT_KIND_ACCESSOR;
  140500. const newKind = elementType & CLASS_ELEMENT_KIND_ACCESSOR;
  140501. redefined = oldKind === newKind || oldStatic !== newStatic;
  140502. if (!redefined)
  140503. classScope.loneAccessors.delete(name2);
  140504. } else if (!redefined) {
  140505. classScope.loneAccessors.set(name2, elementType);
  140506. }
  140507. }
  140508. if (redefined) {
  140509. this.raise(pos, ErrorMessages.PrivateNameRedeclaration, name2);
  140510. }
  140511. classScope.privateNames.add(name2);
  140512. classScope.undefinedPrivateNames.delete(name2);
  140513. }
  140514. usePrivateName(name2, pos) {
  140515. let classScope;
  140516. for (classScope of this.stack) {
  140517. if (classScope.privateNames.has(name2))
  140518. return;
  140519. }
  140520. if (classScope) {
  140521. classScope.undefinedPrivateNames.set(name2, pos);
  140522. } else {
  140523. this.raise(pos, ErrorMessages.InvalidPrivateFieldResolution, name2);
  140524. }
  140525. }
  140526. };
  140527. var kExpression = 0;
  140528. var kMaybeArrowParameterDeclaration = 1;
  140529. var kMaybeAsyncArrowParameterDeclaration = 2;
  140530. var kParameterDeclaration = 3;
  140531. var ExpressionScope = class {
  140532. constructor(type = kExpression) {
  140533. this.type = void 0;
  140534. this.type = type;
  140535. }
  140536. canBeArrowParameterDeclaration() {
  140537. return this.type === kMaybeAsyncArrowParameterDeclaration || this.type === kMaybeArrowParameterDeclaration;
  140538. }
  140539. isCertainlyParameterDeclaration() {
  140540. return this.type === kParameterDeclaration;
  140541. }
  140542. };
  140543. var ArrowHeadParsingScope = class extends ExpressionScope {
  140544. constructor(type) {
  140545. super(type);
  140546. this.errors = /* @__PURE__ */ new Map();
  140547. }
  140548. recordDeclarationError(pos, template) {
  140549. this.errors.set(pos, template);
  140550. }
  140551. clearDeclarationError(pos) {
  140552. this.errors.delete(pos);
  140553. }
  140554. iterateErrors(iterator) {
  140555. this.errors.forEach(iterator);
  140556. }
  140557. };
  140558. var ExpressionScopeHandler = class {
  140559. constructor(raise2) {
  140560. this.stack = [new ExpressionScope()];
  140561. this.raise = raise2;
  140562. }
  140563. enter(scope) {
  140564. this.stack.push(scope);
  140565. }
  140566. exit() {
  140567. this.stack.pop();
  140568. }
  140569. recordParameterInitializerError(pos, template) {
  140570. const {
  140571. stack
  140572. } = this;
  140573. let i = stack.length - 1;
  140574. let scope = stack[i];
  140575. while (!scope.isCertainlyParameterDeclaration()) {
  140576. if (scope.canBeArrowParameterDeclaration()) {
  140577. scope.recordDeclarationError(pos, template);
  140578. } else {
  140579. return;
  140580. }
  140581. scope = stack[--i];
  140582. }
  140583. this.raise(pos, template);
  140584. }
  140585. recordParenthesizedIdentifierError(pos, template) {
  140586. const {
  140587. stack
  140588. } = this;
  140589. const scope = stack[stack.length - 1];
  140590. if (scope.isCertainlyParameterDeclaration()) {
  140591. this.raise(pos, template);
  140592. } else if (scope.canBeArrowParameterDeclaration()) {
  140593. scope.recordDeclarationError(pos, template);
  140594. } else {
  140595. return;
  140596. }
  140597. }
  140598. recordAsyncArrowParametersError(pos, template) {
  140599. const {
  140600. stack
  140601. } = this;
  140602. let i = stack.length - 1;
  140603. let scope = stack[i];
  140604. while (scope.canBeArrowParameterDeclaration()) {
  140605. if (scope.type === kMaybeAsyncArrowParameterDeclaration) {
  140606. scope.recordDeclarationError(pos, template);
  140607. }
  140608. scope = stack[--i];
  140609. }
  140610. }
  140611. validateAsPattern() {
  140612. const {
  140613. stack
  140614. } = this;
  140615. const currentScope = stack[stack.length - 1];
  140616. if (!currentScope.canBeArrowParameterDeclaration())
  140617. return;
  140618. currentScope.iterateErrors((template, pos) => {
  140619. this.raise(pos, template);
  140620. let i = stack.length - 2;
  140621. let scope = stack[i];
  140622. while (scope.canBeArrowParameterDeclaration()) {
  140623. scope.clearDeclarationError(pos);
  140624. scope = stack[--i];
  140625. }
  140626. });
  140627. }
  140628. };
  140629. function newParameterDeclarationScope() {
  140630. return new ExpressionScope(kParameterDeclaration);
  140631. }
  140632. function newArrowHeadScope() {
  140633. return new ArrowHeadParsingScope(kMaybeArrowParameterDeclaration);
  140634. }
  140635. function newAsyncArrowScope() {
  140636. return new ArrowHeadParsingScope(kMaybeAsyncArrowParameterDeclaration);
  140637. }
  140638. function newExpressionScope() {
  140639. return new ExpressionScope();
  140640. }
  140641. var UtilParser = class extends Tokenizer {
  140642. addExtra(node, key, val) {
  140643. if (!node)
  140644. return;
  140645. const extra = node.extra = node.extra || {};
  140646. extra[key] = val;
  140647. }
  140648. isRelational(op) {
  140649. return this.match(types$12.relational) && this.state.value === op;
  140650. }
  140651. expectRelational(op) {
  140652. if (this.isRelational(op)) {
  140653. this.next();
  140654. } else {
  140655. this.unexpected(null, types$12.relational);
  140656. }
  140657. }
  140658. isContextual(name2) {
  140659. return this.match(types$12.name) && this.state.value === name2 && !this.state.containsEsc;
  140660. }
  140661. isUnparsedContextual(nameStart, name2) {
  140662. const nameEnd = nameStart + name2.length;
  140663. if (this.input.slice(nameStart, nameEnd) === name2) {
  140664. const nextCh = this.input.charCodeAt(nameEnd);
  140665. return !(isIdentifierChar2(nextCh) || (nextCh & 64512) === 55296);
  140666. }
  140667. return false;
  140668. }
  140669. isLookaheadContextual(name2) {
  140670. const next = this.nextTokenStart();
  140671. return this.isUnparsedContextual(next, name2);
  140672. }
  140673. eatContextual(name2) {
  140674. return this.isContextual(name2) && this.eat(types$12.name);
  140675. }
  140676. expectContextual(name2, template) {
  140677. if (!this.eatContextual(name2))
  140678. this.unexpected(null, template);
  140679. }
  140680. canInsertSemicolon() {
  140681. return this.match(types$12.eof) || this.match(types$12.braceR) || this.hasPrecedingLineBreak();
  140682. }
  140683. hasPrecedingLineBreak() {
  140684. return lineBreak2.test(this.input.slice(this.state.lastTokEnd, this.state.start));
  140685. }
  140686. hasFollowingLineBreak() {
  140687. return lineBreak2.test(this.input.slice(this.state.end, this.nextTokenStart()));
  140688. }
  140689. isLineTerminator() {
  140690. return this.eat(types$12.semi) || this.canInsertSemicolon();
  140691. }
  140692. semicolon(allowAsi = true) {
  140693. if (allowAsi ? this.isLineTerminator() : this.eat(types$12.semi))
  140694. return;
  140695. this.raise(this.state.lastTokEnd, ErrorMessages.MissingSemicolon);
  140696. }
  140697. expect(type, pos) {
  140698. this.eat(type) || this.unexpected(pos, type);
  140699. }
  140700. assertNoSpace(message = "Unexpected space.") {
  140701. if (this.state.start > this.state.lastTokEnd) {
  140702. this.raise(this.state.lastTokEnd, {
  140703. code: ErrorCodes.SyntaxError,
  140704. reasonCode: "UnexpectedSpace",
  140705. template: message
  140706. });
  140707. }
  140708. }
  140709. unexpected(pos, messageOrType = {
  140710. code: ErrorCodes.SyntaxError,
  140711. reasonCode: "UnexpectedToken",
  140712. template: "Unexpected token"
  140713. }) {
  140714. if (messageOrType instanceof TokenType3) {
  140715. messageOrType = {
  140716. code: ErrorCodes.SyntaxError,
  140717. reasonCode: "UnexpectedToken",
  140718. template: `Unexpected token, expected "${messageOrType.label}"`
  140719. };
  140720. }
  140721. throw this.raise(pos != null ? pos : this.state.start, messageOrType);
  140722. }
  140723. expectPlugin(name2, pos) {
  140724. if (!this.hasPlugin(name2)) {
  140725. throw this.raiseWithData(pos != null ? pos : this.state.start, {
  140726. missingPlugin: [name2]
  140727. }, `This experimental syntax requires enabling the parser plugin: '${name2}'`);
  140728. }
  140729. return true;
  140730. }
  140731. expectOnePlugin(names, pos) {
  140732. if (!names.some((n) => this.hasPlugin(n))) {
  140733. throw this.raiseWithData(pos != null ? pos : this.state.start, {
  140734. missingPlugin: names
  140735. }, `This experimental syntax requires enabling one of the following parser plugin(s): '${names.join(", ")}'`);
  140736. }
  140737. }
  140738. tryParse(fn, oldState = this.state.clone()) {
  140739. const abortSignal = {
  140740. node: null
  140741. };
  140742. try {
  140743. const node = fn((node2 = null) => {
  140744. abortSignal.node = node2;
  140745. throw abortSignal;
  140746. });
  140747. if (this.state.errors.length > oldState.errors.length) {
  140748. const failState = this.state;
  140749. this.state = oldState;
  140750. this.state.tokensLength = failState.tokensLength;
  140751. return {
  140752. node,
  140753. error: failState.errors[oldState.errors.length],
  140754. thrown: false,
  140755. aborted: false,
  140756. failState
  140757. };
  140758. }
  140759. return {
  140760. node,
  140761. error: null,
  140762. thrown: false,
  140763. aborted: false,
  140764. failState: null
  140765. };
  140766. } catch (error) {
  140767. const failState = this.state;
  140768. this.state = oldState;
  140769. if (error instanceof SyntaxError) {
  140770. return {
  140771. node: null,
  140772. error,
  140773. thrown: true,
  140774. aborted: false,
  140775. failState
  140776. };
  140777. }
  140778. if (error === abortSignal) {
  140779. return {
  140780. node: abortSignal.node,
  140781. error: null,
  140782. thrown: false,
  140783. aborted: true,
  140784. failState
  140785. };
  140786. }
  140787. throw error;
  140788. }
  140789. }
  140790. checkExpressionErrors(refExpressionErrors, andThrow) {
  140791. if (!refExpressionErrors)
  140792. return false;
  140793. const {
  140794. shorthandAssign,
  140795. doubleProto
  140796. } = refExpressionErrors;
  140797. if (!andThrow)
  140798. return shorthandAssign >= 0 || doubleProto >= 0;
  140799. if (shorthandAssign >= 0) {
  140800. this.unexpected(shorthandAssign);
  140801. }
  140802. if (doubleProto >= 0) {
  140803. this.raise(doubleProto, ErrorMessages.DuplicateProto);
  140804. }
  140805. }
  140806. isLiteralPropertyName() {
  140807. return this.match(types$12.name) || !!this.state.type.keyword || this.match(types$12.string) || this.match(types$12.num) || this.match(types$12.bigint) || this.match(types$12.decimal);
  140808. }
  140809. isPrivateName(node) {
  140810. return node.type === "PrivateName";
  140811. }
  140812. getPrivateNameSV(node) {
  140813. return node.id.name;
  140814. }
  140815. hasPropertyAsPrivateName(node) {
  140816. return (node.type === "MemberExpression" || node.type === "OptionalMemberExpression") && this.isPrivateName(node.property);
  140817. }
  140818. isOptionalChain(node) {
  140819. return node.type === "OptionalMemberExpression" || node.type === "OptionalCallExpression";
  140820. }
  140821. isObjectProperty(node) {
  140822. return node.type === "ObjectProperty";
  140823. }
  140824. isObjectMethod(node) {
  140825. return node.type === "ObjectMethod";
  140826. }
  140827. initializeScopes(inModule = this.options.sourceType === "module") {
  140828. const oldLabels = this.state.labels;
  140829. this.state.labels = [];
  140830. const oldExportedIdentifiers = this.exportedIdentifiers;
  140831. this.exportedIdentifiers = /* @__PURE__ */ new Set();
  140832. const oldInModule = this.inModule;
  140833. this.inModule = inModule;
  140834. const oldScope = this.scope;
  140835. const ScopeHandler2 = this.getScopeHandler();
  140836. this.scope = new ScopeHandler2(this.raise.bind(this), this.inModule);
  140837. const oldProdParam = this.prodParam;
  140838. this.prodParam = new ProductionParameterHandler();
  140839. const oldClassScope = this.classScope;
  140840. this.classScope = new ClassScopeHandler(this.raise.bind(this));
  140841. const oldExpressionScope = this.expressionScope;
  140842. this.expressionScope = new ExpressionScopeHandler(this.raise.bind(this));
  140843. return () => {
  140844. this.state.labels = oldLabels;
  140845. this.exportedIdentifiers = oldExportedIdentifiers;
  140846. this.inModule = oldInModule;
  140847. this.scope = oldScope;
  140848. this.prodParam = oldProdParam;
  140849. this.classScope = oldClassScope;
  140850. this.expressionScope = oldExpressionScope;
  140851. };
  140852. }
  140853. enterInitialScopes() {
  140854. let paramFlags = PARAM;
  140855. if (this.hasPlugin("topLevelAwait") && this.inModule) {
  140856. paramFlags |= PARAM_AWAIT;
  140857. }
  140858. this.scope.enter(SCOPE_PROGRAM);
  140859. this.prodParam.enter(paramFlags);
  140860. }
  140861. };
  140862. var ExpressionErrors = class {
  140863. constructor() {
  140864. this.shorthandAssign = -1;
  140865. this.doubleProto = -1;
  140866. }
  140867. };
  140868. var Node3 = class {
  140869. constructor(parser, pos, loc) {
  140870. this.type = void 0;
  140871. this.start = void 0;
  140872. this.end = void 0;
  140873. this.loc = void 0;
  140874. this.range = void 0;
  140875. this.leadingComments = void 0;
  140876. this.trailingComments = void 0;
  140877. this.innerComments = void 0;
  140878. this.extra = void 0;
  140879. this.type = "";
  140880. this.start = pos;
  140881. this.end = 0;
  140882. this.loc = new SourceLocation3(loc);
  140883. if (parser != null && parser.options.ranges)
  140884. this.range = [pos, 0];
  140885. if (parser != null && parser.filename)
  140886. this.loc.filename = parser.filename;
  140887. }
  140888. __clone() {
  140889. const newNode = new Node3();
  140890. const keys2 = Object.keys(this);
  140891. for (let i = 0, length = keys2.length; i < length; i++) {
  140892. const key = keys2[i];
  140893. if (key !== "leadingComments" && key !== "trailingComments" && key !== "innerComments") {
  140894. newNode[key] = this[key];
  140895. }
  140896. }
  140897. return newNode;
  140898. }
  140899. };
  140900. var NodeUtils = class extends UtilParser {
  140901. startNode() {
  140902. return new Node3(this, this.state.start, this.state.startLoc);
  140903. }
  140904. startNodeAt(pos, loc) {
  140905. return new Node3(this, pos, loc);
  140906. }
  140907. startNodeAtNode(type) {
  140908. return this.startNodeAt(type.start, type.loc.start);
  140909. }
  140910. finishNode(node, type) {
  140911. return this.finishNodeAt(node, type, this.state.lastTokEnd, this.state.lastTokEndLoc);
  140912. }
  140913. finishNodeAt(node, type, pos, loc) {
  140914. node.type = type;
  140915. node.end = pos;
  140916. node.loc.end = loc;
  140917. if (this.options.ranges)
  140918. node.range[1] = pos;
  140919. this.processComment(node);
  140920. return node;
  140921. }
  140922. resetStartLocation(node, start3, startLoc) {
  140923. node.start = start3;
  140924. node.loc.start = startLoc;
  140925. if (this.options.ranges)
  140926. node.range[0] = start3;
  140927. }
  140928. resetEndLocation(node, end = this.state.lastTokEnd, endLoc = this.state.lastTokEndLoc) {
  140929. node.end = end;
  140930. node.loc.end = endLoc;
  140931. if (this.options.ranges)
  140932. node.range[1] = end;
  140933. }
  140934. resetStartLocationFromNode(node, locationNode) {
  140935. this.resetStartLocation(node, locationNode.start, locationNode.loc.start);
  140936. }
  140937. };
  140938. var unwrapParenthesizedExpression = (node) => {
  140939. return node.type === "ParenthesizedExpression" ? unwrapParenthesizedExpression(node.expression) : node;
  140940. };
  140941. var LValParser = class extends NodeUtils {
  140942. toAssignable(node, isLHS = false) {
  140943. var _node$extra, _node$extra3;
  140944. let parenthesized = void 0;
  140945. if (node.type === "ParenthesizedExpression" || (_node$extra = node.extra) != null && _node$extra.parenthesized) {
  140946. parenthesized = unwrapParenthesizedExpression(node);
  140947. if (isLHS) {
  140948. if (parenthesized.type === "Identifier") {
  140949. this.expressionScope.recordParenthesizedIdentifierError(node.start, ErrorMessages.InvalidParenthesizedAssignment);
  140950. } else if (parenthesized.type !== "MemberExpression") {
  140951. this.raise(node.start, ErrorMessages.InvalidParenthesizedAssignment);
  140952. }
  140953. } else {
  140954. this.raise(node.start, ErrorMessages.InvalidParenthesizedAssignment);
  140955. }
  140956. }
  140957. switch (node.type) {
  140958. case "Identifier":
  140959. case "ObjectPattern":
  140960. case "ArrayPattern":
  140961. case "AssignmentPattern":
  140962. break;
  140963. case "ObjectExpression":
  140964. node.type = "ObjectPattern";
  140965. for (let i = 0, length = node.properties.length, last2 = length - 1; i < length; i++) {
  140966. var _node$extra2;
  140967. const prop = node.properties[i];
  140968. const isLast = i === last2;
  140969. this.toAssignableObjectExpressionProp(prop, isLast, isLHS);
  140970. if (isLast && prop.type === "RestElement" && (_node$extra2 = node.extra) != null && _node$extra2.trailingComma) {
  140971. this.raiseRestNotLast(node.extra.trailingComma);
  140972. }
  140973. }
  140974. break;
  140975. case "ObjectProperty":
  140976. this.toAssignable(node.value, isLHS);
  140977. break;
  140978. case "SpreadElement": {
  140979. this.checkToRestConversion(node);
  140980. node.type = "RestElement";
  140981. const arg = node.argument;
  140982. this.toAssignable(arg, isLHS);
  140983. break;
  140984. }
  140985. case "ArrayExpression":
  140986. node.type = "ArrayPattern";
  140987. this.toAssignableList(node.elements, (_node$extra3 = node.extra) == null ? void 0 : _node$extra3.trailingComma, isLHS);
  140988. break;
  140989. case "AssignmentExpression":
  140990. if (node.operator !== "=") {
  140991. this.raise(node.left.end, ErrorMessages.MissingEqInAssignment);
  140992. }
  140993. node.type = "AssignmentPattern";
  140994. delete node.operator;
  140995. this.toAssignable(node.left, isLHS);
  140996. break;
  140997. case "ParenthesizedExpression":
  140998. this.toAssignable(parenthesized, isLHS);
  140999. break;
  141000. }
  141001. return node;
  141002. }
  141003. toAssignableObjectExpressionProp(prop, isLast, isLHS) {
  141004. if (prop.type === "ObjectMethod") {
  141005. const error = prop.kind === "get" || prop.kind === "set" ? ErrorMessages.PatternHasAccessor : ErrorMessages.PatternHasMethod;
  141006. this.raise(prop.key.start, error);
  141007. } else if (prop.type === "SpreadElement" && !isLast) {
  141008. this.raiseRestNotLast(prop.start);
  141009. } else {
  141010. this.toAssignable(prop, isLHS);
  141011. }
  141012. }
  141013. toAssignableList(exprList, trailingCommaPos, isLHS) {
  141014. let end = exprList.length;
  141015. if (end) {
  141016. const last2 = exprList[end - 1];
  141017. if ((last2 == null ? void 0 : last2.type) === "RestElement") {
  141018. --end;
  141019. } else if ((last2 == null ? void 0 : last2.type) === "SpreadElement") {
  141020. last2.type = "RestElement";
  141021. let arg = last2.argument;
  141022. this.toAssignable(arg, isLHS);
  141023. arg = unwrapParenthesizedExpression(arg);
  141024. if (arg.type !== "Identifier" && arg.type !== "MemberExpression" && arg.type !== "ArrayPattern" && arg.type !== "ObjectPattern") {
  141025. this.unexpected(arg.start);
  141026. }
  141027. if (trailingCommaPos) {
  141028. this.raiseTrailingCommaAfterRest(trailingCommaPos);
  141029. }
  141030. --end;
  141031. }
  141032. }
  141033. for (let i = 0; i < end; i++) {
  141034. const elt = exprList[i];
  141035. if (elt) {
  141036. this.toAssignable(elt, isLHS);
  141037. if (elt.type === "RestElement") {
  141038. this.raiseRestNotLast(elt.start);
  141039. }
  141040. }
  141041. }
  141042. return exprList;
  141043. }
  141044. toReferencedList(exprList, isParenthesizedExpr) {
  141045. return exprList;
  141046. }
  141047. toReferencedListDeep(exprList, isParenthesizedExpr) {
  141048. this.toReferencedList(exprList, isParenthesizedExpr);
  141049. for (const expr of exprList) {
  141050. if ((expr == null ? void 0 : expr.type) === "ArrayExpression") {
  141051. this.toReferencedListDeep(expr.elements);
  141052. }
  141053. }
  141054. }
  141055. parseSpread(refExpressionErrors, refNeedsArrowPos) {
  141056. const node = this.startNode();
  141057. this.next();
  141058. node.argument = this.parseMaybeAssignAllowIn(refExpressionErrors, void 0, refNeedsArrowPos);
  141059. return this.finishNode(node, "SpreadElement");
  141060. }
  141061. parseRestBinding() {
  141062. const node = this.startNode();
  141063. this.next();
  141064. node.argument = this.parseBindingAtom();
  141065. return this.finishNode(node, "RestElement");
  141066. }
  141067. parseBindingAtom() {
  141068. switch (this.state.type) {
  141069. case types$12.bracketL: {
  141070. const node = this.startNode();
  141071. this.next();
  141072. node.elements = this.parseBindingList(types$12.bracketR, 93, true);
  141073. return this.finishNode(node, "ArrayPattern");
  141074. }
  141075. case types$12.braceL:
  141076. return this.parseObjectLike(types$12.braceR, true);
  141077. }
  141078. return this.parseIdentifier();
  141079. }
  141080. parseBindingList(close, closeCharCode, allowEmpty, allowModifiers) {
  141081. const elts = [];
  141082. let first = true;
  141083. while (!this.eat(close)) {
  141084. if (first) {
  141085. first = false;
  141086. } else {
  141087. this.expect(types$12.comma);
  141088. }
  141089. if (allowEmpty && this.match(types$12.comma)) {
  141090. elts.push(null);
  141091. } else if (this.eat(close)) {
  141092. break;
  141093. } else if (this.match(types$12.ellipsis)) {
  141094. elts.push(this.parseAssignableListItemTypes(this.parseRestBinding()));
  141095. this.checkCommaAfterRest(closeCharCode);
  141096. this.expect(close);
  141097. break;
  141098. } else {
  141099. const decorators = [];
  141100. if (this.match(types$12.at) && this.hasPlugin("decorators")) {
  141101. this.raise(this.state.start, ErrorMessages.UnsupportedParameterDecorator);
  141102. }
  141103. while (this.match(types$12.at)) {
  141104. decorators.push(this.parseDecorator());
  141105. }
  141106. elts.push(this.parseAssignableListItem(allowModifiers, decorators));
  141107. }
  141108. }
  141109. return elts;
  141110. }
  141111. parseAssignableListItem(allowModifiers, decorators) {
  141112. const left = this.parseMaybeDefault();
  141113. this.parseAssignableListItemTypes(left);
  141114. const elt = this.parseMaybeDefault(left.start, left.loc.start, left);
  141115. if (decorators.length) {
  141116. left.decorators = decorators;
  141117. }
  141118. return elt;
  141119. }
  141120. parseAssignableListItemTypes(param) {
  141121. return param;
  141122. }
  141123. parseMaybeDefault(startPos, startLoc, left) {
  141124. var _startLoc, _startPos, _left;
  141125. startLoc = (_startLoc = startLoc) != null ? _startLoc : this.state.startLoc;
  141126. startPos = (_startPos = startPos) != null ? _startPos : this.state.start;
  141127. left = (_left = left) != null ? _left : this.parseBindingAtom();
  141128. if (!this.eat(types$12.eq))
  141129. return left;
  141130. const node = this.startNodeAt(startPos, startLoc);
  141131. node.left = left;
  141132. node.right = this.parseMaybeAssignAllowIn();
  141133. return this.finishNode(node, "AssignmentPattern");
  141134. }
  141135. checkLVal(expr, contextDescription, bindingType = BIND_NONE2, checkClashes, disallowLetBinding, strictModeChanged = false) {
  141136. switch (expr.type) {
  141137. case "Identifier": {
  141138. const {
  141139. name: name2
  141140. } = expr;
  141141. if (this.state.strict && (strictModeChanged ? isStrictBindReservedWord(name2, this.inModule) : isStrictBindOnlyReservedWord(name2))) {
  141142. this.raise(expr.start, bindingType === BIND_NONE2 ? ErrorMessages.StrictEvalArguments : ErrorMessages.StrictEvalArgumentsBinding, name2);
  141143. }
  141144. if (checkClashes) {
  141145. if (checkClashes.has(name2)) {
  141146. this.raise(expr.start, ErrorMessages.ParamDupe);
  141147. } else {
  141148. checkClashes.add(name2);
  141149. }
  141150. }
  141151. if (disallowLetBinding && name2 === "let") {
  141152. this.raise(expr.start, ErrorMessages.LetInLexicalBinding);
  141153. }
  141154. if (!(bindingType & BIND_NONE2)) {
  141155. this.scope.declareName(name2, bindingType, expr.start);
  141156. }
  141157. break;
  141158. }
  141159. case "MemberExpression":
  141160. if (bindingType !== BIND_NONE2) {
  141161. this.raise(expr.start, ErrorMessages.InvalidPropertyBindingPattern);
  141162. }
  141163. break;
  141164. case "ObjectPattern":
  141165. for (let prop of expr.properties) {
  141166. if (this.isObjectProperty(prop))
  141167. prop = prop.value;
  141168. else if (this.isObjectMethod(prop))
  141169. continue;
  141170. this.checkLVal(prop, "object destructuring pattern", bindingType, checkClashes, disallowLetBinding);
  141171. }
  141172. break;
  141173. case "ArrayPattern":
  141174. for (const elem of expr.elements) {
  141175. if (elem) {
  141176. this.checkLVal(elem, "array destructuring pattern", bindingType, checkClashes, disallowLetBinding);
  141177. }
  141178. }
  141179. break;
  141180. case "AssignmentPattern":
  141181. this.checkLVal(expr.left, "assignment pattern", bindingType, checkClashes);
  141182. break;
  141183. case "RestElement":
  141184. this.checkLVal(expr.argument, "rest element", bindingType, checkClashes);
  141185. break;
  141186. case "ParenthesizedExpression":
  141187. this.checkLVal(expr.expression, "parenthesized expression", bindingType, checkClashes);
  141188. break;
  141189. default: {
  141190. this.raise(expr.start, bindingType === BIND_NONE2 ? ErrorMessages.InvalidLhs : ErrorMessages.InvalidLhsBinding, contextDescription);
  141191. }
  141192. }
  141193. }
  141194. checkToRestConversion(node) {
  141195. if (node.argument.type !== "Identifier" && node.argument.type !== "MemberExpression") {
  141196. this.raise(node.argument.start, ErrorMessages.InvalidRestAssignmentPattern);
  141197. }
  141198. }
  141199. checkCommaAfterRest(close) {
  141200. if (this.match(types$12.comma)) {
  141201. if (this.lookaheadCharCode() === close) {
  141202. this.raiseTrailingCommaAfterRest(this.state.start);
  141203. } else {
  141204. this.raiseRestNotLast(this.state.start);
  141205. }
  141206. }
  141207. }
  141208. raiseRestNotLast(pos) {
  141209. throw this.raise(pos, ErrorMessages.ElementAfterRest);
  141210. }
  141211. raiseTrailingCommaAfterRest(pos) {
  141212. this.raise(pos, ErrorMessages.RestTrailingComma);
  141213. }
  141214. };
  141215. var ExpressionParser = class extends LValParser {
  141216. checkProto(prop, isRecord, protoRef, refExpressionErrors) {
  141217. if (prop.type === "SpreadElement" || this.isObjectMethod(prop) || prop.computed || prop.shorthand) {
  141218. return;
  141219. }
  141220. const key = prop.key;
  141221. const name2 = key.type === "Identifier" ? key.name : key.value;
  141222. if (name2 === "__proto__") {
  141223. if (isRecord) {
  141224. this.raise(key.start, ErrorMessages.RecordNoProto);
  141225. return;
  141226. }
  141227. if (protoRef.used) {
  141228. if (refExpressionErrors) {
  141229. if (refExpressionErrors.doubleProto === -1) {
  141230. refExpressionErrors.doubleProto = key.start;
  141231. }
  141232. } else {
  141233. this.raise(key.start, ErrorMessages.DuplicateProto);
  141234. }
  141235. }
  141236. protoRef.used = true;
  141237. }
  141238. }
  141239. shouldExitDescending(expr, potentialArrowAt) {
  141240. return expr.type === "ArrowFunctionExpression" && expr.start === potentialArrowAt;
  141241. }
  141242. getExpression() {
  141243. let paramFlags = PARAM;
  141244. if (this.hasPlugin("topLevelAwait") && this.inModule) {
  141245. paramFlags |= PARAM_AWAIT;
  141246. }
  141247. this.scope.enter(SCOPE_PROGRAM);
  141248. this.prodParam.enter(paramFlags);
  141249. this.nextToken();
  141250. const expr = this.parseExpression();
  141251. if (!this.match(types$12.eof)) {
  141252. this.unexpected();
  141253. }
  141254. expr.comments = this.state.comments;
  141255. expr.errors = this.state.errors;
  141256. if (this.options.tokens) {
  141257. expr.tokens = this.tokens;
  141258. }
  141259. return expr;
  141260. }
  141261. parseExpression(disallowIn, refExpressionErrors) {
  141262. if (disallowIn) {
  141263. return this.disallowInAnd(() => this.parseExpressionBase(refExpressionErrors));
  141264. }
  141265. return this.allowInAnd(() => this.parseExpressionBase(refExpressionErrors));
  141266. }
  141267. parseExpressionBase(refExpressionErrors) {
  141268. const startPos = this.state.start;
  141269. const startLoc = this.state.startLoc;
  141270. const expr = this.parseMaybeAssign(refExpressionErrors);
  141271. if (this.match(types$12.comma)) {
  141272. const node = this.startNodeAt(startPos, startLoc);
  141273. node.expressions = [expr];
  141274. while (this.eat(types$12.comma)) {
  141275. node.expressions.push(this.parseMaybeAssign(refExpressionErrors));
  141276. }
  141277. this.toReferencedList(node.expressions);
  141278. return this.finishNode(node, "SequenceExpression");
  141279. }
  141280. return expr;
  141281. }
  141282. parseMaybeAssignDisallowIn(refExpressionErrors, afterLeftParse, refNeedsArrowPos) {
  141283. return this.disallowInAnd(() => this.parseMaybeAssign(refExpressionErrors, afterLeftParse, refNeedsArrowPos));
  141284. }
  141285. parseMaybeAssignAllowIn(refExpressionErrors, afterLeftParse, refNeedsArrowPos) {
  141286. return this.allowInAnd(() => this.parseMaybeAssign(refExpressionErrors, afterLeftParse, refNeedsArrowPos));
  141287. }
  141288. parseMaybeAssign(refExpressionErrors, afterLeftParse, refNeedsArrowPos) {
  141289. const startPos = this.state.start;
  141290. const startLoc = this.state.startLoc;
  141291. if (this.isContextual("yield")) {
  141292. if (this.prodParam.hasYield) {
  141293. let left2 = this.parseYield();
  141294. if (afterLeftParse) {
  141295. left2 = afterLeftParse.call(this, left2, startPos, startLoc);
  141296. }
  141297. return left2;
  141298. }
  141299. }
  141300. let ownExpressionErrors;
  141301. if (refExpressionErrors) {
  141302. ownExpressionErrors = false;
  141303. } else {
  141304. refExpressionErrors = new ExpressionErrors();
  141305. ownExpressionErrors = true;
  141306. }
  141307. if (this.match(types$12.parenL) || this.match(types$12.name)) {
  141308. this.state.potentialArrowAt = this.state.start;
  141309. }
  141310. let left = this.parseMaybeConditional(refExpressionErrors, refNeedsArrowPos);
  141311. if (afterLeftParse) {
  141312. left = afterLeftParse.call(this, left, startPos, startLoc);
  141313. }
  141314. if (this.state.type.isAssign) {
  141315. const node = this.startNodeAt(startPos, startLoc);
  141316. const operator = this.state.value;
  141317. node.operator = operator;
  141318. if (this.match(types$12.eq)) {
  141319. node.left = this.toAssignable(left, true);
  141320. refExpressionErrors.doubleProto = -1;
  141321. } else {
  141322. node.left = left;
  141323. }
  141324. if (refExpressionErrors.shorthandAssign >= node.left.start) {
  141325. refExpressionErrors.shorthandAssign = -1;
  141326. }
  141327. this.checkLVal(left, "assignment expression");
  141328. this.next();
  141329. node.right = this.parseMaybeAssign();
  141330. return this.finishNode(node, "AssignmentExpression");
  141331. } else if (ownExpressionErrors) {
  141332. this.checkExpressionErrors(refExpressionErrors, true);
  141333. }
  141334. return left;
  141335. }
  141336. parseMaybeConditional(refExpressionErrors, refNeedsArrowPos) {
  141337. const startPos = this.state.start;
  141338. const startLoc = this.state.startLoc;
  141339. const potentialArrowAt = this.state.potentialArrowAt;
  141340. const expr = this.parseExprOps(refExpressionErrors);
  141341. if (this.shouldExitDescending(expr, potentialArrowAt)) {
  141342. return expr;
  141343. }
  141344. return this.parseConditional(expr, startPos, startLoc, refNeedsArrowPos);
  141345. }
  141346. parseConditional(expr, startPos, startLoc, refNeedsArrowPos) {
  141347. if (this.eat(types$12.question)) {
  141348. const node = this.startNodeAt(startPos, startLoc);
  141349. node.test = expr;
  141350. node.consequent = this.parseMaybeAssignAllowIn();
  141351. this.expect(types$12.colon);
  141352. node.alternate = this.parseMaybeAssign();
  141353. return this.finishNode(node, "ConditionalExpression");
  141354. }
  141355. return expr;
  141356. }
  141357. parseExprOps(refExpressionErrors) {
  141358. const startPos = this.state.start;
  141359. const startLoc = this.state.startLoc;
  141360. const potentialArrowAt = this.state.potentialArrowAt;
  141361. const expr = this.parseMaybeUnary(refExpressionErrors);
  141362. if (this.shouldExitDescending(expr, potentialArrowAt)) {
  141363. return expr;
  141364. }
  141365. return this.parseExprOp(expr, startPos, startLoc, -1);
  141366. }
  141367. parseExprOp(left, leftStartPos, leftStartLoc, minPrec) {
  141368. let prec = this.state.type.binop;
  141369. if (prec != null && (this.prodParam.hasIn || !this.match(types$12._in))) {
  141370. if (prec > minPrec) {
  141371. const op = this.state.type;
  141372. if (op === types$12.pipeline) {
  141373. this.expectPlugin("pipelineOperator");
  141374. if (this.state.inFSharpPipelineDirectBody) {
  141375. return left;
  141376. }
  141377. this.state.inPipeline = true;
  141378. this.checkPipelineAtInfixOperator(left, leftStartPos);
  141379. }
  141380. const node = this.startNodeAt(leftStartPos, leftStartLoc);
  141381. node.left = left;
  141382. node.operator = this.state.value;
  141383. const logical = op === types$12.logicalOR || op === types$12.logicalAND;
  141384. const coalesce = op === types$12.nullishCoalescing;
  141385. if (coalesce) {
  141386. prec = types$12.logicalAND.binop;
  141387. }
  141388. this.next();
  141389. if (op === types$12.pipeline && this.getPluginOption("pipelineOperator", "proposal") === "minimal") {
  141390. if (this.match(types$12.name) && this.state.value === "await" && this.prodParam.hasAwait) {
  141391. throw this.raise(this.state.start, ErrorMessages.UnexpectedAwaitAfterPipelineBody);
  141392. }
  141393. }
  141394. node.right = this.parseExprOpRightExpr(op, prec);
  141395. this.finishNode(node, logical || coalesce ? "LogicalExpression" : "BinaryExpression");
  141396. const nextOp = this.state.type;
  141397. if (coalesce && (nextOp === types$12.logicalOR || nextOp === types$12.logicalAND) || logical && nextOp === types$12.nullishCoalescing) {
  141398. throw this.raise(this.state.start, ErrorMessages.MixingCoalesceWithLogical);
  141399. }
  141400. return this.parseExprOp(node, leftStartPos, leftStartLoc, minPrec);
  141401. }
  141402. }
  141403. return left;
  141404. }
  141405. parseExprOpRightExpr(op, prec) {
  141406. const startPos = this.state.start;
  141407. const startLoc = this.state.startLoc;
  141408. switch (op) {
  141409. case types$12.pipeline:
  141410. switch (this.getPluginOption("pipelineOperator", "proposal")) {
  141411. case "smart":
  141412. return this.withTopicPermittingContext(() => {
  141413. return this.parseSmartPipelineBody(this.parseExprOpBaseRightExpr(op, prec), startPos, startLoc);
  141414. });
  141415. case "fsharp":
  141416. return this.withSoloAwaitPermittingContext(() => {
  141417. return this.parseFSharpPipelineBody(prec);
  141418. });
  141419. }
  141420. default:
  141421. return this.parseExprOpBaseRightExpr(op, prec);
  141422. }
  141423. }
  141424. parseExprOpBaseRightExpr(op, prec) {
  141425. const startPos = this.state.start;
  141426. const startLoc = this.state.startLoc;
  141427. return this.parseExprOp(this.parseMaybeUnary(), startPos, startLoc, op.rightAssociative ? prec - 1 : prec);
  141428. }
  141429. checkExponentialAfterUnary(node) {
  141430. if (this.match(types$12.exponent)) {
  141431. this.raise(node.argument.start, ErrorMessages.UnexpectedTokenUnaryExponentiation);
  141432. }
  141433. }
  141434. parseMaybeUnary(refExpressionErrors, sawUnary) {
  141435. const startPos = this.state.start;
  141436. const startLoc = this.state.startLoc;
  141437. const isAwait = this.isContextual("await");
  141438. if (isAwait && this.isAwaitAllowed()) {
  141439. this.next();
  141440. const expr2 = this.parseAwait(startPos, startLoc);
  141441. if (!sawUnary)
  141442. this.checkExponentialAfterUnary(expr2);
  141443. return expr2;
  141444. }
  141445. if (this.isContextual("module") && this.lookaheadCharCode() === 123 && !this.hasFollowingLineBreak()) {
  141446. return this.parseModuleExpression();
  141447. }
  141448. const update = this.match(types$12.incDec);
  141449. const node = this.startNode();
  141450. if (this.state.type.prefix) {
  141451. node.operator = this.state.value;
  141452. node.prefix = true;
  141453. if (this.match(types$12._throw)) {
  141454. this.expectPlugin("throwExpressions");
  141455. }
  141456. const isDelete = this.match(types$12._delete);
  141457. this.next();
  141458. node.argument = this.parseMaybeUnary(null, true);
  141459. this.checkExpressionErrors(refExpressionErrors, true);
  141460. if (this.state.strict && isDelete) {
  141461. const arg = node.argument;
  141462. if (arg.type === "Identifier") {
  141463. this.raise(node.start, ErrorMessages.StrictDelete);
  141464. } else if (this.hasPropertyAsPrivateName(arg)) {
  141465. this.raise(node.start, ErrorMessages.DeletePrivateField);
  141466. }
  141467. }
  141468. if (!update) {
  141469. if (!sawUnary)
  141470. this.checkExponentialAfterUnary(node);
  141471. return this.finishNode(node, "UnaryExpression");
  141472. }
  141473. }
  141474. const expr = this.parseUpdate(node, update, refExpressionErrors);
  141475. if (isAwait) {
  141476. const startsExpr3 = this.hasPlugin("v8intrinsic") ? this.state.type.startsExpr : this.state.type.startsExpr && !this.match(types$12.modulo);
  141477. if (startsExpr3 && !this.isAmbiguousAwait()) {
  141478. this.raiseOverwrite(startPos, this.hasPlugin("topLevelAwait") ? ErrorMessages.AwaitNotInAsyncContext : ErrorMessages.AwaitNotInAsyncFunction);
  141479. return this.parseAwait(startPos, startLoc);
  141480. }
  141481. }
  141482. return expr;
  141483. }
  141484. parseUpdate(node, update, refExpressionErrors) {
  141485. if (update) {
  141486. this.checkLVal(node.argument, "prefix operation");
  141487. return this.finishNode(node, "UpdateExpression");
  141488. }
  141489. const startPos = this.state.start;
  141490. const startLoc = this.state.startLoc;
  141491. let expr = this.parseExprSubscripts(refExpressionErrors);
  141492. if (this.checkExpressionErrors(refExpressionErrors, false))
  141493. return expr;
  141494. while (this.state.type.postfix && !this.canInsertSemicolon()) {
  141495. const node2 = this.startNodeAt(startPos, startLoc);
  141496. node2.operator = this.state.value;
  141497. node2.prefix = false;
  141498. node2.argument = expr;
  141499. this.checkLVal(expr, "postfix operation");
  141500. this.next();
  141501. expr = this.finishNode(node2, "UpdateExpression");
  141502. }
  141503. return expr;
  141504. }
  141505. parseExprSubscripts(refExpressionErrors) {
  141506. const startPos = this.state.start;
  141507. const startLoc = this.state.startLoc;
  141508. const potentialArrowAt = this.state.potentialArrowAt;
  141509. const expr = this.parseExprAtom(refExpressionErrors);
  141510. if (this.shouldExitDescending(expr, potentialArrowAt)) {
  141511. return expr;
  141512. }
  141513. return this.parseSubscripts(expr, startPos, startLoc);
  141514. }
  141515. parseSubscripts(base2, startPos, startLoc, noCalls) {
  141516. const state = {
  141517. optionalChainMember: false,
  141518. maybeAsyncArrow: this.atPossibleAsyncArrow(base2),
  141519. stop: false
  141520. };
  141521. do {
  141522. base2 = this.parseSubscript(base2, startPos, startLoc, noCalls, state);
  141523. state.maybeAsyncArrow = false;
  141524. } while (!state.stop);
  141525. return base2;
  141526. }
  141527. parseSubscript(base2, startPos, startLoc, noCalls, state) {
  141528. if (!noCalls && this.eat(types$12.doubleColon)) {
  141529. return this.parseBind(base2, startPos, startLoc, noCalls, state);
  141530. } else if (this.match(types$12.backQuote)) {
  141531. return this.parseTaggedTemplateExpression(base2, startPos, startLoc, state);
  141532. }
  141533. let optional = false;
  141534. if (this.match(types$12.questionDot)) {
  141535. if (noCalls && this.lookaheadCharCode() === 40) {
  141536. state.stop = true;
  141537. return base2;
  141538. }
  141539. state.optionalChainMember = optional = true;
  141540. this.next();
  141541. }
  141542. if (!noCalls && this.match(types$12.parenL)) {
  141543. return this.parseCoverCallAndAsyncArrowHead(base2, startPos, startLoc, state, optional);
  141544. } else if (optional || this.match(types$12.bracketL) || this.eat(types$12.dot)) {
  141545. return this.parseMember(base2, startPos, startLoc, state, optional);
  141546. } else {
  141547. state.stop = true;
  141548. return base2;
  141549. }
  141550. }
  141551. parseMember(base2, startPos, startLoc, state, optional) {
  141552. const node = this.startNodeAt(startPos, startLoc);
  141553. const computed = this.eat(types$12.bracketL);
  141554. node.object = base2;
  141555. node.computed = computed;
  141556. const privateName = !computed && this.match(types$12.privateName) && this.state.value;
  141557. const property = computed ? this.parseExpression() : privateName ? this.parsePrivateName() : this.parseIdentifier(true);
  141558. if (privateName !== false) {
  141559. if (node.object.type === "Super") {
  141560. this.raise(startPos, ErrorMessages.SuperPrivateField);
  141561. }
  141562. this.classScope.usePrivateName(privateName, property.start);
  141563. }
  141564. node.property = property;
  141565. if (computed) {
  141566. this.expect(types$12.bracketR);
  141567. }
  141568. if (state.optionalChainMember) {
  141569. node.optional = optional;
  141570. return this.finishNode(node, "OptionalMemberExpression");
  141571. } else {
  141572. return this.finishNode(node, "MemberExpression");
  141573. }
  141574. }
  141575. parseBind(base2, startPos, startLoc, noCalls, state) {
  141576. const node = this.startNodeAt(startPos, startLoc);
  141577. node.object = base2;
  141578. node.callee = this.parseNoCallExpr();
  141579. state.stop = true;
  141580. return this.parseSubscripts(this.finishNode(node, "BindExpression"), startPos, startLoc, noCalls);
  141581. }
  141582. parseCoverCallAndAsyncArrowHead(base2, startPos, startLoc, state, optional) {
  141583. const oldMaybeInArrowParameters = this.state.maybeInArrowParameters;
  141584. let refExpressionErrors = null;
  141585. this.state.maybeInArrowParameters = true;
  141586. this.next();
  141587. let node = this.startNodeAt(startPos, startLoc);
  141588. node.callee = base2;
  141589. if (state.maybeAsyncArrow) {
  141590. this.expressionScope.enter(newAsyncArrowScope());
  141591. refExpressionErrors = new ExpressionErrors();
  141592. }
  141593. if (state.optionalChainMember) {
  141594. node.optional = optional;
  141595. }
  141596. if (optional) {
  141597. node.arguments = this.parseCallExpressionArguments(types$12.parenR);
  141598. } else {
  141599. node.arguments = this.parseCallExpressionArguments(types$12.parenR, base2.type === "Import", base2.type !== "Super", node, refExpressionErrors);
  141600. }
  141601. this.finishCallExpression(node, state.optionalChainMember);
  141602. if (state.maybeAsyncArrow && this.shouldParseAsyncArrow() && !optional) {
  141603. state.stop = true;
  141604. this.expressionScope.validateAsPattern();
  141605. this.expressionScope.exit();
  141606. node = this.parseAsyncArrowFromCallExpression(this.startNodeAt(startPos, startLoc), node);
  141607. } else {
  141608. if (state.maybeAsyncArrow) {
  141609. this.checkExpressionErrors(refExpressionErrors, true);
  141610. this.expressionScope.exit();
  141611. }
  141612. this.toReferencedArguments(node);
  141613. }
  141614. this.state.maybeInArrowParameters = oldMaybeInArrowParameters;
  141615. return node;
  141616. }
  141617. toReferencedArguments(node, isParenthesizedExpr) {
  141618. this.toReferencedListDeep(node.arguments, isParenthesizedExpr);
  141619. }
  141620. parseTaggedTemplateExpression(base2, startPos, startLoc, state) {
  141621. const node = this.startNodeAt(startPos, startLoc);
  141622. node.tag = base2;
  141623. node.quasi = this.parseTemplate(true);
  141624. if (state.optionalChainMember) {
  141625. this.raise(startPos, ErrorMessages.OptionalChainingNoTemplate);
  141626. }
  141627. return this.finishNode(node, "TaggedTemplateExpression");
  141628. }
  141629. atPossibleAsyncArrow(base2) {
  141630. return base2.type === "Identifier" && base2.name === "async" && this.state.lastTokEnd === base2.end && !this.canInsertSemicolon() && base2.end - base2.start === 5 && base2.start === this.state.potentialArrowAt;
  141631. }
  141632. finishCallExpression(node, optional) {
  141633. if (node.callee.type === "Import") {
  141634. if (node.arguments.length === 2) {
  141635. {
  141636. if (!this.hasPlugin("moduleAttributes")) {
  141637. this.expectPlugin("importAssertions");
  141638. }
  141639. }
  141640. }
  141641. if (node.arguments.length === 0 || node.arguments.length > 2) {
  141642. this.raise(node.start, ErrorMessages.ImportCallArity, this.hasPlugin("importAssertions") || this.hasPlugin("moduleAttributes") ? "one or two arguments" : "one argument");
  141643. } else {
  141644. for (const arg of node.arguments) {
  141645. if (arg.type === "SpreadElement") {
  141646. this.raise(arg.start, ErrorMessages.ImportCallSpreadArgument);
  141647. }
  141648. }
  141649. }
  141650. }
  141651. return this.finishNode(node, optional ? "OptionalCallExpression" : "CallExpression");
  141652. }
  141653. parseCallExpressionArguments(close, dynamicImport, allowPlaceholder, nodeForExtra, refExpressionErrors) {
  141654. const elts = [];
  141655. let first = true;
  141656. const oldInFSharpPipelineDirectBody = this.state.inFSharpPipelineDirectBody;
  141657. this.state.inFSharpPipelineDirectBody = false;
  141658. while (!this.eat(close)) {
  141659. if (first) {
  141660. first = false;
  141661. } else {
  141662. this.expect(types$12.comma);
  141663. if (this.match(close)) {
  141664. if (dynamicImport && !this.hasPlugin("importAssertions") && !this.hasPlugin("moduleAttributes")) {
  141665. this.raise(this.state.lastTokStart, ErrorMessages.ImportCallArgumentTrailingComma);
  141666. }
  141667. if (nodeForExtra) {
  141668. this.addExtra(nodeForExtra, "trailingComma", this.state.lastTokStart);
  141669. }
  141670. this.next();
  141671. break;
  141672. }
  141673. }
  141674. elts.push(this.parseExprListItem(false, refExpressionErrors, {
  141675. start: 0
  141676. }, allowPlaceholder));
  141677. }
  141678. this.state.inFSharpPipelineDirectBody = oldInFSharpPipelineDirectBody;
  141679. return elts;
  141680. }
  141681. shouldParseAsyncArrow() {
  141682. return this.match(types$12.arrow) && !this.canInsertSemicolon();
  141683. }
  141684. parseAsyncArrowFromCallExpression(node, call) {
  141685. var _call$extra;
  141686. this.expect(types$12.arrow);
  141687. this.parseArrowExpression(node, call.arguments, true, (_call$extra = call.extra) == null ? void 0 : _call$extra.trailingComma);
  141688. return node;
  141689. }
  141690. parseNoCallExpr() {
  141691. const startPos = this.state.start;
  141692. const startLoc = this.state.startLoc;
  141693. return this.parseSubscripts(this.parseExprAtom(), startPos, startLoc, true);
  141694. }
  141695. parseExprAtom(refExpressionErrors) {
  141696. let node;
  141697. switch (this.state.type) {
  141698. case types$12._super:
  141699. return this.parseSuper();
  141700. case types$12._import:
  141701. node = this.startNode();
  141702. this.next();
  141703. if (this.match(types$12.dot)) {
  141704. return this.parseImportMetaProperty(node);
  141705. }
  141706. if (!this.match(types$12.parenL)) {
  141707. this.raise(this.state.lastTokStart, ErrorMessages.UnsupportedImport);
  141708. }
  141709. return this.finishNode(node, "Import");
  141710. case types$12._this:
  141711. node = this.startNode();
  141712. this.next();
  141713. return this.finishNode(node, "ThisExpression");
  141714. case types$12.name: {
  141715. const canBeArrow = this.state.potentialArrowAt === this.state.start;
  141716. const containsEsc = this.state.containsEsc;
  141717. const id = this.parseIdentifier();
  141718. if (!containsEsc && id.name === "async" && !this.canInsertSemicolon()) {
  141719. if (this.match(types$12._function)) {
  141720. this.next();
  141721. return this.parseFunction(this.startNodeAtNode(id), void 0, true);
  141722. } else if (this.match(types$12.name)) {
  141723. if (this.lookaheadCharCode() === 61) {
  141724. return this.parseAsyncArrowUnaryFunction(id);
  141725. } else {
  141726. return id;
  141727. }
  141728. } else if (this.match(types$12._do)) {
  141729. return this.parseDo(true);
  141730. }
  141731. }
  141732. if (canBeArrow && this.match(types$12.arrow) && !this.canInsertSemicolon()) {
  141733. this.next();
  141734. return this.parseArrowExpression(this.startNodeAtNode(id), [id], false);
  141735. }
  141736. return id;
  141737. }
  141738. case types$12._do: {
  141739. return this.parseDo(false);
  141740. }
  141741. case types$12.slash:
  141742. case types$12.slashAssign: {
  141743. this.readRegexp();
  141744. return this.parseRegExpLiteral(this.state.value);
  141745. }
  141746. case types$12.num:
  141747. return this.parseNumericLiteral(this.state.value);
  141748. case types$12.bigint:
  141749. return this.parseBigIntLiteral(this.state.value);
  141750. case types$12.decimal:
  141751. return this.parseDecimalLiteral(this.state.value);
  141752. case types$12.string:
  141753. return this.parseStringLiteral(this.state.value);
  141754. case types$12._null:
  141755. return this.parseNullLiteral();
  141756. case types$12._true:
  141757. return this.parseBooleanLiteral(true);
  141758. case types$12._false:
  141759. return this.parseBooleanLiteral(false);
  141760. case types$12.parenL: {
  141761. const canBeArrow = this.state.potentialArrowAt === this.state.start;
  141762. return this.parseParenAndDistinguishExpression(canBeArrow);
  141763. }
  141764. case types$12.bracketBarL:
  141765. case types$12.bracketHashL: {
  141766. return this.parseArrayLike(this.state.type === types$12.bracketBarL ? types$12.bracketBarR : types$12.bracketR, false, true, refExpressionErrors);
  141767. }
  141768. case types$12.bracketL: {
  141769. return this.parseArrayLike(types$12.bracketR, true, false, refExpressionErrors);
  141770. }
  141771. case types$12.braceBarL:
  141772. case types$12.braceHashL: {
  141773. return this.parseObjectLike(this.state.type === types$12.braceBarL ? types$12.braceBarR : types$12.braceR, false, true, refExpressionErrors);
  141774. }
  141775. case types$12.braceL: {
  141776. return this.parseObjectLike(types$12.braceR, false, false, refExpressionErrors);
  141777. }
  141778. case types$12._function:
  141779. return this.parseFunctionOrFunctionSent();
  141780. case types$12.at:
  141781. this.parseDecorators();
  141782. case types$12._class:
  141783. node = this.startNode();
  141784. this.takeDecorators(node);
  141785. return this.parseClass(node, false);
  141786. case types$12._new:
  141787. return this.parseNewOrNewTarget();
  141788. case types$12.backQuote:
  141789. return this.parseTemplate(false);
  141790. case types$12.doubleColon: {
  141791. node = this.startNode();
  141792. this.next();
  141793. node.object = null;
  141794. const callee = node.callee = this.parseNoCallExpr();
  141795. if (callee.type === "MemberExpression") {
  141796. return this.finishNode(node, "BindExpression");
  141797. } else {
  141798. throw this.raise(callee.start, ErrorMessages.UnsupportedBind);
  141799. }
  141800. }
  141801. case types$12.privateName: {
  141802. const start3 = this.state.start;
  141803. const value = this.state.value;
  141804. node = this.parsePrivateName();
  141805. if (this.match(types$12._in)) {
  141806. this.expectPlugin("privateIn");
  141807. this.classScope.usePrivateName(value, node.start);
  141808. } else if (this.hasPlugin("privateIn")) {
  141809. this.raise(this.state.start, ErrorMessages.PrivateInExpectedIn, value);
  141810. } else {
  141811. throw this.unexpected(start3);
  141812. }
  141813. return node;
  141814. }
  141815. case types$12.hash: {
  141816. if (this.state.inPipeline) {
  141817. node = this.startNode();
  141818. if (this.getPluginOption("pipelineOperator", "proposal") !== "smart") {
  141819. this.raise(node.start, ErrorMessages.PrimaryTopicRequiresSmartPipeline);
  141820. }
  141821. this.next();
  141822. if (!this.primaryTopicReferenceIsAllowedInCurrentTopicContext()) {
  141823. this.raise(node.start, ErrorMessages.PrimaryTopicNotAllowed);
  141824. }
  141825. this.registerTopicReference();
  141826. return this.finishNode(node, "PipelinePrimaryTopicReference");
  141827. }
  141828. }
  141829. case types$12.relational: {
  141830. if (this.state.value === "<") {
  141831. const lookaheadCh = this.input.codePointAt(this.nextTokenStart());
  141832. if (isIdentifierStart2(lookaheadCh) || lookaheadCh === 62) {
  141833. this.expectOnePlugin(["jsx", "flow", "typescript"]);
  141834. }
  141835. }
  141836. }
  141837. default:
  141838. throw this.unexpected();
  141839. }
  141840. }
  141841. parseAsyncArrowUnaryFunction(id) {
  141842. const node = this.startNodeAtNode(id);
  141843. this.prodParam.enter(functionFlags2(true, this.prodParam.hasYield));
  141844. const params = [this.parseIdentifier()];
  141845. this.prodParam.exit();
  141846. if (this.hasPrecedingLineBreak()) {
  141847. this.raise(this.state.pos, ErrorMessages.LineTerminatorBeforeArrow);
  141848. }
  141849. this.expect(types$12.arrow);
  141850. this.parseArrowExpression(node, params, true);
  141851. return node;
  141852. }
  141853. parseDo(isAsync) {
  141854. this.expectPlugin("doExpressions");
  141855. if (isAsync) {
  141856. this.expectPlugin("asyncDoExpressions");
  141857. }
  141858. const node = this.startNode();
  141859. node.async = isAsync;
  141860. this.next();
  141861. const oldLabels = this.state.labels;
  141862. this.state.labels = [];
  141863. if (isAsync) {
  141864. this.prodParam.enter(PARAM_AWAIT);
  141865. node.body = this.parseBlock();
  141866. this.prodParam.exit();
  141867. } else {
  141868. node.body = this.parseBlock();
  141869. }
  141870. this.state.labels = oldLabels;
  141871. return this.finishNode(node, "DoExpression");
  141872. }
  141873. parseSuper() {
  141874. const node = this.startNode();
  141875. this.next();
  141876. if (this.match(types$12.parenL) && !this.scope.allowDirectSuper && !this.options.allowSuperOutsideMethod) {
  141877. this.raise(node.start, ErrorMessages.SuperNotAllowed);
  141878. } else if (!this.scope.allowSuper && !this.options.allowSuperOutsideMethod) {
  141879. this.raise(node.start, ErrorMessages.UnexpectedSuper);
  141880. }
  141881. if (!this.match(types$12.parenL) && !this.match(types$12.bracketL) && !this.match(types$12.dot)) {
  141882. this.raise(node.start, ErrorMessages.UnsupportedSuper);
  141883. }
  141884. return this.finishNode(node, "Super");
  141885. }
  141886. parseMaybePrivateName(isPrivateNameAllowed) {
  141887. const isPrivate = this.match(types$12.privateName);
  141888. if (isPrivate) {
  141889. if (!isPrivateNameAllowed) {
  141890. this.raise(this.state.start + 1, ErrorMessages.UnexpectedPrivateField);
  141891. }
  141892. return this.parsePrivateName();
  141893. } else {
  141894. return this.parseIdentifier(true);
  141895. }
  141896. }
  141897. parsePrivateName() {
  141898. const node = this.startNode();
  141899. const id = this.startNodeAt(this.state.start + 1, new Position3(this.state.curLine, this.state.start + 1 - this.state.lineStart));
  141900. const name2 = this.state.value;
  141901. this.next();
  141902. node.id = this.createIdentifier(id, name2);
  141903. return this.finishNode(node, "PrivateName");
  141904. }
  141905. parseFunctionOrFunctionSent() {
  141906. const node = this.startNode();
  141907. this.next();
  141908. if (this.prodParam.hasYield && this.match(types$12.dot)) {
  141909. const meta = this.createIdentifier(this.startNodeAtNode(node), "function");
  141910. this.next();
  141911. return this.parseMetaProperty(node, meta, "sent");
  141912. }
  141913. return this.parseFunction(node);
  141914. }
  141915. parseMetaProperty(node, meta, propertyName) {
  141916. node.meta = meta;
  141917. if (meta.name === "function" && propertyName === "sent") {
  141918. if (this.isContextual(propertyName)) {
  141919. this.expectPlugin("functionSent");
  141920. } else if (!this.hasPlugin("functionSent")) {
  141921. this.unexpected();
  141922. }
  141923. }
  141924. const containsEsc = this.state.containsEsc;
  141925. node.property = this.parseIdentifier(true);
  141926. if (node.property.name !== propertyName || containsEsc) {
  141927. this.raise(node.property.start, ErrorMessages.UnsupportedMetaProperty, meta.name, propertyName);
  141928. }
  141929. return this.finishNode(node, "MetaProperty");
  141930. }
  141931. parseImportMetaProperty(node) {
  141932. const id = this.createIdentifier(this.startNodeAtNode(node), "import");
  141933. this.next();
  141934. if (this.isContextual("meta")) {
  141935. if (!this.inModule) {
  141936. this.raise(id.start, SourceTypeModuleErrorMessages.ImportMetaOutsideModule);
  141937. }
  141938. this.sawUnambiguousESM = true;
  141939. }
  141940. return this.parseMetaProperty(node, id, "meta");
  141941. }
  141942. parseLiteralAtNode(value, type, node) {
  141943. this.addExtra(node, "rawValue", value);
  141944. this.addExtra(node, "raw", this.input.slice(node.start, this.state.end));
  141945. node.value = value;
  141946. this.next();
  141947. return this.finishNode(node, type);
  141948. }
  141949. parseLiteral(value, type) {
  141950. const node = this.startNode();
  141951. return this.parseLiteralAtNode(value, type, node);
  141952. }
  141953. parseStringLiteral(value) {
  141954. return this.parseLiteral(value, "StringLiteral");
  141955. }
  141956. parseNumericLiteral(value) {
  141957. return this.parseLiteral(value, "NumericLiteral");
  141958. }
  141959. parseBigIntLiteral(value) {
  141960. return this.parseLiteral(value, "BigIntLiteral");
  141961. }
  141962. parseDecimalLiteral(value) {
  141963. return this.parseLiteral(value, "DecimalLiteral");
  141964. }
  141965. parseRegExpLiteral(value) {
  141966. const node = this.parseLiteral(value.value, "RegExpLiteral");
  141967. node.pattern = value.pattern;
  141968. node.flags = value.flags;
  141969. return node;
  141970. }
  141971. parseBooleanLiteral(value) {
  141972. const node = this.startNode();
  141973. node.value = value;
  141974. this.next();
  141975. return this.finishNode(node, "BooleanLiteral");
  141976. }
  141977. parseNullLiteral() {
  141978. const node = this.startNode();
  141979. this.next();
  141980. return this.finishNode(node, "NullLiteral");
  141981. }
  141982. parseParenAndDistinguishExpression(canBeArrow) {
  141983. const startPos = this.state.start;
  141984. const startLoc = this.state.startLoc;
  141985. let val;
  141986. this.next();
  141987. this.expressionScope.enter(newArrowHeadScope());
  141988. const oldMaybeInArrowParameters = this.state.maybeInArrowParameters;
  141989. const oldInFSharpPipelineDirectBody = this.state.inFSharpPipelineDirectBody;
  141990. this.state.maybeInArrowParameters = true;
  141991. this.state.inFSharpPipelineDirectBody = false;
  141992. const innerStartPos = this.state.start;
  141993. const innerStartLoc = this.state.startLoc;
  141994. const exprList = [];
  141995. const refExpressionErrors = new ExpressionErrors();
  141996. const refNeedsArrowPos = {
  141997. start: 0
  141998. };
  141999. let first = true;
  142000. let spreadStart;
  142001. let optionalCommaStart;
  142002. while (!this.match(types$12.parenR)) {
  142003. if (first) {
  142004. first = false;
  142005. } else {
  142006. this.expect(types$12.comma, refNeedsArrowPos.start || null);
  142007. if (this.match(types$12.parenR)) {
  142008. optionalCommaStart = this.state.start;
  142009. break;
  142010. }
  142011. }
  142012. if (this.match(types$12.ellipsis)) {
  142013. const spreadNodeStartPos = this.state.start;
  142014. const spreadNodeStartLoc = this.state.startLoc;
  142015. spreadStart = this.state.start;
  142016. exprList.push(this.parseParenItem(this.parseRestBinding(), spreadNodeStartPos, spreadNodeStartLoc));
  142017. this.checkCommaAfterRest(41);
  142018. break;
  142019. } else {
  142020. exprList.push(this.parseMaybeAssignAllowIn(refExpressionErrors, this.parseParenItem, refNeedsArrowPos));
  142021. }
  142022. }
  142023. const innerEndPos = this.state.lastTokEnd;
  142024. const innerEndLoc = this.state.lastTokEndLoc;
  142025. this.expect(types$12.parenR);
  142026. this.state.maybeInArrowParameters = oldMaybeInArrowParameters;
  142027. this.state.inFSharpPipelineDirectBody = oldInFSharpPipelineDirectBody;
  142028. let arrowNode = this.startNodeAt(startPos, startLoc);
  142029. if (canBeArrow && this.shouldParseArrow() && (arrowNode = this.parseArrow(arrowNode))) {
  142030. this.expressionScope.validateAsPattern();
  142031. this.expressionScope.exit();
  142032. this.parseArrowExpression(arrowNode, exprList, false);
  142033. return arrowNode;
  142034. }
  142035. this.expressionScope.exit();
  142036. if (!exprList.length) {
  142037. this.unexpected(this.state.lastTokStart);
  142038. }
  142039. if (optionalCommaStart)
  142040. this.unexpected(optionalCommaStart);
  142041. if (spreadStart)
  142042. this.unexpected(spreadStart);
  142043. this.checkExpressionErrors(refExpressionErrors, true);
  142044. if (refNeedsArrowPos.start)
  142045. this.unexpected(refNeedsArrowPos.start);
  142046. this.toReferencedListDeep(exprList, true);
  142047. if (exprList.length > 1) {
  142048. val = this.startNodeAt(innerStartPos, innerStartLoc);
  142049. val.expressions = exprList;
  142050. this.finishNodeAt(val, "SequenceExpression", innerEndPos, innerEndLoc);
  142051. } else {
  142052. val = exprList[0];
  142053. }
  142054. if (!this.options.createParenthesizedExpressions) {
  142055. this.addExtra(val, "parenthesized", true);
  142056. this.addExtra(val, "parenStart", startPos);
  142057. return val;
  142058. }
  142059. const parenExpression = this.startNodeAt(startPos, startLoc);
  142060. parenExpression.expression = val;
  142061. this.finishNode(parenExpression, "ParenthesizedExpression");
  142062. return parenExpression;
  142063. }
  142064. shouldParseArrow() {
  142065. return !this.canInsertSemicolon();
  142066. }
  142067. parseArrow(node) {
  142068. if (this.eat(types$12.arrow)) {
  142069. return node;
  142070. }
  142071. }
  142072. parseParenItem(node, startPos, startLoc) {
  142073. return node;
  142074. }
  142075. parseNewOrNewTarget() {
  142076. const node = this.startNode();
  142077. this.next();
  142078. if (this.match(types$12.dot)) {
  142079. const meta = this.createIdentifier(this.startNodeAtNode(node), "new");
  142080. this.next();
  142081. const metaProp = this.parseMetaProperty(node, meta, "target");
  142082. if (!this.scope.inNonArrowFunction && !this.scope.inClass) {
  142083. this.raise(metaProp.start, ErrorMessages.UnexpectedNewTarget);
  142084. }
  142085. return metaProp;
  142086. }
  142087. return this.parseNew(node);
  142088. }
  142089. parseNew(node) {
  142090. node.callee = this.parseNoCallExpr();
  142091. if (node.callee.type === "Import") {
  142092. this.raise(node.callee.start, ErrorMessages.ImportCallNotNewExpression);
  142093. } else if (this.isOptionalChain(node.callee)) {
  142094. this.raise(this.state.lastTokEnd, ErrorMessages.OptionalChainingNoNew);
  142095. } else if (this.eat(types$12.questionDot)) {
  142096. this.raise(this.state.start, ErrorMessages.OptionalChainingNoNew);
  142097. }
  142098. this.parseNewArguments(node);
  142099. return this.finishNode(node, "NewExpression");
  142100. }
  142101. parseNewArguments(node) {
  142102. if (this.eat(types$12.parenL)) {
  142103. const args = this.parseExprList(types$12.parenR);
  142104. this.toReferencedList(args);
  142105. node.arguments = args;
  142106. } else {
  142107. node.arguments = [];
  142108. }
  142109. }
  142110. parseTemplateElement(isTagged) {
  142111. const elem = this.startNode();
  142112. if (this.state.value === null) {
  142113. if (!isTagged) {
  142114. this.raise(this.state.start + 1, ErrorMessages.InvalidEscapeSequenceTemplate);
  142115. }
  142116. }
  142117. elem.value = {
  142118. raw: this.input.slice(this.state.start, this.state.end).replace(/\r\n?/g, "\n"),
  142119. cooked: this.state.value
  142120. };
  142121. this.next();
  142122. elem.tail = this.match(types$12.backQuote);
  142123. return this.finishNode(elem, "TemplateElement");
  142124. }
  142125. parseTemplate(isTagged) {
  142126. const node = this.startNode();
  142127. this.next();
  142128. node.expressions = [];
  142129. let curElt = this.parseTemplateElement(isTagged);
  142130. node.quasis = [curElt];
  142131. while (!curElt.tail) {
  142132. this.expect(types$12.dollarBraceL);
  142133. node.expressions.push(this.parseTemplateSubstitution());
  142134. this.expect(types$12.braceR);
  142135. node.quasis.push(curElt = this.parseTemplateElement(isTagged));
  142136. }
  142137. this.next();
  142138. return this.finishNode(node, "TemplateLiteral");
  142139. }
  142140. parseTemplateSubstitution() {
  142141. return this.parseExpression();
  142142. }
  142143. parseObjectLike(close, isPattern, isRecord, refExpressionErrors) {
  142144. if (isRecord) {
  142145. this.expectPlugin("recordAndTuple");
  142146. }
  142147. const oldInFSharpPipelineDirectBody = this.state.inFSharpPipelineDirectBody;
  142148. this.state.inFSharpPipelineDirectBody = false;
  142149. const propHash = /* @__PURE__ */ Object.create(null);
  142150. let first = true;
  142151. const node = this.startNode();
  142152. node.properties = [];
  142153. this.next();
  142154. while (!this.match(close)) {
  142155. if (first) {
  142156. first = false;
  142157. } else {
  142158. this.expect(types$12.comma);
  142159. if (this.match(close)) {
  142160. this.addExtra(node, "trailingComma", this.state.lastTokStart);
  142161. break;
  142162. }
  142163. }
  142164. const prop = this.parsePropertyDefinition(isPattern, refExpressionErrors);
  142165. if (!isPattern) {
  142166. this.checkProto(prop, isRecord, propHash, refExpressionErrors);
  142167. }
  142168. if (isRecord && !this.isObjectProperty(prop) && prop.type !== "SpreadElement") {
  142169. this.raise(prop.start, ErrorMessages.InvalidRecordProperty);
  142170. }
  142171. if (prop.shorthand) {
  142172. this.addExtra(prop, "shorthand", true);
  142173. }
  142174. node.properties.push(prop);
  142175. }
  142176. this.next();
  142177. this.state.inFSharpPipelineDirectBody = oldInFSharpPipelineDirectBody;
  142178. let type = "ObjectExpression";
  142179. if (isPattern) {
  142180. type = "ObjectPattern";
  142181. } else if (isRecord) {
  142182. type = "RecordExpression";
  142183. }
  142184. return this.finishNode(node, type);
  142185. }
  142186. maybeAsyncOrAccessorProp(prop) {
  142187. return !prop.computed && prop.key.type === "Identifier" && (this.isLiteralPropertyName() || this.match(types$12.bracketL) || this.match(types$12.star));
  142188. }
  142189. parsePropertyDefinition(isPattern, refExpressionErrors) {
  142190. let decorators = [];
  142191. if (this.match(types$12.at)) {
  142192. if (this.hasPlugin("decorators")) {
  142193. this.raise(this.state.start, ErrorMessages.UnsupportedPropertyDecorator);
  142194. }
  142195. while (this.match(types$12.at)) {
  142196. decorators.push(this.parseDecorator());
  142197. }
  142198. }
  142199. const prop = this.startNode();
  142200. let isGenerator = false;
  142201. let isAsync = false;
  142202. let isAccessor = false;
  142203. let startPos;
  142204. let startLoc;
  142205. if (this.match(types$12.ellipsis)) {
  142206. if (decorators.length)
  142207. this.unexpected();
  142208. if (isPattern) {
  142209. this.next();
  142210. prop.argument = this.parseIdentifier();
  142211. this.checkCommaAfterRest(125);
  142212. return this.finishNode(prop, "RestElement");
  142213. }
  142214. return this.parseSpread();
  142215. }
  142216. if (decorators.length) {
  142217. prop.decorators = decorators;
  142218. decorators = [];
  142219. }
  142220. prop.method = false;
  142221. if (isPattern || refExpressionErrors) {
  142222. startPos = this.state.start;
  142223. startLoc = this.state.startLoc;
  142224. }
  142225. if (!isPattern) {
  142226. isGenerator = this.eat(types$12.star);
  142227. }
  142228. const containsEsc = this.state.containsEsc;
  142229. const key = this.parsePropertyName(prop, false);
  142230. if (!isPattern && !isGenerator && !containsEsc && this.maybeAsyncOrAccessorProp(prop)) {
  142231. const keyName = key.name;
  142232. if (keyName === "async" && !this.hasPrecedingLineBreak()) {
  142233. isAsync = true;
  142234. isGenerator = this.eat(types$12.star);
  142235. this.parsePropertyName(prop, false);
  142236. }
  142237. if (keyName === "get" || keyName === "set") {
  142238. isAccessor = true;
  142239. prop.kind = keyName;
  142240. if (this.match(types$12.star)) {
  142241. isGenerator = true;
  142242. this.raise(this.state.pos, ErrorMessages.AccessorIsGenerator, keyName);
  142243. this.next();
  142244. }
  142245. this.parsePropertyName(prop, false);
  142246. }
  142247. }
  142248. this.parseObjPropValue(prop, startPos, startLoc, isGenerator, isAsync, isPattern, isAccessor, refExpressionErrors);
  142249. return prop;
  142250. }
  142251. getGetterSetterExpectedParamCount(method) {
  142252. return method.kind === "get" ? 0 : 1;
  142253. }
  142254. getObjectOrClassMethodParams(method) {
  142255. return method.params;
  142256. }
  142257. checkGetterSetterParams(method) {
  142258. var _params;
  142259. const paramCount = this.getGetterSetterExpectedParamCount(method);
  142260. const params = this.getObjectOrClassMethodParams(method);
  142261. const start3 = method.start;
  142262. if (params.length !== paramCount) {
  142263. if (method.kind === "get") {
  142264. this.raise(start3, ErrorMessages.BadGetterArity);
  142265. } else {
  142266. this.raise(start3, ErrorMessages.BadSetterArity);
  142267. }
  142268. }
  142269. if (method.kind === "set" && ((_params = params[params.length - 1]) == null ? void 0 : _params.type) === "RestElement") {
  142270. this.raise(start3, ErrorMessages.BadSetterRestParameter);
  142271. }
  142272. }
  142273. parseObjectMethod(prop, isGenerator, isAsync, isPattern, isAccessor) {
  142274. if (isAccessor) {
  142275. this.parseMethod(prop, isGenerator, false, false, false, "ObjectMethod");
  142276. this.checkGetterSetterParams(prop);
  142277. return prop;
  142278. }
  142279. if (isAsync || isGenerator || this.match(types$12.parenL)) {
  142280. if (isPattern)
  142281. this.unexpected();
  142282. prop.kind = "method";
  142283. prop.method = true;
  142284. return this.parseMethod(prop, isGenerator, isAsync, false, false, "ObjectMethod");
  142285. }
  142286. }
  142287. parseObjectProperty(prop, startPos, startLoc, isPattern, refExpressionErrors) {
  142288. prop.shorthand = false;
  142289. if (this.eat(types$12.colon)) {
  142290. prop.value = isPattern ? this.parseMaybeDefault(this.state.start, this.state.startLoc) : this.parseMaybeAssignAllowIn(refExpressionErrors);
  142291. return this.finishNode(prop, "ObjectProperty");
  142292. }
  142293. if (!prop.computed && prop.key.type === "Identifier") {
  142294. this.checkReservedWord(prop.key.name, prop.key.start, true, false);
  142295. if (isPattern) {
  142296. prop.value = this.parseMaybeDefault(startPos, startLoc, prop.key.__clone());
  142297. } else if (this.match(types$12.eq) && refExpressionErrors) {
  142298. if (refExpressionErrors.shorthandAssign === -1) {
  142299. refExpressionErrors.shorthandAssign = this.state.start;
  142300. }
  142301. prop.value = this.parseMaybeDefault(startPos, startLoc, prop.key.__clone());
  142302. } else {
  142303. prop.value = prop.key.__clone();
  142304. }
  142305. prop.shorthand = true;
  142306. return this.finishNode(prop, "ObjectProperty");
  142307. }
  142308. }
  142309. parseObjPropValue(prop, startPos, startLoc, isGenerator, isAsync, isPattern, isAccessor, refExpressionErrors) {
  142310. const node = this.parseObjectMethod(prop, isGenerator, isAsync, isPattern, isAccessor) || this.parseObjectProperty(prop, startPos, startLoc, isPattern, refExpressionErrors);
  142311. if (!node)
  142312. this.unexpected();
  142313. return node;
  142314. }
  142315. parsePropertyName(prop, isPrivateNameAllowed) {
  142316. if (this.eat(types$12.bracketL)) {
  142317. prop.computed = true;
  142318. prop.key = this.parseMaybeAssignAllowIn();
  142319. this.expect(types$12.bracketR);
  142320. } else {
  142321. const oldInPropertyName = this.state.inPropertyName;
  142322. this.state.inPropertyName = true;
  142323. const type = this.state.type;
  142324. prop.key = type === types$12.num || type === types$12.string || type === types$12.bigint || type === types$12.decimal ? this.parseExprAtom() : this.parseMaybePrivateName(isPrivateNameAllowed);
  142325. if (type !== types$12.privateName) {
  142326. prop.computed = false;
  142327. }
  142328. this.state.inPropertyName = oldInPropertyName;
  142329. }
  142330. return prop.key;
  142331. }
  142332. initFunction(node, isAsync) {
  142333. node.id = null;
  142334. node.generator = false;
  142335. node.async = !!isAsync;
  142336. }
  142337. parseMethod(node, isGenerator, isAsync, isConstructor, allowDirectSuper, type, inClassScope = false) {
  142338. this.initFunction(node, isAsync);
  142339. node.generator = !!isGenerator;
  142340. const allowModifiers = isConstructor;
  142341. this.scope.enter(SCOPE_FUNCTION2 | SCOPE_SUPER2 | (inClassScope ? SCOPE_CLASS : 0) | (allowDirectSuper ? SCOPE_DIRECT_SUPER2 : 0));
  142342. this.prodParam.enter(functionFlags2(isAsync, node.generator));
  142343. this.parseFunctionParams(node, allowModifiers);
  142344. this.parseFunctionBodyAndFinish(node, type, true);
  142345. this.prodParam.exit();
  142346. this.scope.exit();
  142347. return node;
  142348. }
  142349. parseArrayLike(close, canBePattern, isTuple, refExpressionErrors) {
  142350. if (isTuple) {
  142351. this.expectPlugin("recordAndTuple");
  142352. }
  142353. const oldInFSharpPipelineDirectBody = this.state.inFSharpPipelineDirectBody;
  142354. this.state.inFSharpPipelineDirectBody = false;
  142355. const node = this.startNode();
  142356. this.next();
  142357. node.elements = this.parseExprList(close, !isTuple, refExpressionErrors, node);
  142358. this.state.inFSharpPipelineDirectBody = oldInFSharpPipelineDirectBody;
  142359. return this.finishNode(node, isTuple ? "TupleExpression" : "ArrayExpression");
  142360. }
  142361. parseArrowExpression(node, params, isAsync, trailingCommaPos) {
  142362. this.scope.enter(SCOPE_FUNCTION2 | SCOPE_ARROW2);
  142363. let flags = functionFlags2(isAsync, false);
  142364. if (!this.match(types$12.bracketL) && this.prodParam.hasIn) {
  142365. flags |= PARAM_IN;
  142366. }
  142367. this.prodParam.enter(flags);
  142368. this.initFunction(node, isAsync);
  142369. const oldMaybeInArrowParameters = this.state.maybeInArrowParameters;
  142370. if (params) {
  142371. this.state.maybeInArrowParameters = true;
  142372. this.setArrowFunctionParameters(node, params, trailingCommaPos);
  142373. }
  142374. this.state.maybeInArrowParameters = false;
  142375. this.parseFunctionBody(node, true);
  142376. this.prodParam.exit();
  142377. this.scope.exit();
  142378. this.state.maybeInArrowParameters = oldMaybeInArrowParameters;
  142379. return this.finishNode(node, "ArrowFunctionExpression");
  142380. }
  142381. setArrowFunctionParameters(node, params, trailingCommaPos) {
  142382. node.params = this.toAssignableList(params, trailingCommaPos, false);
  142383. }
  142384. parseFunctionBodyAndFinish(node, type, isMethod = false) {
  142385. this.parseFunctionBody(node, false, isMethod);
  142386. this.finishNode(node, type);
  142387. }
  142388. parseFunctionBody(node, allowExpression, isMethod = false) {
  142389. const isExpression = allowExpression && !this.match(types$12.braceL);
  142390. this.expressionScope.enter(newExpressionScope());
  142391. if (isExpression) {
  142392. node.body = this.parseMaybeAssign();
  142393. this.checkParams(node, false, allowExpression, false);
  142394. } else {
  142395. const oldStrict = this.state.strict;
  142396. const oldLabels = this.state.labels;
  142397. this.state.labels = [];
  142398. this.prodParam.enter(this.prodParam.currentFlags() | PARAM_RETURN);
  142399. node.body = this.parseBlock(true, false, (hasStrictModeDirective) => {
  142400. const nonSimple = !this.isSimpleParamList(node.params);
  142401. if (hasStrictModeDirective && nonSimple) {
  142402. const errorPos = (node.kind === "method" || node.kind === "constructor") && !!node.key ? node.key.end : node.start;
  142403. this.raise(errorPos, ErrorMessages.IllegalLanguageModeDirective);
  142404. }
  142405. const strictModeChanged = !oldStrict && this.state.strict;
  142406. this.checkParams(node, !this.state.strict && !allowExpression && !isMethod && !nonSimple, allowExpression, strictModeChanged);
  142407. if (this.state.strict && node.id) {
  142408. this.checkLVal(node.id, "function name", BIND_OUTSIDE2, void 0, void 0, strictModeChanged);
  142409. }
  142410. });
  142411. this.prodParam.exit();
  142412. this.expressionScope.exit();
  142413. this.state.labels = oldLabels;
  142414. }
  142415. }
  142416. isSimpleParamList(params) {
  142417. for (let i = 0, len = params.length; i < len; i++) {
  142418. if (params[i].type !== "Identifier")
  142419. return false;
  142420. }
  142421. return true;
  142422. }
  142423. checkParams(node, allowDuplicates, isArrowFunction, strictModeChanged = true) {
  142424. const checkClashes = /* @__PURE__ */ new Set();
  142425. for (const param of node.params) {
  142426. this.checkLVal(param, "function parameter list", BIND_VAR2, allowDuplicates ? null : checkClashes, void 0, strictModeChanged);
  142427. }
  142428. }
  142429. parseExprList(close, allowEmpty, refExpressionErrors, nodeForExtra) {
  142430. const elts = [];
  142431. let first = true;
  142432. while (!this.eat(close)) {
  142433. if (first) {
  142434. first = false;
  142435. } else {
  142436. this.expect(types$12.comma);
  142437. if (this.match(close)) {
  142438. if (nodeForExtra) {
  142439. this.addExtra(nodeForExtra, "trailingComma", this.state.lastTokStart);
  142440. }
  142441. this.next();
  142442. break;
  142443. }
  142444. }
  142445. elts.push(this.parseExprListItem(allowEmpty, refExpressionErrors));
  142446. }
  142447. return elts;
  142448. }
  142449. parseExprListItem(allowEmpty, refExpressionErrors, refNeedsArrowPos, allowPlaceholder) {
  142450. let elt;
  142451. if (this.match(types$12.comma)) {
  142452. if (!allowEmpty) {
  142453. this.raise(this.state.pos, ErrorMessages.UnexpectedToken, ",");
  142454. }
  142455. elt = null;
  142456. } else if (this.match(types$12.ellipsis)) {
  142457. const spreadNodeStartPos = this.state.start;
  142458. const spreadNodeStartLoc = this.state.startLoc;
  142459. elt = this.parseParenItem(this.parseSpread(refExpressionErrors, refNeedsArrowPos), spreadNodeStartPos, spreadNodeStartLoc);
  142460. } else if (this.match(types$12.question)) {
  142461. this.expectPlugin("partialApplication");
  142462. if (!allowPlaceholder) {
  142463. this.raise(this.state.start, ErrorMessages.UnexpectedArgumentPlaceholder);
  142464. }
  142465. const node = this.startNode();
  142466. this.next();
  142467. elt = this.finishNode(node, "ArgumentPlaceholder");
  142468. } else {
  142469. elt = this.parseMaybeAssignAllowIn(refExpressionErrors, this.parseParenItem, refNeedsArrowPos);
  142470. }
  142471. return elt;
  142472. }
  142473. parseIdentifier(liberal) {
  142474. const node = this.startNode();
  142475. const name2 = this.parseIdentifierName(node.start, liberal);
  142476. return this.createIdentifier(node, name2);
  142477. }
  142478. createIdentifier(node, name2) {
  142479. node.name = name2;
  142480. node.loc.identifierName = name2;
  142481. return this.finishNode(node, "Identifier");
  142482. }
  142483. parseIdentifierName(pos, liberal) {
  142484. let name2;
  142485. const {
  142486. start: start3,
  142487. type
  142488. } = this.state;
  142489. if (type === types$12.name) {
  142490. name2 = this.state.value;
  142491. } else if (type.keyword) {
  142492. name2 = type.keyword;
  142493. if (type === types$12._class || type === types$12._function) {
  142494. const curContext = this.curContext();
  142495. if (curContext === types2.functionStatement || curContext === types2.functionExpression) {
  142496. this.state.context.pop();
  142497. }
  142498. }
  142499. } else {
  142500. throw this.unexpected();
  142501. }
  142502. if (liberal) {
  142503. this.state.type = types$12.name;
  142504. } else {
  142505. this.checkReservedWord(name2, start3, !!type.keyword, false);
  142506. }
  142507. this.next();
  142508. return name2;
  142509. }
  142510. checkReservedWord(word, startLoc, checkKeywords, isBinding) {
  142511. if (word.length > 10) {
  142512. return;
  142513. }
  142514. if (!canBeReservedWord(word)) {
  142515. return;
  142516. }
  142517. if (word === "yield") {
  142518. if (this.prodParam.hasYield) {
  142519. this.raise(startLoc, ErrorMessages.YieldBindingIdentifier);
  142520. return;
  142521. }
  142522. } else if (word === "await") {
  142523. if (this.prodParam.hasAwait) {
  142524. this.raise(startLoc, ErrorMessages.AwaitBindingIdentifier);
  142525. return;
  142526. } else if (this.scope.inStaticBlock && !this.scope.inNonArrowFunction) {
  142527. this.raise(startLoc, ErrorMessages.AwaitBindingIdentifierInStaticBlock);
  142528. return;
  142529. } else {
  142530. this.expressionScope.recordAsyncArrowParametersError(startLoc, ErrorMessages.AwaitBindingIdentifier);
  142531. }
  142532. } else if (word === "arguments") {
  142533. if (this.scope.inClassAndNotInNonArrowFunction) {
  142534. this.raise(startLoc, ErrorMessages.ArgumentsInClass);
  142535. return;
  142536. }
  142537. }
  142538. if (checkKeywords && isKeyword(word)) {
  142539. this.raise(startLoc, ErrorMessages.UnexpectedKeyword, word);
  142540. return;
  142541. }
  142542. const reservedTest = !this.state.strict ? isReservedWord : isBinding ? isStrictBindReservedWord : isStrictReservedWord;
  142543. if (reservedTest(word, this.inModule)) {
  142544. this.raise(startLoc, ErrorMessages.UnexpectedReservedWord, word);
  142545. }
  142546. }
  142547. isAwaitAllowed() {
  142548. if (this.prodParam.hasAwait)
  142549. return true;
  142550. if (this.options.allowAwaitOutsideFunction && !this.scope.inFunction) {
  142551. return true;
  142552. }
  142553. return false;
  142554. }
  142555. parseAwait(startPos, startLoc) {
  142556. const node = this.startNodeAt(startPos, startLoc);
  142557. this.expressionScope.recordParameterInitializerError(node.start, ErrorMessages.AwaitExpressionFormalParameter);
  142558. if (this.eat(types$12.star)) {
  142559. this.raise(node.start, ErrorMessages.ObsoleteAwaitStar);
  142560. }
  142561. if (!this.scope.inFunction && !this.options.allowAwaitOutsideFunction) {
  142562. if (this.isAmbiguousAwait()) {
  142563. this.ambiguousScriptDifferentAst = true;
  142564. } else {
  142565. this.sawUnambiguousESM = true;
  142566. }
  142567. }
  142568. if (!this.state.soloAwait) {
  142569. node.argument = this.parseMaybeUnary(null, true);
  142570. }
  142571. return this.finishNode(node, "AwaitExpression");
  142572. }
  142573. isAmbiguousAwait() {
  142574. return this.hasPrecedingLineBreak() || this.match(types$12.plusMin) || this.match(types$12.parenL) || this.match(types$12.bracketL) || this.match(types$12.backQuote) || this.match(types$12.regexp) || this.match(types$12.slash) || this.hasPlugin("v8intrinsic") && this.match(types$12.modulo);
  142575. }
  142576. parseYield() {
  142577. const node = this.startNode();
  142578. this.expressionScope.recordParameterInitializerError(node.start, ErrorMessages.YieldInParameter);
  142579. this.next();
  142580. let delegating = false;
  142581. let argument = null;
  142582. if (!this.hasPrecedingLineBreak()) {
  142583. delegating = this.eat(types$12.star);
  142584. switch (this.state.type) {
  142585. case types$12.semi:
  142586. case types$12.eof:
  142587. case types$12.braceR:
  142588. case types$12.parenR:
  142589. case types$12.bracketR:
  142590. case types$12.braceBarR:
  142591. case types$12.colon:
  142592. case types$12.comma:
  142593. if (!delegating)
  142594. break;
  142595. default:
  142596. argument = this.parseMaybeAssign();
  142597. }
  142598. }
  142599. node.delegate = delegating;
  142600. node.argument = argument;
  142601. return this.finishNode(node, "YieldExpression");
  142602. }
  142603. checkPipelineAtInfixOperator(left, leftStartPos) {
  142604. if (this.getPluginOption("pipelineOperator", "proposal") === "smart") {
  142605. if (left.type === "SequenceExpression") {
  142606. this.raise(leftStartPos, ErrorMessages.PipelineHeadSequenceExpression);
  142607. }
  142608. }
  142609. }
  142610. parseSmartPipelineBody(childExpression, startPos, startLoc) {
  142611. this.checkSmartPipelineBodyEarlyErrors(childExpression, startPos);
  142612. return this.parseSmartPipelineBodyInStyle(childExpression, startPos, startLoc);
  142613. }
  142614. checkSmartPipelineBodyEarlyErrors(childExpression, startPos) {
  142615. if (this.match(types$12.arrow)) {
  142616. throw this.raise(this.state.start, ErrorMessages.PipelineBodyNoArrow);
  142617. } else if (childExpression.type === "SequenceExpression") {
  142618. this.raise(startPos, ErrorMessages.PipelineBodySequenceExpression);
  142619. }
  142620. }
  142621. parseSmartPipelineBodyInStyle(childExpression, startPos, startLoc) {
  142622. const bodyNode = this.startNodeAt(startPos, startLoc);
  142623. const isSimpleReference = this.isSimpleReference(childExpression);
  142624. if (isSimpleReference) {
  142625. bodyNode.callee = childExpression;
  142626. } else {
  142627. if (!this.topicReferenceWasUsedInCurrentTopicContext()) {
  142628. this.raise(startPos, ErrorMessages.PipelineTopicUnused);
  142629. }
  142630. bodyNode.expression = childExpression;
  142631. }
  142632. return this.finishNode(bodyNode, isSimpleReference ? "PipelineBareFunction" : "PipelineTopicExpression");
  142633. }
  142634. isSimpleReference(expression) {
  142635. switch (expression.type) {
  142636. case "MemberExpression":
  142637. return !expression.computed && this.isSimpleReference(expression.object);
  142638. case "Identifier":
  142639. return true;
  142640. default:
  142641. return false;
  142642. }
  142643. }
  142644. withTopicPermittingContext(callback) {
  142645. const outerContextTopicState = this.state.topicContext;
  142646. this.state.topicContext = {
  142647. maxNumOfResolvableTopics: 1,
  142648. maxTopicIndex: null
  142649. };
  142650. try {
  142651. return callback();
  142652. } finally {
  142653. this.state.topicContext = outerContextTopicState;
  142654. }
  142655. }
  142656. withTopicForbiddingContext(callback) {
  142657. const outerContextTopicState = this.state.topicContext;
  142658. this.state.topicContext = {
  142659. maxNumOfResolvableTopics: 0,
  142660. maxTopicIndex: null
  142661. };
  142662. try {
  142663. return callback();
  142664. } finally {
  142665. this.state.topicContext = outerContextTopicState;
  142666. }
  142667. }
  142668. withSoloAwaitPermittingContext(callback) {
  142669. const outerContextSoloAwaitState = this.state.soloAwait;
  142670. this.state.soloAwait = true;
  142671. try {
  142672. return callback();
  142673. } finally {
  142674. this.state.soloAwait = outerContextSoloAwaitState;
  142675. }
  142676. }
  142677. allowInAnd(callback) {
  142678. const flags = this.prodParam.currentFlags();
  142679. const prodParamToSet = PARAM_IN & ~flags;
  142680. if (prodParamToSet) {
  142681. this.prodParam.enter(flags | PARAM_IN);
  142682. try {
  142683. return callback();
  142684. } finally {
  142685. this.prodParam.exit();
  142686. }
  142687. }
  142688. return callback();
  142689. }
  142690. disallowInAnd(callback) {
  142691. const flags = this.prodParam.currentFlags();
  142692. const prodParamToClear = PARAM_IN & flags;
  142693. if (prodParamToClear) {
  142694. this.prodParam.enter(flags & ~PARAM_IN);
  142695. try {
  142696. return callback();
  142697. } finally {
  142698. this.prodParam.exit();
  142699. }
  142700. }
  142701. return callback();
  142702. }
  142703. registerTopicReference() {
  142704. this.state.topicContext.maxTopicIndex = 0;
  142705. }
  142706. primaryTopicReferenceIsAllowedInCurrentTopicContext() {
  142707. return this.state.topicContext.maxNumOfResolvableTopics >= 1;
  142708. }
  142709. topicReferenceWasUsedInCurrentTopicContext() {
  142710. return this.state.topicContext.maxTopicIndex != null && this.state.topicContext.maxTopicIndex >= 0;
  142711. }
  142712. parseFSharpPipelineBody(prec) {
  142713. const startPos = this.state.start;
  142714. const startLoc = this.state.startLoc;
  142715. this.state.potentialArrowAt = this.state.start;
  142716. const oldInFSharpPipelineDirectBody = this.state.inFSharpPipelineDirectBody;
  142717. this.state.inFSharpPipelineDirectBody = true;
  142718. const ret = this.parseExprOp(this.parseMaybeUnary(), startPos, startLoc, prec);
  142719. this.state.inFSharpPipelineDirectBody = oldInFSharpPipelineDirectBody;
  142720. return ret;
  142721. }
  142722. parseModuleExpression() {
  142723. this.expectPlugin("moduleBlocks");
  142724. const node = this.startNode();
  142725. this.next();
  142726. this.eat(types$12.braceL);
  142727. const revertScopes = this.initializeScopes(true);
  142728. this.enterInitialScopes();
  142729. const program = this.startNode();
  142730. try {
  142731. node.body = this.parseProgram(program, types$12.braceR, "module");
  142732. } finally {
  142733. revertScopes();
  142734. }
  142735. this.eat(types$12.braceR);
  142736. return this.finishNode(node, "ModuleExpression");
  142737. }
  142738. };
  142739. var loopLabel2 = {
  142740. kind: "loop"
  142741. };
  142742. var switchLabel2 = {
  142743. kind: "switch"
  142744. };
  142745. var FUNC_NO_FLAGS = 0;
  142746. var FUNC_STATEMENT2 = 1;
  142747. var FUNC_HANGING_STATEMENT2 = 2;
  142748. var FUNC_NULLABLE_ID2 = 4;
  142749. var loneSurrogate2 = /[\uD800-\uDFFF]/u;
  142750. var keywordRelationalOperator2 = /in(?:stanceof)?/y;
  142751. function babel7CompatTokens(tokens) {
  142752. {
  142753. for (let i = 0; i < tokens.length; i++) {
  142754. const token = tokens[i];
  142755. if (token.type === types$12.privateName) {
  142756. const {
  142757. loc,
  142758. start: start3,
  142759. value,
  142760. end
  142761. } = token;
  142762. const hashEndPos = start3 + 1;
  142763. const hashEndLoc = new Position3(loc.start.line, loc.start.column + 1);
  142764. tokens.splice(i, 1, new Token3({
  142765. type: types$12.hash,
  142766. value: "#",
  142767. start: start3,
  142768. end: hashEndPos,
  142769. startLoc: loc.start,
  142770. endLoc: hashEndLoc
  142771. }), new Token3({
  142772. type: types$12.name,
  142773. value,
  142774. start: hashEndPos,
  142775. end,
  142776. startLoc: hashEndLoc,
  142777. endLoc: loc.end
  142778. }));
  142779. }
  142780. }
  142781. }
  142782. return tokens;
  142783. }
  142784. var StatementParser = class extends ExpressionParser {
  142785. parseTopLevel(file, program) {
  142786. file.program = this.parseProgram(program);
  142787. file.comments = this.state.comments;
  142788. if (this.options.tokens)
  142789. file.tokens = babel7CompatTokens(this.tokens);
  142790. return this.finishNode(file, "File");
  142791. }
  142792. parseProgram(program, end = types$12.eof, sourceType = this.options.sourceType) {
  142793. program.sourceType = sourceType;
  142794. program.interpreter = this.parseInterpreterDirective();
  142795. this.parseBlockBody(program, true, true, end);
  142796. if (this.inModule && !this.options.allowUndeclaredExports && this.scope.undefinedExports.size > 0) {
  142797. for (const [name2] of Array.from(this.scope.undefinedExports)) {
  142798. const pos = this.scope.undefinedExports.get(name2);
  142799. this.raise(pos, ErrorMessages.ModuleExportUndefined, name2);
  142800. }
  142801. }
  142802. return this.finishNode(program, "Program");
  142803. }
  142804. stmtToDirective(stmt) {
  142805. const expr = stmt.expression;
  142806. const directiveLiteral = this.startNodeAt(expr.start, expr.loc.start);
  142807. const directive = this.startNodeAt(stmt.start, stmt.loc.start);
  142808. const raw = this.input.slice(expr.start, expr.end);
  142809. const val = directiveLiteral.value = raw.slice(1, -1);
  142810. this.addExtra(directiveLiteral, "raw", raw);
  142811. this.addExtra(directiveLiteral, "rawValue", val);
  142812. directive.value = this.finishNodeAt(directiveLiteral, "DirectiveLiteral", expr.end, expr.loc.end);
  142813. return this.finishNodeAt(directive, "Directive", stmt.end, stmt.loc.end);
  142814. }
  142815. parseInterpreterDirective() {
  142816. if (!this.match(types$12.interpreterDirective)) {
  142817. return null;
  142818. }
  142819. const node = this.startNode();
  142820. node.value = this.state.value;
  142821. this.next();
  142822. return this.finishNode(node, "InterpreterDirective");
  142823. }
  142824. isLet(context) {
  142825. if (!this.isContextual("let")) {
  142826. return false;
  142827. }
  142828. return this.isLetKeyword(context);
  142829. }
  142830. isLetKeyword(context) {
  142831. const next = this.nextTokenStart();
  142832. const nextCh = this.codePointAtPos(next);
  142833. if (nextCh === 92 || nextCh === 91) {
  142834. return true;
  142835. }
  142836. if (context)
  142837. return false;
  142838. if (nextCh === 123)
  142839. return true;
  142840. if (isIdentifierStart2(nextCh)) {
  142841. keywordRelationalOperator2.lastIndex = next;
  142842. const matched = keywordRelationalOperator2.exec(this.input);
  142843. if (matched !== null) {
  142844. const endCh = this.codePointAtPos(next + matched[0].length);
  142845. if (!isIdentifierChar2(endCh) && endCh !== 92) {
  142846. return false;
  142847. }
  142848. }
  142849. return true;
  142850. }
  142851. return false;
  142852. }
  142853. parseStatement(context, topLevel) {
  142854. if (this.match(types$12.at)) {
  142855. this.parseDecorators(true);
  142856. }
  142857. return this.parseStatementContent(context, topLevel);
  142858. }
  142859. parseStatementContent(context, topLevel) {
  142860. let starttype = this.state.type;
  142861. const node = this.startNode();
  142862. let kind;
  142863. if (this.isLet(context)) {
  142864. starttype = types$12._var;
  142865. kind = "let";
  142866. }
  142867. switch (starttype) {
  142868. case types$12._break:
  142869. case types$12._continue:
  142870. return this.parseBreakContinueStatement(node, starttype.keyword);
  142871. case types$12._debugger:
  142872. return this.parseDebuggerStatement(node);
  142873. case types$12._do:
  142874. return this.parseDoStatement(node);
  142875. case types$12._for:
  142876. return this.parseForStatement(node);
  142877. case types$12._function:
  142878. if (this.lookaheadCharCode() === 46)
  142879. break;
  142880. if (context) {
  142881. if (this.state.strict) {
  142882. this.raise(this.state.start, ErrorMessages.StrictFunction);
  142883. } else if (context !== "if" && context !== "label") {
  142884. this.raise(this.state.start, ErrorMessages.SloppyFunction);
  142885. }
  142886. }
  142887. return this.parseFunctionStatement(node, false, !context);
  142888. case types$12._class:
  142889. if (context)
  142890. this.unexpected();
  142891. return this.parseClass(node, true);
  142892. case types$12._if:
  142893. return this.parseIfStatement(node);
  142894. case types$12._return:
  142895. return this.parseReturnStatement(node);
  142896. case types$12._switch:
  142897. return this.parseSwitchStatement(node);
  142898. case types$12._throw:
  142899. return this.parseThrowStatement(node);
  142900. case types$12._try:
  142901. return this.parseTryStatement(node);
  142902. case types$12._const:
  142903. case types$12._var:
  142904. kind = kind || this.state.value;
  142905. if (context && kind !== "var") {
  142906. this.raise(this.state.start, ErrorMessages.UnexpectedLexicalDeclaration);
  142907. }
  142908. return this.parseVarStatement(node, kind);
  142909. case types$12._while:
  142910. return this.parseWhileStatement(node);
  142911. case types$12._with:
  142912. return this.parseWithStatement(node);
  142913. case types$12.braceL:
  142914. return this.parseBlock();
  142915. case types$12.semi:
  142916. return this.parseEmptyStatement(node);
  142917. case types$12._import: {
  142918. const nextTokenCharCode = this.lookaheadCharCode();
  142919. if (nextTokenCharCode === 40 || nextTokenCharCode === 46) {
  142920. break;
  142921. }
  142922. }
  142923. case types$12._export: {
  142924. if (!this.options.allowImportExportEverywhere && !topLevel) {
  142925. this.raise(this.state.start, ErrorMessages.UnexpectedImportExport);
  142926. }
  142927. this.next();
  142928. let result;
  142929. if (starttype === types$12._import) {
  142930. result = this.parseImport(node);
  142931. if (result.type === "ImportDeclaration" && (!result.importKind || result.importKind === "value")) {
  142932. this.sawUnambiguousESM = true;
  142933. }
  142934. } else {
  142935. result = this.parseExport(node);
  142936. if (result.type === "ExportNamedDeclaration" && (!result.exportKind || result.exportKind === "value") || result.type === "ExportAllDeclaration" && (!result.exportKind || result.exportKind === "value") || result.type === "ExportDefaultDeclaration") {
  142937. this.sawUnambiguousESM = true;
  142938. }
  142939. }
  142940. this.assertModuleNodeAllowed(node);
  142941. return result;
  142942. }
  142943. default: {
  142944. if (this.isAsyncFunction()) {
  142945. if (context) {
  142946. this.raise(this.state.start, ErrorMessages.AsyncFunctionInSingleStatementContext);
  142947. }
  142948. this.next();
  142949. return this.parseFunctionStatement(node, true, !context);
  142950. }
  142951. }
  142952. }
  142953. const maybeName = this.state.value;
  142954. const expr = this.parseExpression();
  142955. if (starttype === types$12.name && expr.type === "Identifier" && this.eat(types$12.colon)) {
  142956. return this.parseLabeledStatement(node, maybeName, expr, context);
  142957. } else {
  142958. return this.parseExpressionStatement(node, expr);
  142959. }
  142960. }
  142961. assertModuleNodeAllowed(node) {
  142962. if (!this.options.allowImportExportEverywhere && !this.inModule) {
  142963. this.raise(node.start, SourceTypeModuleErrorMessages.ImportOutsideModule);
  142964. }
  142965. }
  142966. takeDecorators(node) {
  142967. const decorators = this.state.decoratorStack[this.state.decoratorStack.length - 1];
  142968. if (decorators.length) {
  142969. node.decorators = decorators;
  142970. this.resetStartLocationFromNode(node, decorators[0]);
  142971. this.state.decoratorStack[this.state.decoratorStack.length - 1] = [];
  142972. }
  142973. }
  142974. canHaveLeadingDecorator() {
  142975. return this.match(types$12._class);
  142976. }
  142977. parseDecorators(allowExport) {
  142978. const currentContextDecorators = this.state.decoratorStack[this.state.decoratorStack.length - 1];
  142979. while (this.match(types$12.at)) {
  142980. const decorator = this.parseDecorator();
  142981. currentContextDecorators.push(decorator);
  142982. }
  142983. if (this.match(types$12._export)) {
  142984. if (!allowExport) {
  142985. this.unexpected();
  142986. }
  142987. if (this.hasPlugin("decorators") && !this.getPluginOption("decorators", "decoratorsBeforeExport")) {
  142988. this.raise(this.state.start, ErrorMessages.DecoratorExportClass);
  142989. }
  142990. } else if (!this.canHaveLeadingDecorator()) {
  142991. throw this.raise(this.state.start, ErrorMessages.UnexpectedLeadingDecorator);
  142992. }
  142993. }
  142994. parseDecorator() {
  142995. this.expectOnePlugin(["decorators-legacy", "decorators"]);
  142996. const node = this.startNode();
  142997. this.next();
  142998. if (this.hasPlugin("decorators")) {
  142999. this.state.decoratorStack.push([]);
  143000. const startPos = this.state.start;
  143001. const startLoc = this.state.startLoc;
  143002. let expr;
  143003. if (this.eat(types$12.parenL)) {
  143004. expr = this.parseExpression();
  143005. this.expect(types$12.parenR);
  143006. } else {
  143007. expr = this.parseIdentifier(false);
  143008. while (this.eat(types$12.dot)) {
  143009. const node2 = this.startNodeAt(startPos, startLoc);
  143010. node2.object = expr;
  143011. node2.property = this.parseIdentifier(true);
  143012. node2.computed = false;
  143013. expr = this.finishNode(node2, "MemberExpression");
  143014. }
  143015. }
  143016. node.expression = this.parseMaybeDecoratorArguments(expr);
  143017. this.state.decoratorStack.pop();
  143018. } else {
  143019. node.expression = this.parseExprSubscripts();
  143020. }
  143021. return this.finishNode(node, "Decorator");
  143022. }
  143023. parseMaybeDecoratorArguments(expr) {
  143024. if (this.eat(types$12.parenL)) {
  143025. const node = this.startNodeAtNode(expr);
  143026. node.callee = expr;
  143027. node.arguments = this.parseCallExpressionArguments(types$12.parenR, false);
  143028. this.toReferencedList(node.arguments);
  143029. return this.finishNode(node, "CallExpression");
  143030. }
  143031. return expr;
  143032. }
  143033. parseBreakContinueStatement(node, keyword) {
  143034. const isBreak = keyword === "break";
  143035. this.next();
  143036. if (this.isLineTerminator()) {
  143037. node.label = null;
  143038. } else {
  143039. node.label = this.parseIdentifier();
  143040. this.semicolon();
  143041. }
  143042. this.verifyBreakContinue(node, keyword);
  143043. return this.finishNode(node, isBreak ? "BreakStatement" : "ContinueStatement");
  143044. }
  143045. verifyBreakContinue(node, keyword) {
  143046. const isBreak = keyword === "break";
  143047. let i;
  143048. for (i = 0; i < this.state.labels.length; ++i) {
  143049. const lab = this.state.labels[i];
  143050. if (node.label == null || lab.name === node.label.name) {
  143051. if (lab.kind != null && (isBreak || lab.kind === "loop"))
  143052. break;
  143053. if (node.label && isBreak)
  143054. break;
  143055. }
  143056. }
  143057. if (i === this.state.labels.length) {
  143058. this.raise(node.start, ErrorMessages.IllegalBreakContinue, keyword);
  143059. }
  143060. }
  143061. parseDebuggerStatement(node) {
  143062. this.next();
  143063. this.semicolon();
  143064. return this.finishNode(node, "DebuggerStatement");
  143065. }
  143066. parseHeaderExpression() {
  143067. this.expect(types$12.parenL);
  143068. const val = this.parseExpression();
  143069. this.expect(types$12.parenR);
  143070. return val;
  143071. }
  143072. parseDoStatement(node) {
  143073. this.next();
  143074. this.state.labels.push(loopLabel2);
  143075. node.body = this.withTopicForbiddingContext(() => this.parseStatement("do"));
  143076. this.state.labels.pop();
  143077. this.expect(types$12._while);
  143078. node.test = this.parseHeaderExpression();
  143079. this.eat(types$12.semi);
  143080. return this.finishNode(node, "DoWhileStatement");
  143081. }
  143082. parseForStatement(node) {
  143083. this.next();
  143084. this.state.labels.push(loopLabel2);
  143085. let awaitAt = -1;
  143086. if (this.isAwaitAllowed() && this.eatContextual("await")) {
  143087. awaitAt = this.state.lastTokStart;
  143088. }
  143089. this.scope.enter(SCOPE_OTHER);
  143090. this.expect(types$12.parenL);
  143091. if (this.match(types$12.semi)) {
  143092. if (awaitAt > -1) {
  143093. this.unexpected(awaitAt);
  143094. }
  143095. return this.parseFor(node, null);
  143096. }
  143097. const startsWithLet = this.isContextual("let");
  143098. const isLet = startsWithLet && this.isLetKeyword();
  143099. if (this.match(types$12._var) || this.match(types$12._const) || isLet) {
  143100. const init2 = this.startNode();
  143101. const kind = isLet ? "let" : this.state.value;
  143102. this.next();
  143103. this.parseVar(init2, true, kind);
  143104. this.finishNode(init2, "VariableDeclaration");
  143105. if ((this.match(types$12._in) || this.isContextual("of")) && init2.declarations.length === 1) {
  143106. return this.parseForIn(node, init2, awaitAt);
  143107. }
  143108. if (awaitAt > -1) {
  143109. this.unexpected(awaitAt);
  143110. }
  143111. return this.parseFor(node, init2);
  143112. }
  143113. const startsWithUnescapedName = this.match(types$12.name) && !this.state.containsEsc;
  143114. const refExpressionErrors = new ExpressionErrors();
  143115. const init = this.parseExpression(true, refExpressionErrors);
  143116. const isForOf = this.isContextual("of");
  143117. if (isForOf) {
  143118. if (startsWithLet) {
  143119. this.raise(init.start, ErrorMessages.ForOfLet);
  143120. } else if (awaitAt === -1 && startsWithUnescapedName && init.type === "Identifier" && init.name === "async") {
  143121. this.raise(init.start, ErrorMessages.ForOfAsync);
  143122. }
  143123. }
  143124. if (isForOf || this.match(types$12._in)) {
  143125. this.toAssignable(init, true);
  143126. const description = isForOf ? "for-of statement" : "for-in statement";
  143127. this.checkLVal(init, description);
  143128. return this.parseForIn(node, init, awaitAt);
  143129. } else {
  143130. this.checkExpressionErrors(refExpressionErrors, true);
  143131. }
  143132. if (awaitAt > -1) {
  143133. this.unexpected(awaitAt);
  143134. }
  143135. return this.parseFor(node, init);
  143136. }
  143137. parseFunctionStatement(node, isAsync, declarationPosition) {
  143138. this.next();
  143139. return this.parseFunction(node, FUNC_STATEMENT2 | (declarationPosition ? 0 : FUNC_HANGING_STATEMENT2), isAsync);
  143140. }
  143141. parseIfStatement(node) {
  143142. this.next();
  143143. node.test = this.parseHeaderExpression();
  143144. node.consequent = this.parseStatement("if");
  143145. node.alternate = this.eat(types$12._else) ? this.parseStatement("if") : null;
  143146. return this.finishNode(node, "IfStatement");
  143147. }
  143148. parseReturnStatement(node) {
  143149. if (!this.prodParam.hasReturn && !this.options.allowReturnOutsideFunction) {
  143150. this.raise(this.state.start, ErrorMessages.IllegalReturn);
  143151. }
  143152. this.next();
  143153. if (this.isLineTerminator()) {
  143154. node.argument = null;
  143155. } else {
  143156. node.argument = this.parseExpression();
  143157. this.semicolon();
  143158. }
  143159. return this.finishNode(node, "ReturnStatement");
  143160. }
  143161. parseSwitchStatement(node) {
  143162. this.next();
  143163. node.discriminant = this.parseHeaderExpression();
  143164. const cases = node.cases = [];
  143165. this.expect(types$12.braceL);
  143166. this.state.labels.push(switchLabel2);
  143167. this.scope.enter(SCOPE_OTHER);
  143168. let cur;
  143169. for (let sawDefault; !this.match(types$12.braceR); ) {
  143170. if (this.match(types$12._case) || this.match(types$12._default)) {
  143171. const isCase = this.match(types$12._case);
  143172. if (cur)
  143173. this.finishNode(cur, "SwitchCase");
  143174. cases.push(cur = this.startNode());
  143175. cur.consequent = [];
  143176. this.next();
  143177. if (isCase) {
  143178. cur.test = this.parseExpression();
  143179. } else {
  143180. if (sawDefault) {
  143181. this.raise(this.state.lastTokStart, ErrorMessages.MultipleDefaultsInSwitch);
  143182. }
  143183. sawDefault = true;
  143184. cur.test = null;
  143185. }
  143186. this.expect(types$12.colon);
  143187. } else {
  143188. if (cur) {
  143189. cur.consequent.push(this.parseStatement(null));
  143190. } else {
  143191. this.unexpected();
  143192. }
  143193. }
  143194. }
  143195. this.scope.exit();
  143196. if (cur)
  143197. this.finishNode(cur, "SwitchCase");
  143198. this.next();
  143199. this.state.labels.pop();
  143200. return this.finishNode(node, "SwitchStatement");
  143201. }
  143202. parseThrowStatement(node) {
  143203. this.next();
  143204. if (this.hasPrecedingLineBreak()) {
  143205. this.raise(this.state.lastTokEnd, ErrorMessages.NewlineAfterThrow);
  143206. }
  143207. node.argument = this.parseExpression();
  143208. this.semicolon();
  143209. return this.finishNode(node, "ThrowStatement");
  143210. }
  143211. parseCatchClauseParam() {
  143212. const param = this.parseBindingAtom();
  143213. const simple = param.type === "Identifier";
  143214. this.scope.enter(simple ? SCOPE_SIMPLE_CATCH2 : 0);
  143215. this.checkLVal(param, "catch clause", BIND_LEXICAL2);
  143216. return param;
  143217. }
  143218. parseTryStatement(node) {
  143219. this.next();
  143220. node.block = this.parseBlock();
  143221. node.handler = null;
  143222. if (this.match(types$12._catch)) {
  143223. const clause = this.startNode();
  143224. this.next();
  143225. if (this.match(types$12.parenL)) {
  143226. this.expect(types$12.parenL);
  143227. clause.param = this.parseCatchClauseParam();
  143228. this.expect(types$12.parenR);
  143229. } else {
  143230. clause.param = null;
  143231. this.scope.enter(SCOPE_OTHER);
  143232. }
  143233. clause.body = this.withTopicForbiddingContext(() => this.parseBlock(false, false));
  143234. this.scope.exit();
  143235. node.handler = this.finishNode(clause, "CatchClause");
  143236. }
  143237. node.finalizer = this.eat(types$12._finally) ? this.parseBlock() : null;
  143238. if (!node.handler && !node.finalizer) {
  143239. this.raise(node.start, ErrorMessages.NoCatchOrFinally);
  143240. }
  143241. return this.finishNode(node, "TryStatement");
  143242. }
  143243. parseVarStatement(node, kind) {
  143244. this.next();
  143245. this.parseVar(node, false, kind);
  143246. this.semicolon();
  143247. return this.finishNode(node, "VariableDeclaration");
  143248. }
  143249. parseWhileStatement(node) {
  143250. this.next();
  143251. node.test = this.parseHeaderExpression();
  143252. this.state.labels.push(loopLabel2);
  143253. node.body = this.withTopicForbiddingContext(() => this.parseStatement("while"));
  143254. this.state.labels.pop();
  143255. return this.finishNode(node, "WhileStatement");
  143256. }
  143257. parseWithStatement(node) {
  143258. if (this.state.strict) {
  143259. this.raise(this.state.start, ErrorMessages.StrictWith);
  143260. }
  143261. this.next();
  143262. node.object = this.parseHeaderExpression();
  143263. node.body = this.withTopicForbiddingContext(() => this.parseStatement("with"));
  143264. return this.finishNode(node, "WithStatement");
  143265. }
  143266. parseEmptyStatement(node) {
  143267. this.next();
  143268. return this.finishNode(node, "EmptyStatement");
  143269. }
  143270. parseLabeledStatement(node, maybeName, expr, context) {
  143271. for (const label of this.state.labels) {
  143272. if (label.name === maybeName) {
  143273. this.raise(expr.start, ErrorMessages.LabelRedeclaration, maybeName);
  143274. }
  143275. }
  143276. const kind = this.state.type.isLoop ? "loop" : this.match(types$12._switch) ? "switch" : null;
  143277. for (let i = this.state.labels.length - 1; i >= 0; i--) {
  143278. const label = this.state.labels[i];
  143279. if (label.statementStart === node.start) {
  143280. label.statementStart = this.state.start;
  143281. label.kind = kind;
  143282. } else {
  143283. break;
  143284. }
  143285. }
  143286. this.state.labels.push({
  143287. name: maybeName,
  143288. kind,
  143289. statementStart: this.state.start
  143290. });
  143291. node.body = this.parseStatement(context ? context.indexOf("label") === -1 ? context + "label" : context : "label");
  143292. this.state.labels.pop();
  143293. node.label = expr;
  143294. return this.finishNode(node, "LabeledStatement");
  143295. }
  143296. parseExpressionStatement(node, expr) {
  143297. node.expression = expr;
  143298. this.semicolon();
  143299. return this.finishNode(node, "ExpressionStatement");
  143300. }
  143301. parseBlock(allowDirectives = false, createNewLexicalScope = true, afterBlockParse) {
  143302. const node = this.startNode();
  143303. if (allowDirectives) {
  143304. this.state.strictErrors.clear();
  143305. }
  143306. this.expect(types$12.braceL);
  143307. if (createNewLexicalScope) {
  143308. this.scope.enter(SCOPE_OTHER);
  143309. }
  143310. this.parseBlockBody(node, allowDirectives, false, types$12.braceR, afterBlockParse);
  143311. if (createNewLexicalScope) {
  143312. this.scope.exit();
  143313. }
  143314. return this.finishNode(node, "BlockStatement");
  143315. }
  143316. isValidDirective(stmt) {
  143317. return stmt.type === "ExpressionStatement" && stmt.expression.type === "StringLiteral" && !stmt.expression.extra.parenthesized;
  143318. }
  143319. parseBlockBody(node, allowDirectives, topLevel, end, afterBlockParse) {
  143320. const body = node.body = [];
  143321. const directives = node.directives = [];
  143322. this.parseBlockOrModuleBlockBody(body, allowDirectives ? directives : void 0, topLevel, end, afterBlockParse);
  143323. }
  143324. parseBlockOrModuleBlockBody(body, directives, topLevel, end, afterBlockParse) {
  143325. const oldStrict = this.state.strict;
  143326. let hasStrictModeDirective = false;
  143327. let parsedNonDirective = false;
  143328. while (!this.match(end)) {
  143329. const stmt = this.parseStatement(null, topLevel);
  143330. if (directives && !parsedNonDirective) {
  143331. if (this.isValidDirective(stmt)) {
  143332. const directive = this.stmtToDirective(stmt);
  143333. directives.push(directive);
  143334. if (!hasStrictModeDirective && directive.value.value === "use strict") {
  143335. hasStrictModeDirective = true;
  143336. this.setStrict(true);
  143337. }
  143338. continue;
  143339. }
  143340. parsedNonDirective = true;
  143341. this.state.strictErrors.clear();
  143342. }
  143343. body.push(stmt);
  143344. }
  143345. if (afterBlockParse) {
  143346. afterBlockParse.call(this, hasStrictModeDirective);
  143347. }
  143348. if (!oldStrict) {
  143349. this.setStrict(false);
  143350. }
  143351. this.next();
  143352. }
  143353. parseFor(node, init) {
  143354. node.init = init;
  143355. this.semicolon(false);
  143356. node.test = this.match(types$12.semi) ? null : this.parseExpression();
  143357. this.semicolon(false);
  143358. node.update = this.match(types$12.parenR) ? null : this.parseExpression();
  143359. this.expect(types$12.parenR);
  143360. node.body = this.withTopicForbiddingContext(() => this.parseStatement("for"));
  143361. this.scope.exit();
  143362. this.state.labels.pop();
  143363. return this.finishNode(node, "ForStatement");
  143364. }
  143365. parseForIn(node, init, awaitAt) {
  143366. const isForIn = this.match(types$12._in);
  143367. this.next();
  143368. if (isForIn) {
  143369. if (awaitAt > -1)
  143370. this.unexpected(awaitAt);
  143371. } else {
  143372. node.await = awaitAt > -1;
  143373. }
  143374. if (init.type === "VariableDeclaration" && init.declarations[0].init != null && (!isForIn || this.state.strict || init.kind !== "var" || init.declarations[0].id.type !== "Identifier")) {
  143375. this.raise(init.start, ErrorMessages.ForInOfLoopInitializer, isForIn ? "for-in" : "for-of");
  143376. } else if (init.type === "AssignmentPattern") {
  143377. this.raise(init.start, ErrorMessages.InvalidLhs, "for-loop");
  143378. }
  143379. node.left = init;
  143380. node.right = isForIn ? this.parseExpression() : this.parseMaybeAssignAllowIn();
  143381. this.expect(types$12.parenR);
  143382. node.body = this.withTopicForbiddingContext(() => this.parseStatement("for"));
  143383. this.scope.exit();
  143384. this.state.labels.pop();
  143385. return this.finishNode(node, isForIn ? "ForInStatement" : "ForOfStatement");
  143386. }
  143387. parseVar(node, isFor, kind) {
  143388. const declarations = node.declarations = [];
  143389. const isTypescript = this.hasPlugin("typescript");
  143390. node.kind = kind;
  143391. for (; ; ) {
  143392. const decl = this.startNode();
  143393. this.parseVarId(decl, kind);
  143394. if (this.eat(types$12.eq)) {
  143395. decl.init = isFor ? this.parseMaybeAssignDisallowIn() : this.parseMaybeAssignAllowIn();
  143396. } else {
  143397. if (kind === "const" && !(this.match(types$12._in) || this.isContextual("of"))) {
  143398. if (!isTypescript) {
  143399. this.raise(this.state.lastTokEnd, ErrorMessages.DeclarationMissingInitializer, "Const declarations");
  143400. }
  143401. } else if (decl.id.type !== "Identifier" && !(isFor && (this.match(types$12._in) || this.isContextual("of")))) {
  143402. this.raise(this.state.lastTokEnd, ErrorMessages.DeclarationMissingInitializer, "Complex binding patterns");
  143403. }
  143404. decl.init = null;
  143405. }
  143406. declarations.push(this.finishNode(decl, "VariableDeclarator"));
  143407. if (!this.eat(types$12.comma))
  143408. break;
  143409. }
  143410. return node;
  143411. }
  143412. parseVarId(decl, kind) {
  143413. decl.id = this.parseBindingAtom();
  143414. this.checkLVal(decl.id, "variable declaration", kind === "var" ? BIND_VAR2 : BIND_LEXICAL2, void 0, kind !== "var");
  143415. }
  143416. parseFunction(node, statement = FUNC_NO_FLAGS, isAsync = false) {
  143417. const isStatement = statement & FUNC_STATEMENT2;
  143418. const isHangingStatement = statement & FUNC_HANGING_STATEMENT2;
  143419. const requireId = !!isStatement && !(statement & FUNC_NULLABLE_ID2);
  143420. this.initFunction(node, isAsync);
  143421. if (this.match(types$12.star) && isHangingStatement) {
  143422. this.raise(this.state.start, ErrorMessages.GeneratorInSingleStatementContext);
  143423. }
  143424. node.generator = this.eat(types$12.star);
  143425. if (isStatement) {
  143426. node.id = this.parseFunctionId(requireId);
  143427. }
  143428. const oldMaybeInArrowParameters = this.state.maybeInArrowParameters;
  143429. this.state.maybeInArrowParameters = false;
  143430. this.scope.enter(SCOPE_FUNCTION2);
  143431. this.prodParam.enter(functionFlags2(isAsync, node.generator));
  143432. if (!isStatement) {
  143433. node.id = this.parseFunctionId();
  143434. }
  143435. this.parseFunctionParams(node, false);
  143436. this.withTopicForbiddingContext(() => {
  143437. this.parseFunctionBodyAndFinish(node, isStatement ? "FunctionDeclaration" : "FunctionExpression");
  143438. });
  143439. this.prodParam.exit();
  143440. this.scope.exit();
  143441. if (isStatement && !isHangingStatement) {
  143442. this.registerFunctionStatementId(node);
  143443. }
  143444. this.state.maybeInArrowParameters = oldMaybeInArrowParameters;
  143445. return node;
  143446. }
  143447. parseFunctionId(requireId) {
  143448. return requireId || this.match(types$12.name) ? this.parseIdentifier() : null;
  143449. }
  143450. parseFunctionParams(node, allowModifiers) {
  143451. this.expect(types$12.parenL);
  143452. this.expressionScope.enter(newParameterDeclarationScope());
  143453. node.params = this.parseBindingList(types$12.parenR, 41, false, allowModifiers);
  143454. this.expressionScope.exit();
  143455. }
  143456. registerFunctionStatementId(node) {
  143457. if (!node.id)
  143458. return;
  143459. this.scope.declareName(node.id.name, this.state.strict || node.generator || node.async ? this.scope.treatFunctionsAsVar ? BIND_VAR2 : BIND_LEXICAL2 : BIND_FUNCTION2, node.id.start);
  143460. }
  143461. parseClass(node, isStatement, optionalId) {
  143462. this.next();
  143463. this.takeDecorators(node);
  143464. const oldStrict = this.state.strict;
  143465. this.state.strict = true;
  143466. this.parseClassId(node, isStatement, optionalId);
  143467. this.parseClassSuper(node);
  143468. node.body = this.parseClassBody(!!node.superClass, oldStrict);
  143469. return this.finishNode(node, isStatement ? "ClassDeclaration" : "ClassExpression");
  143470. }
  143471. isClassProperty() {
  143472. return this.match(types$12.eq) || this.match(types$12.semi) || this.match(types$12.braceR);
  143473. }
  143474. isClassMethod() {
  143475. return this.match(types$12.parenL);
  143476. }
  143477. isNonstaticConstructor(method) {
  143478. return !method.computed && !method.static && (method.key.name === "constructor" || method.key.value === "constructor");
  143479. }
  143480. parseClassBody(hadSuperClass, oldStrict) {
  143481. this.classScope.enter();
  143482. const state = {
  143483. hadConstructor: false,
  143484. hadSuperClass
  143485. };
  143486. let decorators = [];
  143487. const classBody = this.startNode();
  143488. classBody.body = [];
  143489. this.expect(types$12.braceL);
  143490. this.withTopicForbiddingContext(() => {
  143491. while (!this.match(types$12.braceR)) {
  143492. if (this.eat(types$12.semi)) {
  143493. if (decorators.length > 0) {
  143494. throw this.raise(this.state.lastTokEnd, ErrorMessages.DecoratorSemicolon);
  143495. }
  143496. continue;
  143497. }
  143498. if (this.match(types$12.at)) {
  143499. decorators.push(this.parseDecorator());
  143500. continue;
  143501. }
  143502. const member = this.startNode();
  143503. if (decorators.length) {
  143504. member.decorators = decorators;
  143505. this.resetStartLocationFromNode(member, decorators[0]);
  143506. decorators = [];
  143507. }
  143508. this.parseClassMember(classBody, member, state);
  143509. if (member.kind === "constructor" && member.decorators && member.decorators.length > 0) {
  143510. this.raise(member.start, ErrorMessages.DecoratorConstructor);
  143511. }
  143512. }
  143513. });
  143514. this.state.strict = oldStrict;
  143515. this.next();
  143516. if (decorators.length) {
  143517. throw this.raise(this.state.start, ErrorMessages.TrailingDecorator);
  143518. }
  143519. this.classScope.exit();
  143520. return this.finishNode(classBody, "ClassBody");
  143521. }
  143522. parseClassMemberFromModifier(classBody, member) {
  143523. const key = this.parseIdentifier(true);
  143524. if (this.isClassMethod()) {
  143525. const method = member;
  143526. method.kind = "method";
  143527. method.computed = false;
  143528. method.key = key;
  143529. method.static = false;
  143530. this.pushClassMethod(classBody, method, false, false, false, false);
  143531. return true;
  143532. } else if (this.isClassProperty()) {
  143533. const prop = member;
  143534. prop.computed = false;
  143535. prop.key = key;
  143536. prop.static = false;
  143537. classBody.body.push(this.parseClassProperty(prop));
  143538. return true;
  143539. }
  143540. return false;
  143541. }
  143542. parseClassMember(classBody, member, state) {
  143543. const isStatic = this.isContextual("static");
  143544. if (isStatic) {
  143545. if (this.parseClassMemberFromModifier(classBody, member)) {
  143546. return;
  143547. }
  143548. if (this.eat(types$12.braceL)) {
  143549. this.parseClassStaticBlock(classBody, member);
  143550. return;
  143551. }
  143552. }
  143553. this.parseClassMemberWithIsStatic(classBody, member, state, isStatic);
  143554. }
  143555. parseClassMemberWithIsStatic(classBody, member, state, isStatic) {
  143556. const publicMethod = member;
  143557. const privateMethod = member;
  143558. const publicProp = member;
  143559. const privateProp = member;
  143560. const method = publicMethod;
  143561. const publicMember = publicMethod;
  143562. member.static = isStatic;
  143563. if (this.eat(types$12.star)) {
  143564. method.kind = "method";
  143565. const isPrivateName = this.match(types$12.privateName);
  143566. this.parseClassElementName(method);
  143567. if (isPrivateName) {
  143568. this.pushClassPrivateMethod(classBody, privateMethod, true, false);
  143569. return;
  143570. }
  143571. if (this.isNonstaticConstructor(publicMethod)) {
  143572. this.raise(publicMethod.key.start, ErrorMessages.ConstructorIsGenerator);
  143573. }
  143574. this.pushClassMethod(classBody, publicMethod, true, false, false, false);
  143575. return;
  143576. }
  143577. const containsEsc = this.state.containsEsc;
  143578. const isPrivate = this.match(types$12.privateName);
  143579. const key = this.parseClassElementName(member);
  143580. const isSimple = key.type === "Identifier";
  143581. const maybeQuestionTokenStart = this.state.start;
  143582. this.parsePostMemberNameModifiers(publicMember);
  143583. if (this.isClassMethod()) {
  143584. method.kind = "method";
  143585. if (isPrivate) {
  143586. this.pushClassPrivateMethod(classBody, privateMethod, false, false);
  143587. return;
  143588. }
  143589. const isConstructor = this.isNonstaticConstructor(publicMethod);
  143590. let allowsDirectSuper = false;
  143591. if (isConstructor) {
  143592. publicMethod.kind = "constructor";
  143593. if (state.hadConstructor && !this.hasPlugin("typescript")) {
  143594. this.raise(key.start, ErrorMessages.DuplicateConstructor);
  143595. }
  143596. if (isConstructor && this.hasPlugin("typescript") && member.override) {
  143597. this.raise(key.start, ErrorMessages.OverrideOnConstructor);
  143598. }
  143599. state.hadConstructor = true;
  143600. allowsDirectSuper = state.hadSuperClass;
  143601. }
  143602. this.pushClassMethod(classBody, publicMethod, false, false, isConstructor, allowsDirectSuper);
  143603. } else if (this.isClassProperty()) {
  143604. if (isPrivate) {
  143605. this.pushClassPrivateProperty(classBody, privateProp);
  143606. } else {
  143607. this.pushClassProperty(classBody, publicProp);
  143608. }
  143609. } else if (isSimple && key.name === "async" && !containsEsc && !this.isLineTerminator()) {
  143610. const isGenerator = this.eat(types$12.star);
  143611. if (publicMember.optional) {
  143612. this.unexpected(maybeQuestionTokenStart);
  143613. }
  143614. method.kind = "method";
  143615. const isPrivate2 = this.match(types$12.privateName);
  143616. this.parseClassElementName(method);
  143617. this.parsePostMemberNameModifiers(publicMember);
  143618. if (isPrivate2) {
  143619. this.pushClassPrivateMethod(classBody, privateMethod, isGenerator, true);
  143620. } else {
  143621. if (this.isNonstaticConstructor(publicMethod)) {
  143622. this.raise(publicMethod.key.start, ErrorMessages.ConstructorIsAsync);
  143623. }
  143624. this.pushClassMethod(classBody, publicMethod, isGenerator, true, false, false);
  143625. }
  143626. } else if (isSimple && (key.name === "get" || key.name === "set") && !containsEsc && !(this.match(types$12.star) && this.isLineTerminator())) {
  143627. method.kind = key.name;
  143628. const isPrivate2 = this.match(types$12.privateName);
  143629. this.parseClassElementName(publicMethod);
  143630. if (isPrivate2) {
  143631. this.pushClassPrivateMethod(classBody, privateMethod, false, false);
  143632. } else {
  143633. if (this.isNonstaticConstructor(publicMethod)) {
  143634. this.raise(publicMethod.key.start, ErrorMessages.ConstructorIsAccessor);
  143635. }
  143636. this.pushClassMethod(classBody, publicMethod, false, false, false, false);
  143637. }
  143638. this.checkGetterSetterParams(publicMethod);
  143639. } else if (this.isLineTerminator()) {
  143640. if (isPrivate) {
  143641. this.pushClassPrivateProperty(classBody, privateProp);
  143642. } else {
  143643. this.pushClassProperty(classBody, publicProp);
  143644. }
  143645. } else {
  143646. this.unexpected();
  143647. }
  143648. }
  143649. parseClassElementName(member) {
  143650. const {
  143651. type,
  143652. value,
  143653. start: start3
  143654. } = this.state;
  143655. if ((type === types$12.name || type === types$12.string) && member.static && value === "prototype") {
  143656. this.raise(start3, ErrorMessages.StaticPrototype);
  143657. }
  143658. if (type === types$12.privateName && value === "constructor") {
  143659. this.raise(start3, ErrorMessages.ConstructorClassPrivateField);
  143660. }
  143661. return this.parsePropertyName(member, true);
  143662. }
  143663. parseClassStaticBlock(classBody, member) {
  143664. var _member$decorators;
  143665. this.expectPlugin("classStaticBlock", member.start);
  143666. this.scope.enter(SCOPE_CLASS | SCOPE_STATIC_BLOCK | SCOPE_SUPER2);
  143667. const oldLabels = this.state.labels;
  143668. this.state.labels = [];
  143669. this.prodParam.enter(PARAM);
  143670. const body = member.body = [];
  143671. this.parseBlockOrModuleBlockBody(body, void 0, false, types$12.braceR);
  143672. this.prodParam.exit();
  143673. this.scope.exit();
  143674. this.state.labels = oldLabels;
  143675. classBody.body.push(this.finishNode(member, "StaticBlock"));
  143676. if ((_member$decorators = member.decorators) != null && _member$decorators.length) {
  143677. this.raise(member.start, ErrorMessages.DecoratorStaticBlock);
  143678. }
  143679. }
  143680. pushClassProperty(classBody, prop) {
  143681. if (!prop.computed && (prop.key.name === "constructor" || prop.key.value === "constructor")) {
  143682. this.raise(prop.key.start, ErrorMessages.ConstructorClassField);
  143683. }
  143684. classBody.body.push(this.parseClassProperty(prop));
  143685. }
  143686. pushClassPrivateProperty(classBody, prop) {
  143687. const node = this.parseClassPrivateProperty(prop);
  143688. classBody.body.push(node);
  143689. this.classScope.declarePrivateName(this.getPrivateNameSV(node.key), CLASS_ELEMENT_OTHER, node.key.start);
  143690. }
  143691. pushClassMethod(classBody, method, isGenerator, isAsync, isConstructor, allowsDirectSuper) {
  143692. classBody.body.push(this.parseMethod(method, isGenerator, isAsync, isConstructor, allowsDirectSuper, "ClassMethod", true));
  143693. }
  143694. pushClassPrivateMethod(classBody, method, isGenerator, isAsync) {
  143695. const node = this.parseMethod(method, isGenerator, isAsync, false, false, "ClassPrivateMethod", true);
  143696. classBody.body.push(node);
  143697. const kind = node.kind === "get" ? node.static ? CLASS_ELEMENT_STATIC_GETTER : CLASS_ELEMENT_INSTANCE_GETTER : node.kind === "set" ? node.static ? CLASS_ELEMENT_STATIC_SETTER : CLASS_ELEMENT_INSTANCE_SETTER : CLASS_ELEMENT_OTHER;
  143698. this.classScope.declarePrivateName(this.getPrivateNameSV(node.key), kind, node.key.start);
  143699. }
  143700. parsePostMemberNameModifiers(methodOrProp) {
  143701. }
  143702. parseClassPrivateProperty(node) {
  143703. this.parseInitializer(node);
  143704. this.semicolon();
  143705. return this.finishNode(node, "ClassPrivateProperty");
  143706. }
  143707. parseClassProperty(node) {
  143708. this.parseInitializer(node);
  143709. this.semicolon();
  143710. return this.finishNode(node, "ClassProperty");
  143711. }
  143712. parseInitializer(node) {
  143713. this.scope.enter(SCOPE_CLASS | SCOPE_SUPER2);
  143714. this.expressionScope.enter(newExpressionScope());
  143715. this.prodParam.enter(PARAM);
  143716. node.value = this.eat(types$12.eq) ? this.parseMaybeAssignAllowIn() : null;
  143717. this.expressionScope.exit();
  143718. this.prodParam.exit();
  143719. this.scope.exit();
  143720. }
  143721. parseClassId(node, isStatement, optionalId, bindingType = BIND_CLASS) {
  143722. if (this.match(types$12.name)) {
  143723. node.id = this.parseIdentifier();
  143724. if (isStatement) {
  143725. this.checkLVal(node.id, "class name", bindingType);
  143726. }
  143727. } else {
  143728. if (optionalId || !isStatement) {
  143729. node.id = null;
  143730. } else {
  143731. this.unexpected(null, ErrorMessages.MissingClassName);
  143732. }
  143733. }
  143734. }
  143735. parseClassSuper(node) {
  143736. node.superClass = this.eat(types$12._extends) ? this.parseExprSubscripts() : null;
  143737. }
  143738. parseExport(node) {
  143739. const hasDefault = this.maybeParseExportDefaultSpecifier(node);
  143740. const parseAfterDefault = !hasDefault || this.eat(types$12.comma);
  143741. const hasStar = parseAfterDefault && this.eatExportStar(node);
  143742. const hasNamespace = hasStar && this.maybeParseExportNamespaceSpecifier(node);
  143743. const parseAfterNamespace = parseAfterDefault && (!hasNamespace || this.eat(types$12.comma));
  143744. const isFromRequired = hasDefault || hasStar;
  143745. if (hasStar && !hasNamespace) {
  143746. if (hasDefault)
  143747. this.unexpected();
  143748. this.parseExportFrom(node, true);
  143749. return this.finishNode(node, "ExportAllDeclaration");
  143750. }
  143751. const hasSpecifiers = this.maybeParseExportNamedSpecifiers(node);
  143752. if (hasDefault && parseAfterDefault && !hasStar && !hasSpecifiers || hasNamespace && parseAfterNamespace && !hasSpecifiers) {
  143753. throw this.unexpected(null, types$12.braceL);
  143754. }
  143755. let hasDeclaration;
  143756. if (isFromRequired || hasSpecifiers) {
  143757. hasDeclaration = false;
  143758. this.parseExportFrom(node, isFromRequired);
  143759. } else {
  143760. hasDeclaration = this.maybeParseExportDeclaration(node);
  143761. }
  143762. if (isFromRequired || hasSpecifiers || hasDeclaration) {
  143763. this.checkExport(node, true, false, !!node.source);
  143764. return this.finishNode(node, "ExportNamedDeclaration");
  143765. }
  143766. if (this.eat(types$12._default)) {
  143767. node.declaration = this.parseExportDefaultExpression();
  143768. this.checkExport(node, true, true);
  143769. return this.finishNode(node, "ExportDefaultDeclaration");
  143770. }
  143771. throw this.unexpected(null, types$12.braceL);
  143772. }
  143773. eatExportStar(node) {
  143774. return this.eat(types$12.star);
  143775. }
  143776. maybeParseExportDefaultSpecifier(node) {
  143777. if (this.isExportDefaultSpecifier()) {
  143778. this.expectPlugin("exportDefaultFrom");
  143779. const specifier = this.startNode();
  143780. specifier.exported = this.parseIdentifier(true);
  143781. node.specifiers = [this.finishNode(specifier, "ExportDefaultSpecifier")];
  143782. return true;
  143783. }
  143784. return false;
  143785. }
  143786. maybeParseExportNamespaceSpecifier(node) {
  143787. if (this.isContextual("as")) {
  143788. if (!node.specifiers)
  143789. node.specifiers = [];
  143790. const specifier = this.startNodeAt(this.state.lastTokStart, this.state.lastTokStartLoc);
  143791. this.next();
  143792. specifier.exported = this.parseModuleExportName();
  143793. node.specifiers.push(this.finishNode(specifier, "ExportNamespaceSpecifier"));
  143794. return true;
  143795. }
  143796. return false;
  143797. }
  143798. maybeParseExportNamedSpecifiers(node) {
  143799. if (this.match(types$12.braceL)) {
  143800. if (!node.specifiers)
  143801. node.specifiers = [];
  143802. node.specifiers.push(...this.parseExportSpecifiers());
  143803. node.source = null;
  143804. node.declaration = null;
  143805. return true;
  143806. }
  143807. return false;
  143808. }
  143809. maybeParseExportDeclaration(node) {
  143810. if (this.shouldParseExportDeclaration()) {
  143811. node.specifiers = [];
  143812. node.source = null;
  143813. node.declaration = this.parseExportDeclaration(node);
  143814. return true;
  143815. }
  143816. return false;
  143817. }
  143818. isAsyncFunction() {
  143819. if (!this.isContextual("async"))
  143820. return false;
  143821. const next = this.nextTokenStart();
  143822. return !lineBreak2.test(this.input.slice(this.state.pos, next)) && this.isUnparsedContextual(next, "function");
  143823. }
  143824. parseExportDefaultExpression() {
  143825. const expr = this.startNode();
  143826. const isAsync = this.isAsyncFunction();
  143827. if (this.match(types$12._function) || isAsync) {
  143828. this.next();
  143829. if (isAsync) {
  143830. this.next();
  143831. }
  143832. return this.parseFunction(expr, FUNC_STATEMENT2 | FUNC_NULLABLE_ID2, isAsync);
  143833. } else if (this.match(types$12._class)) {
  143834. return this.parseClass(expr, true, true);
  143835. } else if (this.match(types$12.at)) {
  143836. if (this.hasPlugin("decorators") && this.getPluginOption("decorators", "decoratorsBeforeExport")) {
  143837. this.raise(this.state.start, ErrorMessages.DecoratorBeforeExport);
  143838. }
  143839. this.parseDecorators(false);
  143840. return this.parseClass(expr, true, true);
  143841. } else if (this.match(types$12._const) || this.match(types$12._var) || this.isLet()) {
  143842. throw this.raise(this.state.start, ErrorMessages.UnsupportedDefaultExport);
  143843. } else {
  143844. const res = this.parseMaybeAssignAllowIn();
  143845. this.semicolon();
  143846. return res;
  143847. }
  143848. }
  143849. parseExportDeclaration(node) {
  143850. return this.parseStatement(null);
  143851. }
  143852. isExportDefaultSpecifier() {
  143853. if (this.match(types$12.name)) {
  143854. const value = this.state.value;
  143855. if (value === "async" && !this.state.containsEsc || value === "let") {
  143856. return false;
  143857. }
  143858. if ((value === "type" || value === "interface") && !this.state.containsEsc) {
  143859. const l = this.lookahead();
  143860. if (l.type === types$12.name && l.value !== "from" || l.type === types$12.braceL) {
  143861. this.expectOnePlugin(["flow", "typescript"]);
  143862. return false;
  143863. }
  143864. }
  143865. } else if (!this.match(types$12._default)) {
  143866. return false;
  143867. }
  143868. const next = this.nextTokenStart();
  143869. const hasFrom = this.isUnparsedContextual(next, "from");
  143870. if (this.input.charCodeAt(next) === 44 || this.match(types$12.name) && hasFrom) {
  143871. return true;
  143872. }
  143873. if (this.match(types$12._default) && hasFrom) {
  143874. const nextAfterFrom = this.input.charCodeAt(this.nextTokenStartSince(next + 4));
  143875. return nextAfterFrom === 34 || nextAfterFrom === 39;
  143876. }
  143877. return false;
  143878. }
  143879. parseExportFrom(node, expect) {
  143880. if (this.eatContextual("from")) {
  143881. node.source = this.parseImportSource();
  143882. this.checkExport(node);
  143883. const assertions = this.maybeParseImportAssertions();
  143884. if (assertions) {
  143885. node.assertions = assertions;
  143886. }
  143887. } else {
  143888. if (expect) {
  143889. this.unexpected();
  143890. } else {
  143891. node.source = null;
  143892. }
  143893. }
  143894. this.semicolon();
  143895. }
  143896. shouldParseExportDeclaration() {
  143897. if (this.match(types$12.at)) {
  143898. this.expectOnePlugin(["decorators", "decorators-legacy"]);
  143899. if (this.hasPlugin("decorators")) {
  143900. if (this.getPluginOption("decorators", "decoratorsBeforeExport")) {
  143901. this.unexpected(this.state.start, ErrorMessages.DecoratorBeforeExport);
  143902. } else {
  143903. return true;
  143904. }
  143905. }
  143906. }
  143907. return this.state.type.keyword === "var" || this.state.type.keyword === "const" || this.state.type.keyword === "function" || this.state.type.keyword === "class" || this.isLet() || this.isAsyncFunction();
  143908. }
  143909. checkExport(node, checkNames, isDefault, isFrom) {
  143910. if (checkNames) {
  143911. if (isDefault) {
  143912. this.checkDuplicateExports(node, "default");
  143913. if (this.hasPlugin("exportDefaultFrom")) {
  143914. var _declaration$extra;
  143915. const declaration = node.declaration;
  143916. if (declaration.type === "Identifier" && declaration.name === "from" && declaration.end - declaration.start === 4 && !((_declaration$extra = declaration.extra) != null && _declaration$extra.parenthesized)) {
  143917. this.raise(declaration.start, ErrorMessages.ExportDefaultFromAsIdentifier);
  143918. }
  143919. }
  143920. } else if (node.specifiers && node.specifiers.length) {
  143921. for (const specifier of node.specifiers) {
  143922. const {
  143923. exported
  143924. } = specifier;
  143925. const exportedName = exported.type === "Identifier" ? exported.name : exported.value;
  143926. this.checkDuplicateExports(specifier, exportedName);
  143927. if (!isFrom && specifier.local) {
  143928. const {
  143929. local
  143930. } = specifier;
  143931. if (local.type !== "Identifier") {
  143932. this.raise(specifier.start, ErrorMessages.ExportBindingIsString, local.value, exportedName);
  143933. } else {
  143934. this.checkReservedWord(local.name, local.start, true, false);
  143935. this.scope.checkLocalExport(local);
  143936. }
  143937. }
  143938. }
  143939. } else if (node.declaration) {
  143940. if (node.declaration.type === "FunctionDeclaration" || node.declaration.type === "ClassDeclaration") {
  143941. const id = node.declaration.id;
  143942. if (!id)
  143943. throw new Error("Assertion failure");
  143944. this.checkDuplicateExports(node, id.name);
  143945. } else if (node.declaration.type === "VariableDeclaration") {
  143946. for (const declaration of node.declaration.declarations) {
  143947. this.checkDeclaration(declaration.id);
  143948. }
  143949. }
  143950. }
  143951. }
  143952. const currentContextDecorators = this.state.decoratorStack[this.state.decoratorStack.length - 1];
  143953. if (currentContextDecorators.length) {
  143954. throw this.raise(node.start, ErrorMessages.UnsupportedDecoratorExport);
  143955. }
  143956. }
  143957. checkDeclaration(node) {
  143958. if (node.type === "Identifier") {
  143959. this.checkDuplicateExports(node, node.name);
  143960. } else if (node.type === "ObjectPattern") {
  143961. for (const prop of node.properties) {
  143962. this.checkDeclaration(prop);
  143963. }
  143964. } else if (node.type === "ArrayPattern") {
  143965. for (const elem of node.elements) {
  143966. if (elem) {
  143967. this.checkDeclaration(elem);
  143968. }
  143969. }
  143970. } else if (node.type === "ObjectProperty") {
  143971. this.checkDeclaration(node.value);
  143972. } else if (node.type === "RestElement") {
  143973. this.checkDeclaration(node.argument);
  143974. } else if (node.type === "AssignmentPattern") {
  143975. this.checkDeclaration(node.left);
  143976. }
  143977. }
  143978. checkDuplicateExports(node, name2) {
  143979. if (this.exportedIdentifiers.has(name2)) {
  143980. this.raise(node.start, name2 === "default" ? ErrorMessages.DuplicateDefaultExport : ErrorMessages.DuplicateExport, name2);
  143981. }
  143982. this.exportedIdentifiers.add(name2);
  143983. }
  143984. parseExportSpecifiers() {
  143985. const nodes = [];
  143986. let first = true;
  143987. this.expect(types$12.braceL);
  143988. while (!this.eat(types$12.braceR)) {
  143989. if (first) {
  143990. first = false;
  143991. } else {
  143992. this.expect(types$12.comma);
  143993. if (this.eat(types$12.braceR))
  143994. break;
  143995. }
  143996. const node = this.startNode();
  143997. node.local = this.parseModuleExportName();
  143998. node.exported = this.eatContextual("as") ? this.parseModuleExportName() : node.local.__clone();
  143999. nodes.push(this.finishNode(node, "ExportSpecifier"));
  144000. }
  144001. return nodes;
  144002. }
  144003. parseModuleExportName() {
  144004. if (this.match(types$12.string)) {
  144005. const result = this.parseStringLiteral(this.state.value);
  144006. const surrogate = result.value.match(loneSurrogate2);
  144007. if (surrogate) {
  144008. this.raise(result.start, ErrorMessages.ModuleExportNameHasLoneSurrogate, surrogate[0].charCodeAt(0).toString(16));
  144009. }
  144010. return result;
  144011. }
  144012. return this.parseIdentifier(true);
  144013. }
  144014. parseImport(node) {
  144015. node.specifiers = [];
  144016. if (!this.match(types$12.string)) {
  144017. const hasDefault = this.maybeParseDefaultImportSpecifier(node);
  144018. const parseNext = !hasDefault || this.eat(types$12.comma);
  144019. const hasStar = parseNext && this.maybeParseStarImportSpecifier(node);
  144020. if (parseNext && !hasStar)
  144021. this.parseNamedImportSpecifiers(node);
  144022. this.expectContextual("from");
  144023. }
  144024. node.source = this.parseImportSource();
  144025. const assertions = this.maybeParseImportAssertions();
  144026. if (assertions) {
  144027. node.assertions = assertions;
  144028. } else {
  144029. const attributes = this.maybeParseModuleAttributes();
  144030. if (attributes) {
  144031. node.attributes = attributes;
  144032. }
  144033. }
  144034. this.semicolon();
  144035. return this.finishNode(node, "ImportDeclaration");
  144036. }
  144037. parseImportSource() {
  144038. if (!this.match(types$12.string))
  144039. this.unexpected();
  144040. return this.parseExprAtom();
  144041. }
  144042. shouldParseDefaultImport(node) {
  144043. return this.match(types$12.name);
  144044. }
  144045. parseImportSpecifierLocal(node, specifier, type, contextDescription) {
  144046. specifier.local = this.parseIdentifier();
  144047. this.checkLVal(specifier.local, contextDescription, BIND_LEXICAL2);
  144048. node.specifiers.push(this.finishNode(specifier, type));
  144049. }
  144050. parseAssertEntries() {
  144051. const attrs = [];
  144052. const attrNames = /* @__PURE__ */ new Set();
  144053. do {
  144054. if (this.match(types$12.braceR)) {
  144055. break;
  144056. }
  144057. const node = this.startNode();
  144058. const keyName = this.state.value;
  144059. if (attrNames.has(keyName)) {
  144060. this.raise(this.state.start, ErrorMessages.ModuleAttributesWithDuplicateKeys, keyName);
  144061. }
  144062. attrNames.add(keyName);
  144063. if (this.match(types$12.string)) {
  144064. node.key = this.parseStringLiteral(keyName);
  144065. } else {
  144066. node.key = this.parseIdentifier(true);
  144067. }
  144068. this.expect(types$12.colon);
  144069. if (!this.match(types$12.string)) {
  144070. throw this.unexpected(this.state.start, ErrorMessages.ModuleAttributeInvalidValue);
  144071. }
  144072. node.value = this.parseStringLiteral(this.state.value);
  144073. this.finishNode(node, "ImportAttribute");
  144074. attrs.push(node);
  144075. } while (this.eat(types$12.comma));
  144076. return attrs;
  144077. }
  144078. maybeParseModuleAttributes() {
  144079. if (this.match(types$12._with) && !this.hasPrecedingLineBreak()) {
  144080. this.expectPlugin("moduleAttributes");
  144081. this.next();
  144082. } else {
  144083. if (this.hasPlugin("moduleAttributes"))
  144084. return [];
  144085. return null;
  144086. }
  144087. const attrs = [];
  144088. const attributes = /* @__PURE__ */ new Set();
  144089. do {
  144090. const node = this.startNode();
  144091. node.key = this.parseIdentifier(true);
  144092. if (node.key.name !== "type") {
  144093. this.raise(node.key.start, ErrorMessages.ModuleAttributeDifferentFromType, node.key.name);
  144094. }
  144095. if (attributes.has(node.key.name)) {
  144096. this.raise(node.key.start, ErrorMessages.ModuleAttributesWithDuplicateKeys, node.key.name);
  144097. }
  144098. attributes.add(node.key.name);
  144099. this.expect(types$12.colon);
  144100. if (!this.match(types$12.string)) {
  144101. throw this.unexpected(this.state.start, ErrorMessages.ModuleAttributeInvalidValue);
  144102. }
  144103. node.value = this.parseStringLiteral(this.state.value);
  144104. this.finishNode(node, "ImportAttribute");
  144105. attrs.push(node);
  144106. } while (this.eat(types$12.comma));
  144107. return attrs;
  144108. }
  144109. maybeParseImportAssertions() {
  144110. if (this.isContextual("assert") && !this.hasPrecedingLineBreak()) {
  144111. this.expectPlugin("importAssertions");
  144112. this.next();
  144113. } else {
  144114. if (this.hasPlugin("importAssertions"))
  144115. return [];
  144116. return null;
  144117. }
  144118. this.eat(types$12.braceL);
  144119. const attrs = this.parseAssertEntries();
  144120. this.eat(types$12.braceR);
  144121. return attrs;
  144122. }
  144123. maybeParseDefaultImportSpecifier(node) {
  144124. if (this.shouldParseDefaultImport(node)) {
  144125. this.parseImportSpecifierLocal(node, this.startNode(), "ImportDefaultSpecifier", "default import specifier");
  144126. return true;
  144127. }
  144128. return false;
  144129. }
  144130. maybeParseStarImportSpecifier(node) {
  144131. if (this.match(types$12.star)) {
  144132. const specifier = this.startNode();
  144133. this.next();
  144134. this.expectContextual("as");
  144135. this.parseImportSpecifierLocal(node, specifier, "ImportNamespaceSpecifier", "import namespace specifier");
  144136. return true;
  144137. }
  144138. return false;
  144139. }
  144140. parseNamedImportSpecifiers(node) {
  144141. let first = true;
  144142. this.expect(types$12.braceL);
  144143. while (!this.eat(types$12.braceR)) {
  144144. if (first) {
  144145. first = false;
  144146. } else {
  144147. if (this.eat(types$12.colon)) {
  144148. throw this.raise(this.state.start, ErrorMessages.DestructureNamedImport);
  144149. }
  144150. this.expect(types$12.comma);
  144151. if (this.eat(types$12.braceR))
  144152. break;
  144153. }
  144154. this.parseImportSpecifier(node);
  144155. }
  144156. }
  144157. parseImportSpecifier(node) {
  144158. const specifier = this.startNode();
  144159. const importedIsString = this.match(types$12.string);
  144160. specifier.imported = this.parseModuleExportName();
  144161. if (this.eatContextual("as")) {
  144162. specifier.local = this.parseIdentifier();
  144163. } else {
  144164. const {
  144165. imported
  144166. } = specifier;
  144167. if (importedIsString) {
  144168. throw this.raise(specifier.start, ErrorMessages.ImportBindingIsString, imported.value);
  144169. }
  144170. this.checkReservedWord(imported.name, specifier.start, true, true);
  144171. specifier.local = imported.__clone();
  144172. }
  144173. this.checkLVal(specifier.local, "import specifier", BIND_LEXICAL2);
  144174. node.specifiers.push(this.finishNode(specifier, "ImportSpecifier"));
  144175. }
  144176. isThisParam(param) {
  144177. return param.type === "Identifier" && param.name === "this";
  144178. }
  144179. };
  144180. var Parser3 = class extends StatementParser {
  144181. constructor(options, input) {
  144182. options = getOptions2(options);
  144183. super(options, input);
  144184. this.options = options;
  144185. this.initializeScopes();
  144186. this.plugins = pluginsMap(this.options.plugins);
  144187. this.filename = options.sourceFilename;
  144188. }
  144189. getScopeHandler() {
  144190. return ScopeHandler;
  144191. }
  144192. parse() {
  144193. this.enterInitialScopes();
  144194. const file = this.startNode();
  144195. const program = this.startNode();
  144196. this.nextToken();
  144197. file.errors = null;
  144198. this.parseTopLevel(file, program);
  144199. file.errors = this.state.errors;
  144200. return file;
  144201. }
  144202. };
  144203. function pluginsMap(plugins) {
  144204. const pluginMap = /* @__PURE__ */ new Map();
  144205. for (const plugin2 of plugins) {
  144206. const [name2, options] = Array.isArray(plugin2) ? plugin2 : [plugin2, {}];
  144207. if (!pluginMap.has(name2))
  144208. pluginMap.set(name2, options || {});
  144209. }
  144210. return pluginMap;
  144211. }
  144212. function parse4(input, options) {
  144213. var _options;
  144214. if (((_options = options) == null ? void 0 : _options.sourceType) === "unambiguous") {
  144215. options = Object.assign({}, options);
  144216. try {
  144217. options.sourceType = "module";
  144218. const parser = getParser(options, input);
  144219. const ast = parser.parse();
  144220. if (parser.sawUnambiguousESM) {
  144221. return ast;
  144222. }
  144223. if (parser.ambiguousScriptDifferentAst) {
  144224. try {
  144225. options.sourceType = "script";
  144226. return getParser(options, input).parse();
  144227. } catch (_unused) {
  144228. }
  144229. } else {
  144230. ast.program.sourceType = "script";
  144231. }
  144232. return ast;
  144233. } catch (moduleError) {
  144234. try {
  144235. options.sourceType = "script";
  144236. return getParser(options, input).parse();
  144237. } catch (_unused2) {
  144238. }
  144239. throw moduleError;
  144240. }
  144241. } else {
  144242. return getParser(options, input).parse();
  144243. }
  144244. }
  144245. function parseExpression(input, options) {
  144246. const parser = getParser(options, input);
  144247. if (parser.options.strictMode) {
  144248. parser.state.strict = true;
  144249. }
  144250. return parser.getExpression();
  144251. }
  144252. function getParser(options, input) {
  144253. let cls = Parser3;
  144254. if (options != null && options.plugins) {
  144255. validatePlugins(options.plugins);
  144256. cls = getParserClass(options.plugins);
  144257. }
  144258. return new cls(options, input);
  144259. }
  144260. var parserClassCache = {};
  144261. function getParserClass(pluginsFromOptions) {
  144262. const pluginList = mixinPluginNames.filter((name2) => hasPlugin(pluginsFromOptions, name2));
  144263. const key = pluginList.join("/");
  144264. let cls = parserClassCache[key];
  144265. if (!cls) {
  144266. cls = Parser3;
  144267. for (const plugin2 of pluginList) {
  144268. cls = mixinPlugins[plugin2](cls);
  144269. }
  144270. parserClassCache[key] = cls;
  144271. }
  144272. return cls;
  144273. }
  144274. exports.parse = parse4;
  144275. exports.parseExpression = parseExpression;
  144276. exports.tokTypes = types$12;
  144277. }
  144278. });
  144279. // node_modules/@babel/template/node_modules/color-name/index.js
  144280. var require_color_name3 = __commonJS({
  144281. "node_modules/@babel/template/node_modules/color-name/index.js"(exports, module) {
  144282. "use strict";
  144283. module.exports = {
  144284. "aliceblue": [240, 248, 255],
  144285. "antiquewhite": [250, 235, 215],
  144286. "aqua": [0, 255, 255],
  144287. "aquamarine": [127, 255, 212],
  144288. "azure": [240, 255, 255],
  144289. "beige": [245, 245, 220],
  144290. "bisque": [255, 228, 196],
  144291. "black": [0, 0, 0],
  144292. "blanchedalmond": [255, 235, 205],
  144293. "blue": [0, 0, 255],
  144294. "blueviolet": [138, 43, 226],
  144295. "brown": [165, 42, 42],
  144296. "burlywood": [222, 184, 135],
  144297. "cadetblue": [95, 158, 160],
  144298. "chartreuse": [127, 255, 0],
  144299. "chocolate": [210, 105, 30],
  144300. "coral": [255, 127, 80],
  144301. "cornflowerblue": [100, 149, 237],
  144302. "cornsilk": [255, 248, 220],
  144303. "crimson": [220, 20, 60],
  144304. "cyan": [0, 255, 255],
  144305. "darkblue": [0, 0, 139],
  144306. "darkcyan": [0, 139, 139],
  144307. "darkgoldenrod": [184, 134, 11],
  144308. "darkgray": [169, 169, 169],
  144309. "darkgreen": [0, 100, 0],
  144310. "darkgrey": [169, 169, 169],
  144311. "darkkhaki": [189, 183, 107],
  144312. "darkmagenta": [139, 0, 139],
  144313. "darkolivegreen": [85, 107, 47],
  144314. "darkorange": [255, 140, 0],
  144315. "darkorchid": [153, 50, 204],
  144316. "darkred": [139, 0, 0],
  144317. "darksalmon": [233, 150, 122],
  144318. "darkseagreen": [143, 188, 143],
  144319. "darkslateblue": [72, 61, 139],
  144320. "darkslategray": [47, 79, 79],
  144321. "darkslategrey": [47, 79, 79],
  144322. "darkturquoise": [0, 206, 209],
  144323. "darkviolet": [148, 0, 211],
  144324. "deeppink": [255, 20, 147],
  144325. "deepskyblue": [0, 191, 255],
  144326. "dimgray": [105, 105, 105],
  144327. "dimgrey": [105, 105, 105],
  144328. "dodgerblue": [30, 144, 255],
  144329. "firebrick": [178, 34, 34],
  144330. "floralwhite": [255, 250, 240],
  144331. "forestgreen": [34, 139, 34],
  144332. "fuchsia": [255, 0, 255],
  144333. "gainsboro": [220, 220, 220],
  144334. "ghostwhite": [248, 248, 255],
  144335. "gold": [255, 215, 0],
  144336. "goldenrod": [218, 165, 32],
  144337. "gray": [128, 128, 128],
  144338. "green": [0, 128, 0],
  144339. "greenyellow": [173, 255, 47],
  144340. "grey": [128, 128, 128],
  144341. "honeydew": [240, 255, 240],
  144342. "hotpink": [255, 105, 180],
  144343. "indianred": [205, 92, 92],
  144344. "indigo": [75, 0, 130],
  144345. "ivory": [255, 255, 240],
  144346. "khaki": [240, 230, 140],
  144347. "lavender": [230, 230, 250],
  144348. "lavenderblush": [255, 240, 245],
  144349. "lawngreen": [124, 252, 0],
  144350. "lemonchiffon": [255, 250, 205],
  144351. "lightblue": [173, 216, 230],
  144352. "lightcoral": [240, 128, 128],
  144353. "lightcyan": [224, 255, 255],
  144354. "lightgoldenrodyellow": [250, 250, 210],
  144355. "lightgray": [211, 211, 211],
  144356. "lightgreen": [144, 238, 144],
  144357. "lightgrey": [211, 211, 211],
  144358. "lightpink": [255, 182, 193],
  144359. "lightsalmon": [255, 160, 122],
  144360. "lightseagreen": [32, 178, 170],
  144361. "lightskyblue": [135, 206, 250],
  144362. "lightslategray": [119, 136, 153],
  144363. "lightslategrey": [119, 136, 153],
  144364. "lightsteelblue": [176, 196, 222],
  144365. "lightyellow": [255, 255, 224],
  144366. "lime": [0, 255, 0],
  144367. "limegreen": [50, 205, 50],
  144368. "linen": [250, 240, 230],
  144369. "magenta": [255, 0, 255],
  144370. "maroon": [128, 0, 0],
  144371. "mediumaquamarine": [102, 205, 170],
  144372. "mediumblue": [0, 0, 205],
  144373. "mediumorchid": [186, 85, 211],
  144374. "mediumpurple": [147, 112, 219],
  144375. "mediumseagreen": [60, 179, 113],
  144376. "mediumslateblue": [123, 104, 238],
  144377. "mediumspringgreen": [0, 250, 154],
  144378. "mediumturquoise": [72, 209, 204],
  144379. "mediumvioletred": [199, 21, 133],
  144380. "midnightblue": [25, 25, 112],
  144381. "mintcream": [245, 255, 250],
  144382. "mistyrose": [255, 228, 225],
  144383. "moccasin": [255, 228, 181],
  144384. "navajowhite": [255, 222, 173],
  144385. "navy": [0, 0, 128],
  144386. "oldlace": [253, 245, 230],
  144387. "olive": [128, 128, 0],
  144388. "olivedrab": [107, 142, 35],
  144389. "orange": [255, 165, 0],
  144390. "orangered": [255, 69, 0],
  144391. "orchid": [218, 112, 214],
  144392. "palegoldenrod": [238, 232, 170],
  144393. "palegreen": [152, 251, 152],
  144394. "paleturquoise": [175, 238, 238],
  144395. "palevioletred": [219, 112, 147],
  144396. "papayawhip": [255, 239, 213],
  144397. "peachpuff": [255, 218, 185],
  144398. "peru": [205, 133, 63],
  144399. "pink": [255, 192, 203],
  144400. "plum": [221, 160, 221],
  144401. "powderblue": [176, 224, 230],
  144402. "purple": [128, 0, 128],
  144403. "rebeccapurple": [102, 51, 153],
  144404. "red": [255, 0, 0],
  144405. "rosybrown": [188, 143, 143],
  144406. "royalblue": [65, 105, 225],
  144407. "saddlebrown": [139, 69, 19],
  144408. "salmon": [250, 128, 114],
  144409. "sandybrown": [244, 164, 96],
  144410. "seagreen": [46, 139, 87],
  144411. "seashell": [255, 245, 238],
  144412. "sienna": [160, 82, 45],
  144413. "silver": [192, 192, 192],
  144414. "skyblue": [135, 206, 235],
  144415. "slateblue": [106, 90, 205],
  144416. "slategray": [112, 128, 144],
  144417. "slategrey": [112, 128, 144],
  144418. "snow": [255, 250, 250],
  144419. "springgreen": [0, 255, 127],
  144420. "steelblue": [70, 130, 180],
  144421. "tan": [210, 180, 140],
  144422. "teal": [0, 128, 128],
  144423. "thistle": [216, 191, 216],
  144424. "tomato": [255, 99, 71],
  144425. "turquoise": [64, 224, 208],
  144426. "violet": [238, 130, 238],
  144427. "wheat": [245, 222, 179],
  144428. "white": [255, 255, 255],
  144429. "whitesmoke": [245, 245, 245],
  144430. "yellow": [255, 255, 0],
  144431. "yellowgreen": [154, 205, 50]
  144432. };
  144433. }
  144434. });
  144435. // node_modules/@babel/template/node_modules/color-convert/conversions.js
  144436. var require_conversions3 = __commonJS({
  144437. "node_modules/@babel/template/node_modules/color-convert/conversions.js"(exports, module) {
  144438. var cssKeywords = require_color_name3();
  144439. var reverseKeywords = {};
  144440. for (key in cssKeywords) {
  144441. if (cssKeywords.hasOwnProperty(key)) {
  144442. reverseKeywords[cssKeywords[key]] = key;
  144443. }
  144444. }
  144445. var key;
  144446. var convert2 = module.exports = {
  144447. rgb: { channels: 3, labels: "rgb" },
  144448. hsl: { channels: 3, labels: "hsl" },
  144449. hsv: { channels: 3, labels: "hsv" },
  144450. hwb: { channels: 3, labels: "hwb" },
  144451. cmyk: { channels: 4, labels: "cmyk" },
  144452. xyz: { channels: 3, labels: "xyz" },
  144453. lab: { channels: 3, labels: "lab" },
  144454. lch: { channels: 3, labels: "lch" },
  144455. hex: { channels: 1, labels: ["hex"] },
  144456. keyword: { channels: 1, labels: ["keyword"] },
  144457. ansi16: { channels: 1, labels: ["ansi16"] },
  144458. ansi256: { channels: 1, labels: ["ansi256"] },
  144459. hcg: { channels: 3, labels: ["h", "c", "g"] },
  144460. apple: { channels: 3, labels: ["r16", "g16", "b16"] },
  144461. gray: { channels: 1, labels: ["gray"] }
  144462. };
  144463. for (model in convert2) {
  144464. if (convert2.hasOwnProperty(model)) {
  144465. if (!("channels" in convert2[model])) {
  144466. throw new Error("missing channels property: " + model);
  144467. }
  144468. if (!("labels" in convert2[model])) {
  144469. throw new Error("missing channel labels property: " + model);
  144470. }
  144471. if (convert2[model].labels.length !== convert2[model].channels) {
  144472. throw new Error("channel and label counts mismatch: " + model);
  144473. }
  144474. channels = convert2[model].channels;
  144475. labels = convert2[model].labels;
  144476. delete convert2[model].channels;
  144477. delete convert2[model].labels;
  144478. Object.defineProperty(convert2[model], "channels", { value: channels });
  144479. Object.defineProperty(convert2[model], "labels", { value: labels });
  144480. }
  144481. }
  144482. var channels;
  144483. var labels;
  144484. var model;
  144485. convert2.rgb.hsl = function(rgb) {
  144486. var r = rgb[0] / 255;
  144487. var g = rgb[1] / 255;
  144488. var b = rgb[2] / 255;
  144489. var min = Math.min(r, g, b);
  144490. var max = Math.max(r, g, b);
  144491. var delta = max - min;
  144492. var h;
  144493. var s;
  144494. var l;
  144495. if (max === min) {
  144496. h = 0;
  144497. } else if (r === max) {
  144498. h = (g - b) / delta;
  144499. } else if (g === max) {
  144500. h = 2 + (b - r) / delta;
  144501. } else if (b === max) {
  144502. h = 4 + (r - g) / delta;
  144503. }
  144504. h = Math.min(h * 60, 360);
  144505. if (h < 0) {
  144506. h += 360;
  144507. }
  144508. l = (min + max) / 2;
  144509. if (max === min) {
  144510. s = 0;
  144511. } else if (l <= 0.5) {
  144512. s = delta / (max + min);
  144513. } else {
  144514. s = delta / (2 - max - min);
  144515. }
  144516. return [h, s * 100, l * 100];
  144517. };
  144518. convert2.rgb.hsv = function(rgb) {
  144519. var rdif;
  144520. var gdif;
  144521. var bdif;
  144522. var h;
  144523. var s;
  144524. var r = rgb[0] / 255;
  144525. var g = rgb[1] / 255;
  144526. var b = rgb[2] / 255;
  144527. var v = Math.max(r, g, b);
  144528. var diff = v - Math.min(r, g, b);
  144529. var diffc = function(c) {
  144530. return (v - c) / 6 / diff + 1 / 2;
  144531. };
  144532. if (diff === 0) {
  144533. h = s = 0;
  144534. } else {
  144535. s = diff / v;
  144536. rdif = diffc(r);
  144537. gdif = diffc(g);
  144538. bdif = diffc(b);
  144539. if (r === v) {
  144540. h = bdif - gdif;
  144541. } else if (g === v) {
  144542. h = 1 / 3 + rdif - bdif;
  144543. } else if (b === v) {
  144544. h = 2 / 3 + gdif - rdif;
  144545. }
  144546. if (h < 0) {
  144547. h += 1;
  144548. } else if (h > 1) {
  144549. h -= 1;
  144550. }
  144551. }
  144552. return [
  144553. h * 360,
  144554. s * 100,
  144555. v * 100
  144556. ];
  144557. };
  144558. convert2.rgb.hwb = function(rgb) {
  144559. var r = rgb[0];
  144560. var g = rgb[1];
  144561. var b = rgb[2];
  144562. var h = convert2.rgb.hsl(rgb)[0];
  144563. var w = 1 / 255 * Math.min(r, Math.min(g, b));
  144564. b = 1 - 1 / 255 * Math.max(r, Math.max(g, b));
  144565. return [h, w * 100, b * 100];
  144566. };
  144567. convert2.rgb.cmyk = function(rgb) {
  144568. var r = rgb[0] / 255;
  144569. var g = rgb[1] / 255;
  144570. var b = rgb[2] / 255;
  144571. var c;
  144572. var m;
  144573. var y;
  144574. var k;
  144575. k = Math.min(1 - r, 1 - g, 1 - b);
  144576. c = (1 - r - k) / (1 - k) || 0;
  144577. m = (1 - g - k) / (1 - k) || 0;
  144578. y = (1 - b - k) / (1 - k) || 0;
  144579. return [c * 100, m * 100, y * 100, k * 100];
  144580. };
  144581. function comparativeDistance(x, y) {
  144582. return Math.pow(x[0] - y[0], 2) + Math.pow(x[1] - y[1], 2) + Math.pow(x[2] - y[2], 2);
  144583. }
  144584. convert2.rgb.keyword = function(rgb) {
  144585. var reversed = reverseKeywords[rgb];
  144586. if (reversed) {
  144587. return reversed;
  144588. }
  144589. var currentClosestDistance = Infinity;
  144590. var currentClosestKeyword;
  144591. for (var keyword in cssKeywords) {
  144592. if (cssKeywords.hasOwnProperty(keyword)) {
  144593. var value = cssKeywords[keyword];
  144594. var distance = comparativeDistance(rgb, value);
  144595. if (distance < currentClosestDistance) {
  144596. currentClosestDistance = distance;
  144597. currentClosestKeyword = keyword;
  144598. }
  144599. }
  144600. }
  144601. return currentClosestKeyword;
  144602. };
  144603. convert2.keyword.rgb = function(keyword) {
  144604. return cssKeywords[keyword];
  144605. };
  144606. convert2.rgb.xyz = function(rgb) {
  144607. var r = rgb[0] / 255;
  144608. var g = rgb[1] / 255;
  144609. var b = rgb[2] / 255;
  144610. r = r > 0.04045 ? Math.pow((r + 0.055) / 1.055, 2.4) : r / 12.92;
  144611. g = g > 0.04045 ? Math.pow((g + 0.055) / 1.055, 2.4) : g / 12.92;
  144612. b = b > 0.04045 ? Math.pow((b + 0.055) / 1.055, 2.4) : b / 12.92;
  144613. var x = r * 0.4124 + g * 0.3576 + b * 0.1805;
  144614. var y = r * 0.2126 + g * 0.7152 + b * 0.0722;
  144615. var z = r * 0.0193 + g * 0.1192 + b * 0.9505;
  144616. return [x * 100, y * 100, z * 100];
  144617. };
  144618. convert2.rgb.lab = function(rgb) {
  144619. var xyz = convert2.rgb.xyz(rgb);
  144620. var x = xyz[0];
  144621. var y = xyz[1];
  144622. var z = xyz[2];
  144623. var l;
  144624. var a;
  144625. var b;
  144626. x /= 95.047;
  144627. y /= 100;
  144628. z /= 108.883;
  144629. x = x > 8856e-6 ? Math.pow(x, 1 / 3) : 7.787 * x + 16 / 116;
  144630. y = y > 8856e-6 ? Math.pow(y, 1 / 3) : 7.787 * y + 16 / 116;
  144631. z = z > 8856e-6 ? Math.pow(z, 1 / 3) : 7.787 * z + 16 / 116;
  144632. l = 116 * y - 16;
  144633. a = 500 * (x - y);
  144634. b = 200 * (y - z);
  144635. return [l, a, b];
  144636. };
  144637. convert2.hsl.rgb = function(hsl) {
  144638. var h = hsl[0] / 360;
  144639. var s = hsl[1] / 100;
  144640. var l = hsl[2] / 100;
  144641. var t1;
  144642. var t2;
  144643. var t3;
  144644. var rgb;
  144645. var val;
  144646. if (s === 0) {
  144647. val = l * 255;
  144648. return [val, val, val];
  144649. }
  144650. if (l < 0.5) {
  144651. t2 = l * (1 + s);
  144652. } else {
  144653. t2 = l + s - l * s;
  144654. }
  144655. t1 = 2 * l - t2;
  144656. rgb = [0, 0, 0];
  144657. for (var i = 0; i < 3; i++) {
  144658. t3 = h + 1 / 3 * -(i - 1);
  144659. if (t3 < 0) {
  144660. t3++;
  144661. }
  144662. if (t3 > 1) {
  144663. t3--;
  144664. }
  144665. if (6 * t3 < 1) {
  144666. val = t1 + (t2 - t1) * 6 * t3;
  144667. } else if (2 * t3 < 1) {
  144668. val = t2;
  144669. } else if (3 * t3 < 2) {
  144670. val = t1 + (t2 - t1) * (2 / 3 - t3) * 6;
  144671. } else {
  144672. val = t1;
  144673. }
  144674. rgb[i] = val * 255;
  144675. }
  144676. return rgb;
  144677. };
  144678. convert2.hsl.hsv = function(hsl) {
  144679. var h = hsl[0];
  144680. var s = hsl[1] / 100;
  144681. var l = hsl[2] / 100;
  144682. var smin = s;
  144683. var lmin = Math.max(l, 0.01);
  144684. var sv;
  144685. var v;
  144686. l *= 2;
  144687. s *= l <= 1 ? l : 2 - l;
  144688. smin *= lmin <= 1 ? lmin : 2 - lmin;
  144689. v = (l + s) / 2;
  144690. sv = l === 0 ? 2 * smin / (lmin + smin) : 2 * s / (l + s);
  144691. return [h, sv * 100, v * 100];
  144692. };
  144693. convert2.hsv.rgb = function(hsv) {
  144694. var h = hsv[0] / 60;
  144695. var s = hsv[1] / 100;
  144696. var v = hsv[2] / 100;
  144697. var hi = Math.floor(h) % 6;
  144698. var f = h - Math.floor(h);
  144699. var p = 255 * v * (1 - s);
  144700. var q = 255 * v * (1 - s * f);
  144701. var t2 = 255 * v * (1 - s * (1 - f));
  144702. v *= 255;
  144703. switch (hi) {
  144704. case 0:
  144705. return [v, t2, p];
  144706. case 1:
  144707. return [q, v, p];
  144708. case 2:
  144709. return [p, v, t2];
  144710. case 3:
  144711. return [p, q, v];
  144712. case 4:
  144713. return [t2, p, v];
  144714. case 5:
  144715. return [v, p, q];
  144716. }
  144717. };
  144718. convert2.hsv.hsl = function(hsv) {
  144719. var h = hsv[0];
  144720. var s = hsv[1] / 100;
  144721. var v = hsv[2] / 100;
  144722. var vmin = Math.max(v, 0.01);
  144723. var lmin;
  144724. var sl;
  144725. var l;
  144726. l = (2 - s) * v;
  144727. lmin = (2 - s) * vmin;
  144728. sl = s * vmin;
  144729. sl /= lmin <= 1 ? lmin : 2 - lmin;
  144730. sl = sl || 0;
  144731. l /= 2;
  144732. return [h, sl * 100, l * 100];
  144733. };
  144734. convert2.hwb.rgb = function(hwb) {
  144735. var h = hwb[0] / 360;
  144736. var wh = hwb[1] / 100;
  144737. var bl = hwb[2] / 100;
  144738. var ratio = wh + bl;
  144739. var i;
  144740. var v;
  144741. var f;
  144742. var n;
  144743. if (ratio > 1) {
  144744. wh /= ratio;
  144745. bl /= ratio;
  144746. }
  144747. i = Math.floor(6 * h);
  144748. v = 1 - bl;
  144749. f = 6 * h - i;
  144750. if ((i & 1) !== 0) {
  144751. f = 1 - f;
  144752. }
  144753. n = wh + f * (v - wh);
  144754. var r;
  144755. var g;
  144756. var b;
  144757. switch (i) {
  144758. default:
  144759. case 6:
  144760. case 0:
  144761. r = v;
  144762. g = n;
  144763. b = wh;
  144764. break;
  144765. case 1:
  144766. r = n;
  144767. g = v;
  144768. b = wh;
  144769. break;
  144770. case 2:
  144771. r = wh;
  144772. g = v;
  144773. b = n;
  144774. break;
  144775. case 3:
  144776. r = wh;
  144777. g = n;
  144778. b = v;
  144779. break;
  144780. case 4:
  144781. r = n;
  144782. g = wh;
  144783. b = v;
  144784. break;
  144785. case 5:
  144786. r = v;
  144787. g = wh;
  144788. b = n;
  144789. break;
  144790. }
  144791. return [r * 255, g * 255, b * 255];
  144792. };
  144793. convert2.cmyk.rgb = function(cmyk) {
  144794. var c = cmyk[0] / 100;
  144795. var m = cmyk[1] / 100;
  144796. var y = cmyk[2] / 100;
  144797. var k = cmyk[3] / 100;
  144798. var r;
  144799. var g;
  144800. var b;
  144801. r = 1 - Math.min(1, c * (1 - k) + k);
  144802. g = 1 - Math.min(1, m * (1 - k) + k);
  144803. b = 1 - Math.min(1, y * (1 - k) + k);
  144804. return [r * 255, g * 255, b * 255];
  144805. };
  144806. convert2.xyz.rgb = function(xyz) {
  144807. var x = xyz[0] / 100;
  144808. var y = xyz[1] / 100;
  144809. var z = xyz[2] / 100;
  144810. var r;
  144811. var g;
  144812. var b;
  144813. r = x * 3.2406 + y * -1.5372 + z * -0.4986;
  144814. g = x * -0.9689 + y * 1.8758 + z * 0.0415;
  144815. b = x * 0.0557 + y * -0.204 + z * 1.057;
  144816. r = r > 31308e-7 ? 1.055 * Math.pow(r, 1 / 2.4) - 0.055 : r * 12.92;
  144817. g = g > 31308e-7 ? 1.055 * Math.pow(g, 1 / 2.4) - 0.055 : g * 12.92;
  144818. b = b > 31308e-7 ? 1.055 * Math.pow(b, 1 / 2.4) - 0.055 : b * 12.92;
  144819. r = Math.min(Math.max(0, r), 1);
  144820. g = Math.min(Math.max(0, g), 1);
  144821. b = Math.min(Math.max(0, b), 1);
  144822. return [r * 255, g * 255, b * 255];
  144823. };
  144824. convert2.xyz.lab = function(xyz) {
  144825. var x = xyz[0];
  144826. var y = xyz[1];
  144827. var z = xyz[2];
  144828. var l;
  144829. var a;
  144830. var b;
  144831. x /= 95.047;
  144832. y /= 100;
  144833. z /= 108.883;
  144834. x = x > 8856e-6 ? Math.pow(x, 1 / 3) : 7.787 * x + 16 / 116;
  144835. y = y > 8856e-6 ? Math.pow(y, 1 / 3) : 7.787 * y + 16 / 116;
  144836. z = z > 8856e-6 ? Math.pow(z, 1 / 3) : 7.787 * z + 16 / 116;
  144837. l = 116 * y - 16;
  144838. a = 500 * (x - y);
  144839. b = 200 * (y - z);
  144840. return [l, a, b];
  144841. };
  144842. convert2.lab.xyz = function(lab) {
  144843. var l = lab[0];
  144844. var a = lab[1];
  144845. var b = lab[2];
  144846. var x;
  144847. var y;
  144848. var z;
  144849. y = (l + 16) / 116;
  144850. x = a / 500 + y;
  144851. z = y - b / 200;
  144852. var y2 = Math.pow(y, 3);
  144853. var x2 = Math.pow(x, 3);
  144854. var z2 = Math.pow(z, 3);
  144855. y = y2 > 8856e-6 ? y2 : (y - 16 / 116) / 7.787;
  144856. x = x2 > 8856e-6 ? x2 : (x - 16 / 116) / 7.787;
  144857. z = z2 > 8856e-6 ? z2 : (z - 16 / 116) / 7.787;
  144858. x *= 95.047;
  144859. y *= 100;
  144860. z *= 108.883;
  144861. return [x, y, z];
  144862. };
  144863. convert2.lab.lch = function(lab) {
  144864. var l = lab[0];
  144865. var a = lab[1];
  144866. var b = lab[2];
  144867. var hr;
  144868. var h;
  144869. var c;
  144870. hr = Math.atan2(b, a);
  144871. h = hr * 360 / 2 / Math.PI;
  144872. if (h < 0) {
  144873. h += 360;
  144874. }
  144875. c = Math.sqrt(a * a + b * b);
  144876. return [l, c, h];
  144877. };
  144878. convert2.lch.lab = function(lch) {
  144879. var l = lch[0];
  144880. var c = lch[1];
  144881. var h = lch[2];
  144882. var a;
  144883. var b;
  144884. var hr;
  144885. hr = h / 360 * 2 * Math.PI;
  144886. a = c * Math.cos(hr);
  144887. b = c * Math.sin(hr);
  144888. return [l, a, b];
  144889. };
  144890. convert2.rgb.ansi16 = function(args) {
  144891. var r = args[0];
  144892. var g = args[1];
  144893. var b = args[2];
  144894. var value = 1 in arguments ? arguments[1] : convert2.rgb.hsv(args)[2];
  144895. value = Math.round(value / 50);
  144896. if (value === 0) {
  144897. return 30;
  144898. }
  144899. var ansi = 30 + (Math.round(b / 255) << 2 | Math.round(g / 255) << 1 | Math.round(r / 255));
  144900. if (value === 2) {
  144901. ansi += 60;
  144902. }
  144903. return ansi;
  144904. };
  144905. convert2.hsv.ansi16 = function(args) {
  144906. return convert2.rgb.ansi16(convert2.hsv.rgb(args), args[2]);
  144907. };
  144908. convert2.rgb.ansi256 = function(args) {
  144909. var r = args[0];
  144910. var g = args[1];
  144911. var b = args[2];
  144912. if (r === g && g === b) {
  144913. if (r < 8) {
  144914. return 16;
  144915. }
  144916. if (r > 248) {
  144917. return 231;
  144918. }
  144919. return Math.round((r - 8) / 247 * 24) + 232;
  144920. }
  144921. var ansi = 16 + 36 * Math.round(r / 255 * 5) + 6 * Math.round(g / 255 * 5) + Math.round(b / 255 * 5);
  144922. return ansi;
  144923. };
  144924. convert2.ansi16.rgb = function(args) {
  144925. var color4 = args % 10;
  144926. if (color4 === 0 || color4 === 7) {
  144927. if (args > 50) {
  144928. color4 += 3.5;
  144929. }
  144930. color4 = color4 / 10.5 * 255;
  144931. return [color4, color4, color4];
  144932. }
  144933. var mult = (~~(args > 50) + 1) * 0.5;
  144934. var r = (color4 & 1) * mult * 255;
  144935. var g = (color4 >> 1 & 1) * mult * 255;
  144936. var b = (color4 >> 2 & 1) * mult * 255;
  144937. return [r, g, b];
  144938. };
  144939. convert2.ansi256.rgb = function(args) {
  144940. if (args >= 232) {
  144941. var c = (args - 232) * 10 + 8;
  144942. return [c, c, c];
  144943. }
  144944. args -= 16;
  144945. var rem;
  144946. var r = Math.floor(args / 36) / 5 * 255;
  144947. var g = Math.floor((rem = args % 36) / 6) / 5 * 255;
  144948. var b = rem % 6 / 5 * 255;
  144949. return [r, g, b];
  144950. };
  144951. convert2.rgb.hex = function(args) {
  144952. var integer = ((Math.round(args[0]) & 255) << 16) + ((Math.round(args[1]) & 255) << 8) + (Math.round(args[2]) & 255);
  144953. var string3 = integer.toString(16).toUpperCase();
  144954. return "000000".substring(string3.length) + string3;
  144955. };
  144956. convert2.hex.rgb = function(args) {
  144957. var match = args.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);
  144958. if (!match) {
  144959. return [0, 0, 0];
  144960. }
  144961. var colorString = match[0];
  144962. if (match[0].length === 3) {
  144963. colorString = colorString.split("").map(function(char) {
  144964. return char + char;
  144965. }).join("");
  144966. }
  144967. var integer = parseInt(colorString, 16);
  144968. var r = integer >> 16 & 255;
  144969. var g = integer >> 8 & 255;
  144970. var b = integer & 255;
  144971. return [r, g, b];
  144972. };
  144973. convert2.rgb.hcg = function(rgb) {
  144974. var r = rgb[0] / 255;
  144975. var g = rgb[1] / 255;
  144976. var b = rgb[2] / 255;
  144977. var max = Math.max(Math.max(r, g), b);
  144978. var min = Math.min(Math.min(r, g), b);
  144979. var chroma = max - min;
  144980. var grayscale;
  144981. var hue;
  144982. if (chroma < 1) {
  144983. grayscale = min / (1 - chroma);
  144984. } else {
  144985. grayscale = 0;
  144986. }
  144987. if (chroma <= 0) {
  144988. hue = 0;
  144989. } else if (max === r) {
  144990. hue = (g - b) / chroma % 6;
  144991. } else if (max === g) {
  144992. hue = 2 + (b - r) / chroma;
  144993. } else {
  144994. hue = 4 + (r - g) / chroma + 4;
  144995. }
  144996. hue /= 6;
  144997. hue %= 1;
  144998. return [hue * 360, chroma * 100, grayscale * 100];
  144999. };
  145000. convert2.hsl.hcg = function(hsl) {
  145001. var s = hsl[1] / 100;
  145002. var l = hsl[2] / 100;
  145003. var c = 1;
  145004. var f = 0;
  145005. if (l < 0.5) {
  145006. c = 2 * s * l;
  145007. } else {
  145008. c = 2 * s * (1 - l);
  145009. }
  145010. if (c < 1) {
  145011. f = (l - 0.5 * c) / (1 - c);
  145012. }
  145013. return [hsl[0], c * 100, f * 100];
  145014. };
  145015. convert2.hsv.hcg = function(hsv) {
  145016. var s = hsv[1] / 100;
  145017. var v = hsv[2] / 100;
  145018. var c = s * v;
  145019. var f = 0;
  145020. if (c < 1) {
  145021. f = (v - c) / (1 - c);
  145022. }
  145023. return [hsv[0], c * 100, f * 100];
  145024. };
  145025. convert2.hcg.rgb = function(hcg) {
  145026. var h = hcg[0] / 360;
  145027. var c = hcg[1] / 100;
  145028. var g = hcg[2] / 100;
  145029. if (c === 0) {
  145030. return [g * 255, g * 255, g * 255];
  145031. }
  145032. var pure = [0, 0, 0];
  145033. var hi = h % 1 * 6;
  145034. var v = hi % 1;
  145035. var w = 1 - v;
  145036. var mg = 0;
  145037. switch (Math.floor(hi)) {
  145038. case 0:
  145039. pure[0] = 1;
  145040. pure[1] = v;
  145041. pure[2] = 0;
  145042. break;
  145043. case 1:
  145044. pure[0] = w;
  145045. pure[1] = 1;
  145046. pure[2] = 0;
  145047. break;
  145048. case 2:
  145049. pure[0] = 0;
  145050. pure[1] = 1;
  145051. pure[2] = v;
  145052. break;
  145053. case 3:
  145054. pure[0] = 0;
  145055. pure[1] = w;
  145056. pure[2] = 1;
  145057. break;
  145058. case 4:
  145059. pure[0] = v;
  145060. pure[1] = 0;
  145061. pure[2] = 1;
  145062. break;
  145063. default:
  145064. pure[0] = 1;
  145065. pure[1] = 0;
  145066. pure[2] = w;
  145067. }
  145068. mg = (1 - c) * g;
  145069. return [
  145070. (c * pure[0] + mg) * 255,
  145071. (c * pure[1] + mg) * 255,
  145072. (c * pure[2] + mg) * 255
  145073. ];
  145074. };
  145075. convert2.hcg.hsv = function(hcg) {
  145076. var c = hcg[1] / 100;
  145077. var g = hcg[2] / 100;
  145078. var v = c + g * (1 - c);
  145079. var f = 0;
  145080. if (v > 0) {
  145081. f = c / v;
  145082. }
  145083. return [hcg[0], f * 100, v * 100];
  145084. };
  145085. convert2.hcg.hsl = function(hcg) {
  145086. var c = hcg[1] / 100;
  145087. var g = hcg[2] / 100;
  145088. var l = g * (1 - c) + 0.5 * c;
  145089. var s = 0;
  145090. if (l > 0 && l < 0.5) {
  145091. s = c / (2 * l);
  145092. } else if (l >= 0.5 && l < 1) {
  145093. s = c / (2 * (1 - l));
  145094. }
  145095. return [hcg[0], s * 100, l * 100];
  145096. };
  145097. convert2.hcg.hwb = function(hcg) {
  145098. var c = hcg[1] / 100;
  145099. var g = hcg[2] / 100;
  145100. var v = c + g * (1 - c);
  145101. return [hcg[0], (v - c) * 100, (1 - v) * 100];
  145102. };
  145103. convert2.hwb.hcg = function(hwb) {
  145104. var w = hwb[1] / 100;
  145105. var b = hwb[2] / 100;
  145106. var v = 1 - b;
  145107. var c = v - w;
  145108. var g = 0;
  145109. if (c < 1) {
  145110. g = (v - c) / (1 - c);
  145111. }
  145112. return [hwb[0], c * 100, g * 100];
  145113. };
  145114. convert2.apple.rgb = function(apple) {
  145115. return [apple[0] / 65535 * 255, apple[1] / 65535 * 255, apple[2] / 65535 * 255];
  145116. };
  145117. convert2.rgb.apple = function(rgb) {
  145118. return [rgb[0] / 255 * 65535, rgb[1] / 255 * 65535, rgb[2] / 255 * 65535];
  145119. };
  145120. convert2.gray.rgb = function(args) {
  145121. return [args[0] / 100 * 255, args[0] / 100 * 255, args[0] / 100 * 255];
  145122. };
  145123. convert2.gray.hsl = convert2.gray.hsv = function(args) {
  145124. return [0, 0, args[0]];
  145125. };
  145126. convert2.gray.hwb = function(gray) {
  145127. return [0, 100, gray[0]];
  145128. };
  145129. convert2.gray.cmyk = function(gray) {
  145130. return [0, 0, 0, gray[0]];
  145131. };
  145132. convert2.gray.lab = function(gray) {
  145133. return [gray[0], 0, 0];
  145134. };
  145135. convert2.gray.hex = function(gray) {
  145136. var val = Math.round(gray[0] / 100 * 255) & 255;
  145137. var integer = (val << 16) + (val << 8) + val;
  145138. var string3 = integer.toString(16).toUpperCase();
  145139. return "000000".substring(string3.length) + string3;
  145140. };
  145141. convert2.rgb.gray = function(rgb) {
  145142. var val = (rgb[0] + rgb[1] + rgb[2]) / 3;
  145143. return [val / 255 * 100];
  145144. };
  145145. }
  145146. });
  145147. // node_modules/@babel/template/node_modules/color-convert/route.js
  145148. var require_route3 = __commonJS({
  145149. "node_modules/@babel/template/node_modules/color-convert/route.js"(exports, module) {
  145150. var conversions = require_conversions3();
  145151. function buildGraph() {
  145152. var graph = {};
  145153. var models = Object.keys(conversions);
  145154. for (var len = models.length, i = 0; i < len; i++) {
  145155. graph[models[i]] = {
  145156. distance: -1,
  145157. parent: null
  145158. };
  145159. }
  145160. return graph;
  145161. }
  145162. function deriveBFS(fromModel) {
  145163. var graph = buildGraph();
  145164. var queue = [fromModel];
  145165. graph[fromModel].distance = 0;
  145166. while (queue.length) {
  145167. var current2 = queue.pop();
  145168. var adjacents = Object.keys(conversions[current2]);
  145169. for (var len = adjacents.length, i = 0; i < len; i++) {
  145170. var adjacent = adjacents[i];
  145171. var node = graph[adjacent];
  145172. if (node.distance === -1) {
  145173. node.distance = graph[current2].distance + 1;
  145174. node.parent = current2;
  145175. queue.unshift(adjacent);
  145176. }
  145177. }
  145178. }
  145179. return graph;
  145180. }
  145181. function link2(from, to) {
  145182. return function(args) {
  145183. return to(from(args));
  145184. };
  145185. }
  145186. function wrapConversion(toModel, graph) {
  145187. var path = [graph[toModel].parent, toModel];
  145188. var fn = conversions[graph[toModel].parent][toModel];
  145189. var cur = graph[toModel].parent;
  145190. while (graph[cur].parent) {
  145191. path.unshift(graph[cur].parent);
  145192. fn = link2(conversions[graph[cur].parent][cur], fn);
  145193. cur = graph[cur].parent;
  145194. }
  145195. fn.conversion = path;
  145196. return fn;
  145197. }
  145198. module.exports = function(fromModel) {
  145199. var graph = deriveBFS(fromModel);
  145200. var conversion = {};
  145201. var models = Object.keys(graph);
  145202. for (var len = models.length, i = 0; i < len; i++) {
  145203. var toModel = models[i];
  145204. var node = graph[toModel];
  145205. if (node.parent === null) {
  145206. continue;
  145207. }
  145208. conversion[toModel] = wrapConversion(toModel, graph);
  145209. }
  145210. return conversion;
  145211. };
  145212. }
  145213. });
  145214. // node_modules/@babel/template/node_modules/color-convert/index.js
  145215. var require_color_convert3 = __commonJS({
  145216. "node_modules/@babel/template/node_modules/color-convert/index.js"(exports, module) {
  145217. var conversions = require_conversions3();
  145218. var route = require_route3();
  145219. var convert2 = {};
  145220. var models = Object.keys(conversions);
  145221. function wrapRaw(fn) {
  145222. var wrappedFn = function(args) {
  145223. if (args === void 0 || args === null) {
  145224. return args;
  145225. }
  145226. if (arguments.length > 1) {
  145227. args = Array.prototype.slice.call(arguments);
  145228. }
  145229. return fn(args);
  145230. };
  145231. if ("conversion" in fn) {
  145232. wrappedFn.conversion = fn.conversion;
  145233. }
  145234. return wrappedFn;
  145235. }
  145236. function wrapRounded(fn) {
  145237. var wrappedFn = function(args) {
  145238. if (args === void 0 || args === null) {
  145239. return args;
  145240. }
  145241. if (arguments.length > 1) {
  145242. args = Array.prototype.slice.call(arguments);
  145243. }
  145244. var result = fn(args);
  145245. if (typeof result === "object") {
  145246. for (var len = result.length, i = 0; i < len; i++) {
  145247. result[i] = Math.round(result[i]);
  145248. }
  145249. }
  145250. return result;
  145251. };
  145252. if ("conversion" in fn) {
  145253. wrappedFn.conversion = fn.conversion;
  145254. }
  145255. return wrappedFn;
  145256. }
  145257. models.forEach(function(fromModel) {
  145258. convert2[fromModel] = {};
  145259. Object.defineProperty(convert2[fromModel], "channels", { value: conversions[fromModel].channels });
  145260. Object.defineProperty(convert2[fromModel], "labels", { value: conversions[fromModel].labels });
  145261. var routes = route(fromModel);
  145262. var routeModels = Object.keys(routes);
  145263. routeModels.forEach(function(toModel) {
  145264. var fn = routes[toModel];
  145265. convert2[fromModel][toModel] = wrapRounded(fn);
  145266. convert2[fromModel][toModel].raw = wrapRaw(fn);
  145267. });
  145268. });
  145269. module.exports = convert2;
  145270. }
  145271. });
  145272. // node_modules/@babel/template/node_modules/ansi-styles/index.js
  145273. var require_ansi_styles3 = __commonJS({
  145274. "node_modules/@babel/template/node_modules/ansi-styles/index.js"(exports, module) {
  145275. "use strict";
  145276. var colorConvert = require_color_convert3();
  145277. var wrapAnsi16 = (fn, offset2) => function() {
  145278. const code2 = fn.apply(colorConvert, arguments);
  145279. return `\x1B[${code2 + offset2}m`;
  145280. };
  145281. var wrapAnsi256 = (fn, offset2) => function() {
  145282. const code2 = fn.apply(colorConvert, arguments);
  145283. return `\x1B[${38 + offset2};5;${code2}m`;
  145284. };
  145285. var wrapAnsi16m = (fn, offset2) => function() {
  145286. const rgb = fn.apply(colorConvert, arguments);
  145287. return `\x1B[${38 + offset2};2;${rgb[0]};${rgb[1]};${rgb[2]}m`;
  145288. };
  145289. function assembleStyles() {
  145290. const codes = /* @__PURE__ */ new Map();
  145291. const styles = {
  145292. modifier: {
  145293. reset: [0, 0],
  145294. bold: [1, 22],
  145295. dim: [2, 22],
  145296. italic: [3, 23],
  145297. underline: [4, 24],
  145298. inverse: [7, 27],
  145299. hidden: [8, 28],
  145300. strikethrough: [9, 29]
  145301. },
  145302. color: {
  145303. black: [30, 39],
  145304. red: [31, 39],
  145305. green: [32, 39],
  145306. yellow: [33, 39],
  145307. blue: [34, 39],
  145308. magenta: [35, 39],
  145309. cyan: [36, 39],
  145310. white: [37, 39],
  145311. gray: [90, 39],
  145312. redBright: [91, 39],
  145313. greenBright: [92, 39],
  145314. yellowBright: [93, 39],
  145315. blueBright: [94, 39],
  145316. magentaBright: [95, 39],
  145317. cyanBright: [96, 39],
  145318. whiteBright: [97, 39]
  145319. },
  145320. bgColor: {
  145321. bgBlack: [40, 49],
  145322. bgRed: [41, 49],
  145323. bgGreen: [42, 49],
  145324. bgYellow: [43, 49],
  145325. bgBlue: [44, 49],
  145326. bgMagenta: [45, 49],
  145327. bgCyan: [46, 49],
  145328. bgWhite: [47, 49],
  145329. bgBlackBright: [100, 49],
  145330. bgRedBright: [101, 49],
  145331. bgGreenBright: [102, 49],
  145332. bgYellowBright: [103, 49],
  145333. bgBlueBright: [104, 49],
  145334. bgMagentaBright: [105, 49],
  145335. bgCyanBright: [106, 49],
  145336. bgWhiteBright: [107, 49]
  145337. }
  145338. };
  145339. styles.color.grey = styles.color.gray;
  145340. for (const groupName of Object.keys(styles)) {
  145341. const group = styles[groupName];
  145342. for (const styleName of Object.keys(group)) {
  145343. const style2 = group[styleName];
  145344. styles[styleName] = {
  145345. open: `\x1B[${style2[0]}m`,
  145346. close: `\x1B[${style2[1]}m`
  145347. };
  145348. group[styleName] = styles[styleName];
  145349. codes.set(style2[0], style2[1]);
  145350. }
  145351. Object.defineProperty(styles, groupName, {
  145352. value: group,
  145353. enumerable: false
  145354. });
  145355. Object.defineProperty(styles, "codes", {
  145356. value: codes,
  145357. enumerable: false
  145358. });
  145359. }
  145360. const ansi2ansi = (n) => n;
  145361. const rgb2rgb = (r, g, b) => [r, g, b];
  145362. styles.color.close = "\x1B[39m";
  145363. styles.bgColor.close = "\x1B[49m";
  145364. styles.color.ansi = {
  145365. ansi: wrapAnsi16(ansi2ansi, 0)
  145366. };
  145367. styles.color.ansi256 = {
  145368. ansi256: wrapAnsi256(ansi2ansi, 0)
  145369. };
  145370. styles.color.ansi16m = {
  145371. rgb: wrapAnsi16m(rgb2rgb, 0)
  145372. };
  145373. styles.bgColor.ansi = {
  145374. ansi: wrapAnsi16(ansi2ansi, 10)
  145375. };
  145376. styles.bgColor.ansi256 = {
  145377. ansi256: wrapAnsi256(ansi2ansi, 10)
  145378. };
  145379. styles.bgColor.ansi16m = {
  145380. rgb: wrapAnsi16m(rgb2rgb, 10)
  145381. };
  145382. for (let key of Object.keys(colorConvert)) {
  145383. if (typeof colorConvert[key] !== "object") {
  145384. continue;
  145385. }
  145386. const suite = colorConvert[key];
  145387. if (key === "ansi16") {
  145388. key = "ansi";
  145389. }
  145390. if ("ansi16" in suite) {
  145391. styles.color.ansi[key] = wrapAnsi16(suite.ansi16, 0);
  145392. styles.bgColor.ansi[key] = wrapAnsi16(suite.ansi16, 10);
  145393. }
  145394. if ("ansi256" in suite) {
  145395. styles.color.ansi256[key] = wrapAnsi256(suite.ansi256, 0);
  145396. styles.bgColor.ansi256[key] = wrapAnsi256(suite.ansi256, 10);
  145397. }
  145398. if ("rgb" in suite) {
  145399. styles.color.ansi16m[key] = wrapAnsi16m(suite.rgb, 0);
  145400. styles.bgColor.ansi16m[key] = wrapAnsi16m(suite.rgb, 10);
  145401. }
  145402. }
  145403. return styles;
  145404. }
  145405. Object.defineProperty(module, "exports", {
  145406. enumerable: true,
  145407. get: assembleStyles
  145408. });
  145409. }
  145410. });
  145411. // node_modules/@babel/template/node_modules/has-flag/index.js
  145412. var require_has_flag4 = __commonJS({
  145413. "node_modules/@babel/template/node_modules/has-flag/index.js"(exports, module) {
  145414. "use strict";
  145415. module.exports = (flag, argv) => {
  145416. argv = argv || process.argv;
  145417. const prefix = flag.startsWith("-") ? "" : flag.length === 1 ? "-" : "--";
  145418. const pos = argv.indexOf(prefix + flag);
  145419. const terminatorPos = argv.indexOf("--");
  145420. return pos !== -1 && (terminatorPos === -1 ? true : pos < terminatorPos);
  145421. };
  145422. }
  145423. });
  145424. // node_modules/@babel/template/node_modules/supports-color/index.js
  145425. var require_supports_color4 = __commonJS({
  145426. "node_modules/@babel/template/node_modules/supports-color/index.js"(exports, module) {
  145427. "use strict";
  145428. var os = __require("os");
  145429. var hasFlag = require_has_flag4();
  145430. var env = process.env;
  145431. var forceColor;
  145432. if (hasFlag("no-color") || hasFlag("no-colors") || hasFlag("color=false")) {
  145433. forceColor = false;
  145434. } else if (hasFlag("color") || hasFlag("colors") || hasFlag("color=true") || hasFlag("color=always")) {
  145435. forceColor = true;
  145436. }
  145437. if ("FORCE_COLOR" in env) {
  145438. forceColor = env.FORCE_COLOR.length === 0 || parseInt(env.FORCE_COLOR, 10) !== 0;
  145439. }
  145440. function translateLevel(level) {
  145441. if (level === 0) {
  145442. return false;
  145443. }
  145444. return {
  145445. level,
  145446. hasBasic: true,
  145447. has256: level >= 2,
  145448. has16m: level >= 3
  145449. };
  145450. }
  145451. function supportsColor(stream) {
  145452. if (forceColor === false) {
  145453. return 0;
  145454. }
  145455. if (hasFlag("color=16m") || hasFlag("color=full") || hasFlag("color=truecolor")) {
  145456. return 3;
  145457. }
  145458. if (hasFlag("color=256")) {
  145459. return 2;
  145460. }
  145461. if (stream && !stream.isTTY && forceColor !== true) {
  145462. return 0;
  145463. }
  145464. const min = forceColor ? 1 : 0;
  145465. if (process.platform === "win32") {
  145466. const osRelease = os.release().split(".");
  145467. if (Number(process.versions.node.split(".")[0]) >= 8 && Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) {
  145468. return Number(osRelease[2]) >= 14931 ? 3 : 2;
  145469. }
  145470. return 1;
  145471. }
  145472. if ("CI" in env) {
  145473. if (["TRAVIS", "CIRCLECI", "APPVEYOR", "GITLAB_CI"].some((sign) => sign in env) || env.CI_NAME === "codeship") {
  145474. return 1;
  145475. }
  145476. return min;
  145477. }
  145478. if ("TEAMCITY_VERSION" in env) {
  145479. return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env.TEAMCITY_VERSION) ? 1 : 0;
  145480. }
  145481. if (env.COLORTERM === "truecolor") {
  145482. return 3;
  145483. }
  145484. if ("TERM_PROGRAM" in env) {
  145485. const version2 = parseInt((env.TERM_PROGRAM_VERSION || "").split(".")[0], 10);
  145486. switch (env.TERM_PROGRAM) {
  145487. case "iTerm.app":
  145488. return version2 >= 3 ? 3 : 2;
  145489. case "Apple_Terminal":
  145490. return 2;
  145491. }
  145492. }
  145493. if (/-256(color)?$/i.test(env.TERM)) {
  145494. return 2;
  145495. }
  145496. if (/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(env.TERM)) {
  145497. return 1;
  145498. }
  145499. if ("COLORTERM" in env) {
  145500. return 1;
  145501. }
  145502. if (env.TERM === "dumb") {
  145503. return min;
  145504. }
  145505. return min;
  145506. }
  145507. function getSupportLevel(stream) {
  145508. const level = supportsColor(stream);
  145509. return translateLevel(level);
  145510. }
  145511. module.exports = {
  145512. supportsColor: getSupportLevel,
  145513. stdout: getSupportLevel(process.stdout),
  145514. stderr: getSupportLevel(process.stderr)
  145515. };
  145516. }
  145517. });
  145518. // node_modules/@babel/template/node_modules/chalk/templates.js
  145519. var require_templates3 = __commonJS({
  145520. "node_modules/@babel/template/node_modules/chalk/templates.js"(exports, module) {
  145521. "use strict";
  145522. var TEMPLATE_REGEX = /(?:\\(u[a-f\d]{4}|x[a-f\d]{2}|.))|(?:\{(~)?(\w+(?:\([^)]*\))?(?:\.\w+(?:\([^)]*\))?)*)(?:[ \t]|(?=\r?\n)))|(\})|((?:.|[\r\n\f])+?)/gi;
  145523. var STYLE_REGEX = /(?:^|\.)(\w+)(?:\(([^)]*)\))?/g;
  145524. var STRING_REGEX = /^(['"])((?:\\.|(?!\1)[^\\])*)\1$/;
  145525. var ESCAPE_REGEX = /\\(u[a-f\d]{4}|x[a-f\d]{2}|.)|([^\\])/gi;
  145526. var ESCAPES = /* @__PURE__ */ new Map([
  145527. ["n", "\n"],
  145528. ["r", "\r"],
  145529. ["t", " "],
  145530. ["b", "\b"],
  145531. ["f", "\f"],
  145532. ["v", "\v"],
  145533. ["0", "\0"],
  145534. ["\\", "\\"],
  145535. ["e", "\x1B"],
  145536. ["a", "\x07"]
  145537. ]);
  145538. function unescape(c) {
  145539. if (c[0] === "u" && c.length === 5 || c[0] === "x" && c.length === 3) {
  145540. return String.fromCharCode(parseInt(c.slice(1), 16));
  145541. }
  145542. return ESCAPES.get(c) || c;
  145543. }
  145544. function parseArguments(name2, args) {
  145545. const results = [];
  145546. const chunks = args.trim().split(/\s*,\s*/g);
  145547. let matches;
  145548. for (const chunk of chunks) {
  145549. if (!isNaN(chunk)) {
  145550. results.push(Number(chunk));
  145551. } else if (matches = chunk.match(STRING_REGEX)) {
  145552. results.push(matches[2].replace(ESCAPE_REGEX, (m, escape, chr) => escape ? unescape(escape) : chr));
  145553. } else {
  145554. throw new Error(`Invalid Chalk template style argument: ${chunk} (in style '${name2}')`);
  145555. }
  145556. }
  145557. return results;
  145558. }
  145559. function parseStyle2(style2) {
  145560. STYLE_REGEX.lastIndex = 0;
  145561. const results = [];
  145562. let matches;
  145563. while ((matches = STYLE_REGEX.exec(style2)) !== null) {
  145564. const name2 = matches[1];
  145565. if (matches[2]) {
  145566. const args = parseArguments(name2, matches[2]);
  145567. results.push([name2].concat(args));
  145568. } else {
  145569. results.push([name2]);
  145570. }
  145571. }
  145572. return results;
  145573. }
  145574. function buildStyle(chalk, styles) {
  145575. const enabled = {};
  145576. for (const layer of styles) {
  145577. for (const style2 of layer.styles) {
  145578. enabled[style2[0]] = layer.inverse ? null : style2.slice(1);
  145579. }
  145580. }
  145581. let current2 = chalk;
  145582. for (const styleName of Object.keys(enabled)) {
  145583. if (Array.isArray(enabled[styleName])) {
  145584. if (!(styleName in current2)) {
  145585. throw new Error(`Unknown Chalk style: ${styleName}`);
  145586. }
  145587. if (enabled[styleName].length > 0) {
  145588. current2 = current2[styleName].apply(current2, enabled[styleName]);
  145589. } else {
  145590. current2 = current2[styleName];
  145591. }
  145592. }
  145593. }
  145594. return current2;
  145595. }
  145596. module.exports = (chalk, tmp) => {
  145597. const styles = [];
  145598. const chunks = [];
  145599. let chunk = [];
  145600. tmp.replace(TEMPLATE_REGEX, (m, escapeChar, inverse, style2, close, chr) => {
  145601. if (escapeChar) {
  145602. chunk.push(unescape(escapeChar));
  145603. } else if (style2) {
  145604. const str = chunk.join("");
  145605. chunk = [];
  145606. chunks.push(styles.length === 0 ? str : buildStyle(chalk, styles)(str));
  145607. styles.push({ inverse, styles: parseStyle2(style2) });
  145608. } else if (close) {
  145609. if (styles.length === 0) {
  145610. throw new Error("Found extraneous } in Chalk template literal");
  145611. }
  145612. chunks.push(buildStyle(chalk, styles)(chunk.join("")));
  145613. chunk = [];
  145614. styles.pop();
  145615. } else {
  145616. chunk.push(chr);
  145617. }
  145618. });
  145619. chunks.push(chunk.join(""));
  145620. if (styles.length > 0) {
  145621. const errMsg = `Chalk template literal is missing ${styles.length} closing bracket${styles.length === 1 ? "" : "s"} (\`}\`)`;
  145622. throw new Error(errMsg);
  145623. }
  145624. return chunks.join("");
  145625. };
  145626. }
  145627. });
  145628. // node_modules/@babel/template/node_modules/chalk/index.js
  145629. var require_chalk3 = __commonJS({
  145630. "node_modules/@babel/template/node_modules/chalk/index.js"(exports, module) {
  145631. "use strict";
  145632. var escapeStringRegexp = require_escape_string_regexp();
  145633. var ansiStyles = require_ansi_styles3();
  145634. var stdoutColor = require_supports_color4().stdout;
  145635. var template = require_templates3();
  145636. var isSimpleWindowsTerm = process.platform === "win32" && !(process.env.TERM || "").toLowerCase().startsWith("xterm");
  145637. var levelMapping = ["ansi", "ansi", "ansi256", "ansi16m"];
  145638. var skipModels = /* @__PURE__ */ new Set(["gray"]);
  145639. var styles = /* @__PURE__ */ Object.create(null);
  145640. function applyOptions(obj, options) {
  145641. options = options || {};
  145642. const scLevel = stdoutColor ? stdoutColor.level : 0;
  145643. obj.level = options.level === void 0 ? scLevel : options.level;
  145644. obj.enabled = "enabled" in options ? options.enabled : obj.level > 0;
  145645. }
  145646. function Chalk(options) {
  145647. if (!this || !(this instanceof Chalk) || this.template) {
  145648. const chalk = {};
  145649. applyOptions(chalk, options);
  145650. chalk.template = function() {
  145651. const args = [].slice.call(arguments);
  145652. return chalkTag.apply(null, [chalk.template].concat(args));
  145653. };
  145654. Object.setPrototypeOf(chalk, Chalk.prototype);
  145655. Object.setPrototypeOf(chalk.template, chalk);
  145656. chalk.template.constructor = Chalk;
  145657. return chalk.template;
  145658. }
  145659. applyOptions(this, options);
  145660. }
  145661. if (isSimpleWindowsTerm) {
  145662. ansiStyles.blue.open = "\x1B[94m";
  145663. }
  145664. for (const key of Object.keys(ansiStyles)) {
  145665. ansiStyles[key].closeRe = new RegExp(escapeStringRegexp(ansiStyles[key].close), "g");
  145666. styles[key] = {
  145667. get() {
  145668. const codes = ansiStyles[key];
  145669. return build.call(this, this._styles ? this._styles.concat(codes) : [codes], this._empty, key);
  145670. }
  145671. };
  145672. }
  145673. styles.visible = {
  145674. get() {
  145675. return build.call(this, this._styles || [], true, "visible");
  145676. }
  145677. };
  145678. ansiStyles.color.closeRe = new RegExp(escapeStringRegexp(ansiStyles.color.close), "g");
  145679. for (const model of Object.keys(ansiStyles.color.ansi)) {
  145680. if (skipModels.has(model)) {
  145681. continue;
  145682. }
  145683. styles[model] = {
  145684. get() {
  145685. const level = this.level;
  145686. return function() {
  145687. const open = ansiStyles.color[levelMapping[level]][model].apply(null, arguments);
  145688. const codes = {
  145689. open,
  145690. close: ansiStyles.color.close,
  145691. closeRe: ansiStyles.color.closeRe
  145692. };
  145693. return build.call(this, this._styles ? this._styles.concat(codes) : [codes], this._empty, model);
  145694. };
  145695. }
  145696. };
  145697. }
  145698. ansiStyles.bgColor.closeRe = new RegExp(escapeStringRegexp(ansiStyles.bgColor.close), "g");
  145699. for (const model of Object.keys(ansiStyles.bgColor.ansi)) {
  145700. if (skipModels.has(model)) {
  145701. continue;
  145702. }
  145703. const bgModel = "bg" + model[0].toUpperCase() + model.slice(1);
  145704. styles[bgModel] = {
  145705. get() {
  145706. const level = this.level;
  145707. return function() {
  145708. const open = ansiStyles.bgColor[levelMapping[level]][model].apply(null, arguments);
  145709. const codes = {
  145710. open,
  145711. close: ansiStyles.bgColor.close,
  145712. closeRe: ansiStyles.bgColor.closeRe
  145713. };
  145714. return build.call(this, this._styles ? this._styles.concat(codes) : [codes], this._empty, model);
  145715. };
  145716. }
  145717. };
  145718. }
  145719. var proto = Object.defineProperties(() => {
  145720. }, styles);
  145721. function build(_styles, _empty, key) {
  145722. const builder = function() {
  145723. return applyStyle.apply(builder, arguments);
  145724. };
  145725. builder._styles = _styles;
  145726. builder._empty = _empty;
  145727. const self2 = this;
  145728. Object.defineProperty(builder, "level", {
  145729. enumerable: true,
  145730. get() {
  145731. return self2.level;
  145732. },
  145733. set(level) {
  145734. self2.level = level;
  145735. }
  145736. });
  145737. Object.defineProperty(builder, "enabled", {
  145738. enumerable: true,
  145739. get() {
  145740. return self2.enabled;
  145741. },
  145742. set(enabled) {
  145743. self2.enabled = enabled;
  145744. }
  145745. });
  145746. builder.hasGrey = this.hasGrey || key === "gray" || key === "grey";
  145747. builder.__proto__ = proto;
  145748. return builder;
  145749. }
  145750. function applyStyle() {
  145751. const args = arguments;
  145752. const argsLen = args.length;
  145753. let str = String(arguments[0]);
  145754. if (argsLen === 0) {
  145755. return "";
  145756. }
  145757. if (argsLen > 1) {
  145758. for (let a = 1; a < argsLen; a++) {
  145759. str += " " + args[a];
  145760. }
  145761. }
  145762. if (!this.enabled || this.level <= 0 || !str) {
  145763. return this._empty ? "" : str;
  145764. }
  145765. const originalDim = ansiStyles.dim.open;
  145766. if (isSimpleWindowsTerm && this.hasGrey) {
  145767. ansiStyles.dim.open = "";
  145768. }
  145769. for (const code2 of this._styles.slice().reverse()) {
  145770. str = code2.open + str.replace(code2.closeRe, code2.open) + code2.close;
  145771. str = str.replace(/\r?\n/g, `${code2.close}$&${code2.open}`);
  145772. }
  145773. ansiStyles.dim.open = originalDim;
  145774. return str;
  145775. }
  145776. function chalkTag(chalk, strings) {
  145777. if (!Array.isArray(strings)) {
  145778. return [].slice.call(arguments, 1).join(" ");
  145779. }
  145780. const args = [].slice.call(arguments, 2);
  145781. const parts = [strings.raw[0]];
  145782. for (let i = 1; i < strings.length; i++) {
  145783. parts.push(String(args[i - 1]).replace(/[{}\\]/g, "\\$&"));
  145784. parts.push(String(strings.raw[i]));
  145785. }
  145786. return template(chalk, parts.join(""));
  145787. }
  145788. Object.defineProperties(Chalk.prototype, styles);
  145789. module.exports = Chalk();
  145790. module.exports.supportsColor = stdoutColor;
  145791. module.exports.default = module.exports;
  145792. }
  145793. });
  145794. // node_modules/@babel/template/node_modules/@babel/highlight/lib/index.js
  145795. var require_lib32 = __commonJS({
  145796. "node_modules/@babel/template/node_modules/@babel/highlight/lib/index.js"(exports) {
  145797. "use strict";
  145798. Object.defineProperty(exports, "__esModule", {
  145799. value: true
  145800. });
  145801. exports.shouldHighlight = shouldHighlight;
  145802. exports.getChalk = getChalk;
  145803. exports.default = highlight;
  145804. var _jsTokens = require_js_tokens();
  145805. var _helperValidatorIdentifier = require_lib29();
  145806. var _chalk = require_chalk3();
  145807. var sometimesKeywords = /* @__PURE__ */ new Set(["as", "async", "from", "get", "of", "set"]);
  145808. function getDefs(chalk) {
  145809. return {
  145810. keyword: chalk.cyan,
  145811. capitalized: chalk.yellow,
  145812. jsxIdentifier: chalk.yellow,
  145813. punctuator: chalk.yellow,
  145814. number: chalk.magenta,
  145815. string: chalk.green,
  145816. regex: chalk.magenta,
  145817. comment: chalk.grey,
  145818. invalid: chalk.white.bgRed.bold
  145819. };
  145820. }
  145821. var NEWLINE = /\r\n|[\n\r\u2028\u2029]/;
  145822. var BRACKET = /^[()[\]{}]$/;
  145823. var tokenize;
  145824. {
  145825. const JSX_TAG = /^[a-z][\w-]*$/i;
  145826. const getTokenType = function(token, offset2, text5) {
  145827. if (token.type === "name") {
  145828. if ((0, _helperValidatorIdentifier.isKeyword)(token.value) || (0, _helperValidatorIdentifier.isStrictReservedWord)(token.value, true) || sometimesKeywords.has(token.value)) {
  145829. return "keyword";
  145830. }
  145831. if (JSX_TAG.test(token.value) && (text5[offset2 - 1] === "<" || text5.substr(offset2 - 2, 2) == "</")) {
  145832. return "jsxIdentifier";
  145833. }
  145834. if (token.value[0] !== token.value[0].toLowerCase()) {
  145835. return "capitalized";
  145836. }
  145837. }
  145838. if (token.type === "punctuator" && BRACKET.test(token.value)) {
  145839. return "bracket";
  145840. }
  145841. if (token.type === "invalid" && (token.value === "@" || token.value === "#")) {
  145842. return "punctuator";
  145843. }
  145844. return token.type;
  145845. };
  145846. tokenize = function* (text5) {
  145847. let match;
  145848. while (match = _jsTokens.default.exec(text5)) {
  145849. const token = _jsTokens.matchToToken(match);
  145850. yield {
  145851. type: getTokenType(token, match.index, text5),
  145852. value: token.value
  145853. };
  145854. }
  145855. };
  145856. }
  145857. function highlightTokens(defs, text5) {
  145858. let highlighted = "";
  145859. for (const {
  145860. type,
  145861. value
  145862. } of tokenize(text5)) {
  145863. const colorize = defs[type];
  145864. if (colorize) {
  145865. highlighted += value.split(NEWLINE).map((str) => colorize(str)).join("\n");
  145866. } else {
  145867. highlighted += value;
  145868. }
  145869. }
  145870. return highlighted;
  145871. }
  145872. function shouldHighlight(options) {
  145873. return !!_chalk.supportsColor || options.forceColor;
  145874. }
  145875. function getChalk(options) {
  145876. return options.forceColor ? new _chalk.constructor({
  145877. enabled: true,
  145878. level: 1
  145879. }) : _chalk;
  145880. }
  145881. function highlight(code2, options = {}) {
  145882. if (shouldHighlight(options)) {
  145883. const chalk = getChalk(options);
  145884. const defs = getDefs(chalk);
  145885. return highlightTokens(defs, code2);
  145886. } else {
  145887. return code2;
  145888. }
  145889. }
  145890. }
  145891. });
  145892. // node_modules/@babel/template/node_modules/@babel/code-frame/lib/index.js
  145893. var require_lib33 = __commonJS({
  145894. "node_modules/@babel/template/node_modules/@babel/code-frame/lib/index.js"(exports) {
  145895. "use strict";
  145896. Object.defineProperty(exports, "__esModule", {
  145897. value: true
  145898. });
  145899. exports.codeFrameColumns = codeFrameColumns;
  145900. exports.default = _default;
  145901. var _highlight = require_lib32();
  145902. var deprecationWarningShown = false;
  145903. function getDefs(chalk) {
  145904. return {
  145905. gutter: chalk.grey,
  145906. marker: chalk.red.bold,
  145907. message: chalk.red.bold
  145908. };
  145909. }
  145910. var NEWLINE = /\r\n|[\n\r\u2028\u2029]/;
  145911. function getMarkerLines(loc, source, opts) {
  145912. const startLoc = Object.assign({
  145913. column: 0,
  145914. line: -1
  145915. }, loc.start);
  145916. const endLoc = Object.assign({}, startLoc, loc.end);
  145917. const {
  145918. linesAbove = 2,
  145919. linesBelow = 3
  145920. } = opts || {};
  145921. const startLine = startLoc.line;
  145922. const startColumn = startLoc.column;
  145923. const endLine = endLoc.line;
  145924. const endColumn = endLoc.column;
  145925. let start3 = Math.max(startLine - (linesAbove + 1), 0);
  145926. let end = Math.min(source.length, endLine + linesBelow);
  145927. if (startLine === -1) {
  145928. start3 = 0;
  145929. }
  145930. if (endLine === -1) {
  145931. end = source.length;
  145932. }
  145933. const lineDiff = endLine - startLine;
  145934. const markerLines = {};
  145935. if (lineDiff) {
  145936. for (let i = 0; i <= lineDiff; i++) {
  145937. const lineNumber = i + startLine;
  145938. if (!startColumn) {
  145939. markerLines[lineNumber] = true;
  145940. } else if (i === 0) {
  145941. const sourceLength = source[lineNumber - 1].length;
  145942. markerLines[lineNumber] = [startColumn, sourceLength - startColumn + 1];
  145943. } else if (i === lineDiff) {
  145944. markerLines[lineNumber] = [0, endColumn];
  145945. } else {
  145946. const sourceLength = source[lineNumber - i].length;
  145947. markerLines[lineNumber] = [0, sourceLength];
  145948. }
  145949. }
  145950. } else {
  145951. if (startColumn === endColumn) {
  145952. if (startColumn) {
  145953. markerLines[startLine] = [startColumn, 0];
  145954. } else {
  145955. markerLines[startLine] = true;
  145956. }
  145957. } else {
  145958. markerLines[startLine] = [startColumn, endColumn - startColumn];
  145959. }
  145960. }
  145961. return {
  145962. start: start3,
  145963. end,
  145964. markerLines
  145965. };
  145966. }
  145967. function codeFrameColumns(rawLines, loc, opts = {}) {
  145968. const highlighted = (opts.highlightCode || opts.forceColor) && (0, _highlight.shouldHighlight)(opts);
  145969. const chalk = (0, _highlight.getChalk)(opts);
  145970. const defs = getDefs(chalk);
  145971. const maybeHighlight = (chalkFn, string3) => {
  145972. return highlighted ? chalkFn(string3) : string3;
  145973. };
  145974. const lines = rawLines.split(NEWLINE);
  145975. const {
  145976. start: start3,
  145977. end,
  145978. markerLines
  145979. } = getMarkerLines(loc, lines, opts);
  145980. const hasColumns = loc.start && typeof loc.start.column === "number";
  145981. const numberMaxWidth = String(end).length;
  145982. const highlightedLines = highlighted ? (0, _highlight.default)(rawLines, opts) : rawLines;
  145983. let frame = highlightedLines.split(NEWLINE).slice(start3, end).map((line, index2) => {
  145984. const number2 = start3 + 1 + index2;
  145985. const paddedNumber = ` ${number2}`.slice(-numberMaxWidth);
  145986. const gutter = ` ${paddedNumber} |`;
  145987. const hasMarker = markerLines[number2];
  145988. const lastMarkerLine = !markerLines[number2 + 1];
  145989. if (hasMarker) {
  145990. let markerLine = "";
  145991. if (Array.isArray(hasMarker)) {
  145992. const markerSpacing = line.slice(0, Math.max(hasMarker[0] - 1, 0)).replace(/[^\t]/g, " ");
  145993. const numberOfMarkers = hasMarker[1] || 1;
  145994. markerLine = ["\n ", maybeHighlight(defs.gutter, gutter.replace(/\d/g, " ")), " ", markerSpacing, maybeHighlight(defs.marker, "^").repeat(numberOfMarkers)].join("");
  145995. if (lastMarkerLine && opts.message) {
  145996. markerLine += " " + maybeHighlight(defs.message, opts.message);
  145997. }
  145998. }
  145999. return [maybeHighlight(defs.marker, ">"), maybeHighlight(defs.gutter, gutter), line.length > 0 ? ` ${line}` : "", markerLine].join("");
  146000. } else {
  146001. return ` ${maybeHighlight(defs.gutter, gutter)}${line.length > 0 ? ` ${line}` : ""}`;
  146002. }
  146003. }).join("\n");
  146004. if (opts.message && !hasColumns) {
  146005. frame = `${" ".repeat(numberMaxWidth + 1)}${opts.message}
  146006. ${frame}`;
  146007. }
  146008. if (highlighted) {
  146009. return chalk.reset(frame);
  146010. } else {
  146011. return frame;
  146012. }
  146013. }
  146014. function _default(rawLines, lineNumber, colNumber, opts = {}) {
  146015. if (!deprecationWarningShown) {
  146016. deprecationWarningShown = true;
  146017. const message = "Passing lineNumber and colNumber is deprecated to @babel/code-frame. Please use `codeFrameColumns`.";
  146018. if (process.emitWarning) {
  146019. process.emitWarning(message, "DeprecationWarning");
  146020. } else {
  146021. const deprecationError = new Error(message);
  146022. deprecationError.name = "DeprecationWarning";
  146023. console.warn(new Error(message));
  146024. }
  146025. }
  146026. colNumber = Math.max(colNumber, 0);
  146027. const location = {
  146028. start: {
  146029. column: colNumber,
  146030. line: lineNumber
  146031. }
  146032. };
  146033. return codeFrameColumns(rawLines, location, opts);
  146034. }
  146035. }
  146036. });
  146037. // node_modules/@babel/template/lib/parse.js
  146038. var require_parse2 = __commonJS({
  146039. "node_modules/@babel/template/lib/parse.js"(exports) {
  146040. "use strict";
  146041. Object.defineProperty(exports, "__esModule", {
  146042. value: true
  146043. });
  146044. exports.default = parseAndBuildMetadata;
  146045. var t2 = require_lib30();
  146046. var _parser = require_lib31();
  146047. var _codeFrame = require_lib33();
  146048. var PATTERN = /^[_$A-Z0-9]+$/;
  146049. function parseAndBuildMetadata(formatter, code2, opts) {
  146050. const {
  146051. placeholderWhitelist,
  146052. placeholderPattern,
  146053. preserveComments,
  146054. syntacticPlaceholders
  146055. } = opts;
  146056. const ast = parseWithCodeFrame(code2, opts.parser, syntacticPlaceholders);
  146057. t2.removePropertiesDeep(ast, {
  146058. preserveComments
  146059. });
  146060. formatter.validate(ast);
  146061. const syntactic = {
  146062. placeholders: [],
  146063. placeholderNames: /* @__PURE__ */ new Set()
  146064. };
  146065. const legacy = {
  146066. placeholders: [],
  146067. placeholderNames: /* @__PURE__ */ new Set()
  146068. };
  146069. const isLegacyRef = {
  146070. value: void 0
  146071. };
  146072. t2.traverse(ast, placeholderVisitorHandler, {
  146073. syntactic,
  146074. legacy,
  146075. isLegacyRef,
  146076. placeholderWhitelist,
  146077. placeholderPattern,
  146078. syntacticPlaceholders
  146079. });
  146080. return Object.assign({
  146081. ast
  146082. }, isLegacyRef.value ? legacy : syntactic);
  146083. }
  146084. function placeholderVisitorHandler(node, ancestors, state) {
  146085. var _state$placeholderWhi;
  146086. let name2;
  146087. if (t2.isPlaceholder(node)) {
  146088. if (state.syntacticPlaceholders === false) {
  146089. throw new Error("%%foo%%-style placeholders can't be used when '.syntacticPlaceholders' is false.");
  146090. } else {
  146091. name2 = node.name.name;
  146092. state.isLegacyRef.value = false;
  146093. }
  146094. } else if (state.isLegacyRef.value === false || state.syntacticPlaceholders) {
  146095. return;
  146096. } else if (t2.isIdentifier(node) || t2.isJSXIdentifier(node)) {
  146097. name2 = node.name;
  146098. state.isLegacyRef.value = true;
  146099. } else if (t2.isStringLiteral(node)) {
  146100. name2 = node.value;
  146101. state.isLegacyRef.value = true;
  146102. } else {
  146103. return;
  146104. }
  146105. if (!state.isLegacyRef.value && (state.placeholderPattern != null || state.placeholderWhitelist != null)) {
  146106. throw new Error("'.placeholderWhitelist' and '.placeholderPattern' aren't compatible with '.syntacticPlaceholders: true'");
  146107. }
  146108. if (state.isLegacyRef.value && (state.placeholderPattern === false || !(state.placeholderPattern || PATTERN).test(name2)) && !((_state$placeholderWhi = state.placeholderWhitelist) != null && _state$placeholderWhi.has(name2))) {
  146109. return;
  146110. }
  146111. ancestors = ancestors.slice();
  146112. const {
  146113. node: parent,
  146114. key
  146115. } = ancestors[ancestors.length - 1];
  146116. let type;
  146117. if (t2.isStringLiteral(node) || t2.isPlaceholder(node, {
  146118. expectedNode: "StringLiteral"
  146119. })) {
  146120. type = "string";
  146121. } else if (t2.isNewExpression(parent) && key === "arguments" || t2.isCallExpression(parent) && key === "arguments" || t2.isFunction(parent) && key === "params") {
  146122. type = "param";
  146123. } else if (t2.isExpressionStatement(parent) && !t2.isPlaceholder(node)) {
  146124. type = "statement";
  146125. ancestors = ancestors.slice(0, -1);
  146126. } else if (t2.isStatement(node) && t2.isPlaceholder(node)) {
  146127. type = "statement";
  146128. } else {
  146129. type = "other";
  146130. }
  146131. const {
  146132. placeholders,
  146133. placeholderNames
  146134. } = state.isLegacyRef.value ? state.legacy : state.syntactic;
  146135. placeholders.push({
  146136. name: name2,
  146137. type,
  146138. resolve: (ast) => resolveAncestors(ast, ancestors),
  146139. isDuplicate: placeholderNames.has(name2)
  146140. });
  146141. placeholderNames.add(name2);
  146142. }
  146143. function resolveAncestors(ast, ancestors) {
  146144. let parent = ast;
  146145. for (let i = 0; i < ancestors.length - 1; i++) {
  146146. const {
  146147. key: key2,
  146148. index: index3
  146149. } = ancestors[i];
  146150. if (index3 === void 0) {
  146151. parent = parent[key2];
  146152. } else {
  146153. parent = parent[key2][index3];
  146154. }
  146155. }
  146156. const {
  146157. key,
  146158. index: index2
  146159. } = ancestors[ancestors.length - 1];
  146160. return {
  146161. parent,
  146162. key,
  146163. index: index2
  146164. };
  146165. }
  146166. function parseWithCodeFrame(code2, parserOpts, syntacticPlaceholders) {
  146167. const plugins = (parserOpts.plugins || []).slice();
  146168. if (syntacticPlaceholders !== false) {
  146169. plugins.push("placeholders");
  146170. }
  146171. parserOpts = Object.assign({
  146172. allowReturnOutsideFunction: true,
  146173. allowSuperOutsideMethod: true,
  146174. sourceType: "module"
  146175. }, parserOpts, {
  146176. plugins
  146177. });
  146178. try {
  146179. return (0, _parser.parse)(code2, parserOpts);
  146180. } catch (err) {
  146181. const loc = err.loc;
  146182. if (loc) {
  146183. err.message += "\n" + (0, _codeFrame.codeFrameColumns)(code2, {
  146184. start: loc
  146185. });
  146186. err.code = "BABEL_TEMPLATE_PARSE_ERROR";
  146187. }
  146188. throw err;
  146189. }
  146190. }
  146191. }
  146192. });
  146193. // node_modules/@babel/template/lib/populate.js
  146194. var require_populate2 = __commonJS({
  146195. "node_modules/@babel/template/lib/populate.js"(exports) {
  146196. "use strict";
  146197. Object.defineProperty(exports, "__esModule", {
  146198. value: true
  146199. });
  146200. exports.default = populatePlaceholders;
  146201. var t2 = require_lib30();
  146202. function populatePlaceholders(metadata, replacements) {
  146203. const ast = t2.cloneNode(metadata.ast);
  146204. if (replacements) {
  146205. metadata.placeholders.forEach((placeholder) => {
  146206. if (!Object.prototype.hasOwnProperty.call(replacements, placeholder.name)) {
  146207. const placeholderName = placeholder.name;
  146208. throw new Error(`Error: No substitution given for "${placeholderName}". If this is not meant to be a
  146209. placeholder you may want to consider passing one of the following options to @babel/template:
  146210. - { placeholderPattern: false, placeholderWhitelist: new Set(['${placeholderName}'])}
  146211. - { placeholderPattern: /^${placeholderName}$/ }`);
  146212. }
  146213. });
  146214. Object.keys(replacements).forEach((key) => {
  146215. if (!metadata.placeholderNames.has(key)) {
  146216. throw new Error(`Unknown substitution "${key}" given`);
  146217. }
  146218. });
  146219. }
  146220. metadata.placeholders.slice().reverse().forEach((placeholder) => {
  146221. try {
  146222. applyReplacement(placeholder, ast, replacements && replacements[placeholder.name] || null);
  146223. } catch (e) {
  146224. e.message = `@babel/template placeholder "${placeholder.name}": ${e.message}`;
  146225. throw e;
  146226. }
  146227. });
  146228. return ast;
  146229. }
  146230. function applyReplacement(placeholder, ast, replacement) {
  146231. if (placeholder.isDuplicate) {
  146232. if (Array.isArray(replacement)) {
  146233. replacement = replacement.map((node) => t2.cloneNode(node));
  146234. } else if (typeof replacement === "object") {
  146235. replacement = t2.cloneNode(replacement);
  146236. }
  146237. }
  146238. const {
  146239. parent,
  146240. key,
  146241. index: index2
  146242. } = placeholder.resolve(ast);
  146243. if (placeholder.type === "string") {
  146244. if (typeof replacement === "string") {
  146245. replacement = t2.stringLiteral(replacement);
  146246. }
  146247. if (!replacement || !t2.isStringLiteral(replacement)) {
  146248. throw new Error("Expected string substitution");
  146249. }
  146250. } else if (placeholder.type === "statement") {
  146251. if (index2 === void 0) {
  146252. if (!replacement) {
  146253. replacement = t2.emptyStatement();
  146254. } else if (Array.isArray(replacement)) {
  146255. replacement = t2.blockStatement(replacement);
  146256. } else if (typeof replacement === "string") {
  146257. replacement = t2.expressionStatement(t2.identifier(replacement));
  146258. } else if (!t2.isStatement(replacement)) {
  146259. replacement = t2.expressionStatement(replacement);
  146260. }
  146261. } else {
  146262. if (replacement && !Array.isArray(replacement)) {
  146263. if (typeof replacement === "string") {
  146264. replacement = t2.identifier(replacement);
  146265. }
  146266. if (!t2.isStatement(replacement)) {
  146267. replacement = t2.expressionStatement(replacement);
  146268. }
  146269. }
  146270. }
  146271. } else if (placeholder.type === "param") {
  146272. if (typeof replacement === "string") {
  146273. replacement = t2.identifier(replacement);
  146274. }
  146275. if (index2 === void 0)
  146276. throw new Error("Assertion failure.");
  146277. } else {
  146278. if (typeof replacement === "string") {
  146279. replacement = t2.identifier(replacement);
  146280. }
  146281. if (Array.isArray(replacement)) {
  146282. throw new Error("Cannot replace single expression with an array.");
  146283. }
  146284. }
  146285. if (index2 === void 0) {
  146286. t2.validate(parent, key, replacement);
  146287. parent[key] = replacement;
  146288. } else {
  146289. const items = parent[key].slice();
  146290. if (placeholder.type === "statement" || placeholder.type === "param") {
  146291. if (replacement == null) {
  146292. items.splice(index2, 1);
  146293. } else if (Array.isArray(replacement)) {
  146294. items.splice(index2, 1, ...replacement);
  146295. } else {
  146296. items[index2] = replacement;
  146297. }
  146298. } else {
  146299. items[index2] = replacement;
  146300. }
  146301. t2.validate(parent, key, items);
  146302. parent[key] = items;
  146303. }
  146304. }
  146305. }
  146306. });
  146307. // node_modules/@babel/template/lib/string.js
  146308. var require_string2 = __commonJS({
  146309. "node_modules/@babel/template/lib/string.js"(exports) {
  146310. "use strict";
  146311. Object.defineProperty(exports, "__esModule", {
  146312. value: true
  146313. });
  146314. exports.default = stringTemplate;
  146315. var _options = require_options2();
  146316. var _parse = require_parse2();
  146317. var _populate = require_populate2();
  146318. function stringTemplate(formatter, code2, opts) {
  146319. code2 = formatter.code(code2);
  146320. let metadata;
  146321. return (arg) => {
  146322. const replacements = (0, _options.normalizeReplacements)(arg);
  146323. if (!metadata)
  146324. metadata = (0, _parse.default)(formatter, code2, opts);
  146325. return formatter.unwrap((0, _populate.default)(metadata, replacements));
  146326. };
  146327. }
  146328. }
  146329. });
  146330. // node_modules/@babel/template/lib/literal.js
  146331. var require_literal2 = __commonJS({
  146332. "node_modules/@babel/template/lib/literal.js"(exports) {
  146333. "use strict";
  146334. Object.defineProperty(exports, "__esModule", {
  146335. value: true
  146336. });
  146337. exports.default = literalTemplate;
  146338. var _options = require_options2();
  146339. var _parse = require_parse2();
  146340. var _populate = require_populate2();
  146341. function literalTemplate(formatter, tpl, opts) {
  146342. const {
  146343. metadata,
  146344. names
  146345. } = buildLiteralData(formatter, tpl, opts);
  146346. return (arg) => {
  146347. const defaultReplacements = {};
  146348. arg.forEach((replacement, i) => {
  146349. defaultReplacements[names[i]] = replacement;
  146350. });
  146351. return (arg2) => {
  146352. const replacements = (0, _options.normalizeReplacements)(arg2);
  146353. if (replacements) {
  146354. Object.keys(replacements).forEach((key) => {
  146355. if (Object.prototype.hasOwnProperty.call(defaultReplacements, key)) {
  146356. throw new Error("Unexpected replacement overlap.");
  146357. }
  146358. });
  146359. }
  146360. return formatter.unwrap((0, _populate.default)(metadata, replacements ? Object.assign(replacements, defaultReplacements) : defaultReplacements));
  146361. };
  146362. };
  146363. }
  146364. function buildLiteralData(formatter, tpl, opts) {
  146365. let names;
  146366. let nameSet;
  146367. let metadata;
  146368. let prefix = "";
  146369. do {
  146370. prefix += "$";
  146371. const result = buildTemplateCode(tpl, prefix);
  146372. names = result.names;
  146373. nameSet = new Set(names);
  146374. metadata = (0, _parse.default)(formatter, formatter.code(result.code), {
  146375. parser: opts.parser,
  146376. placeholderWhitelist: new Set(result.names.concat(opts.placeholderWhitelist ? Array.from(opts.placeholderWhitelist) : [])),
  146377. placeholderPattern: opts.placeholderPattern,
  146378. preserveComments: opts.preserveComments,
  146379. syntacticPlaceholders: opts.syntacticPlaceholders
  146380. });
  146381. } while (metadata.placeholders.some((placeholder) => placeholder.isDuplicate && nameSet.has(placeholder.name)));
  146382. return {
  146383. metadata,
  146384. names
  146385. };
  146386. }
  146387. function buildTemplateCode(tpl, prefix) {
  146388. const names = [];
  146389. let code2 = tpl[0];
  146390. for (let i = 1; i < tpl.length; i++) {
  146391. const value = `${prefix}${i - 1}`;
  146392. names.push(value);
  146393. code2 += value + tpl[i];
  146394. }
  146395. return {
  146396. names,
  146397. code: code2
  146398. };
  146399. }
  146400. }
  146401. });
  146402. // node_modules/@babel/template/lib/builder.js
  146403. var require_builder8 = __commonJS({
  146404. "node_modules/@babel/template/lib/builder.js"(exports) {
  146405. "use strict";
  146406. Object.defineProperty(exports, "__esModule", {
  146407. value: true
  146408. });
  146409. exports.default = createTemplateBuilder;
  146410. var _options = require_options2();
  146411. var _string = require_string2();
  146412. var _literal = require_literal2();
  146413. var NO_PLACEHOLDER = (0, _options.validate)({
  146414. placeholderPattern: false
  146415. });
  146416. function createTemplateBuilder(formatter, defaultOpts) {
  146417. const templateFnCache = /* @__PURE__ */ new WeakMap();
  146418. const templateAstCache = /* @__PURE__ */ new WeakMap();
  146419. const cachedOpts = defaultOpts || (0, _options.validate)(null);
  146420. return Object.assign((tpl, ...args) => {
  146421. if (typeof tpl === "string") {
  146422. if (args.length > 1)
  146423. throw new Error("Unexpected extra params.");
  146424. return extendedTrace((0, _string.default)(formatter, tpl, (0, _options.merge)(cachedOpts, (0, _options.validate)(args[0]))));
  146425. } else if (Array.isArray(tpl)) {
  146426. let builder = templateFnCache.get(tpl);
  146427. if (!builder) {
  146428. builder = (0, _literal.default)(formatter, tpl, cachedOpts);
  146429. templateFnCache.set(tpl, builder);
  146430. }
  146431. return extendedTrace(builder(args));
  146432. } else if (typeof tpl === "object" && tpl) {
  146433. if (args.length > 0)
  146434. throw new Error("Unexpected extra params.");
  146435. return createTemplateBuilder(formatter, (0, _options.merge)(cachedOpts, (0, _options.validate)(tpl)));
  146436. }
  146437. throw new Error(`Unexpected template param ${typeof tpl}`);
  146438. }, {
  146439. ast: (tpl, ...args) => {
  146440. if (typeof tpl === "string") {
  146441. if (args.length > 1)
  146442. throw new Error("Unexpected extra params.");
  146443. return (0, _string.default)(formatter, tpl, (0, _options.merge)((0, _options.merge)(cachedOpts, (0, _options.validate)(args[0])), NO_PLACEHOLDER))();
  146444. } else if (Array.isArray(tpl)) {
  146445. let builder = templateAstCache.get(tpl);
  146446. if (!builder) {
  146447. builder = (0, _literal.default)(formatter, tpl, (0, _options.merge)(cachedOpts, NO_PLACEHOLDER));
  146448. templateAstCache.set(tpl, builder);
  146449. }
  146450. return builder(args)();
  146451. }
  146452. throw new Error(`Unexpected template param ${typeof tpl}`);
  146453. }
  146454. });
  146455. }
  146456. function extendedTrace(fn) {
  146457. let rootStack = "";
  146458. try {
  146459. throw new Error();
  146460. } catch (error) {
  146461. if (error.stack) {
  146462. rootStack = error.stack.split("\n").slice(3).join("\n");
  146463. }
  146464. }
  146465. return (arg) => {
  146466. try {
  146467. return fn(arg);
  146468. } catch (err) {
  146469. err.stack += `
  146470. =============
  146471. ${rootStack}`;
  146472. throw err;
  146473. }
  146474. };
  146475. }
  146476. }
  146477. });
  146478. // node_modules/@babel/template/lib/index.js
  146479. var require_lib34 = __commonJS({
  146480. "node_modules/@babel/template/lib/index.js"(exports) {
  146481. "use strict";
  146482. Object.defineProperty(exports, "__esModule", {
  146483. value: true
  146484. });
  146485. exports.default = exports.program = exports.expression = exports.statements = exports.statement = exports.smart = void 0;
  146486. var formatters = require_formatters2();
  146487. var _builder = require_builder8();
  146488. var smart = (0, _builder.default)(formatters.smart);
  146489. exports.smart = smart;
  146490. var statement = (0, _builder.default)(formatters.statement);
  146491. exports.statement = statement;
  146492. var statements = (0, _builder.default)(formatters.statements);
  146493. exports.statements = statements;
  146494. var expression = (0, _builder.default)(formatters.expression);
  146495. exports.expression = expression;
  146496. var program = (0, _builder.default)(formatters.program);
  146497. exports.program = program;
  146498. var _default = Object.assign(smart.bind(void 0), {
  146499. smart,
  146500. statement,
  146501. statements,
  146502. expression,
  146503. program,
  146504. ast: smart.ast
  146505. });
  146506. exports.default = _default;
  146507. }
  146508. });
  146509. // node_modules/@babel/traverse/node_modules/@babel/helper-function-name/node_modules/@babel/types/lib/utils/shallowEqual.js
  146510. var require_shallowEqual7 = __commonJS({
  146511. "node_modules/@babel/traverse/node_modules/@babel/helper-function-name/node_modules/@babel/types/lib/utils/shallowEqual.js"(exports) {
  146512. "use strict";
  146513. Object.defineProperty(exports, "__esModule", {
  146514. value: true
  146515. });
  146516. exports.default = shallowEqual;
  146517. function shallowEqual(actual, expected) {
  146518. const keys2 = Object.keys(expected);
  146519. for (const key of keys2) {
  146520. if (actual[key] !== expected[key]) {
  146521. return false;
  146522. }
  146523. }
  146524. return true;
  146525. }
  146526. }
  146527. });
  146528. // node_modules/@babel/traverse/node_modules/@babel/helper-function-name/node_modules/@babel/types/lib/validators/generated/index.js
  146529. var require_generated31 = __commonJS({
  146530. "node_modules/@babel/traverse/node_modules/@babel/helper-function-name/node_modules/@babel/types/lib/validators/generated/index.js"(exports) {
  146531. "use strict";
  146532. Object.defineProperty(exports, "__esModule", {
  146533. value: true
  146534. });
  146535. exports.isArrayExpression = isArrayExpression;
  146536. exports.isAssignmentExpression = isAssignmentExpression;
  146537. exports.isBinaryExpression = isBinaryExpression;
  146538. exports.isInterpreterDirective = isInterpreterDirective;
  146539. exports.isDirective = isDirective;
  146540. exports.isDirectiveLiteral = isDirectiveLiteral;
  146541. exports.isBlockStatement = isBlockStatement;
  146542. exports.isBreakStatement = isBreakStatement;
  146543. exports.isCallExpression = isCallExpression;
  146544. exports.isCatchClause = isCatchClause;
  146545. exports.isConditionalExpression = isConditionalExpression;
  146546. exports.isContinueStatement = isContinueStatement;
  146547. exports.isDebuggerStatement = isDebuggerStatement;
  146548. exports.isDoWhileStatement = isDoWhileStatement;
  146549. exports.isEmptyStatement = isEmptyStatement;
  146550. exports.isExpressionStatement = isExpressionStatement2;
  146551. exports.isFile = isFile;
  146552. exports.isForInStatement = isForInStatement;
  146553. exports.isForStatement = isForStatement;
  146554. exports.isFunctionDeclaration = isFunctionDeclaration;
  146555. exports.isFunctionExpression = isFunctionExpression;
  146556. exports.isIdentifier = isIdentifier2;
  146557. exports.isIfStatement = isIfStatement;
  146558. exports.isLabeledStatement = isLabeledStatement;
  146559. exports.isStringLiteral = isStringLiteral2;
  146560. exports.isNumericLiteral = isNumericLiteral;
  146561. exports.isNullLiteral = isNullLiteral;
  146562. exports.isBooleanLiteral = isBooleanLiteral2;
  146563. exports.isRegExpLiteral = isRegExpLiteral;
  146564. exports.isLogicalExpression = isLogicalExpression;
  146565. exports.isMemberExpression = isMemberExpression;
  146566. exports.isNewExpression = isNewExpression;
  146567. exports.isProgram = isProgram;
  146568. exports.isObjectExpression = isObjectExpression;
  146569. exports.isObjectMethod = isObjectMethod;
  146570. exports.isObjectProperty = isObjectProperty;
  146571. exports.isRestElement = isRestElement;
  146572. exports.isReturnStatement = isReturnStatement;
  146573. exports.isSequenceExpression = isSequenceExpression;
  146574. exports.isParenthesizedExpression = isParenthesizedExpression;
  146575. exports.isSwitchCase = isSwitchCase;
  146576. exports.isSwitchStatement = isSwitchStatement;
  146577. exports.isThisExpression = isThisExpression;
  146578. exports.isThrowStatement = isThrowStatement;
  146579. exports.isTryStatement = isTryStatement;
  146580. exports.isUnaryExpression = isUnaryExpression;
  146581. exports.isUpdateExpression = isUpdateExpression;
  146582. exports.isVariableDeclaration = isVariableDeclaration;
  146583. exports.isVariableDeclarator = isVariableDeclarator;
  146584. exports.isWhileStatement = isWhileStatement;
  146585. exports.isWithStatement = isWithStatement;
  146586. exports.isAssignmentPattern = isAssignmentPattern;
  146587. exports.isArrayPattern = isArrayPattern;
  146588. exports.isArrowFunctionExpression = isArrowFunctionExpression;
  146589. exports.isClassBody = isClassBody;
  146590. exports.isClassExpression = isClassExpression;
  146591. exports.isClassDeclaration = isClassDeclaration;
  146592. exports.isExportAllDeclaration = isExportAllDeclaration;
  146593. exports.isExportDefaultDeclaration = isExportDefaultDeclaration;
  146594. exports.isExportNamedDeclaration = isExportNamedDeclaration;
  146595. exports.isExportSpecifier = isExportSpecifier;
  146596. exports.isForOfStatement = isForOfStatement;
  146597. exports.isImportDeclaration = isImportDeclaration;
  146598. exports.isImportDefaultSpecifier = isImportDefaultSpecifier;
  146599. exports.isImportNamespaceSpecifier = isImportNamespaceSpecifier;
  146600. exports.isImportSpecifier = isImportSpecifier;
  146601. exports.isMetaProperty = isMetaProperty;
  146602. exports.isClassMethod = isClassMethod;
  146603. exports.isObjectPattern = isObjectPattern;
  146604. exports.isSpreadElement = isSpreadElement;
  146605. exports.isSuper = isSuper;
  146606. exports.isTaggedTemplateExpression = isTaggedTemplateExpression;
  146607. exports.isTemplateElement = isTemplateElement;
  146608. exports.isTemplateLiteral = isTemplateLiteral;
  146609. exports.isYieldExpression = isYieldExpression;
  146610. exports.isAwaitExpression = isAwaitExpression;
  146611. exports.isImport = isImport;
  146612. exports.isBigIntLiteral = isBigIntLiteral;
  146613. exports.isExportNamespaceSpecifier = isExportNamespaceSpecifier;
  146614. exports.isOptionalMemberExpression = isOptionalMemberExpression;
  146615. exports.isOptionalCallExpression = isOptionalCallExpression;
  146616. exports.isAnyTypeAnnotation = isAnyTypeAnnotation;
  146617. exports.isArrayTypeAnnotation = isArrayTypeAnnotation;
  146618. exports.isBooleanTypeAnnotation = isBooleanTypeAnnotation;
  146619. exports.isBooleanLiteralTypeAnnotation = isBooleanLiteralTypeAnnotation;
  146620. exports.isNullLiteralTypeAnnotation = isNullLiteralTypeAnnotation;
  146621. exports.isClassImplements = isClassImplements;
  146622. exports.isDeclareClass = isDeclareClass;
  146623. exports.isDeclareFunction = isDeclareFunction;
  146624. exports.isDeclareInterface = isDeclareInterface;
  146625. exports.isDeclareModule = isDeclareModule;
  146626. exports.isDeclareModuleExports = isDeclareModuleExports;
  146627. exports.isDeclareTypeAlias = isDeclareTypeAlias;
  146628. exports.isDeclareOpaqueType = isDeclareOpaqueType;
  146629. exports.isDeclareVariable = isDeclareVariable;
  146630. exports.isDeclareExportDeclaration = isDeclareExportDeclaration;
  146631. exports.isDeclareExportAllDeclaration = isDeclareExportAllDeclaration;
  146632. exports.isDeclaredPredicate = isDeclaredPredicate;
  146633. exports.isExistsTypeAnnotation = isExistsTypeAnnotation;
  146634. exports.isFunctionTypeAnnotation = isFunctionTypeAnnotation;
  146635. exports.isFunctionTypeParam = isFunctionTypeParam;
  146636. exports.isGenericTypeAnnotation = isGenericTypeAnnotation;
  146637. exports.isInferredPredicate = isInferredPredicate;
  146638. exports.isInterfaceExtends = isInterfaceExtends;
  146639. exports.isInterfaceDeclaration = isInterfaceDeclaration;
  146640. exports.isInterfaceTypeAnnotation = isInterfaceTypeAnnotation;
  146641. exports.isIntersectionTypeAnnotation = isIntersectionTypeAnnotation;
  146642. exports.isMixedTypeAnnotation = isMixedTypeAnnotation;
  146643. exports.isEmptyTypeAnnotation = isEmptyTypeAnnotation;
  146644. exports.isNullableTypeAnnotation = isNullableTypeAnnotation;
  146645. exports.isNumberLiteralTypeAnnotation = isNumberLiteralTypeAnnotation;
  146646. exports.isNumberTypeAnnotation = isNumberTypeAnnotation;
  146647. exports.isObjectTypeAnnotation = isObjectTypeAnnotation;
  146648. exports.isObjectTypeInternalSlot = isObjectTypeInternalSlot;
  146649. exports.isObjectTypeCallProperty = isObjectTypeCallProperty;
  146650. exports.isObjectTypeIndexer = isObjectTypeIndexer;
  146651. exports.isObjectTypeProperty = isObjectTypeProperty;
  146652. exports.isObjectTypeSpreadProperty = isObjectTypeSpreadProperty;
  146653. exports.isOpaqueType = isOpaqueType;
  146654. exports.isQualifiedTypeIdentifier = isQualifiedTypeIdentifier;
  146655. exports.isStringLiteralTypeAnnotation = isStringLiteralTypeAnnotation;
  146656. exports.isStringTypeAnnotation = isStringTypeAnnotation;
  146657. exports.isSymbolTypeAnnotation = isSymbolTypeAnnotation;
  146658. exports.isThisTypeAnnotation = isThisTypeAnnotation;
  146659. exports.isTupleTypeAnnotation = isTupleTypeAnnotation;
  146660. exports.isTypeofTypeAnnotation = isTypeofTypeAnnotation;
  146661. exports.isTypeAlias = isTypeAlias;
  146662. exports.isTypeAnnotation = isTypeAnnotation;
  146663. exports.isTypeCastExpression = isTypeCastExpression;
  146664. exports.isTypeParameter = isTypeParameter;
  146665. exports.isTypeParameterDeclaration = isTypeParameterDeclaration;
  146666. exports.isTypeParameterInstantiation = isTypeParameterInstantiation;
  146667. exports.isUnionTypeAnnotation = isUnionTypeAnnotation;
  146668. exports.isVariance = isVariance;
  146669. exports.isVoidTypeAnnotation = isVoidTypeAnnotation;
  146670. exports.isEnumDeclaration = isEnumDeclaration;
  146671. exports.isEnumBooleanBody = isEnumBooleanBody;
  146672. exports.isEnumNumberBody = isEnumNumberBody;
  146673. exports.isEnumStringBody = isEnumStringBody;
  146674. exports.isEnumSymbolBody = isEnumSymbolBody;
  146675. exports.isEnumBooleanMember = isEnumBooleanMember;
  146676. exports.isEnumNumberMember = isEnumNumberMember;
  146677. exports.isEnumStringMember = isEnumStringMember;
  146678. exports.isEnumDefaultedMember = isEnumDefaultedMember;
  146679. exports.isIndexedAccessType = isIndexedAccessType;
  146680. exports.isOptionalIndexedAccessType = isOptionalIndexedAccessType;
  146681. exports.isJSXAttribute = isJSXAttribute;
  146682. exports.isJSXClosingElement = isJSXClosingElement;
  146683. exports.isJSXElement = isJSXElement2;
  146684. exports.isJSXEmptyExpression = isJSXEmptyExpression;
  146685. exports.isJSXExpressionContainer = isJSXExpressionContainer2;
  146686. exports.isJSXSpreadChild = isJSXSpreadChild;
  146687. exports.isJSXIdentifier = isJSXIdentifier2;
  146688. exports.isJSXMemberExpression = isJSXMemberExpression;
  146689. exports.isJSXNamespacedName = isJSXNamespacedName;
  146690. exports.isJSXOpeningElement = isJSXOpeningElement;
  146691. exports.isJSXSpreadAttribute = isJSXSpreadAttribute;
  146692. exports.isJSXText = isJSXText;
  146693. exports.isJSXFragment = isJSXFragment2;
  146694. exports.isJSXOpeningFragment = isJSXOpeningFragment;
  146695. exports.isJSXClosingFragment = isJSXClosingFragment;
  146696. exports.isNoop = isNoop;
  146697. exports.isPlaceholder = isPlaceholder;
  146698. exports.isV8IntrinsicIdentifier = isV8IntrinsicIdentifier;
  146699. exports.isArgumentPlaceholder = isArgumentPlaceholder;
  146700. exports.isBindExpression = isBindExpression;
  146701. exports.isClassProperty = isClassProperty;
  146702. exports.isPipelineTopicExpression = isPipelineTopicExpression;
  146703. exports.isPipelineBareFunction = isPipelineBareFunction;
  146704. exports.isPipelinePrimaryTopicReference = isPipelinePrimaryTopicReference;
  146705. exports.isClassPrivateProperty = isClassPrivateProperty;
  146706. exports.isClassPrivateMethod = isClassPrivateMethod;
  146707. exports.isImportAttribute = isImportAttribute;
  146708. exports.isDecorator = isDecorator;
  146709. exports.isDoExpression = isDoExpression;
  146710. exports.isExportDefaultSpecifier = isExportDefaultSpecifier;
  146711. exports.isPrivateName = isPrivateName;
  146712. exports.isRecordExpression = isRecordExpression;
  146713. exports.isTupleExpression = isTupleExpression;
  146714. exports.isDecimalLiteral = isDecimalLiteral;
  146715. exports.isStaticBlock = isStaticBlock;
  146716. exports.isModuleExpression = isModuleExpression;
  146717. exports.isTSParameterProperty = isTSParameterProperty;
  146718. exports.isTSDeclareFunction = isTSDeclareFunction;
  146719. exports.isTSDeclareMethod = isTSDeclareMethod;
  146720. exports.isTSQualifiedName = isTSQualifiedName;
  146721. exports.isTSCallSignatureDeclaration = isTSCallSignatureDeclaration;
  146722. exports.isTSConstructSignatureDeclaration = isTSConstructSignatureDeclaration;
  146723. exports.isTSPropertySignature = isTSPropertySignature;
  146724. exports.isTSMethodSignature = isTSMethodSignature;
  146725. exports.isTSIndexSignature = isTSIndexSignature;
  146726. exports.isTSAnyKeyword = isTSAnyKeyword;
  146727. exports.isTSBooleanKeyword = isTSBooleanKeyword;
  146728. exports.isTSBigIntKeyword = isTSBigIntKeyword;
  146729. exports.isTSIntrinsicKeyword = isTSIntrinsicKeyword;
  146730. exports.isTSNeverKeyword = isTSNeverKeyword;
  146731. exports.isTSNullKeyword = isTSNullKeyword;
  146732. exports.isTSNumberKeyword = isTSNumberKeyword;
  146733. exports.isTSObjectKeyword = isTSObjectKeyword;
  146734. exports.isTSStringKeyword = isTSStringKeyword;
  146735. exports.isTSSymbolKeyword = isTSSymbolKeyword;
  146736. exports.isTSUndefinedKeyword = isTSUndefinedKeyword;
  146737. exports.isTSUnknownKeyword = isTSUnknownKeyword;
  146738. exports.isTSVoidKeyword = isTSVoidKeyword;
  146739. exports.isTSThisType = isTSThisType;
  146740. exports.isTSFunctionType = isTSFunctionType;
  146741. exports.isTSConstructorType = isTSConstructorType;
  146742. exports.isTSTypeReference = isTSTypeReference;
  146743. exports.isTSTypePredicate = isTSTypePredicate;
  146744. exports.isTSTypeQuery = isTSTypeQuery;
  146745. exports.isTSTypeLiteral = isTSTypeLiteral;
  146746. exports.isTSArrayType = isTSArrayType;
  146747. exports.isTSTupleType = isTSTupleType;
  146748. exports.isTSOptionalType = isTSOptionalType;
  146749. exports.isTSRestType = isTSRestType;
  146750. exports.isTSNamedTupleMember = isTSNamedTupleMember;
  146751. exports.isTSUnionType = isTSUnionType;
  146752. exports.isTSIntersectionType = isTSIntersectionType;
  146753. exports.isTSConditionalType = isTSConditionalType;
  146754. exports.isTSInferType = isTSInferType;
  146755. exports.isTSParenthesizedType = isTSParenthesizedType;
  146756. exports.isTSTypeOperator = isTSTypeOperator;
  146757. exports.isTSIndexedAccessType = isTSIndexedAccessType;
  146758. exports.isTSMappedType = isTSMappedType;
  146759. exports.isTSLiteralType = isTSLiteralType;
  146760. exports.isTSExpressionWithTypeArguments = isTSExpressionWithTypeArguments;
  146761. exports.isTSInterfaceDeclaration = isTSInterfaceDeclaration;
  146762. exports.isTSInterfaceBody = isTSInterfaceBody;
  146763. exports.isTSTypeAliasDeclaration = isTSTypeAliasDeclaration;
  146764. exports.isTSAsExpression = isTSAsExpression;
  146765. exports.isTSTypeAssertion = isTSTypeAssertion;
  146766. exports.isTSEnumDeclaration = isTSEnumDeclaration;
  146767. exports.isTSEnumMember = isTSEnumMember;
  146768. exports.isTSModuleDeclaration = isTSModuleDeclaration;
  146769. exports.isTSModuleBlock = isTSModuleBlock;
  146770. exports.isTSImportType = isTSImportType;
  146771. exports.isTSImportEqualsDeclaration = isTSImportEqualsDeclaration;
  146772. exports.isTSExternalModuleReference = isTSExternalModuleReference;
  146773. exports.isTSNonNullExpression = isTSNonNullExpression;
  146774. exports.isTSExportAssignment = isTSExportAssignment;
  146775. exports.isTSNamespaceExportDeclaration = isTSNamespaceExportDeclaration;
  146776. exports.isTSTypeAnnotation = isTSTypeAnnotation;
  146777. exports.isTSTypeParameterInstantiation = isTSTypeParameterInstantiation;
  146778. exports.isTSTypeParameterDeclaration = isTSTypeParameterDeclaration;
  146779. exports.isTSTypeParameter = isTSTypeParameter;
  146780. exports.isExpression = isExpression;
  146781. exports.isBinary = isBinary;
  146782. exports.isScopable = isScopable;
  146783. exports.isBlockParent = isBlockParent;
  146784. exports.isBlock = isBlock;
  146785. exports.isStatement = isStatement;
  146786. exports.isTerminatorless = isTerminatorless;
  146787. exports.isCompletionStatement = isCompletionStatement;
  146788. exports.isConditional = isConditional;
  146789. exports.isLoop = isLoop;
  146790. exports.isWhile = isWhile;
  146791. exports.isExpressionWrapper = isExpressionWrapper;
  146792. exports.isFor = isFor;
  146793. exports.isForXStatement = isForXStatement;
  146794. exports.isFunction = isFunction;
  146795. exports.isFunctionParent = isFunctionParent;
  146796. exports.isPureish = isPureish;
  146797. exports.isDeclaration = isDeclaration2;
  146798. exports.isPatternLike = isPatternLike;
  146799. exports.isLVal = isLVal;
  146800. exports.isTSEntityName = isTSEntityName;
  146801. exports.isLiteral = isLiteral;
  146802. exports.isImmutable = isImmutable;
  146803. exports.isUserWhitespacable = isUserWhitespacable;
  146804. exports.isMethod = isMethod;
  146805. exports.isObjectMember = isObjectMember;
  146806. exports.isProperty = isProperty;
  146807. exports.isUnaryLike = isUnaryLike;
  146808. exports.isPattern = isPattern;
  146809. exports.isClass = isClass;
  146810. exports.isModuleDeclaration = isModuleDeclaration;
  146811. exports.isExportDeclaration = isExportDeclaration;
  146812. exports.isModuleSpecifier = isModuleSpecifier;
  146813. exports.isFlow = isFlow;
  146814. exports.isFlowType = isFlowType;
  146815. exports.isFlowBaseAnnotation = isFlowBaseAnnotation;
  146816. exports.isFlowDeclaration = isFlowDeclaration;
  146817. exports.isFlowPredicate = isFlowPredicate;
  146818. exports.isEnumBody = isEnumBody;
  146819. exports.isEnumMember = isEnumMember;
  146820. exports.isJSX = isJSX;
  146821. exports.isPrivate = isPrivate;
  146822. exports.isTSTypeElement = isTSTypeElement;
  146823. exports.isTSType = isTSType;
  146824. exports.isTSBaseType = isTSBaseType;
  146825. exports.isNumberLiteral = isNumberLiteral;
  146826. exports.isRegexLiteral = isRegexLiteral;
  146827. exports.isRestProperty = isRestProperty;
  146828. exports.isSpreadProperty = isSpreadProperty;
  146829. var _shallowEqual = require_shallowEqual7();
  146830. function isArrayExpression(node, opts) {
  146831. if (!node)
  146832. return false;
  146833. const nodeType = node.type;
  146834. if (nodeType === "ArrayExpression") {
  146835. if (typeof opts === "undefined") {
  146836. return true;
  146837. } else {
  146838. return (0, _shallowEqual.default)(node, opts);
  146839. }
  146840. }
  146841. return false;
  146842. }
  146843. function isAssignmentExpression(node, opts) {
  146844. if (!node)
  146845. return false;
  146846. const nodeType = node.type;
  146847. if (nodeType === "AssignmentExpression") {
  146848. if (typeof opts === "undefined") {
  146849. return true;
  146850. } else {
  146851. return (0, _shallowEqual.default)(node, opts);
  146852. }
  146853. }
  146854. return false;
  146855. }
  146856. function isBinaryExpression(node, opts) {
  146857. if (!node)
  146858. return false;
  146859. const nodeType = node.type;
  146860. if (nodeType === "BinaryExpression") {
  146861. if (typeof opts === "undefined") {
  146862. return true;
  146863. } else {
  146864. return (0, _shallowEqual.default)(node, opts);
  146865. }
  146866. }
  146867. return false;
  146868. }
  146869. function isInterpreterDirective(node, opts) {
  146870. if (!node)
  146871. return false;
  146872. const nodeType = node.type;
  146873. if (nodeType === "InterpreterDirective") {
  146874. if (typeof opts === "undefined") {
  146875. return true;
  146876. } else {
  146877. return (0, _shallowEqual.default)(node, opts);
  146878. }
  146879. }
  146880. return false;
  146881. }
  146882. function isDirective(node, opts) {
  146883. if (!node)
  146884. return false;
  146885. const nodeType = node.type;
  146886. if (nodeType === "Directive") {
  146887. if (typeof opts === "undefined") {
  146888. return true;
  146889. } else {
  146890. return (0, _shallowEqual.default)(node, opts);
  146891. }
  146892. }
  146893. return false;
  146894. }
  146895. function isDirectiveLiteral(node, opts) {
  146896. if (!node)
  146897. return false;
  146898. const nodeType = node.type;
  146899. if (nodeType === "DirectiveLiteral") {
  146900. if (typeof opts === "undefined") {
  146901. return true;
  146902. } else {
  146903. return (0, _shallowEqual.default)(node, opts);
  146904. }
  146905. }
  146906. return false;
  146907. }
  146908. function isBlockStatement(node, opts) {
  146909. if (!node)
  146910. return false;
  146911. const nodeType = node.type;
  146912. if (nodeType === "BlockStatement") {
  146913. if (typeof opts === "undefined") {
  146914. return true;
  146915. } else {
  146916. return (0, _shallowEqual.default)(node, opts);
  146917. }
  146918. }
  146919. return false;
  146920. }
  146921. function isBreakStatement(node, opts) {
  146922. if (!node)
  146923. return false;
  146924. const nodeType = node.type;
  146925. if (nodeType === "BreakStatement") {
  146926. if (typeof opts === "undefined") {
  146927. return true;
  146928. } else {
  146929. return (0, _shallowEqual.default)(node, opts);
  146930. }
  146931. }
  146932. return false;
  146933. }
  146934. function isCallExpression(node, opts) {
  146935. if (!node)
  146936. return false;
  146937. const nodeType = node.type;
  146938. if (nodeType === "CallExpression") {
  146939. if (typeof opts === "undefined") {
  146940. return true;
  146941. } else {
  146942. return (0, _shallowEqual.default)(node, opts);
  146943. }
  146944. }
  146945. return false;
  146946. }
  146947. function isCatchClause(node, opts) {
  146948. if (!node)
  146949. return false;
  146950. const nodeType = node.type;
  146951. if (nodeType === "CatchClause") {
  146952. if (typeof opts === "undefined") {
  146953. return true;
  146954. } else {
  146955. return (0, _shallowEqual.default)(node, opts);
  146956. }
  146957. }
  146958. return false;
  146959. }
  146960. function isConditionalExpression(node, opts) {
  146961. if (!node)
  146962. return false;
  146963. const nodeType = node.type;
  146964. if (nodeType === "ConditionalExpression") {
  146965. if (typeof opts === "undefined") {
  146966. return true;
  146967. } else {
  146968. return (0, _shallowEqual.default)(node, opts);
  146969. }
  146970. }
  146971. return false;
  146972. }
  146973. function isContinueStatement(node, opts) {
  146974. if (!node)
  146975. return false;
  146976. const nodeType = node.type;
  146977. if (nodeType === "ContinueStatement") {
  146978. if (typeof opts === "undefined") {
  146979. return true;
  146980. } else {
  146981. return (0, _shallowEqual.default)(node, opts);
  146982. }
  146983. }
  146984. return false;
  146985. }
  146986. function isDebuggerStatement(node, opts) {
  146987. if (!node)
  146988. return false;
  146989. const nodeType = node.type;
  146990. if (nodeType === "DebuggerStatement") {
  146991. if (typeof opts === "undefined") {
  146992. return true;
  146993. } else {
  146994. return (0, _shallowEqual.default)(node, opts);
  146995. }
  146996. }
  146997. return false;
  146998. }
  146999. function isDoWhileStatement(node, opts) {
  147000. if (!node)
  147001. return false;
  147002. const nodeType = node.type;
  147003. if (nodeType === "DoWhileStatement") {
  147004. if (typeof opts === "undefined") {
  147005. return true;
  147006. } else {
  147007. return (0, _shallowEqual.default)(node, opts);
  147008. }
  147009. }
  147010. return false;
  147011. }
  147012. function isEmptyStatement(node, opts) {
  147013. if (!node)
  147014. return false;
  147015. const nodeType = node.type;
  147016. if (nodeType === "EmptyStatement") {
  147017. if (typeof opts === "undefined") {
  147018. return true;
  147019. } else {
  147020. return (0, _shallowEqual.default)(node, opts);
  147021. }
  147022. }
  147023. return false;
  147024. }
  147025. function isExpressionStatement2(node, opts) {
  147026. if (!node)
  147027. return false;
  147028. const nodeType = node.type;
  147029. if (nodeType === "ExpressionStatement") {
  147030. if (typeof opts === "undefined") {
  147031. return true;
  147032. } else {
  147033. return (0, _shallowEqual.default)(node, opts);
  147034. }
  147035. }
  147036. return false;
  147037. }
  147038. function isFile(node, opts) {
  147039. if (!node)
  147040. return false;
  147041. const nodeType = node.type;
  147042. if (nodeType === "File") {
  147043. if (typeof opts === "undefined") {
  147044. return true;
  147045. } else {
  147046. return (0, _shallowEqual.default)(node, opts);
  147047. }
  147048. }
  147049. return false;
  147050. }
  147051. function isForInStatement(node, opts) {
  147052. if (!node)
  147053. return false;
  147054. const nodeType = node.type;
  147055. if (nodeType === "ForInStatement") {
  147056. if (typeof opts === "undefined") {
  147057. return true;
  147058. } else {
  147059. return (0, _shallowEqual.default)(node, opts);
  147060. }
  147061. }
  147062. return false;
  147063. }
  147064. function isForStatement(node, opts) {
  147065. if (!node)
  147066. return false;
  147067. const nodeType = node.type;
  147068. if (nodeType === "ForStatement") {
  147069. if (typeof opts === "undefined") {
  147070. return true;
  147071. } else {
  147072. return (0, _shallowEqual.default)(node, opts);
  147073. }
  147074. }
  147075. return false;
  147076. }
  147077. function isFunctionDeclaration(node, opts) {
  147078. if (!node)
  147079. return false;
  147080. const nodeType = node.type;
  147081. if (nodeType === "FunctionDeclaration") {
  147082. if (typeof opts === "undefined") {
  147083. return true;
  147084. } else {
  147085. return (0, _shallowEqual.default)(node, opts);
  147086. }
  147087. }
  147088. return false;
  147089. }
  147090. function isFunctionExpression(node, opts) {
  147091. if (!node)
  147092. return false;
  147093. const nodeType = node.type;
  147094. if (nodeType === "FunctionExpression") {
  147095. if (typeof opts === "undefined") {
  147096. return true;
  147097. } else {
  147098. return (0, _shallowEqual.default)(node, opts);
  147099. }
  147100. }
  147101. return false;
  147102. }
  147103. function isIdentifier2(node, opts) {
  147104. if (!node)
  147105. return false;
  147106. const nodeType = node.type;
  147107. if (nodeType === "Identifier") {
  147108. if (typeof opts === "undefined") {
  147109. return true;
  147110. } else {
  147111. return (0, _shallowEqual.default)(node, opts);
  147112. }
  147113. }
  147114. return false;
  147115. }
  147116. function isIfStatement(node, opts) {
  147117. if (!node)
  147118. return false;
  147119. const nodeType = node.type;
  147120. if (nodeType === "IfStatement") {
  147121. if (typeof opts === "undefined") {
  147122. return true;
  147123. } else {
  147124. return (0, _shallowEqual.default)(node, opts);
  147125. }
  147126. }
  147127. return false;
  147128. }
  147129. function isLabeledStatement(node, opts) {
  147130. if (!node)
  147131. return false;
  147132. const nodeType = node.type;
  147133. if (nodeType === "LabeledStatement") {
  147134. if (typeof opts === "undefined") {
  147135. return true;
  147136. } else {
  147137. return (0, _shallowEqual.default)(node, opts);
  147138. }
  147139. }
  147140. return false;
  147141. }
  147142. function isStringLiteral2(node, opts) {
  147143. if (!node)
  147144. return false;
  147145. const nodeType = node.type;
  147146. if (nodeType === "StringLiteral") {
  147147. if (typeof opts === "undefined") {
  147148. return true;
  147149. } else {
  147150. return (0, _shallowEqual.default)(node, opts);
  147151. }
  147152. }
  147153. return false;
  147154. }
  147155. function isNumericLiteral(node, opts) {
  147156. if (!node)
  147157. return false;
  147158. const nodeType = node.type;
  147159. if (nodeType === "NumericLiteral") {
  147160. if (typeof opts === "undefined") {
  147161. return true;
  147162. } else {
  147163. return (0, _shallowEqual.default)(node, opts);
  147164. }
  147165. }
  147166. return false;
  147167. }
  147168. function isNullLiteral(node, opts) {
  147169. if (!node)
  147170. return false;
  147171. const nodeType = node.type;
  147172. if (nodeType === "NullLiteral") {
  147173. if (typeof opts === "undefined") {
  147174. return true;
  147175. } else {
  147176. return (0, _shallowEqual.default)(node, opts);
  147177. }
  147178. }
  147179. return false;
  147180. }
  147181. function isBooleanLiteral2(node, opts) {
  147182. if (!node)
  147183. return false;
  147184. const nodeType = node.type;
  147185. if (nodeType === "BooleanLiteral") {
  147186. if (typeof opts === "undefined") {
  147187. return true;
  147188. } else {
  147189. return (0, _shallowEqual.default)(node, opts);
  147190. }
  147191. }
  147192. return false;
  147193. }
  147194. function isRegExpLiteral(node, opts) {
  147195. if (!node)
  147196. return false;
  147197. const nodeType = node.type;
  147198. if (nodeType === "RegExpLiteral") {
  147199. if (typeof opts === "undefined") {
  147200. return true;
  147201. } else {
  147202. return (0, _shallowEqual.default)(node, opts);
  147203. }
  147204. }
  147205. return false;
  147206. }
  147207. function isLogicalExpression(node, opts) {
  147208. if (!node)
  147209. return false;
  147210. const nodeType = node.type;
  147211. if (nodeType === "LogicalExpression") {
  147212. if (typeof opts === "undefined") {
  147213. return true;
  147214. } else {
  147215. return (0, _shallowEqual.default)(node, opts);
  147216. }
  147217. }
  147218. return false;
  147219. }
  147220. function isMemberExpression(node, opts) {
  147221. if (!node)
  147222. return false;
  147223. const nodeType = node.type;
  147224. if (nodeType === "MemberExpression") {
  147225. if (typeof opts === "undefined") {
  147226. return true;
  147227. } else {
  147228. return (0, _shallowEqual.default)(node, opts);
  147229. }
  147230. }
  147231. return false;
  147232. }
  147233. function isNewExpression(node, opts) {
  147234. if (!node)
  147235. return false;
  147236. const nodeType = node.type;
  147237. if (nodeType === "NewExpression") {
  147238. if (typeof opts === "undefined") {
  147239. return true;
  147240. } else {
  147241. return (0, _shallowEqual.default)(node, opts);
  147242. }
  147243. }
  147244. return false;
  147245. }
  147246. function isProgram(node, opts) {
  147247. if (!node)
  147248. return false;
  147249. const nodeType = node.type;
  147250. if (nodeType === "Program") {
  147251. if (typeof opts === "undefined") {
  147252. return true;
  147253. } else {
  147254. return (0, _shallowEqual.default)(node, opts);
  147255. }
  147256. }
  147257. return false;
  147258. }
  147259. function isObjectExpression(node, opts) {
  147260. if (!node)
  147261. return false;
  147262. const nodeType = node.type;
  147263. if (nodeType === "ObjectExpression") {
  147264. if (typeof opts === "undefined") {
  147265. return true;
  147266. } else {
  147267. return (0, _shallowEqual.default)(node, opts);
  147268. }
  147269. }
  147270. return false;
  147271. }
  147272. function isObjectMethod(node, opts) {
  147273. if (!node)
  147274. return false;
  147275. const nodeType = node.type;
  147276. if (nodeType === "ObjectMethod") {
  147277. if (typeof opts === "undefined") {
  147278. return true;
  147279. } else {
  147280. return (0, _shallowEqual.default)(node, opts);
  147281. }
  147282. }
  147283. return false;
  147284. }
  147285. function isObjectProperty(node, opts) {
  147286. if (!node)
  147287. return false;
  147288. const nodeType = node.type;
  147289. if (nodeType === "ObjectProperty") {
  147290. if (typeof opts === "undefined") {
  147291. return true;
  147292. } else {
  147293. return (0, _shallowEqual.default)(node, opts);
  147294. }
  147295. }
  147296. return false;
  147297. }
  147298. function isRestElement(node, opts) {
  147299. if (!node)
  147300. return false;
  147301. const nodeType = node.type;
  147302. if (nodeType === "RestElement") {
  147303. if (typeof opts === "undefined") {
  147304. return true;
  147305. } else {
  147306. return (0, _shallowEqual.default)(node, opts);
  147307. }
  147308. }
  147309. return false;
  147310. }
  147311. function isReturnStatement(node, opts) {
  147312. if (!node)
  147313. return false;
  147314. const nodeType = node.type;
  147315. if (nodeType === "ReturnStatement") {
  147316. if (typeof opts === "undefined") {
  147317. return true;
  147318. } else {
  147319. return (0, _shallowEqual.default)(node, opts);
  147320. }
  147321. }
  147322. return false;
  147323. }
  147324. function isSequenceExpression(node, opts) {
  147325. if (!node)
  147326. return false;
  147327. const nodeType = node.type;
  147328. if (nodeType === "SequenceExpression") {
  147329. if (typeof opts === "undefined") {
  147330. return true;
  147331. } else {
  147332. return (0, _shallowEqual.default)(node, opts);
  147333. }
  147334. }
  147335. return false;
  147336. }
  147337. function isParenthesizedExpression(node, opts) {
  147338. if (!node)
  147339. return false;
  147340. const nodeType = node.type;
  147341. if (nodeType === "ParenthesizedExpression") {
  147342. if (typeof opts === "undefined") {
  147343. return true;
  147344. } else {
  147345. return (0, _shallowEqual.default)(node, opts);
  147346. }
  147347. }
  147348. return false;
  147349. }
  147350. function isSwitchCase(node, opts) {
  147351. if (!node)
  147352. return false;
  147353. const nodeType = node.type;
  147354. if (nodeType === "SwitchCase") {
  147355. if (typeof opts === "undefined") {
  147356. return true;
  147357. } else {
  147358. return (0, _shallowEqual.default)(node, opts);
  147359. }
  147360. }
  147361. return false;
  147362. }
  147363. function isSwitchStatement(node, opts) {
  147364. if (!node)
  147365. return false;
  147366. const nodeType = node.type;
  147367. if (nodeType === "SwitchStatement") {
  147368. if (typeof opts === "undefined") {
  147369. return true;
  147370. } else {
  147371. return (0, _shallowEqual.default)(node, opts);
  147372. }
  147373. }
  147374. return false;
  147375. }
  147376. function isThisExpression(node, opts) {
  147377. if (!node)
  147378. return false;
  147379. const nodeType = node.type;
  147380. if (nodeType === "ThisExpression") {
  147381. if (typeof opts === "undefined") {
  147382. return true;
  147383. } else {
  147384. return (0, _shallowEqual.default)(node, opts);
  147385. }
  147386. }
  147387. return false;
  147388. }
  147389. function isThrowStatement(node, opts) {
  147390. if (!node)
  147391. return false;
  147392. const nodeType = node.type;
  147393. if (nodeType === "ThrowStatement") {
  147394. if (typeof opts === "undefined") {
  147395. return true;
  147396. } else {
  147397. return (0, _shallowEqual.default)(node, opts);
  147398. }
  147399. }
  147400. return false;
  147401. }
  147402. function isTryStatement(node, opts) {
  147403. if (!node)
  147404. return false;
  147405. const nodeType = node.type;
  147406. if (nodeType === "TryStatement") {
  147407. if (typeof opts === "undefined") {
  147408. return true;
  147409. } else {
  147410. return (0, _shallowEqual.default)(node, opts);
  147411. }
  147412. }
  147413. return false;
  147414. }
  147415. function isUnaryExpression(node, opts) {
  147416. if (!node)
  147417. return false;
  147418. const nodeType = node.type;
  147419. if (nodeType === "UnaryExpression") {
  147420. if (typeof opts === "undefined") {
  147421. return true;
  147422. } else {
  147423. return (0, _shallowEqual.default)(node, opts);
  147424. }
  147425. }
  147426. return false;
  147427. }
  147428. function isUpdateExpression(node, opts) {
  147429. if (!node)
  147430. return false;
  147431. const nodeType = node.type;
  147432. if (nodeType === "UpdateExpression") {
  147433. if (typeof opts === "undefined") {
  147434. return true;
  147435. } else {
  147436. return (0, _shallowEqual.default)(node, opts);
  147437. }
  147438. }
  147439. return false;
  147440. }
  147441. function isVariableDeclaration(node, opts) {
  147442. if (!node)
  147443. return false;
  147444. const nodeType = node.type;
  147445. if (nodeType === "VariableDeclaration") {
  147446. if (typeof opts === "undefined") {
  147447. return true;
  147448. } else {
  147449. return (0, _shallowEqual.default)(node, opts);
  147450. }
  147451. }
  147452. return false;
  147453. }
  147454. function isVariableDeclarator(node, opts) {
  147455. if (!node)
  147456. return false;
  147457. const nodeType = node.type;
  147458. if (nodeType === "VariableDeclarator") {
  147459. if (typeof opts === "undefined") {
  147460. return true;
  147461. } else {
  147462. return (0, _shallowEqual.default)(node, opts);
  147463. }
  147464. }
  147465. return false;
  147466. }
  147467. function isWhileStatement(node, opts) {
  147468. if (!node)
  147469. return false;
  147470. const nodeType = node.type;
  147471. if (nodeType === "WhileStatement") {
  147472. if (typeof opts === "undefined") {
  147473. return true;
  147474. } else {
  147475. return (0, _shallowEqual.default)(node, opts);
  147476. }
  147477. }
  147478. return false;
  147479. }
  147480. function isWithStatement(node, opts) {
  147481. if (!node)
  147482. return false;
  147483. const nodeType = node.type;
  147484. if (nodeType === "WithStatement") {
  147485. if (typeof opts === "undefined") {
  147486. return true;
  147487. } else {
  147488. return (0, _shallowEqual.default)(node, opts);
  147489. }
  147490. }
  147491. return false;
  147492. }
  147493. function isAssignmentPattern(node, opts) {
  147494. if (!node)
  147495. return false;
  147496. const nodeType = node.type;
  147497. if (nodeType === "AssignmentPattern") {
  147498. if (typeof opts === "undefined") {
  147499. return true;
  147500. } else {
  147501. return (0, _shallowEqual.default)(node, opts);
  147502. }
  147503. }
  147504. return false;
  147505. }
  147506. function isArrayPattern(node, opts) {
  147507. if (!node)
  147508. return false;
  147509. const nodeType = node.type;
  147510. if (nodeType === "ArrayPattern") {
  147511. if (typeof opts === "undefined") {
  147512. return true;
  147513. } else {
  147514. return (0, _shallowEqual.default)(node, opts);
  147515. }
  147516. }
  147517. return false;
  147518. }
  147519. function isArrowFunctionExpression(node, opts) {
  147520. if (!node)
  147521. return false;
  147522. const nodeType = node.type;
  147523. if (nodeType === "ArrowFunctionExpression") {
  147524. if (typeof opts === "undefined") {
  147525. return true;
  147526. } else {
  147527. return (0, _shallowEqual.default)(node, opts);
  147528. }
  147529. }
  147530. return false;
  147531. }
  147532. function isClassBody(node, opts) {
  147533. if (!node)
  147534. return false;
  147535. const nodeType = node.type;
  147536. if (nodeType === "ClassBody") {
  147537. if (typeof opts === "undefined") {
  147538. return true;
  147539. } else {
  147540. return (0, _shallowEqual.default)(node, opts);
  147541. }
  147542. }
  147543. return false;
  147544. }
  147545. function isClassExpression(node, opts) {
  147546. if (!node)
  147547. return false;
  147548. const nodeType = node.type;
  147549. if (nodeType === "ClassExpression") {
  147550. if (typeof opts === "undefined") {
  147551. return true;
  147552. } else {
  147553. return (0, _shallowEqual.default)(node, opts);
  147554. }
  147555. }
  147556. return false;
  147557. }
  147558. function isClassDeclaration(node, opts) {
  147559. if (!node)
  147560. return false;
  147561. const nodeType = node.type;
  147562. if (nodeType === "ClassDeclaration") {
  147563. if (typeof opts === "undefined") {
  147564. return true;
  147565. } else {
  147566. return (0, _shallowEqual.default)(node, opts);
  147567. }
  147568. }
  147569. return false;
  147570. }
  147571. function isExportAllDeclaration(node, opts) {
  147572. if (!node)
  147573. return false;
  147574. const nodeType = node.type;
  147575. if (nodeType === "ExportAllDeclaration") {
  147576. if (typeof opts === "undefined") {
  147577. return true;
  147578. } else {
  147579. return (0, _shallowEqual.default)(node, opts);
  147580. }
  147581. }
  147582. return false;
  147583. }
  147584. function isExportDefaultDeclaration(node, opts) {
  147585. if (!node)
  147586. return false;
  147587. const nodeType = node.type;
  147588. if (nodeType === "ExportDefaultDeclaration") {
  147589. if (typeof opts === "undefined") {
  147590. return true;
  147591. } else {
  147592. return (0, _shallowEqual.default)(node, opts);
  147593. }
  147594. }
  147595. return false;
  147596. }
  147597. function isExportNamedDeclaration(node, opts) {
  147598. if (!node)
  147599. return false;
  147600. const nodeType = node.type;
  147601. if (nodeType === "ExportNamedDeclaration") {
  147602. if (typeof opts === "undefined") {
  147603. return true;
  147604. } else {
  147605. return (0, _shallowEqual.default)(node, opts);
  147606. }
  147607. }
  147608. return false;
  147609. }
  147610. function isExportSpecifier(node, opts) {
  147611. if (!node)
  147612. return false;
  147613. const nodeType = node.type;
  147614. if (nodeType === "ExportSpecifier") {
  147615. if (typeof opts === "undefined") {
  147616. return true;
  147617. } else {
  147618. return (0, _shallowEqual.default)(node, opts);
  147619. }
  147620. }
  147621. return false;
  147622. }
  147623. function isForOfStatement(node, opts) {
  147624. if (!node)
  147625. return false;
  147626. const nodeType = node.type;
  147627. if (nodeType === "ForOfStatement") {
  147628. if (typeof opts === "undefined") {
  147629. return true;
  147630. } else {
  147631. return (0, _shallowEqual.default)(node, opts);
  147632. }
  147633. }
  147634. return false;
  147635. }
  147636. function isImportDeclaration(node, opts) {
  147637. if (!node)
  147638. return false;
  147639. const nodeType = node.type;
  147640. if (nodeType === "ImportDeclaration") {
  147641. if (typeof opts === "undefined") {
  147642. return true;
  147643. } else {
  147644. return (0, _shallowEqual.default)(node, opts);
  147645. }
  147646. }
  147647. return false;
  147648. }
  147649. function isImportDefaultSpecifier(node, opts) {
  147650. if (!node)
  147651. return false;
  147652. const nodeType = node.type;
  147653. if (nodeType === "ImportDefaultSpecifier") {
  147654. if (typeof opts === "undefined") {
  147655. return true;
  147656. } else {
  147657. return (0, _shallowEqual.default)(node, opts);
  147658. }
  147659. }
  147660. return false;
  147661. }
  147662. function isImportNamespaceSpecifier(node, opts) {
  147663. if (!node)
  147664. return false;
  147665. const nodeType = node.type;
  147666. if (nodeType === "ImportNamespaceSpecifier") {
  147667. if (typeof opts === "undefined") {
  147668. return true;
  147669. } else {
  147670. return (0, _shallowEqual.default)(node, opts);
  147671. }
  147672. }
  147673. return false;
  147674. }
  147675. function isImportSpecifier(node, opts) {
  147676. if (!node)
  147677. return false;
  147678. const nodeType = node.type;
  147679. if (nodeType === "ImportSpecifier") {
  147680. if (typeof opts === "undefined") {
  147681. return true;
  147682. } else {
  147683. return (0, _shallowEqual.default)(node, opts);
  147684. }
  147685. }
  147686. return false;
  147687. }
  147688. function isMetaProperty(node, opts) {
  147689. if (!node)
  147690. return false;
  147691. const nodeType = node.type;
  147692. if (nodeType === "MetaProperty") {
  147693. if (typeof opts === "undefined") {
  147694. return true;
  147695. } else {
  147696. return (0, _shallowEqual.default)(node, opts);
  147697. }
  147698. }
  147699. return false;
  147700. }
  147701. function isClassMethod(node, opts) {
  147702. if (!node)
  147703. return false;
  147704. const nodeType = node.type;
  147705. if (nodeType === "ClassMethod") {
  147706. if (typeof opts === "undefined") {
  147707. return true;
  147708. } else {
  147709. return (0, _shallowEqual.default)(node, opts);
  147710. }
  147711. }
  147712. return false;
  147713. }
  147714. function isObjectPattern(node, opts) {
  147715. if (!node)
  147716. return false;
  147717. const nodeType = node.type;
  147718. if (nodeType === "ObjectPattern") {
  147719. if (typeof opts === "undefined") {
  147720. return true;
  147721. } else {
  147722. return (0, _shallowEqual.default)(node, opts);
  147723. }
  147724. }
  147725. return false;
  147726. }
  147727. function isSpreadElement(node, opts) {
  147728. if (!node)
  147729. return false;
  147730. const nodeType = node.type;
  147731. if (nodeType === "SpreadElement") {
  147732. if (typeof opts === "undefined") {
  147733. return true;
  147734. } else {
  147735. return (0, _shallowEqual.default)(node, opts);
  147736. }
  147737. }
  147738. return false;
  147739. }
  147740. function isSuper(node, opts) {
  147741. if (!node)
  147742. return false;
  147743. const nodeType = node.type;
  147744. if (nodeType === "Super") {
  147745. if (typeof opts === "undefined") {
  147746. return true;
  147747. } else {
  147748. return (0, _shallowEqual.default)(node, opts);
  147749. }
  147750. }
  147751. return false;
  147752. }
  147753. function isTaggedTemplateExpression(node, opts) {
  147754. if (!node)
  147755. return false;
  147756. const nodeType = node.type;
  147757. if (nodeType === "TaggedTemplateExpression") {
  147758. if (typeof opts === "undefined") {
  147759. return true;
  147760. } else {
  147761. return (0, _shallowEqual.default)(node, opts);
  147762. }
  147763. }
  147764. return false;
  147765. }
  147766. function isTemplateElement(node, opts) {
  147767. if (!node)
  147768. return false;
  147769. const nodeType = node.type;
  147770. if (nodeType === "TemplateElement") {
  147771. if (typeof opts === "undefined") {
  147772. return true;
  147773. } else {
  147774. return (0, _shallowEqual.default)(node, opts);
  147775. }
  147776. }
  147777. return false;
  147778. }
  147779. function isTemplateLiteral(node, opts) {
  147780. if (!node)
  147781. return false;
  147782. const nodeType = node.type;
  147783. if (nodeType === "TemplateLiteral") {
  147784. if (typeof opts === "undefined") {
  147785. return true;
  147786. } else {
  147787. return (0, _shallowEqual.default)(node, opts);
  147788. }
  147789. }
  147790. return false;
  147791. }
  147792. function isYieldExpression(node, opts) {
  147793. if (!node)
  147794. return false;
  147795. const nodeType = node.type;
  147796. if (nodeType === "YieldExpression") {
  147797. if (typeof opts === "undefined") {
  147798. return true;
  147799. } else {
  147800. return (0, _shallowEqual.default)(node, opts);
  147801. }
  147802. }
  147803. return false;
  147804. }
  147805. function isAwaitExpression(node, opts) {
  147806. if (!node)
  147807. return false;
  147808. const nodeType = node.type;
  147809. if (nodeType === "AwaitExpression") {
  147810. if (typeof opts === "undefined") {
  147811. return true;
  147812. } else {
  147813. return (0, _shallowEqual.default)(node, opts);
  147814. }
  147815. }
  147816. return false;
  147817. }
  147818. function isImport(node, opts) {
  147819. if (!node)
  147820. return false;
  147821. const nodeType = node.type;
  147822. if (nodeType === "Import") {
  147823. if (typeof opts === "undefined") {
  147824. return true;
  147825. } else {
  147826. return (0, _shallowEqual.default)(node, opts);
  147827. }
  147828. }
  147829. return false;
  147830. }
  147831. function isBigIntLiteral(node, opts) {
  147832. if (!node)
  147833. return false;
  147834. const nodeType = node.type;
  147835. if (nodeType === "BigIntLiteral") {
  147836. if (typeof opts === "undefined") {
  147837. return true;
  147838. } else {
  147839. return (0, _shallowEqual.default)(node, opts);
  147840. }
  147841. }
  147842. return false;
  147843. }
  147844. function isExportNamespaceSpecifier(node, opts) {
  147845. if (!node)
  147846. return false;
  147847. const nodeType = node.type;
  147848. if (nodeType === "ExportNamespaceSpecifier") {
  147849. if (typeof opts === "undefined") {
  147850. return true;
  147851. } else {
  147852. return (0, _shallowEqual.default)(node, opts);
  147853. }
  147854. }
  147855. return false;
  147856. }
  147857. function isOptionalMemberExpression(node, opts) {
  147858. if (!node)
  147859. return false;
  147860. const nodeType = node.type;
  147861. if (nodeType === "OptionalMemberExpression") {
  147862. if (typeof opts === "undefined") {
  147863. return true;
  147864. } else {
  147865. return (0, _shallowEqual.default)(node, opts);
  147866. }
  147867. }
  147868. return false;
  147869. }
  147870. function isOptionalCallExpression(node, opts) {
  147871. if (!node)
  147872. return false;
  147873. const nodeType = node.type;
  147874. if (nodeType === "OptionalCallExpression") {
  147875. if (typeof opts === "undefined") {
  147876. return true;
  147877. } else {
  147878. return (0, _shallowEqual.default)(node, opts);
  147879. }
  147880. }
  147881. return false;
  147882. }
  147883. function isAnyTypeAnnotation(node, opts) {
  147884. if (!node)
  147885. return false;
  147886. const nodeType = node.type;
  147887. if (nodeType === "AnyTypeAnnotation") {
  147888. if (typeof opts === "undefined") {
  147889. return true;
  147890. } else {
  147891. return (0, _shallowEqual.default)(node, opts);
  147892. }
  147893. }
  147894. return false;
  147895. }
  147896. function isArrayTypeAnnotation(node, opts) {
  147897. if (!node)
  147898. return false;
  147899. const nodeType = node.type;
  147900. if (nodeType === "ArrayTypeAnnotation") {
  147901. if (typeof opts === "undefined") {
  147902. return true;
  147903. } else {
  147904. return (0, _shallowEqual.default)(node, opts);
  147905. }
  147906. }
  147907. return false;
  147908. }
  147909. function isBooleanTypeAnnotation(node, opts) {
  147910. if (!node)
  147911. return false;
  147912. const nodeType = node.type;
  147913. if (nodeType === "BooleanTypeAnnotation") {
  147914. if (typeof opts === "undefined") {
  147915. return true;
  147916. } else {
  147917. return (0, _shallowEqual.default)(node, opts);
  147918. }
  147919. }
  147920. return false;
  147921. }
  147922. function isBooleanLiteralTypeAnnotation(node, opts) {
  147923. if (!node)
  147924. return false;
  147925. const nodeType = node.type;
  147926. if (nodeType === "BooleanLiteralTypeAnnotation") {
  147927. if (typeof opts === "undefined") {
  147928. return true;
  147929. } else {
  147930. return (0, _shallowEqual.default)(node, opts);
  147931. }
  147932. }
  147933. return false;
  147934. }
  147935. function isNullLiteralTypeAnnotation(node, opts) {
  147936. if (!node)
  147937. return false;
  147938. const nodeType = node.type;
  147939. if (nodeType === "NullLiteralTypeAnnotation") {
  147940. if (typeof opts === "undefined") {
  147941. return true;
  147942. } else {
  147943. return (0, _shallowEqual.default)(node, opts);
  147944. }
  147945. }
  147946. return false;
  147947. }
  147948. function isClassImplements(node, opts) {
  147949. if (!node)
  147950. return false;
  147951. const nodeType = node.type;
  147952. if (nodeType === "ClassImplements") {
  147953. if (typeof opts === "undefined") {
  147954. return true;
  147955. } else {
  147956. return (0, _shallowEqual.default)(node, opts);
  147957. }
  147958. }
  147959. return false;
  147960. }
  147961. function isDeclareClass(node, opts) {
  147962. if (!node)
  147963. return false;
  147964. const nodeType = node.type;
  147965. if (nodeType === "DeclareClass") {
  147966. if (typeof opts === "undefined") {
  147967. return true;
  147968. } else {
  147969. return (0, _shallowEqual.default)(node, opts);
  147970. }
  147971. }
  147972. return false;
  147973. }
  147974. function isDeclareFunction(node, opts) {
  147975. if (!node)
  147976. return false;
  147977. const nodeType = node.type;
  147978. if (nodeType === "DeclareFunction") {
  147979. if (typeof opts === "undefined") {
  147980. return true;
  147981. } else {
  147982. return (0, _shallowEqual.default)(node, opts);
  147983. }
  147984. }
  147985. return false;
  147986. }
  147987. function isDeclareInterface(node, opts) {
  147988. if (!node)
  147989. return false;
  147990. const nodeType = node.type;
  147991. if (nodeType === "DeclareInterface") {
  147992. if (typeof opts === "undefined") {
  147993. return true;
  147994. } else {
  147995. return (0, _shallowEqual.default)(node, opts);
  147996. }
  147997. }
  147998. return false;
  147999. }
  148000. function isDeclareModule(node, opts) {
  148001. if (!node)
  148002. return false;
  148003. const nodeType = node.type;
  148004. if (nodeType === "DeclareModule") {
  148005. if (typeof opts === "undefined") {
  148006. return true;
  148007. } else {
  148008. return (0, _shallowEqual.default)(node, opts);
  148009. }
  148010. }
  148011. return false;
  148012. }
  148013. function isDeclareModuleExports(node, opts) {
  148014. if (!node)
  148015. return false;
  148016. const nodeType = node.type;
  148017. if (nodeType === "DeclareModuleExports") {
  148018. if (typeof opts === "undefined") {
  148019. return true;
  148020. } else {
  148021. return (0, _shallowEqual.default)(node, opts);
  148022. }
  148023. }
  148024. return false;
  148025. }
  148026. function isDeclareTypeAlias(node, opts) {
  148027. if (!node)
  148028. return false;
  148029. const nodeType = node.type;
  148030. if (nodeType === "DeclareTypeAlias") {
  148031. if (typeof opts === "undefined") {
  148032. return true;
  148033. } else {
  148034. return (0, _shallowEqual.default)(node, opts);
  148035. }
  148036. }
  148037. return false;
  148038. }
  148039. function isDeclareOpaqueType(node, opts) {
  148040. if (!node)
  148041. return false;
  148042. const nodeType = node.type;
  148043. if (nodeType === "DeclareOpaqueType") {
  148044. if (typeof opts === "undefined") {
  148045. return true;
  148046. } else {
  148047. return (0, _shallowEqual.default)(node, opts);
  148048. }
  148049. }
  148050. return false;
  148051. }
  148052. function isDeclareVariable(node, opts) {
  148053. if (!node)
  148054. return false;
  148055. const nodeType = node.type;
  148056. if (nodeType === "DeclareVariable") {
  148057. if (typeof opts === "undefined") {
  148058. return true;
  148059. } else {
  148060. return (0, _shallowEqual.default)(node, opts);
  148061. }
  148062. }
  148063. return false;
  148064. }
  148065. function isDeclareExportDeclaration(node, opts) {
  148066. if (!node)
  148067. return false;
  148068. const nodeType = node.type;
  148069. if (nodeType === "DeclareExportDeclaration") {
  148070. if (typeof opts === "undefined") {
  148071. return true;
  148072. } else {
  148073. return (0, _shallowEqual.default)(node, opts);
  148074. }
  148075. }
  148076. return false;
  148077. }
  148078. function isDeclareExportAllDeclaration(node, opts) {
  148079. if (!node)
  148080. return false;
  148081. const nodeType = node.type;
  148082. if (nodeType === "DeclareExportAllDeclaration") {
  148083. if (typeof opts === "undefined") {
  148084. return true;
  148085. } else {
  148086. return (0, _shallowEqual.default)(node, opts);
  148087. }
  148088. }
  148089. return false;
  148090. }
  148091. function isDeclaredPredicate(node, opts) {
  148092. if (!node)
  148093. return false;
  148094. const nodeType = node.type;
  148095. if (nodeType === "DeclaredPredicate") {
  148096. if (typeof opts === "undefined") {
  148097. return true;
  148098. } else {
  148099. return (0, _shallowEqual.default)(node, opts);
  148100. }
  148101. }
  148102. return false;
  148103. }
  148104. function isExistsTypeAnnotation(node, opts) {
  148105. if (!node)
  148106. return false;
  148107. const nodeType = node.type;
  148108. if (nodeType === "ExistsTypeAnnotation") {
  148109. if (typeof opts === "undefined") {
  148110. return true;
  148111. } else {
  148112. return (0, _shallowEqual.default)(node, opts);
  148113. }
  148114. }
  148115. return false;
  148116. }
  148117. function isFunctionTypeAnnotation(node, opts) {
  148118. if (!node)
  148119. return false;
  148120. const nodeType = node.type;
  148121. if (nodeType === "FunctionTypeAnnotation") {
  148122. if (typeof opts === "undefined") {
  148123. return true;
  148124. } else {
  148125. return (0, _shallowEqual.default)(node, opts);
  148126. }
  148127. }
  148128. return false;
  148129. }
  148130. function isFunctionTypeParam(node, opts) {
  148131. if (!node)
  148132. return false;
  148133. const nodeType = node.type;
  148134. if (nodeType === "FunctionTypeParam") {
  148135. if (typeof opts === "undefined") {
  148136. return true;
  148137. } else {
  148138. return (0, _shallowEqual.default)(node, opts);
  148139. }
  148140. }
  148141. return false;
  148142. }
  148143. function isGenericTypeAnnotation(node, opts) {
  148144. if (!node)
  148145. return false;
  148146. const nodeType = node.type;
  148147. if (nodeType === "GenericTypeAnnotation") {
  148148. if (typeof opts === "undefined") {
  148149. return true;
  148150. } else {
  148151. return (0, _shallowEqual.default)(node, opts);
  148152. }
  148153. }
  148154. return false;
  148155. }
  148156. function isInferredPredicate(node, opts) {
  148157. if (!node)
  148158. return false;
  148159. const nodeType = node.type;
  148160. if (nodeType === "InferredPredicate") {
  148161. if (typeof opts === "undefined") {
  148162. return true;
  148163. } else {
  148164. return (0, _shallowEqual.default)(node, opts);
  148165. }
  148166. }
  148167. return false;
  148168. }
  148169. function isInterfaceExtends(node, opts) {
  148170. if (!node)
  148171. return false;
  148172. const nodeType = node.type;
  148173. if (nodeType === "InterfaceExtends") {
  148174. if (typeof opts === "undefined") {
  148175. return true;
  148176. } else {
  148177. return (0, _shallowEqual.default)(node, opts);
  148178. }
  148179. }
  148180. return false;
  148181. }
  148182. function isInterfaceDeclaration(node, opts) {
  148183. if (!node)
  148184. return false;
  148185. const nodeType = node.type;
  148186. if (nodeType === "InterfaceDeclaration") {
  148187. if (typeof opts === "undefined") {
  148188. return true;
  148189. } else {
  148190. return (0, _shallowEqual.default)(node, opts);
  148191. }
  148192. }
  148193. return false;
  148194. }
  148195. function isInterfaceTypeAnnotation(node, opts) {
  148196. if (!node)
  148197. return false;
  148198. const nodeType = node.type;
  148199. if (nodeType === "InterfaceTypeAnnotation") {
  148200. if (typeof opts === "undefined") {
  148201. return true;
  148202. } else {
  148203. return (0, _shallowEqual.default)(node, opts);
  148204. }
  148205. }
  148206. return false;
  148207. }
  148208. function isIntersectionTypeAnnotation(node, opts) {
  148209. if (!node)
  148210. return false;
  148211. const nodeType = node.type;
  148212. if (nodeType === "IntersectionTypeAnnotation") {
  148213. if (typeof opts === "undefined") {
  148214. return true;
  148215. } else {
  148216. return (0, _shallowEqual.default)(node, opts);
  148217. }
  148218. }
  148219. return false;
  148220. }
  148221. function isMixedTypeAnnotation(node, opts) {
  148222. if (!node)
  148223. return false;
  148224. const nodeType = node.type;
  148225. if (nodeType === "MixedTypeAnnotation") {
  148226. if (typeof opts === "undefined") {
  148227. return true;
  148228. } else {
  148229. return (0, _shallowEqual.default)(node, opts);
  148230. }
  148231. }
  148232. return false;
  148233. }
  148234. function isEmptyTypeAnnotation(node, opts) {
  148235. if (!node)
  148236. return false;
  148237. const nodeType = node.type;
  148238. if (nodeType === "EmptyTypeAnnotation") {
  148239. if (typeof opts === "undefined") {
  148240. return true;
  148241. } else {
  148242. return (0, _shallowEqual.default)(node, opts);
  148243. }
  148244. }
  148245. return false;
  148246. }
  148247. function isNullableTypeAnnotation(node, opts) {
  148248. if (!node)
  148249. return false;
  148250. const nodeType = node.type;
  148251. if (nodeType === "NullableTypeAnnotation") {
  148252. if (typeof opts === "undefined") {
  148253. return true;
  148254. } else {
  148255. return (0, _shallowEqual.default)(node, opts);
  148256. }
  148257. }
  148258. return false;
  148259. }
  148260. function isNumberLiteralTypeAnnotation(node, opts) {
  148261. if (!node)
  148262. return false;
  148263. const nodeType = node.type;
  148264. if (nodeType === "NumberLiteralTypeAnnotation") {
  148265. if (typeof opts === "undefined") {
  148266. return true;
  148267. } else {
  148268. return (0, _shallowEqual.default)(node, opts);
  148269. }
  148270. }
  148271. return false;
  148272. }
  148273. function isNumberTypeAnnotation(node, opts) {
  148274. if (!node)
  148275. return false;
  148276. const nodeType = node.type;
  148277. if (nodeType === "NumberTypeAnnotation") {
  148278. if (typeof opts === "undefined") {
  148279. return true;
  148280. } else {
  148281. return (0, _shallowEqual.default)(node, opts);
  148282. }
  148283. }
  148284. return false;
  148285. }
  148286. function isObjectTypeAnnotation(node, opts) {
  148287. if (!node)
  148288. return false;
  148289. const nodeType = node.type;
  148290. if (nodeType === "ObjectTypeAnnotation") {
  148291. if (typeof opts === "undefined") {
  148292. return true;
  148293. } else {
  148294. return (0, _shallowEqual.default)(node, opts);
  148295. }
  148296. }
  148297. return false;
  148298. }
  148299. function isObjectTypeInternalSlot(node, opts) {
  148300. if (!node)
  148301. return false;
  148302. const nodeType = node.type;
  148303. if (nodeType === "ObjectTypeInternalSlot") {
  148304. if (typeof opts === "undefined") {
  148305. return true;
  148306. } else {
  148307. return (0, _shallowEqual.default)(node, opts);
  148308. }
  148309. }
  148310. return false;
  148311. }
  148312. function isObjectTypeCallProperty(node, opts) {
  148313. if (!node)
  148314. return false;
  148315. const nodeType = node.type;
  148316. if (nodeType === "ObjectTypeCallProperty") {
  148317. if (typeof opts === "undefined") {
  148318. return true;
  148319. } else {
  148320. return (0, _shallowEqual.default)(node, opts);
  148321. }
  148322. }
  148323. return false;
  148324. }
  148325. function isObjectTypeIndexer(node, opts) {
  148326. if (!node)
  148327. return false;
  148328. const nodeType = node.type;
  148329. if (nodeType === "ObjectTypeIndexer") {
  148330. if (typeof opts === "undefined") {
  148331. return true;
  148332. } else {
  148333. return (0, _shallowEqual.default)(node, opts);
  148334. }
  148335. }
  148336. return false;
  148337. }
  148338. function isObjectTypeProperty(node, opts) {
  148339. if (!node)
  148340. return false;
  148341. const nodeType = node.type;
  148342. if (nodeType === "ObjectTypeProperty") {
  148343. if (typeof opts === "undefined") {
  148344. return true;
  148345. } else {
  148346. return (0, _shallowEqual.default)(node, opts);
  148347. }
  148348. }
  148349. return false;
  148350. }
  148351. function isObjectTypeSpreadProperty(node, opts) {
  148352. if (!node)
  148353. return false;
  148354. const nodeType = node.type;
  148355. if (nodeType === "ObjectTypeSpreadProperty") {
  148356. if (typeof opts === "undefined") {
  148357. return true;
  148358. } else {
  148359. return (0, _shallowEqual.default)(node, opts);
  148360. }
  148361. }
  148362. return false;
  148363. }
  148364. function isOpaqueType(node, opts) {
  148365. if (!node)
  148366. return false;
  148367. const nodeType = node.type;
  148368. if (nodeType === "OpaqueType") {
  148369. if (typeof opts === "undefined") {
  148370. return true;
  148371. } else {
  148372. return (0, _shallowEqual.default)(node, opts);
  148373. }
  148374. }
  148375. return false;
  148376. }
  148377. function isQualifiedTypeIdentifier(node, opts) {
  148378. if (!node)
  148379. return false;
  148380. const nodeType = node.type;
  148381. if (nodeType === "QualifiedTypeIdentifier") {
  148382. if (typeof opts === "undefined") {
  148383. return true;
  148384. } else {
  148385. return (0, _shallowEqual.default)(node, opts);
  148386. }
  148387. }
  148388. return false;
  148389. }
  148390. function isStringLiteralTypeAnnotation(node, opts) {
  148391. if (!node)
  148392. return false;
  148393. const nodeType = node.type;
  148394. if (nodeType === "StringLiteralTypeAnnotation") {
  148395. if (typeof opts === "undefined") {
  148396. return true;
  148397. } else {
  148398. return (0, _shallowEqual.default)(node, opts);
  148399. }
  148400. }
  148401. return false;
  148402. }
  148403. function isStringTypeAnnotation(node, opts) {
  148404. if (!node)
  148405. return false;
  148406. const nodeType = node.type;
  148407. if (nodeType === "StringTypeAnnotation") {
  148408. if (typeof opts === "undefined") {
  148409. return true;
  148410. } else {
  148411. return (0, _shallowEqual.default)(node, opts);
  148412. }
  148413. }
  148414. return false;
  148415. }
  148416. function isSymbolTypeAnnotation(node, opts) {
  148417. if (!node)
  148418. return false;
  148419. const nodeType = node.type;
  148420. if (nodeType === "SymbolTypeAnnotation") {
  148421. if (typeof opts === "undefined") {
  148422. return true;
  148423. } else {
  148424. return (0, _shallowEqual.default)(node, opts);
  148425. }
  148426. }
  148427. return false;
  148428. }
  148429. function isThisTypeAnnotation(node, opts) {
  148430. if (!node)
  148431. return false;
  148432. const nodeType = node.type;
  148433. if (nodeType === "ThisTypeAnnotation") {
  148434. if (typeof opts === "undefined") {
  148435. return true;
  148436. } else {
  148437. return (0, _shallowEqual.default)(node, opts);
  148438. }
  148439. }
  148440. return false;
  148441. }
  148442. function isTupleTypeAnnotation(node, opts) {
  148443. if (!node)
  148444. return false;
  148445. const nodeType = node.type;
  148446. if (nodeType === "TupleTypeAnnotation") {
  148447. if (typeof opts === "undefined") {
  148448. return true;
  148449. } else {
  148450. return (0, _shallowEqual.default)(node, opts);
  148451. }
  148452. }
  148453. return false;
  148454. }
  148455. function isTypeofTypeAnnotation(node, opts) {
  148456. if (!node)
  148457. return false;
  148458. const nodeType = node.type;
  148459. if (nodeType === "TypeofTypeAnnotation") {
  148460. if (typeof opts === "undefined") {
  148461. return true;
  148462. } else {
  148463. return (0, _shallowEqual.default)(node, opts);
  148464. }
  148465. }
  148466. return false;
  148467. }
  148468. function isTypeAlias(node, opts) {
  148469. if (!node)
  148470. return false;
  148471. const nodeType = node.type;
  148472. if (nodeType === "TypeAlias") {
  148473. if (typeof opts === "undefined") {
  148474. return true;
  148475. } else {
  148476. return (0, _shallowEqual.default)(node, opts);
  148477. }
  148478. }
  148479. return false;
  148480. }
  148481. function isTypeAnnotation(node, opts) {
  148482. if (!node)
  148483. return false;
  148484. const nodeType = node.type;
  148485. if (nodeType === "TypeAnnotation") {
  148486. if (typeof opts === "undefined") {
  148487. return true;
  148488. } else {
  148489. return (0, _shallowEqual.default)(node, opts);
  148490. }
  148491. }
  148492. return false;
  148493. }
  148494. function isTypeCastExpression(node, opts) {
  148495. if (!node)
  148496. return false;
  148497. const nodeType = node.type;
  148498. if (nodeType === "TypeCastExpression") {
  148499. if (typeof opts === "undefined") {
  148500. return true;
  148501. } else {
  148502. return (0, _shallowEqual.default)(node, opts);
  148503. }
  148504. }
  148505. return false;
  148506. }
  148507. function isTypeParameter(node, opts) {
  148508. if (!node)
  148509. return false;
  148510. const nodeType = node.type;
  148511. if (nodeType === "TypeParameter") {
  148512. if (typeof opts === "undefined") {
  148513. return true;
  148514. } else {
  148515. return (0, _shallowEqual.default)(node, opts);
  148516. }
  148517. }
  148518. return false;
  148519. }
  148520. function isTypeParameterDeclaration(node, opts) {
  148521. if (!node)
  148522. return false;
  148523. const nodeType = node.type;
  148524. if (nodeType === "TypeParameterDeclaration") {
  148525. if (typeof opts === "undefined") {
  148526. return true;
  148527. } else {
  148528. return (0, _shallowEqual.default)(node, opts);
  148529. }
  148530. }
  148531. return false;
  148532. }
  148533. function isTypeParameterInstantiation(node, opts) {
  148534. if (!node)
  148535. return false;
  148536. const nodeType = node.type;
  148537. if (nodeType === "TypeParameterInstantiation") {
  148538. if (typeof opts === "undefined") {
  148539. return true;
  148540. } else {
  148541. return (0, _shallowEqual.default)(node, opts);
  148542. }
  148543. }
  148544. return false;
  148545. }
  148546. function isUnionTypeAnnotation(node, opts) {
  148547. if (!node)
  148548. return false;
  148549. const nodeType = node.type;
  148550. if (nodeType === "UnionTypeAnnotation") {
  148551. if (typeof opts === "undefined") {
  148552. return true;
  148553. } else {
  148554. return (0, _shallowEqual.default)(node, opts);
  148555. }
  148556. }
  148557. return false;
  148558. }
  148559. function isVariance(node, opts) {
  148560. if (!node)
  148561. return false;
  148562. const nodeType = node.type;
  148563. if (nodeType === "Variance") {
  148564. if (typeof opts === "undefined") {
  148565. return true;
  148566. } else {
  148567. return (0, _shallowEqual.default)(node, opts);
  148568. }
  148569. }
  148570. return false;
  148571. }
  148572. function isVoidTypeAnnotation(node, opts) {
  148573. if (!node)
  148574. return false;
  148575. const nodeType = node.type;
  148576. if (nodeType === "VoidTypeAnnotation") {
  148577. if (typeof opts === "undefined") {
  148578. return true;
  148579. } else {
  148580. return (0, _shallowEqual.default)(node, opts);
  148581. }
  148582. }
  148583. return false;
  148584. }
  148585. function isEnumDeclaration(node, opts) {
  148586. if (!node)
  148587. return false;
  148588. const nodeType = node.type;
  148589. if (nodeType === "EnumDeclaration") {
  148590. if (typeof opts === "undefined") {
  148591. return true;
  148592. } else {
  148593. return (0, _shallowEqual.default)(node, opts);
  148594. }
  148595. }
  148596. return false;
  148597. }
  148598. function isEnumBooleanBody(node, opts) {
  148599. if (!node)
  148600. return false;
  148601. const nodeType = node.type;
  148602. if (nodeType === "EnumBooleanBody") {
  148603. if (typeof opts === "undefined") {
  148604. return true;
  148605. } else {
  148606. return (0, _shallowEqual.default)(node, opts);
  148607. }
  148608. }
  148609. return false;
  148610. }
  148611. function isEnumNumberBody(node, opts) {
  148612. if (!node)
  148613. return false;
  148614. const nodeType = node.type;
  148615. if (nodeType === "EnumNumberBody") {
  148616. if (typeof opts === "undefined") {
  148617. return true;
  148618. } else {
  148619. return (0, _shallowEqual.default)(node, opts);
  148620. }
  148621. }
  148622. return false;
  148623. }
  148624. function isEnumStringBody(node, opts) {
  148625. if (!node)
  148626. return false;
  148627. const nodeType = node.type;
  148628. if (nodeType === "EnumStringBody") {
  148629. if (typeof opts === "undefined") {
  148630. return true;
  148631. } else {
  148632. return (0, _shallowEqual.default)(node, opts);
  148633. }
  148634. }
  148635. return false;
  148636. }
  148637. function isEnumSymbolBody(node, opts) {
  148638. if (!node)
  148639. return false;
  148640. const nodeType = node.type;
  148641. if (nodeType === "EnumSymbolBody") {
  148642. if (typeof opts === "undefined") {
  148643. return true;
  148644. } else {
  148645. return (0, _shallowEqual.default)(node, opts);
  148646. }
  148647. }
  148648. return false;
  148649. }
  148650. function isEnumBooleanMember(node, opts) {
  148651. if (!node)
  148652. return false;
  148653. const nodeType = node.type;
  148654. if (nodeType === "EnumBooleanMember") {
  148655. if (typeof opts === "undefined") {
  148656. return true;
  148657. } else {
  148658. return (0, _shallowEqual.default)(node, opts);
  148659. }
  148660. }
  148661. return false;
  148662. }
  148663. function isEnumNumberMember(node, opts) {
  148664. if (!node)
  148665. return false;
  148666. const nodeType = node.type;
  148667. if (nodeType === "EnumNumberMember") {
  148668. if (typeof opts === "undefined") {
  148669. return true;
  148670. } else {
  148671. return (0, _shallowEqual.default)(node, opts);
  148672. }
  148673. }
  148674. return false;
  148675. }
  148676. function isEnumStringMember(node, opts) {
  148677. if (!node)
  148678. return false;
  148679. const nodeType = node.type;
  148680. if (nodeType === "EnumStringMember") {
  148681. if (typeof opts === "undefined") {
  148682. return true;
  148683. } else {
  148684. return (0, _shallowEqual.default)(node, opts);
  148685. }
  148686. }
  148687. return false;
  148688. }
  148689. function isEnumDefaultedMember(node, opts) {
  148690. if (!node)
  148691. return false;
  148692. const nodeType = node.type;
  148693. if (nodeType === "EnumDefaultedMember") {
  148694. if (typeof opts === "undefined") {
  148695. return true;
  148696. } else {
  148697. return (0, _shallowEqual.default)(node, opts);
  148698. }
  148699. }
  148700. return false;
  148701. }
  148702. function isIndexedAccessType(node, opts) {
  148703. if (!node)
  148704. return false;
  148705. const nodeType = node.type;
  148706. if (nodeType === "IndexedAccessType") {
  148707. if (typeof opts === "undefined") {
  148708. return true;
  148709. } else {
  148710. return (0, _shallowEqual.default)(node, opts);
  148711. }
  148712. }
  148713. return false;
  148714. }
  148715. function isOptionalIndexedAccessType(node, opts) {
  148716. if (!node)
  148717. return false;
  148718. const nodeType = node.type;
  148719. if (nodeType === "OptionalIndexedAccessType") {
  148720. if (typeof opts === "undefined") {
  148721. return true;
  148722. } else {
  148723. return (0, _shallowEqual.default)(node, opts);
  148724. }
  148725. }
  148726. return false;
  148727. }
  148728. function isJSXAttribute(node, opts) {
  148729. if (!node)
  148730. return false;
  148731. const nodeType = node.type;
  148732. if (nodeType === "JSXAttribute") {
  148733. if (typeof opts === "undefined") {
  148734. return true;
  148735. } else {
  148736. return (0, _shallowEqual.default)(node, opts);
  148737. }
  148738. }
  148739. return false;
  148740. }
  148741. function isJSXClosingElement(node, opts) {
  148742. if (!node)
  148743. return false;
  148744. const nodeType = node.type;
  148745. if (nodeType === "JSXClosingElement") {
  148746. if (typeof opts === "undefined") {
  148747. return true;
  148748. } else {
  148749. return (0, _shallowEqual.default)(node, opts);
  148750. }
  148751. }
  148752. return false;
  148753. }
  148754. function isJSXElement2(node, opts) {
  148755. if (!node)
  148756. return false;
  148757. const nodeType = node.type;
  148758. if (nodeType === "JSXElement") {
  148759. if (typeof opts === "undefined") {
  148760. return true;
  148761. } else {
  148762. return (0, _shallowEqual.default)(node, opts);
  148763. }
  148764. }
  148765. return false;
  148766. }
  148767. function isJSXEmptyExpression(node, opts) {
  148768. if (!node)
  148769. return false;
  148770. const nodeType = node.type;
  148771. if (nodeType === "JSXEmptyExpression") {
  148772. if (typeof opts === "undefined") {
  148773. return true;
  148774. } else {
  148775. return (0, _shallowEqual.default)(node, opts);
  148776. }
  148777. }
  148778. return false;
  148779. }
  148780. function isJSXExpressionContainer2(node, opts) {
  148781. if (!node)
  148782. return false;
  148783. const nodeType = node.type;
  148784. if (nodeType === "JSXExpressionContainer") {
  148785. if (typeof opts === "undefined") {
  148786. return true;
  148787. } else {
  148788. return (0, _shallowEqual.default)(node, opts);
  148789. }
  148790. }
  148791. return false;
  148792. }
  148793. function isJSXSpreadChild(node, opts) {
  148794. if (!node)
  148795. return false;
  148796. const nodeType = node.type;
  148797. if (nodeType === "JSXSpreadChild") {
  148798. if (typeof opts === "undefined") {
  148799. return true;
  148800. } else {
  148801. return (0, _shallowEqual.default)(node, opts);
  148802. }
  148803. }
  148804. return false;
  148805. }
  148806. function isJSXIdentifier2(node, opts) {
  148807. if (!node)
  148808. return false;
  148809. const nodeType = node.type;
  148810. if (nodeType === "JSXIdentifier") {
  148811. if (typeof opts === "undefined") {
  148812. return true;
  148813. } else {
  148814. return (0, _shallowEqual.default)(node, opts);
  148815. }
  148816. }
  148817. return false;
  148818. }
  148819. function isJSXMemberExpression(node, opts) {
  148820. if (!node)
  148821. return false;
  148822. const nodeType = node.type;
  148823. if (nodeType === "JSXMemberExpression") {
  148824. if (typeof opts === "undefined") {
  148825. return true;
  148826. } else {
  148827. return (0, _shallowEqual.default)(node, opts);
  148828. }
  148829. }
  148830. return false;
  148831. }
  148832. function isJSXNamespacedName(node, opts) {
  148833. if (!node)
  148834. return false;
  148835. const nodeType = node.type;
  148836. if (nodeType === "JSXNamespacedName") {
  148837. if (typeof opts === "undefined") {
  148838. return true;
  148839. } else {
  148840. return (0, _shallowEqual.default)(node, opts);
  148841. }
  148842. }
  148843. return false;
  148844. }
  148845. function isJSXOpeningElement(node, opts) {
  148846. if (!node)
  148847. return false;
  148848. const nodeType = node.type;
  148849. if (nodeType === "JSXOpeningElement") {
  148850. if (typeof opts === "undefined") {
  148851. return true;
  148852. } else {
  148853. return (0, _shallowEqual.default)(node, opts);
  148854. }
  148855. }
  148856. return false;
  148857. }
  148858. function isJSXSpreadAttribute(node, opts) {
  148859. if (!node)
  148860. return false;
  148861. const nodeType = node.type;
  148862. if (nodeType === "JSXSpreadAttribute") {
  148863. if (typeof opts === "undefined") {
  148864. return true;
  148865. } else {
  148866. return (0, _shallowEqual.default)(node, opts);
  148867. }
  148868. }
  148869. return false;
  148870. }
  148871. function isJSXText(node, opts) {
  148872. if (!node)
  148873. return false;
  148874. const nodeType = node.type;
  148875. if (nodeType === "JSXText") {
  148876. if (typeof opts === "undefined") {
  148877. return true;
  148878. } else {
  148879. return (0, _shallowEqual.default)(node, opts);
  148880. }
  148881. }
  148882. return false;
  148883. }
  148884. function isJSXFragment2(node, opts) {
  148885. if (!node)
  148886. return false;
  148887. const nodeType = node.type;
  148888. if (nodeType === "JSXFragment") {
  148889. if (typeof opts === "undefined") {
  148890. return true;
  148891. } else {
  148892. return (0, _shallowEqual.default)(node, opts);
  148893. }
  148894. }
  148895. return false;
  148896. }
  148897. function isJSXOpeningFragment(node, opts) {
  148898. if (!node)
  148899. return false;
  148900. const nodeType = node.type;
  148901. if (nodeType === "JSXOpeningFragment") {
  148902. if (typeof opts === "undefined") {
  148903. return true;
  148904. } else {
  148905. return (0, _shallowEqual.default)(node, opts);
  148906. }
  148907. }
  148908. return false;
  148909. }
  148910. function isJSXClosingFragment(node, opts) {
  148911. if (!node)
  148912. return false;
  148913. const nodeType = node.type;
  148914. if (nodeType === "JSXClosingFragment") {
  148915. if (typeof opts === "undefined") {
  148916. return true;
  148917. } else {
  148918. return (0, _shallowEqual.default)(node, opts);
  148919. }
  148920. }
  148921. return false;
  148922. }
  148923. function isNoop(node, opts) {
  148924. if (!node)
  148925. return false;
  148926. const nodeType = node.type;
  148927. if (nodeType === "Noop") {
  148928. if (typeof opts === "undefined") {
  148929. return true;
  148930. } else {
  148931. return (0, _shallowEqual.default)(node, opts);
  148932. }
  148933. }
  148934. return false;
  148935. }
  148936. function isPlaceholder(node, opts) {
  148937. if (!node)
  148938. return false;
  148939. const nodeType = node.type;
  148940. if (nodeType === "Placeholder") {
  148941. if (typeof opts === "undefined") {
  148942. return true;
  148943. } else {
  148944. return (0, _shallowEqual.default)(node, opts);
  148945. }
  148946. }
  148947. return false;
  148948. }
  148949. function isV8IntrinsicIdentifier(node, opts) {
  148950. if (!node)
  148951. return false;
  148952. const nodeType = node.type;
  148953. if (nodeType === "V8IntrinsicIdentifier") {
  148954. if (typeof opts === "undefined") {
  148955. return true;
  148956. } else {
  148957. return (0, _shallowEqual.default)(node, opts);
  148958. }
  148959. }
  148960. return false;
  148961. }
  148962. function isArgumentPlaceholder(node, opts) {
  148963. if (!node)
  148964. return false;
  148965. const nodeType = node.type;
  148966. if (nodeType === "ArgumentPlaceholder") {
  148967. if (typeof opts === "undefined") {
  148968. return true;
  148969. } else {
  148970. return (0, _shallowEqual.default)(node, opts);
  148971. }
  148972. }
  148973. return false;
  148974. }
  148975. function isBindExpression(node, opts) {
  148976. if (!node)
  148977. return false;
  148978. const nodeType = node.type;
  148979. if (nodeType === "BindExpression") {
  148980. if (typeof opts === "undefined") {
  148981. return true;
  148982. } else {
  148983. return (0, _shallowEqual.default)(node, opts);
  148984. }
  148985. }
  148986. return false;
  148987. }
  148988. function isClassProperty(node, opts) {
  148989. if (!node)
  148990. return false;
  148991. const nodeType = node.type;
  148992. if (nodeType === "ClassProperty") {
  148993. if (typeof opts === "undefined") {
  148994. return true;
  148995. } else {
  148996. return (0, _shallowEqual.default)(node, opts);
  148997. }
  148998. }
  148999. return false;
  149000. }
  149001. function isPipelineTopicExpression(node, opts) {
  149002. if (!node)
  149003. return false;
  149004. const nodeType = node.type;
  149005. if (nodeType === "PipelineTopicExpression") {
  149006. if (typeof opts === "undefined") {
  149007. return true;
  149008. } else {
  149009. return (0, _shallowEqual.default)(node, opts);
  149010. }
  149011. }
  149012. return false;
  149013. }
  149014. function isPipelineBareFunction(node, opts) {
  149015. if (!node)
  149016. return false;
  149017. const nodeType = node.type;
  149018. if (nodeType === "PipelineBareFunction") {
  149019. if (typeof opts === "undefined") {
  149020. return true;
  149021. } else {
  149022. return (0, _shallowEqual.default)(node, opts);
  149023. }
  149024. }
  149025. return false;
  149026. }
  149027. function isPipelinePrimaryTopicReference(node, opts) {
  149028. if (!node)
  149029. return false;
  149030. const nodeType = node.type;
  149031. if (nodeType === "PipelinePrimaryTopicReference") {
  149032. if (typeof opts === "undefined") {
  149033. return true;
  149034. } else {
  149035. return (0, _shallowEqual.default)(node, opts);
  149036. }
  149037. }
  149038. return false;
  149039. }
  149040. function isClassPrivateProperty(node, opts) {
  149041. if (!node)
  149042. return false;
  149043. const nodeType = node.type;
  149044. if (nodeType === "ClassPrivateProperty") {
  149045. if (typeof opts === "undefined") {
  149046. return true;
  149047. } else {
  149048. return (0, _shallowEqual.default)(node, opts);
  149049. }
  149050. }
  149051. return false;
  149052. }
  149053. function isClassPrivateMethod(node, opts) {
  149054. if (!node)
  149055. return false;
  149056. const nodeType = node.type;
  149057. if (nodeType === "ClassPrivateMethod") {
  149058. if (typeof opts === "undefined") {
  149059. return true;
  149060. } else {
  149061. return (0, _shallowEqual.default)(node, opts);
  149062. }
  149063. }
  149064. return false;
  149065. }
  149066. function isImportAttribute(node, opts) {
  149067. if (!node)
  149068. return false;
  149069. const nodeType = node.type;
  149070. if (nodeType === "ImportAttribute") {
  149071. if (typeof opts === "undefined") {
  149072. return true;
  149073. } else {
  149074. return (0, _shallowEqual.default)(node, opts);
  149075. }
  149076. }
  149077. return false;
  149078. }
  149079. function isDecorator(node, opts) {
  149080. if (!node)
  149081. return false;
  149082. const nodeType = node.type;
  149083. if (nodeType === "Decorator") {
  149084. if (typeof opts === "undefined") {
  149085. return true;
  149086. } else {
  149087. return (0, _shallowEqual.default)(node, opts);
  149088. }
  149089. }
  149090. return false;
  149091. }
  149092. function isDoExpression(node, opts) {
  149093. if (!node)
  149094. return false;
  149095. const nodeType = node.type;
  149096. if (nodeType === "DoExpression") {
  149097. if (typeof opts === "undefined") {
  149098. return true;
  149099. } else {
  149100. return (0, _shallowEqual.default)(node, opts);
  149101. }
  149102. }
  149103. return false;
  149104. }
  149105. function isExportDefaultSpecifier(node, opts) {
  149106. if (!node)
  149107. return false;
  149108. const nodeType = node.type;
  149109. if (nodeType === "ExportDefaultSpecifier") {
  149110. if (typeof opts === "undefined") {
  149111. return true;
  149112. } else {
  149113. return (0, _shallowEqual.default)(node, opts);
  149114. }
  149115. }
  149116. return false;
  149117. }
  149118. function isPrivateName(node, opts) {
  149119. if (!node)
  149120. return false;
  149121. const nodeType = node.type;
  149122. if (nodeType === "PrivateName") {
  149123. if (typeof opts === "undefined") {
  149124. return true;
  149125. } else {
  149126. return (0, _shallowEqual.default)(node, opts);
  149127. }
  149128. }
  149129. return false;
  149130. }
  149131. function isRecordExpression(node, opts) {
  149132. if (!node)
  149133. return false;
  149134. const nodeType = node.type;
  149135. if (nodeType === "RecordExpression") {
  149136. if (typeof opts === "undefined") {
  149137. return true;
  149138. } else {
  149139. return (0, _shallowEqual.default)(node, opts);
  149140. }
  149141. }
  149142. return false;
  149143. }
  149144. function isTupleExpression(node, opts) {
  149145. if (!node)
  149146. return false;
  149147. const nodeType = node.type;
  149148. if (nodeType === "TupleExpression") {
  149149. if (typeof opts === "undefined") {
  149150. return true;
  149151. } else {
  149152. return (0, _shallowEqual.default)(node, opts);
  149153. }
  149154. }
  149155. return false;
  149156. }
  149157. function isDecimalLiteral(node, opts) {
  149158. if (!node)
  149159. return false;
  149160. const nodeType = node.type;
  149161. if (nodeType === "DecimalLiteral") {
  149162. if (typeof opts === "undefined") {
  149163. return true;
  149164. } else {
  149165. return (0, _shallowEqual.default)(node, opts);
  149166. }
  149167. }
  149168. return false;
  149169. }
  149170. function isStaticBlock(node, opts) {
  149171. if (!node)
  149172. return false;
  149173. const nodeType = node.type;
  149174. if (nodeType === "StaticBlock") {
  149175. if (typeof opts === "undefined") {
  149176. return true;
  149177. } else {
  149178. return (0, _shallowEqual.default)(node, opts);
  149179. }
  149180. }
  149181. return false;
  149182. }
  149183. function isModuleExpression(node, opts) {
  149184. if (!node)
  149185. return false;
  149186. const nodeType = node.type;
  149187. if (nodeType === "ModuleExpression") {
  149188. if (typeof opts === "undefined") {
  149189. return true;
  149190. } else {
  149191. return (0, _shallowEqual.default)(node, opts);
  149192. }
  149193. }
  149194. return false;
  149195. }
  149196. function isTSParameterProperty(node, opts) {
  149197. if (!node)
  149198. return false;
  149199. const nodeType = node.type;
  149200. if (nodeType === "TSParameterProperty") {
  149201. if (typeof opts === "undefined") {
  149202. return true;
  149203. } else {
  149204. return (0, _shallowEqual.default)(node, opts);
  149205. }
  149206. }
  149207. return false;
  149208. }
  149209. function isTSDeclareFunction(node, opts) {
  149210. if (!node)
  149211. return false;
  149212. const nodeType = node.type;
  149213. if (nodeType === "TSDeclareFunction") {
  149214. if (typeof opts === "undefined") {
  149215. return true;
  149216. } else {
  149217. return (0, _shallowEqual.default)(node, opts);
  149218. }
  149219. }
  149220. return false;
  149221. }
  149222. function isTSDeclareMethod(node, opts) {
  149223. if (!node)
  149224. return false;
  149225. const nodeType = node.type;
  149226. if (nodeType === "TSDeclareMethod") {
  149227. if (typeof opts === "undefined") {
  149228. return true;
  149229. } else {
  149230. return (0, _shallowEqual.default)(node, opts);
  149231. }
  149232. }
  149233. return false;
  149234. }
  149235. function isTSQualifiedName(node, opts) {
  149236. if (!node)
  149237. return false;
  149238. const nodeType = node.type;
  149239. if (nodeType === "TSQualifiedName") {
  149240. if (typeof opts === "undefined") {
  149241. return true;
  149242. } else {
  149243. return (0, _shallowEqual.default)(node, opts);
  149244. }
  149245. }
  149246. return false;
  149247. }
  149248. function isTSCallSignatureDeclaration(node, opts) {
  149249. if (!node)
  149250. return false;
  149251. const nodeType = node.type;
  149252. if (nodeType === "TSCallSignatureDeclaration") {
  149253. if (typeof opts === "undefined") {
  149254. return true;
  149255. } else {
  149256. return (0, _shallowEqual.default)(node, opts);
  149257. }
  149258. }
  149259. return false;
  149260. }
  149261. function isTSConstructSignatureDeclaration(node, opts) {
  149262. if (!node)
  149263. return false;
  149264. const nodeType = node.type;
  149265. if (nodeType === "TSConstructSignatureDeclaration") {
  149266. if (typeof opts === "undefined") {
  149267. return true;
  149268. } else {
  149269. return (0, _shallowEqual.default)(node, opts);
  149270. }
  149271. }
  149272. return false;
  149273. }
  149274. function isTSPropertySignature(node, opts) {
  149275. if (!node)
  149276. return false;
  149277. const nodeType = node.type;
  149278. if (nodeType === "TSPropertySignature") {
  149279. if (typeof opts === "undefined") {
  149280. return true;
  149281. } else {
  149282. return (0, _shallowEqual.default)(node, opts);
  149283. }
  149284. }
  149285. return false;
  149286. }
  149287. function isTSMethodSignature(node, opts) {
  149288. if (!node)
  149289. return false;
  149290. const nodeType = node.type;
  149291. if (nodeType === "TSMethodSignature") {
  149292. if (typeof opts === "undefined") {
  149293. return true;
  149294. } else {
  149295. return (0, _shallowEqual.default)(node, opts);
  149296. }
  149297. }
  149298. return false;
  149299. }
  149300. function isTSIndexSignature(node, opts) {
  149301. if (!node)
  149302. return false;
  149303. const nodeType = node.type;
  149304. if (nodeType === "TSIndexSignature") {
  149305. if (typeof opts === "undefined") {
  149306. return true;
  149307. } else {
  149308. return (0, _shallowEqual.default)(node, opts);
  149309. }
  149310. }
  149311. return false;
  149312. }
  149313. function isTSAnyKeyword(node, opts) {
  149314. if (!node)
  149315. return false;
  149316. const nodeType = node.type;
  149317. if (nodeType === "TSAnyKeyword") {
  149318. if (typeof opts === "undefined") {
  149319. return true;
  149320. } else {
  149321. return (0, _shallowEqual.default)(node, opts);
  149322. }
  149323. }
  149324. return false;
  149325. }
  149326. function isTSBooleanKeyword(node, opts) {
  149327. if (!node)
  149328. return false;
  149329. const nodeType = node.type;
  149330. if (nodeType === "TSBooleanKeyword") {
  149331. if (typeof opts === "undefined") {
  149332. return true;
  149333. } else {
  149334. return (0, _shallowEqual.default)(node, opts);
  149335. }
  149336. }
  149337. return false;
  149338. }
  149339. function isTSBigIntKeyword(node, opts) {
  149340. if (!node)
  149341. return false;
  149342. const nodeType = node.type;
  149343. if (nodeType === "TSBigIntKeyword") {
  149344. if (typeof opts === "undefined") {
  149345. return true;
  149346. } else {
  149347. return (0, _shallowEqual.default)(node, opts);
  149348. }
  149349. }
  149350. return false;
  149351. }
  149352. function isTSIntrinsicKeyword(node, opts) {
  149353. if (!node)
  149354. return false;
  149355. const nodeType = node.type;
  149356. if (nodeType === "TSIntrinsicKeyword") {
  149357. if (typeof opts === "undefined") {
  149358. return true;
  149359. } else {
  149360. return (0, _shallowEqual.default)(node, opts);
  149361. }
  149362. }
  149363. return false;
  149364. }
  149365. function isTSNeverKeyword(node, opts) {
  149366. if (!node)
  149367. return false;
  149368. const nodeType = node.type;
  149369. if (nodeType === "TSNeverKeyword") {
  149370. if (typeof opts === "undefined") {
  149371. return true;
  149372. } else {
  149373. return (0, _shallowEqual.default)(node, opts);
  149374. }
  149375. }
  149376. return false;
  149377. }
  149378. function isTSNullKeyword(node, opts) {
  149379. if (!node)
  149380. return false;
  149381. const nodeType = node.type;
  149382. if (nodeType === "TSNullKeyword") {
  149383. if (typeof opts === "undefined") {
  149384. return true;
  149385. } else {
  149386. return (0, _shallowEqual.default)(node, opts);
  149387. }
  149388. }
  149389. return false;
  149390. }
  149391. function isTSNumberKeyword(node, opts) {
  149392. if (!node)
  149393. return false;
  149394. const nodeType = node.type;
  149395. if (nodeType === "TSNumberKeyword") {
  149396. if (typeof opts === "undefined") {
  149397. return true;
  149398. } else {
  149399. return (0, _shallowEqual.default)(node, opts);
  149400. }
  149401. }
  149402. return false;
  149403. }
  149404. function isTSObjectKeyword(node, opts) {
  149405. if (!node)
  149406. return false;
  149407. const nodeType = node.type;
  149408. if (nodeType === "TSObjectKeyword") {
  149409. if (typeof opts === "undefined") {
  149410. return true;
  149411. } else {
  149412. return (0, _shallowEqual.default)(node, opts);
  149413. }
  149414. }
  149415. return false;
  149416. }
  149417. function isTSStringKeyword(node, opts) {
  149418. if (!node)
  149419. return false;
  149420. const nodeType = node.type;
  149421. if (nodeType === "TSStringKeyword") {
  149422. if (typeof opts === "undefined") {
  149423. return true;
  149424. } else {
  149425. return (0, _shallowEqual.default)(node, opts);
  149426. }
  149427. }
  149428. return false;
  149429. }
  149430. function isTSSymbolKeyword(node, opts) {
  149431. if (!node)
  149432. return false;
  149433. const nodeType = node.type;
  149434. if (nodeType === "TSSymbolKeyword") {
  149435. if (typeof opts === "undefined") {
  149436. return true;
  149437. } else {
  149438. return (0, _shallowEqual.default)(node, opts);
  149439. }
  149440. }
  149441. return false;
  149442. }
  149443. function isTSUndefinedKeyword(node, opts) {
  149444. if (!node)
  149445. return false;
  149446. const nodeType = node.type;
  149447. if (nodeType === "TSUndefinedKeyword") {
  149448. if (typeof opts === "undefined") {
  149449. return true;
  149450. } else {
  149451. return (0, _shallowEqual.default)(node, opts);
  149452. }
  149453. }
  149454. return false;
  149455. }
  149456. function isTSUnknownKeyword(node, opts) {
  149457. if (!node)
  149458. return false;
  149459. const nodeType = node.type;
  149460. if (nodeType === "TSUnknownKeyword") {
  149461. if (typeof opts === "undefined") {
  149462. return true;
  149463. } else {
  149464. return (0, _shallowEqual.default)(node, opts);
  149465. }
  149466. }
  149467. return false;
  149468. }
  149469. function isTSVoidKeyword(node, opts) {
  149470. if (!node)
  149471. return false;
  149472. const nodeType = node.type;
  149473. if (nodeType === "TSVoidKeyword") {
  149474. if (typeof opts === "undefined") {
  149475. return true;
  149476. } else {
  149477. return (0, _shallowEqual.default)(node, opts);
  149478. }
  149479. }
  149480. return false;
  149481. }
  149482. function isTSThisType(node, opts) {
  149483. if (!node)
  149484. return false;
  149485. const nodeType = node.type;
  149486. if (nodeType === "TSThisType") {
  149487. if (typeof opts === "undefined") {
  149488. return true;
  149489. } else {
  149490. return (0, _shallowEqual.default)(node, opts);
  149491. }
  149492. }
  149493. return false;
  149494. }
  149495. function isTSFunctionType(node, opts) {
  149496. if (!node)
  149497. return false;
  149498. const nodeType = node.type;
  149499. if (nodeType === "TSFunctionType") {
  149500. if (typeof opts === "undefined") {
  149501. return true;
  149502. } else {
  149503. return (0, _shallowEqual.default)(node, opts);
  149504. }
  149505. }
  149506. return false;
  149507. }
  149508. function isTSConstructorType(node, opts) {
  149509. if (!node)
  149510. return false;
  149511. const nodeType = node.type;
  149512. if (nodeType === "TSConstructorType") {
  149513. if (typeof opts === "undefined") {
  149514. return true;
  149515. } else {
  149516. return (0, _shallowEqual.default)(node, opts);
  149517. }
  149518. }
  149519. return false;
  149520. }
  149521. function isTSTypeReference(node, opts) {
  149522. if (!node)
  149523. return false;
  149524. const nodeType = node.type;
  149525. if (nodeType === "TSTypeReference") {
  149526. if (typeof opts === "undefined") {
  149527. return true;
  149528. } else {
  149529. return (0, _shallowEqual.default)(node, opts);
  149530. }
  149531. }
  149532. return false;
  149533. }
  149534. function isTSTypePredicate(node, opts) {
  149535. if (!node)
  149536. return false;
  149537. const nodeType = node.type;
  149538. if (nodeType === "TSTypePredicate") {
  149539. if (typeof opts === "undefined") {
  149540. return true;
  149541. } else {
  149542. return (0, _shallowEqual.default)(node, opts);
  149543. }
  149544. }
  149545. return false;
  149546. }
  149547. function isTSTypeQuery(node, opts) {
  149548. if (!node)
  149549. return false;
  149550. const nodeType = node.type;
  149551. if (nodeType === "TSTypeQuery") {
  149552. if (typeof opts === "undefined") {
  149553. return true;
  149554. } else {
  149555. return (0, _shallowEqual.default)(node, opts);
  149556. }
  149557. }
  149558. return false;
  149559. }
  149560. function isTSTypeLiteral(node, opts) {
  149561. if (!node)
  149562. return false;
  149563. const nodeType = node.type;
  149564. if (nodeType === "TSTypeLiteral") {
  149565. if (typeof opts === "undefined") {
  149566. return true;
  149567. } else {
  149568. return (0, _shallowEqual.default)(node, opts);
  149569. }
  149570. }
  149571. return false;
  149572. }
  149573. function isTSArrayType(node, opts) {
  149574. if (!node)
  149575. return false;
  149576. const nodeType = node.type;
  149577. if (nodeType === "TSArrayType") {
  149578. if (typeof opts === "undefined") {
  149579. return true;
  149580. } else {
  149581. return (0, _shallowEqual.default)(node, opts);
  149582. }
  149583. }
  149584. return false;
  149585. }
  149586. function isTSTupleType(node, opts) {
  149587. if (!node)
  149588. return false;
  149589. const nodeType = node.type;
  149590. if (nodeType === "TSTupleType") {
  149591. if (typeof opts === "undefined") {
  149592. return true;
  149593. } else {
  149594. return (0, _shallowEqual.default)(node, opts);
  149595. }
  149596. }
  149597. return false;
  149598. }
  149599. function isTSOptionalType(node, opts) {
  149600. if (!node)
  149601. return false;
  149602. const nodeType = node.type;
  149603. if (nodeType === "TSOptionalType") {
  149604. if (typeof opts === "undefined") {
  149605. return true;
  149606. } else {
  149607. return (0, _shallowEqual.default)(node, opts);
  149608. }
  149609. }
  149610. return false;
  149611. }
  149612. function isTSRestType(node, opts) {
  149613. if (!node)
  149614. return false;
  149615. const nodeType = node.type;
  149616. if (nodeType === "TSRestType") {
  149617. if (typeof opts === "undefined") {
  149618. return true;
  149619. } else {
  149620. return (0, _shallowEqual.default)(node, opts);
  149621. }
  149622. }
  149623. return false;
  149624. }
  149625. function isTSNamedTupleMember(node, opts) {
  149626. if (!node)
  149627. return false;
  149628. const nodeType = node.type;
  149629. if (nodeType === "TSNamedTupleMember") {
  149630. if (typeof opts === "undefined") {
  149631. return true;
  149632. } else {
  149633. return (0, _shallowEqual.default)(node, opts);
  149634. }
  149635. }
  149636. return false;
  149637. }
  149638. function isTSUnionType(node, opts) {
  149639. if (!node)
  149640. return false;
  149641. const nodeType = node.type;
  149642. if (nodeType === "TSUnionType") {
  149643. if (typeof opts === "undefined") {
  149644. return true;
  149645. } else {
  149646. return (0, _shallowEqual.default)(node, opts);
  149647. }
  149648. }
  149649. return false;
  149650. }
  149651. function isTSIntersectionType(node, opts) {
  149652. if (!node)
  149653. return false;
  149654. const nodeType = node.type;
  149655. if (nodeType === "TSIntersectionType") {
  149656. if (typeof opts === "undefined") {
  149657. return true;
  149658. } else {
  149659. return (0, _shallowEqual.default)(node, opts);
  149660. }
  149661. }
  149662. return false;
  149663. }
  149664. function isTSConditionalType(node, opts) {
  149665. if (!node)
  149666. return false;
  149667. const nodeType = node.type;
  149668. if (nodeType === "TSConditionalType") {
  149669. if (typeof opts === "undefined") {
  149670. return true;
  149671. } else {
  149672. return (0, _shallowEqual.default)(node, opts);
  149673. }
  149674. }
  149675. return false;
  149676. }
  149677. function isTSInferType(node, opts) {
  149678. if (!node)
  149679. return false;
  149680. const nodeType = node.type;
  149681. if (nodeType === "TSInferType") {
  149682. if (typeof opts === "undefined") {
  149683. return true;
  149684. } else {
  149685. return (0, _shallowEqual.default)(node, opts);
  149686. }
  149687. }
  149688. return false;
  149689. }
  149690. function isTSParenthesizedType(node, opts) {
  149691. if (!node)
  149692. return false;
  149693. const nodeType = node.type;
  149694. if (nodeType === "TSParenthesizedType") {
  149695. if (typeof opts === "undefined") {
  149696. return true;
  149697. } else {
  149698. return (0, _shallowEqual.default)(node, opts);
  149699. }
  149700. }
  149701. return false;
  149702. }
  149703. function isTSTypeOperator(node, opts) {
  149704. if (!node)
  149705. return false;
  149706. const nodeType = node.type;
  149707. if (nodeType === "TSTypeOperator") {
  149708. if (typeof opts === "undefined") {
  149709. return true;
  149710. } else {
  149711. return (0, _shallowEqual.default)(node, opts);
  149712. }
  149713. }
  149714. return false;
  149715. }
  149716. function isTSIndexedAccessType(node, opts) {
  149717. if (!node)
  149718. return false;
  149719. const nodeType = node.type;
  149720. if (nodeType === "TSIndexedAccessType") {
  149721. if (typeof opts === "undefined") {
  149722. return true;
  149723. } else {
  149724. return (0, _shallowEqual.default)(node, opts);
  149725. }
  149726. }
  149727. return false;
  149728. }
  149729. function isTSMappedType(node, opts) {
  149730. if (!node)
  149731. return false;
  149732. const nodeType = node.type;
  149733. if (nodeType === "TSMappedType") {
  149734. if (typeof opts === "undefined") {
  149735. return true;
  149736. } else {
  149737. return (0, _shallowEqual.default)(node, opts);
  149738. }
  149739. }
  149740. return false;
  149741. }
  149742. function isTSLiteralType(node, opts) {
  149743. if (!node)
  149744. return false;
  149745. const nodeType = node.type;
  149746. if (nodeType === "TSLiteralType") {
  149747. if (typeof opts === "undefined") {
  149748. return true;
  149749. } else {
  149750. return (0, _shallowEqual.default)(node, opts);
  149751. }
  149752. }
  149753. return false;
  149754. }
  149755. function isTSExpressionWithTypeArguments(node, opts) {
  149756. if (!node)
  149757. return false;
  149758. const nodeType = node.type;
  149759. if (nodeType === "TSExpressionWithTypeArguments") {
  149760. if (typeof opts === "undefined") {
  149761. return true;
  149762. } else {
  149763. return (0, _shallowEqual.default)(node, opts);
  149764. }
  149765. }
  149766. return false;
  149767. }
  149768. function isTSInterfaceDeclaration(node, opts) {
  149769. if (!node)
  149770. return false;
  149771. const nodeType = node.type;
  149772. if (nodeType === "TSInterfaceDeclaration") {
  149773. if (typeof opts === "undefined") {
  149774. return true;
  149775. } else {
  149776. return (0, _shallowEqual.default)(node, opts);
  149777. }
  149778. }
  149779. return false;
  149780. }
  149781. function isTSInterfaceBody(node, opts) {
  149782. if (!node)
  149783. return false;
  149784. const nodeType = node.type;
  149785. if (nodeType === "TSInterfaceBody") {
  149786. if (typeof opts === "undefined") {
  149787. return true;
  149788. } else {
  149789. return (0, _shallowEqual.default)(node, opts);
  149790. }
  149791. }
  149792. return false;
  149793. }
  149794. function isTSTypeAliasDeclaration(node, opts) {
  149795. if (!node)
  149796. return false;
  149797. const nodeType = node.type;
  149798. if (nodeType === "TSTypeAliasDeclaration") {
  149799. if (typeof opts === "undefined") {
  149800. return true;
  149801. } else {
  149802. return (0, _shallowEqual.default)(node, opts);
  149803. }
  149804. }
  149805. return false;
  149806. }
  149807. function isTSAsExpression(node, opts) {
  149808. if (!node)
  149809. return false;
  149810. const nodeType = node.type;
  149811. if (nodeType === "TSAsExpression") {
  149812. if (typeof opts === "undefined") {
  149813. return true;
  149814. } else {
  149815. return (0, _shallowEqual.default)(node, opts);
  149816. }
  149817. }
  149818. return false;
  149819. }
  149820. function isTSTypeAssertion(node, opts) {
  149821. if (!node)
  149822. return false;
  149823. const nodeType = node.type;
  149824. if (nodeType === "TSTypeAssertion") {
  149825. if (typeof opts === "undefined") {
  149826. return true;
  149827. } else {
  149828. return (0, _shallowEqual.default)(node, opts);
  149829. }
  149830. }
  149831. return false;
  149832. }
  149833. function isTSEnumDeclaration(node, opts) {
  149834. if (!node)
  149835. return false;
  149836. const nodeType = node.type;
  149837. if (nodeType === "TSEnumDeclaration") {
  149838. if (typeof opts === "undefined") {
  149839. return true;
  149840. } else {
  149841. return (0, _shallowEqual.default)(node, opts);
  149842. }
  149843. }
  149844. return false;
  149845. }
  149846. function isTSEnumMember(node, opts) {
  149847. if (!node)
  149848. return false;
  149849. const nodeType = node.type;
  149850. if (nodeType === "TSEnumMember") {
  149851. if (typeof opts === "undefined") {
  149852. return true;
  149853. } else {
  149854. return (0, _shallowEqual.default)(node, opts);
  149855. }
  149856. }
  149857. return false;
  149858. }
  149859. function isTSModuleDeclaration(node, opts) {
  149860. if (!node)
  149861. return false;
  149862. const nodeType = node.type;
  149863. if (nodeType === "TSModuleDeclaration") {
  149864. if (typeof opts === "undefined") {
  149865. return true;
  149866. } else {
  149867. return (0, _shallowEqual.default)(node, opts);
  149868. }
  149869. }
  149870. return false;
  149871. }
  149872. function isTSModuleBlock(node, opts) {
  149873. if (!node)
  149874. return false;
  149875. const nodeType = node.type;
  149876. if (nodeType === "TSModuleBlock") {
  149877. if (typeof opts === "undefined") {
  149878. return true;
  149879. } else {
  149880. return (0, _shallowEqual.default)(node, opts);
  149881. }
  149882. }
  149883. return false;
  149884. }
  149885. function isTSImportType(node, opts) {
  149886. if (!node)
  149887. return false;
  149888. const nodeType = node.type;
  149889. if (nodeType === "TSImportType") {
  149890. if (typeof opts === "undefined") {
  149891. return true;
  149892. } else {
  149893. return (0, _shallowEqual.default)(node, opts);
  149894. }
  149895. }
  149896. return false;
  149897. }
  149898. function isTSImportEqualsDeclaration(node, opts) {
  149899. if (!node)
  149900. return false;
  149901. const nodeType = node.type;
  149902. if (nodeType === "TSImportEqualsDeclaration") {
  149903. if (typeof opts === "undefined") {
  149904. return true;
  149905. } else {
  149906. return (0, _shallowEqual.default)(node, opts);
  149907. }
  149908. }
  149909. return false;
  149910. }
  149911. function isTSExternalModuleReference(node, opts) {
  149912. if (!node)
  149913. return false;
  149914. const nodeType = node.type;
  149915. if (nodeType === "TSExternalModuleReference") {
  149916. if (typeof opts === "undefined") {
  149917. return true;
  149918. } else {
  149919. return (0, _shallowEqual.default)(node, opts);
  149920. }
  149921. }
  149922. return false;
  149923. }
  149924. function isTSNonNullExpression(node, opts) {
  149925. if (!node)
  149926. return false;
  149927. const nodeType = node.type;
  149928. if (nodeType === "TSNonNullExpression") {
  149929. if (typeof opts === "undefined") {
  149930. return true;
  149931. } else {
  149932. return (0, _shallowEqual.default)(node, opts);
  149933. }
  149934. }
  149935. return false;
  149936. }
  149937. function isTSExportAssignment(node, opts) {
  149938. if (!node)
  149939. return false;
  149940. const nodeType = node.type;
  149941. if (nodeType === "TSExportAssignment") {
  149942. if (typeof opts === "undefined") {
  149943. return true;
  149944. } else {
  149945. return (0, _shallowEqual.default)(node, opts);
  149946. }
  149947. }
  149948. return false;
  149949. }
  149950. function isTSNamespaceExportDeclaration(node, opts) {
  149951. if (!node)
  149952. return false;
  149953. const nodeType = node.type;
  149954. if (nodeType === "TSNamespaceExportDeclaration") {
  149955. if (typeof opts === "undefined") {
  149956. return true;
  149957. } else {
  149958. return (0, _shallowEqual.default)(node, opts);
  149959. }
  149960. }
  149961. return false;
  149962. }
  149963. function isTSTypeAnnotation(node, opts) {
  149964. if (!node)
  149965. return false;
  149966. const nodeType = node.type;
  149967. if (nodeType === "TSTypeAnnotation") {
  149968. if (typeof opts === "undefined") {
  149969. return true;
  149970. } else {
  149971. return (0, _shallowEqual.default)(node, opts);
  149972. }
  149973. }
  149974. return false;
  149975. }
  149976. function isTSTypeParameterInstantiation(node, opts) {
  149977. if (!node)
  149978. return false;
  149979. const nodeType = node.type;
  149980. if (nodeType === "TSTypeParameterInstantiation") {
  149981. if (typeof opts === "undefined") {
  149982. return true;
  149983. } else {
  149984. return (0, _shallowEqual.default)(node, opts);
  149985. }
  149986. }
  149987. return false;
  149988. }
  149989. function isTSTypeParameterDeclaration(node, opts) {
  149990. if (!node)
  149991. return false;
  149992. const nodeType = node.type;
  149993. if (nodeType === "TSTypeParameterDeclaration") {
  149994. if (typeof opts === "undefined") {
  149995. return true;
  149996. } else {
  149997. return (0, _shallowEqual.default)(node, opts);
  149998. }
  149999. }
  150000. return false;
  150001. }
  150002. function isTSTypeParameter(node, opts) {
  150003. if (!node)
  150004. return false;
  150005. const nodeType = node.type;
  150006. if (nodeType === "TSTypeParameter") {
  150007. if (typeof opts === "undefined") {
  150008. return true;
  150009. } else {
  150010. return (0, _shallowEqual.default)(node, opts);
  150011. }
  150012. }
  150013. return false;
  150014. }
  150015. function isExpression(node, opts) {
  150016. if (!node)
  150017. return false;
  150018. const nodeType = node.type;
  150019. if ("ArrayExpression" === nodeType || "AssignmentExpression" === nodeType || "BinaryExpression" === nodeType || "CallExpression" === nodeType || "ConditionalExpression" === nodeType || "FunctionExpression" === nodeType || "Identifier" === nodeType || "StringLiteral" === nodeType || "NumericLiteral" === nodeType || "NullLiteral" === nodeType || "BooleanLiteral" === nodeType || "RegExpLiteral" === nodeType || "LogicalExpression" === nodeType || "MemberExpression" === nodeType || "NewExpression" === nodeType || "ObjectExpression" === nodeType || "SequenceExpression" === nodeType || "ParenthesizedExpression" === nodeType || "ThisExpression" === nodeType || "UnaryExpression" === nodeType || "UpdateExpression" === nodeType || "ArrowFunctionExpression" === nodeType || "ClassExpression" === nodeType || "MetaProperty" === nodeType || "Super" === nodeType || "TaggedTemplateExpression" === nodeType || "TemplateLiteral" === nodeType || "YieldExpression" === nodeType || "AwaitExpression" === nodeType || "Import" === nodeType || "BigIntLiteral" === nodeType || "OptionalMemberExpression" === nodeType || "OptionalCallExpression" === nodeType || "TypeCastExpression" === nodeType || "JSXElement" === nodeType || "JSXFragment" === nodeType || "BindExpression" === nodeType || "PipelinePrimaryTopicReference" === nodeType || "DoExpression" === nodeType || "RecordExpression" === nodeType || "TupleExpression" === nodeType || "DecimalLiteral" === nodeType || "ModuleExpression" === nodeType || "TSAsExpression" === nodeType || "TSTypeAssertion" === nodeType || "TSNonNullExpression" === nodeType || nodeType === "Placeholder" && ("Expression" === node.expectedNode || "Identifier" === node.expectedNode || "StringLiteral" === node.expectedNode)) {
  150020. if (typeof opts === "undefined") {
  150021. return true;
  150022. } else {
  150023. return (0, _shallowEqual.default)(node, opts);
  150024. }
  150025. }
  150026. return false;
  150027. }
  150028. function isBinary(node, opts) {
  150029. if (!node)
  150030. return false;
  150031. const nodeType = node.type;
  150032. if ("BinaryExpression" === nodeType || "LogicalExpression" === nodeType) {
  150033. if (typeof opts === "undefined") {
  150034. return true;
  150035. } else {
  150036. return (0, _shallowEqual.default)(node, opts);
  150037. }
  150038. }
  150039. return false;
  150040. }
  150041. function isScopable(node, opts) {
  150042. if (!node)
  150043. return false;
  150044. const nodeType = node.type;
  150045. if ("BlockStatement" === nodeType || "CatchClause" === nodeType || "DoWhileStatement" === nodeType || "ForInStatement" === nodeType || "ForStatement" === nodeType || "FunctionDeclaration" === nodeType || "FunctionExpression" === nodeType || "Program" === nodeType || "ObjectMethod" === nodeType || "SwitchStatement" === nodeType || "WhileStatement" === nodeType || "ArrowFunctionExpression" === nodeType || "ClassExpression" === nodeType || "ClassDeclaration" === nodeType || "ForOfStatement" === nodeType || "ClassMethod" === nodeType || "ClassPrivateMethod" === nodeType || "StaticBlock" === nodeType || "TSModuleBlock" === nodeType || nodeType === "Placeholder" && "BlockStatement" === node.expectedNode) {
  150046. if (typeof opts === "undefined") {
  150047. return true;
  150048. } else {
  150049. return (0, _shallowEqual.default)(node, opts);
  150050. }
  150051. }
  150052. return false;
  150053. }
  150054. function isBlockParent(node, opts) {
  150055. if (!node)
  150056. return false;
  150057. const nodeType = node.type;
  150058. if ("BlockStatement" === nodeType || "CatchClause" === nodeType || "DoWhileStatement" === nodeType || "ForInStatement" === nodeType || "ForStatement" === nodeType || "FunctionDeclaration" === nodeType || "FunctionExpression" === nodeType || "Program" === nodeType || "ObjectMethod" === nodeType || "SwitchStatement" === nodeType || "WhileStatement" === nodeType || "ArrowFunctionExpression" === nodeType || "ForOfStatement" === nodeType || "ClassMethod" === nodeType || "ClassPrivateMethod" === nodeType || "StaticBlock" === nodeType || "TSModuleBlock" === nodeType || nodeType === "Placeholder" && "BlockStatement" === node.expectedNode) {
  150059. if (typeof opts === "undefined") {
  150060. return true;
  150061. } else {
  150062. return (0, _shallowEqual.default)(node, opts);
  150063. }
  150064. }
  150065. return false;
  150066. }
  150067. function isBlock(node, opts) {
  150068. if (!node)
  150069. return false;
  150070. const nodeType = node.type;
  150071. if ("BlockStatement" === nodeType || "Program" === nodeType || "TSModuleBlock" === nodeType || nodeType === "Placeholder" && "BlockStatement" === node.expectedNode) {
  150072. if (typeof opts === "undefined") {
  150073. return true;
  150074. } else {
  150075. return (0, _shallowEqual.default)(node, opts);
  150076. }
  150077. }
  150078. return false;
  150079. }
  150080. function isStatement(node, opts) {
  150081. if (!node)
  150082. return false;
  150083. const nodeType = node.type;
  150084. if ("BlockStatement" === nodeType || "BreakStatement" === nodeType || "ContinueStatement" === nodeType || "DebuggerStatement" === nodeType || "DoWhileStatement" === nodeType || "EmptyStatement" === nodeType || "ExpressionStatement" === nodeType || "ForInStatement" === nodeType || "ForStatement" === nodeType || "FunctionDeclaration" === nodeType || "IfStatement" === nodeType || "LabeledStatement" === nodeType || "ReturnStatement" === nodeType || "SwitchStatement" === nodeType || "ThrowStatement" === nodeType || "TryStatement" === nodeType || "VariableDeclaration" === nodeType || "WhileStatement" === nodeType || "WithStatement" === nodeType || "ClassDeclaration" === nodeType || "ExportAllDeclaration" === nodeType || "ExportDefaultDeclaration" === nodeType || "ExportNamedDeclaration" === nodeType || "ForOfStatement" === nodeType || "ImportDeclaration" === nodeType || "DeclareClass" === nodeType || "DeclareFunction" === nodeType || "DeclareInterface" === nodeType || "DeclareModule" === nodeType || "DeclareModuleExports" === nodeType || "DeclareTypeAlias" === nodeType || "DeclareOpaqueType" === nodeType || "DeclareVariable" === nodeType || "DeclareExportDeclaration" === nodeType || "DeclareExportAllDeclaration" === nodeType || "InterfaceDeclaration" === nodeType || "OpaqueType" === nodeType || "TypeAlias" === nodeType || "EnumDeclaration" === nodeType || "TSDeclareFunction" === nodeType || "TSInterfaceDeclaration" === nodeType || "TSTypeAliasDeclaration" === nodeType || "TSEnumDeclaration" === nodeType || "TSModuleDeclaration" === nodeType || "TSImportEqualsDeclaration" === nodeType || "TSExportAssignment" === nodeType || "TSNamespaceExportDeclaration" === nodeType || nodeType === "Placeholder" && ("Statement" === node.expectedNode || "Declaration" === node.expectedNode || "BlockStatement" === node.expectedNode)) {
  150085. if (typeof opts === "undefined") {
  150086. return true;
  150087. } else {
  150088. return (0, _shallowEqual.default)(node, opts);
  150089. }
  150090. }
  150091. return false;
  150092. }
  150093. function isTerminatorless(node, opts) {
  150094. if (!node)
  150095. return false;
  150096. const nodeType = node.type;
  150097. if ("BreakStatement" === nodeType || "ContinueStatement" === nodeType || "ReturnStatement" === nodeType || "ThrowStatement" === nodeType || "YieldExpression" === nodeType || "AwaitExpression" === nodeType) {
  150098. if (typeof opts === "undefined") {
  150099. return true;
  150100. } else {
  150101. return (0, _shallowEqual.default)(node, opts);
  150102. }
  150103. }
  150104. return false;
  150105. }
  150106. function isCompletionStatement(node, opts) {
  150107. if (!node)
  150108. return false;
  150109. const nodeType = node.type;
  150110. if ("BreakStatement" === nodeType || "ContinueStatement" === nodeType || "ReturnStatement" === nodeType || "ThrowStatement" === nodeType) {
  150111. if (typeof opts === "undefined") {
  150112. return true;
  150113. } else {
  150114. return (0, _shallowEqual.default)(node, opts);
  150115. }
  150116. }
  150117. return false;
  150118. }
  150119. function isConditional(node, opts) {
  150120. if (!node)
  150121. return false;
  150122. const nodeType = node.type;
  150123. if ("ConditionalExpression" === nodeType || "IfStatement" === nodeType) {
  150124. if (typeof opts === "undefined") {
  150125. return true;
  150126. } else {
  150127. return (0, _shallowEqual.default)(node, opts);
  150128. }
  150129. }
  150130. return false;
  150131. }
  150132. function isLoop(node, opts) {
  150133. if (!node)
  150134. return false;
  150135. const nodeType = node.type;
  150136. if ("DoWhileStatement" === nodeType || "ForInStatement" === nodeType || "ForStatement" === nodeType || "WhileStatement" === nodeType || "ForOfStatement" === nodeType) {
  150137. if (typeof opts === "undefined") {
  150138. return true;
  150139. } else {
  150140. return (0, _shallowEqual.default)(node, opts);
  150141. }
  150142. }
  150143. return false;
  150144. }
  150145. function isWhile(node, opts) {
  150146. if (!node)
  150147. return false;
  150148. const nodeType = node.type;
  150149. if ("DoWhileStatement" === nodeType || "WhileStatement" === nodeType) {
  150150. if (typeof opts === "undefined") {
  150151. return true;
  150152. } else {
  150153. return (0, _shallowEqual.default)(node, opts);
  150154. }
  150155. }
  150156. return false;
  150157. }
  150158. function isExpressionWrapper(node, opts) {
  150159. if (!node)
  150160. return false;
  150161. const nodeType = node.type;
  150162. if ("ExpressionStatement" === nodeType || "ParenthesizedExpression" === nodeType || "TypeCastExpression" === nodeType) {
  150163. if (typeof opts === "undefined") {
  150164. return true;
  150165. } else {
  150166. return (0, _shallowEqual.default)(node, opts);
  150167. }
  150168. }
  150169. return false;
  150170. }
  150171. function isFor(node, opts) {
  150172. if (!node)
  150173. return false;
  150174. const nodeType = node.type;
  150175. if ("ForInStatement" === nodeType || "ForStatement" === nodeType || "ForOfStatement" === nodeType) {
  150176. if (typeof opts === "undefined") {
  150177. return true;
  150178. } else {
  150179. return (0, _shallowEqual.default)(node, opts);
  150180. }
  150181. }
  150182. return false;
  150183. }
  150184. function isForXStatement(node, opts) {
  150185. if (!node)
  150186. return false;
  150187. const nodeType = node.type;
  150188. if ("ForInStatement" === nodeType || "ForOfStatement" === nodeType) {
  150189. if (typeof opts === "undefined") {
  150190. return true;
  150191. } else {
  150192. return (0, _shallowEqual.default)(node, opts);
  150193. }
  150194. }
  150195. return false;
  150196. }
  150197. function isFunction(node, opts) {
  150198. if (!node)
  150199. return false;
  150200. const nodeType = node.type;
  150201. if ("FunctionDeclaration" === nodeType || "FunctionExpression" === nodeType || "ObjectMethod" === nodeType || "ArrowFunctionExpression" === nodeType || "ClassMethod" === nodeType || "ClassPrivateMethod" === nodeType) {
  150202. if (typeof opts === "undefined") {
  150203. return true;
  150204. } else {
  150205. return (0, _shallowEqual.default)(node, opts);
  150206. }
  150207. }
  150208. return false;
  150209. }
  150210. function isFunctionParent(node, opts) {
  150211. if (!node)
  150212. return false;
  150213. const nodeType = node.type;
  150214. if ("FunctionDeclaration" === nodeType || "FunctionExpression" === nodeType || "ObjectMethod" === nodeType || "ArrowFunctionExpression" === nodeType || "ClassMethod" === nodeType || "ClassPrivateMethod" === nodeType) {
  150215. if (typeof opts === "undefined") {
  150216. return true;
  150217. } else {
  150218. return (0, _shallowEqual.default)(node, opts);
  150219. }
  150220. }
  150221. return false;
  150222. }
  150223. function isPureish(node, opts) {
  150224. if (!node)
  150225. return false;
  150226. const nodeType = node.type;
  150227. if ("FunctionDeclaration" === nodeType || "FunctionExpression" === nodeType || "StringLiteral" === nodeType || "NumericLiteral" === nodeType || "NullLiteral" === nodeType || "BooleanLiteral" === nodeType || "RegExpLiteral" === nodeType || "ArrowFunctionExpression" === nodeType || "BigIntLiteral" === nodeType || "DecimalLiteral" === nodeType || nodeType === "Placeholder" && "StringLiteral" === node.expectedNode) {
  150228. if (typeof opts === "undefined") {
  150229. return true;
  150230. } else {
  150231. return (0, _shallowEqual.default)(node, opts);
  150232. }
  150233. }
  150234. return false;
  150235. }
  150236. function isDeclaration2(node, opts) {
  150237. if (!node)
  150238. return false;
  150239. const nodeType = node.type;
  150240. if ("FunctionDeclaration" === nodeType || "VariableDeclaration" === nodeType || "ClassDeclaration" === nodeType || "ExportAllDeclaration" === nodeType || "ExportDefaultDeclaration" === nodeType || "ExportNamedDeclaration" === nodeType || "ImportDeclaration" === nodeType || "DeclareClass" === nodeType || "DeclareFunction" === nodeType || "DeclareInterface" === nodeType || "DeclareModule" === nodeType || "DeclareModuleExports" === nodeType || "DeclareTypeAlias" === nodeType || "DeclareOpaqueType" === nodeType || "DeclareVariable" === nodeType || "DeclareExportDeclaration" === nodeType || "DeclareExportAllDeclaration" === nodeType || "InterfaceDeclaration" === nodeType || "OpaqueType" === nodeType || "TypeAlias" === nodeType || "EnumDeclaration" === nodeType || "TSDeclareFunction" === nodeType || "TSInterfaceDeclaration" === nodeType || "TSTypeAliasDeclaration" === nodeType || "TSEnumDeclaration" === nodeType || "TSModuleDeclaration" === nodeType || nodeType === "Placeholder" && "Declaration" === node.expectedNode) {
  150241. if (typeof opts === "undefined") {
  150242. return true;
  150243. } else {
  150244. return (0, _shallowEqual.default)(node, opts);
  150245. }
  150246. }
  150247. return false;
  150248. }
  150249. function isPatternLike(node, opts) {
  150250. if (!node)
  150251. return false;
  150252. const nodeType = node.type;
  150253. if ("Identifier" === nodeType || "RestElement" === nodeType || "AssignmentPattern" === nodeType || "ArrayPattern" === nodeType || "ObjectPattern" === nodeType || nodeType === "Placeholder" && ("Pattern" === node.expectedNode || "Identifier" === node.expectedNode)) {
  150254. if (typeof opts === "undefined") {
  150255. return true;
  150256. } else {
  150257. return (0, _shallowEqual.default)(node, opts);
  150258. }
  150259. }
  150260. return false;
  150261. }
  150262. function isLVal(node, opts) {
  150263. if (!node)
  150264. return false;
  150265. const nodeType = node.type;
  150266. if ("Identifier" === nodeType || "MemberExpression" === nodeType || "RestElement" === nodeType || "AssignmentPattern" === nodeType || "ArrayPattern" === nodeType || "ObjectPattern" === nodeType || "TSParameterProperty" === nodeType || nodeType === "Placeholder" && ("Pattern" === node.expectedNode || "Identifier" === node.expectedNode)) {
  150267. if (typeof opts === "undefined") {
  150268. return true;
  150269. } else {
  150270. return (0, _shallowEqual.default)(node, opts);
  150271. }
  150272. }
  150273. return false;
  150274. }
  150275. function isTSEntityName(node, opts) {
  150276. if (!node)
  150277. return false;
  150278. const nodeType = node.type;
  150279. if ("Identifier" === nodeType || "TSQualifiedName" === nodeType || nodeType === "Placeholder" && "Identifier" === node.expectedNode) {
  150280. if (typeof opts === "undefined") {
  150281. return true;
  150282. } else {
  150283. return (0, _shallowEqual.default)(node, opts);
  150284. }
  150285. }
  150286. return false;
  150287. }
  150288. function isLiteral(node, opts) {
  150289. if (!node)
  150290. return false;
  150291. const nodeType = node.type;
  150292. if ("StringLiteral" === nodeType || "NumericLiteral" === nodeType || "NullLiteral" === nodeType || "BooleanLiteral" === nodeType || "RegExpLiteral" === nodeType || "TemplateLiteral" === nodeType || "BigIntLiteral" === nodeType || "DecimalLiteral" === nodeType || nodeType === "Placeholder" && "StringLiteral" === node.expectedNode) {
  150293. if (typeof opts === "undefined") {
  150294. return true;
  150295. } else {
  150296. return (0, _shallowEqual.default)(node, opts);
  150297. }
  150298. }
  150299. return false;
  150300. }
  150301. function isImmutable(node, opts) {
  150302. if (!node)
  150303. return false;
  150304. const nodeType = node.type;
  150305. if ("StringLiteral" === nodeType || "NumericLiteral" === nodeType || "NullLiteral" === nodeType || "BooleanLiteral" === nodeType || "BigIntLiteral" === nodeType || "JSXAttribute" === nodeType || "JSXClosingElement" === nodeType || "JSXElement" === nodeType || "JSXExpressionContainer" === nodeType || "JSXSpreadChild" === nodeType || "JSXOpeningElement" === nodeType || "JSXText" === nodeType || "JSXFragment" === nodeType || "JSXOpeningFragment" === nodeType || "JSXClosingFragment" === nodeType || "DecimalLiteral" === nodeType || nodeType === "Placeholder" && "StringLiteral" === node.expectedNode) {
  150306. if (typeof opts === "undefined") {
  150307. return true;
  150308. } else {
  150309. return (0, _shallowEqual.default)(node, opts);
  150310. }
  150311. }
  150312. return false;
  150313. }
  150314. function isUserWhitespacable(node, opts) {
  150315. if (!node)
  150316. return false;
  150317. const nodeType = node.type;
  150318. if ("ObjectMethod" === nodeType || "ObjectProperty" === nodeType || "ObjectTypeInternalSlot" === nodeType || "ObjectTypeCallProperty" === nodeType || "ObjectTypeIndexer" === nodeType || "ObjectTypeProperty" === nodeType || "ObjectTypeSpreadProperty" === nodeType) {
  150319. if (typeof opts === "undefined") {
  150320. return true;
  150321. } else {
  150322. return (0, _shallowEqual.default)(node, opts);
  150323. }
  150324. }
  150325. return false;
  150326. }
  150327. function isMethod(node, opts) {
  150328. if (!node)
  150329. return false;
  150330. const nodeType = node.type;
  150331. if ("ObjectMethod" === nodeType || "ClassMethod" === nodeType || "ClassPrivateMethod" === nodeType) {
  150332. if (typeof opts === "undefined") {
  150333. return true;
  150334. } else {
  150335. return (0, _shallowEqual.default)(node, opts);
  150336. }
  150337. }
  150338. return false;
  150339. }
  150340. function isObjectMember(node, opts) {
  150341. if (!node)
  150342. return false;
  150343. const nodeType = node.type;
  150344. if ("ObjectMethod" === nodeType || "ObjectProperty" === nodeType) {
  150345. if (typeof opts === "undefined") {
  150346. return true;
  150347. } else {
  150348. return (0, _shallowEqual.default)(node, opts);
  150349. }
  150350. }
  150351. return false;
  150352. }
  150353. function isProperty(node, opts) {
  150354. if (!node)
  150355. return false;
  150356. const nodeType = node.type;
  150357. if ("ObjectProperty" === nodeType || "ClassProperty" === nodeType || "ClassPrivateProperty" === nodeType) {
  150358. if (typeof opts === "undefined") {
  150359. return true;
  150360. } else {
  150361. return (0, _shallowEqual.default)(node, opts);
  150362. }
  150363. }
  150364. return false;
  150365. }
  150366. function isUnaryLike(node, opts) {
  150367. if (!node)
  150368. return false;
  150369. const nodeType = node.type;
  150370. if ("UnaryExpression" === nodeType || "SpreadElement" === nodeType) {
  150371. if (typeof opts === "undefined") {
  150372. return true;
  150373. } else {
  150374. return (0, _shallowEqual.default)(node, opts);
  150375. }
  150376. }
  150377. return false;
  150378. }
  150379. function isPattern(node, opts) {
  150380. if (!node)
  150381. return false;
  150382. const nodeType = node.type;
  150383. if ("AssignmentPattern" === nodeType || "ArrayPattern" === nodeType || "ObjectPattern" === nodeType || nodeType === "Placeholder" && "Pattern" === node.expectedNode) {
  150384. if (typeof opts === "undefined") {
  150385. return true;
  150386. } else {
  150387. return (0, _shallowEqual.default)(node, opts);
  150388. }
  150389. }
  150390. return false;
  150391. }
  150392. function isClass(node, opts) {
  150393. if (!node)
  150394. return false;
  150395. const nodeType = node.type;
  150396. if ("ClassExpression" === nodeType || "ClassDeclaration" === nodeType) {
  150397. if (typeof opts === "undefined") {
  150398. return true;
  150399. } else {
  150400. return (0, _shallowEqual.default)(node, opts);
  150401. }
  150402. }
  150403. return false;
  150404. }
  150405. function isModuleDeclaration(node, opts) {
  150406. if (!node)
  150407. return false;
  150408. const nodeType = node.type;
  150409. if ("ExportAllDeclaration" === nodeType || "ExportDefaultDeclaration" === nodeType || "ExportNamedDeclaration" === nodeType || "ImportDeclaration" === nodeType) {
  150410. if (typeof opts === "undefined") {
  150411. return true;
  150412. } else {
  150413. return (0, _shallowEqual.default)(node, opts);
  150414. }
  150415. }
  150416. return false;
  150417. }
  150418. function isExportDeclaration(node, opts) {
  150419. if (!node)
  150420. return false;
  150421. const nodeType = node.type;
  150422. if ("ExportAllDeclaration" === nodeType || "ExportDefaultDeclaration" === nodeType || "ExportNamedDeclaration" === nodeType) {
  150423. if (typeof opts === "undefined") {
  150424. return true;
  150425. } else {
  150426. return (0, _shallowEqual.default)(node, opts);
  150427. }
  150428. }
  150429. return false;
  150430. }
  150431. function isModuleSpecifier(node, opts) {
  150432. if (!node)
  150433. return false;
  150434. const nodeType = node.type;
  150435. if ("ExportSpecifier" === nodeType || "ImportDefaultSpecifier" === nodeType || "ImportNamespaceSpecifier" === nodeType || "ImportSpecifier" === nodeType || "ExportNamespaceSpecifier" === nodeType || "ExportDefaultSpecifier" === nodeType) {
  150436. if (typeof opts === "undefined") {
  150437. return true;
  150438. } else {
  150439. return (0, _shallowEqual.default)(node, opts);
  150440. }
  150441. }
  150442. return false;
  150443. }
  150444. function isFlow(node, opts) {
  150445. if (!node)
  150446. return false;
  150447. const nodeType = node.type;
  150448. if ("AnyTypeAnnotation" === nodeType || "ArrayTypeAnnotation" === nodeType || "BooleanTypeAnnotation" === nodeType || "BooleanLiteralTypeAnnotation" === nodeType || "NullLiteralTypeAnnotation" === nodeType || "ClassImplements" === nodeType || "DeclareClass" === nodeType || "DeclareFunction" === nodeType || "DeclareInterface" === nodeType || "DeclareModule" === nodeType || "DeclareModuleExports" === nodeType || "DeclareTypeAlias" === nodeType || "DeclareOpaqueType" === nodeType || "DeclareVariable" === nodeType || "DeclareExportDeclaration" === nodeType || "DeclareExportAllDeclaration" === nodeType || "DeclaredPredicate" === nodeType || "ExistsTypeAnnotation" === nodeType || "FunctionTypeAnnotation" === nodeType || "FunctionTypeParam" === nodeType || "GenericTypeAnnotation" === nodeType || "InferredPredicate" === nodeType || "InterfaceExtends" === nodeType || "InterfaceDeclaration" === nodeType || "InterfaceTypeAnnotation" === nodeType || "IntersectionTypeAnnotation" === nodeType || "MixedTypeAnnotation" === nodeType || "EmptyTypeAnnotation" === nodeType || "NullableTypeAnnotation" === nodeType || "NumberLiteralTypeAnnotation" === nodeType || "NumberTypeAnnotation" === nodeType || "ObjectTypeAnnotation" === nodeType || "ObjectTypeInternalSlot" === nodeType || "ObjectTypeCallProperty" === nodeType || "ObjectTypeIndexer" === nodeType || "ObjectTypeProperty" === nodeType || "ObjectTypeSpreadProperty" === nodeType || "OpaqueType" === nodeType || "QualifiedTypeIdentifier" === nodeType || "StringLiteralTypeAnnotation" === nodeType || "StringTypeAnnotation" === nodeType || "SymbolTypeAnnotation" === nodeType || "ThisTypeAnnotation" === nodeType || "TupleTypeAnnotation" === nodeType || "TypeofTypeAnnotation" === nodeType || "TypeAlias" === nodeType || "TypeAnnotation" === nodeType || "TypeCastExpression" === nodeType || "TypeParameter" === nodeType || "TypeParameterDeclaration" === nodeType || "TypeParameterInstantiation" === nodeType || "UnionTypeAnnotation" === nodeType || "Variance" === nodeType || "VoidTypeAnnotation" === nodeType || "IndexedAccessType" === nodeType || "OptionalIndexedAccessType" === nodeType) {
  150449. if (typeof opts === "undefined") {
  150450. return true;
  150451. } else {
  150452. return (0, _shallowEqual.default)(node, opts);
  150453. }
  150454. }
  150455. return false;
  150456. }
  150457. function isFlowType(node, opts) {
  150458. if (!node)
  150459. return false;
  150460. const nodeType = node.type;
  150461. if ("AnyTypeAnnotation" === nodeType || "ArrayTypeAnnotation" === nodeType || "BooleanTypeAnnotation" === nodeType || "BooleanLiteralTypeAnnotation" === nodeType || "NullLiteralTypeAnnotation" === nodeType || "ExistsTypeAnnotation" === nodeType || "FunctionTypeAnnotation" === nodeType || "GenericTypeAnnotation" === nodeType || "InterfaceTypeAnnotation" === nodeType || "IntersectionTypeAnnotation" === nodeType || "MixedTypeAnnotation" === nodeType || "EmptyTypeAnnotation" === nodeType || "NullableTypeAnnotation" === nodeType || "NumberLiteralTypeAnnotation" === nodeType || "NumberTypeAnnotation" === nodeType || "ObjectTypeAnnotation" === nodeType || "StringLiteralTypeAnnotation" === nodeType || "StringTypeAnnotation" === nodeType || "SymbolTypeAnnotation" === nodeType || "ThisTypeAnnotation" === nodeType || "TupleTypeAnnotation" === nodeType || "TypeofTypeAnnotation" === nodeType || "UnionTypeAnnotation" === nodeType || "VoidTypeAnnotation" === nodeType || "IndexedAccessType" === nodeType || "OptionalIndexedAccessType" === nodeType) {
  150462. if (typeof opts === "undefined") {
  150463. return true;
  150464. } else {
  150465. return (0, _shallowEqual.default)(node, opts);
  150466. }
  150467. }
  150468. return false;
  150469. }
  150470. function isFlowBaseAnnotation(node, opts) {
  150471. if (!node)
  150472. return false;
  150473. const nodeType = node.type;
  150474. if ("AnyTypeAnnotation" === nodeType || "BooleanTypeAnnotation" === nodeType || "NullLiteralTypeAnnotation" === nodeType || "MixedTypeAnnotation" === nodeType || "EmptyTypeAnnotation" === nodeType || "NumberTypeAnnotation" === nodeType || "StringTypeAnnotation" === nodeType || "SymbolTypeAnnotation" === nodeType || "ThisTypeAnnotation" === nodeType || "VoidTypeAnnotation" === nodeType) {
  150475. if (typeof opts === "undefined") {
  150476. return true;
  150477. } else {
  150478. return (0, _shallowEqual.default)(node, opts);
  150479. }
  150480. }
  150481. return false;
  150482. }
  150483. function isFlowDeclaration(node, opts) {
  150484. if (!node)
  150485. return false;
  150486. const nodeType = node.type;
  150487. if ("DeclareClass" === nodeType || "DeclareFunction" === nodeType || "DeclareInterface" === nodeType || "DeclareModule" === nodeType || "DeclareModuleExports" === nodeType || "DeclareTypeAlias" === nodeType || "DeclareOpaqueType" === nodeType || "DeclareVariable" === nodeType || "DeclareExportDeclaration" === nodeType || "DeclareExportAllDeclaration" === nodeType || "InterfaceDeclaration" === nodeType || "OpaqueType" === nodeType || "TypeAlias" === nodeType) {
  150488. if (typeof opts === "undefined") {
  150489. return true;
  150490. } else {
  150491. return (0, _shallowEqual.default)(node, opts);
  150492. }
  150493. }
  150494. return false;
  150495. }
  150496. function isFlowPredicate(node, opts) {
  150497. if (!node)
  150498. return false;
  150499. const nodeType = node.type;
  150500. if ("DeclaredPredicate" === nodeType || "InferredPredicate" === nodeType) {
  150501. if (typeof opts === "undefined") {
  150502. return true;
  150503. } else {
  150504. return (0, _shallowEqual.default)(node, opts);
  150505. }
  150506. }
  150507. return false;
  150508. }
  150509. function isEnumBody(node, opts) {
  150510. if (!node)
  150511. return false;
  150512. const nodeType = node.type;
  150513. if ("EnumBooleanBody" === nodeType || "EnumNumberBody" === nodeType || "EnumStringBody" === nodeType || "EnumSymbolBody" === nodeType) {
  150514. if (typeof opts === "undefined") {
  150515. return true;
  150516. } else {
  150517. return (0, _shallowEqual.default)(node, opts);
  150518. }
  150519. }
  150520. return false;
  150521. }
  150522. function isEnumMember(node, opts) {
  150523. if (!node)
  150524. return false;
  150525. const nodeType = node.type;
  150526. if ("EnumBooleanMember" === nodeType || "EnumNumberMember" === nodeType || "EnumStringMember" === nodeType || "EnumDefaultedMember" === nodeType) {
  150527. if (typeof opts === "undefined") {
  150528. return true;
  150529. } else {
  150530. return (0, _shallowEqual.default)(node, opts);
  150531. }
  150532. }
  150533. return false;
  150534. }
  150535. function isJSX(node, opts) {
  150536. if (!node)
  150537. return false;
  150538. const nodeType = node.type;
  150539. if ("JSXAttribute" === nodeType || "JSXClosingElement" === nodeType || "JSXElement" === nodeType || "JSXEmptyExpression" === nodeType || "JSXExpressionContainer" === nodeType || "JSXSpreadChild" === nodeType || "JSXIdentifier" === nodeType || "JSXMemberExpression" === nodeType || "JSXNamespacedName" === nodeType || "JSXOpeningElement" === nodeType || "JSXSpreadAttribute" === nodeType || "JSXText" === nodeType || "JSXFragment" === nodeType || "JSXOpeningFragment" === nodeType || "JSXClosingFragment" === nodeType) {
  150540. if (typeof opts === "undefined") {
  150541. return true;
  150542. } else {
  150543. return (0, _shallowEqual.default)(node, opts);
  150544. }
  150545. }
  150546. return false;
  150547. }
  150548. function isPrivate(node, opts) {
  150549. if (!node)
  150550. return false;
  150551. const nodeType = node.type;
  150552. if ("ClassPrivateProperty" === nodeType || "ClassPrivateMethod" === nodeType || "PrivateName" === nodeType) {
  150553. if (typeof opts === "undefined") {
  150554. return true;
  150555. } else {
  150556. return (0, _shallowEqual.default)(node, opts);
  150557. }
  150558. }
  150559. return false;
  150560. }
  150561. function isTSTypeElement(node, opts) {
  150562. if (!node)
  150563. return false;
  150564. const nodeType = node.type;
  150565. if ("TSCallSignatureDeclaration" === nodeType || "TSConstructSignatureDeclaration" === nodeType || "TSPropertySignature" === nodeType || "TSMethodSignature" === nodeType || "TSIndexSignature" === nodeType) {
  150566. if (typeof opts === "undefined") {
  150567. return true;
  150568. } else {
  150569. return (0, _shallowEqual.default)(node, opts);
  150570. }
  150571. }
  150572. return false;
  150573. }
  150574. function isTSType(node, opts) {
  150575. if (!node)
  150576. return false;
  150577. const nodeType = node.type;
  150578. if ("TSAnyKeyword" === nodeType || "TSBooleanKeyword" === nodeType || "TSBigIntKeyword" === nodeType || "TSIntrinsicKeyword" === nodeType || "TSNeverKeyword" === nodeType || "TSNullKeyword" === nodeType || "TSNumberKeyword" === nodeType || "TSObjectKeyword" === nodeType || "TSStringKeyword" === nodeType || "TSSymbolKeyword" === nodeType || "TSUndefinedKeyword" === nodeType || "TSUnknownKeyword" === nodeType || "TSVoidKeyword" === nodeType || "TSThisType" === nodeType || "TSFunctionType" === nodeType || "TSConstructorType" === nodeType || "TSTypeReference" === nodeType || "TSTypePredicate" === nodeType || "TSTypeQuery" === nodeType || "TSTypeLiteral" === nodeType || "TSArrayType" === nodeType || "TSTupleType" === nodeType || "TSOptionalType" === nodeType || "TSRestType" === nodeType || "TSUnionType" === nodeType || "TSIntersectionType" === nodeType || "TSConditionalType" === nodeType || "TSInferType" === nodeType || "TSParenthesizedType" === nodeType || "TSTypeOperator" === nodeType || "TSIndexedAccessType" === nodeType || "TSMappedType" === nodeType || "TSLiteralType" === nodeType || "TSExpressionWithTypeArguments" === nodeType || "TSImportType" === nodeType) {
  150579. if (typeof opts === "undefined") {
  150580. return true;
  150581. } else {
  150582. return (0, _shallowEqual.default)(node, opts);
  150583. }
  150584. }
  150585. return false;
  150586. }
  150587. function isTSBaseType(node, opts) {
  150588. if (!node)
  150589. return false;
  150590. const nodeType = node.type;
  150591. if ("TSAnyKeyword" === nodeType || "TSBooleanKeyword" === nodeType || "TSBigIntKeyword" === nodeType || "TSIntrinsicKeyword" === nodeType || "TSNeverKeyword" === nodeType || "TSNullKeyword" === nodeType || "TSNumberKeyword" === nodeType || "TSObjectKeyword" === nodeType || "TSStringKeyword" === nodeType || "TSSymbolKeyword" === nodeType || "TSUndefinedKeyword" === nodeType || "TSUnknownKeyword" === nodeType || "TSVoidKeyword" === nodeType || "TSThisType" === nodeType || "TSLiteralType" === nodeType) {
  150592. if (typeof opts === "undefined") {
  150593. return true;
  150594. } else {
  150595. return (0, _shallowEqual.default)(node, opts);
  150596. }
  150597. }
  150598. return false;
  150599. }
  150600. function isNumberLiteral(node, opts) {
  150601. console.trace("The node type NumberLiteral has been renamed to NumericLiteral");
  150602. if (!node)
  150603. return false;
  150604. const nodeType = node.type;
  150605. if (nodeType === "NumberLiteral") {
  150606. if (typeof opts === "undefined") {
  150607. return true;
  150608. } else {
  150609. return (0, _shallowEqual.default)(node, opts);
  150610. }
  150611. }
  150612. return false;
  150613. }
  150614. function isRegexLiteral(node, opts) {
  150615. console.trace("The node type RegexLiteral has been renamed to RegExpLiteral");
  150616. if (!node)
  150617. return false;
  150618. const nodeType = node.type;
  150619. if (nodeType === "RegexLiteral") {
  150620. if (typeof opts === "undefined") {
  150621. return true;
  150622. } else {
  150623. return (0, _shallowEqual.default)(node, opts);
  150624. }
  150625. }
  150626. return false;
  150627. }
  150628. function isRestProperty(node, opts) {
  150629. console.trace("The node type RestProperty has been renamed to RestElement");
  150630. if (!node)
  150631. return false;
  150632. const nodeType = node.type;
  150633. if (nodeType === "RestProperty") {
  150634. if (typeof opts === "undefined") {
  150635. return true;
  150636. } else {
  150637. return (0, _shallowEqual.default)(node, opts);
  150638. }
  150639. }
  150640. return false;
  150641. }
  150642. function isSpreadProperty(node, opts) {
  150643. console.trace("The node type SpreadProperty has been renamed to SpreadElement");
  150644. if (!node)
  150645. return false;
  150646. const nodeType = node.type;
  150647. if (nodeType === "SpreadProperty") {
  150648. if (typeof opts === "undefined") {
  150649. return true;
  150650. } else {
  150651. return (0, _shallowEqual.default)(node, opts);
  150652. }
  150653. }
  150654. return false;
  150655. }
  150656. }
  150657. });
  150658. // node_modules/@babel/traverse/node_modules/@babel/helper-function-name/node_modules/@babel/types/lib/validators/matchesPattern.js
  150659. var require_matchesPattern7 = __commonJS({
  150660. "node_modules/@babel/traverse/node_modules/@babel/helper-function-name/node_modules/@babel/types/lib/validators/matchesPattern.js"(exports) {
  150661. "use strict";
  150662. Object.defineProperty(exports, "__esModule", {
  150663. value: true
  150664. });
  150665. exports.default = matchesPattern;
  150666. var _generated = require_generated31();
  150667. function matchesPattern(member, match, allowPartial) {
  150668. if (!(0, _generated.isMemberExpression)(member))
  150669. return false;
  150670. const parts = Array.isArray(match) ? match : match.split(".");
  150671. const nodes = [];
  150672. let node;
  150673. for (node = member; (0, _generated.isMemberExpression)(node); node = node.object) {
  150674. nodes.push(node.property);
  150675. }
  150676. nodes.push(node);
  150677. if (nodes.length < parts.length)
  150678. return false;
  150679. if (!allowPartial && nodes.length > parts.length)
  150680. return false;
  150681. for (let i = 0, j = nodes.length - 1; i < parts.length; i++, j--) {
  150682. const node2 = nodes[j];
  150683. let value;
  150684. if ((0, _generated.isIdentifier)(node2)) {
  150685. value = node2.name;
  150686. } else if ((0, _generated.isStringLiteral)(node2)) {
  150687. value = node2.value;
  150688. } else if ((0, _generated.isThisExpression)(node2)) {
  150689. value = "this";
  150690. } else {
  150691. return false;
  150692. }
  150693. if (parts[i] !== value)
  150694. return false;
  150695. }
  150696. return true;
  150697. }
  150698. }
  150699. });
  150700. // node_modules/@babel/traverse/node_modules/@babel/helper-function-name/node_modules/@babel/types/lib/validators/buildMatchMemberExpression.js
  150701. var require_buildMatchMemberExpression7 = __commonJS({
  150702. "node_modules/@babel/traverse/node_modules/@babel/helper-function-name/node_modules/@babel/types/lib/validators/buildMatchMemberExpression.js"(exports) {
  150703. "use strict";
  150704. Object.defineProperty(exports, "__esModule", {
  150705. value: true
  150706. });
  150707. exports.default = buildMatchMemberExpression;
  150708. var _matchesPattern = require_matchesPattern7();
  150709. function buildMatchMemberExpression(match, allowPartial) {
  150710. const parts = match.split(".");
  150711. return (member) => (0, _matchesPattern.default)(member, parts, allowPartial);
  150712. }
  150713. }
  150714. });
  150715. // node_modules/@babel/traverse/node_modules/@babel/helper-function-name/node_modules/@babel/types/lib/validators/react/isReactComponent.js
  150716. var require_isReactComponent7 = __commonJS({
  150717. "node_modules/@babel/traverse/node_modules/@babel/helper-function-name/node_modules/@babel/types/lib/validators/react/isReactComponent.js"(exports) {
  150718. "use strict";
  150719. Object.defineProperty(exports, "__esModule", {
  150720. value: true
  150721. });
  150722. exports.default = void 0;
  150723. var _buildMatchMemberExpression = require_buildMatchMemberExpression7();
  150724. var isReactComponent = (0, _buildMatchMemberExpression.default)("React.Component");
  150725. var _default = isReactComponent;
  150726. exports.default = _default;
  150727. }
  150728. });
  150729. // node_modules/@babel/traverse/node_modules/@babel/helper-function-name/node_modules/@babel/types/lib/validators/react/isCompatTag.js
  150730. var require_isCompatTag7 = __commonJS({
  150731. "node_modules/@babel/traverse/node_modules/@babel/helper-function-name/node_modules/@babel/types/lib/validators/react/isCompatTag.js"(exports) {
  150732. "use strict";
  150733. Object.defineProperty(exports, "__esModule", {
  150734. value: true
  150735. });
  150736. exports.default = isCompatTag;
  150737. function isCompatTag(tagName) {
  150738. return !!tagName && /^[a-z]/.test(tagName);
  150739. }
  150740. }
  150741. });
  150742. // node_modules/@babel/traverse/node_modules/@babel/helper-function-name/node_modules/@babel/types/lib/validators/isType.js
  150743. var require_isType7 = __commonJS({
  150744. "node_modules/@babel/traverse/node_modules/@babel/helper-function-name/node_modules/@babel/types/lib/validators/isType.js"(exports) {
  150745. "use strict";
  150746. Object.defineProperty(exports, "__esModule", {
  150747. value: true
  150748. });
  150749. exports.default = isType;
  150750. var _definitions = require_definitions7();
  150751. function isType(nodeType, targetType) {
  150752. if (nodeType === targetType)
  150753. return true;
  150754. if (_definitions.ALIAS_KEYS[targetType])
  150755. return false;
  150756. const aliases = _definitions.FLIPPED_ALIAS_KEYS[targetType];
  150757. if (aliases) {
  150758. if (aliases[0] === nodeType)
  150759. return true;
  150760. for (const alias of aliases) {
  150761. if (nodeType === alias)
  150762. return true;
  150763. }
  150764. }
  150765. return false;
  150766. }
  150767. }
  150768. });
  150769. // node_modules/@babel/traverse/node_modules/@babel/helper-function-name/node_modules/@babel/types/lib/validators/isPlaceholderType.js
  150770. var require_isPlaceholderType7 = __commonJS({
  150771. "node_modules/@babel/traverse/node_modules/@babel/helper-function-name/node_modules/@babel/types/lib/validators/isPlaceholderType.js"(exports) {
  150772. "use strict";
  150773. Object.defineProperty(exports, "__esModule", {
  150774. value: true
  150775. });
  150776. exports.default = isPlaceholderType;
  150777. var _definitions = require_definitions7();
  150778. function isPlaceholderType(placeholderType, targetType) {
  150779. if (placeholderType === targetType)
  150780. return true;
  150781. const aliases = _definitions.PLACEHOLDERS_ALIAS[placeholderType];
  150782. if (aliases) {
  150783. for (const alias of aliases) {
  150784. if (targetType === alias)
  150785. return true;
  150786. }
  150787. }
  150788. return false;
  150789. }
  150790. }
  150791. });
  150792. // node_modules/@babel/traverse/node_modules/@babel/helper-function-name/node_modules/@babel/types/lib/validators/is.js
  150793. var require_is7 = __commonJS({
  150794. "node_modules/@babel/traverse/node_modules/@babel/helper-function-name/node_modules/@babel/types/lib/validators/is.js"(exports) {
  150795. "use strict";
  150796. Object.defineProperty(exports, "__esModule", {
  150797. value: true
  150798. });
  150799. exports.default = is;
  150800. var _shallowEqual = require_shallowEqual7();
  150801. var _isType = require_isType7();
  150802. var _isPlaceholderType = require_isPlaceholderType7();
  150803. var _definitions = require_definitions7();
  150804. function is(type, node, opts) {
  150805. if (!node)
  150806. return false;
  150807. const matches = (0, _isType.default)(node.type, type);
  150808. if (!matches) {
  150809. if (!opts && node.type === "Placeholder" && type in _definitions.FLIPPED_ALIAS_KEYS) {
  150810. return (0, _isPlaceholderType.default)(node.expectedNode, type);
  150811. }
  150812. return false;
  150813. }
  150814. if (typeof opts === "undefined") {
  150815. return true;
  150816. } else {
  150817. return (0, _shallowEqual.default)(node, opts);
  150818. }
  150819. }
  150820. }
  150821. });
  150822. // node_modules/@babel/traverse/node_modules/@babel/helper-function-name/node_modules/@babel/types/lib/validators/isValidIdentifier.js
  150823. var require_isValidIdentifier7 = __commonJS({
  150824. "node_modules/@babel/traverse/node_modules/@babel/helper-function-name/node_modules/@babel/types/lib/validators/isValidIdentifier.js"(exports) {
  150825. "use strict";
  150826. Object.defineProperty(exports, "__esModule", {
  150827. value: true
  150828. });
  150829. exports.default = isValidIdentifier;
  150830. var _helperValidatorIdentifier = require_lib19();
  150831. function isValidIdentifier(name2, reserved = true) {
  150832. if (typeof name2 !== "string")
  150833. return false;
  150834. if (reserved) {
  150835. if ((0, _helperValidatorIdentifier.isKeyword)(name2) || (0, _helperValidatorIdentifier.isStrictReservedWord)(name2, true)) {
  150836. return false;
  150837. }
  150838. }
  150839. return (0, _helperValidatorIdentifier.isIdentifierName)(name2);
  150840. }
  150841. }
  150842. });
  150843. // node_modules/@babel/traverse/node_modules/@babel/helper-function-name/node_modules/@babel/types/lib/constants/index.js
  150844. var require_constants7 = __commonJS({
  150845. "node_modules/@babel/traverse/node_modules/@babel/helper-function-name/node_modules/@babel/types/lib/constants/index.js"(exports) {
  150846. "use strict";
  150847. Object.defineProperty(exports, "__esModule", {
  150848. value: true
  150849. });
  150850. exports.NOT_LOCAL_BINDING = exports.BLOCK_SCOPED_SYMBOL = exports.INHERIT_KEYS = exports.UNARY_OPERATORS = exports.STRING_UNARY_OPERATORS = exports.NUMBER_UNARY_OPERATORS = exports.BOOLEAN_UNARY_OPERATORS = exports.ASSIGNMENT_OPERATORS = exports.BINARY_OPERATORS = exports.NUMBER_BINARY_OPERATORS = exports.BOOLEAN_BINARY_OPERATORS = exports.COMPARISON_BINARY_OPERATORS = exports.EQUALITY_BINARY_OPERATORS = exports.BOOLEAN_NUMBER_BINARY_OPERATORS = exports.UPDATE_OPERATORS = exports.LOGICAL_OPERATORS = exports.COMMENT_KEYS = exports.FOR_INIT_KEYS = exports.FLATTENABLE_KEYS = exports.STATEMENT_OR_BLOCK_KEYS = void 0;
  150851. var STATEMENT_OR_BLOCK_KEYS = ["consequent", "body", "alternate"];
  150852. exports.STATEMENT_OR_BLOCK_KEYS = STATEMENT_OR_BLOCK_KEYS;
  150853. var FLATTENABLE_KEYS = ["body", "expressions"];
  150854. exports.FLATTENABLE_KEYS = FLATTENABLE_KEYS;
  150855. var FOR_INIT_KEYS = ["left", "init"];
  150856. exports.FOR_INIT_KEYS = FOR_INIT_KEYS;
  150857. var COMMENT_KEYS = ["leadingComments", "trailingComments", "innerComments"];
  150858. exports.COMMENT_KEYS = COMMENT_KEYS;
  150859. var LOGICAL_OPERATORS = ["||", "&&", "??"];
  150860. exports.LOGICAL_OPERATORS = LOGICAL_OPERATORS;
  150861. var UPDATE_OPERATORS = ["++", "--"];
  150862. exports.UPDATE_OPERATORS = UPDATE_OPERATORS;
  150863. var BOOLEAN_NUMBER_BINARY_OPERATORS = [">", "<", ">=", "<="];
  150864. exports.BOOLEAN_NUMBER_BINARY_OPERATORS = BOOLEAN_NUMBER_BINARY_OPERATORS;
  150865. var EQUALITY_BINARY_OPERATORS = ["==", "===", "!=", "!=="];
  150866. exports.EQUALITY_BINARY_OPERATORS = EQUALITY_BINARY_OPERATORS;
  150867. var COMPARISON_BINARY_OPERATORS = [...EQUALITY_BINARY_OPERATORS, "in", "instanceof"];
  150868. exports.COMPARISON_BINARY_OPERATORS = COMPARISON_BINARY_OPERATORS;
  150869. var BOOLEAN_BINARY_OPERATORS = [...COMPARISON_BINARY_OPERATORS, ...BOOLEAN_NUMBER_BINARY_OPERATORS];
  150870. exports.BOOLEAN_BINARY_OPERATORS = BOOLEAN_BINARY_OPERATORS;
  150871. var NUMBER_BINARY_OPERATORS = ["-", "/", "%", "*", "**", "&", "|", ">>", ">>>", "<<", "^"];
  150872. exports.NUMBER_BINARY_OPERATORS = NUMBER_BINARY_OPERATORS;
  150873. var BINARY_OPERATORS = ["+", ...NUMBER_BINARY_OPERATORS, ...BOOLEAN_BINARY_OPERATORS];
  150874. exports.BINARY_OPERATORS = BINARY_OPERATORS;
  150875. var ASSIGNMENT_OPERATORS = ["=", "+=", ...NUMBER_BINARY_OPERATORS.map((op) => op + "="), ...LOGICAL_OPERATORS.map((op) => op + "=")];
  150876. exports.ASSIGNMENT_OPERATORS = ASSIGNMENT_OPERATORS;
  150877. var BOOLEAN_UNARY_OPERATORS = ["delete", "!"];
  150878. exports.BOOLEAN_UNARY_OPERATORS = BOOLEAN_UNARY_OPERATORS;
  150879. var NUMBER_UNARY_OPERATORS = ["+", "-", "~"];
  150880. exports.NUMBER_UNARY_OPERATORS = NUMBER_UNARY_OPERATORS;
  150881. var STRING_UNARY_OPERATORS = ["typeof"];
  150882. exports.STRING_UNARY_OPERATORS = STRING_UNARY_OPERATORS;
  150883. var UNARY_OPERATORS = ["void", "throw", ...BOOLEAN_UNARY_OPERATORS, ...NUMBER_UNARY_OPERATORS, ...STRING_UNARY_OPERATORS];
  150884. exports.UNARY_OPERATORS = UNARY_OPERATORS;
  150885. var INHERIT_KEYS = {
  150886. optional: ["typeAnnotation", "typeParameters", "returnType"],
  150887. force: ["start", "loc", "end"]
  150888. };
  150889. exports.INHERIT_KEYS = INHERIT_KEYS;
  150890. var BLOCK_SCOPED_SYMBOL = Symbol.for("var used to be block scoped");
  150891. exports.BLOCK_SCOPED_SYMBOL = BLOCK_SCOPED_SYMBOL;
  150892. var NOT_LOCAL_BINDING = Symbol.for("should not be considered a local binding");
  150893. exports.NOT_LOCAL_BINDING = NOT_LOCAL_BINDING;
  150894. }
  150895. });
  150896. // node_modules/@babel/traverse/node_modules/@babel/helper-function-name/node_modules/@babel/types/lib/validators/validate.js
  150897. var require_validate7 = __commonJS({
  150898. "node_modules/@babel/traverse/node_modules/@babel/helper-function-name/node_modules/@babel/types/lib/validators/validate.js"(exports) {
  150899. "use strict";
  150900. Object.defineProperty(exports, "__esModule", {
  150901. value: true
  150902. });
  150903. exports.default = validate;
  150904. exports.validateField = validateField;
  150905. exports.validateChild = validateChild;
  150906. var _definitions = require_definitions7();
  150907. function validate(node, key, val) {
  150908. if (!node)
  150909. return;
  150910. const fields = _definitions.NODE_FIELDS[node.type];
  150911. if (!fields)
  150912. return;
  150913. const field = fields[key];
  150914. validateField(node, key, val, field);
  150915. validateChild(node, key, val);
  150916. }
  150917. function validateField(node, key, val, field) {
  150918. if (!(field != null && field.validate))
  150919. return;
  150920. if (field.optional && val == null)
  150921. return;
  150922. field.validate(node, key, val);
  150923. }
  150924. function validateChild(node, key, val) {
  150925. if (val == null)
  150926. return;
  150927. const validate2 = _definitions.NODE_PARENT_VALIDATIONS[val.type];
  150928. if (!validate2)
  150929. return;
  150930. validate2(node, key, val);
  150931. }
  150932. }
  150933. });
  150934. // node_modules/@babel/traverse/node_modules/@babel/helper-function-name/node_modules/@babel/types/lib/definitions/utils.js
  150935. var require_utils7 = __commonJS({
  150936. "node_modules/@babel/traverse/node_modules/@babel/helper-function-name/node_modules/@babel/types/lib/definitions/utils.js"(exports) {
  150937. "use strict";
  150938. Object.defineProperty(exports, "__esModule", {
  150939. value: true
  150940. });
  150941. exports.validate = validate;
  150942. exports.typeIs = typeIs;
  150943. exports.validateType = validateType;
  150944. exports.validateOptional = validateOptional;
  150945. exports.validateOptionalType = validateOptionalType;
  150946. exports.arrayOf = arrayOf;
  150947. exports.arrayOfType = arrayOfType;
  150948. exports.validateArrayOfType = validateArrayOfType;
  150949. exports.assertEach = assertEach;
  150950. exports.assertOneOf = assertOneOf;
  150951. exports.assertNodeType = assertNodeType;
  150952. exports.assertNodeOrValueType = assertNodeOrValueType;
  150953. exports.assertValueType = assertValueType;
  150954. exports.assertShape = assertShape;
  150955. exports.assertOptionalChainStart = assertOptionalChainStart;
  150956. exports.chain = chain;
  150957. exports.default = defineType;
  150958. exports.NODE_PARENT_VALIDATIONS = exports.DEPRECATED_KEYS = exports.BUILDER_KEYS = exports.NODE_FIELDS = exports.FLIPPED_ALIAS_KEYS = exports.ALIAS_KEYS = exports.VISITOR_KEYS = void 0;
  150959. var _is = require_is7();
  150960. var _validate = require_validate7();
  150961. var VISITOR_KEYS = {};
  150962. exports.VISITOR_KEYS = VISITOR_KEYS;
  150963. var ALIAS_KEYS = {};
  150964. exports.ALIAS_KEYS = ALIAS_KEYS;
  150965. var FLIPPED_ALIAS_KEYS = {};
  150966. exports.FLIPPED_ALIAS_KEYS = FLIPPED_ALIAS_KEYS;
  150967. var NODE_FIELDS = {};
  150968. exports.NODE_FIELDS = NODE_FIELDS;
  150969. var BUILDER_KEYS = {};
  150970. exports.BUILDER_KEYS = BUILDER_KEYS;
  150971. var DEPRECATED_KEYS = {};
  150972. exports.DEPRECATED_KEYS = DEPRECATED_KEYS;
  150973. var NODE_PARENT_VALIDATIONS = {};
  150974. exports.NODE_PARENT_VALIDATIONS = NODE_PARENT_VALIDATIONS;
  150975. function getType(val) {
  150976. if (Array.isArray(val)) {
  150977. return "array";
  150978. } else if (val === null) {
  150979. return "null";
  150980. } else {
  150981. return typeof val;
  150982. }
  150983. }
  150984. function validate(validate2) {
  150985. return {
  150986. validate: validate2
  150987. };
  150988. }
  150989. function typeIs(typeName) {
  150990. return typeof typeName === "string" ? assertNodeType(typeName) : assertNodeType(...typeName);
  150991. }
  150992. function validateType(typeName) {
  150993. return validate(typeIs(typeName));
  150994. }
  150995. function validateOptional(validate2) {
  150996. return {
  150997. validate: validate2,
  150998. optional: true
  150999. };
  151000. }
  151001. function validateOptionalType(typeName) {
  151002. return {
  151003. validate: typeIs(typeName),
  151004. optional: true
  151005. };
  151006. }
  151007. function arrayOf(elementType) {
  151008. return chain(assertValueType("array"), assertEach(elementType));
  151009. }
  151010. function arrayOfType(typeName) {
  151011. return arrayOf(typeIs(typeName));
  151012. }
  151013. function validateArrayOfType(typeName) {
  151014. return validate(arrayOfType(typeName));
  151015. }
  151016. function assertEach(callback) {
  151017. function validator(node, key, val) {
  151018. if (!Array.isArray(val))
  151019. return;
  151020. for (let i = 0; i < val.length; i++) {
  151021. const subkey = `${key}[${i}]`;
  151022. const v = val[i];
  151023. callback(node, subkey, v);
  151024. if (process.env.BABEL_TYPES_8_BREAKING)
  151025. (0, _validate.validateChild)(node, subkey, v);
  151026. }
  151027. }
  151028. validator.each = callback;
  151029. return validator;
  151030. }
  151031. function assertOneOf(...values) {
  151032. function validate2(node, key, val) {
  151033. if (values.indexOf(val) < 0) {
  151034. throw new TypeError(`Property ${key} expected value to be one of ${JSON.stringify(values)} but got ${JSON.stringify(val)}`);
  151035. }
  151036. }
  151037. validate2.oneOf = values;
  151038. return validate2;
  151039. }
  151040. function assertNodeType(...types2) {
  151041. function validate2(node, key, val) {
  151042. for (const type of types2) {
  151043. if ((0, _is.default)(type, val)) {
  151044. (0, _validate.validateChild)(node, key, val);
  151045. return;
  151046. }
  151047. }
  151048. throw new TypeError(`Property ${key} of ${node.type} expected node to be of a type ${JSON.stringify(types2)} but instead got ${JSON.stringify(val == null ? void 0 : val.type)}`);
  151049. }
  151050. validate2.oneOfNodeTypes = types2;
  151051. return validate2;
  151052. }
  151053. function assertNodeOrValueType(...types2) {
  151054. function validate2(node, key, val) {
  151055. for (const type of types2) {
  151056. if (getType(val) === type || (0, _is.default)(type, val)) {
  151057. (0, _validate.validateChild)(node, key, val);
  151058. return;
  151059. }
  151060. }
  151061. throw new TypeError(`Property ${key} of ${node.type} expected node to be of a type ${JSON.stringify(types2)} but instead got ${JSON.stringify(val == null ? void 0 : val.type)}`);
  151062. }
  151063. validate2.oneOfNodeOrValueTypes = types2;
  151064. return validate2;
  151065. }
  151066. function assertValueType(type) {
  151067. function validate2(node, key, val) {
  151068. const valid2 = getType(val) === type;
  151069. if (!valid2) {
  151070. throw new TypeError(`Property ${key} expected type of ${type} but got ${getType(val)}`);
  151071. }
  151072. }
  151073. validate2.type = type;
  151074. return validate2;
  151075. }
  151076. function assertShape(shape) {
  151077. function validate2(node, key, val) {
  151078. const errors = [];
  151079. for (const property of Object.keys(shape)) {
  151080. try {
  151081. (0, _validate.validateField)(node, property, val[property], shape[property]);
  151082. } catch (error) {
  151083. if (error instanceof TypeError) {
  151084. errors.push(error.message);
  151085. continue;
  151086. }
  151087. throw error;
  151088. }
  151089. }
  151090. if (errors.length) {
  151091. throw new TypeError(`Property ${key} of ${node.type} expected to have the following:
  151092. ${errors.join("\n")}`);
  151093. }
  151094. }
  151095. validate2.shapeOf = shape;
  151096. return validate2;
  151097. }
  151098. function assertOptionalChainStart() {
  151099. function validate2(node) {
  151100. var _current;
  151101. let current2 = node;
  151102. while (node) {
  151103. const {
  151104. type
  151105. } = current2;
  151106. if (type === "OptionalCallExpression") {
  151107. if (current2.optional)
  151108. return;
  151109. current2 = current2.callee;
  151110. continue;
  151111. }
  151112. if (type === "OptionalMemberExpression") {
  151113. if (current2.optional)
  151114. return;
  151115. current2 = current2.object;
  151116. continue;
  151117. }
  151118. break;
  151119. }
  151120. throw new TypeError(`Non-optional ${node.type} must chain from an optional OptionalMemberExpression or OptionalCallExpression. Found chain from ${(_current = current2) == null ? void 0 : _current.type}`);
  151121. }
  151122. return validate2;
  151123. }
  151124. function chain(...fns) {
  151125. function validate2(...args) {
  151126. for (const fn of fns) {
  151127. fn(...args);
  151128. }
  151129. }
  151130. validate2.chainOf = fns;
  151131. if (fns.length >= 2 && "type" in fns[0] && fns[0].type === "array" && !("each" in fns[1])) {
  151132. throw new Error(`An assertValueType("array") validator can only be followed by an assertEach(...) validator.`);
  151133. }
  151134. return validate2;
  151135. }
  151136. var validTypeOpts = ["aliases", "builder", "deprecatedAlias", "fields", "inherits", "visitor", "validate"];
  151137. var validFieldKeys = ["default", "optional", "validate"];
  151138. function defineType(type, opts = {}) {
  151139. const inherits = opts.inherits && store[opts.inherits] || {};
  151140. let fields = opts.fields;
  151141. if (!fields) {
  151142. fields = {};
  151143. if (inherits.fields) {
  151144. const keys2 = Object.getOwnPropertyNames(inherits.fields);
  151145. for (const key of keys2) {
  151146. const field = inherits.fields[key];
  151147. const def = field.default;
  151148. if (Array.isArray(def) ? def.length > 0 : def && typeof def === "object") {
  151149. throw new Error("field defaults can only be primitives or empty arrays currently");
  151150. }
  151151. fields[key] = {
  151152. default: Array.isArray(def) ? [] : def,
  151153. optional: field.optional,
  151154. validate: field.validate
  151155. };
  151156. }
  151157. }
  151158. }
  151159. const visitor = opts.visitor || inherits.visitor || [];
  151160. const aliases = opts.aliases || inherits.aliases || [];
  151161. const builder = opts.builder || inherits.builder || opts.visitor || [];
  151162. for (const k of Object.keys(opts)) {
  151163. if (validTypeOpts.indexOf(k) === -1) {
  151164. throw new Error(`Unknown type option "${k}" on ${type}`);
  151165. }
  151166. }
  151167. if (opts.deprecatedAlias) {
  151168. DEPRECATED_KEYS[opts.deprecatedAlias] = type;
  151169. }
  151170. for (const key of visitor.concat(builder)) {
  151171. fields[key] = fields[key] || {};
  151172. }
  151173. for (const key of Object.keys(fields)) {
  151174. const field = fields[key];
  151175. if (field.default !== void 0 && builder.indexOf(key) === -1) {
  151176. field.optional = true;
  151177. }
  151178. if (field.default === void 0) {
  151179. field.default = null;
  151180. } else if (!field.validate && field.default != null) {
  151181. field.validate = assertValueType(getType(field.default));
  151182. }
  151183. for (const k of Object.keys(field)) {
  151184. if (validFieldKeys.indexOf(k) === -1) {
  151185. throw new Error(`Unknown field key "${k}" on ${type}.${key}`);
  151186. }
  151187. }
  151188. }
  151189. VISITOR_KEYS[type] = opts.visitor = visitor;
  151190. BUILDER_KEYS[type] = opts.builder = builder;
  151191. NODE_FIELDS[type] = opts.fields = fields;
  151192. ALIAS_KEYS[type] = opts.aliases = aliases;
  151193. aliases.forEach((alias) => {
  151194. FLIPPED_ALIAS_KEYS[alias] = FLIPPED_ALIAS_KEYS[alias] || [];
  151195. FLIPPED_ALIAS_KEYS[alias].push(type);
  151196. });
  151197. if (opts.validate) {
  151198. NODE_PARENT_VALIDATIONS[type] = opts.validate;
  151199. }
  151200. store[type] = opts;
  151201. }
  151202. var store = {};
  151203. }
  151204. });
  151205. // node_modules/@babel/traverse/node_modules/@babel/helper-function-name/node_modules/@babel/types/lib/definitions/core.js
  151206. var require_core7 = __commonJS({
  151207. "node_modules/@babel/traverse/node_modules/@babel/helper-function-name/node_modules/@babel/types/lib/definitions/core.js"(exports) {
  151208. "use strict";
  151209. Object.defineProperty(exports, "__esModule", {
  151210. value: true
  151211. });
  151212. exports.classMethodOrDeclareMethodCommon = exports.classMethodOrPropertyCommon = exports.patternLikeCommon = exports.functionDeclarationCommon = exports.functionTypeAnnotationCommon = exports.functionCommon = void 0;
  151213. var _is = require_is7();
  151214. var _isValidIdentifier = require_isValidIdentifier7();
  151215. var _helperValidatorIdentifier = require_lib19();
  151216. var _constants = require_constants7();
  151217. var _utils = require_utils7();
  151218. (0, _utils.default)("ArrayExpression", {
  151219. fields: {
  151220. elements: {
  151221. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeOrValueType)("null", "Expression", "SpreadElement"))),
  151222. default: !process.env.BABEL_TYPES_8_BREAKING ? [] : void 0
  151223. }
  151224. },
  151225. visitor: ["elements"],
  151226. aliases: ["Expression"]
  151227. });
  151228. (0, _utils.default)("AssignmentExpression", {
  151229. fields: {
  151230. operator: {
  151231. validate: function() {
  151232. if (!process.env.BABEL_TYPES_8_BREAKING) {
  151233. return (0, _utils.assertValueType)("string");
  151234. }
  151235. const identifier = (0, _utils.assertOneOf)(..._constants.ASSIGNMENT_OPERATORS);
  151236. const pattern = (0, _utils.assertOneOf)("=");
  151237. return function(node, key, val) {
  151238. const validator = (0, _is.default)("Pattern", node.left) ? pattern : identifier;
  151239. validator(node, key, val);
  151240. };
  151241. }()
  151242. },
  151243. left: {
  151244. validate: !process.env.BABEL_TYPES_8_BREAKING ? (0, _utils.assertNodeType)("LVal") : (0, _utils.assertNodeType)("Identifier", "MemberExpression", "ArrayPattern", "ObjectPattern")
  151245. },
  151246. right: {
  151247. validate: (0, _utils.assertNodeType)("Expression")
  151248. }
  151249. },
  151250. builder: ["operator", "left", "right"],
  151251. visitor: ["left", "right"],
  151252. aliases: ["Expression"]
  151253. });
  151254. (0, _utils.default)("BinaryExpression", {
  151255. builder: ["operator", "left", "right"],
  151256. fields: {
  151257. operator: {
  151258. validate: (0, _utils.assertOneOf)(..._constants.BINARY_OPERATORS)
  151259. },
  151260. left: {
  151261. validate: function() {
  151262. const expression = (0, _utils.assertNodeType)("Expression");
  151263. const inOp = (0, _utils.assertNodeType)("Expression", "PrivateName");
  151264. const validator = function(node, key, val) {
  151265. const validator2 = node.operator === "in" ? inOp : expression;
  151266. validator2(node, key, val);
  151267. };
  151268. validator.oneOfNodeTypes = ["Expression", "PrivateName"];
  151269. return validator;
  151270. }()
  151271. },
  151272. right: {
  151273. validate: (0, _utils.assertNodeType)("Expression")
  151274. }
  151275. },
  151276. visitor: ["left", "right"],
  151277. aliases: ["Binary", "Expression"]
  151278. });
  151279. (0, _utils.default)("InterpreterDirective", {
  151280. builder: ["value"],
  151281. fields: {
  151282. value: {
  151283. validate: (0, _utils.assertValueType)("string")
  151284. }
  151285. }
  151286. });
  151287. (0, _utils.default)("Directive", {
  151288. visitor: ["value"],
  151289. fields: {
  151290. value: {
  151291. validate: (0, _utils.assertNodeType)("DirectiveLiteral")
  151292. }
  151293. }
  151294. });
  151295. (0, _utils.default)("DirectiveLiteral", {
  151296. builder: ["value"],
  151297. fields: {
  151298. value: {
  151299. validate: (0, _utils.assertValueType)("string")
  151300. }
  151301. }
  151302. });
  151303. (0, _utils.default)("BlockStatement", {
  151304. builder: ["body", "directives"],
  151305. visitor: ["directives", "body"],
  151306. fields: {
  151307. directives: {
  151308. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Directive"))),
  151309. default: []
  151310. },
  151311. body: {
  151312. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Statement")))
  151313. }
  151314. },
  151315. aliases: ["Scopable", "BlockParent", "Block", "Statement"]
  151316. });
  151317. (0, _utils.default)("BreakStatement", {
  151318. visitor: ["label"],
  151319. fields: {
  151320. label: {
  151321. validate: (0, _utils.assertNodeType)("Identifier"),
  151322. optional: true
  151323. }
  151324. },
  151325. aliases: ["Statement", "Terminatorless", "CompletionStatement"]
  151326. });
  151327. (0, _utils.default)("CallExpression", {
  151328. visitor: ["callee", "arguments", "typeParameters", "typeArguments"],
  151329. builder: ["callee", "arguments"],
  151330. aliases: ["Expression"],
  151331. fields: Object.assign({
  151332. callee: {
  151333. validate: (0, _utils.assertNodeType)("Expression", "V8IntrinsicIdentifier")
  151334. },
  151335. arguments: {
  151336. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Expression", "SpreadElement", "JSXNamespacedName", "ArgumentPlaceholder")))
  151337. }
  151338. }, !process.env.BABEL_TYPES_8_BREAKING ? {
  151339. optional: {
  151340. validate: (0, _utils.assertOneOf)(true, false),
  151341. optional: true
  151342. }
  151343. } : {}, {
  151344. typeArguments: {
  151345. validate: (0, _utils.assertNodeType)("TypeParameterInstantiation"),
  151346. optional: true
  151347. },
  151348. typeParameters: {
  151349. validate: (0, _utils.assertNodeType)("TSTypeParameterInstantiation"),
  151350. optional: true
  151351. }
  151352. })
  151353. });
  151354. (0, _utils.default)("CatchClause", {
  151355. visitor: ["param", "body"],
  151356. fields: {
  151357. param: {
  151358. validate: (0, _utils.assertNodeType)("Identifier", "ArrayPattern", "ObjectPattern"),
  151359. optional: true
  151360. },
  151361. body: {
  151362. validate: (0, _utils.assertNodeType)("BlockStatement")
  151363. }
  151364. },
  151365. aliases: ["Scopable", "BlockParent"]
  151366. });
  151367. (0, _utils.default)("ConditionalExpression", {
  151368. visitor: ["test", "consequent", "alternate"],
  151369. fields: {
  151370. test: {
  151371. validate: (0, _utils.assertNodeType)("Expression")
  151372. },
  151373. consequent: {
  151374. validate: (0, _utils.assertNodeType)("Expression")
  151375. },
  151376. alternate: {
  151377. validate: (0, _utils.assertNodeType)("Expression")
  151378. }
  151379. },
  151380. aliases: ["Expression", "Conditional"]
  151381. });
  151382. (0, _utils.default)("ContinueStatement", {
  151383. visitor: ["label"],
  151384. fields: {
  151385. label: {
  151386. validate: (0, _utils.assertNodeType)("Identifier"),
  151387. optional: true
  151388. }
  151389. },
  151390. aliases: ["Statement", "Terminatorless", "CompletionStatement"]
  151391. });
  151392. (0, _utils.default)("DebuggerStatement", {
  151393. aliases: ["Statement"]
  151394. });
  151395. (0, _utils.default)("DoWhileStatement", {
  151396. visitor: ["test", "body"],
  151397. fields: {
  151398. test: {
  151399. validate: (0, _utils.assertNodeType)("Expression")
  151400. },
  151401. body: {
  151402. validate: (0, _utils.assertNodeType)("Statement")
  151403. }
  151404. },
  151405. aliases: ["Statement", "BlockParent", "Loop", "While", "Scopable"]
  151406. });
  151407. (0, _utils.default)("EmptyStatement", {
  151408. aliases: ["Statement"]
  151409. });
  151410. (0, _utils.default)("ExpressionStatement", {
  151411. visitor: ["expression"],
  151412. fields: {
  151413. expression: {
  151414. validate: (0, _utils.assertNodeType)("Expression")
  151415. }
  151416. },
  151417. aliases: ["Statement", "ExpressionWrapper"]
  151418. });
  151419. (0, _utils.default)("File", {
  151420. builder: ["program", "comments", "tokens"],
  151421. visitor: ["program"],
  151422. fields: {
  151423. program: {
  151424. validate: (0, _utils.assertNodeType)("Program")
  151425. },
  151426. comments: {
  151427. validate: !process.env.BABEL_TYPES_8_BREAKING ? Object.assign(() => {
  151428. }, {
  151429. each: {
  151430. oneOfNodeTypes: ["CommentBlock", "CommentLine"]
  151431. }
  151432. }) : (0, _utils.assertEach)((0, _utils.assertNodeType)("CommentBlock", "CommentLine")),
  151433. optional: true
  151434. },
  151435. tokens: {
  151436. validate: (0, _utils.assertEach)(Object.assign(() => {
  151437. }, {
  151438. type: "any"
  151439. })),
  151440. optional: true
  151441. }
  151442. }
  151443. });
  151444. (0, _utils.default)("ForInStatement", {
  151445. visitor: ["left", "right", "body"],
  151446. aliases: ["Scopable", "Statement", "For", "BlockParent", "Loop", "ForXStatement"],
  151447. fields: {
  151448. left: {
  151449. validate: !process.env.BABEL_TYPES_8_BREAKING ? (0, _utils.assertNodeType)("VariableDeclaration", "LVal") : (0, _utils.assertNodeType)("VariableDeclaration", "Identifier", "MemberExpression", "ArrayPattern", "ObjectPattern")
  151450. },
  151451. right: {
  151452. validate: (0, _utils.assertNodeType)("Expression")
  151453. },
  151454. body: {
  151455. validate: (0, _utils.assertNodeType)("Statement")
  151456. }
  151457. }
  151458. });
  151459. (0, _utils.default)("ForStatement", {
  151460. visitor: ["init", "test", "update", "body"],
  151461. aliases: ["Scopable", "Statement", "For", "BlockParent", "Loop"],
  151462. fields: {
  151463. init: {
  151464. validate: (0, _utils.assertNodeType)("VariableDeclaration", "Expression"),
  151465. optional: true
  151466. },
  151467. test: {
  151468. validate: (0, _utils.assertNodeType)("Expression"),
  151469. optional: true
  151470. },
  151471. update: {
  151472. validate: (0, _utils.assertNodeType)("Expression"),
  151473. optional: true
  151474. },
  151475. body: {
  151476. validate: (0, _utils.assertNodeType)("Statement")
  151477. }
  151478. }
  151479. });
  151480. var functionCommon = {
  151481. params: {
  151482. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Identifier", "Pattern", "RestElement")))
  151483. },
  151484. generator: {
  151485. default: false
  151486. },
  151487. async: {
  151488. default: false
  151489. }
  151490. };
  151491. exports.functionCommon = functionCommon;
  151492. var functionTypeAnnotationCommon = {
  151493. returnType: {
  151494. validate: (0, _utils.assertNodeType)("TypeAnnotation", "TSTypeAnnotation", "Noop"),
  151495. optional: true
  151496. },
  151497. typeParameters: {
  151498. validate: (0, _utils.assertNodeType)("TypeParameterDeclaration", "TSTypeParameterDeclaration", "Noop"),
  151499. optional: true
  151500. }
  151501. };
  151502. exports.functionTypeAnnotationCommon = functionTypeAnnotationCommon;
  151503. var functionDeclarationCommon = Object.assign({}, functionCommon, {
  151504. declare: {
  151505. validate: (0, _utils.assertValueType)("boolean"),
  151506. optional: true
  151507. },
  151508. id: {
  151509. validate: (0, _utils.assertNodeType)("Identifier"),
  151510. optional: true
  151511. }
  151512. });
  151513. exports.functionDeclarationCommon = functionDeclarationCommon;
  151514. (0, _utils.default)("FunctionDeclaration", {
  151515. builder: ["id", "params", "body", "generator", "async"],
  151516. visitor: ["id", "params", "body", "returnType", "typeParameters"],
  151517. fields: Object.assign({}, functionDeclarationCommon, functionTypeAnnotationCommon, {
  151518. body: {
  151519. validate: (0, _utils.assertNodeType)("BlockStatement")
  151520. }
  151521. }),
  151522. aliases: ["Scopable", "Function", "BlockParent", "FunctionParent", "Statement", "Pureish", "Declaration"],
  151523. validate: function() {
  151524. if (!process.env.BABEL_TYPES_8_BREAKING)
  151525. return () => {
  151526. };
  151527. const identifier = (0, _utils.assertNodeType)("Identifier");
  151528. return function(parent, key, node) {
  151529. if (!(0, _is.default)("ExportDefaultDeclaration", parent)) {
  151530. identifier(node, "id", node.id);
  151531. }
  151532. };
  151533. }()
  151534. });
  151535. (0, _utils.default)("FunctionExpression", {
  151536. inherits: "FunctionDeclaration",
  151537. aliases: ["Scopable", "Function", "BlockParent", "FunctionParent", "Expression", "Pureish"],
  151538. fields: Object.assign({}, functionCommon, functionTypeAnnotationCommon, {
  151539. id: {
  151540. validate: (0, _utils.assertNodeType)("Identifier"),
  151541. optional: true
  151542. },
  151543. body: {
  151544. validate: (0, _utils.assertNodeType)("BlockStatement")
  151545. }
  151546. })
  151547. });
  151548. var patternLikeCommon = {
  151549. typeAnnotation: {
  151550. validate: (0, _utils.assertNodeType)("TypeAnnotation", "TSTypeAnnotation", "Noop"),
  151551. optional: true
  151552. },
  151553. decorators: {
  151554. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Decorator")))
  151555. }
  151556. };
  151557. exports.patternLikeCommon = patternLikeCommon;
  151558. (0, _utils.default)("Identifier", {
  151559. builder: ["name"],
  151560. visitor: ["typeAnnotation", "decorators"],
  151561. aliases: ["Expression", "PatternLike", "LVal", "TSEntityName"],
  151562. fields: Object.assign({}, patternLikeCommon, {
  151563. name: {
  151564. validate: (0, _utils.chain)((0, _utils.assertValueType)("string"), Object.assign(function(node, key, val) {
  151565. if (!process.env.BABEL_TYPES_8_BREAKING)
  151566. return;
  151567. if (!(0, _isValidIdentifier.default)(val, false)) {
  151568. throw new TypeError(`"${val}" is not a valid identifier name`);
  151569. }
  151570. }, {
  151571. type: "string"
  151572. }))
  151573. },
  151574. optional: {
  151575. validate: (0, _utils.assertValueType)("boolean"),
  151576. optional: true
  151577. }
  151578. }),
  151579. validate(parent, key, node) {
  151580. if (!process.env.BABEL_TYPES_8_BREAKING)
  151581. return;
  151582. const match = /\.(\w+)$/.exec(key);
  151583. if (!match)
  151584. return;
  151585. const [, parentKey] = match;
  151586. const nonComp = {
  151587. computed: false
  151588. };
  151589. if (parentKey === "property") {
  151590. if ((0, _is.default)("MemberExpression", parent, nonComp))
  151591. return;
  151592. if ((0, _is.default)("OptionalMemberExpression", parent, nonComp))
  151593. return;
  151594. } else if (parentKey === "key") {
  151595. if ((0, _is.default)("Property", parent, nonComp))
  151596. return;
  151597. if ((0, _is.default)("Method", parent, nonComp))
  151598. return;
  151599. } else if (parentKey === "exported") {
  151600. if ((0, _is.default)("ExportSpecifier", parent))
  151601. return;
  151602. } else if (parentKey === "imported") {
  151603. if ((0, _is.default)("ImportSpecifier", parent, {
  151604. imported: node
  151605. }))
  151606. return;
  151607. } else if (parentKey === "meta") {
  151608. if ((0, _is.default)("MetaProperty", parent, {
  151609. meta: node
  151610. }))
  151611. return;
  151612. }
  151613. if (((0, _helperValidatorIdentifier.isKeyword)(node.name) || (0, _helperValidatorIdentifier.isReservedWord)(node.name, false)) && node.name !== "this") {
  151614. throw new TypeError(`"${node.name}" is not a valid identifier`);
  151615. }
  151616. }
  151617. });
  151618. (0, _utils.default)("IfStatement", {
  151619. visitor: ["test", "consequent", "alternate"],
  151620. aliases: ["Statement", "Conditional"],
  151621. fields: {
  151622. test: {
  151623. validate: (0, _utils.assertNodeType)("Expression")
  151624. },
  151625. consequent: {
  151626. validate: (0, _utils.assertNodeType)("Statement")
  151627. },
  151628. alternate: {
  151629. optional: true,
  151630. validate: (0, _utils.assertNodeType)("Statement")
  151631. }
  151632. }
  151633. });
  151634. (0, _utils.default)("LabeledStatement", {
  151635. visitor: ["label", "body"],
  151636. aliases: ["Statement"],
  151637. fields: {
  151638. label: {
  151639. validate: (0, _utils.assertNodeType)("Identifier")
  151640. },
  151641. body: {
  151642. validate: (0, _utils.assertNodeType)("Statement")
  151643. }
  151644. }
  151645. });
  151646. (0, _utils.default)("StringLiteral", {
  151647. builder: ["value"],
  151648. fields: {
  151649. value: {
  151650. validate: (0, _utils.assertValueType)("string")
  151651. }
  151652. },
  151653. aliases: ["Expression", "Pureish", "Literal", "Immutable"]
  151654. });
  151655. (0, _utils.default)("NumericLiteral", {
  151656. builder: ["value"],
  151657. deprecatedAlias: "NumberLiteral",
  151658. fields: {
  151659. value: {
  151660. validate: (0, _utils.assertValueType)("number")
  151661. }
  151662. },
  151663. aliases: ["Expression", "Pureish", "Literal", "Immutable"]
  151664. });
  151665. (0, _utils.default)("NullLiteral", {
  151666. aliases: ["Expression", "Pureish", "Literal", "Immutable"]
  151667. });
  151668. (0, _utils.default)("BooleanLiteral", {
  151669. builder: ["value"],
  151670. fields: {
  151671. value: {
  151672. validate: (0, _utils.assertValueType)("boolean")
  151673. }
  151674. },
  151675. aliases: ["Expression", "Pureish", "Literal", "Immutable"]
  151676. });
  151677. (0, _utils.default)("RegExpLiteral", {
  151678. builder: ["pattern", "flags"],
  151679. deprecatedAlias: "RegexLiteral",
  151680. aliases: ["Expression", "Pureish", "Literal"],
  151681. fields: {
  151682. pattern: {
  151683. validate: (0, _utils.assertValueType)("string")
  151684. },
  151685. flags: {
  151686. validate: (0, _utils.chain)((0, _utils.assertValueType)("string"), Object.assign(function(node, key, val) {
  151687. if (!process.env.BABEL_TYPES_8_BREAKING)
  151688. return;
  151689. const invalid2 = /[^gimsuy]/.exec(val);
  151690. if (invalid2) {
  151691. throw new TypeError(`"${invalid2[0]}" is not a valid RegExp flag`);
  151692. }
  151693. }, {
  151694. type: "string"
  151695. })),
  151696. default: ""
  151697. }
  151698. }
  151699. });
  151700. (0, _utils.default)("LogicalExpression", {
  151701. builder: ["operator", "left", "right"],
  151702. visitor: ["left", "right"],
  151703. aliases: ["Binary", "Expression"],
  151704. fields: {
  151705. operator: {
  151706. validate: (0, _utils.assertOneOf)(..._constants.LOGICAL_OPERATORS)
  151707. },
  151708. left: {
  151709. validate: (0, _utils.assertNodeType)("Expression")
  151710. },
  151711. right: {
  151712. validate: (0, _utils.assertNodeType)("Expression")
  151713. }
  151714. }
  151715. });
  151716. (0, _utils.default)("MemberExpression", {
  151717. builder: ["object", "property", "computed", ...!process.env.BABEL_TYPES_8_BREAKING ? ["optional"] : []],
  151718. visitor: ["object", "property"],
  151719. aliases: ["Expression", "LVal"],
  151720. fields: Object.assign({
  151721. object: {
  151722. validate: (0, _utils.assertNodeType)("Expression")
  151723. },
  151724. property: {
  151725. validate: function() {
  151726. const normal = (0, _utils.assertNodeType)("Identifier", "PrivateName");
  151727. const computed = (0, _utils.assertNodeType)("Expression");
  151728. const validator = function(node, key, val) {
  151729. const validator2 = node.computed ? computed : normal;
  151730. validator2(node, key, val);
  151731. };
  151732. validator.oneOfNodeTypes = ["Expression", "Identifier", "PrivateName"];
  151733. return validator;
  151734. }()
  151735. },
  151736. computed: {
  151737. default: false
  151738. }
  151739. }, !process.env.BABEL_TYPES_8_BREAKING ? {
  151740. optional: {
  151741. validate: (0, _utils.assertOneOf)(true, false),
  151742. optional: true
  151743. }
  151744. } : {})
  151745. });
  151746. (0, _utils.default)("NewExpression", {
  151747. inherits: "CallExpression"
  151748. });
  151749. (0, _utils.default)("Program", {
  151750. visitor: ["directives", "body"],
  151751. builder: ["body", "directives", "sourceType", "interpreter"],
  151752. fields: {
  151753. sourceFile: {
  151754. validate: (0, _utils.assertValueType)("string")
  151755. },
  151756. sourceType: {
  151757. validate: (0, _utils.assertOneOf)("script", "module"),
  151758. default: "script"
  151759. },
  151760. interpreter: {
  151761. validate: (0, _utils.assertNodeType)("InterpreterDirective"),
  151762. default: null,
  151763. optional: true
  151764. },
  151765. directives: {
  151766. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Directive"))),
  151767. default: []
  151768. },
  151769. body: {
  151770. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Statement")))
  151771. }
  151772. },
  151773. aliases: ["Scopable", "BlockParent", "Block"]
  151774. });
  151775. (0, _utils.default)("ObjectExpression", {
  151776. visitor: ["properties"],
  151777. aliases: ["Expression"],
  151778. fields: {
  151779. properties: {
  151780. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("ObjectMethod", "ObjectProperty", "SpreadElement")))
  151781. }
  151782. }
  151783. });
  151784. (0, _utils.default)("ObjectMethod", {
  151785. builder: ["kind", "key", "params", "body", "computed", "generator", "async"],
  151786. fields: Object.assign({}, functionCommon, functionTypeAnnotationCommon, {
  151787. kind: Object.assign({
  151788. validate: (0, _utils.assertOneOf)("method", "get", "set")
  151789. }, !process.env.BABEL_TYPES_8_BREAKING ? {
  151790. default: "method"
  151791. } : {}),
  151792. computed: {
  151793. default: false
  151794. },
  151795. key: {
  151796. validate: function() {
  151797. const normal = (0, _utils.assertNodeType)("Identifier", "StringLiteral", "NumericLiteral");
  151798. const computed = (0, _utils.assertNodeType)("Expression");
  151799. const validator = function(node, key, val) {
  151800. const validator2 = node.computed ? computed : normal;
  151801. validator2(node, key, val);
  151802. };
  151803. validator.oneOfNodeTypes = ["Expression", "Identifier", "StringLiteral", "NumericLiteral"];
  151804. return validator;
  151805. }()
  151806. },
  151807. decorators: {
  151808. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Decorator"))),
  151809. optional: true
  151810. },
  151811. body: {
  151812. validate: (0, _utils.assertNodeType)("BlockStatement")
  151813. }
  151814. }),
  151815. visitor: ["key", "params", "body", "decorators", "returnType", "typeParameters"],
  151816. aliases: ["UserWhitespacable", "Function", "Scopable", "BlockParent", "FunctionParent", "Method", "ObjectMember"]
  151817. });
  151818. (0, _utils.default)("ObjectProperty", {
  151819. builder: ["key", "value", "computed", "shorthand", ...!process.env.BABEL_TYPES_8_BREAKING ? ["decorators"] : []],
  151820. fields: {
  151821. computed: {
  151822. default: false
  151823. },
  151824. key: {
  151825. validate: function() {
  151826. const normal = (0, _utils.assertNodeType)("Identifier", "StringLiteral", "NumericLiteral");
  151827. const computed = (0, _utils.assertNodeType)("Expression");
  151828. const validator = function(node, key, val) {
  151829. const validator2 = node.computed ? computed : normal;
  151830. validator2(node, key, val);
  151831. };
  151832. validator.oneOfNodeTypes = ["Expression", "Identifier", "StringLiteral", "NumericLiteral"];
  151833. return validator;
  151834. }()
  151835. },
  151836. value: {
  151837. validate: (0, _utils.assertNodeType)("Expression", "PatternLike")
  151838. },
  151839. shorthand: {
  151840. validate: (0, _utils.chain)((0, _utils.assertValueType)("boolean"), Object.assign(function(node, key, val) {
  151841. if (!process.env.BABEL_TYPES_8_BREAKING)
  151842. return;
  151843. if (val && node.computed) {
  151844. throw new TypeError("Property shorthand of ObjectProperty cannot be true if computed is true");
  151845. }
  151846. }, {
  151847. type: "boolean"
  151848. }), function(node, key, val) {
  151849. if (!process.env.BABEL_TYPES_8_BREAKING)
  151850. return;
  151851. if (val && !(0, _is.default)("Identifier", node.key)) {
  151852. throw new TypeError("Property shorthand of ObjectProperty cannot be true if key is not an Identifier");
  151853. }
  151854. }),
  151855. default: false
  151856. },
  151857. decorators: {
  151858. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Decorator"))),
  151859. optional: true
  151860. }
  151861. },
  151862. visitor: ["key", "value", "decorators"],
  151863. aliases: ["UserWhitespacable", "Property", "ObjectMember"],
  151864. validate: function() {
  151865. const pattern = (0, _utils.assertNodeType)("Identifier", "Pattern");
  151866. const expression = (0, _utils.assertNodeType)("Expression");
  151867. return function(parent, key, node) {
  151868. if (!process.env.BABEL_TYPES_8_BREAKING)
  151869. return;
  151870. const validator = (0, _is.default)("ObjectPattern", parent) ? pattern : expression;
  151871. validator(node, "value", node.value);
  151872. };
  151873. }()
  151874. });
  151875. (0, _utils.default)("RestElement", {
  151876. visitor: ["argument", "typeAnnotation"],
  151877. builder: ["argument"],
  151878. aliases: ["LVal", "PatternLike"],
  151879. deprecatedAlias: "RestProperty",
  151880. fields: Object.assign({}, patternLikeCommon, {
  151881. argument: {
  151882. validate: !process.env.BABEL_TYPES_8_BREAKING ? (0, _utils.assertNodeType)("LVal") : (0, _utils.assertNodeType)("Identifier", "Pattern", "MemberExpression")
  151883. }
  151884. }),
  151885. validate(parent, key) {
  151886. if (!process.env.BABEL_TYPES_8_BREAKING)
  151887. return;
  151888. const match = /(\w+)\[(\d+)\]/.exec(key);
  151889. if (!match)
  151890. throw new Error("Internal Babel error: malformed key.");
  151891. const [, listKey, index2] = match;
  151892. if (parent[listKey].length > index2 + 1) {
  151893. throw new TypeError(`RestElement must be last element of ${listKey}`);
  151894. }
  151895. }
  151896. });
  151897. (0, _utils.default)("ReturnStatement", {
  151898. visitor: ["argument"],
  151899. aliases: ["Statement", "Terminatorless", "CompletionStatement"],
  151900. fields: {
  151901. argument: {
  151902. validate: (0, _utils.assertNodeType)("Expression"),
  151903. optional: true
  151904. }
  151905. }
  151906. });
  151907. (0, _utils.default)("SequenceExpression", {
  151908. visitor: ["expressions"],
  151909. fields: {
  151910. expressions: {
  151911. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Expression")))
  151912. }
  151913. },
  151914. aliases: ["Expression"]
  151915. });
  151916. (0, _utils.default)("ParenthesizedExpression", {
  151917. visitor: ["expression"],
  151918. aliases: ["Expression", "ExpressionWrapper"],
  151919. fields: {
  151920. expression: {
  151921. validate: (0, _utils.assertNodeType)("Expression")
  151922. }
  151923. }
  151924. });
  151925. (0, _utils.default)("SwitchCase", {
  151926. visitor: ["test", "consequent"],
  151927. fields: {
  151928. test: {
  151929. validate: (0, _utils.assertNodeType)("Expression"),
  151930. optional: true
  151931. },
  151932. consequent: {
  151933. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Statement")))
  151934. }
  151935. }
  151936. });
  151937. (0, _utils.default)("SwitchStatement", {
  151938. visitor: ["discriminant", "cases"],
  151939. aliases: ["Statement", "BlockParent", "Scopable"],
  151940. fields: {
  151941. discriminant: {
  151942. validate: (0, _utils.assertNodeType)("Expression")
  151943. },
  151944. cases: {
  151945. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("SwitchCase")))
  151946. }
  151947. }
  151948. });
  151949. (0, _utils.default)("ThisExpression", {
  151950. aliases: ["Expression"]
  151951. });
  151952. (0, _utils.default)("ThrowStatement", {
  151953. visitor: ["argument"],
  151954. aliases: ["Statement", "Terminatorless", "CompletionStatement"],
  151955. fields: {
  151956. argument: {
  151957. validate: (0, _utils.assertNodeType)("Expression")
  151958. }
  151959. }
  151960. });
  151961. (0, _utils.default)("TryStatement", {
  151962. visitor: ["block", "handler", "finalizer"],
  151963. aliases: ["Statement"],
  151964. fields: {
  151965. block: {
  151966. validate: (0, _utils.chain)((0, _utils.assertNodeType)("BlockStatement"), Object.assign(function(node) {
  151967. if (!process.env.BABEL_TYPES_8_BREAKING)
  151968. return;
  151969. if (!node.handler && !node.finalizer) {
  151970. throw new TypeError("TryStatement expects either a handler or finalizer, or both");
  151971. }
  151972. }, {
  151973. oneOfNodeTypes: ["BlockStatement"]
  151974. }))
  151975. },
  151976. handler: {
  151977. optional: true,
  151978. validate: (0, _utils.assertNodeType)("CatchClause")
  151979. },
  151980. finalizer: {
  151981. optional: true,
  151982. validate: (0, _utils.assertNodeType)("BlockStatement")
  151983. }
  151984. }
  151985. });
  151986. (0, _utils.default)("UnaryExpression", {
  151987. builder: ["operator", "argument", "prefix"],
  151988. fields: {
  151989. prefix: {
  151990. default: true
  151991. },
  151992. argument: {
  151993. validate: (0, _utils.assertNodeType)("Expression")
  151994. },
  151995. operator: {
  151996. validate: (0, _utils.assertOneOf)(..._constants.UNARY_OPERATORS)
  151997. }
  151998. },
  151999. visitor: ["argument"],
  152000. aliases: ["UnaryLike", "Expression"]
  152001. });
  152002. (0, _utils.default)("UpdateExpression", {
  152003. builder: ["operator", "argument", "prefix"],
  152004. fields: {
  152005. prefix: {
  152006. default: false
  152007. },
  152008. argument: {
  152009. validate: !process.env.BABEL_TYPES_8_BREAKING ? (0, _utils.assertNodeType)("Expression") : (0, _utils.assertNodeType)("Identifier", "MemberExpression")
  152010. },
  152011. operator: {
  152012. validate: (0, _utils.assertOneOf)(..._constants.UPDATE_OPERATORS)
  152013. }
  152014. },
  152015. visitor: ["argument"],
  152016. aliases: ["Expression"]
  152017. });
  152018. (0, _utils.default)("VariableDeclaration", {
  152019. builder: ["kind", "declarations"],
  152020. visitor: ["declarations"],
  152021. aliases: ["Statement", "Declaration"],
  152022. fields: {
  152023. declare: {
  152024. validate: (0, _utils.assertValueType)("boolean"),
  152025. optional: true
  152026. },
  152027. kind: {
  152028. validate: (0, _utils.assertOneOf)("var", "let", "const")
  152029. },
  152030. declarations: {
  152031. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("VariableDeclarator")))
  152032. }
  152033. },
  152034. validate(parent, key, node) {
  152035. if (!process.env.BABEL_TYPES_8_BREAKING)
  152036. return;
  152037. if (!(0, _is.default)("ForXStatement", parent, {
  152038. left: node
  152039. }))
  152040. return;
  152041. if (node.declarations.length !== 1) {
  152042. throw new TypeError(`Exactly one VariableDeclarator is required in the VariableDeclaration of a ${parent.type}`);
  152043. }
  152044. }
  152045. });
  152046. (0, _utils.default)("VariableDeclarator", {
  152047. visitor: ["id", "init"],
  152048. fields: {
  152049. id: {
  152050. validate: function() {
  152051. if (!process.env.BABEL_TYPES_8_BREAKING) {
  152052. return (0, _utils.assertNodeType)("LVal");
  152053. }
  152054. const normal = (0, _utils.assertNodeType)("Identifier", "ArrayPattern", "ObjectPattern");
  152055. const without = (0, _utils.assertNodeType)("Identifier");
  152056. return function(node, key, val) {
  152057. const validator = node.init ? normal : without;
  152058. validator(node, key, val);
  152059. };
  152060. }()
  152061. },
  152062. definite: {
  152063. optional: true,
  152064. validate: (0, _utils.assertValueType)("boolean")
  152065. },
  152066. init: {
  152067. optional: true,
  152068. validate: (0, _utils.assertNodeType)("Expression")
  152069. }
  152070. }
  152071. });
  152072. (0, _utils.default)("WhileStatement", {
  152073. visitor: ["test", "body"],
  152074. aliases: ["Statement", "BlockParent", "Loop", "While", "Scopable"],
  152075. fields: {
  152076. test: {
  152077. validate: (0, _utils.assertNodeType)("Expression")
  152078. },
  152079. body: {
  152080. validate: (0, _utils.assertNodeType)("Statement")
  152081. }
  152082. }
  152083. });
  152084. (0, _utils.default)("WithStatement", {
  152085. visitor: ["object", "body"],
  152086. aliases: ["Statement"],
  152087. fields: {
  152088. object: {
  152089. validate: (0, _utils.assertNodeType)("Expression")
  152090. },
  152091. body: {
  152092. validate: (0, _utils.assertNodeType)("Statement")
  152093. }
  152094. }
  152095. });
  152096. (0, _utils.default)("AssignmentPattern", {
  152097. visitor: ["left", "right", "decorators"],
  152098. builder: ["left", "right"],
  152099. aliases: ["Pattern", "PatternLike", "LVal"],
  152100. fields: Object.assign({}, patternLikeCommon, {
  152101. left: {
  152102. validate: (0, _utils.assertNodeType)("Identifier", "ObjectPattern", "ArrayPattern", "MemberExpression")
  152103. },
  152104. right: {
  152105. validate: (0, _utils.assertNodeType)("Expression")
  152106. },
  152107. decorators: {
  152108. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Decorator"))),
  152109. optional: true
  152110. }
  152111. })
  152112. });
  152113. (0, _utils.default)("ArrayPattern", {
  152114. visitor: ["elements", "typeAnnotation"],
  152115. builder: ["elements"],
  152116. aliases: ["Pattern", "PatternLike", "LVal"],
  152117. fields: Object.assign({}, patternLikeCommon, {
  152118. elements: {
  152119. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeOrValueType)("null", "PatternLike")))
  152120. },
  152121. decorators: {
  152122. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Decorator"))),
  152123. optional: true
  152124. }
  152125. })
  152126. });
  152127. (0, _utils.default)("ArrowFunctionExpression", {
  152128. builder: ["params", "body", "async"],
  152129. visitor: ["params", "body", "returnType", "typeParameters"],
  152130. aliases: ["Scopable", "Function", "BlockParent", "FunctionParent", "Expression", "Pureish"],
  152131. fields: Object.assign({}, functionCommon, functionTypeAnnotationCommon, {
  152132. expression: {
  152133. validate: (0, _utils.assertValueType)("boolean")
  152134. },
  152135. body: {
  152136. validate: (0, _utils.assertNodeType)("BlockStatement", "Expression")
  152137. }
  152138. })
  152139. });
  152140. (0, _utils.default)("ClassBody", {
  152141. visitor: ["body"],
  152142. fields: {
  152143. body: {
  152144. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("ClassMethod", "ClassPrivateMethod", "ClassProperty", "ClassPrivateProperty", "TSDeclareMethod", "TSIndexSignature")))
  152145. }
  152146. }
  152147. });
  152148. (0, _utils.default)("ClassExpression", {
  152149. builder: ["id", "superClass", "body", "decorators"],
  152150. visitor: ["id", "body", "superClass", "mixins", "typeParameters", "superTypeParameters", "implements", "decorators"],
  152151. aliases: ["Scopable", "Class", "Expression"],
  152152. fields: {
  152153. id: {
  152154. validate: (0, _utils.assertNodeType)("Identifier"),
  152155. optional: true
  152156. },
  152157. typeParameters: {
  152158. validate: (0, _utils.assertNodeType)("TypeParameterDeclaration", "TSTypeParameterDeclaration", "Noop"),
  152159. optional: true
  152160. },
  152161. body: {
  152162. validate: (0, _utils.assertNodeType)("ClassBody")
  152163. },
  152164. superClass: {
  152165. optional: true,
  152166. validate: (0, _utils.assertNodeType)("Expression")
  152167. },
  152168. superTypeParameters: {
  152169. validate: (0, _utils.assertNodeType)("TypeParameterInstantiation", "TSTypeParameterInstantiation"),
  152170. optional: true
  152171. },
  152172. implements: {
  152173. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("TSExpressionWithTypeArguments", "ClassImplements"))),
  152174. optional: true
  152175. },
  152176. decorators: {
  152177. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Decorator"))),
  152178. optional: true
  152179. },
  152180. mixins: {
  152181. validate: (0, _utils.assertNodeType)("InterfaceExtends"),
  152182. optional: true
  152183. }
  152184. }
  152185. });
  152186. (0, _utils.default)("ClassDeclaration", {
  152187. inherits: "ClassExpression",
  152188. aliases: ["Scopable", "Class", "Statement", "Declaration"],
  152189. fields: {
  152190. id: {
  152191. validate: (0, _utils.assertNodeType)("Identifier")
  152192. },
  152193. typeParameters: {
  152194. validate: (0, _utils.assertNodeType)("TypeParameterDeclaration", "TSTypeParameterDeclaration", "Noop"),
  152195. optional: true
  152196. },
  152197. body: {
  152198. validate: (0, _utils.assertNodeType)("ClassBody")
  152199. },
  152200. superClass: {
  152201. optional: true,
  152202. validate: (0, _utils.assertNodeType)("Expression")
  152203. },
  152204. superTypeParameters: {
  152205. validate: (0, _utils.assertNodeType)("TypeParameterInstantiation", "TSTypeParameterInstantiation"),
  152206. optional: true
  152207. },
  152208. implements: {
  152209. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("TSExpressionWithTypeArguments", "ClassImplements"))),
  152210. optional: true
  152211. },
  152212. decorators: {
  152213. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Decorator"))),
  152214. optional: true
  152215. },
  152216. mixins: {
  152217. validate: (0, _utils.assertNodeType)("InterfaceExtends"),
  152218. optional: true
  152219. },
  152220. declare: {
  152221. validate: (0, _utils.assertValueType)("boolean"),
  152222. optional: true
  152223. },
  152224. abstract: {
  152225. validate: (0, _utils.assertValueType)("boolean"),
  152226. optional: true
  152227. }
  152228. },
  152229. validate: function() {
  152230. const identifier = (0, _utils.assertNodeType)("Identifier");
  152231. return function(parent, key, node) {
  152232. if (!process.env.BABEL_TYPES_8_BREAKING)
  152233. return;
  152234. if (!(0, _is.default)("ExportDefaultDeclaration", parent)) {
  152235. identifier(node, "id", node.id);
  152236. }
  152237. };
  152238. }()
  152239. });
  152240. (0, _utils.default)("ExportAllDeclaration", {
  152241. visitor: ["source"],
  152242. aliases: ["Statement", "Declaration", "ModuleDeclaration", "ExportDeclaration"],
  152243. fields: {
  152244. source: {
  152245. validate: (0, _utils.assertNodeType)("StringLiteral")
  152246. },
  152247. exportKind: (0, _utils.validateOptional)((0, _utils.assertOneOf)("type", "value")),
  152248. assertions: {
  152249. optional: true,
  152250. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("ImportAttribute")))
  152251. }
  152252. }
  152253. });
  152254. (0, _utils.default)("ExportDefaultDeclaration", {
  152255. visitor: ["declaration"],
  152256. aliases: ["Statement", "Declaration", "ModuleDeclaration", "ExportDeclaration"],
  152257. fields: {
  152258. declaration: {
  152259. validate: (0, _utils.assertNodeType)("FunctionDeclaration", "TSDeclareFunction", "ClassDeclaration", "Expression")
  152260. }
  152261. }
  152262. });
  152263. (0, _utils.default)("ExportNamedDeclaration", {
  152264. visitor: ["declaration", "specifiers", "source"],
  152265. aliases: ["Statement", "Declaration", "ModuleDeclaration", "ExportDeclaration"],
  152266. fields: {
  152267. declaration: {
  152268. optional: true,
  152269. validate: (0, _utils.chain)((0, _utils.assertNodeType)("Declaration"), Object.assign(function(node, key, val) {
  152270. if (!process.env.BABEL_TYPES_8_BREAKING)
  152271. return;
  152272. if (val && node.specifiers.length) {
  152273. throw new TypeError("Only declaration or specifiers is allowed on ExportNamedDeclaration");
  152274. }
  152275. }, {
  152276. oneOfNodeTypes: ["Declaration"]
  152277. }), function(node, key, val) {
  152278. if (!process.env.BABEL_TYPES_8_BREAKING)
  152279. return;
  152280. if (val && node.source) {
  152281. throw new TypeError("Cannot export a declaration from a source");
  152282. }
  152283. })
  152284. },
  152285. assertions: {
  152286. optional: true,
  152287. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("ImportAttribute")))
  152288. },
  152289. specifiers: {
  152290. default: [],
  152291. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)(function() {
  152292. const sourced = (0, _utils.assertNodeType)("ExportSpecifier", "ExportDefaultSpecifier", "ExportNamespaceSpecifier");
  152293. const sourceless = (0, _utils.assertNodeType)("ExportSpecifier");
  152294. if (!process.env.BABEL_TYPES_8_BREAKING)
  152295. return sourced;
  152296. return function(node, key, val) {
  152297. const validator = node.source ? sourced : sourceless;
  152298. validator(node, key, val);
  152299. };
  152300. }()))
  152301. },
  152302. source: {
  152303. validate: (0, _utils.assertNodeType)("StringLiteral"),
  152304. optional: true
  152305. },
  152306. exportKind: (0, _utils.validateOptional)((0, _utils.assertOneOf)("type", "value"))
  152307. }
  152308. });
  152309. (0, _utils.default)("ExportSpecifier", {
  152310. visitor: ["local", "exported"],
  152311. aliases: ["ModuleSpecifier"],
  152312. fields: {
  152313. local: {
  152314. validate: (0, _utils.assertNodeType)("Identifier")
  152315. },
  152316. exported: {
  152317. validate: (0, _utils.assertNodeType)("Identifier", "StringLiteral")
  152318. }
  152319. }
  152320. });
  152321. (0, _utils.default)("ForOfStatement", {
  152322. visitor: ["left", "right", "body"],
  152323. builder: ["left", "right", "body", "await"],
  152324. aliases: ["Scopable", "Statement", "For", "BlockParent", "Loop", "ForXStatement"],
  152325. fields: {
  152326. left: {
  152327. validate: function() {
  152328. if (!process.env.BABEL_TYPES_8_BREAKING) {
  152329. return (0, _utils.assertNodeType)("VariableDeclaration", "LVal");
  152330. }
  152331. const declaration = (0, _utils.assertNodeType)("VariableDeclaration");
  152332. const lval = (0, _utils.assertNodeType)("Identifier", "MemberExpression", "ArrayPattern", "ObjectPattern");
  152333. return function(node, key, val) {
  152334. if ((0, _is.default)("VariableDeclaration", val)) {
  152335. declaration(node, key, val);
  152336. } else {
  152337. lval(node, key, val);
  152338. }
  152339. };
  152340. }()
  152341. },
  152342. right: {
  152343. validate: (0, _utils.assertNodeType)("Expression")
  152344. },
  152345. body: {
  152346. validate: (0, _utils.assertNodeType)("Statement")
  152347. },
  152348. await: {
  152349. default: false
  152350. }
  152351. }
  152352. });
  152353. (0, _utils.default)("ImportDeclaration", {
  152354. visitor: ["specifiers", "source"],
  152355. aliases: ["Statement", "Declaration", "ModuleDeclaration"],
  152356. fields: {
  152357. assertions: {
  152358. optional: true,
  152359. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("ImportAttribute")))
  152360. },
  152361. specifiers: {
  152362. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("ImportSpecifier", "ImportDefaultSpecifier", "ImportNamespaceSpecifier")))
  152363. },
  152364. source: {
  152365. validate: (0, _utils.assertNodeType)("StringLiteral")
  152366. },
  152367. importKind: {
  152368. validate: (0, _utils.assertOneOf)("type", "typeof", "value"),
  152369. optional: true
  152370. }
  152371. }
  152372. });
  152373. (0, _utils.default)("ImportDefaultSpecifier", {
  152374. visitor: ["local"],
  152375. aliases: ["ModuleSpecifier"],
  152376. fields: {
  152377. local: {
  152378. validate: (0, _utils.assertNodeType)("Identifier")
  152379. }
  152380. }
  152381. });
  152382. (0, _utils.default)("ImportNamespaceSpecifier", {
  152383. visitor: ["local"],
  152384. aliases: ["ModuleSpecifier"],
  152385. fields: {
  152386. local: {
  152387. validate: (0, _utils.assertNodeType)("Identifier")
  152388. }
  152389. }
  152390. });
  152391. (0, _utils.default)("ImportSpecifier", {
  152392. visitor: ["local", "imported"],
  152393. aliases: ["ModuleSpecifier"],
  152394. fields: {
  152395. local: {
  152396. validate: (0, _utils.assertNodeType)("Identifier")
  152397. },
  152398. imported: {
  152399. validate: (0, _utils.assertNodeType)("Identifier", "StringLiteral")
  152400. },
  152401. importKind: {
  152402. validate: (0, _utils.assertOneOf)("type", "typeof"),
  152403. optional: true
  152404. }
  152405. }
  152406. });
  152407. (0, _utils.default)("MetaProperty", {
  152408. visitor: ["meta", "property"],
  152409. aliases: ["Expression"],
  152410. fields: {
  152411. meta: {
  152412. validate: (0, _utils.chain)((0, _utils.assertNodeType)("Identifier"), Object.assign(function(node, key, val) {
  152413. if (!process.env.BABEL_TYPES_8_BREAKING)
  152414. return;
  152415. let property;
  152416. switch (val.name) {
  152417. case "function":
  152418. property = "sent";
  152419. break;
  152420. case "new":
  152421. property = "target";
  152422. break;
  152423. case "import":
  152424. property = "meta";
  152425. break;
  152426. }
  152427. if (!(0, _is.default)("Identifier", node.property, {
  152428. name: property
  152429. })) {
  152430. throw new TypeError("Unrecognised MetaProperty");
  152431. }
  152432. }, {
  152433. oneOfNodeTypes: ["Identifier"]
  152434. }))
  152435. },
  152436. property: {
  152437. validate: (0, _utils.assertNodeType)("Identifier")
  152438. }
  152439. }
  152440. });
  152441. var classMethodOrPropertyCommon = {
  152442. abstract: {
  152443. validate: (0, _utils.assertValueType)("boolean"),
  152444. optional: true
  152445. },
  152446. accessibility: {
  152447. validate: (0, _utils.assertOneOf)("public", "private", "protected"),
  152448. optional: true
  152449. },
  152450. static: {
  152451. default: false
  152452. },
  152453. override: {
  152454. default: false
  152455. },
  152456. computed: {
  152457. default: false
  152458. },
  152459. optional: {
  152460. validate: (0, _utils.assertValueType)("boolean"),
  152461. optional: true
  152462. },
  152463. key: {
  152464. validate: (0, _utils.chain)(function() {
  152465. const normal = (0, _utils.assertNodeType)("Identifier", "StringLiteral", "NumericLiteral");
  152466. const computed = (0, _utils.assertNodeType)("Expression");
  152467. return function(node, key, val) {
  152468. const validator = node.computed ? computed : normal;
  152469. validator(node, key, val);
  152470. };
  152471. }(), (0, _utils.assertNodeType)("Identifier", "StringLiteral", "NumericLiteral", "Expression"))
  152472. }
  152473. };
  152474. exports.classMethodOrPropertyCommon = classMethodOrPropertyCommon;
  152475. var classMethodOrDeclareMethodCommon = Object.assign({}, functionCommon, classMethodOrPropertyCommon, {
  152476. params: {
  152477. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Identifier", "Pattern", "RestElement", "TSParameterProperty")))
  152478. },
  152479. kind: {
  152480. validate: (0, _utils.assertOneOf)("get", "set", "method", "constructor"),
  152481. default: "method"
  152482. },
  152483. access: {
  152484. validate: (0, _utils.chain)((0, _utils.assertValueType)("string"), (0, _utils.assertOneOf)("public", "private", "protected")),
  152485. optional: true
  152486. },
  152487. decorators: {
  152488. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Decorator"))),
  152489. optional: true
  152490. }
  152491. });
  152492. exports.classMethodOrDeclareMethodCommon = classMethodOrDeclareMethodCommon;
  152493. (0, _utils.default)("ClassMethod", {
  152494. aliases: ["Function", "Scopable", "BlockParent", "FunctionParent", "Method"],
  152495. builder: ["kind", "key", "params", "body", "computed", "static", "generator", "async"],
  152496. visitor: ["key", "params", "body", "decorators", "returnType", "typeParameters"],
  152497. fields: Object.assign({}, classMethodOrDeclareMethodCommon, functionTypeAnnotationCommon, {
  152498. body: {
  152499. validate: (0, _utils.assertNodeType)("BlockStatement")
  152500. }
  152501. })
  152502. });
  152503. (0, _utils.default)("ObjectPattern", {
  152504. visitor: ["properties", "typeAnnotation", "decorators"],
  152505. builder: ["properties"],
  152506. aliases: ["Pattern", "PatternLike", "LVal"],
  152507. fields: Object.assign({}, patternLikeCommon, {
  152508. properties: {
  152509. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("RestElement", "ObjectProperty")))
  152510. }
  152511. })
  152512. });
  152513. (0, _utils.default)("SpreadElement", {
  152514. visitor: ["argument"],
  152515. aliases: ["UnaryLike"],
  152516. deprecatedAlias: "SpreadProperty",
  152517. fields: {
  152518. argument: {
  152519. validate: (0, _utils.assertNodeType)("Expression")
  152520. }
  152521. }
  152522. });
  152523. (0, _utils.default)("Super", {
  152524. aliases: ["Expression"]
  152525. });
  152526. (0, _utils.default)("TaggedTemplateExpression", {
  152527. visitor: ["tag", "quasi"],
  152528. aliases: ["Expression"],
  152529. fields: {
  152530. tag: {
  152531. validate: (0, _utils.assertNodeType)("Expression")
  152532. },
  152533. quasi: {
  152534. validate: (0, _utils.assertNodeType)("TemplateLiteral")
  152535. },
  152536. typeParameters: {
  152537. validate: (0, _utils.assertNodeType)("TypeParameterInstantiation", "TSTypeParameterInstantiation"),
  152538. optional: true
  152539. }
  152540. }
  152541. });
  152542. (0, _utils.default)("TemplateElement", {
  152543. builder: ["value", "tail"],
  152544. fields: {
  152545. value: {
  152546. validate: (0, _utils.assertShape)({
  152547. raw: {
  152548. validate: (0, _utils.assertValueType)("string")
  152549. },
  152550. cooked: {
  152551. validate: (0, _utils.assertValueType)("string"),
  152552. optional: true
  152553. }
  152554. })
  152555. },
  152556. tail: {
  152557. default: false
  152558. }
  152559. }
  152560. });
  152561. (0, _utils.default)("TemplateLiteral", {
  152562. visitor: ["quasis", "expressions"],
  152563. aliases: ["Expression", "Literal"],
  152564. fields: {
  152565. quasis: {
  152566. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("TemplateElement")))
  152567. },
  152568. expressions: {
  152569. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Expression", "TSType")), function(node, key, val) {
  152570. if (node.quasis.length !== val.length + 1) {
  152571. throw new TypeError(`Number of ${node.type} quasis should be exactly one more than the number of expressions.
  152572. Expected ${val.length + 1} quasis but got ${node.quasis.length}`);
  152573. }
  152574. })
  152575. }
  152576. }
  152577. });
  152578. (0, _utils.default)("YieldExpression", {
  152579. builder: ["argument", "delegate"],
  152580. visitor: ["argument"],
  152581. aliases: ["Expression", "Terminatorless"],
  152582. fields: {
  152583. delegate: {
  152584. validate: (0, _utils.chain)((0, _utils.assertValueType)("boolean"), Object.assign(function(node, key, val) {
  152585. if (!process.env.BABEL_TYPES_8_BREAKING)
  152586. return;
  152587. if (val && !node.argument) {
  152588. throw new TypeError("Property delegate of YieldExpression cannot be true if there is no argument");
  152589. }
  152590. }, {
  152591. type: "boolean"
  152592. })),
  152593. default: false
  152594. },
  152595. argument: {
  152596. optional: true,
  152597. validate: (0, _utils.assertNodeType)("Expression")
  152598. }
  152599. }
  152600. });
  152601. (0, _utils.default)("AwaitExpression", {
  152602. builder: ["argument"],
  152603. visitor: ["argument"],
  152604. aliases: ["Expression", "Terminatorless"],
  152605. fields: {
  152606. argument: {
  152607. validate: (0, _utils.assertNodeType)("Expression")
  152608. }
  152609. }
  152610. });
  152611. (0, _utils.default)("Import", {
  152612. aliases: ["Expression"]
  152613. });
  152614. (0, _utils.default)("BigIntLiteral", {
  152615. builder: ["value"],
  152616. fields: {
  152617. value: {
  152618. validate: (0, _utils.assertValueType)("string")
  152619. }
  152620. },
  152621. aliases: ["Expression", "Pureish", "Literal", "Immutable"]
  152622. });
  152623. (0, _utils.default)("ExportNamespaceSpecifier", {
  152624. visitor: ["exported"],
  152625. aliases: ["ModuleSpecifier"],
  152626. fields: {
  152627. exported: {
  152628. validate: (0, _utils.assertNodeType)("Identifier")
  152629. }
  152630. }
  152631. });
  152632. (0, _utils.default)("OptionalMemberExpression", {
  152633. builder: ["object", "property", "computed", "optional"],
  152634. visitor: ["object", "property"],
  152635. aliases: ["Expression"],
  152636. fields: {
  152637. object: {
  152638. validate: (0, _utils.assertNodeType)("Expression")
  152639. },
  152640. property: {
  152641. validate: function() {
  152642. const normal = (0, _utils.assertNodeType)("Identifier");
  152643. const computed = (0, _utils.assertNodeType)("Expression");
  152644. const validator = function(node, key, val) {
  152645. const validator2 = node.computed ? computed : normal;
  152646. validator2(node, key, val);
  152647. };
  152648. validator.oneOfNodeTypes = ["Expression", "Identifier"];
  152649. return validator;
  152650. }()
  152651. },
  152652. computed: {
  152653. default: false
  152654. },
  152655. optional: {
  152656. validate: !process.env.BABEL_TYPES_8_BREAKING ? (0, _utils.assertValueType)("boolean") : (0, _utils.chain)((0, _utils.assertValueType)("boolean"), (0, _utils.assertOptionalChainStart)())
  152657. }
  152658. }
  152659. });
  152660. (0, _utils.default)("OptionalCallExpression", {
  152661. visitor: ["callee", "arguments", "typeParameters", "typeArguments"],
  152662. builder: ["callee", "arguments", "optional"],
  152663. aliases: ["Expression"],
  152664. fields: {
  152665. callee: {
  152666. validate: (0, _utils.assertNodeType)("Expression")
  152667. },
  152668. arguments: {
  152669. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Expression", "SpreadElement", "JSXNamespacedName", "ArgumentPlaceholder")))
  152670. },
  152671. optional: {
  152672. validate: !process.env.BABEL_TYPES_8_BREAKING ? (0, _utils.assertValueType)("boolean") : (0, _utils.chain)((0, _utils.assertValueType)("boolean"), (0, _utils.assertOptionalChainStart)())
  152673. },
  152674. typeArguments: {
  152675. validate: (0, _utils.assertNodeType)("TypeParameterInstantiation"),
  152676. optional: true
  152677. },
  152678. typeParameters: {
  152679. validate: (0, _utils.assertNodeType)("TSTypeParameterInstantiation"),
  152680. optional: true
  152681. }
  152682. }
  152683. });
  152684. }
  152685. });
  152686. // node_modules/@babel/traverse/node_modules/@babel/helper-function-name/node_modules/@babel/types/lib/definitions/flow.js
  152687. var require_flow9 = __commonJS({
  152688. "node_modules/@babel/traverse/node_modules/@babel/helper-function-name/node_modules/@babel/types/lib/definitions/flow.js"() {
  152689. "use strict";
  152690. var _utils = require_utils7();
  152691. var defineInterfaceishType = (name2, typeParameterType = "TypeParameterDeclaration") => {
  152692. (0, _utils.default)(name2, {
  152693. builder: ["id", "typeParameters", "extends", "body"],
  152694. visitor: ["id", "typeParameters", "extends", "mixins", "implements", "body"],
  152695. aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"],
  152696. fields: {
  152697. id: (0, _utils.validateType)("Identifier"),
  152698. typeParameters: (0, _utils.validateOptionalType)(typeParameterType),
  152699. extends: (0, _utils.validateOptional)((0, _utils.arrayOfType)("InterfaceExtends")),
  152700. mixins: (0, _utils.validateOptional)((0, _utils.arrayOfType)("InterfaceExtends")),
  152701. implements: (0, _utils.validateOptional)((0, _utils.arrayOfType)("ClassImplements")),
  152702. body: (0, _utils.validateType)("ObjectTypeAnnotation")
  152703. }
  152704. });
  152705. };
  152706. (0, _utils.default)("AnyTypeAnnotation", {
  152707. aliases: ["Flow", "FlowType", "FlowBaseAnnotation"]
  152708. });
  152709. (0, _utils.default)("ArrayTypeAnnotation", {
  152710. visitor: ["elementType"],
  152711. aliases: ["Flow", "FlowType"],
  152712. fields: {
  152713. elementType: (0, _utils.validateType)("FlowType")
  152714. }
  152715. });
  152716. (0, _utils.default)("BooleanTypeAnnotation", {
  152717. aliases: ["Flow", "FlowType", "FlowBaseAnnotation"]
  152718. });
  152719. (0, _utils.default)("BooleanLiteralTypeAnnotation", {
  152720. builder: ["value"],
  152721. aliases: ["Flow", "FlowType"],
  152722. fields: {
  152723. value: (0, _utils.validate)((0, _utils.assertValueType)("boolean"))
  152724. }
  152725. });
  152726. (0, _utils.default)("NullLiteralTypeAnnotation", {
  152727. aliases: ["Flow", "FlowType", "FlowBaseAnnotation"]
  152728. });
  152729. (0, _utils.default)("ClassImplements", {
  152730. visitor: ["id", "typeParameters"],
  152731. aliases: ["Flow"],
  152732. fields: {
  152733. id: (0, _utils.validateType)("Identifier"),
  152734. typeParameters: (0, _utils.validateOptionalType)("TypeParameterInstantiation")
  152735. }
  152736. });
  152737. defineInterfaceishType("DeclareClass");
  152738. (0, _utils.default)("DeclareFunction", {
  152739. visitor: ["id"],
  152740. aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"],
  152741. fields: {
  152742. id: (0, _utils.validateType)("Identifier"),
  152743. predicate: (0, _utils.validateOptionalType)("DeclaredPredicate")
  152744. }
  152745. });
  152746. defineInterfaceishType("DeclareInterface");
  152747. (0, _utils.default)("DeclareModule", {
  152748. builder: ["id", "body", "kind"],
  152749. visitor: ["id", "body"],
  152750. aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"],
  152751. fields: {
  152752. id: (0, _utils.validateType)(["Identifier", "StringLiteral"]),
  152753. body: (0, _utils.validateType)("BlockStatement"),
  152754. kind: (0, _utils.validateOptional)((0, _utils.assertOneOf)("CommonJS", "ES"))
  152755. }
  152756. });
  152757. (0, _utils.default)("DeclareModuleExports", {
  152758. visitor: ["typeAnnotation"],
  152759. aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"],
  152760. fields: {
  152761. typeAnnotation: (0, _utils.validateType)("TypeAnnotation")
  152762. }
  152763. });
  152764. (0, _utils.default)("DeclareTypeAlias", {
  152765. visitor: ["id", "typeParameters", "right"],
  152766. aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"],
  152767. fields: {
  152768. id: (0, _utils.validateType)("Identifier"),
  152769. typeParameters: (0, _utils.validateOptionalType)("TypeParameterDeclaration"),
  152770. right: (0, _utils.validateType)("FlowType")
  152771. }
  152772. });
  152773. (0, _utils.default)("DeclareOpaqueType", {
  152774. visitor: ["id", "typeParameters", "supertype"],
  152775. aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"],
  152776. fields: {
  152777. id: (0, _utils.validateType)("Identifier"),
  152778. typeParameters: (0, _utils.validateOptionalType)("TypeParameterDeclaration"),
  152779. supertype: (0, _utils.validateOptionalType)("FlowType")
  152780. }
  152781. });
  152782. (0, _utils.default)("DeclareVariable", {
  152783. visitor: ["id"],
  152784. aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"],
  152785. fields: {
  152786. id: (0, _utils.validateType)("Identifier")
  152787. }
  152788. });
  152789. (0, _utils.default)("DeclareExportDeclaration", {
  152790. visitor: ["declaration", "specifiers", "source"],
  152791. aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"],
  152792. fields: {
  152793. declaration: (0, _utils.validateOptionalType)("Flow"),
  152794. specifiers: (0, _utils.validateOptional)((0, _utils.arrayOfType)(["ExportSpecifier", "ExportNamespaceSpecifier"])),
  152795. source: (0, _utils.validateOptionalType)("StringLiteral"),
  152796. default: (0, _utils.validateOptional)((0, _utils.assertValueType)("boolean"))
  152797. }
  152798. });
  152799. (0, _utils.default)("DeclareExportAllDeclaration", {
  152800. visitor: ["source"],
  152801. aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"],
  152802. fields: {
  152803. source: (0, _utils.validateType)("StringLiteral"),
  152804. exportKind: (0, _utils.validateOptional)((0, _utils.assertOneOf)("type", "value"))
  152805. }
  152806. });
  152807. (0, _utils.default)("DeclaredPredicate", {
  152808. visitor: ["value"],
  152809. aliases: ["Flow", "FlowPredicate"],
  152810. fields: {
  152811. value: (0, _utils.validateType)("Flow")
  152812. }
  152813. });
  152814. (0, _utils.default)("ExistsTypeAnnotation", {
  152815. aliases: ["Flow", "FlowType"]
  152816. });
  152817. (0, _utils.default)("FunctionTypeAnnotation", {
  152818. visitor: ["typeParameters", "params", "rest", "returnType"],
  152819. aliases: ["Flow", "FlowType"],
  152820. fields: {
  152821. typeParameters: (0, _utils.validateOptionalType)("TypeParameterDeclaration"),
  152822. params: (0, _utils.validate)((0, _utils.arrayOfType)("FunctionTypeParam")),
  152823. rest: (0, _utils.validateOptionalType)("FunctionTypeParam"),
  152824. this: (0, _utils.validateOptionalType)("FunctionTypeParam"),
  152825. returnType: (0, _utils.validateType)("FlowType")
  152826. }
  152827. });
  152828. (0, _utils.default)("FunctionTypeParam", {
  152829. visitor: ["name", "typeAnnotation"],
  152830. aliases: ["Flow"],
  152831. fields: {
  152832. name: (0, _utils.validateOptionalType)("Identifier"),
  152833. typeAnnotation: (0, _utils.validateType)("FlowType"),
  152834. optional: (0, _utils.validateOptional)((0, _utils.assertValueType)("boolean"))
  152835. }
  152836. });
  152837. (0, _utils.default)("GenericTypeAnnotation", {
  152838. visitor: ["id", "typeParameters"],
  152839. aliases: ["Flow", "FlowType"],
  152840. fields: {
  152841. id: (0, _utils.validateType)(["Identifier", "QualifiedTypeIdentifier"]),
  152842. typeParameters: (0, _utils.validateOptionalType)("TypeParameterInstantiation")
  152843. }
  152844. });
  152845. (0, _utils.default)("InferredPredicate", {
  152846. aliases: ["Flow", "FlowPredicate"]
  152847. });
  152848. (0, _utils.default)("InterfaceExtends", {
  152849. visitor: ["id", "typeParameters"],
  152850. aliases: ["Flow"],
  152851. fields: {
  152852. id: (0, _utils.validateType)(["Identifier", "QualifiedTypeIdentifier"]),
  152853. typeParameters: (0, _utils.validateOptionalType)("TypeParameterInstantiation")
  152854. }
  152855. });
  152856. defineInterfaceishType("InterfaceDeclaration");
  152857. (0, _utils.default)("InterfaceTypeAnnotation", {
  152858. visitor: ["extends", "body"],
  152859. aliases: ["Flow", "FlowType"],
  152860. fields: {
  152861. extends: (0, _utils.validateOptional)((0, _utils.arrayOfType)("InterfaceExtends")),
  152862. body: (0, _utils.validateType)("ObjectTypeAnnotation")
  152863. }
  152864. });
  152865. (0, _utils.default)("IntersectionTypeAnnotation", {
  152866. visitor: ["types"],
  152867. aliases: ["Flow", "FlowType"],
  152868. fields: {
  152869. types: (0, _utils.validate)((0, _utils.arrayOfType)("FlowType"))
  152870. }
  152871. });
  152872. (0, _utils.default)("MixedTypeAnnotation", {
  152873. aliases: ["Flow", "FlowType", "FlowBaseAnnotation"]
  152874. });
  152875. (0, _utils.default)("EmptyTypeAnnotation", {
  152876. aliases: ["Flow", "FlowType", "FlowBaseAnnotation"]
  152877. });
  152878. (0, _utils.default)("NullableTypeAnnotation", {
  152879. visitor: ["typeAnnotation"],
  152880. aliases: ["Flow", "FlowType"],
  152881. fields: {
  152882. typeAnnotation: (0, _utils.validateType)("FlowType")
  152883. }
  152884. });
  152885. (0, _utils.default)("NumberLiteralTypeAnnotation", {
  152886. builder: ["value"],
  152887. aliases: ["Flow", "FlowType"],
  152888. fields: {
  152889. value: (0, _utils.validate)((0, _utils.assertValueType)("number"))
  152890. }
  152891. });
  152892. (0, _utils.default)("NumberTypeAnnotation", {
  152893. aliases: ["Flow", "FlowType", "FlowBaseAnnotation"]
  152894. });
  152895. (0, _utils.default)("ObjectTypeAnnotation", {
  152896. visitor: ["properties", "indexers", "callProperties", "internalSlots"],
  152897. aliases: ["Flow", "FlowType"],
  152898. builder: ["properties", "indexers", "callProperties", "internalSlots", "exact"],
  152899. fields: {
  152900. properties: (0, _utils.validate)((0, _utils.arrayOfType)(["ObjectTypeProperty", "ObjectTypeSpreadProperty"])),
  152901. indexers: (0, _utils.validateOptional)((0, _utils.arrayOfType)("ObjectTypeIndexer")),
  152902. callProperties: (0, _utils.validateOptional)((0, _utils.arrayOfType)("ObjectTypeCallProperty")),
  152903. internalSlots: (0, _utils.validateOptional)((0, _utils.arrayOfType)("ObjectTypeInternalSlot")),
  152904. exact: {
  152905. validate: (0, _utils.assertValueType)("boolean"),
  152906. default: false
  152907. },
  152908. inexact: (0, _utils.validateOptional)((0, _utils.assertValueType)("boolean"))
  152909. }
  152910. });
  152911. (0, _utils.default)("ObjectTypeInternalSlot", {
  152912. visitor: ["id", "value", "optional", "static", "method"],
  152913. aliases: ["Flow", "UserWhitespacable"],
  152914. fields: {
  152915. id: (0, _utils.validateType)("Identifier"),
  152916. value: (0, _utils.validateType)("FlowType"),
  152917. optional: (0, _utils.validate)((0, _utils.assertValueType)("boolean")),
  152918. static: (0, _utils.validate)((0, _utils.assertValueType)("boolean")),
  152919. method: (0, _utils.validate)((0, _utils.assertValueType)("boolean"))
  152920. }
  152921. });
  152922. (0, _utils.default)("ObjectTypeCallProperty", {
  152923. visitor: ["value"],
  152924. aliases: ["Flow", "UserWhitespacable"],
  152925. fields: {
  152926. value: (0, _utils.validateType)("FlowType"),
  152927. static: (0, _utils.validate)((0, _utils.assertValueType)("boolean"))
  152928. }
  152929. });
  152930. (0, _utils.default)("ObjectTypeIndexer", {
  152931. visitor: ["id", "key", "value", "variance"],
  152932. aliases: ["Flow", "UserWhitespacable"],
  152933. fields: {
  152934. id: (0, _utils.validateOptionalType)("Identifier"),
  152935. key: (0, _utils.validateType)("FlowType"),
  152936. value: (0, _utils.validateType)("FlowType"),
  152937. static: (0, _utils.validate)((0, _utils.assertValueType)("boolean")),
  152938. variance: (0, _utils.validateOptionalType)("Variance")
  152939. }
  152940. });
  152941. (0, _utils.default)("ObjectTypeProperty", {
  152942. visitor: ["key", "value", "variance"],
  152943. aliases: ["Flow", "UserWhitespacable"],
  152944. fields: {
  152945. key: (0, _utils.validateType)(["Identifier", "StringLiteral"]),
  152946. value: (0, _utils.validateType)("FlowType"),
  152947. kind: (0, _utils.validate)((0, _utils.assertOneOf)("init", "get", "set")),
  152948. static: (0, _utils.validate)((0, _utils.assertValueType)("boolean")),
  152949. proto: (0, _utils.validate)((0, _utils.assertValueType)("boolean")),
  152950. optional: (0, _utils.validate)((0, _utils.assertValueType)("boolean")),
  152951. variance: (0, _utils.validateOptionalType)("Variance"),
  152952. method: (0, _utils.validate)((0, _utils.assertValueType)("boolean"))
  152953. }
  152954. });
  152955. (0, _utils.default)("ObjectTypeSpreadProperty", {
  152956. visitor: ["argument"],
  152957. aliases: ["Flow", "UserWhitespacable"],
  152958. fields: {
  152959. argument: (0, _utils.validateType)("FlowType")
  152960. }
  152961. });
  152962. (0, _utils.default)("OpaqueType", {
  152963. visitor: ["id", "typeParameters", "supertype", "impltype"],
  152964. aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"],
  152965. fields: {
  152966. id: (0, _utils.validateType)("Identifier"),
  152967. typeParameters: (0, _utils.validateOptionalType)("TypeParameterDeclaration"),
  152968. supertype: (0, _utils.validateOptionalType)("FlowType"),
  152969. impltype: (0, _utils.validateType)("FlowType")
  152970. }
  152971. });
  152972. (0, _utils.default)("QualifiedTypeIdentifier", {
  152973. visitor: ["id", "qualification"],
  152974. aliases: ["Flow"],
  152975. fields: {
  152976. id: (0, _utils.validateType)("Identifier"),
  152977. qualification: (0, _utils.validateType)(["Identifier", "QualifiedTypeIdentifier"])
  152978. }
  152979. });
  152980. (0, _utils.default)("StringLiteralTypeAnnotation", {
  152981. builder: ["value"],
  152982. aliases: ["Flow", "FlowType"],
  152983. fields: {
  152984. value: (0, _utils.validate)((0, _utils.assertValueType)("string"))
  152985. }
  152986. });
  152987. (0, _utils.default)("StringTypeAnnotation", {
  152988. aliases: ["Flow", "FlowType", "FlowBaseAnnotation"]
  152989. });
  152990. (0, _utils.default)("SymbolTypeAnnotation", {
  152991. aliases: ["Flow", "FlowType", "FlowBaseAnnotation"]
  152992. });
  152993. (0, _utils.default)("ThisTypeAnnotation", {
  152994. aliases: ["Flow", "FlowType", "FlowBaseAnnotation"]
  152995. });
  152996. (0, _utils.default)("TupleTypeAnnotation", {
  152997. visitor: ["types"],
  152998. aliases: ["Flow", "FlowType"],
  152999. fields: {
  153000. types: (0, _utils.validate)((0, _utils.arrayOfType)("FlowType"))
  153001. }
  153002. });
  153003. (0, _utils.default)("TypeofTypeAnnotation", {
  153004. visitor: ["argument"],
  153005. aliases: ["Flow", "FlowType"],
  153006. fields: {
  153007. argument: (0, _utils.validateType)("FlowType")
  153008. }
  153009. });
  153010. (0, _utils.default)("TypeAlias", {
  153011. visitor: ["id", "typeParameters", "right"],
  153012. aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"],
  153013. fields: {
  153014. id: (0, _utils.validateType)("Identifier"),
  153015. typeParameters: (0, _utils.validateOptionalType)("TypeParameterDeclaration"),
  153016. right: (0, _utils.validateType)("FlowType")
  153017. }
  153018. });
  153019. (0, _utils.default)("TypeAnnotation", {
  153020. aliases: ["Flow"],
  153021. visitor: ["typeAnnotation"],
  153022. fields: {
  153023. typeAnnotation: (0, _utils.validateType)("FlowType")
  153024. }
  153025. });
  153026. (0, _utils.default)("TypeCastExpression", {
  153027. visitor: ["expression", "typeAnnotation"],
  153028. aliases: ["Flow", "ExpressionWrapper", "Expression"],
  153029. fields: {
  153030. expression: (0, _utils.validateType)("Expression"),
  153031. typeAnnotation: (0, _utils.validateType)("TypeAnnotation")
  153032. }
  153033. });
  153034. (0, _utils.default)("TypeParameter", {
  153035. aliases: ["Flow"],
  153036. visitor: ["bound", "default", "variance"],
  153037. fields: {
  153038. name: (0, _utils.validate)((0, _utils.assertValueType)("string")),
  153039. bound: (0, _utils.validateOptionalType)("TypeAnnotation"),
  153040. default: (0, _utils.validateOptionalType)("FlowType"),
  153041. variance: (0, _utils.validateOptionalType)("Variance")
  153042. }
  153043. });
  153044. (0, _utils.default)("TypeParameterDeclaration", {
  153045. aliases: ["Flow"],
  153046. visitor: ["params"],
  153047. fields: {
  153048. params: (0, _utils.validate)((0, _utils.arrayOfType)("TypeParameter"))
  153049. }
  153050. });
  153051. (0, _utils.default)("TypeParameterInstantiation", {
  153052. aliases: ["Flow"],
  153053. visitor: ["params"],
  153054. fields: {
  153055. params: (0, _utils.validate)((0, _utils.arrayOfType)("FlowType"))
  153056. }
  153057. });
  153058. (0, _utils.default)("UnionTypeAnnotation", {
  153059. visitor: ["types"],
  153060. aliases: ["Flow", "FlowType"],
  153061. fields: {
  153062. types: (0, _utils.validate)((0, _utils.arrayOfType)("FlowType"))
  153063. }
  153064. });
  153065. (0, _utils.default)("Variance", {
  153066. aliases: ["Flow"],
  153067. builder: ["kind"],
  153068. fields: {
  153069. kind: (0, _utils.validate)((0, _utils.assertOneOf)("minus", "plus"))
  153070. }
  153071. });
  153072. (0, _utils.default)("VoidTypeAnnotation", {
  153073. aliases: ["Flow", "FlowType", "FlowBaseAnnotation"]
  153074. });
  153075. (0, _utils.default)("EnumDeclaration", {
  153076. aliases: ["Statement", "Declaration"],
  153077. visitor: ["id", "body"],
  153078. fields: {
  153079. id: (0, _utils.validateType)("Identifier"),
  153080. body: (0, _utils.validateType)(["EnumBooleanBody", "EnumNumberBody", "EnumStringBody", "EnumSymbolBody"])
  153081. }
  153082. });
  153083. (0, _utils.default)("EnumBooleanBody", {
  153084. aliases: ["EnumBody"],
  153085. visitor: ["members"],
  153086. fields: {
  153087. explicitType: (0, _utils.validate)((0, _utils.assertValueType)("boolean")),
  153088. members: (0, _utils.validateArrayOfType)("EnumBooleanMember"),
  153089. hasUnknownMembers: (0, _utils.validate)((0, _utils.assertValueType)("boolean"))
  153090. }
  153091. });
  153092. (0, _utils.default)("EnumNumberBody", {
  153093. aliases: ["EnumBody"],
  153094. visitor: ["members"],
  153095. fields: {
  153096. explicitType: (0, _utils.validate)((0, _utils.assertValueType)("boolean")),
  153097. members: (0, _utils.validateArrayOfType)("EnumNumberMember"),
  153098. hasUnknownMembers: (0, _utils.validate)((0, _utils.assertValueType)("boolean"))
  153099. }
  153100. });
  153101. (0, _utils.default)("EnumStringBody", {
  153102. aliases: ["EnumBody"],
  153103. visitor: ["members"],
  153104. fields: {
  153105. explicitType: (0, _utils.validate)((0, _utils.assertValueType)("boolean")),
  153106. members: (0, _utils.validateArrayOfType)(["EnumStringMember", "EnumDefaultedMember"]),
  153107. hasUnknownMembers: (0, _utils.validate)((0, _utils.assertValueType)("boolean"))
  153108. }
  153109. });
  153110. (0, _utils.default)("EnumSymbolBody", {
  153111. aliases: ["EnumBody"],
  153112. visitor: ["members"],
  153113. fields: {
  153114. members: (0, _utils.validateArrayOfType)("EnumDefaultedMember"),
  153115. hasUnknownMembers: (0, _utils.validate)((0, _utils.assertValueType)("boolean"))
  153116. }
  153117. });
  153118. (0, _utils.default)("EnumBooleanMember", {
  153119. aliases: ["EnumMember"],
  153120. visitor: ["id"],
  153121. fields: {
  153122. id: (0, _utils.validateType)("Identifier"),
  153123. init: (0, _utils.validateType)("BooleanLiteral")
  153124. }
  153125. });
  153126. (0, _utils.default)("EnumNumberMember", {
  153127. aliases: ["EnumMember"],
  153128. visitor: ["id", "init"],
  153129. fields: {
  153130. id: (0, _utils.validateType)("Identifier"),
  153131. init: (0, _utils.validateType)("NumericLiteral")
  153132. }
  153133. });
  153134. (0, _utils.default)("EnumStringMember", {
  153135. aliases: ["EnumMember"],
  153136. visitor: ["id", "init"],
  153137. fields: {
  153138. id: (0, _utils.validateType)("Identifier"),
  153139. init: (0, _utils.validateType)("StringLiteral")
  153140. }
  153141. });
  153142. (0, _utils.default)("EnumDefaultedMember", {
  153143. aliases: ["EnumMember"],
  153144. visitor: ["id"],
  153145. fields: {
  153146. id: (0, _utils.validateType)("Identifier")
  153147. }
  153148. });
  153149. (0, _utils.default)("IndexedAccessType", {
  153150. visitor: ["objectType", "indexType"],
  153151. aliases: ["Flow", "FlowType"],
  153152. fields: {
  153153. objectType: (0, _utils.validateType)("FlowType"),
  153154. indexType: (0, _utils.validateType)("FlowType")
  153155. }
  153156. });
  153157. (0, _utils.default)("OptionalIndexedAccessType", {
  153158. visitor: ["objectType", "indexType"],
  153159. aliases: ["Flow", "FlowType"],
  153160. fields: {
  153161. objectType: (0, _utils.validateType)("FlowType"),
  153162. indexType: (0, _utils.validateType)("FlowType"),
  153163. optional: (0, _utils.validate)((0, _utils.assertValueType)("boolean"))
  153164. }
  153165. });
  153166. }
  153167. });
  153168. // node_modules/@babel/traverse/node_modules/@babel/helper-function-name/node_modules/@babel/types/lib/definitions/jsx.js
  153169. var require_jsx9 = __commonJS({
  153170. "node_modules/@babel/traverse/node_modules/@babel/helper-function-name/node_modules/@babel/types/lib/definitions/jsx.js"() {
  153171. "use strict";
  153172. var _utils = require_utils7();
  153173. (0, _utils.default)("JSXAttribute", {
  153174. visitor: ["name", "value"],
  153175. aliases: ["JSX", "Immutable"],
  153176. fields: {
  153177. name: {
  153178. validate: (0, _utils.assertNodeType)("JSXIdentifier", "JSXNamespacedName")
  153179. },
  153180. value: {
  153181. optional: true,
  153182. validate: (0, _utils.assertNodeType)("JSXElement", "JSXFragment", "StringLiteral", "JSXExpressionContainer")
  153183. }
  153184. }
  153185. });
  153186. (0, _utils.default)("JSXClosingElement", {
  153187. visitor: ["name"],
  153188. aliases: ["JSX", "Immutable"],
  153189. fields: {
  153190. name: {
  153191. validate: (0, _utils.assertNodeType)("JSXIdentifier", "JSXMemberExpression", "JSXNamespacedName")
  153192. }
  153193. }
  153194. });
  153195. (0, _utils.default)("JSXElement", {
  153196. builder: ["openingElement", "closingElement", "children", "selfClosing"],
  153197. visitor: ["openingElement", "children", "closingElement"],
  153198. aliases: ["JSX", "Immutable", "Expression"],
  153199. fields: {
  153200. openingElement: {
  153201. validate: (0, _utils.assertNodeType)("JSXOpeningElement")
  153202. },
  153203. closingElement: {
  153204. optional: true,
  153205. validate: (0, _utils.assertNodeType)("JSXClosingElement")
  153206. },
  153207. children: {
  153208. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("JSXText", "JSXExpressionContainer", "JSXSpreadChild", "JSXElement", "JSXFragment")))
  153209. },
  153210. selfClosing: {
  153211. validate: (0, _utils.assertValueType)("boolean"),
  153212. optional: true
  153213. }
  153214. }
  153215. });
  153216. (0, _utils.default)("JSXEmptyExpression", {
  153217. aliases: ["JSX"]
  153218. });
  153219. (0, _utils.default)("JSXExpressionContainer", {
  153220. visitor: ["expression"],
  153221. aliases: ["JSX", "Immutable"],
  153222. fields: {
  153223. expression: {
  153224. validate: (0, _utils.assertNodeType)("Expression", "JSXEmptyExpression")
  153225. }
  153226. }
  153227. });
  153228. (0, _utils.default)("JSXSpreadChild", {
  153229. visitor: ["expression"],
  153230. aliases: ["JSX", "Immutable"],
  153231. fields: {
  153232. expression: {
  153233. validate: (0, _utils.assertNodeType)("Expression")
  153234. }
  153235. }
  153236. });
  153237. (0, _utils.default)("JSXIdentifier", {
  153238. builder: ["name"],
  153239. aliases: ["JSX"],
  153240. fields: {
  153241. name: {
  153242. validate: (0, _utils.assertValueType)("string")
  153243. }
  153244. }
  153245. });
  153246. (0, _utils.default)("JSXMemberExpression", {
  153247. visitor: ["object", "property"],
  153248. aliases: ["JSX"],
  153249. fields: {
  153250. object: {
  153251. validate: (0, _utils.assertNodeType)("JSXMemberExpression", "JSXIdentifier")
  153252. },
  153253. property: {
  153254. validate: (0, _utils.assertNodeType)("JSXIdentifier")
  153255. }
  153256. }
  153257. });
  153258. (0, _utils.default)("JSXNamespacedName", {
  153259. visitor: ["namespace", "name"],
  153260. aliases: ["JSX"],
  153261. fields: {
  153262. namespace: {
  153263. validate: (0, _utils.assertNodeType)("JSXIdentifier")
  153264. },
  153265. name: {
  153266. validate: (0, _utils.assertNodeType)("JSXIdentifier")
  153267. }
  153268. }
  153269. });
  153270. (0, _utils.default)("JSXOpeningElement", {
  153271. builder: ["name", "attributes", "selfClosing"],
  153272. visitor: ["name", "attributes"],
  153273. aliases: ["JSX", "Immutable"],
  153274. fields: {
  153275. name: {
  153276. validate: (0, _utils.assertNodeType)("JSXIdentifier", "JSXMemberExpression", "JSXNamespacedName")
  153277. },
  153278. selfClosing: {
  153279. default: false
  153280. },
  153281. attributes: {
  153282. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("JSXAttribute", "JSXSpreadAttribute")))
  153283. },
  153284. typeParameters: {
  153285. validate: (0, _utils.assertNodeType)("TypeParameterInstantiation", "TSTypeParameterInstantiation"),
  153286. optional: true
  153287. }
  153288. }
  153289. });
  153290. (0, _utils.default)("JSXSpreadAttribute", {
  153291. visitor: ["argument"],
  153292. aliases: ["JSX"],
  153293. fields: {
  153294. argument: {
  153295. validate: (0, _utils.assertNodeType)("Expression")
  153296. }
  153297. }
  153298. });
  153299. (0, _utils.default)("JSXText", {
  153300. aliases: ["JSX", "Immutable"],
  153301. builder: ["value"],
  153302. fields: {
  153303. value: {
  153304. validate: (0, _utils.assertValueType)("string")
  153305. }
  153306. }
  153307. });
  153308. (0, _utils.default)("JSXFragment", {
  153309. builder: ["openingFragment", "closingFragment", "children"],
  153310. visitor: ["openingFragment", "children", "closingFragment"],
  153311. aliases: ["JSX", "Immutable", "Expression"],
  153312. fields: {
  153313. openingFragment: {
  153314. validate: (0, _utils.assertNodeType)("JSXOpeningFragment")
  153315. },
  153316. closingFragment: {
  153317. validate: (0, _utils.assertNodeType)("JSXClosingFragment")
  153318. },
  153319. children: {
  153320. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("JSXText", "JSXExpressionContainer", "JSXSpreadChild", "JSXElement", "JSXFragment")))
  153321. }
  153322. }
  153323. });
  153324. (0, _utils.default)("JSXOpeningFragment", {
  153325. aliases: ["JSX", "Immutable"]
  153326. });
  153327. (0, _utils.default)("JSXClosingFragment", {
  153328. aliases: ["JSX", "Immutable"]
  153329. });
  153330. }
  153331. });
  153332. // node_modules/@babel/traverse/node_modules/@babel/helper-function-name/node_modules/@babel/types/lib/definitions/placeholders.js
  153333. var require_placeholders7 = __commonJS({
  153334. "node_modules/@babel/traverse/node_modules/@babel/helper-function-name/node_modules/@babel/types/lib/definitions/placeholders.js"(exports) {
  153335. "use strict";
  153336. Object.defineProperty(exports, "__esModule", {
  153337. value: true
  153338. });
  153339. exports.PLACEHOLDERS_FLIPPED_ALIAS = exports.PLACEHOLDERS_ALIAS = exports.PLACEHOLDERS = void 0;
  153340. var _utils = require_utils7();
  153341. var PLACEHOLDERS = ["Identifier", "StringLiteral", "Expression", "Statement", "Declaration", "BlockStatement", "ClassBody", "Pattern"];
  153342. exports.PLACEHOLDERS = PLACEHOLDERS;
  153343. var PLACEHOLDERS_ALIAS = {
  153344. Declaration: ["Statement"],
  153345. Pattern: ["PatternLike", "LVal"]
  153346. };
  153347. exports.PLACEHOLDERS_ALIAS = PLACEHOLDERS_ALIAS;
  153348. for (const type of PLACEHOLDERS) {
  153349. const alias = _utils.ALIAS_KEYS[type];
  153350. if (alias != null && alias.length)
  153351. PLACEHOLDERS_ALIAS[type] = alias;
  153352. }
  153353. var PLACEHOLDERS_FLIPPED_ALIAS = {};
  153354. exports.PLACEHOLDERS_FLIPPED_ALIAS = PLACEHOLDERS_FLIPPED_ALIAS;
  153355. Object.keys(PLACEHOLDERS_ALIAS).forEach((type) => {
  153356. PLACEHOLDERS_ALIAS[type].forEach((alias) => {
  153357. if (!Object.hasOwnProperty.call(PLACEHOLDERS_FLIPPED_ALIAS, alias)) {
  153358. PLACEHOLDERS_FLIPPED_ALIAS[alias] = [];
  153359. }
  153360. PLACEHOLDERS_FLIPPED_ALIAS[alias].push(type);
  153361. });
  153362. });
  153363. }
  153364. });
  153365. // node_modules/@babel/traverse/node_modules/@babel/helper-function-name/node_modules/@babel/types/lib/definitions/misc.js
  153366. var require_misc7 = __commonJS({
  153367. "node_modules/@babel/traverse/node_modules/@babel/helper-function-name/node_modules/@babel/types/lib/definitions/misc.js"() {
  153368. "use strict";
  153369. var _utils = require_utils7();
  153370. var _placeholders = require_placeholders7();
  153371. {
  153372. (0, _utils.default)("Noop", {
  153373. visitor: []
  153374. });
  153375. }
  153376. (0, _utils.default)("Placeholder", {
  153377. visitor: [],
  153378. builder: ["expectedNode", "name"],
  153379. fields: {
  153380. name: {
  153381. validate: (0, _utils.assertNodeType)("Identifier")
  153382. },
  153383. expectedNode: {
  153384. validate: (0, _utils.assertOneOf)(..._placeholders.PLACEHOLDERS)
  153385. }
  153386. }
  153387. });
  153388. (0, _utils.default)("V8IntrinsicIdentifier", {
  153389. builder: ["name"],
  153390. fields: {
  153391. name: {
  153392. validate: (0, _utils.assertValueType)("string")
  153393. }
  153394. }
  153395. });
  153396. }
  153397. });
  153398. // node_modules/@babel/traverse/node_modules/@babel/helper-function-name/node_modules/@babel/types/lib/definitions/experimental.js
  153399. var require_experimental7 = __commonJS({
  153400. "node_modules/@babel/traverse/node_modules/@babel/helper-function-name/node_modules/@babel/types/lib/definitions/experimental.js"() {
  153401. "use strict";
  153402. var _utils = require_utils7();
  153403. var _core = require_core7();
  153404. (0, _utils.default)("ArgumentPlaceholder", {});
  153405. (0, _utils.default)("BindExpression", {
  153406. visitor: ["object", "callee"],
  153407. aliases: ["Expression"],
  153408. fields: !process.env.BABEL_TYPES_8_BREAKING ? {
  153409. object: {
  153410. validate: Object.assign(() => {
  153411. }, {
  153412. oneOfNodeTypes: ["Expression"]
  153413. })
  153414. },
  153415. callee: {
  153416. validate: Object.assign(() => {
  153417. }, {
  153418. oneOfNodeTypes: ["Expression"]
  153419. })
  153420. }
  153421. } : {
  153422. object: {
  153423. validate: (0, _utils.assertNodeType)("Expression")
  153424. },
  153425. callee: {
  153426. validate: (0, _utils.assertNodeType)("Expression")
  153427. }
  153428. }
  153429. });
  153430. (0, _utils.default)("ClassProperty", {
  153431. visitor: ["key", "value", "typeAnnotation", "decorators"],
  153432. builder: ["key", "value", "typeAnnotation", "decorators", "computed", "static"],
  153433. aliases: ["Property"],
  153434. fields: Object.assign({}, _core.classMethodOrPropertyCommon, {
  153435. value: {
  153436. validate: (0, _utils.assertNodeType)("Expression"),
  153437. optional: true
  153438. },
  153439. definite: {
  153440. validate: (0, _utils.assertValueType)("boolean"),
  153441. optional: true
  153442. },
  153443. typeAnnotation: {
  153444. validate: (0, _utils.assertNodeType)("TypeAnnotation", "TSTypeAnnotation", "Noop"),
  153445. optional: true
  153446. },
  153447. decorators: {
  153448. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Decorator"))),
  153449. optional: true
  153450. },
  153451. readonly: {
  153452. validate: (0, _utils.assertValueType)("boolean"),
  153453. optional: true
  153454. },
  153455. declare: {
  153456. validate: (0, _utils.assertValueType)("boolean"),
  153457. optional: true
  153458. }
  153459. })
  153460. });
  153461. (0, _utils.default)("PipelineTopicExpression", {
  153462. builder: ["expression"],
  153463. visitor: ["expression"],
  153464. fields: {
  153465. expression: {
  153466. validate: (0, _utils.assertNodeType)("Expression")
  153467. }
  153468. }
  153469. });
  153470. (0, _utils.default)("PipelineBareFunction", {
  153471. builder: ["callee"],
  153472. visitor: ["callee"],
  153473. fields: {
  153474. callee: {
  153475. validate: (0, _utils.assertNodeType)("Expression")
  153476. }
  153477. }
  153478. });
  153479. (0, _utils.default)("PipelinePrimaryTopicReference", {
  153480. aliases: ["Expression"]
  153481. });
  153482. (0, _utils.default)("ClassPrivateProperty", {
  153483. visitor: ["key", "value", "decorators"],
  153484. builder: ["key", "value", "decorators", "static"],
  153485. aliases: ["Property", "Private"],
  153486. fields: {
  153487. key: {
  153488. validate: (0, _utils.assertNodeType)("PrivateName")
  153489. },
  153490. value: {
  153491. validate: (0, _utils.assertNodeType)("Expression"),
  153492. optional: true
  153493. },
  153494. typeAnnotation: {
  153495. validate: (0, _utils.assertNodeType)("TypeAnnotation", "TSTypeAnnotation", "Noop"),
  153496. optional: true
  153497. },
  153498. decorators: {
  153499. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Decorator"))),
  153500. optional: true
  153501. }
  153502. }
  153503. });
  153504. (0, _utils.default)("ClassPrivateMethod", {
  153505. builder: ["kind", "key", "params", "body", "static"],
  153506. visitor: ["key", "params", "body", "decorators", "returnType", "typeParameters"],
  153507. aliases: ["Function", "Scopable", "BlockParent", "FunctionParent", "Method", "Private"],
  153508. fields: Object.assign({}, _core.classMethodOrDeclareMethodCommon, _core.functionTypeAnnotationCommon, {
  153509. key: {
  153510. validate: (0, _utils.assertNodeType)("PrivateName")
  153511. },
  153512. body: {
  153513. validate: (0, _utils.assertNodeType)("BlockStatement")
  153514. }
  153515. })
  153516. });
  153517. (0, _utils.default)("ImportAttribute", {
  153518. visitor: ["key", "value"],
  153519. fields: {
  153520. key: {
  153521. validate: (0, _utils.assertNodeType)("Identifier", "StringLiteral")
  153522. },
  153523. value: {
  153524. validate: (0, _utils.assertNodeType)("StringLiteral")
  153525. }
  153526. }
  153527. });
  153528. (0, _utils.default)("Decorator", {
  153529. visitor: ["expression"],
  153530. fields: {
  153531. expression: {
  153532. validate: (0, _utils.assertNodeType)("Expression")
  153533. }
  153534. }
  153535. });
  153536. (0, _utils.default)("DoExpression", {
  153537. visitor: ["body"],
  153538. builder: ["body", "async"],
  153539. aliases: ["Expression"],
  153540. fields: {
  153541. body: {
  153542. validate: (0, _utils.assertNodeType)("BlockStatement")
  153543. },
  153544. async: {
  153545. validate: (0, _utils.assertValueType)("boolean"),
  153546. default: false
  153547. }
  153548. }
  153549. });
  153550. (0, _utils.default)("ExportDefaultSpecifier", {
  153551. visitor: ["exported"],
  153552. aliases: ["ModuleSpecifier"],
  153553. fields: {
  153554. exported: {
  153555. validate: (0, _utils.assertNodeType)("Identifier")
  153556. }
  153557. }
  153558. });
  153559. (0, _utils.default)("PrivateName", {
  153560. visitor: ["id"],
  153561. aliases: ["Private"],
  153562. fields: {
  153563. id: {
  153564. validate: (0, _utils.assertNodeType)("Identifier")
  153565. }
  153566. }
  153567. });
  153568. (0, _utils.default)("RecordExpression", {
  153569. visitor: ["properties"],
  153570. aliases: ["Expression"],
  153571. fields: {
  153572. properties: {
  153573. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("ObjectProperty", "SpreadElement")))
  153574. }
  153575. }
  153576. });
  153577. (0, _utils.default)("TupleExpression", {
  153578. fields: {
  153579. elements: {
  153580. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Expression", "SpreadElement"))),
  153581. default: []
  153582. }
  153583. },
  153584. visitor: ["elements"],
  153585. aliases: ["Expression"]
  153586. });
  153587. (0, _utils.default)("DecimalLiteral", {
  153588. builder: ["value"],
  153589. fields: {
  153590. value: {
  153591. validate: (0, _utils.assertValueType)("string")
  153592. }
  153593. },
  153594. aliases: ["Expression", "Pureish", "Literal", "Immutable"]
  153595. });
  153596. (0, _utils.default)("StaticBlock", {
  153597. visitor: ["body"],
  153598. fields: {
  153599. body: {
  153600. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Statement")))
  153601. }
  153602. },
  153603. aliases: ["Scopable", "BlockParent"]
  153604. });
  153605. (0, _utils.default)("ModuleExpression", {
  153606. visitor: ["body"],
  153607. fields: {
  153608. body: {
  153609. validate: (0, _utils.assertNodeType)("Program")
  153610. }
  153611. },
  153612. aliases: ["Expression"]
  153613. });
  153614. }
  153615. });
  153616. // node_modules/@babel/traverse/node_modules/@babel/helper-function-name/node_modules/@babel/types/lib/definitions/typescript.js
  153617. var require_typescript9 = __commonJS({
  153618. "node_modules/@babel/traverse/node_modules/@babel/helper-function-name/node_modules/@babel/types/lib/definitions/typescript.js"() {
  153619. "use strict";
  153620. var _utils = require_utils7();
  153621. var _core = require_core7();
  153622. var bool = (0, _utils.assertValueType)("boolean");
  153623. var tSFunctionTypeAnnotationCommon = {
  153624. returnType: {
  153625. validate: (0, _utils.assertNodeType)("TSTypeAnnotation", "Noop"),
  153626. optional: true
  153627. },
  153628. typeParameters: {
  153629. validate: (0, _utils.assertNodeType)("TSTypeParameterDeclaration", "Noop"),
  153630. optional: true
  153631. }
  153632. };
  153633. (0, _utils.default)("TSParameterProperty", {
  153634. aliases: ["LVal"],
  153635. visitor: ["parameter"],
  153636. fields: {
  153637. accessibility: {
  153638. validate: (0, _utils.assertOneOf)("public", "private", "protected"),
  153639. optional: true
  153640. },
  153641. readonly: {
  153642. validate: (0, _utils.assertValueType)("boolean"),
  153643. optional: true
  153644. },
  153645. parameter: {
  153646. validate: (0, _utils.assertNodeType)("Identifier", "AssignmentPattern")
  153647. }
  153648. }
  153649. });
  153650. (0, _utils.default)("TSDeclareFunction", {
  153651. aliases: ["Statement", "Declaration"],
  153652. visitor: ["id", "typeParameters", "params", "returnType"],
  153653. fields: Object.assign({}, _core.functionDeclarationCommon, tSFunctionTypeAnnotationCommon)
  153654. });
  153655. (0, _utils.default)("TSDeclareMethod", {
  153656. visitor: ["decorators", "key", "typeParameters", "params", "returnType"],
  153657. fields: Object.assign({}, _core.classMethodOrDeclareMethodCommon, tSFunctionTypeAnnotationCommon)
  153658. });
  153659. (0, _utils.default)("TSQualifiedName", {
  153660. aliases: ["TSEntityName"],
  153661. visitor: ["left", "right"],
  153662. fields: {
  153663. left: (0, _utils.validateType)("TSEntityName"),
  153664. right: (0, _utils.validateType)("Identifier")
  153665. }
  153666. });
  153667. var signatureDeclarationCommon = {
  153668. typeParameters: (0, _utils.validateOptionalType)("TSTypeParameterDeclaration"),
  153669. parameters: (0, _utils.validateArrayOfType)(["Identifier", "RestElement"]),
  153670. typeAnnotation: (0, _utils.validateOptionalType)("TSTypeAnnotation")
  153671. };
  153672. var callConstructSignatureDeclaration = {
  153673. aliases: ["TSTypeElement"],
  153674. visitor: ["typeParameters", "parameters", "typeAnnotation"],
  153675. fields: signatureDeclarationCommon
  153676. };
  153677. (0, _utils.default)("TSCallSignatureDeclaration", callConstructSignatureDeclaration);
  153678. (0, _utils.default)("TSConstructSignatureDeclaration", callConstructSignatureDeclaration);
  153679. var namedTypeElementCommon = {
  153680. key: (0, _utils.validateType)("Expression"),
  153681. computed: (0, _utils.validate)(bool),
  153682. optional: (0, _utils.validateOptional)(bool)
  153683. };
  153684. (0, _utils.default)("TSPropertySignature", {
  153685. aliases: ["TSTypeElement"],
  153686. visitor: ["key", "typeAnnotation", "initializer"],
  153687. fields: Object.assign({}, namedTypeElementCommon, {
  153688. readonly: (0, _utils.validateOptional)(bool),
  153689. typeAnnotation: (0, _utils.validateOptionalType)("TSTypeAnnotation"),
  153690. initializer: (0, _utils.validateOptionalType)("Expression")
  153691. })
  153692. });
  153693. (0, _utils.default)("TSMethodSignature", {
  153694. aliases: ["TSTypeElement"],
  153695. visitor: ["key", "typeParameters", "parameters", "typeAnnotation"],
  153696. fields: Object.assign({}, signatureDeclarationCommon, namedTypeElementCommon, {
  153697. kind: {
  153698. validate: (0, _utils.assertOneOf)("method", "get", "set")
  153699. }
  153700. })
  153701. });
  153702. (0, _utils.default)("TSIndexSignature", {
  153703. aliases: ["TSTypeElement"],
  153704. visitor: ["parameters", "typeAnnotation"],
  153705. fields: {
  153706. readonly: (0, _utils.validateOptional)(bool),
  153707. static: (0, _utils.validateOptional)(bool),
  153708. parameters: (0, _utils.validateArrayOfType)("Identifier"),
  153709. typeAnnotation: (0, _utils.validateOptionalType)("TSTypeAnnotation")
  153710. }
  153711. });
  153712. var tsKeywordTypes = ["TSAnyKeyword", "TSBooleanKeyword", "TSBigIntKeyword", "TSIntrinsicKeyword", "TSNeverKeyword", "TSNullKeyword", "TSNumberKeyword", "TSObjectKeyword", "TSStringKeyword", "TSSymbolKeyword", "TSUndefinedKeyword", "TSUnknownKeyword", "TSVoidKeyword"];
  153713. for (const type of tsKeywordTypes) {
  153714. (0, _utils.default)(type, {
  153715. aliases: ["TSType", "TSBaseType"],
  153716. visitor: [],
  153717. fields: {}
  153718. });
  153719. }
  153720. (0, _utils.default)("TSThisType", {
  153721. aliases: ["TSType", "TSBaseType"],
  153722. visitor: [],
  153723. fields: {}
  153724. });
  153725. var fnOrCtrBase = {
  153726. aliases: ["TSType"],
  153727. visitor: ["typeParameters", "parameters", "typeAnnotation"]
  153728. };
  153729. (0, _utils.default)("TSFunctionType", Object.assign({}, fnOrCtrBase, {
  153730. fields: signatureDeclarationCommon
  153731. }));
  153732. (0, _utils.default)("TSConstructorType", Object.assign({}, fnOrCtrBase, {
  153733. fields: Object.assign({}, signatureDeclarationCommon, {
  153734. abstract: (0, _utils.validateOptional)(bool)
  153735. })
  153736. }));
  153737. (0, _utils.default)("TSTypeReference", {
  153738. aliases: ["TSType"],
  153739. visitor: ["typeName", "typeParameters"],
  153740. fields: {
  153741. typeName: (0, _utils.validateType)("TSEntityName"),
  153742. typeParameters: (0, _utils.validateOptionalType)("TSTypeParameterInstantiation")
  153743. }
  153744. });
  153745. (0, _utils.default)("TSTypePredicate", {
  153746. aliases: ["TSType"],
  153747. visitor: ["parameterName", "typeAnnotation"],
  153748. builder: ["parameterName", "typeAnnotation", "asserts"],
  153749. fields: {
  153750. parameterName: (0, _utils.validateType)(["Identifier", "TSThisType"]),
  153751. typeAnnotation: (0, _utils.validateOptionalType)("TSTypeAnnotation"),
  153752. asserts: (0, _utils.validateOptional)(bool)
  153753. }
  153754. });
  153755. (0, _utils.default)("TSTypeQuery", {
  153756. aliases: ["TSType"],
  153757. visitor: ["exprName"],
  153758. fields: {
  153759. exprName: (0, _utils.validateType)(["TSEntityName", "TSImportType"])
  153760. }
  153761. });
  153762. (0, _utils.default)("TSTypeLiteral", {
  153763. aliases: ["TSType"],
  153764. visitor: ["members"],
  153765. fields: {
  153766. members: (0, _utils.validateArrayOfType)("TSTypeElement")
  153767. }
  153768. });
  153769. (0, _utils.default)("TSArrayType", {
  153770. aliases: ["TSType"],
  153771. visitor: ["elementType"],
  153772. fields: {
  153773. elementType: (0, _utils.validateType)("TSType")
  153774. }
  153775. });
  153776. (0, _utils.default)("TSTupleType", {
  153777. aliases: ["TSType"],
  153778. visitor: ["elementTypes"],
  153779. fields: {
  153780. elementTypes: (0, _utils.validateArrayOfType)(["TSType", "TSNamedTupleMember"])
  153781. }
  153782. });
  153783. (0, _utils.default)("TSOptionalType", {
  153784. aliases: ["TSType"],
  153785. visitor: ["typeAnnotation"],
  153786. fields: {
  153787. typeAnnotation: (0, _utils.validateType)("TSType")
  153788. }
  153789. });
  153790. (0, _utils.default)("TSRestType", {
  153791. aliases: ["TSType"],
  153792. visitor: ["typeAnnotation"],
  153793. fields: {
  153794. typeAnnotation: (0, _utils.validateType)("TSType")
  153795. }
  153796. });
  153797. (0, _utils.default)("TSNamedTupleMember", {
  153798. visitor: ["label", "elementType"],
  153799. builder: ["label", "elementType", "optional"],
  153800. fields: {
  153801. label: (0, _utils.validateType)("Identifier"),
  153802. optional: {
  153803. validate: bool,
  153804. default: false
  153805. },
  153806. elementType: (0, _utils.validateType)("TSType")
  153807. }
  153808. });
  153809. var unionOrIntersection = {
  153810. aliases: ["TSType"],
  153811. visitor: ["types"],
  153812. fields: {
  153813. types: (0, _utils.validateArrayOfType)("TSType")
  153814. }
  153815. };
  153816. (0, _utils.default)("TSUnionType", unionOrIntersection);
  153817. (0, _utils.default)("TSIntersectionType", unionOrIntersection);
  153818. (0, _utils.default)("TSConditionalType", {
  153819. aliases: ["TSType"],
  153820. visitor: ["checkType", "extendsType", "trueType", "falseType"],
  153821. fields: {
  153822. checkType: (0, _utils.validateType)("TSType"),
  153823. extendsType: (0, _utils.validateType)("TSType"),
  153824. trueType: (0, _utils.validateType)("TSType"),
  153825. falseType: (0, _utils.validateType)("TSType")
  153826. }
  153827. });
  153828. (0, _utils.default)("TSInferType", {
  153829. aliases: ["TSType"],
  153830. visitor: ["typeParameter"],
  153831. fields: {
  153832. typeParameter: (0, _utils.validateType)("TSTypeParameter")
  153833. }
  153834. });
  153835. (0, _utils.default)("TSParenthesizedType", {
  153836. aliases: ["TSType"],
  153837. visitor: ["typeAnnotation"],
  153838. fields: {
  153839. typeAnnotation: (0, _utils.validateType)("TSType")
  153840. }
  153841. });
  153842. (0, _utils.default)("TSTypeOperator", {
  153843. aliases: ["TSType"],
  153844. visitor: ["typeAnnotation"],
  153845. fields: {
  153846. operator: (0, _utils.validate)((0, _utils.assertValueType)("string")),
  153847. typeAnnotation: (0, _utils.validateType)("TSType")
  153848. }
  153849. });
  153850. (0, _utils.default)("TSIndexedAccessType", {
  153851. aliases: ["TSType"],
  153852. visitor: ["objectType", "indexType"],
  153853. fields: {
  153854. objectType: (0, _utils.validateType)("TSType"),
  153855. indexType: (0, _utils.validateType)("TSType")
  153856. }
  153857. });
  153858. (0, _utils.default)("TSMappedType", {
  153859. aliases: ["TSType"],
  153860. visitor: ["typeParameter", "typeAnnotation", "nameType"],
  153861. fields: {
  153862. readonly: (0, _utils.validateOptional)(bool),
  153863. typeParameter: (0, _utils.validateType)("TSTypeParameter"),
  153864. optional: (0, _utils.validateOptional)(bool),
  153865. typeAnnotation: (0, _utils.validateOptionalType)("TSType"),
  153866. nameType: (0, _utils.validateOptionalType)("TSType")
  153867. }
  153868. });
  153869. (0, _utils.default)("TSLiteralType", {
  153870. aliases: ["TSType", "TSBaseType"],
  153871. visitor: ["literal"],
  153872. fields: {
  153873. literal: (0, _utils.validateType)(["NumericLiteral", "StringLiteral", "BooleanLiteral", "BigIntLiteral"])
  153874. }
  153875. });
  153876. (0, _utils.default)("TSExpressionWithTypeArguments", {
  153877. aliases: ["TSType"],
  153878. visitor: ["expression", "typeParameters"],
  153879. fields: {
  153880. expression: (0, _utils.validateType)("TSEntityName"),
  153881. typeParameters: (0, _utils.validateOptionalType)("TSTypeParameterInstantiation")
  153882. }
  153883. });
  153884. (0, _utils.default)("TSInterfaceDeclaration", {
  153885. aliases: ["Statement", "Declaration"],
  153886. visitor: ["id", "typeParameters", "extends", "body"],
  153887. fields: {
  153888. declare: (0, _utils.validateOptional)(bool),
  153889. id: (0, _utils.validateType)("Identifier"),
  153890. typeParameters: (0, _utils.validateOptionalType)("TSTypeParameterDeclaration"),
  153891. extends: (0, _utils.validateOptional)((0, _utils.arrayOfType)("TSExpressionWithTypeArguments")),
  153892. body: (0, _utils.validateType)("TSInterfaceBody")
  153893. }
  153894. });
  153895. (0, _utils.default)("TSInterfaceBody", {
  153896. visitor: ["body"],
  153897. fields: {
  153898. body: (0, _utils.validateArrayOfType)("TSTypeElement")
  153899. }
  153900. });
  153901. (0, _utils.default)("TSTypeAliasDeclaration", {
  153902. aliases: ["Statement", "Declaration"],
  153903. visitor: ["id", "typeParameters", "typeAnnotation"],
  153904. fields: {
  153905. declare: (0, _utils.validateOptional)(bool),
  153906. id: (0, _utils.validateType)("Identifier"),
  153907. typeParameters: (0, _utils.validateOptionalType)("TSTypeParameterDeclaration"),
  153908. typeAnnotation: (0, _utils.validateType)("TSType")
  153909. }
  153910. });
  153911. (0, _utils.default)("TSAsExpression", {
  153912. aliases: ["Expression"],
  153913. visitor: ["expression", "typeAnnotation"],
  153914. fields: {
  153915. expression: (0, _utils.validateType)("Expression"),
  153916. typeAnnotation: (0, _utils.validateType)("TSType")
  153917. }
  153918. });
  153919. (0, _utils.default)("TSTypeAssertion", {
  153920. aliases: ["Expression"],
  153921. visitor: ["typeAnnotation", "expression"],
  153922. fields: {
  153923. typeAnnotation: (0, _utils.validateType)("TSType"),
  153924. expression: (0, _utils.validateType)("Expression")
  153925. }
  153926. });
  153927. (0, _utils.default)("TSEnumDeclaration", {
  153928. aliases: ["Statement", "Declaration"],
  153929. visitor: ["id", "members"],
  153930. fields: {
  153931. declare: (0, _utils.validateOptional)(bool),
  153932. const: (0, _utils.validateOptional)(bool),
  153933. id: (0, _utils.validateType)("Identifier"),
  153934. members: (0, _utils.validateArrayOfType)("TSEnumMember"),
  153935. initializer: (0, _utils.validateOptionalType)("Expression")
  153936. }
  153937. });
  153938. (0, _utils.default)("TSEnumMember", {
  153939. visitor: ["id", "initializer"],
  153940. fields: {
  153941. id: (0, _utils.validateType)(["Identifier", "StringLiteral"]),
  153942. initializer: (0, _utils.validateOptionalType)("Expression")
  153943. }
  153944. });
  153945. (0, _utils.default)("TSModuleDeclaration", {
  153946. aliases: ["Statement", "Declaration"],
  153947. visitor: ["id", "body"],
  153948. fields: {
  153949. declare: (0, _utils.validateOptional)(bool),
  153950. global: (0, _utils.validateOptional)(bool),
  153951. id: (0, _utils.validateType)(["Identifier", "StringLiteral"]),
  153952. body: (0, _utils.validateType)(["TSModuleBlock", "TSModuleDeclaration"])
  153953. }
  153954. });
  153955. (0, _utils.default)("TSModuleBlock", {
  153956. aliases: ["Scopable", "Block", "BlockParent"],
  153957. visitor: ["body"],
  153958. fields: {
  153959. body: (0, _utils.validateArrayOfType)("Statement")
  153960. }
  153961. });
  153962. (0, _utils.default)("TSImportType", {
  153963. aliases: ["TSType"],
  153964. visitor: ["argument", "qualifier", "typeParameters"],
  153965. fields: {
  153966. argument: (0, _utils.validateType)("StringLiteral"),
  153967. qualifier: (0, _utils.validateOptionalType)("TSEntityName"),
  153968. typeParameters: (0, _utils.validateOptionalType)("TSTypeParameterInstantiation")
  153969. }
  153970. });
  153971. (0, _utils.default)("TSImportEqualsDeclaration", {
  153972. aliases: ["Statement"],
  153973. visitor: ["id", "moduleReference"],
  153974. fields: {
  153975. isExport: (0, _utils.validate)(bool),
  153976. id: (0, _utils.validateType)("Identifier"),
  153977. moduleReference: (0, _utils.validateType)(["TSEntityName", "TSExternalModuleReference"])
  153978. }
  153979. });
  153980. (0, _utils.default)("TSExternalModuleReference", {
  153981. visitor: ["expression"],
  153982. fields: {
  153983. expression: (0, _utils.validateType)("StringLiteral")
  153984. }
  153985. });
  153986. (0, _utils.default)("TSNonNullExpression", {
  153987. aliases: ["Expression"],
  153988. visitor: ["expression"],
  153989. fields: {
  153990. expression: (0, _utils.validateType)("Expression")
  153991. }
  153992. });
  153993. (0, _utils.default)("TSExportAssignment", {
  153994. aliases: ["Statement"],
  153995. visitor: ["expression"],
  153996. fields: {
  153997. expression: (0, _utils.validateType)("Expression")
  153998. }
  153999. });
  154000. (0, _utils.default)("TSNamespaceExportDeclaration", {
  154001. aliases: ["Statement"],
  154002. visitor: ["id"],
  154003. fields: {
  154004. id: (0, _utils.validateType)("Identifier")
  154005. }
  154006. });
  154007. (0, _utils.default)("TSTypeAnnotation", {
  154008. visitor: ["typeAnnotation"],
  154009. fields: {
  154010. typeAnnotation: {
  154011. validate: (0, _utils.assertNodeType)("TSType")
  154012. }
  154013. }
  154014. });
  154015. (0, _utils.default)("TSTypeParameterInstantiation", {
  154016. visitor: ["params"],
  154017. fields: {
  154018. params: {
  154019. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("TSType")))
  154020. }
  154021. }
  154022. });
  154023. (0, _utils.default)("TSTypeParameterDeclaration", {
  154024. visitor: ["params"],
  154025. fields: {
  154026. params: {
  154027. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("TSTypeParameter")))
  154028. }
  154029. }
  154030. });
  154031. (0, _utils.default)("TSTypeParameter", {
  154032. builder: ["constraint", "default", "name"],
  154033. visitor: ["constraint", "default"],
  154034. fields: {
  154035. name: {
  154036. validate: (0, _utils.assertValueType)("string")
  154037. },
  154038. constraint: {
  154039. validate: (0, _utils.assertNodeType)("TSType"),
  154040. optional: true
  154041. },
  154042. default: {
  154043. validate: (0, _utils.assertNodeType)("TSType"),
  154044. optional: true
  154045. }
  154046. }
  154047. });
  154048. }
  154049. });
  154050. // node_modules/@babel/traverse/node_modules/@babel/helper-function-name/node_modules/@babel/types/lib/definitions/index.js
  154051. var require_definitions7 = __commonJS({
  154052. "node_modules/@babel/traverse/node_modules/@babel/helper-function-name/node_modules/@babel/types/lib/definitions/index.js"(exports) {
  154053. "use strict";
  154054. Object.defineProperty(exports, "__esModule", {
  154055. value: true
  154056. });
  154057. Object.defineProperty(exports, "VISITOR_KEYS", {
  154058. enumerable: true,
  154059. get: function() {
  154060. return _utils.VISITOR_KEYS;
  154061. }
  154062. });
  154063. Object.defineProperty(exports, "ALIAS_KEYS", {
  154064. enumerable: true,
  154065. get: function() {
  154066. return _utils.ALIAS_KEYS;
  154067. }
  154068. });
  154069. Object.defineProperty(exports, "FLIPPED_ALIAS_KEYS", {
  154070. enumerable: true,
  154071. get: function() {
  154072. return _utils.FLIPPED_ALIAS_KEYS;
  154073. }
  154074. });
  154075. Object.defineProperty(exports, "NODE_FIELDS", {
  154076. enumerable: true,
  154077. get: function() {
  154078. return _utils.NODE_FIELDS;
  154079. }
  154080. });
  154081. Object.defineProperty(exports, "BUILDER_KEYS", {
  154082. enumerable: true,
  154083. get: function() {
  154084. return _utils.BUILDER_KEYS;
  154085. }
  154086. });
  154087. Object.defineProperty(exports, "DEPRECATED_KEYS", {
  154088. enumerable: true,
  154089. get: function() {
  154090. return _utils.DEPRECATED_KEYS;
  154091. }
  154092. });
  154093. Object.defineProperty(exports, "NODE_PARENT_VALIDATIONS", {
  154094. enumerable: true,
  154095. get: function() {
  154096. return _utils.NODE_PARENT_VALIDATIONS;
  154097. }
  154098. });
  154099. Object.defineProperty(exports, "PLACEHOLDERS", {
  154100. enumerable: true,
  154101. get: function() {
  154102. return _placeholders.PLACEHOLDERS;
  154103. }
  154104. });
  154105. Object.defineProperty(exports, "PLACEHOLDERS_ALIAS", {
  154106. enumerable: true,
  154107. get: function() {
  154108. return _placeholders.PLACEHOLDERS_ALIAS;
  154109. }
  154110. });
  154111. Object.defineProperty(exports, "PLACEHOLDERS_FLIPPED_ALIAS", {
  154112. enumerable: true,
  154113. get: function() {
  154114. return _placeholders.PLACEHOLDERS_FLIPPED_ALIAS;
  154115. }
  154116. });
  154117. exports.TYPES = void 0;
  154118. var _toFastProperties = require_to_fast_properties();
  154119. require_core7();
  154120. require_flow9();
  154121. require_jsx9();
  154122. require_misc7();
  154123. require_experimental7();
  154124. require_typescript9();
  154125. var _utils = require_utils7();
  154126. var _placeholders = require_placeholders7();
  154127. _toFastProperties(_utils.VISITOR_KEYS);
  154128. _toFastProperties(_utils.ALIAS_KEYS);
  154129. _toFastProperties(_utils.FLIPPED_ALIAS_KEYS);
  154130. _toFastProperties(_utils.NODE_FIELDS);
  154131. _toFastProperties(_utils.BUILDER_KEYS);
  154132. _toFastProperties(_utils.DEPRECATED_KEYS);
  154133. _toFastProperties(_placeholders.PLACEHOLDERS_ALIAS);
  154134. _toFastProperties(_placeholders.PLACEHOLDERS_FLIPPED_ALIAS);
  154135. var TYPES = Object.keys(_utils.VISITOR_KEYS).concat(Object.keys(_utils.FLIPPED_ALIAS_KEYS)).concat(Object.keys(_utils.DEPRECATED_KEYS));
  154136. exports.TYPES = TYPES;
  154137. }
  154138. });
  154139. // node_modules/@babel/traverse/node_modules/@babel/helper-function-name/node_modules/@babel/types/lib/builders/builder.js
  154140. var require_builder9 = __commonJS({
  154141. "node_modules/@babel/traverse/node_modules/@babel/helper-function-name/node_modules/@babel/types/lib/builders/builder.js"(exports) {
  154142. "use strict";
  154143. Object.defineProperty(exports, "__esModule", {
  154144. value: true
  154145. });
  154146. exports.default = builder;
  154147. var _definitions = require_definitions7();
  154148. var _validate = require_validate7();
  154149. function builder(type, ...args) {
  154150. const keys2 = _definitions.BUILDER_KEYS[type];
  154151. const countArgs = args.length;
  154152. if (countArgs > keys2.length) {
  154153. throw new Error(`${type}: Too many arguments passed. Received ${countArgs} but can receive no more than ${keys2.length}`);
  154154. }
  154155. const node = {
  154156. type
  154157. };
  154158. let i = 0;
  154159. keys2.forEach((key) => {
  154160. const field = _definitions.NODE_FIELDS[type][key];
  154161. let arg;
  154162. if (i < countArgs)
  154163. arg = args[i];
  154164. if (arg === void 0) {
  154165. arg = Array.isArray(field.default) ? [] : field.default;
  154166. }
  154167. node[key] = arg;
  154168. i++;
  154169. });
  154170. for (const key of Object.keys(node)) {
  154171. (0, _validate.default)(node, key, node[key]);
  154172. }
  154173. return node;
  154174. }
  154175. }
  154176. });
  154177. // node_modules/@babel/traverse/node_modules/@babel/helper-function-name/node_modules/@babel/types/lib/builders/generated/index.js
  154178. var require_generated32 = __commonJS({
  154179. "node_modules/@babel/traverse/node_modules/@babel/helper-function-name/node_modules/@babel/types/lib/builders/generated/index.js"(exports) {
  154180. "use strict";
  154181. Object.defineProperty(exports, "__esModule", {
  154182. value: true
  154183. });
  154184. exports.arrayExpression = arrayExpression;
  154185. exports.assignmentExpression = assignmentExpression;
  154186. exports.binaryExpression = binaryExpression;
  154187. exports.interpreterDirective = interpreterDirective;
  154188. exports.directive = directive;
  154189. exports.directiveLiteral = directiveLiteral;
  154190. exports.blockStatement = blockStatement;
  154191. exports.breakStatement = breakStatement;
  154192. exports.callExpression = callExpression;
  154193. exports.catchClause = catchClause;
  154194. exports.conditionalExpression = conditionalExpression;
  154195. exports.continueStatement = continueStatement;
  154196. exports.debuggerStatement = debuggerStatement;
  154197. exports.doWhileStatement = doWhileStatement;
  154198. exports.emptyStatement = emptyStatement;
  154199. exports.expressionStatement = expressionStatement;
  154200. exports.file = file;
  154201. exports.forInStatement = forInStatement;
  154202. exports.forStatement = forStatement;
  154203. exports.functionDeclaration = functionDeclaration;
  154204. exports.functionExpression = functionExpression;
  154205. exports.identifier = identifier;
  154206. exports.ifStatement = ifStatement;
  154207. exports.labeledStatement = labeledStatement;
  154208. exports.stringLiteral = stringLiteral;
  154209. exports.numericLiteral = numericLiteral;
  154210. exports.nullLiteral = nullLiteral;
  154211. exports.booleanLiteral = booleanLiteral;
  154212. exports.regExpLiteral = regExpLiteral;
  154213. exports.logicalExpression = logicalExpression;
  154214. exports.memberExpression = memberExpression;
  154215. exports.newExpression = newExpression;
  154216. exports.program = program;
  154217. exports.objectExpression = objectExpression;
  154218. exports.objectMethod = objectMethod;
  154219. exports.objectProperty = objectProperty;
  154220. exports.restElement = restElement;
  154221. exports.returnStatement = returnStatement;
  154222. exports.sequenceExpression = sequenceExpression;
  154223. exports.parenthesizedExpression = parenthesizedExpression;
  154224. exports.switchCase = switchCase;
  154225. exports.switchStatement = switchStatement;
  154226. exports.thisExpression = thisExpression;
  154227. exports.throwStatement = throwStatement;
  154228. exports.tryStatement = tryStatement;
  154229. exports.unaryExpression = unaryExpression;
  154230. exports.updateExpression = updateExpression;
  154231. exports.variableDeclaration = variableDeclaration;
  154232. exports.variableDeclarator = variableDeclarator;
  154233. exports.whileStatement = whileStatement;
  154234. exports.withStatement = withStatement;
  154235. exports.assignmentPattern = assignmentPattern;
  154236. exports.arrayPattern = arrayPattern;
  154237. exports.arrowFunctionExpression = arrowFunctionExpression;
  154238. exports.classBody = classBody;
  154239. exports.classExpression = classExpression;
  154240. exports.classDeclaration = classDeclaration;
  154241. exports.exportAllDeclaration = exportAllDeclaration;
  154242. exports.exportDefaultDeclaration = exportDefaultDeclaration;
  154243. exports.exportNamedDeclaration = exportNamedDeclaration;
  154244. exports.exportSpecifier = exportSpecifier;
  154245. exports.forOfStatement = forOfStatement;
  154246. exports.importDeclaration = importDeclaration;
  154247. exports.importDefaultSpecifier = importDefaultSpecifier;
  154248. exports.importNamespaceSpecifier = importNamespaceSpecifier;
  154249. exports.importSpecifier = importSpecifier;
  154250. exports.metaProperty = metaProperty;
  154251. exports.classMethod = classMethod;
  154252. exports.objectPattern = objectPattern;
  154253. exports.spreadElement = spreadElement;
  154254. exports.super = _super;
  154255. exports.taggedTemplateExpression = taggedTemplateExpression;
  154256. exports.templateElement = templateElement;
  154257. exports.templateLiteral = templateLiteral;
  154258. exports.yieldExpression = yieldExpression;
  154259. exports.awaitExpression = awaitExpression;
  154260. exports.import = _import;
  154261. exports.bigIntLiteral = bigIntLiteral;
  154262. exports.exportNamespaceSpecifier = exportNamespaceSpecifier;
  154263. exports.optionalMemberExpression = optionalMemberExpression;
  154264. exports.optionalCallExpression = optionalCallExpression;
  154265. exports.anyTypeAnnotation = anyTypeAnnotation;
  154266. exports.arrayTypeAnnotation = arrayTypeAnnotation;
  154267. exports.booleanTypeAnnotation = booleanTypeAnnotation;
  154268. exports.booleanLiteralTypeAnnotation = booleanLiteralTypeAnnotation;
  154269. exports.nullLiteralTypeAnnotation = nullLiteralTypeAnnotation;
  154270. exports.classImplements = classImplements;
  154271. exports.declareClass = declareClass;
  154272. exports.declareFunction = declareFunction;
  154273. exports.declareInterface = declareInterface;
  154274. exports.declareModule = declareModule;
  154275. exports.declareModuleExports = declareModuleExports;
  154276. exports.declareTypeAlias = declareTypeAlias;
  154277. exports.declareOpaqueType = declareOpaqueType;
  154278. exports.declareVariable = declareVariable;
  154279. exports.declareExportDeclaration = declareExportDeclaration;
  154280. exports.declareExportAllDeclaration = declareExportAllDeclaration;
  154281. exports.declaredPredicate = declaredPredicate;
  154282. exports.existsTypeAnnotation = existsTypeAnnotation;
  154283. exports.functionTypeAnnotation = functionTypeAnnotation;
  154284. exports.functionTypeParam = functionTypeParam;
  154285. exports.genericTypeAnnotation = genericTypeAnnotation;
  154286. exports.inferredPredicate = inferredPredicate;
  154287. exports.interfaceExtends = interfaceExtends;
  154288. exports.interfaceDeclaration = interfaceDeclaration;
  154289. exports.interfaceTypeAnnotation = interfaceTypeAnnotation;
  154290. exports.intersectionTypeAnnotation = intersectionTypeAnnotation;
  154291. exports.mixedTypeAnnotation = mixedTypeAnnotation;
  154292. exports.emptyTypeAnnotation = emptyTypeAnnotation;
  154293. exports.nullableTypeAnnotation = nullableTypeAnnotation;
  154294. exports.numberLiteralTypeAnnotation = numberLiteralTypeAnnotation;
  154295. exports.numberTypeAnnotation = numberTypeAnnotation;
  154296. exports.objectTypeAnnotation = objectTypeAnnotation;
  154297. exports.objectTypeInternalSlot = objectTypeInternalSlot;
  154298. exports.objectTypeCallProperty = objectTypeCallProperty;
  154299. exports.objectTypeIndexer = objectTypeIndexer;
  154300. exports.objectTypeProperty = objectTypeProperty;
  154301. exports.objectTypeSpreadProperty = objectTypeSpreadProperty;
  154302. exports.opaqueType = opaqueType;
  154303. exports.qualifiedTypeIdentifier = qualifiedTypeIdentifier;
  154304. exports.stringLiteralTypeAnnotation = stringLiteralTypeAnnotation;
  154305. exports.stringTypeAnnotation = stringTypeAnnotation;
  154306. exports.symbolTypeAnnotation = symbolTypeAnnotation;
  154307. exports.thisTypeAnnotation = thisTypeAnnotation;
  154308. exports.tupleTypeAnnotation = tupleTypeAnnotation;
  154309. exports.typeofTypeAnnotation = typeofTypeAnnotation;
  154310. exports.typeAlias = typeAlias;
  154311. exports.typeAnnotation = typeAnnotation;
  154312. exports.typeCastExpression = typeCastExpression;
  154313. exports.typeParameter = typeParameter;
  154314. exports.typeParameterDeclaration = typeParameterDeclaration;
  154315. exports.typeParameterInstantiation = typeParameterInstantiation;
  154316. exports.unionTypeAnnotation = unionTypeAnnotation;
  154317. exports.variance = variance;
  154318. exports.voidTypeAnnotation = voidTypeAnnotation;
  154319. exports.enumDeclaration = enumDeclaration;
  154320. exports.enumBooleanBody = enumBooleanBody;
  154321. exports.enumNumberBody = enumNumberBody;
  154322. exports.enumStringBody = enumStringBody;
  154323. exports.enumSymbolBody = enumSymbolBody;
  154324. exports.enumBooleanMember = enumBooleanMember;
  154325. exports.enumNumberMember = enumNumberMember;
  154326. exports.enumStringMember = enumStringMember;
  154327. exports.enumDefaultedMember = enumDefaultedMember;
  154328. exports.indexedAccessType = indexedAccessType;
  154329. exports.optionalIndexedAccessType = optionalIndexedAccessType;
  154330. exports.jSXAttribute = exports.jsxAttribute = jsxAttribute;
  154331. exports.jSXClosingElement = exports.jsxClosingElement = jsxClosingElement;
  154332. exports.jSXElement = exports.jsxElement = jsxElement;
  154333. exports.jSXEmptyExpression = exports.jsxEmptyExpression = jsxEmptyExpression;
  154334. exports.jSXExpressionContainer = exports.jsxExpressionContainer = jsxExpressionContainer;
  154335. exports.jSXSpreadChild = exports.jsxSpreadChild = jsxSpreadChild;
  154336. exports.jSXIdentifier = exports.jsxIdentifier = jsxIdentifier;
  154337. exports.jSXMemberExpression = exports.jsxMemberExpression = jsxMemberExpression;
  154338. exports.jSXNamespacedName = exports.jsxNamespacedName = jsxNamespacedName;
  154339. exports.jSXOpeningElement = exports.jsxOpeningElement = jsxOpeningElement;
  154340. exports.jSXSpreadAttribute = exports.jsxSpreadAttribute = jsxSpreadAttribute;
  154341. exports.jSXText = exports.jsxText = jsxText2;
  154342. exports.jSXFragment = exports.jsxFragment = jsxFragment;
  154343. exports.jSXOpeningFragment = exports.jsxOpeningFragment = jsxOpeningFragment;
  154344. exports.jSXClosingFragment = exports.jsxClosingFragment = jsxClosingFragment;
  154345. exports.noop = noop;
  154346. exports.placeholder = placeholder;
  154347. exports.v8IntrinsicIdentifier = v8IntrinsicIdentifier;
  154348. exports.argumentPlaceholder = argumentPlaceholder;
  154349. exports.bindExpression = bindExpression;
  154350. exports.classProperty = classProperty;
  154351. exports.pipelineTopicExpression = pipelineTopicExpression;
  154352. exports.pipelineBareFunction = pipelineBareFunction;
  154353. exports.pipelinePrimaryTopicReference = pipelinePrimaryTopicReference;
  154354. exports.classPrivateProperty = classPrivateProperty;
  154355. exports.classPrivateMethod = classPrivateMethod;
  154356. exports.importAttribute = importAttribute;
  154357. exports.decorator = decorator;
  154358. exports.doExpression = doExpression;
  154359. exports.exportDefaultSpecifier = exportDefaultSpecifier;
  154360. exports.privateName = privateName;
  154361. exports.recordExpression = recordExpression;
  154362. exports.tupleExpression = tupleExpression;
  154363. exports.decimalLiteral = decimalLiteral;
  154364. exports.staticBlock = staticBlock;
  154365. exports.moduleExpression = moduleExpression;
  154366. exports.tSParameterProperty = exports.tsParameterProperty = tsParameterProperty;
  154367. exports.tSDeclareFunction = exports.tsDeclareFunction = tsDeclareFunction;
  154368. exports.tSDeclareMethod = exports.tsDeclareMethod = tsDeclareMethod;
  154369. exports.tSQualifiedName = exports.tsQualifiedName = tsQualifiedName;
  154370. exports.tSCallSignatureDeclaration = exports.tsCallSignatureDeclaration = tsCallSignatureDeclaration;
  154371. exports.tSConstructSignatureDeclaration = exports.tsConstructSignatureDeclaration = tsConstructSignatureDeclaration;
  154372. exports.tSPropertySignature = exports.tsPropertySignature = tsPropertySignature;
  154373. exports.tSMethodSignature = exports.tsMethodSignature = tsMethodSignature;
  154374. exports.tSIndexSignature = exports.tsIndexSignature = tsIndexSignature;
  154375. exports.tSAnyKeyword = exports.tsAnyKeyword = tsAnyKeyword;
  154376. exports.tSBooleanKeyword = exports.tsBooleanKeyword = tsBooleanKeyword;
  154377. exports.tSBigIntKeyword = exports.tsBigIntKeyword = tsBigIntKeyword;
  154378. exports.tSIntrinsicKeyword = exports.tsIntrinsicKeyword = tsIntrinsicKeyword;
  154379. exports.tSNeverKeyword = exports.tsNeverKeyword = tsNeverKeyword;
  154380. exports.tSNullKeyword = exports.tsNullKeyword = tsNullKeyword;
  154381. exports.tSNumberKeyword = exports.tsNumberKeyword = tsNumberKeyword;
  154382. exports.tSObjectKeyword = exports.tsObjectKeyword = tsObjectKeyword;
  154383. exports.tSStringKeyword = exports.tsStringKeyword = tsStringKeyword;
  154384. exports.tSSymbolKeyword = exports.tsSymbolKeyword = tsSymbolKeyword;
  154385. exports.tSUndefinedKeyword = exports.tsUndefinedKeyword = tsUndefinedKeyword;
  154386. exports.tSUnknownKeyword = exports.tsUnknownKeyword = tsUnknownKeyword;
  154387. exports.tSVoidKeyword = exports.tsVoidKeyword = tsVoidKeyword;
  154388. exports.tSThisType = exports.tsThisType = tsThisType;
  154389. exports.tSFunctionType = exports.tsFunctionType = tsFunctionType;
  154390. exports.tSConstructorType = exports.tsConstructorType = tsConstructorType;
  154391. exports.tSTypeReference = exports.tsTypeReference = tsTypeReference;
  154392. exports.tSTypePredicate = exports.tsTypePredicate = tsTypePredicate;
  154393. exports.tSTypeQuery = exports.tsTypeQuery = tsTypeQuery;
  154394. exports.tSTypeLiteral = exports.tsTypeLiteral = tsTypeLiteral;
  154395. exports.tSArrayType = exports.tsArrayType = tsArrayType;
  154396. exports.tSTupleType = exports.tsTupleType = tsTupleType;
  154397. exports.tSOptionalType = exports.tsOptionalType = tsOptionalType;
  154398. exports.tSRestType = exports.tsRestType = tsRestType;
  154399. exports.tSNamedTupleMember = exports.tsNamedTupleMember = tsNamedTupleMember;
  154400. exports.tSUnionType = exports.tsUnionType = tsUnionType;
  154401. exports.tSIntersectionType = exports.tsIntersectionType = tsIntersectionType;
  154402. exports.tSConditionalType = exports.tsConditionalType = tsConditionalType;
  154403. exports.tSInferType = exports.tsInferType = tsInferType;
  154404. exports.tSParenthesizedType = exports.tsParenthesizedType = tsParenthesizedType;
  154405. exports.tSTypeOperator = exports.tsTypeOperator = tsTypeOperator;
  154406. exports.tSIndexedAccessType = exports.tsIndexedAccessType = tsIndexedAccessType;
  154407. exports.tSMappedType = exports.tsMappedType = tsMappedType;
  154408. exports.tSLiteralType = exports.tsLiteralType = tsLiteralType;
  154409. exports.tSExpressionWithTypeArguments = exports.tsExpressionWithTypeArguments = tsExpressionWithTypeArguments;
  154410. exports.tSInterfaceDeclaration = exports.tsInterfaceDeclaration = tsInterfaceDeclaration;
  154411. exports.tSInterfaceBody = exports.tsInterfaceBody = tsInterfaceBody;
  154412. exports.tSTypeAliasDeclaration = exports.tsTypeAliasDeclaration = tsTypeAliasDeclaration;
  154413. exports.tSAsExpression = exports.tsAsExpression = tsAsExpression;
  154414. exports.tSTypeAssertion = exports.tsTypeAssertion = tsTypeAssertion;
  154415. exports.tSEnumDeclaration = exports.tsEnumDeclaration = tsEnumDeclaration;
  154416. exports.tSEnumMember = exports.tsEnumMember = tsEnumMember;
  154417. exports.tSModuleDeclaration = exports.tsModuleDeclaration = tsModuleDeclaration;
  154418. exports.tSModuleBlock = exports.tsModuleBlock = tsModuleBlock;
  154419. exports.tSImportType = exports.tsImportType = tsImportType;
  154420. exports.tSImportEqualsDeclaration = exports.tsImportEqualsDeclaration = tsImportEqualsDeclaration;
  154421. exports.tSExternalModuleReference = exports.tsExternalModuleReference = tsExternalModuleReference;
  154422. exports.tSNonNullExpression = exports.tsNonNullExpression = tsNonNullExpression;
  154423. exports.tSExportAssignment = exports.tsExportAssignment = tsExportAssignment;
  154424. exports.tSNamespaceExportDeclaration = exports.tsNamespaceExportDeclaration = tsNamespaceExportDeclaration;
  154425. exports.tSTypeAnnotation = exports.tsTypeAnnotation = tsTypeAnnotation;
  154426. exports.tSTypeParameterInstantiation = exports.tsTypeParameterInstantiation = tsTypeParameterInstantiation;
  154427. exports.tSTypeParameterDeclaration = exports.tsTypeParameterDeclaration = tsTypeParameterDeclaration;
  154428. exports.tSTypeParameter = exports.tsTypeParameter = tsTypeParameter;
  154429. exports.numberLiteral = NumberLiteral;
  154430. exports.regexLiteral = RegexLiteral;
  154431. exports.restProperty = RestProperty;
  154432. exports.spreadProperty = SpreadProperty;
  154433. var _builder = require_builder9();
  154434. function arrayExpression(elements) {
  154435. return (0, _builder.default)("ArrayExpression", ...arguments);
  154436. }
  154437. function assignmentExpression(operator, left, right) {
  154438. return (0, _builder.default)("AssignmentExpression", ...arguments);
  154439. }
  154440. function binaryExpression(operator, left, right) {
  154441. return (0, _builder.default)("BinaryExpression", ...arguments);
  154442. }
  154443. function interpreterDirective(value) {
  154444. return (0, _builder.default)("InterpreterDirective", ...arguments);
  154445. }
  154446. function directive(value) {
  154447. return (0, _builder.default)("Directive", ...arguments);
  154448. }
  154449. function directiveLiteral(value) {
  154450. return (0, _builder.default)("DirectiveLiteral", ...arguments);
  154451. }
  154452. function blockStatement(body, directives) {
  154453. return (0, _builder.default)("BlockStatement", ...arguments);
  154454. }
  154455. function breakStatement(label) {
  154456. return (0, _builder.default)("BreakStatement", ...arguments);
  154457. }
  154458. function callExpression(callee, _arguments) {
  154459. return (0, _builder.default)("CallExpression", ...arguments);
  154460. }
  154461. function catchClause(param, body) {
  154462. return (0, _builder.default)("CatchClause", ...arguments);
  154463. }
  154464. function conditionalExpression(test, consequent, alternate) {
  154465. return (0, _builder.default)("ConditionalExpression", ...arguments);
  154466. }
  154467. function continueStatement(label) {
  154468. return (0, _builder.default)("ContinueStatement", ...arguments);
  154469. }
  154470. function debuggerStatement() {
  154471. return (0, _builder.default)("DebuggerStatement", ...arguments);
  154472. }
  154473. function doWhileStatement(test, body) {
  154474. return (0, _builder.default)("DoWhileStatement", ...arguments);
  154475. }
  154476. function emptyStatement() {
  154477. return (0, _builder.default)("EmptyStatement", ...arguments);
  154478. }
  154479. function expressionStatement(expression) {
  154480. return (0, _builder.default)("ExpressionStatement", ...arguments);
  154481. }
  154482. function file(program2, comments, tokens) {
  154483. return (0, _builder.default)("File", ...arguments);
  154484. }
  154485. function forInStatement(left, right, body) {
  154486. return (0, _builder.default)("ForInStatement", ...arguments);
  154487. }
  154488. function forStatement(init, test, update, body) {
  154489. return (0, _builder.default)("ForStatement", ...arguments);
  154490. }
  154491. function functionDeclaration(id, params, body, generator, async) {
  154492. return (0, _builder.default)("FunctionDeclaration", ...arguments);
  154493. }
  154494. function functionExpression(id, params, body, generator, async) {
  154495. return (0, _builder.default)("FunctionExpression", ...arguments);
  154496. }
  154497. function identifier(name2) {
  154498. return (0, _builder.default)("Identifier", ...arguments);
  154499. }
  154500. function ifStatement(test, consequent, alternate) {
  154501. return (0, _builder.default)("IfStatement", ...arguments);
  154502. }
  154503. function labeledStatement(label, body) {
  154504. return (0, _builder.default)("LabeledStatement", ...arguments);
  154505. }
  154506. function stringLiteral(value) {
  154507. return (0, _builder.default)("StringLiteral", ...arguments);
  154508. }
  154509. function numericLiteral(value) {
  154510. return (0, _builder.default)("NumericLiteral", ...arguments);
  154511. }
  154512. function nullLiteral() {
  154513. return (0, _builder.default)("NullLiteral", ...arguments);
  154514. }
  154515. function booleanLiteral(value) {
  154516. return (0, _builder.default)("BooleanLiteral", ...arguments);
  154517. }
  154518. function regExpLiteral(pattern, flags) {
  154519. return (0, _builder.default)("RegExpLiteral", ...arguments);
  154520. }
  154521. function logicalExpression(operator, left, right) {
  154522. return (0, _builder.default)("LogicalExpression", ...arguments);
  154523. }
  154524. function memberExpression(object, property, computed, optional) {
  154525. return (0, _builder.default)("MemberExpression", ...arguments);
  154526. }
  154527. function newExpression(callee, _arguments) {
  154528. return (0, _builder.default)("NewExpression", ...arguments);
  154529. }
  154530. function program(body, directives, sourceType, interpreter) {
  154531. return (0, _builder.default)("Program", ...arguments);
  154532. }
  154533. function objectExpression(properties) {
  154534. return (0, _builder.default)("ObjectExpression", ...arguments);
  154535. }
  154536. function objectMethod(kind, key, params, body, computed, generator, async) {
  154537. return (0, _builder.default)("ObjectMethod", ...arguments);
  154538. }
  154539. function objectProperty(key, value, computed, shorthand, decorators) {
  154540. return (0, _builder.default)("ObjectProperty", ...arguments);
  154541. }
  154542. function restElement(argument) {
  154543. return (0, _builder.default)("RestElement", ...arguments);
  154544. }
  154545. function returnStatement(argument) {
  154546. return (0, _builder.default)("ReturnStatement", ...arguments);
  154547. }
  154548. function sequenceExpression(expressions) {
  154549. return (0, _builder.default)("SequenceExpression", ...arguments);
  154550. }
  154551. function parenthesizedExpression(expression) {
  154552. return (0, _builder.default)("ParenthesizedExpression", ...arguments);
  154553. }
  154554. function switchCase(test, consequent) {
  154555. return (0, _builder.default)("SwitchCase", ...arguments);
  154556. }
  154557. function switchStatement(discriminant, cases) {
  154558. return (0, _builder.default)("SwitchStatement", ...arguments);
  154559. }
  154560. function thisExpression() {
  154561. return (0, _builder.default)("ThisExpression", ...arguments);
  154562. }
  154563. function throwStatement(argument) {
  154564. return (0, _builder.default)("ThrowStatement", ...arguments);
  154565. }
  154566. function tryStatement(block, handler, finalizer) {
  154567. return (0, _builder.default)("TryStatement", ...arguments);
  154568. }
  154569. function unaryExpression(operator, argument, prefix) {
  154570. return (0, _builder.default)("UnaryExpression", ...arguments);
  154571. }
  154572. function updateExpression(operator, argument, prefix) {
  154573. return (0, _builder.default)("UpdateExpression", ...arguments);
  154574. }
  154575. function variableDeclaration(kind, declarations) {
  154576. return (0, _builder.default)("VariableDeclaration", ...arguments);
  154577. }
  154578. function variableDeclarator(id, init) {
  154579. return (0, _builder.default)("VariableDeclarator", ...arguments);
  154580. }
  154581. function whileStatement(test, body) {
  154582. return (0, _builder.default)("WhileStatement", ...arguments);
  154583. }
  154584. function withStatement(object, body) {
  154585. return (0, _builder.default)("WithStatement", ...arguments);
  154586. }
  154587. function assignmentPattern(left, right) {
  154588. return (0, _builder.default)("AssignmentPattern", ...arguments);
  154589. }
  154590. function arrayPattern(elements) {
  154591. return (0, _builder.default)("ArrayPattern", ...arguments);
  154592. }
  154593. function arrowFunctionExpression(params, body, async) {
  154594. return (0, _builder.default)("ArrowFunctionExpression", ...arguments);
  154595. }
  154596. function classBody(body) {
  154597. return (0, _builder.default)("ClassBody", ...arguments);
  154598. }
  154599. function classExpression(id, superClass, body, decorators) {
  154600. return (0, _builder.default)("ClassExpression", ...arguments);
  154601. }
  154602. function classDeclaration(id, superClass, body, decorators) {
  154603. return (0, _builder.default)("ClassDeclaration", ...arguments);
  154604. }
  154605. function exportAllDeclaration(source) {
  154606. return (0, _builder.default)("ExportAllDeclaration", ...arguments);
  154607. }
  154608. function exportDefaultDeclaration(declaration) {
  154609. return (0, _builder.default)("ExportDefaultDeclaration", ...arguments);
  154610. }
  154611. function exportNamedDeclaration(declaration, specifiers, source) {
  154612. return (0, _builder.default)("ExportNamedDeclaration", ...arguments);
  154613. }
  154614. function exportSpecifier(local, exported) {
  154615. return (0, _builder.default)("ExportSpecifier", ...arguments);
  154616. }
  154617. function forOfStatement(left, right, body, _await) {
  154618. return (0, _builder.default)("ForOfStatement", ...arguments);
  154619. }
  154620. function importDeclaration(specifiers, source) {
  154621. return (0, _builder.default)("ImportDeclaration", ...arguments);
  154622. }
  154623. function importDefaultSpecifier(local) {
  154624. return (0, _builder.default)("ImportDefaultSpecifier", ...arguments);
  154625. }
  154626. function importNamespaceSpecifier(local) {
  154627. return (0, _builder.default)("ImportNamespaceSpecifier", ...arguments);
  154628. }
  154629. function importSpecifier(local, imported) {
  154630. return (0, _builder.default)("ImportSpecifier", ...arguments);
  154631. }
  154632. function metaProperty(meta, property) {
  154633. return (0, _builder.default)("MetaProperty", ...arguments);
  154634. }
  154635. function classMethod(kind, key, params, body, computed, _static, generator, async) {
  154636. return (0, _builder.default)("ClassMethod", ...arguments);
  154637. }
  154638. function objectPattern(properties) {
  154639. return (0, _builder.default)("ObjectPattern", ...arguments);
  154640. }
  154641. function spreadElement(argument) {
  154642. return (0, _builder.default)("SpreadElement", ...arguments);
  154643. }
  154644. function _super() {
  154645. return (0, _builder.default)("Super", ...arguments);
  154646. }
  154647. function taggedTemplateExpression(tag, quasi) {
  154648. return (0, _builder.default)("TaggedTemplateExpression", ...arguments);
  154649. }
  154650. function templateElement(value, tail) {
  154651. return (0, _builder.default)("TemplateElement", ...arguments);
  154652. }
  154653. function templateLiteral(quasis, expressions) {
  154654. return (0, _builder.default)("TemplateLiteral", ...arguments);
  154655. }
  154656. function yieldExpression(argument, delegate) {
  154657. return (0, _builder.default)("YieldExpression", ...arguments);
  154658. }
  154659. function awaitExpression(argument) {
  154660. return (0, _builder.default)("AwaitExpression", ...arguments);
  154661. }
  154662. function _import() {
  154663. return (0, _builder.default)("Import", ...arguments);
  154664. }
  154665. function bigIntLiteral(value) {
  154666. return (0, _builder.default)("BigIntLiteral", ...arguments);
  154667. }
  154668. function exportNamespaceSpecifier(exported) {
  154669. return (0, _builder.default)("ExportNamespaceSpecifier", ...arguments);
  154670. }
  154671. function optionalMemberExpression(object, property, computed, optional) {
  154672. return (0, _builder.default)("OptionalMemberExpression", ...arguments);
  154673. }
  154674. function optionalCallExpression(callee, _arguments, optional) {
  154675. return (0, _builder.default)("OptionalCallExpression", ...arguments);
  154676. }
  154677. function anyTypeAnnotation() {
  154678. return (0, _builder.default)("AnyTypeAnnotation", ...arguments);
  154679. }
  154680. function arrayTypeAnnotation(elementType) {
  154681. return (0, _builder.default)("ArrayTypeAnnotation", ...arguments);
  154682. }
  154683. function booleanTypeAnnotation() {
  154684. return (0, _builder.default)("BooleanTypeAnnotation", ...arguments);
  154685. }
  154686. function booleanLiteralTypeAnnotation(value) {
  154687. return (0, _builder.default)("BooleanLiteralTypeAnnotation", ...arguments);
  154688. }
  154689. function nullLiteralTypeAnnotation() {
  154690. return (0, _builder.default)("NullLiteralTypeAnnotation", ...arguments);
  154691. }
  154692. function classImplements(id, typeParameters) {
  154693. return (0, _builder.default)("ClassImplements", ...arguments);
  154694. }
  154695. function declareClass(id, typeParameters, _extends, body) {
  154696. return (0, _builder.default)("DeclareClass", ...arguments);
  154697. }
  154698. function declareFunction(id) {
  154699. return (0, _builder.default)("DeclareFunction", ...arguments);
  154700. }
  154701. function declareInterface(id, typeParameters, _extends, body) {
  154702. return (0, _builder.default)("DeclareInterface", ...arguments);
  154703. }
  154704. function declareModule(id, body, kind) {
  154705. return (0, _builder.default)("DeclareModule", ...arguments);
  154706. }
  154707. function declareModuleExports(typeAnnotation2) {
  154708. return (0, _builder.default)("DeclareModuleExports", ...arguments);
  154709. }
  154710. function declareTypeAlias(id, typeParameters, right) {
  154711. return (0, _builder.default)("DeclareTypeAlias", ...arguments);
  154712. }
  154713. function declareOpaqueType(id, typeParameters, supertype) {
  154714. return (0, _builder.default)("DeclareOpaqueType", ...arguments);
  154715. }
  154716. function declareVariable(id) {
  154717. return (0, _builder.default)("DeclareVariable", ...arguments);
  154718. }
  154719. function declareExportDeclaration(declaration, specifiers, source) {
  154720. return (0, _builder.default)("DeclareExportDeclaration", ...arguments);
  154721. }
  154722. function declareExportAllDeclaration(source) {
  154723. return (0, _builder.default)("DeclareExportAllDeclaration", ...arguments);
  154724. }
  154725. function declaredPredicate(value) {
  154726. return (0, _builder.default)("DeclaredPredicate", ...arguments);
  154727. }
  154728. function existsTypeAnnotation() {
  154729. return (0, _builder.default)("ExistsTypeAnnotation", ...arguments);
  154730. }
  154731. function functionTypeAnnotation(typeParameters, params, rest, returnType) {
  154732. return (0, _builder.default)("FunctionTypeAnnotation", ...arguments);
  154733. }
  154734. function functionTypeParam(name2, typeAnnotation2) {
  154735. return (0, _builder.default)("FunctionTypeParam", ...arguments);
  154736. }
  154737. function genericTypeAnnotation(id, typeParameters) {
  154738. return (0, _builder.default)("GenericTypeAnnotation", ...arguments);
  154739. }
  154740. function inferredPredicate() {
  154741. return (0, _builder.default)("InferredPredicate", ...arguments);
  154742. }
  154743. function interfaceExtends(id, typeParameters) {
  154744. return (0, _builder.default)("InterfaceExtends", ...arguments);
  154745. }
  154746. function interfaceDeclaration(id, typeParameters, _extends, body) {
  154747. return (0, _builder.default)("InterfaceDeclaration", ...arguments);
  154748. }
  154749. function interfaceTypeAnnotation(_extends, body) {
  154750. return (0, _builder.default)("InterfaceTypeAnnotation", ...arguments);
  154751. }
  154752. function intersectionTypeAnnotation(types2) {
  154753. return (0, _builder.default)("IntersectionTypeAnnotation", ...arguments);
  154754. }
  154755. function mixedTypeAnnotation() {
  154756. return (0, _builder.default)("MixedTypeAnnotation", ...arguments);
  154757. }
  154758. function emptyTypeAnnotation() {
  154759. return (0, _builder.default)("EmptyTypeAnnotation", ...arguments);
  154760. }
  154761. function nullableTypeAnnotation(typeAnnotation2) {
  154762. return (0, _builder.default)("NullableTypeAnnotation", ...arguments);
  154763. }
  154764. function numberLiteralTypeAnnotation(value) {
  154765. return (0, _builder.default)("NumberLiteralTypeAnnotation", ...arguments);
  154766. }
  154767. function numberTypeAnnotation() {
  154768. return (0, _builder.default)("NumberTypeAnnotation", ...arguments);
  154769. }
  154770. function objectTypeAnnotation(properties, indexers, callProperties, internalSlots, exact) {
  154771. return (0, _builder.default)("ObjectTypeAnnotation", ...arguments);
  154772. }
  154773. function objectTypeInternalSlot(id, value, optional, _static, method) {
  154774. return (0, _builder.default)("ObjectTypeInternalSlot", ...arguments);
  154775. }
  154776. function objectTypeCallProperty(value) {
  154777. return (0, _builder.default)("ObjectTypeCallProperty", ...arguments);
  154778. }
  154779. function objectTypeIndexer(id, key, value, variance2) {
  154780. return (0, _builder.default)("ObjectTypeIndexer", ...arguments);
  154781. }
  154782. function objectTypeProperty(key, value, variance2) {
  154783. return (0, _builder.default)("ObjectTypeProperty", ...arguments);
  154784. }
  154785. function objectTypeSpreadProperty(argument) {
  154786. return (0, _builder.default)("ObjectTypeSpreadProperty", ...arguments);
  154787. }
  154788. function opaqueType(id, typeParameters, supertype, impltype) {
  154789. return (0, _builder.default)("OpaqueType", ...arguments);
  154790. }
  154791. function qualifiedTypeIdentifier(id, qualification) {
  154792. return (0, _builder.default)("QualifiedTypeIdentifier", ...arguments);
  154793. }
  154794. function stringLiteralTypeAnnotation(value) {
  154795. return (0, _builder.default)("StringLiteralTypeAnnotation", ...arguments);
  154796. }
  154797. function stringTypeAnnotation() {
  154798. return (0, _builder.default)("StringTypeAnnotation", ...arguments);
  154799. }
  154800. function symbolTypeAnnotation() {
  154801. return (0, _builder.default)("SymbolTypeAnnotation", ...arguments);
  154802. }
  154803. function thisTypeAnnotation() {
  154804. return (0, _builder.default)("ThisTypeAnnotation", ...arguments);
  154805. }
  154806. function tupleTypeAnnotation(types2) {
  154807. return (0, _builder.default)("TupleTypeAnnotation", ...arguments);
  154808. }
  154809. function typeofTypeAnnotation(argument) {
  154810. return (0, _builder.default)("TypeofTypeAnnotation", ...arguments);
  154811. }
  154812. function typeAlias(id, typeParameters, right) {
  154813. return (0, _builder.default)("TypeAlias", ...arguments);
  154814. }
  154815. function typeAnnotation(typeAnnotation2) {
  154816. return (0, _builder.default)("TypeAnnotation", ...arguments);
  154817. }
  154818. function typeCastExpression(expression, typeAnnotation2) {
  154819. return (0, _builder.default)("TypeCastExpression", ...arguments);
  154820. }
  154821. function typeParameter(bound, _default, variance2) {
  154822. return (0, _builder.default)("TypeParameter", ...arguments);
  154823. }
  154824. function typeParameterDeclaration(params) {
  154825. return (0, _builder.default)("TypeParameterDeclaration", ...arguments);
  154826. }
  154827. function typeParameterInstantiation(params) {
  154828. return (0, _builder.default)("TypeParameterInstantiation", ...arguments);
  154829. }
  154830. function unionTypeAnnotation(types2) {
  154831. return (0, _builder.default)("UnionTypeAnnotation", ...arguments);
  154832. }
  154833. function variance(kind) {
  154834. return (0, _builder.default)("Variance", ...arguments);
  154835. }
  154836. function voidTypeAnnotation() {
  154837. return (0, _builder.default)("VoidTypeAnnotation", ...arguments);
  154838. }
  154839. function enumDeclaration(id, body) {
  154840. return (0, _builder.default)("EnumDeclaration", ...arguments);
  154841. }
  154842. function enumBooleanBody(members) {
  154843. return (0, _builder.default)("EnumBooleanBody", ...arguments);
  154844. }
  154845. function enumNumberBody(members) {
  154846. return (0, _builder.default)("EnumNumberBody", ...arguments);
  154847. }
  154848. function enumStringBody(members) {
  154849. return (0, _builder.default)("EnumStringBody", ...arguments);
  154850. }
  154851. function enumSymbolBody(members) {
  154852. return (0, _builder.default)("EnumSymbolBody", ...arguments);
  154853. }
  154854. function enumBooleanMember(id) {
  154855. return (0, _builder.default)("EnumBooleanMember", ...arguments);
  154856. }
  154857. function enumNumberMember(id, init) {
  154858. return (0, _builder.default)("EnumNumberMember", ...arguments);
  154859. }
  154860. function enumStringMember(id, init) {
  154861. return (0, _builder.default)("EnumStringMember", ...arguments);
  154862. }
  154863. function enumDefaultedMember(id) {
  154864. return (0, _builder.default)("EnumDefaultedMember", ...arguments);
  154865. }
  154866. function indexedAccessType(objectType, indexType) {
  154867. return (0, _builder.default)("IndexedAccessType", ...arguments);
  154868. }
  154869. function optionalIndexedAccessType(objectType, indexType) {
  154870. return (0, _builder.default)("OptionalIndexedAccessType", ...arguments);
  154871. }
  154872. function jsxAttribute(name2, value) {
  154873. return (0, _builder.default)("JSXAttribute", ...arguments);
  154874. }
  154875. function jsxClosingElement(name2) {
  154876. return (0, _builder.default)("JSXClosingElement", ...arguments);
  154877. }
  154878. function jsxElement(openingElement, closingElement, children, selfClosing) {
  154879. return (0, _builder.default)("JSXElement", ...arguments);
  154880. }
  154881. function jsxEmptyExpression() {
  154882. return (0, _builder.default)("JSXEmptyExpression", ...arguments);
  154883. }
  154884. function jsxExpressionContainer(expression) {
  154885. return (0, _builder.default)("JSXExpressionContainer", ...arguments);
  154886. }
  154887. function jsxSpreadChild(expression) {
  154888. return (0, _builder.default)("JSXSpreadChild", ...arguments);
  154889. }
  154890. function jsxIdentifier(name2) {
  154891. return (0, _builder.default)("JSXIdentifier", ...arguments);
  154892. }
  154893. function jsxMemberExpression(object, property) {
  154894. return (0, _builder.default)("JSXMemberExpression", ...arguments);
  154895. }
  154896. function jsxNamespacedName(namespace, name2) {
  154897. return (0, _builder.default)("JSXNamespacedName", ...arguments);
  154898. }
  154899. function jsxOpeningElement(name2, attributes, selfClosing) {
  154900. return (0, _builder.default)("JSXOpeningElement", ...arguments);
  154901. }
  154902. function jsxSpreadAttribute(argument) {
  154903. return (0, _builder.default)("JSXSpreadAttribute", ...arguments);
  154904. }
  154905. function jsxText2(value) {
  154906. return (0, _builder.default)("JSXText", ...arguments);
  154907. }
  154908. function jsxFragment(openingFragment, closingFragment, children) {
  154909. return (0, _builder.default)("JSXFragment", ...arguments);
  154910. }
  154911. function jsxOpeningFragment() {
  154912. return (0, _builder.default)("JSXOpeningFragment", ...arguments);
  154913. }
  154914. function jsxClosingFragment() {
  154915. return (0, _builder.default)("JSXClosingFragment", ...arguments);
  154916. }
  154917. function noop() {
  154918. return (0, _builder.default)("Noop", ...arguments);
  154919. }
  154920. function placeholder(expectedNode, name2) {
  154921. return (0, _builder.default)("Placeholder", ...arguments);
  154922. }
  154923. function v8IntrinsicIdentifier(name2) {
  154924. return (0, _builder.default)("V8IntrinsicIdentifier", ...arguments);
  154925. }
  154926. function argumentPlaceholder() {
  154927. return (0, _builder.default)("ArgumentPlaceholder", ...arguments);
  154928. }
  154929. function bindExpression(object, callee) {
  154930. return (0, _builder.default)("BindExpression", ...arguments);
  154931. }
  154932. function classProperty(key, value, typeAnnotation2, decorators, computed, _static) {
  154933. return (0, _builder.default)("ClassProperty", ...arguments);
  154934. }
  154935. function pipelineTopicExpression(expression) {
  154936. return (0, _builder.default)("PipelineTopicExpression", ...arguments);
  154937. }
  154938. function pipelineBareFunction(callee) {
  154939. return (0, _builder.default)("PipelineBareFunction", ...arguments);
  154940. }
  154941. function pipelinePrimaryTopicReference() {
  154942. return (0, _builder.default)("PipelinePrimaryTopicReference", ...arguments);
  154943. }
  154944. function classPrivateProperty(key, value, decorators, _static) {
  154945. return (0, _builder.default)("ClassPrivateProperty", ...arguments);
  154946. }
  154947. function classPrivateMethod(kind, key, params, body, _static) {
  154948. return (0, _builder.default)("ClassPrivateMethod", ...arguments);
  154949. }
  154950. function importAttribute(key, value) {
  154951. return (0, _builder.default)("ImportAttribute", ...arguments);
  154952. }
  154953. function decorator(expression) {
  154954. return (0, _builder.default)("Decorator", ...arguments);
  154955. }
  154956. function doExpression(body, async) {
  154957. return (0, _builder.default)("DoExpression", ...arguments);
  154958. }
  154959. function exportDefaultSpecifier(exported) {
  154960. return (0, _builder.default)("ExportDefaultSpecifier", ...arguments);
  154961. }
  154962. function privateName(id) {
  154963. return (0, _builder.default)("PrivateName", ...arguments);
  154964. }
  154965. function recordExpression(properties) {
  154966. return (0, _builder.default)("RecordExpression", ...arguments);
  154967. }
  154968. function tupleExpression(elements) {
  154969. return (0, _builder.default)("TupleExpression", ...arguments);
  154970. }
  154971. function decimalLiteral(value) {
  154972. return (0, _builder.default)("DecimalLiteral", ...arguments);
  154973. }
  154974. function staticBlock(body) {
  154975. return (0, _builder.default)("StaticBlock", ...arguments);
  154976. }
  154977. function moduleExpression(body) {
  154978. return (0, _builder.default)("ModuleExpression", ...arguments);
  154979. }
  154980. function tsParameterProperty(parameter) {
  154981. return (0, _builder.default)("TSParameterProperty", ...arguments);
  154982. }
  154983. function tsDeclareFunction(id, typeParameters, params, returnType) {
  154984. return (0, _builder.default)("TSDeclareFunction", ...arguments);
  154985. }
  154986. function tsDeclareMethod(decorators, key, typeParameters, params, returnType) {
  154987. return (0, _builder.default)("TSDeclareMethod", ...arguments);
  154988. }
  154989. function tsQualifiedName(left, right) {
  154990. return (0, _builder.default)("TSQualifiedName", ...arguments);
  154991. }
  154992. function tsCallSignatureDeclaration(typeParameters, parameters, typeAnnotation2) {
  154993. return (0, _builder.default)("TSCallSignatureDeclaration", ...arguments);
  154994. }
  154995. function tsConstructSignatureDeclaration(typeParameters, parameters, typeAnnotation2) {
  154996. return (0, _builder.default)("TSConstructSignatureDeclaration", ...arguments);
  154997. }
  154998. function tsPropertySignature(key, typeAnnotation2, initializer) {
  154999. return (0, _builder.default)("TSPropertySignature", ...arguments);
  155000. }
  155001. function tsMethodSignature(key, typeParameters, parameters, typeAnnotation2) {
  155002. return (0, _builder.default)("TSMethodSignature", ...arguments);
  155003. }
  155004. function tsIndexSignature(parameters, typeAnnotation2) {
  155005. return (0, _builder.default)("TSIndexSignature", ...arguments);
  155006. }
  155007. function tsAnyKeyword() {
  155008. return (0, _builder.default)("TSAnyKeyword", ...arguments);
  155009. }
  155010. function tsBooleanKeyword() {
  155011. return (0, _builder.default)("TSBooleanKeyword", ...arguments);
  155012. }
  155013. function tsBigIntKeyword() {
  155014. return (0, _builder.default)("TSBigIntKeyword", ...arguments);
  155015. }
  155016. function tsIntrinsicKeyword() {
  155017. return (0, _builder.default)("TSIntrinsicKeyword", ...arguments);
  155018. }
  155019. function tsNeverKeyword() {
  155020. return (0, _builder.default)("TSNeverKeyword", ...arguments);
  155021. }
  155022. function tsNullKeyword() {
  155023. return (0, _builder.default)("TSNullKeyword", ...arguments);
  155024. }
  155025. function tsNumberKeyword() {
  155026. return (0, _builder.default)("TSNumberKeyword", ...arguments);
  155027. }
  155028. function tsObjectKeyword() {
  155029. return (0, _builder.default)("TSObjectKeyword", ...arguments);
  155030. }
  155031. function tsStringKeyword() {
  155032. return (0, _builder.default)("TSStringKeyword", ...arguments);
  155033. }
  155034. function tsSymbolKeyword() {
  155035. return (0, _builder.default)("TSSymbolKeyword", ...arguments);
  155036. }
  155037. function tsUndefinedKeyword() {
  155038. return (0, _builder.default)("TSUndefinedKeyword", ...arguments);
  155039. }
  155040. function tsUnknownKeyword() {
  155041. return (0, _builder.default)("TSUnknownKeyword", ...arguments);
  155042. }
  155043. function tsVoidKeyword() {
  155044. return (0, _builder.default)("TSVoidKeyword", ...arguments);
  155045. }
  155046. function tsThisType() {
  155047. return (0, _builder.default)("TSThisType", ...arguments);
  155048. }
  155049. function tsFunctionType(typeParameters, parameters, typeAnnotation2) {
  155050. return (0, _builder.default)("TSFunctionType", ...arguments);
  155051. }
  155052. function tsConstructorType(typeParameters, parameters, typeAnnotation2) {
  155053. return (0, _builder.default)("TSConstructorType", ...arguments);
  155054. }
  155055. function tsTypeReference(typeName, typeParameters) {
  155056. return (0, _builder.default)("TSTypeReference", ...arguments);
  155057. }
  155058. function tsTypePredicate(parameterName, typeAnnotation2, asserts) {
  155059. return (0, _builder.default)("TSTypePredicate", ...arguments);
  155060. }
  155061. function tsTypeQuery(exprName) {
  155062. return (0, _builder.default)("TSTypeQuery", ...arguments);
  155063. }
  155064. function tsTypeLiteral(members) {
  155065. return (0, _builder.default)("TSTypeLiteral", ...arguments);
  155066. }
  155067. function tsArrayType(elementType) {
  155068. return (0, _builder.default)("TSArrayType", ...arguments);
  155069. }
  155070. function tsTupleType(elementTypes) {
  155071. return (0, _builder.default)("TSTupleType", ...arguments);
  155072. }
  155073. function tsOptionalType(typeAnnotation2) {
  155074. return (0, _builder.default)("TSOptionalType", ...arguments);
  155075. }
  155076. function tsRestType(typeAnnotation2) {
  155077. return (0, _builder.default)("TSRestType", ...arguments);
  155078. }
  155079. function tsNamedTupleMember(label, elementType, optional) {
  155080. return (0, _builder.default)("TSNamedTupleMember", ...arguments);
  155081. }
  155082. function tsUnionType(types2) {
  155083. return (0, _builder.default)("TSUnionType", ...arguments);
  155084. }
  155085. function tsIntersectionType(types2) {
  155086. return (0, _builder.default)("TSIntersectionType", ...arguments);
  155087. }
  155088. function tsConditionalType(checkType, extendsType, trueType, falseType) {
  155089. return (0, _builder.default)("TSConditionalType", ...arguments);
  155090. }
  155091. function tsInferType(typeParameter2) {
  155092. return (0, _builder.default)("TSInferType", ...arguments);
  155093. }
  155094. function tsParenthesizedType(typeAnnotation2) {
  155095. return (0, _builder.default)("TSParenthesizedType", ...arguments);
  155096. }
  155097. function tsTypeOperator(typeAnnotation2) {
  155098. return (0, _builder.default)("TSTypeOperator", ...arguments);
  155099. }
  155100. function tsIndexedAccessType(objectType, indexType) {
  155101. return (0, _builder.default)("TSIndexedAccessType", ...arguments);
  155102. }
  155103. function tsMappedType(typeParameter2, typeAnnotation2, nameType) {
  155104. return (0, _builder.default)("TSMappedType", ...arguments);
  155105. }
  155106. function tsLiteralType(literal2) {
  155107. return (0, _builder.default)("TSLiteralType", ...arguments);
  155108. }
  155109. function tsExpressionWithTypeArguments(expression, typeParameters) {
  155110. return (0, _builder.default)("TSExpressionWithTypeArguments", ...arguments);
  155111. }
  155112. function tsInterfaceDeclaration(id, typeParameters, _extends, body) {
  155113. return (0, _builder.default)("TSInterfaceDeclaration", ...arguments);
  155114. }
  155115. function tsInterfaceBody(body) {
  155116. return (0, _builder.default)("TSInterfaceBody", ...arguments);
  155117. }
  155118. function tsTypeAliasDeclaration(id, typeParameters, typeAnnotation2) {
  155119. return (0, _builder.default)("TSTypeAliasDeclaration", ...arguments);
  155120. }
  155121. function tsAsExpression(expression, typeAnnotation2) {
  155122. return (0, _builder.default)("TSAsExpression", ...arguments);
  155123. }
  155124. function tsTypeAssertion(typeAnnotation2, expression) {
  155125. return (0, _builder.default)("TSTypeAssertion", ...arguments);
  155126. }
  155127. function tsEnumDeclaration(id, members) {
  155128. return (0, _builder.default)("TSEnumDeclaration", ...arguments);
  155129. }
  155130. function tsEnumMember(id, initializer) {
  155131. return (0, _builder.default)("TSEnumMember", ...arguments);
  155132. }
  155133. function tsModuleDeclaration(id, body) {
  155134. return (0, _builder.default)("TSModuleDeclaration", ...arguments);
  155135. }
  155136. function tsModuleBlock(body) {
  155137. return (0, _builder.default)("TSModuleBlock", ...arguments);
  155138. }
  155139. function tsImportType(argument, qualifier, typeParameters) {
  155140. return (0, _builder.default)("TSImportType", ...arguments);
  155141. }
  155142. function tsImportEqualsDeclaration(id, moduleReference) {
  155143. return (0, _builder.default)("TSImportEqualsDeclaration", ...arguments);
  155144. }
  155145. function tsExternalModuleReference(expression) {
  155146. return (0, _builder.default)("TSExternalModuleReference", ...arguments);
  155147. }
  155148. function tsNonNullExpression(expression) {
  155149. return (0, _builder.default)("TSNonNullExpression", ...arguments);
  155150. }
  155151. function tsExportAssignment(expression) {
  155152. return (0, _builder.default)("TSExportAssignment", ...arguments);
  155153. }
  155154. function tsNamespaceExportDeclaration(id) {
  155155. return (0, _builder.default)("TSNamespaceExportDeclaration", ...arguments);
  155156. }
  155157. function tsTypeAnnotation(typeAnnotation2) {
  155158. return (0, _builder.default)("TSTypeAnnotation", ...arguments);
  155159. }
  155160. function tsTypeParameterInstantiation(params) {
  155161. return (0, _builder.default)("TSTypeParameterInstantiation", ...arguments);
  155162. }
  155163. function tsTypeParameterDeclaration(params) {
  155164. return (0, _builder.default)("TSTypeParameterDeclaration", ...arguments);
  155165. }
  155166. function tsTypeParameter(constraint, _default, name2) {
  155167. return (0, _builder.default)("TSTypeParameter", ...arguments);
  155168. }
  155169. function NumberLiteral(...args) {
  155170. console.trace("The node type NumberLiteral has been renamed to NumericLiteral");
  155171. return (0, _builder.default)("NumberLiteral", ...args);
  155172. }
  155173. function RegexLiteral(...args) {
  155174. console.trace("The node type RegexLiteral has been renamed to RegExpLiteral");
  155175. return (0, _builder.default)("RegexLiteral", ...args);
  155176. }
  155177. function RestProperty(...args) {
  155178. console.trace("The node type RestProperty has been renamed to RestElement");
  155179. return (0, _builder.default)("RestProperty", ...args);
  155180. }
  155181. function SpreadProperty(...args) {
  155182. console.trace("The node type SpreadProperty has been renamed to SpreadElement");
  155183. return (0, _builder.default)("SpreadProperty", ...args);
  155184. }
  155185. }
  155186. });
  155187. // node_modules/@babel/traverse/node_modules/@babel/helper-function-name/node_modules/@babel/types/lib/utils/react/cleanJSXElementLiteralChild.js
  155188. var require_cleanJSXElementLiteralChild7 = __commonJS({
  155189. "node_modules/@babel/traverse/node_modules/@babel/helper-function-name/node_modules/@babel/types/lib/utils/react/cleanJSXElementLiteralChild.js"(exports) {
  155190. "use strict";
  155191. Object.defineProperty(exports, "__esModule", {
  155192. value: true
  155193. });
  155194. exports.default = cleanJSXElementLiteralChild;
  155195. var _generated = require_generated32();
  155196. function cleanJSXElementLiteralChild(child, args) {
  155197. const lines = child.value.split(/\r\n|\n|\r/);
  155198. let lastNonEmptyLine = 0;
  155199. for (let i = 0; i < lines.length; i++) {
  155200. if (lines[i].match(/[^ \t]/)) {
  155201. lastNonEmptyLine = i;
  155202. }
  155203. }
  155204. let str = "";
  155205. for (let i = 0; i < lines.length; i++) {
  155206. const line = lines[i];
  155207. const isFirstLine = i === 0;
  155208. const isLastLine = i === lines.length - 1;
  155209. const isLastNonEmptyLine = i === lastNonEmptyLine;
  155210. let trimmedLine = line.replace(/\t/g, " ");
  155211. if (!isFirstLine) {
  155212. trimmedLine = trimmedLine.replace(/^[ ]+/, "");
  155213. }
  155214. if (!isLastLine) {
  155215. trimmedLine = trimmedLine.replace(/[ ]+$/, "");
  155216. }
  155217. if (trimmedLine) {
  155218. if (!isLastNonEmptyLine) {
  155219. trimmedLine += " ";
  155220. }
  155221. str += trimmedLine;
  155222. }
  155223. }
  155224. if (str)
  155225. args.push((0, _generated.stringLiteral)(str));
  155226. }
  155227. }
  155228. });
  155229. // node_modules/@babel/traverse/node_modules/@babel/helper-function-name/node_modules/@babel/types/lib/builders/react/buildChildren.js
  155230. var require_buildChildren7 = __commonJS({
  155231. "node_modules/@babel/traverse/node_modules/@babel/helper-function-name/node_modules/@babel/types/lib/builders/react/buildChildren.js"(exports) {
  155232. "use strict";
  155233. Object.defineProperty(exports, "__esModule", {
  155234. value: true
  155235. });
  155236. exports.default = buildChildren;
  155237. var _generated = require_generated31();
  155238. var _cleanJSXElementLiteralChild = require_cleanJSXElementLiteralChild7();
  155239. function buildChildren(node) {
  155240. const elements = [];
  155241. for (let i = 0; i < node.children.length; i++) {
  155242. let child = node.children[i];
  155243. if ((0, _generated.isJSXText)(child)) {
  155244. (0, _cleanJSXElementLiteralChild.default)(child, elements);
  155245. continue;
  155246. }
  155247. if ((0, _generated.isJSXExpressionContainer)(child))
  155248. child = child.expression;
  155249. if ((0, _generated.isJSXEmptyExpression)(child))
  155250. continue;
  155251. elements.push(child);
  155252. }
  155253. return elements;
  155254. }
  155255. }
  155256. });
  155257. // node_modules/@babel/traverse/node_modules/@babel/helper-function-name/node_modules/@babel/types/lib/validators/isNode.js
  155258. var require_isNode7 = __commonJS({
  155259. "node_modules/@babel/traverse/node_modules/@babel/helper-function-name/node_modules/@babel/types/lib/validators/isNode.js"(exports) {
  155260. "use strict";
  155261. Object.defineProperty(exports, "__esModule", {
  155262. value: true
  155263. });
  155264. exports.default = isNode;
  155265. var _definitions = require_definitions7();
  155266. function isNode(node) {
  155267. return !!(node && _definitions.VISITOR_KEYS[node.type]);
  155268. }
  155269. }
  155270. });
  155271. // node_modules/@babel/traverse/node_modules/@babel/helper-function-name/node_modules/@babel/types/lib/asserts/assertNode.js
  155272. var require_assertNode7 = __commonJS({
  155273. "node_modules/@babel/traverse/node_modules/@babel/helper-function-name/node_modules/@babel/types/lib/asserts/assertNode.js"(exports) {
  155274. "use strict";
  155275. Object.defineProperty(exports, "__esModule", {
  155276. value: true
  155277. });
  155278. exports.default = assertNode2;
  155279. var _isNode = require_isNode7();
  155280. function assertNode2(node) {
  155281. if (!(0, _isNode.default)(node)) {
  155282. var _node$type;
  155283. const type = (_node$type = node == null ? void 0 : node.type) != null ? _node$type : JSON.stringify(node);
  155284. throw new TypeError(`Not a valid node of type "${type}"`);
  155285. }
  155286. }
  155287. }
  155288. });
  155289. // node_modules/@babel/traverse/node_modules/@babel/helper-function-name/node_modules/@babel/types/lib/asserts/generated/index.js
  155290. var require_generated33 = __commonJS({
  155291. "node_modules/@babel/traverse/node_modules/@babel/helper-function-name/node_modules/@babel/types/lib/asserts/generated/index.js"(exports) {
  155292. "use strict";
  155293. Object.defineProperty(exports, "__esModule", {
  155294. value: true
  155295. });
  155296. exports.assertArrayExpression = assertArrayExpression;
  155297. exports.assertAssignmentExpression = assertAssignmentExpression;
  155298. exports.assertBinaryExpression = assertBinaryExpression;
  155299. exports.assertInterpreterDirective = assertInterpreterDirective;
  155300. exports.assertDirective = assertDirective;
  155301. exports.assertDirectiveLiteral = assertDirectiveLiteral;
  155302. exports.assertBlockStatement = assertBlockStatement;
  155303. exports.assertBreakStatement = assertBreakStatement;
  155304. exports.assertCallExpression = assertCallExpression;
  155305. exports.assertCatchClause = assertCatchClause;
  155306. exports.assertConditionalExpression = assertConditionalExpression;
  155307. exports.assertContinueStatement = assertContinueStatement;
  155308. exports.assertDebuggerStatement = assertDebuggerStatement;
  155309. exports.assertDoWhileStatement = assertDoWhileStatement;
  155310. exports.assertEmptyStatement = assertEmptyStatement;
  155311. exports.assertExpressionStatement = assertExpressionStatement;
  155312. exports.assertFile = assertFile;
  155313. exports.assertForInStatement = assertForInStatement;
  155314. exports.assertForStatement = assertForStatement;
  155315. exports.assertFunctionDeclaration = assertFunctionDeclaration;
  155316. exports.assertFunctionExpression = assertFunctionExpression;
  155317. exports.assertIdentifier = assertIdentifier;
  155318. exports.assertIfStatement = assertIfStatement;
  155319. exports.assertLabeledStatement = assertLabeledStatement;
  155320. exports.assertStringLiteral = assertStringLiteral;
  155321. exports.assertNumericLiteral = assertNumericLiteral;
  155322. exports.assertNullLiteral = assertNullLiteral;
  155323. exports.assertBooleanLiteral = assertBooleanLiteral;
  155324. exports.assertRegExpLiteral = assertRegExpLiteral;
  155325. exports.assertLogicalExpression = assertLogicalExpression;
  155326. exports.assertMemberExpression = assertMemberExpression;
  155327. exports.assertNewExpression = assertNewExpression;
  155328. exports.assertProgram = assertProgram;
  155329. exports.assertObjectExpression = assertObjectExpression;
  155330. exports.assertObjectMethod = assertObjectMethod;
  155331. exports.assertObjectProperty = assertObjectProperty;
  155332. exports.assertRestElement = assertRestElement;
  155333. exports.assertReturnStatement = assertReturnStatement;
  155334. exports.assertSequenceExpression = assertSequenceExpression;
  155335. exports.assertParenthesizedExpression = assertParenthesizedExpression;
  155336. exports.assertSwitchCase = assertSwitchCase;
  155337. exports.assertSwitchStatement = assertSwitchStatement;
  155338. exports.assertThisExpression = assertThisExpression;
  155339. exports.assertThrowStatement = assertThrowStatement;
  155340. exports.assertTryStatement = assertTryStatement;
  155341. exports.assertUnaryExpression = assertUnaryExpression;
  155342. exports.assertUpdateExpression = assertUpdateExpression;
  155343. exports.assertVariableDeclaration = assertVariableDeclaration;
  155344. exports.assertVariableDeclarator = assertVariableDeclarator;
  155345. exports.assertWhileStatement = assertWhileStatement;
  155346. exports.assertWithStatement = assertWithStatement;
  155347. exports.assertAssignmentPattern = assertAssignmentPattern;
  155348. exports.assertArrayPattern = assertArrayPattern;
  155349. exports.assertArrowFunctionExpression = assertArrowFunctionExpression;
  155350. exports.assertClassBody = assertClassBody;
  155351. exports.assertClassExpression = assertClassExpression;
  155352. exports.assertClassDeclaration = assertClassDeclaration;
  155353. exports.assertExportAllDeclaration = assertExportAllDeclaration;
  155354. exports.assertExportDefaultDeclaration = assertExportDefaultDeclaration;
  155355. exports.assertExportNamedDeclaration = assertExportNamedDeclaration;
  155356. exports.assertExportSpecifier = assertExportSpecifier;
  155357. exports.assertForOfStatement = assertForOfStatement;
  155358. exports.assertImportDeclaration = assertImportDeclaration;
  155359. exports.assertImportDefaultSpecifier = assertImportDefaultSpecifier;
  155360. exports.assertImportNamespaceSpecifier = assertImportNamespaceSpecifier;
  155361. exports.assertImportSpecifier = assertImportSpecifier;
  155362. exports.assertMetaProperty = assertMetaProperty;
  155363. exports.assertClassMethod = assertClassMethod;
  155364. exports.assertObjectPattern = assertObjectPattern;
  155365. exports.assertSpreadElement = assertSpreadElement;
  155366. exports.assertSuper = assertSuper;
  155367. exports.assertTaggedTemplateExpression = assertTaggedTemplateExpression;
  155368. exports.assertTemplateElement = assertTemplateElement;
  155369. exports.assertTemplateLiteral = assertTemplateLiteral;
  155370. exports.assertYieldExpression = assertYieldExpression;
  155371. exports.assertAwaitExpression = assertAwaitExpression;
  155372. exports.assertImport = assertImport;
  155373. exports.assertBigIntLiteral = assertBigIntLiteral;
  155374. exports.assertExportNamespaceSpecifier = assertExportNamespaceSpecifier;
  155375. exports.assertOptionalMemberExpression = assertOptionalMemberExpression;
  155376. exports.assertOptionalCallExpression = assertOptionalCallExpression;
  155377. exports.assertAnyTypeAnnotation = assertAnyTypeAnnotation;
  155378. exports.assertArrayTypeAnnotation = assertArrayTypeAnnotation;
  155379. exports.assertBooleanTypeAnnotation = assertBooleanTypeAnnotation;
  155380. exports.assertBooleanLiteralTypeAnnotation = assertBooleanLiteralTypeAnnotation;
  155381. exports.assertNullLiteralTypeAnnotation = assertNullLiteralTypeAnnotation;
  155382. exports.assertClassImplements = assertClassImplements;
  155383. exports.assertDeclareClass = assertDeclareClass;
  155384. exports.assertDeclareFunction = assertDeclareFunction;
  155385. exports.assertDeclareInterface = assertDeclareInterface;
  155386. exports.assertDeclareModule = assertDeclareModule;
  155387. exports.assertDeclareModuleExports = assertDeclareModuleExports;
  155388. exports.assertDeclareTypeAlias = assertDeclareTypeAlias;
  155389. exports.assertDeclareOpaqueType = assertDeclareOpaqueType;
  155390. exports.assertDeclareVariable = assertDeclareVariable;
  155391. exports.assertDeclareExportDeclaration = assertDeclareExportDeclaration;
  155392. exports.assertDeclareExportAllDeclaration = assertDeclareExportAllDeclaration;
  155393. exports.assertDeclaredPredicate = assertDeclaredPredicate;
  155394. exports.assertExistsTypeAnnotation = assertExistsTypeAnnotation;
  155395. exports.assertFunctionTypeAnnotation = assertFunctionTypeAnnotation;
  155396. exports.assertFunctionTypeParam = assertFunctionTypeParam;
  155397. exports.assertGenericTypeAnnotation = assertGenericTypeAnnotation;
  155398. exports.assertInferredPredicate = assertInferredPredicate;
  155399. exports.assertInterfaceExtends = assertInterfaceExtends;
  155400. exports.assertInterfaceDeclaration = assertInterfaceDeclaration;
  155401. exports.assertInterfaceTypeAnnotation = assertInterfaceTypeAnnotation;
  155402. exports.assertIntersectionTypeAnnotation = assertIntersectionTypeAnnotation;
  155403. exports.assertMixedTypeAnnotation = assertMixedTypeAnnotation;
  155404. exports.assertEmptyTypeAnnotation = assertEmptyTypeAnnotation;
  155405. exports.assertNullableTypeAnnotation = assertNullableTypeAnnotation;
  155406. exports.assertNumberLiteralTypeAnnotation = assertNumberLiteralTypeAnnotation;
  155407. exports.assertNumberTypeAnnotation = assertNumberTypeAnnotation;
  155408. exports.assertObjectTypeAnnotation = assertObjectTypeAnnotation;
  155409. exports.assertObjectTypeInternalSlot = assertObjectTypeInternalSlot;
  155410. exports.assertObjectTypeCallProperty = assertObjectTypeCallProperty;
  155411. exports.assertObjectTypeIndexer = assertObjectTypeIndexer;
  155412. exports.assertObjectTypeProperty = assertObjectTypeProperty;
  155413. exports.assertObjectTypeSpreadProperty = assertObjectTypeSpreadProperty;
  155414. exports.assertOpaqueType = assertOpaqueType;
  155415. exports.assertQualifiedTypeIdentifier = assertQualifiedTypeIdentifier;
  155416. exports.assertStringLiteralTypeAnnotation = assertStringLiteralTypeAnnotation;
  155417. exports.assertStringTypeAnnotation = assertStringTypeAnnotation;
  155418. exports.assertSymbolTypeAnnotation = assertSymbolTypeAnnotation;
  155419. exports.assertThisTypeAnnotation = assertThisTypeAnnotation;
  155420. exports.assertTupleTypeAnnotation = assertTupleTypeAnnotation;
  155421. exports.assertTypeofTypeAnnotation = assertTypeofTypeAnnotation;
  155422. exports.assertTypeAlias = assertTypeAlias;
  155423. exports.assertTypeAnnotation = assertTypeAnnotation;
  155424. exports.assertTypeCastExpression = assertTypeCastExpression;
  155425. exports.assertTypeParameter = assertTypeParameter;
  155426. exports.assertTypeParameterDeclaration = assertTypeParameterDeclaration;
  155427. exports.assertTypeParameterInstantiation = assertTypeParameterInstantiation;
  155428. exports.assertUnionTypeAnnotation = assertUnionTypeAnnotation;
  155429. exports.assertVariance = assertVariance;
  155430. exports.assertVoidTypeAnnotation = assertVoidTypeAnnotation;
  155431. exports.assertEnumDeclaration = assertEnumDeclaration;
  155432. exports.assertEnumBooleanBody = assertEnumBooleanBody;
  155433. exports.assertEnumNumberBody = assertEnumNumberBody;
  155434. exports.assertEnumStringBody = assertEnumStringBody;
  155435. exports.assertEnumSymbolBody = assertEnumSymbolBody;
  155436. exports.assertEnumBooleanMember = assertEnumBooleanMember;
  155437. exports.assertEnumNumberMember = assertEnumNumberMember;
  155438. exports.assertEnumStringMember = assertEnumStringMember;
  155439. exports.assertEnumDefaultedMember = assertEnumDefaultedMember;
  155440. exports.assertIndexedAccessType = assertIndexedAccessType;
  155441. exports.assertOptionalIndexedAccessType = assertOptionalIndexedAccessType;
  155442. exports.assertJSXAttribute = assertJSXAttribute;
  155443. exports.assertJSXClosingElement = assertJSXClosingElement;
  155444. exports.assertJSXElement = assertJSXElement;
  155445. exports.assertJSXEmptyExpression = assertJSXEmptyExpression;
  155446. exports.assertJSXExpressionContainer = assertJSXExpressionContainer;
  155447. exports.assertJSXSpreadChild = assertJSXSpreadChild;
  155448. exports.assertJSXIdentifier = assertJSXIdentifier;
  155449. exports.assertJSXMemberExpression = assertJSXMemberExpression;
  155450. exports.assertJSXNamespacedName = assertJSXNamespacedName;
  155451. exports.assertJSXOpeningElement = assertJSXOpeningElement;
  155452. exports.assertJSXSpreadAttribute = assertJSXSpreadAttribute;
  155453. exports.assertJSXText = assertJSXText;
  155454. exports.assertJSXFragment = assertJSXFragment;
  155455. exports.assertJSXOpeningFragment = assertJSXOpeningFragment;
  155456. exports.assertJSXClosingFragment = assertJSXClosingFragment;
  155457. exports.assertNoop = assertNoop;
  155458. exports.assertPlaceholder = assertPlaceholder;
  155459. exports.assertV8IntrinsicIdentifier = assertV8IntrinsicIdentifier;
  155460. exports.assertArgumentPlaceholder = assertArgumentPlaceholder;
  155461. exports.assertBindExpression = assertBindExpression;
  155462. exports.assertClassProperty = assertClassProperty;
  155463. exports.assertPipelineTopicExpression = assertPipelineTopicExpression;
  155464. exports.assertPipelineBareFunction = assertPipelineBareFunction;
  155465. exports.assertPipelinePrimaryTopicReference = assertPipelinePrimaryTopicReference;
  155466. exports.assertClassPrivateProperty = assertClassPrivateProperty;
  155467. exports.assertClassPrivateMethod = assertClassPrivateMethod;
  155468. exports.assertImportAttribute = assertImportAttribute;
  155469. exports.assertDecorator = assertDecorator;
  155470. exports.assertDoExpression = assertDoExpression;
  155471. exports.assertExportDefaultSpecifier = assertExportDefaultSpecifier;
  155472. exports.assertPrivateName = assertPrivateName;
  155473. exports.assertRecordExpression = assertRecordExpression;
  155474. exports.assertTupleExpression = assertTupleExpression;
  155475. exports.assertDecimalLiteral = assertDecimalLiteral;
  155476. exports.assertStaticBlock = assertStaticBlock;
  155477. exports.assertModuleExpression = assertModuleExpression;
  155478. exports.assertTSParameterProperty = assertTSParameterProperty;
  155479. exports.assertTSDeclareFunction = assertTSDeclareFunction;
  155480. exports.assertTSDeclareMethod = assertTSDeclareMethod;
  155481. exports.assertTSQualifiedName = assertTSQualifiedName;
  155482. exports.assertTSCallSignatureDeclaration = assertTSCallSignatureDeclaration;
  155483. exports.assertTSConstructSignatureDeclaration = assertTSConstructSignatureDeclaration;
  155484. exports.assertTSPropertySignature = assertTSPropertySignature;
  155485. exports.assertTSMethodSignature = assertTSMethodSignature;
  155486. exports.assertTSIndexSignature = assertTSIndexSignature;
  155487. exports.assertTSAnyKeyword = assertTSAnyKeyword;
  155488. exports.assertTSBooleanKeyword = assertTSBooleanKeyword;
  155489. exports.assertTSBigIntKeyword = assertTSBigIntKeyword;
  155490. exports.assertTSIntrinsicKeyword = assertTSIntrinsicKeyword;
  155491. exports.assertTSNeverKeyword = assertTSNeverKeyword;
  155492. exports.assertTSNullKeyword = assertTSNullKeyword;
  155493. exports.assertTSNumberKeyword = assertTSNumberKeyword;
  155494. exports.assertTSObjectKeyword = assertTSObjectKeyword;
  155495. exports.assertTSStringKeyword = assertTSStringKeyword;
  155496. exports.assertTSSymbolKeyword = assertTSSymbolKeyword;
  155497. exports.assertTSUndefinedKeyword = assertTSUndefinedKeyword;
  155498. exports.assertTSUnknownKeyword = assertTSUnknownKeyword;
  155499. exports.assertTSVoidKeyword = assertTSVoidKeyword;
  155500. exports.assertTSThisType = assertTSThisType;
  155501. exports.assertTSFunctionType = assertTSFunctionType;
  155502. exports.assertTSConstructorType = assertTSConstructorType;
  155503. exports.assertTSTypeReference = assertTSTypeReference;
  155504. exports.assertTSTypePredicate = assertTSTypePredicate;
  155505. exports.assertTSTypeQuery = assertTSTypeQuery;
  155506. exports.assertTSTypeLiteral = assertTSTypeLiteral;
  155507. exports.assertTSArrayType = assertTSArrayType;
  155508. exports.assertTSTupleType = assertTSTupleType;
  155509. exports.assertTSOptionalType = assertTSOptionalType;
  155510. exports.assertTSRestType = assertTSRestType;
  155511. exports.assertTSNamedTupleMember = assertTSNamedTupleMember;
  155512. exports.assertTSUnionType = assertTSUnionType;
  155513. exports.assertTSIntersectionType = assertTSIntersectionType;
  155514. exports.assertTSConditionalType = assertTSConditionalType;
  155515. exports.assertTSInferType = assertTSInferType;
  155516. exports.assertTSParenthesizedType = assertTSParenthesizedType;
  155517. exports.assertTSTypeOperator = assertTSTypeOperator;
  155518. exports.assertTSIndexedAccessType = assertTSIndexedAccessType;
  155519. exports.assertTSMappedType = assertTSMappedType;
  155520. exports.assertTSLiteralType = assertTSLiteralType;
  155521. exports.assertTSExpressionWithTypeArguments = assertTSExpressionWithTypeArguments;
  155522. exports.assertTSInterfaceDeclaration = assertTSInterfaceDeclaration;
  155523. exports.assertTSInterfaceBody = assertTSInterfaceBody;
  155524. exports.assertTSTypeAliasDeclaration = assertTSTypeAliasDeclaration;
  155525. exports.assertTSAsExpression = assertTSAsExpression;
  155526. exports.assertTSTypeAssertion = assertTSTypeAssertion;
  155527. exports.assertTSEnumDeclaration = assertTSEnumDeclaration;
  155528. exports.assertTSEnumMember = assertTSEnumMember;
  155529. exports.assertTSModuleDeclaration = assertTSModuleDeclaration;
  155530. exports.assertTSModuleBlock = assertTSModuleBlock;
  155531. exports.assertTSImportType = assertTSImportType;
  155532. exports.assertTSImportEqualsDeclaration = assertTSImportEqualsDeclaration;
  155533. exports.assertTSExternalModuleReference = assertTSExternalModuleReference;
  155534. exports.assertTSNonNullExpression = assertTSNonNullExpression;
  155535. exports.assertTSExportAssignment = assertTSExportAssignment;
  155536. exports.assertTSNamespaceExportDeclaration = assertTSNamespaceExportDeclaration;
  155537. exports.assertTSTypeAnnotation = assertTSTypeAnnotation;
  155538. exports.assertTSTypeParameterInstantiation = assertTSTypeParameterInstantiation;
  155539. exports.assertTSTypeParameterDeclaration = assertTSTypeParameterDeclaration;
  155540. exports.assertTSTypeParameter = assertTSTypeParameter;
  155541. exports.assertExpression = assertExpression;
  155542. exports.assertBinary = assertBinary;
  155543. exports.assertScopable = assertScopable;
  155544. exports.assertBlockParent = assertBlockParent;
  155545. exports.assertBlock = assertBlock;
  155546. exports.assertStatement = assertStatement;
  155547. exports.assertTerminatorless = assertTerminatorless;
  155548. exports.assertCompletionStatement = assertCompletionStatement;
  155549. exports.assertConditional = assertConditional;
  155550. exports.assertLoop = assertLoop;
  155551. exports.assertWhile = assertWhile;
  155552. exports.assertExpressionWrapper = assertExpressionWrapper;
  155553. exports.assertFor = assertFor;
  155554. exports.assertForXStatement = assertForXStatement;
  155555. exports.assertFunction = assertFunction;
  155556. exports.assertFunctionParent = assertFunctionParent;
  155557. exports.assertPureish = assertPureish;
  155558. exports.assertDeclaration = assertDeclaration;
  155559. exports.assertPatternLike = assertPatternLike;
  155560. exports.assertLVal = assertLVal;
  155561. exports.assertTSEntityName = assertTSEntityName;
  155562. exports.assertLiteral = assertLiteral;
  155563. exports.assertImmutable = assertImmutable;
  155564. exports.assertUserWhitespacable = assertUserWhitespacable;
  155565. exports.assertMethod = assertMethod;
  155566. exports.assertObjectMember = assertObjectMember;
  155567. exports.assertProperty = assertProperty;
  155568. exports.assertUnaryLike = assertUnaryLike;
  155569. exports.assertPattern = assertPattern;
  155570. exports.assertClass = assertClass;
  155571. exports.assertModuleDeclaration = assertModuleDeclaration;
  155572. exports.assertExportDeclaration = assertExportDeclaration;
  155573. exports.assertModuleSpecifier = assertModuleSpecifier;
  155574. exports.assertFlow = assertFlow;
  155575. exports.assertFlowType = assertFlowType;
  155576. exports.assertFlowBaseAnnotation = assertFlowBaseAnnotation;
  155577. exports.assertFlowDeclaration = assertFlowDeclaration;
  155578. exports.assertFlowPredicate = assertFlowPredicate;
  155579. exports.assertEnumBody = assertEnumBody;
  155580. exports.assertEnumMember = assertEnumMember;
  155581. exports.assertJSX = assertJSX;
  155582. exports.assertPrivate = assertPrivate;
  155583. exports.assertTSTypeElement = assertTSTypeElement;
  155584. exports.assertTSType = assertTSType;
  155585. exports.assertTSBaseType = assertTSBaseType;
  155586. exports.assertNumberLiteral = assertNumberLiteral;
  155587. exports.assertRegexLiteral = assertRegexLiteral;
  155588. exports.assertRestProperty = assertRestProperty;
  155589. exports.assertSpreadProperty = assertSpreadProperty;
  155590. var _is = require_is7();
  155591. function assert(type, node, opts) {
  155592. if (!(0, _is.default)(type, node, opts)) {
  155593. throw new Error(`Expected type "${type}" with option ${JSON.stringify(opts)}, but instead got "${node.type}".`);
  155594. }
  155595. }
  155596. function assertArrayExpression(node, opts) {
  155597. assert("ArrayExpression", node, opts);
  155598. }
  155599. function assertAssignmentExpression(node, opts) {
  155600. assert("AssignmentExpression", node, opts);
  155601. }
  155602. function assertBinaryExpression(node, opts) {
  155603. assert("BinaryExpression", node, opts);
  155604. }
  155605. function assertInterpreterDirective(node, opts) {
  155606. assert("InterpreterDirective", node, opts);
  155607. }
  155608. function assertDirective(node, opts) {
  155609. assert("Directive", node, opts);
  155610. }
  155611. function assertDirectiveLiteral(node, opts) {
  155612. assert("DirectiveLiteral", node, opts);
  155613. }
  155614. function assertBlockStatement(node, opts) {
  155615. assert("BlockStatement", node, opts);
  155616. }
  155617. function assertBreakStatement(node, opts) {
  155618. assert("BreakStatement", node, opts);
  155619. }
  155620. function assertCallExpression(node, opts) {
  155621. assert("CallExpression", node, opts);
  155622. }
  155623. function assertCatchClause(node, opts) {
  155624. assert("CatchClause", node, opts);
  155625. }
  155626. function assertConditionalExpression(node, opts) {
  155627. assert("ConditionalExpression", node, opts);
  155628. }
  155629. function assertContinueStatement(node, opts) {
  155630. assert("ContinueStatement", node, opts);
  155631. }
  155632. function assertDebuggerStatement(node, opts) {
  155633. assert("DebuggerStatement", node, opts);
  155634. }
  155635. function assertDoWhileStatement(node, opts) {
  155636. assert("DoWhileStatement", node, opts);
  155637. }
  155638. function assertEmptyStatement(node, opts) {
  155639. assert("EmptyStatement", node, opts);
  155640. }
  155641. function assertExpressionStatement(node, opts) {
  155642. assert("ExpressionStatement", node, opts);
  155643. }
  155644. function assertFile(node, opts) {
  155645. assert("File", node, opts);
  155646. }
  155647. function assertForInStatement(node, opts) {
  155648. assert("ForInStatement", node, opts);
  155649. }
  155650. function assertForStatement(node, opts) {
  155651. assert("ForStatement", node, opts);
  155652. }
  155653. function assertFunctionDeclaration(node, opts) {
  155654. assert("FunctionDeclaration", node, opts);
  155655. }
  155656. function assertFunctionExpression(node, opts) {
  155657. assert("FunctionExpression", node, opts);
  155658. }
  155659. function assertIdentifier(node, opts) {
  155660. assert("Identifier", node, opts);
  155661. }
  155662. function assertIfStatement(node, opts) {
  155663. assert("IfStatement", node, opts);
  155664. }
  155665. function assertLabeledStatement(node, opts) {
  155666. assert("LabeledStatement", node, opts);
  155667. }
  155668. function assertStringLiteral(node, opts) {
  155669. assert("StringLiteral", node, opts);
  155670. }
  155671. function assertNumericLiteral(node, opts) {
  155672. assert("NumericLiteral", node, opts);
  155673. }
  155674. function assertNullLiteral(node, opts) {
  155675. assert("NullLiteral", node, opts);
  155676. }
  155677. function assertBooleanLiteral(node, opts) {
  155678. assert("BooleanLiteral", node, opts);
  155679. }
  155680. function assertRegExpLiteral(node, opts) {
  155681. assert("RegExpLiteral", node, opts);
  155682. }
  155683. function assertLogicalExpression(node, opts) {
  155684. assert("LogicalExpression", node, opts);
  155685. }
  155686. function assertMemberExpression(node, opts) {
  155687. assert("MemberExpression", node, opts);
  155688. }
  155689. function assertNewExpression(node, opts) {
  155690. assert("NewExpression", node, opts);
  155691. }
  155692. function assertProgram(node, opts) {
  155693. assert("Program", node, opts);
  155694. }
  155695. function assertObjectExpression(node, opts) {
  155696. assert("ObjectExpression", node, opts);
  155697. }
  155698. function assertObjectMethod(node, opts) {
  155699. assert("ObjectMethod", node, opts);
  155700. }
  155701. function assertObjectProperty(node, opts) {
  155702. assert("ObjectProperty", node, opts);
  155703. }
  155704. function assertRestElement(node, opts) {
  155705. assert("RestElement", node, opts);
  155706. }
  155707. function assertReturnStatement(node, opts) {
  155708. assert("ReturnStatement", node, opts);
  155709. }
  155710. function assertSequenceExpression(node, opts) {
  155711. assert("SequenceExpression", node, opts);
  155712. }
  155713. function assertParenthesizedExpression(node, opts) {
  155714. assert("ParenthesizedExpression", node, opts);
  155715. }
  155716. function assertSwitchCase(node, opts) {
  155717. assert("SwitchCase", node, opts);
  155718. }
  155719. function assertSwitchStatement(node, opts) {
  155720. assert("SwitchStatement", node, opts);
  155721. }
  155722. function assertThisExpression(node, opts) {
  155723. assert("ThisExpression", node, opts);
  155724. }
  155725. function assertThrowStatement(node, opts) {
  155726. assert("ThrowStatement", node, opts);
  155727. }
  155728. function assertTryStatement(node, opts) {
  155729. assert("TryStatement", node, opts);
  155730. }
  155731. function assertUnaryExpression(node, opts) {
  155732. assert("UnaryExpression", node, opts);
  155733. }
  155734. function assertUpdateExpression(node, opts) {
  155735. assert("UpdateExpression", node, opts);
  155736. }
  155737. function assertVariableDeclaration(node, opts) {
  155738. assert("VariableDeclaration", node, opts);
  155739. }
  155740. function assertVariableDeclarator(node, opts) {
  155741. assert("VariableDeclarator", node, opts);
  155742. }
  155743. function assertWhileStatement(node, opts) {
  155744. assert("WhileStatement", node, opts);
  155745. }
  155746. function assertWithStatement(node, opts) {
  155747. assert("WithStatement", node, opts);
  155748. }
  155749. function assertAssignmentPattern(node, opts) {
  155750. assert("AssignmentPattern", node, opts);
  155751. }
  155752. function assertArrayPattern(node, opts) {
  155753. assert("ArrayPattern", node, opts);
  155754. }
  155755. function assertArrowFunctionExpression(node, opts) {
  155756. assert("ArrowFunctionExpression", node, opts);
  155757. }
  155758. function assertClassBody(node, opts) {
  155759. assert("ClassBody", node, opts);
  155760. }
  155761. function assertClassExpression(node, opts) {
  155762. assert("ClassExpression", node, opts);
  155763. }
  155764. function assertClassDeclaration(node, opts) {
  155765. assert("ClassDeclaration", node, opts);
  155766. }
  155767. function assertExportAllDeclaration(node, opts) {
  155768. assert("ExportAllDeclaration", node, opts);
  155769. }
  155770. function assertExportDefaultDeclaration(node, opts) {
  155771. assert("ExportDefaultDeclaration", node, opts);
  155772. }
  155773. function assertExportNamedDeclaration(node, opts) {
  155774. assert("ExportNamedDeclaration", node, opts);
  155775. }
  155776. function assertExportSpecifier(node, opts) {
  155777. assert("ExportSpecifier", node, opts);
  155778. }
  155779. function assertForOfStatement(node, opts) {
  155780. assert("ForOfStatement", node, opts);
  155781. }
  155782. function assertImportDeclaration(node, opts) {
  155783. assert("ImportDeclaration", node, opts);
  155784. }
  155785. function assertImportDefaultSpecifier(node, opts) {
  155786. assert("ImportDefaultSpecifier", node, opts);
  155787. }
  155788. function assertImportNamespaceSpecifier(node, opts) {
  155789. assert("ImportNamespaceSpecifier", node, opts);
  155790. }
  155791. function assertImportSpecifier(node, opts) {
  155792. assert("ImportSpecifier", node, opts);
  155793. }
  155794. function assertMetaProperty(node, opts) {
  155795. assert("MetaProperty", node, opts);
  155796. }
  155797. function assertClassMethod(node, opts) {
  155798. assert("ClassMethod", node, opts);
  155799. }
  155800. function assertObjectPattern(node, opts) {
  155801. assert("ObjectPattern", node, opts);
  155802. }
  155803. function assertSpreadElement(node, opts) {
  155804. assert("SpreadElement", node, opts);
  155805. }
  155806. function assertSuper(node, opts) {
  155807. assert("Super", node, opts);
  155808. }
  155809. function assertTaggedTemplateExpression(node, opts) {
  155810. assert("TaggedTemplateExpression", node, opts);
  155811. }
  155812. function assertTemplateElement(node, opts) {
  155813. assert("TemplateElement", node, opts);
  155814. }
  155815. function assertTemplateLiteral(node, opts) {
  155816. assert("TemplateLiteral", node, opts);
  155817. }
  155818. function assertYieldExpression(node, opts) {
  155819. assert("YieldExpression", node, opts);
  155820. }
  155821. function assertAwaitExpression(node, opts) {
  155822. assert("AwaitExpression", node, opts);
  155823. }
  155824. function assertImport(node, opts) {
  155825. assert("Import", node, opts);
  155826. }
  155827. function assertBigIntLiteral(node, opts) {
  155828. assert("BigIntLiteral", node, opts);
  155829. }
  155830. function assertExportNamespaceSpecifier(node, opts) {
  155831. assert("ExportNamespaceSpecifier", node, opts);
  155832. }
  155833. function assertOptionalMemberExpression(node, opts) {
  155834. assert("OptionalMemberExpression", node, opts);
  155835. }
  155836. function assertOptionalCallExpression(node, opts) {
  155837. assert("OptionalCallExpression", node, opts);
  155838. }
  155839. function assertAnyTypeAnnotation(node, opts) {
  155840. assert("AnyTypeAnnotation", node, opts);
  155841. }
  155842. function assertArrayTypeAnnotation(node, opts) {
  155843. assert("ArrayTypeAnnotation", node, opts);
  155844. }
  155845. function assertBooleanTypeAnnotation(node, opts) {
  155846. assert("BooleanTypeAnnotation", node, opts);
  155847. }
  155848. function assertBooleanLiteralTypeAnnotation(node, opts) {
  155849. assert("BooleanLiteralTypeAnnotation", node, opts);
  155850. }
  155851. function assertNullLiteralTypeAnnotation(node, opts) {
  155852. assert("NullLiteralTypeAnnotation", node, opts);
  155853. }
  155854. function assertClassImplements(node, opts) {
  155855. assert("ClassImplements", node, opts);
  155856. }
  155857. function assertDeclareClass(node, opts) {
  155858. assert("DeclareClass", node, opts);
  155859. }
  155860. function assertDeclareFunction(node, opts) {
  155861. assert("DeclareFunction", node, opts);
  155862. }
  155863. function assertDeclareInterface(node, opts) {
  155864. assert("DeclareInterface", node, opts);
  155865. }
  155866. function assertDeclareModule(node, opts) {
  155867. assert("DeclareModule", node, opts);
  155868. }
  155869. function assertDeclareModuleExports(node, opts) {
  155870. assert("DeclareModuleExports", node, opts);
  155871. }
  155872. function assertDeclareTypeAlias(node, opts) {
  155873. assert("DeclareTypeAlias", node, opts);
  155874. }
  155875. function assertDeclareOpaqueType(node, opts) {
  155876. assert("DeclareOpaqueType", node, opts);
  155877. }
  155878. function assertDeclareVariable(node, opts) {
  155879. assert("DeclareVariable", node, opts);
  155880. }
  155881. function assertDeclareExportDeclaration(node, opts) {
  155882. assert("DeclareExportDeclaration", node, opts);
  155883. }
  155884. function assertDeclareExportAllDeclaration(node, opts) {
  155885. assert("DeclareExportAllDeclaration", node, opts);
  155886. }
  155887. function assertDeclaredPredicate(node, opts) {
  155888. assert("DeclaredPredicate", node, opts);
  155889. }
  155890. function assertExistsTypeAnnotation(node, opts) {
  155891. assert("ExistsTypeAnnotation", node, opts);
  155892. }
  155893. function assertFunctionTypeAnnotation(node, opts) {
  155894. assert("FunctionTypeAnnotation", node, opts);
  155895. }
  155896. function assertFunctionTypeParam(node, opts) {
  155897. assert("FunctionTypeParam", node, opts);
  155898. }
  155899. function assertGenericTypeAnnotation(node, opts) {
  155900. assert("GenericTypeAnnotation", node, opts);
  155901. }
  155902. function assertInferredPredicate(node, opts) {
  155903. assert("InferredPredicate", node, opts);
  155904. }
  155905. function assertInterfaceExtends(node, opts) {
  155906. assert("InterfaceExtends", node, opts);
  155907. }
  155908. function assertInterfaceDeclaration(node, opts) {
  155909. assert("InterfaceDeclaration", node, opts);
  155910. }
  155911. function assertInterfaceTypeAnnotation(node, opts) {
  155912. assert("InterfaceTypeAnnotation", node, opts);
  155913. }
  155914. function assertIntersectionTypeAnnotation(node, opts) {
  155915. assert("IntersectionTypeAnnotation", node, opts);
  155916. }
  155917. function assertMixedTypeAnnotation(node, opts) {
  155918. assert("MixedTypeAnnotation", node, opts);
  155919. }
  155920. function assertEmptyTypeAnnotation(node, opts) {
  155921. assert("EmptyTypeAnnotation", node, opts);
  155922. }
  155923. function assertNullableTypeAnnotation(node, opts) {
  155924. assert("NullableTypeAnnotation", node, opts);
  155925. }
  155926. function assertNumberLiteralTypeAnnotation(node, opts) {
  155927. assert("NumberLiteralTypeAnnotation", node, opts);
  155928. }
  155929. function assertNumberTypeAnnotation(node, opts) {
  155930. assert("NumberTypeAnnotation", node, opts);
  155931. }
  155932. function assertObjectTypeAnnotation(node, opts) {
  155933. assert("ObjectTypeAnnotation", node, opts);
  155934. }
  155935. function assertObjectTypeInternalSlot(node, opts) {
  155936. assert("ObjectTypeInternalSlot", node, opts);
  155937. }
  155938. function assertObjectTypeCallProperty(node, opts) {
  155939. assert("ObjectTypeCallProperty", node, opts);
  155940. }
  155941. function assertObjectTypeIndexer(node, opts) {
  155942. assert("ObjectTypeIndexer", node, opts);
  155943. }
  155944. function assertObjectTypeProperty(node, opts) {
  155945. assert("ObjectTypeProperty", node, opts);
  155946. }
  155947. function assertObjectTypeSpreadProperty(node, opts) {
  155948. assert("ObjectTypeSpreadProperty", node, opts);
  155949. }
  155950. function assertOpaqueType(node, opts) {
  155951. assert("OpaqueType", node, opts);
  155952. }
  155953. function assertQualifiedTypeIdentifier(node, opts) {
  155954. assert("QualifiedTypeIdentifier", node, opts);
  155955. }
  155956. function assertStringLiteralTypeAnnotation(node, opts) {
  155957. assert("StringLiteralTypeAnnotation", node, opts);
  155958. }
  155959. function assertStringTypeAnnotation(node, opts) {
  155960. assert("StringTypeAnnotation", node, opts);
  155961. }
  155962. function assertSymbolTypeAnnotation(node, opts) {
  155963. assert("SymbolTypeAnnotation", node, opts);
  155964. }
  155965. function assertThisTypeAnnotation(node, opts) {
  155966. assert("ThisTypeAnnotation", node, opts);
  155967. }
  155968. function assertTupleTypeAnnotation(node, opts) {
  155969. assert("TupleTypeAnnotation", node, opts);
  155970. }
  155971. function assertTypeofTypeAnnotation(node, opts) {
  155972. assert("TypeofTypeAnnotation", node, opts);
  155973. }
  155974. function assertTypeAlias(node, opts) {
  155975. assert("TypeAlias", node, opts);
  155976. }
  155977. function assertTypeAnnotation(node, opts) {
  155978. assert("TypeAnnotation", node, opts);
  155979. }
  155980. function assertTypeCastExpression(node, opts) {
  155981. assert("TypeCastExpression", node, opts);
  155982. }
  155983. function assertTypeParameter(node, opts) {
  155984. assert("TypeParameter", node, opts);
  155985. }
  155986. function assertTypeParameterDeclaration(node, opts) {
  155987. assert("TypeParameterDeclaration", node, opts);
  155988. }
  155989. function assertTypeParameterInstantiation(node, opts) {
  155990. assert("TypeParameterInstantiation", node, opts);
  155991. }
  155992. function assertUnionTypeAnnotation(node, opts) {
  155993. assert("UnionTypeAnnotation", node, opts);
  155994. }
  155995. function assertVariance(node, opts) {
  155996. assert("Variance", node, opts);
  155997. }
  155998. function assertVoidTypeAnnotation(node, opts) {
  155999. assert("VoidTypeAnnotation", node, opts);
  156000. }
  156001. function assertEnumDeclaration(node, opts) {
  156002. assert("EnumDeclaration", node, opts);
  156003. }
  156004. function assertEnumBooleanBody(node, opts) {
  156005. assert("EnumBooleanBody", node, opts);
  156006. }
  156007. function assertEnumNumberBody(node, opts) {
  156008. assert("EnumNumberBody", node, opts);
  156009. }
  156010. function assertEnumStringBody(node, opts) {
  156011. assert("EnumStringBody", node, opts);
  156012. }
  156013. function assertEnumSymbolBody(node, opts) {
  156014. assert("EnumSymbolBody", node, opts);
  156015. }
  156016. function assertEnumBooleanMember(node, opts) {
  156017. assert("EnumBooleanMember", node, opts);
  156018. }
  156019. function assertEnumNumberMember(node, opts) {
  156020. assert("EnumNumberMember", node, opts);
  156021. }
  156022. function assertEnumStringMember(node, opts) {
  156023. assert("EnumStringMember", node, opts);
  156024. }
  156025. function assertEnumDefaultedMember(node, opts) {
  156026. assert("EnumDefaultedMember", node, opts);
  156027. }
  156028. function assertIndexedAccessType(node, opts) {
  156029. assert("IndexedAccessType", node, opts);
  156030. }
  156031. function assertOptionalIndexedAccessType(node, opts) {
  156032. assert("OptionalIndexedAccessType", node, opts);
  156033. }
  156034. function assertJSXAttribute(node, opts) {
  156035. assert("JSXAttribute", node, opts);
  156036. }
  156037. function assertJSXClosingElement(node, opts) {
  156038. assert("JSXClosingElement", node, opts);
  156039. }
  156040. function assertJSXElement(node, opts) {
  156041. assert("JSXElement", node, opts);
  156042. }
  156043. function assertJSXEmptyExpression(node, opts) {
  156044. assert("JSXEmptyExpression", node, opts);
  156045. }
  156046. function assertJSXExpressionContainer(node, opts) {
  156047. assert("JSXExpressionContainer", node, opts);
  156048. }
  156049. function assertJSXSpreadChild(node, opts) {
  156050. assert("JSXSpreadChild", node, opts);
  156051. }
  156052. function assertJSXIdentifier(node, opts) {
  156053. assert("JSXIdentifier", node, opts);
  156054. }
  156055. function assertJSXMemberExpression(node, opts) {
  156056. assert("JSXMemberExpression", node, opts);
  156057. }
  156058. function assertJSXNamespacedName(node, opts) {
  156059. assert("JSXNamespacedName", node, opts);
  156060. }
  156061. function assertJSXOpeningElement(node, opts) {
  156062. assert("JSXOpeningElement", node, opts);
  156063. }
  156064. function assertJSXSpreadAttribute(node, opts) {
  156065. assert("JSXSpreadAttribute", node, opts);
  156066. }
  156067. function assertJSXText(node, opts) {
  156068. assert("JSXText", node, opts);
  156069. }
  156070. function assertJSXFragment(node, opts) {
  156071. assert("JSXFragment", node, opts);
  156072. }
  156073. function assertJSXOpeningFragment(node, opts) {
  156074. assert("JSXOpeningFragment", node, opts);
  156075. }
  156076. function assertJSXClosingFragment(node, opts) {
  156077. assert("JSXClosingFragment", node, opts);
  156078. }
  156079. function assertNoop(node, opts) {
  156080. assert("Noop", node, opts);
  156081. }
  156082. function assertPlaceholder(node, opts) {
  156083. assert("Placeholder", node, opts);
  156084. }
  156085. function assertV8IntrinsicIdentifier(node, opts) {
  156086. assert("V8IntrinsicIdentifier", node, opts);
  156087. }
  156088. function assertArgumentPlaceholder(node, opts) {
  156089. assert("ArgumentPlaceholder", node, opts);
  156090. }
  156091. function assertBindExpression(node, opts) {
  156092. assert("BindExpression", node, opts);
  156093. }
  156094. function assertClassProperty(node, opts) {
  156095. assert("ClassProperty", node, opts);
  156096. }
  156097. function assertPipelineTopicExpression(node, opts) {
  156098. assert("PipelineTopicExpression", node, opts);
  156099. }
  156100. function assertPipelineBareFunction(node, opts) {
  156101. assert("PipelineBareFunction", node, opts);
  156102. }
  156103. function assertPipelinePrimaryTopicReference(node, opts) {
  156104. assert("PipelinePrimaryTopicReference", node, opts);
  156105. }
  156106. function assertClassPrivateProperty(node, opts) {
  156107. assert("ClassPrivateProperty", node, opts);
  156108. }
  156109. function assertClassPrivateMethod(node, opts) {
  156110. assert("ClassPrivateMethod", node, opts);
  156111. }
  156112. function assertImportAttribute(node, opts) {
  156113. assert("ImportAttribute", node, opts);
  156114. }
  156115. function assertDecorator(node, opts) {
  156116. assert("Decorator", node, opts);
  156117. }
  156118. function assertDoExpression(node, opts) {
  156119. assert("DoExpression", node, opts);
  156120. }
  156121. function assertExportDefaultSpecifier(node, opts) {
  156122. assert("ExportDefaultSpecifier", node, opts);
  156123. }
  156124. function assertPrivateName(node, opts) {
  156125. assert("PrivateName", node, opts);
  156126. }
  156127. function assertRecordExpression(node, opts) {
  156128. assert("RecordExpression", node, opts);
  156129. }
  156130. function assertTupleExpression(node, opts) {
  156131. assert("TupleExpression", node, opts);
  156132. }
  156133. function assertDecimalLiteral(node, opts) {
  156134. assert("DecimalLiteral", node, opts);
  156135. }
  156136. function assertStaticBlock(node, opts) {
  156137. assert("StaticBlock", node, opts);
  156138. }
  156139. function assertModuleExpression(node, opts) {
  156140. assert("ModuleExpression", node, opts);
  156141. }
  156142. function assertTSParameterProperty(node, opts) {
  156143. assert("TSParameterProperty", node, opts);
  156144. }
  156145. function assertTSDeclareFunction(node, opts) {
  156146. assert("TSDeclareFunction", node, opts);
  156147. }
  156148. function assertTSDeclareMethod(node, opts) {
  156149. assert("TSDeclareMethod", node, opts);
  156150. }
  156151. function assertTSQualifiedName(node, opts) {
  156152. assert("TSQualifiedName", node, opts);
  156153. }
  156154. function assertTSCallSignatureDeclaration(node, opts) {
  156155. assert("TSCallSignatureDeclaration", node, opts);
  156156. }
  156157. function assertTSConstructSignatureDeclaration(node, opts) {
  156158. assert("TSConstructSignatureDeclaration", node, opts);
  156159. }
  156160. function assertTSPropertySignature(node, opts) {
  156161. assert("TSPropertySignature", node, opts);
  156162. }
  156163. function assertTSMethodSignature(node, opts) {
  156164. assert("TSMethodSignature", node, opts);
  156165. }
  156166. function assertTSIndexSignature(node, opts) {
  156167. assert("TSIndexSignature", node, opts);
  156168. }
  156169. function assertTSAnyKeyword(node, opts) {
  156170. assert("TSAnyKeyword", node, opts);
  156171. }
  156172. function assertTSBooleanKeyword(node, opts) {
  156173. assert("TSBooleanKeyword", node, opts);
  156174. }
  156175. function assertTSBigIntKeyword(node, opts) {
  156176. assert("TSBigIntKeyword", node, opts);
  156177. }
  156178. function assertTSIntrinsicKeyword(node, opts) {
  156179. assert("TSIntrinsicKeyword", node, opts);
  156180. }
  156181. function assertTSNeverKeyword(node, opts) {
  156182. assert("TSNeverKeyword", node, opts);
  156183. }
  156184. function assertTSNullKeyword(node, opts) {
  156185. assert("TSNullKeyword", node, opts);
  156186. }
  156187. function assertTSNumberKeyword(node, opts) {
  156188. assert("TSNumberKeyword", node, opts);
  156189. }
  156190. function assertTSObjectKeyword(node, opts) {
  156191. assert("TSObjectKeyword", node, opts);
  156192. }
  156193. function assertTSStringKeyword(node, opts) {
  156194. assert("TSStringKeyword", node, opts);
  156195. }
  156196. function assertTSSymbolKeyword(node, opts) {
  156197. assert("TSSymbolKeyword", node, opts);
  156198. }
  156199. function assertTSUndefinedKeyword(node, opts) {
  156200. assert("TSUndefinedKeyword", node, opts);
  156201. }
  156202. function assertTSUnknownKeyword(node, opts) {
  156203. assert("TSUnknownKeyword", node, opts);
  156204. }
  156205. function assertTSVoidKeyword(node, opts) {
  156206. assert("TSVoidKeyword", node, opts);
  156207. }
  156208. function assertTSThisType(node, opts) {
  156209. assert("TSThisType", node, opts);
  156210. }
  156211. function assertTSFunctionType(node, opts) {
  156212. assert("TSFunctionType", node, opts);
  156213. }
  156214. function assertTSConstructorType(node, opts) {
  156215. assert("TSConstructorType", node, opts);
  156216. }
  156217. function assertTSTypeReference(node, opts) {
  156218. assert("TSTypeReference", node, opts);
  156219. }
  156220. function assertTSTypePredicate(node, opts) {
  156221. assert("TSTypePredicate", node, opts);
  156222. }
  156223. function assertTSTypeQuery(node, opts) {
  156224. assert("TSTypeQuery", node, opts);
  156225. }
  156226. function assertTSTypeLiteral(node, opts) {
  156227. assert("TSTypeLiteral", node, opts);
  156228. }
  156229. function assertTSArrayType(node, opts) {
  156230. assert("TSArrayType", node, opts);
  156231. }
  156232. function assertTSTupleType(node, opts) {
  156233. assert("TSTupleType", node, opts);
  156234. }
  156235. function assertTSOptionalType(node, opts) {
  156236. assert("TSOptionalType", node, opts);
  156237. }
  156238. function assertTSRestType(node, opts) {
  156239. assert("TSRestType", node, opts);
  156240. }
  156241. function assertTSNamedTupleMember(node, opts) {
  156242. assert("TSNamedTupleMember", node, opts);
  156243. }
  156244. function assertTSUnionType(node, opts) {
  156245. assert("TSUnionType", node, opts);
  156246. }
  156247. function assertTSIntersectionType(node, opts) {
  156248. assert("TSIntersectionType", node, opts);
  156249. }
  156250. function assertTSConditionalType(node, opts) {
  156251. assert("TSConditionalType", node, opts);
  156252. }
  156253. function assertTSInferType(node, opts) {
  156254. assert("TSInferType", node, opts);
  156255. }
  156256. function assertTSParenthesizedType(node, opts) {
  156257. assert("TSParenthesizedType", node, opts);
  156258. }
  156259. function assertTSTypeOperator(node, opts) {
  156260. assert("TSTypeOperator", node, opts);
  156261. }
  156262. function assertTSIndexedAccessType(node, opts) {
  156263. assert("TSIndexedAccessType", node, opts);
  156264. }
  156265. function assertTSMappedType(node, opts) {
  156266. assert("TSMappedType", node, opts);
  156267. }
  156268. function assertTSLiteralType(node, opts) {
  156269. assert("TSLiteralType", node, opts);
  156270. }
  156271. function assertTSExpressionWithTypeArguments(node, opts) {
  156272. assert("TSExpressionWithTypeArguments", node, opts);
  156273. }
  156274. function assertTSInterfaceDeclaration(node, opts) {
  156275. assert("TSInterfaceDeclaration", node, opts);
  156276. }
  156277. function assertTSInterfaceBody(node, opts) {
  156278. assert("TSInterfaceBody", node, opts);
  156279. }
  156280. function assertTSTypeAliasDeclaration(node, opts) {
  156281. assert("TSTypeAliasDeclaration", node, opts);
  156282. }
  156283. function assertTSAsExpression(node, opts) {
  156284. assert("TSAsExpression", node, opts);
  156285. }
  156286. function assertTSTypeAssertion(node, opts) {
  156287. assert("TSTypeAssertion", node, opts);
  156288. }
  156289. function assertTSEnumDeclaration(node, opts) {
  156290. assert("TSEnumDeclaration", node, opts);
  156291. }
  156292. function assertTSEnumMember(node, opts) {
  156293. assert("TSEnumMember", node, opts);
  156294. }
  156295. function assertTSModuleDeclaration(node, opts) {
  156296. assert("TSModuleDeclaration", node, opts);
  156297. }
  156298. function assertTSModuleBlock(node, opts) {
  156299. assert("TSModuleBlock", node, opts);
  156300. }
  156301. function assertTSImportType(node, opts) {
  156302. assert("TSImportType", node, opts);
  156303. }
  156304. function assertTSImportEqualsDeclaration(node, opts) {
  156305. assert("TSImportEqualsDeclaration", node, opts);
  156306. }
  156307. function assertTSExternalModuleReference(node, opts) {
  156308. assert("TSExternalModuleReference", node, opts);
  156309. }
  156310. function assertTSNonNullExpression(node, opts) {
  156311. assert("TSNonNullExpression", node, opts);
  156312. }
  156313. function assertTSExportAssignment(node, opts) {
  156314. assert("TSExportAssignment", node, opts);
  156315. }
  156316. function assertTSNamespaceExportDeclaration(node, opts) {
  156317. assert("TSNamespaceExportDeclaration", node, opts);
  156318. }
  156319. function assertTSTypeAnnotation(node, opts) {
  156320. assert("TSTypeAnnotation", node, opts);
  156321. }
  156322. function assertTSTypeParameterInstantiation(node, opts) {
  156323. assert("TSTypeParameterInstantiation", node, opts);
  156324. }
  156325. function assertTSTypeParameterDeclaration(node, opts) {
  156326. assert("TSTypeParameterDeclaration", node, opts);
  156327. }
  156328. function assertTSTypeParameter(node, opts) {
  156329. assert("TSTypeParameter", node, opts);
  156330. }
  156331. function assertExpression(node, opts) {
  156332. assert("Expression", node, opts);
  156333. }
  156334. function assertBinary(node, opts) {
  156335. assert("Binary", node, opts);
  156336. }
  156337. function assertScopable(node, opts) {
  156338. assert("Scopable", node, opts);
  156339. }
  156340. function assertBlockParent(node, opts) {
  156341. assert("BlockParent", node, opts);
  156342. }
  156343. function assertBlock(node, opts) {
  156344. assert("Block", node, opts);
  156345. }
  156346. function assertStatement(node, opts) {
  156347. assert("Statement", node, opts);
  156348. }
  156349. function assertTerminatorless(node, opts) {
  156350. assert("Terminatorless", node, opts);
  156351. }
  156352. function assertCompletionStatement(node, opts) {
  156353. assert("CompletionStatement", node, opts);
  156354. }
  156355. function assertConditional(node, opts) {
  156356. assert("Conditional", node, opts);
  156357. }
  156358. function assertLoop(node, opts) {
  156359. assert("Loop", node, opts);
  156360. }
  156361. function assertWhile(node, opts) {
  156362. assert("While", node, opts);
  156363. }
  156364. function assertExpressionWrapper(node, opts) {
  156365. assert("ExpressionWrapper", node, opts);
  156366. }
  156367. function assertFor(node, opts) {
  156368. assert("For", node, opts);
  156369. }
  156370. function assertForXStatement(node, opts) {
  156371. assert("ForXStatement", node, opts);
  156372. }
  156373. function assertFunction(node, opts) {
  156374. assert("Function", node, opts);
  156375. }
  156376. function assertFunctionParent(node, opts) {
  156377. assert("FunctionParent", node, opts);
  156378. }
  156379. function assertPureish(node, opts) {
  156380. assert("Pureish", node, opts);
  156381. }
  156382. function assertDeclaration(node, opts) {
  156383. assert("Declaration", node, opts);
  156384. }
  156385. function assertPatternLike(node, opts) {
  156386. assert("PatternLike", node, opts);
  156387. }
  156388. function assertLVal(node, opts) {
  156389. assert("LVal", node, opts);
  156390. }
  156391. function assertTSEntityName(node, opts) {
  156392. assert("TSEntityName", node, opts);
  156393. }
  156394. function assertLiteral(node, opts) {
  156395. assert("Literal", node, opts);
  156396. }
  156397. function assertImmutable(node, opts) {
  156398. assert("Immutable", node, opts);
  156399. }
  156400. function assertUserWhitespacable(node, opts) {
  156401. assert("UserWhitespacable", node, opts);
  156402. }
  156403. function assertMethod(node, opts) {
  156404. assert("Method", node, opts);
  156405. }
  156406. function assertObjectMember(node, opts) {
  156407. assert("ObjectMember", node, opts);
  156408. }
  156409. function assertProperty(node, opts) {
  156410. assert("Property", node, opts);
  156411. }
  156412. function assertUnaryLike(node, opts) {
  156413. assert("UnaryLike", node, opts);
  156414. }
  156415. function assertPattern(node, opts) {
  156416. assert("Pattern", node, opts);
  156417. }
  156418. function assertClass(node, opts) {
  156419. assert("Class", node, opts);
  156420. }
  156421. function assertModuleDeclaration(node, opts) {
  156422. assert("ModuleDeclaration", node, opts);
  156423. }
  156424. function assertExportDeclaration(node, opts) {
  156425. assert("ExportDeclaration", node, opts);
  156426. }
  156427. function assertModuleSpecifier(node, opts) {
  156428. assert("ModuleSpecifier", node, opts);
  156429. }
  156430. function assertFlow(node, opts) {
  156431. assert("Flow", node, opts);
  156432. }
  156433. function assertFlowType(node, opts) {
  156434. assert("FlowType", node, opts);
  156435. }
  156436. function assertFlowBaseAnnotation(node, opts) {
  156437. assert("FlowBaseAnnotation", node, opts);
  156438. }
  156439. function assertFlowDeclaration(node, opts) {
  156440. assert("FlowDeclaration", node, opts);
  156441. }
  156442. function assertFlowPredicate(node, opts) {
  156443. assert("FlowPredicate", node, opts);
  156444. }
  156445. function assertEnumBody(node, opts) {
  156446. assert("EnumBody", node, opts);
  156447. }
  156448. function assertEnumMember(node, opts) {
  156449. assert("EnumMember", node, opts);
  156450. }
  156451. function assertJSX(node, opts) {
  156452. assert("JSX", node, opts);
  156453. }
  156454. function assertPrivate(node, opts) {
  156455. assert("Private", node, opts);
  156456. }
  156457. function assertTSTypeElement(node, opts) {
  156458. assert("TSTypeElement", node, opts);
  156459. }
  156460. function assertTSType(node, opts) {
  156461. assert("TSType", node, opts);
  156462. }
  156463. function assertTSBaseType(node, opts) {
  156464. assert("TSBaseType", node, opts);
  156465. }
  156466. function assertNumberLiteral(node, opts) {
  156467. console.trace("The node type NumberLiteral has been renamed to NumericLiteral");
  156468. assert("NumberLiteral", node, opts);
  156469. }
  156470. function assertRegexLiteral(node, opts) {
  156471. console.trace("The node type RegexLiteral has been renamed to RegExpLiteral");
  156472. assert("RegexLiteral", node, opts);
  156473. }
  156474. function assertRestProperty(node, opts) {
  156475. console.trace("The node type RestProperty has been renamed to RestElement");
  156476. assert("RestProperty", node, opts);
  156477. }
  156478. function assertSpreadProperty(node, opts) {
  156479. console.trace("The node type SpreadProperty has been renamed to SpreadElement");
  156480. assert("SpreadProperty", node, opts);
  156481. }
  156482. }
  156483. });
  156484. // node_modules/@babel/traverse/node_modules/@babel/helper-function-name/node_modules/@babel/types/lib/builders/flow/createTypeAnnotationBasedOnTypeof.js
  156485. var require_createTypeAnnotationBasedOnTypeof7 = __commonJS({
  156486. "node_modules/@babel/traverse/node_modules/@babel/helper-function-name/node_modules/@babel/types/lib/builders/flow/createTypeAnnotationBasedOnTypeof.js"(exports) {
  156487. "use strict";
  156488. Object.defineProperty(exports, "__esModule", {
  156489. value: true
  156490. });
  156491. exports.default = createTypeAnnotationBasedOnTypeof;
  156492. var _generated = require_generated32();
  156493. function createTypeAnnotationBasedOnTypeof(type) {
  156494. if (type === "string") {
  156495. return (0, _generated.stringTypeAnnotation)();
  156496. } else if (type === "number") {
  156497. return (0, _generated.numberTypeAnnotation)();
  156498. } else if (type === "undefined") {
  156499. return (0, _generated.voidTypeAnnotation)();
  156500. } else if (type === "boolean") {
  156501. return (0, _generated.booleanTypeAnnotation)();
  156502. } else if (type === "function") {
  156503. return (0, _generated.genericTypeAnnotation)((0, _generated.identifier)("Function"));
  156504. } else if (type === "object") {
  156505. return (0, _generated.genericTypeAnnotation)((0, _generated.identifier)("Object"));
  156506. } else if (type === "symbol") {
  156507. return (0, _generated.genericTypeAnnotation)((0, _generated.identifier)("Symbol"));
  156508. } else if (type === "bigint") {
  156509. return (0, _generated.anyTypeAnnotation)();
  156510. } else {
  156511. throw new Error("Invalid typeof value: " + type);
  156512. }
  156513. }
  156514. }
  156515. });
  156516. // node_modules/@babel/traverse/node_modules/@babel/helper-function-name/node_modules/@babel/types/lib/modifications/flow/removeTypeDuplicates.js
  156517. var require_removeTypeDuplicates13 = __commonJS({
  156518. "node_modules/@babel/traverse/node_modules/@babel/helper-function-name/node_modules/@babel/types/lib/modifications/flow/removeTypeDuplicates.js"(exports) {
  156519. "use strict";
  156520. Object.defineProperty(exports, "__esModule", {
  156521. value: true
  156522. });
  156523. exports.default = removeTypeDuplicates;
  156524. var _generated = require_generated31();
  156525. function getQualifiedName(node) {
  156526. return (0, _generated.isIdentifier)(node) ? node.name : `${node.id.name}.${getQualifiedName(node.qualification)}`;
  156527. }
  156528. function removeTypeDuplicates(nodes) {
  156529. const generics = {};
  156530. const bases = {};
  156531. const typeGroups = [];
  156532. const types2 = [];
  156533. for (let i = 0; i < nodes.length; i++) {
  156534. const node = nodes[i];
  156535. if (!node)
  156536. continue;
  156537. if (types2.indexOf(node) >= 0) {
  156538. continue;
  156539. }
  156540. if ((0, _generated.isAnyTypeAnnotation)(node)) {
  156541. return [node];
  156542. }
  156543. if ((0, _generated.isFlowBaseAnnotation)(node)) {
  156544. bases[node.type] = node;
  156545. continue;
  156546. }
  156547. if ((0, _generated.isUnionTypeAnnotation)(node)) {
  156548. if (typeGroups.indexOf(node.types) < 0) {
  156549. nodes = nodes.concat(node.types);
  156550. typeGroups.push(node.types);
  156551. }
  156552. continue;
  156553. }
  156554. if ((0, _generated.isGenericTypeAnnotation)(node)) {
  156555. const name2 = getQualifiedName(node.id);
  156556. if (generics[name2]) {
  156557. let existing = generics[name2];
  156558. if (existing.typeParameters) {
  156559. if (node.typeParameters) {
  156560. existing.typeParameters.params = removeTypeDuplicates(existing.typeParameters.params.concat(node.typeParameters.params));
  156561. }
  156562. } else {
  156563. existing = node.typeParameters;
  156564. }
  156565. } else {
  156566. generics[name2] = node;
  156567. }
  156568. continue;
  156569. }
  156570. types2.push(node);
  156571. }
  156572. for (const type of Object.keys(bases)) {
  156573. types2.push(bases[type]);
  156574. }
  156575. for (const name2 of Object.keys(generics)) {
  156576. types2.push(generics[name2]);
  156577. }
  156578. return types2;
  156579. }
  156580. }
  156581. });
  156582. // node_modules/@babel/traverse/node_modules/@babel/helper-function-name/node_modules/@babel/types/lib/builders/flow/createFlowUnionType.js
  156583. var require_createFlowUnionType7 = __commonJS({
  156584. "node_modules/@babel/traverse/node_modules/@babel/helper-function-name/node_modules/@babel/types/lib/builders/flow/createFlowUnionType.js"(exports) {
  156585. "use strict";
  156586. Object.defineProperty(exports, "__esModule", {
  156587. value: true
  156588. });
  156589. exports.default = createFlowUnionType;
  156590. var _generated = require_generated32();
  156591. var _removeTypeDuplicates = require_removeTypeDuplicates13();
  156592. function createFlowUnionType(types2) {
  156593. const flattened = (0, _removeTypeDuplicates.default)(types2);
  156594. if (flattened.length === 1) {
  156595. return flattened[0];
  156596. } else {
  156597. return (0, _generated.unionTypeAnnotation)(flattened);
  156598. }
  156599. }
  156600. }
  156601. });
  156602. // node_modules/@babel/traverse/node_modules/@babel/helper-function-name/node_modules/@babel/types/lib/modifications/typescript/removeTypeDuplicates.js
  156603. var require_removeTypeDuplicates14 = __commonJS({
  156604. "node_modules/@babel/traverse/node_modules/@babel/helper-function-name/node_modules/@babel/types/lib/modifications/typescript/removeTypeDuplicates.js"(exports) {
  156605. "use strict";
  156606. Object.defineProperty(exports, "__esModule", {
  156607. value: true
  156608. });
  156609. exports.default = removeTypeDuplicates;
  156610. var _generated = require_generated31();
  156611. function removeTypeDuplicates(nodes) {
  156612. const generics = {};
  156613. const bases = {};
  156614. const typeGroups = [];
  156615. const types2 = [];
  156616. for (let i = 0; i < nodes.length; i++) {
  156617. const node = nodes[i];
  156618. if (!node)
  156619. continue;
  156620. if (types2.indexOf(node) >= 0) {
  156621. continue;
  156622. }
  156623. if ((0, _generated.isTSAnyKeyword)(node)) {
  156624. return [node];
  156625. }
  156626. if ((0, _generated.isTSBaseType)(node)) {
  156627. bases[node.type] = node;
  156628. continue;
  156629. }
  156630. if ((0, _generated.isTSUnionType)(node)) {
  156631. if (typeGroups.indexOf(node.types) < 0) {
  156632. nodes = nodes.concat(node.types);
  156633. typeGroups.push(node.types);
  156634. }
  156635. continue;
  156636. }
  156637. types2.push(node);
  156638. }
  156639. for (const type of Object.keys(bases)) {
  156640. types2.push(bases[type]);
  156641. }
  156642. for (const name2 of Object.keys(generics)) {
  156643. types2.push(generics[name2]);
  156644. }
  156645. return types2;
  156646. }
  156647. }
  156648. });
  156649. // node_modules/@babel/traverse/node_modules/@babel/helper-function-name/node_modules/@babel/types/lib/builders/typescript/createTSUnionType.js
  156650. var require_createTSUnionType7 = __commonJS({
  156651. "node_modules/@babel/traverse/node_modules/@babel/helper-function-name/node_modules/@babel/types/lib/builders/typescript/createTSUnionType.js"(exports) {
  156652. "use strict";
  156653. Object.defineProperty(exports, "__esModule", {
  156654. value: true
  156655. });
  156656. exports.default = createTSUnionType;
  156657. var _generated = require_generated32();
  156658. var _removeTypeDuplicates = require_removeTypeDuplicates14();
  156659. function createTSUnionType(typeAnnotations) {
  156660. const types2 = typeAnnotations.map((type) => type.typeAnnotation);
  156661. const flattened = (0, _removeTypeDuplicates.default)(types2);
  156662. if (flattened.length === 1) {
  156663. return flattened[0];
  156664. } else {
  156665. return (0, _generated.tsUnionType)(flattened);
  156666. }
  156667. }
  156668. }
  156669. });
  156670. // node_modules/@babel/traverse/node_modules/@babel/helper-function-name/node_modules/@babel/types/lib/builders/generated/uppercase.js
  156671. var require_uppercase7 = __commonJS({
  156672. "node_modules/@babel/traverse/node_modules/@babel/helper-function-name/node_modules/@babel/types/lib/builders/generated/uppercase.js"(exports) {
  156673. "use strict";
  156674. Object.defineProperty(exports, "__esModule", {
  156675. value: true
  156676. });
  156677. Object.defineProperty(exports, "ArrayExpression", {
  156678. enumerable: true,
  156679. get: function() {
  156680. return _index.arrayExpression;
  156681. }
  156682. });
  156683. Object.defineProperty(exports, "AssignmentExpression", {
  156684. enumerable: true,
  156685. get: function() {
  156686. return _index.assignmentExpression;
  156687. }
  156688. });
  156689. Object.defineProperty(exports, "BinaryExpression", {
  156690. enumerable: true,
  156691. get: function() {
  156692. return _index.binaryExpression;
  156693. }
  156694. });
  156695. Object.defineProperty(exports, "InterpreterDirective", {
  156696. enumerable: true,
  156697. get: function() {
  156698. return _index.interpreterDirective;
  156699. }
  156700. });
  156701. Object.defineProperty(exports, "Directive", {
  156702. enumerable: true,
  156703. get: function() {
  156704. return _index.directive;
  156705. }
  156706. });
  156707. Object.defineProperty(exports, "DirectiveLiteral", {
  156708. enumerable: true,
  156709. get: function() {
  156710. return _index.directiveLiteral;
  156711. }
  156712. });
  156713. Object.defineProperty(exports, "BlockStatement", {
  156714. enumerable: true,
  156715. get: function() {
  156716. return _index.blockStatement;
  156717. }
  156718. });
  156719. Object.defineProperty(exports, "BreakStatement", {
  156720. enumerable: true,
  156721. get: function() {
  156722. return _index.breakStatement;
  156723. }
  156724. });
  156725. Object.defineProperty(exports, "CallExpression", {
  156726. enumerable: true,
  156727. get: function() {
  156728. return _index.callExpression;
  156729. }
  156730. });
  156731. Object.defineProperty(exports, "CatchClause", {
  156732. enumerable: true,
  156733. get: function() {
  156734. return _index.catchClause;
  156735. }
  156736. });
  156737. Object.defineProperty(exports, "ConditionalExpression", {
  156738. enumerable: true,
  156739. get: function() {
  156740. return _index.conditionalExpression;
  156741. }
  156742. });
  156743. Object.defineProperty(exports, "ContinueStatement", {
  156744. enumerable: true,
  156745. get: function() {
  156746. return _index.continueStatement;
  156747. }
  156748. });
  156749. Object.defineProperty(exports, "DebuggerStatement", {
  156750. enumerable: true,
  156751. get: function() {
  156752. return _index.debuggerStatement;
  156753. }
  156754. });
  156755. Object.defineProperty(exports, "DoWhileStatement", {
  156756. enumerable: true,
  156757. get: function() {
  156758. return _index.doWhileStatement;
  156759. }
  156760. });
  156761. Object.defineProperty(exports, "EmptyStatement", {
  156762. enumerable: true,
  156763. get: function() {
  156764. return _index.emptyStatement;
  156765. }
  156766. });
  156767. Object.defineProperty(exports, "ExpressionStatement", {
  156768. enumerable: true,
  156769. get: function() {
  156770. return _index.expressionStatement;
  156771. }
  156772. });
  156773. Object.defineProperty(exports, "File", {
  156774. enumerable: true,
  156775. get: function() {
  156776. return _index.file;
  156777. }
  156778. });
  156779. Object.defineProperty(exports, "ForInStatement", {
  156780. enumerable: true,
  156781. get: function() {
  156782. return _index.forInStatement;
  156783. }
  156784. });
  156785. Object.defineProperty(exports, "ForStatement", {
  156786. enumerable: true,
  156787. get: function() {
  156788. return _index.forStatement;
  156789. }
  156790. });
  156791. Object.defineProperty(exports, "FunctionDeclaration", {
  156792. enumerable: true,
  156793. get: function() {
  156794. return _index.functionDeclaration;
  156795. }
  156796. });
  156797. Object.defineProperty(exports, "FunctionExpression", {
  156798. enumerable: true,
  156799. get: function() {
  156800. return _index.functionExpression;
  156801. }
  156802. });
  156803. Object.defineProperty(exports, "Identifier", {
  156804. enumerable: true,
  156805. get: function() {
  156806. return _index.identifier;
  156807. }
  156808. });
  156809. Object.defineProperty(exports, "IfStatement", {
  156810. enumerable: true,
  156811. get: function() {
  156812. return _index.ifStatement;
  156813. }
  156814. });
  156815. Object.defineProperty(exports, "LabeledStatement", {
  156816. enumerable: true,
  156817. get: function() {
  156818. return _index.labeledStatement;
  156819. }
  156820. });
  156821. Object.defineProperty(exports, "StringLiteral", {
  156822. enumerable: true,
  156823. get: function() {
  156824. return _index.stringLiteral;
  156825. }
  156826. });
  156827. Object.defineProperty(exports, "NumericLiteral", {
  156828. enumerable: true,
  156829. get: function() {
  156830. return _index.numericLiteral;
  156831. }
  156832. });
  156833. Object.defineProperty(exports, "NullLiteral", {
  156834. enumerable: true,
  156835. get: function() {
  156836. return _index.nullLiteral;
  156837. }
  156838. });
  156839. Object.defineProperty(exports, "BooleanLiteral", {
  156840. enumerable: true,
  156841. get: function() {
  156842. return _index.booleanLiteral;
  156843. }
  156844. });
  156845. Object.defineProperty(exports, "RegExpLiteral", {
  156846. enumerable: true,
  156847. get: function() {
  156848. return _index.regExpLiteral;
  156849. }
  156850. });
  156851. Object.defineProperty(exports, "LogicalExpression", {
  156852. enumerable: true,
  156853. get: function() {
  156854. return _index.logicalExpression;
  156855. }
  156856. });
  156857. Object.defineProperty(exports, "MemberExpression", {
  156858. enumerable: true,
  156859. get: function() {
  156860. return _index.memberExpression;
  156861. }
  156862. });
  156863. Object.defineProperty(exports, "NewExpression", {
  156864. enumerable: true,
  156865. get: function() {
  156866. return _index.newExpression;
  156867. }
  156868. });
  156869. Object.defineProperty(exports, "Program", {
  156870. enumerable: true,
  156871. get: function() {
  156872. return _index.program;
  156873. }
  156874. });
  156875. Object.defineProperty(exports, "ObjectExpression", {
  156876. enumerable: true,
  156877. get: function() {
  156878. return _index.objectExpression;
  156879. }
  156880. });
  156881. Object.defineProperty(exports, "ObjectMethod", {
  156882. enumerable: true,
  156883. get: function() {
  156884. return _index.objectMethod;
  156885. }
  156886. });
  156887. Object.defineProperty(exports, "ObjectProperty", {
  156888. enumerable: true,
  156889. get: function() {
  156890. return _index.objectProperty;
  156891. }
  156892. });
  156893. Object.defineProperty(exports, "RestElement", {
  156894. enumerable: true,
  156895. get: function() {
  156896. return _index.restElement;
  156897. }
  156898. });
  156899. Object.defineProperty(exports, "ReturnStatement", {
  156900. enumerable: true,
  156901. get: function() {
  156902. return _index.returnStatement;
  156903. }
  156904. });
  156905. Object.defineProperty(exports, "SequenceExpression", {
  156906. enumerable: true,
  156907. get: function() {
  156908. return _index.sequenceExpression;
  156909. }
  156910. });
  156911. Object.defineProperty(exports, "ParenthesizedExpression", {
  156912. enumerable: true,
  156913. get: function() {
  156914. return _index.parenthesizedExpression;
  156915. }
  156916. });
  156917. Object.defineProperty(exports, "SwitchCase", {
  156918. enumerable: true,
  156919. get: function() {
  156920. return _index.switchCase;
  156921. }
  156922. });
  156923. Object.defineProperty(exports, "SwitchStatement", {
  156924. enumerable: true,
  156925. get: function() {
  156926. return _index.switchStatement;
  156927. }
  156928. });
  156929. Object.defineProperty(exports, "ThisExpression", {
  156930. enumerable: true,
  156931. get: function() {
  156932. return _index.thisExpression;
  156933. }
  156934. });
  156935. Object.defineProperty(exports, "ThrowStatement", {
  156936. enumerable: true,
  156937. get: function() {
  156938. return _index.throwStatement;
  156939. }
  156940. });
  156941. Object.defineProperty(exports, "TryStatement", {
  156942. enumerable: true,
  156943. get: function() {
  156944. return _index.tryStatement;
  156945. }
  156946. });
  156947. Object.defineProperty(exports, "UnaryExpression", {
  156948. enumerable: true,
  156949. get: function() {
  156950. return _index.unaryExpression;
  156951. }
  156952. });
  156953. Object.defineProperty(exports, "UpdateExpression", {
  156954. enumerable: true,
  156955. get: function() {
  156956. return _index.updateExpression;
  156957. }
  156958. });
  156959. Object.defineProperty(exports, "VariableDeclaration", {
  156960. enumerable: true,
  156961. get: function() {
  156962. return _index.variableDeclaration;
  156963. }
  156964. });
  156965. Object.defineProperty(exports, "VariableDeclarator", {
  156966. enumerable: true,
  156967. get: function() {
  156968. return _index.variableDeclarator;
  156969. }
  156970. });
  156971. Object.defineProperty(exports, "WhileStatement", {
  156972. enumerable: true,
  156973. get: function() {
  156974. return _index.whileStatement;
  156975. }
  156976. });
  156977. Object.defineProperty(exports, "WithStatement", {
  156978. enumerable: true,
  156979. get: function() {
  156980. return _index.withStatement;
  156981. }
  156982. });
  156983. Object.defineProperty(exports, "AssignmentPattern", {
  156984. enumerable: true,
  156985. get: function() {
  156986. return _index.assignmentPattern;
  156987. }
  156988. });
  156989. Object.defineProperty(exports, "ArrayPattern", {
  156990. enumerable: true,
  156991. get: function() {
  156992. return _index.arrayPattern;
  156993. }
  156994. });
  156995. Object.defineProperty(exports, "ArrowFunctionExpression", {
  156996. enumerable: true,
  156997. get: function() {
  156998. return _index.arrowFunctionExpression;
  156999. }
  157000. });
  157001. Object.defineProperty(exports, "ClassBody", {
  157002. enumerable: true,
  157003. get: function() {
  157004. return _index.classBody;
  157005. }
  157006. });
  157007. Object.defineProperty(exports, "ClassExpression", {
  157008. enumerable: true,
  157009. get: function() {
  157010. return _index.classExpression;
  157011. }
  157012. });
  157013. Object.defineProperty(exports, "ClassDeclaration", {
  157014. enumerable: true,
  157015. get: function() {
  157016. return _index.classDeclaration;
  157017. }
  157018. });
  157019. Object.defineProperty(exports, "ExportAllDeclaration", {
  157020. enumerable: true,
  157021. get: function() {
  157022. return _index.exportAllDeclaration;
  157023. }
  157024. });
  157025. Object.defineProperty(exports, "ExportDefaultDeclaration", {
  157026. enumerable: true,
  157027. get: function() {
  157028. return _index.exportDefaultDeclaration;
  157029. }
  157030. });
  157031. Object.defineProperty(exports, "ExportNamedDeclaration", {
  157032. enumerable: true,
  157033. get: function() {
  157034. return _index.exportNamedDeclaration;
  157035. }
  157036. });
  157037. Object.defineProperty(exports, "ExportSpecifier", {
  157038. enumerable: true,
  157039. get: function() {
  157040. return _index.exportSpecifier;
  157041. }
  157042. });
  157043. Object.defineProperty(exports, "ForOfStatement", {
  157044. enumerable: true,
  157045. get: function() {
  157046. return _index.forOfStatement;
  157047. }
  157048. });
  157049. Object.defineProperty(exports, "ImportDeclaration", {
  157050. enumerable: true,
  157051. get: function() {
  157052. return _index.importDeclaration;
  157053. }
  157054. });
  157055. Object.defineProperty(exports, "ImportDefaultSpecifier", {
  157056. enumerable: true,
  157057. get: function() {
  157058. return _index.importDefaultSpecifier;
  157059. }
  157060. });
  157061. Object.defineProperty(exports, "ImportNamespaceSpecifier", {
  157062. enumerable: true,
  157063. get: function() {
  157064. return _index.importNamespaceSpecifier;
  157065. }
  157066. });
  157067. Object.defineProperty(exports, "ImportSpecifier", {
  157068. enumerable: true,
  157069. get: function() {
  157070. return _index.importSpecifier;
  157071. }
  157072. });
  157073. Object.defineProperty(exports, "MetaProperty", {
  157074. enumerable: true,
  157075. get: function() {
  157076. return _index.metaProperty;
  157077. }
  157078. });
  157079. Object.defineProperty(exports, "ClassMethod", {
  157080. enumerable: true,
  157081. get: function() {
  157082. return _index.classMethod;
  157083. }
  157084. });
  157085. Object.defineProperty(exports, "ObjectPattern", {
  157086. enumerable: true,
  157087. get: function() {
  157088. return _index.objectPattern;
  157089. }
  157090. });
  157091. Object.defineProperty(exports, "SpreadElement", {
  157092. enumerable: true,
  157093. get: function() {
  157094. return _index.spreadElement;
  157095. }
  157096. });
  157097. Object.defineProperty(exports, "Super", {
  157098. enumerable: true,
  157099. get: function() {
  157100. return _index.super;
  157101. }
  157102. });
  157103. Object.defineProperty(exports, "TaggedTemplateExpression", {
  157104. enumerable: true,
  157105. get: function() {
  157106. return _index.taggedTemplateExpression;
  157107. }
  157108. });
  157109. Object.defineProperty(exports, "TemplateElement", {
  157110. enumerable: true,
  157111. get: function() {
  157112. return _index.templateElement;
  157113. }
  157114. });
  157115. Object.defineProperty(exports, "TemplateLiteral", {
  157116. enumerable: true,
  157117. get: function() {
  157118. return _index.templateLiteral;
  157119. }
  157120. });
  157121. Object.defineProperty(exports, "YieldExpression", {
  157122. enumerable: true,
  157123. get: function() {
  157124. return _index.yieldExpression;
  157125. }
  157126. });
  157127. Object.defineProperty(exports, "AwaitExpression", {
  157128. enumerable: true,
  157129. get: function() {
  157130. return _index.awaitExpression;
  157131. }
  157132. });
  157133. Object.defineProperty(exports, "Import", {
  157134. enumerable: true,
  157135. get: function() {
  157136. return _index.import;
  157137. }
  157138. });
  157139. Object.defineProperty(exports, "BigIntLiteral", {
  157140. enumerable: true,
  157141. get: function() {
  157142. return _index.bigIntLiteral;
  157143. }
  157144. });
  157145. Object.defineProperty(exports, "ExportNamespaceSpecifier", {
  157146. enumerable: true,
  157147. get: function() {
  157148. return _index.exportNamespaceSpecifier;
  157149. }
  157150. });
  157151. Object.defineProperty(exports, "OptionalMemberExpression", {
  157152. enumerable: true,
  157153. get: function() {
  157154. return _index.optionalMemberExpression;
  157155. }
  157156. });
  157157. Object.defineProperty(exports, "OptionalCallExpression", {
  157158. enumerable: true,
  157159. get: function() {
  157160. return _index.optionalCallExpression;
  157161. }
  157162. });
  157163. Object.defineProperty(exports, "AnyTypeAnnotation", {
  157164. enumerable: true,
  157165. get: function() {
  157166. return _index.anyTypeAnnotation;
  157167. }
  157168. });
  157169. Object.defineProperty(exports, "ArrayTypeAnnotation", {
  157170. enumerable: true,
  157171. get: function() {
  157172. return _index.arrayTypeAnnotation;
  157173. }
  157174. });
  157175. Object.defineProperty(exports, "BooleanTypeAnnotation", {
  157176. enumerable: true,
  157177. get: function() {
  157178. return _index.booleanTypeAnnotation;
  157179. }
  157180. });
  157181. Object.defineProperty(exports, "BooleanLiteralTypeAnnotation", {
  157182. enumerable: true,
  157183. get: function() {
  157184. return _index.booleanLiteralTypeAnnotation;
  157185. }
  157186. });
  157187. Object.defineProperty(exports, "NullLiteralTypeAnnotation", {
  157188. enumerable: true,
  157189. get: function() {
  157190. return _index.nullLiteralTypeAnnotation;
  157191. }
  157192. });
  157193. Object.defineProperty(exports, "ClassImplements", {
  157194. enumerable: true,
  157195. get: function() {
  157196. return _index.classImplements;
  157197. }
  157198. });
  157199. Object.defineProperty(exports, "DeclareClass", {
  157200. enumerable: true,
  157201. get: function() {
  157202. return _index.declareClass;
  157203. }
  157204. });
  157205. Object.defineProperty(exports, "DeclareFunction", {
  157206. enumerable: true,
  157207. get: function() {
  157208. return _index.declareFunction;
  157209. }
  157210. });
  157211. Object.defineProperty(exports, "DeclareInterface", {
  157212. enumerable: true,
  157213. get: function() {
  157214. return _index.declareInterface;
  157215. }
  157216. });
  157217. Object.defineProperty(exports, "DeclareModule", {
  157218. enumerable: true,
  157219. get: function() {
  157220. return _index.declareModule;
  157221. }
  157222. });
  157223. Object.defineProperty(exports, "DeclareModuleExports", {
  157224. enumerable: true,
  157225. get: function() {
  157226. return _index.declareModuleExports;
  157227. }
  157228. });
  157229. Object.defineProperty(exports, "DeclareTypeAlias", {
  157230. enumerable: true,
  157231. get: function() {
  157232. return _index.declareTypeAlias;
  157233. }
  157234. });
  157235. Object.defineProperty(exports, "DeclareOpaqueType", {
  157236. enumerable: true,
  157237. get: function() {
  157238. return _index.declareOpaqueType;
  157239. }
  157240. });
  157241. Object.defineProperty(exports, "DeclareVariable", {
  157242. enumerable: true,
  157243. get: function() {
  157244. return _index.declareVariable;
  157245. }
  157246. });
  157247. Object.defineProperty(exports, "DeclareExportDeclaration", {
  157248. enumerable: true,
  157249. get: function() {
  157250. return _index.declareExportDeclaration;
  157251. }
  157252. });
  157253. Object.defineProperty(exports, "DeclareExportAllDeclaration", {
  157254. enumerable: true,
  157255. get: function() {
  157256. return _index.declareExportAllDeclaration;
  157257. }
  157258. });
  157259. Object.defineProperty(exports, "DeclaredPredicate", {
  157260. enumerable: true,
  157261. get: function() {
  157262. return _index.declaredPredicate;
  157263. }
  157264. });
  157265. Object.defineProperty(exports, "ExistsTypeAnnotation", {
  157266. enumerable: true,
  157267. get: function() {
  157268. return _index.existsTypeAnnotation;
  157269. }
  157270. });
  157271. Object.defineProperty(exports, "FunctionTypeAnnotation", {
  157272. enumerable: true,
  157273. get: function() {
  157274. return _index.functionTypeAnnotation;
  157275. }
  157276. });
  157277. Object.defineProperty(exports, "FunctionTypeParam", {
  157278. enumerable: true,
  157279. get: function() {
  157280. return _index.functionTypeParam;
  157281. }
  157282. });
  157283. Object.defineProperty(exports, "GenericTypeAnnotation", {
  157284. enumerable: true,
  157285. get: function() {
  157286. return _index.genericTypeAnnotation;
  157287. }
  157288. });
  157289. Object.defineProperty(exports, "InferredPredicate", {
  157290. enumerable: true,
  157291. get: function() {
  157292. return _index.inferredPredicate;
  157293. }
  157294. });
  157295. Object.defineProperty(exports, "InterfaceExtends", {
  157296. enumerable: true,
  157297. get: function() {
  157298. return _index.interfaceExtends;
  157299. }
  157300. });
  157301. Object.defineProperty(exports, "InterfaceDeclaration", {
  157302. enumerable: true,
  157303. get: function() {
  157304. return _index.interfaceDeclaration;
  157305. }
  157306. });
  157307. Object.defineProperty(exports, "InterfaceTypeAnnotation", {
  157308. enumerable: true,
  157309. get: function() {
  157310. return _index.interfaceTypeAnnotation;
  157311. }
  157312. });
  157313. Object.defineProperty(exports, "IntersectionTypeAnnotation", {
  157314. enumerable: true,
  157315. get: function() {
  157316. return _index.intersectionTypeAnnotation;
  157317. }
  157318. });
  157319. Object.defineProperty(exports, "MixedTypeAnnotation", {
  157320. enumerable: true,
  157321. get: function() {
  157322. return _index.mixedTypeAnnotation;
  157323. }
  157324. });
  157325. Object.defineProperty(exports, "EmptyTypeAnnotation", {
  157326. enumerable: true,
  157327. get: function() {
  157328. return _index.emptyTypeAnnotation;
  157329. }
  157330. });
  157331. Object.defineProperty(exports, "NullableTypeAnnotation", {
  157332. enumerable: true,
  157333. get: function() {
  157334. return _index.nullableTypeAnnotation;
  157335. }
  157336. });
  157337. Object.defineProperty(exports, "NumberLiteralTypeAnnotation", {
  157338. enumerable: true,
  157339. get: function() {
  157340. return _index.numberLiteralTypeAnnotation;
  157341. }
  157342. });
  157343. Object.defineProperty(exports, "NumberTypeAnnotation", {
  157344. enumerable: true,
  157345. get: function() {
  157346. return _index.numberTypeAnnotation;
  157347. }
  157348. });
  157349. Object.defineProperty(exports, "ObjectTypeAnnotation", {
  157350. enumerable: true,
  157351. get: function() {
  157352. return _index.objectTypeAnnotation;
  157353. }
  157354. });
  157355. Object.defineProperty(exports, "ObjectTypeInternalSlot", {
  157356. enumerable: true,
  157357. get: function() {
  157358. return _index.objectTypeInternalSlot;
  157359. }
  157360. });
  157361. Object.defineProperty(exports, "ObjectTypeCallProperty", {
  157362. enumerable: true,
  157363. get: function() {
  157364. return _index.objectTypeCallProperty;
  157365. }
  157366. });
  157367. Object.defineProperty(exports, "ObjectTypeIndexer", {
  157368. enumerable: true,
  157369. get: function() {
  157370. return _index.objectTypeIndexer;
  157371. }
  157372. });
  157373. Object.defineProperty(exports, "ObjectTypeProperty", {
  157374. enumerable: true,
  157375. get: function() {
  157376. return _index.objectTypeProperty;
  157377. }
  157378. });
  157379. Object.defineProperty(exports, "ObjectTypeSpreadProperty", {
  157380. enumerable: true,
  157381. get: function() {
  157382. return _index.objectTypeSpreadProperty;
  157383. }
  157384. });
  157385. Object.defineProperty(exports, "OpaqueType", {
  157386. enumerable: true,
  157387. get: function() {
  157388. return _index.opaqueType;
  157389. }
  157390. });
  157391. Object.defineProperty(exports, "QualifiedTypeIdentifier", {
  157392. enumerable: true,
  157393. get: function() {
  157394. return _index.qualifiedTypeIdentifier;
  157395. }
  157396. });
  157397. Object.defineProperty(exports, "StringLiteralTypeAnnotation", {
  157398. enumerable: true,
  157399. get: function() {
  157400. return _index.stringLiteralTypeAnnotation;
  157401. }
  157402. });
  157403. Object.defineProperty(exports, "StringTypeAnnotation", {
  157404. enumerable: true,
  157405. get: function() {
  157406. return _index.stringTypeAnnotation;
  157407. }
  157408. });
  157409. Object.defineProperty(exports, "SymbolTypeAnnotation", {
  157410. enumerable: true,
  157411. get: function() {
  157412. return _index.symbolTypeAnnotation;
  157413. }
  157414. });
  157415. Object.defineProperty(exports, "ThisTypeAnnotation", {
  157416. enumerable: true,
  157417. get: function() {
  157418. return _index.thisTypeAnnotation;
  157419. }
  157420. });
  157421. Object.defineProperty(exports, "TupleTypeAnnotation", {
  157422. enumerable: true,
  157423. get: function() {
  157424. return _index.tupleTypeAnnotation;
  157425. }
  157426. });
  157427. Object.defineProperty(exports, "TypeofTypeAnnotation", {
  157428. enumerable: true,
  157429. get: function() {
  157430. return _index.typeofTypeAnnotation;
  157431. }
  157432. });
  157433. Object.defineProperty(exports, "TypeAlias", {
  157434. enumerable: true,
  157435. get: function() {
  157436. return _index.typeAlias;
  157437. }
  157438. });
  157439. Object.defineProperty(exports, "TypeAnnotation", {
  157440. enumerable: true,
  157441. get: function() {
  157442. return _index.typeAnnotation;
  157443. }
  157444. });
  157445. Object.defineProperty(exports, "TypeCastExpression", {
  157446. enumerable: true,
  157447. get: function() {
  157448. return _index.typeCastExpression;
  157449. }
  157450. });
  157451. Object.defineProperty(exports, "TypeParameter", {
  157452. enumerable: true,
  157453. get: function() {
  157454. return _index.typeParameter;
  157455. }
  157456. });
  157457. Object.defineProperty(exports, "TypeParameterDeclaration", {
  157458. enumerable: true,
  157459. get: function() {
  157460. return _index.typeParameterDeclaration;
  157461. }
  157462. });
  157463. Object.defineProperty(exports, "TypeParameterInstantiation", {
  157464. enumerable: true,
  157465. get: function() {
  157466. return _index.typeParameterInstantiation;
  157467. }
  157468. });
  157469. Object.defineProperty(exports, "UnionTypeAnnotation", {
  157470. enumerable: true,
  157471. get: function() {
  157472. return _index.unionTypeAnnotation;
  157473. }
  157474. });
  157475. Object.defineProperty(exports, "Variance", {
  157476. enumerable: true,
  157477. get: function() {
  157478. return _index.variance;
  157479. }
  157480. });
  157481. Object.defineProperty(exports, "VoidTypeAnnotation", {
  157482. enumerable: true,
  157483. get: function() {
  157484. return _index.voidTypeAnnotation;
  157485. }
  157486. });
  157487. Object.defineProperty(exports, "EnumDeclaration", {
  157488. enumerable: true,
  157489. get: function() {
  157490. return _index.enumDeclaration;
  157491. }
  157492. });
  157493. Object.defineProperty(exports, "EnumBooleanBody", {
  157494. enumerable: true,
  157495. get: function() {
  157496. return _index.enumBooleanBody;
  157497. }
  157498. });
  157499. Object.defineProperty(exports, "EnumNumberBody", {
  157500. enumerable: true,
  157501. get: function() {
  157502. return _index.enumNumberBody;
  157503. }
  157504. });
  157505. Object.defineProperty(exports, "EnumStringBody", {
  157506. enumerable: true,
  157507. get: function() {
  157508. return _index.enumStringBody;
  157509. }
  157510. });
  157511. Object.defineProperty(exports, "EnumSymbolBody", {
  157512. enumerable: true,
  157513. get: function() {
  157514. return _index.enumSymbolBody;
  157515. }
  157516. });
  157517. Object.defineProperty(exports, "EnumBooleanMember", {
  157518. enumerable: true,
  157519. get: function() {
  157520. return _index.enumBooleanMember;
  157521. }
  157522. });
  157523. Object.defineProperty(exports, "EnumNumberMember", {
  157524. enumerable: true,
  157525. get: function() {
  157526. return _index.enumNumberMember;
  157527. }
  157528. });
  157529. Object.defineProperty(exports, "EnumStringMember", {
  157530. enumerable: true,
  157531. get: function() {
  157532. return _index.enumStringMember;
  157533. }
  157534. });
  157535. Object.defineProperty(exports, "EnumDefaultedMember", {
  157536. enumerable: true,
  157537. get: function() {
  157538. return _index.enumDefaultedMember;
  157539. }
  157540. });
  157541. Object.defineProperty(exports, "IndexedAccessType", {
  157542. enumerable: true,
  157543. get: function() {
  157544. return _index.indexedAccessType;
  157545. }
  157546. });
  157547. Object.defineProperty(exports, "OptionalIndexedAccessType", {
  157548. enumerable: true,
  157549. get: function() {
  157550. return _index.optionalIndexedAccessType;
  157551. }
  157552. });
  157553. Object.defineProperty(exports, "JSXAttribute", {
  157554. enumerable: true,
  157555. get: function() {
  157556. return _index.jsxAttribute;
  157557. }
  157558. });
  157559. Object.defineProperty(exports, "JSXClosingElement", {
  157560. enumerable: true,
  157561. get: function() {
  157562. return _index.jsxClosingElement;
  157563. }
  157564. });
  157565. Object.defineProperty(exports, "JSXElement", {
  157566. enumerable: true,
  157567. get: function() {
  157568. return _index.jsxElement;
  157569. }
  157570. });
  157571. Object.defineProperty(exports, "JSXEmptyExpression", {
  157572. enumerable: true,
  157573. get: function() {
  157574. return _index.jsxEmptyExpression;
  157575. }
  157576. });
  157577. Object.defineProperty(exports, "JSXExpressionContainer", {
  157578. enumerable: true,
  157579. get: function() {
  157580. return _index.jsxExpressionContainer;
  157581. }
  157582. });
  157583. Object.defineProperty(exports, "JSXSpreadChild", {
  157584. enumerable: true,
  157585. get: function() {
  157586. return _index.jsxSpreadChild;
  157587. }
  157588. });
  157589. Object.defineProperty(exports, "JSXIdentifier", {
  157590. enumerable: true,
  157591. get: function() {
  157592. return _index.jsxIdentifier;
  157593. }
  157594. });
  157595. Object.defineProperty(exports, "JSXMemberExpression", {
  157596. enumerable: true,
  157597. get: function() {
  157598. return _index.jsxMemberExpression;
  157599. }
  157600. });
  157601. Object.defineProperty(exports, "JSXNamespacedName", {
  157602. enumerable: true,
  157603. get: function() {
  157604. return _index.jsxNamespacedName;
  157605. }
  157606. });
  157607. Object.defineProperty(exports, "JSXOpeningElement", {
  157608. enumerable: true,
  157609. get: function() {
  157610. return _index.jsxOpeningElement;
  157611. }
  157612. });
  157613. Object.defineProperty(exports, "JSXSpreadAttribute", {
  157614. enumerable: true,
  157615. get: function() {
  157616. return _index.jsxSpreadAttribute;
  157617. }
  157618. });
  157619. Object.defineProperty(exports, "JSXText", {
  157620. enumerable: true,
  157621. get: function() {
  157622. return _index.jsxText;
  157623. }
  157624. });
  157625. Object.defineProperty(exports, "JSXFragment", {
  157626. enumerable: true,
  157627. get: function() {
  157628. return _index.jsxFragment;
  157629. }
  157630. });
  157631. Object.defineProperty(exports, "JSXOpeningFragment", {
  157632. enumerable: true,
  157633. get: function() {
  157634. return _index.jsxOpeningFragment;
  157635. }
  157636. });
  157637. Object.defineProperty(exports, "JSXClosingFragment", {
  157638. enumerable: true,
  157639. get: function() {
  157640. return _index.jsxClosingFragment;
  157641. }
  157642. });
  157643. Object.defineProperty(exports, "Noop", {
  157644. enumerable: true,
  157645. get: function() {
  157646. return _index.noop;
  157647. }
  157648. });
  157649. Object.defineProperty(exports, "Placeholder", {
  157650. enumerable: true,
  157651. get: function() {
  157652. return _index.placeholder;
  157653. }
  157654. });
  157655. Object.defineProperty(exports, "V8IntrinsicIdentifier", {
  157656. enumerable: true,
  157657. get: function() {
  157658. return _index.v8IntrinsicIdentifier;
  157659. }
  157660. });
  157661. Object.defineProperty(exports, "ArgumentPlaceholder", {
  157662. enumerable: true,
  157663. get: function() {
  157664. return _index.argumentPlaceholder;
  157665. }
  157666. });
  157667. Object.defineProperty(exports, "BindExpression", {
  157668. enumerable: true,
  157669. get: function() {
  157670. return _index.bindExpression;
  157671. }
  157672. });
  157673. Object.defineProperty(exports, "ClassProperty", {
  157674. enumerable: true,
  157675. get: function() {
  157676. return _index.classProperty;
  157677. }
  157678. });
  157679. Object.defineProperty(exports, "PipelineTopicExpression", {
  157680. enumerable: true,
  157681. get: function() {
  157682. return _index.pipelineTopicExpression;
  157683. }
  157684. });
  157685. Object.defineProperty(exports, "PipelineBareFunction", {
  157686. enumerable: true,
  157687. get: function() {
  157688. return _index.pipelineBareFunction;
  157689. }
  157690. });
  157691. Object.defineProperty(exports, "PipelinePrimaryTopicReference", {
  157692. enumerable: true,
  157693. get: function() {
  157694. return _index.pipelinePrimaryTopicReference;
  157695. }
  157696. });
  157697. Object.defineProperty(exports, "ClassPrivateProperty", {
  157698. enumerable: true,
  157699. get: function() {
  157700. return _index.classPrivateProperty;
  157701. }
  157702. });
  157703. Object.defineProperty(exports, "ClassPrivateMethod", {
  157704. enumerable: true,
  157705. get: function() {
  157706. return _index.classPrivateMethod;
  157707. }
  157708. });
  157709. Object.defineProperty(exports, "ImportAttribute", {
  157710. enumerable: true,
  157711. get: function() {
  157712. return _index.importAttribute;
  157713. }
  157714. });
  157715. Object.defineProperty(exports, "Decorator", {
  157716. enumerable: true,
  157717. get: function() {
  157718. return _index.decorator;
  157719. }
  157720. });
  157721. Object.defineProperty(exports, "DoExpression", {
  157722. enumerable: true,
  157723. get: function() {
  157724. return _index.doExpression;
  157725. }
  157726. });
  157727. Object.defineProperty(exports, "ExportDefaultSpecifier", {
  157728. enumerable: true,
  157729. get: function() {
  157730. return _index.exportDefaultSpecifier;
  157731. }
  157732. });
  157733. Object.defineProperty(exports, "PrivateName", {
  157734. enumerable: true,
  157735. get: function() {
  157736. return _index.privateName;
  157737. }
  157738. });
  157739. Object.defineProperty(exports, "RecordExpression", {
  157740. enumerable: true,
  157741. get: function() {
  157742. return _index.recordExpression;
  157743. }
  157744. });
  157745. Object.defineProperty(exports, "TupleExpression", {
  157746. enumerable: true,
  157747. get: function() {
  157748. return _index.tupleExpression;
  157749. }
  157750. });
  157751. Object.defineProperty(exports, "DecimalLiteral", {
  157752. enumerable: true,
  157753. get: function() {
  157754. return _index.decimalLiteral;
  157755. }
  157756. });
  157757. Object.defineProperty(exports, "StaticBlock", {
  157758. enumerable: true,
  157759. get: function() {
  157760. return _index.staticBlock;
  157761. }
  157762. });
  157763. Object.defineProperty(exports, "ModuleExpression", {
  157764. enumerable: true,
  157765. get: function() {
  157766. return _index.moduleExpression;
  157767. }
  157768. });
  157769. Object.defineProperty(exports, "TSParameterProperty", {
  157770. enumerable: true,
  157771. get: function() {
  157772. return _index.tsParameterProperty;
  157773. }
  157774. });
  157775. Object.defineProperty(exports, "TSDeclareFunction", {
  157776. enumerable: true,
  157777. get: function() {
  157778. return _index.tsDeclareFunction;
  157779. }
  157780. });
  157781. Object.defineProperty(exports, "TSDeclareMethod", {
  157782. enumerable: true,
  157783. get: function() {
  157784. return _index.tsDeclareMethod;
  157785. }
  157786. });
  157787. Object.defineProperty(exports, "TSQualifiedName", {
  157788. enumerable: true,
  157789. get: function() {
  157790. return _index.tsQualifiedName;
  157791. }
  157792. });
  157793. Object.defineProperty(exports, "TSCallSignatureDeclaration", {
  157794. enumerable: true,
  157795. get: function() {
  157796. return _index.tsCallSignatureDeclaration;
  157797. }
  157798. });
  157799. Object.defineProperty(exports, "TSConstructSignatureDeclaration", {
  157800. enumerable: true,
  157801. get: function() {
  157802. return _index.tsConstructSignatureDeclaration;
  157803. }
  157804. });
  157805. Object.defineProperty(exports, "TSPropertySignature", {
  157806. enumerable: true,
  157807. get: function() {
  157808. return _index.tsPropertySignature;
  157809. }
  157810. });
  157811. Object.defineProperty(exports, "TSMethodSignature", {
  157812. enumerable: true,
  157813. get: function() {
  157814. return _index.tsMethodSignature;
  157815. }
  157816. });
  157817. Object.defineProperty(exports, "TSIndexSignature", {
  157818. enumerable: true,
  157819. get: function() {
  157820. return _index.tsIndexSignature;
  157821. }
  157822. });
  157823. Object.defineProperty(exports, "TSAnyKeyword", {
  157824. enumerable: true,
  157825. get: function() {
  157826. return _index.tsAnyKeyword;
  157827. }
  157828. });
  157829. Object.defineProperty(exports, "TSBooleanKeyword", {
  157830. enumerable: true,
  157831. get: function() {
  157832. return _index.tsBooleanKeyword;
  157833. }
  157834. });
  157835. Object.defineProperty(exports, "TSBigIntKeyword", {
  157836. enumerable: true,
  157837. get: function() {
  157838. return _index.tsBigIntKeyword;
  157839. }
  157840. });
  157841. Object.defineProperty(exports, "TSIntrinsicKeyword", {
  157842. enumerable: true,
  157843. get: function() {
  157844. return _index.tsIntrinsicKeyword;
  157845. }
  157846. });
  157847. Object.defineProperty(exports, "TSNeverKeyword", {
  157848. enumerable: true,
  157849. get: function() {
  157850. return _index.tsNeverKeyword;
  157851. }
  157852. });
  157853. Object.defineProperty(exports, "TSNullKeyword", {
  157854. enumerable: true,
  157855. get: function() {
  157856. return _index.tsNullKeyword;
  157857. }
  157858. });
  157859. Object.defineProperty(exports, "TSNumberKeyword", {
  157860. enumerable: true,
  157861. get: function() {
  157862. return _index.tsNumberKeyword;
  157863. }
  157864. });
  157865. Object.defineProperty(exports, "TSObjectKeyword", {
  157866. enumerable: true,
  157867. get: function() {
  157868. return _index.tsObjectKeyword;
  157869. }
  157870. });
  157871. Object.defineProperty(exports, "TSStringKeyword", {
  157872. enumerable: true,
  157873. get: function() {
  157874. return _index.tsStringKeyword;
  157875. }
  157876. });
  157877. Object.defineProperty(exports, "TSSymbolKeyword", {
  157878. enumerable: true,
  157879. get: function() {
  157880. return _index.tsSymbolKeyword;
  157881. }
  157882. });
  157883. Object.defineProperty(exports, "TSUndefinedKeyword", {
  157884. enumerable: true,
  157885. get: function() {
  157886. return _index.tsUndefinedKeyword;
  157887. }
  157888. });
  157889. Object.defineProperty(exports, "TSUnknownKeyword", {
  157890. enumerable: true,
  157891. get: function() {
  157892. return _index.tsUnknownKeyword;
  157893. }
  157894. });
  157895. Object.defineProperty(exports, "TSVoidKeyword", {
  157896. enumerable: true,
  157897. get: function() {
  157898. return _index.tsVoidKeyword;
  157899. }
  157900. });
  157901. Object.defineProperty(exports, "TSThisType", {
  157902. enumerable: true,
  157903. get: function() {
  157904. return _index.tsThisType;
  157905. }
  157906. });
  157907. Object.defineProperty(exports, "TSFunctionType", {
  157908. enumerable: true,
  157909. get: function() {
  157910. return _index.tsFunctionType;
  157911. }
  157912. });
  157913. Object.defineProperty(exports, "TSConstructorType", {
  157914. enumerable: true,
  157915. get: function() {
  157916. return _index.tsConstructorType;
  157917. }
  157918. });
  157919. Object.defineProperty(exports, "TSTypeReference", {
  157920. enumerable: true,
  157921. get: function() {
  157922. return _index.tsTypeReference;
  157923. }
  157924. });
  157925. Object.defineProperty(exports, "TSTypePredicate", {
  157926. enumerable: true,
  157927. get: function() {
  157928. return _index.tsTypePredicate;
  157929. }
  157930. });
  157931. Object.defineProperty(exports, "TSTypeQuery", {
  157932. enumerable: true,
  157933. get: function() {
  157934. return _index.tsTypeQuery;
  157935. }
  157936. });
  157937. Object.defineProperty(exports, "TSTypeLiteral", {
  157938. enumerable: true,
  157939. get: function() {
  157940. return _index.tsTypeLiteral;
  157941. }
  157942. });
  157943. Object.defineProperty(exports, "TSArrayType", {
  157944. enumerable: true,
  157945. get: function() {
  157946. return _index.tsArrayType;
  157947. }
  157948. });
  157949. Object.defineProperty(exports, "TSTupleType", {
  157950. enumerable: true,
  157951. get: function() {
  157952. return _index.tsTupleType;
  157953. }
  157954. });
  157955. Object.defineProperty(exports, "TSOptionalType", {
  157956. enumerable: true,
  157957. get: function() {
  157958. return _index.tsOptionalType;
  157959. }
  157960. });
  157961. Object.defineProperty(exports, "TSRestType", {
  157962. enumerable: true,
  157963. get: function() {
  157964. return _index.tsRestType;
  157965. }
  157966. });
  157967. Object.defineProperty(exports, "TSNamedTupleMember", {
  157968. enumerable: true,
  157969. get: function() {
  157970. return _index.tsNamedTupleMember;
  157971. }
  157972. });
  157973. Object.defineProperty(exports, "TSUnionType", {
  157974. enumerable: true,
  157975. get: function() {
  157976. return _index.tsUnionType;
  157977. }
  157978. });
  157979. Object.defineProperty(exports, "TSIntersectionType", {
  157980. enumerable: true,
  157981. get: function() {
  157982. return _index.tsIntersectionType;
  157983. }
  157984. });
  157985. Object.defineProperty(exports, "TSConditionalType", {
  157986. enumerable: true,
  157987. get: function() {
  157988. return _index.tsConditionalType;
  157989. }
  157990. });
  157991. Object.defineProperty(exports, "TSInferType", {
  157992. enumerable: true,
  157993. get: function() {
  157994. return _index.tsInferType;
  157995. }
  157996. });
  157997. Object.defineProperty(exports, "TSParenthesizedType", {
  157998. enumerable: true,
  157999. get: function() {
  158000. return _index.tsParenthesizedType;
  158001. }
  158002. });
  158003. Object.defineProperty(exports, "TSTypeOperator", {
  158004. enumerable: true,
  158005. get: function() {
  158006. return _index.tsTypeOperator;
  158007. }
  158008. });
  158009. Object.defineProperty(exports, "TSIndexedAccessType", {
  158010. enumerable: true,
  158011. get: function() {
  158012. return _index.tsIndexedAccessType;
  158013. }
  158014. });
  158015. Object.defineProperty(exports, "TSMappedType", {
  158016. enumerable: true,
  158017. get: function() {
  158018. return _index.tsMappedType;
  158019. }
  158020. });
  158021. Object.defineProperty(exports, "TSLiteralType", {
  158022. enumerable: true,
  158023. get: function() {
  158024. return _index.tsLiteralType;
  158025. }
  158026. });
  158027. Object.defineProperty(exports, "TSExpressionWithTypeArguments", {
  158028. enumerable: true,
  158029. get: function() {
  158030. return _index.tsExpressionWithTypeArguments;
  158031. }
  158032. });
  158033. Object.defineProperty(exports, "TSInterfaceDeclaration", {
  158034. enumerable: true,
  158035. get: function() {
  158036. return _index.tsInterfaceDeclaration;
  158037. }
  158038. });
  158039. Object.defineProperty(exports, "TSInterfaceBody", {
  158040. enumerable: true,
  158041. get: function() {
  158042. return _index.tsInterfaceBody;
  158043. }
  158044. });
  158045. Object.defineProperty(exports, "TSTypeAliasDeclaration", {
  158046. enumerable: true,
  158047. get: function() {
  158048. return _index.tsTypeAliasDeclaration;
  158049. }
  158050. });
  158051. Object.defineProperty(exports, "TSAsExpression", {
  158052. enumerable: true,
  158053. get: function() {
  158054. return _index.tsAsExpression;
  158055. }
  158056. });
  158057. Object.defineProperty(exports, "TSTypeAssertion", {
  158058. enumerable: true,
  158059. get: function() {
  158060. return _index.tsTypeAssertion;
  158061. }
  158062. });
  158063. Object.defineProperty(exports, "TSEnumDeclaration", {
  158064. enumerable: true,
  158065. get: function() {
  158066. return _index.tsEnumDeclaration;
  158067. }
  158068. });
  158069. Object.defineProperty(exports, "TSEnumMember", {
  158070. enumerable: true,
  158071. get: function() {
  158072. return _index.tsEnumMember;
  158073. }
  158074. });
  158075. Object.defineProperty(exports, "TSModuleDeclaration", {
  158076. enumerable: true,
  158077. get: function() {
  158078. return _index.tsModuleDeclaration;
  158079. }
  158080. });
  158081. Object.defineProperty(exports, "TSModuleBlock", {
  158082. enumerable: true,
  158083. get: function() {
  158084. return _index.tsModuleBlock;
  158085. }
  158086. });
  158087. Object.defineProperty(exports, "TSImportType", {
  158088. enumerable: true,
  158089. get: function() {
  158090. return _index.tsImportType;
  158091. }
  158092. });
  158093. Object.defineProperty(exports, "TSImportEqualsDeclaration", {
  158094. enumerable: true,
  158095. get: function() {
  158096. return _index.tsImportEqualsDeclaration;
  158097. }
  158098. });
  158099. Object.defineProperty(exports, "TSExternalModuleReference", {
  158100. enumerable: true,
  158101. get: function() {
  158102. return _index.tsExternalModuleReference;
  158103. }
  158104. });
  158105. Object.defineProperty(exports, "TSNonNullExpression", {
  158106. enumerable: true,
  158107. get: function() {
  158108. return _index.tsNonNullExpression;
  158109. }
  158110. });
  158111. Object.defineProperty(exports, "TSExportAssignment", {
  158112. enumerable: true,
  158113. get: function() {
  158114. return _index.tsExportAssignment;
  158115. }
  158116. });
  158117. Object.defineProperty(exports, "TSNamespaceExportDeclaration", {
  158118. enumerable: true,
  158119. get: function() {
  158120. return _index.tsNamespaceExportDeclaration;
  158121. }
  158122. });
  158123. Object.defineProperty(exports, "TSTypeAnnotation", {
  158124. enumerable: true,
  158125. get: function() {
  158126. return _index.tsTypeAnnotation;
  158127. }
  158128. });
  158129. Object.defineProperty(exports, "TSTypeParameterInstantiation", {
  158130. enumerable: true,
  158131. get: function() {
  158132. return _index.tsTypeParameterInstantiation;
  158133. }
  158134. });
  158135. Object.defineProperty(exports, "TSTypeParameterDeclaration", {
  158136. enumerable: true,
  158137. get: function() {
  158138. return _index.tsTypeParameterDeclaration;
  158139. }
  158140. });
  158141. Object.defineProperty(exports, "TSTypeParameter", {
  158142. enumerable: true,
  158143. get: function() {
  158144. return _index.tsTypeParameter;
  158145. }
  158146. });
  158147. Object.defineProperty(exports, "NumberLiteral", {
  158148. enumerable: true,
  158149. get: function() {
  158150. return _index.numberLiteral;
  158151. }
  158152. });
  158153. Object.defineProperty(exports, "RegexLiteral", {
  158154. enumerable: true,
  158155. get: function() {
  158156. return _index.regexLiteral;
  158157. }
  158158. });
  158159. Object.defineProperty(exports, "RestProperty", {
  158160. enumerable: true,
  158161. get: function() {
  158162. return _index.restProperty;
  158163. }
  158164. });
  158165. Object.defineProperty(exports, "SpreadProperty", {
  158166. enumerable: true,
  158167. get: function() {
  158168. return _index.spreadProperty;
  158169. }
  158170. });
  158171. var _index = require_generated32();
  158172. }
  158173. });
  158174. // node_modules/@babel/traverse/node_modules/@babel/helper-function-name/node_modules/@babel/types/lib/clone/cloneNode.js
  158175. var require_cloneNode7 = __commonJS({
  158176. "node_modules/@babel/traverse/node_modules/@babel/helper-function-name/node_modules/@babel/types/lib/clone/cloneNode.js"(exports) {
  158177. "use strict";
  158178. Object.defineProperty(exports, "__esModule", {
  158179. value: true
  158180. });
  158181. exports.default = cloneNode;
  158182. var _definitions = require_definitions7();
  158183. var _generated = require_generated31();
  158184. var has = Function.call.bind(Object.prototype.hasOwnProperty);
  158185. function cloneIfNode(obj, deep, withoutLoc) {
  158186. if (obj && typeof obj.type === "string") {
  158187. return cloneNode(obj, deep, withoutLoc);
  158188. }
  158189. return obj;
  158190. }
  158191. function cloneIfNodeOrArray(obj, deep, withoutLoc) {
  158192. if (Array.isArray(obj)) {
  158193. return obj.map((node) => cloneIfNode(node, deep, withoutLoc));
  158194. }
  158195. return cloneIfNode(obj, deep, withoutLoc);
  158196. }
  158197. function cloneNode(node, deep = true, withoutLoc = false) {
  158198. if (!node)
  158199. return node;
  158200. const {
  158201. type
  158202. } = node;
  158203. const newNode = {
  158204. type: node.type
  158205. };
  158206. if ((0, _generated.isIdentifier)(node)) {
  158207. newNode.name = node.name;
  158208. if (has(node, "optional") && typeof node.optional === "boolean") {
  158209. newNode.optional = node.optional;
  158210. }
  158211. if (has(node, "typeAnnotation")) {
  158212. newNode.typeAnnotation = deep ? cloneIfNodeOrArray(node.typeAnnotation, true, withoutLoc) : node.typeAnnotation;
  158213. }
  158214. } else if (!has(_definitions.NODE_FIELDS, type)) {
  158215. throw new Error(`Unknown node type: "${type}"`);
  158216. } else {
  158217. for (const field of Object.keys(_definitions.NODE_FIELDS[type])) {
  158218. if (has(node, field)) {
  158219. if (deep) {
  158220. newNode[field] = (0, _generated.isFile)(node) && field === "comments" ? maybeCloneComments(node.comments, deep, withoutLoc) : cloneIfNodeOrArray(node[field], true, withoutLoc);
  158221. } else {
  158222. newNode[field] = node[field];
  158223. }
  158224. }
  158225. }
  158226. }
  158227. if (has(node, "loc")) {
  158228. if (withoutLoc) {
  158229. newNode.loc = null;
  158230. } else {
  158231. newNode.loc = node.loc;
  158232. }
  158233. }
  158234. if (has(node, "leadingComments")) {
  158235. newNode.leadingComments = maybeCloneComments(node.leadingComments, deep, withoutLoc);
  158236. }
  158237. if (has(node, "innerComments")) {
  158238. newNode.innerComments = maybeCloneComments(node.innerComments, deep, withoutLoc);
  158239. }
  158240. if (has(node, "trailingComments")) {
  158241. newNode.trailingComments = maybeCloneComments(node.trailingComments, deep, withoutLoc);
  158242. }
  158243. if (has(node, "extra")) {
  158244. newNode.extra = Object.assign({}, node.extra);
  158245. }
  158246. return newNode;
  158247. }
  158248. function maybeCloneComments(comments, deep, withoutLoc) {
  158249. if (!comments || !deep) {
  158250. return comments;
  158251. }
  158252. return comments.map(({
  158253. type,
  158254. value,
  158255. loc
  158256. }) => {
  158257. if (withoutLoc) {
  158258. return {
  158259. type,
  158260. value,
  158261. loc: null
  158262. };
  158263. }
  158264. return {
  158265. type,
  158266. value,
  158267. loc
  158268. };
  158269. });
  158270. }
  158271. }
  158272. });
  158273. // node_modules/@babel/traverse/node_modules/@babel/helper-function-name/node_modules/@babel/types/lib/clone/clone.js
  158274. var require_clone7 = __commonJS({
  158275. "node_modules/@babel/traverse/node_modules/@babel/helper-function-name/node_modules/@babel/types/lib/clone/clone.js"(exports) {
  158276. "use strict";
  158277. Object.defineProperty(exports, "__esModule", {
  158278. value: true
  158279. });
  158280. exports.default = clone;
  158281. var _cloneNode = require_cloneNode7();
  158282. function clone(node) {
  158283. return (0, _cloneNode.default)(node, false);
  158284. }
  158285. }
  158286. });
  158287. // node_modules/@babel/traverse/node_modules/@babel/helper-function-name/node_modules/@babel/types/lib/clone/cloneDeep.js
  158288. var require_cloneDeep7 = __commonJS({
  158289. "node_modules/@babel/traverse/node_modules/@babel/helper-function-name/node_modules/@babel/types/lib/clone/cloneDeep.js"(exports) {
  158290. "use strict";
  158291. Object.defineProperty(exports, "__esModule", {
  158292. value: true
  158293. });
  158294. exports.default = cloneDeep2;
  158295. var _cloneNode = require_cloneNode7();
  158296. function cloneDeep2(node) {
  158297. return (0, _cloneNode.default)(node);
  158298. }
  158299. }
  158300. });
  158301. // node_modules/@babel/traverse/node_modules/@babel/helper-function-name/node_modules/@babel/types/lib/clone/cloneDeepWithoutLoc.js
  158302. var require_cloneDeepWithoutLoc7 = __commonJS({
  158303. "node_modules/@babel/traverse/node_modules/@babel/helper-function-name/node_modules/@babel/types/lib/clone/cloneDeepWithoutLoc.js"(exports) {
  158304. "use strict";
  158305. Object.defineProperty(exports, "__esModule", {
  158306. value: true
  158307. });
  158308. exports.default = cloneDeepWithoutLoc;
  158309. var _cloneNode = require_cloneNode7();
  158310. function cloneDeepWithoutLoc(node) {
  158311. return (0, _cloneNode.default)(node, true, true);
  158312. }
  158313. }
  158314. });
  158315. // node_modules/@babel/traverse/node_modules/@babel/helper-function-name/node_modules/@babel/types/lib/clone/cloneWithoutLoc.js
  158316. var require_cloneWithoutLoc7 = __commonJS({
  158317. "node_modules/@babel/traverse/node_modules/@babel/helper-function-name/node_modules/@babel/types/lib/clone/cloneWithoutLoc.js"(exports) {
  158318. "use strict";
  158319. Object.defineProperty(exports, "__esModule", {
  158320. value: true
  158321. });
  158322. exports.default = cloneWithoutLoc;
  158323. var _cloneNode = require_cloneNode7();
  158324. function cloneWithoutLoc(node) {
  158325. return (0, _cloneNode.default)(node, false, true);
  158326. }
  158327. }
  158328. });
  158329. // node_modules/@babel/traverse/node_modules/@babel/helper-function-name/node_modules/@babel/types/lib/comments/addComments.js
  158330. var require_addComments7 = __commonJS({
  158331. "node_modules/@babel/traverse/node_modules/@babel/helper-function-name/node_modules/@babel/types/lib/comments/addComments.js"(exports) {
  158332. "use strict";
  158333. Object.defineProperty(exports, "__esModule", {
  158334. value: true
  158335. });
  158336. exports.default = addComments;
  158337. function addComments(node, type, comments) {
  158338. if (!comments || !node)
  158339. return node;
  158340. const key = `${type}Comments`;
  158341. if (node[key]) {
  158342. if (type === "leading") {
  158343. node[key] = comments.concat(node[key]);
  158344. } else {
  158345. node[key] = node[key].concat(comments);
  158346. }
  158347. } else {
  158348. node[key] = comments;
  158349. }
  158350. return node;
  158351. }
  158352. }
  158353. });
  158354. // node_modules/@babel/traverse/node_modules/@babel/helper-function-name/node_modules/@babel/types/lib/comments/addComment.js
  158355. var require_addComment7 = __commonJS({
  158356. "node_modules/@babel/traverse/node_modules/@babel/helper-function-name/node_modules/@babel/types/lib/comments/addComment.js"(exports) {
  158357. "use strict";
  158358. Object.defineProperty(exports, "__esModule", {
  158359. value: true
  158360. });
  158361. exports.default = addComment;
  158362. var _addComments = require_addComments7();
  158363. function addComment(node, type, content3, line) {
  158364. return (0, _addComments.default)(node, type, [{
  158365. type: line ? "CommentLine" : "CommentBlock",
  158366. value: content3
  158367. }]);
  158368. }
  158369. }
  158370. });
  158371. // node_modules/@babel/traverse/node_modules/@babel/helper-function-name/node_modules/@babel/types/lib/utils/inherit.js
  158372. var require_inherit7 = __commonJS({
  158373. "node_modules/@babel/traverse/node_modules/@babel/helper-function-name/node_modules/@babel/types/lib/utils/inherit.js"(exports) {
  158374. "use strict";
  158375. Object.defineProperty(exports, "__esModule", {
  158376. value: true
  158377. });
  158378. exports.default = inherit2;
  158379. function inherit2(key, child, parent) {
  158380. if (child && parent) {
  158381. child[key] = Array.from(new Set([].concat(child[key], parent[key]).filter(Boolean)));
  158382. }
  158383. }
  158384. }
  158385. });
  158386. // node_modules/@babel/traverse/node_modules/@babel/helper-function-name/node_modules/@babel/types/lib/comments/inheritInnerComments.js
  158387. var require_inheritInnerComments7 = __commonJS({
  158388. "node_modules/@babel/traverse/node_modules/@babel/helper-function-name/node_modules/@babel/types/lib/comments/inheritInnerComments.js"(exports) {
  158389. "use strict";
  158390. Object.defineProperty(exports, "__esModule", {
  158391. value: true
  158392. });
  158393. exports.default = inheritInnerComments;
  158394. var _inherit = require_inherit7();
  158395. function inheritInnerComments(child, parent) {
  158396. (0, _inherit.default)("innerComments", child, parent);
  158397. }
  158398. }
  158399. });
  158400. // node_modules/@babel/traverse/node_modules/@babel/helper-function-name/node_modules/@babel/types/lib/comments/inheritLeadingComments.js
  158401. var require_inheritLeadingComments7 = __commonJS({
  158402. "node_modules/@babel/traverse/node_modules/@babel/helper-function-name/node_modules/@babel/types/lib/comments/inheritLeadingComments.js"(exports) {
  158403. "use strict";
  158404. Object.defineProperty(exports, "__esModule", {
  158405. value: true
  158406. });
  158407. exports.default = inheritLeadingComments;
  158408. var _inherit = require_inherit7();
  158409. function inheritLeadingComments(child, parent) {
  158410. (0, _inherit.default)("leadingComments", child, parent);
  158411. }
  158412. }
  158413. });
  158414. // node_modules/@babel/traverse/node_modules/@babel/helper-function-name/node_modules/@babel/types/lib/comments/inheritTrailingComments.js
  158415. var require_inheritTrailingComments7 = __commonJS({
  158416. "node_modules/@babel/traverse/node_modules/@babel/helper-function-name/node_modules/@babel/types/lib/comments/inheritTrailingComments.js"(exports) {
  158417. "use strict";
  158418. Object.defineProperty(exports, "__esModule", {
  158419. value: true
  158420. });
  158421. exports.default = inheritTrailingComments;
  158422. var _inherit = require_inherit7();
  158423. function inheritTrailingComments(child, parent) {
  158424. (0, _inherit.default)("trailingComments", child, parent);
  158425. }
  158426. }
  158427. });
  158428. // node_modules/@babel/traverse/node_modules/@babel/helper-function-name/node_modules/@babel/types/lib/comments/inheritsComments.js
  158429. var require_inheritsComments7 = __commonJS({
  158430. "node_modules/@babel/traverse/node_modules/@babel/helper-function-name/node_modules/@babel/types/lib/comments/inheritsComments.js"(exports) {
  158431. "use strict";
  158432. Object.defineProperty(exports, "__esModule", {
  158433. value: true
  158434. });
  158435. exports.default = inheritsComments;
  158436. var _inheritTrailingComments = require_inheritTrailingComments7();
  158437. var _inheritLeadingComments = require_inheritLeadingComments7();
  158438. var _inheritInnerComments = require_inheritInnerComments7();
  158439. function inheritsComments(child, parent) {
  158440. (0, _inheritTrailingComments.default)(child, parent);
  158441. (0, _inheritLeadingComments.default)(child, parent);
  158442. (0, _inheritInnerComments.default)(child, parent);
  158443. return child;
  158444. }
  158445. }
  158446. });
  158447. // node_modules/@babel/traverse/node_modules/@babel/helper-function-name/node_modules/@babel/types/lib/comments/removeComments.js
  158448. var require_removeComments7 = __commonJS({
  158449. "node_modules/@babel/traverse/node_modules/@babel/helper-function-name/node_modules/@babel/types/lib/comments/removeComments.js"(exports) {
  158450. "use strict";
  158451. Object.defineProperty(exports, "__esModule", {
  158452. value: true
  158453. });
  158454. exports.default = removeComments;
  158455. var _constants = require_constants7();
  158456. function removeComments(node) {
  158457. _constants.COMMENT_KEYS.forEach((key) => {
  158458. node[key] = null;
  158459. });
  158460. return node;
  158461. }
  158462. }
  158463. });
  158464. // node_modules/@babel/traverse/node_modules/@babel/helper-function-name/node_modules/@babel/types/lib/constants/generated/index.js
  158465. var require_generated34 = __commonJS({
  158466. "node_modules/@babel/traverse/node_modules/@babel/helper-function-name/node_modules/@babel/types/lib/constants/generated/index.js"(exports) {
  158467. "use strict";
  158468. Object.defineProperty(exports, "__esModule", {
  158469. value: true
  158470. });
  158471. exports.TSBASETYPE_TYPES = exports.TSTYPE_TYPES = exports.TSTYPEELEMENT_TYPES = exports.PRIVATE_TYPES = exports.JSX_TYPES = exports.ENUMMEMBER_TYPES = exports.ENUMBODY_TYPES = exports.FLOWPREDICATE_TYPES = exports.FLOWDECLARATION_TYPES = exports.FLOWBASEANNOTATION_TYPES = exports.FLOWTYPE_TYPES = exports.FLOW_TYPES = exports.MODULESPECIFIER_TYPES = exports.EXPORTDECLARATION_TYPES = exports.MODULEDECLARATION_TYPES = exports.CLASS_TYPES = exports.PATTERN_TYPES = exports.UNARYLIKE_TYPES = exports.PROPERTY_TYPES = exports.OBJECTMEMBER_TYPES = exports.METHOD_TYPES = exports.USERWHITESPACABLE_TYPES = exports.IMMUTABLE_TYPES = exports.LITERAL_TYPES = exports.TSENTITYNAME_TYPES = exports.LVAL_TYPES = exports.PATTERNLIKE_TYPES = exports.DECLARATION_TYPES = exports.PUREISH_TYPES = exports.FUNCTIONPARENT_TYPES = exports.FUNCTION_TYPES = exports.FORXSTATEMENT_TYPES = exports.FOR_TYPES = exports.EXPRESSIONWRAPPER_TYPES = exports.WHILE_TYPES = exports.LOOP_TYPES = exports.CONDITIONAL_TYPES = exports.COMPLETIONSTATEMENT_TYPES = exports.TERMINATORLESS_TYPES = exports.STATEMENT_TYPES = exports.BLOCK_TYPES = exports.BLOCKPARENT_TYPES = exports.SCOPABLE_TYPES = exports.BINARY_TYPES = exports.EXPRESSION_TYPES = void 0;
  158472. var _definitions = require_definitions7();
  158473. var EXPRESSION_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Expression"];
  158474. exports.EXPRESSION_TYPES = EXPRESSION_TYPES;
  158475. var BINARY_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Binary"];
  158476. exports.BINARY_TYPES = BINARY_TYPES;
  158477. var SCOPABLE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Scopable"];
  158478. exports.SCOPABLE_TYPES = SCOPABLE_TYPES;
  158479. var BLOCKPARENT_TYPES = _definitions.FLIPPED_ALIAS_KEYS["BlockParent"];
  158480. exports.BLOCKPARENT_TYPES = BLOCKPARENT_TYPES;
  158481. var BLOCK_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Block"];
  158482. exports.BLOCK_TYPES = BLOCK_TYPES;
  158483. var STATEMENT_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Statement"];
  158484. exports.STATEMENT_TYPES = STATEMENT_TYPES;
  158485. var TERMINATORLESS_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Terminatorless"];
  158486. exports.TERMINATORLESS_TYPES = TERMINATORLESS_TYPES;
  158487. var COMPLETIONSTATEMENT_TYPES = _definitions.FLIPPED_ALIAS_KEYS["CompletionStatement"];
  158488. exports.COMPLETIONSTATEMENT_TYPES = COMPLETIONSTATEMENT_TYPES;
  158489. var CONDITIONAL_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Conditional"];
  158490. exports.CONDITIONAL_TYPES = CONDITIONAL_TYPES;
  158491. var LOOP_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Loop"];
  158492. exports.LOOP_TYPES = LOOP_TYPES;
  158493. var WHILE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["While"];
  158494. exports.WHILE_TYPES = WHILE_TYPES;
  158495. var EXPRESSIONWRAPPER_TYPES = _definitions.FLIPPED_ALIAS_KEYS["ExpressionWrapper"];
  158496. exports.EXPRESSIONWRAPPER_TYPES = EXPRESSIONWRAPPER_TYPES;
  158497. var FOR_TYPES = _definitions.FLIPPED_ALIAS_KEYS["For"];
  158498. exports.FOR_TYPES = FOR_TYPES;
  158499. var FORXSTATEMENT_TYPES = _definitions.FLIPPED_ALIAS_KEYS["ForXStatement"];
  158500. exports.FORXSTATEMENT_TYPES = FORXSTATEMENT_TYPES;
  158501. var FUNCTION_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Function"];
  158502. exports.FUNCTION_TYPES = FUNCTION_TYPES;
  158503. var FUNCTIONPARENT_TYPES = _definitions.FLIPPED_ALIAS_KEYS["FunctionParent"];
  158504. exports.FUNCTIONPARENT_TYPES = FUNCTIONPARENT_TYPES;
  158505. var PUREISH_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Pureish"];
  158506. exports.PUREISH_TYPES = PUREISH_TYPES;
  158507. var DECLARATION_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Declaration"];
  158508. exports.DECLARATION_TYPES = DECLARATION_TYPES;
  158509. var PATTERNLIKE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["PatternLike"];
  158510. exports.PATTERNLIKE_TYPES = PATTERNLIKE_TYPES;
  158511. var LVAL_TYPES = _definitions.FLIPPED_ALIAS_KEYS["LVal"];
  158512. exports.LVAL_TYPES = LVAL_TYPES;
  158513. var TSENTITYNAME_TYPES = _definitions.FLIPPED_ALIAS_KEYS["TSEntityName"];
  158514. exports.TSENTITYNAME_TYPES = TSENTITYNAME_TYPES;
  158515. var LITERAL_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Literal"];
  158516. exports.LITERAL_TYPES = LITERAL_TYPES;
  158517. var IMMUTABLE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Immutable"];
  158518. exports.IMMUTABLE_TYPES = IMMUTABLE_TYPES;
  158519. var USERWHITESPACABLE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["UserWhitespacable"];
  158520. exports.USERWHITESPACABLE_TYPES = USERWHITESPACABLE_TYPES;
  158521. var METHOD_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Method"];
  158522. exports.METHOD_TYPES = METHOD_TYPES;
  158523. var OBJECTMEMBER_TYPES = _definitions.FLIPPED_ALIAS_KEYS["ObjectMember"];
  158524. exports.OBJECTMEMBER_TYPES = OBJECTMEMBER_TYPES;
  158525. var PROPERTY_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Property"];
  158526. exports.PROPERTY_TYPES = PROPERTY_TYPES;
  158527. var UNARYLIKE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["UnaryLike"];
  158528. exports.UNARYLIKE_TYPES = UNARYLIKE_TYPES;
  158529. var PATTERN_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Pattern"];
  158530. exports.PATTERN_TYPES = PATTERN_TYPES;
  158531. var CLASS_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Class"];
  158532. exports.CLASS_TYPES = CLASS_TYPES;
  158533. var MODULEDECLARATION_TYPES = _definitions.FLIPPED_ALIAS_KEYS["ModuleDeclaration"];
  158534. exports.MODULEDECLARATION_TYPES = MODULEDECLARATION_TYPES;
  158535. var EXPORTDECLARATION_TYPES = _definitions.FLIPPED_ALIAS_KEYS["ExportDeclaration"];
  158536. exports.EXPORTDECLARATION_TYPES = EXPORTDECLARATION_TYPES;
  158537. var MODULESPECIFIER_TYPES = _definitions.FLIPPED_ALIAS_KEYS["ModuleSpecifier"];
  158538. exports.MODULESPECIFIER_TYPES = MODULESPECIFIER_TYPES;
  158539. var FLOW_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Flow"];
  158540. exports.FLOW_TYPES = FLOW_TYPES;
  158541. var FLOWTYPE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["FlowType"];
  158542. exports.FLOWTYPE_TYPES = FLOWTYPE_TYPES;
  158543. var FLOWBASEANNOTATION_TYPES = _definitions.FLIPPED_ALIAS_KEYS["FlowBaseAnnotation"];
  158544. exports.FLOWBASEANNOTATION_TYPES = FLOWBASEANNOTATION_TYPES;
  158545. var FLOWDECLARATION_TYPES = _definitions.FLIPPED_ALIAS_KEYS["FlowDeclaration"];
  158546. exports.FLOWDECLARATION_TYPES = FLOWDECLARATION_TYPES;
  158547. var FLOWPREDICATE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["FlowPredicate"];
  158548. exports.FLOWPREDICATE_TYPES = FLOWPREDICATE_TYPES;
  158549. var ENUMBODY_TYPES = _definitions.FLIPPED_ALIAS_KEYS["EnumBody"];
  158550. exports.ENUMBODY_TYPES = ENUMBODY_TYPES;
  158551. var ENUMMEMBER_TYPES = _definitions.FLIPPED_ALIAS_KEYS["EnumMember"];
  158552. exports.ENUMMEMBER_TYPES = ENUMMEMBER_TYPES;
  158553. var JSX_TYPES = _definitions.FLIPPED_ALIAS_KEYS["JSX"];
  158554. exports.JSX_TYPES = JSX_TYPES;
  158555. var PRIVATE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Private"];
  158556. exports.PRIVATE_TYPES = PRIVATE_TYPES;
  158557. var TSTYPEELEMENT_TYPES = _definitions.FLIPPED_ALIAS_KEYS["TSTypeElement"];
  158558. exports.TSTYPEELEMENT_TYPES = TSTYPEELEMENT_TYPES;
  158559. var TSTYPE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["TSType"];
  158560. exports.TSTYPE_TYPES = TSTYPE_TYPES;
  158561. var TSBASETYPE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["TSBaseType"];
  158562. exports.TSBASETYPE_TYPES = TSBASETYPE_TYPES;
  158563. }
  158564. });
  158565. // node_modules/@babel/traverse/node_modules/@babel/helper-function-name/node_modules/@babel/types/lib/converters/toBlock.js
  158566. var require_toBlock7 = __commonJS({
  158567. "node_modules/@babel/traverse/node_modules/@babel/helper-function-name/node_modules/@babel/types/lib/converters/toBlock.js"(exports) {
  158568. "use strict";
  158569. Object.defineProperty(exports, "__esModule", {
  158570. value: true
  158571. });
  158572. exports.default = toBlock;
  158573. var _generated = require_generated31();
  158574. var _generated2 = require_generated32();
  158575. function toBlock(node, parent) {
  158576. if ((0, _generated.isBlockStatement)(node)) {
  158577. return node;
  158578. }
  158579. let blockNodes = [];
  158580. if ((0, _generated.isEmptyStatement)(node)) {
  158581. blockNodes = [];
  158582. } else {
  158583. if (!(0, _generated.isStatement)(node)) {
  158584. if ((0, _generated.isFunction)(parent)) {
  158585. node = (0, _generated2.returnStatement)(node);
  158586. } else {
  158587. node = (0, _generated2.expressionStatement)(node);
  158588. }
  158589. }
  158590. blockNodes = [node];
  158591. }
  158592. return (0, _generated2.blockStatement)(blockNodes);
  158593. }
  158594. }
  158595. });
  158596. // node_modules/@babel/traverse/node_modules/@babel/helper-function-name/node_modules/@babel/types/lib/converters/ensureBlock.js
  158597. var require_ensureBlock7 = __commonJS({
  158598. "node_modules/@babel/traverse/node_modules/@babel/helper-function-name/node_modules/@babel/types/lib/converters/ensureBlock.js"(exports) {
  158599. "use strict";
  158600. Object.defineProperty(exports, "__esModule", {
  158601. value: true
  158602. });
  158603. exports.default = ensureBlock;
  158604. var _toBlock = require_toBlock7();
  158605. function ensureBlock(node, key = "body") {
  158606. return node[key] = (0, _toBlock.default)(node[key], node);
  158607. }
  158608. }
  158609. });
  158610. // node_modules/@babel/traverse/node_modules/@babel/helper-function-name/node_modules/@babel/types/lib/converters/toIdentifier.js
  158611. var require_toIdentifier7 = __commonJS({
  158612. "node_modules/@babel/traverse/node_modules/@babel/helper-function-name/node_modules/@babel/types/lib/converters/toIdentifier.js"(exports) {
  158613. "use strict";
  158614. Object.defineProperty(exports, "__esModule", {
  158615. value: true
  158616. });
  158617. exports.default = toIdentifier2;
  158618. var _isValidIdentifier = require_isValidIdentifier7();
  158619. var _helperValidatorIdentifier = require_lib19();
  158620. function toIdentifier2(input) {
  158621. input = input + "";
  158622. let name2 = "";
  158623. for (const c of input) {
  158624. name2 += (0, _helperValidatorIdentifier.isIdentifierChar)(c.codePointAt(0)) ? c : "-";
  158625. }
  158626. name2 = name2.replace(/^[-0-9]+/, "");
  158627. name2 = name2.replace(/[-\s]+(.)?/g, function(match, c) {
  158628. return c ? c.toUpperCase() : "";
  158629. });
  158630. if (!(0, _isValidIdentifier.default)(name2)) {
  158631. name2 = `_${name2}`;
  158632. }
  158633. return name2 || "_";
  158634. }
  158635. }
  158636. });
  158637. // node_modules/@babel/traverse/node_modules/@babel/helper-function-name/node_modules/@babel/types/lib/converters/toBindingIdentifierName.js
  158638. var require_toBindingIdentifierName7 = __commonJS({
  158639. "node_modules/@babel/traverse/node_modules/@babel/helper-function-name/node_modules/@babel/types/lib/converters/toBindingIdentifierName.js"(exports) {
  158640. "use strict";
  158641. Object.defineProperty(exports, "__esModule", {
  158642. value: true
  158643. });
  158644. exports.default = toBindingIdentifierName;
  158645. var _toIdentifier = require_toIdentifier7();
  158646. function toBindingIdentifierName(name2) {
  158647. name2 = (0, _toIdentifier.default)(name2);
  158648. if (name2 === "eval" || name2 === "arguments")
  158649. name2 = "_" + name2;
  158650. return name2;
  158651. }
  158652. }
  158653. });
  158654. // node_modules/@babel/traverse/node_modules/@babel/helper-function-name/node_modules/@babel/types/lib/converters/toComputedKey.js
  158655. var require_toComputedKey7 = __commonJS({
  158656. "node_modules/@babel/traverse/node_modules/@babel/helper-function-name/node_modules/@babel/types/lib/converters/toComputedKey.js"(exports) {
  158657. "use strict";
  158658. Object.defineProperty(exports, "__esModule", {
  158659. value: true
  158660. });
  158661. exports.default = toComputedKey;
  158662. var _generated = require_generated31();
  158663. var _generated2 = require_generated32();
  158664. function toComputedKey(node, key = node.key || node.property) {
  158665. if (!node.computed && (0, _generated.isIdentifier)(key))
  158666. key = (0, _generated2.stringLiteral)(key.name);
  158667. return key;
  158668. }
  158669. }
  158670. });
  158671. // node_modules/@babel/traverse/node_modules/@babel/helper-function-name/node_modules/@babel/types/lib/converters/toExpression.js
  158672. var require_toExpression7 = __commonJS({
  158673. "node_modules/@babel/traverse/node_modules/@babel/helper-function-name/node_modules/@babel/types/lib/converters/toExpression.js"(exports) {
  158674. "use strict";
  158675. Object.defineProperty(exports, "__esModule", {
  158676. value: true
  158677. });
  158678. exports.default = void 0;
  158679. var _generated = require_generated31();
  158680. var _default = toExpression;
  158681. exports.default = _default;
  158682. function toExpression(node) {
  158683. if ((0, _generated.isExpressionStatement)(node)) {
  158684. node = node.expression;
  158685. }
  158686. if ((0, _generated.isExpression)(node)) {
  158687. return node;
  158688. }
  158689. if ((0, _generated.isClass)(node)) {
  158690. node.type = "ClassExpression";
  158691. } else if ((0, _generated.isFunction)(node)) {
  158692. node.type = "FunctionExpression";
  158693. }
  158694. if (!(0, _generated.isExpression)(node)) {
  158695. throw new Error(`cannot turn ${node.type} to an expression`);
  158696. }
  158697. return node;
  158698. }
  158699. }
  158700. });
  158701. // node_modules/@babel/traverse/node_modules/@babel/helper-function-name/node_modules/@babel/types/lib/traverse/traverseFast.js
  158702. var require_traverseFast7 = __commonJS({
  158703. "node_modules/@babel/traverse/node_modules/@babel/helper-function-name/node_modules/@babel/types/lib/traverse/traverseFast.js"(exports) {
  158704. "use strict";
  158705. Object.defineProperty(exports, "__esModule", {
  158706. value: true
  158707. });
  158708. exports.default = traverseFast;
  158709. var _definitions = require_definitions7();
  158710. function traverseFast(node, enter, opts) {
  158711. if (!node)
  158712. return;
  158713. const keys2 = _definitions.VISITOR_KEYS[node.type];
  158714. if (!keys2)
  158715. return;
  158716. opts = opts || {};
  158717. enter(node, opts);
  158718. for (const key of keys2) {
  158719. const subNode = node[key];
  158720. if (Array.isArray(subNode)) {
  158721. for (const node2 of subNode) {
  158722. traverseFast(node2, enter, opts);
  158723. }
  158724. } else {
  158725. traverseFast(subNode, enter, opts);
  158726. }
  158727. }
  158728. }
  158729. }
  158730. });
  158731. // node_modules/@babel/traverse/node_modules/@babel/helper-function-name/node_modules/@babel/types/lib/modifications/removeProperties.js
  158732. var require_removeProperties7 = __commonJS({
  158733. "node_modules/@babel/traverse/node_modules/@babel/helper-function-name/node_modules/@babel/types/lib/modifications/removeProperties.js"(exports) {
  158734. "use strict";
  158735. Object.defineProperty(exports, "__esModule", {
  158736. value: true
  158737. });
  158738. exports.default = removeProperties;
  158739. var _constants = require_constants7();
  158740. var CLEAR_KEYS = ["tokens", "start", "end", "loc", "raw", "rawValue"];
  158741. var CLEAR_KEYS_PLUS_COMMENTS = _constants.COMMENT_KEYS.concat(["comments"]).concat(CLEAR_KEYS);
  158742. function removeProperties(node, opts = {}) {
  158743. const map = opts.preserveComments ? CLEAR_KEYS : CLEAR_KEYS_PLUS_COMMENTS;
  158744. for (const key of map) {
  158745. if (node[key] != null)
  158746. node[key] = void 0;
  158747. }
  158748. for (const key of Object.keys(node)) {
  158749. if (key[0] === "_" && node[key] != null)
  158750. node[key] = void 0;
  158751. }
  158752. const symbols = Object.getOwnPropertySymbols(node);
  158753. for (const sym of symbols) {
  158754. node[sym] = null;
  158755. }
  158756. }
  158757. }
  158758. });
  158759. // node_modules/@babel/traverse/node_modules/@babel/helper-function-name/node_modules/@babel/types/lib/modifications/removePropertiesDeep.js
  158760. var require_removePropertiesDeep7 = __commonJS({
  158761. "node_modules/@babel/traverse/node_modules/@babel/helper-function-name/node_modules/@babel/types/lib/modifications/removePropertiesDeep.js"(exports) {
  158762. "use strict";
  158763. Object.defineProperty(exports, "__esModule", {
  158764. value: true
  158765. });
  158766. exports.default = removePropertiesDeep;
  158767. var _traverseFast = require_traverseFast7();
  158768. var _removeProperties = require_removeProperties7();
  158769. function removePropertiesDeep(tree, opts) {
  158770. (0, _traverseFast.default)(tree, _removeProperties.default, opts);
  158771. return tree;
  158772. }
  158773. }
  158774. });
  158775. // node_modules/@babel/traverse/node_modules/@babel/helper-function-name/node_modules/@babel/types/lib/converters/toKeyAlias.js
  158776. var require_toKeyAlias7 = __commonJS({
  158777. "node_modules/@babel/traverse/node_modules/@babel/helper-function-name/node_modules/@babel/types/lib/converters/toKeyAlias.js"(exports) {
  158778. "use strict";
  158779. Object.defineProperty(exports, "__esModule", {
  158780. value: true
  158781. });
  158782. exports.default = toKeyAlias;
  158783. var _generated = require_generated31();
  158784. var _cloneNode = require_cloneNode7();
  158785. var _removePropertiesDeep = require_removePropertiesDeep7();
  158786. function toKeyAlias(node, key = node.key) {
  158787. let alias;
  158788. if (node.kind === "method") {
  158789. return toKeyAlias.increment() + "";
  158790. } else if ((0, _generated.isIdentifier)(key)) {
  158791. alias = key.name;
  158792. } else if ((0, _generated.isStringLiteral)(key)) {
  158793. alias = JSON.stringify(key.value);
  158794. } else {
  158795. alias = JSON.stringify((0, _removePropertiesDeep.default)((0, _cloneNode.default)(key)));
  158796. }
  158797. if (node.computed) {
  158798. alias = `[${alias}]`;
  158799. }
  158800. if (node.static) {
  158801. alias = `static:${alias}`;
  158802. }
  158803. return alias;
  158804. }
  158805. toKeyAlias.uid = 0;
  158806. toKeyAlias.increment = function() {
  158807. if (toKeyAlias.uid >= Number.MAX_SAFE_INTEGER) {
  158808. return toKeyAlias.uid = 0;
  158809. } else {
  158810. return toKeyAlias.uid++;
  158811. }
  158812. };
  158813. }
  158814. });
  158815. // node_modules/@babel/traverse/node_modules/@babel/helper-function-name/node_modules/@babel/types/lib/retrievers/getBindingIdentifiers.js
  158816. var require_getBindingIdentifiers7 = __commonJS({
  158817. "node_modules/@babel/traverse/node_modules/@babel/helper-function-name/node_modules/@babel/types/lib/retrievers/getBindingIdentifiers.js"(exports) {
  158818. "use strict";
  158819. Object.defineProperty(exports, "__esModule", {
  158820. value: true
  158821. });
  158822. exports.default = getBindingIdentifiers;
  158823. var _generated = require_generated31();
  158824. function getBindingIdentifiers(node, duplicates, outerOnly) {
  158825. let search2 = [].concat(node);
  158826. const ids = /* @__PURE__ */ Object.create(null);
  158827. while (search2.length) {
  158828. const id = search2.shift();
  158829. if (!id)
  158830. continue;
  158831. const keys2 = getBindingIdentifiers.keys[id.type];
  158832. if ((0, _generated.isIdentifier)(id)) {
  158833. if (duplicates) {
  158834. const _ids = ids[id.name] = ids[id.name] || [];
  158835. _ids.push(id);
  158836. } else {
  158837. ids[id.name] = id;
  158838. }
  158839. continue;
  158840. }
  158841. if ((0, _generated.isExportDeclaration)(id) && !(0, _generated.isExportAllDeclaration)(id)) {
  158842. if ((0, _generated.isDeclaration)(id.declaration)) {
  158843. search2.push(id.declaration);
  158844. }
  158845. continue;
  158846. }
  158847. if (outerOnly) {
  158848. if ((0, _generated.isFunctionDeclaration)(id)) {
  158849. search2.push(id.id);
  158850. continue;
  158851. }
  158852. if ((0, _generated.isFunctionExpression)(id)) {
  158853. continue;
  158854. }
  158855. }
  158856. if (keys2) {
  158857. for (let i = 0; i < keys2.length; i++) {
  158858. const key = keys2[i];
  158859. if (id[key]) {
  158860. search2 = search2.concat(id[key]);
  158861. }
  158862. }
  158863. }
  158864. }
  158865. return ids;
  158866. }
  158867. getBindingIdentifiers.keys = {
  158868. DeclareClass: ["id"],
  158869. DeclareFunction: ["id"],
  158870. DeclareModule: ["id"],
  158871. DeclareVariable: ["id"],
  158872. DeclareInterface: ["id"],
  158873. DeclareTypeAlias: ["id"],
  158874. DeclareOpaqueType: ["id"],
  158875. InterfaceDeclaration: ["id"],
  158876. TypeAlias: ["id"],
  158877. OpaqueType: ["id"],
  158878. CatchClause: ["param"],
  158879. LabeledStatement: ["label"],
  158880. UnaryExpression: ["argument"],
  158881. AssignmentExpression: ["left"],
  158882. ImportSpecifier: ["local"],
  158883. ImportNamespaceSpecifier: ["local"],
  158884. ImportDefaultSpecifier: ["local"],
  158885. ImportDeclaration: ["specifiers"],
  158886. ExportSpecifier: ["exported"],
  158887. ExportNamespaceSpecifier: ["exported"],
  158888. ExportDefaultSpecifier: ["exported"],
  158889. FunctionDeclaration: ["id", "params"],
  158890. FunctionExpression: ["id", "params"],
  158891. ArrowFunctionExpression: ["params"],
  158892. ObjectMethod: ["params"],
  158893. ClassMethod: ["params"],
  158894. ForInStatement: ["left"],
  158895. ForOfStatement: ["left"],
  158896. ClassDeclaration: ["id"],
  158897. ClassExpression: ["id"],
  158898. RestElement: ["argument"],
  158899. UpdateExpression: ["argument"],
  158900. ObjectProperty: ["value"],
  158901. AssignmentPattern: ["left"],
  158902. ArrayPattern: ["elements"],
  158903. ObjectPattern: ["properties"],
  158904. VariableDeclaration: ["declarations"],
  158905. VariableDeclarator: ["id"]
  158906. };
  158907. }
  158908. });
  158909. // node_modules/@babel/traverse/node_modules/@babel/helper-function-name/node_modules/@babel/types/lib/converters/gatherSequenceExpressions.js
  158910. var require_gatherSequenceExpressions7 = __commonJS({
  158911. "node_modules/@babel/traverse/node_modules/@babel/helper-function-name/node_modules/@babel/types/lib/converters/gatherSequenceExpressions.js"(exports) {
  158912. "use strict";
  158913. Object.defineProperty(exports, "__esModule", {
  158914. value: true
  158915. });
  158916. exports.default = gatherSequenceExpressions;
  158917. var _getBindingIdentifiers = require_getBindingIdentifiers7();
  158918. var _generated = require_generated31();
  158919. var _generated2 = require_generated32();
  158920. var _cloneNode = require_cloneNode7();
  158921. function gatherSequenceExpressions(nodes, scope, declars) {
  158922. const exprs = [];
  158923. let ensureLastUndefined = true;
  158924. for (const node of nodes) {
  158925. if (!(0, _generated.isEmptyStatement)(node)) {
  158926. ensureLastUndefined = false;
  158927. }
  158928. if ((0, _generated.isExpression)(node)) {
  158929. exprs.push(node);
  158930. } else if ((0, _generated.isExpressionStatement)(node)) {
  158931. exprs.push(node.expression);
  158932. } else if ((0, _generated.isVariableDeclaration)(node)) {
  158933. if (node.kind !== "var")
  158934. return;
  158935. for (const declar of node.declarations) {
  158936. const bindings = (0, _getBindingIdentifiers.default)(declar);
  158937. for (const key of Object.keys(bindings)) {
  158938. declars.push({
  158939. kind: node.kind,
  158940. id: (0, _cloneNode.default)(bindings[key])
  158941. });
  158942. }
  158943. if (declar.init) {
  158944. exprs.push((0, _generated2.assignmentExpression)("=", declar.id, declar.init));
  158945. }
  158946. }
  158947. ensureLastUndefined = true;
  158948. } else if ((0, _generated.isIfStatement)(node)) {
  158949. const consequent = node.consequent ? gatherSequenceExpressions([node.consequent], scope, declars) : scope.buildUndefinedNode();
  158950. const alternate = node.alternate ? gatherSequenceExpressions([node.alternate], scope, declars) : scope.buildUndefinedNode();
  158951. if (!consequent || !alternate)
  158952. return;
  158953. exprs.push((0, _generated2.conditionalExpression)(node.test, consequent, alternate));
  158954. } else if ((0, _generated.isBlockStatement)(node)) {
  158955. const body = gatherSequenceExpressions(node.body, scope, declars);
  158956. if (!body)
  158957. return;
  158958. exprs.push(body);
  158959. } else if ((0, _generated.isEmptyStatement)(node)) {
  158960. if (nodes.indexOf(node) === 0) {
  158961. ensureLastUndefined = true;
  158962. }
  158963. } else {
  158964. return;
  158965. }
  158966. }
  158967. if (ensureLastUndefined) {
  158968. exprs.push(scope.buildUndefinedNode());
  158969. }
  158970. if (exprs.length === 1) {
  158971. return exprs[0];
  158972. } else {
  158973. return (0, _generated2.sequenceExpression)(exprs);
  158974. }
  158975. }
  158976. }
  158977. });
  158978. // node_modules/@babel/traverse/node_modules/@babel/helper-function-name/node_modules/@babel/types/lib/converters/toSequenceExpression.js
  158979. var require_toSequenceExpression7 = __commonJS({
  158980. "node_modules/@babel/traverse/node_modules/@babel/helper-function-name/node_modules/@babel/types/lib/converters/toSequenceExpression.js"(exports) {
  158981. "use strict";
  158982. Object.defineProperty(exports, "__esModule", {
  158983. value: true
  158984. });
  158985. exports.default = toSequenceExpression;
  158986. var _gatherSequenceExpressions = require_gatherSequenceExpressions7();
  158987. function toSequenceExpression(nodes, scope) {
  158988. if (!(nodes != null && nodes.length))
  158989. return;
  158990. const declars = [];
  158991. const result = (0, _gatherSequenceExpressions.default)(nodes, scope, declars);
  158992. if (!result)
  158993. return;
  158994. for (const declar of declars) {
  158995. scope.push(declar);
  158996. }
  158997. return result;
  158998. }
  158999. }
  159000. });
  159001. // node_modules/@babel/traverse/node_modules/@babel/helper-function-name/node_modules/@babel/types/lib/converters/toStatement.js
  159002. var require_toStatement7 = __commonJS({
  159003. "node_modules/@babel/traverse/node_modules/@babel/helper-function-name/node_modules/@babel/types/lib/converters/toStatement.js"(exports) {
  159004. "use strict";
  159005. Object.defineProperty(exports, "__esModule", {
  159006. value: true
  159007. });
  159008. exports.default = void 0;
  159009. var _generated = require_generated31();
  159010. var _generated2 = require_generated32();
  159011. var _default = toStatement;
  159012. exports.default = _default;
  159013. function toStatement(node, ignore3) {
  159014. if ((0, _generated.isStatement)(node)) {
  159015. return node;
  159016. }
  159017. let mustHaveId = false;
  159018. let newType;
  159019. if ((0, _generated.isClass)(node)) {
  159020. mustHaveId = true;
  159021. newType = "ClassDeclaration";
  159022. } else if ((0, _generated.isFunction)(node)) {
  159023. mustHaveId = true;
  159024. newType = "FunctionDeclaration";
  159025. } else if ((0, _generated.isAssignmentExpression)(node)) {
  159026. return (0, _generated2.expressionStatement)(node);
  159027. }
  159028. if (mustHaveId && !node.id) {
  159029. newType = false;
  159030. }
  159031. if (!newType) {
  159032. if (ignore3) {
  159033. return false;
  159034. } else {
  159035. throw new Error(`cannot turn ${node.type} to a statement`);
  159036. }
  159037. }
  159038. node.type = newType;
  159039. return node;
  159040. }
  159041. }
  159042. });
  159043. // node_modules/@babel/traverse/node_modules/@babel/helper-function-name/node_modules/@babel/types/lib/converters/valueToNode.js
  159044. var require_valueToNode7 = __commonJS({
  159045. "node_modules/@babel/traverse/node_modules/@babel/helper-function-name/node_modules/@babel/types/lib/converters/valueToNode.js"(exports) {
  159046. "use strict";
  159047. Object.defineProperty(exports, "__esModule", {
  159048. value: true
  159049. });
  159050. exports.default = void 0;
  159051. var _isValidIdentifier = require_isValidIdentifier7();
  159052. var _generated = require_generated32();
  159053. var _default = valueToNode;
  159054. exports.default = _default;
  159055. var objectToString = Function.call.bind(Object.prototype.toString);
  159056. function isRegExp(value) {
  159057. return objectToString(value) === "[object RegExp]";
  159058. }
  159059. function isPlainObject2(value) {
  159060. if (typeof value !== "object" || value === null || Object.prototype.toString.call(value) !== "[object Object]") {
  159061. return false;
  159062. }
  159063. const proto = Object.getPrototypeOf(value);
  159064. return proto === null || Object.getPrototypeOf(proto) === null;
  159065. }
  159066. function valueToNode(value) {
  159067. if (value === void 0) {
  159068. return (0, _generated.identifier)("undefined");
  159069. }
  159070. if (value === true || value === false) {
  159071. return (0, _generated.booleanLiteral)(value);
  159072. }
  159073. if (value === null) {
  159074. return (0, _generated.nullLiteral)();
  159075. }
  159076. if (typeof value === "string") {
  159077. return (0, _generated.stringLiteral)(value);
  159078. }
  159079. if (typeof value === "number") {
  159080. let result;
  159081. if (Number.isFinite(value)) {
  159082. result = (0, _generated.numericLiteral)(Math.abs(value));
  159083. } else {
  159084. let numerator;
  159085. if (Number.isNaN(value)) {
  159086. numerator = (0, _generated.numericLiteral)(0);
  159087. } else {
  159088. numerator = (0, _generated.numericLiteral)(1);
  159089. }
  159090. result = (0, _generated.binaryExpression)("/", numerator, (0, _generated.numericLiteral)(0));
  159091. }
  159092. if (value < 0 || Object.is(value, -0)) {
  159093. result = (0, _generated.unaryExpression)("-", result);
  159094. }
  159095. return result;
  159096. }
  159097. if (isRegExp(value)) {
  159098. const pattern = value.source;
  159099. const flags = value.toString().match(/\/([a-z]+|)$/)[1];
  159100. return (0, _generated.regExpLiteral)(pattern, flags);
  159101. }
  159102. if (Array.isArray(value)) {
  159103. return (0, _generated.arrayExpression)(value.map(valueToNode));
  159104. }
  159105. if (isPlainObject2(value)) {
  159106. const props = [];
  159107. for (const key of Object.keys(value)) {
  159108. let nodeKey;
  159109. if ((0, _isValidIdentifier.default)(key)) {
  159110. nodeKey = (0, _generated.identifier)(key);
  159111. } else {
  159112. nodeKey = (0, _generated.stringLiteral)(key);
  159113. }
  159114. props.push((0, _generated.objectProperty)(nodeKey, valueToNode(value[key])));
  159115. }
  159116. return (0, _generated.objectExpression)(props);
  159117. }
  159118. throw new Error("don't know how to turn this value into a node");
  159119. }
  159120. }
  159121. });
  159122. // node_modules/@babel/traverse/node_modules/@babel/helper-function-name/node_modules/@babel/types/lib/modifications/appendToMemberExpression.js
  159123. var require_appendToMemberExpression7 = __commonJS({
  159124. "node_modules/@babel/traverse/node_modules/@babel/helper-function-name/node_modules/@babel/types/lib/modifications/appendToMemberExpression.js"(exports) {
  159125. "use strict";
  159126. Object.defineProperty(exports, "__esModule", {
  159127. value: true
  159128. });
  159129. exports.default = appendToMemberExpression;
  159130. var _generated = require_generated32();
  159131. function appendToMemberExpression(member, append, computed = false) {
  159132. member.object = (0, _generated.memberExpression)(member.object, member.property, member.computed);
  159133. member.property = append;
  159134. member.computed = !!computed;
  159135. return member;
  159136. }
  159137. }
  159138. });
  159139. // node_modules/@babel/traverse/node_modules/@babel/helper-function-name/node_modules/@babel/types/lib/modifications/inherits.js
  159140. var require_inherits7 = __commonJS({
  159141. "node_modules/@babel/traverse/node_modules/@babel/helper-function-name/node_modules/@babel/types/lib/modifications/inherits.js"(exports) {
  159142. "use strict";
  159143. Object.defineProperty(exports, "__esModule", {
  159144. value: true
  159145. });
  159146. exports.default = inherits;
  159147. var _constants = require_constants7();
  159148. var _inheritsComments = require_inheritsComments7();
  159149. function inherits(child, parent) {
  159150. if (!child || !parent)
  159151. return child;
  159152. for (const key of _constants.INHERIT_KEYS.optional) {
  159153. if (child[key] == null) {
  159154. child[key] = parent[key];
  159155. }
  159156. }
  159157. for (const key of Object.keys(parent)) {
  159158. if (key[0] === "_" && key !== "__clone")
  159159. child[key] = parent[key];
  159160. }
  159161. for (const key of _constants.INHERIT_KEYS.force) {
  159162. child[key] = parent[key];
  159163. }
  159164. (0, _inheritsComments.default)(child, parent);
  159165. return child;
  159166. }
  159167. }
  159168. });
  159169. // node_modules/@babel/traverse/node_modules/@babel/helper-function-name/node_modules/@babel/types/lib/modifications/prependToMemberExpression.js
  159170. var require_prependToMemberExpression7 = __commonJS({
  159171. "node_modules/@babel/traverse/node_modules/@babel/helper-function-name/node_modules/@babel/types/lib/modifications/prependToMemberExpression.js"(exports) {
  159172. "use strict";
  159173. Object.defineProperty(exports, "__esModule", {
  159174. value: true
  159175. });
  159176. exports.default = prependToMemberExpression;
  159177. var _generated = require_generated32();
  159178. function prependToMemberExpression(member, prepend) {
  159179. member.object = (0, _generated.memberExpression)(prepend, member.object);
  159180. return member;
  159181. }
  159182. }
  159183. });
  159184. // node_modules/@babel/traverse/node_modules/@babel/helper-function-name/node_modules/@babel/types/lib/retrievers/getOuterBindingIdentifiers.js
  159185. var require_getOuterBindingIdentifiers7 = __commonJS({
  159186. "node_modules/@babel/traverse/node_modules/@babel/helper-function-name/node_modules/@babel/types/lib/retrievers/getOuterBindingIdentifiers.js"(exports) {
  159187. "use strict";
  159188. Object.defineProperty(exports, "__esModule", {
  159189. value: true
  159190. });
  159191. exports.default = void 0;
  159192. var _getBindingIdentifiers = require_getBindingIdentifiers7();
  159193. var _default = getOuterBindingIdentifiers;
  159194. exports.default = _default;
  159195. function getOuterBindingIdentifiers(node, duplicates) {
  159196. return (0, _getBindingIdentifiers.default)(node, duplicates, true);
  159197. }
  159198. }
  159199. });
  159200. // node_modules/@babel/traverse/node_modules/@babel/helper-function-name/node_modules/@babel/types/lib/traverse/traverse.js
  159201. var require_traverse7 = __commonJS({
  159202. "node_modules/@babel/traverse/node_modules/@babel/helper-function-name/node_modules/@babel/types/lib/traverse/traverse.js"(exports) {
  159203. "use strict";
  159204. Object.defineProperty(exports, "__esModule", {
  159205. value: true
  159206. });
  159207. exports.default = traverse;
  159208. var _definitions = require_definitions7();
  159209. function traverse(node, handlers2, state) {
  159210. if (typeof handlers2 === "function") {
  159211. handlers2 = {
  159212. enter: handlers2
  159213. };
  159214. }
  159215. const {
  159216. enter,
  159217. exit: exit2
  159218. } = handlers2;
  159219. traverseSimpleImpl(node, enter, exit2, state, []);
  159220. }
  159221. function traverseSimpleImpl(node, enter, exit2, state, ancestors) {
  159222. const keys2 = _definitions.VISITOR_KEYS[node.type];
  159223. if (!keys2)
  159224. return;
  159225. if (enter)
  159226. enter(node, ancestors, state);
  159227. for (const key of keys2) {
  159228. const subNode = node[key];
  159229. if (Array.isArray(subNode)) {
  159230. for (let i = 0; i < subNode.length; i++) {
  159231. const child = subNode[i];
  159232. if (!child)
  159233. continue;
  159234. ancestors.push({
  159235. node,
  159236. key,
  159237. index: i
  159238. });
  159239. traverseSimpleImpl(child, enter, exit2, state, ancestors);
  159240. ancestors.pop();
  159241. }
  159242. } else if (subNode) {
  159243. ancestors.push({
  159244. node,
  159245. key
  159246. });
  159247. traverseSimpleImpl(subNode, enter, exit2, state, ancestors);
  159248. ancestors.pop();
  159249. }
  159250. }
  159251. if (exit2)
  159252. exit2(node, ancestors, state);
  159253. }
  159254. }
  159255. });
  159256. // node_modules/@babel/traverse/node_modules/@babel/helper-function-name/node_modules/@babel/types/lib/validators/isBinding.js
  159257. var require_isBinding7 = __commonJS({
  159258. "node_modules/@babel/traverse/node_modules/@babel/helper-function-name/node_modules/@babel/types/lib/validators/isBinding.js"(exports) {
  159259. "use strict";
  159260. Object.defineProperty(exports, "__esModule", {
  159261. value: true
  159262. });
  159263. exports.default = isBinding;
  159264. var _getBindingIdentifiers = require_getBindingIdentifiers7();
  159265. function isBinding(node, parent, grandparent) {
  159266. if (grandparent && node.type === "Identifier" && parent.type === "ObjectProperty" && grandparent.type === "ObjectExpression") {
  159267. return false;
  159268. }
  159269. const keys2 = _getBindingIdentifiers.default.keys[parent.type];
  159270. if (keys2) {
  159271. for (let i = 0; i < keys2.length; i++) {
  159272. const key = keys2[i];
  159273. const val = parent[key];
  159274. if (Array.isArray(val)) {
  159275. if (val.indexOf(node) >= 0)
  159276. return true;
  159277. } else {
  159278. if (val === node)
  159279. return true;
  159280. }
  159281. }
  159282. }
  159283. return false;
  159284. }
  159285. }
  159286. });
  159287. // node_modules/@babel/traverse/node_modules/@babel/helper-function-name/node_modules/@babel/types/lib/validators/isLet.js
  159288. var require_isLet7 = __commonJS({
  159289. "node_modules/@babel/traverse/node_modules/@babel/helper-function-name/node_modules/@babel/types/lib/validators/isLet.js"(exports) {
  159290. "use strict";
  159291. Object.defineProperty(exports, "__esModule", {
  159292. value: true
  159293. });
  159294. exports.default = isLet;
  159295. var _generated = require_generated31();
  159296. var _constants = require_constants7();
  159297. function isLet(node) {
  159298. return (0, _generated.isVariableDeclaration)(node) && (node.kind !== "var" || node[_constants.BLOCK_SCOPED_SYMBOL]);
  159299. }
  159300. }
  159301. });
  159302. // node_modules/@babel/traverse/node_modules/@babel/helper-function-name/node_modules/@babel/types/lib/validators/isBlockScoped.js
  159303. var require_isBlockScoped7 = __commonJS({
  159304. "node_modules/@babel/traverse/node_modules/@babel/helper-function-name/node_modules/@babel/types/lib/validators/isBlockScoped.js"(exports) {
  159305. "use strict";
  159306. Object.defineProperty(exports, "__esModule", {
  159307. value: true
  159308. });
  159309. exports.default = isBlockScoped;
  159310. var _generated = require_generated31();
  159311. var _isLet = require_isLet7();
  159312. function isBlockScoped(node) {
  159313. return (0, _generated.isFunctionDeclaration)(node) || (0, _generated.isClassDeclaration)(node) || (0, _isLet.default)(node);
  159314. }
  159315. }
  159316. });
  159317. // node_modules/@babel/traverse/node_modules/@babel/helper-function-name/node_modules/@babel/types/lib/validators/isImmutable.js
  159318. var require_isImmutable7 = __commonJS({
  159319. "node_modules/@babel/traverse/node_modules/@babel/helper-function-name/node_modules/@babel/types/lib/validators/isImmutable.js"(exports) {
  159320. "use strict";
  159321. Object.defineProperty(exports, "__esModule", {
  159322. value: true
  159323. });
  159324. exports.default = isImmutable;
  159325. var _isType = require_isType7();
  159326. var _generated = require_generated31();
  159327. function isImmutable(node) {
  159328. if ((0, _isType.default)(node.type, "Immutable"))
  159329. return true;
  159330. if ((0, _generated.isIdentifier)(node)) {
  159331. if (node.name === "undefined") {
  159332. return true;
  159333. } else {
  159334. return false;
  159335. }
  159336. }
  159337. return false;
  159338. }
  159339. }
  159340. });
  159341. // node_modules/@babel/traverse/node_modules/@babel/helper-function-name/node_modules/@babel/types/lib/validators/isNodesEquivalent.js
  159342. var require_isNodesEquivalent7 = __commonJS({
  159343. "node_modules/@babel/traverse/node_modules/@babel/helper-function-name/node_modules/@babel/types/lib/validators/isNodesEquivalent.js"(exports) {
  159344. "use strict";
  159345. Object.defineProperty(exports, "__esModule", {
  159346. value: true
  159347. });
  159348. exports.default = isNodesEquivalent;
  159349. var _definitions = require_definitions7();
  159350. function isNodesEquivalent(a, b) {
  159351. if (typeof a !== "object" || typeof b !== "object" || a == null || b == null) {
  159352. return a === b;
  159353. }
  159354. if (a.type !== b.type) {
  159355. return false;
  159356. }
  159357. const fields = Object.keys(_definitions.NODE_FIELDS[a.type] || a.type);
  159358. const visitorKeys = _definitions.VISITOR_KEYS[a.type];
  159359. for (const field of fields) {
  159360. if (typeof a[field] !== typeof b[field]) {
  159361. return false;
  159362. }
  159363. if (a[field] == null && b[field] == null) {
  159364. continue;
  159365. } else if (a[field] == null || b[field] == null) {
  159366. return false;
  159367. }
  159368. if (Array.isArray(a[field])) {
  159369. if (!Array.isArray(b[field])) {
  159370. return false;
  159371. }
  159372. if (a[field].length !== b[field].length) {
  159373. return false;
  159374. }
  159375. for (let i = 0; i < a[field].length; i++) {
  159376. if (!isNodesEquivalent(a[field][i], b[field][i])) {
  159377. return false;
  159378. }
  159379. }
  159380. continue;
  159381. }
  159382. if (typeof a[field] === "object" && !(visitorKeys != null && visitorKeys.includes(field))) {
  159383. for (const key of Object.keys(a[field])) {
  159384. if (a[field][key] !== b[field][key]) {
  159385. return false;
  159386. }
  159387. }
  159388. continue;
  159389. }
  159390. if (!isNodesEquivalent(a[field], b[field])) {
  159391. return false;
  159392. }
  159393. }
  159394. return true;
  159395. }
  159396. }
  159397. });
  159398. // node_modules/@babel/traverse/node_modules/@babel/helper-function-name/node_modules/@babel/types/lib/validators/isReferenced.js
  159399. var require_isReferenced7 = __commonJS({
  159400. "node_modules/@babel/traverse/node_modules/@babel/helper-function-name/node_modules/@babel/types/lib/validators/isReferenced.js"(exports) {
  159401. "use strict";
  159402. Object.defineProperty(exports, "__esModule", {
  159403. value: true
  159404. });
  159405. exports.default = isReferenced;
  159406. function isReferenced(node, parent, grandparent) {
  159407. switch (parent.type) {
  159408. case "MemberExpression":
  159409. case "JSXMemberExpression":
  159410. case "OptionalMemberExpression":
  159411. if (parent.property === node) {
  159412. return !!parent.computed;
  159413. }
  159414. return parent.object === node;
  159415. case "VariableDeclarator":
  159416. return parent.init === node;
  159417. case "ArrowFunctionExpression":
  159418. return parent.body === node;
  159419. case "PrivateName":
  159420. return false;
  159421. case "ClassMethod":
  159422. case "ClassPrivateMethod":
  159423. case "ObjectMethod":
  159424. if (parent.params.includes(node)) {
  159425. return false;
  159426. }
  159427. case "ObjectProperty":
  159428. case "ClassProperty":
  159429. case "ClassPrivateProperty":
  159430. if (parent.key === node) {
  159431. return !!parent.computed;
  159432. }
  159433. if (parent.value === node) {
  159434. return !grandparent || grandparent.type !== "ObjectPattern";
  159435. }
  159436. return true;
  159437. case "ClassDeclaration":
  159438. case "ClassExpression":
  159439. return parent.superClass === node;
  159440. case "AssignmentExpression":
  159441. return parent.right === node;
  159442. case "AssignmentPattern":
  159443. return parent.right === node;
  159444. case "LabeledStatement":
  159445. return false;
  159446. case "CatchClause":
  159447. return false;
  159448. case "RestElement":
  159449. return false;
  159450. case "BreakStatement":
  159451. case "ContinueStatement":
  159452. return false;
  159453. case "FunctionDeclaration":
  159454. case "FunctionExpression":
  159455. return false;
  159456. case "ExportNamespaceSpecifier":
  159457. case "ExportDefaultSpecifier":
  159458. return false;
  159459. case "ExportSpecifier":
  159460. if (grandparent != null && grandparent.source) {
  159461. return false;
  159462. }
  159463. return parent.local === node;
  159464. case "ImportDefaultSpecifier":
  159465. case "ImportNamespaceSpecifier":
  159466. case "ImportSpecifier":
  159467. return false;
  159468. case "JSXAttribute":
  159469. return false;
  159470. case "ObjectPattern":
  159471. case "ArrayPattern":
  159472. return false;
  159473. case "MetaProperty":
  159474. return false;
  159475. case "ObjectTypeProperty":
  159476. return parent.key !== node;
  159477. case "TSEnumMember":
  159478. return parent.id !== node;
  159479. case "TSPropertySignature":
  159480. if (parent.key === node) {
  159481. return !!parent.computed;
  159482. }
  159483. return true;
  159484. }
  159485. return true;
  159486. }
  159487. }
  159488. });
  159489. // node_modules/@babel/traverse/node_modules/@babel/helper-function-name/node_modules/@babel/types/lib/validators/isScope.js
  159490. var require_isScope7 = __commonJS({
  159491. "node_modules/@babel/traverse/node_modules/@babel/helper-function-name/node_modules/@babel/types/lib/validators/isScope.js"(exports) {
  159492. "use strict";
  159493. Object.defineProperty(exports, "__esModule", {
  159494. value: true
  159495. });
  159496. exports.default = isScope;
  159497. var _generated = require_generated31();
  159498. function isScope(node, parent) {
  159499. if ((0, _generated.isBlockStatement)(node) && ((0, _generated.isFunction)(parent) || (0, _generated.isCatchClause)(parent))) {
  159500. return false;
  159501. }
  159502. if ((0, _generated.isPattern)(node) && ((0, _generated.isFunction)(parent) || (0, _generated.isCatchClause)(parent))) {
  159503. return true;
  159504. }
  159505. return (0, _generated.isScopable)(node);
  159506. }
  159507. }
  159508. });
  159509. // node_modules/@babel/traverse/node_modules/@babel/helper-function-name/node_modules/@babel/types/lib/validators/isSpecifierDefault.js
  159510. var require_isSpecifierDefault7 = __commonJS({
  159511. "node_modules/@babel/traverse/node_modules/@babel/helper-function-name/node_modules/@babel/types/lib/validators/isSpecifierDefault.js"(exports) {
  159512. "use strict";
  159513. Object.defineProperty(exports, "__esModule", {
  159514. value: true
  159515. });
  159516. exports.default = isSpecifierDefault;
  159517. var _generated = require_generated31();
  159518. function isSpecifierDefault(specifier) {
  159519. return (0, _generated.isImportDefaultSpecifier)(specifier) || (0, _generated.isIdentifier)(specifier.imported || specifier.exported, {
  159520. name: "default"
  159521. });
  159522. }
  159523. }
  159524. });
  159525. // node_modules/@babel/traverse/node_modules/@babel/helper-function-name/node_modules/@babel/types/lib/validators/isValidES3Identifier.js
  159526. var require_isValidES3Identifier7 = __commonJS({
  159527. "node_modules/@babel/traverse/node_modules/@babel/helper-function-name/node_modules/@babel/types/lib/validators/isValidES3Identifier.js"(exports) {
  159528. "use strict";
  159529. Object.defineProperty(exports, "__esModule", {
  159530. value: true
  159531. });
  159532. exports.default = isValidES3Identifier;
  159533. var _isValidIdentifier = require_isValidIdentifier7();
  159534. var RESERVED_WORDS_ES3_ONLY = /* @__PURE__ */ new Set(["abstract", "boolean", "byte", "char", "double", "enum", "final", "float", "goto", "implements", "int", "interface", "long", "native", "package", "private", "protected", "public", "short", "static", "synchronized", "throws", "transient", "volatile"]);
  159535. function isValidES3Identifier(name2) {
  159536. return (0, _isValidIdentifier.default)(name2) && !RESERVED_WORDS_ES3_ONLY.has(name2);
  159537. }
  159538. }
  159539. });
  159540. // node_modules/@babel/traverse/node_modules/@babel/helper-function-name/node_modules/@babel/types/lib/validators/isVar.js
  159541. var require_isVar7 = __commonJS({
  159542. "node_modules/@babel/traverse/node_modules/@babel/helper-function-name/node_modules/@babel/types/lib/validators/isVar.js"(exports) {
  159543. "use strict";
  159544. Object.defineProperty(exports, "__esModule", {
  159545. value: true
  159546. });
  159547. exports.default = isVar;
  159548. var _generated = require_generated31();
  159549. var _constants = require_constants7();
  159550. function isVar(node) {
  159551. return (0, _generated.isVariableDeclaration)(node, {
  159552. kind: "var"
  159553. }) && !node[_constants.BLOCK_SCOPED_SYMBOL];
  159554. }
  159555. }
  159556. });
  159557. // node_modules/@babel/traverse/node_modules/@babel/helper-function-name/node_modules/@babel/types/lib/ast-types/generated/index.js
  159558. var require_generated35 = __commonJS({
  159559. "node_modules/@babel/traverse/node_modules/@babel/helper-function-name/node_modules/@babel/types/lib/ast-types/generated/index.js"() {
  159560. }
  159561. });
  159562. // node_modules/@babel/traverse/node_modules/@babel/helper-function-name/node_modules/@babel/types/lib/index.js
  159563. var require_lib35 = __commonJS({
  159564. "node_modules/@babel/traverse/node_modules/@babel/helper-function-name/node_modules/@babel/types/lib/index.js"(exports) {
  159565. "use strict";
  159566. Object.defineProperty(exports, "__esModule", {
  159567. value: true
  159568. });
  159569. var _exportNames = {
  159570. react: true,
  159571. assertNode: true,
  159572. createTypeAnnotationBasedOnTypeof: true,
  159573. createUnionTypeAnnotation: true,
  159574. createFlowUnionType: true,
  159575. createTSUnionType: true,
  159576. cloneNode: true,
  159577. clone: true,
  159578. cloneDeep: true,
  159579. cloneDeepWithoutLoc: true,
  159580. cloneWithoutLoc: true,
  159581. addComment: true,
  159582. addComments: true,
  159583. inheritInnerComments: true,
  159584. inheritLeadingComments: true,
  159585. inheritsComments: true,
  159586. inheritTrailingComments: true,
  159587. removeComments: true,
  159588. ensureBlock: true,
  159589. toBindingIdentifierName: true,
  159590. toBlock: true,
  159591. toComputedKey: true,
  159592. toExpression: true,
  159593. toIdentifier: true,
  159594. toKeyAlias: true,
  159595. toSequenceExpression: true,
  159596. toStatement: true,
  159597. valueToNode: true,
  159598. appendToMemberExpression: true,
  159599. inherits: true,
  159600. prependToMemberExpression: true,
  159601. removeProperties: true,
  159602. removePropertiesDeep: true,
  159603. removeTypeDuplicates: true,
  159604. getBindingIdentifiers: true,
  159605. getOuterBindingIdentifiers: true,
  159606. traverse: true,
  159607. traverseFast: true,
  159608. shallowEqual: true,
  159609. is: true,
  159610. isBinding: true,
  159611. isBlockScoped: true,
  159612. isImmutable: true,
  159613. isLet: true,
  159614. isNode: true,
  159615. isNodesEquivalent: true,
  159616. isPlaceholderType: true,
  159617. isReferenced: true,
  159618. isScope: true,
  159619. isSpecifierDefault: true,
  159620. isType: true,
  159621. isValidES3Identifier: true,
  159622. isValidIdentifier: true,
  159623. isVar: true,
  159624. matchesPattern: true,
  159625. validate: true,
  159626. buildMatchMemberExpression: true
  159627. };
  159628. Object.defineProperty(exports, "assertNode", {
  159629. enumerable: true,
  159630. get: function() {
  159631. return _assertNode.default;
  159632. }
  159633. });
  159634. Object.defineProperty(exports, "createTypeAnnotationBasedOnTypeof", {
  159635. enumerable: true,
  159636. get: function() {
  159637. return _createTypeAnnotationBasedOnTypeof.default;
  159638. }
  159639. });
  159640. Object.defineProperty(exports, "createUnionTypeAnnotation", {
  159641. enumerable: true,
  159642. get: function() {
  159643. return _createFlowUnionType.default;
  159644. }
  159645. });
  159646. Object.defineProperty(exports, "createFlowUnionType", {
  159647. enumerable: true,
  159648. get: function() {
  159649. return _createFlowUnionType.default;
  159650. }
  159651. });
  159652. Object.defineProperty(exports, "createTSUnionType", {
  159653. enumerable: true,
  159654. get: function() {
  159655. return _createTSUnionType.default;
  159656. }
  159657. });
  159658. Object.defineProperty(exports, "cloneNode", {
  159659. enumerable: true,
  159660. get: function() {
  159661. return _cloneNode.default;
  159662. }
  159663. });
  159664. Object.defineProperty(exports, "clone", {
  159665. enumerable: true,
  159666. get: function() {
  159667. return _clone.default;
  159668. }
  159669. });
  159670. Object.defineProperty(exports, "cloneDeep", {
  159671. enumerable: true,
  159672. get: function() {
  159673. return _cloneDeep.default;
  159674. }
  159675. });
  159676. Object.defineProperty(exports, "cloneDeepWithoutLoc", {
  159677. enumerable: true,
  159678. get: function() {
  159679. return _cloneDeepWithoutLoc.default;
  159680. }
  159681. });
  159682. Object.defineProperty(exports, "cloneWithoutLoc", {
  159683. enumerable: true,
  159684. get: function() {
  159685. return _cloneWithoutLoc.default;
  159686. }
  159687. });
  159688. Object.defineProperty(exports, "addComment", {
  159689. enumerable: true,
  159690. get: function() {
  159691. return _addComment.default;
  159692. }
  159693. });
  159694. Object.defineProperty(exports, "addComments", {
  159695. enumerable: true,
  159696. get: function() {
  159697. return _addComments.default;
  159698. }
  159699. });
  159700. Object.defineProperty(exports, "inheritInnerComments", {
  159701. enumerable: true,
  159702. get: function() {
  159703. return _inheritInnerComments.default;
  159704. }
  159705. });
  159706. Object.defineProperty(exports, "inheritLeadingComments", {
  159707. enumerable: true,
  159708. get: function() {
  159709. return _inheritLeadingComments.default;
  159710. }
  159711. });
  159712. Object.defineProperty(exports, "inheritsComments", {
  159713. enumerable: true,
  159714. get: function() {
  159715. return _inheritsComments.default;
  159716. }
  159717. });
  159718. Object.defineProperty(exports, "inheritTrailingComments", {
  159719. enumerable: true,
  159720. get: function() {
  159721. return _inheritTrailingComments.default;
  159722. }
  159723. });
  159724. Object.defineProperty(exports, "removeComments", {
  159725. enumerable: true,
  159726. get: function() {
  159727. return _removeComments.default;
  159728. }
  159729. });
  159730. Object.defineProperty(exports, "ensureBlock", {
  159731. enumerable: true,
  159732. get: function() {
  159733. return _ensureBlock.default;
  159734. }
  159735. });
  159736. Object.defineProperty(exports, "toBindingIdentifierName", {
  159737. enumerable: true,
  159738. get: function() {
  159739. return _toBindingIdentifierName.default;
  159740. }
  159741. });
  159742. Object.defineProperty(exports, "toBlock", {
  159743. enumerable: true,
  159744. get: function() {
  159745. return _toBlock.default;
  159746. }
  159747. });
  159748. Object.defineProperty(exports, "toComputedKey", {
  159749. enumerable: true,
  159750. get: function() {
  159751. return _toComputedKey.default;
  159752. }
  159753. });
  159754. Object.defineProperty(exports, "toExpression", {
  159755. enumerable: true,
  159756. get: function() {
  159757. return _toExpression.default;
  159758. }
  159759. });
  159760. Object.defineProperty(exports, "toIdentifier", {
  159761. enumerable: true,
  159762. get: function() {
  159763. return _toIdentifier.default;
  159764. }
  159765. });
  159766. Object.defineProperty(exports, "toKeyAlias", {
  159767. enumerable: true,
  159768. get: function() {
  159769. return _toKeyAlias.default;
  159770. }
  159771. });
  159772. Object.defineProperty(exports, "toSequenceExpression", {
  159773. enumerable: true,
  159774. get: function() {
  159775. return _toSequenceExpression.default;
  159776. }
  159777. });
  159778. Object.defineProperty(exports, "toStatement", {
  159779. enumerable: true,
  159780. get: function() {
  159781. return _toStatement.default;
  159782. }
  159783. });
  159784. Object.defineProperty(exports, "valueToNode", {
  159785. enumerable: true,
  159786. get: function() {
  159787. return _valueToNode.default;
  159788. }
  159789. });
  159790. Object.defineProperty(exports, "appendToMemberExpression", {
  159791. enumerable: true,
  159792. get: function() {
  159793. return _appendToMemberExpression.default;
  159794. }
  159795. });
  159796. Object.defineProperty(exports, "inherits", {
  159797. enumerable: true,
  159798. get: function() {
  159799. return _inherits.default;
  159800. }
  159801. });
  159802. Object.defineProperty(exports, "prependToMemberExpression", {
  159803. enumerable: true,
  159804. get: function() {
  159805. return _prependToMemberExpression.default;
  159806. }
  159807. });
  159808. Object.defineProperty(exports, "removeProperties", {
  159809. enumerable: true,
  159810. get: function() {
  159811. return _removeProperties.default;
  159812. }
  159813. });
  159814. Object.defineProperty(exports, "removePropertiesDeep", {
  159815. enumerable: true,
  159816. get: function() {
  159817. return _removePropertiesDeep.default;
  159818. }
  159819. });
  159820. Object.defineProperty(exports, "removeTypeDuplicates", {
  159821. enumerable: true,
  159822. get: function() {
  159823. return _removeTypeDuplicates.default;
  159824. }
  159825. });
  159826. Object.defineProperty(exports, "getBindingIdentifiers", {
  159827. enumerable: true,
  159828. get: function() {
  159829. return _getBindingIdentifiers.default;
  159830. }
  159831. });
  159832. Object.defineProperty(exports, "getOuterBindingIdentifiers", {
  159833. enumerable: true,
  159834. get: function() {
  159835. return _getOuterBindingIdentifiers.default;
  159836. }
  159837. });
  159838. Object.defineProperty(exports, "traverse", {
  159839. enumerable: true,
  159840. get: function() {
  159841. return _traverse.default;
  159842. }
  159843. });
  159844. Object.defineProperty(exports, "traverseFast", {
  159845. enumerable: true,
  159846. get: function() {
  159847. return _traverseFast.default;
  159848. }
  159849. });
  159850. Object.defineProperty(exports, "shallowEqual", {
  159851. enumerable: true,
  159852. get: function() {
  159853. return _shallowEqual.default;
  159854. }
  159855. });
  159856. Object.defineProperty(exports, "is", {
  159857. enumerable: true,
  159858. get: function() {
  159859. return _is.default;
  159860. }
  159861. });
  159862. Object.defineProperty(exports, "isBinding", {
  159863. enumerable: true,
  159864. get: function() {
  159865. return _isBinding.default;
  159866. }
  159867. });
  159868. Object.defineProperty(exports, "isBlockScoped", {
  159869. enumerable: true,
  159870. get: function() {
  159871. return _isBlockScoped.default;
  159872. }
  159873. });
  159874. Object.defineProperty(exports, "isImmutable", {
  159875. enumerable: true,
  159876. get: function() {
  159877. return _isImmutable.default;
  159878. }
  159879. });
  159880. Object.defineProperty(exports, "isLet", {
  159881. enumerable: true,
  159882. get: function() {
  159883. return _isLet.default;
  159884. }
  159885. });
  159886. Object.defineProperty(exports, "isNode", {
  159887. enumerable: true,
  159888. get: function() {
  159889. return _isNode.default;
  159890. }
  159891. });
  159892. Object.defineProperty(exports, "isNodesEquivalent", {
  159893. enumerable: true,
  159894. get: function() {
  159895. return _isNodesEquivalent.default;
  159896. }
  159897. });
  159898. Object.defineProperty(exports, "isPlaceholderType", {
  159899. enumerable: true,
  159900. get: function() {
  159901. return _isPlaceholderType.default;
  159902. }
  159903. });
  159904. Object.defineProperty(exports, "isReferenced", {
  159905. enumerable: true,
  159906. get: function() {
  159907. return _isReferenced.default;
  159908. }
  159909. });
  159910. Object.defineProperty(exports, "isScope", {
  159911. enumerable: true,
  159912. get: function() {
  159913. return _isScope.default;
  159914. }
  159915. });
  159916. Object.defineProperty(exports, "isSpecifierDefault", {
  159917. enumerable: true,
  159918. get: function() {
  159919. return _isSpecifierDefault.default;
  159920. }
  159921. });
  159922. Object.defineProperty(exports, "isType", {
  159923. enumerable: true,
  159924. get: function() {
  159925. return _isType.default;
  159926. }
  159927. });
  159928. Object.defineProperty(exports, "isValidES3Identifier", {
  159929. enumerable: true,
  159930. get: function() {
  159931. return _isValidES3Identifier.default;
  159932. }
  159933. });
  159934. Object.defineProperty(exports, "isValidIdentifier", {
  159935. enumerable: true,
  159936. get: function() {
  159937. return _isValidIdentifier.default;
  159938. }
  159939. });
  159940. Object.defineProperty(exports, "isVar", {
  159941. enumerable: true,
  159942. get: function() {
  159943. return _isVar.default;
  159944. }
  159945. });
  159946. Object.defineProperty(exports, "matchesPattern", {
  159947. enumerable: true,
  159948. get: function() {
  159949. return _matchesPattern.default;
  159950. }
  159951. });
  159952. Object.defineProperty(exports, "validate", {
  159953. enumerable: true,
  159954. get: function() {
  159955. return _validate.default;
  159956. }
  159957. });
  159958. Object.defineProperty(exports, "buildMatchMemberExpression", {
  159959. enumerable: true,
  159960. get: function() {
  159961. return _buildMatchMemberExpression.default;
  159962. }
  159963. });
  159964. exports.react = void 0;
  159965. var _isReactComponent = require_isReactComponent7();
  159966. var _isCompatTag = require_isCompatTag7();
  159967. var _buildChildren = require_buildChildren7();
  159968. var _assertNode = require_assertNode7();
  159969. var _generated = require_generated33();
  159970. Object.keys(_generated).forEach(function(key) {
  159971. if (key === "default" || key === "__esModule")
  159972. return;
  159973. if (Object.prototype.hasOwnProperty.call(_exportNames, key))
  159974. return;
  159975. if (key in exports && exports[key] === _generated[key])
  159976. return;
  159977. Object.defineProperty(exports, key, {
  159978. enumerable: true,
  159979. get: function() {
  159980. return _generated[key];
  159981. }
  159982. });
  159983. });
  159984. var _createTypeAnnotationBasedOnTypeof = require_createTypeAnnotationBasedOnTypeof7();
  159985. var _createFlowUnionType = require_createFlowUnionType7();
  159986. var _createTSUnionType = require_createTSUnionType7();
  159987. var _generated2 = require_generated32();
  159988. Object.keys(_generated2).forEach(function(key) {
  159989. if (key === "default" || key === "__esModule")
  159990. return;
  159991. if (Object.prototype.hasOwnProperty.call(_exportNames, key))
  159992. return;
  159993. if (key in exports && exports[key] === _generated2[key])
  159994. return;
  159995. Object.defineProperty(exports, key, {
  159996. enumerable: true,
  159997. get: function() {
  159998. return _generated2[key];
  159999. }
  160000. });
  160001. });
  160002. var _uppercase = require_uppercase7();
  160003. Object.keys(_uppercase).forEach(function(key) {
  160004. if (key === "default" || key === "__esModule")
  160005. return;
  160006. if (Object.prototype.hasOwnProperty.call(_exportNames, key))
  160007. return;
  160008. if (key in exports && exports[key] === _uppercase[key])
  160009. return;
  160010. Object.defineProperty(exports, key, {
  160011. enumerable: true,
  160012. get: function() {
  160013. return _uppercase[key];
  160014. }
  160015. });
  160016. });
  160017. var _cloneNode = require_cloneNode7();
  160018. var _clone = require_clone7();
  160019. var _cloneDeep = require_cloneDeep7();
  160020. var _cloneDeepWithoutLoc = require_cloneDeepWithoutLoc7();
  160021. var _cloneWithoutLoc = require_cloneWithoutLoc7();
  160022. var _addComment = require_addComment7();
  160023. var _addComments = require_addComments7();
  160024. var _inheritInnerComments = require_inheritInnerComments7();
  160025. var _inheritLeadingComments = require_inheritLeadingComments7();
  160026. var _inheritsComments = require_inheritsComments7();
  160027. var _inheritTrailingComments = require_inheritTrailingComments7();
  160028. var _removeComments = require_removeComments7();
  160029. var _generated3 = require_generated34();
  160030. Object.keys(_generated3).forEach(function(key) {
  160031. if (key === "default" || key === "__esModule")
  160032. return;
  160033. if (Object.prototype.hasOwnProperty.call(_exportNames, key))
  160034. return;
  160035. if (key in exports && exports[key] === _generated3[key])
  160036. return;
  160037. Object.defineProperty(exports, key, {
  160038. enumerable: true,
  160039. get: function() {
  160040. return _generated3[key];
  160041. }
  160042. });
  160043. });
  160044. var _constants = require_constants7();
  160045. Object.keys(_constants).forEach(function(key) {
  160046. if (key === "default" || key === "__esModule")
  160047. return;
  160048. if (Object.prototype.hasOwnProperty.call(_exportNames, key))
  160049. return;
  160050. if (key in exports && exports[key] === _constants[key])
  160051. return;
  160052. Object.defineProperty(exports, key, {
  160053. enumerable: true,
  160054. get: function() {
  160055. return _constants[key];
  160056. }
  160057. });
  160058. });
  160059. var _ensureBlock = require_ensureBlock7();
  160060. var _toBindingIdentifierName = require_toBindingIdentifierName7();
  160061. var _toBlock = require_toBlock7();
  160062. var _toComputedKey = require_toComputedKey7();
  160063. var _toExpression = require_toExpression7();
  160064. var _toIdentifier = require_toIdentifier7();
  160065. var _toKeyAlias = require_toKeyAlias7();
  160066. var _toSequenceExpression = require_toSequenceExpression7();
  160067. var _toStatement = require_toStatement7();
  160068. var _valueToNode = require_valueToNode7();
  160069. var _definitions = require_definitions7();
  160070. Object.keys(_definitions).forEach(function(key) {
  160071. if (key === "default" || key === "__esModule")
  160072. return;
  160073. if (Object.prototype.hasOwnProperty.call(_exportNames, key))
  160074. return;
  160075. if (key in exports && exports[key] === _definitions[key])
  160076. return;
  160077. Object.defineProperty(exports, key, {
  160078. enumerable: true,
  160079. get: function() {
  160080. return _definitions[key];
  160081. }
  160082. });
  160083. });
  160084. var _appendToMemberExpression = require_appendToMemberExpression7();
  160085. var _inherits = require_inherits7();
  160086. var _prependToMemberExpression = require_prependToMemberExpression7();
  160087. var _removeProperties = require_removeProperties7();
  160088. var _removePropertiesDeep = require_removePropertiesDeep7();
  160089. var _removeTypeDuplicates = require_removeTypeDuplicates13();
  160090. var _getBindingIdentifiers = require_getBindingIdentifiers7();
  160091. var _getOuterBindingIdentifiers = require_getOuterBindingIdentifiers7();
  160092. var _traverse = require_traverse7();
  160093. Object.keys(_traverse).forEach(function(key) {
  160094. if (key === "default" || key === "__esModule")
  160095. return;
  160096. if (Object.prototype.hasOwnProperty.call(_exportNames, key))
  160097. return;
  160098. if (key in exports && exports[key] === _traverse[key])
  160099. return;
  160100. Object.defineProperty(exports, key, {
  160101. enumerable: true,
  160102. get: function() {
  160103. return _traverse[key];
  160104. }
  160105. });
  160106. });
  160107. var _traverseFast = require_traverseFast7();
  160108. var _shallowEqual = require_shallowEqual7();
  160109. var _is = require_is7();
  160110. var _isBinding = require_isBinding7();
  160111. var _isBlockScoped = require_isBlockScoped7();
  160112. var _isImmutable = require_isImmutable7();
  160113. var _isLet = require_isLet7();
  160114. var _isNode = require_isNode7();
  160115. var _isNodesEquivalent = require_isNodesEquivalent7();
  160116. var _isPlaceholderType = require_isPlaceholderType7();
  160117. var _isReferenced = require_isReferenced7();
  160118. var _isScope = require_isScope7();
  160119. var _isSpecifierDefault = require_isSpecifierDefault7();
  160120. var _isType = require_isType7();
  160121. var _isValidES3Identifier = require_isValidES3Identifier7();
  160122. var _isValidIdentifier = require_isValidIdentifier7();
  160123. var _isVar = require_isVar7();
  160124. var _matchesPattern = require_matchesPattern7();
  160125. var _validate = require_validate7();
  160126. var _buildMatchMemberExpression = require_buildMatchMemberExpression7();
  160127. var _generated4 = require_generated31();
  160128. Object.keys(_generated4).forEach(function(key) {
  160129. if (key === "default" || key === "__esModule")
  160130. return;
  160131. if (Object.prototype.hasOwnProperty.call(_exportNames, key))
  160132. return;
  160133. if (key in exports && exports[key] === _generated4[key])
  160134. return;
  160135. Object.defineProperty(exports, key, {
  160136. enumerable: true,
  160137. get: function() {
  160138. return _generated4[key];
  160139. }
  160140. });
  160141. });
  160142. var _generated5 = require_generated35();
  160143. Object.keys(_generated5).forEach(function(key) {
  160144. if (key === "default" || key === "__esModule")
  160145. return;
  160146. if (Object.prototype.hasOwnProperty.call(_exportNames, key))
  160147. return;
  160148. if (key in exports && exports[key] === _generated5[key])
  160149. return;
  160150. Object.defineProperty(exports, key, {
  160151. enumerable: true,
  160152. get: function() {
  160153. return _generated5[key];
  160154. }
  160155. });
  160156. });
  160157. var react = {
  160158. isReactComponent: _isReactComponent.default,
  160159. isCompatTag: _isCompatTag.default,
  160160. buildChildren: _buildChildren.default
  160161. };
  160162. exports.react = react;
  160163. }
  160164. });
  160165. // node_modules/@babel/traverse/node_modules/@babel/helper-function-name/lib/index.js
  160166. var require_lib36 = __commonJS({
  160167. "node_modules/@babel/traverse/node_modules/@babel/helper-function-name/lib/index.js"(exports) {
  160168. "use strict";
  160169. Object.defineProperty(exports, "__esModule", {
  160170. value: true
  160171. });
  160172. exports.default = _default;
  160173. var _helperGetFunctionArity = require_lib28();
  160174. var _template = require_lib34();
  160175. var t2 = require_lib35();
  160176. var buildPropertyMethodAssignmentWrapper = (0, _template.default)(`
  160177. (function (FUNCTION_KEY) {
  160178. function FUNCTION_ID() {
  160179. return FUNCTION_KEY.apply(this, arguments);
  160180. }
  160181. FUNCTION_ID.toString = function () {
  160182. return FUNCTION_KEY.toString();
  160183. }
  160184. return FUNCTION_ID;
  160185. })(FUNCTION)
  160186. `);
  160187. var buildGeneratorPropertyMethodAssignmentWrapper = (0, _template.default)(`
  160188. (function (FUNCTION_KEY) {
  160189. function* FUNCTION_ID() {
  160190. return yield* FUNCTION_KEY.apply(this, arguments);
  160191. }
  160192. FUNCTION_ID.toString = function () {
  160193. return FUNCTION_KEY.toString();
  160194. };
  160195. return FUNCTION_ID;
  160196. })(FUNCTION)
  160197. `);
  160198. var visitor = {
  160199. "ReferencedIdentifier|BindingIdentifier"(path, state) {
  160200. if (path.node.name !== state.name)
  160201. return;
  160202. const localDeclar = path.scope.getBindingIdentifier(state.name);
  160203. if (localDeclar !== state.outerDeclar)
  160204. return;
  160205. state.selfReference = true;
  160206. path.stop();
  160207. }
  160208. };
  160209. function getNameFromLiteralId(id) {
  160210. if (t2.isNullLiteral(id)) {
  160211. return "null";
  160212. }
  160213. if (t2.isRegExpLiteral(id)) {
  160214. return `_${id.pattern}_${id.flags}`;
  160215. }
  160216. if (t2.isTemplateLiteral(id)) {
  160217. return id.quasis.map((quasi) => quasi.value.raw).join("");
  160218. }
  160219. if (id.value !== void 0) {
  160220. return id.value + "";
  160221. }
  160222. return "";
  160223. }
  160224. function wrap3(state, method, id, scope) {
  160225. if (state.selfReference) {
  160226. if (scope.hasBinding(id.name) && !scope.hasGlobal(id.name)) {
  160227. scope.rename(id.name);
  160228. } else {
  160229. if (!t2.isFunction(method))
  160230. return;
  160231. let build = buildPropertyMethodAssignmentWrapper;
  160232. if (method.generator) {
  160233. build = buildGeneratorPropertyMethodAssignmentWrapper;
  160234. }
  160235. const template = build({
  160236. FUNCTION: method,
  160237. FUNCTION_ID: id,
  160238. FUNCTION_KEY: scope.generateUidIdentifier(id.name)
  160239. }).expression;
  160240. const params = template.callee.body.body[0].params;
  160241. for (let i = 0, len = (0, _helperGetFunctionArity.default)(method); i < len; i++) {
  160242. params.push(scope.generateUidIdentifier("x"));
  160243. }
  160244. return template;
  160245. }
  160246. }
  160247. method.id = id;
  160248. scope.getProgramParent().references[id.name] = true;
  160249. }
  160250. function visit4(node, name2, scope) {
  160251. const state = {
  160252. selfAssignment: false,
  160253. selfReference: false,
  160254. outerDeclar: scope.getBindingIdentifier(name2),
  160255. references: [],
  160256. name: name2
  160257. };
  160258. const binding = scope.getOwnBinding(name2);
  160259. if (binding) {
  160260. if (binding.kind === "param") {
  160261. state.selfReference = true;
  160262. } else {
  160263. }
  160264. } else if (state.outerDeclar || scope.hasGlobal(name2)) {
  160265. scope.traverse(node, visitor, state);
  160266. }
  160267. return state;
  160268. }
  160269. function _default({
  160270. node,
  160271. parent,
  160272. scope,
  160273. id
  160274. }, localBinding = false) {
  160275. if (node.id)
  160276. return;
  160277. if ((t2.isObjectProperty(parent) || t2.isObjectMethod(parent, {
  160278. kind: "method"
  160279. })) && (!parent.computed || t2.isLiteral(parent.key))) {
  160280. id = parent.key;
  160281. } else if (t2.isVariableDeclarator(parent)) {
  160282. id = parent.id;
  160283. if (t2.isIdentifier(id) && !localBinding) {
  160284. const binding = scope.parent.getBinding(id.name);
  160285. if (binding && binding.constant && scope.getBinding(id.name) === binding) {
  160286. node.id = t2.cloneNode(id);
  160287. node.id[t2.NOT_LOCAL_BINDING] = true;
  160288. return;
  160289. }
  160290. }
  160291. } else if (t2.isAssignmentExpression(parent, {
  160292. operator: "="
  160293. })) {
  160294. id = parent.left;
  160295. } else if (!id) {
  160296. return;
  160297. }
  160298. let name2;
  160299. if (id && t2.isLiteral(id)) {
  160300. name2 = getNameFromLiteralId(id);
  160301. } else if (id && t2.isIdentifier(id)) {
  160302. name2 = id.name;
  160303. }
  160304. if (name2 === void 0) {
  160305. return;
  160306. }
  160307. name2 = t2.toBindingIdentifierName(name2);
  160308. id = t2.identifier(name2);
  160309. id[t2.NOT_LOCAL_BINDING] = true;
  160310. const state = visit4(node, name2, scope);
  160311. return wrap3(state, node, id, scope) || node;
  160312. }
  160313. }
  160314. });
  160315. // node_modules/@babel/traverse/lib/path/conversion.js
  160316. var require_conversion2 = __commonJS({
  160317. "node_modules/@babel/traverse/lib/path/conversion.js"(exports) {
  160318. "use strict";
  160319. Object.defineProperty(exports, "__esModule", {
  160320. value: true
  160321. });
  160322. exports.toComputedKey = toComputedKey;
  160323. exports.ensureBlock = ensureBlock;
  160324. exports.arrowFunctionToShadowed = arrowFunctionToShadowed;
  160325. exports.unwrapFunctionEnvironment = unwrapFunctionEnvironment;
  160326. exports.arrowFunctionToExpression = arrowFunctionToExpression;
  160327. var t2 = require_lib2();
  160328. var _helperFunctionName = require_lib36();
  160329. function toComputedKey() {
  160330. let key;
  160331. if (this.isMemberExpression()) {
  160332. key = this.node.property;
  160333. } else if (this.isProperty() || this.isMethod()) {
  160334. key = this.node.key;
  160335. } else {
  160336. throw new ReferenceError("todo");
  160337. }
  160338. if (!this.node.computed) {
  160339. if (t2.isIdentifier(key))
  160340. key = t2.stringLiteral(key.name);
  160341. }
  160342. return key;
  160343. }
  160344. function ensureBlock() {
  160345. const body = this.get("body");
  160346. const bodyNode = body.node;
  160347. if (Array.isArray(body)) {
  160348. throw new Error("Can't convert array path to a block statement");
  160349. }
  160350. if (!bodyNode) {
  160351. throw new Error("Can't convert node without a body");
  160352. }
  160353. if (body.isBlockStatement()) {
  160354. return bodyNode;
  160355. }
  160356. const statements = [];
  160357. let stringPath = "body";
  160358. let key;
  160359. let listKey;
  160360. if (body.isStatement()) {
  160361. listKey = "body";
  160362. key = 0;
  160363. statements.push(body.node);
  160364. } else {
  160365. stringPath += ".body.0";
  160366. if (this.isFunction()) {
  160367. key = "argument";
  160368. statements.push(t2.returnStatement(body.node));
  160369. } else {
  160370. key = "expression";
  160371. statements.push(t2.expressionStatement(body.node));
  160372. }
  160373. }
  160374. this.node.body = t2.blockStatement(statements);
  160375. const parentPath = this.get(stringPath);
  160376. body.setup(parentPath, listKey ? parentPath.node[listKey] : parentPath.node, listKey, key);
  160377. return this.node;
  160378. }
  160379. function arrowFunctionToShadowed() {
  160380. if (!this.isArrowFunctionExpression())
  160381. return;
  160382. this.arrowFunctionToExpression();
  160383. }
  160384. function unwrapFunctionEnvironment() {
  160385. if (!this.isArrowFunctionExpression() && !this.isFunctionExpression() && !this.isFunctionDeclaration()) {
  160386. throw this.buildCodeFrameError("Can only unwrap the environment of a function.");
  160387. }
  160388. hoistFunctionEnvironment(this);
  160389. }
  160390. function arrowFunctionToExpression({
  160391. allowInsertArrow = true,
  160392. specCompliant = false,
  160393. noNewArrows = !specCompliant
  160394. } = {}) {
  160395. if (!this.isArrowFunctionExpression()) {
  160396. throw this.buildCodeFrameError("Cannot convert non-arrow function to a function expression.");
  160397. }
  160398. const thisBinding = hoistFunctionEnvironment(this, noNewArrows, allowInsertArrow);
  160399. this.ensureBlock();
  160400. this.node.type = "FunctionExpression";
  160401. if (!noNewArrows) {
  160402. const checkBinding = thisBinding ? null : this.parentPath.scope.generateUidIdentifier("arrowCheckId");
  160403. if (checkBinding) {
  160404. this.parentPath.scope.push({
  160405. id: checkBinding,
  160406. init: t2.objectExpression([])
  160407. });
  160408. }
  160409. this.get("body").unshiftContainer("body", t2.expressionStatement(t2.callExpression(this.hub.addHelper("newArrowCheck"), [t2.thisExpression(), checkBinding ? t2.identifier(checkBinding.name) : t2.identifier(thisBinding)])));
  160410. this.replaceWith(t2.callExpression(t2.memberExpression((0, _helperFunctionName.default)(this, true) || this.node, t2.identifier("bind")), [checkBinding ? t2.identifier(checkBinding.name) : t2.thisExpression()]));
  160411. }
  160412. }
  160413. function hoistFunctionEnvironment(fnPath, noNewArrows = true, allowInsertArrow = true) {
  160414. const thisEnvFn = fnPath.findParent((p) => {
  160415. return p.isFunction() && !p.isArrowFunctionExpression() || p.isProgram() || p.isClassProperty({
  160416. static: false
  160417. });
  160418. });
  160419. const inConstructor = (thisEnvFn == null ? void 0 : thisEnvFn.node.kind) === "constructor";
  160420. if (thisEnvFn.isClassProperty()) {
  160421. throw fnPath.buildCodeFrameError("Unable to transform arrow inside class property");
  160422. }
  160423. const {
  160424. thisPaths,
  160425. argumentsPaths,
  160426. newTargetPaths,
  160427. superProps,
  160428. superCalls
  160429. } = getScopeInformation(fnPath);
  160430. if (inConstructor && superCalls.length > 0) {
  160431. if (!allowInsertArrow) {
  160432. throw superCalls[0].buildCodeFrameError("Unable to handle nested super() usage in arrow");
  160433. }
  160434. const allSuperCalls = [];
  160435. thisEnvFn.traverse({
  160436. Function(child) {
  160437. if (child.isArrowFunctionExpression())
  160438. return;
  160439. child.skip();
  160440. },
  160441. ClassProperty(child) {
  160442. child.skip();
  160443. },
  160444. CallExpression(child) {
  160445. if (!child.get("callee").isSuper())
  160446. return;
  160447. allSuperCalls.push(child);
  160448. }
  160449. });
  160450. const superBinding = getSuperBinding(thisEnvFn);
  160451. allSuperCalls.forEach((superCall) => {
  160452. const callee = t2.identifier(superBinding);
  160453. callee.loc = superCall.node.callee.loc;
  160454. superCall.get("callee").replaceWith(callee);
  160455. });
  160456. }
  160457. if (argumentsPaths.length > 0) {
  160458. const argumentsBinding = getBinding(thisEnvFn, "arguments", () => {
  160459. const args = () => t2.identifier("arguments");
  160460. if (thisEnvFn.scope.path.isProgram()) {
  160461. return t2.conditionalExpression(t2.binaryExpression("===", t2.unaryExpression("typeof", args()), t2.stringLiteral("undefined")), thisEnvFn.scope.buildUndefinedNode(), args());
  160462. } else {
  160463. return args();
  160464. }
  160465. });
  160466. argumentsPaths.forEach((argumentsChild) => {
  160467. const argsRef = t2.identifier(argumentsBinding);
  160468. argsRef.loc = argumentsChild.node.loc;
  160469. argumentsChild.replaceWith(argsRef);
  160470. });
  160471. }
  160472. if (newTargetPaths.length > 0) {
  160473. const newTargetBinding = getBinding(thisEnvFn, "newtarget", () => t2.metaProperty(t2.identifier("new"), t2.identifier("target")));
  160474. newTargetPaths.forEach((targetChild) => {
  160475. const targetRef = t2.identifier(newTargetBinding);
  160476. targetRef.loc = targetChild.node.loc;
  160477. targetChild.replaceWith(targetRef);
  160478. });
  160479. }
  160480. if (superProps.length > 0) {
  160481. if (!allowInsertArrow) {
  160482. throw superProps[0].buildCodeFrameError("Unable to handle nested super.prop usage");
  160483. }
  160484. const flatSuperProps = superProps.reduce((acc, superProp) => acc.concat(standardizeSuperProperty(superProp)), []);
  160485. flatSuperProps.forEach((superProp) => {
  160486. const key = superProp.node.computed ? "" : superProp.get("property").node.name;
  160487. const isAssignment = superProp.parentPath.isAssignmentExpression({
  160488. left: superProp.node
  160489. });
  160490. const isCall = superProp.parentPath.isCallExpression({
  160491. callee: superProp.node
  160492. });
  160493. const superBinding = getSuperPropBinding(thisEnvFn, isAssignment, key);
  160494. const args = [];
  160495. if (superProp.node.computed) {
  160496. args.push(superProp.get("property").node);
  160497. }
  160498. if (isAssignment) {
  160499. const value = superProp.parentPath.node.right;
  160500. args.push(value);
  160501. }
  160502. const call = t2.callExpression(t2.identifier(superBinding), args);
  160503. if (isCall) {
  160504. superProp.parentPath.unshiftContainer("arguments", t2.thisExpression());
  160505. superProp.replaceWith(t2.memberExpression(call, t2.identifier("call")));
  160506. thisPaths.push(superProp.parentPath.get("arguments.0"));
  160507. } else if (isAssignment) {
  160508. superProp.parentPath.replaceWith(call);
  160509. } else {
  160510. superProp.replaceWith(call);
  160511. }
  160512. });
  160513. }
  160514. let thisBinding;
  160515. if (thisPaths.length > 0 || !noNewArrows) {
  160516. thisBinding = getThisBinding(thisEnvFn, inConstructor);
  160517. if (noNewArrows || inConstructor && hasSuperClass(thisEnvFn)) {
  160518. thisPaths.forEach((thisChild) => {
  160519. const thisRef = thisChild.isJSX() ? t2.jsxIdentifier(thisBinding) : t2.identifier(thisBinding);
  160520. thisRef.loc = thisChild.node.loc;
  160521. thisChild.replaceWith(thisRef);
  160522. });
  160523. if (!noNewArrows)
  160524. thisBinding = null;
  160525. }
  160526. }
  160527. return thisBinding;
  160528. }
  160529. function standardizeSuperProperty(superProp) {
  160530. if (superProp.parentPath.isAssignmentExpression() && superProp.parentPath.node.operator !== "=") {
  160531. const assignmentPath = superProp.parentPath;
  160532. const op = assignmentPath.node.operator.slice(0, -1);
  160533. const value = assignmentPath.node.right;
  160534. assignmentPath.node.operator = "=";
  160535. if (superProp.node.computed) {
  160536. const tmp = superProp.scope.generateDeclaredUidIdentifier("tmp");
  160537. assignmentPath.get("left").replaceWith(t2.memberExpression(superProp.node.object, t2.assignmentExpression("=", tmp, superProp.node.property), true));
  160538. assignmentPath.get("right").replaceWith(t2.binaryExpression(op, t2.memberExpression(superProp.node.object, t2.identifier(tmp.name), true), value));
  160539. } else {
  160540. assignmentPath.get("left").replaceWith(t2.memberExpression(superProp.node.object, superProp.node.property));
  160541. assignmentPath.get("right").replaceWith(t2.binaryExpression(op, t2.memberExpression(superProp.node.object, t2.identifier(superProp.node.property.name)), value));
  160542. }
  160543. return [assignmentPath.get("left"), assignmentPath.get("right").get("left")];
  160544. } else if (superProp.parentPath.isUpdateExpression()) {
  160545. const updateExpr = superProp.parentPath;
  160546. const tmp = superProp.scope.generateDeclaredUidIdentifier("tmp");
  160547. const computedKey = superProp.node.computed ? superProp.scope.generateDeclaredUidIdentifier("prop") : null;
  160548. const parts = [t2.assignmentExpression("=", tmp, t2.memberExpression(superProp.node.object, computedKey ? t2.assignmentExpression("=", computedKey, superProp.node.property) : superProp.node.property, superProp.node.computed)), t2.assignmentExpression("=", t2.memberExpression(superProp.node.object, computedKey ? t2.identifier(computedKey.name) : superProp.node.property, superProp.node.computed), t2.binaryExpression("+", t2.identifier(tmp.name), t2.numericLiteral(1)))];
  160549. if (!superProp.parentPath.node.prefix) {
  160550. parts.push(t2.identifier(tmp.name));
  160551. }
  160552. updateExpr.replaceWith(t2.sequenceExpression(parts));
  160553. const left = updateExpr.get("expressions.0.right");
  160554. const right = updateExpr.get("expressions.1.left");
  160555. return [left, right];
  160556. }
  160557. return [superProp];
  160558. }
  160559. function hasSuperClass(thisEnvFn) {
  160560. return thisEnvFn.isClassMethod() && !!thisEnvFn.parentPath.parentPath.node.superClass;
  160561. }
  160562. function getThisBinding(thisEnvFn, inConstructor) {
  160563. return getBinding(thisEnvFn, "this", (thisBinding) => {
  160564. if (!inConstructor || !hasSuperClass(thisEnvFn))
  160565. return t2.thisExpression();
  160566. const supers = /* @__PURE__ */ new WeakSet();
  160567. thisEnvFn.traverse({
  160568. Function(child) {
  160569. if (child.isArrowFunctionExpression())
  160570. return;
  160571. child.skip();
  160572. },
  160573. ClassProperty(child) {
  160574. child.skip();
  160575. },
  160576. CallExpression(child) {
  160577. if (!child.get("callee").isSuper())
  160578. return;
  160579. if (supers.has(child.node))
  160580. return;
  160581. supers.add(child.node);
  160582. child.replaceWithMultiple([child.node, t2.assignmentExpression("=", t2.identifier(thisBinding), t2.identifier("this"))]);
  160583. }
  160584. });
  160585. });
  160586. }
  160587. function getSuperBinding(thisEnvFn) {
  160588. return getBinding(thisEnvFn, "supercall", () => {
  160589. const argsBinding = thisEnvFn.scope.generateUidIdentifier("args");
  160590. return t2.arrowFunctionExpression([t2.restElement(argsBinding)], t2.callExpression(t2.super(), [t2.spreadElement(t2.identifier(argsBinding.name))]));
  160591. });
  160592. }
  160593. function getSuperPropBinding(thisEnvFn, isAssignment, propName) {
  160594. const op = isAssignment ? "set" : "get";
  160595. return getBinding(thisEnvFn, `superprop_${op}:${propName || ""}`, () => {
  160596. const argsList = [];
  160597. let fnBody;
  160598. if (propName) {
  160599. fnBody = t2.memberExpression(t2.super(), t2.identifier(propName));
  160600. } else {
  160601. const method = thisEnvFn.scope.generateUidIdentifier("prop");
  160602. argsList.unshift(method);
  160603. fnBody = t2.memberExpression(t2.super(), t2.identifier(method.name), true);
  160604. }
  160605. if (isAssignment) {
  160606. const valueIdent = thisEnvFn.scope.generateUidIdentifier("value");
  160607. argsList.push(valueIdent);
  160608. fnBody = t2.assignmentExpression("=", fnBody, t2.identifier(valueIdent.name));
  160609. }
  160610. return t2.arrowFunctionExpression(argsList, fnBody);
  160611. });
  160612. }
  160613. function getBinding(thisEnvFn, key, init) {
  160614. const cacheKey = "binding:" + key;
  160615. let data2 = thisEnvFn.getData(cacheKey);
  160616. if (!data2) {
  160617. const id = thisEnvFn.scope.generateUidIdentifier(key);
  160618. data2 = id.name;
  160619. thisEnvFn.setData(cacheKey, data2);
  160620. thisEnvFn.scope.push({
  160621. id,
  160622. init: init(data2)
  160623. });
  160624. }
  160625. return data2;
  160626. }
  160627. function getScopeInformation(fnPath) {
  160628. const thisPaths = [];
  160629. const argumentsPaths = [];
  160630. const newTargetPaths = [];
  160631. const superProps = [];
  160632. const superCalls = [];
  160633. fnPath.traverse({
  160634. ClassProperty(child) {
  160635. child.skip();
  160636. },
  160637. Function(child) {
  160638. if (child.isArrowFunctionExpression())
  160639. return;
  160640. child.skip();
  160641. },
  160642. ThisExpression(child) {
  160643. thisPaths.push(child);
  160644. },
  160645. JSXIdentifier(child) {
  160646. if (child.node.name !== "this")
  160647. return;
  160648. if (!child.parentPath.isJSXMemberExpression({
  160649. object: child.node
  160650. }) && !child.parentPath.isJSXOpeningElement({
  160651. name: child.node
  160652. })) {
  160653. return;
  160654. }
  160655. thisPaths.push(child);
  160656. },
  160657. CallExpression(child) {
  160658. if (child.get("callee").isSuper())
  160659. superCalls.push(child);
  160660. },
  160661. MemberExpression(child) {
  160662. if (child.get("object").isSuper())
  160663. superProps.push(child);
  160664. },
  160665. ReferencedIdentifier(child) {
  160666. if (child.node.name !== "arguments")
  160667. return;
  160668. let curr = child.scope;
  160669. do {
  160670. if (curr.hasOwnBinding("arguments")) {
  160671. curr.rename("arguments");
  160672. return;
  160673. }
  160674. if (curr.path.isFunction() && !curr.path.isArrowFunctionExpression()) {
  160675. break;
  160676. }
  160677. } while (curr = curr.parent);
  160678. argumentsPaths.push(child);
  160679. },
  160680. MetaProperty(child) {
  160681. if (!child.get("meta").isIdentifier({
  160682. name: "new"
  160683. }))
  160684. return;
  160685. if (!child.get("property").isIdentifier({
  160686. name: "target"
  160687. }))
  160688. return;
  160689. newTargetPaths.push(child);
  160690. }
  160691. });
  160692. return {
  160693. thisPaths,
  160694. argumentsPaths,
  160695. newTargetPaths,
  160696. superProps,
  160697. superCalls
  160698. };
  160699. }
  160700. }
  160701. });
  160702. // node_modules/@babel/traverse/lib/path/introspection.js
  160703. var require_introspection2 = __commonJS({
  160704. "node_modules/@babel/traverse/lib/path/introspection.js"(exports) {
  160705. "use strict";
  160706. Object.defineProperty(exports, "__esModule", {
  160707. value: true
  160708. });
  160709. exports.matchesPattern = matchesPattern;
  160710. exports.has = has;
  160711. exports.isStatic = isStatic;
  160712. exports.isnt = isnt;
  160713. exports.equals = equals;
  160714. exports.isNodeType = isNodeType;
  160715. exports.canHaveVariableDeclarationOrExpression = canHaveVariableDeclarationOrExpression;
  160716. exports.canSwapBetweenExpressionAndStatement = canSwapBetweenExpressionAndStatement;
  160717. exports.isCompletionRecord = isCompletionRecord;
  160718. exports.isStatementOrBlock = isStatementOrBlock;
  160719. exports.referencesImport = referencesImport;
  160720. exports.getSource = getSource;
  160721. exports.willIMaybeExecuteBefore = willIMaybeExecuteBefore;
  160722. exports._guessExecutionStatusRelativeTo = _guessExecutionStatusRelativeTo;
  160723. exports._guessExecutionStatusRelativeToDifferentFunctions = _guessExecutionStatusRelativeToDifferentFunctions;
  160724. exports.resolve = resolve;
  160725. exports._resolve = _resolve;
  160726. exports.isConstantExpression = isConstantExpression;
  160727. exports.isInStrictMode = isInStrictMode;
  160728. exports.is = void 0;
  160729. var t2 = require_lib2();
  160730. function matchesPattern(pattern, allowPartial) {
  160731. return t2.matchesPattern(this.node, pattern, allowPartial);
  160732. }
  160733. function has(key) {
  160734. const val = this.node && this.node[key];
  160735. if (val && Array.isArray(val)) {
  160736. return !!val.length;
  160737. } else {
  160738. return !!val;
  160739. }
  160740. }
  160741. function isStatic() {
  160742. return this.scope.isStatic(this.node);
  160743. }
  160744. var is = has;
  160745. exports.is = is;
  160746. function isnt(key) {
  160747. return !this.has(key);
  160748. }
  160749. function equals(key, value) {
  160750. return this.node[key] === value;
  160751. }
  160752. function isNodeType(type) {
  160753. return t2.isType(this.type, type);
  160754. }
  160755. function canHaveVariableDeclarationOrExpression() {
  160756. return (this.key === "init" || this.key === "left") && this.parentPath.isFor();
  160757. }
  160758. function canSwapBetweenExpressionAndStatement(replacement) {
  160759. if (this.key !== "body" || !this.parentPath.isArrowFunctionExpression()) {
  160760. return false;
  160761. }
  160762. if (this.isExpression()) {
  160763. return t2.isBlockStatement(replacement);
  160764. } else if (this.isBlockStatement()) {
  160765. return t2.isExpression(replacement);
  160766. }
  160767. return false;
  160768. }
  160769. function isCompletionRecord(allowInsideFunction) {
  160770. let path = this;
  160771. let first = true;
  160772. do {
  160773. const container = path.container;
  160774. if (path.isFunction() && !first) {
  160775. return !!allowInsideFunction;
  160776. }
  160777. first = false;
  160778. if (Array.isArray(container) && path.key !== container.length - 1) {
  160779. return false;
  160780. }
  160781. } while ((path = path.parentPath) && !path.isProgram());
  160782. return true;
  160783. }
  160784. function isStatementOrBlock() {
  160785. if (this.parentPath.isLabeledStatement() || t2.isBlockStatement(this.container)) {
  160786. return false;
  160787. } else {
  160788. return t2.STATEMENT_OR_BLOCK_KEYS.includes(this.key);
  160789. }
  160790. }
  160791. function referencesImport(moduleSource, importName) {
  160792. if (!this.isReferencedIdentifier()) {
  160793. if ((this.isMemberExpression() || this.isOptionalMemberExpression()) && (this.node.computed ? t2.isStringLiteral(this.node.property, {
  160794. value: importName
  160795. }) : this.node.property.name === importName)) {
  160796. const object = this.get("object");
  160797. return object.isReferencedIdentifier() && object.referencesImport(moduleSource, "*");
  160798. }
  160799. return false;
  160800. }
  160801. const binding = this.scope.getBinding(this.node.name);
  160802. if (!binding || binding.kind !== "module")
  160803. return false;
  160804. const path = binding.path;
  160805. const parent = path.parentPath;
  160806. if (!parent.isImportDeclaration())
  160807. return false;
  160808. if (parent.node.source.value === moduleSource) {
  160809. if (!importName)
  160810. return true;
  160811. } else {
  160812. return false;
  160813. }
  160814. if (path.isImportDefaultSpecifier() && importName === "default") {
  160815. return true;
  160816. }
  160817. if (path.isImportNamespaceSpecifier() && importName === "*") {
  160818. return true;
  160819. }
  160820. if (path.isImportSpecifier() && t2.isIdentifier(path.node.imported, {
  160821. name: importName
  160822. })) {
  160823. return true;
  160824. }
  160825. return false;
  160826. }
  160827. function getSource() {
  160828. const node = this.node;
  160829. if (node.end) {
  160830. const code2 = this.hub.getCode();
  160831. if (code2)
  160832. return code2.slice(node.start, node.end);
  160833. }
  160834. return "";
  160835. }
  160836. function willIMaybeExecuteBefore(target) {
  160837. return this._guessExecutionStatusRelativeTo(target) !== "after";
  160838. }
  160839. function getOuterFunction(path) {
  160840. return (path.scope.getFunctionParent() || path.scope.getProgramParent()).path;
  160841. }
  160842. function isExecutionUncertain(type, key) {
  160843. switch (type) {
  160844. case "LogicalExpression":
  160845. return key === "right";
  160846. case "ConditionalExpression":
  160847. case "IfStatement":
  160848. return key === "consequent" || key === "alternate";
  160849. case "WhileStatement":
  160850. case "DoWhileStatement":
  160851. case "ForInStatement":
  160852. case "ForOfStatement":
  160853. return key === "body";
  160854. case "ForStatement":
  160855. return key === "body" || key === "update";
  160856. case "SwitchStatement":
  160857. return key === "cases";
  160858. case "TryStatement":
  160859. return key === "handler";
  160860. case "AssignmentPattern":
  160861. return key === "right";
  160862. case "OptionalMemberExpression":
  160863. return key === "property";
  160864. case "OptionalCallExpression":
  160865. return key === "arguments";
  160866. default:
  160867. return false;
  160868. }
  160869. }
  160870. function isExecutionUncertainInList(paths, maxIndex) {
  160871. for (let i = 0; i < maxIndex; i++) {
  160872. const path = paths[i];
  160873. if (isExecutionUncertain(path.parent.type, path.parentKey)) {
  160874. return true;
  160875. }
  160876. }
  160877. return false;
  160878. }
  160879. function _guessExecutionStatusRelativeTo(target) {
  160880. const funcParent = {
  160881. this: getOuterFunction(this),
  160882. target: getOuterFunction(target)
  160883. };
  160884. if (funcParent.target.node !== funcParent.this.node) {
  160885. return this._guessExecutionStatusRelativeToDifferentFunctions(funcParent.target);
  160886. }
  160887. const paths = {
  160888. target: target.getAncestry(),
  160889. this: this.getAncestry()
  160890. };
  160891. if (paths.target.indexOf(this) >= 0)
  160892. return "after";
  160893. if (paths.this.indexOf(target) >= 0)
  160894. return "before";
  160895. let commonPath;
  160896. const commonIndex = {
  160897. target: 0,
  160898. this: 0
  160899. };
  160900. while (!commonPath && commonIndex.this < paths.this.length) {
  160901. const path = paths.this[commonIndex.this];
  160902. commonIndex.target = paths.target.indexOf(path);
  160903. if (commonIndex.target >= 0) {
  160904. commonPath = path;
  160905. } else {
  160906. commonIndex.this++;
  160907. }
  160908. }
  160909. if (!commonPath) {
  160910. throw new Error("Internal Babel error - The two compared nodes don't appear to belong to the same program.");
  160911. }
  160912. if (isExecutionUncertainInList(paths.this, commonIndex.this - 1) || isExecutionUncertainInList(paths.target, commonIndex.target - 1)) {
  160913. return "unknown";
  160914. }
  160915. const divergence = {
  160916. this: paths.this[commonIndex.this - 1],
  160917. target: paths.target[commonIndex.target - 1]
  160918. };
  160919. if (divergence.target.listKey && divergence.this.listKey && divergence.target.container === divergence.this.container) {
  160920. return divergence.target.key > divergence.this.key ? "before" : "after";
  160921. }
  160922. const keys2 = t2.VISITOR_KEYS[commonPath.type];
  160923. const keyPosition = {
  160924. this: keys2.indexOf(divergence.this.parentKey),
  160925. target: keys2.indexOf(divergence.target.parentKey)
  160926. };
  160927. return keyPosition.target > keyPosition.this ? "before" : "after";
  160928. }
  160929. var executionOrderCheckedNodes = /* @__PURE__ */ new WeakSet();
  160930. function _guessExecutionStatusRelativeToDifferentFunctions(target) {
  160931. if (!target.isFunctionDeclaration() || target.parentPath.isExportDeclaration()) {
  160932. return "unknown";
  160933. }
  160934. const binding = target.scope.getBinding(target.node.id.name);
  160935. if (!binding.references)
  160936. return "before";
  160937. const referencePaths = binding.referencePaths;
  160938. let allStatus;
  160939. for (const path of referencePaths) {
  160940. const childOfFunction = !!path.find((path2) => path2.node === target.node);
  160941. if (childOfFunction)
  160942. continue;
  160943. if (path.key !== "callee" || !path.parentPath.isCallExpression()) {
  160944. return "unknown";
  160945. }
  160946. if (executionOrderCheckedNodes.has(path.node))
  160947. continue;
  160948. executionOrderCheckedNodes.add(path.node);
  160949. const status = this._guessExecutionStatusRelativeTo(path);
  160950. executionOrderCheckedNodes.delete(path.node);
  160951. if (allStatus && allStatus !== status) {
  160952. return "unknown";
  160953. } else {
  160954. allStatus = status;
  160955. }
  160956. }
  160957. return allStatus;
  160958. }
  160959. function resolve(dangerous, resolved) {
  160960. return this._resolve(dangerous, resolved) || this;
  160961. }
  160962. function _resolve(dangerous, resolved) {
  160963. if (resolved && resolved.indexOf(this) >= 0)
  160964. return;
  160965. resolved = resolved || [];
  160966. resolved.push(this);
  160967. if (this.isVariableDeclarator()) {
  160968. if (this.get("id").isIdentifier()) {
  160969. return this.get("init").resolve(dangerous, resolved);
  160970. } else {
  160971. }
  160972. } else if (this.isReferencedIdentifier()) {
  160973. const binding = this.scope.getBinding(this.node.name);
  160974. if (!binding)
  160975. return;
  160976. if (!binding.constant)
  160977. return;
  160978. if (binding.kind === "module")
  160979. return;
  160980. if (binding.path !== this) {
  160981. const ret = binding.path.resolve(dangerous, resolved);
  160982. if (this.find((parent) => parent.node === ret.node))
  160983. return;
  160984. return ret;
  160985. }
  160986. } else if (this.isTypeCastExpression()) {
  160987. return this.get("expression").resolve(dangerous, resolved);
  160988. } else if (dangerous && this.isMemberExpression()) {
  160989. const targetKey = this.toComputedKey();
  160990. if (!t2.isLiteral(targetKey))
  160991. return;
  160992. const targetName = targetKey.value;
  160993. const target = this.get("object").resolve(dangerous, resolved);
  160994. if (target.isObjectExpression()) {
  160995. const props = target.get("properties");
  160996. for (const prop of props) {
  160997. if (!prop.isProperty())
  160998. continue;
  160999. const key = prop.get("key");
  161000. let match = prop.isnt("computed") && key.isIdentifier({
  161001. name: targetName
  161002. });
  161003. match = match || key.isLiteral({
  161004. value: targetName
  161005. });
  161006. if (match)
  161007. return prop.get("value").resolve(dangerous, resolved);
  161008. }
  161009. } else if (target.isArrayExpression() && !isNaN(+targetName)) {
  161010. const elems = target.get("elements");
  161011. const elem = elems[targetName];
  161012. if (elem)
  161013. return elem.resolve(dangerous, resolved);
  161014. }
  161015. }
  161016. }
  161017. function isConstantExpression() {
  161018. if (this.isIdentifier()) {
  161019. const binding = this.scope.getBinding(this.node.name);
  161020. if (!binding)
  161021. return false;
  161022. return binding.constant;
  161023. }
  161024. if (this.isLiteral()) {
  161025. if (this.isRegExpLiteral()) {
  161026. return false;
  161027. }
  161028. if (this.isTemplateLiteral()) {
  161029. return this.get("expressions").every((expression) => expression.isConstantExpression());
  161030. }
  161031. return true;
  161032. }
  161033. if (this.isUnaryExpression()) {
  161034. if (this.node.operator !== "void") {
  161035. return false;
  161036. }
  161037. return this.get("argument").isConstantExpression();
  161038. }
  161039. if (this.isBinaryExpression()) {
  161040. return this.get("left").isConstantExpression() && this.get("right").isConstantExpression();
  161041. }
  161042. return false;
  161043. }
  161044. function isInStrictMode() {
  161045. const start3 = this.isProgram() ? this : this.parentPath;
  161046. const strictParent = start3.find((path) => {
  161047. if (path.isProgram({
  161048. sourceType: "module"
  161049. }))
  161050. return true;
  161051. if (path.isClass())
  161052. return true;
  161053. if (!path.isProgram() && !path.isFunction())
  161054. return false;
  161055. if (path.isArrowFunctionExpression() && !path.get("body").isBlockStatement()) {
  161056. return false;
  161057. }
  161058. const body = path.isFunction() ? path.node.body : path.node;
  161059. for (const directive of body.directives) {
  161060. if (directive.value.value === "use strict") {
  161061. return true;
  161062. }
  161063. }
  161064. });
  161065. return !!strictParent;
  161066. }
  161067. }
  161068. });
  161069. // node_modules/@babel/traverse/lib/path/context.js
  161070. var require_context3 = __commonJS({
  161071. "node_modules/@babel/traverse/lib/path/context.js"(exports) {
  161072. "use strict";
  161073. Object.defineProperty(exports, "__esModule", {
  161074. value: true
  161075. });
  161076. exports.call = call;
  161077. exports._call = _call;
  161078. exports.isBlacklisted = exports.isDenylisted = isDenylisted;
  161079. exports.visit = visit4;
  161080. exports.skip = skip;
  161081. exports.skipKey = skipKey;
  161082. exports.stop = stop;
  161083. exports.setScope = setScope;
  161084. exports.setContext = setContext;
  161085. exports.resync = resync;
  161086. exports._resyncParent = _resyncParent;
  161087. exports._resyncKey = _resyncKey;
  161088. exports._resyncList = _resyncList;
  161089. exports._resyncRemoved = _resyncRemoved;
  161090. exports.popContext = popContext;
  161091. exports.pushContext = pushContext;
  161092. exports.setup = setup;
  161093. exports.setKey = setKey;
  161094. exports.requeue = requeue;
  161095. exports._getQueueContexts = _getQueueContexts;
  161096. var _index = require_lib37();
  161097. var _index2 = require_path2();
  161098. function call(key) {
  161099. const opts = this.opts;
  161100. this.debug(key);
  161101. if (this.node) {
  161102. if (this._call(opts[key]))
  161103. return true;
  161104. }
  161105. if (this.node) {
  161106. return this._call(opts[this.node.type] && opts[this.node.type][key]);
  161107. }
  161108. return false;
  161109. }
  161110. function _call(fns) {
  161111. if (!fns)
  161112. return false;
  161113. for (const fn of fns) {
  161114. if (!fn)
  161115. continue;
  161116. const node = this.node;
  161117. if (!node)
  161118. return true;
  161119. const ret = fn.call(this.state, this, this.state);
  161120. if (ret && typeof ret === "object" && typeof ret.then === "function") {
  161121. throw new Error(`You appear to be using a plugin with an async traversal visitor, which your current version of Babel does not support. If you're using a published plugin, you may need to upgrade your @babel/core version.`);
  161122. }
  161123. if (ret) {
  161124. throw new Error(`Unexpected return value from visitor method ${fn}`);
  161125. }
  161126. if (this.node !== node)
  161127. return true;
  161128. if (this._traverseFlags > 0)
  161129. return true;
  161130. }
  161131. return false;
  161132. }
  161133. function isDenylisted() {
  161134. var _this$opts$denylist;
  161135. const denylist = (_this$opts$denylist = this.opts.denylist) != null ? _this$opts$denylist : this.opts.blacklist;
  161136. return denylist && denylist.indexOf(this.node.type) > -1;
  161137. }
  161138. function visit4() {
  161139. if (!this.node) {
  161140. return false;
  161141. }
  161142. if (this.isDenylisted()) {
  161143. return false;
  161144. }
  161145. if (this.opts.shouldSkip && this.opts.shouldSkip(this)) {
  161146. return false;
  161147. }
  161148. if (this.shouldSkip || this.call("enter") || this.shouldSkip) {
  161149. this.debug("Skip...");
  161150. return this.shouldStop;
  161151. }
  161152. this.debug("Recursing into...");
  161153. _index.default.node(this.node, this.opts, this.scope, this.state, this, this.skipKeys);
  161154. this.call("exit");
  161155. return this.shouldStop;
  161156. }
  161157. function skip() {
  161158. this.shouldSkip = true;
  161159. }
  161160. function skipKey(key) {
  161161. if (this.skipKeys == null) {
  161162. this.skipKeys = {};
  161163. }
  161164. this.skipKeys[key] = true;
  161165. }
  161166. function stop() {
  161167. this._traverseFlags |= _index2.SHOULD_SKIP | _index2.SHOULD_STOP;
  161168. }
  161169. function setScope() {
  161170. if (this.opts && this.opts.noScope)
  161171. return;
  161172. let path = this.parentPath;
  161173. if (this.key === "key" && path.isMethod())
  161174. path = path.parentPath;
  161175. let target;
  161176. while (path && !target) {
  161177. if (path.opts && path.opts.noScope)
  161178. return;
  161179. target = path.scope;
  161180. path = path.parentPath;
  161181. }
  161182. this.scope = this.getScope(target);
  161183. if (this.scope)
  161184. this.scope.init();
  161185. }
  161186. function setContext(context) {
  161187. if (this.skipKeys != null) {
  161188. this.skipKeys = {};
  161189. }
  161190. this._traverseFlags = 0;
  161191. if (context) {
  161192. this.context = context;
  161193. this.state = context.state;
  161194. this.opts = context.opts;
  161195. }
  161196. this.setScope();
  161197. return this;
  161198. }
  161199. function resync() {
  161200. if (this.removed)
  161201. return;
  161202. this._resyncParent();
  161203. this._resyncList();
  161204. this._resyncKey();
  161205. }
  161206. function _resyncParent() {
  161207. if (this.parentPath) {
  161208. this.parent = this.parentPath.node;
  161209. }
  161210. }
  161211. function _resyncKey() {
  161212. if (!this.container)
  161213. return;
  161214. if (this.node === this.container[this.key])
  161215. return;
  161216. if (Array.isArray(this.container)) {
  161217. for (let i = 0; i < this.container.length; i++) {
  161218. if (this.container[i] === this.node) {
  161219. return this.setKey(i);
  161220. }
  161221. }
  161222. } else {
  161223. for (const key of Object.keys(this.container)) {
  161224. if (this.container[key] === this.node) {
  161225. return this.setKey(key);
  161226. }
  161227. }
  161228. }
  161229. this.key = null;
  161230. }
  161231. function _resyncList() {
  161232. if (!this.parent || !this.inList)
  161233. return;
  161234. const newContainer = this.parent[this.listKey];
  161235. if (this.container === newContainer)
  161236. return;
  161237. this.container = newContainer || null;
  161238. }
  161239. function _resyncRemoved() {
  161240. if (this.key == null || !this.container || this.container[this.key] !== this.node) {
  161241. this._markRemoved();
  161242. }
  161243. }
  161244. function popContext() {
  161245. this.contexts.pop();
  161246. if (this.contexts.length > 0) {
  161247. this.setContext(this.contexts[this.contexts.length - 1]);
  161248. } else {
  161249. this.setContext(void 0);
  161250. }
  161251. }
  161252. function pushContext(context) {
  161253. this.contexts.push(context);
  161254. this.setContext(context);
  161255. }
  161256. function setup(parentPath, container, listKey, key) {
  161257. this.listKey = listKey;
  161258. this.container = container;
  161259. this.parentPath = parentPath || this.parentPath;
  161260. this.setKey(key);
  161261. }
  161262. function setKey(key) {
  161263. var _this$node;
  161264. this.key = key;
  161265. this.node = this.container[this.key];
  161266. this.type = (_this$node = this.node) == null ? void 0 : _this$node.type;
  161267. }
  161268. function requeue(pathToQueue = this) {
  161269. if (pathToQueue.removed)
  161270. return;
  161271. ;
  161272. const contexts = this.contexts;
  161273. for (const context of contexts) {
  161274. context.maybeQueue(pathToQueue);
  161275. }
  161276. }
  161277. function _getQueueContexts() {
  161278. let path = this;
  161279. let contexts = this.contexts;
  161280. while (!contexts.length) {
  161281. path = path.parentPath;
  161282. if (!path)
  161283. break;
  161284. contexts = path.contexts;
  161285. }
  161286. return contexts;
  161287. }
  161288. }
  161289. });
  161290. // node_modules/@babel/traverse/lib/path/lib/removal-hooks.js
  161291. var require_removal_hooks2 = __commonJS({
  161292. "node_modules/@babel/traverse/lib/path/lib/removal-hooks.js"(exports) {
  161293. "use strict";
  161294. Object.defineProperty(exports, "__esModule", {
  161295. value: true
  161296. });
  161297. exports.hooks = void 0;
  161298. var hooks = [function(self2, parent) {
  161299. const removeParent = self2.key === "test" && (parent.isWhile() || parent.isSwitchCase()) || self2.key === "declaration" && parent.isExportDeclaration() || self2.key === "body" && parent.isLabeledStatement() || self2.listKey === "declarations" && parent.isVariableDeclaration() && parent.node.declarations.length === 1 || self2.key === "expression" && parent.isExpressionStatement();
  161300. if (removeParent) {
  161301. parent.remove();
  161302. return true;
  161303. }
  161304. }, function(self2, parent) {
  161305. if (parent.isSequenceExpression() && parent.node.expressions.length === 1) {
  161306. parent.replaceWith(parent.node.expressions[0]);
  161307. return true;
  161308. }
  161309. }, function(self2, parent) {
  161310. if (parent.isBinary()) {
  161311. if (self2.key === "left") {
  161312. parent.replaceWith(parent.node.right);
  161313. } else {
  161314. parent.replaceWith(parent.node.left);
  161315. }
  161316. return true;
  161317. }
  161318. }, function(self2, parent) {
  161319. if (parent.isIfStatement() && (self2.key === "consequent" || self2.key === "alternate") || self2.key === "body" && (parent.isLoop() || parent.isArrowFunctionExpression())) {
  161320. self2.replaceWith({
  161321. type: "BlockStatement",
  161322. body: []
  161323. });
  161324. return true;
  161325. }
  161326. }];
  161327. exports.hooks = hooks;
  161328. }
  161329. });
  161330. // node_modules/@babel/traverse/lib/path/removal.js
  161331. var require_removal2 = __commonJS({
  161332. "node_modules/@babel/traverse/lib/path/removal.js"(exports) {
  161333. "use strict";
  161334. Object.defineProperty(exports, "__esModule", {
  161335. value: true
  161336. });
  161337. exports.remove = remove;
  161338. exports._removeFromScope = _removeFromScope;
  161339. exports._callRemovalHooks = _callRemovalHooks;
  161340. exports._remove = _remove;
  161341. exports._markRemoved = _markRemoved;
  161342. exports._assertUnremoved = _assertUnremoved;
  161343. var _removalHooks = require_removal_hooks2();
  161344. var _cache = require_cache2();
  161345. var _index = require_path2();
  161346. function remove() {
  161347. var _this$opts;
  161348. this._assertUnremoved();
  161349. this.resync();
  161350. if (!((_this$opts = this.opts) != null && _this$opts.noScope)) {
  161351. this._removeFromScope();
  161352. }
  161353. if (this._callRemovalHooks()) {
  161354. this._markRemoved();
  161355. return;
  161356. }
  161357. this.shareCommentsWithSiblings();
  161358. this._remove();
  161359. this._markRemoved();
  161360. }
  161361. function _removeFromScope() {
  161362. const bindings = this.getBindingIdentifiers();
  161363. Object.keys(bindings).forEach((name2) => this.scope.removeBinding(name2));
  161364. }
  161365. function _callRemovalHooks() {
  161366. for (const fn of _removalHooks.hooks) {
  161367. if (fn(this, this.parentPath))
  161368. return true;
  161369. }
  161370. }
  161371. function _remove() {
  161372. if (Array.isArray(this.container)) {
  161373. this.container.splice(this.key, 1);
  161374. this.updateSiblingKeys(this.key, -1);
  161375. } else {
  161376. this._replaceWith(null);
  161377. }
  161378. }
  161379. function _markRemoved() {
  161380. this._traverseFlags |= _index.SHOULD_SKIP | _index.REMOVED;
  161381. if (this.parent)
  161382. _cache.path.get(this.parent).delete(this.node);
  161383. this.node = null;
  161384. }
  161385. function _assertUnremoved() {
  161386. if (this.removed) {
  161387. throw this.buildCodeFrameError("NodePath has been removed so is read-only.");
  161388. }
  161389. }
  161390. }
  161391. });
  161392. // node_modules/@babel/traverse/lib/path/lib/hoister.js
  161393. var require_hoister2 = __commonJS({
  161394. "node_modules/@babel/traverse/lib/path/lib/hoister.js"(exports) {
  161395. "use strict";
  161396. Object.defineProperty(exports, "__esModule", {
  161397. value: true
  161398. });
  161399. exports.default = void 0;
  161400. var t2 = require_lib2();
  161401. var referenceVisitor = {
  161402. ReferencedIdentifier(path, state) {
  161403. if (path.isJSXIdentifier() && t2.react.isCompatTag(path.node.name) && !path.parentPath.isJSXMemberExpression()) {
  161404. return;
  161405. }
  161406. if (path.node.name === "this") {
  161407. let scope = path.scope;
  161408. do {
  161409. if (scope.path.isFunction() && !scope.path.isArrowFunctionExpression()) {
  161410. break;
  161411. }
  161412. } while (scope = scope.parent);
  161413. if (scope)
  161414. state.breakOnScopePaths.push(scope.path);
  161415. }
  161416. const binding = path.scope.getBinding(path.node.name);
  161417. if (!binding)
  161418. return;
  161419. for (const violation of binding.constantViolations) {
  161420. if (violation.scope !== binding.path.scope) {
  161421. state.mutableBinding = true;
  161422. path.stop();
  161423. return;
  161424. }
  161425. }
  161426. if (binding !== state.scope.getBinding(path.node.name))
  161427. return;
  161428. state.bindings[path.node.name] = binding;
  161429. }
  161430. };
  161431. var PathHoister = class {
  161432. constructor(path, scope) {
  161433. this.breakOnScopePaths = void 0;
  161434. this.bindings = void 0;
  161435. this.mutableBinding = void 0;
  161436. this.scopes = void 0;
  161437. this.scope = void 0;
  161438. this.path = void 0;
  161439. this.attachAfter = void 0;
  161440. this.breakOnScopePaths = [];
  161441. this.bindings = {};
  161442. this.mutableBinding = false;
  161443. this.scopes = [];
  161444. this.scope = scope;
  161445. this.path = path;
  161446. this.attachAfter = false;
  161447. }
  161448. isCompatibleScope(scope) {
  161449. for (const key of Object.keys(this.bindings)) {
  161450. const binding = this.bindings[key];
  161451. if (!scope.bindingIdentifierEquals(key, binding.identifier)) {
  161452. return false;
  161453. }
  161454. }
  161455. return true;
  161456. }
  161457. getCompatibleScopes() {
  161458. let scope = this.path.scope;
  161459. do {
  161460. if (this.isCompatibleScope(scope)) {
  161461. this.scopes.push(scope);
  161462. } else {
  161463. break;
  161464. }
  161465. if (this.breakOnScopePaths.indexOf(scope.path) >= 0) {
  161466. break;
  161467. }
  161468. } while (scope = scope.parent);
  161469. }
  161470. getAttachmentPath() {
  161471. let path = this._getAttachmentPath();
  161472. if (!path)
  161473. return;
  161474. let targetScope = path.scope;
  161475. if (targetScope.path === path) {
  161476. targetScope = path.scope.parent;
  161477. }
  161478. if (targetScope.path.isProgram() || targetScope.path.isFunction()) {
  161479. for (const name2 of Object.keys(this.bindings)) {
  161480. if (!targetScope.hasOwnBinding(name2))
  161481. continue;
  161482. const binding = this.bindings[name2];
  161483. if (binding.kind === "param" || binding.path.parentKey === "params") {
  161484. continue;
  161485. }
  161486. const bindingParentPath = this.getAttachmentParentForPath(binding.path);
  161487. if (bindingParentPath.key >= path.key) {
  161488. this.attachAfter = true;
  161489. path = binding.path;
  161490. for (const violationPath of binding.constantViolations) {
  161491. if (this.getAttachmentParentForPath(violationPath).key > path.key) {
  161492. path = violationPath;
  161493. }
  161494. }
  161495. }
  161496. }
  161497. }
  161498. return path;
  161499. }
  161500. _getAttachmentPath() {
  161501. const scopes = this.scopes;
  161502. const scope = scopes.pop();
  161503. if (!scope)
  161504. return;
  161505. if (scope.path.isFunction()) {
  161506. if (this.hasOwnParamBindings(scope)) {
  161507. if (this.scope === scope)
  161508. return;
  161509. const bodies = scope.path.get("body").get("body");
  161510. for (let i = 0; i < bodies.length; i++) {
  161511. if (bodies[i].node._blockHoist)
  161512. continue;
  161513. return bodies[i];
  161514. }
  161515. } else {
  161516. return this.getNextScopeAttachmentParent();
  161517. }
  161518. } else if (scope.path.isProgram()) {
  161519. return this.getNextScopeAttachmentParent();
  161520. }
  161521. }
  161522. getNextScopeAttachmentParent() {
  161523. const scope = this.scopes.pop();
  161524. if (scope)
  161525. return this.getAttachmentParentForPath(scope.path);
  161526. }
  161527. getAttachmentParentForPath(path) {
  161528. do {
  161529. if (!path.parentPath || Array.isArray(path.container) && path.isStatement()) {
  161530. return path;
  161531. }
  161532. } while (path = path.parentPath);
  161533. }
  161534. hasOwnParamBindings(scope) {
  161535. for (const name2 of Object.keys(this.bindings)) {
  161536. if (!scope.hasOwnBinding(name2))
  161537. continue;
  161538. const binding = this.bindings[name2];
  161539. if (binding.kind === "param" && binding.constant)
  161540. return true;
  161541. }
  161542. return false;
  161543. }
  161544. run() {
  161545. this.path.traverse(referenceVisitor, this);
  161546. if (this.mutableBinding)
  161547. return;
  161548. this.getCompatibleScopes();
  161549. const attachTo = this.getAttachmentPath();
  161550. if (!attachTo)
  161551. return;
  161552. if (attachTo.getFunctionParent() === this.path.getFunctionParent())
  161553. return;
  161554. let uid = attachTo.scope.generateUidIdentifier("ref");
  161555. const declarator = t2.variableDeclarator(uid, this.path.node);
  161556. const insertFn = this.attachAfter ? "insertAfter" : "insertBefore";
  161557. const [attached] = attachTo[insertFn]([attachTo.isVariableDeclarator() ? declarator : t2.variableDeclaration("var", [declarator])]);
  161558. const parent = this.path.parentPath;
  161559. if (parent.isJSXElement() && this.path.container === parent.node.children) {
  161560. uid = t2.jsxExpressionContainer(uid);
  161561. }
  161562. this.path.replaceWith(t2.cloneNode(uid));
  161563. return attachTo.isVariableDeclarator() ? attached.get("init") : attached.get("declarations.0.init");
  161564. }
  161565. };
  161566. exports.default = PathHoister;
  161567. }
  161568. });
  161569. // node_modules/@babel/traverse/lib/path/modification.js
  161570. var require_modification2 = __commonJS({
  161571. "node_modules/@babel/traverse/lib/path/modification.js"(exports) {
  161572. "use strict";
  161573. Object.defineProperty(exports, "__esModule", {
  161574. value: true
  161575. });
  161576. exports.insertBefore = insertBefore;
  161577. exports._containerInsert = _containerInsert;
  161578. exports._containerInsertBefore = _containerInsertBefore;
  161579. exports._containerInsertAfter = _containerInsertAfter;
  161580. exports.insertAfter = insertAfter;
  161581. exports.updateSiblingKeys = updateSiblingKeys;
  161582. exports._verifyNodeList = _verifyNodeList;
  161583. exports.unshiftContainer = unshiftContainer;
  161584. exports.pushContainer = pushContainer;
  161585. exports.hoist = hoist;
  161586. var _cache = require_cache2();
  161587. var _hoister = require_hoister2();
  161588. var _index = require_path2();
  161589. var t2 = require_lib2();
  161590. function insertBefore(nodes_) {
  161591. this._assertUnremoved();
  161592. const nodes = this._verifyNodeList(nodes_);
  161593. const {
  161594. parentPath
  161595. } = this;
  161596. if (parentPath.isExpressionStatement() || parentPath.isLabeledStatement() || parentPath.isExportNamedDeclaration() || parentPath.isExportDefaultDeclaration() && this.isDeclaration()) {
  161597. return parentPath.insertBefore(nodes);
  161598. } else if (this.isNodeType("Expression") && !this.isJSXElement() || parentPath.isForStatement() && this.key === "init") {
  161599. if (this.node)
  161600. nodes.push(this.node);
  161601. return this.replaceExpressionWithStatements(nodes);
  161602. } else if (Array.isArray(this.container)) {
  161603. return this._containerInsertBefore(nodes);
  161604. } else if (this.isStatementOrBlock()) {
  161605. const node = this.node;
  161606. const shouldInsertCurrentNode = node && (!this.isExpressionStatement() || node.expression != null);
  161607. this.replaceWith(t2.blockStatement(shouldInsertCurrentNode ? [node] : []));
  161608. return this.unshiftContainer("body", nodes);
  161609. } else {
  161610. throw new Error("We don't know what to do with this node type. We were previously a Statement but we can't fit in here?");
  161611. }
  161612. }
  161613. function _containerInsert(from, nodes) {
  161614. this.updateSiblingKeys(from, nodes.length);
  161615. const paths = [];
  161616. this.container.splice(from, 0, ...nodes);
  161617. for (let i = 0; i < nodes.length; i++) {
  161618. const to = from + i;
  161619. const path = this.getSibling(to);
  161620. paths.push(path);
  161621. if (this.context && this.context.queue) {
  161622. path.pushContext(this.context);
  161623. }
  161624. }
  161625. const contexts = this._getQueueContexts();
  161626. for (const path of paths) {
  161627. path.setScope();
  161628. path.debug("Inserted.");
  161629. for (const context of contexts) {
  161630. context.maybeQueue(path, true);
  161631. }
  161632. }
  161633. return paths;
  161634. }
  161635. function _containerInsertBefore(nodes) {
  161636. return this._containerInsert(this.key, nodes);
  161637. }
  161638. function _containerInsertAfter(nodes) {
  161639. return this._containerInsert(this.key + 1, nodes);
  161640. }
  161641. function insertAfter(nodes_) {
  161642. this._assertUnremoved();
  161643. const nodes = this._verifyNodeList(nodes_);
  161644. const {
  161645. parentPath
  161646. } = this;
  161647. if (parentPath.isExpressionStatement() || parentPath.isLabeledStatement() || parentPath.isExportNamedDeclaration() || parentPath.isExportDefaultDeclaration() && this.isDeclaration()) {
  161648. return parentPath.insertAfter(nodes.map((node) => {
  161649. return t2.isExpression(node) ? t2.expressionStatement(node) : node;
  161650. }));
  161651. } else if (this.isNodeType("Expression") && !this.isJSXElement() && !parentPath.isJSXElement() || parentPath.isForStatement() && this.key === "init") {
  161652. if (this.node) {
  161653. const node = this.node;
  161654. let {
  161655. scope
  161656. } = this;
  161657. if (scope.path.isPattern()) {
  161658. t2.assertExpression(node);
  161659. this.replaceWith(t2.callExpression(t2.arrowFunctionExpression([], node), []));
  161660. this.get("callee.body").insertAfter(nodes);
  161661. return [this];
  161662. }
  161663. if (parentPath.isMethod({
  161664. computed: true,
  161665. key: node
  161666. })) {
  161667. scope = scope.parent;
  161668. }
  161669. const temp = scope.generateDeclaredUidIdentifier();
  161670. nodes.unshift(t2.expressionStatement(t2.assignmentExpression("=", t2.cloneNode(temp), node)));
  161671. nodes.push(t2.expressionStatement(t2.cloneNode(temp)));
  161672. }
  161673. return this.replaceExpressionWithStatements(nodes);
  161674. } else if (Array.isArray(this.container)) {
  161675. return this._containerInsertAfter(nodes);
  161676. } else if (this.isStatementOrBlock()) {
  161677. const node = this.node;
  161678. const shouldInsertCurrentNode = node && (!this.isExpressionStatement() || node.expression != null);
  161679. this.replaceWith(t2.blockStatement(shouldInsertCurrentNode ? [node] : []));
  161680. return this.pushContainer("body", nodes);
  161681. } else {
  161682. throw new Error("We don't know what to do with this node type. We were previously a Statement but we can't fit in here?");
  161683. }
  161684. }
  161685. function updateSiblingKeys(fromIndex, incrementBy) {
  161686. if (!this.parent)
  161687. return;
  161688. const paths = _cache.path.get(this.parent);
  161689. for (const [, path] of paths) {
  161690. if (path.key >= fromIndex) {
  161691. path.key += incrementBy;
  161692. }
  161693. }
  161694. }
  161695. function _verifyNodeList(nodes) {
  161696. if (!nodes) {
  161697. return [];
  161698. }
  161699. if (!Array.isArray(nodes)) {
  161700. nodes = [nodes];
  161701. }
  161702. for (let i = 0; i < nodes.length; i++) {
  161703. const node = nodes[i];
  161704. let msg;
  161705. if (!node) {
  161706. msg = "has falsy node";
  161707. } else if (typeof node !== "object") {
  161708. msg = "contains a non-object node";
  161709. } else if (!node.type) {
  161710. msg = "without a type";
  161711. } else if (node instanceof _index.default) {
  161712. msg = "has a NodePath when it expected a raw object";
  161713. }
  161714. if (msg) {
  161715. const type = Array.isArray(node) ? "array" : typeof node;
  161716. throw new Error(`Node list ${msg} with the index of ${i} and type of ${type}`);
  161717. }
  161718. }
  161719. return nodes;
  161720. }
  161721. function unshiftContainer(listKey, nodes) {
  161722. this._assertUnremoved();
  161723. nodes = this._verifyNodeList(nodes);
  161724. const path = _index.default.get({
  161725. parentPath: this,
  161726. parent: this.node,
  161727. container: this.node[listKey],
  161728. listKey,
  161729. key: 0
  161730. }).setContext(this.context);
  161731. return path._containerInsertBefore(nodes);
  161732. }
  161733. function pushContainer(listKey, nodes) {
  161734. this._assertUnremoved();
  161735. const verifiedNodes = this._verifyNodeList(nodes);
  161736. const container = this.node[listKey];
  161737. const path = _index.default.get({
  161738. parentPath: this,
  161739. parent: this.node,
  161740. container,
  161741. listKey,
  161742. key: container.length
  161743. }).setContext(this.context);
  161744. return path.replaceWithMultiple(verifiedNodes);
  161745. }
  161746. function hoist(scope = this.scope) {
  161747. const hoister = new _hoister.default(this, scope);
  161748. return hoister.run();
  161749. }
  161750. }
  161751. });
  161752. // node_modules/@babel/traverse/lib/path/family.js
  161753. var require_family2 = __commonJS({
  161754. "node_modules/@babel/traverse/lib/path/family.js"(exports) {
  161755. "use strict";
  161756. Object.defineProperty(exports, "__esModule", {
  161757. value: true
  161758. });
  161759. exports.getOpposite = getOpposite;
  161760. exports.getCompletionRecords = getCompletionRecords;
  161761. exports.getSibling = getSibling;
  161762. exports.getPrevSibling = getPrevSibling;
  161763. exports.getNextSibling = getNextSibling;
  161764. exports.getAllNextSiblings = getAllNextSiblings;
  161765. exports.getAllPrevSiblings = getAllPrevSiblings;
  161766. exports.get = get;
  161767. exports._getKey = _getKey;
  161768. exports._getPattern = _getPattern;
  161769. exports.getBindingIdentifiers = getBindingIdentifiers;
  161770. exports.getOuterBindingIdentifiers = getOuterBindingIdentifiers;
  161771. exports.getBindingIdentifierPaths = getBindingIdentifierPaths;
  161772. exports.getOuterBindingIdentifierPaths = getOuterBindingIdentifierPaths;
  161773. var _index = require_path2();
  161774. var t2 = require_lib2();
  161775. var NORMAL_COMPLETION = 0;
  161776. var BREAK_COMPLETION = 1;
  161777. function NormalCompletion(path) {
  161778. return {
  161779. type: NORMAL_COMPLETION,
  161780. path
  161781. };
  161782. }
  161783. function BreakCompletion(path) {
  161784. return {
  161785. type: BREAK_COMPLETION,
  161786. path
  161787. };
  161788. }
  161789. function getOpposite() {
  161790. if (this.key === "left") {
  161791. return this.getSibling("right");
  161792. } else if (this.key === "right") {
  161793. return this.getSibling("left");
  161794. }
  161795. return null;
  161796. }
  161797. function addCompletionRecords(path, records, context) {
  161798. if (path)
  161799. return records.concat(_getCompletionRecords(path, context));
  161800. return records;
  161801. }
  161802. function completionRecordForSwitch(cases, records, context) {
  161803. let lastNormalCompletions = [];
  161804. for (let i = 0; i < cases.length; i++) {
  161805. const casePath = cases[i];
  161806. const caseCompletions = _getCompletionRecords(casePath, context);
  161807. const normalCompletions = [];
  161808. const breakCompletions = [];
  161809. for (const c of caseCompletions) {
  161810. if (c.type === NORMAL_COMPLETION) {
  161811. normalCompletions.push(c);
  161812. }
  161813. if (c.type === BREAK_COMPLETION) {
  161814. breakCompletions.push(c);
  161815. }
  161816. }
  161817. if (normalCompletions.length) {
  161818. lastNormalCompletions = normalCompletions;
  161819. }
  161820. records = records.concat(breakCompletions);
  161821. }
  161822. records = records.concat(lastNormalCompletions);
  161823. return records;
  161824. }
  161825. function normalCompletionToBreak(completions) {
  161826. completions.forEach((c) => {
  161827. c.type = BREAK_COMPLETION;
  161828. });
  161829. }
  161830. function replaceBreakStatementInBreakCompletion(completions, reachable) {
  161831. completions.forEach((c) => {
  161832. if (c.path.isBreakStatement({
  161833. label: null
  161834. })) {
  161835. if (reachable) {
  161836. c.path.replaceWith(t2.unaryExpression("void", t2.numericLiteral(0)));
  161837. } else {
  161838. c.path.remove();
  161839. }
  161840. }
  161841. });
  161842. }
  161843. function getStatementListCompletion(paths, context) {
  161844. let completions = [];
  161845. if (context.canHaveBreak) {
  161846. let lastNormalCompletions = [];
  161847. for (let i = 0; i < paths.length; i++) {
  161848. const path = paths[i];
  161849. const newContext = Object.assign({}, context, {
  161850. inCaseClause: false
  161851. });
  161852. if (path.isBlockStatement() && (context.inCaseClause || context.shouldPopulateBreak)) {
  161853. newContext.shouldPopulateBreak = true;
  161854. } else {
  161855. newContext.shouldPopulateBreak = false;
  161856. }
  161857. const statementCompletions = _getCompletionRecords(path, newContext);
  161858. if (statementCompletions.length > 0 && statementCompletions.every((c) => c.type === BREAK_COMPLETION)) {
  161859. if (lastNormalCompletions.length > 0 && statementCompletions.every((c) => c.path.isBreakStatement({
  161860. label: null
  161861. }))) {
  161862. normalCompletionToBreak(lastNormalCompletions);
  161863. completions = completions.concat(lastNormalCompletions);
  161864. if (lastNormalCompletions.some((c) => c.path.isDeclaration())) {
  161865. completions = completions.concat(statementCompletions);
  161866. replaceBreakStatementInBreakCompletion(statementCompletions, true);
  161867. }
  161868. replaceBreakStatementInBreakCompletion(statementCompletions, false);
  161869. } else {
  161870. completions = completions.concat(statementCompletions);
  161871. if (!context.shouldPopulateBreak) {
  161872. replaceBreakStatementInBreakCompletion(statementCompletions, true);
  161873. }
  161874. }
  161875. break;
  161876. }
  161877. if (i === paths.length - 1) {
  161878. completions = completions.concat(statementCompletions);
  161879. } else {
  161880. completions = completions.concat(statementCompletions.filter((c) => c.type === BREAK_COMPLETION));
  161881. lastNormalCompletions = statementCompletions.filter((c) => c.type === NORMAL_COMPLETION);
  161882. }
  161883. }
  161884. } else if (paths.length) {
  161885. completions = completions.concat(_getCompletionRecords(paths[paths.length - 1], context));
  161886. }
  161887. return completions;
  161888. }
  161889. function _getCompletionRecords(path, context) {
  161890. let records = [];
  161891. if (path.isIfStatement()) {
  161892. records = addCompletionRecords(path.get("consequent"), records, context);
  161893. records = addCompletionRecords(path.get("alternate"), records, context);
  161894. } else if (path.isDoExpression() || path.isFor() || path.isWhile() || path.isLabeledStatement()) {
  161895. records = addCompletionRecords(path.get("body"), records, context);
  161896. } else if (path.isProgram() || path.isBlockStatement()) {
  161897. records = records.concat(getStatementListCompletion(path.get("body"), context));
  161898. } else if (path.isFunction()) {
  161899. return _getCompletionRecords(path.get("body"), context);
  161900. } else if (path.isTryStatement()) {
  161901. records = addCompletionRecords(path.get("block"), records, context);
  161902. records = addCompletionRecords(path.get("handler"), records, context);
  161903. } else if (path.isCatchClause()) {
  161904. records = addCompletionRecords(path.get("body"), records, context);
  161905. } else if (path.isSwitchStatement()) {
  161906. records = completionRecordForSwitch(path.get("cases"), records, context);
  161907. } else if (path.isSwitchCase()) {
  161908. records = records.concat(getStatementListCompletion(path.get("consequent"), {
  161909. canHaveBreak: true,
  161910. shouldPopulateBreak: false,
  161911. inCaseClause: true
  161912. }));
  161913. } else if (path.isBreakStatement()) {
  161914. records.push(BreakCompletion(path));
  161915. } else {
  161916. records.push(NormalCompletion(path));
  161917. }
  161918. return records;
  161919. }
  161920. function getCompletionRecords() {
  161921. const records = _getCompletionRecords(this, {
  161922. canHaveBreak: false,
  161923. shouldPopulateBreak: false,
  161924. inCaseClause: false
  161925. });
  161926. return records.map((r) => r.path);
  161927. }
  161928. function getSibling(key) {
  161929. return _index.default.get({
  161930. parentPath: this.parentPath,
  161931. parent: this.parent,
  161932. container: this.container,
  161933. listKey: this.listKey,
  161934. key
  161935. }).setContext(this.context);
  161936. }
  161937. function getPrevSibling() {
  161938. return this.getSibling(this.key - 1);
  161939. }
  161940. function getNextSibling() {
  161941. return this.getSibling(this.key + 1);
  161942. }
  161943. function getAllNextSiblings() {
  161944. let _key = this.key;
  161945. let sibling = this.getSibling(++_key);
  161946. const siblings = [];
  161947. while (sibling.node) {
  161948. siblings.push(sibling);
  161949. sibling = this.getSibling(++_key);
  161950. }
  161951. return siblings;
  161952. }
  161953. function getAllPrevSiblings() {
  161954. let _key = this.key;
  161955. let sibling = this.getSibling(--_key);
  161956. const siblings = [];
  161957. while (sibling.node) {
  161958. siblings.push(sibling);
  161959. sibling = this.getSibling(--_key);
  161960. }
  161961. return siblings;
  161962. }
  161963. function get(key, context = true) {
  161964. if (context === true)
  161965. context = this.context;
  161966. const parts = key.split(".");
  161967. if (parts.length === 1) {
  161968. return this._getKey(key, context);
  161969. } else {
  161970. return this._getPattern(parts, context);
  161971. }
  161972. }
  161973. function _getKey(key, context) {
  161974. const node = this.node;
  161975. const container = node[key];
  161976. if (Array.isArray(container)) {
  161977. return container.map((_, i) => {
  161978. return _index.default.get({
  161979. listKey: key,
  161980. parentPath: this,
  161981. parent: node,
  161982. container,
  161983. key: i
  161984. }).setContext(context);
  161985. });
  161986. } else {
  161987. return _index.default.get({
  161988. parentPath: this,
  161989. parent: node,
  161990. container: node,
  161991. key
  161992. }).setContext(context);
  161993. }
  161994. }
  161995. function _getPattern(parts, context) {
  161996. let path = this;
  161997. for (const part of parts) {
  161998. if (part === ".") {
  161999. path = path.parentPath;
  162000. } else {
  162001. if (Array.isArray(path)) {
  162002. path = path[part];
  162003. } else {
  162004. path = path.get(part, context);
  162005. }
  162006. }
  162007. }
  162008. return path;
  162009. }
  162010. function getBindingIdentifiers(duplicates) {
  162011. return t2.getBindingIdentifiers(this.node, duplicates);
  162012. }
  162013. function getOuterBindingIdentifiers(duplicates) {
  162014. return t2.getOuterBindingIdentifiers(this.node, duplicates);
  162015. }
  162016. function getBindingIdentifierPaths(duplicates = false, outerOnly = false) {
  162017. const path = this;
  162018. let search2 = [].concat(path);
  162019. const ids = /* @__PURE__ */ Object.create(null);
  162020. while (search2.length) {
  162021. const id = search2.shift();
  162022. if (!id)
  162023. continue;
  162024. if (!id.node)
  162025. continue;
  162026. const keys2 = t2.getBindingIdentifiers.keys[id.node.type];
  162027. if (id.isIdentifier()) {
  162028. if (duplicates) {
  162029. const _ids = ids[id.node.name] = ids[id.node.name] || [];
  162030. _ids.push(id);
  162031. } else {
  162032. ids[id.node.name] = id;
  162033. }
  162034. continue;
  162035. }
  162036. if (id.isExportDeclaration()) {
  162037. const declaration = id.get("declaration");
  162038. if (declaration.isDeclaration()) {
  162039. search2.push(declaration);
  162040. }
  162041. continue;
  162042. }
  162043. if (outerOnly) {
  162044. if (id.isFunctionDeclaration()) {
  162045. search2.push(id.get("id"));
  162046. continue;
  162047. }
  162048. if (id.isFunctionExpression()) {
  162049. continue;
  162050. }
  162051. }
  162052. if (keys2) {
  162053. for (let i = 0; i < keys2.length; i++) {
  162054. const key = keys2[i];
  162055. const child = id.get(key);
  162056. if (Array.isArray(child) || child.node) {
  162057. search2 = search2.concat(child);
  162058. }
  162059. }
  162060. }
  162061. }
  162062. return ids;
  162063. }
  162064. function getOuterBindingIdentifierPaths(duplicates) {
  162065. return this.getBindingIdentifierPaths(duplicates, true);
  162066. }
  162067. }
  162068. });
  162069. // node_modules/@babel/traverse/lib/path/comments.js
  162070. var require_comments3 = __commonJS({
  162071. "node_modules/@babel/traverse/lib/path/comments.js"(exports) {
  162072. "use strict";
  162073. Object.defineProperty(exports, "__esModule", {
  162074. value: true
  162075. });
  162076. exports.shareCommentsWithSiblings = shareCommentsWithSiblings;
  162077. exports.addComment = addComment;
  162078. exports.addComments = addComments;
  162079. var t2 = require_lib2();
  162080. function shareCommentsWithSiblings() {
  162081. if (typeof this.key === "string")
  162082. return;
  162083. const node = this.node;
  162084. if (!node)
  162085. return;
  162086. const trailing = node.trailingComments;
  162087. const leading = node.leadingComments;
  162088. if (!trailing && !leading)
  162089. return;
  162090. const prev = this.getSibling(this.key - 1);
  162091. const next = this.getSibling(this.key + 1);
  162092. const hasPrev = Boolean(prev.node);
  162093. const hasNext = Boolean(next.node);
  162094. if (hasPrev && !hasNext) {
  162095. prev.addComments("trailing", trailing);
  162096. } else if (hasNext && !hasPrev) {
  162097. next.addComments("leading", leading);
  162098. }
  162099. }
  162100. function addComment(type, content3, line) {
  162101. t2.addComment(this.node, type, content3, line);
  162102. }
  162103. function addComments(type, comments) {
  162104. t2.addComments(this.node, type, comments);
  162105. }
  162106. }
  162107. });
  162108. // node_modules/@babel/traverse/lib/path/index.js
  162109. var require_path2 = __commonJS({
  162110. "node_modules/@babel/traverse/lib/path/index.js"(exports) {
  162111. "use strict";
  162112. Object.defineProperty(exports, "__esModule", {
  162113. value: true
  162114. });
  162115. exports.default = exports.SHOULD_SKIP = exports.SHOULD_STOP = exports.REMOVED = void 0;
  162116. var virtualTypes = require_virtual_types2();
  162117. var _debug = require_src();
  162118. var _index = require_lib37();
  162119. var _scope = require_scope2();
  162120. var t2 = require_lib2();
  162121. var _cache = require_cache2();
  162122. var _generator = require_lib18();
  162123. var NodePath_ancestry = require_ancestry2();
  162124. var NodePath_inference = require_inference2();
  162125. var NodePath_replacement = require_replacement2();
  162126. var NodePath_evaluation = require_evaluation2();
  162127. var NodePath_conversion = require_conversion2();
  162128. var NodePath_introspection = require_introspection2();
  162129. var NodePath_context = require_context3();
  162130. var NodePath_removal = require_removal2();
  162131. var NodePath_modification = require_modification2();
  162132. var NodePath_family = require_family2();
  162133. var NodePath_comments = require_comments3();
  162134. var debug = _debug("babel");
  162135. var REMOVED = 1 << 0;
  162136. exports.REMOVED = REMOVED;
  162137. var SHOULD_STOP = 1 << 1;
  162138. exports.SHOULD_STOP = SHOULD_STOP;
  162139. var SHOULD_SKIP = 1 << 2;
  162140. exports.SHOULD_SKIP = SHOULD_SKIP;
  162141. var NodePath = class {
  162142. constructor(hub, parent) {
  162143. this.contexts = [];
  162144. this.state = null;
  162145. this.opts = null;
  162146. this._traverseFlags = 0;
  162147. this.skipKeys = null;
  162148. this.parentPath = null;
  162149. this.container = null;
  162150. this.listKey = null;
  162151. this.key = null;
  162152. this.node = null;
  162153. this.type = null;
  162154. this.parent = parent;
  162155. this.hub = hub;
  162156. this.data = null;
  162157. this.context = null;
  162158. this.scope = null;
  162159. }
  162160. static get({
  162161. hub,
  162162. parentPath,
  162163. parent,
  162164. container,
  162165. listKey,
  162166. key
  162167. }) {
  162168. if (!hub && parentPath) {
  162169. hub = parentPath.hub;
  162170. }
  162171. if (!parent) {
  162172. throw new Error("To get a node path the parent needs to exist");
  162173. }
  162174. const targetNode = container[key];
  162175. let paths = _cache.path.get(parent);
  162176. if (!paths) {
  162177. paths = /* @__PURE__ */ new Map();
  162178. _cache.path.set(parent, paths);
  162179. }
  162180. let path = paths.get(targetNode);
  162181. if (!path) {
  162182. path = new NodePath(hub, parent);
  162183. if (targetNode)
  162184. paths.set(targetNode, path);
  162185. }
  162186. path.setup(parentPath, container, listKey, key);
  162187. return path;
  162188. }
  162189. getScope(scope) {
  162190. return this.isScope() ? new _scope.default(this) : scope;
  162191. }
  162192. setData(key, val) {
  162193. if (this.data == null) {
  162194. this.data = /* @__PURE__ */ Object.create(null);
  162195. }
  162196. return this.data[key] = val;
  162197. }
  162198. getData(key, def) {
  162199. if (this.data == null) {
  162200. this.data = /* @__PURE__ */ Object.create(null);
  162201. }
  162202. let val = this.data[key];
  162203. if (val === void 0 && def !== void 0)
  162204. val = this.data[key] = def;
  162205. return val;
  162206. }
  162207. buildCodeFrameError(msg, Error2 = SyntaxError) {
  162208. return this.hub.buildError(this.node, msg, Error2);
  162209. }
  162210. traverse(visitor, state) {
  162211. (0, _index.default)(this.node, visitor, this.scope, state, this);
  162212. }
  162213. set(key, node) {
  162214. t2.validate(this.node, key, node);
  162215. this.node[key] = node;
  162216. }
  162217. getPathLocation() {
  162218. const parts = [];
  162219. let path = this;
  162220. do {
  162221. let key = path.key;
  162222. if (path.inList)
  162223. key = `${path.listKey}[${key}]`;
  162224. parts.unshift(key);
  162225. } while (path = path.parentPath);
  162226. return parts.join(".");
  162227. }
  162228. debug(message) {
  162229. if (!debug.enabled)
  162230. return;
  162231. debug(`${this.getPathLocation()} ${this.type}: ${message}`);
  162232. }
  162233. toString() {
  162234. return (0, _generator.default)(this.node).code;
  162235. }
  162236. get inList() {
  162237. return !!this.listKey;
  162238. }
  162239. set inList(inList) {
  162240. if (!inList) {
  162241. this.listKey = null;
  162242. }
  162243. }
  162244. get parentKey() {
  162245. return this.listKey || this.key;
  162246. }
  162247. get shouldSkip() {
  162248. return !!(this._traverseFlags & SHOULD_SKIP);
  162249. }
  162250. set shouldSkip(v) {
  162251. if (v) {
  162252. this._traverseFlags |= SHOULD_SKIP;
  162253. } else {
  162254. this._traverseFlags &= ~SHOULD_SKIP;
  162255. }
  162256. }
  162257. get shouldStop() {
  162258. return !!(this._traverseFlags & SHOULD_STOP);
  162259. }
  162260. set shouldStop(v) {
  162261. if (v) {
  162262. this._traverseFlags |= SHOULD_STOP;
  162263. } else {
  162264. this._traverseFlags &= ~SHOULD_STOP;
  162265. }
  162266. }
  162267. get removed() {
  162268. return !!(this._traverseFlags & REMOVED);
  162269. }
  162270. set removed(v) {
  162271. if (v) {
  162272. this._traverseFlags |= REMOVED;
  162273. } else {
  162274. this._traverseFlags &= ~REMOVED;
  162275. }
  162276. }
  162277. };
  162278. Object.assign(NodePath.prototype, NodePath_ancestry, NodePath_inference, NodePath_replacement, NodePath_evaluation, NodePath_conversion, NodePath_introspection, NodePath_context, NodePath_removal, NodePath_modification, NodePath_family, NodePath_comments);
  162279. for (const type of t2.TYPES) {
  162280. const typeKey = `is${type}`;
  162281. const fn = t2[typeKey];
  162282. NodePath.prototype[typeKey] = function(opts) {
  162283. return fn(this.node, opts);
  162284. };
  162285. NodePath.prototype[`assert${type}`] = function(opts) {
  162286. if (!fn(this.node, opts)) {
  162287. throw new TypeError(`Expected node path of type ${type}`);
  162288. }
  162289. };
  162290. }
  162291. for (const type of Object.keys(virtualTypes)) {
  162292. if (type[0] === "_")
  162293. continue;
  162294. if (t2.TYPES.indexOf(type) < 0)
  162295. t2.TYPES.push(type);
  162296. const virtualType = virtualTypes[type];
  162297. NodePath.prototype[`is${type}`] = function(opts) {
  162298. return virtualType.checkPath(this, opts);
  162299. };
  162300. }
  162301. var _default = NodePath;
  162302. exports.default = _default;
  162303. }
  162304. });
  162305. // node_modules/@babel/traverse/lib/context.js
  162306. var require_context4 = __commonJS({
  162307. "node_modules/@babel/traverse/lib/context.js"(exports) {
  162308. "use strict";
  162309. Object.defineProperty(exports, "__esModule", {
  162310. value: true
  162311. });
  162312. exports.default = void 0;
  162313. var _path = require_path2();
  162314. var t2 = require_lib2();
  162315. var TraversalContext = class {
  162316. constructor(scope, opts, state, parentPath) {
  162317. this.queue = null;
  162318. this.priorityQueue = null;
  162319. this.parentPath = parentPath;
  162320. this.scope = scope;
  162321. this.state = state;
  162322. this.opts = opts;
  162323. }
  162324. shouldVisit(node) {
  162325. const opts = this.opts;
  162326. if (opts.enter || opts.exit)
  162327. return true;
  162328. if (opts[node.type])
  162329. return true;
  162330. const keys2 = t2.VISITOR_KEYS[node.type];
  162331. if (!(keys2 != null && keys2.length))
  162332. return false;
  162333. for (const key of keys2) {
  162334. if (node[key])
  162335. return true;
  162336. }
  162337. return false;
  162338. }
  162339. create(node, obj, key, listKey) {
  162340. return _path.default.get({
  162341. parentPath: this.parentPath,
  162342. parent: node,
  162343. container: obj,
  162344. key,
  162345. listKey
  162346. });
  162347. }
  162348. maybeQueue(path, notPriority) {
  162349. if (this.queue) {
  162350. if (notPriority) {
  162351. this.queue.push(path);
  162352. } else {
  162353. this.priorityQueue.push(path);
  162354. }
  162355. }
  162356. }
  162357. visitMultiple(container, parent, listKey) {
  162358. if (container.length === 0)
  162359. return false;
  162360. const queue = [];
  162361. for (let key = 0; key < container.length; key++) {
  162362. const node = container[key];
  162363. if (node && this.shouldVisit(node)) {
  162364. queue.push(this.create(parent, container, key, listKey));
  162365. }
  162366. }
  162367. return this.visitQueue(queue);
  162368. }
  162369. visitSingle(node, key) {
  162370. if (this.shouldVisit(node[key])) {
  162371. return this.visitQueue([this.create(node, node, key)]);
  162372. } else {
  162373. return false;
  162374. }
  162375. }
  162376. visitQueue(queue) {
  162377. this.queue = queue;
  162378. this.priorityQueue = [];
  162379. const visited = /* @__PURE__ */ new WeakSet();
  162380. let stop = false;
  162381. for (const path of queue) {
  162382. path.resync();
  162383. if (path.contexts.length === 0 || path.contexts[path.contexts.length - 1] !== this) {
  162384. path.pushContext(this);
  162385. }
  162386. if (path.key === null)
  162387. continue;
  162388. const {
  162389. node
  162390. } = path;
  162391. if (visited.has(node))
  162392. continue;
  162393. if (node)
  162394. visited.add(node);
  162395. if (path.visit()) {
  162396. stop = true;
  162397. break;
  162398. }
  162399. if (this.priorityQueue.length) {
  162400. stop = this.visitQueue(this.priorityQueue);
  162401. this.priorityQueue = [];
  162402. this.queue = queue;
  162403. if (stop)
  162404. break;
  162405. }
  162406. }
  162407. for (const path of queue) {
  162408. path.popContext();
  162409. }
  162410. this.queue = null;
  162411. return stop;
  162412. }
  162413. visit(node, key) {
  162414. const nodes = node[key];
  162415. if (!nodes)
  162416. return false;
  162417. if (Array.isArray(nodes)) {
  162418. return this.visitMultiple(nodes, node, key);
  162419. } else {
  162420. return this.visitSingle(node, key);
  162421. }
  162422. }
  162423. };
  162424. exports.default = TraversalContext;
  162425. }
  162426. });
  162427. // node_modules/@babel/traverse/lib/visitors.js
  162428. var require_visitors2 = __commonJS({
  162429. "node_modules/@babel/traverse/lib/visitors.js"(exports) {
  162430. "use strict";
  162431. Object.defineProperty(exports, "__esModule", {
  162432. value: true
  162433. });
  162434. exports.explode = explode;
  162435. exports.verify = verify;
  162436. exports.merge = merge2;
  162437. var virtualTypes = require_virtual_types2();
  162438. var t2 = require_lib2();
  162439. function explode(visitor) {
  162440. if (visitor._exploded)
  162441. return visitor;
  162442. visitor._exploded = true;
  162443. for (const nodeType of Object.keys(visitor)) {
  162444. if (shouldIgnoreKey(nodeType))
  162445. continue;
  162446. const parts = nodeType.split("|");
  162447. if (parts.length === 1)
  162448. continue;
  162449. const fns = visitor[nodeType];
  162450. delete visitor[nodeType];
  162451. for (const part of parts) {
  162452. visitor[part] = fns;
  162453. }
  162454. }
  162455. verify(visitor);
  162456. delete visitor.__esModule;
  162457. ensureEntranceObjects(visitor);
  162458. ensureCallbackArrays(visitor);
  162459. for (const nodeType of Object.keys(visitor)) {
  162460. if (shouldIgnoreKey(nodeType))
  162461. continue;
  162462. const wrapper = virtualTypes[nodeType];
  162463. if (!wrapper)
  162464. continue;
  162465. const fns = visitor[nodeType];
  162466. for (const type of Object.keys(fns)) {
  162467. fns[type] = wrapCheck(wrapper, fns[type]);
  162468. }
  162469. delete visitor[nodeType];
  162470. if (wrapper.types) {
  162471. for (const type of wrapper.types) {
  162472. if (visitor[type]) {
  162473. mergePair(visitor[type], fns);
  162474. } else {
  162475. visitor[type] = fns;
  162476. }
  162477. }
  162478. } else {
  162479. mergePair(visitor, fns);
  162480. }
  162481. }
  162482. for (const nodeType of Object.keys(visitor)) {
  162483. if (shouldIgnoreKey(nodeType))
  162484. continue;
  162485. const fns = visitor[nodeType];
  162486. let aliases = t2.FLIPPED_ALIAS_KEYS[nodeType];
  162487. const deprecatedKey = t2.DEPRECATED_KEYS[nodeType];
  162488. if (deprecatedKey) {
  162489. console.trace(`Visitor defined for ${nodeType} but it has been renamed to ${deprecatedKey}`);
  162490. aliases = [deprecatedKey];
  162491. }
  162492. if (!aliases)
  162493. continue;
  162494. delete visitor[nodeType];
  162495. for (const alias of aliases) {
  162496. const existing = visitor[alias];
  162497. if (existing) {
  162498. mergePair(existing, fns);
  162499. } else {
  162500. visitor[alias] = Object.assign({}, fns);
  162501. }
  162502. }
  162503. }
  162504. for (const nodeType of Object.keys(visitor)) {
  162505. if (shouldIgnoreKey(nodeType))
  162506. continue;
  162507. ensureCallbackArrays(visitor[nodeType]);
  162508. }
  162509. return visitor;
  162510. }
  162511. function verify(visitor) {
  162512. if (visitor._verified)
  162513. return;
  162514. if (typeof visitor === "function") {
  162515. throw new Error("You passed `traverse()` a function when it expected a visitor object, are you sure you didn't mean `{ enter: Function }`?");
  162516. }
  162517. for (const nodeType of Object.keys(visitor)) {
  162518. if (nodeType === "enter" || nodeType === "exit") {
  162519. validateVisitorMethods(nodeType, visitor[nodeType]);
  162520. }
  162521. if (shouldIgnoreKey(nodeType))
  162522. continue;
  162523. if (t2.TYPES.indexOf(nodeType) < 0) {
  162524. throw new Error(`You gave us a visitor for the node type ${nodeType} but it's not a valid type`);
  162525. }
  162526. const visitors = visitor[nodeType];
  162527. if (typeof visitors === "object") {
  162528. for (const visitorKey of Object.keys(visitors)) {
  162529. if (visitorKey === "enter" || visitorKey === "exit") {
  162530. validateVisitorMethods(`${nodeType}.${visitorKey}`, visitors[visitorKey]);
  162531. } else {
  162532. throw new Error(`You passed \`traverse()\` a visitor object with the property ${nodeType} that has the invalid property ${visitorKey}`);
  162533. }
  162534. }
  162535. }
  162536. }
  162537. visitor._verified = true;
  162538. }
  162539. function validateVisitorMethods(path, val) {
  162540. const fns = [].concat(val);
  162541. for (const fn of fns) {
  162542. if (typeof fn !== "function") {
  162543. throw new TypeError(`Non-function found defined in ${path} with type ${typeof fn}`);
  162544. }
  162545. }
  162546. }
  162547. function merge2(visitors, states = [], wrapper) {
  162548. const rootVisitor = {};
  162549. for (let i = 0; i < visitors.length; i++) {
  162550. const visitor = visitors[i];
  162551. const state = states[i];
  162552. explode(visitor);
  162553. for (const type of Object.keys(visitor)) {
  162554. let visitorType = visitor[type];
  162555. if (state || wrapper) {
  162556. visitorType = wrapWithStateOrWrapper(visitorType, state, wrapper);
  162557. }
  162558. const nodeVisitor = rootVisitor[type] = rootVisitor[type] || {};
  162559. mergePair(nodeVisitor, visitorType);
  162560. }
  162561. }
  162562. return rootVisitor;
  162563. }
  162564. function wrapWithStateOrWrapper(oldVisitor, state, wrapper) {
  162565. const newVisitor = {};
  162566. for (const key of Object.keys(oldVisitor)) {
  162567. let fns = oldVisitor[key];
  162568. if (!Array.isArray(fns))
  162569. continue;
  162570. fns = fns.map(function(fn) {
  162571. let newFn = fn;
  162572. if (state) {
  162573. newFn = function(path) {
  162574. return fn.call(state, path, state);
  162575. };
  162576. }
  162577. if (wrapper) {
  162578. newFn = wrapper(state.key, key, newFn);
  162579. }
  162580. if (newFn !== fn) {
  162581. newFn.toString = () => fn.toString();
  162582. }
  162583. return newFn;
  162584. });
  162585. newVisitor[key] = fns;
  162586. }
  162587. return newVisitor;
  162588. }
  162589. function ensureEntranceObjects(obj) {
  162590. for (const key of Object.keys(obj)) {
  162591. if (shouldIgnoreKey(key))
  162592. continue;
  162593. const fns = obj[key];
  162594. if (typeof fns === "function") {
  162595. obj[key] = {
  162596. enter: fns
  162597. };
  162598. }
  162599. }
  162600. }
  162601. function ensureCallbackArrays(obj) {
  162602. if (obj.enter && !Array.isArray(obj.enter))
  162603. obj.enter = [obj.enter];
  162604. if (obj.exit && !Array.isArray(obj.exit))
  162605. obj.exit = [obj.exit];
  162606. }
  162607. function wrapCheck(wrapper, fn) {
  162608. const newFn = function(path) {
  162609. if (wrapper.checkPath(path)) {
  162610. return fn.apply(this, arguments);
  162611. }
  162612. };
  162613. newFn.toString = () => fn.toString();
  162614. return newFn;
  162615. }
  162616. function shouldIgnoreKey(key) {
  162617. if (key[0] === "_")
  162618. return true;
  162619. if (key === "enter" || key === "exit" || key === "shouldSkip")
  162620. return true;
  162621. if (key === "denylist" || key === "noScope" || key === "skipKeys" || key === "blacklist") {
  162622. return true;
  162623. }
  162624. return false;
  162625. }
  162626. function mergePair(dest, src) {
  162627. for (const key of Object.keys(src)) {
  162628. dest[key] = [].concat(dest[key] || [], src[key]);
  162629. }
  162630. }
  162631. }
  162632. });
  162633. // node_modules/@babel/traverse/lib/hub.js
  162634. var require_hub2 = __commonJS({
  162635. "node_modules/@babel/traverse/lib/hub.js"(exports) {
  162636. "use strict";
  162637. Object.defineProperty(exports, "__esModule", {
  162638. value: true
  162639. });
  162640. exports.default = void 0;
  162641. var Hub = class {
  162642. getCode() {
  162643. }
  162644. getScope() {
  162645. }
  162646. addHelper() {
  162647. throw new Error("Helpers are not supported by the default hub.");
  162648. }
  162649. buildError(node, msg, Error2 = TypeError) {
  162650. return new Error2(msg);
  162651. }
  162652. };
  162653. exports.default = Hub;
  162654. }
  162655. });
  162656. // node_modules/@babel/traverse/lib/index.js
  162657. var require_lib37 = __commonJS({
  162658. "node_modules/@babel/traverse/lib/index.js"(exports) {
  162659. "use strict";
  162660. Object.defineProperty(exports, "__esModule", {
  162661. value: true
  162662. });
  162663. Object.defineProperty(exports, "NodePath", {
  162664. enumerable: true,
  162665. get: function() {
  162666. return _path.default;
  162667. }
  162668. });
  162669. Object.defineProperty(exports, "Scope", {
  162670. enumerable: true,
  162671. get: function() {
  162672. return _scope.default;
  162673. }
  162674. });
  162675. Object.defineProperty(exports, "Hub", {
  162676. enumerable: true,
  162677. get: function() {
  162678. return _hub.default;
  162679. }
  162680. });
  162681. exports.visitors = exports.default = void 0;
  162682. var _context = require_context4();
  162683. var visitors = require_visitors2();
  162684. exports.visitors = visitors;
  162685. var t2 = require_lib2();
  162686. var cache = require_cache2();
  162687. var _path = require_path2();
  162688. var _scope = require_scope2();
  162689. var _hub = require_hub2();
  162690. function traverse(parent, opts = {}, scope, state, parentPath) {
  162691. if (!parent)
  162692. return;
  162693. if (!opts.noScope && !scope) {
  162694. if (parent.type !== "Program" && parent.type !== "File") {
  162695. throw new Error(`You must pass a scope and parentPath unless traversing a Program/File. Instead of that you tried to traverse a ${parent.type} node without passing scope and parentPath.`);
  162696. }
  162697. }
  162698. if (!t2.VISITOR_KEYS[parent.type]) {
  162699. return;
  162700. }
  162701. visitors.explode(opts);
  162702. traverse.node(parent, opts, scope, state, parentPath);
  162703. }
  162704. var _default = traverse;
  162705. exports.default = _default;
  162706. traverse.visitors = visitors;
  162707. traverse.verify = visitors.verify;
  162708. traverse.explode = visitors.explode;
  162709. traverse.cheap = function(node, enter) {
  162710. return t2.traverseFast(node, enter);
  162711. };
  162712. traverse.node = function(node, opts, scope, state, parentPath, skipKeys) {
  162713. const keys2 = t2.VISITOR_KEYS[node.type];
  162714. if (!keys2)
  162715. return;
  162716. const context = new _context.default(scope, opts, state, parentPath);
  162717. for (const key of keys2) {
  162718. if (skipKeys && skipKeys[key])
  162719. continue;
  162720. if (context.visit(node, key))
  162721. return;
  162722. }
  162723. };
  162724. traverse.clearNode = function(node, opts) {
  162725. t2.removeProperties(node, opts);
  162726. cache.path.delete(node);
  162727. };
  162728. traverse.removeProperties = function(tree, opts) {
  162729. t2.traverseFast(tree, traverse.clearNode, opts);
  162730. return tree;
  162731. };
  162732. function hasDenylistedType(path, state) {
  162733. if (path.node.type === state.type) {
  162734. state.has = true;
  162735. path.stop();
  162736. }
  162737. }
  162738. traverse.hasType = function(tree, type, denylistTypes) {
  162739. if (denylistTypes != null && denylistTypes.includes(tree.type))
  162740. return false;
  162741. if (tree.type === type)
  162742. return true;
  162743. const state = {
  162744. has: false,
  162745. type
  162746. };
  162747. traverse(tree, {
  162748. noScope: true,
  162749. denylist: denylistTypes,
  162750. enter: hasDenylistedType
  162751. }, null, state);
  162752. return state.has;
  162753. };
  162754. traverse.cache = cache;
  162755. }
  162756. });
  162757. // node_modules/unified/node_modules/is-buffer/index.js
  162758. var require_is_buffer = __commonJS({
  162759. "node_modules/unified/node_modules/is-buffer/index.js"(exports, module) {
  162760. module.exports = function isBuffer2(obj) {
  162761. return obj != null && obj.constructor != null && typeof obj.constructor.isBuffer === "function" && obj.constructor.isBuffer(obj);
  162762. };
  162763. }
  162764. });
  162765. // node_modules/extend/index.js
  162766. var require_extend = __commonJS({
  162767. "node_modules/extend/index.js"(exports, module) {
  162768. "use strict";
  162769. var hasOwn2 = Object.prototype.hasOwnProperty;
  162770. var toStr = Object.prototype.toString;
  162771. var defineProperty = Object.defineProperty;
  162772. var gOPD = Object.getOwnPropertyDescriptor;
  162773. var isArray2 = function isArray3(arr) {
  162774. if (typeof Array.isArray === "function") {
  162775. return Array.isArray(arr);
  162776. }
  162777. return toStr.call(arr) === "[object Array]";
  162778. };
  162779. var isPlainObject2 = function isPlainObject3(obj) {
  162780. if (!obj || toStr.call(obj) !== "[object Object]") {
  162781. return false;
  162782. }
  162783. var hasOwnConstructor = hasOwn2.call(obj, "constructor");
  162784. var hasIsPrototypeOf = obj.constructor && obj.constructor.prototype && hasOwn2.call(obj.constructor.prototype, "isPrototypeOf");
  162785. if (obj.constructor && !hasOwnConstructor && !hasIsPrototypeOf) {
  162786. return false;
  162787. }
  162788. var key;
  162789. for (key in obj) {
  162790. }
  162791. return typeof key === "undefined" || hasOwn2.call(obj, key);
  162792. };
  162793. var setProperty = function setProperty2(target, options) {
  162794. if (defineProperty && options.name === "__proto__") {
  162795. defineProperty(target, options.name, {
  162796. enumerable: true,
  162797. configurable: true,
  162798. value: options.newValue,
  162799. writable: true
  162800. });
  162801. } else {
  162802. target[options.name] = options.newValue;
  162803. }
  162804. };
  162805. var getProperty = function getProperty2(obj, name2) {
  162806. if (name2 === "__proto__") {
  162807. if (!hasOwn2.call(obj, name2)) {
  162808. return void 0;
  162809. } else if (gOPD) {
  162810. return gOPD(obj, name2).value;
  162811. }
  162812. }
  162813. return obj[name2];
  162814. };
  162815. module.exports = function extend3() {
  162816. var options, name2, src, copy, copyIsArray, clone;
  162817. var target = arguments[0];
  162818. var i = 1;
  162819. var length = arguments.length;
  162820. var deep = false;
  162821. if (typeof target === "boolean") {
  162822. deep = target;
  162823. target = arguments[1] || {};
  162824. i = 2;
  162825. }
  162826. if (target == null || typeof target !== "object" && typeof target !== "function") {
  162827. target = {};
  162828. }
  162829. for (; i < length; ++i) {
  162830. options = arguments[i];
  162831. if (options != null) {
  162832. for (name2 in options) {
  162833. src = getProperty(target, name2);
  162834. copy = getProperty(options, name2);
  162835. if (target !== copy) {
  162836. if (deep && copy && (isPlainObject2(copy) || (copyIsArray = isArray2(copy)))) {
  162837. if (copyIsArray) {
  162838. copyIsArray = false;
  162839. clone = src && isArray2(src) ? src : [];
  162840. } else {
  162841. clone = src && isPlainObject2(src) ? src : {};
  162842. }
  162843. setProperty(target, { name: name2, newValue: extend3(deep, clone, copy) });
  162844. } else if (typeof copy !== "undefined") {
  162845. setProperty(target, { name: name2, newValue: copy });
  162846. }
  162847. }
  162848. }
  162849. }
  162850. }
  162851. return target;
  162852. };
  162853. }
  162854. });
  162855. // node_modules/vfile/node_modules/is-buffer/index.js
  162856. var require_is_buffer2 = __commonJS({
  162857. "node_modules/vfile/node_modules/is-buffer/index.js"(exports, module) {
  162858. module.exports = function isBuffer2(obj) {
  162859. return obj != null && obj.constructor != null && typeof obj.constructor.isBuffer === "function" && obj.constructor.isBuffer(obj);
  162860. };
  162861. }
  162862. });
  162863. // node_modules/acorn-jsx/xhtml.js
  162864. var require_xhtml = __commonJS({
  162865. "node_modules/acorn-jsx/xhtml.js"(exports, module) {
  162866. module.exports = {
  162867. quot: '"',
  162868. amp: "&",
  162869. apos: "'",
  162870. lt: "<",
  162871. gt: ">",
  162872. nbsp: "\xA0",
  162873. iexcl: "\xA1",
  162874. cent: "\xA2",
  162875. pound: "\xA3",
  162876. curren: "\xA4",
  162877. yen: "\xA5",
  162878. brvbar: "\xA6",
  162879. sect: "\xA7",
  162880. uml: "\xA8",
  162881. copy: "\xA9",
  162882. ordf: "\xAA",
  162883. laquo: "\xAB",
  162884. not: "\xAC",
  162885. shy: "\xAD",
  162886. reg: "\xAE",
  162887. macr: "\xAF",
  162888. deg: "\xB0",
  162889. plusmn: "\xB1",
  162890. sup2: "\xB2",
  162891. sup3: "\xB3",
  162892. acute: "\xB4",
  162893. micro: "\xB5",
  162894. para: "\xB6",
  162895. middot: "\xB7",
  162896. cedil: "\xB8",
  162897. sup1: "\xB9",
  162898. ordm: "\xBA",
  162899. raquo: "\xBB",
  162900. frac14: "\xBC",
  162901. frac12: "\xBD",
  162902. frac34: "\xBE",
  162903. iquest: "\xBF",
  162904. Agrave: "\xC0",
  162905. Aacute: "\xC1",
  162906. Acirc: "\xC2",
  162907. Atilde: "\xC3",
  162908. Auml: "\xC4",
  162909. Aring: "\xC5",
  162910. AElig: "\xC6",
  162911. Ccedil: "\xC7",
  162912. Egrave: "\xC8",
  162913. Eacute: "\xC9",
  162914. Ecirc: "\xCA",
  162915. Euml: "\xCB",
  162916. Igrave: "\xCC",
  162917. Iacute: "\xCD",
  162918. Icirc: "\xCE",
  162919. Iuml: "\xCF",
  162920. ETH: "\xD0",
  162921. Ntilde: "\xD1",
  162922. Ograve: "\xD2",
  162923. Oacute: "\xD3",
  162924. Ocirc: "\xD4",
  162925. Otilde: "\xD5",
  162926. Ouml: "\xD6",
  162927. times: "\xD7",
  162928. Oslash: "\xD8",
  162929. Ugrave: "\xD9",
  162930. Uacute: "\xDA",
  162931. Ucirc: "\xDB",
  162932. Uuml: "\xDC",
  162933. Yacute: "\xDD",
  162934. THORN: "\xDE",
  162935. szlig: "\xDF",
  162936. agrave: "\xE0",
  162937. aacute: "\xE1",
  162938. acirc: "\xE2",
  162939. atilde: "\xE3",
  162940. auml: "\xE4",
  162941. aring: "\xE5",
  162942. aelig: "\xE6",
  162943. ccedil: "\xE7",
  162944. egrave: "\xE8",
  162945. eacute: "\xE9",
  162946. ecirc: "\xEA",
  162947. euml: "\xEB",
  162948. igrave: "\xEC",
  162949. iacute: "\xED",
  162950. icirc: "\xEE",
  162951. iuml: "\xEF",
  162952. eth: "\xF0",
  162953. ntilde: "\xF1",
  162954. ograve: "\xF2",
  162955. oacute: "\xF3",
  162956. ocirc: "\xF4",
  162957. otilde: "\xF5",
  162958. ouml: "\xF6",
  162959. divide: "\xF7",
  162960. oslash: "\xF8",
  162961. ugrave: "\xF9",
  162962. uacute: "\xFA",
  162963. ucirc: "\xFB",
  162964. uuml: "\xFC",
  162965. yacute: "\xFD",
  162966. thorn: "\xFE",
  162967. yuml: "\xFF",
  162968. OElig: "\u0152",
  162969. oelig: "\u0153",
  162970. Scaron: "\u0160",
  162971. scaron: "\u0161",
  162972. Yuml: "\u0178",
  162973. fnof: "\u0192",
  162974. circ: "\u02C6",
  162975. tilde: "\u02DC",
  162976. Alpha: "\u0391",
  162977. Beta: "\u0392",
  162978. Gamma: "\u0393",
  162979. Delta: "\u0394",
  162980. Epsilon: "\u0395",
  162981. Zeta: "\u0396",
  162982. Eta: "\u0397",
  162983. Theta: "\u0398",
  162984. Iota: "\u0399",
  162985. Kappa: "\u039A",
  162986. Lambda: "\u039B",
  162987. Mu: "\u039C",
  162988. Nu: "\u039D",
  162989. Xi: "\u039E",
  162990. Omicron: "\u039F",
  162991. Pi: "\u03A0",
  162992. Rho: "\u03A1",
  162993. Sigma: "\u03A3",
  162994. Tau: "\u03A4",
  162995. Upsilon: "\u03A5",
  162996. Phi: "\u03A6",
  162997. Chi: "\u03A7",
  162998. Psi: "\u03A8",
  162999. Omega: "\u03A9",
  163000. alpha: "\u03B1",
  163001. beta: "\u03B2",
  163002. gamma: "\u03B3",
  163003. delta: "\u03B4",
  163004. epsilon: "\u03B5",
  163005. zeta: "\u03B6",
  163006. eta: "\u03B7",
  163007. theta: "\u03B8",
  163008. iota: "\u03B9",
  163009. kappa: "\u03BA",
  163010. lambda: "\u03BB",
  163011. mu: "\u03BC",
  163012. nu: "\u03BD",
  163013. xi: "\u03BE",
  163014. omicron: "\u03BF",
  163015. pi: "\u03C0",
  163016. rho: "\u03C1",
  163017. sigmaf: "\u03C2",
  163018. sigma: "\u03C3",
  163019. tau: "\u03C4",
  163020. upsilon: "\u03C5",
  163021. phi: "\u03C6",
  163022. chi: "\u03C7",
  163023. psi: "\u03C8",
  163024. omega: "\u03C9",
  163025. thetasym: "\u03D1",
  163026. upsih: "\u03D2",
  163027. piv: "\u03D6",
  163028. ensp: "\u2002",
  163029. emsp: "\u2003",
  163030. thinsp: "\u2009",
  163031. zwnj: "\u200C",
  163032. zwj: "\u200D",
  163033. lrm: "\u200E",
  163034. rlm: "\u200F",
  163035. ndash: "\u2013",
  163036. mdash: "\u2014",
  163037. lsquo: "\u2018",
  163038. rsquo: "\u2019",
  163039. sbquo: "\u201A",
  163040. ldquo: "\u201C",
  163041. rdquo: "\u201D",
  163042. bdquo: "\u201E",
  163043. dagger: "\u2020",
  163044. Dagger: "\u2021",
  163045. bull: "\u2022",
  163046. hellip: "\u2026",
  163047. permil: "\u2030",
  163048. prime: "\u2032",
  163049. Prime: "\u2033",
  163050. lsaquo: "\u2039",
  163051. rsaquo: "\u203A",
  163052. oline: "\u203E",
  163053. frasl: "\u2044",
  163054. euro: "\u20AC",
  163055. image: "\u2111",
  163056. weierp: "\u2118",
  163057. real: "\u211C",
  163058. trade: "\u2122",
  163059. alefsym: "\u2135",
  163060. larr: "\u2190",
  163061. uarr: "\u2191",
  163062. rarr: "\u2192",
  163063. darr: "\u2193",
  163064. harr: "\u2194",
  163065. crarr: "\u21B5",
  163066. lArr: "\u21D0",
  163067. uArr: "\u21D1",
  163068. rArr: "\u21D2",
  163069. dArr: "\u21D3",
  163070. hArr: "\u21D4",
  163071. forall: "\u2200",
  163072. part: "\u2202",
  163073. exist: "\u2203",
  163074. empty: "\u2205",
  163075. nabla: "\u2207",
  163076. isin: "\u2208",
  163077. notin: "\u2209",
  163078. ni: "\u220B",
  163079. prod: "\u220F",
  163080. sum: "\u2211",
  163081. minus: "\u2212",
  163082. lowast: "\u2217",
  163083. radic: "\u221A",
  163084. prop: "\u221D",
  163085. infin: "\u221E",
  163086. ang: "\u2220",
  163087. and: "\u2227",
  163088. or: "\u2228",
  163089. cap: "\u2229",
  163090. cup: "\u222A",
  163091. "int": "\u222B",
  163092. there4: "\u2234",
  163093. sim: "\u223C",
  163094. cong: "\u2245",
  163095. asymp: "\u2248",
  163096. ne: "\u2260",
  163097. equiv: "\u2261",
  163098. le: "\u2264",
  163099. ge: "\u2265",
  163100. sub: "\u2282",
  163101. sup: "\u2283",
  163102. nsub: "\u2284",
  163103. sube: "\u2286",
  163104. supe: "\u2287",
  163105. oplus: "\u2295",
  163106. otimes: "\u2297",
  163107. perp: "\u22A5",
  163108. sdot: "\u22C5",
  163109. lceil: "\u2308",
  163110. rceil: "\u2309",
  163111. lfloor: "\u230A",
  163112. rfloor: "\u230B",
  163113. lang: "\u2329",
  163114. rang: "\u232A",
  163115. loz: "\u25CA",
  163116. spades: "\u2660",
  163117. clubs: "\u2663",
  163118. hearts: "\u2665",
  163119. diams: "\u2666"
  163120. };
  163121. }
  163122. });
  163123. // node_modules/acorn/dist/acorn.js
  163124. var require_acorn = __commonJS({
  163125. "node_modules/acorn/dist/acorn.js"(exports, module) {
  163126. (function(global2, factory2) {
  163127. typeof exports === "object" && typeof module !== "undefined" ? factory2(exports) : typeof define === "function" && define.amd ? define(["exports"], factory2) : (global2 = typeof globalThis !== "undefined" ? globalThis : global2 || self, factory2(global2.acorn = {}));
  163128. })(exports, function(exports2) {
  163129. "use strict";
  163130. var reservedWords2 = {
  163131. 3: "abstract boolean byte char class double enum export extends final float goto implements import int interface long native package private protected public short static super synchronized throws transient volatile",
  163132. 5: "class enum extends super const export import",
  163133. 6: "enum",
  163134. strict: "implements interface let package private protected public static yield",
  163135. strictBind: "eval arguments"
  163136. };
  163137. var ecma5AndLessKeywords2 = "break case catch continue debugger default do else finally for function if return switch throw try var while with null true false instanceof typeof void delete new in this";
  163138. var keywords$12 = {
  163139. 5: ecma5AndLessKeywords2,
  163140. "5module": ecma5AndLessKeywords2 + " export import",
  163141. 6: ecma5AndLessKeywords2 + " const class extends export import super"
  163142. };
  163143. var keywordRelationalOperator2 = /^in(stanceof)?$/;
  163144. var nonASCIIidentifierStartChars2 = "\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u0870-\u0887\u0889-\u088E\u08A0-\u08C9\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C5D\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u1711\u171F-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1878\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4C\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309B-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u31BF\u31F0-\u31FF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7CA\uA7D0\uA7D1\uA7D3\uA7D5-\uA7D9\uA7F2-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC";
  163145. var nonASCIIidentifierChars2 = "\u200C\u200D\xB7\u0300-\u036F\u0387\u0483-\u0487\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u0669\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u06F0-\u06F9\u0711\u0730-\u074A\u07A6-\u07B0\u07C0-\u07C9\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u0898-\u089F\u08CA-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0966-\u096F\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u09E6-\u09EF\u09FE\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A66-\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0AE6-\u0AEF\u0AFA-\u0AFF\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B55-\u0B57\u0B62\u0B63\u0B66-\u0B6F\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0BE6-\u0BEF\u0C00-\u0C04\u0C3C\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C66-\u0C6F\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0CE6-\u0CEF\u0D00-\u0D03\u0D3B\u0D3C\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D66-\u0D6F\u0D81-\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0E50-\u0E59\u0EB1\u0EB4-\u0EBC\u0EC8-\u0ECD\u0ED0-\u0ED9\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1040-\u1049\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F-\u109D\u135D-\u135F\u1369-\u1371\u1712-\u1715\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u17E0-\u17E9\u180B-\u180D\u180F-\u1819\u18A9\u1920-\u192B\u1930-\u193B\u1946-\u194F\u19D0-\u19DA\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AB0-\u1ABD\u1ABF-\u1ACE\u1B00-\u1B04\u1B34-\u1B44\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BB0-\u1BB9\u1BE6-\u1BF3\u1C24-\u1C37\u1C40-\u1C49\u1C50-\u1C59\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF4\u1CF7-\u1CF9\u1DC0-\u1DFF\u203F\u2040\u2054\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA620-\uA629\uA66F\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA82C\uA880\uA881\uA8B4-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F1\uA8FF-\uA909\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9D0-\uA9D9\uA9E5\uA9F0-\uA9F9\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA50-\uAA59\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uABF0-\uABF9\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFF10-\uFF19\uFF3F";
  163146. var nonASCIIidentifierStart2 = new RegExp("[" + nonASCIIidentifierStartChars2 + "]");
  163147. var nonASCIIidentifier2 = new RegExp("[" + nonASCIIidentifierStartChars2 + nonASCIIidentifierChars2 + "]");
  163148. nonASCIIidentifierStartChars2 = nonASCIIidentifierChars2 = null;
  163149. var astralIdentifierStartCodes2 = [0, 11, 2, 25, 2, 18, 2, 1, 2, 14, 3, 13, 35, 122, 70, 52, 268, 28, 4, 48, 48, 31, 14, 29, 6, 37, 11, 29, 3, 35, 5, 7, 2, 4, 43, 157, 19, 35, 5, 35, 5, 39, 9, 51, 13, 10, 2, 14, 2, 6, 2, 1, 2, 10, 2, 14, 2, 6, 2, 1, 68, 310, 10, 21, 11, 7, 25, 5, 2, 41, 2, 8, 70, 5, 3, 0, 2, 43, 2, 1, 4, 0, 3, 22, 11, 22, 10, 30, 66, 18, 2, 1, 11, 21, 11, 25, 71, 55, 7, 1, 65, 0, 16, 3, 2, 2, 2, 28, 43, 28, 4, 28, 36, 7, 2, 27, 28, 53, 11, 21, 11, 18, 14, 17, 111, 72, 56, 50, 14, 50, 14, 35, 349, 41, 7, 1, 79, 28, 11, 0, 9, 21, 43, 17, 47, 20, 28, 22, 13, 52, 58, 1, 3, 0, 14, 44, 33, 24, 27, 35, 30, 0, 3, 0, 9, 34, 4, 0, 13, 47, 15, 3, 22, 0, 2, 0, 36, 17, 2, 24, 85, 6, 2, 0, 2, 3, 2, 14, 2, 9, 8, 46, 39, 7, 3, 1, 3, 21, 2, 6, 2, 1, 2, 4, 4, 0, 19, 0, 13, 4, 159, 52, 19, 3, 21, 2, 31, 47, 21, 1, 2, 0, 185, 46, 42, 3, 37, 47, 21, 0, 60, 42, 14, 0, 72, 26, 38, 6, 186, 43, 117, 63, 32, 7, 3, 0, 3, 7, 2, 1, 2, 23, 16, 0, 2, 0, 95, 7, 3, 38, 17, 0, 2, 0, 29, 0, 11, 39, 8, 0, 22, 0, 12, 45, 20, 0, 19, 72, 264, 8, 2, 36, 18, 0, 50, 29, 113, 6, 2, 1, 2, 37, 22, 0, 26, 5, 2, 1, 2, 31, 15, 0, 328, 18, 190, 0, 80, 921, 103, 110, 18, 195, 2637, 96, 16, 1070, 4050, 582, 8634, 568, 8, 30, 18, 78, 18, 29, 19, 47, 17, 3, 32, 20, 6, 18, 689, 63, 129, 74, 6, 0, 67, 12, 65, 1, 2, 0, 29, 6135, 9, 1237, 43, 8, 8936, 3, 2, 6, 2, 1, 2, 290, 46, 2, 18, 3, 9, 395, 2309, 106, 6, 12, 4, 8, 8, 9, 5991, 84, 2, 70, 2, 1, 3, 0, 3, 1, 3, 3, 2, 11, 2, 0, 2, 6, 2, 64, 2, 3, 3, 7, 2, 6, 2, 27, 2, 3, 2, 4, 2, 0, 4, 6, 2, 339, 3, 24, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 7, 1845, 30, 482, 44, 11, 6, 17, 0, 322, 29, 19, 43, 1269, 6, 2, 3, 2, 1, 2, 14, 2, 196, 60, 67, 8, 0, 1205, 3, 2, 26, 2, 1, 2, 0, 3, 0, 2, 9, 2, 3, 2, 0, 2, 0, 7, 0, 5, 0, 2, 0, 2, 0, 2, 2, 2, 1, 2, 0, 3, 0, 2, 0, 2, 0, 2, 0, 2, 0, 2, 1, 2, 0, 3, 3, 2, 6, 2, 3, 2, 3, 2, 0, 2, 9, 2, 16, 6, 2, 2, 4, 2, 16, 4421, 42719, 33, 4152, 8, 221, 3, 5761, 15, 7472, 3104, 541, 1507, 4938];
  163150. var astralIdentifierCodes2 = [509, 0, 227, 0, 150, 4, 294, 9, 1368, 2, 2, 1, 6, 3, 41, 2, 5, 0, 166, 1, 574, 3, 9, 9, 370, 1, 154, 10, 50, 3, 123, 2, 54, 14, 32, 10, 3, 1, 11, 3, 46, 10, 8, 0, 46, 9, 7, 2, 37, 13, 2, 9, 6, 1, 45, 0, 13, 2, 49, 13, 9, 3, 2, 11, 83, 11, 7, 0, 161, 11, 6, 9, 7, 3, 56, 1, 2, 6, 3, 1, 3, 2, 10, 0, 11, 1, 3, 6, 4, 4, 193, 17, 10, 9, 5, 0, 82, 19, 13, 9, 214, 6, 3, 8, 28, 1, 83, 16, 16, 9, 82, 12, 9, 9, 84, 14, 5, 9, 243, 14, 166, 9, 71, 5, 2, 1, 3, 3, 2, 0, 2, 1, 13, 9, 120, 6, 3, 6, 4, 0, 29, 9, 41, 6, 2, 3, 9, 0, 10, 10, 47, 15, 406, 7, 2, 7, 17, 9, 57, 21, 2, 13, 123, 5, 4, 0, 2, 1, 2, 6, 2, 0, 9, 9, 49, 4, 2, 1, 2, 4, 9, 9, 330, 3, 19306, 9, 87, 9, 39, 4, 60, 6, 26, 9, 1014, 0, 2, 54, 8, 3, 82, 0, 12, 1, 19628, 1, 4706, 45, 3, 22, 543, 4, 4, 5, 9, 7, 3, 6, 31, 3, 149, 2, 1418, 49, 513, 54, 5, 49, 9, 0, 15, 0, 23, 4, 2, 14, 1361, 6, 2, 16, 3, 6, 2, 1, 2, 4, 262, 6, 10, 9, 357, 0, 62, 13, 1495, 6, 110, 6, 6, 9, 4759, 9, 787719, 239];
  163151. function isInAstralSet2(code2, set) {
  163152. var pos = 65536;
  163153. for (var i2 = 0; i2 < set.length; i2 += 2) {
  163154. pos += set[i2];
  163155. if (pos > code2) {
  163156. return false;
  163157. }
  163158. pos += set[i2 + 1];
  163159. if (pos >= code2) {
  163160. return true;
  163161. }
  163162. }
  163163. }
  163164. function isIdentifierStart2(code2, astral) {
  163165. if (code2 < 65) {
  163166. return code2 === 36;
  163167. }
  163168. if (code2 < 91) {
  163169. return true;
  163170. }
  163171. if (code2 < 97) {
  163172. return code2 === 95;
  163173. }
  163174. if (code2 < 123) {
  163175. return true;
  163176. }
  163177. if (code2 <= 65535) {
  163178. return code2 >= 170 && nonASCIIidentifierStart2.test(String.fromCharCode(code2));
  163179. }
  163180. if (astral === false) {
  163181. return false;
  163182. }
  163183. return isInAstralSet2(code2, astralIdentifierStartCodes2);
  163184. }
  163185. function isIdentifierChar2(code2, astral) {
  163186. if (code2 < 48) {
  163187. return code2 === 36;
  163188. }
  163189. if (code2 < 58) {
  163190. return true;
  163191. }
  163192. if (code2 < 65) {
  163193. return false;
  163194. }
  163195. if (code2 < 91) {
  163196. return true;
  163197. }
  163198. if (code2 < 97) {
  163199. return code2 === 95;
  163200. }
  163201. if (code2 < 123) {
  163202. return true;
  163203. }
  163204. if (code2 <= 65535) {
  163205. return code2 >= 170 && nonASCIIidentifier2.test(String.fromCharCode(code2));
  163206. }
  163207. if (astral === false) {
  163208. return false;
  163209. }
  163210. return isInAstralSet2(code2, astralIdentifierStartCodes2) || isInAstralSet2(code2, astralIdentifierCodes2);
  163211. }
  163212. var TokenType3 = function TokenType4(label, conf) {
  163213. if (conf === void 0)
  163214. conf = {};
  163215. this.label = label;
  163216. this.keyword = conf.keyword;
  163217. this.beforeExpr = !!conf.beforeExpr;
  163218. this.startsExpr = !!conf.startsExpr;
  163219. this.isLoop = !!conf.isLoop;
  163220. this.isAssign = !!conf.isAssign;
  163221. this.prefix = !!conf.prefix;
  163222. this.postfix = !!conf.postfix;
  163223. this.binop = conf.binop || null;
  163224. this.updateContext = null;
  163225. };
  163226. function binop2(name2, prec) {
  163227. return new TokenType3(name2, { beforeExpr: true, binop: prec });
  163228. }
  163229. var beforeExpr2 = { beforeExpr: true }, startsExpr2 = { startsExpr: true };
  163230. var keywords2 = {};
  163231. function kw2(name2, options) {
  163232. if (options === void 0)
  163233. options = {};
  163234. options.keyword = name2;
  163235. return keywords2[name2] = new TokenType3(name2, options);
  163236. }
  163237. var types$12 = {
  163238. num: new TokenType3("num", startsExpr2),
  163239. regexp: new TokenType3("regexp", startsExpr2),
  163240. string: new TokenType3("string", startsExpr2),
  163241. name: new TokenType3("name", startsExpr2),
  163242. privateId: new TokenType3("privateId", startsExpr2),
  163243. eof: new TokenType3("eof"),
  163244. bracketL: new TokenType3("[", { beforeExpr: true, startsExpr: true }),
  163245. bracketR: new TokenType3("]"),
  163246. braceL: new TokenType3("{", { beforeExpr: true, startsExpr: true }),
  163247. braceR: new TokenType3("}"),
  163248. parenL: new TokenType3("(", { beforeExpr: true, startsExpr: true }),
  163249. parenR: new TokenType3(")"),
  163250. comma: new TokenType3(",", beforeExpr2),
  163251. semi: new TokenType3(";", beforeExpr2),
  163252. colon: new TokenType3(":", beforeExpr2),
  163253. dot: new TokenType3("."),
  163254. question: new TokenType3("?", beforeExpr2),
  163255. questionDot: new TokenType3("?."),
  163256. arrow: new TokenType3("=>", beforeExpr2),
  163257. template: new TokenType3("template"),
  163258. invalidTemplate: new TokenType3("invalidTemplate"),
  163259. ellipsis: new TokenType3("...", beforeExpr2),
  163260. backQuote: new TokenType3("`", startsExpr2),
  163261. dollarBraceL: new TokenType3("${", { beforeExpr: true, startsExpr: true }),
  163262. eq: new TokenType3("=", { beforeExpr: true, isAssign: true }),
  163263. assign: new TokenType3("_=", { beforeExpr: true, isAssign: true }),
  163264. incDec: new TokenType3("++/--", { prefix: true, postfix: true, startsExpr: true }),
  163265. prefix: new TokenType3("!/~", { beforeExpr: true, prefix: true, startsExpr: true }),
  163266. logicalOR: binop2("||", 1),
  163267. logicalAND: binop2("&&", 2),
  163268. bitwiseOR: binop2("|", 3),
  163269. bitwiseXOR: binop2("^", 4),
  163270. bitwiseAND: binop2("&", 5),
  163271. equality: binop2("==/!=/===/!==", 6),
  163272. relational: binop2("</>/<=/>=", 7),
  163273. bitShift: binop2("<</>>/>>>", 8),
  163274. plusMin: new TokenType3("+/-", { beforeExpr: true, binop: 9, prefix: true, startsExpr: true }),
  163275. modulo: binop2("%", 10),
  163276. star: binop2("*", 10),
  163277. slash: binop2("/", 10),
  163278. starstar: new TokenType3("**", { beforeExpr: true }),
  163279. coalesce: binop2("??", 1),
  163280. _break: kw2("break"),
  163281. _case: kw2("case", beforeExpr2),
  163282. _catch: kw2("catch"),
  163283. _continue: kw2("continue"),
  163284. _debugger: kw2("debugger"),
  163285. _default: kw2("default", beforeExpr2),
  163286. _do: kw2("do", { isLoop: true, beforeExpr: true }),
  163287. _else: kw2("else", beforeExpr2),
  163288. _finally: kw2("finally"),
  163289. _for: kw2("for", { isLoop: true }),
  163290. _function: kw2("function", startsExpr2),
  163291. _if: kw2("if"),
  163292. _return: kw2("return", beforeExpr2),
  163293. _switch: kw2("switch"),
  163294. _throw: kw2("throw", beforeExpr2),
  163295. _try: kw2("try"),
  163296. _var: kw2("var"),
  163297. _const: kw2("const"),
  163298. _while: kw2("while", { isLoop: true }),
  163299. _with: kw2("with"),
  163300. _new: kw2("new", { beforeExpr: true, startsExpr: true }),
  163301. _this: kw2("this", startsExpr2),
  163302. _super: kw2("super", startsExpr2),
  163303. _class: kw2("class", startsExpr2),
  163304. _extends: kw2("extends", beforeExpr2),
  163305. _export: kw2("export"),
  163306. _import: kw2("import", startsExpr2),
  163307. _null: kw2("null", startsExpr2),
  163308. _true: kw2("true", startsExpr2),
  163309. _false: kw2("false", startsExpr2),
  163310. _in: kw2("in", { beforeExpr: true, binop: 7 }),
  163311. _instanceof: kw2("instanceof", { beforeExpr: true, binop: 7 }),
  163312. _typeof: kw2("typeof", { beforeExpr: true, prefix: true, startsExpr: true }),
  163313. _void: kw2("void", { beforeExpr: true, prefix: true, startsExpr: true }),
  163314. _delete: kw2("delete", { beforeExpr: true, prefix: true, startsExpr: true })
  163315. };
  163316. var lineBreak2 = /\r\n?|\n|\u2028|\u2029/;
  163317. var lineBreakG2 = new RegExp(lineBreak2.source, "g");
  163318. function isNewLine2(code2) {
  163319. return code2 === 10 || code2 === 13 || code2 === 8232 || code2 === 8233;
  163320. }
  163321. function nextLineBreak2(code2, from, end) {
  163322. if (end === void 0)
  163323. end = code2.length;
  163324. for (var i2 = from; i2 < end; i2++) {
  163325. var next = code2.charCodeAt(i2);
  163326. if (isNewLine2(next)) {
  163327. return i2 < end - 1 && next === 13 && code2.charCodeAt(i2 + 1) === 10 ? i2 + 2 : i2 + 1;
  163328. }
  163329. }
  163330. return -1;
  163331. }
  163332. var nonASCIIwhitespace2 = /[\u1680\u2000-\u200a\u202f\u205f\u3000\ufeff]/;
  163333. var skipWhiteSpace2 = /(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g;
  163334. var ref2 = Object.prototype;
  163335. var hasOwnProperty3 = ref2.hasOwnProperty;
  163336. var toString3 = ref2.toString;
  163337. var hasOwn2 = Object.hasOwn || function(obj, propName) {
  163338. return hasOwnProperty3.call(obj, propName);
  163339. };
  163340. var isArray2 = Array.isArray || function(obj) {
  163341. return toString3.call(obj) === "[object Array]";
  163342. };
  163343. function wordsRegexp2(words) {
  163344. return new RegExp("^(?:" + words.replace(/ /g, "|") + ")$");
  163345. }
  163346. var loneSurrogate2 = /(?:[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])/;
  163347. var Position3 = function Position4(line, col) {
  163348. this.line = line;
  163349. this.column = col;
  163350. };
  163351. Position3.prototype.offset = function offset2(n) {
  163352. return new Position3(this.line, this.column + n);
  163353. };
  163354. var SourceLocation3 = function SourceLocation4(p, start3, end) {
  163355. this.start = start3;
  163356. this.end = end;
  163357. if (p.sourceFile !== null) {
  163358. this.source = p.sourceFile;
  163359. }
  163360. };
  163361. function getLineInfo2(input, offset2) {
  163362. for (var line = 1, cur = 0; ; ) {
  163363. var nextBreak = nextLineBreak2(input, cur, offset2);
  163364. if (nextBreak < 0) {
  163365. return new Position3(line, offset2 - cur);
  163366. }
  163367. ++line;
  163368. cur = nextBreak;
  163369. }
  163370. }
  163371. var defaultOptions2 = {
  163372. ecmaVersion: null,
  163373. sourceType: "script",
  163374. onInsertedSemicolon: null,
  163375. onTrailingComma: null,
  163376. allowReserved: null,
  163377. allowReturnOutsideFunction: false,
  163378. allowImportExportEverywhere: false,
  163379. allowAwaitOutsideFunction: null,
  163380. allowSuperOutsideMethod: null,
  163381. allowHashBang: false,
  163382. locations: false,
  163383. onToken: null,
  163384. onComment: null,
  163385. ranges: false,
  163386. program: null,
  163387. sourceFile: null,
  163388. directSourceFile: null,
  163389. preserveParens: false
  163390. };
  163391. var warnedAboutEcmaVersion2 = false;
  163392. function getOptions2(opts) {
  163393. var options = {};
  163394. for (var opt in defaultOptions2) {
  163395. options[opt] = opts && hasOwn2(opts, opt) ? opts[opt] : defaultOptions2[opt];
  163396. }
  163397. if (options.ecmaVersion === "latest") {
  163398. options.ecmaVersion = 1e8;
  163399. } else if (options.ecmaVersion == null) {
  163400. if (!warnedAboutEcmaVersion2 && typeof console === "object" && console.warn) {
  163401. warnedAboutEcmaVersion2 = true;
  163402. console.warn("Since Acorn 8.0.0, options.ecmaVersion is required.\nDefaulting to 2020, but this will stop working in the future.");
  163403. }
  163404. options.ecmaVersion = 11;
  163405. } else if (options.ecmaVersion >= 2015) {
  163406. options.ecmaVersion -= 2009;
  163407. }
  163408. if (options.allowReserved == null) {
  163409. options.allowReserved = options.ecmaVersion < 5;
  163410. }
  163411. if (isArray2(options.onToken)) {
  163412. var tokens = options.onToken;
  163413. options.onToken = function(token) {
  163414. return tokens.push(token);
  163415. };
  163416. }
  163417. if (isArray2(options.onComment)) {
  163418. options.onComment = pushComment2(options, options.onComment);
  163419. }
  163420. return options;
  163421. }
  163422. function pushComment2(options, array) {
  163423. return function(block, text5, start3, end, startLoc, endLoc) {
  163424. var comment2 = {
  163425. type: block ? "Block" : "Line",
  163426. value: text5,
  163427. start: start3,
  163428. end
  163429. };
  163430. if (options.locations) {
  163431. comment2.loc = new SourceLocation3(this, startLoc, endLoc);
  163432. }
  163433. if (options.ranges) {
  163434. comment2.range = [start3, end];
  163435. }
  163436. array.push(comment2);
  163437. };
  163438. }
  163439. var SCOPE_TOP2 = 1, SCOPE_FUNCTION2 = 2, SCOPE_ASYNC2 = 4, SCOPE_GENERATOR2 = 8, SCOPE_ARROW2 = 16, SCOPE_SIMPLE_CATCH2 = 32, SCOPE_SUPER2 = 64, SCOPE_DIRECT_SUPER2 = 128, SCOPE_CLASS_STATIC_BLOCK2 = 256, SCOPE_VAR2 = SCOPE_TOP2 | SCOPE_FUNCTION2 | SCOPE_CLASS_STATIC_BLOCK2;
  163440. function functionFlags2(async, generator) {
  163441. return SCOPE_FUNCTION2 | (async ? SCOPE_ASYNC2 : 0) | (generator ? SCOPE_GENERATOR2 : 0);
  163442. }
  163443. var BIND_NONE2 = 0, BIND_VAR2 = 1, BIND_LEXICAL2 = 2, BIND_FUNCTION2 = 3, BIND_SIMPLE_CATCH2 = 4, BIND_OUTSIDE2 = 5;
  163444. var Parser3 = function Parser4(options, input, startPos) {
  163445. this.options = options = getOptions2(options);
  163446. this.sourceFile = options.sourceFile;
  163447. this.keywords = wordsRegexp2(keywords$12[options.ecmaVersion >= 6 ? 6 : options.sourceType === "module" ? "5module" : 5]);
  163448. var reserved = "";
  163449. if (options.allowReserved !== true) {
  163450. reserved = reservedWords2[options.ecmaVersion >= 6 ? 6 : options.ecmaVersion === 5 ? 5 : 3];
  163451. if (options.sourceType === "module") {
  163452. reserved += " await";
  163453. }
  163454. }
  163455. this.reservedWords = wordsRegexp2(reserved);
  163456. var reservedStrict = (reserved ? reserved + " " : "") + reservedWords2.strict;
  163457. this.reservedWordsStrict = wordsRegexp2(reservedStrict);
  163458. this.reservedWordsStrictBind = wordsRegexp2(reservedStrict + " " + reservedWords2.strictBind);
  163459. this.input = String(input);
  163460. this.containsEsc = false;
  163461. if (startPos) {
  163462. this.pos = startPos;
  163463. this.lineStart = this.input.lastIndexOf("\n", startPos - 1) + 1;
  163464. this.curLine = this.input.slice(0, this.lineStart).split(lineBreak2).length;
  163465. } else {
  163466. this.pos = this.lineStart = 0;
  163467. this.curLine = 1;
  163468. }
  163469. this.type = types$12.eof;
  163470. this.value = null;
  163471. this.start = this.end = this.pos;
  163472. this.startLoc = this.endLoc = this.curPosition();
  163473. this.lastTokEndLoc = this.lastTokStartLoc = null;
  163474. this.lastTokStart = this.lastTokEnd = this.pos;
  163475. this.context = this.initialContext();
  163476. this.exprAllowed = true;
  163477. this.inModule = options.sourceType === "module";
  163478. this.strict = this.inModule || this.strictDirective(this.pos);
  163479. this.potentialArrowAt = -1;
  163480. this.potentialArrowInForAwait = false;
  163481. this.yieldPos = this.awaitPos = this.awaitIdentPos = 0;
  163482. this.labels = [];
  163483. this.undefinedExports = /* @__PURE__ */ Object.create(null);
  163484. if (this.pos === 0 && options.allowHashBang && this.input.slice(0, 2) === "#!") {
  163485. this.skipLineComment(2);
  163486. }
  163487. this.scopeStack = [];
  163488. this.enterScope(SCOPE_TOP2);
  163489. this.regexpState = null;
  163490. this.privateNameStack = [];
  163491. };
  163492. var prototypeAccessors2 = { inFunction: { configurable: true }, inGenerator: { configurable: true }, inAsync: { configurable: true }, canAwait: { configurable: true }, allowSuper: { configurable: true }, allowDirectSuper: { configurable: true }, treatFunctionsAsVar: { configurable: true }, allowNewDotTarget: { configurable: true }, inClassStaticBlock: { configurable: true } };
  163493. Parser3.prototype.parse = function parse5() {
  163494. var node = this.options.program || this.startNode();
  163495. this.nextToken();
  163496. return this.parseTopLevel(node);
  163497. };
  163498. prototypeAccessors2.inFunction.get = function() {
  163499. return (this.currentVarScope().flags & SCOPE_FUNCTION2) > 0;
  163500. };
  163501. prototypeAccessors2.inGenerator.get = function() {
  163502. return (this.currentVarScope().flags & SCOPE_GENERATOR2) > 0 && !this.currentVarScope().inClassFieldInit;
  163503. };
  163504. prototypeAccessors2.inAsync.get = function() {
  163505. return (this.currentVarScope().flags & SCOPE_ASYNC2) > 0 && !this.currentVarScope().inClassFieldInit;
  163506. };
  163507. prototypeAccessors2.canAwait.get = function() {
  163508. for (var i2 = this.scopeStack.length - 1; i2 >= 0; i2--) {
  163509. var scope = this.scopeStack[i2];
  163510. if (scope.inClassFieldInit || scope.flags & SCOPE_CLASS_STATIC_BLOCK2) {
  163511. return false;
  163512. }
  163513. if (scope.flags & SCOPE_FUNCTION2) {
  163514. return (scope.flags & SCOPE_ASYNC2) > 0;
  163515. }
  163516. }
  163517. return this.inModule && this.options.ecmaVersion >= 13 || this.options.allowAwaitOutsideFunction;
  163518. };
  163519. prototypeAccessors2.allowSuper.get = function() {
  163520. var ref3 = this.currentThisScope();
  163521. var flags = ref3.flags;
  163522. var inClassFieldInit = ref3.inClassFieldInit;
  163523. return (flags & SCOPE_SUPER2) > 0 || inClassFieldInit || this.options.allowSuperOutsideMethod;
  163524. };
  163525. prototypeAccessors2.allowDirectSuper.get = function() {
  163526. return (this.currentThisScope().flags & SCOPE_DIRECT_SUPER2) > 0;
  163527. };
  163528. prototypeAccessors2.treatFunctionsAsVar.get = function() {
  163529. return this.treatFunctionsAsVarInScope(this.currentScope());
  163530. };
  163531. prototypeAccessors2.allowNewDotTarget.get = function() {
  163532. var ref3 = this.currentThisScope();
  163533. var flags = ref3.flags;
  163534. var inClassFieldInit = ref3.inClassFieldInit;
  163535. return (flags & (SCOPE_FUNCTION2 | SCOPE_CLASS_STATIC_BLOCK2)) > 0 || inClassFieldInit;
  163536. };
  163537. prototypeAccessors2.inClassStaticBlock.get = function() {
  163538. return (this.currentVarScope().flags & SCOPE_CLASS_STATIC_BLOCK2) > 0;
  163539. };
  163540. Parser3.extend = function extend3() {
  163541. var plugins = [], len = arguments.length;
  163542. while (len--)
  163543. plugins[len] = arguments[len];
  163544. var cls = this;
  163545. for (var i2 = 0; i2 < plugins.length; i2++) {
  163546. cls = plugins[i2](cls);
  163547. }
  163548. return cls;
  163549. };
  163550. Parser3.parse = function parse5(input, options) {
  163551. return new this(options, input).parse();
  163552. };
  163553. Parser3.parseExpressionAt = function parseExpressionAt3(input, pos, options) {
  163554. var parser = new this(options, input, pos);
  163555. parser.nextToken();
  163556. return parser.parseExpression();
  163557. };
  163558. Parser3.tokenizer = function tokenizer3(input, options) {
  163559. return new this(options, input);
  163560. };
  163561. Object.defineProperties(Parser3.prototype, prototypeAccessors2);
  163562. var pp$92 = Parser3.prototype;
  163563. var literal2 = /^(?:'((?:\\.|[^'\\])*?)'|"((?:\\.|[^"\\])*?)")/;
  163564. pp$92.strictDirective = function(start3) {
  163565. for (; ; ) {
  163566. skipWhiteSpace2.lastIndex = start3;
  163567. start3 += skipWhiteSpace2.exec(this.input)[0].length;
  163568. var match = literal2.exec(this.input.slice(start3));
  163569. if (!match) {
  163570. return false;
  163571. }
  163572. if ((match[1] || match[2]) === "use strict") {
  163573. skipWhiteSpace2.lastIndex = start3 + match[0].length;
  163574. var spaceAfter = skipWhiteSpace2.exec(this.input), end = spaceAfter.index + spaceAfter[0].length;
  163575. var next = this.input.charAt(end);
  163576. return next === ";" || next === "}" || lineBreak2.test(spaceAfter[0]) && !(/[(`.[+\-/*%<>=,?^&]/.test(next) || next === "!" && this.input.charAt(end + 1) === "=");
  163577. }
  163578. start3 += match[0].length;
  163579. skipWhiteSpace2.lastIndex = start3;
  163580. start3 += skipWhiteSpace2.exec(this.input)[0].length;
  163581. if (this.input[start3] === ";") {
  163582. start3++;
  163583. }
  163584. }
  163585. };
  163586. pp$92.eat = function(type) {
  163587. if (this.type === type) {
  163588. this.next();
  163589. return true;
  163590. } else {
  163591. return false;
  163592. }
  163593. };
  163594. pp$92.isContextual = function(name2) {
  163595. return this.type === types$12.name && this.value === name2 && !this.containsEsc;
  163596. };
  163597. pp$92.eatContextual = function(name2) {
  163598. if (!this.isContextual(name2)) {
  163599. return false;
  163600. }
  163601. this.next();
  163602. return true;
  163603. };
  163604. pp$92.expectContextual = function(name2) {
  163605. if (!this.eatContextual(name2)) {
  163606. this.unexpected();
  163607. }
  163608. };
  163609. pp$92.canInsertSemicolon = function() {
  163610. return this.type === types$12.eof || this.type === types$12.braceR || lineBreak2.test(this.input.slice(this.lastTokEnd, this.start));
  163611. };
  163612. pp$92.insertSemicolon = function() {
  163613. if (this.canInsertSemicolon()) {
  163614. if (this.options.onInsertedSemicolon) {
  163615. this.options.onInsertedSemicolon(this.lastTokEnd, this.lastTokEndLoc);
  163616. }
  163617. return true;
  163618. }
  163619. };
  163620. pp$92.semicolon = function() {
  163621. if (!this.eat(types$12.semi) && !this.insertSemicolon()) {
  163622. this.unexpected();
  163623. }
  163624. };
  163625. pp$92.afterTrailingComma = function(tokType, notNext) {
  163626. if (this.type === tokType) {
  163627. if (this.options.onTrailingComma) {
  163628. this.options.onTrailingComma(this.lastTokStart, this.lastTokStartLoc);
  163629. }
  163630. if (!notNext) {
  163631. this.next();
  163632. }
  163633. return true;
  163634. }
  163635. };
  163636. pp$92.expect = function(type) {
  163637. this.eat(type) || this.unexpected();
  163638. };
  163639. pp$92.unexpected = function(pos) {
  163640. this.raise(pos != null ? pos : this.start, "Unexpected token");
  163641. };
  163642. function DestructuringErrors2() {
  163643. this.shorthandAssign = this.trailingComma = this.parenthesizedAssign = this.parenthesizedBind = this.doubleProto = -1;
  163644. }
  163645. pp$92.checkPatternErrors = function(refDestructuringErrors, isAssign) {
  163646. if (!refDestructuringErrors) {
  163647. return;
  163648. }
  163649. if (refDestructuringErrors.trailingComma > -1) {
  163650. this.raiseRecoverable(refDestructuringErrors.trailingComma, "Comma is not permitted after the rest element");
  163651. }
  163652. var parens = isAssign ? refDestructuringErrors.parenthesizedAssign : refDestructuringErrors.parenthesizedBind;
  163653. if (parens > -1) {
  163654. this.raiseRecoverable(parens, "Parenthesized pattern");
  163655. }
  163656. };
  163657. pp$92.checkExpressionErrors = function(refDestructuringErrors, andThrow) {
  163658. if (!refDestructuringErrors) {
  163659. return false;
  163660. }
  163661. var shorthandAssign = refDestructuringErrors.shorthandAssign;
  163662. var doubleProto = refDestructuringErrors.doubleProto;
  163663. if (!andThrow) {
  163664. return shorthandAssign >= 0 || doubleProto >= 0;
  163665. }
  163666. if (shorthandAssign >= 0) {
  163667. this.raise(shorthandAssign, "Shorthand property assignments are valid only in destructuring patterns");
  163668. }
  163669. if (doubleProto >= 0) {
  163670. this.raiseRecoverable(doubleProto, "Redefinition of __proto__ property");
  163671. }
  163672. };
  163673. pp$92.checkYieldAwaitInDefaultParams = function() {
  163674. if (this.yieldPos && (!this.awaitPos || this.yieldPos < this.awaitPos)) {
  163675. this.raise(this.yieldPos, "Yield expression cannot be a default value");
  163676. }
  163677. if (this.awaitPos) {
  163678. this.raise(this.awaitPos, "Await expression cannot be a default value");
  163679. }
  163680. };
  163681. pp$92.isSimpleAssignTarget = function(expr) {
  163682. if (expr.type === "ParenthesizedExpression") {
  163683. return this.isSimpleAssignTarget(expr.expression);
  163684. }
  163685. return expr.type === "Identifier" || expr.type === "MemberExpression";
  163686. };
  163687. var pp$82 = Parser3.prototype;
  163688. pp$82.parseTopLevel = function(node) {
  163689. var exports3 = /* @__PURE__ */ Object.create(null);
  163690. if (!node.body) {
  163691. node.body = [];
  163692. }
  163693. while (this.type !== types$12.eof) {
  163694. var stmt = this.parseStatement(null, true, exports3);
  163695. node.body.push(stmt);
  163696. }
  163697. if (this.inModule) {
  163698. for (var i2 = 0, list4 = Object.keys(this.undefinedExports); i2 < list4.length; i2 += 1) {
  163699. var name2 = list4[i2];
  163700. this.raiseRecoverable(this.undefinedExports[name2].start, "Export '" + name2 + "' is not defined");
  163701. }
  163702. }
  163703. this.adaptDirectivePrologue(node.body);
  163704. this.next();
  163705. node.sourceType = this.options.sourceType;
  163706. return this.finishNode(node, "Program");
  163707. };
  163708. var loopLabel2 = { kind: "loop" }, switchLabel2 = { kind: "switch" };
  163709. pp$82.isLet = function(context) {
  163710. if (this.options.ecmaVersion < 6 || !this.isContextual("let")) {
  163711. return false;
  163712. }
  163713. skipWhiteSpace2.lastIndex = this.pos;
  163714. var skip = skipWhiteSpace2.exec(this.input);
  163715. var next = this.pos + skip[0].length, nextCh = this.input.charCodeAt(next);
  163716. if (nextCh === 91 || nextCh === 92 || nextCh > 55295 && nextCh < 56320) {
  163717. return true;
  163718. }
  163719. if (context) {
  163720. return false;
  163721. }
  163722. if (nextCh === 123) {
  163723. return true;
  163724. }
  163725. if (isIdentifierStart2(nextCh, true)) {
  163726. var pos = next + 1;
  163727. while (isIdentifierChar2(nextCh = this.input.charCodeAt(pos), true)) {
  163728. ++pos;
  163729. }
  163730. if (nextCh === 92 || nextCh > 55295 && nextCh < 56320) {
  163731. return true;
  163732. }
  163733. var ident = this.input.slice(next, pos);
  163734. if (!keywordRelationalOperator2.test(ident)) {
  163735. return true;
  163736. }
  163737. }
  163738. return false;
  163739. };
  163740. pp$82.isAsyncFunction = function() {
  163741. if (this.options.ecmaVersion < 8 || !this.isContextual("async")) {
  163742. return false;
  163743. }
  163744. skipWhiteSpace2.lastIndex = this.pos;
  163745. var skip = skipWhiteSpace2.exec(this.input);
  163746. var next = this.pos + skip[0].length, after;
  163747. return !lineBreak2.test(this.input.slice(this.pos, next)) && this.input.slice(next, next + 8) === "function" && (next + 8 === this.input.length || !(isIdentifierChar2(after = this.input.charCodeAt(next + 8)) || after > 55295 && after < 56320));
  163748. };
  163749. pp$82.parseStatement = function(context, topLevel, exports3) {
  163750. var starttype = this.type, node = this.startNode(), kind;
  163751. if (this.isLet(context)) {
  163752. starttype = types$12._var;
  163753. kind = "let";
  163754. }
  163755. switch (starttype) {
  163756. case types$12._break:
  163757. case types$12._continue:
  163758. return this.parseBreakContinueStatement(node, starttype.keyword);
  163759. case types$12._debugger:
  163760. return this.parseDebuggerStatement(node);
  163761. case types$12._do:
  163762. return this.parseDoStatement(node);
  163763. case types$12._for:
  163764. return this.parseForStatement(node);
  163765. case types$12._function:
  163766. if (context && (this.strict || context !== "if" && context !== "label") && this.options.ecmaVersion >= 6) {
  163767. this.unexpected();
  163768. }
  163769. return this.parseFunctionStatement(node, false, !context);
  163770. case types$12._class:
  163771. if (context) {
  163772. this.unexpected();
  163773. }
  163774. return this.parseClass(node, true);
  163775. case types$12._if:
  163776. return this.parseIfStatement(node);
  163777. case types$12._return:
  163778. return this.parseReturnStatement(node);
  163779. case types$12._switch:
  163780. return this.parseSwitchStatement(node);
  163781. case types$12._throw:
  163782. return this.parseThrowStatement(node);
  163783. case types$12._try:
  163784. return this.parseTryStatement(node);
  163785. case types$12._const:
  163786. case types$12._var:
  163787. kind = kind || this.value;
  163788. if (context && kind !== "var") {
  163789. this.unexpected();
  163790. }
  163791. return this.parseVarStatement(node, kind);
  163792. case types$12._while:
  163793. return this.parseWhileStatement(node);
  163794. case types$12._with:
  163795. return this.parseWithStatement(node);
  163796. case types$12.braceL:
  163797. return this.parseBlock(true, node);
  163798. case types$12.semi:
  163799. return this.parseEmptyStatement(node);
  163800. case types$12._export:
  163801. case types$12._import:
  163802. if (this.options.ecmaVersion > 10 && starttype === types$12._import) {
  163803. skipWhiteSpace2.lastIndex = this.pos;
  163804. var skip = skipWhiteSpace2.exec(this.input);
  163805. var next = this.pos + skip[0].length, nextCh = this.input.charCodeAt(next);
  163806. if (nextCh === 40 || nextCh === 46) {
  163807. return this.parseExpressionStatement(node, this.parseExpression());
  163808. }
  163809. }
  163810. if (!this.options.allowImportExportEverywhere) {
  163811. if (!topLevel) {
  163812. this.raise(this.start, "'import' and 'export' may only appear at the top level");
  163813. }
  163814. if (!this.inModule) {
  163815. this.raise(this.start, "'import' and 'export' may appear only with 'sourceType: module'");
  163816. }
  163817. }
  163818. return starttype === types$12._import ? this.parseImport(node) : this.parseExport(node, exports3);
  163819. default:
  163820. if (this.isAsyncFunction()) {
  163821. if (context) {
  163822. this.unexpected();
  163823. }
  163824. this.next();
  163825. return this.parseFunctionStatement(node, true, !context);
  163826. }
  163827. var maybeName = this.value, expr = this.parseExpression();
  163828. if (starttype === types$12.name && expr.type === "Identifier" && this.eat(types$12.colon)) {
  163829. return this.parseLabeledStatement(node, maybeName, expr, context);
  163830. } else {
  163831. return this.parseExpressionStatement(node, expr);
  163832. }
  163833. }
  163834. };
  163835. pp$82.parseBreakContinueStatement = function(node, keyword) {
  163836. var isBreak = keyword === "break";
  163837. this.next();
  163838. if (this.eat(types$12.semi) || this.insertSemicolon()) {
  163839. node.label = null;
  163840. } else if (this.type !== types$12.name) {
  163841. this.unexpected();
  163842. } else {
  163843. node.label = this.parseIdent();
  163844. this.semicolon();
  163845. }
  163846. var i2 = 0;
  163847. for (; i2 < this.labels.length; ++i2) {
  163848. var lab = this.labels[i2];
  163849. if (node.label == null || lab.name === node.label.name) {
  163850. if (lab.kind != null && (isBreak || lab.kind === "loop")) {
  163851. break;
  163852. }
  163853. if (node.label && isBreak) {
  163854. break;
  163855. }
  163856. }
  163857. }
  163858. if (i2 === this.labels.length) {
  163859. this.raise(node.start, "Unsyntactic " + keyword);
  163860. }
  163861. return this.finishNode(node, isBreak ? "BreakStatement" : "ContinueStatement");
  163862. };
  163863. pp$82.parseDebuggerStatement = function(node) {
  163864. this.next();
  163865. this.semicolon();
  163866. return this.finishNode(node, "DebuggerStatement");
  163867. };
  163868. pp$82.parseDoStatement = function(node) {
  163869. this.next();
  163870. this.labels.push(loopLabel2);
  163871. node.body = this.parseStatement("do");
  163872. this.labels.pop();
  163873. this.expect(types$12._while);
  163874. node.test = this.parseParenExpression();
  163875. if (this.options.ecmaVersion >= 6) {
  163876. this.eat(types$12.semi);
  163877. } else {
  163878. this.semicolon();
  163879. }
  163880. return this.finishNode(node, "DoWhileStatement");
  163881. };
  163882. pp$82.parseForStatement = function(node) {
  163883. this.next();
  163884. var awaitAt = this.options.ecmaVersion >= 9 && this.canAwait && this.eatContextual("await") ? this.lastTokStart : -1;
  163885. this.labels.push(loopLabel2);
  163886. this.enterScope(0);
  163887. this.expect(types$12.parenL);
  163888. if (this.type === types$12.semi) {
  163889. if (awaitAt > -1) {
  163890. this.unexpected(awaitAt);
  163891. }
  163892. return this.parseFor(node, null);
  163893. }
  163894. var isLet = this.isLet();
  163895. if (this.type === types$12._var || this.type === types$12._const || isLet) {
  163896. var init$1 = this.startNode(), kind = isLet ? "let" : this.value;
  163897. this.next();
  163898. this.parseVar(init$1, true, kind);
  163899. this.finishNode(init$1, "VariableDeclaration");
  163900. if ((this.type === types$12._in || this.options.ecmaVersion >= 6 && this.isContextual("of")) && init$1.declarations.length === 1) {
  163901. if (this.options.ecmaVersion >= 9) {
  163902. if (this.type === types$12._in) {
  163903. if (awaitAt > -1) {
  163904. this.unexpected(awaitAt);
  163905. }
  163906. } else {
  163907. node.await = awaitAt > -1;
  163908. }
  163909. }
  163910. return this.parseForIn(node, init$1);
  163911. }
  163912. if (awaitAt > -1) {
  163913. this.unexpected(awaitAt);
  163914. }
  163915. return this.parseFor(node, init$1);
  163916. }
  163917. var startsWithLet = this.isContextual("let"), isForOf = false;
  163918. var refDestructuringErrors = new DestructuringErrors2();
  163919. var init = this.parseExpression(awaitAt > -1 ? "await" : true, refDestructuringErrors);
  163920. if (this.type === types$12._in || (isForOf = this.options.ecmaVersion >= 6 && this.isContextual("of"))) {
  163921. if (this.options.ecmaVersion >= 9) {
  163922. if (this.type === types$12._in) {
  163923. if (awaitAt > -1) {
  163924. this.unexpected(awaitAt);
  163925. }
  163926. } else {
  163927. node.await = awaitAt > -1;
  163928. }
  163929. }
  163930. if (startsWithLet && isForOf) {
  163931. this.raise(init.start, "The left-hand side of a for-of loop may not start with 'let'.");
  163932. }
  163933. this.toAssignable(init, false, refDestructuringErrors);
  163934. this.checkLValPattern(init);
  163935. return this.parseForIn(node, init);
  163936. } else {
  163937. this.checkExpressionErrors(refDestructuringErrors, true);
  163938. }
  163939. if (awaitAt > -1) {
  163940. this.unexpected(awaitAt);
  163941. }
  163942. return this.parseFor(node, init);
  163943. };
  163944. pp$82.parseFunctionStatement = function(node, isAsync, declarationPosition) {
  163945. this.next();
  163946. return this.parseFunction(node, FUNC_STATEMENT2 | (declarationPosition ? 0 : FUNC_HANGING_STATEMENT2), false, isAsync);
  163947. };
  163948. pp$82.parseIfStatement = function(node) {
  163949. this.next();
  163950. node.test = this.parseParenExpression();
  163951. node.consequent = this.parseStatement("if");
  163952. node.alternate = this.eat(types$12._else) ? this.parseStatement("if") : null;
  163953. return this.finishNode(node, "IfStatement");
  163954. };
  163955. pp$82.parseReturnStatement = function(node) {
  163956. if (!this.inFunction && !this.options.allowReturnOutsideFunction) {
  163957. this.raise(this.start, "'return' outside of function");
  163958. }
  163959. this.next();
  163960. if (this.eat(types$12.semi) || this.insertSemicolon()) {
  163961. node.argument = null;
  163962. } else {
  163963. node.argument = this.parseExpression();
  163964. this.semicolon();
  163965. }
  163966. return this.finishNode(node, "ReturnStatement");
  163967. };
  163968. pp$82.parseSwitchStatement = function(node) {
  163969. this.next();
  163970. node.discriminant = this.parseParenExpression();
  163971. node.cases = [];
  163972. this.expect(types$12.braceL);
  163973. this.labels.push(switchLabel2);
  163974. this.enterScope(0);
  163975. var cur;
  163976. for (var sawDefault = false; this.type !== types$12.braceR; ) {
  163977. if (this.type === types$12._case || this.type === types$12._default) {
  163978. var isCase = this.type === types$12._case;
  163979. if (cur) {
  163980. this.finishNode(cur, "SwitchCase");
  163981. }
  163982. node.cases.push(cur = this.startNode());
  163983. cur.consequent = [];
  163984. this.next();
  163985. if (isCase) {
  163986. cur.test = this.parseExpression();
  163987. } else {
  163988. if (sawDefault) {
  163989. this.raiseRecoverable(this.lastTokStart, "Multiple default clauses");
  163990. }
  163991. sawDefault = true;
  163992. cur.test = null;
  163993. }
  163994. this.expect(types$12.colon);
  163995. } else {
  163996. if (!cur) {
  163997. this.unexpected();
  163998. }
  163999. cur.consequent.push(this.parseStatement(null));
  164000. }
  164001. }
  164002. this.exitScope();
  164003. if (cur) {
  164004. this.finishNode(cur, "SwitchCase");
  164005. }
  164006. this.next();
  164007. this.labels.pop();
  164008. return this.finishNode(node, "SwitchStatement");
  164009. };
  164010. pp$82.parseThrowStatement = function(node) {
  164011. this.next();
  164012. if (lineBreak2.test(this.input.slice(this.lastTokEnd, this.start))) {
  164013. this.raise(this.lastTokEnd, "Illegal newline after throw");
  164014. }
  164015. node.argument = this.parseExpression();
  164016. this.semicolon();
  164017. return this.finishNode(node, "ThrowStatement");
  164018. };
  164019. var empty$12 = [];
  164020. pp$82.parseTryStatement = function(node) {
  164021. this.next();
  164022. node.block = this.parseBlock();
  164023. node.handler = null;
  164024. if (this.type === types$12._catch) {
  164025. var clause = this.startNode();
  164026. this.next();
  164027. if (this.eat(types$12.parenL)) {
  164028. clause.param = this.parseBindingAtom();
  164029. var simple = clause.param.type === "Identifier";
  164030. this.enterScope(simple ? SCOPE_SIMPLE_CATCH2 : 0);
  164031. this.checkLValPattern(clause.param, simple ? BIND_SIMPLE_CATCH2 : BIND_LEXICAL2);
  164032. this.expect(types$12.parenR);
  164033. } else {
  164034. if (this.options.ecmaVersion < 10) {
  164035. this.unexpected();
  164036. }
  164037. clause.param = null;
  164038. this.enterScope(0);
  164039. }
  164040. clause.body = this.parseBlock(false);
  164041. this.exitScope();
  164042. node.handler = this.finishNode(clause, "CatchClause");
  164043. }
  164044. node.finalizer = this.eat(types$12._finally) ? this.parseBlock() : null;
  164045. if (!node.handler && !node.finalizer) {
  164046. this.raise(node.start, "Missing catch or finally clause");
  164047. }
  164048. return this.finishNode(node, "TryStatement");
  164049. };
  164050. pp$82.parseVarStatement = function(node, kind) {
  164051. this.next();
  164052. this.parseVar(node, false, kind);
  164053. this.semicolon();
  164054. return this.finishNode(node, "VariableDeclaration");
  164055. };
  164056. pp$82.parseWhileStatement = function(node) {
  164057. this.next();
  164058. node.test = this.parseParenExpression();
  164059. this.labels.push(loopLabel2);
  164060. node.body = this.parseStatement("while");
  164061. this.labels.pop();
  164062. return this.finishNode(node, "WhileStatement");
  164063. };
  164064. pp$82.parseWithStatement = function(node) {
  164065. if (this.strict) {
  164066. this.raise(this.start, "'with' in strict mode");
  164067. }
  164068. this.next();
  164069. node.object = this.parseParenExpression();
  164070. node.body = this.parseStatement("with");
  164071. return this.finishNode(node, "WithStatement");
  164072. };
  164073. pp$82.parseEmptyStatement = function(node) {
  164074. this.next();
  164075. return this.finishNode(node, "EmptyStatement");
  164076. };
  164077. pp$82.parseLabeledStatement = function(node, maybeName, expr, context) {
  164078. for (var i$1 = 0, list4 = this.labels; i$1 < list4.length; i$1 += 1) {
  164079. var label = list4[i$1];
  164080. if (label.name === maybeName) {
  164081. this.raise(expr.start, "Label '" + maybeName + "' is already declared");
  164082. }
  164083. }
  164084. var kind = this.type.isLoop ? "loop" : this.type === types$12._switch ? "switch" : null;
  164085. for (var i2 = this.labels.length - 1; i2 >= 0; i2--) {
  164086. var label$1 = this.labels[i2];
  164087. if (label$1.statementStart === node.start) {
  164088. label$1.statementStart = this.start;
  164089. label$1.kind = kind;
  164090. } else {
  164091. break;
  164092. }
  164093. }
  164094. this.labels.push({ name: maybeName, kind, statementStart: this.start });
  164095. node.body = this.parseStatement(context ? context.indexOf("label") === -1 ? context + "label" : context : "label");
  164096. this.labels.pop();
  164097. node.label = expr;
  164098. return this.finishNode(node, "LabeledStatement");
  164099. };
  164100. pp$82.parseExpressionStatement = function(node, expr) {
  164101. node.expression = expr;
  164102. this.semicolon();
  164103. return this.finishNode(node, "ExpressionStatement");
  164104. };
  164105. pp$82.parseBlock = function(createNewLexicalScope, node, exitStrict) {
  164106. if (createNewLexicalScope === void 0)
  164107. createNewLexicalScope = true;
  164108. if (node === void 0)
  164109. node = this.startNode();
  164110. node.body = [];
  164111. this.expect(types$12.braceL);
  164112. if (createNewLexicalScope) {
  164113. this.enterScope(0);
  164114. }
  164115. while (this.type !== types$12.braceR) {
  164116. var stmt = this.parseStatement(null);
  164117. node.body.push(stmt);
  164118. }
  164119. if (exitStrict) {
  164120. this.strict = false;
  164121. }
  164122. this.next();
  164123. if (createNewLexicalScope) {
  164124. this.exitScope();
  164125. }
  164126. return this.finishNode(node, "BlockStatement");
  164127. };
  164128. pp$82.parseFor = function(node, init) {
  164129. node.init = init;
  164130. this.expect(types$12.semi);
  164131. node.test = this.type === types$12.semi ? null : this.parseExpression();
  164132. this.expect(types$12.semi);
  164133. node.update = this.type === types$12.parenR ? null : this.parseExpression();
  164134. this.expect(types$12.parenR);
  164135. node.body = this.parseStatement("for");
  164136. this.exitScope();
  164137. this.labels.pop();
  164138. return this.finishNode(node, "ForStatement");
  164139. };
  164140. pp$82.parseForIn = function(node, init) {
  164141. var isForIn = this.type === types$12._in;
  164142. this.next();
  164143. if (init.type === "VariableDeclaration" && init.declarations[0].init != null && (!isForIn || this.options.ecmaVersion < 8 || this.strict || init.kind !== "var" || init.declarations[0].id.type !== "Identifier")) {
  164144. this.raise(
  164145. init.start,
  164146. (isForIn ? "for-in" : "for-of") + " loop variable declaration may not have an initializer"
  164147. );
  164148. }
  164149. node.left = init;
  164150. node.right = isForIn ? this.parseExpression() : this.parseMaybeAssign();
  164151. this.expect(types$12.parenR);
  164152. node.body = this.parseStatement("for");
  164153. this.exitScope();
  164154. this.labels.pop();
  164155. return this.finishNode(node, isForIn ? "ForInStatement" : "ForOfStatement");
  164156. };
  164157. pp$82.parseVar = function(node, isFor, kind) {
  164158. node.declarations = [];
  164159. node.kind = kind;
  164160. for (; ; ) {
  164161. var decl = this.startNode();
  164162. this.parseVarId(decl, kind);
  164163. if (this.eat(types$12.eq)) {
  164164. decl.init = this.parseMaybeAssign(isFor);
  164165. } else if (kind === "const" && !(this.type === types$12._in || this.options.ecmaVersion >= 6 && this.isContextual("of"))) {
  164166. this.unexpected();
  164167. } else if (decl.id.type !== "Identifier" && !(isFor && (this.type === types$12._in || this.isContextual("of")))) {
  164168. this.raise(this.lastTokEnd, "Complex binding patterns require an initialization value");
  164169. } else {
  164170. decl.init = null;
  164171. }
  164172. node.declarations.push(this.finishNode(decl, "VariableDeclarator"));
  164173. if (!this.eat(types$12.comma)) {
  164174. break;
  164175. }
  164176. }
  164177. return node;
  164178. };
  164179. pp$82.parseVarId = function(decl, kind) {
  164180. decl.id = this.parseBindingAtom();
  164181. this.checkLValPattern(decl.id, kind === "var" ? BIND_VAR2 : BIND_LEXICAL2, false);
  164182. };
  164183. var FUNC_STATEMENT2 = 1, FUNC_HANGING_STATEMENT2 = 2, FUNC_NULLABLE_ID2 = 4;
  164184. pp$82.parseFunction = function(node, statement, allowExpressionBody, isAsync, forInit) {
  164185. this.initFunction(node);
  164186. if (this.options.ecmaVersion >= 9 || this.options.ecmaVersion >= 6 && !isAsync) {
  164187. if (this.type === types$12.star && statement & FUNC_HANGING_STATEMENT2) {
  164188. this.unexpected();
  164189. }
  164190. node.generator = this.eat(types$12.star);
  164191. }
  164192. if (this.options.ecmaVersion >= 8) {
  164193. node.async = !!isAsync;
  164194. }
  164195. if (statement & FUNC_STATEMENT2) {
  164196. node.id = statement & FUNC_NULLABLE_ID2 && this.type !== types$12.name ? null : this.parseIdent();
  164197. if (node.id && !(statement & FUNC_HANGING_STATEMENT2)) {
  164198. this.checkLValSimple(node.id, this.strict || node.generator || node.async ? this.treatFunctionsAsVar ? BIND_VAR2 : BIND_LEXICAL2 : BIND_FUNCTION2);
  164199. }
  164200. }
  164201. var oldYieldPos = this.yieldPos, oldAwaitPos = this.awaitPos, oldAwaitIdentPos = this.awaitIdentPos;
  164202. this.yieldPos = 0;
  164203. this.awaitPos = 0;
  164204. this.awaitIdentPos = 0;
  164205. this.enterScope(functionFlags2(node.async, node.generator));
  164206. if (!(statement & FUNC_STATEMENT2)) {
  164207. node.id = this.type === types$12.name ? this.parseIdent() : null;
  164208. }
  164209. this.parseFunctionParams(node);
  164210. this.parseFunctionBody(node, allowExpressionBody, false, forInit);
  164211. this.yieldPos = oldYieldPos;
  164212. this.awaitPos = oldAwaitPos;
  164213. this.awaitIdentPos = oldAwaitIdentPos;
  164214. return this.finishNode(node, statement & FUNC_STATEMENT2 ? "FunctionDeclaration" : "FunctionExpression");
  164215. };
  164216. pp$82.parseFunctionParams = function(node) {
  164217. this.expect(types$12.parenL);
  164218. node.params = this.parseBindingList(types$12.parenR, false, this.options.ecmaVersion >= 8);
  164219. this.checkYieldAwaitInDefaultParams();
  164220. };
  164221. pp$82.parseClass = function(node, isStatement) {
  164222. this.next();
  164223. var oldStrict = this.strict;
  164224. this.strict = true;
  164225. this.parseClassId(node, isStatement);
  164226. this.parseClassSuper(node);
  164227. var privateNameMap = this.enterClassBody();
  164228. var classBody = this.startNode();
  164229. var hadConstructor = false;
  164230. classBody.body = [];
  164231. this.expect(types$12.braceL);
  164232. while (this.type !== types$12.braceR) {
  164233. var element2 = this.parseClassElement(node.superClass !== null);
  164234. if (element2) {
  164235. classBody.body.push(element2);
  164236. if (element2.type === "MethodDefinition" && element2.kind === "constructor") {
  164237. if (hadConstructor) {
  164238. this.raise(element2.start, "Duplicate constructor in the same class");
  164239. }
  164240. hadConstructor = true;
  164241. } else if (element2.key && element2.key.type === "PrivateIdentifier" && isPrivateNameConflicted2(privateNameMap, element2)) {
  164242. this.raiseRecoverable(element2.key.start, "Identifier '#" + element2.key.name + "' has already been declared");
  164243. }
  164244. }
  164245. }
  164246. this.strict = oldStrict;
  164247. this.next();
  164248. node.body = this.finishNode(classBody, "ClassBody");
  164249. this.exitClassBody();
  164250. return this.finishNode(node, isStatement ? "ClassDeclaration" : "ClassExpression");
  164251. };
  164252. pp$82.parseClassElement = function(constructorAllowsSuper) {
  164253. if (this.eat(types$12.semi)) {
  164254. return null;
  164255. }
  164256. var ecmaVersion2 = this.options.ecmaVersion;
  164257. var node = this.startNode();
  164258. var keyName = "";
  164259. var isGenerator = false;
  164260. var isAsync = false;
  164261. var kind = "method";
  164262. var isStatic = false;
  164263. if (this.eatContextual("static")) {
  164264. if (ecmaVersion2 >= 13 && this.eat(types$12.braceL)) {
  164265. this.parseClassStaticBlock(node);
  164266. return node;
  164267. }
  164268. if (this.isClassElementNameStart() || this.type === types$12.star) {
  164269. isStatic = true;
  164270. } else {
  164271. keyName = "static";
  164272. }
  164273. }
  164274. node.static = isStatic;
  164275. if (!keyName && ecmaVersion2 >= 8 && this.eatContextual("async")) {
  164276. if ((this.isClassElementNameStart() || this.type === types$12.star) && !this.canInsertSemicolon()) {
  164277. isAsync = true;
  164278. } else {
  164279. keyName = "async";
  164280. }
  164281. }
  164282. if (!keyName && (ecmaVersion2 >= 9 || !isAsync) && this.eat(types$12.star)) {
  164283. isGenerator = true;
  164284. }
  164285. if (!keyName && !isAsync && !isGenerator) {
  164286. var lastValue = this.value;
  164287. if (this.eatContextual("get") || this.eatContextual("set")) {
  164288. if (this.isClassElementNameStart()) {
  164289. kind = lastValue;
  164290. } else {
  164291. keyName = lastValue;
  164292. }
  164293. }
  164294. }
  164295. if (keyName) {
  164296. node.computed = false;
  164297. node.key = this.startNodeAt(this.lastTokStart, this.lastTokStartLoc);
  164298. node.key.name = keyName;
  164299. this.finishNode(node.key, "Identifier");
  164300. } else {
  164301. this.parseClassElementName(node);
  164302. }
  164303. if (ecmaVersion2 < 13 || this.type === types$12.parenL || kind !== "method" || isGenerator || isAsync) {
  164304. var isConstructor = !node.static && checkKeyName2(node, "constructor");
  164305. var allowsDirectSuper = isConstructor && constructorAllowsSuper;
  164306. if (isConstructor && kind !== "method") {
  164307. this.raise(node.key.start, "Constructor can't have get/set modifier");
  164308. }
  164309. node.kind = isConstructor ? "constructor" : kind;
  164310. this.parseClassMethod(node, isGenerator, isAsync, allowsDirectSuper);
  164311. } else {
  164312. this.parseClassField(node);
  164313. }
  164314. return node;
  164315. };
  164316. pp$82.isClassElementNameStart = function() {
  164317. return this.type === types$12.name || this.type === types$12.privateId || this.type === types$12.num || this.type === types$12.string || this.type === types$12.bracketL || this.type.keyword;
  164318. };
  164319. pp$82.parseClassElementName = function(element2) {
  164320. if (this.type === types$12.privateId) {
  164321. if (this.value === "constructor") {
  164322. this.raise(this.start, "Classes can't have an element named '#constructor'");
  164323. }
  164324. element2.computed = false;
  164325. element2.key = this.parsePrivateIdent();
  164326. } else {
  164327. this.parsePropertyName(element2);
  164328. }
  164329. };
  164330. pp$82.parseClassMethod = function(method, isGenerator, isAsync, allowsDirectSuper) {
  164331. var key = method.key;
  164332. if (method.kind === "constructor") {
  164333. if (isGenerator) {
  164334. this.raise(key.start, "Constructor can't be a generator");
  164335. }
  164336. if (isAsync) {
  164337. this.raise(key.start, "Constructor can't be an async method");
  164338. }
  164339. } else if (method.static && checkKeyName2(method, "prototype")) {
  164340. this.raise(key.start, "Classes may not have a static property named prototype");
  164341. }
  164342. var value = method.value = this.parseMethod(isGenerator, isAsync, allowsDirectSuper);
  164343. if (method.kind === "get" && value.params.length !== 0) {
  164344. this.raiseRecoverable(value.start, "getter should have no params");
  164345. }
  164346. if (method.kind === "set" && value.params.length !== 1) {
  164347. this.raiseRecoverable(value.start, "setter should have exactly one param");
  164348. }
  164349. if (method.kind === "set" && value.params[0].type === "RestElement") {
  164350. this.raiseRecoverable(value.params[0].start, "Setter cannot use rest params");
  164351. }
  164352. return this.finishNode(method, "MethodDefinition");
  164353. };
  164354. pp$82.parseClassField = function(field) {
  164355. if (checkKeyName2(field, "constructor")) {
  164356. this.raise(field.key.start, "Classes can't have a field named 'constructor'");
  164357. } else if (field.static && checkKeyName2(field, "prototype")) {
  164358. this.raise(field.key.start, "Classes can't have a static field named 'prototype'");
  164359. }
  164360. if (this.eat(types$12.eq)) {
  164361. var scope = this.currentThisScope();
  164362. var inClassFieldInit = scope.inClassFieldInit;
  164363. scope.inClassFieldInit = true;
  164364. field.value = this.parseMaybeAssign();
  164365. scope.inClassFieldInit = inClassFieldInit;
  164366. } else {
  164367. field.value = null;
  164368. }
  164369. this.semicolon();
  164370. return this.finishNode(field, "PropertyDefinition");
  164371. };
  164372. pp$82.parseClassStaticBlock = function(node) {
  164373. node.body = [];
  164374. var oldLabels = this.labels;
  164375. this.labels = [];
  164376. this.enterScope(SCOPE_CLASS_STATIC_BLOCK2 | SCOPE_SUPER2);
  164377. while (this.type !== types$12.braceR) {
  164378. var stmt = this.parseStatement(null);
  164379. node.body.push(stmt);
  164380. }
  164381. this.next();
  164382. this.exitScope();
  164383. this.labels = oldLabels;
  164384. return this.finishNode(node, "StaticBlock");
  164385. };
  164386. pp$82.parseClassId = function(node, isStatement) {
  164387. if (this.type === types$12.name) {
  164388. node.id = this.parseIdent();
  164389. if (isStatement) {
  164390. this.checkLValSimple(node.id, BIND_LEXICAL2, false);
  164391. }
  164392. } else {
  164393. if (isStatement === true) {
  164394. this.unexpected();
  164395. }
  164396. node.id = null;
  164397. }
  164398. };
  164399. pp$82.parseClassSuper = function(node) {
  164400. node.superClass = this.eat(types$12._extends) ? this.parseExprSubscripts(false) : null;
  164401. };
  164402. pp$82.enterClassBody = function() {
  164403. var element2 = { declared: /* @__PURE__ */ Object.create(null), used: [] };
  164404. this.privateNameStack.push(element2);
  164405. return element2.declared;
  164406. };
  164407. pp$82.exitClassBody = function() {
  164408. var ref3 = this.privateNameStack.pop();
  164409. var declared = ref3.declared;
  164410. var used = ref3.used;
  164411. var len = this.privateNameStack.length;
  164412. var parent = len === 0 ? null : this.privateNameStack[len - 1];
  164413. for (var i2 = 0; i2 < used.length; ++i2) {
  164414. var id = used[i2];
  164415. if (!hasOwn2(declared, id.name)) {
  164416. if (parent) {
  164417. parent.used.push(id);
  164418. } else {
  164419. this.raiseRecoverable(id.start, "Private field '#" + id.name + "' must be declared in an enclosing class");
  164420. }
  164421. }
  164422. }
  164423. };
  164424. function isPrivateNameConflicted2(privateNameMap, element2) {
  164425. var name2 = element2.key.name;
  164426. var curr = privateNameMap[name2];
  164427. var next = "true";
  164428. if (element2.type === "MethodDefinition" && (element2.kind === "get" || element2.kind === "set")) {
  164429. next = (element2.static ? "s" : "i") + element2.kind;
  164430. }
  164431. if (curr === "iget" && next === "iset" || curr === "iset" && next === "iget" || curr === "sget" && next === "sset" || curr === "sset" && next === "sget") {
  164432. privateNameMap[name2] = "true";
  164433. return false;
  164434. } else if (!curr) {
  164435. privateNameMap[name2] = next;
  164436. return false;
  164437. } else {
  164438. return true;
  164439. }
  164440. }
  164441. function checkKeyName2(node, name2) {
  164442. var computed = node.computed;
  164443. var key = node.key;
  164444. return !computed && (key.type === "Identifier" && key.name === name2 || key.type === "Literal" && key.value === name2);
  164445. }
  164446. pp$82.parseExport = function(node, exports3) {
  164447. this.next();
  164448. if (this.eat(types$12.star)) {
  164449. if (this.options.ecmaVersion >= 11) {
  164450. if (this.eatContextual("as")) {
  164451. node.exported = this.parseModuleExportName();
  164452. this.checkExport(exports3, node.exported.name, this.lastTokStart);
  164453. } else {
  164454. node.exported = null;
  164455. }
  164456. }
  164457. this.expectContextual("from");
  164458. if (this.type !== types$12.string) {
  164459. this.unexpected();
  164460. }
  164461. node.source = this.parseExprAtom();
  164462. this.semicolon();
  164463. return this.finishNode(node, "ExportAllDeclaration");
  164464. }
  164465. if (this.eat(types$12._default)) {
  164466. this.checkExport(exports3, "default", this.lastTokStart);
  164467. var isAsync;
  164468. if (this.type === types$12._function || (isAsync = this.isAsyncFunction())) {
  164469. var fNode = this.startNode();
  164470. this.next();
  164471. if (isAsync) {
  164472. this.next();
  164473. }
  164474. node.declaration = this.parseFunction(fNode, FUNC_STATEMENT2 | FUNC_NULLABLE_ID2, false, isAsync);
  164475. } else if (this.type === types$12._class) {
  164476. var cNode = this.startNode();
  164477. node.declaration = this.parseClass(cNode, "nullableID");
  164478. } else {
  164479. node.declaration = this.parseMaybeAssign();
  164480. this.semicolon();
  164481. }
  164482. return this.finishNode(node, "ExportDefaultDeclaration");
  164483. }
  164484. if (this.shouldParseExportStatement()) {
  164485. node.declaration = this.parseStatement(null);
  164486. if (node.declaration.type === "VariableDeclaration") {
  164487. this.checkVariableExport(exports3, node.declaration.declarations);
  164488. } else {
  164489. this.checkExport(exports3, node.declaration.id.name, node.declaration.id.start);
  164490. }
  164491. node.specifiers = [];
  164492. node.source = null;
  164493. } else {
  164494. node.declaration = null;
  164495. node.specifiers = this.parseExportSpecifiers(exports3);
  164496. if (this.eatContextual("from")) {
  164497. if (this.type !== types$12.string) {
  164498. this.unexpected();
  164499. }
  164500. node.source = this.parseExprAtom();
  164501. } else {
  164502. for (var i2 = 0, list4 = node.specifiers; i2 < list4.length; i2 += 1) {
  164503. var spec = list4[i2];
  164504. this.checkUnreserved(spec.local);
  164505. this.checkLocalExport(spec.local);
  164506. if (spec.local.type === "Literal") {
  164507. this.raise(spec.local.start, "A string literal cannot be used as an exported binding without `from`.");
  164508. }
  164509. }
  164510. node.source = null;
  164511. }
  164512. this.semicolon();
  164513. }
  164514. return this.finishNode(node, "ExportNamedDeclaration");
  164515. };
  164516. pp$82.checkExport = function(exports3, name2, pos) {
  164517. if (!exports3) {
  164518. return;
  164519. }
  164520. if (hasOwn2(exports3, name2)) {
  164521. this.raiseRecoverable(pos, "Duplicate export '" + name2 + "'");
  164522. }
  164523. exports3[name2] = true;
  164524. };
  164525. pp$82.checkPatternExport = function(exports3, pat) {
  164526. var type = pat.type;
  164527. if (type === "Identifier") {
  164528. this.checkExport(exports3, pat.name, pat.start);
  164529. } else if (type === "ObjectPattern") {
  164530. for (var i2 = 0, list4 = pat.properties; i2 < list4.length; i2 += 1) {
  164531. var prop = list4[i2];
  164532. this.checkPatternExport(exports3, prop);
  164533. }
  164534. } else if (type === "ArrayPattern") {
  164535. for (var i$1 = 0, list$1 = pat.elements; i$1 < list$1.length; i$1 += 1) {
  164536. var elt = list$1[i$1];
  164537. if (elt) {
  164538. this.checkPatternExport(exports3, elt);
  164539. }
  164540. }
  164541. } else if (type === "Property") {
  164542. this.checkPatternExport(exports3, pat.value);
  164543. } else if (type === "AssignmentPattern") {
  164544. this.checkPatternExport(exports3, pat.left);
  164545. } else if (type === "RestElement") {
  164546. this.checkPatternExport(exports3, pat.argument);
  164547. } else if (type === "ParenthesizedExpression") {
  164548. this.checkPatternExport(exports3, pat.expression);
  164549. }
  164550. };
  164551. pp$82.checkVariableExport = function(exports3, decls) {
  164552. if (!exports3) {
  164553. return;
  164554. }
  164555. for (var i2 = 0, list4 = decls; i2 < list4.length; i2 += 1) {
  164556. var decl = list4[i2];
  164557. this.checkPatternExport(exports3, decl.id);
  164558. }
  164559. };
  164560. pp$82.shouldParseExportStatement = function() {
  164561. return this.type.keyword === "var" || this.type.keyword === "const" || this.type.keyword === "class" || this.type.keyword === "function" || this.isLet() || this.isAsyncFunction();
  164562. };
  164563. pp$82.parseExportSpecifiers = function(exports3) {
  164564. var nodes = [], first = true;
  164565. this.expect(types$12.braceL);
  164566. while (!this.eat(types$12.braceR)) {
  164567. if (!first) {
  164568. this.expect(types$12.comma);
  164569. if (this.afterTrailingComma(types$12.braceR)) {
  164570. break;
  164571. }
  164572. } else {
  164573. first = false;
  164574. }
  164575. var node = this.startNode();
  164576. node.local = this.parseModuleExportName();
  164577. node.exported = this.eatContextual("as") ? this.parseModuleExportName() : node.local;
  164578. this.checkExport(
  164579. exports3,
  164580. node.exported[node.exported.type === "Identifier" ? "name" : "value"],
  164581. node.exported.start
  164582. );
  164583. nodes.push(this.finishNode(node, "ExportSpecifier"));
  164584. }
  164585. return nodes;
  164586. };
  164587. pp$82.parseImport = function(node) {
  164588. this.next();
  164589. if (this.type === types$12.string) {
  164590. node.specifiers = empty$12;
  164591. node.source = this.parseExprAtom();
  164592. } else {
  164593. node.specifiers = this.parseImportSpecifiers();
  164594. this.expectContextual("from");
  164595. node.source = this.type === types$12.string ? this.parseExprAtom() : this.unexpected();
  164596. }
  164597. this.semicolon();
  164598. return this.finishNode(node, "ImportDeclaration");
  164599. };
  164600. pp$82.parseImportSpecifiers = function() {
  164601. var nodes = [], first = true;
  164602. if (this.type === types$12.name) {
  164603. var node = this.startNode();
  164604. node.local = this.parseIdent();
  164605. this.checkLValSimple(node.local, BIND_LEXICAL2);
  164606. nodes.push(this.finishNode(node, "ImportDefaultSpecifier"));
  164607. if (!this.eat(types$12.comma)) {
  164608. return nodes;
  164609. }
  164610. }
  164611. if (this.type === types$12.star) {
  164612. var node$1 = this.startNode();
  164613. this.next();
  164614. this.expectContextual("as");
  164615. node$1.local = this.parseIdent();
  164616. this.checkLValSimple(node$1.local, BIND_LEXICAL2);
  164617. nodes.push(this.finishNode(node$1, "ImportNamespaceSpecifier"));
  164618. return nodes;
  164619. }
  164620. this.expect(types$12.braceL);
  164621. while (!this.eat(types$12.braceR)) {
  164622. if (!first) {
  164623. this.expect(types$12.comma);
  164624. if (this.afterTrailingComma(types$12.braceR)) {
  164625. break;
  164626. }
  164627. } else {
  164628. first = false;
  164629. }
  164630. var node$2 = this.startNode();
  164631. node$2.imported = this.parseModuleExportName();
  164632. if (this.eatContextual("as")) {
  164633. node$2.local = this.parseIdent();
  164634. } else {
  164635. this.checkUnreserved(node$2.imported);
  164636. node$2.local = node$2.imported;
  164637. }
  164638. this.checkLValSimple(node$2.local, BIND_LEXICAL2);
  164639. nodes.push(this.finishNode(node$2, "ImportSpecifier"));
  164640. }
  164641. return nodes;
  164642. };
  164643. pp$82.parseModuleExportName = function() {
  164644. if (this.options.ecmaVersion >= 13 && this.type === types$12.string) {
  164645. var stringLiteral = this.parseLiteral(this.value);
  164646. if (loneSurrogate2.test(stringLiteral.value)) {
  164647. this.raise(stringLiteral.start, "An export name cannot include a lone surrogate.");
  164648. }
  164649. return stringLiteral;
  164650. }
  164651. return this.parseIdent(true);
  164652. };
  164653. pp$82.adaptDirectivePrologue = function(statements) {
  164654. for (var i2 = 0; i2 < statements.length && this.isDirectiveCandidate(statements[i2]); ++i2) {
  164655. statements[i2].directive = statements[i2].expression.raw.slice(1, -1);
  164656. }
  164657. };
  164658. pp$82.isDirectiveCandidate = function(statement) {
  164659. return statement.type === "ExpressionStatement" && statement.expression.type === "Literal" && typeof statement.expression.value === "string" && (this.input[statement.start] === '"' || this.input[statement.start] === "'");
  164660. };
  164661. var pp$72 = Parser3.prototype;
  164662. pp$72.toAssignable = function(node, isBinding, refDestructuringErrors) {
  164663. if (this.options.ecmaVersion >= 6 && node) {
  164664. switch (node.type) {
  164665. case "Identifier":
  164666. if (this.inAsync && node.name === "await") {
  164667. this.raise(node.start, "Cannot use 'await' as identifier inside an async function");
  164668. }
  164669. break;
  164670. case "ObjectPattern":
  164671. case "ArrayPattern":
  164672. case "AssignmentPattern":
  164673. case "RestElement":
  164674. break;
  164675. case "ObjectExpression":
  164676. node.type = "ObjectPattern";
  164677. if (refDestructuringErrors) {
  164678. this.checkPatternErrors(refDestructuringErrors, true);
  164679. }
  164680. for (var i2 = 0, list4 = node.properties; i2 < list4.length; i2 += 1) {
  164681. var prop = list4[i2];
  164682. this.toAssignable(prop, isBinding);
  164683. if (prop.type === "RestElement" && (prop.argument.type === "ArrayPattern" || prop.argument.type === "ObjectPattern")) {
  164684. this.raise(prop.argument.start, "Unexpected token");
  164685. }
  164686. }
  164687. break;
  164688. case "Property":
  164689. if (node.kind !== "init") {
  164690. this.raise(node.key.start, "Object pattern can't contain getter or setter");
  164691. }
  164692. this.toAssignable(node.value, isBinding);
  164693. break;
  164694. case "ArrayExpression":
  164695. node.type = "ArrayPattern";
  164696. if (refDestructuringErrors) {
  164697. this.checkPatternErrors(refDestructuringErrors, true);
  164698. }
  164699. this.toAssignableList(node.elements, isBinding);
  164700. break;
  164701. case "SpreadElement":
  164702. node.type = "RestElement";
  164703. this.toAssignable(node.argument, isBinding);
  164704. if (node.argument.type === "AssignmentPattern") {
  164705. this.raise(node.argument.start, "Rest elements cannot have a default value");
  164706. }
  164707. break;
  164708. case "AssignmentExpression":
  164709. if (node.operator !== "=") {
  164710. this.raise(node.left.end, "Only '=' operator can be used for specifying default value.");
  164711. }
  164712. node.type = "AssignmentPattern";
  164713. delete node.operator;
  164714. this.toAssignable(node.left, isBinding);
  164715. break;
  164716. case "ParenthesizedExpression":
  164717. this.toAssignable(node.expression, isBinding, refDestructuringErrors);
  164718. break;
  164719. case "ChainExpression":
  164720. this.raiseRecoverable(node.start, "Optional chaining cannot appear in left-hand side");
  164721. break;
  164722. case "MemberExpression":
  164723. if (!isBinding) {
  164724. break;
  164725. }
  164726. default:
  164727. this.raise(node.start, "Assigning to rvalue");
  164728. }
  164729. } else if (refDestructuringErrors) {
  164730. this.checkPatternErrors(refDestructuringErrors, true);
  164731. }
  164732. return node;
  164733. };
  164734. pp$72.toAssignableList = function(exprList, isBinding) {
  164735. var end = exprList.length;
  164736. for (var i2 = 0; i2 < end; i2++) {
  164737. var elt = exprList[i2];
  164738. if (elt) {
  164739. this.toAssignable(elt, isBinding);
  164740. }
  164741. }
  164742. if (end) {
  164743. var last = exprList[end - 1];
  164744. if (this.options.ecmaVersion === 6 && isBinding && last && last.type === "RestElement" && last.argument.type !== "Identifier") {
  164745. this.unexpected(last.argument.start);
  164746. }
  164747. }
  164748. return exprList;
  164749. };
  164750. pp$72.parseSpread = function(refDestructuringErrors) {
  164751. var node = this.startNode();
  164752. this.next();
  164753. node.argument = this.parseMaybeAssign(false, refDestructuringErrors);
  164754. return this.finishNode(node, "SpreadElement");
  164755. };
  164756. pp$72.parseRestBinding = function() {
  164757. var node = this.startNode();
  164758. this.next();
  164759. if (this.options.ecmaVersion === 6 && this.type !== types$12.name) {
  164760. this.unexpected();
  164761. }
  164762. node.argument = this.parseBindingAtom();
  164763. return this.finishNode(node, "RestElement");
  164764. };
  164765. pp$72.parseBindingAtom = function() {
  164766. if (this.options.ecmaVersion >= 6) {
  164767. switch (this.type) {
  164768. case types$12.bracketL:
  164769. var node = this.startNode();
  164770. this.next();
  164771. node.elements = this.parseBindingList(types$12.bracketR, true, true);
  164772. return this.finishNode(node, "ArrayPattern");
  164773. case types$12.braceL:
  164774. return this.parseObj(true);
  164775. }
  164776. }
  164777. return this.parseIdent();
  164778. };
  164779. pp$72.parseBindingList = function(close, allowEmpty, allowTrailingComma) {
  164780. var elts = [], first = true;
  164781. while (!this.eat(close)) {
  164782. if (first) {
  164783. first = false;
  164784. } else {
  164785. this.expect(types$12.comma);
  164786. }
  164787. if (allowEmpty && this.type === types$12.comma) {
  164788. elts.push(null);
  164789. } else if (allowTrailingComma && this.afterTrailingComma(close)) {
  164790. break;
  164791. } else if (this.type === types$12.ellipsis) {
  164792. var rest = this.parseRestBinding();
  164793. this.parseBindingListItem(rest);
  164794. elts.push(rest);
  164795. if (this.type === types$12.comma) {
  164796. this.raise(this.start, "Comma is not permitted after the rest element");
  164797. }
  164798. this.expect(close);
  164799. break;
  164800. } else {
  164801. var elem = this.parseMaybeDefault(this.start, this.startLoc);
  164802. this.parseBindingListItem(elem);
  164803. elts.push(elem);
  164804. }
  164805. }
  164806. return elts;
  164807. };
  164808. pp$72.parseBindingListItem = function(param) {
  164809. return param;
  164810. };
  164811. pp$72.parseMaybeDefault = function(startPos, startLoc, left) {
  164812. left = left || this.parseBindingAtom();
  164813. if (this.options.ecmaVersion < 6 || !this.eat(types$12.eq)) {
  164814. return left;
  164815. }
  164816. var node = this.startNodeAt(startPos, startLoc);
  164817. node.left = left;
  164818. node.right = this.parseMaybeAssign();
  164819. return this.finishNode(node, "AssignmentPattern");
  164820. };
  164821. pp$72.checkLValSimple = function(expr, bindingType, checkClashes) {
  164822. if (bindingType === void 0)
  164823. bindingType = BIND_NONE2;
  164824. var isBind = bindingType !== BIND_NONE2;
  164825. switch (expr.type) {
  164826. case "Identifier":
  164827. if (this.strict && this.reservedWordsStrictBind.test(expr.name)) {
  164828. this.raiseRecoverable(expr.start, (isBind ? "Binding " : "Assigning to ") + expr.name + " in strict mode");
  164829. }
  164830. if (isBind) {
  164831. if (bindingType === BIND_LEXICAL2 && expr.name === "let") {
  164832. this.raiseRecoverable(expr.start, "let is disallowed as a lexically bound name");
  164833. }
  164834. if (checkClashes) {
  164835. if (hasOwn2(checkClashes, expr.name)) {
  164836. this.raiseRecoverable(expr.start, "Argument name clash");
  164837. }
  164838. checkClashes[expr.name] = true;
  164839. }
  164840. if (bindingType !== BIND_OUTSIDE2) {
  164841. this.declareName(expr.name, bindingType, expr.start);
  164842. }
  164843. }
  164844. break;
  164845. case "ChainExpression":
  164846. this.raiseRecoverable(expr.start, "Optional chaining cannot appear in left-hand side");
  164847. break;
  164848. case "MemberExpression":
  164849. if (isBind) {
  164850. this.raiseRecoverable(expr.start, "Binding member expression");
  164851. }
  164852. break;
  164853. case "ParenthesizedExpression":
  164854. if (isBind) {
  164855. this.raiseRecoverable(expr.start, "Binding parenthesized expression");
  164856. }
  164857. return this.checkLValSimple(expr.expression, bindingType, checkClashes);
  164858. default:
  164859. this.raise(expr.start, (isBind ? "Binding" : "Assigning to") + " rvalue");
  164860. }
  164861. };
  164862. pp$72.checkLValPattern = function(expr, bindingType, checkClashes) {
  164863. if (bindingType === void 0)
  164864. bindingType = BIND_NONE2;
  164865. switch (expr.type) {
  164866. case "ObjectPattern":
  164867. for (var i2 = 0, list4 = expr.properties; i2 < list4.length; i2 += 1) {
  164868. var prop = list4[i2];
  164869. this.checkLValInnerPattern(prop, bindingType, checkClashes);
  164870. }
  164871. break;
  164872. case "ArrayPattern":
  164873. for (var i$1 = 0, list$1 = expr.elements; i$1 < list$1.length; i$1 += 1) {
  164874. var elem = list$1[i$1];
  164875. if (elem) {
  164876. this.checkLValInnerPattern(elem, bindingType, checkClashes);
  164877. }
  164878. }
  164879. break;
  164880. default:
  164881. this.checkLValSimple(expr, bindingType, checkClashes);
  164882. }
  164883. };
  164884. pp$72.checkLValInnerPattern = function(expr, bindingType, checkClashes) {
  164885. if (bindingType === void 0)
  164886. bindingType = BIND_NONE2;
  164887. switch (expr.type) {
  164888. case "Property":
  164889. this.checkLValInnerPattern(expr.value, bindingType, checkClashes);
  164890. break;
  164891. case "AssignmentPattern":
  164892. this.checkLValPattern(expr.left, bindingType, checkClashes);
  164893. break;
  164894. case "RestElement":
  164895. this.checkLValPattern(expr.argument, bindingType, checkClashes);
  164896. break;
  164897. default:
  164898. this.checkLValPattern(expr, bindingType, checkClashes);
  164899. }
  164900. };
  164901. var TokContext3 = function TokContext4(token, isExpr, preserveSpace, override, generator) {
  164902. this.token = token;
  164903. this.isExpr = !!isExpr;
  164904. this.preserveSpace = !!preserveSpace;
  164905. this.override = override;
  164906. this.generator = !!generator;
  164907. };
  164908. var types2 = {
  164909. b_stat: new TokContext3("{", false),
  164910. b_expr: new TokContext3("{", true),
  164911. b_tmpl: new TokContext3("${", false),
  164912. p_stat: new TokContext3("(", false),
  164913. p_expr: new TokContext3("(", true),
  164914. q_tmpl: new TokContext3("`", true, true, function(p) {
  164915. return p.tryReadTemplateToken();
  164916. }),
  164917. f_stat: new TokContext3("function", false),
  164918. f_expr: new TokContext3("function", true),
  164919. f_expr_gen: new TokContext3("function", true, false, null, true),
  164920. f_gen: new TokContext3("function", false, false, null, true)
  164921. };
  164922. var pp$62 = Parser3.prototype;
  164923. pp$62.initialContext = function() {
  164924. return [types2.b_stat];
  164925. };
  164926. pp$62.curContext = function() {
  164927. return this.context[this.context.length - 1];
  164928. };
  164929. pp$62.braceIsBlock = function(prevType) {
  164930. var parent = this.curContext();
  164931. if (parent === types2.f_expr || parent === types2.f_stat) {
  164932. return true;
  164933. }
  164934. if (prevType === types$12.colon && (parent === types2.b_stat || parent === types2.b_expr)) {
  164935. return !parent.isExpr;
  164936. }
  164937. if (prevType === types$12._return || prevType === types$12.name && this.exprAllowed) {
  164938. return lineBreak2.test(this.input.slice(this.lastTokEnd, this.start));
  164939. }
  164940. if (prevType === types$12._else || prevType === types$12.semi || prevType === types$12.eof || prevType === types$12.parenR || prevType === types$12.arrow) {
  164941. return true;
  164942. }
  164943. if (prevType === types$12.braceL) {
  164944. return parent === types2.b_stat;
  164945. }
  164946. if (prevType === types$12._var || prevType === types$12._const || prevType === types$12.name) {
  164947. return false;
  164948. }
  164949. return !this.exprAllowed;
  164950. };
  164951. pp$62.inGeneratorContext = function() {
  164952. for (var i2 = this.context.length - 1; i2 >= 1; i2--) {
  164953. var context = this.context[i2];
  164954. if (context.token === "function") {
  164955. return context.generator;
  164956. }
  164957. }
  164958. return false;
  164959. };
  164960. pp$62.updateContext = function(prevType) {
  164961. var update, type = this.type;
  164962. if (type.keyword && prevType === types$12.dot) {
  164963. this.exprAllowed = false;
  164964. } else if (update = type.updateContext) {
  164965. update.call(this, prevType);
  164966. } else {
  164967. this.exprAllowed = type.beforeExpr;
  164968. }
  164969. };
  164970. pp$62.overrideContext = function(tokenCtx) {
  164971. if (this.curContext() !== tokenCtx) {
  164972. this.context[this.context.length - 1] = tokenCtx;
  164973. }
  164974. };
  164975. types$12.parenR.updateContext = types$12.braceR.updateContext = function() {
  164976. if (this.context.length === 1) {
  164977. this.exprAllowed = true;
  164978. return;
  164979. }
  164980. var out = this.context.pop();
  164981. if (out === types2.b_stat && this.curContext().token === "function") {
  164982. out = this.context.pop();
  164983. }
  164984. this.exprAllowed = !out.isExpr;
  164985. };
  164986. types$12.braceL.updateContext = function(prevType) {
  164987. this.context.push(this.braceIsBlock(prevType) ? types2.b_stat : types2.b_expr);
  164988. this.exprAllowed = true;
  164989. };
  164990. types$12.dollarBraceL.updateContext = function() {
  164991. this.context.push(types2.b_tmpl);
  164992. this.exprAllowed = true;
  164993. };
  164994. types$12.parenL.updateContext = function(prevType) {
  164995. var statementParens = prevType === types$12._if || prevType === types$12._for || prevType === types$12._with || prevType === types$12._while;
  164996. this.context.push(statementParens ? types2.p_stat : types2.p_expr);
  164997. this.exprAllowed = true;
  164998. };
  164999. types$12.incDec.updateContext = function() {
  165000. };
  165001. types$12._function.updateContext = types$12._class.updateContext = function(prevType) {
  165002. if (prevType.beforeExpr && prevType !== types$12._else && !(prevType === types$12.semi && this.curContext() !== types2.p_stat) && !(prevType === types$12._return && lineBreak2.test(this.input.slice(this.lastTokEnd, this.start))) && !((prevType === types$12.colon || prevType === types$12.braceL) && this.curContext() === types2.b_stat)) {
  165003. this.context.push(types2.f_expr);
  165004. } else {
  165005. this.context.push(types2.f_stat);
  165006. }
  165007. this.exprAllowed = false;
  165008. };
  165009. types$12.backQuote.updateContext = function() {
  165010. if (this.curContext() === types2.q_tmpl) {
  165011. this.context.pop();
  165012. } else {
  165013. this.context.push(types2.q_tmpl);
  165014. }
  165015. this.exprAllowed = false;
  165016. };
  165017. types$12.star.updateContext = function(prevType) {
  165018. if (prevType === types$12._function) {
  165019. var index2 = this.context.length - 1;
  165020. if (this.context[index2] === types2.f_expr) {
  165021. this.context[index2] = types2.f_expr_gen;
  165022. } else {
  165023. this.context[index2] = types2.f_gen;
  165024. }
  165025. }
  165026. this.exprAllowed = true;
  165027. };
  165028. types$12.name.updateContext = function(prevType) {
  165029. var allowed = false;
  165030. if (this.options.ecmaVersion >= 6 && prevType !== types$12.dot) {
  165031. if (this.value === "of" && !this.exprAllowed || this.value === "yield" && this.inGeneratorContext()) {
  165032. allowed = true;
  165033. }
  165034. }
  165035. this.exprAllowed = allowed;
  165036. };
  165037. var pp$52 = Parser3.prototype;
  165038. pp$52.checkPropClash = function(prop, propHash, refDestructuringErrors) {
  165039. if (this.options.ecmaVersion >= 9 && prop.type === "SpreadElement") {
  165040. return;
  165041. }
  165042. if (this.options.ecmaVersion >= 6 && (prop.computed || prop.method || prop.shorthand)) {
  165043. return;
  165044. }
  165045. var key = prop.key;
  165046. var name2;
  165047. switch (key.type) {
  165048. case "Identifier":
  165049. name2 = key.name;
  165050. break;
  165051. case "Literal":
  165052. name2 = String(key.value);
  165053. break;
  165054. default:
  165055. return;
  165056. }
  165057. var kind = prop.kind;
  165058. if (this.options.ecmaVersion >= 6) {
  165059. if (name2 === "__proto__" && kind === "init") {
  165060. if (propHash.proto) {
  165061. if (refDestructuringErrors) {
  165062. if (refDestructuringErrors.doubleProto < 0) {
  165063. refDestructuringErrors.doubleProto = key.start;
  165064. }
  165065. } else {
  165066. this.raiseRecoverable(key.start, "Redefinition of __proto__ property");
  165067. }
  165068. }
  165069. propHash.proto = true;
  165070. }
  165071. return;
  165072. }
  165073. name2 = "$" + name2;
  165074. var other = propHash[name2];
  165075. if (other) {
  165076. var redefinition;
  165077. if (kind === "init") {
  165078. redefinition = this.strict && other.init || other.get || other.set;
  165079. } else {
  165080. redefinition = other.init || other[kind];
  165081. }
  165082. if (redefinition) {
  165083. this.raiseRecoverable(key.start, "Redefinition of property");
  165084. }
  165085. } else {
  165086. other = propHash[name2] = {
  165087. init: false,
  165088. get: false,
  165089. set: false
  165090. };
  165091. }
  165092. other[kind] = true;
  165093. };
  165094. pp$52.parseExpression = function(forInit, refDestructuringErrors) {
  165095. var startPos = this.start, startLoc = this.startLoc;
  165096. var expr = this.parseMaybeAssign(forInit, refDestructuringErrors);
  165097. if (this.type === types$12.comma) {
  165098. var node = this.startNodeAt(startPos, startLoc);
  165099. node.expressions = [expr];
  165100. while (this.eat(types$12.comma)) {
  165101. node.expressions.push(this.parseMaybeAssign(forInit, refDestructuringErrors));
  165102. }
  165103. return this.finishNode(node, "SequenceExpression");
  165104. }
  165105. return expr;
  165106. };
  165107. pp$52.parseMaybeAssign = function(forInit, refDestructuringErrors, afterLeftParse) {
  165108. if (this.isContextual("yield")) {
  165109. if (this.inGenerator) {
  165110. return this.parseYield(forInit);
  165111. } else {
  165112. this.exprAllowed = false;
  165113. }
  165114. }
  165115. var ownDestructuringErrors = false, oldParenAssign = -1, oldTrailingComma = -1, oldDoubleProto = -1;
  165116. if (refDestructuringErrors) {
  165117. oldParenAssign = refDestructuringErrors.parenthesizedAssign;
  165118. oldTrailingComma = refDestructuringErrors.trailingComma;
  165119. oldDoubleProto = refDestructuringErrors.doubleProto;
  165120. refDestructuringErrors.parenthesizedAssign = refDestructuringErrors.trailingComma = -1;
  165121. } else {
  165122. refDestructuringErrors = new DestructuringErrors2();
  165123. ownDestructuringErrors = true;
  165124. }
  165125. var startPos = this.start, startLoc = this.startLoc;
  165126. if (this.type === types$12.parenL || this.type === types$12.name) {
  165127. this.potentialArrowAt = this.start;
  165128. this.potentialArrowInForAwait = forInit === "await";
  165129. }
  165130. var left = this.parseMaybeConditional(forInit, refDestructuringErrors);
  165131. if (afterLeftParse) {
  165132. left = afterLeftParse.call(this, left, startPos, startLoc);
  165133. }
  165134. if (this.type.isAssign) {
  165135. var node = this.startNodeAt(startPos, startLoc);
  165136. node.operator = this.value;
  165137. if (this.type === types$12.eq) {
  165138. left = this.toAssignable(left, false, refDestructuringErrors);
  165139. }
  165140. if (!ownDestructuringErrors) {
  165141. refDestructuringErrors.parenthesizedAssign = refDestructuringErrors.trailingComma = refDestructuringErrors.doubleProto = -1;
  165142. }
  165143. if (refDestructuringErrors.shorthandAssign >= left.start) {
  165144. refDestructuringErrors.shorthandAssign = -1;
  165145. }
  165146. if (this.type === types$12.eq) {
  165147. this.checkLValPattern(left);
  165148. } else {
  165149. this.checkLValSimple(left);
  165150. }
  165151. node.left = left;
  165152. this.next();
  165153. node.right = this.parseMaybeAssign(forInit);
  165154. if (oldDoubleProto > -1) {
  165155. refDestructuringErrors.doubleProto = oldDoubleProto;
  165156. }
  165157. return this.finishNode(node, "AssignmentExpression");
  165158. } else {
  165159. if (ownDestructuringErrors) {
  165160. this.checkExpressionErrors(refDestructuringErrors, true);
  165161. }
  165162. }
  165163. if (oldParenAssign > -1) {
  165164. refDestructuringErrors.parenthesizedAssign = oldParenAssign;
  165165. }
  165166. if (oldTrailingComma > -1) {
  165167. refDestructuringErrors.trailingComma = oldTrailingComma;
  165168. }
  165169. return left;
  165170. };
  165171. pp$52.parseMaybeConditional = function(forInit, refDestructuringErrors) {
  165172. var startPos = this.start, startLoc = this.startLoc;
  165173. var expr = this.parseExprOps(forInit, refDestructuringErrors);
  165174. if (this.checkExpressionErrors(refDestructuringErrors)) {
  165175. return expr;
  165176. }
  165177. if (this.eat(types$12.question)) {
  165178. var node = this.startNodeAt(startPos, startLoc);
  165179. node.test = expr;
  165180. node.consequent = this.parseMaybeAssign();
  165181. this.expect(types$12.colon);
  165182. node.alternate = this.parseMaybeAssign(forInit);
  165183. return this.finishNode(node, "ConditionalExpression");
  165184. }
  165185. return expr;
  165186. };
  165187. pp$52.parseExprOps = function(forInit, refDestructuringErrors) {
  165188. var startPos = this.start, startLoc = this.startLoc;
  165189. var expr = this.parseMaybeUnary(refDestructuringErrors, false, false, forInit);
  165190. if (this.checkExpressionErrors(refDestructuringErrors)) {
  165191. return expr;
  165192. }
  165193. return expr.start === startPos && expr.type === "ArrowFunctionExpression" ? expr : this.parseExprOp(expr, startPos, startLoc, -1, forInit);
  165194. };
  165195. pp$52.parseExprOp = function(left, leftStartPos, leftStartLoc, minPrec, forInit) {
  165196. var prec = this.type.binop;
  165197. if (prec != null && (!forInit || this.type !== types$12._in)) {
  165198. if (prec > minPrec) {
  165199. var logical = this.type === types$12.logicalOR || this.type === types$12.logicalAND;
  165200. var coalesce = this.type === types$12.coalesce;
  165201. if (coalesce) {
  165202. prec = types$12.logicalAND.binop;
  165203. }
  165204. var op = this.value;
  165205. this.next();
  165206. var startPos = this.start, startLoc = this.startLoc;
  165207. var right = this.parseExprOp(this.parseMaybeUnary(null, false, false, forInit), startPos, startLoc, prec, forInit);
  165208. var node = this.buildBinary(leftStartPos, leftStartLoc, left, right, op, logical || coalesce);
  165209. if (logical && this.type === types$12.coalesce || coalesce && (this.type === types$12.logicalOR || this.type === types$12.logicalAND)) {
  165210. this.raiseRecoverable(this.start, "Logical expressions and coalesce expressions cannot be mixed. Wrap either by parentheses");
  165211. }
  165212. return this.parseExprOp(node, leftStartPos, leftStartLoc, minPrec, forInit);
  165213. }
  165214. }
  165215. return left;
  165216. };
  165217. pp$52.buildBinary = function(startPos, startLoc, left, right, op, logical) {
  165218. if (right.type === "PrivateIdentifier") {
  165219. this.raise(right.start, "Private identifier can only be left side of binary expression");
  165220. }
  165221. var node = this.startNodeAt(startPos, startLoc);
  165222. node.left = left;
  165223. node.operator = op;
  165224. node.right = right;
  165225. return this.finishNode(node, logical ? "LogicalExpression" : "BinaryExpression");
  165226. };
  165227. pp$52.parseMaybeUnary = function(refDestructuringErrors, sawUnary, incDec, forInit) {
  165228. var startPos = this.start, startLoc = this.startLoc, expr;
  165229. if (this.isContextual("await") && this.canAwait) {
  165230. expr = this.parseAwait(forInit);
  165231. sawUnary = true;
  165232. } else if (this.type.prefix) {
  165233. var node = this.startNode(), update = this.type === types$12.incDec;
  165234. node.operator = this.value;
  165235. node.prefix = true;
  165236. this.next();
  165237. node.argument = this.parseMaybeUnary(null, true, update, forInit);
  165238. this.checkExpressionErrors(refDestructuringErrors, true);
  165239. if (update) {
  165240. this.checkLValSimple(node.argument);
  165241. } else if (this.strict && node.operator === "delete" && node.argument.type === "Identifier") {
  165242. this.raiseRecoverable(node.start, "Deleting local variable in strict mode");
  165243. } else if (node.operator === "delete" && isPrivateFieldAccess2(node.argument)) {
  165244. this.raiseRecoverable(node.start, "Private fields can not be deleted");
  165245. } else {
  165246. sawUnary = true;
  165247. }
  165248. expr = this.finishNode(node, update ? "UpdateExpression" : "UnaryExpression");
  165249. } else if (!sawUnary && this.type === types$12.privateId) {
  165250. if (forInit || this.privateNameStack.length === 0) {
  165251. this.unexpected();
  165252. }
  165253. expr = this.parsePrivateIdent();
  165254. if (this.type !== types$12._in) {
  165255. this.unexpected();
  165256. }
  165257. } else {
  165258. expr = this.parseExprSubscripts(refDestructuringErrors, forInit);
  165259. if (this.checkExpressionErrors(refDestructuringErrors)) {
  165260. return expr;
  165261. }
  165262. while (this.type.postfix && !this.canInsertSemicolon()) {
  165263. var node$1 = this.startNodeAt(startPos, startLoc);
  165264. node$1.operator = this.value;
  165265. node$1.prefix = false;
  165266. node$1.argument = expr;
  165267. this.checkLValSimple(expr);
  165268. this.next();
  165269. expr = this.finishNode(node$1, "UpdateExpression");
  165270. }
  165271. }
  165272. if (!incDec && this.eat(types$12.starstar)) {
  165273. if (sawUnary) {
  165274. this.unexpected(this.lastTokStart);
  165275. } else {
  165276. return this.buildBinary(startPos, startLoc, expr, this.parseMaybeUnary(null, false, false, forInit), "**", false);
  165277. }
  165278. } else {
  165279. return expr;
  165280. }
  165281. };
  165282. function isPrivateFieldAccess2(node) {
  165283. return node.type === "MemberExpression" && node.property.type === "PrivateIdentifier" || node.type === "ChainExpression" && isPrivateFieldAccess2(node.expression);
  165284. }
  165285. pp$52.parseExprSubscripts = function(refDestructuringErrors, forInit) {
  165286. var startPos = this.start, startLoc = this.startLoc;
  165287. var expr = this.parseExprAtom(refDestructuringErrors, forInit);
  165288. if (expr.type === "ArrowFunctionExpression" && this.input.slice(this.lastTokStart, this.lastTokEnd) !== ")") {
  165289. return expr;
  165290. }
  165291. var result = this.parseSubscripts(expr, startPos, startLoc, false, forInit);
  165292. if (refDestructuringErrors && result.type === "MemberExpression") {
  165293. if (refDestructuringErrors.parenthesizedAssign >= result.start) {
  165294. refDestructuringErrors.parenthesizedAssign = -1;
  165295. }
  165296. if (refDestructuringErrors.parenthesizedBind >= result.start) {
  165297. refDestructuringErrors.parenthesizedBind = -1;
  165298. }
  165299. if (refDestructuringErrors.trailingComma >= result.start) {
  165300. refDestructuringErrors.trailingComma = -1;
  165301. }
  165302. }
  165303. return result;
  165304. };
  165305. pp$52.parseSubscripts = function(base2, startPos, startLoc, noCalls, forInit) {
  165306. var maybeAsyncArrow = this.options.ecmaVersion >= 8 && base2.type === "Identifier" && base2.name === "async" && this.lastTokEnd === base2.end && !this.canInsertSemicolon() && base2.end - base2.start === 5 && this.potentialArrowAt === base2.start;
  165307. var optionalChained = false;
  165308. while (true) {
  165309. var element2 = this.parseSubscript(base2, startPos, startLoc, noCalls, maybeAsyncArrow, optionalChained, forInit);
  165310. if (element2.optional) {
  165311. optionalChained = true;
  165312. }
  165313. if (element2 === base2 || element2.type === "ArrowFunctionExpression") {
  165314. if (optionalChained) {
  165315. var chainNode = this.startNodeAt(startPos, startLoc);
  165316. chainNode.expression = element2;
  165317. element2 = this.finishNode(chainNode, "ChainExpression");
  165318. }
  165319. return element2;
  165320. }
  165321. base2 = element2;
  165322. }
  165323. };
  165324. pp$52.parseSubscript = function(base2, startPos, startLoc, noCalls, maybeAsyncArrow, optionalChained, forInit) {
  165325. var optionalSupported = this.options.ecmaVersion >= 11;
  165326. var optional = optionalSupported && this.eat(types$12.questionDot);
  165327. if (noCalls && optional) {
  165328. this.raise(this.lastTokStart, "Optional chaining cannot appear in the callee of new expressions");
  165329. }
  165330. var computed = this.eat(types$12.bracketL);
  165331. if (computed || optional && this.type !== types$12.parenL && this.type !== types$12.backQuote || this.eat(types$12.dot)) {
  165332. var node = this.startNodeAt(startPos, startLoc);
  165333. node.object = base2;
  165334. if (computed) {
  165335. node.property = this.parseExpression();
  165336. this.expect(types$12.bracketR);
  165337. } else if (this.type === types$12.privateId && base2.type !== "Super") {
  165338. node.property = this.parsePrivateIdent();
  165339. } else {
  165340. node.property = this.parseIdent(this.options.allowReserved !== "never");
  165341. }
  165342. node.computed = !!computed;
  165343. if (optionalSupported) {
  165344. node.optional = optional;
  165345. }
  165346. base2 = this.finishNode(node, "MemberExpression");
  165347. } else if (!noCalls && this.eat(types$12.parenL)) {
  165348. var refDestructuringErrors = new DestructuringErrors2(), oldYieldPos = this.yieldPos, oldAwaitPos = this.awaitPos, oldAwaitIdentPos = this.awaitIdentPos;
  165349. this.yieldPos = 0;
  165350. this.awaitPos = 0;
  165351. this.awaitIdentPos = 0;
  165352. var exprList = this.parseExprList(types$12.parenR, this.options.ecmaVersion >= 8, false, refDestructuringErrors);
  165353. if (maybeAsyncArrow && !optional && !this.canInsertSemicolon() && this.eat(types$12.arrow)) {
  165354. this.checkPatternErrors(refDestructuringErrors, false);
  165355. this.checkYieldAwaitInDefaultParams();
  165356. if (this.awaitIdentPos > 0) {
  165357. this.raise(this.awaitIdentPos, "Cannot use 'await' as identifier inside an async function");
  165358. }
  165359. this.yieldPos = oldYieldPos;
  165360. this.awaitPos = oldAwaitPos;
  165361. this.awaitIdentPos = oldAwaitIdentPos;
  165362. return this.parseArrowExpression(this.startNodeAt(startPos, startLoc), exprList, true, forInit);
  165363. }
  165364. this.checkExpressionErrors(refDestructuringErrors, true);
  165365. this.yieldPos = oldYieldPos || this.yieldPos;
  165366. this.awaitPos = oldAwaitPos || this.awaitPos;
  165367. this.awaitIdentPos = oldAwaitIdentPos || this.awaitIdentPos;
  165368. var node$1 = this.startNodeAt(startPos, startLoc);
  165369. node$1.callee = base2;
  165370. node$1.arguments = exprList;
  165371. if (optionalSupported) {
  165372. node$1.optional = optional;
  165373. }
  165374. base2 = this.finishNode(node$1, "CallExpression");
  165375. } else if (this.type === types$12.backQuote) {
  165376. if (optional || optionalChained) {
  165377. this.raise(this.start, "Optional chaining cannot appear in the tag of tagged template expressions");
  165378. }
  165379. var node$2 = this.startNodeAt(startPos, startLoc);
  165380. node$2.tag = base2;
  165381. node$2.quasi = this.parseTemplate({ isTagged: true });
  165382. base2 = this.finishNode(node$2, "TaggedTemplateExpression");
  165383. }
  165384. return base2;
  165385. };
  165386. pp$52.parseExprAtom = function(refDestructuringErrors, forInit) {
  165387. if (this.type === types$12.slash) {
  165388. this.readRegexp();
  165389. }
  165390. var node, canBeArrow = this.potentialArrowAt === this.start;
  165391. switch (this.type) {
  165392. case types$12._super:
  165393. if (!this.allowSuper) {
  165394. this.raise(this.start, "'super' keyword outside a method");
  165395. }
  165396. node = this.startNode();
  165397. this.next();
  165398. if (this.type === types$12.parenL && !this.allowDirectSuper) {
  165399. this.raise(node.start, "super() call outside constructor of a subclass");
  165400. }
  165401. if (this.type !== types$12.dot && this.type !== types$12.bracketL && this.type !== types$12.parenL) {
  165402. this.unexpected();
  165403. }
  165404. return this.finishNode(node, "Super");
  165405. case types$12._this:
  165406. node = this.startNode();
  165407. this.next();
  165408. return this.finishNode(node, "ThisExpression");
  165409. case types$12.name:
  165410. var startPos = this.start, startLoc = this.startLoc, containsEsc = this.containsEsc;
  165411. var id = this.parseIdent(false);
  165412. if (this.options.ecmaVersion >= 8 && !containsEsc && id.name === "async" && !this.canInsertSemicolon() && this.eat(types$12._function)) {
  165413. this.overrideContext(types2.f_expr);
  165414. return this.parseFunction(this.startNodeAt(startPos, startLoc), 0, false, true, forInit);
  165415. }
  165416. if (canBeArrow && !this.canInsertSemicolon()) {
  165417. if (this.eat(types$12.arrow)) {
  165418. return this.parseArrowExpression(this.startNodeAt(startPos, startLoc), [id], false, forInit);
  165419. }
  165420. if (this.options.ecmaVersion >= 8 && id.name === "async" && this.type === types$12.name && !containsEsc && (!this.potentialArrowInForAwait || this.value !== "of" || this.containsEsc)) {
  165421. id = this.parseIdent(false);
  165422. if (this.canInsertSemicolon() || !this.eat(types$12.arrow)) {
  165423. this.unexpected();
  165424. }
  165425. return this.parseArrowExpression(this.startNodeAt(startPos, startLoc), [id], true, forInit);
  165426. }
  165427. }
  165428. return id;
  165429. case types$12.regexp:
  165430. var value = this.value;
  165431. node = this.parseLiteral(value.value);
  165432. node.regex = { pattern: value.pattern, flags: value.flags };
  165433. return node;
  165434. case types$12.num:
  165435. case types$12.string:
  165436. return this.parseLiteral(this.value);
  165437. case types$12._null:
  165438. case types$12._true:
  165439. case types$12._false:
  165440. node = this.startNode();
  165441. node.value = this.type === types$12._null ? null : this.type === types$12._true;
  165442. node.raw = this.type.keyword;
  165443. this.next();
  165444. return this.finishNode(node, "Literal");
  165445. case types$12.parenL:
  165446. var start3 = this.start, expr = this.parseParenAndDistinguishExpression(canBeArrow, forInit);
  165447. if (refDestructuringErrors) {
  165448. if (refDestructuringErrors.parenthesizedAssign < 0 && !this.isSimpleAssignTarget(expr)) {
  165449. refDestructuringErrors.parenthesizedAssign = start3;
  165450. }
  165451. if (refDestructuringErrors.parenthesizedBind < 0) {
  165452. refDestructuringErrors.parenthesizedBind = start3;
  165453. }
  165454. }
  165455. return expr;
  165456. case types$12.bracketL:
  165457. node = this.startNode();
  165458. this.next();
  165459. node.elements = this.parseExprList(types$12.bracketR, true, true, refDestructuringErrors);
  165460. return this.finishNode(node, "ArrayExpression");
  165461. case types$12.braceL:
  165462. this.overrideContext(types2.b_expr);
  165463. return this.parseObj(false, refDestructuringErrors);
  165464. case types$12._function:
  165465. node = this.startNode();
  165466. this.next();
  165467. return this.parseFunction(node, 0);
  165468. case types$12._class:
  165469. return this.parseClass(this.startNode(), false);
  165470. case types$12._new:
  165471. return this.parseNew();
  165472. case types$12.backQuote:
  165473. return this.parseTemplate();
  165474. case types$12._import:
  165475. if (this.options.ecmaVersion >= 11) {
  165476. return this.parseExprImport();
  165477. } else {
  165478. return this.unexpected();
  165479. }
  165480. default:
  165481. this.unexpected();
  165482. }
  165483. };
  165484. pp$52.parseExprImport = function() {
  165485. var node = this.startNode();
  165486. if (this.containsEsc) {
  165487. this.raiseRecoverable(this.start, "Escape sequence in keyword import");
  165488. }
  165489. var meta = this.parseIdent(true);
  165490. switch (this.type) {
  165491. case types$12.parenL:
  165492. return this.parseDynamicImport(node);
  165493. case types$12.dot:
  165494. node.meta = meta;
  165495. return this.parseImportMeta(node);
  165496. default:
  165497. this.unexpected();
  165498. }
  165499. };
  165500. pp$52.parseDynamicImport = function(node) {
  165501. this.next();
  165502. node.source = this.parseMaybeAssign();
  165503. if (!this.eat(types$12.parenR)) {
  165504. var errorPos = this.start;
  165505. if (this.eat(types$12.comma) && this.eat(types$12.parenR)) {
  165506. this.raiseRecoverable(errorPos, "Trailing comma is not allowed in import()");
  165507. } else {
  165508. this.unexpected(errorPos);
  165509. }
  165510. }
  165511. return this.finishNode(node, "ImportExpression");
  165512. };
  165513. pp$52.parseImportMeta = function(node) {
  165514. this.next();
  165515. var containsEsc = this.containsEsc;
  165516. node.property = this.parseIdent(true);
  165517. if (node.property.name !== "meta") {
  165518. this.raiseRecoverable(node.property.start, "The only valid meta property for import is 'import.meta'");
  165519. }
  165520. if (containsEsc) {
  165521. this.raiseRecoverable(node.start, "'import.meta' must not contain escaped characters");
  165522. }
  165523. if (this.options.sourceType !== "module" && !this.options.allowImportExportEverywhere) {
  165524. this.raiseRecoverable(node.start, "Cannot use 'import.meta' outside a module");
  165525. }
  165526. return this.finishNode(node, "MetaProperty");
  165527. };
  165528. pp$52.parseLiteral = function(value) {
  165529. var node = this.startNode();
  165530. node.value = value;
  165531. node.raw = this.input.slice(this.start, this.end);
  165532. if (node.raw.charCodeAt(node.raw.length - 1) === 110) {
  165533. node.bigint = node.raw.slice(0, -1).replace(/_/g, "");
  165534. }
  165535. this.next();
  165536. return this.finishNode(node, "Literal");
  165537. };
  165538. pp$52.parseParenExpression = function() {
  165539. this.expect(types$12.parenL);
  165540. var val = this.parseExpression();
  165541. this.expect(types$12.parenR);
  165542. return val;
  165543. };
  165544. pp$52.parseParenAndDistinguishExpression = function(canBeArrow, forInit) {
  165545. var startPos = this.start, startLoc = this.startLoc, val, allowTrailingComma = this.options.ecmaVersion >= 8;
  165546. if (this.options.ecmaVersion >= 6) {
  165547. this.next();
  165548. var innerStartPos = this.start, innerStartLoc = this.startLoc;
  165549. var exprList = [], first = true, lastIsComma = false;
  165550. var refDestructuringErrors = new DestructuringErrors2(), oldYieldPos = this.yieldPos, oldAwaitPos = this.awaitPos, spreadStart;
  165551. this.yieldPos = 0;
  165552. this.awaitPos = 0;
  165553. while (this.type !== types$12.parenR) {
  165554. first ? first = false : this.expect(types$12.comma);
  165555. if (allowTrailingComma && this.afterTrailingComma(types$12.parenR, true)) {
  165556. lastIsComma = true;
  165557. break;
  165558. } else if (this.type === types$12.ellipsis) {
  165559. spreadStart = this.start;
  165560. exprList.push(this.parseParenItem(this.parseRestBinding()));
  165561. if (this.type === types$12.comma) {
  165562. this.raise(this.start, "Comma is not permitted after the rest element");
  165563. }
  165564. break;
  165565. } else {
  165566. exprList.push(this.parseMaybeAssign(false, refDestructuringErrors, this.parseParenItem));
  165567. }
  165568. }
  165569. var innerEndPos = this.lastTokEnd, innerEndLoc = this.lastTokEndLoc;
  165570. this.expect(types$12.parenR);
  165571. if (canBeArrow && !this.canInsertSemicolon() && this.eat(types$12.arrow)) {
  165572. this.checkPatternErrors(refDestructuringErrors, false);
  165573. this.checkYieldAwaitInDefaultParams();
  165574. this.yieldPos = oldYieldPos;
  165575. this.awaitPos = oldAwaitPos;
  165576. return this.parseParenArrowList(startPos, startLoc, exprList, forInit);
  165577. }
  165578. if (!exprList.length || lastIsComma) {
  165579. this.unexpected(this.lastTokStart);
  165580. }
  165581. if (spreadStart) {
  165582. this.unexpected(spreadStart);
  165583. }
  165584. this.checkExpressionErrors(refDestructuringErrors, true);
  165585. this.yieldPos = oldYieldPos || this.yieldPos;
  165586. this.awaitPos = oldAwaitPos || this.awaitPos;
  165587. if (exprList.length > 1) {
  165588. val = this.startNodeAt(innerStartPos, innerStartLoc);
  165589. val.expressions = exprList;
  165590. this.finishNodeAt(val, "SequenceExpression", innerEndPos, innerEndLoc);
  165591. } else {
  165592. val = exprList[0];
  165593. }
  165594. } else {
  165595. val = this.parseParenExpression();
  165596. }
  165597. if (this.options.preserveParens) {
  165598. var par = this.startNodeAt(startPos, startLoc);
  165599. par.expression = val;
  165600. return this.finishNode(par, "ParenthesizedExpression");
  165601. } else {
  165602. return val;
  165603. }
  165604. };
  165605. pp$52.parseParenItem = function(item) {
  165606. return item;
  165607. };
  165608. pp$52.parseParenArrowList = function(startPos, startLoc, exprList, forInit) {
  165609. return this.parseArrowExpression(this.startNodeAt(startPos, startLoc), exprList, false, forInit);
  165610. };
  165611. var empty3 = [];
  165612. pp$52.parseNew = function() {
  165613. if (this.containsEsc) {
  165614. this.raiseRecoverable(this.start, "Escape sequence in keyword new");
  165615. }
  165616. var node = this.startNode();
  165617. var meta = this.parseIdent(true);
  165618. if (this.options.ecmaVersion >= 6 && this.eat(types$12.dot)) {
  165619. node.meta = meta;
  165620. var containsEsc = this.containsEsc;
  165621. node.property = this.parseIdent(true);
  165622. if (node.property.name !== "target") {
  165623. this.raiseRecoverable(node.property.start, "The only valid meta property for new is 'new.target'");
  165624. }
  165625. if (containsEsc) {
  165626. this.raiseRecoverable(node.start, "'new.target' must not contain escaped characters");
  165627. }
  165628. if (!this.allowNewDotTarget) {
  165629. this.raiseRecoverable(node.start, "'new.target' can only be used in functions and class static block");
  165630. }
  165631. return this.finishNode(node, "MetaProperty");
  165632. }
  165633. var startPos = this.start, startLoc = this.startLoc, isImport = this.type === types$12._import;
  165634. node.callee = this.parseSubscripts(this.parseExprAtom(), startPos, startLoc, true, false);
  165635. if (isImport && node.callee.type === "ImportExpression") {
  165636. this.raise(startPos, "Cannot use new with import()");
  165637. }
  165638. if (this.eat(types$12.parenL)) {
  165639. node.arguments = this.parseExprList(types$12.parenR, this.options.ecmaVersion >= 8, false);
  165640. } else {
  165641. node.arguments = empty3;
  165642. }
  165643. return this.finishNode(node, "NewExpression");
  165644. };
  165645. pp$52.parseTemplateElement = function(ref3) {
  165646. var isTagged = ref3.isTagged;
  165647. var elem = this.startNode();
  165648. if (this.type === types$12.invalidTemplate) {
  165649. if (!isTagged) {
  165650. this.raiseRecoverable(this.start, "Bad escape sequence in untagged template literal");
  165651. }
  165652. elem.value = {
  165653. raw: this.value,
  165654. cooked: null
  165655. };
  165656. } else {
  165657. elem.value = {
  165658. raw: this.input.slice(this.start, this.end).replace(/\r\n?/g, "\n"),
  165659. cooked: this.value
  165660. };
  165661. }
  165662. this.next();
  165663. elem.tail = this.type === types$12.backQuote;
  165664. return this.finishNode(elem, "TemplateElement");
  165665. };
  165666. pp$52.parseTemplate = function(ref3) {
  165667. if (ref3 === void 0)
  165668. ref3 = {};
  165669. var isTagged = ref3.isTagged;
  165670. if (isTagged === void 0)
  165671. isTagged = false;
  165672. var node = this.startNode();
  165673. this.next();
  165674. node.expressions = [];
  165675. var curElt = this.parseTemplateElement({ isTagged });
  165676. node.quasis = [curElt];
  165677. while (!curElt.tail) {
  165678. if (this.type === types$12.eof) {
  165679. this.raise(this.pos, "Unterminated template literal");
  165680. }
  165681. this.expect(types$12.dollarBraceL);
  165682. node.expressions.push(this.parseExpression());
  165683. this.expect(types$12.braceR);
  165684. node.quasis.push(curElt = this.parseTemplateElement({ isTagged }));
  165685. }
  165686. this.next();
  165687. return this.finishNode(node, "TemplateLiteral");
  165688. };
  165689. pp$52.isAsyncProp = function(prop) {
  165690. return !prop.computed && prop.key.type === "Identifier" && prop.key.name === "async" && (this.type === types$12.name || this.type === types$12.num || this.type === types$12.string || this.type === types$12.bracketL || this.type.keyword || this.options.ecmaVersion >= 9 && this.type === types$12.star) && !lineBreak2.test(this.input.slice(this.lastTokEnd, this.start));
  165691. };
  165692. pp$52.parseObj = function(isPattern, refDestructuringErrors) {
  165693. var node = this.startNode(), first = true, propHash = {};
  165694. node.properties = [];
  165695. this.next();
  165696. while (!this.eat(types$12.braceR)) {
  165697. if (!first) {
  165698. this.expect(types$12.comma);
  165699. if (this.options.ecmaVersion >= 5 && this.afterTrailingComma(types$12.braceR)) {
  165700. break;
  165701. }
  165702. } else {
  165703. first = false;
  165704. }
  165705. var prop = this.parseProperty(isPattern, refDestructuringErrors);
  165706. if (!isPattern) {
  165707. this.checkPropClash(prop, propHash, refDestructuringErrors);
  165708. }
  165709. node.properties.push(prop);
  165710. }
  165711. return this.finishNode(node, isPattern ? "ObjectPattern" : "ObjectExpression");
  165712. };
  165713. pp$52.parseProperty = function(isPattern, refDestructuringErrors) {
  165714. var prop = this.startNode(), isGenerator, isAsync, startPos, startLoc;
  165715. if (this.options.ecmaVersion >= 9 && this.eat(types$12.ellipsis)) {
  165716. if (isPattern) {
  165717. prop.argument = this.parseIdent(false);
  165718. if (this.type === types$12.comma) {
  165719. this.raise(this.start, "Comma is not permitted after the rest element");
  165720. }
  165721. return this.finishNode(prop, "RestElement");
  165722. }
  165723. if (this.type === types$12.parenL && refDestructuringErrors) {
  165724. if (refDestructuringErrors.parenthesizedAssign < 0) {
  165725. refDestructuringErrors.parenthesizedAssign = this.start;
  165726. }
  165727. if (refDestructuringErrors.parenthesizedBind < 0) {
  165728. refDestructuringErrors.parenthesizedBind = this.start;
  165729. }
  165730. }
  165731. prop.argument = this.parseMaybeAssign(false, refDestructuringErrors);
  165732. if (this.type === types$12.comma && refDestructuringErrors && refDestructuringErrors.trailingComma < 0) {
  165733. refDestructuringErrors.trailingComma = this.start;
  165734. }
  165735. return this.finishNode(prop, "SpreadElement");
  165736. }
  165737. if (this.options.ecmaVersion >= 6) {
  165738. prop.method = false;
  165739. prop.shorthand = false;
  165740. if (isPattern || refDestructuringErrors) {
  165741. startPos = this.start;
  165742. startLoc = this.startLoc;
  165743. }
  165744. if (!isPattern) {
  165745. isGenerator = this.eat(types$12.star);
  165746. }
  165747. }
  165748. var containsEsc = this.containsEsc;
  165749. this.parsePropertyName(prop);
  165750. if (!isPattern && !containsEsc && this.options.ecmaVersion >= 8 && !isGenerator && this.isAsyncProp(prop)) {
  165751. isAsync = true;
  165752. isGenerator = this.options.ecmaVersion >= 9 && this.eat(types$12.star);
  165753. this.parsePropertyName(prop, refDestructuringErrors);
  165754. } else {
  165755. isAsync = false;
  165756. }
  165757. this.parsePropertyValue(prop, isPattern, isGenerator, isAsync, startPos, startLoc, refDestructuringErrors, containsEsc);
  165758. return this.finishNode(prop, "Property");
  165759. };
  165760. pp$52.parsePropertyValue = function(prop, isPattern, isGenerator, isAsync, startPos, startLoc, refDestructuringErrors, containsEsc) {
  165761. if ((isGenerator || isAsync) && this.type === types$12.colon) {
  165762. this.unexpected();
  165763. }
  165764. if (this.eat(types$12.colon)) {
  165765. prop.value = isPattern ? this.parseMaybeDefault(this.start, this.startLoc) : this.parseMaybeAssign(false, refDestructuringErrors);
  165766. prop.kind = "init";
  165767. } else if (this.options.ecmaVersion >= 6 && this.type === types$12.parenL) {
  165768. if (isPattern) {
  165769. this.unexpected();
  165770. }
  165771. prop.kind = "init";
  165772. prop.method = true;
  165773. prop.value = this.parseMethod(isGenerator, isAsync);
  165774. } else if (!isPattern && !containsEsc && this.options.ecmaVersion >= 5 && !prop.computed && prop.key.type === "Identifier" && (prop.key.name === "get" || prop.key.name === "set") && (this.type !== types$12.comma && this.type !== types$12.braceR && this.type !== types$12.eq)) {
  165775. if (isGenerator || isAsync) {
  165776. this.unexpected();
  165777. }
  165778. prop.kind = prop.key.name;
  165779. this.parsePropertyName(prop);
  165780. prop.value = this.parseMethod(false);
  165781. var paramCount = prop.kind === "get" ? 0 : 1;
  165782. if (prop.value.params.length !== paramCount) {
  165783. var start3 = prop.value.start;
  165784. if (prop.kind === "get") {
  165785. this.raiseRecoverable(start3, "getter should have no params");
  165786. } else {
  165787. this.raiseRecoverable(start3, "setter should have exactly one param");
  165788. }
  165789. } else {
  165790. if (prop.kind === "set" && prop.value.params[0].type === "RestElement") {
  165791. this.raiseRecoverable(prop.value.params[0].start, "Setter cannot use rest params");
  165792. }
  165793. }
  165794. } else if (this.options.ecmaVersion >= 6 && !prop.computed && prop.key.type === "Identifier") {
  165795. if (isGenerator || isAsync) {
  165796. this.unexpected();
  165797. }
  165798. this.checkUnreserved(prop.key);
  165799. if (prop.key.name === "await" && !this.awaitIdentPos) {
  165800. this.awaitIdentPos = startPos;
  165801. }
  165802. prop.kind = "init";
  165803. if (isPattern) {
  165804. prop.value = this.parseMaybeDefault(startPos, startLoc, this.copyNode(prop.key));
  165805. } else if (this.type === types$12.eq && refDestructuringErrors) {
  165806. if (refDestructuringErrors.shorthandAssign < 0) {
  165807. refDestructuringErrors.shorthandAssign = this.start;
  165808. }
  165809. prop.value = this.parseMaybeDefault(startPos, startLoc, this.copyNode(prop.key));
  165810. } else {
  165811. prop.value = this.copyNode(prop.key);
  165812. }
  165813. prop.shorthand = true;
  165814. } else {
  165815. this.unexpected();
  165816. }
  165817. };
  165818. pp$52.parsePropertyName = function(prop) {
  165819. if (this.options.ecmaVersion >= 6) {
  165820. if (this.eat(types$12.bracketL)) {
  165821. prop.computed = true;
  165822. prop.key = this.parseMaybeAssign();
  165823. this.expect(types$12.bracketR);
  165824. return prop.key;
  165825. } else {
  165826. prop.computed = false;
  165827. }
  165828. }
  165829. return prop.key = this.type === types$12.num || this.type === types$12.string ? this.parseExprAtom() : this.parseIdent(this.options.allowReserved !== "never");
  165830. };
  165831. pp$52.initFunction = function(node) {
  165832. node.id = null;
  165833. if (this.options.ecmaVersion >= 6) {
  165834. node.generator = node.expression = false;
  165835. }
  165836. if (this.options.ecmaVersion >= 8) {
  165837. node.async = false;
  165838. }
  165839. };
  165840. pp$52.parseMethod = function(isGenerator, isAsync, allowDirectSuper) {
  165841. var node = this.startNode(), oldYieldPos = this.yieldPos, oldAwaitPos = this.awaitPos, oldAwaitIdentPos = this.awaitIdentPos;
  165842. this.initFunction(node);
  165843. if (this.options.ecmaVersion >= 6) {
  165844. node.generator = isGenerator;
  165845. }
  165846. if (this.options.ecmaVersion >= 8) {
  165847. node.async = !!isAsync;
  165848. }
  165849. this.yieldPos = 0;
  165850. this.awaitPos = 0;
  165851. this.awaitIdentPos = 0;
  165852. this.enterScope(functionFlags2(isAsync, node.generator) | SCOPE_SUPER2 | (allowDirectSuper ? SCOPE_DIRECT_SUPER2 : 0));
  165853. this.expect(types$12.parenL);
  165854. node.params = this.parseBindingList(types$12.parenR, false, this.options.ecmaVersion >= 8);
  165855. this.checkYieldAwaitInDefaultParams();
  165856. this.parseFunctionBody(node, false, true, false);
  165857. this.yieldPos = oldYieldPos;
  165858. this.awaitPos = oldAwaitPos;
  165859. this.awaitIdentPos = oldAwaitIdentPos;
  165860. return this.finishNode(node, "FunctionExpression");
  165861. };
  165862. pp$52.parseArrowExpression = function(node, params, isAsync, forInit) {
  165863. var oldYieldPos = this.yieldPos, oldAwaitPos = this.awaitPos, oldAwaitIdentPos = this.awaitIdentPos;
  165864. this.enterScope(functionFlags2(isAsync, false) | SCOPE_ARROW2);
  165865. this.initFunction(node);
  165866. if (this.options.ecmaVersion >= 8) {
  165867. node.async = !!isAsync;
  165868. }
  165869. this.yieldPos = 0;
  165870. this.awaitPos = 0;
  165871. this.awaitIdentPos = 0;
  165872. node.params = this.toAssignableList(params, true);
  165873. this.parseFunctionBody(node, true, false, forInit);
  165874. this.yieldPos = oldYieldPos;
  165875. this.awaitPos = oldAwaitPos;
  165876. this.awaitIdentPos = oldAwaitIdentPos;
  165877. return this.finishNode(node, "ArrowFunctionExpression");
  165878. };
  165879. pp$52.parseFunctionBody = function(node, isArrowFunction, isMethod, forInit) {
  165880. var isExpression = isArrowFunction && this.type !== types$12.braceL;
  165881. var oldStrict = this.strict, useStrict = false;
  165882. if (isExpression) {
  165883. node.body = this.parseMaybeAssign(forInit);
  165884. node.expression = true;
  165885. this.checkParams(node, false);
  165886. } else {
  165887. var nonSimple = this.options.ecmaVersion >= 7 && !this.isSimpleParamList(node.params);
  165888. if (!oldStrict || nonSimple) {
  165889. useStrict = this.strictDirective(this.end);
  165890. if (useStrict && nonSimple) {
  165891. this.raiseRecoverable(node.start, "Illegal 'use strict' directive in function with non-simple parameter list");
  165892. }
  165893. }
  165894. var oldLabels = this.labels;
  165895. this.labels = [];
  165896. if (useStrict) {
  165897. this.strict = true;
  165898. }
  165899. this.checkParams(node, !oldStrict && !useStrict && !isArrowFunction && !isMethod && this.isSimpleParamList(node.params));
  165900. if (this.strict && node.id) {
  165901. this.checkLValSimple(node.id, BIND_OUTSIDE2);
  165902. }
  165903. node.body = this.parseBlock(false, void 0, useStrict && !oldStrict);
  165904. node.expression = false;
  165905. this.adaptDirectivePrologue(node.body.body);
  165906. this.labels = oldLabels;
  165907. }
  165908. this.exitScope();
  165909. };
  165910. pp$52.isSimpleParamList = function(params) {
  165911. for (var i2 = 0, list4 = params; i2 < list4.length; i2 += 1) {
  165912. var param = list4[i2];
  165913. if (param.type !== "Identifier") {
  165914. return false;
  165915. }
  165916. }
  165917. return true;
  165918. };
  165919. pp$52.checkParams = function(node, allowDuplicates) {
  165920. var nameHash = /* @__PURE__ */ Object.create(null);
  165921. for (var i2 = 0, list4 = node.params; i2 < list4.length; i2 += 1) {
  165922. var param = list4[i2];
  165923. this.checkLValInnerPattern(param, BIND_VAR2, allowDuplicates ? null : nameHash);
  165924. }
  165925. };
  165926. pp$52.parseExprList = function(close, allowTrailingComma, allowEmpty, refDestructuringErrors) {
  165927. var elts = [], first = true;
  165928. while (!this.eat(close)) {
  165929. if (!first) {
  165930. this.expect(types$12.comma);
  165931. if (allowTrailingComma && this.afterTrailingComma(close)) {
  165932. break;
  165933. }
  165934. } else {
  165935. first = false;
  165936. }
  165937. var elt = void 0;
  165938. if (allowEmpty && this.type === types$12.comma) {
  165939. elt = null;
  165940. } else if (this.type === types$12.ellipsis) {
  165941. elt = this.parseSpread(refDestructuringErrors);
  165942. if (refDestructuringErrors && this.type === types$12.comma && refDestructuringErrors.trailingComma < 0) {
  165943. refDestructuringErrors.trailingComma = this.start;
  165944. }
  165945. } else {
  165946. elt = this.parseMaybeAssign(false, refDestructuringErrors);
  165947. }
  165948. elts.push(elt);
  165949. }
  165950. return elts;
  165951. };
  165952. pp$52.checkUnreserved = function(ref3) {
  165953. var start3 = ref3.start;
  165954. var end = ref3.end;
  165955. var name2 = ref3.name;
  165956. if (this.inGenerator && name2 === "yield") {
  165957. this.raiseRecoverable(start3, "Cannot use 'yield' as identifier inside a generator");
  165958. }
  165959. if (this.inAsync && name2 === "await") {
  165960. this.raiseRecoverable(start3, "Cannot use 'await' as identifier inside an async function");
  165961. }
  165962. if (this.currentThisScope().inClassFieldInit && name2 === "arguments") {
  165963. this.raiseRecoverable(start3, "Cannot use 'arguments' in class field initializer");
  165964. }
  165965. if (this.inClassStaticBlock && (name2 === "arguments" || name2 === "await")) {
  165966. this.raise(start3, "Cannot use " + name2 + " in class static initialization block");
  165967. }
  165968. if (this.keywords.test(name2)) {
  165969. this.raise(start3, "Unexpected keyword '" + name2 + "'");
  165970. }
  165971. if (this.options.ecmaVersion < 6 && this.input.slice(start3, end).indexOf("\\") !== -1) {
  165972. return;
  165973. }
  165974. var re = this.strict ? this.reservedWordsStrict : this.reservedWords;
  165975. if (re.test(name2)) {
  165976. if (!this.inAsync && name2 === "await") {
  165977. this.raiseRecoverable(start3, "Cannot use keyword 'await' outside an async function");
  165978. }
  165979. this.raiseRecoverable(start3, "The keyword '" + name2 + "' is reserved");
  165980. }
  165981. };
  165982. pp$52.parseIdent = function(liberal, isBinding) {
  165983. var node = this.startNode();
  165984. if (this.type === types$12.name) {
  165985. node.name = this.value;
  165986. } else if (this.type.keyword) {
  165987. node.name = this.type.keyword;
  165988. if ((node.name === "class" || node.name === "function") && (this.lastTokEnd !== this.lastTokStart + 1 || this.input.charCodeAt(this.lastTokStart) !== 46)) {
  165989. this.context.pop();
  165990. }
  165991. } else {
  165992. this.unexpected();
  165993. }
  165994. this.next(!!liberal);
  165995. this.finishNode(node, "Identifier");
  165996. if (!liberal) {
  165997. this.checkUnreserved(node);
  165998. if (node.name === "await" && !this.awaitIdentPos) {
  165999. this.awaitIdentPos = node.start;
  166000. }
  166001. }
  166002. return node;
  166003. };
  166004. pp$52.parsePrivateIdent = function() {
  166005. var node = this.startNode();
  166006. if (this.type === types$12.privateId) {
  166007. node.name = this.value;
  166008. } else {
  166009. this.unexpected();
  166010. }
  166011. this.next();
  166012. this.finishNode(node, "PrivateIdentifier");
  166013. if (this.privateNameStack.length === 0) {
  166014. this.raise(node.start, "Private field '#" + node.name + "' must be declared in an enclosing class");
  166015. } else {
  166016. this.privateNameStack[this.privateNameStack.length - 1].used.push(node);
  166017. }
  166018. return node;
  166019. };
  166020. pp$52.parseYield = function(forInit) {
  166021. if (!this.yieldPos) {
  166022. this.yieldPos = this.start;
  166023. }
  166024. var node = this.startNode();
  166025. this.next();
  166026. if (this.type === types$12.semi || this.canInsertSemicolon() || this.type !== types$12.star && !this.type.startsExpr) {
  166027. node.delegate = false;
  166028. node.argument = null;
  166029. } else {
  166030. node.delegate = this.eat(types$12.star);
  166031. node.argument = this.parseMaybeAssign(forInit);
  166032. }
  166033. return this.finishNode(node, "YieldExpression");
  166034. };
  166035. pp$52.parseAwait = function(forInit) {
  166036. if (!this.awaitPos) {
  166037. this.awaitPos = this.start;
  166038. }
  166039. var node = this.startNode();
  166040. this.next();
  166041. node.argument = this.parseMaybeUnary(null, true, false, forInit);
  166042. return this.finishNode(node, "AwaitExpression");
  166043. };
  166044. var pp$42 = Parser3.prototype;
  166045. pp$42.raise = function(pos, message) {
  166046. var loc = getLineInfo2(this.input, pos);
  166047. message += " (" + loc.line + ":" + loc.column + ")";
  166048. var err = new SyntaxError(message);
  166049. err.pos = pos;
  166050. err.loc = loc;
  166051. err.raisedAt = this.pos;
  166052. throw err;
  166053. };
  166054. pp$42.raiseRecoverable = pp$42.raise;
  166055. pp$42.curPosition = function() {
  166056. if (this.options.locations) {
  166057. return new Position3(this.curLine, this.pos - this.lineStart);
  166058. }
  166059. };
  166060. var pp$32 = Parser3.prototype;
  166061. var Scope4 = function Scope5(flags) {
  166062. this.flags = flags;
  166063. this.var = [];
  166064. this.lexical = [];
  166065. this.functions = [];
  166066. this.inClassFieldInit = false;
  166067. };
  166068. pp$32.enterScope = function(flags) {
  166069. this.scopeStack.push(new Scope4(flags));
  166070. };
  166071. pp$32.exitScope = function() {
  166072. this.scopeStack.pop();
  166073. };
  166074. pp$32.treatFunctionsAsVarInScope = function(scope) {
  166075. return scope.flags & SCOPE_FUNCTION2 || !this.inModule && scope.flags & SCOPE_TOP2;
  166076. };
  166077. pp$32.declareName = function(name2, bindingType, pos) {
  166078. var redeclared = false;
  166079. if (bindingType === BIND_LEXICAL2) {
  166080. var scope = this.currentScope();
  166081. redeclared = scope.lexical.indexOf(name2) > -1 || scope.functions.indexOf(name2) > -1 || scope.var.indexOf(name2) > -1;
  166082. scope.lexical.push(name2);
  166083. if (this.inModule && scope.flags & SCOPE_TOP2) {
  166084. delete this.undefinedExports[name2];
  166085. }
  166086. } else if (bindingType === BIND_SIMPLE_CATCH2) {
  166087. var scope$1 = this.currentScope();
  166088. scope$1.lexical.push(name2);
  166089. } else if (bindingType === BIND_FUNCTION2) {
  166090. var scope$2 = this.currentScope();
  166091. if (this.treatFunctionsAsVar) {
  166092. redeclared = scope$2.lexical.indexOf(name2) > -1;
  166093. } else {
  166094. redeclared = scope$2.lexical.indexOf(name2) > -1 || scope$2.var.indexOf(name2) > -1;
  166095. }
  166096. scope$2.functions.push(name2);
  166097. } else {
  166098. for (var i2 = this.scopeStack.length - 1; i2 >= 0; --i2) {
  166099. var scope$3 = this.scopeStack[i2];
  166100. if (scope$3.lexical.indexOf(name2) > -1 && !(scope$3.flags & SCOPE_SIMPLE_CATCH2 && scope$3.lexical[0] === name2) || !this.treatFunctionsAsVarInScope(scope$3) && scope$3.functions.indexOf(name2) > -1) {
  166101. redeclared = true;
  166102. break;
  166103. }
  166104. scope$3.var.push(name2);
  166105. if (this.inModule && scope$3.flags & SCOPE_TOP2) {
  166106. delete this.undefinedExports[name2];
  166107. }
  166108. if (scope$3.flags & SCOPE_VAR2) {
  166109. break;
  166110. }
  166111. }
  166112. }
  166113. if (redeclared) {
  166114. this.raiseRecoverable(pos, "Identifier '" + name2 + "' has already been declared");
  166115. }
  166116. };
  166117. pp$32.checkLocalExport = function(id) {
  166118. if (this.scopeStack[0].lexical.indexOf(id.name) === -1 && this.scopeStack[0].var.indexOf(id.name) === -1) {
  166119. this.undefinedExports[id.name] = id;
  166120. }
  166121. };
  166122. pp$32.currentScope = function() {
  166123. return this.scopeStack[this.scopeStack.length - 1];
  166124. };
  166125. pp$32.currentVarScope = function() {
  166126. for (var i2 = this.scopeStack.length - 1; ; i2--) {
  166127. var scope = this.scopeStack[i2];
  166128. if (scope.flags & SCOPE_VAR2) {
  166129. return scope;
  166130. }
  166131. }
  166132. };
  166133. pp$32.currentThisScope = function() {
  166134. for (var i2 = this.scopeStack.length - 1; ; i2--) {
  166135. var scope = this.scopeStack[i2];
  166136. if (scope.flags & SCOPE_VAR2 && !(scope.flags & SCOPE_ARROW2)) {
  166137. return scope;
  166138. }
  166139. }
  166140. };
  166141. var Node3 = function Node4(parser, pos, loc) {
  166142. this.type = "";
  166143. this.start = pos;
  166144. this.end = 0;
  166145. if (parser.options.locations) {
  166146. this.loc = new SourceLocation3(parser, loc);
  166147. }
  166148. if (parser.options.directSourceFile) {
  166149. this.sourceFile = parser.options.directSourceFile;
  166150. }
  166151. if (parser.options.ranges) {
  166152. this.range = [pos, 0];
  166153. }
  166154. };
  166155. var pp$22 = Parser3.prototype;
  166156. pp$22.startNode = function() {
  166157. return new Node3(this, this.start, this.startLoc);
  166158. };
  166159. pp$22.startNodeAt = function(pos, loc) {
  166160. return new Node3(this, pos, loc);
  166161. };
  166162. function finishNodeAt2(node, type, pos, loc) {
  166163. node.type = type;
  166164. node.end = pos;
  166165. if (this.options.locations) {
  166166. node.loc.end = loc;
  166167. }
  166168. if (this.options.ranges) {
  166169. node.range[1] = pos;
  166170. }
  166171. return node;
  166172. }
  166173. pp$22.finishNode = function(node, type) {
  166174. return finishNodeAt2.call(this, node, type, this.lastTokEnd, this.lastTokEndLoc);
  166175. };
  166176. pp$22.finishNodeAt = function(node, type, pos, loc) {
  166177. return finishNodeAt2.call(this, node, type, pos, loc);
  166178. };
  166179. pp$22.copyNode = function(node) {
  166180. var newNode = new Node3(this, node.start, this.startLoc);
  166181. for (var prop in node) {
  166182. newNode[prop] = node[prop];
  166183. }
  166184. return newNode;
  166185. };
  166186. var ecma9BinaryProperties2 = "ASCII ASCII_Hex_Digit AHex Alphabetic Alpha Any Assigned Bidi_Control Bidi_C Bidi_Mirrored Bidi_M Case_Ignorable CI Cased Changes_When_Casefolded CWCF Changes_When_Casemapped CWCM Changes_When_Lowercased CWL Changes_When_NFKC_Casefolded CWKCF Changes_When_Titlecased CWT Changes_When_Uppercased CWU Dash Default_Ignorable_Code_Point DI Deprecated Dep Diacritic Dia Emoji Emoji_Component Emoji_Modifier Emoji_Modifier_Base Emoji_Presentation Extender Ext Grapheme_Base Gr_Base Grapheme_Extend Gr_Ext Hex_Digit Hex IDS_Binary_Operator IDSB IDS_Trinary_Operator IDST ID_Continue IDC ID_Start IDS Ideographic Ideo Join_Control Join_C Logical_Order_Exception LOE Lowercase Lower Math Noncharacter_Code_Point NChar Pattern_Syntax Pat_Syn Pattern_White_Space Pat_WS Quotation_Mark QMark Radical Regional_Indicator RI Sentence_Terminal STerm Soft_Dotted SD Terminal_Punctuation Term Unified_Ideograph UIdeo Uppercase Upper Variation_Selector VS White_Space space XID_Continue XIDC XID_Start XIDS";
  166187. var ecma10BinaryProperties2 = ecma9BinaryProperties2 + " Extended_Pictographic";
  166188. var ecma11BinaryProperties2 = ecma10BinaryProperties2;
  166189. var ecma12BinaryProperties2 = ecma11BinaryProperties2 + " EBase EComp EMod EPres ExtPict";
  166190. var ecma13BinaryProperties2 = ecma12BinaryProperties2;
  166191. var unicodeBinaryProperties2 = {
  166192. 9: ecma9BinaryProperties2,
  166193. 10: ecma10BinaryProperties2,
  166194. 11: ecma11BinaryProperties2,
  166195. 12: ecma12BinaryProperties2,
  166196. 13: ecma13BinaryProperties2
  166197. };
  166198. var unicodeGeneralCategoryValues2 = "Cased_Letter LC Close_Punctuation Pe Connector_Punctuation Pc Control Cc cntrl Currency_Symbol Sc Dash_Punctuation Pd Decimal_Number Nd digit Enclosing_Mark Me Final_Punctuation Pf Format Cf Initial_Punctuation Pi Letter L Letter_Number Nl Line_Separator Zl Lowercase_Letter Ll Mark M Combining_Mark Math_Symbol Sm Modifier_Letter Lm Modifier_Symbol Sk Nonspacing_Mark Mn Number N Open_Punctuation Ps Other C Other_Letter Lo Other_Number No Other_Punctuation Po Other_Symbol So Paragraph_Separator Zp Private_Use Co Punctuation P punct Separator Z Space_Separator Zs Spacing_Mark Mc Surrogate Cs Symbol S Titlecase_Letter Lt Unassigned Cn Uppercase_Letter Lu";
  166199. var ecma9ScriptValues2 = "Adlam Adlm Ahom Anatolian_Hieroglyphs Hluw Arabic Arab Armenian Armn Avestan Avst Balinese Bali Bamum Bamu Bassa_Vah Bass Batak Batk Bengali Beng Bhaiksuki Bhks Bopomofo Bopo Brahmi Brah Braille Brai Buginese Bugi Buhid Buhd Canadian_Aboriginal Cans Carian Cari Caucasian_Albanian Aghb Chakma Cakm Cham Cham Cherokee Cher Common Zyyy Coptic Copt Qaac Cuneiform Xsux Cypriot Cprt Cyrillic Cyrl Deseret Dsrt Devanagari Deva Duployan Dupl Egyptian_Hieroglyphs Egyp Elbasan Elba Ethiopic Ethi Georgian Geor Glagolitic Glag Gothic Goth Grantha Gran Greek Grek Gujarati Gujr Gurmukhi Guru Han Hani Hangul Hang Hanunoo Hano Hatran Hatr Hebrew Hebr Hiragana Hira Imperial_Aramaic Armi Inherited Zinh Qaai Inscriptional_Pahlavi Phli Inscriptional_Parthian Prti Javanese Java Kaithi Kthi Kannada Knda Katakana Kana Kayah_Li Kali Kharoshthi Khar Khmer Khmr Khojki Khoj Khudawadi Sind Lao Laoo Latin Latn Lepcha Lepc Limbu Limb Linear_A Lina Linear_B Linb Lisu Lisu Lycian Lyci Lydian Lydi Mahajani Mahj Malayalam Mlym Mandaic Mand Manichaean Mani Marchen Marc Masaram_Gondi Gonm Meetei_Mayek Mtei Mende_Kikakui Mend Meroitic_Cursive Merc Meroitic_Hieroglyphs Mero Miao Plrd Modi Mongolian Mong Mro Mroo Multani Mult Myanmar Mymr Nabataean Nbat New_Tai_Lue Talu Newa Newa Nko Nkoo Nushu Nshu Ogham Ogam Ol_Chiki Olck Old_Hungarian Hung Old_Italic Ital Old_North_Arabian Narb Old_Permic Perm Old_Persian Xpeo Old_South_Arabian Sarb Old_Turkic Orkh Oriya Orya Osage Osge Osmanya Osma Pahawh_Hmong Hmng Palmyrene Palm Pau_Cin_Hau Pauc Phags_Pa Phag Phoenician Phnx Psalter_Pahlavi Phlp Rejang Rjng Runic Runr Samaritan Samr Saurashtra Saur Sharada Shrd Shavian Shaw Siddham Sidd SignWriting Sgnw Sinhala Sinh Sora_Sompeng Sora Soyombo Soyo Sundanese Sund Syloti_Nagri Sylo Syriac Syrc Tagalog Tglg Tagbanwa Tagb Tai_Le Tale Tai_Tham Lana Tai_Viet Tavt Takri Takr Tamil Taml Tangut Tang Telugu Telu Thaana Thaa Thai Thai Tibetan Tibt Tifinagh Tfng Tirhuta Tirh Ugaritic Ugar Vai Vaii Warang_Citi Wara Yi Yiii Zanabazar_Square Zanb";
  166200. var ecma10ScriptValues2 = ecma9ScriptValues2 + " Dogra Dogr Gunjala_Gondi Gong Hanifi_Rohingya Rohg Makasar Maka Medefaidrin Medf Old_Sogdian Sogo Sogdian Sogd";
  166201. var ecma11ScriptValues2 = ecma10ScriptValues2 + " Elymaic Elym Nandinagari Nand Nyiakeng_Puachue_Hmong Hmnp Wancho Wcho";
  166202. var ecma12ScriptValues2 = ecma11ScriptValues2 + " Chorasmian Chrs Diak Dives_Akuru Khitan_Small_Script Kits Yezi Yezidi";
  166203. var ecma13ScriptValues2 = ecma12ScriptValues2 + " Cypro_Minoan Cpmn Old_Uyghur Ougr Tangsa Tnsa Toto Vithkuqi Vith";
  166204. var unicodeScriptValues2 = {
  166205. 9: ecma9ScriptValues2,
  166206. 10: ecma10ScriptValues2,
  166207. 11: ecma11ScriptValues2,
  166208. 12: ecma12ScriptValues2,
  166209. 13: ecma13ScriptValues2
  166210. };
  166211. var data2 = {};
  166212. function buildUnicodeData2(ecmaVersion2) {
  166213. var d = data2[ecmaVersion2] = {
  166214. binary: wordsRegexp2(unicodeBinaryProperties2[ecmaVersion2] + " " + unicodeGeneralCategoryValues2),
  166215. nonBinary: {
  166216. General_Category: wordsRegexp2(unicodeGeneralCategoryValues2),
  166217. Script: wordsRegexp2(unicodeScriptValues2[ecmaVersion2])
  166218. }
  166219. };
  166220. d.nonBinary.Script_Extensions = d.nonBinary.Script;
  166221. d.nonBinary.gc = d.nonBinary.General_Category;
  166222. d.nonBinary.sc = d.nonBinary.Script;
  166223. d.nonBinary.scx = d.nonBinary.Script_Extensions;
  166224. }
  166225. for (var i = 0, list3 = [9, 10, 11, 12, 13]; i < list3.length; i += 1) {
  166226. var ecmaVersion = list3[i];
  166227. buildUnicodeData2(ecmaVersion);
  166228. }
  166229. var pp$12 = Parser3.prototype;
  166230. var RegExpValidationState3 = function RegExpValidationState4(parser) {
  166231. this.parser = parser;
  166232. this.validFlags = "gim" + (parser.options.ecmaVersion >= 6 ? "uy" : "") + (parser.options.ecmaVersion >= 9 ? "s" : "") + (parser.options.ecmaVersion >= 13 ? "d" : "");
  166233. this.unicodeProperties = data2[parser.options.ecmaVersion >= 13 ? 13 : parser.options.ecmaVersion];
  166234. this.source = "";
  166235. this.flags = "";
  166236. this.start = 0;
  166237. this.switchU = false;
  166238. this.switchN = false;
  166239. this.pos = 0;
  166240. this.lastIntValue = 0;
  166241. this.lastStringValue = "";
  166242. this.lastAssertionIsQuantifiable = false;
  166243. this.numCapturingParens = 0;
  166244. this.maxBackReference = 0;
  166245. this.groupNames = [];
  166246. this.backReferenceNames = [];
  166247. };
  166248. RegExpValidationState3.prototype.reset = function reset2(start3, pattern, flags) {
  166249. var unicode = flags.indexOf("u") !== -1;
  166250. this.start = start3 | 0;
  166251. this.source = pattern + "";
  166252. this.flags = flags;
  166253. this.switchU = unicode && this.parser.options.ecmaVersion >= 6;
  166254. this.switchN = unicode && this.parser.options.ecmaVersion >= 9;
  166255. };
  166256. RegExpValidationState3.prototype.raise = function raise2(message) {
  166257. this.parser.raiseRecoverable(this.start, "Invalid regular expression: /" + this.source + "/: " + message);
  166258. };
  166259. RegExpValidationState3.prototype.at = function at2(i2, forceU) {
  166260. if (forceU === void 0)
  166261. forceU = false;
  166262. var s = this.source;
  166263. var l = s.length;
  166264. if (i2 >= l) {
  166265. return -1;
  166266. }
  166267. var c = s.charCodeAt(i2);
  166268. if (!(forceU || this.switchU) || c <= 55295 || c >= 57344 || i2 + 1 >= l) {
  166269. return c;
  166270. }
  166271. var next = s.charCodeAt(i2 + 1);
  166272. return next >= 56320 && next <= 57343 ? (c << 10) + next - 56613888 : c;
  166273. };
  166274. RegExpValidationState3.prototype.nextIndex = function nextIndex2(i2, forceU) {
  166275. if (forceU === void 0)
  166276. forceU = false;
  166277. var s = this.source;
  166278. var l = s.length;
  166279. if (i2 >= l) {
  166280. return l;
  166281. }
  166282. var c = s.charCodeAt(i2), next;
  166283. if (!(forceU || this.switchU) || c <= 55295 || c >= 57344 || i2 + 1 >= l || (next = s.charCodeAt(i2 + 1)) < 56320 || next > 57343) {
  166284. return i2 + 1;
  166285. }
  166286. return i2 + 2;
  166287. };
  166288. RegExpValidationState3.prototype.current = function current2(forceU) {
  166289. if (forceU === void 0)
  166290. forceU = false;
  166291. return this.at(this.pos, forceU);
  166292. };
  166293. RegExpValidationState3.prototype.lookahead = function lookahead2(forceU) {
  166294. if (forceU === void 0)
  166295. forceU = false;
  166296. return this.at(this.nextIndex(this.pos, forceU), forceU);
  166297. };
  166298. RegExpValidationState3.prototype.advance = function advance2(forceU) {
  166299. if (forceU === void 0)
  166300. forceU = false;
  166301. this.pos = this.nextIndex(this.pos, forceU);
  166302. };
  166303. RegExpValidationState3.prototype.eat = function eat2(ch, forceU) {
  166304. if (forceU === void 0)
  166305. forceU = false;
  166306. if (this.current(forceU) === ch) {
  166307. this.advance(forceU);
  166308. return true;
  166309. }
  166310. return false;
  166311. };
  166312. function codePointToString$12(ch) {
  166313. if (ch <= 65535) {
  166314. return String.fromCharCode(ch);
  166315. }
  166316. ch -= 65536;
  166317. return String.fromCharCode((ch >> 10) + 55296, (ch & 1023) + 56320);
  166318. }
  166319. pp$12.validateRegExpFlags = function(state) {
  166320. var validFlags = state.validFlags;
  166321. var flags = state.flags;
  166322. for (var i2 = 0; i2 < flags.length; i2++) {
  166323. var flag = flags.charAt(i2);
  166324. if (validFlags.indexOf(flag) === -1) {
  166325. this.raise(state.start, "Invalid regular expression flag");
  166326. }
  166327. if (flags.indexOf(flag, i2 + 1) > -1) {
  166328. this.raise(state.start, "Duplicate regular expression flag");
  166329. }
  166330. }
  166331. };
  166332. pp$12.validateRegExpPattern = function(state) {
  166333. this.regexp_pattern(state);
  166334. if (!state.switchN && this.options.ecmaVersion >= 9 && state.groupNames.length > 0) {
  166335. state.switchN = true;
  166336. this.regexp_pattern(state);
  166337. }
  166338. };
  166339. pp$12.regexp_pattern = function(state) {
  166340. state.pos = 0;
  166341. state.lastIntValue = 0;
  166342. state.lastStringValue = "";
  166343. state.lastAssertionIsQuantifiable = false;
  166344. state.numCapturingParens = 0;
  166345. state.maxBackReference = 0;
  166346. state.groupNames.length = 0;
  166347. state.backReferenceNames.length = 0;
  166348. this.regexp_disjunction(state);
  166349. if (state.pos !== state.source.length) {
  166350. if (state.eat(41)) {
  166351. state.raise("Unmatched ')'");
  166352. }
  166353. if (state.eat(93) || state.eat(125)) {
  166354. state.raise("Lone quantifier brackets");
  166355. }
  166356. }
  166357. if (state.maxBackReference > state.numCapturingParens) {
  166358. state.raise("Invalid escape");
  166359. }
  166360. for (var i2 = 0, list4 = state.backReferenceNames; i2 < list4.length; i2 += 1) {
  166361. var name2 = list4[i2];
  166362. if (state.groupNames.indexOf(name2) === -1) {
  166363. state.raise("Invalid named capture referenced");
  166364. }
  166365. }
  166366. };
  166367. pp$12.regexp_disjunction = function(state) {
  166368. this.regexp_alternative(state);
  166369. while (state.eat(124)) {
  166370. this.regexp_alternative(state);
  166371. }
  166372. if (this.regexp_eatQuantifier(state, true)) {
  166373. state.raise("Nothing to repeat");
  166374. }
  166375. if (state.eat(123)) {
  166376. state.raise("Lone quantifier brackets");
  166377. }
  166378. };
  166379. pp$12.regexp_alternative = function(state) {
  166380. while (state.pos < state.source.length && this.regexp_eatTerm(state)) {
  166381. }
  166382. };
  166383. pp$12.regexp_eatTerm = function(state) {
  166384. if (this.regexp_eatAssertion(state)) {
  166385. if (state.lastAssertionIsQuantifiable && this.regexp_eatQuantifier(state)) {
  166386. if (state.switchU) {
  166387. state.raise("Invalid quantifier");
  166388. }
  166389. }
  166390. return true;
  166391. }
  166392. if (state.switchU ? this.regexp_eatAtom(state) : this.regexp_eatExtendedAtom(state)) {
  166393. this.regexp_eatQuantifier(state);
  166394. return true;
  166395. }
  166396. return false;
  166397. };
  166398. pp$12.regexp_eatAssertion = function(state) {
  166399. var start3 = state.pos;
  166400. state.lastAssertionIsQuantifiable = false;
  166401. if (state.eat(94) || state.eat(36)) {
  166402. return true;
  166403. }
  166404. if (state.eat(92)) {
  166405. if (state.eat(66) || state.eat(98)) {
  166406. return true;
  166407. }
  166408. state.pos = start3;
  166409. }
  166410. if (state.eat(40) && state.eat(63)) {
  166411. var lookbehind = false;
  166412. if (this.options.ecmaVersion >= 9) {
  166413. lookbehind = state.eat(60);
  166414. }
  166415. if (state.eat(61) || state.eat(33)) {
  166416. this.regexp_disjunction(state);
  166417. if (!state.eat(41)) {
  166418. state.raise("Unterminated group");
  166419. }
  166420. state.lastAssertionIsQuantifiable = !lookbehind;
  166421. return true;
  166422. }
  166423. }
  166424. state.pos = start3;
  166425. return false;
  166426. };
  166427. pp$12.regexp_eatQuantifier = function(state, noError) {
  166428. if (noError === void 0)
  166429. noError = false;
  166430. if (this.regexp_eatQuantifierPrefix(state, noError)) {
  166431. state.eat(63);
  166432. return true;
  166433. }
  166434. return false;
  166435. };
  166436. pp$12.regexp_eatQuantifierPrefix = function(state, noError) {
  166437. return state.eat(42) || state.eat(43) || state.eat(63) || this.regexp_eatBracedQuantifier(state, noError);
  166438. };
  166439. pp$12.regexp_eatBracedQuantifier = function(state, noError) {
  166440. var start3 = state.pos;
  166441. if (state.eat(123)) {
  166442. var min = 0, max = -1;
  166443. if (this.regexp_eatDecimalDigits(state)) {
  166444. min = state.lastIntValue;
  166445. if (state.eat(44) && this.regexp_eatDecimalDigits(state)) {
  166446. max = state.lastIntValue;
  166447. }
  166448. if (state.eat(125)) {
  166449. if (max !== -1 && max < min && !noError) {
  166450. state.raise("numbers out of order in {} quantifier");
  166451. }
  166452. return true;
  166453. }
  166454. }
  166455. if (state.switchU && !noError) {
  166456. state.raise("Incomplete quantifier");
  166457. }
  166458. state.pos = start3;
  166459. }
  166460. return false;
  166461. };
  166462. pp$12.regexp_eatAtom = function(state) {
  166463. return this.regexp_eatPatternCharacters(state) || state.eat(46) || this.regexp_eatReverseSolidusAtomEscape(state) || this.regexp_eatCharacterClass(state) || this.regexp_eatUncapturingGroup(state) || this.regexp_eatCapturingGroup(state);
  166464. };
  166465. pp$12.regexp_eatReverseSolidusAtomEscape = function(state) {
  166466. var start3 = state.pos;
  166467. if (state.eat(92)) {
  166468. if (this.regexp_eatAtomEscape(state)) {
  166469. return true;
  166470. }
  166471. state.pos = start3;
  166472. }
  166473. return false;
  166474. };
  166475. pp$12.regexp_eatUncapturingGroup = function(state) {
  166476. var start3 = state.pos;
  166477. if (state.eat(40)) {
  166478. if (state.eat(63) && state.eat(58)) {
  166479. this.regexp_disjunction(state);
  166480. if (state.eat(41)) {
  166481. return true;
  166482. }
  166483. state.raise("Unterminated group");
  166484. }
  166485. state.pos = start3;
  166486. }
  166487. return false;
  166488. };
  166489. pp$12.regexp_eatCapturingGroup = function(state) {
  166490. if (state.eat(40)) {
  166491. if (this.options.ecmaVersion >= 9) {
  166492. this.regexp_groupSpecifier(state);
  166493. } else if (state.current() === 63) {
  166494. state.raise("Invalid group");
  166495. }
  166496. this.regexp_disjunction(state);
  166497. if (state.eat(41)) {
  166498. state.numCapturingParens += 1;
  166499. return true;
  166500. }
  166501. state.raise("Unterminated group");
  166502. }
  166503. return false;
  166504. };
  166505. pp$12.regexp_eatExtendedAtom = function(state) {
  166506. return state.eat(46) || this.regexp_eatReverseSolidusAtomEscape(state) || this.regexp_eatCharacterClass(state) || this.regexp_eatUncapturingGroup(state) || this.regexp_eatCapturingGroup(state) || this.regexp_eatInvalidBracedQuantifier(state) || this.regexp_eatExtendedPatternCharacter(state);
  166507. };
  166508. pp$12.regexp_eatInvalidBracedQuantifier = function(state) {
  166509. if (this.regexp_eatBracedQuantifier(state, true)) {
  166510. state.raise("Nothing to repeat");
  166511. }
  166512. return false;
  166513. };
  166514. pp$12.regexp_eatSyntaxCharacter = function(state) {
  166515. var ch = state.current();
  166516. if (isSyntaxCharacter2(ch)) {
  166517. state.lastIntValue = ch;
  166518. state.advance();
  166519. return true;
  166520. }
  166521. return false;
  166522. };
  166523. function isSyntaxCharacter2(ch) {
  166524. return ch === 36 || ch >= 40 && ch <= 43 || ch === 46 || ch === 63 || ch >= 91 && ch <= 94 || ch >= 123 && ch <= 125;
  166525. }
  166526. pp$12.regexp_eatPatternCharacters = function(state) {
  166527. var start3 = state.pos;
  166528. var ch = 0;
  166529. while ((ch = state.current()) !== -1 && !isSyntaxCharacter2(ch)) {
  166530. state.advance();
  166531. }
  166532. return state.pos !== start3;
  166533. };
  166534. pp$12.regexp_eatExtendedPatternCharacter = function(state) {
  166535. var ch = state.current();
  166536. if (ch !== -1 && ch !== 36 && !(ch >= 40 && ch <= 43) && ch !== 46 && ch !== 63 && ch !== 91 && ch !== 94 && ch !== 124) {
  166537. state.advance();
  166538. return true;
  166539. }
  166540. return false;
  166541. };
  166542. pp$12.regexp_groupSpecifier = function(state) {
  166543. if (state.eat(63)) {
  166544. if (this.regexp_eatGroupName(state)) {
  166545. if (state.groupNames.indexOf(state.lastStringValue) !== -1) {
  166546. state.raise("Duplicate capture group name");
  166547. }
  166548. state.groupNames.push(state.lastStringValue);
  166549. return;
  166550. }
  166551. state.raise("Invalid group");
  166552. }
  166553. };
  166554. pp$12.regexp_eatGroupName = function(state) {
  166555. state.lastStringValue = "";
  166556. if (state.eat(60)) {
  166557. if (this.regexp_eatRegExpIdentifierName(state) && state.eat(62)) {
  166558. return true;
  166559. }
  166560. state.raise("Invalid capture group name");
  166561. }
  166562. return false;
  166563. };
  166564. pp$12.regexp_eatRegExpIdentifierName = function(state) {
  166565. state.lastStringValue = "";
  166566. if (this.regexp_eatRegExpIdentifierStart(state)) {
  166567. state.lastStringValue += codePointToString$12(state.lastIntValue);
  166568. while (this.regexp_eatRegExpIdentifierPart(state)) {
  166569. state.lastStringValue += codePointToString$12(state.lastIntValue);
  166570. }
  166571. return true;
  166572. }
  166573. return false;
  166574. };
  166575. pp$12.regexp_eatRegExpIdentifierStart = function(state) {
  166576. var start3 = state.pos;
  166577. var forceU = this.options.ecmaVersion >= 11;
  166578. var ch = state.current(forceU);
  166579. state.advance(forceU);
  166580. if (ch === 92 && this.regexp_eatRegExpUnicodeEscapeSequence(state, forceU)) {
  166581. ch = state.lastIntValue;
  166582. }
  166583. if (isRegExpIdentifierStart2(ch)) {
  166584. state.lastIntValue = ch;
  166585. return true;
  166586. }
  166587. state.pos = start3;
  166588. return false;
  166589. };
  166590. function isRegExpIdentifierStart2(ch) {
  166591. return isIdentifierStart2(ch, true) || ch === 36 || ch === 95;
  166592. }
  166593. pp$12.regexp_eatRegExpIdentifierPart = function(state) {
  166594. var start3 = state.pos;
  166595. var forceU = this.options.ecmaVersion >= 11;
  166596. var ch = state.current(forceU);
  166597. state.advance(forceU);
  166598. if (ch === 92 && this.regexp_eatRegExpUnicodeEscapeSequence(state, forceU)) {
  166599. ch = state.lastIntValue;
  166600. }
  166601. if (isRegExpIdentifierPart2(ch)) {
  166602. state.lastIntValue = ch;
  166603. return true;
  166604. }
  166605. state.pos = start3;
  166606. return false;
  166607. };
  166608. function isRegExpIdentifierPart2(ch) {
  166609. return isIdentifierChar2(ch, true) || ch === 36 || ch === 95 || ch === 8204 || ch === 8205;
  166610. }
  166611. pp$12.regexp_eatAtomEscape = function(state) {
  166612. if (this.regexp_eatBackReference(state) || this.regexp_eatCharacterClassEscape(state) || this.regexp_eatCharacterEscape(state) || state.switchN && this.regexp_eatKGroupName(state)) {
  166613. return true;
  166614. }
  166615. if (state.switchU) {
  166616. if (state.current() === 99) {
  166617. state.raise("Invalid unicode escape");
  166618. }
  166619. state.raise("Invalid escape");
  166620. }
  166621. return false;
  166622. };
  166623. pp$12.regexp_eatBackReference = function(state) {
  166624. var start3 = state.pos;
  166625. if (this.regexp_eatDecimalEscape(state)) {
  166626. var n = state.lastIntValue;
  166627. if (state.switchU) {
  166628. if (n > state.maxBackReference) {
  166629. state.maxBackReference = n;
  166630. }
  166631. return true;
  166632. }
  166633. if (n <= state.numCapturingParens) {
  166634. return true;
  166635. }
  166636. state.pos = start3;
  166637. }
  166638. return false;
  166639. };
  166640. pp$12.regexp_eatKGroupName = function(state) {
  166641. if (state.eat(107)) {
  166642. if (this.regexp_eatGroupName(state)) {
  166643. state.backReferenceNames.push(state.lastStringValue);
  166644. return true;
  166645. }
  166646. state.raise("Invalid named reference");
  166647. }
  166648. return false;
  166649. };
  166650. pp$12.regexp_eatCharacterEscape = function(state) {
  166651. return this.regexp_eatControlEscape(state) || this.regexp_eatCControlLetter(state) || this.regexp_eatZero(state) || this.regexp_eatHexEscapeSequence(state) || this.regexp_eatRegExpUnicodeEscapeSequence(state, false) || !state.switchU && this.regexp_eatLegacyOctalEscapeSequence(state) || this.regexp_eatIdentityEscape(state);
  166652. };
  166653. pp$12.regexp_eatCControlLetter = function(state) {
  166654. var start3 = state.pos;
  166655. if (state.eat(99)) {
  166656. if (this.regexp_eatControlLetter(state)) {
  166657. return true;
  166658. }
  166659. state.pos = start3;
  166660. }
  166661. return false;
  166662. };
  166663. pp$12.regexp_eatZero = function(state) {
  166664. if (state.current() === 48 && !isDecimalDigit2(state.lookahead())) {
  166665. state.lastIntValue = 0;
  166666. state.advance();
  166667. return true;
  166668. }
  166669. return false;
  166670. };
  166671. pp$12.regexp_eatControlEscape = function(state) {
  166672. var ch = state.current();
  166673. if (ch === 116) {
  166674. state.lastIntValue = 9;
  166675. state.advance();
  166676. return true;
  166677. }
  166678. if (ch === 110) {
  166679. state.lastIntValue = 10;
  166680. state.advance();
  166681. return true;
  166682. }
  166683. if (ch === 118) {
  166684. state.lastIntValue = 11;
  166685. state.advance();
  166686. return true;
  166687. }
  166688. if (ch === 102) {
  166689. state.lastIntValue = 12;
  166690. state.advance();
  166691. return true;
  166692. }
  166693. if (ch === 114) {
  166694. state.lastIntValue = 13;
  166695. state.advance();
  166696. return true;
  166697. }
  166698. return false;
  166699. };
  166700. pp$12.regexp_eatControlLetter = function(state) {
  166701. var ch = state.current();
  166702. if (isControlLetter2(ch)) {
  166703. state.lastIntValue = ch % 32;
  166704. state.advance();
  166705. return true;
  166706. }
  166707. return false;
  166708. };
  166709. function isControlLetter2(ch) {
  166710. return ch >= 65 && ch <= 90 || ch >= 97 && ch <= 122;
  166711. }
  166712. pp$12.regexp_eatRegExpUnicodeEscapeSequence = function(state, forceU) {
  166713. if (forceU === void 0)
  166714. forceU = false;
  166715. var start3 = state.pos;
  166716. var switchU = forceU || state.switchU;
  166717. if (state.eat(117)) {
  166718. if (this.regexp_eatFixedHexDigits(state, 4)) {
  166719. var lead = state.lastIntValue;
  166720. if (switchU && lead >= 55296 && lead <= 56319) {
  166721. var leadSurrogateEnd = state.pos;
  166722. if (state.eat(92) && state.eat(117) && this.regexp_eatFixedHexDigits(state, 4)) {
  166723. var trail = state.lastIntValue;
  166724. if (trail >= 56320 && trail <= 57343) {
  166725. state.lastIntValue = (lead - 55296) * 1024 + (trail - 56320) + 65536;
  166726. return true;
  166727. }
  166728. }
  166729. state.pos = leadSurrogateEnd;
  166730. state.lastIntValue = lead;
  166731. }
  166732. return true;
  166733. }
  166734. if (switchU && state.eat(123) && this.regexp_eatHexDigits(state) && state.eat(125) && isValidUnicode2(state.lastIntValue)) {
  166735. return true;
  166736. }
  166737. if (switchU) {
  166738. state.raise("Invalid unicode escape");
  166739. }
  166740. state.pos = start3;
  166741. }
  166742. return false;
  166743. };
  166744. function isValidUnicode2(ch) {
  166745. return ch >= 0 && ch <= 1114111;
  166746. }
  166747. pp$12.regexp_eatIdentityEscape = function(state) {
  166748. if (state.switchU) {
  166749. if (this.regexp_eatSyntaxCharacter(state)) {
  166750. return true;
  166751. }
  166752. if (state.eat(47)) {
  166753. state.lastIntValue = 47;
  166754. return true;
  166755. }
  166756. return false;
  166757. }
  166758. var ch = state.current();
  166759. if (ch !== 99 && (!state.switchN || ch !== 107)) {
  166760. state.lastIntValue = ch;
  166761. state.advance();
  166762. return true;
  166763. }
  166764. return false;
  166765. };
  166766. pp$12.regexp_eatDecimalEscape = function(state) {
  166767. state.lastIntValue = 0;
  166768. var ch = state.current();
  166769. if (ch >= 49 && ch <= 57) {
  166770. do {
  166771. state.lastIntValue = 10 * state.lastIntValue + (ch - 48);
  166772. state.advance();
  166773. } while ((ch = state.current()) >= 48 && ch <= 57);
  166774. return true;
  166775. }
  166776. return false;
  166777. };
  166778. pp$12.regexp_eatCharacterClassEscape = function(state) {
  166779. var ch = state.current();
  166780. if (isCharacterClassEscape2(ch)) {
  166781. state.lastIntValue = -1;
  166782. state.advance();
  166783. return true;
  166784. }
  166785. if (state.switchU && this.options.ecmaVersion >= 9 && (ch === 80 || ch === 112)) {
  166786. state.lastIntValue = -1;
  166787. state.advance();
  166788. if (state.eat(123) && this.regexp_eatUnicodePropertyValueExpression(state) && state.eat(125)) {
  166789. return true;
  166790. }
  166791. state.raise("Invalid property name");
  166792. }
  166793. return false;
  166794. };
  166795. function isCharacterClassEscape2(ch) {
  166796. return ch === 100 || ch === 68 || ch === 115 || ch === 83 || ch === 119 || ch === 87;
  166797. }
  166798. pp$12.regexp_eatUnicodePropertyValueExpression = function(state) {
  166799. var start3 = state.pos;
  166800. if (this.regexp_eatUnicodePropertyName(state) && state.eat(61)) {
  166801. var name2 = state.lastStringValue;
  166802. if (this.regexp_eatUnicodePropertyValue(state)) {
  166803. var value = state.lastStringValue;
  166804. this.regexp_validateUnicodePropertyNameAndValue(state, name2, value);
  166805. return true;
  166806. }
  166807. }
  166808. state.pos = start3;
  166809. if (this.regexp_eatLoneUnicodePropertyNameOrValue(state)) {
  166810. var nameOrValue = state.lastStringValue;
  166811. this.regexp_validateUnicodePropertyNameOrValue(state, nameOrValue);
  166812. return true;
  166813. }
  166814. return false;
  166815. };
  166816. pp$12.regexp_validateUnicodePropertyNameAndValue = function(state, name2, value) {
  166817. if (!hasOwn2(state.unicodeProperties.nonBinary, name2)) {
  166818. state.raise("Invalid property name");
  166819. }
  166820. if (!state.unicodeProperties.nonBinary[name2].test(value)) {
  166821. state.raise("Invalid property value");
  166822. }
  166823. };
  166824. pp$12.regexp_validateUnicodePropertyNameOrValue = function(state, nameOrValue) {
  166825. if (!state.unicodeProperties.binary.test(nameOrValue)) {
  166826. state.raise("Invalid property name");
  166827. }
  166828. };
  166829. pp$12.regexp_eatUnicodePropertyName = function(state) {
  166830. var ch = 0;
  166831. state.lastStringValue = "";
  166832. while (isUnicodePropertyNameCharacter2(ch = state.current())) {
  166833. state.lastStringValue += codePointToString$12(ch);
  166834. state.advance();
  166835. }
  166836. return state.lastStringValue !== "";
  166837. };
  166838. function isUnicodePropertyNameCharacter2(ch) {
  166839. return isControlLetter2(ch) || ch === 95;
  166840. }
  166841. pp$12.regexp_eatUnicodePropertyValue = function(state) {
  166842. var ch = 0;
  166843. state.lastStringValue = "";
  166844. while (isUnicodePropertyValueCharacter2(ch = state.current())) {
  166845. state.lastStringValue += codePointToString$12(ch);
  166846. state.advance();
  166847. }
  166848. return state.lastStringValue !== "";
  166849. };
  166850. function isUnicodePropertyValueCharacter2(ch) {
  166851. return isUnicodePropertyNameCharacter2(ch) || isDecimalDigit2(ch);
  166852. }
  166853. pp$12.regexp_eatLoneUnicodePropertyNameOrValue = function(state) {
  166854. return this.regexp_eatUnicodePropertyValue(state);
  166855. };
  166856. pp$12.regexp_eatCharacterClass = function(state) {
  166857. if (state.eat(91)) {
  166858. state.eat(94);
  166859. this.regexp_classRanges(state);
  166860. if (state.eat(93)) {
  166861. return true;
  166862. }
  166863. state.raise("Unterminated character class");
  166864. }
  166865. return false;
  166866. };
  166867. pp$12.regexp_classRanges = function(state) {
  166868. while (this.regexp_eatClassAtom(state)) {
  166869. var left = state.lastIntValue;
  166870. if (state.eat(45) && this.regexp_eatClassAtom(state)) {
  166871. var right = state.lastIntValue;
  166872. if (state.switchU && (left === -1 || right === -1)) {
  166873. state.raise("Invalid character class");
  166874. }
  166875. if (left !== -1 && right !== -1 && left > right) {
  166876. state.raise("Range out of order in character class");
  166877. }
  166878. }
  166879. }
  166880. };
  166881. pp$12.regexp_eatClassAtom = function(state) {
  166882. var start3 = state.pos;
  166883. if (state.eat(92)) {
  166884. if (this.regexp_eatClassEscape(state)) {
  166885. return true;
  166886. }
  166887. if (state.switchU) {
  166888. var ch$1 = state.current();
  166889. if (ch$1 === 99 || isOctalDigit2(ch$1)) {
  166890. state.raise("Invalid class escape");
  166891. }
  166892. state.raise("Invalid escape");
  166893. }
  166894. state.pos = start3;
  166895. }
  166896. var ch = state.current();
  166897. if (ch !== 93) {
  166898. state.lastIntValue = ch;
  166899. state.advance();
  166900. return true;
  166901. }
  166902. return false;
  166903. };
  166904. pp$12.regexp_eatClassEscape = function(state) {
  166905. var start3 = state.pos;
  166906. if (state.eat(98)) {
  166907. state.lastIntValue = 8;
  166908. return true;
  166909. }
  166910. if (state.switchU && state.eat(45)) {
  166911. state.lastIntValue = 45;
  166912. return true;
  166913. }
  166914. if (!state.switchU && state.eat(99)) {
  166915. if (this.regexp_eatClassControlLetter(state)) {
  166916. return true;
  166917. }
  166918. state.pos = start3;
  166919. }
  166920. return this.regexp_eatCharacterClassEscape(state) || this.regexp_eatCharacterEscape(state);
  166921. };
  166922. pp$12.regexp_eatClassControlLetter = function(state) {
  166923. var ch = state.current();
  166924. if (isDecimalDigit2(ch) || ch === 95) {
  166925. state.lastIntValue = ch % 32;
  166926. state.advance();
  166927. return true;
  166928. }
  166929. return false;
  166930. };
  166931. pp$12.regexp_eatHexEscapeSequence = function(state) {
  166932. var start3 = state.pos;
  166933. if (state.eat(120)) {
  166934. if (this.regexp_eatFixedHexDigits(state, 2)) {
  166935. return true;
  166936. }
  166937. if (state.switchU) {
  166938. state.raise("Invalid escape");
  166939. }
  166940. state.pos = start3;
  166941. }
  166942. return false;
  166943. };
  166944. pp$12.regexp_eatDecimalDigits = function(state) {
  166945. var start3 = state.pos;
  166946. var ch = 0;
  166947. state.lastIntValue = 0;
  166948. while (isDecimalDigit2(ch = state.current())) {
  166949. state.lastIntValue = 10 * state.lastIntValue + (ch - 48);
  166950. state.advance();
  166951. }
  166952. return state.pos !== start3;
  166953. };
  166954. function isDecimalDigit2(ch) {
  166955. return ch >= 48 && ch <= 57;
  166956. }
  166957. pp$12.regexp_eatHexDigits = function(state) {
  166958. var start3 = state.pos;
  166959. var ch = 0;
  166960. state.lastIntValue = 0;
  166961. while (isHexDigit2(ch = state.current())) {
  166962. state.lastIntValue = 16 * state.lastIntValue + hexToInt2(ch);
  166963. state.advance();
  166964. }
  166965. return state.pos !== start3;
  166966. };
  166967. function isHexDigit2(ch) {
  166968. return ch >= 48 && ch <= 57 || ch >= 65 && ch <= 70 || ch >= 97 && ch <= 102;
  166969. }
  166970. function hexToInt2(ch) {
  166971. if (ch >= 65 && ch <= 70) {
  166972. return 10 + (ch - 65);
  166973. }
  166974. if (ch >= 97 && ch <= 102) {
  166975. return 10 + (ch - 97);
  166976. }
  166977. return ch - 48;
  166978. }
  166979. pp$12.regexp_eatLegacyOctalEscapeSequence = function(state) {
  166980. if (this.regexp_eatOctalDigit(state)) {
  166981. var n1 = state.lastIntValue;
  166982. if (this.regexp_eatOctalDigit(state)) {
  166983. var n2 = state.lastIntValue;
  166984. if (n1 <= 3 && this.regexp_eatOctalDigit(state)) {
  166985. state.lastIntValue = n1 * 64 + n2 * 8 + state.lastIntValue;
  166986. } else {
  166987. state.lastIntValue = n1 * 8 + n2;
  166988. }
  166989. } else {
  166990. state.lastIntValue = n1;
  166991. }
  166992. return true;
  166993. }
  166994. return false;
  166995. };
  166996. pp$12.regexp_eatOctalDigit = function(state) {
  166997. var ch = state.current();
  166998. if (isOctalDigit2(ch)) {
  166999. state.lastIntValue = ch - 48;
  167000. state.advance();
  167001. return true;
  167002. }
  167003. state.lastIntValue = 0;
  167004. return false;
  167005. };
  167006. function isOctalDigit2(ch) {
  167007. return ch >= 48 && ch <= 55;
  167008. }
  167009. pp$12.regexp_eatFixedHexDigits = function(state, length) {
  167010. var start3 = state.pos;
  167011. state.lastIntValue = 0;
  167012. for (var i2 = 0; i2 < length; ++i2) {
  167013. var ch = state.current();
  167014. if (!isHexDigit2(ch)) {
  167015. state.pos = start3;
  167016. return false;
  167017. }
  167018. state.lastIntValue = 16 * state.lastIntValue + hexToInt2(ch);
  167019. state.advance();
  167020. }
  167021. return true;
  167022. };
  167023. var Token3 = function Token4(p) {
  167024. this.type = p.type;
  167025. this.value = p.value;
  167026. this.start = p.start;
  167027. this.end = p.end;
  167028. if (p.options.locations) {
  167029. this.loc = new SourceLocation3(p, p.startLoc, p.endLoc);
  167030. }
  167031. if (p.options.ranges) {
  167032. this.range = [p.start, p.end];
  167033. }
  167034. };
  167035. var pp2 = Parser3.prototype;
  167036. pp2.next = function(ignoreEscapeSequenceInKeyword) {
  167037. if (!ignoreEscapeSequenceInKeyword && this.type.keyword && this.containsEsc) {
  167038. this.raiseRecoverable(this.start, "Escape sequence in keyword " + this.type.keyword);
  167039. }
  167040. if (this.options.onToken) {
  167041. this.options.onToken(new Token3(this));
  167042. }
  167043. this.lastTokEnd = this.end;
  167044. this.lastTokStart = this.start;
  167045. this.lastTokEndLoc = this.endLoc;
  167046. this.lastTokStartLoc = this.startLoc;
  167047. this.nextToken();
  167048. };
  167049. pp2.getToken = function() {
  167050. this.next();
  167051. return new Token3(this);
  167052. };
  167053. if (typeof Symbol !== "undefined") {
  167054. pp2[Symbol.iterator] = function() {
  167055. var this$1$1 = this;
  167056. return {
  167057. next: function() {
  167058. var token = this$1$1.getToken();
  167059. return {
  167060. done: token.type === types$12.eof,
  167061. value: token
  167062. };
  167063. }
  167064. };
  167065. };
  167066. }
  167067. pp2.nextToken = function() {
  167068. var curContext = this.curContext();
  167069. if (!curContext || !curContext.preserveSpace) {
  167070. this.skipSpace();
  167071. }
  167072. this.start = this.pos;
  167073. if (this.options.locations) {
  167074. this.startLoc = this.curPosition();
  167075. }
  167076. if (this.pos >= this.input.length) {
  167077. return this.finishToken(types$12.eof);
  167078. }
  167079. if (curContext.override) {
  167080. return curContext.override(this);
  167081. } else {
  167082. this.readToken(this.fullCharCodeAtPos());
  167083. }
  167084. };
  167085. pp2.readToken = function(code2) {
  167086. if (isIdentifierStart2(code2, this.options.ecmaVersion >= 6) || code2 === 92) {
  167087. return this.readWord();
  167088. }
  167089. return this.getTokenFromCode(code2);
  167090. };
  167091. pp2.fullCharCodeAtPos = function() {
  167092. var code2 = this.input.charCodeAt(this.pos);
  167093. if (code2 <= 55295 || code2 >= 56320) {
  167094. return code2;
  167095. }
  167096. var next = this.input.charCodeAt(this.pos + 1);
  167097. return next <= 56319 || next >= 57344 ? code2 : (code2 << 10) + next - 56613888;
  167098. };
  167099. pp2.skipBlockComment = function() {
  167100. var startLoc = this.options.onComment && this.curPosition();
  167101. var start3 = this.pos, end = this.input.indexOf("*/", this.pos += 2);
  167102. if (end === -1) {
  167103. this.raise(this.pos - 2, "Unterminated comment");
  167104. }
  167105. this.pos = end + 2;
  167106. if (this.options.locations) {
  167107. for (var nextBreak = void 0, pos = start3; (nextBreak = nextLineBreak2(this.input, pos, this.pos)) > -1; ) {
  167108. ++this.curLine;
  167109. pos = this.lineStart = nextBreak;
  167110. }
  167111. }
  167112. if (this.options.onComment) {
  167113. this.options.onComment(
  167114. true,
  167115. this.input.slice(start3 + 2, end),
  167116. start3,
  167117. this.pos,
  167118. startLoc,
  167119. this.curPosition()
  167120. );
  167121. }
  167122. };
  167123. pp2.skipLineComment = function(startSkip) {
  167124. var start3 = this.pos;
  167125. var startLoc = this.options.onComment && this.curPosition();
  167126. var ch = this.input.charCodeAt(this.pos += startSkip);
  167127. while (this.pos < this.input.length && !isNewLine2(ch)) {
  167128. ch = this.input.charCodeAt(++this.pos);
  167129. }
  167130. if (this.options.onComment) {
  167131. this.options.onComment(
  167132. false,
  167133. this.input.slice(start3 + startSkip, this.pos),
  167134. start3,
  167135. this.pos,
  167136. startLoc,
  167137. this.curPosition()
  167138. );
  167139. }
  167140. };
  167141. pp2.skipSpace = function() {
  167142. loop:
  167143. while (this.pos < this.input.length) {
  167144. var ch = this.input.charCodeAt(this.pos);
  167145. switch (ch) {
  167146. case 32:
  167147. case 160:
  167148. ++this.pos;
  167149. break;
  167150. case 13:
  167151. if (this.input.charCodeAt(this.pos + 1) === 10) {
  167152. ++this.pos;
  167153. }
  167154. case 10:
  167155. case 8232:
  167156. case 8233:
  167157. ++this.pos;
  167158. if (this.options.locations) {
  167159. ++this.curLine;
  167160. this.lineStart = this.pos;
  167161. }
  167162. break;
  167163. case 47:
  167164. switch (this.input.charCodeAt(this.pos + 1)) {
  167165. case 42:
  167166. this.skipBlockComment();
  167167. break;
  167168. case 47:
  167169. this.skipLineComment(2);
  167170. break;
  167171. default:
  167172. break loop;
  167173. }
  167174. break;
  167175. default:
  167176. if (ch > 8 && ch < 14 || ch >= 5760 && nonASCIIwhitespace2.test(String.fromCharCode(ch))) {
  167177. ++this.pos;
  167178. } else {
  167179. break loop;
  167180. }
  167181. }
  167182. }
  167183. };
  167184. pp2.finishToken = function(type, val) {
  167185. this.end = this.pos;
  167186. if (this.options.locations) {
  167187. this.endLoc = this.curPosition();
  167188. }
  167189. var prevType = this.type;
  167190. this.type = type;
  167191. this.value = val;
  167192. this.updateContext(prevType);
  167193. };
  167194. pp2.readToken_dot = function() {
  167195. var next = this.input.charCodeAt(this.pos + 1);
  167196. if (next >= 48 && next <= 57) {
  167197. return this.readNumber(true);
  167198. }
  167199. var next2 = this.input.charCodeAt(this.pos + 2);
  167200. if (this.options.ecmaVersion >= 6 && next === 46 && next2 === 46) {
  167201. this.pos += 3;
  167202. return this.finishToken(types$12.ellipsis);
  167203. } else {
  167204. ++this.pos;
  167205. return this.finishToken(types$12.dot);
  167206. }
  167207. };
  167208. pp2.readToken_slash = function() {
  167209. var next = this.input.charCodeAt(this.pos + 1);
  167210. if (this.exprAllowed) {
  167211. ++this.pos;
  167212. return this.readRegexp();
  167213. }
  167214. if (next === 61) {
  167215. return this.finishOp(types$12.assign, 2);
  167216. }
  167217. return this.finishOp(types$12.slash, 1);
  167218. };
  167219. pp2.readToken_mult_modulo_exp = function(code2) {
  167220. var next = this.input.charCodeAt(this.pos + 1);
  167221. var size = 1;
  167222. var tokentype = code2 === 42 ? types$12.star : types$12.modulo;
  167223. if (this.options.ecmaVersion >= 7 && code2 === 42 && next === 42) {
  167224. ++size;
  167225. tokentype = types$12.starstar;
  167226. next = this.input.charCodeAt(this.pos + 2);
  167227. }
  167228. if (next === 61) {
  167229. return this.finishOp(types$12.assign, size + 1);
  167230. }
  167231. return this.finishOp(tokentype, size);
  167232. };
  167233. pp2.readToken_pipe_amp = function(code2) {
  167234. var next = this.input.charCodeAt(this.pos + 1);
  167235. if (next === code2) {
  167236. if (this.options.ecmaVersion >= 12) {
  167237. var next2 = this.input.charCodeAt(this.pos + 2);
  167238. if (next2 === 61) {
  167239. return this.finishOp(types$12.assign, 3);
  167240. }
  167241. }
  167242. return this.finishOp(code2 === 124 ? types$12.logicalOR : types$12.logicalAND, 2);
  167243. }
  167244. if (next === 61) {
  167245. return this.finishOp(types$12.assign, 2);
  167246. }
  167247. return this.finishOp(code2 === 124 ? types$12.bitwiseOR : types$12.bitwiseAND, 1);
  167248. };
  167249. pp2.readToken_caret = function() {
  167250. var next = this.input.charCodeAt(this.pos + 1);
  167251. if (next === 61) {
  167252. return this.finishOp(types$12.assign, 2);
  167253. }
  167254. return this.finishOp(types$12.bitwiseXOR, 1);
  167255. };
  167256. pp2.readToken_plus_min = function(code2) {
  167257. var next = this.input.charCodeAt(this.pos + 1);
  167258. if (next === code2) {
  167259. if (next === 45 && !this.inModule && this.input.charCodeAt(this.pos + 2) === 62 && (this.lastTokEnd === 0 || lineBreak2.test(this.input.slice(this.lastTokEnd, this.pos)))) {
  167260. this.skipLineComment(3);
  167261. this.skipSpace();
  167262. return this.nextToken();
  167263. }
  167264. return this.finishOp(types$12.incDec, 2);
  167265. }
  167266. if (next === 61) {
  167267. return this.finishOp(types$12.assign, 2);
  167268. }
  167269. return this.finishOp(types$12.plusMin, 1);
  167270. };
  167271. pp2.readToken_lt_gt = function(code2) {
  167272. var next = this.input.charCodeAt(this.pos + 1);
  167273. var size = 1;
  167274. if (next === code2) {
  167275. size = code2 === 62 && this.input.charCodeAt(this.pos + 2) === 62 ? 3 : 2;
  167276. if (this.input.charCodeAt(this.pos + size) === 61) {
  167277. return this.finishOp(types$12.assign, size + 1);
  167278. }
  167279. return this.finishOp(types$12.bitShift, size);
  167280. }
  167281. if (next === 33 && code2 === 60 && !this.inModule && this.input.charCodeAt(this.pos + 2) === 45 && this.input.charCodeAt(this.pos + 3) === 45) {
  167282. this.skipLineComment(4);
  167283. this.skipSpace();
  167284. return this.nextToken();
  167285. }
  167286. if (next === 61) {
  167287. size = 2;
  167288. }
  167289. return this.finishOp(types$12.relational, size);
  167290. };
  167291. pp2.readToken_eq_excl = function(code2) {
  167292. var next = this.input.charCodeAt(this.pos + 1);
  167293. if (next === 61) {
  167294. return this.finishOp(types$12.equality, this.input.charCodeAt(this.pos + 2) === 61 ? 3 : 2);
  167295. }
  167296. if (code2 === 61 && next === 62 && this.options.ecmaVersion >= 6) {
  167297. this.pos += 2;
  167298. return this.finishToken(types$12.arrow);
  167299. }
  167300. return this.finishOp(code2 === 61 ? types$12.eq : types$12.prefix, 1);
  167301. };
  167302. pp2.readToken_question = function() {
  167303. var ecmaVersion2 = this.options.ecmaVersion;
  167304. if (ecmaVersion2 >= 11) {
  167305. var next = this.input.charCodeAt(this.pos + 1);
  167306. if (next === 46) {
  167307. var next2 = this.input.charCodeAt(this.pos + 2);
  167308. if (next2 < 48 || next2 > 57) {
  167309. return this.finishOp(types$12.questionDot, 2);
  167310. }
  167311. }
  167312. if (next === 63) {
  167313. if (ecmaVersion2 >= 12) {
  167314. var next2$1 = this.input.charCodeAt(this.pos + 2);
  167315. if (next2$1 === 61) {
  167316. return this.finishOp(types$12.assign, 3);
  167317. }
  167318. }
  167319. return this.finishOp(types$12.coalesce, 2);
  167320. }
  167321. }
  167322. return this.finishOp(types$12.question, 1);
  167323. };
  167324. pp2.readToken_numberSign = function() {
  167325. var ecmaVersion2 = this.options.ecmaVersion;
  167326. var code2 = 35;
  167327. if (ecmaVersion2 >= 13) {
  167328. ++this.pos;
  167329. code2 = this.fullCharCodeAtPos();
  167330. if (isIdentifierStart2(code2, true) || code2 === 92) {
  167331. return this.finishToken(types$12.privateId, this.readWord1());
  167332. }
  167333. }
  167334. this.raise(this.pos, "Unexpected character '" + codePointToString2(code2) + "'");
  167335. };
  167336. pp2.getTokenFromCode = function(code2) {
  167337. switch (code2) {
  167338. case 46:
  167339. return this.readToken_dot();
  167340. case 40:
  167341. ++this.pos;
  167342. return this.finishToken(types$12.parenL);
  167343. case 41:
  167344. ++this.pos;
  167345. return this.finishToken(types$12.parenR);
  167346. case 59:
  167347. ++this.pos;
  167348. return this.finishToken(types$12.semi);
  167349. case 44:
  167350. ++this.pos;
  167351. return this.finishToken(types$12.comma);
  167352. case 91:
  167353. ++this.pos;
  167354. return this.finishToken(types$12.bracketL);
  167355. case 93:
  167356. ++this.pos;
  167357. return this.finishToken(types$12.bracketR);
  167358. case 123:
  167359. ++this.pos;
  167360. return this.finishToken(types$12.braceL);
  167361. case 125:
  167362. ++this.pos;
  167363. return this.finishToken(types$12.braceR);
  167364. case 58:
  167365. ++this.pos;
  167366. return this.finishToken(types$12.colon);
  167367. case 96:
  167368. if (this.options.ecmaVersion < 6) {
  167369. break;
  167370. }
  167371. ++this.pos;
  167372. return this.finishToken(types$12.backQuote);
  167373. case 48:
  167374. var next = this.input.charCodeAt(this.pos + 1);
  167375. if (next === 120 || next === 88) {
  167376. return this.readRadixNumber(16);
  167377. }
  167378. if (this.options.ecmaVersion >= 6) {
  167379. if (next === 111 || next === 79) {
  167380. return this.readRadixNumber(8);
  167381. }
  167382. if (next === 98 || next === 66) {
  167383. return this.readRadixNumber(2);
  167384. }
  167385. }
  167386. case 49:
  167387. case 50:
  167388. case 51:
  167389. case 52:
  167390. case 53:
  167391. case 54:
  167392. case 55:
  167393. case 56:
  167394. case 57:
  167395. return this.readNumber(false);
  167396. case 34:
  167397. case 39:
  167398. return this.readString(code2);
  167399. case 47:
  167400. return this.readToken_slash();
  167401. case 37:
  167402. case 42:
  167403. return this.readToken_mult_modulo_exp(code2);
  167404. case 124:
  167405. case 38:
  167406. return this.readToken_pipe_amp(code2);
  167407. case 94:
  167408. return this.readToken_caret();
  167409. case 43:
  167410. case 45:
  167411. return this.readToken_plus_min(code2);
  167412. case 60:
  167413. case 62:
  167414. return this.readToken_lt_gt(code2);
  167415. case 61:
  167416. case 33:
  167417. return this.readToken_eq_excl(code2);
  167418. case 63:
  167419. return this.readToken_question();
  167420. case 126:
  167421. return this.finishOp(types$12.prefix, 1);
  167422. case 35:
  167423. return this.readToken_numberSign();
  167424. }
  167425. this.raise(this.pos, "Unexpected character '" + codePointToString2(code2) + "'");
  167426. };
  167427. pp2.finishOp = function(type, size) {
  167428. var str = this.input.slice(this.pos, this.pos + size);
  167429. this.pos += size;
  167430. return this.finishToken(type, str);
  167431. };
  167432. pp2.readRegexp = function() {
  167433. var escaped, inClass, start3 = this.pos;
  167434. for (; ; ) {
  167435. if (this.pos >= this.input.length) {
  167436. this.raise(start3, "Unterminated regular expression");
  167437. }
  167438. var ch = this.input.charAt(this.pos);
  167439. if (lineBreak2.test(ch)) {
  167440. this.raise(start3, "Unterminated regular expression");
  167441. }
  167442. if (!escaped) {
  167443. if (ch === "[") {
  167444. inClass = true;
  167445. } else if (ch === "]" && inClass) {
  167446. inClass = false;
  167447. } else if (ch === "/" && !inClass) {
  167448. break;
  167449. }
  167450. escaped = ch === "\\";
  167451. } else {
  167452. escaped = false;
  167453. }
  167454. ++this.pos;
  167455. }
  167456. var pattern = this.input.slice(start3, this.pos);
  167457. ++this.pos;
  167458. var flagsStart = this.pos;
  167459. var flags = this.readWord1();
  167460. if (this.containsEsc) {
  167461. this.unexpected(flagsStart);
  167462. }
  167463. var state = this.regexpState || (this.regexpState = new RegExpValidationState3(this));
  167464. state.reset(start3, pattern, flags);
  167465. this.validateRegExpFlags(state);
  167466. this.validateRegExpPattern(state);
  167467. var value = null;
  167468. try {
  167469. value = new RegExp(pattern, flags);
  167470. } catch (e) {
  167471. }
  167472. return this.finishToken(types$12.regexp, { pattern, flags, value });
  167473. };
  167474. pp2.readInt = function(radix, len, maybeLegacyOctalNumericLiteral) {
  167475. var allowSeparators = this.options.ecmaVersion >= 12 && len === void 0;
  167476. var isLegacyOctalNumericLiteral = maybeLegacyOctalNumericLiteral && this.input.charCodeAt(this.pos) === 48;
  167477. var start3 = this.pos, total = 0, lastCode = 0;
  167478. for (var i2 = 0, e = len == null ? Infinity : len; i2 < e; ++i2, ++this.pos) {
  167479. var code2 = this.input.charCodeAt(this.pos), val = void 0;
  167480. if (allowSeparators && code2 === 95) {
  167481. if (isLegacyOctalNumericLiteral) {
  167482. this.raiseRecoverable(this.pos, "Numeric separator is not allowed in legacy octal numeric literals");
  167483. }
  167484. if (lastCode === 95) {
  167485. this.raiseRecoverable(this.pos, "Numeric separator must be exactly one underscore");
  167486. }
  167487. if (i2 === 0) {
  167488. this.raiseRecoverable(this.pos, "Numeric separator is not allowed at the first of digits");
  167489. }
  167490. lastCode = code2;
  167491. continue;
  167492. }
  167493. if (code2 >= 97) {
  167494. val = code2 - 97 + 10;
  167495. } else if (code2 >= 65) {
  167496. val = code2 - 65 + 10;
  167497. } else if (code2 >= 48 && code2 <= 57) {
  167498. val = code2 - 48;
  167499. } else {
  167500. val = Infinity;
  167501. }
  167502. if (val >= radix) {
  167503. break;
  167504. }
  167505. lastCode = code2;
  167506. total = total * radix + val;
  167507. }
  167508. if (allowSeparators && lastCode === 95) {
  167509. this.raiseRecoverable(this.pos - 1, "Numeric separator is not allowed at the last of digits");
  167510. }
  167511. if (this.pos === start3 || len != null && this.pos - start3 !== len) {
  167512. return null;
  167513. }
  167514. return total;
  167515. };
  167516. function stringToNumber2(str, isLegacyOctalNumericLiteral) {
  167517. if (isLegacyOctalNumericLiteral) {
  167518. return parseInt(str, 8);
  167519. }
  167520. return parseFloat(str.replace(/_/g, ""));
  167521. }
  167522. function stringToBigInt2(str) {
  167523. if (typeof BigInt !== "function") {
  167524. return null;
  167525. }
  167526. return BigInt(str.replace(/_/g, ""));
  167527. }
  167528. pp2.readRadixNumber = function(radix) {
  167529. var start3 = this.pos;
  167530. this.pos += 2;
  167531. var val = this.readInt(radix);
  167532. if (val == null) {
  167533. this.raise(this.start + 2, "Expected number in radix " + radix);
  167534. }
  167535. if (this.options.ecmaVersion >= 11 && this.input.charCodeAt(this.pos) === 110) {
  167536. val = stringToBigInt2(this.input.slice(start3, this.pos));
  167537. ++this.pos;
  167538. } else if (isIdentifierStart2(this.fullCharCodeAtPos())) {
  167539. this.raise(this.pos, "Identifier directly after number");
  167540. }
  167541. return this.finishToken(types$12.num, val);
  167542. };
  167543. pp2.readNumber = function(startsWithDot) {
  167544. var start3 = this.pos;
  167545. if (!startsWithDot && this.readInt(10, void 0, true) === null) {
  167546. this.raise(start3, "Invalid number");
  167547. }
  167548. var octal = this.pos - start3 >= 2 && this.input.charCodeAt(start3) === 48;
  167549. if (octal && this.strict) {
  167550. this.raise(start3, "Invalid number");
  167551. }
  167552. var next = this.input.charCodeAt(this.pos);
  167553. if (!octal && !startsWithDot && this.options.ecmaVersion >= 11 && next === 110) {
  167554. var val$1 = stringToBigInt2(this.input.slice(start3, this.pos));
  167555. ++this.pos;
  167556. if (isIdentifierStart2(this.fullCharCodeAtPos())) {
  167557. this.raise(this.pos, "Identifier directly after number");
  167558. }
  167559. return this.finishToken(types$12.num, val$1);
  167560. }
  167561. if (octal && /[89]/.test(this.input.slice(start3, this.pos))) {
  167562. octal = false;
  167563. }
  167564. if (next === 46 && !octal) {
  167565. ++this.pos;
  167566. this.readInt(10);
  167567. next = this.input.charCodeAt(this.pos);
  167568. }
  167569. if ((next === 69 || next === 101) && !octal) {
  167570. next = this.input.charCodeAt(++this.pos);
  167571. if (next === 43 || next === 45) {
  167572. ++this.pos;
  167573. }
  167574. if (this.readInt(10) === null) {
  167575. this.raise(start3, "Invalid number");
  167576. }
  167577. }
  167578. if (isIdentifierStart2(this.fullCharCodeAtPos())) {
  167579. this.raise(this.pos, "Identifier directly after number");
  167580. }
  167581. var val = stringToNumber2(this.input.slice(start3, this.pos), octal);
  167582. return this.finishToken(types$12.num, val);
  167583. };
  167584. pp2.readCodePoint = function() {
  167585. var ch = this.input.charCodeAt(this.pos), code2;
  167586. if (ch === 123) {
  167587. if (this.options.ecmaVersion < 6) {
  167588. this.unexpected();
  167589. }
  167590. var codePos = ++this.pos;
  167591. code2 = this.readHexChar(this.input.indexOf("}", this.pos) - this.pos);
  167592. ++this.pos;
  167593. if (code2 > 1114111) {
  167594. this.invalidStringToken(codePos, "Code point out of bounds");
  167595. }
  167596. } else {
  167597. code2 = this.readHexChar(4);
  167598. }
  167599. return code2;
  167600. };
  167601. function codePointToString2(code2) {
  167602. if (code2 <= 65535) {
  167603. return String.fromCharCode(code2);
  167604. }
  167605. code2 -= 65536;
  167606. return String.fromCharCode((code2 >> 10) + 55296, (code2 & 1023) + 56320);
  167607. }
  167608. pp2.readString = function(quote) {
  167609. var out = "", chunkStart = ++this.pos;
  167610. for (; ; ) {
  167611. if (this.pos >= this.input.length) {
  167612. this.raise(this.start, "Unterminated string constant");
  167613. }
  167614. var ch = this.input.charCodeAt(this.pos);
  167615. if (ch === quote) {
  167616. break;
  167617. }
  167618. if (ch === 92) {
  167619. out += this.input.slice(chunkStart, this.pos);
  167620. out += this.readEscapedChar(false);
  167621. chunkStart = this.pos;
  167622. } else if (ch === 8232 || ch === 8233) {
  167623. if (this.options.ecmaVersion < 10) {
  167624. this.raise(this.start, "Unterminated string constant");
  167625. }
  167626. ++this.pos;
  167627. if (this.options.locations) {
  167628. this.curLine++;
  167629. this.lineStart = this.pos;
  167630. }
  167631. } else {
  167632. if (isNewLine2(ch)) {
  167633. this.raise(this.start, "Unterminated string constant");
  167634. }
  167635. ++this.pos;
  167636. }
  167637. }
  167638. out += this.input.slice(chunkStart, this.pos++);
  167639. return this.finishToken(types$12.string, out);
  167640. };
  167641. var INVALID_TEMPLATE_ESCAPE_ERROR2 = {};
  167642. pp2.tryReadTemplateToken = function() {
  167643. this.inTemplateElement = true;
  167644. try {
  167645. this.readTmplToken();
  167646. } catch (err) {
  167647. if (err === INVALID_TEMPLATE_ESCAPE_ERROR2) {
  167648. this.readInvalidTemplateToken();
  167649. } else {
  167650. throw err;
  167651. }
  167652. }
  167653. this.inTemplateElement = false;
  167654. };
  167655. pp2.invalidStringToken = function(position3, message) {
  167656. if (this.inTemplateElement && this.options.ecmaVersion >= 9) {
  167657. throw INVALID_TEMPLATE_ESCAPE_ERROR2;
  167658. } else {
  167659. this.raise(position3, message);
  167660. }
  167661. };
  167662. pp2.readTmplToken = function() {
  167663. var out = "", chunkStart = this.pos;
  167664. for (; ; ) {
  167665. if (this.pos >= this.input.length) {
  167666. this.raise(this.start, "Unterminated template");
  167667. }
  167668. var ch = this.input.charCodeAt(this.pos);
  167669. if (ch === 96 || ch === 36 && this.input.charCodeAt(this.pos + 1) === 123) {
  167670. if (this.pos === this.start && (this.type === types$12.template || this.type === types$12.invalidTemplate)) {
  167671. if (ch === 36) {
  167672. this.pos += 2;
  167673. return this.finishToken(types$12.dollarBraceL);
  167674. } else {
  167675. ++this.pos;
  167676. return this.finishToken(types$12.backQuote);
  167677. }
  167678. }
  167679. out += this.input.slice(chunkStart, this.pos);
  167680. return this.finishToken(types$12.template, out);
  167681. }
  167682. if (ch === 92) {
  167683. out += this.input.slice(chunkStart, this.pos);
  167684. out += this.readEscapedChar(true);
  167685. chunkStart = this.pos;
  167686. } else if (isNewLine2(ch)) {
  167687. out += this.input.slice(chunkStart, this.pos);
  167688. ++this.pos;
  167689. switch (ch) {
  167690. case 13:
  167691. if (this.input.charCodeAt(this.pos) === 10) {
  167692. ++this.pos;
  167693. }
  167694. case 10:
  167695. out += "\n";
  167696. break;
  167697. default:
  167698. out += String.fromCharCode(ch);
  167699. break;
  167700. }
  167701. if (this.options.locations) {
  167702. ++this.curLine;
  167703. this.lineStart = this.pos;
  167704. }
  167705. chunkStart = this.pos;
  167706. } else {
  167707. ++this.pos;
  167708. }
  167709. }
  167710. };
  167711. pp2.readInvalidTemplateToken = function() {
  167712. for (; this.pos < this.input.length; this.pos++) {
  167713. switch (this.input[this.pos]) {
  167714. case "\\":
  167715. ++this.pos;
  167716. break;
  167717. case "$":
  167718. if (this.input[this.pos + 1] !== "{") {
  167719. break;
  167720. }
  167721. case "`":
  167722. return this.finishToken(types$12.invalidTemplate, this.input.slice(this.start, this.pos));
  167723. }
  167724. }
  167725. this.raise(this.start, "Unterminated template");
  167726. };
  167727. pp2.readEscapedChar = function(inTemplate) {
  167728. var ch = this.input.charCodeAt(++this.pos);
  167729. ++this.pos;
  167730. switch (ch) {
  167731. case 110:
  167732. return "\n";
  167733. case 114:
  167734. return "\r";
  167735. case 120:
  167736. return String.fromCharCode(this.readHexChar(2));
  167737. case 117:
  167738. return codePointToString2(this.readCodePoint());
  167739. case 116:
  167740. return " ";
  167741. case 98:
  167742. return "\b";
  167743. case 118:
  167744. return "\v";
  167745. case 102:
  167746. return "\f";
  167747. case 13:
  167748. if (this.input.charCodeAt(this.pos) === 10) {
  167749. ++this.pos;
  167750. }
  167751. case 10:
  167752. if (this.options.locations) {
  167753. this.lineStart = this.pos;
  167754. ++this.curLine;
  167755. }
  167756. return "";
  167757. case 56:
  167758. case 57:
  167759. if (this.strict) {
  167760. this.invalidStringToken(
  167761. this.pos - 1,
  167762. "Invalid escape sequence"
  167763. );
  167764. }
  167765. if (inTemplate) {
  167766. var codePos = this.pos - 1;
  167767. this.invalidStringToken(
  167768. codePos,
  167769. "Invalid escape sequence in template string"
  167770. );
  167771. return null;
  167772. }
  167773. default:
  167774. if (ch >= 48 && ch <= 55) {
  167775. var octalStr = this.input.substr(this.pos - 1, 3).match(/^[0-7]+/)[0];
  167776. var octal = parseInt(octalStr, 8);
  167777. if (octal > 255) {
  167778. octalStr = octalStr.slice(0, -1);
  167779. octal = parseInt(octalStr, 8);
  167780. }
  167781. this.pos += octalStr.length - 1;
  167782. ch = this.input.charCodeAt(this.pos);
  167783. if ((octalStr !== "0" || ch === 56 || ch === 57) && (this.strict || inTemplate)) {
  167784. this.invalidStringToken(
  167785. this.pos - 1 - octalStr.length,
  167786. inTemplate ? "Octal literal in template string" : "Octal literal in strict mode"
  167787. );
  167788. }
  167789. return String.fromCharCode(octal);
  167790. }
  167791. if (isNewLine2(ch)) {
  167792. return "";
  167793. }
  167794. return String.fromCharCode(ch);
  167795. }
  167796. };
  167797. pp2.readHexChar = function(len) {
  167798. var codePos = this.pos;
  167799. var n = this.readInt(16, len);
  167800. if (n === null) {
  167801. this.invalidStringToken(codePos, "Bad character escape sequence");
  167802. }
  167803. return n;
  167804. };
  167805. pp2.readWord1 = function() {
  167806. this.containsEsc = false;
  167807. var word = "", first = true, chunkStart = this.pos;
  167808. var astral = this.options.ecmaVersion >= 6;
  167809. while (this.pos < this.input.length) {
  167810. var ch = this.fullCharCodeAtPos();
  167811. if (isIdentifierChar2(ch, astral)) {
  167812. this.pos += ch <= 65535 ? 1 : 2;
  167813. } else if (ch === 92) {
  167814. this.containsEsc = true;
  167815. word += this.input.slice(chunkStart, this.pos);
  167816. var escStart = this.pos;
  167817. if (this.input.charCodeAt(++this.pos) !== 117) {
  167818. this.invalidStringToken(this.pos, "Expecting Unicode escape sequence \\uXXXX");
  167819. }
  167820. ++this.pos;
  167821. var esc = this.readCodePoint();
  167822. if (!(first ? isIdentifierStart2 : isIdentifierChar2)(esc, astral)) {
  167823. this.invalidStringToken(escStart, "Invalid Unicode escape");
  167824. }
  167825. word += codePointToString2(esc);
  167826. chunkStart = this.pos;
  167827. } else {
  167828. break;
  167829. }
  167830. first = false;
  167831. }
  167832. return word + this.input.slice(chunkStart, this.pos);
  167833. };
  167834. pp2.readWord = function() {
  167835. var word = this.readWord1();
  167836. var type = types$12.name;
  167837. if (this.keywords.test(word)) {
  167838. type = keywords2[word];
  167839. }
  167840. return this.finishToken(type, word);
  167841. };
  167842. var version2 = "8.7.0";
  167843. Parser3.acorn = {
  167844. Parser: Parser3,
  167845. version: version2,
  167846. defaultOptions: defaultOptions2,
  167847. Position: Position3,
  167848. SourceLocation: SourceLocation3,
  167849. getLineInfo: getLineInfo2,
  167850. Node: Node3,
  167851. TokenType: TokenType3,
  167852. tokTypes: types$12,
  167853. keywordTypes: keywords2,
  167854. TokContext: TokContext3,
  167855. tokContexts: types2,
  167856. isIdentifierChar: isIdentifierChar2,
  167857. isIdentifierStart: isIdentifierStart2,
  167858. Token: Token3,
  167859. isNewLine: isNewLine2,
  167860. lineBreak: lineBreak2,
  167861. lineBreakG: lineBreakG2,
  167862. nonASCIIwhitespace: nonASCIIwhitespace2
  167863. };
  167864. function parse4(input, options) {
  167865. return Parser3.parse(input, options);
  167866. }
  167867. function parseExpressionAt2(input, pos, options) {
  167868. return Parser3.parseExpressionAt(input, pos, options);
  167869. }
  167870. function tokenizer2(input, options) {
  167871. return Parser3.tokenizer(input, options);
  167872. }
  167873. exports2.Node = Node3;
  167874. exports2.Parser = Parser3;
  167875. exports2.Position = Position3;
  167876. exports2.SourceLocation = SourceLocation3;
  167877. exports2.TokContext = TokContext3;
  167878. exports2.Token = Token3;
  167879. exports2.TokenType = TokenType3;
  167880. exports2.defaultOptions = defaultOptions2;
  167881. exports2.getLineInfo = getLineInfo2;
  167882. exports2.isIdentifierChar = isIdentifierChar2;
  167883. exports2.isIdentifierStart = isIdentifierStart2;
  167884. exports2.isNewLine = isNewLine2;
  167885. exports2.keywordTypes = keywords2;
  167886. exports2.lineBreak = lineBreak2;
  167887. exports2.lineBreakG = lineBreakG2;
  167888. exports2.nonASCIIwhitespace = nonASCIIwhitespace2;
  167889. exports2.parse = parse4;
  167890. exports2.parseExpressionAt = parseExpressionAt2;
  167891. exports2.tokContexts = types2;
  167892. exports2.tokTypes = types$12;
  167893. exports2.tokenizer = tokenizer2;
  167894. exports2.version = version2;
  167895. Object.defineProperty(exports2, "__esModule", { value: true });
  167896. });
  167897. }
  167898. });
  167899. // node_modules/acorn-jsx/index.js
  167900. var require_acorn_jsx = __commonJS({
  167901. "node_modules/acorn-jsx/index.js"(exports, module) {
  167902. "use strict";
  167903. var XHTMLEntities = require_xhtml();
  167904. var hexNumber = /^[\da-fA-F]+$/;
  167905. var decimalNumber = /^\d+$/;
  167906. var acornJsxMap = /* @__PURE__ */ new WeakMap();
  167907. function getJsxTokens(acorn) {
  167908. acorn = acorn.Parser.acorn || acorn;
  167909. let acornJsx2 = acornJsxMap.get(acorn);
  167910. if (!acornJsx2) {
  167911. const tt = acorn.tokTypes;
  167912. const TokContext3 = acorn.TokContext;
  167913. const TokenType3 = acorn.TokenType;
  167914. const tc_oTag = new TokContext3("<tag", false);
  167915. const tc_cTag = new TokContext3("</tag", false);
  167916. const tc_expr = new TokContext3("<tag>...</tag>", true, true);
  167917. const tokContexts = {
  167918. tc_oTag,
  167919. tc_cTag,
  167920. tc_expr
  167921. };
  167922. const tokTypes = {
  167923. jsxName: new TokenType3("jsxName"),
  167924. jsxText: new TokenType3("jsxText", { beforeExpr: true }),
  167925. jsxTagStart: new TokenType3("jsxTagStart", { startsExpr: true }),
  167926. jsxTagEnd: new TokenType3("jsxTagEnd")
  167927. };
  167928. tokTypes.jsxTagStart.updateContext = function() {
  167929. this.context.push(tc_expr);
  167930. this.context.push(tc_oTag);
  167931. this.exprAllowed = false;
  167932. };
  167933. tokTypes.jsxTagEnd.updateContext = function(prevType) {
  167934. let out = this.context.pop();
  167935. if (out === tc_oTag && prevType === tt.slash || out === tc_cTag) {
  167936. this.context.pop();
  167937. this.exprAllowed = this.curContext() === tc_expr;
  167938. } else {
  167939. this.exprAllowed = true;
  167940. }
  167941. };
  167942. acornJsx2 = { tokContexts, tokTypes };
  167943. acornJsxMap.set(acorn, acornJsx2);
  167944. }
  167945. return acornJsx2;
  167946. }
  167947. function getQualifiedJSXName(object) {
  167948. if (!object)
  167949. return object;
  167950. if (object.type === "JSXIdentifier")
  167951. return object.name;
  167952. if (object.type === "JSXNamespacedName")
  167953. return object.namespace.name + ":" + object.name.name;
  167954. if (object.type === "JSXMemberExpression")
  167955. return getQualifiedJSXName(object.object) + "." + getQualifiedJSXName(object.property);
  167956. }
  167957. module.exports = function(options) {
  167958. options = options || {};
  167959. return function(Parser3) {
  167960. return plugin2({
  167961. allowNamespaces: options.allowNamespaces !== false,
  167962. allowNamespacedObjects: !!options.allowNamespacedObjects
  167963. }, Parser3);
  167964. };
  167965. };
  167966. Object.defineProperty(module.exports, "tokTypes", {
  167967. get: function get_tokTypes() {
  167968. return getJsxTokens(require_acorn()).tokTypes;
  167969. },
  167970. configurable: true,
  167971. enumerable: true
  167972. });
  167973. function plugin2(options, Parser3) {
  167974. const acorn = Parser3.acorn || require_acorn();
  167975. const acornJsx2 = getJsxTokens(acorn);
  167976. const tt = acorn.tokTypes;
  167977. const tok = acornJsx2.tokTypes;
  167978. const tokContexts = acorn.tokContexts;
  167979. const tc_oTag = acornJsx2.tokContexts.tc_oTag;
  167980. const tc_cTag = acornJsx2.tokContexts.tc_cTag;
  167981. const tc_expr = acornJsx2.tokContexts.tc_expr;
  167982. const isNewLine2 = acorn.isNewLine;
  167983. const isIdentifierStart2 = acorn.isIdentifierStart;
  167984. const isIdentifierChar2 = acorn.isIdentifierChar;
  167985. return class extends Parser3 {
  167986. static get acornJsx() {
  167987. return acornJsx2;
  167988. }
  167989. jsx_readToken() {
  167990. let out = "", chunkStart = this.pos;
  167991. for (; ; ) {
  167992. if (this.pos >= this.input.length)
  167993. this.raise(this.start, "Unterminated JSX contents");
  167994. let ch = this.input.charCodeAt(this.pos);
  167995. switch (ch) {
  167996. case 60:
  167997. case 123:
  167998. if (this.pos === this.start) {
  167999. if (ch === 60 && this.exprAllowed) {
  168000. ++this.pos;
  168001. return this.finishToken(tok.jsxTagStart);
  168002. }
  168003. return this.getTokenFromCode(ch);
  168004. }
  168005. out += this.input.slice(chunkStart, this.pos);
  168006. return this.finishToken(tok.jsxText, out);
  168007. case 38:
  168008. out += this.input.slice(chunkStart, this.pos);
  168009. out += this.jsx_readEntity();
  168010. chunkStart = this.pos;
  168011. break;
  168012. case 62:
  168013. case 125:
  168014. this.raise(
  168015. this.pos,
  168016. "Unexpected token `" + this.input[this.pos] + "`. Did you mean `" + (ch === 62 ? "&gt;" : "&rbrace;") + '` or `{"' + this.input[this.pos] + '"}`?'
  168017. );
  168018. default:
  168019. if (isNewLine2(ch)) {
  168020. out += this.input.slice(chunkStart, this.pos);
  168021. out += this.jsx_readNewLine(true);
  168022. chunkStart = this.pos;
  168023. } else {
  168024. ++this.pos;
  168025. }
  168026. }
  168027. }
  168028. }
  168029. jsx_readNewLine(normalizeCRLF) {
  168030. let ch = this.input.charCodeAt(this.pos);
  168031. let out;
  168032. ++this.pos;
  168033. if (ch === 13 && this.input.charCodeAt(this.pos) === 10) {
  168034. ++this.pos;
  168035. out = normalizeCRLF ? "\n" : "\r\n";
  168036. } else {
  168037. out = String.fromCharCode(ch);
  168038. }
  168039. if (this.options.locations) {
  168040. ++this.curLine;
  168041. this.lineStart = this.pos;
  168042. }
  168043. return out;
  168044. }
  168045. jsx_readString(quote) {
  168046. let out = "", chunkStart = ++this.pos;
  168047. for (; ; ) {
  168048. if (this.pos >= this.input.length)
  168049. this.raise(this.start, "Unterminated string constant");
  168050. let ch = this.input.charCodeAt(this.pos);
  168051. if (ch === quote)
  168052. break;
  168053. if (ch === 38) {
  168054. out += this.input.slice(chunkStart, this.pos);
  168055. out += this.jsx_readEntity();
  168056. chunkStart = this.pos;
  168057. } else if (isNewLine2(ch)) {
  168058. out += this.input.slice(chunkStart, this.pos);
  168059. out += this.jsx_readNewLine(false);
  168060. chunkStart = this.pos;
  168061. } else {
  168062. ++this.pos;
  168063. }
  168064. }
  168065. out += this.input.slice(chunkStart, this.pos++);
  168066. return this.finishToken(tt.string, out);
  168067. }
  168068. jsx_readEntity() {
  168069. let str = "", count = 0, entity;
  168070. let ch = this.input[this.pos];
  168071. if (ch !== "&")
  168072. this.raise(this.pos, "Entity must start with an ampersand");
  168073. let startPos = ++this.pos;
  168074. while (this.pos < this.input.length && count++ < 10) {
  168075. ch = this.input[this.pos++];
  168076. if (ch === ";") {
  168077. if (str[0] === "#") {
  168078. if (str[1] === "x") {
  168079. str = str.substr(2);
  168080. if (hexNumber.test(str))
  168081. entity = String.fromCharCode(parseInt(str, 16));
  168082. } else {
  168083. str = str.substr(1);
  168084. if (decimalNumber.test(str))
  168085. entity = String.fromCharCode(parseInt(str, 10));
  168086. }
  168087. } else {
  168088. entity = XHTMLEntities[str];
  168089. }
  168090. break;
  168091. }
  168092. str += ch;
  168093. }
  168094. if (!entity) {
  168095. this.pos = startPos;
  168096. return "&";
  168097. }
  168098. return entity;
  168099. }
  168100. jsx_readWord() {
  168101. let ch, start3 = this.pos;
  168102. do {
  168103. ch = this.input.charCodeAt(++this.pos);
  168104. } while (isIdentifierChar2(ch) || ch === 45);
  168105. return this.finishToken(tok.jsxName, this.input.slice(start3, this.pos));
  168106. }
  168107. jsx_parseIdentifier() {
  168108. let node = this.startNode();
  168109. if (this.type === tok.jsxName)
  168110. node.name = this.value;
  168111. else if (this.type.keyword)
  168112. node.name = this.type.keyword;
  168113. else
  168114. this.unexpected();
  168115. this.next();
  168116. return this.finishNode(node, "JSXIdentifier");
  168117. }
  168118. jsx_parseNamespacedName() {
  168119. let startPos = this.start, startLoc = this.startLoc;
  168120. let name2 = this.jsx_parseIdentifier();
  168121. if (!options.allowNamespaces || !this.eat(tt.colon))
  168122. return name2;
  168123. var node = this.startNodeAt(startPos, startLoc);
  168124. node.namespace = name2;
  168125. node.name = this.jsx_parseIdentifier();
  168126. return this.finishNode(node, "JSXNamespacedName");
  168127. }
  168128. jsx_parseElementName() {
  168129. if (this.type === tok.jsxTagEnd)
  168130. return "";
  168131. let startPos = this.start, startLoc = this.startLoc;
  168132. let node = this.jsx_parseNamespacedName();
  168133. if (this.type === tt.dot && node.type === "JSXNamespacedName" && !options.allowNamespacedObjects) {
  168134. this.unexpected();
  168135. }
  168136. while (this.eat(tt.dot)) {
  168137. let newNode = this.startNodeAt(startPos, startLoc);
  168138. newNode.object = node;
  168139. newNode.property = this.jsx_parseIdentifier();
  168140. node = this.finishNode(newNode, "JSXMemberExpression");
  168141. }
  168142. return node;
  168143. }
  168144. jsx_parseAttributeValue() {
  168145. switch (this.type) {
  168146. case tt.braceL:
  168147. let node = this.jsx_parseExpressionContainer();
  168148. if (node.expression.type === "JSXEmptyExpression")
  168149. this.raise(node.start, "JSX attributes must only be assigned a non-empty expression");
  168150. return node;
  168151. case tok.jsxTagStart:
  168152. case tt.string:
  168153. return this.parseExprAtom();
  168154. default:
  168155. this.raise(this.start, "JSX value should be either an expression or a quoted JSX text");
  168156. }
  168157. }
  168158. jsx_parseEmptyExpression() {
  168159. let node = this.startNodeAt(this.lastTokEnd, this.lastTokEndLoc);
  168160. return this.finishNodeAt(node, "JSXEmptyExpression", this.start, this.startLoc);
  168161. }
  168162. jsx_parseExpressionContainer() {
  168163. let node = this.startNode();
  168164. this.next();
  168165. node.expression = this.type === tt.braceR ? this.jsx_parseEmptyExpression() : this.parseExpression();
  168166. this.expect(tt.braceR);
  168167. return this.finishNode(node, "JSXExpressionContainer");
  168168. }
  168169. jsx_parseAttribute() {
  168170. let node = this.startNode();
  168171. if (this.eat(tt.braceL)) {
  168172. this.expect(tt.ellipsis);
  168173. node.argument = this.parseMaybeAssign();
  168174. this.expect(tt.braceR);
  168175. return this.finishNode(node, "JSXSpreadAttribute");
  168176. }
  168177. node.name = this.jsx_parseNamespacedName();
  168178. node.value = this.eat(tt.eq) ? this.jsx_parseAttributeValue() : null;
  168179. return this.finishNode(node, "JSXAttribute");
  168180. }
  168181. jsx_parseOpeningElementAt(startPos, startLoc) {
  168182. let node = this.startNodeAt(startPos, startLoc);
  168183. node.attributes = [];
  168184. let nodeName = this.jsx_parseElementName();
  168185. if (nodeName)
  168186. node.name = nodeName;
  168187. while (this.type !== tt.slash && this.type !== tok.jsxTagEnd)
  168188. node.attributes.push(this.jsx_parseAttribute());
  168189. node.selfClosing = this.eat(tt.slash);
  168190. this.expect(tok.jsxTagEnd);
  168191. return this.finishNode(node, nodeName ? "JSXOpeningElement" : "JSXOpeningFragment");
  168192. }
  168193. jsx_parseClosingElementAt(startPos, startLoc) {
  168194. let node = this.startNodeAt(startPos, startLoc);
  168195. let nodeName = this.jsx_parseElementName();
  168196. if (nodeName)
  168197. node.name = nodeName;
  168198. this.expect(tok.jsxTagEnd);
  168199. return this.finishNode(node, nodeName ? "JSXClosingElement" : "JSXClosingFragment");
  168200. }
  168201. jsx_parseElementAt(startPos, startLoc) {
  168202. let node = this.startNodeAt(startPos, startLoc);
  168203. let children = [];
  168204. let openingElement = this.jsx_parseOpeningElementAt(startPos, startLoc);
  168205. let closingElement = null;
  168206. if (!openingElement.selfClosing) {
  168207. contents:
  168208. for (; ; ) {
  168209. switch (this.type) {
  168210. case tok.jsxTagStart:
  168211. startPos = this.start;
  168212. startLoc = this.startLoc;
  168213. this.next();
  168214. if (this.eat(tt.slash)) {
  168215. closingElement = this.jsx_parseClosingElementAt(startPos, startLoc);
  168216. break contents;
  168217. }
  168218. children.push(this.jsx_parseElementAt(startPos, startLoc));
  168219. break;
  168220. case tok.jsxText:
  168221. children.push(this.parseExprAtom());
  168222. break;
  168223. case tt.braceL:
  168224. children.push(this.jsx_parseExpressionContainer());
  168225. break;
  168226. default:
  168227. this.unexpected();
  168228. }
  168229. }
  168230. if (getQualifiedJSXName(closingElement.name) !== getQualifiedJSXName(openingElement.name)) {
  168231. this.raise(
  168232. closingElement.start,
  168233. "Expected corresponding JSX closing tag for <" + getQualifiedJSXName(openingElement.name) + ">"
  168234. );
  168235. }
  168236. }
  168237. let fragmentOrElement = openingElement.name ? "Element" : "Fragment";
  168238. node["opening" + fragmentOrElement] = openingElement;
  168239. node["closing" + fragmentOrElement] = closingElement;
  168240. node.children = children;
  168241. if (this.type === tt.relational && this.value === "<") {
  168242. this.raise(this.start, "Adjacent JSX elements must be wrapped in an enclosing tag");
  168243. }
  168244. return this.finishNode(node, "JSX" + fragmentOrElement);
  168245. }
  168246. jsx_parseText() {
  168247. let node = this.parseLiteral(this.value);
  168248. node.type = "JSXText";
  168249. return node;
  168250. }
  168251. jsx_parseElement() {
  168252. let startPos = this.start, startLoc = this.startLoc;
  168253. this.next();
  168254. return this.jsx_parseElementAt(startPos, startLoc);
  168255. }
  168256. parseExprAtom(refShortHandDefaultPos) {
  168257. if (this.type === tok.jsxText)
  168258. return this.jsx_parseText();
  168259. else if (this.type === tok.jsxTagStart)
  168260. return this.jsx_parseElement();
  168261. else
  168262. return super.parseExprAtom(refShortHandDefaultPos);
  168263. }
  168264. readToken(code2) {
  168265. let context = this.curContext();
  168266. if (context === tc_expr)
  168267. return this.jsx_readToken();
  168268. if (context === tc_oTag || context === tc_cTag) {
  168269. if (isIdentifierStart2(code2))
  168270. return this.jsx_readWord();
  168271. if (code2 == 62) {
  168272. ++this.pos;
  168273. return this.finishToken(tok.jsxTagEnd);
  168274. }
  168275. if ((code2 === 34 || code2 === 39) && context == tc_oTag)
  168276. return this.jsx_readString(code2);
  168277. }
  168278. if (code2 === 60 && this.exprAllowed && this.input.charCodeAt(this.pos + 1) !== 33) {
  168279. ++this.pos;
  168280. return this.finishToken(tok.jsxTagStart);
  168281. }
  168282. return super.readToken(code2);
  168283. }
  168284. updateContext(prevType) {
  168285. if (this.type == tt.braceL) {
  168286. var curContext = this.curContext();
  168287. if (curContext == tc_oTag)
  168288. this.context.push(tokContexts.b_expr);
  168289. else if (curContext == tc_expr)
  168290. this.context.push(tokContexts.b_tmpl);
  168291. else
  168292. super.updateContext(prevType);
  168293. this.exprAllowed = true;
  168294. } else if (this.type === tt.slash && prevType === tok.jsxTagStart) {
  168295. this.context.length -= 2;
  168296. this.context.push(tc_cTag);
  168297. this.exprAllowed = false;
  168298. } else {
  168299. return super.updateContext(prevType);
  168300. }
  168301. }
  168302. };
  168303. }
  168304. }
  168305. });
  168306. // node_modules/mdurl/encode.js
  168307. var require_encode = __commonJS({
  168308. "node_modules/mdurl/encode.js"(exports, module) {
  168309. "use strict";
  168310. var encodeCache = {};
  168311. function getEncodeCache(exclude) {
  168312. var i, ch, cache = encodeCache[exclude];
  168313. if (cache) {
  168314. return cache;
  168315. }
  168316. cache = encodeCache[exclude] = [];
  168317. for (i = 0; i < 128; i++) {
  168318. ch = String.fromCharCode(i);
  168319. if (/^[0-9a-z]$/i.test(ch)) {
  168320. cache.push(ch);
  168321. } else {
  168322. cache.push("%" + ("0" + i.toString(16).toUpperCase()).slice(-2));
  168323. }
  168324. }
  168325. for (i = 0; i < exclude.length; i++) {
  168326. cache[exclude.charCodeAt(i)] = exclude[i];
  168327. }
  168328. return cache;
  168329. }
  168330. function encode2(string3, exclude, keepEscaped) {
  168331. var i, l, code2, nextCode, cache, result = "";
  168332. if (typeof exclude !== "string") {
  168333. keepEscaped = exclude;
  168334. exclude = encode2.defaultChars;
  168335. }
  168336. if (typeof keepEscaped === "undefined") {
  168337. keepEscaped = true;
  168338. }
  168339. cache = getEncodeCache(exclude);
  168340. for (i = 0, l = string3.length; i < l; i++) {
  168341. code2 = string3.charCodeAt(i);
  168342. if (keepEscaped && code2 === 37 && i + 2 < l) {
  168343. if (/^[0-9a-f]{2}$/i.test(string3.slice(i + 1, i + 3))) {
  168344. result += string3.slice(i, i + 3);
  168345. i += 2;
  168346. continue;
  168347. }
  168348. }
  168349. if (code2 < 128) {
  168350. result += cache[code2];
  168351. continue;
  168352. }
  168353. if (code2 >= 55296 && code2 <= 57343) {
  168354. if (code2 >= 55296 && code2 <= 56319 && i + 1 < l) {
  168355. nextCode = string3.charCodeAt(i + 1);
  168356. if (nextCode >= 56320 && nextCode <= 57343) {
  168357. result += encodeURIComponent(string3[i] + string3[i + 1]);
  168358. i++;
  168359. continue;
  168360. }
  168361. }
  168362. result += "%EF%BF%BD";
  168363. continue;
  168364. }
  168365. result += encodeURIComponent(string3[i]);
  168366. }
  168367. return result;
  168368. }
  168369. encode2.defaultChars = ";/?:@&=+$,-_.!~*'()#";
  168370. encode2.componentChars = "-_.!~*'()";
  168371. module.exports = encode2;
  168372. }
  168373. });
  168374. // node_modules/inline-style-parser/index.js
  168375. var require_inline_style_parser = __commonJS({
  168376. "node_modules/inline-style-parser/index.js"(exports, module) {
  168377. var COMMENT_REGEX = /\/\*[^*]*\*+([^/*][^*]*\*+)*\//g;
  168378. var NEWLINE_REGEX = /\n/g;
  168379. var WHITESPACE_REGEX = /^\s*/;
  168380. var PROPERTY_REGEX = /^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/;
  168381. var COLON_REGEX = /^:\s*/;
  168382. var VALUE_REGEX = /^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/;
  168383. var SEMICOLON_REGEX = /^[;\s]*/;
  168384. var TRIM_REGEX = /^\s+|\s+$/g;
  168385. var NEWLINE = "\n";
  168386. var FORWARD_SLASH = "/";
  168387. var ASTERISK = "*";
  168388. var EMPTY_STRING = "";
  168389. var TYPE_COMMENT = "comment";
  168390. var TYPE_DECLARATION = "declaration";
  168391. module.exports = function(style2, options) {
  168392. if (typeof style2 !== "string") {
  168393. throw new TypeError("First argument must be a string");
  168394. }
  168395. if (!style2)
  168396. return [];
  168397. options = options || {};
  168398. var lineno = 1;
  168399. var column = 1;
  168400. function updatePosition(str) {
  168401. var lines = str.match(NEWLINE_REGEX);
  168402. if (lines)
  168403. lineno += lines.length;
  168404. var i = str.lastIndexOf(NEWLINE);
  168405. column = ~i ? str.length - i : column + str.length;
  168406. }
  168407. function position3() {
  168408. var start3 = { line: lineno, column };
  168409. return function(node) {
  168410. node.position = new Position3(start3);
  168411. whitespace2();
  168412. return node;
  168413. };
  168414. }
  168415. function Position3(start3) {
  168416. this.start = start3;
  168417. this.end = { line: lineno, column };
  168418. this.source = options.source;
  168419. }
  168420. Position3.prototype.content = style2;
  168421. var errorsList = [];
  168422. function error(msg) {
  168423. var err = new Error(
  168424. options.source + ":" + lineno + ":" + column + ": " + msg
  168425. );
  168426. err.reason = msg;
  168427. err.filename = options.source;
  168428. err.line = lineno;
  168429. err.column = column;
  168430. err.source = style2;
  168431. if (options.silent) {
  168432. errorsList.push(err);
  168433. } else {
  168434. throw err;
  168435. }
  168436. }
  168437. function match(re) {
  168438. var m = re.exec(style2);
  168439. if (!m)
  168440. return;
  168441. var str = m[0];
  168442. updatePosition(str);
  168443. style2 = style2.slice(str.length);
  168444. return m;
  168445. }
  168446. function whitespace2() {
  168447. match(WHITESPACE_REGEX);
  168448. }
  168449. function comments(rules) {
  168450. var c;
  168451. rules = rules || [];
  168452. while (c = comment2()) {
  168453. if (c !== false) {
  168454. rules.push(c);
  168455. }
  168456. }
  168457. return rules;
  168458. }
  168459. function comment2() {
  168460. var pos = position3();
  168461. if (FORWARD_SLASH != style2.charAt(0) || ASTERISK != style2.charAt(1))
  168462. return;
  168463. var i = 2;
  168464. while (EMPTY_STRING != style2.charAt(i) && (ASTERISK != style2.charAt(i) || FORWARD_SLASH != style2.charAt(i + 1))) {
  168465. ++i;
  168466. }
  168467. i += 2;
  168468. if (EMPTY_STRING === style2.charAt(i - 1)) {
  168469. return error("End of comment missing");
  168470. }
  168471. var str = style2.slice(2, i - 2);
  168472. column += 2;
  168473. updatePosition(str);
  168474. style2 = style2.slice(i);
  168475. column += 2;
  168476. return pos({
  168477. type: TYPE_COMMENT,
  168478. comment: str
  168479. });
  168480. }
  168481. function declaration() {
  168482. var pos = position3();
  168483. var prop = match(PROPERTY_REGEX);
  168484. if (!prop)
  168485. return;
  168486. comment2();
  168487. if (!match(COLON_REGEX))
  168488. return error("property missing ':'");
  168489. var val = match(VALUE_REGEX);
  168490. var ret = pos({
  168491. type: TYPE_DECLARATION,
  168492. property: trim(prop[0].replace(COMMENT_REGEX, EMPTY_STRING)),
  168493. value: val ? trim(val[0].replace(COMMENT_REGEX, EMPTY_STRING)) : EMPTY_STRING
  168494. });
  168495. match(SEMICOLON_REGEX);
  168496. return ret;
  168497. }
  168498. function declarations() {
  168499. var decls = [];
  168500. comments(decls);
  168501. var decl;
  168502. while (decl = declaration()) {
  168503. if (decl !== false) {
  168504. decls.push(decl);
  168505. comments(decls);
  168506. }
  168507. }
  168508. return decls;
  168509. }
  168510. whitespace2();
  168511. return declarations();
  168512. };
  168513. function trim(str) {
  168514. return str ? str.replace(TRIM_REGEX, EMPTY_STRING) : EMPTY_STRING;
  168515. }
  168516. }
  168517. });
  168518. // node_modules/style-to-object/index.js
  168519. var require_style_to_object = __commonJS({
  168520. "node_modules/style-to-object/index.js"(exports, module) {
  168521. var parse4 = require_inline_style_parser();
  168522. function StyleToObject(style2, iterator) {
  168523. var output = null;
  168524. if (!style2 || typeof style2 !== "string") {
  168525. return output;
  168526. }
  168527. var declaration;
  168528. var declarations = parse4(style2);
  168529. var hasIterator = typeof iterator === "function";
  168530. var property;
  168531. var value;
  168532. for (var i = 0, len = declarations.length; i < len; i++) {
  168533. declaration = declarations[i];
  168534. property = declaration.property;
  168535. value = declaration.value;
  168536. if (hasIterator) {
  168537. iterator(property, value, declaration);
  168538. } else if (value) {
  168539. output || (output = {});
  168540. output[property] = value;
  168541. }
  168542. }
  168543. return output;
  168544. }
  168545. module.exports = StyleToObject;
  168546. }
  168547. });
  168548. // node_modules/markdown-extensions/markdown-extensions.json
  168549. var require_markdown_extensions = __commonJS({
  168550. "node_modules/markdown-extensions/markdown-extensions.json"(exports, module) {
  168551. module.exports = [
  168552. "md",
  168553. "markdown",
  168554. "mdown",
  168555. "mkdn",
  168556. "mkd",
  168557. "mdwn",
  168558. "mkdown",
  168559. "ron"
  168560. ];
  168561. }
  168562. });
  168563. // node_modules/markdown-extensions/index.js
  168564. var require_markdown_extensions2 = __commonJS({
  168565. "node_modules/markdown-extensions/index.js"(exports, module) {
  168566. "use strict";
  168567. module.exports = require_markdown_extensions();
  168568. }
  168569. });
  168570. // node_modules/lodash/_listCacheClear.js
  168571. var require_listCacheClear = __commonJS({
  168572. "node_modules/lodash/_listCacheClear.js"(exports, module) {
  168573. function listCacheClear() {
  168574. this.__data__ = [];
  168575. this.size = 0;
  168576. }
  168577. module.exports = listCacheClear;
  168578. }
  168579. });
  168580. // node_modules/lodash/eq.js
  168581. var require_eq = __commonJS({
  168582. "node_modules/lodash/eq.js"(exports, module) {
  168583. function eq(value, other) {
  168584. return value === other || value !== value && other !== other;
  168585. }
  168586. module.exports = eq;
  168587. }
  168588. });
  168589. // node_modules/lodash/_assocIndexOf.js
  168590. var require_assocIndexOf = __commonJS({
  168591. "node_modules/lodash/_assocIndexOf.js"(exports, module) {
  168592. var eq = require_eq();
  168593. function assocIndexOf(array, key) {
  168594. var length = array.length;
  168595. while (length--) {
  168596. if (eq(array[length][0], key)) {
  168597. return length;
  168598. }
  168599. }
  168600. return -1;
  168601. }
  168602. module.exports = assocIndexOf;
  168603. }
  168604. });
  168605. // node_modules/lodash/_listCacheDelete.js
  168606. var require_listCacheDelete = __commonJS({
  168607. "node_modules/lodash/_listCacheDelete.js"(exports, module) {
  168608. var assocIndexOf = require_assocIndexOf();
  168609. var arrayProto = Array.prototype;
  168610. var splice2 = arrayProto.splice;
  168611. function listCacheDelete(key) {
  168612. var data2 = this.__data__, index2 = assocIndexOf(data2, key);
  168613. if (index2 < 0) {
  168614. return false;
  168615. }
  168616. var lastIndex = data2.length - 1;
  168617. if (index2 == lastIndex) {
  168618. data2.pop();
  168619. } else {
  168620. splice2.call(data2, index2, 1);
  168621. }
  168622. --this.size;
  168623. return true;
  168624. }
  168625. module.exports = listCacheDelete;
  168626. }
  168627. });
  168628. // node_modules/lodash/_listCacheGet.js
  168629. var require_listCacheGet = __commonJS({
  168630. "node_modules/lodash/_listCacheGet.js"(exports, module) {
  168631. var assocIndexOf = require_assocIndexOf();
  168632. function listCacheGet(key) {
  168633. var data2 = this.__data__, index2 = assocIndexOf(data2, key);
  168634. return index2 < 0 ? void 0 : data2[index2][1];
  168635. }
  168636. module.exports = listCacheGet;
  168637. }
  168638. });
  168639. // node_modules/lodash/_listCacheHas.js
  168640. var require_listCacheHas = __commonJS({
  168641. "node_modules/lodash/_listCacheHas.js"(exports, module) {
  168642. var assocIndexOf = require_assocIndexOf();
  168643. function listCacheHas(key) {
  168644. return assocIndexOf(this.__data__, key) > -1;
  168645. }
  168646. module.exports = listCacheHas;
  168647. }
  168648. });
  168649. // node_modules/lodash/_listCacheSet.js
  168650. var require_listCacheSet = __commonJS({
  168651. "node_modules/lodash/_listCacheSet.js"(exports, module) {
  168652. var assocIndexOf = require_assocIndexOf();
  168653. function listCacheSet(key, value) {
  168654. var data2 = this.__data__, index2 = assocIndexOf(data2, key);
  168655. if (index2 < 0) {
  168656. ++this.size;
  168657. data2.push([key, value]);
  168658. } else {
  168659. data2[index2][1] = value;
  168660. }
  168661. return this;
  168662. }
  168663. module.exports = listCacheSet;
  168664. }
  168665. });
  168666. // node_modules/lodash/_ListCache.js
  168667. var require_ListCache = __commonJS({
  168668. "node_modules/lodash/_ListCache.js"(exports, module) {
  168669. var listCacheClear = require_listCacheClear();
  168670. var listCacheDelete = require_listCacheDelete();
  168671. var listCacheGet = require_listCacheGet();
  168672. var listCacheHas = require_listCacheHas();
  168673. var listCacheSet = require_listCacheSet();
  168674. function ListCache(entries) {
  168675. var index2 = -1, length = entries == null ? 0 : entries.length;
  168676. this.clear();
  168677. while (++index2 < length) {
  168678. var entry = entries[index2];
  168679. this.set(entry[0], entry[1]);
  168680. }
  168681. }
  168682. ListCache.prototype.clear = listCacheClear;
  168683. ListCache.prototype["delete"] = listCacheDelete;
  168684. ListCache.prototype.get = listCacheGet;
  168685. ListCache.prototype.has = listCacheHas;
  168686. ListCache.prototype.set = listCacheSet;
  168687. module.exports = ListCache;
  168688. }
  168689. });
  168690. // node_modules/lodash/_stackClear.js
  168691. var require_stackClear = __commonJS({
  168692. "node_modules/lodash/_stackClear.js"(exports, module) {
  168693. var ListCache = require_ListCache();
  168694. function stackClear() {
  168695. this.__data__ = new ListCache();
  168696. this.size = 0;
  168697. }
  168698. module.exports = stackClear;
  168699. }
  168700. });
  168701. // node_modules/lodash/_stackDelete.js
  168702. var require_stackDelete = __commonJS({
  168703. "node_modules/lodash/_stackDelete.js"(exports, module) {
  168704. function stackDelete(key) {
  168705. var data2 = this.__data__, result = data2["delete"](key);
  168706. this.size = data2.size;
  168707. return result;
  168708. }
  168709. module.exports = stackDelete;
  168710. }
  168711. });
  168712. // node_modules/lodash/_stackGet.js
  168713. var require_stackGet = __commonJS({
  168714. "node_modules/lodash/_stackGet.js"(exports, module) {
  168715. function stackGet(key) {
  168716. return this.__data__.get(key);
  168717. }
  168718. module.exports = stackGet;
  168719. }
  168720. });
  168721. // node_modules/lodash/_stackHas.js
  168722. var require_stackHas = __commonJS({
  168723. "node_modules/lodash/_stackHas.js"(exports, module) {
  168724. function stackHas(key) {
  168725. return this.__data__.has(key);
  168726. }
  168727. module.exports = stackHas;
  168728. }
  168729. });
  168730. // node_modules/lodash/_freeGlobal.js
  168731. var require_freeGlobal = __commonJS({
  168732. "node_modules/lodash/_freeGlobal.js"(exports, module) {
  168733. var freeGlobal = typeof global == "object" && global && global.Object === Object && global;
  168734. module.exports = freeGlobal;
  168735. }
  168736. });
  168737. // node_modules/lodash/_root.js
  168738. var require_root = __commonJS({
  168739. "node_modules/lodash/_root.js"(exports, module) {
  168740. var freeGlobal = require_freeGlobal();
  168741. var freeSelf = typeof self == "object" && self && self.Object === Object && self;
  168742. var root3 = freeGlobal || freeSelf || Function("return this")();
  168743. module.exports = root3;
  168744. }
  168745. });
  168746. // node_modules/lodash/_Symbol.js
  168747. var require_Symbol = __commonJS({
  168748. "node_modules/lodash/_Symbol.js"(exports, module) {
  168749. var root3 = require_root();
  168750. var Symbol2 = root3.Symbol;
  168751. module.exports = Symbol2;
  168752. }
  168753. });
  168754. // node_modules/lodash/_getRawTag.js
  168755. var require_getRawTag = __commonJS({
  168756. "node_modules/lodash/_getRawTag.js"(exports, module) {
  168757. var Symbol2 = require_Symbol();
  168758. var objectProto = Object.prototype;
  168759. var hasOwnProperty3 = objectProto.hasOwnProperty;
  168760. var nativeObjectToString = objectProto.toString;
  168761. var symToStringTag = Symbol2 ? Symbol2.toStringTag : void 0;
  168762. function getRawTag(value) {
  168763. var isOwn = hasOwnProperty3.call(value, symToStringTag), tag = value[symToStringTag];
  168764. try {
  168765. value[symToStringTag] = void 0;
  168766. var unmasked = true;
  168767. } catch (e) {
  168768. }
  168769. var result = nativeObjectToString.call(value);
  168770. if (unmasked) {
  168771. if (isOwn) {
  168772. value[symToStringTag] = tag;
  168773. } else {
  168774. delete value[symToStringTag];
  168775. }
  168776. }
  168777. return result;
  168778. }
  168779. module.exports = getRawTag;
  168780. }
  168781. });
  168782. // node_modules/lodash/_objectToString.js
  168783. var require_objectToString = __commonJS({
  168784. "node_modules/lodash/_objectToString.js"(exports, module) {
  168785. var objectProto = Object.prototype;
  168786. var nativeObjectToString = objectProto.toString;
  168787. function objectToString(value) {
  168788. return nativeObjectToString.call(value);
  168789. }
  168790. module.exports = objectToString;
  168791. }
  168792. });
  168793. // node_modules/lodash/_baseGetTag.js
  168794. var require_baseGetTag = __commonJS({
  168795. "node_modules/lodash/_baseGetTag.js"(exports, module) {
  168796. var Symbol2 = require_Symbol();
  168797. var getRawTag = require_getRawTag();
  168798. var objectToString = require_objectToString();
  168799. var nullTag = "[object Null]";
  168800. var undefinedTag = "[object Undefined]";
  168801. var symToStringTag = Symbol2 ? Symbol2.toStringTag : void 0;
  168802. function baseGetTag(value) {
  168803. if (value == null) {
  168804. return value === void 0 ? undefinedTag : nullTag;
  168805. }
  168806. return symToStringTag && symToStringTag in Object(value) ? getRawTag(value) : objectToString(value);
  168807. }
  168808. module.exports = baseGetTag;
  168809. }
  168810. });
  168811. // node_modules/lodash/isObject.js
  168812. var require_isObject = __commonJS({
  168813. "node_modules/lodash/isObject.js"(exports, module) {
  168814. function isObject(value) {
  168815. var type = typeof value;
  168816. return value != null && (type == "object" || type == "function");
  168817. }
  168818. module.exports = isObject;
  168819. }
  168820. });
  168821. // node_modules/lodash/isFunction.js
  168822. var require_isFunction = __commonJS({
  168823. "node_modules/lodash/isFunction.js"(exports, module) {
  168824. var baseGetTag = require_baseGetTag();
  168825. var isObject = require_isObject();
  168826. var asyncTag = "[object AsyncFunction]";
  168827. var funcTag = "[object Function]";
  168828. var genTag = "[object GeneratorFunction]";
  168829. var proxyTag = "[object Proxy]";
  168830. function isFunction(value) {
  168831. if (!isObject(value)) {
  168832. return false;
  168833. }
  168834. var tag = baseGetTag(value);
  168835. return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;
  168836. }
  168837. module.exports = isFunction;
  168838. }
  168839. });
  168840. // node_modules/lodash/_coreJsData.js
  168841. var require_coreJsData = __commonJS({
  168842. "node_modules/lodash/_coreJsData.js"(exports, module) {
  168843. var root3 = require_root();
  168844. var coreJsData = root3["__core-js_shared__"];
  168845. module.exports = coreJsData;
  168846. }
  168847. });
  168848. // node_modules/lodash/_isMasked.js
  168849. var require_isMasked = __commonJS({
  168850. "node_modules/lodash/_isMasked.js"(exports, module) {
  168851. var coreJsData = require_coreJsData();
  168852. var maskSrcKey = function() {
  168853. var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || "");
  168854. return uid ? "Symbol(src)_1." + uid : "";
  168855. }();
  168856. function isMasked(func) {
  168857. return !!maskSrcKey && maskSrcKey in func;
  168858. }
  168859. module.exports = isMasked;
  168860. }
  168861. });
  168862. // node_modules/lodash/_toSource.js
  168863. var require_toSource = __commonJS({
  168864. "node_modules/lodash/_toSource.js"(exports, module) {
  168865. var funcProto = Function.prototype;
  168866. var funcToString = funcProto.toString;
  168867. function toSource(func) {
  168868. if (func != null) {
  168869. try {
  168870. return funcToString.call(func);
  168871. } catch (e) {
  168872. }
  168873. try {
  168874. return func + "";
  168875. } catch (e) {
  168876. }
  168877. }
  168878. return "";
  168879. }
  168880. module.exports = toSource;
  168881. }
  168882. });
  168883. // node_modules/lodash/_baseIsNative.js
  168884. var require_baseIsNative = __commonJS({
  168885. "node_modules/lodash/_baseIsNative.js"(exports, module) {
  168886. var isFunction = require_isFunction();
  168887. var isMasked = require_isMasked();
  168888. var isObject = require_isObject();
  168889. var toSource = require_toSource();
  168890. var reRegExpChar = /[\\^$.*+?()[\]{}|]/g;
  168891. var reIsHostCtor = /^\[object .+?Constructor\]$/;
  168892. var funcProto = Function.prototype;
  168893. var objectProto = Object.prototype;
  168894. var funcToString = funcProto.toString;
  168895. var hasOwnProperty3 = objectProto.hasOwnProperty;
  168896. var reIsNative = RegExp(
  168897. "^" + funcToString.call(hasOwnProperty3).replace(reRegExpChar, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
  168898. );
  168899. function baseIsNative(value) {
  168900. if (!isObject(value) || isMasked(value)) {
  168901. return false;
  168902. }
  168903. var pattern = isFunction(value) ? reIsNative : reIsHostCtor;
  168904. return pattern.test(toSource(value));
  168905. }
  168906. module.exports = baseIsNative;
  168907. }
  168908. });
  168909. // node_modules/lodash/_getValue.js
  168910. var require_getValue = __commonJS({
  168911. "node_modules/lodash/_getValue.js"(exports, module) {
  168912. function getValue(object, key) {
  168913. return object == null ? void 0 : object[key];
  168914. }
  168915. module.exports = getValue;
  168916. }
  168917. });
  168918. // node_modules/lodash/_getNative.js
  168919. var require_getNative = __commonJS({
  168920. "node_modules/lodash/_getNative.js"(exports, module) {
  168921. var baseIsNative = require_baseIsNative();
  168922. var getValue = require_getValue();
  168923. function getNative(object, key) {
  168924. var value = getValue(object, key);
  168925. return baseIsNative(value) ? value : void 0;
  168926. }
  168927. module.exports = getNative;
  168928. }
  168929. });
  168930. // node_modules/lodash/_Map.js
  168931. var require_Map = __commonJS({
  168932. "node_modules/lodash/_Map.js"(exports, module) {
  168933. var getNative = require_getNative();
  168934. var root3 = require_root();
  168935. var Map2 = getNative(root3, "Map");
  168936. module.exports = Map2;
  168937. }
  168938. });
  168939. // node_modules/lodash/_nativeCreate.js
  168940. var require_nativeCreate = __commonJS({
  168941. "node_modules/lodash/_nativeCreate.js"(exports, module) {
  168942. var getNative = require_getNative();
  168943. var nativeCreate = getNative(Object, "create");
  168944. module.exports = nativeCreate;
  168945. }
  168946. });
  168947. // node_modules/lodash/_hashClear.js
  168948. var require_hashClear = __commonJS({
  168949. "node_modules/lodash/_hashClear.js"(exports, module) {
  168950. var nativeCreate = require_nativeCreate();
  168951. function hashClear() {
  168952. this.__data__ = nativeCreate ? nativeCreate(null) : {};
  168953. this.size = 0;
  168954. }
  168955. module.exports = hashClear;
  168956. }
  168957. });
  168958. // node_modules/lodash/_hashDelete.js
  168959. var require_hashDelete = __commonJS({
  168960. "node_modules/lodash/_hashDelete.js"(exports, module) {
  168961. function hashDelete(key) {
  168962. var result = this.has(key) && delete this.__data__[key];
  168963. this.size -= result ? 1 : 0;
  168964. return result;
  168965. }
  168966. module.exports = hashDelete;
  168967. }
  168968. });
  168969. // node_modules/lodash/_hashGet.js
  168970. var require_hashGet = __commonJS({
  168971. "node_modules/lodash/_hashGet.js"(exports, module) {
  168972. var nativeCreate = require_nativeCreate();
  168973. var HASH_UNDEFINED = "__lodash_hash_undefined__";
  168974. var objectProto = Object.prototype;
  168975. var hasOwnProperty3 = objectProto.hasOwnProperty;
  168976. function hashGet(key) {
  168977. var data2 = this.__data__;
  168978. if (nativeCreate) {
  168979. var result = data2[key];
  168980. return result === HASH_UNDEFINED ? void 0 : result;
  168981. }
  168982. return hasOwnProperty3.call(data2, key) ? data2[key] : void 0;
  168983. }
  168984. module.exports = hashGet;
  168985. }
  168986. });
  168987. // node_modules/lodash/_hashHas.js
  168988. var require_hashHas = __commonJS({
  168989. "node_modules/lodash/_hashHas.js"(exports, module) {
  168990. var nativeCreate = require_nativeCreate();
  168991. var objectProto = Object.prototype;
  168992. var hasOwnProperty3 = objectProto.hasOwnProperty;
  168993. function hashHas(key) {
  168994. var data2 = this.__data__;
  168995. return nativeCreate ? data2[key] !== void 0 : hasOwnProperty3.call(data2, key);
  168996. }
  168997. module.exports = hashHas;
  168998. }
  168999. });
  169000. // node_modules/lodash/_hashSet.js
  169001. var require_hashSet = __commonJS({
  169002. "node_modules/lodash/_hashSet.js"(exports, module) {
  169003. var nativeCreate = require_nativeCreate();
  169004. var HASH_UNDEFINED = "__lodash_hash_undefined__";
  169005. function hashSet(key, value) {
  169006. var data2 = this.__data__;
  169007. this.size += this.has(key) ? 0 : 1;
  169008. data2[key] = nativeCreate && value === void 0 ? HASH_UNDEFINED : value;
  169009. return this;
  169010. }
  169011. module.exports = hashSet;
  169012. }
  169013. });
  169014. // node_modules/lodash/_Hash.js
  169015. var require_Hash = __commonJS({
  169016. "node_modules/lodash/_Hash.js"(exports, module) {
  169017. var hashClear = require_hashClear();
  169018. var hashDelete = require_hashDelete();
  169019. var hashGet = require_hashGet();
  169020. var hashHas = require_hashHas();
  169021. var hashSet = require_hashSet();
  169022. function Hash(entries) {
  169023. var index2 = -1, length = entries == null ? 0 : entries.length;
  169024. this.clear();
  169025. while (++index2 < length) {
  169026. var entry = entries[index2];
  169027. this.set(entry[0], entry[1]);
  169028. }
  169029. }
  169030. Hash.prototype.clear = hashClear;
  169031. Hash.prototype["delete"] = hashDelete;
  169032. Hash.prototype.get = hashGet;
  169033. Hash.prototype.has = hashHas;
  169034. Hash.prototype.set = hashSet;
  169035. module.exports = Hash;
  169036. }
  169037. });
  169038. // node_modules/lodash/_mapCacheClear.js
  169039. var require_mapCacheClear = __commonJS({
  169040. "node_modules/lodash/_mapCacheClear.js"(exports, module) {
  169041. var Hash = require_Hash();
  169042. var ListCache = require_ListCache();
  169043. var Map2 = require_Map();
  169044. function mapCacheClear() {
  169045. this.size = 0;
  169046. this.__data__ = {
  169047. "hash": new Hash(),
  169048. "map": new (Map2 || ListCache)(),
  169049. "string": new Hash()
  169050. };
  169051. }
  169052. module.exports = mapCacheClear;
  169053. }
  169054. });
  169055. // node_modules/lodash/_isKeyable.js
  169056. var require_isKeyable = __commonJS({
  169057. "node_modules/lodash/_isKeyable.js"(exports, module) {
  169058. function isKeyable(value) {
  169059. var type = typeof value;
  169060. return type == "string" || type == "number" || type == "symbol" || type == "boolean" ? value !== "__proto__" : value === null;
  169061. }
  169062. module.exports = isKeyable;
  169063. }
  169064. });
  169065. // node_modules/lodash/_getMapData.js
  169066. var require_getMapData = __commonJS({
  169067. "node_modules/lodash/_getMapData.js"(exports, module) {
  169068. var isKeyable = require_isKeyable();
  169069. function getMapData(map, key) {
  169070. var data2 = map.__data__;
  169071. return isKeyable(key) ? data2[typeof key == "string" ? "string" : "hash"] : data2.map;
  169072. }
  169073. module.exports = getMapData;
  169074. }
  169075. });
  169076. // node_modules/lodash/_mapCacheDelete.js
  169077. var require_mapCacheDelete = __commonJS({
  169078. "node_modules/lodash/_mapCacheDelete.js"(exports, module) {
  169079. var getMapData = require_getMapData();
  169080. function mapCacheDelete(key) {
  169081. var result = getMapData(this, key)["delete"](key);
  169082. this.size -= result ? 1 : 0;
  169083. return result;
  169084. }
  169085. module.exports = mapCacheDelete;
  169086. }
  169087. });
  169088. // node_modules/lodash/_mapCacheGet.js
  169089. var require_mapCacheGet = __commonJS({
  169090. "node_modules/lodash/_mapCacheGet.js"(exports, module) {
  169091. var getMapData = require_getMapData();
  169092. function mapCacheGet(key) {
  169093. return getMapData(this, key).get(key);
  169094. }
  169095. module.exports = mapCacheGet;
  169096. }
  169097. });
  169098. // node_modules/lodash/_mapCacheHas.js
  169099. var require_mapCacheHas = __commonJS({
  169100. "node_modules/lodash/_mapCacheHas.js"(exports, module) {
  169101. var getMapData = require_getMapData();
  169102. function mapCacheHas(key) {
  169103. return getMapData(this, key).has(key);
  169104. }
  169105. module.exports = mapCacheHas;
  169106. }
  169107. });
  169108. // node_modules/lodash/_mapCacheSet.js
  169109. var require_mapCacheSet = __commonJS({
  169110. "node_modules/lodash/_mapCacheSet.js"(exports, module) {
  169111. var getMapData = require_getMapData();
  169112. function mapCacheSet(key, value) {
  169113. var data2 = getMapData(this, key), size = data2.size;
  169114. data2.set(key, value);
  169115. this.size += data2.size == size ? 0 : 1;
  169116. return this;
  169117. }
  169118. module.exports = mapCacheSet;
  169119. }
  169120. });
  169121. // node_modules/lodash/_MapCache.js
  169122. var require_MapCache = __commonJS({
  169123. "node_modules/lodash/_MapCache.js"(exports, module) {
  169124. var mapCacheClear = require_mapCacheClear();
  169125. var mapCacheDelete = require_mapCacheDelete();
  169126. var mapCacheGet = require_mapCacheGet();
  169127. var mapCacheHas = require_mapCacheHas();
  169128. var mapCacheSet = require_mapCacheSet();
  169129. function MapCache(entries) {
  169130. var index2 = -1, length = entries == null ? 0 : entries.length;
  169131. this.clear();
  169132. while (++index2 < length) {
  169133. var entry = entries[index2];
  169134. this.set(entry[0], entry[1]);
  169135. }
  169136. }
  169137. MapCache.prototype.clear = mapCacheClear;
  169138. MapCache.prototype["delete"] = mapCacheDelete;
  169139. MapCache.prototype.get = mapCacheGet;
  169140. MapCache.prototype.has = mapCacheHas;
  169141. MapCache.prototype.set = mapCacheSet;
  169142. module.exports = MapCache;
  169143. }
  169144. });
  169145. // node_modules/lodash/_stackSet.js
  169146. var require_stackSet = __commonJS({
  169147. "node_modules/lodash/_stackSet.js"(exports, module) {
  169148. var ListCache = require_ListCache();
  169149. var Map2 = require_Map();
  169150. var MapCache = require_MapCache();
  169151. var LARGE_ARRAY_SIZE = 200;
  169152. function stackSet(key, value) {
  169153. var data2 = this.__data__;
  169154. if (data2 instanceof ListCache) {
  169155. var pairs = data2.__data__;
  169156. if (!Map2 || pairs.length < LARGE_ARRAY_SIZE - 1) {
  169157. pairs.push([key, value]);
  169158. this.size = ++data2.size;
  169159. return this;
  169160. }
  169161. data2 = this.__data__ = new MapCache(pairs);
  169162. }
  169163. data2.set(key, value);
  169164. this.size = data2.size;
  169165. return this;
  169166. }
  169167. module.exports = stackSet;
  169168. }
  169169. });
  169170. // node_modules/lodash/_Stack.js
  169171. var require_Stack = __commonJS({
  169172. "node_modules/lodash/_Stack.js"(exports, module) {
  169173. var ListCache = require_ListCache();
  169174. var stackClear = require_stackClear();
  169175. var stackDelete = require_stackDelete();
  169176. var stackGet = require_stackGet();
  169177. var stackHas = require_stackHas();
  169178. var stackSet = require_stackSet();
  169179. function Stack(entries) {
  169180. var data2 = this.__data__ = new ListCache(entries);
  169181. this.size = data2.size;
  169182. }
  169183. Stack.prototype.clear = stackClear;
  169184. Stack.prototype["delete"] = stackDelete;
  169185. Stack.prototype.get = stackGet;
  169186. Stack.prototype.has = stackHas;
  169187. Stack.prototype.set = stackSet;
  169188. module.exports = Stack;
  169189. }
  169190. });
  169191. // node_modules/lodash/_arrayEach.js
  169192. var require_arrayEach = __commonJS({
  169193. "node_modules/lodash/_arrayEach.js"(exports, module) {
  169194. function arrayEach(array, iteratee) {
  169195. var index2 = -1, length = array == null ? 0 : array.length;
  169196. while (++index2 < length) {
  169197. if (iteratee(array[index2], index2, array) === false) {
  169198. break;
  169199. }
  169200. }
  169201. return array;
  169202. }
  169203. module.exports = arrayEach;
  169204. }
  169205. });
  169206. // node_modules/lodash/_defineProperty.js
  169207. var require_defineProperty = __commonJS({
  169208. "node_modules/lodash/_defineProperty.js"(exports, module) {
  169209. var getNative = require_getNative();
  169210. var defineProperty = function() {
  169211. try {
  169212. var func = getNative(Object, "defineProperty");
  169213. func({}, "", {});
  169214. return func;
  169215. } catch (e) {
  169216. }
  169217. }();
  169218. module.exports = defineProperty;
  169219. }
  169220. });
  169221. // node_modules/lodash/_baseAssignValue.js
  169222. var require_baseAssignValue = __commonJS({
  169223. "node_modules/lodash/_baseAssignValue.js"(exports, module) {
  169224. var defineProperty = require_defineProperty();
  169225. function baseAssignValue(object, key, value) {
  169226. if (key == "__proto__" && defineProperty) {
  169227. defineProperty(object, key, {
  169228. "configurable": true,
  169229. "enumerable": true,
  169230. "value": value,
  169231. "writable": true
  169232. });
  169233. } else {
  169234. object[key] = value;
  169235. }
  169236. }
  169237. module.exports = baseAssignValue;
  169238. }
  169239. });
  169240. // node_modules/lodash/_assignValue.js
  169241. var require_assignValue = __commonJS({
  169242. "node_modules/lodash/_assignValue.js"(exports, module) {
  169243. var baseAssignValue = require_baseAssignValue();
  169244. var eq = require_eq();
  169245. var objectProto = Object.prototype;
  169246. var hasOwnProperty3 = objectProto.hasOwnProperty;
  169247. function assignValue(object, key, value) {
  169248. var objValue = object[key];
  169249. if (!(hasOwnProperty3.call(object, key) && eq(objValue, value)) || value === void 0 && !(key in object)) {
  169250. baseAssignValue(object, key, value);
  169251. }
  169252. }
  169253. module.exports = assignValue;
  169254. }
  169255. });
  169256. // node_modules/lodash/_copyObject.js
  169257. var require_copyObject = __commonJS({
  169258. "node_modules/lodash/_copyObject.js"(exports, module) {
  169259. var assignValue = require_assignValue();
  169260. var baseAssignValue = require_baseAssignValue();
  169261. function copyObject(source, props, object, customizer) {
  169262. var isNew = !object;
  169263. object || (object = {});
  169264. var index2 = -1, length = props.length;
  169265. while (++index2 < length) {
  169266. var key = props[index2];
  169267. var newValue = customizer ? customizer(object[key], source[key], key, object, source) : void 0;
  169268. if (newValue === void 0) {
  169269. newValue = source[key];
  169270. }
  169271. if (isNew) {
  169272. baseAssignValue(object, key, newValue);
  169273. } else {
  169274. assignValue(object, key, newValue);
  169275. }
  169276. }
  169277. return object;
  169278. }
  169279. module.exports = copyObject;
  169280. }
  169281. });
  169282. // node_modules/lodash/_baseTimes.js
  169283. var require_baseTimes = __commonJS({
  169284. "node_modules/lodash/_baseTimes.js"(exports, module) {
  169285. function baseTimes(n, iteratee) {
  169286. var index2 = -1, result = Array(n);
  169287. while (++index2 < n) {
  169288. result[index2] = iteratee(index2);
  169289. }
  169290. return result;
  169291. }
  169292. module.exports = baseTimes;
  169293. }
  169294. });
  169295. // node_modules/lodash/isObjectLike.js
  169296. var require_isObjectLike = __commonJS({
  169297. "node_modules/lodash/isObjectLike.js"(exports, module) {
  169298. function isObjectLike(value) {
  169299. return value != null && typeof value == "object";
  169300. }
  169301. module.exports = isObjectLike;
  169302. }
  169303. });
  169304. // node_modules/lodash/_baseIsArguments.js
  169305. var require_baseIsArguments = __commonJS({
  169306. "node_modules/lodash/_baseIsArguments.js"(exports, module) {
  169307. var baseGetTag = require_baseGetTag();
  169308. var isObjectLike = require_isObjectLike();
  169309. var argsTag = "[object Arguments]";
  169310. function baseIsArguments(value) {
  169311. return isObjectLike(value) && baseGetTag(value) == argsTag;
  169312. }
  169313. module.exports = baseIsArguments;
  169314. }
  169315. });
  169316. // node_modules/lodash/isArguments.js
  169317. var require_isArguments = __commonJS({
  169318. "node_modules/lodash/isArguments.js"(exports, module) {
  169319. var baseIsArguments = require_baseIsArguments();
  169320. var isObjectLike = require_isObjectLike();
  169321. var objectProto = Object.prototype;
  169322. var hasOwnProperty3 = objectProto.hasOwnProperty;
  169323. var propertyIsEnumerable = objectProto.propertyIsEnumerable;
  169324. var isArguments = baseIsArguments(function() {
  169325. return arguments;
  169326. }()) ? baseIsArguments : function(value) {
  169327. return isObjectLike(value) && hasOwnProperty3.call(value, "callee") && !propertyIsEnumerable.call(value, "callee");
  169328. };
  169329. module.exports = isArguments;
  169330. }
  169331. });
  169332. // node_modules/lodash/isArray.js
  169333. var require_isArray = __commonJS({
  169334. "node_modules/lodash/isArray.js"(exports, module) {
  169335. var isArray2 = Array.isArray;
  169336. module.exports = isArray2;
  169337. }
  169338. });
  169339. // node_modules/lodash/stubFalse.js
  169340. var require_stubFalse = __commonJS({
  169341. "node_modules/lodash/stubFalse.js"(exports, module) {
  169342. function stubFalse() {
  169343. return false;
  169344. }
  169345. module.exports = stubFalse;
  169346. }
  169347. });
  169348. // node_modules/lodash/isBuffer.js
  169349. var require_isBuffer = __commonJS({
  169350. "node_modules/lodash/isBuffer.js"(exports, module) {
  169351. var root3 = require_root();
  169352. var stubFalse = require_stubFalse();
  169353. var freeExports = typeof exports == "object" && exports && !exports.nodeType && exports;
  169354. var freeModule = freeExports && typeof module == "object" && module && !module.nodeType && module;
  169355. var moduleExports = freeModule && freeModule.exports === freeExports;
  169356. var Buffer2 = moduleExports ? root3.Buffer : void 0;
  169357. var nativeIsBuffer = Buffer2 ? Buffer2.isBuffer : void 0;
  169358. var isBuffer2 = nativeIsBuffer || stubFalse;
  169359. module.exports = isBuffer2;
  169360. }
  169361. });
  169362. // node_modules/lodash/_isIndex.js
  169363. var require_isIndex = __commonJS({
  169364. "node_modules/lodash/_isIndex.js"(exports, module) {
  169365. var MAX_SAFE_INTEGER = 9007199254740991;
  169366. var reIsUint = /^(?:0|[1-9]\d*)$/;
  169367. function isIndex(value, length) {
  169368. var type = typeof value;
  169369. length = length == null ? MAX_SAFE_INTEGER : length;
  169370. return !!length && (type == "number" || type != "symbol" && reIsUint.test(value)) && (value > -1 && value % 1 == 0 && value < length);
  169371. }
  169372. module.exports = isIndex;
  169373. }
  169374. });
  169375. // node_modules/lodash/isLength.js
  169376. var require_isLength = __commonJS({
  169377. "node_modules/lodash/isLength.js"(exports, module) {
  169378. var MAX_SAFE_INTEGER = 9007199254740991;
  169379. function isLength(value) {
  169380. return typeof value == "number" && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
  169381. }
  169382. module.exports = isLength;
  169383. }
  169384. });
  169385. // node_modules/lodash/_baseIsTypedArray.js
  169386. var require_baseIsTypedArray = __commonJS({
  169387. "node_modules/lodash/_baseIsTypedArray.js"(exports, module) {
  169388. var baseGetTag = require_baseGetTag();
  169389. var isLength = require_isLength();
  169390. var isObjectLike = require_isObjectLike();
  169391. var argsTag = "[object Arguments]";
  169392. var arrayTag = "[object Array]";
  169393. var boolTag = "[object Boolean]";
  169394. var dateTag = "[object Date]";
  169395. var errorTag = "[object Error]";
  169396. var funcTag = "[object Function]";
  169397. var mapTag = "[object Map]";
  169398. var numberTag = "[object Number]";
  169399. var objectTag = "[object Object]";
  169400. var regexpTag = "[object RegExp]";
  169401. var setTag = "[object Set]";
  169402. var stringTag = "[object String]";
  169403. var weakMapTag = "[object WeakMap]";
  169404. var arrayBufferTag = "[object ArrayBuffer]";
  169405. var dataViewTag = "[object DataView]";
  169406. var float32Tag = "[object Float32Array]";
  169407. var float64Tag = "[object Float64Array]";
  169408. var int8Tag = "[object Int8Array]";
  169409. var int16Tag = "[object Int16Array]";
  169410. var int32Tag = "[object Int32Array]";
  169411. var uint8Tag = "[object Uint8Array]";
  169412. var uint8ClampedTag = "[object Uint8ClampedArray]";
  169413. var uint16Tag = "[object Uint16Array]";
  169414. var uint32Tag = "[object Uint32Array]";
  169415. var typedArrayTags = {};
  169416. typedArrayTags[float32Tag] = typedArrayTags[float64Tag] = typedArrayTags[int8Tag] = typedArrayTags[int16Tag] = typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] = typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] = typedArrayTags[uint32Tag] = true;
  169417. typedArrayTags[argsTag] = typedArrayTags[arrayTag] = typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] = typedArrayTags[dataViewTag] = typedArrayTags[dateTag] = typedArrayTags[errorTag] = typedArrayTags[funcTag] = typedArrayTags[mapTag] = typedArrayTags[numberTag] = typedArrayTags[objectTag] = typedArrayTags[regexpTag] = typedArrayTags[setTag] = typedArrayTags[stringTag] = typedArrayTags[weakMapTag] = false;
  169418. function baseIsTypedArray(value) {
  169419. return isObjectLike(value) && isLength(value.length) && !!typedArrayTags[baseGetTag(value)];
  169420. }
  169421. module.exports = baseIsTypedArray;
  169422. }
  169423. });
  169424. // node_modules/lodash/_baseUnary.js
  169425. var require_baseUnary = __commonJS({
  169426. "node_modules/lodash/_baseUnary.js"(exports, module) {
  169427. function baseUnary(func) {
  169428. return function(value) {
  169429. return func(value);
  169430. };
  169431. }
  169432. module.exports = baseUnary;
  169433. }
  169434. });
  169435. // node_modules/lodash/_nodeUtil.js
  169436. var require_nodeUtil = __commonJS({
  169437. "node_modules/lodash/_nodeUtil.js"(exports, module) {
  169438. var freeGlobal = require_freeGlobal();
  169439. var freeExports = typeof exports == "object" && exports && !exports.nodeType && exports;
  169440. var freeModule = freeExports && typeof module == "object" && module && !module.nodeType && module;
  169441. var moduleExports = freeModule && freeModule.exports === freeExports;
  169442. var freeProcess = moduleExports && freeGlobal.process;
  169443. var nodeUtil = function() {
  169444. try {
  169445. var types2 = freeModule && freeModule.require && freeModule.require("util").types;
  169446. if (types2) {
  169447. return types2;
  169448. }
  169449. return freeProcess && freeProcess.binding && freeProcess.binding("util");
  169450. } catch (e) {
  169451. }
  169452. }();
  169453. module.exports = nodeUtil;
  169454. }
  169455. });
  169456. // node_modules/lodash/isTypedArray.js
  169457. var require_isTypedArray = __commonJS({
  169458. "node_modules/lodash/isTypedArray.js"(exports, module) {
  169459. var baseIsTypedArray = require_baseIsTypedArray();
  169460. var baseUnary = require_baseUnary();
  169461. var nodeUtil = require_nodeUtil();
  169462. var nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;
  169463. var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;
  169464. module.exports = isTypedArray;
  169465. }
  169466. });
  169467. // node_modules/lodash/_arrayLikeKeys.js
  169468. var require_arrayLikeKeys = __commonJS({
  169469. "node_modules/lodash/_arrayLikeKeys.js"(exports, module) {
  169470. var baseTimes = require_baseTimes();
  169471. var isArguments = require_isArguments();
  169472. var isArray2 = require_isArray();
  169473. var isBuffer2 = require_isBuffer();
  169474. var isIndex = require_isIndex();
  169475. var isTypedArray = require_isTypedArray();
  169476. var objectProto = Object.prototype;
  169477. var hasOwnProperty3 = objectProto.hasOwnProperty;
  169478. function arrayLikeKeys(value, inherited) {
  169479. var isArr = isArray2(value), isArg = !isArr && isArguments(value), isBuff = !isArr && !isArg && isBuffer2(value), isType = !isArr && !isArg && !isBuff && isTypedArray(value), skipIndexes = isArr || isArg || isBuff || isType, result = skipIndexes ? baseTimes(value.length, String) : [], length = result.length;
  169480. for (var key in value) {
  169481. if ((inherited || hasOwnProperty3.call(value, key)) && !(skipIndexes && (key == "length" || isBuff && (key == "offset" || key == "parent") || isType && (key == "buffer" || key == "byteLength" || key == "byteOffset") || isIndex(key, length)))) {
  169482. result.push(key);
  169483. }
  169484. }
  169485. return result;
  169486. }
  169487. module.exports = arrayLikeKeys;
  169488. }
  169489. });
  169490. // node_modules/lodash/_isPrototype.js
  169491. var require_isPrototype = __commonJS({
  169492. "node_modules/lodash/_isPrototype.js"(exports, module) {
  169493. var objectProto = Object.prototype;
  169494. function isPrototype(value) {
  169495. var Ctor = value && value.constructor, proto = typeof Ctor == "function" && Ctor.prototype || objectProto;
  169496. return value === proto;
  169497. }
  169498. module.exports = isPrototype;
  169499. }
  169500. });
  169501. // node_modules/lodash/_overArg.js
  169502. var require_overArg = __commonJS({
  169503. "node_modules/lodash/_overArg.js"(exports, module) {
  169504. function overArg(func, transform) {
  169505. return function(arg) {
  169506. return func(transform(arg));
  169507. };
  169508. }
  169509. module.exports = overArg;
  169510. }
  169511. });
  169512. // node_modules/lodash/_nativeKeys.js
  169513. var require_nativeKeys = __commonJS({
  169514. "node_modules/lodash/_nativeKeys.js"(exports, module) {
  169515. var overArg = require_overArg();
  169516. var nativeKeys = overArg(Object.keys, Object);
  169517. module.exports = nativeKeys;
  169518. }
  169519. });
  169520. // node_modules/lodash/_baseKeys.js
  169521. var require_baseKeys = __commonJS({
  169522. "node_modules/lodash/_baseKeys.js"(exports, module) {
  169523. var isPrototype = require_isPrototype();
  169524. var nativeKeys = require_nativeKeys();
  169525. var objectProto = Object.prototype;
  169526. var hasOwnProperty3 = objectProto.hasOwnProperty;
  169527. function baseKeys(object) {
  169528. if (!isPrototype(object)) {
  169529. return nativeKeys(object);
  169530. }
  169531. var result = [];
  169532. for (var key in Object(object)) {
  169533. if (hasOwnProperty3.call(object, key) && key != "constructor") {
  169534. result.push(key);
  169535. }
  169536. }
  169537. return result;
  169538. }
  169539. module.exports = baseKeys;
  169540. }
  169541. });
  169542. // node_modules/lodash/isArrayLike.js
  169543. var require_isArrayLike = __commonJS({
  169544. "node_modules/lodash/isArrayLike.js"(exports, module) {
  169545. var isFunction = require_isFunction();
  169546. var isLength = require_isLength();
  169547. function isArrayLike(value) {
  169548. return value != null && isLength(value.length) && !isFunction(value);
  169549. }
  169550. module.exports = isArrayLike;
  169551. }
  169552. });
  169553. // node_modules/lodash/keys.js
  169554. var require_keys = __commonJS({
  169555. "node_modules/lodash/keys.js"(exports, module) {
  169556. var arrayLikeKeys = require_arrayLikeKeys();
  169557. var baseKeys = require_baseKeys();
  169558. var isArrayLike = require_isArrayLike();
  169559. function keys2(object) {
  169560. return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);
  169561. }
  169562. module.exports = keys2;
  169563. }
  169564. });
  169565. // node_modules/lodash/_baseAssign.js
  169566. var require_baseAssign = __commonJS({
  169567. "node_modules/lodash/_baseAssign.js"(exports, module) {
  169568. var copyObject = require_copyObject();
  169569. var keys2 = require_keys();
  169570. function baseAssign(object, source) {
  169571. return object && copyObject(source, keys2(source), object);
  169572. }
  169573. module.exports = baseAssign;
  169574. }
  169575. });
  169576. // node_modules/lodash/_nativeKeysIn.js
  169577. var require_nativeKeysIn = __commonJS({
  169578. "node_modules/lodash/_nativeKeysIn.js"(exports, module) {
  169579. function nativeKeysIn(object) {
  169580. var result = [];
  169581. if (object != null) {
  169582. for (var key in Object(object)) {
  169583. result.push(key);
  169584. }
  169585. }
  169586. return result;
  169587. }
  169588. module.exports = nativeKeysIn;
  169589. }
  169590. });
  169591. // node_modules/lodash/_baseKeysIn.js
  169592. var require_baseKeysIn = __commonJS({
  169593. "node_modules/lodash/_baseKeysIn.js"(exports, module) {
  169594. var isObject = require_isObject();
  169595. var isPrototype = require_isPrototype();
  169596. var nativeKeysIn = require_nativeKeysIn();
  169597. var objectProto = Object.prototype;
  169598. var hasOwnProperty3 = objectProto.hasOwnProperty;
  169599. function baseKeysIn(object) {
  169600. if (!isObject(object)) {
  169601. return nativeKeysIn(object);
  169602. }
  169603. var isProto = isPrototype(object), result = [];
  169604. for (var key in object) {
  169605. if (!(key == "constructor" && (isProto || !hasOwnProperty3.call(object, key)))) {
  169606. result.push(key);
  169607. }
  169608. }
  169609. return result;
  169610. }
  169611. module.exports = baseKeysIn;
  169612. }
  169613. });
  169614. // node_modules/lodash/keysIn.js
  169615. var require_keysIn = __commonJS({
  169616. "node_modules/lodash/keysIn.js"(exports, module) {
  169617. var arrayLikeKeys = require_arrayLikeKeys();
  169618. var baseKeysIn = require_baseKeysIn();
  169619. var isArrayLike = require_isArrayLike();
  169620. function keysIn(object) {
  169621. return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object);
  169622. }
  169623. module.exports = keysIn;
  169624. }
  169625. });
  169626. // node_modules/lodash/_baseAssignIn.js
  169627. var require_baseAssignIn = __commonJS({
  169628. "node_modules/lodash/_baseAssignIn.js"(exports, module) {
  169629. var copyObject = require_copyObject();
  169630. var keysIn = require_keysIn();
  169631. function baseAssignIn(object, source) {
  169632. return object && copyObject(source, keysIn(source), object);
  169633. }
  169634. module.exports = baseAssignIn;
  169635. }
  169636. });
  169637. // node_modules/lodash/_cloneBuffer.js
  169638. var require_cloneBuffer = __commonJS({
  169639. "node_modules/lodash/_cloneBuffer.js"(exports, module) {
  169640. var root3 = require_root();
  169641. var freeExports = typeof exports == "object" && exports && !exports.nodeType && exports;
  169642. var freeModule = freeExports && typeof module == "object" && module && !module.nodeType && module;
  169643. var moduleExports = freeModule && freeModule.exports === freeExports;
  169644. var Buffer2 = moduleExports ? root3.Buffer : void 0;
  169645. var allocUnsafe = Buffer2 ? Buffer2.allocUnsafe : void 0;
  169646. function cloneBuffer(buffer2, isDeep) {
  169647. if (isDeep) {
  169648. return buffer2.slice();
  169649. }
  169650. var length = buffer2.length, result = allocUnsafe ? allocUnsafe(length) : new buffer2.constructor(length);
  169651. buffer2.copy(result);
  169652. return result;
  169653. }
  169654. module.exports = cloneBuffer;
  169655. }
  169656. });
  169657. // node_modules/lodash/_copyArray.js
  169658. var require_copyArray = __commonJS({
  169659. "node_modules/lodash/_copyArray.js"(exports, module) {
  169660. function copyArray(source, array) {
  169661. var index2 = -1, length = source.length;
  169662. array || (array = Array(length));
  169663. while (++index2 < length) {
  169664. array[index2] = source[index2];
  169665. }
  169666. return array;
  169667. }
  169668. module.exports = copyArray;
  169669. }
  169670. });
  169671. // node_modules/lodash/_arrayFilter.js
  169672. var require_arrayFilter = __commonJS({
  169673. "node_modules/lodash/_arrayFilter.js"(exports, module) {
  169674. function arrayFilter(array, predicate) {
  169675. var index2 = -1, length = array == null ? 0 : array.length, resIndex = 0, result = [];
  169676. while (++index2 < length) {
  169677. var value = array[index2];
  169678. if (predicate(value, index2, array)) {
  169679. result[resIndex++] = value;
  169680. }
  169681. }
  169682. return result;
  169683. }
  169684. module.exports = arrayFilter;
  169685. }
  169686. });
  169687. // node_modules/lodash/stubArray.js
  169688. var require_stubArray = __commonJS({
  169689. "node_modules/lodash/stubArray.js"(exports, module) {
  169690. function stubArray() {
  169691. return [];
  169692. }
  169693. module.exports = stubArray;
  169694. }
  169695. });
  169696. // node_modules/lodash/_getSymbols.js
  169697. var require_getSymbols = __commonJS({
  169698. "node_modules/lodash/_getSymbols.js"(exports, module) {
  169699. var arrayFilter = require_arrayFilter();
  169700. var stubArray = require_stubArray();
  169701. var objectProto = Object.prototype;
  169702. var propertyIsEnumerable = objectProto.propertyIsEnumerable;
  169703. var nativeGetSymbols = Object.getOwnPropertySymbols;
  169704. var getSymbols = !nativeGetSymbols ? stubArray : function(object) {
  169705. if (object == null) {
  169706. return [];
  169707. }
  169708. object = Object(object);
  169709. return arrayFilter(nativeGetSymbols(object), function(symbol) {
  169710. return propertyIsEnumerable.call(object, symbol);
  169711. });
  169712. };
  169713. module.exports = getSymbols;
  169714. }
  169715. });
  169716. // node_modules/lodash/_copySymbols.js
  169717. var require_copySymbols = __commonJS({
  169718. "node_modules/lodash/_copySymbols.js"(exports, module) {
  169719. var copyObject = require_copyObject();
  169720. var getSymbols = require_getSymbols();
  169721. function copySymbols(source, object) {
  169722. return copyObject(source, getSymbols(source), object);
  169723. }
  169724. module.exports = copySymbols;
  169725. }
  169726. });
  169727. // node_modules/lodash/_arrayPush.js
  169728. var require_arrayPush = __commonJS({
  169729. "node_modules/lodash/_arrayPush.js"(exports, module) {
  169730. function arrayPush(array, values) {
  169731. var index2 = -1, length = values.length, offset2 = array.length;
  169732. while (++index2 < length) {
  169733. array[offset2 + index2] = values[index2];
  169734. }
  169735. return array;
  169736. }
  169737. module.exports = arrayPush;
  169738. }
  169739. });
  169740. // node_modules/lodash/_getPrototype.js
  169741. var require_getPrototype = __commonJS({
  169742. "node_modules/lodash/_getPrototype.js"(exports, module) {
  169743. var overArg = require_overArg();
  169744. var getPrototype = overArg(Object.getPrototypeOf, Object);
  169745. module.exports = getPrototype;
  169746. }
  169747. });
  169748. // node_modules/lodash/_getSymbolsIn.js
  169749. var require_getSymbolsIn = __commonJS({
  169750. "node_modules/lodash/_getSymbolsIn.js"(exports, module) {
  169751. var arrayPush = require_arrayPush();
  169752. var getPrototype = require_getPrototype();
  169753. var getSymbols = require_getSymbols();
  169754. var stubArray = require_stubArray();
  169755. var nativeGetSymbols = Object.getOwnPropertySymbols;
  169756. var getSymbolsIn = !nativeGetSymbols ? stubArray : function(object) {
  169757. var result = [];
  169758. while (object) {
  169759. arrayPush(result, getSymbols(object));
  169760. object = getPrototype(object);
  169761. }
  169762. return result;
  169763. };
  169764. module.exports = getSymbolsIn;
  169765. }
  169766. });
  169767. // node_modules/lodash/_copySymbolsIn.js
  169768. var require_copySymbolsIn = __commonJS({
  169769. "node_modules/lodash/_copySymbolsIn.js"(exports, module) {
  169770. var copyObject = require_copyObject();
  169771. var getSymbolsIn = require_getSymbolsIn();
  169772. function copySymbolsIn(source, object) {
  169773. return copyObject(source, getSymbolsIn(source), object);
  169774. }
  169775. module.exports = copySymbolsIn;
  169776. }
  169777. });
  169778. // node_modules/lodash/_baseGetAllKeys.js
  169779. var require_baseGetAllKeys = __commonJS({
  169780. "node_modules/lodash/_baseGetAllKeys.js"(exports, module) {
  169781. var arrayPush = require_arrayPush();
  169782. var isArray2 = require_isArray();
  169783. function baseGetAllKeys(object, keysFunc, symbolsFunc) {
  169784. var result = keysFunc(object);
  169785. return isArray2(object) ? result : arrayPush(result, symbolsFunc(object));
  169786. }
  169787. module.exports = baseGetAllKeys;
  169788. }
  169789. });
  169790. // node_modules/lodash/_getAllKeys.js
  169791. var require_getAllKeys = __commonJS({
  169792. "node_modules/lodash/_getAllKeys.js"(exports, module) {
  169793. var baseGetAllKeys = require_baseGetAllKeys();
  169794. var getSymbols = require_getSymbols();
  169795. var keys2 = require_keys();
  169796. function getAllKeys(object) {
  169797. return baseGetAllKeys(object, keys2, getSymbols);
  169798. }
  169799. module.exports = getAllKeys;
  169800. }
  169801. });
  169802. // node_modules/lodash/_getAllKeysIn.js
  169803. var require_getAllKeysIn = __commonJS({
  169804. "node_modules/lodash/_getAllKeysIn.js"(exports, module) {
  169805. var baseGetAllKeys = require_baseGetAllKeys();
  169806. var getSymbolsIn = require_getSymbolsIn();
  169807. var keysIn = require_keysIn();
  169808. function getAllKeysIn(object) {
  169809. return baseGetAllKeys(object, keysIn, getSymbolsIn);
  169810. }
  169811. module.exports = getAllKeysIn;
  169812. }
  169813. });
  169814. // node_modules/lodash/_DataView.js
  169815. var require_DataView = __commonJS({
  169816. "node_modules/lodash/_DataView.js"(exports, module) {
  169817. var getNative = require_getNative();
  169818. var root3 = require_root();
  169819. var DataView = getNative(root3, "DataView");
  169820. module.exports = DataView;
  169821. }
  169822. });
  169823. // node_modules/lodash/_Promise.js
  169824. var require_Promise = __commonJS({
  169825. "node_modules/lodash/_Promise.js"(exports, module) {
  169826. var getNative = require_getNative();
  169827. var root3 = require_root();
  169828. var Promise2 = getNative(root3, "Promise");
  169829. module.exports = Promise2;
  169830. }
  169831. });
  169832. // node_modules/lodash/_Set.js
  169833. var require_Set = __commonJS({
  169834. "node_modules/lodash/_Set.js"(exports, module) {
  169835. var getNative = require_getNative();
  169836. var root3 = require_root();
  169837. var Set2 = getNative(root3, "Set");
  169838. module.exports = Set2;
  169839. }
  169840. });
  169841. // node_modules/lodash/_WeakMap.js
  169842. var require_WeakMap = __commonJS({
  169843. "node_modules/lodash/_WeakMap.js"(exports, module) {
  169844. var getNative = require_getNative();
  169845. var root3 = require_root();
  169846. var WeakMap2 = getNative(root3, "WeakMap");
  169847. module.exports = WeakMap2;
  169848. }
  169849. });
  169850. // node_modules/lodash/_getTag.js
  169851. var require_getTag = __commonJS({
  169852. "node_modules/lodash/_getTag.js"(exports, module) {
  169853. var DataView = require_DataView();
  169854. var Map2 = require_Map();
  169855. var Promise2 = require_Promise();
  169856. var Set2 = require_Set();
  169857. var WeakMap2 = require_WeakMap();
  169858. var baseGetTag = require_baseGetTag();
  169859. var toSource = require_toSource();
  169860. var mapTag = "[object Map]";
  169861. var objectTag = "[object Object]";
  169862. var promiseTag = "[object Promise]";
  169863. var setTag = "[object Set]";
  169864. var weakMapTag = "[object WeakMap]";
  169865. var dataViewTag = "[object DataView]";
  169866. var dataViewCtorString = toSource(DataView);
  169867. var mapCtorString = toSource(Map2);
  169868. var promiseCtorString = toSource(Promise2);
  169869. var setCtorString = toSource(Set2);
  169870. var weakMapCtorString = toSource(WeakMap2);
  169871. var getTag = baseGetTag;
  169872. if (DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag || Map2 && getTag(new Map2()) != mapTag || Promise2 && getTag(Promise2.resolve()) != promiseTag || Set2 && getTag(new Set2()) != setTag || WeakMap2 && getTag(new WeakMap2()) != weakMapTag) {
  169873. getTag = function(value) {
  169874. var result = baseGetTag(value), Ctor = result == objectTag ? value.constructor : void 0, ctorString = Ctor ? toSource(Ctor) : "";
  169875. if (ctorString) {
  169876. switch (ctorString) {
  169877. case dataViewCtorString:
  169878. return dataViewTag;
  169879. case mapCtorString:
  169880. return mapTag;
  169881. case promiseCtorString:
  169882. return promiseTag;
  169883. case setCtorString:
  169884. return setTag;
  169885. case weakMapCtorString:
  169886. return weakMapTag;
  169887. }
  169888. }
  169889. return result;
  169890. };
  169891. }
  169892. module.exports = getTag;
  169893. }
  169894. });
  169895. // node_modules/lodash/_initCloneArray.js
  169896. var require_initCloneArray = __commonJS({
  169897. "node_modules/lodash/_initCloneArray.js"(exports, module) {
  169898. var objectProto = Object.prototype;
  169899. var hasOwnProperty3 = objectProto.hasOwnProperty;
  169900. function initCloneArray(array) {
  169901. var length = array.length, result = new array.constructor(length);
  169902. if (length && typeof array[0] == "string" && hasOwnProperty3.call(array, "index")) {
  169903. result.index = array.index;
  169904. result.input = array.input;
  169905. }
  169906. return result;
  169907. }
  169908. module.exports = initCloneArray;
  169909. }
  169910. });
  169911. // node_modules/lodash/_Uint8Array.js
  169912. var require_Uint8Array = __commonJS({
  169913. "node_modules/lodash/_Uint8Array.js"(exports, module) {
  169914. var root3 = require_root();
  169915. var Uint8Array2 = root3.Uint8Array;
  169916. module.exports = Uint8Array2;
  169917. }
  169918. });
  169919. // node_modules/lodash/_cloneArrayBuffer.js
  169920. var require_cloneArrayBuffer = __commonJS({
  169921. "node_modules/lodash/_cloneArrayBuffer.js"(exports, module) {
  169922. var Uint8Array2 = require_Uint8Array();
  169923. function cloneArrayBuffer(arrayBuffer) {
  169924. var result = new arrayBuffer.constructor(arrayBuffer.byteLength);
  169925. new Uint8Array2(result).set(new Uint8Array2(arrayBuffer));
  169926. return result;
  169927. }
  169928. module.exports = cloneArrayBuffer;
  169929. }
  169930. });
  169931. // node_modules/lodash/_cloneDataView.js
  169932. var require_cloneDataView = __commonJS({
  169933. "node_modules/lodash/_cloneDataView.js"(exports, module) {
  169934. var cloneArrayBuffer = require_cloneArrayBuffer();
  169935. function cloneDataView(dataView, isDeep) {
  169936. var buffer2 = isDeep ? cloneArrayBuffer(dataView.buffer) : dataView.buffer;
  169937. return new dataView.constructor(buffer2, dataView.byteOffset, dataView.byteLength);
  169938. }
  169939. module.exports = cloneDataView;
  169940. }
  169941. });
  169942. // node_modules/lodash/_cloneRegExp.js
  169943. var require_cloneRegExp = __commonJS({
  169944. "node_modules/lodash/_cloneRegExp.js"(exports, module) {
  169945. var reFlags = /\w*$/;
  169946. function cloneRegExp(regexp) {
  169947. var result = new regexp.constructor(regexp.source, reFlags.exec(regexp));
  169948. result.lastIndex = regexp.lastIndex;
  169949. return result;
  169950. }
  169951. module.exports = cloneRegExp;
  169952. }
  169953. });
  169954. // node_modules/lodash/_cloneSymbol.js
  169955. var require_cloneSymbol = __commonJS({
  169956. "node_modules/lodash/_cloneSymbol.js"(exports, module) {
  169957. var Symbol2 = require_Symbol();
  169958. var symbolProto = Symbol2 ? Symbol2.prototype : void 0;
  169959. var symbolValueOf = symbolProto ? symbolProto.valueOf : void 0;
  169960. function cloneSymbol(symbol) {
  169961. return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {};
  169962. }
  169963. module.exports = cloneSymbol;
  169964. }
  169965. });
  169966. // node_modules/lodash/_cloneTypedArray.js
  169967. var require_cloneTypedArray = __commonJS({
  169968. "node_modules/lodash/_cloneTypedArray.js"(exports, module) {
  169969. var cloneArrayBuffer = require_cloneArrayBuffer();
  169970. function cloneTypedArray(typedArray, isDeep) {
  169971. var buffer2 = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer;
  169972. return new typedArray.constructor(buffer2, typedArray.byteOffset, typedArray.length);
  169973. }
  169974. module.exports = cloneTypedArray;
  169975. }
  169976. });
  169977. // node_modules/lodash/_initCloneByTag.js
  169978. var require_initCloneByTag = __commonJS({
  169979. "node_modules/lodash/_initCloneByTag.js"(exports, module) {
  169980. var cloneArrayBuffer = require_cloneArrayBuffer();
  169981. var cloneDataView = require_cloneDataView();
  169982. var cloneRegExp = require_cloneRegExp();
  169983. var cloneSymbol = require_cloneSymbol();
  169984. var cloneTypedArray = require_cloneTypedArray();
  169985. var boolTag = "[object Boolean]";
  169986. var dateTag = "[object Date]";
  169987. var mapTag = "[object Map]";
  169988. var numberTag = "[object Number]";
  169989. var regexpTag = "[object RegExp]";
  169990. var setTag = "[object Set]";
  169991. var stringTag = "[object String]";
  169992. var symbolTag = "[object Symbol]";
  169993. var arrayBufferTag = "[object ArrayBuffer]";
  169994. var dataViewTag = "[object DataView]";
  169995. var float32Tag = "[object Float32Array]";
  169996. var float64Tag = "[object Float64Array]";
  169997. var int8Tag = "[object Int8Array]";
  169998. var int16Tag = "[object Int16Array]";
  169999. var int32Tag = "[object Int32Array]";
  170000. var uint8Tag = "[object Uint8Array]";
  170001. var uint8ClampedTag = "[object Uint8ClampedArray]";
  170002. var uint16Tag = "[object Uint16Array]";
  170003. var uint32Tag = "[object Uint32Array]";
  170004. function initCloneByTag(object, tag, isDeep) {
  170005. var Ctor = object.constructor;
  170006. switch (tag) {
  170007. case arrayBufferTag:
  170008. return cloneArrayBuffer(object);
  170009. case boolTag:
  170010. case dateTag:
  170011. return new Ctor(+object);
  170012. case dataViewTag:
  170013. return cloneDataView(object, isDeep);
  170014. case float32Tag:
  170015. case float64Tag:
  170016. case int8Tag:
  170017. case int16Tag:
  170018. case int32Tag:
  170019. case uint8Tag:
  170020. case uint8ClampedTag:
  170021. case uint16Tag:
  170022. case uint32Tag:
  170023. return cloneTypedArray(object, isDeep);
  170024. case mapTag:
  170025. return new Ctor();
  170026. case numberTag:
  170027. case stringTag:
  170028. return new Ctor(object);
  170029. case regexpTag:
  170030. return cloneRegExp(object);
  170031. case setTag:
  170032. return new Ctor();
  170033. case symbolTag:
  170034. return cloneSymbol(object);
  170035. }
  170036. }
  170037. module.exports = initCloneByTag;
  170038. }
  170039. });
  170040. // node_modules/lodash/_baseCreate.js
  170041. var require_baseCreate = __commonJS({
  170042. "node_modules/lodash/_baseCreate.js"(exports, module) {
  170043. var isObject = require_isObject();
  170044. var objectCreate = Object.create;
  170045. var baseCreate = function() {
  170046. function object() {
  170047. }
  170048. return function(proto) {
  170049. if (!isObject(proto)) {
  170050. return {};
  170051. }
  170052. if (objectCreate) {
  170053. return objectCreate(proto);
  170054. }
  170055. object.prototype = proto;
  170056. var result = new object();
  170057. object.prototype = void 0;
  170058. return result;
  170059. };
  170060. }();
  170061. module.exports = baseCreate;
  170062. }
  170063. });
  170064. // node_modules/lodash/_initCloneObject.js
  170065. var require_initCloneObject = __commonJS({
  170066. "node_modules/lodash/_initCloneObject.js"(exports, module) {
  170067. var baseCreate = require_baseCreate();
  170068. var getPrototype = require_getPrototype();
  170069. var isPrototype = require_isPrototype();
  170070. function initCloneObject(object) {
  170071. return typeof object.constructor == "function" && !isPrototype(object) ? baseCreate(getPrototype(object)) : {};
  170072. }
  170073. module.exports = initCloneObject;
  170074. }
  170075. });
  170076. // node_modules/lodash/_baseIsMap.js
  170077. var require_baseIsMap = __commonJS({
  170078. "node_modules/lodash/_baseIsMap.js"(exports, module) {
  170079. var getTag = require_getTag();
  170080. var isObjectLike = require_isObjectLike();
  170081. var mapTag = "[object Map]";
  170082. function baseIsMap(value) {
  170083. return isObjectLike(value) && getTag(value) == mapTag;
  170084. }
  170085. module.exports = baseIsMap;
  170086. }
  170087. });
  170088. // node_modules/lodash/isMap.js
  170089. var require_isMap = __commonJS({
  170090. "node_modules/lodash/isMap.js"(exports, module) {
  170091. var baseIsMap = require_baseIsMap();
  170092. var baseUnary = require_baseUnary();
  170093. var nodeUtil = require_nodeUtil();
  170094. var nodeIsMap = nodeUtil && nodeUtil.isMap;
  170095. var isMap = nodeIsMap ? baseUnary(nodeIsMap) : baseIsMap;
  170096. module.exports = isMap;
  170097. }
  170098. });
  170099. // node_modules/lodash/_baseIsSet.js
  170100. var require_baseIsSet = __commonJS({
  170101. "node_modules/lodash/_baseIsSet.js"(exports, module) {
  170102. var getTag = require_getTag();
  170103. var isObjectLike = require_isObjectLike();
  170104. var setTag = "[object Set]";
  170105. function baseIsSet(value) {
  170106. return isObjectLike(value) && getTag(value) == setTag;
  170107. }
  170108. module.exports = baseIsSet;
  170109. }
  170110. });
  170111. // node_modules/lodash/isSet.js
  170112. var require_isSet = __commonJS({
  170113. "node_modules/lodash/isSet.js"(exports, module) {
  170114. var baseIsSet = require_baseIsSet();
  170115. var baseUnary = require_baseUnary();
  170116. var nodeUtil = require_nodeUtil();
  170117. var nodeIsSet = nodeUtil && nodeUtil.isSet;
  170118. var isSet = nodeIsSet ? baseUnary(nodeIsSet) : baseIsSet;
  170119. module.exports = isSet;
  170120. }
  170121. });
  170122. // node_modules/lodash/_baseClone.js
  170123. var require_baseClone = __commonJS({
  170124. "node_modules/lodash/_baseClone.js"(exports, module) {
  170125. var Stack = require_Stack();
  170126. var arrayEach = require_arrayEach();
  170127. var assignValue = require_assignValue();
  170128. var baseAssign = require_baseAssign();
  170129. var baseAssignIn = require_baseAssignIn();
  170130. var cloneBuffer = require_cloneBuffer();
  170131. var copyArray = require_copyArray();
  170132. var copySymbols = require_copySymbols();
  170133. var copySymbolsIn = require_copySymbolsIn();
  170134. var getAllKeys = require_getAllKeys();
  170135. var getAllKeysIn = require_getAllKeysIn();
  170136. var getTag = require_getTag();
  170137. var initCloneArray = require_initCloneArray();
  170138. var initCloneByTag = require_initCloneByTag();
  170139. var initCloneObject = require_initCloneObject();
  170140. var isArray2 = require_isArray();
  170141. var isBuffer2 = require_isBuffer();
  170142. var isMap = require_isMap();
  170143. var isObject = require_isObject();
  170144. var isSet = require_isSet();
  170145. var keys2 = require_keys();
  170146. var keysIn = require_keysIn();
  170147. var CLONE_DEEP_FLAG = 1;
  170148. var CLONE_FLAT_FLAG = 2;
  170149. var CLONE_SYMBOLS_FLAG = 4;
  170150. var argsTag = "[object Arguments]";
  170151. var arrayTag = "[object Array]";
  170152. var boolTag = "[object Boolean]";
  170153. var dateTag = "[object Date]";
  170154. var errorTag = "[object Error]";
  170155. var funcTag = "[object Function]";
  170156. var genTag = "[object GeneratorFunction]";
  170157. var mapTag = "[object Map]";
  170158. var numberTag = "[object Number]";
  170159. var objectTag = "[object Object]";
  170160. var regexpTag = "[object RegExp]";
  170161. var setTag = "[object Set]";
  170162. var stringTag = "[object String]";
  170163. var symbolTag = "[object Symbol]";
  170164. var weakMapTag = "[object WeakMap]";
  170165. var arrayBufferTag = "[object ArrayBuffer]";
  170166. var dataViewTag = "[object DataView]";
  170167. var float32Tag = "[object Float32Array]";
  170168. var float64Tag = "[object Float64Array]";
  170169. var int8Tag = "[object Int8Array]";
  170170. var int16Tag = "[object Int16Array]";
  170171. var int32Tag = "[object Int32Array]";
  170172. var uint8Tag = "[object Uint8Array]";
  170173. var uint8ClampedTag = "[object Uint8ClampedArray]";
  170174. var uint16Tag = "[object Uint16Array]";
  170175. var uint32Tag = "[object Uint32Array]";
  170176. var cloneableTags = {};
  170177. cloneableTags[argsTag] = cloneableTags[arrayTag] = cloneableTags[arrayBufferTag] = cloneableTags[dataViewTag] = cloneableTags[boolTag] = cloneableTags[dateTag] = cloneableTags[float32Tag] = cloneableTags[float64Tag] = cloneableTags[int8Tag] = cloneableTags[int16Tag] = cloneableTags[int32Tag] = cloneableTags[mapTag] = cloneableTags[numberTag] = cloneableTags[objectTag] = cloneableTags[regexpTag] = cloneableTags[setTag] = cloneableTags[stringTag] = cloneableTags[symbolTag] = cloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] = cloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true;
  170178. cloneableTags[errorTag] = cloneableTags[funcTag] = cloneableTags[weakMapTag] = false;
  170179. function baseClone(value, bitmask, customizer, key, object, stack) {
  170180. var result, isDeep = bitmask & CLONE_DEEP_FLAG, isFlat = bitmask & CLONE_FLAT_FLAG, isFull = bitmask & CLONE_SYMBOLS_FLAG;
  170181. if (customizer) {
  170182. result = object ? customizer(value, key, object, stack) : customizer(value);
  170183. }
  170184. if (result !== void 0) {
  170185. return result;
  170186. }
  170187. if (!isObject(value)) {
  170188. return value;
  170189. }
  170190. var isArr = isArray2(value);
  170191. if (isArr) {
  170192. result = initCloneArray(value);
  170193. if (!isDeep) {
  170194. return copyArray(value, result);
  170195. }
  170196. } else {
  170197. var tag = getTag(value), isFunc = tag == funcTag || tag == genTag;
  170198. if (isBuffer2(value)) {
  170199. return cloneBuffer(value, isDeep);
  170200. }
  170201. if (tag == objectTag || tag == argsTag || isFunc && !object) {
  170202. result = isFlat || isFunc ? {} : initCloneObject(value);
  170203. if (!isDeep) {
  170204. return isFlat ? copySymbolsIn(value, baseAssignIn(result, value)) : copySymbols(value, baseAssign(result, value));
  170205. }
  170206. } else {
  170207. if (!cloneableTags[tag]) {
  170208. return object ? value : {};
  170209. }
  170210. result = initCloneByTag(value, tag, isDeep);
  170211. }
  170212. }
  170213. stack || (stack = new Stack());
  170214. var stacked = stack.get(value);
  170215. if (stacked) {
  170216. return stacked;
  170217. }
  170218. stack.set(value, result);
  170219. if (isSet(value)) {
  170220. value.forEach(function(subValue) {
  170221. result.add(baseClone(subValue, bitmask, customizer, subValue, value, stack));
  170222. });
  170223. } else if (isMap(value)) {
  170224. value.forEach(function(subValue, key2) {
  170225. result.set(key2, baseClone(subValue, bitmask, customizer, key2, value, stack));
  170226. });
  170227. }
  170228. var keysFunc = isFull ? isFlat ? getAllKeysIn : getAllKeys : isFlat ? keysIn : keys2;
  170229. var props = isArr ? void 0 : keysFunc(value);
  170230. arrayEach(props || value, function(subValue, key2) {
  170231. if (props) {
  170232. key2 = subValue;
  170233. subValue = value[key2];
  170234. }
  170235. assignValue(result, key2, baseClone(subValue, bitmask, customizer, key2, value, stack));
  170236. });
  170237. return result;
  170238. }
  170239. module.exports = baseClone;
  170240. }
  170241. });
  170242. // node_modules/lodash/cloneDeep.js
  170243. var require_cloneDeep8 = __commonJS({
  170244. "node_modules/lodash/cloneDeep.js"(exports, module) {
  170245. var baseClone = require_baseClone();
  170246. var CLONE_DEEP_FLAG = 1;
  170247. var CLONE_SYMBOLS_FLAG = 4;
  170248. function cloneDeep2(value) {
  170249. return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG);
  170250. }
  170251. module.exports = cloneDeep2;
  170252. }
  170253. });
  170254. // src/analyze.ts
  170255. var t = __toESM(require_lib2());
  170256. var import_estree_to_babel = __toESM(require_estree_to_babel());
  170257. var babelTraverse = __toESM(require_lib37());
  170258. // node_modules/bail/index.js
  170259. function bail(error) {
  170260. if (error) {
  170261. throw error;
  170262. }
  170263. }
  170264. // node_modules/unified/lib/index.js
  170265. var import_is_buffer2 = __toESM(require_is_buffer(), 1);
  170266. var import_extend = __toESM(require_extend(), 1);
  170267. // node_modules/is-plain-obj/index.js
  170268. function isPlainObject(value) {
  170269. if (Object.prototype.toString.call(value) !== "[object Object]") {
  170270. return false;
  170271. }
  170272. const prototype = Object.getPrototypeOf(value);
  170273. return prototype === null || prototype === Object.prototype;
  170274. }
  170275. // node_modules/trough/index.js
  170276. function trough() {
  170277. const fns = [];
  170278. const pipeline = { run, use };
  170279. return pipeline;
  170280. function run(...values) {
  170281. let middlewareIndex = -1;
  170282. const callback = values.pop();
  170283. if (typeof callback !== "function") {
  170284. throw new TypeError("Expected function as last argument, not " + callback);
  170285. }
  170286. next(null, ...values);
  170287. function next(error, ...output) {
  170288. const fn = fns[++middlewareIndex];
  170289. let index2 = -1;
  170290. if (error) {
  170291. callback(error);
  170292. return;
  170293. }
  170294. while (++index2 < values.length) {
  170295. if (output[index2] === null || output[index2] === void 0) {
  170296. output[index2] = values[index2];
  170297. }
  170298. }
  170299. values = output;
  170300. if (fn) {
  170301. wrap(fn, next)(...output);
  170302. } else {
  170303. callback(null, ...output);
  170304. }
  170305. }
  170306. }
  170307. function use(middelware) {
  170308. if (typeof middelware !== "function") {
  170309. throw new TypeError(
  170310. "Expected `middelware` to be a function, not " + middelware
  170311. );
  170312. }
  170313. fns.push(middelware);
  170314. return pipeline;
  170315. }
  170316. }
  170317. function wrap(middleware, callback) {
  170318. let called;
  170319. return wrapped;
  170320. function wrapped(...parameters) {
  170321. const fnExpectsCallback = middleware.length > parameters.length;
  170322. let result;
  170323. if (fnExpectsCallback) {
  170324. parameters.push(done);
  170325. }
  170326. try {
  170327. result = middleware(...parameters);
  170328. } catch (error) {
  170329. const exception = error;
  170330. if (fnExpectsCallback && called) {
  170331. throw exception;
  170332. }
  170333. return done(exception);
  170334. }
  170335. if (!fnExpectsCallback) {
  170336. if (result instanceof Promise) {
  170337. result.then(then, done);
  170338. } else if (result instanceof Error) {
  170339. done(result);
  170340. } else {
  170341. then(result);
  170342. }
  170343. }
  170344. }
  170345. function done(error, ...output) {
  170346. if (!called) {
  170347. called = true;
  170348. callback(error, ...output);
  170349. }
  170350. }
  170351. function then(value) {
  170352. done(null, value);
  170353. }
  170354. }
  170355. // node_modules/vfile/lib/index.js
  170356. var import_is_buffer = __toESM(require_is_buffer2(), 1);
  170357. // node_modules/unist-util-stringify-position/index.js
  170358. var own = {}.hasOwnProperty;
  170359. function stringifyPosition(value) {
  170360. if (!value || typeof value !== "object") {
  170361. return "";
  170362. }
  170363. if (own.call(value, "position") || own.call(value, "type")) {
  170364. return position(value.position);
  170365. }
  170366. if (own.call(value, "start") || own.call(value, "end")) {
  170367. return position(value);
  170368. }
  170369. if (own.call(value, "line") || own.call(value, "column")) {
  170370. return point(value);
  170371. }
  170372. return "";
  170373. }
  170374. function point(point3) {
  170375. return index(point3 && point3.line) + ":" + index(point3 && point3.column);
  170376. }
  170377. function position(pos) {
  170378. return point(pos && pos.start) + "-" + point(pos && pos.end);
  170379. }
  170380. function index(value) {
  170381. return value && typeof value === "number" ? value : 1;
  170382. }
  170383. // node_modules/vfile-message/index.js
  170384. var VFileMessage = class extends Error {
  170385. constructor(reason, place, origin) {
  170386. var parts = [null, null];
  170387. var position3 = {
  170388. start: { line: null, column: null },
  170389. end: { line: null, column: null }
  170390. };
  170391. var index2;
  170392. super();
  170393. if (typeof place === "string") {
  170394. origin = place;
  170395. place = null;
  170396. }
  170397. if (typeof origin === "string") {
  170398. index2 = origin.indexOf(":");
  170399. if (index2 === -1) {
  170400. parts[1] = origin;
  170401. } else {
  170402. parts[0] = origin.slice(0, index2);
  170403. parts[1] = origin.slice(index2 + 1);
  170404. }
  170405. }
  170406. if (place) {
  170407. if ("type" in place || "position" in place) {
  170408. if (place.position) {
  170409. position3 = place.position;
  170410. }
  170411. } else if ("start" in place || "end" in place) {
  170412. position3 = place;
  170413. } else if ("line" in place || "column" in place) {
  170414. position3.start = place;
  170415. }
  170416. }
  170417. this.name = stringifyPosition(place) || "1:1";
  170418. this.message = typeof reason === "object" ? reason.message : reason;
  170419. this.stack = typeof reason === "object" ? reason.stack : "";
  170420. this.reason = this.message;
  170421. this.fatal;
  170422. this.line = position3.start.line;
  170423. this.column = position3.start.column;
  170424. this.source = parts[0];
  170425. this.ruleId = parts[1];
  170426. this.position = position3;
  170427. this.actual;
  170428. this.expected;
  170429. this.file;
  170430. this.url;
  170431. this.note;
  170432. }
  170433. };
  170434. VFileMessage.prototype.file = "";
  170435. VFileMessage.prototype.name = "";
  170436. VFileMessage.prototype.reason = "";
  170437. VFileMessage.prototype.message = "";
  170438. VFileMessage.prototype.stack = "";
  170439. VFileMessage.prototype.fatal = null;
  170440. VFileMessage.prototype.column = null;
  170441. VFileMessage.prototype.line = null;
  170442. VFileMessage.prototype.source = null;
  170443. VFileMessage.prototype.ruleId = null;
  170444. VFileMessage.prototype.position = null;
  170445. // node_modules/vfile/lib/minpath.js
  170446. import { default as default2 } from "path";
  170447. // node_modules/vfile/lib/minproc.js
  170448. import { default as default3 } from "process";
  170449. // node_modules/vfile/lib/minurl.js
  170450. import { fileURLToPath } from "url";
  170451. // node_modules/vfile/lib/minurl.shared.js
  170452. function isUrl(fileURLOrPath) {
  170453. return fileURLOrPath !== null && typeof fileURLOrPath === "object" && fileURLOrPath.href && fileURLOrPath.origin;
  170454. }
  170455. // node_modules/vfile/lib/index.js
  170456. var order = ["history", "path", "basename", "stem", "extname", "dirname"];
  170457. var VFile = class {
  170458. constructor(value) {
  170459. let options;
  170460. if (!value) {
  170461. options = {};
  170462. } else if (typeof value === "string" || (0, import_is_buffer.default)(value)) {
  170463. options = { value };
  170464. } else if (isUrl(value)) {
  170465. options = { path: value };
  170466. } else {
  170467. options = value;
  170468. }
  170469. this.data = {};
  170470. this.messages = [];
  170471. this.history = [];
  170472. this.cwd = default3.cwd();
  170473. this.value;
  170474. this.stored;
  170475. this.result;
  170476. this.map;
  170477. let index2 = -1;
  170478. while (++index2 < order.length) {
  170479. const prop2 = order[index2];
  170480. if (prop2 in options && options[prop2] !== void 0) {
  170481. this[prop2] = prop2 === "history" ? [...options[prop2]] : options[prop2];
  170482. }
  170483. }
  170484. let prop;
  170485. for (prop in options) {
  170486. if (!order.includes(prop))
  170487. this[prop] = options[prop];
  170488. }
  170489. }
  170490. get path() {
  170491. return this.history[this.history.length - 1];
  170492. }
  170493. set path(path) {
  170494. if (isUrl(path)) {
  170495. path = fileURLToPath(path);
  170496. }
  170497. assertNonEmpty(path, "path");
  170498. if (this.path !== path) {
  170499. this.history.push(path);
  170500. }
  170501. }
  170502. get dirname() {
  170503. return typeof this.path === "string" ? default2.dirname(this.path) : void 0;
  170504. }
  170505. set dirname(dirname) {
  170506. assertPath(this.basename, "dirname");
  170507. this.path = default2.join(dirname || "", this.basename);
  170508. }
  170509. get basename() {
  170510. return typeof this.path === "string" ? default2.basename(this.path) : void 0;
  170511. }
  170512. set basename(basename) {
  170513. assertNonEmpty(basename, "basename");
  170514. assertPart(basename, "basename");
  170515. this.path = default2.join(this.dirname || "", basename);
  170516. }
  170517. get extname() {
  170518. return typeof this.path === "string" ? default2.extname(this.path) : void 0;
  170519. }
  170520. set extname(extname) {
  170521. assertPart(extname, "extname");
  170522. assertPath(this.dirname, "extname");
  170523. if (extname) {
  170524. if (extname.charCodeAt(0) !== 46) {
  170525. throw new Error("`extname` must start with `.`");
  170526. }
  170527. if (extname.includes(".", 1)) {
  170528. throw new Error("`extname` cannot contain multiple dots");
  170529. }
  170530. }
  170531. this.path = default2.join(this.dirname, this.stem + (extname || ""));
  170532. }
  170533. get stem() {
  170534. return typeof this.path === "string" ? default2.basename(this.path, this.extname) : void 0;
  170535. }
  170536. set stem(stem) {
  170537. assertNonEmpty(stem, "stem");
  170538. assertPart(stem, "stem");
  170539. this.path = default2.join(this.dirname || "", stem + (this.extname || ""));
  170540. }
  170541. toString(encoding) {
  170542. return (this.value || "").toString(encoding);
  170543. }
  170544. message(reason, place, origin) {
  170545. const message = new VFileMessage(reason, place, origin);
  170546. if (this.path) {
  170547. message.name = this.path + ":" + message.name;
  170548. message.file = this.path;
  170549. }
  170550. message.fatal = false;
  170551. this.messages.push(message);
  170552. return message;
  170553. }
  170554. info(reason, place, origin) {
  170555. const message = this.message(reason, place, origin);
  170556. message.fatal = null;
  170557. return message;
  170558. }
  170559. fail(reason, place, origin) {
  170560. const message = this.message(reason, place, origin);
  170561. message.fatal = true;
  170562. throw message;
  170563. }
  170564. };
  170565. function assertPart(part, name2) {
  170566. if (part && part.includes(default2.sep)) {
  170567. throw new Error(
  170568. "`" + name2 + "` cannot be a path: did not expect `" + default2.sep + "`"
  170569. );
  170570. }
  170571. }
  170572. function assertNonEmpty(part, name2) {
  170573. if (!part) {
  170574. throw new Error("`" + name2 + "` cannot be empty");
  170575. }
  170576. }
  170577. function assertPath(path, name2) {
  170578. if (!path) {
  170579. throw new Error("Setting `" + name2 + "` requires `path` to be set too");
  170580. }
  170581. }
  170582. // node_modules/unified/lib/index.js
  170583. var unified = base().freeze();
  170584. var own2 = {}.hasOwnProperty;
  170585. function base() {
  170586. const transformers = trough();
  170587. const attachers = [];
  170588. let namespace = {};
  170589. let frozen;
  170590. let freezeIndex = -1;
  170591. processor.data = data2;
  170592. processor.Parser = void 0;
  170593. processor.Compiler = void 0;
  170594. processor.freeze = freeze;
  170595. processor.attachers = attachers;
  170596. processor.use = use;
  170597. processor.parse = parse4;
  170598. processor.stringify = stringify4;
  170599. processor.run = run;
  170600. processor.runSync = runSync;
  170601. processor.process = process3;
  170602. processor.processSync = processSync;
  170603. return processor;
  170604. function processor() {
  170605. const destination = base();
  170606. let index2 = -1;
  170607. while (++index2 < attachers.length) {
  170608. destination.use(...attachers[index2]);
  170609. }
  170610. destination.data((0, import_extend.default)(true, {}, namespace));
  170611. return destination;
  170612. }
  170613. function data2(key, value) {
  170614. if (typeof key === "string") {
  170615. if (arguments.length === 2) {
  170616. assertUnfrozen("data", frozen);
  170617. namespace[key] = value;
  170618. return processor;
  170619. }
  170620. return own2.call(namespace, key) && namespace[key] || null;
  170621. }
  170622. if (key) {
  170623. assertUnfrozen("data", frozen);
  170624. namespace = key;
  170625. return processor;
  170626. }
  170627. return namespace;
  170628. }
  170629. function freeze() {
  170630. if (frozen) {
  170631. return processor;
  170632. }
  170633. while (++freezeIndex < attachers.length) {
  170634. const [attacher, ...options] = attachers[freezeIndex];
  170635. if (options[0] === false) {
  170636. continue;
  170637. }
  170638. if (options[0] === true) {
  170639. options[1] = void 0;
  170640. }
  170641. const transformer = attacher.call(processor, ...options);
  170642. if (typeof transformer === "function") {
  170643. transformers.use(transformer);
  170644. }
  170645. }
  170646. frozen = true;
  170647. freezeIndex = Number.POSITIVE_INFINITY;
  170648. return processor;
  170649. }
  170650. function use(value, ...options) {
  170651. let settings;
  170652. assertUnfrozen("use", frozen);
  170653. if (value === null || value === void 0) {
  170654. } else if (typeof value === "function") {
  170655. addPlugin(value, ...options);
  170656. } else if (typeof value === "object") {
  170657. if (Array.isArray(value)) {
  170658. addList(value);
  170659. } else {
  170660. addPreset(value);
  170661. }
  170662. } else {
  170663. throw new TypeError("Expected usable value, not `" + value + "`");
  170664. }
  170665. if (settings) {
  170666. namespace.settings = Object.assign(namespace.settings || {}, settings);
  170667. }
  170668. return processor;
  170669. function add(value2) {
  170670. if (typeof value2 === "function") {
  170671. addPlugin(value2);
  170672. } else if (typeof value2 === "object") {
  170673. if (Array.isArray(value2)) {
  170674. const [plugin2, ...options2] = value2;
  170675. addPlugin(plugin2, ...options2);
  170676. } else {
  170677. addPreset(value2);
  170678. }
  170679. } else {
  170680. throw new TypeError("Expected usable value, not `" + value2 + "`");
  170681. }
  170682. }
  170683. function addPreset(result) {
  170684. addList(result.plugins);
  170685. if (result.settings) {
  170686. settings = Object.assign(settings || {}, result.settings);
  170687. }
  170688. }
  170689. function addList(plugins) {
  170690. let index2 = -1;
  170691. if (plugins === null || plugins === void 0) {
  170692. } else if (Array.isArray(plugins)) {
  170693. while (++index2 < plugins.length) {
  170694. const thing = plugins[index2];
  170695. add(thing);
  170696. }
  170697. } else {
  170698. throw new TypeError("Expected a list of plugins, not `" + plugins + "`");
  170699. }
  170700. }
  170701. function addPlugin(plugin2, value2) {
  170702. let index2 = -1;
  170703. let entry;
  170704. while (++index2 < attachers.length) {
  170705. if (attachers[index2][0] === plugin2) {
  170706. entry = attachers[index2];
  170707. break;
  170708. }
  170709. }
  170710. if (entry) {
  170711. if (isPlainObject(entry[1]) && isPlainObject(value2)) {
  170712. value2 = (0, import_extend.default)(true, entry[1], value2);
  170713. }
  170714. entry[1] = value2;
  170715. } else {
  170716. attachers.push([...arguments]);
  170717. }
  170718. }
  170719. }
  170720. function parse4(doc) {
  170721. processor.freeze();
  170722. const file = vfile(doc);
  170723. const Parser3 = processor.Parser;
  170724. assertParser("parse", Parser3);
  170725. if (newable(Parser3, "parse")) {
  170726. return new Parser3(String(file), file).parse();
  170727. }
  170728. return Parser3(String(file), file);
  170729. }
  170730. function stringify4(node, doc) {
  170731. processor.freeze();
  170732. const file = vfile(doc);
  170733. const Compiler = processor.Compiler;
  170734. assertCompiler("stringify", Compiler);
  170735. assertNode(node);
  170736. if (newable(Compiler, "compile")) {
  170737. return new Compiler(node, file).compile();
  170738. }
  170739. return Compiler(node, file);
  170740. }
  170741. function run(node, doc, callback) {
  170742. assertNode(node);
  170743. processor.freeze();
  170744. if (!callback && typeof doc === "function") {
  170745. callback = doc;
  170746. doc = void 0;
  170747. }
  170748. if (!callback) {
  170749. return new Promise(executor);
  170750. }
  170751. executor(null, callback);
  170752. function executor(resolve, reject) {
  170753. transformers.run(node, vfile(doc), done);
  170754. function done(error, tree, file) {
  170755. tree = tree || node;
  170756. if (error) {
  170757. reject(error);
  170758. } else if (resolve) {
  170759. resolve(tree);
  170760. } else {
  170761. callback(null, tree, file);
  170762. }
  170763. }
  170764. }
  170765. }
  170766. function runSync(node, file) {
  170767. let result;
  170768. let complete;
  170769. processor.run(node, file, done);
  170770. assertDone("runSync", "run", complete);
  170771. return result;
  170772. function done(error, tree) {
  170773. bail(error);
  170774. result = tree;
  170775. complete = true;
  170776. }
  170777. }
  170778. function process3(doc, callback) {
  170779. processor.freeze();
  170780. assertParser("process", processor.Parser);
  170781. assertCompiler("process", processor.Compiler);
  170782. if (!callback) {
  170783. return new Promise(executor);
  170784. }
  170785. executor(null, callback);
  170786. function executor(resolve, reject) {
  170787. const file = vfile(doc);
  170788. processor.run(processor.parse(file), file, (error, tree, file2) => {
  170789. if (error || !tree || !file2) {
  170790. done(error);
  170791. } else {
  170792. const result = processor.stringify(tree, file2);
  170793. if (result === void 0 || result === null) {
  170794. } else if (looksLikeAVFileValue(result)) {
  170795. file2.value = result;
  170796. } else {
  170797. file2.result = result;
  170798. }
  170799. done(error, file2);
  170800. }
  170801. });
  170802. function done(error, file2) {
  170803. if (error || !file2) {
  170804. reject(error);
  170805. } else if (resolve) {
  170806. resolve(file2);
  170807. } else {
  170808. callback(null, file2);
  170809. }
  170810. }
  170811. }
  170812. }
  170813. function processSync(doc) {
  170814. let complete;
  170815. processor.freeze();
  170816. assertParser("processSync", processor.Parser);
  170817. assertCompiler("processSync", processor.Compiler);
  170818. const file = vfile(doc);
  170819. processor.process(file, done);
  170820. assertDone("processSync", "process", complete);
  170821. return file;
  170822. function done(error) {
  170823. complete = true;
  170824. bail(error);
  170825. }
  170826. }
  170827. }
  170828. function newable(value, name2) {
  170829. return typeof value === "function" && value.prototype && (keys(value.prototype) || name2 in value.prototype);
  170830. }
  170831. function keys(value) {
  170832. let key;
  170833. for (key in value) {
  170834. if (own2.call(value, key)) {
  170835. return true;
  170836. }
  170837. }
  170838. return false;
  170839. }
  170840. function assertParser(name2, value) {
  170841. if (typeof value !== "function") {
  170842. throw new TypeError("Cannot `" + name2 + "` without `Parser`");
  170843. }
  170844. }
  170845. function assertCompiler(name2, value) {
  170846. if (typeof value !== "function") {
  170847. throw new TypeError("Cannot `" + name2 + "` without `Compiler`");
  170848. }
  170849. }
  170850. function assertUnfrozen(name2, frozen) {
  170851. if (frozen) {
  170852. throw new Error(
  170853. "Cannot call `" + name2 + "` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`."
  170854. );
  170855. }
  170856. }
  170857. function assertNode(node) {
  170858. if (!isPlainObject(node) || typeof node.type !== "string") {
  170859. throw new TypeError("Expected node, got `" + node + "`");
  170860. }
  170861. }
  170862. function assertDone(name2, asyncName, complete) {
  170863. if (!complete) {
  170864. throw new Error(
  170865. "`" + name2 + "` finished async. Use `" + asyncName + "` instead"
  170866. );
  170867. }
  170868. }
  170869. function vfile(value) {
  170870. return looksLikeAVFile(value) ? value : new VFile(value);
  170871. }
  170872. function looksLikeAVFile(value) {
  170873. return Boolean(
  170874. value && typeof value === "object" && "message" in value && "messages" in value
  170875. );
  170876. }
  170877. function looksLikeAVFileValue(value) {
  170878. return typeof value === "string" || (0, import_is_buffer2.default)(value);
  170879. }
  170880. // node_modules/acorn/dist/acorn.mjs
  170881. var reservedWords = {
  170882. 3: "abstract boolean byte char class double enum export extends final float goto implements import int interface long native package private protected public short static super synchronized throws transient volatile",
  170883. 5: "class enum extends super const export import",
  170884. 6: "enum",
  170885. strict: "implements interface let package private protected public static yield",
  170886. strictBind: "eval arguments"
  170887. };
  170888. var ecma5AndLessKeywords = "break case catch continue debugger default do else finally for function if return switch throw try var while with null true false instanceof typeof void delete new in this";
  170889. var keywords$1 = {
  170890. 5: ecma5AndLessKeywords,
  170891. "5module": ecma5AndLessKeywords + " export import",
  170892. 6: ecma5AndLessKeywords + " const class extends export import super"
  170893. };
  170894. var keywordRelationalOperator = /^in(stanceof)?$/;
  170895. var nonASCIIidentifierStartChars = "\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u0870-\u0887\u0889-\u088E\u08A0-\u08C9\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C5D\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u1711\u171F-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1878\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4C\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309B-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u31BF\u31F0-\u31FF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7CA\uA7D0\uA7D1\uA7D3\uA7D5-\uA7D9\uA7F2-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC";
  170896. var nonASCIIidentifierChars = "\u200C\u200D\xB7\u0300-\u036F\u0387\u0483-\u0487\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u0669\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u06F0-\u06F9\u0711\u0730-\u074A\u07A6-\u07B0\u07C0-\u07C9\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u0898-\u089F\u08CA-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0966-\u096F\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u09E6-\u09EF\u09FE\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A66-\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0AE6-\u0AEF\u0AFA-\u0AFF\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B55-\u0B57\u0B62\u0B63\u0B66-\u0B6F\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0BE6-\u0BEF\u0C00-\u0C04\u0C3C\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C66-\u0C6F\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0CE6-\u0CEF\u0D00-\u0D03\u0D3B\u0D3C\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D66-\u0D6F\u0D81-\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0E50-\u0E59\u0EB1\u0EB4-\u0EBC\u0EC8-\u0ECD\u0ED0-\u0ED9\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1040-\u1049\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F-\u109D\u135D-\u135F\u1369-\u1371\u1712-\u1715\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u17E0-\u17E9\u180B-\u180D\u180F-\u1819\u18A9\u1920-\u192B\u1930-\u193B\u1946-\u194F\u19D0-\u19DA\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AB0-\u1ABD\u1ABF-\u1ACE\u1B00-\u1B04\u1B34-\u1B44\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BB0-\u1BB9\u1BE6-\u1BF3\u1C24-\u1C37\u1C40-\u1C49\u1C50-\u1C59\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF4\u1CF7-\u1CF9\u1DC0-\u1DFF\u203F\u2040\u2054\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA620-\uA629\uA66F\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA82C\uA880\uA881\uA8B4-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F1\uA8FF-\uA909\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9D0-\uA9D9\uA9E5\uA9F0-\uA9F9\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA50-\uAA59\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uABF0-\uABF9\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFF10-\uFF19\uFF3F";
  170897. var nonASCIIidentifierStart = new RegExp("[" + nonASCIIidentifierStartChars + "]");
  170898. var nonASCIIidentifier = new RegExp("[" + nonASCIIidentifierStartChars + nonASCIIidentifierChars + "]");
  170899. nonASCIIidentifierStartChars = nonASCIIidentifierChars = null;
  170900. var astralIdentifierStartCodes = [0, 11, 2, 25, 2, 18, 2, 1, 2, 14, 3, 13, 35, 122, 70, 52, 268, 28, 4, 48, 48, 31, 14, 29, 6, 37, 11, 29, 3, 35, 5, 7, 2, 4, 43, 157, 19, 35, 5, 35, 5, 39, 9, 51, 13, 10, 2, 14, 2, 6, 2, 1, 2, 10, 2, 14, 2, 6, 2, 1, 68, 310, 10, 21, 11, 7, 25, 5, 2, 41, 2, 8, 70, 5, 3, 0, 2, 43, 2, 1, 4, 0, 3, 22, 11, 22, 10, 30, 66, 18, 2, 1, 11, 21, 11, 25, 71, 55, 7, 1, 65, 0, 16, 3, 2, 2, 2, 28, 43, 28, 4, 28, 36, 7, 2, 27, 28, 53, 11, 21, 11, 18, 14, 17, 111, 72, 56, 50, 14, 50, 14, 35, 349, 41, 7, 1, 79, 28, 11, 0, 9, 21, 43, 17, 47, 20, 28, 22, 13, 52, 58, 1, 3, 0, 14, 44, 33, 24, 27, 35, 30, 0, 3, 0, 9, 34, 4, 0, 13, 47, 15, 3, 22, 0, 2, 0, 36, 17, 2, 24, 85, 6, 2, 0, 2, 3, 2, 14, 2, 9, 8, 46, 39, 7, 3, 1, 3, 21, 2, 6, 2, 1, 2, 4, 4, 0, 19, 0, 13, 4, 159, 52, 19, 3, 21, 2, 31, 47, 21, 1, 2, 0, 185, 46, 42, 3, 37, 47, 21, 0, 60, 42, 14, 0, 72, 26, 38, 6, 186, 43, 117, 63, 32, 7, 3, 0, 3, 7, 2, 1, 2, 23, 16, 0, 2, 0, 95, 7, 3, 38, 17, 0, 2, 0, 29, 0, 11, 39, 8, 0, 22, 0, 12, 45, 20, 0, 19, 72, 264, 8, 2, 36, 18, 0, 50, 29, 113, 6, 2, 1, 2, 37, 22, 0, 26, 5, 2, 1, 2, 31, 15, 0, 328, 18, 190, 0, 80, 921, 103, 110, 18, 195, 2637, 96, 16, 1070, 4050, 582, 8634, 568, 8, 30, 18, 78, 18, 29, 19, 47, 17, 3, 32, 20, 6, 18, 689, 63, 129, 74, 6, 0, 67, 12, 65, 1, 2, 0, 29, 6135, 9, 1237, 43, 8, 8936, 3, 2, 6, 2, 1, 2, 290, 46, 2, 18, 3, 9, 395, 2309, 106, 6, 12, 4, 8, 8, 9, 5991, 84, 2, 70, 2, 1, 3, 0, 3, 1, 3, 3, 2, 11, 2, 0, 2, 6, 2, 64, 2, 3, 3, 7, 2, 6, 2, 27, 2, 3, 2, 4, 2, 0, 4, 6, 2, 339, 3, 24, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 7, 1845, 30, 482, 44, 11, 6, 17, 0, 322, 29, 19, 43, 1269, 6, 2, 3, 2, 1, 2, 14, 2, 196, 60, 67, 8, 0, 1205, 3, 2, 26, 2, 1, 2, 0, 3, 0, 2, 9, 2, 3, 2, 0, 2, 0, 7, 0, 5, 0, 2, 0, 2, 0, 2, 2, 2, 1, 2, 0, 3, 0, 2, 0, 2, 0, 2, 0, 2, 0, 2, 1, 2, 0, 3, 3, 2, 6, 2, 3, 2, 3, 2, 0, 2, 9, 2, 16, 6, 2, 2, 4, 2, 16, 4421, 42719, 33, 4152, 8, 221, 3, 5761, 15, 7472, 3104, 541, 1507, 4938];
  170901. var astralIdentifierCodes = [509, 0, 227, 0, 150, 4, 294, 9, 1368, 2, 2, 1, 6, 3, 41, 2, 5, 0, 166, 1, 574, 3, 9, 9, 370, 1, 154, 10, 50, 3, 123, 2, 54, 14, 32, 10, 3, 1, 11, 3, 46, 10, 8, 0, 46, 9, 7, 2, 37, 13, 2, 9, 6, 1, 45, 0, 13, 2, 49, 13, 9, 3, 2, 11, 83, 11, 7, 0, 161, 11, 6, 9, 7, 3, 56, 1, 2, 6, 3, 1, 3, 2, 10, 0, 11, 1, 3, 6, 4, 4, 193, 17, 10, 9, 5, 0, 82, 19, 13, 9, 214, 6, 3, 8, 28, 1, 83, 16, 16, 9, 82, 12, 9, 9, 84, 14, 5, 9, 243, 14, 166, 9, 71, 5, 2, 1, 3, 3, 2, 0, 2, 1, 13, 9, 120, 6, 3, 6, 4, 0, 29, 9, 41, 6, 2, 3, 9, 0, 10, 10, 47, 15, 406, 7, 2, 7, 17, 9, 57, 21, 2, 13, 123, 5, 4, 0, 2, 1, 2, 6, 2, 0, 9, 9, 49, 4, 2, 1, 2, 4, 9, 9, 330, 3, 19306, 9, 87, 9, 39, 4, 60, 6, 26, 9, 1014, 0, 2, 54, 8, 3, 82, 0, 12, 1, 19628, 1, 4706, 45, 3, 22, 543, 4, 4, 5, 9, 7, 3, 6, 31, 3, 149, 2, 1418, 49, 513, 54, 5, 49, 9, 0, 15, 0, 23, 4, 2, 14, 1361, 6, 2, 16, 3, 6, 2, 1, 2, 4, 262, 6, 10, 9, 357, 0, 62, 13, 1495, 6, 110, 6, 6, 9, 4759, 9, 787719, 239];
  170902. function isInAstralSet(code2, set) {
  170903. var pos = 65536;
  170904. for (var i = 0; i < set.length; i += 2) {
  170905. pos += set[i];
  170906. if (pos > code2) {
  170907. return false;
  170908. }
  170909. pos += set[i + 1];
  170910. if (pos >= code2) {
  170911. return true;
  170912. }
  170913. }
  170914. }
  170915. function isIdentifierStart(code2, astral) {
  170916. if (code2 < 65) {
  170917. return code2 === 36;
  170918. }
  170919. if (code2 < 91) {
  170920. return true;
  170921. }
  170922. if (code2 < 97) {
  170923. return code2 === 95;
  170924. }
  170925. if (code2 < 123) {
  170926. return true;
  170927. }
  170928. if (code2 <= 65535) {
  170929. return code2 >= 170 && nonASCIIidentifierStart.test(String.fromCharCode(code2));
  170930. }
  170931. if (astral === false) {
  170932. return false;
  170933. }
  170934. return isInAstralSet(code2, astralIdentifierStartCodes);
  170935. }
  170936. function isIdentifierChar(code2, astral) {
  170937. if (code2 < 48) {
  170938. return code2 === 36;
  170939. }
  170940. if (code2 < 58) {
  170941. return true;
  170942. }
  170943. if (code2 < 65) {
  170944. return false;
  170945. }
  170946. if (code2 < 91) {
  170947. return true;
  170948. }
  170949. if (code2 < 97) {
  170950. return code2 === 95;
  170951. }
  170952. if (code2 < 123) {
  170953. return true;
  170954. }
  170955. if (code2 <= 65535) {
  170956. return code2 >= 170 && nonASCIIidentifier.test(String.fromCharCode(code2));
  170957. }
  170958. if (astral === false) {
  170959. return false;
  170960. }
  170961. return isInAstralSet(code2, astralIdentifierStartCodes) || isInAstralSet(code2, astralIdentifierCodes);
  170962. }
  170963. var TokenType = function TokenType2(label, conf) {
  170964. if (conf === void 0)
  170965. conf = {};
  170966. this.label = label;
  170967. this.keyword = conf.keyword;
  170968. this.beforeExpr = !!conf.beforeExpr;
  170969. this.startsExpr = !!conf.startsExpr;
  170970. this.isLoop = !!conf.isLoop;
  170971. this.isAssign = !!conf.isAssign;
  170972. this.prefix = !!conf.prefix;
  170973. this.postfix = !!conf.postfix;
  170974. this.binop = conf.binop || null;
  170975. this.updateContext = null;
  170976. };
  170977. function binop(name2, prec) {
  170978. return new TokenType(name2, { beforeExpr: true, binop: prec });
  170979. }
  170980. var beforeExpr = { beforeExpr: true };
  170981. var startsExpr = { startsExpr: true };
  170982. var keywords = {};
  170983. function kw(name2, options) {
  170984. if (options === void 0)
  170985. options = {};
  170986. options.keyword = name2;
  170987. return keywords[name2] = new TokenType(name2, options);
  170988. }
  170989. var types$1 = {
  170990. num: new TokenType("num", startsExpr),
  170991. regexp: new TokenType("regexp", startsExpr),
  170992. string: new TokenType("string", startsExpr),
  170993. name: new TokenType("name", startsExpr),
  170994. privateId: new TokenType("privateId", startsExpr),
  170995. eof: new TokenType("eof"),
  170996. bracketL: new TokenType("[", { beforeExpr: true, startsExpr: true }),
  170997. bracketR: new TokenType("]"),
  170998. braceL: new TokenType("{", { beforeExpr: true, startsExpr: true }),
  170999. braceR: new TokenType("}"),
  171000. parenL: new TokenType("(", { beforeExpr: true, startsExpr: true }),
  171001. parenR: new TokenType(")"),
  171002. comma: new TokenType(",", beforeExpr),
  171003. semi: new TokenType(";", beforeExpr),
  171004. colon: new TokenType(":", beforeExpr),
  171005. dot: new TokenType("."),
  171006. question: new TokenType("?", beforeExpr),
  171007. questionDot: new TokenType("?."),
  171008. arrow: new TokenType("=>", beforeExpr),
  171009. template: new TokenType("template"),
  171010. invalidTemplate: new TokenType("invalidTemplate"),
  171011. ellipsis: new TokenType("...", beforeExpr),
  171012. backQuote: new TokenType("`", startsExpr),
  171013. dollarBraceL: new TokenType("${", { beforeExpr: true, startsExpr: true }),
  171014. eq: new TokenType("=", { beforeExpr: true, isAssign: true }),
  171015. assign: new TokenType("_=", { beforeExpr: true, isAssign: true }),
  171016. incDec: new TokenType("++/--", { prefix: true, postfix: true, startsExpr: true }),
  171017. prefix: new TokenType("!/~", { beforeExpr: true, prefix: true, startsExpr: true }),
  171018. logicalOR: binop("||", 1),
  171019. logicalAND: binop("&&", 2),
  171020. bitwiseOR: binop("|", 3),
  171021. bitwiseXOR: binop("^", 4),
  171022. bitwiseAND: binop("&", 5),
  171023. equality: binop("==/!=/===/!==", 6),
  171024. relational: binop("</>/<=/>=", 7),
  171025. bitShift: binop("<</>>/>>>", 8),
  171026. plusMin: new TokenType("+/-", { beforeExpr: true, binop: 9, prefix: true, startsExpr: true }),
  171027. modulo: binop("%", 10),
  171028. star: binop("*", 10),
  171029. slash: binop("/", 10),
  171030. starstar: new TokenType("**", { beforeExpr: true }),
  171031. coalesce: binop("??", 1),
  171032. _break: kw("break"),
  171033. _case: kw("case", beforeExpr),
  171034. _catch: kw("catch"),
  171035. _continue: kw("continue"),
  171036. _debugger: kw("debugger"),
  171037. _default: kw("default", beforeExpr),
  171038. _do: kw("do", { isLoop: true, beforeExpr: true }),
  171039. _else: kw("else", beforeExpr),
  171040. _finally: kw("finally"),
  171041. _for: kw("for", { isLoop: true }),
  171042. _function: kw("function", startsExpr),
  171043. _if: kw("if"),
  171044. _return: kw("return", beforeExpr),
  171045. _switch: kw("switch"),
  171046. _throw: kw("throw", beforeExpr),
  171047. _try: kw("try"),
  171048. _var: kw("var"),
  171049. _const: kw("const"),
  171050. _while: kw("while", { isLoop: true }),
  171051. _with: kw("with"),
  171052. _new: kw("new", { beforeExpr: true, startsExpr: true }),
  171053. _this: kw("this", startsExpr),
  171054. _super: kw("super", startsExpr),
  171055. _class: kw("class", startsExpr),
  171056. _extends: kw("extends", beforeExpr),
  171057. _export: kw("export"),
  171058. _import: kw("import", startsExpr),
  171059. _null: kw("null", startsExpr),
  171060. _true: kw("true", startsExpr),
  171061. _false: kw("false", startsExpr),
  171062. _in: kw("in", { beforeExpr: true, binop: 7 }),
  171063. _instanceof: kw("instanceof", { beforeExpr: true, binop: 7 }),
  171064. _typeof: kw("typeof", { beforeExpr: true, prefix: true, startsExpr: true }),
  171065. _void: kw("void", { beforeExpr: true, prefix: true, startsExpr: true }),
  171066. _delete: kw("delete", { beforeExpr: true, prefix: true, startsExpr: true })
  171067. };
  171068. var lineBreak = /\r\n?|\n|\u2028|\u2029/;
  171069. var lineBreakG = new RegExp(lineBreak.source, "g");
  171070. function isNewLine(code2) {
  171071. return code2 === 10 || code2 === 13 || code2 === 8232 || code2 === 8233;
  171072. }
  171073. function nextLineBreak(code2, from, end) {
  171074. if (end === void 0)
  171075. end = code2.length;
  171076. for (var i = from; i < end; i++) {
  171077. var next = code2.charCodeAt(i);
  171078. if (isNewLine(next)) {
  171079. return i < end - 1 && next === 13 && code2.charCodeAt(i + 1) === 10 ? i + 2 : i + 1;
  171080. }
  171081. }
  171082. return -1;
  171083. }
  171084. var nonASCIIwhitespace = /[\u1680\u2000-\u200a\u202f\u205f\u3000\ufeff]/;
  171085. var skipWhiteSpace = /(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g;
  171086. var ref = Object.prototype;
  171087. var hasOwnProperty = ref.hasOwnProperty;
  171088. var toString = ref.toString;
  171089. var hasOwn = Object.hasOwn || function(obj, propName) {
  171090. return hasOwnProperty.call(obj, propName);
  171091. };
  171092. var isArray = Array.isArray || function(obj) {
  171093. return toString.call(obj) === "[object Array]";
  171094. };
  171095. function wordsRegexp(words) {
  171096. return new RegExp("^(?:" + words.replace(/ /g, "|") + ")$");
  171097. }
  171098. var loneSurrogate = /(?:[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])/;
  171099. var Position = function Position2(line, col) {
  171100. this.line = line;
  171101. this.column = col;
  171102. };
  171103. Position.prototype.offset = function offset(n) {
  171104. return new Position(this.line, this.column + n);
  171105. };
  171106. var SourceLocation = function SourceLocation2(p, start3, end) {
  171107. this.start = start3;
  171108. this.end = end;
  171109. if (p.sourceFile !== null) {
  171110. this.source = p.sourceFile;
  171111. }
  171112. };
  171113. function getLineInfo(input, offset2) {
  171114. for (var line = 1, cur = 0; ; ) {
  171115. var nextBreak = nextLineBreak(input, cur, offset2);
  171116. if (nextBreak < 0) {
  171117. return new Position(line, offset2 - cur);
  171118. }
  171119. ++line;
  171120. cur = nextBreak;
  171121. }
  171122. }
  171123. var defaultOptions = {
  171124. ecmaVersion: null,
  171125. sourceType: "script",
  171126. onInsertedSemicolon: null,
  171127. onTrailingComma: null,
  171128. allowReserved: null,
  171129. allowReturnOutsideFunction: false,
  171130. allowImportExportEverywhere: false,
  171131. allowAwaitOutsideFunction: null,
  171132. allowSuperOutsideMethod: null,
  171133. allowHashBang: false,
  171134. locations: false,
  171135. onToken: null,
  171136. onComment: null,
  171137. ranges: false,
  171138. program: null,
  171139. sourceFile: null,
  171140. directSourceFile: null,
  171141. preserveParens: false
  171142. };
  171143. var warnedAboutEcmaVersion = false;
  171144. function getOptions(opts) {
  171145. var options = {};
  171146. for (var opt in defaultOptions) {
  171147. options[opt] = opts && hasOwn(opts, opt) ? opts[opt] : defaultOptions[opt];
  171148. }
  171149. if (options.ecmaVersion === "latest") {
  171150. options.ecmaVersion = 1e8;
  171151. } else if (options.ecmaVersion == null) {
  171152. if (!warnedAboutEcmaVersion && typeof console === "object" && console.warn) {
  171153. warnedAboutEcmaVersion = true;
  171154. console.warn("Since Acorn 8.0.0, options.ecmaVersion is required.\nDefaulting to 2020, but this will stop working in the future.");
  171155. }
  171156. options.ecmaVersion = 11;
  171157. } else if (options.ecmaVersion >= 2015) {
  171158. options.ecmaVersion -= 2009;
  171159. }
  171160. if (options.allowReserved == null) {
  171161. options.allowReserved = options.ecmaVersion < 5;
  171162. }
  171163. if (isArray(options.onToken)) {
  171164. var tokens = options.onToken;
  171165. options.onToken = function(token) {
  171166. return tokens.push(token);
  171167. };
  171168. }
  171169. if (isArray(options.onComment)) {
  171170. options.onComment = pushComment(options, options.onComment);
  171171. }
  171172. return options;
  171173. }
  171174. function pushComment(options, array) {
  171175. return function(block, text5, start3, end, startLoc, endLoc) {
  171176. var comment2 = {
  171177. type: block ? "Block" : "Line",
  171178. value: text5,
  171179. start: start3,
  171180. end
  171181. };
  171182. if (options.locations) {
  171183. comment2.loc = new SourceLocation(this, startLoc, endLoc);
  171184. }
  171185. if (options.ranges) {
  171186. comment2.range = [start3, end];
  171187. }
  171188. array.push(comment2);
  171189. };
  171190. }
  171191. var SCOPE_TOP = 1;
  171192. var SCOPE_FUNCTION = 2;
  171193. var SCOPE_ASYNC = 4;
  171194. var SCOPE_GENERATOR = 8;
  171195. var SCOPE_ARROW = 16;
  171196. var SCOPE_SIMPLE_CATCH = 32;
  171197. var SCOPE_SUPER = 64;
  171198. var SCOPE_DIRECT_SUPER = 128;
  171199. var SCOPE_CLASS_STATIC_BLOCK = 256;
  171200. var SCOPE_VAR = SCOPE_TOP | SCOPE_FUNCTION | SCOPE_CLASS_STATIC_BLOCK;
  171201. function functionFlags(async, generator) {
  171202. return SCOPE_FUNCTION | (async ? SCOPE_ASYNC : 0) | (generator ? SCOPE_GENERATOR : 0);
  171203. }
  171204. var BIND_NONE = 0;
  171205. var BIND_VAR = 1;
  171206. var BIND_LEXICAL = 2;
  171207. var BIND_FUNCTION = 3;
  171208. var BIND_SIMPLE_CATCH = 4;
  171209. var BIND_OUTSIDE = 5;
  171210. var Parser = function Parser2(options, input, startPos) {
  171211. this.options = options = getOptions(options);
  171212. this.sourceFile = options.sourceFile;
  171213. this.keywords = wordsRegexp(keywords$1[options.ecmaVersion >= 6 ? 6 : options.sourceType === "module" ? "5module" : 5]);
  171214. var reserved = "";
  171215. if (options.allowReserved !== true) {
  171216. reserved = reservedWords[options.ecmaVersion >= 6 ? 6 : options.ecmaVersion === 5 ? 5 : 3];
  171217. if (options.sourceType === "module") {
  171218. reserved += " await";
  171219. }
  171220. }
  171221. this.reservedWords = wordsRegexp(reserved);
  171222. var reservedStrict = (reserved ? reserved + " " : "") + reservedWords.strict;
  171223. this.reservedWordsStrict = wordsRegexp(reservedStrict);
  171224. this.reservedWordsStrictBind = wordsRegexp(reservedStrict + " " + reservedWords.strictBind);
  171225. this.input = String(input);
  171226. this.containsEsc = false;
  171227. if (startPos) {
  171228. this.pos = startPos;
  171229. this.lineStart = this.input.lastIndexOf("\n", startPos - 1) + 1;
  171230. this.curLine = this.input.slice(0, this.lineStart).split(lineBreak).length;
  171231. } else {
  171232. this.pos = this.lineStart = 0;
  171233. this.curLine = 1;
  171234. }
  171235. this.type = types$1.eof;
  171236. this.value = null;
  171237. this.start = this.end = this.pos;
  171238. this.startLoc = this.endLoc = this.curPosition();
  171239. this.lastTokEndLoc = this.lastTokStartLoc = null;
  171240. this.lastTokStart = this.lastTokEnd = this.pos;
  171241. this.context = this.initialContext();
  171242. this.exprAllowed = true;
  171243. this.inModule = options.sourceType === "module";
  171244. this.strict = this.inModule || this.strictDirective(this.pos);
  171245. this.potentialArrowAt = -1;
  171246. this.potentialArrowInForAwait = false;
  171247. this.yieldPos = this.awaitPos = this.awaitIdentPos = 0;
  171248. this.labels = [];
  171249. this.undefinedExports = /* @__PURE__ */ Object.create(null);
  171250. if (this.pos === 0 && options.allowHashBang && this.input.slice(0, 2) === "#!") {
  171251. this.skipLineComment(2);
  171252. }
  171253. this.scopeStack = [];
  171254. this.enterScope(SCOPE_TOP);
  171255. this.regexpState = null;
  171256. this.privateNameStack = [];
  171257. };
  171258. var prototypeAccessors = { inFunction: { configurable: true }, inGenerator: { configurable: true }, inAsync: { configurable: true }, canAwait: { configurable: true }, allowSuper: { configurable: true }, allowDirectSuper: { configurable: true }, treatFunctionsAsVar: { configurable: true }, allowNewDotTarget: { configurable: true }, inClassStaticBlock: { configurable: true } };
  171259. Parser.prototype.parse = function parse() {
  171260. var node = this.options.program || this.startNode();
  171261. this.nextToken();
  171262. return this.parseTopLevel(node);
  171263. };
  171264. prototypeAccessors.inFunction.get = function() {
  171265. return (this.currentVarScope().flags & SCOPE_FUNCTION) > 0;
  171266. };
  171267. prototypeAccessors.inGenerator.get = function() {
  171268. return (this.currentVarScope().flags & SCOPE_GENERATOR) > 0 && !this.currentVarScope().inClassFieldInit;
  171269. };
  171270. prototypeAccessors.inAsync.get = function() {
  171271. return (this.currentVarScope().flags & SCOPE_ASYNC) > 0 && !this.currentVarScope().inClassFieldInit;
  171272. };
  171273. prototypeAccessors.canAwait.get = function() {
  171274. for (var i = this.scopeStack.length - 1; i >= 0; i--) {
  171275. var scope = this.scopeStack[i];
  171276. if (scope.inClassFieldInit || scope.flags & SCOPE_CLASS_STATIC_BLOCK) {
  171277. return false;
  171278. }
  171279. if (scope.flags & SCOPE_FUNCTION) {
  171280. return (scope.flags & SCOPE_ASYNC) > 0;
  171281. }
  171282. }
  171283. return this.inModule && this.options.ecmaVersion >= 13 || this.options.allowAwaitOutsideFunction;
  171284. };
  171285. prototypeAccessors.allowSuper.get = function() {
  171286. var ref2 = this.currentThisScope();
  171287. var flags = ref2.flags;
  171288. var inClassFieldInit = ref2.inClassFieldInit;
  171289. return (flags & SCOPE_SUPER) > 0 || inClassFieldInit || this.options.allowSuperOutsideMethod;
  171290. };
  171291. prototypeAccessors.allowDirectSuper.get = function() {
  171292. return (this.currentThisScope().flags & SCOPE_DIRECT_SUPER) > 0;
  171293. };
  171294. prototypeAccessors.treatFunctionsAsVar.get = function() {
  171295. return this.treatFunctionsAsVarInScope(this.currentScope());
  171296. };
  171297. prototypeAccessors.allowNewDotTarget.get = function() {
  171298. var ref2 = this.currentThisScope();
  171299. var flags = ref2.flags;
  171300. var inClassFieldInit = ref2.inClassFieldInit;
  171301. return (flags & (SCOPE_FUNCTION | SCOPE_CLASS_STATIC_BLOCK)) > 0 || inClassFieldInit;
  171302. };
  171303. prototypeAccessors.inClassStaticBlock.get = function() {
  171304. return (this.currentVarScope().flags & SCOPE_CLASS_STATIC_BLOCK) > 0;
  171305. };
  171306. Parser.extend = function extend2() {
  171307. var plugins = [], len = arguments.length;
  171308. while (len--)
  171309. plugins[len] = arguments[len];
  171310. var cls = this;
  171311. for (var i = 0; i < plugins.length; i++) {
  171312. cls = plugins[i](cls);
  171313. }
  171314. return cls;
  171315. };
  171316. Parser.parse = function parse2(input, options) {
  171317. return new this(options, input).parse();
  171318. };
  171319. Parser.parseExpressionAt = function parseExpressionAt(input, pos, options) {
  171320. var parser = new this(options, input, pos);
  171321. parser.nextToken();
  171322. return parser.parseExpression();
  171323. };
  171324. Parser.tokenizer = function tokenizer(input, options) {
  171325. return new this(options, input);
  171326. };
  171327. Object.defineProperties(Parser.prototype, prototypeAccessors);
  171328. var pp$9 = Parser.prototype;
  171329. var literal = /^(?:'((?:\\.|[^'\\])*?)'|"((?:\\.|[^"\\])*?)")/;
  171330. pp$9.strictDirective = function(start3) {
  171331. for (; ; ) {
  171332. skipWhiteSpace.lastIndex = start3;
  171333. start3 += skipWhiteSpace.exec(this.input)[0].length;
  171334. var match = literal.exec(this.input.slice(start3));
  171335. if (!match) {
  171336. return false;
  171337. }
  171338. if ((match[1] || match[2]) === "use strict") {
  171339. skipWhiteSpace.lastIndex = start3 + match[0].length;
  171340. var spaceAfter = skipWhiteSpace.exec(this.input), end = spaceAfter.index + spaceAfter[0].length;
  171341. var next = this.input.charAt(end);
  171342. return next === ";" || next === "}" || lineBreak.test(spaceAfter[0]) && !(/[(`.[+\-/*%<>=,?^&]/.test(next) || next === "!" && this.input.charAt(end + 1) === "=");
  171343. }
  171344. start3 += match[0].length;
  171345. skipWhiteSpace.lastIndex = start3;
  171346. start3 += skipWhiteSpace.exec(this.input)[0].length;
  171347. if (this.input[start3] === ";") {
  171348. start3++;
  171349. }
  171350. }
  171351. };
  171352. pp$9.eat = function(type) {
  171353. if (this.type === type) {
  171354. this.next();
  171355. return true;
  171356. } else {
  171357. return false;
  171358. }
  171359. };
  171360. pp$9.isContextual = function(name2) {
  171361. return this.type === types$1.name && this.value === name2 && !this.containsEsc;
  171362. };
  171363. pp$9.eatContextual = function(name2) {
  171364. if (!this.isContextual(name2)) {
  171365. return false;
  171366. }
  171367. this.next();
  171368. return true;
  171369. };
  171370. pp$9.expectContextual = function(name2) {
  171371. if (!this.eatContextual(name2)) {
  171372. this.unexpected();
  171373. }
  171374. };
  171375. pp$9.canInsertSemicolon = function() {
  171376. return this.type === types$1.eof || this.type === types$1.braceR || lineBreak.test(this.input.slice(this.lastTokEnd, this.start));
  171377. };
  171378. pp$9.insertSemicolon = function() {
  171379. if (this.canInsertSemicolon()) {
  171380. if (this.options.onInsertedSemicolon) {
  171381. this.options.onInsertedSemicolon(this.lastTokEnd, this.lastTokEndLoc);
  171382. }
  171383. return true;
  171384. }
  171385. };
  171386. pp$9.semicolon = function() {
  171387. if (!this.eat(types$1.semi) && !this.insertSemicolon()) {
  171388. this.unexpected();
  171389. }
  171390. };
  171391. pp$9.afterTrailingComma = function(tokType, notNext) {
  171392. if (this.type === tokType) {
  171393. if (this.options.onTrailingComma) {
  171394. this.options.onTrailingComma(this.lastTokStart, this.lastTokStartLoc);
  171395. }
  171396. if (!notNext) {
  171397. this.next();
  171398. }
  171399. return true;
  171400. }
  171401. };
  171402. pp$9.expect = function(type) {
  171403. this.eat(type) || this.unexpected();
  171404. };
  171405. pp$9.unexpected = function(pos) {
  171406. this.raise(pos != null ? pos : this.start, "Unexpected token");
  171407. };
  171408. function DestructuringErrors() {
  171409. this.shorthandAssign = this.trailingComma = this.parenthesizedAssign = this.parenthesizedBind = this.doubleProto = -1;
  171410. }
  171411. pp$9.checkPatternErrors = function(refDestructuringErrors, isAssign) {
  171412. if (!refDestructuringErrors) {
  171413. return;
  171414. }
  171415. if (refDestructuringErrors.trailingComma > -1) {
  171416. this.raiseRecoverable(refDestructuringErrors.trailingComma, "Comma is not permitted after the rest element");
  171417. }
  171418. var parens = isAssign ? refDestructuringErrors.parenthesizedAssign : refDestructuringErrors.parenthesizedBind;
  171419. if (parens > -1) {
  171420. this.raiseRecoverable(parens, "Parenthesized pattern");
  171421. }
  171422. };
  171423. pp$9.checkExpressionErrors = function(refDestructuringErrors, andThrow) {
  171424. if (!refDestructuringErrors) {
  171425. return false;
  171426. }
  171427. var shorthandAssign = refDestructuringErrors.shorthandAssign;
  171428. var doubleProto = refDestructuringErrors.doubleProto;
  171429. if (!andThrow) {
  171430. return shorthandAssign >= 0 || doubleProto >= 0;
  171431. }
  171432. if (shorthandAssign >= 0) {
  171433. this.raise(shorthandAssign, "Shorthand property assignments are valid only in destructuring patterns");
  171434. }
  171435. if (doubleProto >= 0) {
  171436. this.raiseRecoverable(doubleProto, "Redefinition of __proto__ property");
  171437. }
  171438. };
  171439. pp$9.checkYieldAwaitInDefaultParams = function() {
  171440. if (this.yieldPos && (!this.awaitPos || this.yieldPos < this.awaitPos)) {
  171441. this.raise(this.yieldPos, "Yield expression cannot be a default value");
  171442. }
  171443. if (this.awaitPos) {
  171444. this.raise(this.awaitPos, "Await expression cannot be a default value");
  171445. }
  171446. };
  171447. pp$9.isSimpleAssignTarget = function(expr) {
  171448. if (expr.type === "ParenthesizedExpression") {
  171449. return this.isSimpleAssignTarget(expr.expression);
  171450. }
  171451. return expr.type === "Identifier" || expr.type === "MemberExpression";
  171452. };
  171453. var pp$8 = Parser.prototype;
  171454. pp$8.parseTopLevel = function(node) {
  171455. var exports = /* @__PURE__ */ Object.create(null);
  171456. if (!node.body) {
  171457. node.body = [];
  171458. }
  171459. while (this.type !== types$1.eof) {
  171460. var stmt = this.parseStatement(null, true, exports);
  171461. node.body.push(stmt);
  171462. }
  171463. if (this.inModule) {
  171464. for (var i = 0, list3 = Object.keys(this.undefinedExports); i < list3.length; i += 1) {
  171465. var name2 = list3[i];
  171466. this.raiseRecoverable(this.undefinedExports[name2].start, "Export '" + name2 + "' is not defined");
  171467. }
  171468. }
  171469. this.adaptDirectivePrologue(node.body);
  171470. this.next();
  171471. node.sourceType = this.options.sourceType;
  171472. return this.finishNode(node, "Program");
  171473. };
  171474. var loopLabel = { kind: "loop" };
  171475. var switchLabel = { kind: "switch" };
  171476. pp$8.isLet = function(context) {
  171477. if (this.options.ecmaVersion < 6 || !this.isContextual("let")) {
  171478. return false;
  171479. }
  171480. skipWhiteSpace.lastIndex = this.pos;
  171481. var skip = skipWhiteSpace.exec(this.input);
  171482. var next = this.pos + skip[0].length, nextCh = this.input.charCodeAt(next);
  171483. if (nextCh === 91 || nextCh === 92 || nextCh > 55295 && nextCh < 56320) {
  171484. return true;
  171485. }
  171486. if (context) {
  171487. return false;
  171488. }
  171489. if (nextCh === 123) {
  171490. return true;
  171491. }
  171492. if (isIdentifierStart(nextCh, true)) {
  171493. var pos = next + 1;
  171494. while (isIdentifierChar(nextCh = this.input.charCodeAt(pos), true)) {
  171495. ++pos;
  171496. }
  171497. if (nextCh === 92 || nextCh > 55295 && nextCh < 56320) {
  171498. return true;
  171499. }
  171500. var ident = this.input.slice(next, pos);
  171501. if (!keywordRelationalOperator.test(ident)) {
  171502. return true;
  171503. }
  171504. }
  171505. return false;
  171506. };
  171507. pp$8.isAsyncFunction = function() {
  171508. if (this.options.ecmaVersion < 8 || !this.isContextual("async")) {
  171509. return false;
  171510. }
  171511. skipWhiteSpace.lastIndex = this.pos;
  171512. var skip = skipWhiteSpace.exec(this.input);
  171513. var next = this.pos + skip[0].length, after;
  171514. return !lineBreak.test(this.input.slice(this.pos, next)) && this.input.slice(next, next + 8) === "function" && (next + 8 === this.input.length || !(isIdentifierChar(after = this.input.charCodeAt(next + 8)) || after > 55295 && after < 56320));
  171515. };
  171516. pp$8.parseStatement = function(context, topLevel, exports) {
  171517. var starttype = this.type, node = this.startNode(), kind;
  171518. if (this.isLet(context)) {
  171519. starttype = types$1._var;
  171520. kind = "let";
  171521. }
  171522. switch (starttype) {
  171523. case types$1._break:
  171524. case types$1._continue:
  171525. return this.parseBreakContinueStatement(node, starttype.keyword);
  171526. case types$1._debugger:
  171527. return this.parseDebuggerStatement(node);
  171528. case types$1._do:
  171529. return this.parseDoStatement(node);
  171530. case types$1._for:
  171531. return this.parseForStatement(node);
  171532. case types$1._function:
  171533. if (context && (this.strict || context !== "if" && context !== "label") && this.options.ecmaVersion >= 6) {
  171534. this.unexpected();
  171535. }
  171536. return this.parseFunctionStatement(node, false, !context);
  171537. case types$1._class:
  171538. if (context) {
  171539. this.unexpected();
  171540. }
  171541. return this.parseClass(node, true);
  171542. case types$1._if:
  171543. return this.parseIfStatement(node);
  171544. case types$1._return:
  171545. return this.parseReturnStatement(node);
  171546. case types$1._switch:
  171547. return this.parseSwitchStatement(node);
  171548. case types$1._throw:
  171549. return this.parseThrowStatement(node);
  171550. case types$1._try:
  171551. return this.parseTryStatement(node);
  171552. case types$1._const:
  171553. case types$1._var:
  171554. kind = kind || this.value;
  171555. if (context && kind !== "var") {
  171556. this.unexpected();
  171557. }
  171558. return this.parseVarStatement(node, kind);
  171559. case types$1._while:
  171560. return this.parseWhileStatement(node);
  171561. case types$1._with:
  171562. return this.parseWithStatement(node);
  171563. case types$1.braceL:
  171564. return this.parseBlock(true, node);
  171565. case types$1.semi:
  171566. return this.parseEmptyStatement(node);
  171567. case types$1._export:
  171568. case types$1._import:
  171569. if (this.options.ecmaVersion > 10 && starttype === types$1._import) {
  171570. skipWhiteSpace.lastIndex = this.pos;
  171571. var skip = skipWhiteSpace.exec(this.input);
  171572. var next = this.pos + skip[0].length, nextCh = this.input.charCodeAt(next);
  171573. if (nextCh === 40 || nextCh === 46) {
  171574. return this.parseExpressionStatement(node, this.parseExpression());
  171575. }
  171576. }
  171577. if (!this.options.allowImportExportEverywhere) {
  171578. if (!topLevel) {
  171579. this.raise(this.start, "'import' and 'export' may only appear at the top level");
  171580. }
  171581. if (!this.inModule) {
  171582. this.raise(this.start, "'import' and 'export' may appear only with 'sourceType: module'");
  171583. }
  171584. }
  171585. return starttype === types$1._import ? this.parseImport(node) : this.parseExport(node, exports);
  171586. default:
  171587. if (this.isAsyncFunction()) {
  171588. if (context) {
  171589. this.unexpected();
  171590. }
  171591. this.next();
  171592. return this.parseFunctionStatement(node, true, !context);
  171593. }
  171594. var maybeName = this.value, expr = this.parseExpression();
  171595. if (starttype === types$1.name && expr.type === "Identifier" && this.eat(types$1.colon)) {
  171596. return this.parseLabeledStatement(node, maybeName, expr, context);
  171597. } else {
  171598. return this.parseExpressionStatement(node, expr);
  171599. }
  171600. }
  171601. };
  171602. pp$8.parseBreakContinueStatement = function(node, keyword) {
  171603. var isBreak = keyword === "break";
  171604. this.next();
  171605. if (this.eat(types$1.semi) || this.insertSemicolon()) {
  171606. node.label = null;
  171607. } else if (this.type !== types$1.name) {
  171608. this.unexpected();
  171609. } else {
  171610. node.label = this.parseIdent();
  171611. this.semicolon();
  171612. }
  171613. var i = 0;
  171614. for (; i < this.labels.length; ++i) {
  171615. var lab = this.labels[i];
  171616. if (node.label == null || lab.name === node.label.name) {
  171617. if (lab.kind != null && (isBreak || lab.kind === "loop")) {
  171618. break;
  171619. }
  171620. if (node.label && isBreak) {
  171621. break;
  171622. }
  171623. }
  171624. }
  171625. if (i === this.labels.length) {
  171626. this.raise(node.start, "Unsyntactic " + keyword);
  171627. }
  171628. return this.finishNode(node, isBreak ? "BreakStatement" : "ContinueStatement");
  171629. };
  171630. pp$8.parseDebuggerStatement = function(node) {
  171631. this.next();
  171632. this.semicolon();
  171633. return this.finishNode(node, "DebuggerStatement");
  171634. };
  171635. pp$8.parseDoStatement = function(node) {
  171636. this.next();
  171637. this.labels.push(loopLabel);
  171638. node.body = this.parseStatement("do");
  171639. this.labels.pop();
  171640. this.expect(types$1._while);
  171641. node.test = this.parseParenExpression();
  171642. if (this.options.ecmaVersion >= 6) {
  171643. this.eat(types$1.semi);
  171644. } else {
  171645. this.semicolon();
  171646. }
  171647. return this.finishNode(node, "DoWhileStatement");
  171648. };
  171649. pp$8.parseForStatement = function(node) {
  171650. this.next();
  171651. var awaitAt = this.options.ecmaVersion >= 9 && this.canAwait && this.eatContextual("await") ? this.lastTokStart : -1;
  171652. this.labels.push(loopLabel);
  171653. this.enterScope(0);
  171654. this.expect(types$1.parenL);
  171655. if (this.type === types$1.semi) {
  171656. if (awaitAt > -1) {
  171657. this.unexpected(awaitAt);
  171658. }
  171659. return this.parseFor(node, null);
  171660. }
  171661. var isLet = this.isLet();
  171662. if (this.type === types$1._var || this.type === types$1._const || isLet) {
  171663. var init$1 = this.startNode(), kind = isLet ? "let" : this.value;
  171664. this.next();
  171665. this.parseVar(init$1, true, kind);
  171666. this.finishNode(init$1, "VariableDeclaration");
  171667. if ((this.type === types$1._in || this.options.ecmaVersion >= 6 && this.isContextual("of")) && init$1.declarations.length === 1) {
  171668. if (this.options.ecmaVersion >= 9) {
  171669. if (this.type === types$1._in) {
  171670. if (awaitAt > -1) {
  171671. this.unexpected(awaitAt);
  171672. }
  171673. } else {
  171674. node.await = awaitAt > -1;
  171675. }
  171676. }
  171677. return this.parseForIn(node, init$1);
  171678. }
  171679. if (awaitAt > -1) {
  171680. this.unexpected(awaitAt);
  171681. }
  171682. return this.parseFor(node, init$1);
  171683. }
  171684. var startsWithLet = this.isContextual("let"), isForOf = false;
  171685. var refDestructuringErrors = new DestructuringErrors();
  171686. var init = this.parseExpression(awaitAt > -1 ? "await" : true, refDestructuringErrors);
  171687. if (this.type === types$1._in || (isForOf = this.options.ecmaVersion >= 6 && this.isContextual("of"))) {
  171688. if (this.options.ecmaVersion >= 9) {
  171689. if (this.type === types$1._in) {
  171690. if (awaitAt > -1) {
  171691. this.unexpected(awaitAt);
  171692. }
  171693. } else {
  171694. node.await = awaitAt > -1;
  171695. }
  171696. }
  171697. if (startsWithLet && isForOf) {
  171698. this.raise(init.start, "The left-hand side of a for-of loop may not start with 'let'.");
  171699. }
  171700. this.toAssignable(init, false, refDestructuringErrors);
  171701. this.checkLValPattern(init);
  171702. return this.parseForIn(node, init);
  171703. } else {
  171704. this.checkExpressionErrors(refDestructuringErrors, true);
  171705. }
  171706. if (awaitAt > -1) {
  171707. this.unexpected(awaitAt);
  171708. }
  171709. return this.parseFor(node, init);
  171710. };
  171711. pp$8.parseFunctionStatement = function(node, isAsync, declarationPosition) {
  171712. this.next();
  171713. return this.parseFunction(node, FUNC_STATEMENT | (declarationPosition ? 0 : FUNC_HANGING_STATEMENT), false, isAsync);
  171714. };
  171715. pp$8.parseIfStatement = function(node) {
  171716. this.next();
  171717. node.test = this.parseParenExpression();
  171718. node.consequent = this.parseStatement("if");
  171719. node.alternate = this.eat(types$1._else) ? this.parseStatement("if") : null;
  171720. return this.finishNode(node, "IfStatement");
  171721. };
  171722. pp$8.parseReturnStatement = function(node) {
  171723. if (!this.inFunction && !this.options.allowReturnOutsideFunction) {
  171724. this.raise(this.start, "'return' outside of function");
  171725. }
  171726. this.next();
  171727. if (this.eat(types$1.semi) || this.insertSemicolon()) {
  171728. node.argument = null;
  171729. } else {
  171730. node.argument = this.parseExpression();
  171731. this.semicolon();
  171732. }
  171733. return this.finishNode(node, "ReturnStatement");
  171734. };
  171735. pp$8.parseSwitchStatement = function(node) {
  171736. this.next();
  171737. node.discriminant = this.parseParenExpression();
  171738. node.cases = [];
  171739. this.expect(types$1.braceL);
  171740. this.labels.push(switchLabel);
  171741. this.enterScope(0);
  171742. var cur;
  171743. for (var sawDefault = false; this.type !== types$1.braceR; ) {
  171744. if (this.type === types$1._case || this.type === types$1._default) {
  171745. var isCase = this.type === types$1._case;
  171746. if (cur) {
  171747. this.finishNode(cur, "SwitchCase");
  171748. }
  171749. node.cases.push(cur = this.startNode());
  171750. cur.consequent = [];
  171751. this.next();
  171752. if (isCase) {
  171753. cur.test = this.parseExpression();
  171754. } else {
  171755. if (sawDefault) {
  171756. this.raiseRecoverable(this.lastTokStart, "Multiple default clauses");
  171757. }
  171758. sawDefault = true;
  171759. cur.test = null;
  171760. }
  171761. this.expect(types$1.colon);
  171762. } else {
  171763. if (!cur) {
  171764. this.unexpected();
  171765. }
  171766. cur.consequent.push(this.parseStatement(null));
  171767. }
  171768. }
  171769. this.exitScope();
  171770. if (cur) {
  171771. this.finishNode(cur, "SwitchCase");
  171772. }
  171773. this.next();
  171774. this.labels.pop();
  171775. return this.finishNode(node, "SwitchStatement");
  171776. };
  171777. pp$8.parseThrowStatement = function(node) {
  171778. this.next();
  171779. if (lineBreak.test(this.input.slice(this.lastTokEnd, this.start))) {
  171780. this.raise(this.lastTokEnd, "Illegal newline after throw");
  171781. }
  171782. node.argument = this.parseExpression();
  171783. this.semicolon();
  171784. return this.finishNode(node, "ThrowStatement");
  171785. };
  171786. var empty$1 = [];
  171787. pp$8.parseTryStatement = function(node) {
  171788. this.next();
  171789. node.block = this.parseBlock();
  171790. node.handler = null;
  171791. if (this.type === types$1._catch) {
  171792. var clause = this.startNode();
  171793. this.next();
  171794. if (this.eat(types$1.parenL)) {
  171795. clause.param = this.parseBindingAtom();
  171796. var simple = clause.param.type === "Identifier";
  171797. this.enterScope(simple ? SCOPE_SIMPLE_CATCH : 0);
  171798. this.checkLValPattern(clause.param, simple ? BIND_SIMPLE_CATCH : BIND_LEXICAL);
  171799. this.expect(types$1.parenR);
  171800. } else {
  171801. if (this.options.ecmaVersion < 10) {
  171802. this.unexpected();
  171803. }
  171804. clause.param = null;
  171805. this.enterScope(0);
  171806. }
  171807. clause.body = this.parseBlock(false);
  171808. this.exitScope();
  171809. node.handler = this.finishNode(clause, "CatchClause");
  171810. }
  171811. node.finalizer = this.eat(types$1._finally) ? this.parseBlock() : null;
  171812. if (!node.handler && !node.finalizer) {
  171813. this.raise(node.start, "Missing catch or finally clause");
  171814. }
  171815. return this.finishNode(node, "TryStatement");
  171816. };
  171817. pp$8.parseVarStatement = function(node, kind) {
  171818. this.next();
  171819. this.parseVar(node, false, kind);
  171820. this.semicolon();
  171821. return this.finishNode(node, "VariableDeclaration");
  171822. };
  171823. pp$8.parseWhileStatement = function(node) {
  171824. this.next();
  171825. node.test = this.parseParenExpression();
  171826. this.labels.push(loopLabel);
  171827. node.body = this.parseStatement("while");
  171828. this.labels.pop();
  171829. return this.finishNode(node, "WhileStatement");
  171830. };
  171831. pp$8.parseWithStatement = function(node) {
  171832. if (this.strict) {
  171833. this.raise(this.start, "'with' in strict mode");
  171834. }
  171835. this.next();
  171836. node.object = this.parseParenExpression();
  171837. node.body = this.parseStatement("with");
  171838. return this.finishNode(node, "WithStatement");
  171839. };
  171840. pp$8.parseEmptyStatement = function(node) {
  171841. this.next();
  171842. return this.finishNode(node, "EmptyStatement");
  171843. };
  171844. pp$8.parseLabeledStatement = function(node, maybeName, expr, context) {
  171845. for (var i$1 = 0, list3 = this.labels; i$1 < list3.length; i$1 += 1) {
  171846. var label = list3[i$1];
  171847. if (label.name === maybeName) {
  171848. this.raise(expr.start, "Label '" + maybeName + "' is already declared");
  171849. }
  171850. }
  171851. var kind = this.type.isLoop ? "loop" : this.type === types$1._switch ? "switch" : null;
  171852. for (var i = this.labels.length - 1; i >= 0; i--) {
  171853. var label$1 = this.labels[i];
  171854. if (label$1.statementStart === node.start) {
  171855. label$1.statementStart = this.start;
  171856. label$1.kind = kind;
  171857. } else {
  171858. break;
  171859. }
  171860. }
  171861. this.labels.push({ name: maybeName, kind, statementStart: this.start });
  171862. node.body = this.parseStatement(context ? context.indexOf("label") === -1 ? context + "label" : context : "label");
  171863. this.labels.pop();
  171864. node.label = expr;
  171865. return this.finishNode(node, "LabeledStatement");
  171866. };
  171867. pp$8.parseExpressionStatement = function(node, expr) {
  171868. node.expression = expr;
  171869. this.semicolon();
  171870. return this.finishNode(node, "ExpressionStatement");
  171871. };
  171872. pp$8.parseBlock = function(createNewLexicalScope, node, exitStrict) {
  171873. if (createNewLexicalScope === void 0)
  171874. createNewLexicalScope = true;
  171875. if (node === void 0)
  171876. node = this.startNode();
  171877. node.body = [];
  171878. this.expect(types$1.braceL);
  171879. if (createNewLexicalScope) {
  171880. this.enterScope(0);
  171881. }
  171882. while (this.type !== types$1.braceR) {
  171883. var stmt = this.parseStatement(null);
  171884. node.body.push(stmt);
  171885. }
  171886. if (exitStrict) {
  171887. this.strict = false;
  171888. }
  171889. this.next();
  171890. if (createNewLexicalScope) {
  171891. this.exitScope();
  171892. }
  171893. return this.finishNode(node, "BlockStatement");
  171894. };
  171895. pp$8.parseFor = function(node, init) {
  171896. node.init = init;
  171897. this.expect(types$1.semi);
  171898. node.test = this.type === types$1.semi ? null : this.parseExpression();
  171899. this.expect(types$1.semi);
  171900. node.update = this.type === types$1.parenR ? null : this.parseExpression();
  171901. this.expect(types$1.parenR);
  171902. node.body = this.parseStatement("for");
  171903. this.exitScope();
  171904. this.labels.pop();
  171905. return this.finishNode(node, "ForStatement");
  171906. };
  171907. pp$8.parseForIn = function(node, init) {
  171908. var isForIn = this.type === types$1._in;
  171909. this.next();
  171910. if (init.type === "VariableDeclaration" && init.declarations[0].init != null && (!isForIn || this.options.ecmaVersion < 8 || this.strict || init.kind !== "var" || init.declarations[0].id.type !== "Identifier")) {
  171911. this.raise(
  171912. init.start,
  171913. (isForIn ? "for-in" : "for-of") + " loop variable declaration may not have an initializer"
  171914. );
  171915. }
  171916. node.left = init;
  171917. node.right = isForIn ? this.parseExpression() : this.parseMaybeAssign();
  171918. this.expect(types$1.parenR);
  171919. node.body = this.parseStatement("for");
  171920. this.exitScope();
  171921. this.labels.pop();
  171922. return this.finishNode(node, isForIn ? "ForInStatement" : "ForOfStatement");
  171923. };
  171924. pp$8.parseVar = function(node, isFor, kind) {
  171925. node.declarations = [];
  171926. node.kind = kind;
  171927. for (; ; ) {
  171928. var decl = this.startNode();
  171929. this.parseVarId(decl, kind);
  171930. if (this.eat(types$1.eq)) {
  171931. decl.init = this.parseMaybeAssign(isFor);
  171932. } else if (kind === "const" && !(this.type === types$1._in || this.options.ecmaVersion >= 6 && this.isContextual("of"))) {
  171933. this.unexpected();
  171934. } else if (decl.id.type !== "Identifier" && !(isFor && (this.type === types$1._in || this.isContextual("of")))) {
  171935. this.raise(this.lastTokEnd, "Complex binding patterns require an initialization value");
  171936. } else {
  171937. decl.init = null;
  171938. }
  171939. node.declarations.push(this.finishNode(decl, "VariableDeclarator"));
  171940. if (!this.eat(types$1.comma)) {
  171941. break;
  171942. }
  171943. }
  171944. return node;
  171945. };
  171946. pp$8.parseVarId = function(decl, kind) {
  171947. decl.id = this.parseBindingAtom();
  171948. this.checkLValPattern(decl.id, kind === "var" ? BIND_VAR : BIND_LEXICAL, false);
  171949. };
  171950. var FUNC_STATEMENT = 1;
  171951. var FUNC_HANGING_STATEMENT = 2;
  171952. var FUNC_NULLABLE_ID = 4;
  171953. pp$8.parseFunction = function(node, statement, allowExpressionBody, isAsync, forInit) {
  171954. this.initFunction(node);
  171955. if (this.options.ecmaVersion >= 9 || this.options.ecmaVersion >= 6 && !isAsync) {
  171956. if (this.type === types$1.star && statement & FUNC_HANGING_STATEMENT) {
  171957. this.unexpected();
  171958. }
  171959. node.generator = this.eat(types$1.star);
  171960. }
  171961. if (this.options.ecmaVersion >= 8) {
  171962. node.async = !!isAsync;
  171963. }
  171964. if (statement & FUNC_STATEMENT) {
  171965. node.id = statement & FUNC_NULLABLE_ID && this.type !== types$1.name ? null : this.parseIdent();
  171966. if (node.id && !(statement & FUNC_HANGING_STATEMENT)) {
  171967. this.checkLValSimple(node.id, this.strict || node.generator || node.async ? this.treatFunctionsAsVar ? BIND_VAR : BIND_LEXICAL : BIND_FUNCTION);
  171968. }
  171969. }
  171970. var oldYieldPos = this.yieldPos, oldAwaitPos = this.awaitPos, oldAwaitIdentPos = this.awaitIdentPos;
  171971. this.yieldPos = 0;
  171972. this.awaitPos = 0;
  171973. this.awaitIdentPos = 0;
  171974. this.enterScope(functionFlags(node.async, node.generator));
  171975. if (!(statement & FUNC_STATEMENT)) {
  171976. node.id = this.type === types$1.name ? this.parseIdent() : null;
  171977. }
  171978. this.parseFunctionParams(node);
  171979. this.parseFunctionBody(node, allowExpressionBody, false, forInit);
  171980. this.yieldPos = oldYieldPos;
  171981. this.awaitPos = oldAwaitPos;
  171982. this.awaitIdentPos = oldAwaitIdentPos;
  171983. return this.finishNode(node, statement & FUNC_STATEMENT ? "FunctionDeclaration" : "FunctionExpression");
  171984. };
  171985. pp$8.parseFunctionParams = function(node) {
  171986. this.expect(types$1.parenL);
  171987. node.params = this.parseBindingList(types$1.parenR, false, this.options.ecmaVersion >= 8);
  171988. this.checkYieldAwaitInDefaultParams();
  171989. };
  171990. pp$8.parseClass = function(node, isStatement) {
  171991. this.next();
  171992. var oldStrict = this.strict;
  171993. this.strict = true;
  171994. this.parseClassId(node, isStatement);
  171995. this.parseClassSuper(node);
  171996. var privateNameMap = this.enterClassBody();
  171997. var classBody = this.startNode();
  171998. var hadConstructor = false;
  171999. classBody.body = [];
  172000. this.expect(types$1.braceL);
  172001. while (this.type !== types$1.braceR) {
  172002. var element2 = this.parseClassElement(node.superClass !== null);
  172003. if (element2) {
  172004. classBody.body.push(element2);
  172005. if (element2.type === "MethodDefinition" && element2.kind === "constructor") {
  172006. if (hadConstructor) {
  172007. this.raise(element2.start, "Duplicate constructor in the same class");
  172008. }
  172009. hadConstructor = true;
  172010. } else if (element2.key && element2.key.type === "PrivateIdentifier" && isPrivateNameConflicted(privateNameMap, element2)) {
  172011. this.raiseRecoverable(element2.key.start, "Identifier '#" + element2.key.name + "' has already been declared");
  172012. }
  172013. }
  172014. }
  172015. this.strict = oldStrict;
  172016. this.next();
  172017. node.body = this.finishNode(classBody, "ClassBody");
  172018. this.exitClassBody();
  172019. return this.finishNode(node, isStatement ? "ClassDeclaration" : "ClassExpression");
  172020. };
  172021. pp$8.parseClassElement = function(constructorAllowsSuper) {
  172022. if (this.eat(types$1.semi)) {
  172023. return null;
  172024. }
  172025. var ecmaVersion = this.options.ecmaVersion;
  172026. var node = this.startNode();
  172027. var keyName = "";
  172028. var isGenerator = false;
  172029. var isAsync = false;
  172030. var kind = "method";
  172031. var isStatic = false;
  172032. if (this.eatContextual("static")) {
  172033. if (ecmaVersion >= 13 && this.eat(types$1.braceL)) {
  172034. this.parseClassStaticBlock(node);
  172035. return node;
  172036. }
  172037. if (this.isClassElementNameStart() || this.type === types$1.star) {
  172038. isStatic = true;
  172039. } else {
  172040. keyName = "static";
  172041. }
  172042. }
  172043. node.static = isStatic;
  172044. if (!keyName && ecmaVersion >= 8 && this.eatContextual("async")) {
  172045. if ((this.isClassElementNameStart() || this.type === types$1.star) && !this.canInsertSemicolon()) {
  172046. isAsync = true;
  172047. } else {
  172048. keyName = "async";
  172049. }
  172050. }
  172051. if (!keyName && (ecmaVersion >= 9 || !isAsync) && this.eat(types$1.star)) {
  172052. isGenerator = true;
  172053. }
  172054. if (!keyName && !isAsync && !isGenerator) {
  172055. var lastValue = this.value;
  172056. if (this.eatContextual("get") || this.eatContextual("set")) {
  172057. if (this.isClassElementNameStart()) {
  172058. kind = lastValue;
  172059. } else {
  172060. keyName = lastValue;
  172061. }
  172062. }
  172063. }
  172064. if (keyName) {
  172065. node.computed = false;
  172066. node.key = this.startNodeAt(this.lastTokStart, this.lastTokStartLoc);
  172067. node.key.name = keyName;
  172068. this.finishNode(node.key, "Identifier");
  172069. } else {
  172070. this.parseClassElementName(node);
  172071. }
  172072. if (ecmaVersion < 13 || this.type === types$1.parenL || kind !== "method" || isGenerator || isAsync) {
  172073. var isConstructor = !node.static && checkKeyName(node, "constructor");
  172074. var allowsDirectSuper = isConstructor && constructorAllowsSuper;
  172075. if (isConstructor && kind !== "method") {
  172076. this.raise(node.key.start, "Constructor can't have get/set modifier");
  172077. }
  172078. node.kind = isConstructor ? "constructor" : kind;
  172079. this.parseClassMethod(node, isGenerator, isAsync, allowsDirectSuper);
  172080. } else {
  172081. this.parseClassField(node);
  172082. }
  172083. return node;
  172084. };
  172085. pp$8.isClassElementNameStart = function() {
  172086. return this.type === types$1.name || this.type === types$1.privateId || this.type === types$1.num || this.type === types$1.string || this.type === types$1.bracketL || this.type.keyword;
  172087. };
  172088. pp$8.parseClassElementName = function(element2) {
  172089. if (this.type === types$1.privateId) {
  172090. if (this.value === "constructor") {
  172091. this.raise(this.start, "Classes can't have an element named '#constructor'");
  172092. }
  172093. element2.computed = false;
  172094. element2.key = this.parsePrivateIdent();
  172095. } else {
  172096. this.parsePropertyName(element2);
  172097. }
  172098. };
  172099. pp$8.parseClassMethod = function(method, isGenerator, isAsync, allowsDirectSuper) {
  172100. var key = method.key;
  172101. if (method.kind === "constructor") {
  172102. if (isGenerator) {
  172103. this.raise(key.start, "Constructor can't be a generator");
  172104. }
  172105. if (isAsync) {
  172106. this.raise(key.start, "Constructor can't be an async method");
  172107. }
  172108. } else if (method.static && checkKeyName(method, "prototype")) {
  172109. this.raise(key.start, "Classes may not have a static property named prototype");
  172110. }
  172111. var value = method.value = this.parseMethod(isGenerator, isAsync, allowsDirectSuper);
  172112. if (method.kind === "get" && value.params.length !== 0) {
  172113. this.raiseRecoverable(value.start, "getter should have no params");
  172114. }
  172115. if (method.kind === "set" && value.params.length !== 1) {
  172116. this.raiseRecoverable(value.start, "setter should have exactly one param");
  172117. }
  172118. if (method.kind === "set" && value.params[0].type === "RestElement") {
  172119. this.raiseRecoverable(value.params[0].start, "Setter cannot use rest params");
  172120. }
  172121. return this.finishNode(method, "MethodDefinition");
  172122. };
  172123. pp$8.parseClassField = function(field) {
  172124. if (checkKeyName(field, "constructor")) {
  172125. this.raise(field.key.start, "Classes can't have a field named 'constructor'");
  172126. } else if (field.static && checkKeyName(field, "prototype")) {
  172127. this.raise(field.key.start, "Classes can't have a static field named 'prototype'");
  172128. }
  172129. if (this.eat(types$1.eq)) {
  172130. var scope = this.currentThisScope();
  172131. var inClassFieldInit = scope.inClassFieldInit;
  172132. scope.inClassFieldInit = true;
  172133. field.value = this.parseMaybeAssign();
  172134. scope.inClassFieldInit = inClassFieldInit;
  172135. } else {
  172136. field.value = null;
  172137. }
  172138. this.semicolon();
  172139. return this.finishNode(field, "PropertyDefinition");
  172140. };
  172141. pp$8.parseClassStaticBlock = function(node) {
  172142. node.body = [];
  172143. var oldLabels = this.labels;
  172144. this.labels = [];
  172145. this.enterScope(SCOPE_CLASS_STATIC_BLOCK | SCOPE_SUPER);
  172146. while (this.type !== types$1.braceR) {
  172147. var stmt = this.parseStatement(null);
  172148. node.body.push(stmt);
  172149. }
  172150. this.next();
  172151. this.exitScope();
  172152. this.labels = oldLabels;
  172153. return this.finishNode(node, "StaticBlock");
  172154. };
  172155. pp$8.parseClassId = function(node, isStatement) {
  172156. if (this.type === types$1.name) {
  172157. node.id = this.parseIdent();
  172158. if (isStatement) {
  172159. this.checkLValSimple(node.id, BIND_LEXICAL, false);
  172160. }
  172161. } else {
  172162. if (isStatement === true) {
  172163. this.unexpected();
  172164. }
  172165. node.id = null;
  172166. }
  172167. };
  172168. pp$8.parseClassSuper = function(node) {
  172169. node.superClass = this.eat(types$1._extends) ? this.parseExprSubscripts(false) : null;
  172170. };
  172171. pp$8.enterClassBody = function() {
  172172. var element2 = { declared: /* @__PURE__ */ Object.create(null), used: [] };
  172173. this.privateNameStack.push(element2);
  172174. return element2.declared;
  172175. };
  172176. pp$8.exitClassBody = function() {
  172177. var ref2 = this.privateNameStack.pop();
  172178. var declared = ref2.declared;
  172179. var used = ref2.used;
  172180. var len = this.privateNameStack.length;
  172181. var parent = len === 0 ? null : this.privateNameStack[len - 1];
  172182. for (var i = 0; i < used.length; ++i) {
  172183. var id = used[i];
  172184. if (!hasOwn(declared, id.name)) {
  172185. if (parent) {
  172186. parent.used.push(id);
  172187. } else {
  172188. this.raiseRecoverable(id.start, "Private field '#" + id.name + "' must be declared in an enclosing class");
  172189. }
  172190. }
  172191. }
  172192. };
  172193. function isPrivateNameConflicted(privateNameMap, element2) {
  172194. var name2 = element2.key.name;
  172195. var curr = privateNameMap[name2];
  172196. var next = "true";
  172197. if (element2.type === "MethodDefinition" && (element2.kind === "get" || element2.kind === "set")) {
  172198. next = (element2.static ? "s" : "i") + element2.kind;
  172199. }
  172200. if (curr === "iget" && next === "iset" || curr === "iset" && next === "iget" || curr === "sget" && next === "sset" || curr === "sset" && next === "sget") {
  172201. privateNameMap[name2] = "true";
  172202. return false;
  172203. } else if (!curr) {
  172204. privateNameMap[name2] = next;
  172205. return false;
  172206. } else {
  172207. return true;
  172208. }
  172209. }
  172210. function checkKeyName(node, name2) {
  172211. var computed = node.computed;
  172212. var key = node.key;
  172213. return !computed && (key.type === "Identifier" && key.name === name2 || key.type === "Literal" && key.value === name2);
  172214. }
  172215. pp$8.parseExport = function(node, exports) {
  172216. this.next();
  172217. if (this.eat(types$1.star)) {
  172218. if (this.options.ecmaVersion >= 11) {
  172219. if (this.eatContextual("as")) {
  172220. node.exported = this.parseModuleExportName();
  172221. this.checkExport(exports, node.exported.name, this.lastTokStart);
  172222. } else {
  172223. node.exported = null;
  172224. }
  172225. }
  172226. this.expectContextual("from");
  172227. if (this.type !== types$1.string) {
  172228. this.unexpected();
  172229. }
  172230. node.source = this.parseExprAtom();
  172231. this.semicolon();
  172232. return this.finishNode(node, "ExportAllDeclaration");
  172233. }
  172234. if (this.eat(types$1._default)) {
  172235. this.checkExport(exports, "default", this.lastTokStart);
  172236. var isAsync;
  172237. if (this.type === types$1._function || (isAsync = this.isAsyncFunction())) {
  172238. var fNode = this.startNode();
  172239. this.next();
  172240. if (isAsync) {
  172241. this.next();
  172242. }
  172243. node.declaration = this.parseFunction(fNode, FUNC_STATEMENT | FUNC_NULLABLE_ID, false, isAsync);
  172244. } else if (this.type === types$1._class) {
  172245. var cNode = this.startNode();
  172246. node.declaration = this.parseClass(cNode, "nullableID");
  172247. } else {
  172248. node.declaration = this.parseMaybeAssign();
  172249. this.semicolon();
  172250. }
  172251. return this.finishNode(node, "ExportDefaultDeclaration");
  172252. }
  172253. if (this.shouldParseExportStatement()) {
  172254. node.declaration = this.parseStatement(null);
  172255. if (node.declaration.type === "VariableDeclaration") {
  172256. this.checkVariableExport(exports, node.declaration.declarations);
  172257. } else {
  172258. this.checkExport(exports, node.declaration.id.name, node.declaration.id.start);
  172259. }
  172260. node.specifiers = [];
  172261. node.source = null;
  172262. } else {
  172263. node.declaration = null;
  172264. node.specifiers = this.parseExportSpecifiers(exports);
  172265. if (this.eatContextual("from")) {
  172266. if (this.type !== types$1.string) {
  172267. this.unexpected();
  172268. }
  172269. node.source = this.parseExprAtom();
  172270. } else {
  172271. for (var i = 0, list3 = node.specifiers; i < list3.length; i += 1) {
  172272. var spec = list3[i];
  172273. this.checkUnreserved(spec.local);
  172274. this.checkLocalExport(spec.local);
  172275. if (spec.local.type === "Literal") {
  172276. this.raise(spec.local.start, "A string literal cannot be used as an exported binding without `from`.");
  172277. }
  172278. }
  172279. node.source = null;
  172280. }
  172281. this.semicolon();
  172282. }
  172283. return this.finishNode(node, "ExportNamedDeclaration");
  172284. };
  172285. pp$8.checkExport = function(exports, name2, pos) {
  172286. if (!exports) {
  172287. return;
  172288. }
  172289. if (hasOwn(exports, name2)) {
  172290. this.raiseRecoverable(pos, "Duplicate export '" + name2 + "'");
  172291. }
  172292. exports[name2] = true;
  172293. };
  172294. pp$8.checkPatternExport = function(exports, pat) {
  172295. var type = pat.type;
  172296. if (type === "Identifier") {
  172297. this.checkExport(exports, pat.name, pat.start);
  172298. } else if (type === "ObjectPattern") {
  172299. for (var i = 0, list3 = pat.properties; i < list3.length; i += 1) {
  172300. var prop = list3[i];
  172301. this.checkPatternExport(exports, prop);
  172302. }
  172303. } else if (type === "ArrayPattern") {
  172304. for (var i$1 = 0, list$1 = pat.elements; i$1 < list$1.length; i$1 += 1) {
  172305. var elt = list$1[i$1];
  172306. if (elt) {
  172307. this.checkPatternExport(exports, elt);
  172308. }
  172309. }
  172310. } else if (type === "Property") {
  172311. this.checkPatternExport(exports, pat.value);
  172312. } else if (type === "AssignmentPattern") {
  172313. this.checkPatternExport(exports, pat.left);
  172314. } else if (type === "RestElement") {
  172315. this.checkPatternExport(exports, pat.argument);
  172316. } else if (type === "ParenthesizedExpression") {
  172317. this.checkPatternExport(exports, pat.expression);
  172318. }
  172319. };
  172320. pp$8.checkVariableExport = function(exports, decls) {
  172321. if (!exports) {
  172322. return;
  172323. }
  172324. for (var i = 0, list3 = decls; i < list3.length; i += 1) {
  172325. var decl = list3[i];
  172326. this.checkPatternExport(exports, decl.id);
  172327. }
  172328. };
  172329. pp$8.shouldParseExportStatement = function() {
  172330. return this.type.keyword === "var" || this.type.keyword === "const" || this.type.keyword === "class" || this.type.keyword === "function" || this.isLet() || this.isAsyncFunction();
  172331. };
  172332. pp$8.parseExportSpecifiers = function(exports) {
  172333. var nodes = [], first = true;
  172334. this.expect(types$1.braceL);
  172335. while (!this.eat(types$1.braceR)) {
  172336. if (!first) {
  172337. this.expect(types$1.comma);
  172338. if (this.afterTrailingComma(types$1.braceR)) {
  172339. break;
  172340. }
  172341. } else {
  172342. first = false;
  172343. }
  172344. var node = this.startNode();
  172345. node.local = this.parseModuleExportName();
  172346. node.exported = this.eatContextual("as") ? this.parseModuleExportName() : node.local;
  172347. this.checkExport(
  172348. exports,
  172349. node.exported[node.exported.type === "Identifier" ? "name" : "value"],
  172350. node.exported.start
  172351. );
  172352. nodes.push(this.finishNode(node, "ExportSpecifier"));
  172353. }
  172354. return nodes;
  172355. };
  172356. pp$8.parseImport = function(node) {
  172357. this.next();
  172358. if (this.type === types$1.string) {
  172359. node.specifiers = empty$1;
  172360. node.source = this.parseExprAtom();
  172361. } else {
  172362. node.specifiers = this.parseImportSpecifiers();
  172363. this.expectContextual("from");
  172364. node.source = this.type === types$1.string ? this.parseExprAtom() : this.unexpected();
  172365. }
  172366. this.semicolon();
  172367. return this.finishNode(node, "ImportDeclaration");
  172368. };
  172369. pp$8.parseImportSpecifiers = function() {
  172370. var nodes = [], first = true;
  172371. if (this.type === types$1.name) {
  172372. var node = this.startNode();
  172373. node.local = this.parseIdent();
  172374. this.checkLValSimple(node.local, BIND_LEXICAL);
  172375. nodes.push(this.finishNode(node, "ImportDefaultSpecifier"));
  172376. if (!this.eat(types$1.comma)) {
  172377. return nodes;
  172378. }
  172379. }
  172380. if (this.type === types$1.star) {
  172381. var node$1 = this.startNode();
  172382. this.next();
  172383. this.expectContextual("as");
  172384. node$1.local = this.parseIdent();
  172385. this.checkLValSimple(node$1.local, BIND_LEXICAL);
  172386. nodes.push(this.finishNode(node$1, "ImportNamespaceSpecifier"));
  172387. return nodes;
  172388. }
  172389. this.expect(types$1.braceL);
  172390. while (!this.eat(types$1.braceR)) {
  172391. if (!first) {
  172392. this.expect(types$1.comma);
  172393. if (this.afterTrailingComma(types$1.braceR)) {
  172394. break;
  172395. }
  172396. } else {
  172397. first = false;
  172398. }
  172399. var node$2 = this.startNode();
  172400. node$2.imported = this.parseModuleExportName();
  172401. if (this.eatContextual("as")) {
  172402. node$2.local = this.parseIdent();
  172403. } else {
  172404. this.checkUnreserved(node$2.imported);
  172405. node$2.local = node$2.imported;
  172406. }
  172407. this.checkLValSimple(node$2.local, BIND_LEXICAL);
  172408. nodes.push(this.finishNode(node$2, "ImportSpecifier"));
  172409. }
  172410. return nodes;
  172411. };
  172412. pp$8.parseModuleExportName = function() {
  172413. if (this.options.ecmaVersion >= 13 && this.type === types$1.string) {
  172414. var stringLiteral = this.parseLiteral(this.value);
  172415. if (loneSurrogate.test(stringLiteral.value)) {
  172416. this.raise(stringLiteral.start, "An export name cannot include a lone surrogate.");
  172417. }
  172418. return stringLiteral;
  172419. }
  172420. return this.parseIdent(true);
  172421. };
  172422. pp$8.adaptDirectivePrologue = function(statements) {
  172423. for (var i = 0; i < statements.length && this.isDirectiveCandidate(statements[i]); ++i) {
  172424. statements[i].directive = statements[i].expression.raw.slice(1, -1);
  172425. }
  172426. };
  172427. pp$8.isDirectiveCandidate = function(statement) {
  172428. return statement.type === "ExpressionStatement" && statement.expression.type === "Literal" && typeof statement.expression.value === "string" && (this.input[statement.start] === '"' || this.input[statement.start] === "'");
  172429. };
  172430. var pp$7 = Parser.prototype;
  172431. pp$7.toAssignable = function(node, isBinding, refDestructuringErrors) {
  172432. if (this.options.ecmaVersion >= 6 && node) {
  172433. switch (node.type) {
  172434. case "Identifier":
  172435. if (this.inAsync && node.name === "await") {
  172436. this.raise(node.start, "Cannot use 'await' as identifier inside an async function");
  172437. }
  172438. break;
  172439. case "ObjectPattern":
  172440. case "ArrayPattern":
  172441. case "AssignmentPattern":
  172442. case "RestElement":
  172443. break;
  172444. case "ObjectExpression":
  172445. node.type = "ObjectPattern";
  172446. if (refDestructuringErrors) {
  172447. this.checkPatternErrors(refDestructuringErrors, true);
  172448. }
  172449. for (var i = 0, list3 = node.properties; i < list3.length; i += 1) {
  172450. var prop = list3[i];
  172451. this.toAssignable(prop, isBinding);
  172452. if (prop.type === "RestElement" && (prop.argument.type === "ArrayPattern" || prop.argument.type === "ObjectPattern")) {
  172453. this.raise(prop.argument.start, "Unexpected token");
  172454. }
  172455. }
  172456. break;
  172457. case "Property":
  172458. if (node.kind !== "init") {
  172459. this.raise(node.key.start, "Object pattern can't contain getter or setter");
  172460. }
  172461. this.toAssignable(node.value, isBinding);
  172462. break;
  172463. case "ArrayExpression":
  172464. node.type = "ArrayPattern";
  172465. if (refDestructuringErrors) {
  172466. this.checkPatternErrors(refDestructuringErrors, true);
  172467. }
  172468. this.toAssignableList(node.elements, isBinding);
  172469. break;
  172470. case "SpreadElement":
  172471. node.type = "RestElement";
  172472. this.toAssignable(node.argument, isBinding);
  172473. if (node.argument.type === "AssignmentPattern") {
  172474. this.raise(node.argument.start, "Rest elements cannot have a default value");
  172475. }
  172476. break;
  172477. case "AssignmentExpression":
  172478. if (node.operator !== "=") {
  172479. this.raise(node.left.end, "Only '=' operator can be used for specifying default value.");
  172480. }
  172481. node.type = "AssignmentPattern";
  172482. delete node.operator;
  172483. this.toAssignable(node.left, isBinding);
  172484. break;
  172485. case "ParenthesizedExpression":
  172486. this.toAssignable(node.expression, isBinding, refDestructuringErrors);
  172487. break;
  172488. case "ChainExpression":
  172489. this.raiseRecoverable(node.start, "Optional chaining cannot appear in left-hand side");
  172490. break;
  172491. case "MemberExpression":
  172492. if (!isBinding) {
  172493. break;
  172494. }
  172495. default:
  172496. this.raise(node.start, "Assigning to rvalue");
  172497. }
  172498. } else if (refDestructuringErrors) {
  172499. this.checkPatternErrors(refDestructuringErrors, true);
  172500. }
  172501. return node;
  172502. };
  172503. pp$7.toAssignableList = function(exprList, isBinding) {
  172504. var end = exprList.length;
  172505. for (var i = 0; i < end; i++) {
  172506. var elt = exprList[i];
  172507. if (elt) {
  172508. this.toAssignable(elt, isBinding);
  172509. }
  172510. }
  172511. if (end) {
  172512. var last = exprList[end - 1];
  172513. if (this.options.ecmaVersion === 6 && isBinding && last && last.type === "RestElement" && last.argument.type !== "Identifier") {
  172514. this.unexpected(last.argument.start);
  172515. }
  172516. }
  172517. return exprList;
  172518. };
  172519. pp$7.parseSpread = function(refDestructuringErrors) {
  172520. var node = this.startNode();
  172521. this.next();
  172522. node.argument = this.parseMaybeAssign(false, refDestructuringErrors);
  172523. return this.finishNode(node, "SpreadElement");
  172524. };
  172525. pp$7.parseRestBinding = function() {
  172526. var node = this.startNode();
  172527. this.next();
  172528. if (this.options.ecmaVersion === 6 && this.type !== types$1.name) {
  172529. this.unexpected();
  172530. }
  172531. node.argument = this.parseBindingAtom();
  172532. return this.finishNode(node, "RestElement");
  172533. };
  172534. pp$7.parseBindingAtom = function() {
  172535. if (this.options.ecmaVersion >= 6) {
  172536. switch (this.type) {
  172537. case types$1.bracketL:
  172538. var node = this.startNode();
  172539. this.next();
  172540. node.elements = this.parseBindingList(types$1.bracketR, true, true);
  172541. return this.finishNode(node, "ArrayPattern");
  172542. case types$1.braceL:
  172543. return this.parseObj(true);
  172544. }
  172545. }
  172546. return this.parseIdent();
  172547. };
  172548. pp$7.parseBindingList = function(close, allowEmpty, allowTrailingComma) {
  172549. var elts = [], first = true;
  172550. while (!this.eat(close)) {
  172551. if (first) {
  172552. first = false;
  172553. } else {
  172554. this.expect(types$1.comma);
  172555. }
  172556. if (allowEmpty && this.type === types$1.comma) {
  172557. elts.push(null);
  172558. } else if (allowTrailingComma && this.afterTrailingComma(close)) {
  172559. break;
  172560. } else if (this.type === types$1.ellipsis) {
  172561. var rest = this.parseRestBinding();
  172562. this.parseBindingListItem(rest);
  172563. elts.push(rest);
  172564. if (this.type === types$1.comma) {
  172565. this.raise(this.start, "Comma is not permitted after the rest element");
  172566. }
  172567. this.expect(close);
  172568. break;
  172569. } else {
  172570. var elem = this.parseMaybeDefault(this.start, this.startLoc);
  172571. this.parseBindingListItem(elem);
  172572. elts.push(elem);
  172573. }
  172574. }
  172575. return elts;
  172576. };
  172577. pp$7.parseBindingListItem = function(param) {
  172578. return param;
  172579. };
  172580. pp$7.parseMaybeDefault = function(startPos, startLoc, left) {
  172581. left = left || this.parseBindingAtom();
  172582. if (this.options.ecmaVersion < 6 || !this.eat(types$1.eq)) {
  172583. return left;
  172584. }
  172585. var node = this.startNodeAt(startPos, startLoc);
  172586. node.left = left;
  172587. node.right = this.parseMaybeAssign();
  172588. return this.finishNode(node, "AssignmentPattern");
  172589. };
  172590. pp$7.checkLValSimple = function(expr, bindingType, checkClashes) {
  172591. if (bindingType === void 0)
  172592. bindingType = BIND_NONE;
  172593. var isBind = bindingType !== BIND_NONE;
  172594. switch (expr.type) {
  172595. case "Identifier":
  172596. if (this.strict && this.reservedWordsStrictBind.test(expr.name)) {
  172597. this.raiseRecoverable(expr.start, (isBind ? "Binding " : "Assigning to ") + expr.name + " in strict mode");
  172598. }
  172599. if (isBind) {
  172600. if (bindingType === BIND_LEXICAL && expr.name === "let") {
  172601. this.raiseRecoverable(expr.start, "let is disallowed as a lexically bound name");
  172602. }
  172603. if (checkClashes) {
  172604. if (hasOwn(checkClashes, expr.name)) {
  172605. this.raiseRecoverable(expr.start, "Argument name clash");
  172606. }
  172607. checkClashes[expr.name] = true;
  172608. }
  172609. if (bindingType !== BIND_OUTSIDE) {
  172610. this.declareName(expr.name, bindingType, expr.start);
  172611. }
  172612. }
  172613. break;
  172614. case "ChainExpression":
  172615. this.raiseRecoverable(expr.start, "Optional chaining cannot appear in left-hand side");
  172616. break;
  172617. case "MemberExpression":
  172618. if (isBind) {
  172619. this.raiseRecoverable(expr.start, "Binding member expression");
  172620. }
  172621. break;
  172622. case "ParenthesizedExpression":
  172623. if (isBind) {
  172624. this.raiseRecoverable(expr.start, "Binding parenthesized expression");
  172625. }
  172626. return this.checkLValSimple(expr.expression, bindingType, checkClashes);
  172627. default:
  172628. this.raise(expr.start, (isBind ? "Binding" : "Assigning to") + " rvalue");
  172629. }
  172630. };
  172631. pp$7.checkLValPattern = function(expr, bindingType, checkClashes) {
  172632. if (bindingType === void 0)
  172633. bindingType = BIND_NONE;
  172634. switch (expr.type) {
  172635. case "ObjectPattern":
  172636. for (var i = 0, list3 = expr.properties; i < list3.length; i += 1) {
  172637. var prop = list3[i];
  172638. this.checkLValInnerPattern(prop, bindingType, checkClashes);
  172639. }
  172640. break;
  172641. case "ArrayPattern":
  172642. for (var i$1 = 0, list$1 = expr.elements; i$1 < list$1.length; i$1 += 1) {
  172643. var elem = list$1[i$1];
  172644. if (elem) {
  172645. this.checkLValInnerPattern(elem, bindingType, checkClashes);
  172646. }
  172647. }
  172648. break;
  172649. default:
  172650. this.checkLValSimple(expr, bindingType, checkClashes);
  172651. }
  172652. };
  172653. pp$7.checkLValInnerPattern = function(expr, bindingType, checkClashes) {
  172654. if (bindingType === void 0)
  172655. bindingType = BIND_NONE;
  172656. switch (expr.type) {
  172657. case "Property":
  172658. this.checkLValInnerPattern(expr.value, bindingType, checkClashes);
  172659. break;
  172660. case "AssignmentPattern":
  172661. this.checkLValPattern(expr.left, bindingType, checkClashes);
  172662. break;
  172663. case "RestElement":
  172664. this.checkLValPattern(expr.argument, bindingType, checkClashes);
  172665. break;
  172666. default:
  172667. this.checkLValPattern(expr, bindingType, checkClashes);
  172668. }
  172669. };
  172670. var TokContext = function TokContext2(token, isExpr, preserveSpace, override, generator) {
  172671. this.token = token;
  172672. this.isExpr = !!isExpr;
  172673. this.preserveSpace = !!preserveSpace;
  172674. this.override = override;
  172675. this.generator = !!generator;
  172676. };
  172677. var types = {
  172678. b_stat: new TokContext("{", false),
  172679. b_expr: new TokContext("{", true),
  172680. b_tmpl: new TokContext("${", false),
  172681. p_stat: new TokContext("(", false),
  172682. p_expr: new TokContext("(", true),
  172683. q_tmpl: new TokContext("`", true, true, function(p) {
  172684. return p.tryReadTemplateToken();
  172685. }),
  172686. f_stat: new TokContext("function", false),
  172687. f_expr: new TokContext("function", true),
  172688. f_expr_gen: new TokContext("function", true, false, null, true),
  172689. f_gen: new TokContext("function", false, false, null, true)
  172690. };
  172691. var pp$6 = Parser.prototype;
  172692. pp$6.initialContext = function() {
  172693. return [types.b_stat];
  172694. };
  172695. pp$6.curContext = function() {
  172696. return this.context[this.context.length - 1];
  172697. };
  172698. pp$6.braceIsBlock = function(prevType) {
  172699. var parent = this.curContext();
  172700. if (parent === types.f_expr || parent === types.f_stat) {
  172701. return true;
  172702. }
  172703. if (prevType === types$1.colon && (parent === types.b_stat || parent === types.b_expr)) {
  172704. return !parent.isExpr;
  172705. }
  172706. if (prevType === types$1._return || prevType === types$1.name && this.exprAllowed) {
  172707. return lineBreak.test(this.input.slice(this.lastTokEnd, this.start));
  172708. }
  172709. if (prevType === types$1._else || prevType === types$1.semi || prevType === types$1.eof || prevType === types$1.parenR || prevType === types$1.arrow) {
  172710. return true;
  172711. }
  172712. if (prevType === types$1.braceL) {
  172713. return parent === types.b_stat;
  172714. }
  172715. if (prevType === types$1._var || prevType === types$1._const || prevType === types$1.name) {
  172716. return false;
  172717. }
  172718. return !this.exprAllowed;
  172719. };
  172720. pp$6.inGeneratorContext = function() {
  172721. for (var i = this.context.length - 1; i >= 1; i--) {
  172722. var context = this.context[i];
  172723. if (context.token === "function") {
  172724. return context.generator;
  172725. }
  172726. }
  172727. return false;
  172728. };
  172729. pp$6.updateContext = function(prevType) {
  172730. var update, type = this.type;
  172731. if (type.keyword && prevType === types$1.dot) {
  172732. this.exprAllowed = false;
  172733. } else if (update = type.updateContext) {
  172734. update.call(this, prevType);
  172735. } else {
  172736. this.exprAllowed = type.beforeExpr;
  172737. }
  172738. };
  172739. pp$6.overrideContext = function(tokenCtx) {
  172740. if (this.curContext() !== tokenCtx) {
  172741. this.context[this.context.length - 1] = tokenCtx;
  172742. }
  172743. };
  172744. types$1.parenR.updateContext = types$1.braceR.updateContext = function() {
  172745. if (this.context.length === 1) {
  172746. this.exprAllowed = true;
  172747. return;
  172748. }
  172749. var out = this.context.pop();
  172750. if (out === types.b_stat && this.curContext().token === "function") {
  172751. out = this.context.pop();
  172752. }
  172753. this.exprAllowed = !out.isExpr;
  172754. };
  172755. types$1.braceL.updateContext = function(prevType) {
  172756. this.context.push(this.braceIsBlock(prevType) ? types.b_stat : types.b_expr);
  172757. this.exprAllowed = true;
  172758. };
  172759. types$1.dollarBraceL.updateContext = function() {
  172760. this.context.push(types.b_tmpl);
  172761. this.exprAllowed = true;
  172762. };
  172763. types$1.parenL.updateContext = function(prevType) {
  172764. var statementParens = prevType === types$1._if || prevType === types$1._for || prevType === types$1._with || prevType === types$1._while;
  172765. this.context.push(statementParens ? types.p_stat : types.p_expr);
  172766. this.exprAllowed = true;
  172767. };
  172768. types$1.incDec.updateContext = function() {
  172769. };
  172770. types$1._function.updateContext = types$1._class.updateContext = function(prevType) {
  172771. if (prevType.beforeExpr && prevType !== types$1._else && !(prevType === types$1.semi && this.curContext() !== types.p_stat) && !(prevType === types$1._return && lineBreak.test(this.input.slice(this.lastTokEnd, this.start))) && !((prevType === types$1.colon || prevType === types$1.braceL) && this.curContext() === types.b_stat)) {
  172772. this.context.push(types.f_expr);
  172773. } else {
  172774. this.context.push(types.f_stat);
  172775. }
  172776. this.exprAllowed = false;
  172777. };
  172778. types$1.backQuote.updateContext = function() {
  172779. if (this.curContext() === types.q_tmpl) {
  172780. this.context.pop();
  172781. } else {
  172782. this.context.push(types.q_tmpl);
  172783. }
  172784. this.exprAllowed = false;
  172785. };
  172786. types$1.star.updateContext = function(prevType) {
  172787. if (prevType === types$1._function) {
  172788. var index2 = this.context.length - 1;
  172789. if (this.context[index2] === types.f_expr) {
  172790. this.context[index2] = types.f_expr_gen;
  172791. } else {
  172792. this.context[index2] = types.f_gen;
  172793. }
  172794. }
  172795. this.exprAllowed = true;
  172796. };
  172797. types$1.name.updateContext = function(prevType) {
  172798. var allowed = false;
  172799. if (this.options.ecmaVersion >= 6 && prevType !== types$1.dot) {
  172800. if (this.value === "of" && !this.exprAllowed || this.value === "yield" && this.inGeneratorContext()) {
  172801. allowed = true;
  172802. }
  172803. }
  172804. this.exprAllowed = allowed;
  172805. };
  172806. var pp$5 = Parser.prototype;
  172807. pp$5.checkPropClash = function(prop, propHash, refDestructuringErrors) {
  172808. if (this.options.ecmaVersion >= 9 && prop.type === "SpreadElement") {
  172809. return;
  172810. }
  172811. if (this.options.ecmaVersion >= 6 && (prop.computed || prop.method || prop.shorthand)) {
  172812. return;
  172813. }
  172814. var key = prop.key;
  172815. var name2;
  172816. switch (key.type) {
  172817. case "Identifier":
  172818. name2 = key.name;
  172819. break;
  172820. case "Literal":
  172821. name2 = String(key.value);
  172822. break;
  172823. default:
  172824. return;
  172825. }
  172826. var kind = prop.kind;
  172827. if (this.options.ecmaVersion >= 6) {
  172828. if (name2 === "__proto__" && kind === "init") {
  172829. if (propHash.proto) {
  172830. if (refDestructuringErrors) {
  172831. if (refDestructuringErrors.doubleProto < 0) {
  172832. refDestructuringErrors.doubleProto = key.start;
  172833. }
  172834. } else {
  172835. this.raiseRecoverable(key.start, "Redefinition of __proto__ property");
  172836. }
  172837. }
  172838. propHash.proto = true;
  172839. }
  172840. return;
  172841. }
  172842. name2 = "$" + name2;
  172843. var other = propHash[name2];
  172844. if (other) {
  172845. var redefinition;
  172846. if (kind === "init") {
  172847. redefinition = this.strict && other.init || other.get || other.set;
  172848. } else {
  172849. redefinition = other.init || other[kind];
  172850. }
  172851. if (redefinition) {
  172852. this.raiseRecoverable(key.start, "Redefinition of property");
  172853. }
  172854. } else {
  172855. other = propHash[name2] = {
  172856. init: false,
  172857. get: false,
  172858. set: false
  172859. };
  172860. }
  172861. other[kind] = true;
  172862. };
  172863. pp$5.parseExpression = function(forInit, refDestructuringErrors) {
  172864. var startPos = this.start, startLoc = this.startLoc;
  172865. var expr = this.parseMaybeAssign(forInit, refDestructuringErrors);
  172866. if (this.type === types$1.comma) {
  172867. var node = this.startNodeAt(startPos, startLoc);
  172868. node.expressions = [expr];
  172869. while (this.eat(types$1.comma)) {
  172870. node.expressions.push(this.parseMaybeAssign(forInit, refDestructuringErrors));
  172871. }
  172872. return this.finishNode(node, "SequenceExpression");
  172873. }
  172874. return expr;
  172875. };
  172876. pp$5.parseMaybeAssign = function(forInit, refDestructuringErrors, afterLeftParse) {
  172877. if (this.isContextual("yield")) {
  172878. if (this.inGenerator) {
  172879. return this.parseYield(forInit);
  172880. } else {
  172881. this.exprAllowed = false;
  172882. }
  172883. }
  172884. var ownDestructuringErrors = false, oldParenAssign = -1, oldTrailingComma = -1, oldDoubleProto = -1;
  172885. if (refDestructuringErrors) {
  172886. oldParenAssign = refDestructuringErrors.parenthesizedAssign;
  172887. oldTrailingComma = refDestructuringErrors.trailingComma;
  172888. oldDoubleProto = refDestructuringErrors.doubleProto;
  172889. refDestructuringErrors.parenthesizedAssign = refDestructuringErrors.trailingComma = -1;
  172890. } else {
  172891. refDestructuringErrors = new DestructuringErrors();
  172892. ownDestructuringErrors = true;
  172893. }
  172894. var startPos = this.start, startLoc = this.startLoc;
  172895. if (this.type === types$1.parenL || this.type === types$1.name) {
  172896. this.potentialArrowAt = this.start;
  172897. this.potentialArrowInForAwait = forInit === "await";
  172898. }
  172899. var left = this.parseMaybeConditional(forInit, refDestructuringErrors);
  172900. if (afterLeftParse) {
  172901. left = afterLeftParse.call(this, left, startPos, startLoc);
  172902. }
  172903. if (this.type.isAssign) {
  172904. var node = this.startNodeAt(startPos, startLoc);
  172905. node.operator = this.value;
  172906. if (this.type === types$1.eq) {
  172907. left = this.toAssignable(left, false, refDestructuringErrors);
  172908. }
  172909. if (!ownDestructuringErrors) {
  172910. refDestructuringErrors.parenthesizedAssign = refDestructuringErrors.trailingComma = refDestructuringErrors.doubleProto = -1;
  172911. }
  172912. if (refDestructuringErrors.shorthandAssign >= left.start) {
  172913. refDestructuringErrors.shorthandAssign = -1;
  172914. }
  172915. if (this.type === types$1.eq) {
  172916. this.checkLValPattern(left);
  172917. } else {
  172918. this.checkLValSimple(left);
  172919. }
  172920. node.left = left;
  172921. this.next();
  172922. node.right = this.parseMaybeAssign(forInit);
  172923. if (oldDoubleProto > -1) {
  172924. refDestructuringErrors.doubleProto = oldDoubleProto;
  172925. }
  172926. return this.finishNode(node, "AssignmentExpression");
  172927. } else {
  172928. if (ownDestructuringErrors) {
  172929. this.checkExpressionErrors(refDestructuringErrors, true);
  172930. }
  172931. }
  172932. if (oldParenAssign > -1) {
  172933. refDestructuringErrors.parenthesizedAssign = oldParenAssign;
  172934. }
  172935. if (oldTrailingComma > -1) {
  172936. refDestructuringErrors.trailingComma = oldTrailingComma;
  172937. }
  172938. return left;
  172939. };
  172940. pp$5.parseMaybeConditional = function(forInit, refDestructuringErrors) {
  172941. var startPos = this.start, startLoc = this.startLoc;
  172942. var expr = this.parseExprOps(forInit, refDestructuringErrors);
  172943. if (this.checkExpressionErrors(refDestructuringErrors)) {
  172944. return expr;
  172945. }
  172946. if (this.eat(types$1.question)) {
  172947. var node = this.startNodeAt(startPos, startLoc);
  172948. node.test = expr;
  172949. node.consequent = this.parseMaybeAssign();
  172950. this.expect(types$1.colon);
  172951. node.alternate = this.parseMaybeAssign(forInit);
  172952. return this.finishNode(node, "ConditionalExpression");
  172953. }
  172954. return expr;
  172955. };
  172956. pp$5.parseExprOps = function(forInit, refDestructuringErrors) {
  172957. var startPos = this.start, startLoc = this.startLoc;
  172958. var expr = this.parseMaybeUnary(refDestructuringErrors, false, false, forInit);
  172959. if (this.checkExpressionErrors(refDestructuringErrors)) {
  172960. return expr;
  172961. }
  172962. return expr.start === startPos && expr.type === "ArrowFunctionExpression" ? expr : this.parseExprOp(expr, startPos, startLoc, -1, forInit);
  172963. };
  172964. pp$5.parseExprOp = function(left, leftStartPos, leftStartLoc, minPrec, forInit) {
  172965. var prec = this.type.binop;
  172966. if (prec != null && (!forInit || this.type !== types$1._in)) {
  172967. if (prec > minPrec) {
  172968. var logical = this.type === types$1.logicalOR || this.type === types$1.logicalAND;
  172969. var coalesce = this.type === types$1.coalesce;
  172970. if (coalesce) {
  172971. prec = types$1.logicalAND.binop;
  172972. }
  172973. var op = this.value;
  172974. this.next();
  172975. var startPos = this.start, startLoc = this.startLoc;
  172976. var right = this.parseExprOp(this.parseMaybeUnary(null, false, false, forInit), startPos, startLoc, prec, forInit);
  172977. var node = this.buildBinary(leftStartPos, leftStartLoc, left, right, op, logical || coalesce);
  172978. if (logical && this.type === types$1.coalesce || coalesce && (this.type === types$1.logicalOR || this.type === types$1.logicalAND)) {
  172979. this.raiseRecoverable(this.start, "Logical expressions and coalesce expressions cannot be mixed. Wrap either by parentheses");
  172980. }
  172981. return this.parseExprOp(node, leftStartPos, leftStartLoc, minPrec, forInit);
  172982. }
  172983. }
  172984. return left;
  172985. };
  172986. pp$5.buildBinary = function(startPos, startLoc, left, right, op, logical) {
  172987. if (right.type === "PrivateIdentifier") {
  172988. this.raise(right.start, "Private identifier can only be left side of binary expression");
  172989. }
  172990. var node = this.startNodeAt(startPos, startLoc);
  172991. node.left = left;
  172992. node.operator = op;
  172993. node.right = right;
  172994. return this.finishNode(node, logical ? "LogicalExpression" : "BinaryExpression");
  172995. };
  172996. pp$5.parseMaybeUnary = function(refDestructuringErrors, sawUnary, incDec, forInit) {
  172997. var startPos = this.start, startLoc = this.startLoc, expr;
  172998. if (this.isContextual("await") && this.canAwait) {
  172999. expr = this.parseAwait(forInit);
  173000. sawUnary = true;
  173001. } else if (this.type.prefix) {
  173002. var node = this.startNode(), update = this.type === types$1.incDec;
  173003. node.operator = this.value;
  173004. node.prefix = true;
  173005. this.next();
  173006. node.argument = this.parseMaybeUnary(null, true, update, forInit);
  173007. this.checkExpressionErrors(refDestructuringErrors, true);
  173008. if (update) {
  173009. this.checkLValSimple(node.argument);
  173010. } else if (this.strict && node.operator === "delete" && node.argument.type === "Identifier") {
  173011. this.raiseRecoverable(node.start, "Deleting local variable in strict mode");
  173012. } else if (node.operator === "delete" && isPrivateFieldAccess(node.argument)) {
  173013. this.raiseRecoverable(node.start, "Private fields can not be deleted");
  173014. } else {
  173015. sawUnary = true;
  173016. }
  173017. expr = this.finishNode(node, update ? "UpdateExpression" : "UnaryExpression");
  173018. } else if (!sawUnary && this.type === types$1.privateId) {
  173019. if (forInit || this.privateNameStack.length === 0) {
  173020. this.unexpected();
  173021. }
  173022. expr = this.parsePrivateIdent();
  173023. if (this.type !== types$1._in) {
  173024. this.unexpected();
  173025. }
  173026. } else {
  173027. expr = this.parseExprSubscripts(refDestructuringErrors, forInit);
  173028. if (this.checkExpressionErrors(refDestructuringErrors)) {
  173029. return expr;
  173030. }
  173031. while (this.type.postfix && !this.canInsertSemicolon()) {
  173032. var node$1 = this.startNodeAt(startPos, startLoc);
  173033. node$1.operator = this.value;
  173034. node$1.prefix = false;
  173035. node$1.argument = expr;
  173036. this.checkLValSimple(expr);
  173037. this.next();
  173038. expr = this.finishNode(node$1, "UpdateExpression");
  173039. }
  173040. }
  173041. if (!incDec && this.eat(types$1.starstar)) {
  173042. if (sawUnary) {
  173043. this.unexpected(this.lastTokStart);
  173044. } else {
  173045. return this.buildBinary(startPos, startLoc, expr, this.parseMaybeUnary(null, false, false, forInit), "**", false);
  173046. }
  173047. } else {
  173048. return expr;
  173049. }
  173050. };
  173051. function isPrivateFieldAccess(node) {
  173052. return node.type === "MemberExpression" && node.property.type === "PrivateIdentifier" || node.type === "ChainExpression" && isPrivateFieldAccess(node.expression);
  173053. }
  173054. pp$5.parseExprSubscripts = function(refDestructuringErrors, forInit) {
  173055. var startPos = this.start, startLoc = this.startLoc;
  173056. var expr = this.parseExprAtom(refDestructuringErrors, forInit);
  173057. if (expr.type === "ArrowFunctionExpression" && this.input.slice(this.lastTokStart, this.lastTokEnd) !== ")") {
  173058. return expr;
  173059. }
  173060. var result = this.parseSubscripts(expr, startPos, startLoc, false, forInit);
  173061. if (refDestructuringErrors && result.type === "MemberExpression") {
  173062. if (refDestructuringErrors.parenthesizedAssign >= result.start) {
  173063. refDestructuringErrors.parenthesizedAssign = -1;
  173064. }
  173065. if (refDestructuringErrors.parenthesizedBind >= result.start) {
  173066. refDestructuringErrors.parenthesizedBind = -1;
  173067. }
  173068. if (refDestructuringErrors.trailingComma >= result.start) {
  173069. refDestructuringErrors.trailingComma = -1;
  173070. }
  173071. }
  173072. return result;
  173073. };
  173074. pp$5.parseSubscripts = function(base2, startPos, startLoc, noCalls, forInit) {
  173075. var maybeAsyncArrow = this.options.ecmaVersion >= 8 && base2.type === "Identifier" && base2.name === "async" && this.lastTokEnd === base2.end && !this.canInsertSemicolon() && base2.end - base2.start === 5 && this.potentialArrowAt === base2.start;
  173076. var optionalChained = false;
  173077. while (true) {
  173078. var element2 = this.parseSubscript(base2, startPos, startLoc, noCalls, maybeAsyncArrow, optionalChained, forInit);
  173079. if (element2.optional) {
  173080. optionalChained = true;
  173081. }
  173082. if (element2 === base2 || element2.type === "ArrowFunctionExpression") {
  173083. if (optionalChained) {
  173084. var chainNode = this.startNodeAt(startPos, startLoc);
  173085. chainNode.expression = element2;
  173086. element2 = this.finishNode(chainNode, "ChainExpression");
  173087. }
  173088. return element2;
  173089. }
  173090. base2 = element2;
  173091. }
  173092. };
  173093. pp$5.parseSubscript = function(base2, startPos, startLoc, noCalls, maybeAsyncArrow, optionalChained, forInit) {
  173094. var optionalSupported = this.options.ecmaVersion >= 11;
  173095. var optional = optionalSupported && this.eat(types$1.questionDot);
  173096. if (noCalls && optional) {
  173097. this.raise(this.lastTokStart, "Optional chaining cannot appear in the callee of new expressions");
  173098. }
  173099. var computed = this.eat(types$1.bracketL);
  173100. if (computed || optional && this.type !== types$1.parenL && this.type !== types$1.backQuote || this.eat(types$1.dot)) {
  173101. var node = this.startNodeAt(startPos, startLoc);
  173102. node.object = base2;
  173103. if (computed) {
  173104. node.property = this.parseExpression();
  173105. this.expect(types$1.bracketR);
  173106. } else if (this.type === types$1.privateId && base2.type !== "Super") {
  173107. node.property = this.parsePrivateIdent();
  173108. } else {
  173109. node.property = this.parseIdent(this.options.allowReserved !== "never");
  173110. }
  173111. node.computed = !!computed;
  173112. if (optionalSupported) {
  173113. node.optional = optional;
  173114. }
  173115. base2 = this.finishNode(node, "MemberExpression");
  173116. } else if (!noCalls && this.eat(types$1.parenL)) {
  173117. var refDestructuringErrors = new DestructuringErrors(), oldYieldPos = this.yieldPos, oldAwaitPos = this.awaitPos, oldAwaitIdentPos = this.awaitIdentPos;
  173118. this.yieldPos = 0;
  173119. this.awaitPos = 0;
  173120. this.awaitIdentPos = 0;
  173121. var exprList = this.parseExprList(types$1.parenR, this.options.ecmaVersion >= 8, false, refDestructuringErrors);
  173122. if (maybeAsyncArrow && !optional && !this.canInsertSemicolon() && this.eat(types$1.arrow)) {
  173123. this.checkPatternErrors(refDestructuringErrors, false);
  173124. this.checkYieldAwaitInDefaultParams();
  173125. if (this.awaitIdentPos > 0) {
  173126. this.raise(this.awaitIdentPos, "Cannot use 'await' as identifier inside an async function");
  173127. }
  173128. this.yieldPos = oldYieldPos;
  173129. this.awaitPos = oldAwaitPos;
  173130. this.awaitIdentPos = oldAwaitIdentPos;
  173131. return this.parseArrowExpression(this.startNodeAt(startPos, startLoc), exprList, true, forInit);
  173132. }
  173133. this.checkExpressionErrors(refDestructuringErrors, true);
  173134. this.yieldPos = oldYieldPos || this.yieldPos;
  173135. this.awaitPos = oldAwaitPos || this.awaitPos;
  173136. this.awaitIdentPos = oldAwaitIdentPos || this.awaitIdentPos;
  173137. var node$1 = this.startNodeAt(startPos, startLoc);
  173138. node$1.callee = base2;
  173139. node$1.arguments = exprList;
  173140. if (optionalSupported) {
  173141. node$1.optional = optional;
  173142. }
  173143. base2 = this.finishNode(node$1, "CallExpression");
  173144. } else if (this.type === types$1.backQuote) {
  173145. if (optional || optionalChained) {
  173146. this.raise(this.start, "Optional chaining cannot appear in the tag of tagged template expressions");
  173147. }
  173148. var node$2 = this.startNodeAt(startPos, startLoc);
  173149. node$2.tag = base2;
  173150. node$2.quasi = this.parseTemplate({ isTagged: true });
  173151. base2 = this.finishNode(node$2, "TaggedTemplateExpression");
  173152. }
  173153. return base2;
  173154. };
  173155. pp$5.parseExprAtom = function(refDestructuringErrors, forInit) {
  173156. if (this.type === types$1.slash) {
  173157. this.readRegexp();
  173158. }
  173159. var node, canBeArrow = this.potentialArrowAt === this.start;
  173160. switch (this.type) {
  173161. case types$1._super:
  173162. if (!this.allowSuper) {
  173163. this.raise(this.start, "'super' keyword outside a method");
  173164. }
  173165. node = this.startNode();
  173166. this.next();
  173167. if (this.type === types$1.parenL && !this.allowDirectSuper) {
  173168. this.raise(node.start, "super() call outside constructor of a subclass");
  173169. }
  173170. if (this.type !== types$1.dot && this.type !== types$1.bracketL && this.type !== types$1.parenL) {
  173171. this.unexpected();
  173172. }
  173173. return this.finishNode(node, "Super");
  173174. case types$1._this:
  173175. node = this.startNode();
  173176. this.next();
  173177. return this.finishNode(node, "ThisExpression");
  173178. case types$1.name:
  173179. var startPos = this.start, startLoc = this.startLoc, containsEsc = this.containsEsc;
  173180. var id = this.parseIdent(false);
  173181. if (this.options.ecmaVersion >= 8 && !containsEsc && id.name === "async" && !this.canInsertSemicolon() && this.eat(types$1._function)) {
  173182. this.overrideContext(types.f_expr);
  173183. return this.parseFunction(this.startNodeAt(startPos, startLoc), 0, false, true, forInit);
  173184. }
  173185. if (canBeArrow && !this.canInsertSemicolon()) {
  173186. if (this.eat(types$1.arrow)) {
  173187. return this.parseArrowExpression(this.startNodeAt(startPos, startLoc), [id], false, forInit);
  173188. }
  173189. if (this.options.ecmaVersion >= 8 && id.name === "async" && this.type === types$1.name && !containsEsc && (!this.potentialArrowInForAwait || this.value !== "of" || this.containsEsc)) {
  173190. id = this.parseIdent(false);
  173191. if (this.canInsertSemicolon() || !this.eat(types$1.arrow)) {
  173192. this.unexpected();
  173193. }
  173194. return this.parseArrowExpression(this.startNodeAt(startPos, startLoc), [id], true, forInit);
  173195. }
  173196. }
  173197. return id;
  173198. case types$1.regexp:
  173199. var value = this.value;
  173200. node = this.parseLiteral(value.value);
  173201. node.regex = { pattern: value.pattern, flags: value.flags };
  173202. return node;
  173203. case types$1.num:
  173204. case types$1.string:
  173205. return this.parseLiteral(this.value);
  173206. case types$1._null:
  173207. case types$1._true:
  173208. case types$1._false:
  173209. node = this.startNode();
  173210. node.value = this.type === types$1._null ? null : this.type === types$1._true;
  173211. node.raw = this.type.keyword;
  173212. this.next();
  173213. return this.finishNode(node, "Literal");
  173214. case types$1.parenL:
  173215. var start3 = this.start, expr = this.parseParenAndDistinguishExpression(canBeArrow, forInit);
  173216. if (refDestructuringErrors) {
  173217. if (refDestructuringErrors.parenthesizedAssign < 0 && !this.isSimpleAssignTarget(expr)) {
  173218. refDestructuringErrors.parenthesizedAssign = start3;
  173219. }
  173220. if (refDestructuringErrors.parenthesizedBind < 0) {
  173221. refDestructuringErrors.parenthesizedBind = start3;
  173222. }
  173223. }
  173224. return expr;
  173225. case types$1.bracketL:
  173226. node = this.startNode();
  173227. this.next();
  173228. node.elements = this.parseExprList(types$1.bracketR, true, true, refDestructuringErrors);
  173229. return this.finishNode(node, "ArrayExpression");
  173230. case types$1.braceL:
  173231. this.overrideContext(types.b_expr);
  173232. return this.parseObj(false, refDestructuringErrors);
  173233. case types$1._function:
  173234. node = this.startNode();
  173235. this.next();
  173236. return this.parseFunction(node, 0);
  173237. case types$1._class:
  173238. return this.parseClass(this.startNode(), false);
  173239. case types$1._new:
  173240. return this.parseNew();
  173241. case types$1.backQuote:
  173242. return this.parseTemplate();
  173243. case types$1._import:
  173244. if (this.options.ecmaVersion >= 11) {
  173245. return this.parseExprImport();
  173246. } else {
  173247. return this.unexpected();
  173248. }
  173249. default:
  173250. this.unexpected();
  173251. }
  173252. };
  173253. pp$5.parseExprImport = function() {
  173254. var node = this.startNode();
  173255. if (this.containsEsc) {
  173256. this.raiseRecoverable(this.start, "Escape sequence in keyword import");
  173257. }
  173258. var meta = this.parseIdent(true);
  173259. switch (this.type) {
  173260. case types$1.parenL:
  173261. return this.parseDynamicImport(node);
  173262. case types$1.dot:
  173263. node.meta = meta;
  173264. return this.parseImportMeta(node);
  173265. default:
  173266. this.unexpected();
  173267. }
  173268. };
  173269. pp$5.parseDynamicImport = function(node) {
  173270. this.next();
  173271. node.source = this.parseMaybeAssign();
  173272. if (!this.eat(types$1.parenR)) {
  173273. var errorPos = this.start;
  173274. if (this.eat(types$1.comma) && this.eat(types$1.parenR)) {
  173275. this.raiseRecoverable(errorPos, "Trailing comma is not allowed in import()");
  173276. } else {
  173277. this.unexpected(errorPos);
  173278. }
  173279. }
  173280. return this.finishNode(node, "ImportExpression");
  173281. };
  173282. pp$5.parseImportMeta = function(node) {
  173283. this.next();
  173284. var containsEsc = this.containsEsc;
  173285. node.property = this.parseIdent(true);
  173286. if (node.property.name !== "meta") {
  173287. this.raiseRecoverable(node.property.start, "The only valid meta property for import is 'import.meta'");
  173288. }
  173289. if (containsEsc) {
  173290. this.raiseRecoverable(node.start, "'import.meta' must not contain escaped characters");
  173291. }
  173292. if (this.options.sourceType !== "module" && !this.options.allowImportExportEverywhere) {
  173293. this.raiseRecoverable(node.start, "Cannot use 'import.meta' outside a module");
  173294. }
  173295. return this.finishNode(node, "MetaProperty");
  173296. };
  173297. pp$5.parseLiteral = function(value) {
  173298. var node = this.startNode();
  173299. node.value = value;
  173300. node.raw = this.input.slice(this.start, this.end);
  173301. if (node.raw.charCodeAt(node.raw.length - 1) === 110) {
  173302. node.bigint = node.raw.slice(0, -1).replace(/_/g, "");
  173303. }
  173304. this.next();
  173305. return this.finishNode(node, "Literal");
  173306. };
  173307. pp$5.parseParenExpression = function() {
  173308. this.expect(types$1.parenL);
  173309. var val = this.parseExpression();
  173310. this.expect(types$1.parenR);
  173311. return val;
  173312. };
  173313. pp$5.parseParenAndDistinguishExpression = function(canBeArrow, forInit) {
  173314. var startPos = this.start, startLoc = this.startLoc, val, allowTrailingComma = this.options.ecmaVersion >= 8;
  173315. if (this.options.ecmaVersion >= 6) {
  173316. this.next();
  173317. var innerStartPos = this.start, innerStartLoc = this.startLoc;
  173318. var exprList = [], first = true, lastIsComma = false;
  173319. var refDestructuringErrors = new DestructuringErrors(), oldYieldPos = this.yieldPos, oldAwaitPos = this.awaitPos, spreadStart;
  173320. this.yieldPos = 0;
  173321. this.awaitPos = 0;
  173322. while (this.type !== types$1.parenR) {
  173323. first ? first = false : this.expect(types$1.comma);
  173324. if (allowTrailingComma && this.afterTrailingComma(types$1.parenR, true)) {
  173325. lastIsComma = true;
  173326. break;
  173327. } else if (this.type === types$1.ellipsis) {
  173328. spreadStart = this.start;
  173329. exprList.push(this.parseParenItem(this.parseRestBinding()));
  173330. if (this.type === types$1.comma) {
  173331. this.raise(this.start, "Comma is not permitted after the rest element");
  173332. }
  173333. break;
  173334. } else {
  173335. exprList.push(this.parseMaybeAssign(false, refDestructuringErrors, this.parseParenItem));
  173336. }
  173337. }
  173338. var innerEndPos = this.lastTokEnd, innerEndLoc = this.lastTokEndLoc;
  173339. this.expect(types$1.parenR);
  173340. if (canBeArrow && !this.canInsertSemicolon() && this.eat(types$1.arrow)) {
  173341. this.checkPatternErrors(refDestructuringErrors, false);
  173342. this.checkYieldAwaitInDefaultParams();
  173343. this.yieldPos = oldYieldPos;
  173344. this.awaitPos = oldAwaitPos;
  173345. return this.parseParenArrowList(startPos, startLoc, exprList, forInit);
  173346. }
  173347. if (!exprList.length || lastIsComma) {
  173348. this.unexpected(this.lastTokStart);
  173349. }
  173350. if (spreadStart) {
  173351. this.unexpected(spreadStart);
  173352. }
  173353. this.checkExpressionErrors(refDestructuringErrors, true);
  173354. this.yieldPos = oldYieldPos || this.yieldPos;
  173355. this.awaitPos = oldAwaitPos || this.awaitPos;
  173356. if (exprList.length > 1) {
  173357. val = this.startNodeAt(innerStartPos, innerStartLoc);
  173358. val.expressions = exprList;
  173359. this.finishNodeAt(val, "SequenceExpression", innerEndPos, innerEndLoc);
  173360. } else {
  173361. val = exprList[0];
  173362. }
  173363. } else {
  173364. val = this.parseParenExpression();
  173365. }
  173366. if (this.options.preserveParens) {
  173367. var par = this.startNodeAt(startPos, startLoc);
  173368. par.expression = val;
  173369. return this.finishNode(par, "ParenthesizedExpression");
  173370. } else {
  173371. return val;
  173372. }
  173373. };
  173374. pp$5.parseParenItem = function(item) {
  173375. return item;
  173376. };
  173377. pp$5.parseParenArrowList = function(startPos, startLoc, exprList, forInit) {
  173378. return this.parseArrowExpression(this.startNodeAt(startPos, startLoc), exprList, false, forInit);
  173379. };
  173380. var empty = [];
  173381. pp$5.parseNew = function() {
  173382. if (this.containsEsc) {
  173383. this.raiseRecoverable(this.start, "Escape sequence in keyword new");
  173384. }
  173385. var node = this.startNode();
  173386. var meta = this.parseIdent(true);
  173387. if (this.options.ecmaVersion >= 6 && this.eat(types$1.dot)) {
  173388. node.meta = meta;
  173389. var containsEsc = this.containsEsc;
  173390. node.property = this.parseIdent(true);
  173391. if (node.property.name !== "target") {
  173392. this.raiseRecoverable(node.property.start, "The only valid meta property for new is 'new.target'");
  173393. }
  173394. if (containsEsc) {
  173395. this.raiseRecoverable(node.start, "'new.target' must not contain escaped characters");
  173396. }
  173397. if (!this.allowNewDotTarget) {
  173398. this.raiseRecoverable(node.start, "'new.target' can only be used in functions and class static block");
  173399. }
  173400. return this.finishNode(node, "MetaProperty");
  173401. }
  173402. var startPos = this.start, startLoc = this.startLoc, isImport = this.type === types$1._import;
  173403. node.callee = this.parseSubscripts(this.parseExprAtom(), startPos, startLoc, true, false);
  173404. if (isImport && node.callee.type === "ImportExpression") {
  173405. this.raise(startPos, "Cannot use new with import()");
  173406. }
  173407. if (this.eat(types$1.parenL)) {
  173408. node.arguments = this.parseExprList(types$1.parenR, this.options.ecmaVersion >= 8, false);
  173409. } else {
  173410. node.arguments = empty;
  173411. }
  173412. return this.finishNode(node, "NewExpression");
  173413. };
  173414. pp$5.parseTemplateElement = function(ref2) {
  173415. var isTagged = ref2.isTagged;
  173416. var elem = this.startNode();
  173417. if (this.type === types$1.invalidTemplate) {
  173418. if (!isTagged) {
  173419. this.raiseRecoverable(this.start, "Bad escape sequence in untagged template literal");
  173420. }
  173421. elem.value = {
  173422. raw: this.value,
  173423. cooked: null
  173424. };
  173425. } else {
  173426. elem.value = {
  173427. raw: this.input.slice(this.start, this.end).replace(/\r\n?/g, "\n"),
  173428. cooked: this.value
  173429. };
  173430. }
  173431. this.next();
  173432. elem.tail = this.type === types$1.backQuote;
  173433. return this.finishNode(elem, "TemplateElement");
  173434. };
  173435. pp$5.parseTemplate = function(ref2) {
  173436. if (ref2 === void 0)
  173437. ref2 = {};
  173438. var isTagged = ref2.isTagged;
  173439. if (isTagged === void 0)
  173440. isTagged = false;
  173441. var node = this.startNode();
  173442. this.next();
  173443. node.expressions = [];
  173444. var curElt = this.parseTemplateElement({ isTagged });
  173445. node.quasis = [curElt];
  173446. while (!curElt.tail) {
  173447. if (this.type === types$1.eof) {
  173448. this.raise(this.pos, "Unterminated template literal");
  173449. }
  173450. this.expect(types$1.dollarBraceL);
  173451. node.expressions.push(this.parseExpression());
  173452. this.expect(types$1.braceR);
  173453. node.quasis.push(curElt = this.parseTemplateElement({ isTagged }));
  173454. }
  173455. this.next();
  173456. return this.finishNode(node, "TemplateLiteral");
  173457. };
  173458. pp$5.isAsyncProp = function(prop) {
  173459. return !prop.computed && prop.key.type === "Identifier" && prop.key.name === "async" && (this.type === types$1.name || this.type === types$1.num || this.type === types$1.string || this.type === types$1.bracketL || this.type.keyword || this.options.ecmaVersion >= 9 && this.type === types$1.star) && !lineBreak.test(this.input.slice(this.lastTokEnd, this.start));
  173460. };
  173461. pp$5.parseObj = function(isPattern, refDestructuringErrors) {
  173462. var node = this.startNode(), first = true, propHash = {};
  173463. node.properties = [];
  173464. this.next();
  173465. while (!this.eat(types$1.braceR)) {
  173466. if (!first) {
  173467. this.expect(types$1.comma);
  173468. if (this.options.ecmaVersion >= 5 && this.afterTrailingComma(types$1.braceR)) {
  173469. break;
  173470. }
  173471. } else {
  173472. first = false;
  173473. }
  173474. var prop = this.parseProperty(isPattern, refDestructuringErrors);
  173475. if (!isPattern) {
  173476. this.checkPropClash(prop, propHash, refDestructuringErrors);
  173477. }
  173478. node.properties.push(prop);
  173479. }
  173480. return this.finishNode(node, isPattern ? "ObjectPattern" : "ObjectExpression");
  173481. };
  173482. pp$5.parseProperty = function(isPattern, refDestructuringErrors) {
  173483. var prop = this.startNode(), isGenerator, isAsync, startPos, startLoc;
  173484. if (this.options.ecmaVersion >= 9 && this.eat(types$1.ellipsis)) {
  173485. if (isPattern) {
  173486. prop.argument = this.parseIdent(false);
  173487. if (this.type === types$1.comma) {
  173488. this.raise(this.start, "Comma is not permitted after the rest element");
  173489. }
  173490. return this.finishNode(prop, "RestElement");
  173491. }
  173492. if (this.type === types$1.parenL && refDestructuringErrors) {
  173493. if (refDestructuringErrors.parenthesizedAssign < 0) {
  173494. refDestructuringErrors.parenthesizedAssign = this.start;
  173495. }
  173496. if (refDestructuringErrors.parenthesizedBind < 0) {
  173497. refDestructuringErrors.parenthesizedBind = this.start;
  173498. }
  173499. }
  173500. prop.argument = this.parseMaybeAssign(false, refDestructuringErrors);
  173501. if (this.type === types$1.comma && refDestructuringErrors && refDestructuringErrors.trailingComma < 0) {
  173502. refDestructuringErrors.trailingComma = this.start;
  173503. }
  173504. return this.finishNode(prop, "SpreadElement");
  173505. }
  173506. if (this.options.ecmaVersion >= 6) {
  173507. prop.method = false;
  173508. prop.shorthand = false;
  173509. if (isPattern || refDestructuringErrors) {
  173510. startPos = this.start;
  173511. startLoc = this.startLoc;
  173512. }
  173513. if (!isPattern) {
  173514. isGenerator = this.eat(types$1.star);
  173515. }
  173516. }
  173517. var containsEsc = this.containsEsc;
  173518. this.parsePropertyName(prop);
  173519. if (!isPattern && !containsEsc && this.options.ecmaVersion >= 8 && !isGenerator && this.isAsyncProp(prop)) {
  173520. isAsync = true;
  173521. isGenerator = this.options.ecmaVersion >= 9 && this.eat(types$1.star);
  173522. this.parsePropertyName(prop, refDestructuringErrors);
  173523. } else {
  173524. isAsync = false;
  173525. }
  173526. this.parsePropertyValue(prop, isPattern, isGenerator, isAsync, startPos, startLoc, refDestructuringErrors, containsEsc);
  173527. return this.finishNode(prop, "Property");
  173528. };
  173529. pp$5.parsePropertyValue = function(prop, isPattern, isGenerator, isAsync, startPos, startLoc, refDestructuringErrors, containsEsc) {
  173530. if ((isGenerator || isAsync) && this.type === types$1.colon) {
  173531. this.unexpected();
  173532. }
  173533. if (this.eat(types$1.colon)) {
  173534. prop.value = isPattern ? this.parseMaybeDefault(this.start, this.startLoc) : this.parseMaybeAssign(false, refDestructuringErrors);
  173535. prop.kind = "init";
  173536. } else if (this.options.ecmaVersion >= 6 && this.type === types$1.parenL) {
  173537. if (isPattern) {
  173538. this.unexpected();
  173539. }
  173540. prop.kind = "init";
  173541. prop.method = true;
  173542. prop.value = this.parseMethod(isGenerator, isAsync);
  173543. } else if (!isPattern && !containsEsc && this.options.ecmaVersion >= 5 && !prop.computed && prop.key.type === "Identifier" && (prop.key.name === "get" || prop.key.name === "set") && (this.type !== types$1.comma && this.type !== types$1.braceR && this.type !== types$1.eq)) {
  173544. if (isGenerator || isAsync) {
  173545. this.unexpected();
  173546. }
  173547. prop.kind = prop.key.name;
  173548. this.parsePropertyName(prop);
  173549. prop.value = this.parseMethod(false);
  173550. var paramCount = prop.kind === "get" ? 0 : 1;
  173551. if (prop.value.params.length !== paramCount) {
  173552. var start3 = prop.value.start;
  173553. if (prop.kind === "get") {
  173554. this.raiseRecoverable(start3, "getter should have no params");
  173555. } else {
  173556. this.raiseRecoverable(start3, "setter should have exactly one param");
  173557. }
  173558. } else {
  173559. if (prop.kind === "set" && prop.value.params[0].type === "RestElement") {
  173560. this.raiseRecoverable(prop.value.params[0].start, "Setter cannot use rest params");
  173561. }
  173562. }
  173563. } else if (this.options.ecmaVersion >= 6 && !prop.computed && prop.key.type === "Identifier") {
  173564. if (isGenerator || isAsync) {
  173565. this.unexpected();
  173566. }
  173567. this.checkUnreserved(prop.key);
  173568. if (prop.key.name === "await" && !this.awaitIdentPos) {
  173569. this.awaitIdentPos = startPos;
  173570. }
  173571. prop.kind = "init";
  173572. if (isPattern) {
  173573. prop.value = this.parseMaybeDefault(startPos, startLoc, this.copyNode(prop.key));
  173574. } else if (this.type === types$1.eq && refDestructuringErrors) {
  173575. if (refDestructuringErrors.shorthandAssign < 0) {
  173576. refDestructuringErrors.shorthandAssign = this.start;
  173577. }
  173578. prop.value = this.parseMaybeDefault(startPos, startLoc, this.copyNode(prop.key));
  173579. } else {
  173580. prop.value = this.copyNode(prop.key);
  173581. }
  173582. prop.shorthand = true;
  173583. } else {
  173584. this.unexpected();
  173585. }
  173586. };
  173587. pp$5.parsePropertyName = function(prop) {
  173588. if (this.options.ecmaVersion >= 6) {
  173589. if (this.eat(types$1.bracketL)) {
  173590. prop.computed = true;
  173591. prop.key = this.parseMaybeAssign();
  173592. this.expect(types$1.bracketR);
  173593. return prop.key;
  173594. } else {
  173595. prop.computed = false;
  173596. }
  173597. }
  173598. return prop.key = this.type === types$1.num || this.type === types$1.string ? this.parseExprAtom() : this.parseIdent(this.options.allowReserved !== "never");
  173599. };
  173600. pp$5.initFunction = function(node) {
  173601. node.id = null;
  173602. if (this.options.ecmaVersion >= 6) {
  173603. node.generator = node.expression = false;
  173604. }
  173605. if (this.options.ecmaVersion >= 8) {
  173606. node.async = false;
  173607. }
  173608. };
  173609. pp$5.parseMethod = function(isGenerator, isAsync, allowDirectSuper) {
  173610. var node = this.startNode(), oldYieldPos = this.yieldPos, oldAwaitPos = this.awaitPos, oldAwaitIdentPos = this.awaitIdentPos;
  173611. this.initFunction(node);
  173612. if (this.options.ecmaVersion >= 6) {
  173613. node.generator = isGenerator;
  173614. }
  173615. if (this.options.ecmaVersion >= 8) {
  173616. node.async = !!isAsync;
  173617. }
  173618. this.yieldPos = 0;
  173619. this.awaitPos = 0;
  173620. this.awaitIdentPos = 0;
  173621. this.enterScope(functionFlags(isAsync, node.generator) | SCOPE_SUPER | (allowDirectSuper ? SCOPE_DIRECT_SUPER : 0));
  173622. this.expect(types$1.parenL);
  173623. node.params = this.parseBindingList(types$1.parenR, false, this.options.ecmaVersion >= 8);
  173624. this.checkYieldAwaitInDefaultParams();
  173625. this.parseFunctionBody(node, false, true, false);
  173626. this.yieldPos = oldYieldPos;
  173627. this.awaitPos = oldAwaitPos;
  173628. this.awaitIdentPos = oldAwaitIdentPos;
  173629. return this.finishNode(node, "FunctionExpression");
  173630. };
  173631. pp$5.parseArrowExpression = function(node, params, isAsync, forInit) {
  173632. var oldYieldPos = this.yieldPos, oldAwaitPos = this.awaitPos, oldAwaitIdentPos = this.awaitIdentPos;
  173633. this.enterScope(functionFlags(isAsync, false) | SCOPE_ARROW);
  173634. this.initFunction(node);
  173635. if (this.options.ecmaVersion >= 8) {
  173636. node.async = !!isAsync;
  173637. }
  173638. this.yieldPos = 0;
  173639. this.awaitPos = 0;
  173640. this.awaitIdentPos = 0;
  173641. node.params = this.toAssignableList(params, true);
  173642. this.parseFunctionBody(node, true, false, forInit);
  173643. this.yieldPos = oldYieldPos;
  173644. this.awaitPos = oldAwaitPos;
  173645. this.awaitIdentPos = oldAwaitIdentPos;
  173646. return this.finishNode(node, "ArrowFunctionExpression");
  173647. };
  173648. pp$5.parseFunctionBody = function(node, isArrowFunction, isMethod, forInit) {
  173649. var isExpression = isArrowFunction && this.type !== types$1.braceL;
  173650. var oldStrict = this.strict, useStrict = false;
  173651. if (isExpression) {
  173652. node.body = this.parseMaybeAssign(forInit);
  173653. node.expression = true;
  173654. this.checkParams(node, false);
  173655. } else {
  173656. var nonSimple = this.options.ecmaVersion >= 7 && !this.isSimpleParamList(node.params);
  173657. if (!oldStrict || nonSimple) {
  173658. useStrict = this.strictDirective(this.end);
  173659. if (useStrict && nonSimple) {
  173660. this.raiseRecoverable(node.start, "Illegal 'use strict' directive in function with non-simple parameter list");
  173661. }
  173662. }
  173663. var oldLabels = this.labels;
  173664. this.labels = [];
  173665. if (useStrict) {
  173666. this.strict = true;
  173667. }
  173668. this.checkParams(node, !oldStrict && !useStrict && !isArrowFunction && !isMethod && this.isSimpleParamList(node.params));
  173669. if (this.strict && node.id) {
  173670. this.checkLValSimple(node.id, BIND_OUTSIDE);
  173671. }
  173672. node.body = this.parseBlock(false, void 0, useStrict && !oldStrict);
  173673. node.expression = false;
  173674. this.adaptDirectivePrologue(node.body.body);
  173675. this.labels = oldLabels;
  173676. }
  173677. this.exitScope();
  173678. };
  173679. pp$5.isSimpleParamList = function(params) {
  173680. for (var i = 0, list3 = params; i < list3.length; i += 1) {
  173681. var param = list3[i];
  173682. if (param.type !== "Identifier") {
  173683. return false;
  173684. }
  173685. }
  173686. return true;
  173687. };
  173688. pp$5.checkParams = function(node, allowDuplicates) {
  173689. var nameHash = /* @__PURE__ */ Object.create(null);
  173690. for (var i = 0, list3 = node.params; i < list3.length; i += 1) {
  173691. var param = list3[i];
  173692. this.checkLValInnerPattern(param, BIND_VAR, allowDuplicates ? null : nameHash);
  173693. }
  173694. };
  173695. pp$5.parseExprList = function(close, allowTrailingComma, allowEmpty, refDestructuringErrors) {
  173696. var elts = [], first = true;
  173697. while (!this.eat(close)) {
  173698. if (!first) {
  173699. this.expect(types$1.comma);
  173700. if (allowTrailingComma && this.afterTrailingComma(close)) {
  173701. break;
  173702. }
  173703. } else {
  173704. first = false;
  173705. }
  173706. var elt = void 0;
  173707. if (allowEmpty && this.type === types$1.comma) {
  173708. elt = null;
  173709. } else if (this.type === types$1.ellipsis) {
  173710. elt = this.parseSpread(refDestructuringErrors);
  173711. if (refDestructuringErrors && this.type === types$1.comma && refDestructuringErrors.trailingComma < 0) {
  173712. refDestructuringErrors.trailingComma = this.start;
  173713. }
  173714. } else {
  173715. elt = this.parseMaybeAssign(false, refDestructuringErrors);
  173716. }
  173717. elts.push(elt);
  173718. }
  173719. return elts;
  173720. };
  173721. pp$5.checkUnreserved = function(ref2) {
  173722. var start3 = ref2.start;
  173723. var end = ref2.end;
  173724. var name2 = ref2.name;
  173725. if (this.inGenerator && name2 === "yield") {
  173726. this.raiseRecoverable(start3, "Cannot use 'yield' as identifier inside a generator");
  173727. }
  173728. if (this.inAsync && name2 === "await") {
  173729. this.raiseRecoverable(start3, "Cannot use 'await' as identifier inside an async function");
  173730. }
  173731. if (this.currentThisScope().inClassFieldInit && name2 === "arguments") {
  173732. this.raiseRecoverable(start3, "Cannot use 'arguments' in class field initializer");
  173733. }
  173734. if (this.inClassStaticBlock && (name2 === "arguments" || name2 === "await")) {
  173735. this.raise(start3, "Cannot use " + name2 + " in class static initialization block");
  173736. }
  173737. if (this.keywords.test(name2)) {
  173738. this.raise(start3, "Unexpected keyword '" + name2 + "'");
  173739. }
  173740. if (this.options.ecmaVersion < 6 && this.input.slice(start3, end).indexOf("\\") !== -1) {
  173741. return;
  173742. }
  173743. var re = this.strict ? this.reservedWordsStrict : this.reservedWords;
  173744. if (re.test(name2)) {
  173745. if (!this.inAsync && name2 === "await") {
  173746. this.raiseRecoverable(start3, "Cannot use keyword 'await' outside an async function");
  173747. }
  173748. this.raiseRecoverable(start3, "The keyword '" + name2 + "' is reserved");
  173749. }
  173750. };
  173751. pp$5.parseIdent = function(liberal, isBinding) {
  173752. var node = this.startNode();
  173753. if (this.type === types$1.name) {
  173754. node.name = this.value;
  173755. } else if (this.type.keyword) {
  173756. node.name = this.type.keyword;
  173757. if ((node.name === "class" || node.name === "function") && (this.lastTokEnd !== this.lastTokStart + 1 || this.input.charCodeAt(this.lastTokStart) !== 46)) {
  173758. this.context.pop();
  173759. }
  173760. } else {
  173761. this.unexpected();
  173762. }
  173763. this.next(!!liberal);
  173764. this.finishNode(node, "Identifier");
  173765. if (!liberal) {
  173766. this.checkUnreserved(node);
  173767. if (node.name === "await" && !this.awaitIdentPos) {
  173768. this.awaitIdentPos = node.start;
  173769. }
  173770. }
  173771. return node;
  173772. };
  173773. pp$5.parsePrivateIdent = function() {
  173774. var node = this.startNode();
  173775. if (this.type === types$1.privateId) {
  173776. node.name = this.value;
  173777. } else {
  173778. this.unexpected();
  173779. }
  173780. this.next();
  173781. this.finishNode(node, "PrivateIdentifier");
  173782. if (this.privateNameStack.length === 0) {
  173783. this.raise(node.start, "Private field '#" + node.name + "' must be declared in an enclosing class");
  173784. } else {
  173785. this.privateNameStack[this.privateNameStack.length - 1].used.push(node);
  173786. }
  173787. return node;
  173788. };
  173789. pp$5.parseYield = function(forInit) {
  173790. if (!this.yieldPos) {
  173791. this.yieldPos = this.start;
  173792. }
  173793. var node = this.startNode();
  173794. this.next();
  173795. if (this.type === types$1.semi || this.canInsertSemicolon() || this.type !== types$1.star && !this.type.startsExpr) {
  173796. node.delegate = false;
  173797. node.argument = null;
  173798. } else {
  173799. node.delegate = this.eat(types$1.star);
  173800. node.argument = this.parseMaybeAssign(forInit);
  173801. }
  173802. return this.finishNode(node, "YieldExpression");
  173803. };
  173804. pp$5.parseAwait = function(forInit) {
  173805. if (!this.awaitPos) {
  173806. this.awaitPos = this.start;
  173807. }
  173808. var node = this.startNode();
  173809. this.next();
  173810. node.argument = this.parseMaybeUnary(null, true, false, forInit);
  173811. return this.finishNode(node, "AwaitExpression");
  173812. };
  173813. var pp$4 = Parser.prototype;
  173814. pp$4.raise = function(pos, message) {
  173815. var loc = getLineInfo(this.input, pos);
  173816. message += " (" + loc.line + ":" + loc.column + ")";
  173817. var err = new SyntaxError(message);
  173818. err.pos = pos;
  173819. err.loc = loc;
  173820. err.raisedAt = this.pos;
  173821. throw err;
  173822. };
  173823. pp$4.raiseRecoverable = pp$4.raise;
  173824. pp$4.curPosition = function() {
  173825. if (this.options.locations) {
  173826. return new Position(this.curLine, this.pos - this.lineStart);
  173827. }
  173828. };
  173829. var pp$3 = Parser.prototype;
  173830. var Scope = function Scope2(flags) {
  173831. this.flags = flags;
  173832. this.var = [];
  173833. this.lexical = [];
  173834. this.functions = [];
  173835. this.inClassFieldInit = false;
  173836. };
  173837. pp$3.enterScope = function(flags) {
  173838. this.scopeStack.push(new Scope(flags));
  173839. };
  173840. pp$3.exitScope = function() {
  173841. this.scopeStack.pop();
  173842. };
  173843. pp$3.treatFunctionsAsVarInScope = function(scope) {
  173844. return scope.flags & SCOPE_FUNCTION || !this.inModule && scope.flags & SCOPE_TOP;
  173845. };
  173846. pp$3.declareName = function(name2, bindingType, pos) {
  173847. var redeclared = false;
  173848. if (bindingType === BIND_LEXICAL) {
  173849. var scope = this.currentScope();
  173850. redeclared = scope.lexical.indexOf(name2) > -1 || scope.functions.indexOf(name2) > -1 || scope.var.indexOf(name2) > -1;
  173851. scope.lexical.push(name2);
  173852. if (this.inModule && scope.flags & SCOPE_TOP) {
  173853. delete this.undefinedExports[name2];
  173854. }
  173855. } else if (bindingType === BIND_SIMPLE_CATCH) {
  173856. var scope$1 = this.currentScope();
  173857. scope$1.lexical.push(name2);
  173858. } else if (bindingType === BIND_FUNCTION) {
  173859. var scope$2 = this.currentScope();
  173860. if (this.treatFunctionsAsVar) {
  173861. redeclared = scope$2.lexical.indexOf(name2) > -1;
  173862. } else {
  173863. redeclared = scope$2.lexical.indexOf(name2) > -1 || scope$2.var.indexOf(name2) > -1;
  173864. }
  173865. scope$2.functions.push(name2);
  173866. } else {
  173867. for (var i = this.scopeStack.length - 1; i >= 0; --i) {
  173868. var scope$3 = this.scopeStack[i];
  173869. if (scope$3.lexical.indexOf(name2) > -1 && !(scope$3.flags & SCOPE_SIMPLE_CATCH && scope$3.lexical[0] === name2) || !this.treatFunctionsAsVarInScope(scope$3) && scope$3.functions.indexOf(name2) > -1) {
  173870. redeclared = true;
  173871. break;
  173872. }
  173873. scope$3.var.push(name2);
  173874. if (this.inModule && scope$3.flags & SCOPE_TOP) {
  173875. delete this.undefinedExports[name2];
  173876. }
  173877. if (scope$3.flags & SCOPE_VAR) {
  173878. break;
  173879. }
  173880. }
  173881. }
  173882. if (redeclared) {
  173883. this.raiseRecoverable(pos, "Identifier '" + name2 + "' has already been declared");
  173884. }
  173885. };
  173886. pp$3.checkLocalExport = function(id) {
  173887. if (this.scopeStack[0].lexical.indexOf(id.name) === -1 && this.scopeStack[0].var.indexOf(id.name) === -1) {
  173888. this.undefinedExports[id.name] = id;
  173889. }
  173890. };
  173891. pp$3.currentScope = function() {
  173892. return this.scopeStack[this.scopeStack.length - 1];
  173893. };
  173894. pp$3.currentVarScope = function() {
  173895. for (var i = this.scopeStack.length - 1; ; i--) {
  173896. var scope = this.scopeStack[i];
  173897. if (scope.flags & SCOPE_VAR) {
  173898. return scope;
  173899. }
  173900. }
  173901. };
  173902. pp$3.currentThisScope = function() {
  173903. for (var i = this.scopeStack.length - 1; ; i--) {
  173904. var scope = this.scopeStack[i];
  173905. if (scope.flags & SCOPE_VAR && !(scope.flags & SCOPE_ARROW)) {
  173906. return scope;
  173907. }
  173908. }
  173909. };
  173910. var Node = function Node2(parser, pos, loc) {
  173911. this.type = "";
  173912. this.start = pos;
  173913. this.end = 0;
  173914. if (parser.options.locations) {
  173915. this.loc = new SourceLocation(parser, loc);
  173916. }
  173917. if (parser.options.directSourceFile) {
  173918. this.sourceFile = parser.options.directSourceFile;
  173919. }
  173920. if (parser.options.ranges) {
  173921. this.range = [pos, 0];
  173922. }
  173923. };
  173924. var pp$2 = Parser.prototype;
  173925. pp$2.startNode = function() {
  173926. return new Node(this, this.start, this.startLoc);
  173927. };
  173928. pp$2.startNodeAt = function(pos, loc) {
  173929. return new Node(this, pos, loc);
  173930. };
  173931. function finishNodeAt(node, type, pos, loc) {
  173932. node.type = type;
  173933. node.end = pos;
  173934. if (this.options.locations) {
  173935. node.loc.end = loc;
  173936. }
  173937. if (this.options.ranges) {
  173938. node.range[1] = pos;
  173939. }
  173940. return node;
  173941. }
  173942. pp$2.finishNode = function(node, type) {
  173943. return finishNodeAt.call(this, node, type, this.lastTokEnd, this.lastTokEndLoc);
  173944. };
  173945. pp$2.finishNodeAt = function(node, type, pos, loc) {
  173946. return finishNodeAt.call(this, node, type, pos, loc);
  173947. };
  173948. pp$2.copyNode = function(node) {
  173949. var newNode = new Node(this, node.start, this.startLoc);
  173950. for (var prop in node) {
  173951. newNode[prop] = node[prop];
  173952. }
  173953. return newNode;
  173954. };
  173955. var ecma9BinaryProperties = "ASCII ASCII_Hex_Digit AHex Alphabetic Alpha Any Assigned Bidi_Control Bidi_C Bidi_Mirrored Bidi_M Case_Ignorable CI Cased Changes_When_Casefolded CWCF Changes_When_Casemapped CWCM Changes_When_Lowercased CWL Changes_When_NFKC_Casefolded CWKCF Changes_When_Titlecased CWT Changes_When_Uppercased CWU Dash Default_Ignorable_Code_Point DI Deprecated Dep Diacritic Dia Emoji Emoji_Component Emoji_Modifier Emoji_Modifier_Base Emoji_Presentation Extender Ext Grapheme_Base Gr_Base Grapheme_Extend Gr_Ext Hex_Digit Hex IDS_Binary_Operator IDSB IDS_Trinary_Operator IDST ID_Continue IDC ID_Start IDS Ideographic Ideo Join_Control Join_C Logical_Order_Exception LOE Lowercase Lower Math Noncharacter_Code_Point NChar Pattern_Syntax Pat_Syn Pattern_White_Space Pat_WS Quotation_Mark QMark Radical Regional_Indicator RI Sentence_Terminal STerm Soft_Dotted SD Terminal_Punctuation Term Unified_Ideograph UIdeo Uppercase Upper Variation_Selector VS White_Space space XID_Continue XIDC XID_Start XIDS";
  173956. var ecma10BinaryProperties = ecma9BinaryProperties + " Extended_Pictographic";
  173957. var ecma11BinaryProperties = ecma10BinaryProperties;
  173958. var ecma12BinaryProperties = ecma11BinaryProperties + " EBase EComp EMod EPres ExtPict";
  173959. var ecma13BinaryProperties = ecma12BinaryProperties;
  173960. var unicodeBinaryProperties = {
  173961. 9: ecma9BinaryProperties,
  173962. 10: ecma10BinaryProperties,
  173963. 11: ecma11BinaryProperties,
  173964. 12: ecma12BinaryProperties,
  173965. 13: ecma13BinaryProperties
  173966. };
  173967. var unicodeGeneralCategoryValues = "Cased_Letter LC Close_Punctuation Pe Connector_Punctuation Pc Control Cc cntrl Currency_Symbol Sc Dash_Punctuation Pd Decimal_Number Nd digit Enclosing_Mark Me Final_Punctuation Pf Format Cf Initial_Punctuation Pi Letter L Letter_Number Nl Line_Separator Zl Lowercase_Letter Ll Mark M Combining_Mark Math_Symbol Sm Modifier_Letter Lm Modifier_Symbol Sk Nonspacing_Mark Mn Number N Open_Punctuation Ps Other C Other_Letter Lo Other_Number No Other_Punctuation Po Other_Symbol So Paragraph_Separator Zp Private_Use Co Punctuation P punct Separator Z Space_Separator Zs Spacing_Mark Mc Surrogate Cs Symbol S Titlecase_Letter Lt Unassigned Cn Uppercase_Letter Lu";
  173968. var ecma9ScriptValues = "Adlam Adlm Ahom Anatolian_Hieroglyphs Hluw Arabic Arab Armenian Armn Avestan Avst Balinese Bali Bamum Bamu Bassa_Vah Bass Batak Batk Bengali Beng Bhaiksuki Bhks Bopomofo Bopo Brahmi Brah Braille Brai Buginese Bugi Buhid Buhd Canadian_Aboriginal Cans Carian Cari Caucasian_Albanian Aghb Chakma Cakm Cham Cham Cherokee Cher Common Zyyy Coptic Copt Qaac Cuneiform Xsux Cypriot Cprt Cyrillic Cyrl Deseret Dsrt Devanagari Deva Duployan Dupl Egyptian_Hieroglyphs Egyp Elbasan Elba Ethiopic Ethi Georgian Geor Glagolitic Glag Gothic Goth Grantha Gran Greek Grek Gujarati Gujr Gurmukhi Guru Han Hani Hangul Hang Hanunoo Hano Hatran Hatr Hebrew Hebr Hiragana Hira Imperial_Aramaic Armi Inherited Zinh Qaai Inscriptional_Pahlavi Phli Inscriptional_Parthian Prti Javanese Java Kaithi Kthi Kannada Knda Katakana Kana Kayah_Li Kali Kharoshthi Khar Khmer Khmr Khojki Khoj Khudawadi Sind Lao Laoo Latin Latn Lepcha Lepc Limbu Limb Linear_A Lina Linear_B Linb Lisu Lisu Lycian Lyci Lydian Lydi Mahajani Mahj Malayalam Mlym Mandaic Mand Manichaean Mani Marchen Marc Masaram_Gondi Gonm Meetei_Mayek Mtei Mende_Kikakui Mend Meroitic_Cursive Merc Meroitic_Hieroglyphs Mero Miao Plrd Modi Mongolian Mong Mro Mroo Multani Mult Myanmar Mymr Nabataean Nbat New_Tai_Lue Talu Newa Newa Nko Nkoo Nushu Nshu Ogham Ogam Ol_Chiki Olck Old_Hungarian Hung Old_Italic Ital Old_North_Arabian Narb Old_Permic Perm Old_Persian Xpeo Old_South_Arabian Sarb Old_Turkic Orkh Oriya Orya Osage Osge Osmanya Osma Pahawh_Hmong Hmng Palmyrene Palm Pau_Cin_Hau Pauc Phags_Pa Phag Phoenician Phnx Psalter_Pahlavi Phlp Rejang Rjng Runic Runr Samaritan Samr Saurashtra Saur Sharada Shrd Shavian Shaw Siddham Sidd SignWriting Sgnw Sinhala Sinh Sora_Sompeng Sora Soyombo Soyo Sundanese Sund Syloti_Nagri Sylo Syriac Syrc Tagalog Tglg Tagbanwa Tagb Tai_Le Tale Tai_Tham Lana Tai_Viet Tavt Takri Takr Tamil Taml Tangut Tang Telugu Telu Thaana Thaa Thai Thai Tibetan Tibt Tifinagh Tfng Tirhuta Tirh Ugaritic Ugar Vai Vaii Warang_Citi Wara Yi Yiii Zanabazar_Square Zanb";
  173969. var ecma10ScriptValues = ecma9ScriptValues + " Dogra Dogr Gunjala_Gondi Gong Hanifi_Rohingya Rohg Makasar Maka Medefaidrin Medf Old_Sogdian Sogo Sogdian Sogd";
  173970. var ecma11ScriptValues = ecma10ScriptValues + " Elymaic Elym Nandinagari Nand Nyiakeng_Puachue_Hmong Hmnp Wancho Wcho";
  173971. var ecma12ScriptValues = ecma11ScriptValues + " Chorasmian Chrs Diak Dives_Akuru Khitan_Small_Script Kits Yezi Yezidi";
  173972. var ecma13ScriptValues = ecma12ScriptValues + " Cypro_Minoan Cpmn Old_Uyghur Ougr Tangsa Tnsa Toto Vithkuqi Vith";
  173973. var unicodeScriptValues = {
  173974. 9: ecma9ScriptValues,
  173975. 10: ecma10ScriptValues,
  173976. 11: ecma11ScriptValues,
  173977. 12: ecma12ScriptValues,
  173978. 13: ecma13ScriptValues
  173979. };
  173980. var data = {};
  173981. function buildUnicodeData(ecmaVersion) {
  173982. var d = data[ecmaVersion] = {
  173983. binary: wordsRegexp(unicodeBinaryProperties[ecmaVersion] + " " + unicodeGeneralCategoryValues),
  173984. nonBinary: {
  173985. General_Category: wordsRegexp(unicodeGeneralCategoryValues),
  173986. Script: wordsRegexp(unicodeScriptValues[ecmaVersion])
  173987. }
  173988. };
  173989. d.nonBinary.Script_Extensions = d.nonBinary.Script;
  173990. d.nonBinary.gc = d.nonBinary.General_Category;
  173991. d.nonBinary.sc = d.nonBinary.Script;
  173992. d.nonBinary.scx = d.nonBinary.Script_Extensions;
  173993. }
  173994. for (i = 0, list3 = [9, 10, 11, 12, 13]; i < list3.length; i += 1) {
  173995. ecmaVersion = list3[i];
  173996. buildUnicodeData(ecmaVersion);
  173997. }
  173998. var ecmaVersion;
  173999. var i;
  174000. var list3;
  174001. var pp$1 = Parser.prototype;
  174002. var RegExpValidationState = function RegExpValidationState2(parser) {
  174003. this.parser = parser;
  174004. this.validFlags = "gim" + (parser.options.ecmaVersion >= 6 ? "uy" : "") + (parser.options.ecmaVersion >= 9 ? "s" : "") + (parser.options.ecmaVersion >= 13 ? "d" : "");
  174005. this.unicodeProperties = data[parser.options.ecmaVersion >= 13 ? 13 : parser.options.ecmaVersion];
  174006. this.source = "";
  174007. this.flags = "";
  174008. this.start = 0;
  174009. this.switchU = false;
  174010. this.switchN = false;
  174011. this.pos = 0;
  174012. this.lastIntValue = 0;
  174013. this.lastStringValue = "";
  174014. this.lastAssertionIsQuantifiable = false;
  174015. this.numCapturingParens = 0;
  174016. this.maxBackReference = 0;
  174017. this.groupNames = [];
  174018. this.backReferenceNames = [];
  174019. };
  174020. RegExpValidationState.prototype.reset = function reset(start3, pattern, flags) {
  174021. var unicode = flags.indexOf("u") !== -1;
  174022. this.start = start3 | 0;
  174023. this.source = pattern + "";
  174024. this.flags = flags;
  174025. this.switchU = unicode && this.parser.options.ecmaVersion >= 6;
  174026. this.switchN = unicode && this.parser.options.ecmaVersion >= 9;
  174027. };
  174028. RegExpValidationState.prototype.raise = function raise(message) {
  174029. this.parser.raiseRecoverable(this.start, "Invalid regular expression: /" + this.source + "/: " + message);
  174030. };
  174031. RegExpValidationState.prototype.at = function at(i, forceU) {
  174032. if (forceU === void 0)
  174033. forceU = false;
  174034. var s = this.source;
  174035. var l = s.length;
  174036. if (i >= l) {
  174037. return -1;
  174038. }
  174039. var c = s.charCodeAt(i);
  174040. if (!(forceU || this.switchU) || c <= 55295 || c >= 57344 || i + 1 >= l) {
  174041. return c;
  174042. }
  174043. var next = s.charCodeAt(i + 1);
  174044. return next >= 56320 && next <= 57343 ? (c << 10) + next - 56613888 : c;
  174045. };
  174046. RegExpValidationState.prototype.nextIndex = function nextIndex(i, forceU) {
  174047. if (forceU === void 0)
  174048. forceU = false;
  174049. var s = this.source;
  174050. var l = s.length;
  174051. if (i >= l) {
  174052. return l;
  174053. }
  174054. var c = s.charCodeAt(i), next;
  174055. if (!(forceU || this.switchU) || c <= 55295 || c >= 57344 || i + 1 >= l || (next = s.charCodeAt(i + 1)) < 56320 || next > 57343) {
  174056. return i + 1;
  174057. }
  174058. return i + 2;
  174059. };
  174060. RegExpValidationState.prototype.current = function current(forceU) {
  174061. if (forceU === void 0)
  174062. forceU = false;
  174063. return this.at(this.pos, forceU);
  174064. };
  174065. RegExpValidationState.prototype.lookahead = function lookahead(forceU) {
  174066. if (forceU === void 0)
  174067. forceU = false;
  174068. return this.at(this.nextIndex(this.pos, forceU), forceU);
  174069. };
  174070. RegExpValidationState.prototype.advance = function advance(forceU) {
  174071. if (forceU === void 0)
  174072. forceU = false;
  174073. this.pos = this.nextIndex(this.pos, forceU);
  174074. };
  174075. RegExpValidationState.prototype.eat = function eat(ch, forceU) {
  174076. if (forceU === void 0)
  174077. forceU = false;
  174078. if (this.current(forceU) === ch) {
  174079. this.advance(forceU);
  174080. return true;
  174081. }
  174082. return false;
  174083. };
  174084. function codePointToString$1(ch) {
  174085. if (ch <= 65535) {
  174086. return String.fromCharCode(ch);
  174087. }
  174088. ch -= 65536;
  174089. return String.fromCharCode((ch >> 10) + 55296, (ch & 1023) + 56320);
  174090. }
  174091. pp$1.validateRegExpFlags = function(state) {
  174092. var validFlags = state.validFlags;
  174093. var flags = state.flags;
  174094. for (var i = 0; i < flags.length; i++) {
  174095. var flag = flags.charAt(i);
  174096. if (validFlags.indexOf(flag) === -1) {
  174097. this.raise(state.start, "Invalid regular expression flag");
  174098. }
  174099. if (flags.indexOf(flag, i + 1) > -1) {
  174100. this.raise(state.start, "Duplicate regular expression flag");
  174101. }
  174102. }
  174103. };
  174104. pp$1.validateRegExpPattern = function(state) {
  174105. this.regexp_pattern(state);
  174106. if (!state.switchN && this.options.ecmaVersion >= 9 && state.groupNames.length > 0) {
  174107. state.switchN = true;
  174108. this.regexp_pattern(state);
  174109. }
  174110. };
  174111. pp$1.regexp_pattern = function(state) {
  174112. state.pos = 0;
  174113. state.lastIntValue = 0;
  174114. state.lastStringValue = "";
  174115. state.lastAssertionIsQuantifiable = false;
  174116. state.numCapturingParens = 0;
  174117. state.maxBackReference = 0;
  174118. state.groupNames.length = 0;
  174119. state.backReferenceNames.length = 0;
  174120. this.regexp_disjunction(state);
  174121. if (state.pos !== state.source.length) {
  174122. if (state.eat(41)) {
  174123. state.raise("Unmatched ')'");
  174124. }
  174125. if (state.eat(93) || state.eat(125)) {
  174126. state.raise("Lone quantifier brackets");
  174127. }
  174128. }
  174129. if (state.maxBackReference > state.numCapturingParens) {
  174130. state.raise("Invalid escape");
  174131. }
  174132. for (var i = 0, list3 = state.backReferenceNames; i < list3.length; i += 1) {
  174133. var name2 = list3[i];
  174134. if (state.groupNames.indexOf(name2) === -1) {
  174135. state.raise("Invalid named capture referenced");
  174136. }
  174137. }
  174138. };
  174139. pp$1.regexp_disjunction = function(state) {
  174140. this.regexp_alternative(state);
  174141. while (state.eat(124)) {
  174142. this.regexp_alternative(state);
  174143. }
  174144. if (this.regexp_eatQuantifier(state, true)) {
  174145. state.raise("Nothing to repeat");
  174146. }
  174147. if (state.eat(123)) {
  174148. state.raise("Lone quantifier brackets");
  174149. }
  174150. };
  174151. pp$1.regexp_alternative = function(state) {
  174152. while (state.pos < state.source.length && this.regexp_eatTerm(state)) {
  174153. }
  174154. };
  174155. pp$1.regexp_eatTerm = function(state) {
  174156. if (this.regexp_eatAssertion(state)) {
  174157. if (state.lastAssertionIsQuantifiable && this.regexp_eatQuantifier(state)) {
  174158. if (state.switchU) {
  174159. state.raise("Invalid quantifier");
  174160. }
  174161. }
  174162. return true;
  174163. }
  174164. if (state.switchU ? this.regexp_eatAtom(state) : this.regexp_eatExtendedAtom(state)) {
  174165. this.regexp_eatQuantifier(state);
  174166. return true;
  174167. }
  174168. return false;
  174169. };
  174170. pp$1.regexp_eatAssertion = function(state) {
  174171. var start3 = state.pos;
  174172. state.lastAssertionIsQuantifiable = false;
  174173. if (state.eat(94) || state.eat(36)) {
  174174. return true;
  174175. }
  174176. if (state.eat(92)) {
  174177. if (state.eat(66) || state.eat(98)) {
  174178. return true;
  174179. }
  174180. state.pos = start3;
  174181. }
  174182. if (state.eat(40) && state.eat(63)) {
  174183. var lookbehind = false;
  174184. if (this.options.ecmaVersion >= 9) {
  174185. lookbehind = state.eat(60);
  174186. }
  174187. if (state.eat(61) || state.eat(33)) {
  174188. this.regexp_disjunction(state);
  174189. if (!state.eat(41)) {
  174190. state.raise("Unterminated group");
  174191. }
  174192. state.lastAssertionIsQuantifiable = !lookbehind;
  174193. return true;
  174194. }
  174195. }
  174196. state.pos = start3;
  174197. return false;
  174198. };
  174199. pp$1.regexp_eatQuantifier = function(state, noError) {
  174200. if (noError === void 0)
  174201. noError = false;
  174202. if (this.regexp_eatQuantifierPrefix(state, noError)) {
  174203. state.eat(63);
  174204. return true;
  174205. }
  174206. return false;
  174207. };
  174208. pp$1.regexp_eatQuantifierPrefix = function(state, noError) {
  174209. return state.eat(42) || state.eat(43) || state.eat(63) || this.regexp_eatBracedQuantifier(state, noError);
  174210. };
  174211. pp$1.regexp_eatBracedQuantifier = function(state, noError) {
  174212. var start3 = state.pos;
  174213. if (state.eat(123)) {
  174214. var min = 0, max = -1;
  174215. if (this.regexp_eatDecimalDigits(state)) {
  174216. min = state.lastIntValue;
  174217. if (state.eat(44) && this.regexp_eatDecimalDigits(state)) {
  174218. max = state.lastIntValue;
  174219. }
  174220. if (state.eat(125)) {
  174221. if (max !== -1 && max < min && !noError) {
  174222. state.raise("numbers out of order in {} quantifier");
  174223. }
  174224. return true;
  174225. }
  174226. }
  174227. if (state.switchU && !noError) {
  174228. state.raise("Incomplete quantifier");
  174229. }
  174230. state.pos = start3;
  174231. }
  174232. return false;
  174233. };
  174234. pp$1.regexp_eatAtom = function(state) {
  174235. return this.regexp_eatPatternCharacters(state) || state.eat(46) || this.regexp_eatReverseSolidusAtomEscape(state) || this.regexp_eatCharacterClass(state) || this.regexp_eatUncapturingGroup(state) || this.regexp_eatCapturingGroup(state);
  174236. };
  174237. pp$1.regexp_eatReverseSolidusAtomEscape = function(state) {
  174238. var start3 = state.pos;
  174239. if (state.eat(92)) {
  174240. if (this.regexp_eatAtomEscape(state)) {
  174241. return true;
  174242. }
  174243. state.pos = start3;
  174244. }
  174245. return false;
  174246. };
  174247. pp$1.regexp_eatUncapturingGroup = function(state) {
  174248. var start3 = state.pos;
  174249. if (state.eat(40)) {
  174250. if (state.eat(63) && state.eat(58)) {
  174251. this.regexp_disjunction(state);
  174252. if (state.eat(41)) {
  174253. return true;
  174254. }
  174255. state.raise("Unterminated group");
  174256. }
  174257. state.pos = start3;
  174258. }
  174259. return false;
  174260. };
  174261. pp$1.regexp_eatCapturingGroup = function(state) {
  174262. if (state.eat(40)) {
  174263. if (this.options.ecmaVersion >= 9) {
  174264. this.regexp_groupSpecifier(state);
  174265. } else if (state.current() === 63) {
  174266. state.raise("Invalid group");
  174267. }
  174268. this.regexp_disjunction(state);
  174269. if (state.eat(41)) {
  174270. state.numCapturingParens += 1;
  174271. return true;
  174272. }
  174273. state.raise("Unterminated group");
  174274. }
  174275. return false;
  174276. };
  174277. pp$1.regexp_eatExtendedAtom = function(state) {
  174278. return state.eat(46) || this.regexp_eatReverseSolidusAtomEscape(state) || this.regexp_eatCharacterClass(state) || this.regexp_eatUncapturingGroup(state) || this.regexp_eatCapturingGroup(state) || this.regexp_eatInvalidBracedQuantifier(state) || this.regexp_eatExtendedPatternCharacter(state);
  174279. };
  174280. pp$1.regexp_eatInvalidBracedQuantifier = function(state) {
  174281. if (this.regexp_eatBracedQuantifier(state, true)) {
  174282. state.raise("Nothing to repeat");
  174283. }
  174284. return false;
  174285. };
  174286. pp$1.regexp_eatSyntaxCharacter = function(state) {
  174287. var ch = state.current();
  174288. if (isSyntaxCharacter(ch)) {
  174289. state.lastIntValue = ch;
  174290. state.advance();
  174291. return true;
  174292. }
  174293. return false;
  174294. };
  174295. function isSyntaxCharacter(ch) {
  174296. return ch === 36 || ch >= 40 && ch <= 43 || ch === 46 || ch === 63 || ch >= 91 && ch <= 94 || ch >= 123 && ch <= 125;
  174297. }
  174298. pp$1.regexp_eatPatternCharacters = function(state) {
  174299. var start3 = state.pos;
  174300. var ch = 0;
  174301. while ((ch = state.current()) !== -1 && !isSyntaxCharacter(ch)) {
  174302. state.advance();
  174303. }
  174304. return state.pos !== start3;
  174305. };
  174306. pp$1.regexp_eatExtendedPatternCharacter = function(state) {
  174307. var ch = state.current();
  174308. if (ch !== -1 && ch !== 36 && !(ch >= 40 && ch <= 43) && ch !== 46 && ch !== 63 && ch !== 91 && ch !== 94 && ch !== 124) {
  174309. state.advance();
  174310. return true;
  174311. }
  174312. return false;
  174313. };
  174314. pp$1.regexp_groupSpecifier = function(state) {
  174315. if (state.eat(63)) {
  174316. if (this.regexp_eatGroupName(state)) {
  174317. if (state.groupNames.indexOf(state.lastStringValue) !== -1) {
  174318. state.raise("Duplicate capture group name");
  174319. }
  174320. state.groupNames.push(state.lastStringValue);
  174321. return;
  174322. }
  174323. state.raise("Invalid group");
  174324. }
  174325. };
  174326. pp$1.regexp_eatGroupName = function(state) {
  174327. state.lastStringValue = "";
  174328. if (state.eat(60)) {
  174329. if (this.regexp_eatRegExpIdentifierName(state) && state.eat(62)) {
  174330. return true;
  174331. }
  174332. state.raise("Invalid capture group name");
  174333. }
  174334. return false;
  174335. };
  174336. pp$1.regexp_eatRegExpIdentifierName = function(state) {
  174337. state.lastStringValue = "";
  174338. if (this.regexp_eatRegExpIdentifierStart(state)) {
  174339. state.lastStringValue += codePointToString$1(state.lastIntValue);
  174340. while (this.regexp_eatRegExpIdentifierPart(state)) {
  174341. state.lastStringValue += codePointToString$1(state.lastIntValue);
  174342. }
  174343. return true;
  174344. }
  174345. return false;
  174346. };
  174347. pp$1.regexp_eatRegExpIdentifierStart = function(state) {
  174348. var start3 = state.pos;
  174349. var forceU = this.options.ecmaVersion >= 11;
  174350. var ch = state.current(forceU);
  174351. state.advance(forceU);
  174352. if (ch === 92 && this.regexp_eatRegExpUnicodeEscapeSequence(state, forceU)) {
  174353. ch = state.lastIntValue;
  174354. }
  174355. if (isRegExpIdentifierStart(ch)) {
  174356. state.lastIntValue = ch;
  174357. return true;
  174358. }
  174359. state.pos = start3;
  174360. return false;
  174361. };
  174362. function isRegExpIdentifierStart(ch) {
  174363. return isIdentifierStart(ch, true) || ch === 36 || ch === 95;
  174364. }
  174365. pp$1.regexp_eatRegExpIdentifierPart = function(state) {
  174366. var start3 = state.pos;
  174367. var forceU = this.options.ecmaVersion >= 11;
  174368. var ch = state.current(forceU);
  174369. state.advance(forceU);
  174370. if (ch === 92 && this.regexp_eatRegExpUnicodeEscapeSequence(state, forceU)) {
  174371. ch = state.lastIntValue;
  174372. }
  174373. if (isRegExpIdentifierPart(ch)) {
  174374. state.lastIntValue = ch;
  174375. return true;
  174376. }
  174377. state.pos = start3;
  174378. return false;
  174379. };
  174380. function isRegExpIdentifierPart(ch) {
  174381. return isIdentifierChar(ch, true) || ch === 36 || ch === 95 || ch === 8204 || ch === 8205;
  174382. }
  174383. pp$1.regexp_eatAtomEscape = function(state) {
  174384. if (this.regexp_eatBackReference(state) || this.regexp_eatCharacterClassEscape(state) || this.regexp_eatCharacterEscape(state) || state.switchN && this.regexp_eatKGroupName(state)) {
  174385. return true;
  174386. }
  174387. if (state.switchU) {
  174388. if (state.current() === 99) {
  174389. state.raise("Invalid unicode escape");
  174390. }
  174391. state.raise("Invalid escape");
  174392. }
  174393. return false;
  174394. };
  174395. pp$1.regexp_eatBackReference = function(state) {
  174396. var start3 = state.pos;
  174397. if (this.regexp_eatDecimalEscape(state)) {
  174398. var n = state.lastIntValue;
  174399. if (state.switchU) {
  174400. if (n > state.maxBackReference) {
  174401. state.maxBackReference = n;
  174402. }
  174403. return true;
  174404. }
  174405. if (n <= state.numCapturingParens) {
  174406. return true;
  174407. }
  174408. state.pos = start3;
  174409. }
  174410. return false;
  174411. };
  174412. pp$1.regexp_eatKGroupName = function(state) {
  174413. if (state.eat(107)) {
  174414. if (this.regexp_eatGroupName(state)) {
  174415. state.backReferenceNames.push(state.lastStringValue);
  174416. return true;
  174417. }
  174418. state.raise("Invalid named reference");
  174419. }
  174420. return false;
  174421. };
  174422. pp$1.regexp_eatCharacterEscape = function(state) {
  174423. return this.regexp_eatControlEscape(state) || this.regexp_eatCControlLetter(state) || this.regexp_eatZero(state) || this.regexp_eatHexEscapeSequence(state) || this.regexp_eatRegExpUnicodeEscapeSequence(state, false) || !state.switchU && this.regexp_eatLegacyOctalEscapeSequence(state) || this.regexp_eatIdentityEscape(state);
  174424. };
  174425. pp$1.regexp_eatCControlLetter = function(state) {
  174426. var start3 = state.pos;
  174427. if (state.eat(99)) {
  174428. if (this.regexp_eatControlLetter(state)) {
  174429. return true;
  174430. }
  174431. state.pos = start3;
  174432. }
  174433. return false;
  174434. };
  174435. pp$1.regexp_eatZero = function(state) {
  174436. if (state.current() === 48 && !isDecimalDigit(state.lookahead())) {
  174437. state.lastIntValue = 0;
  174438. state.advance();
  174439. return true;
  174440. }
  174441. return false;
  174442. };
  174443. pp$1.regexp_eatControlEscape = function(state) {
  174444. var ch = state.current();
  174445. if (ch === 116) {
  174446. state.lastIntValue = 9;
  174447. state.advance();
  174448. return true;
  174449. }
  174450. if (ch === 110) {
  174451. state.lastIntValue = 10;
  174452. state.advance();
  174453. return true;
  174454. }
  174455. if (ch === 118) {
  174456. state.lastIntValue = 11;
  174457. state.advance();
  174458. return true;
  174459. }
  174460. if (ch === 102) {
  174461. state.lastIntValue = 12;
  174462. state.advance();
  174463. return true;
  174464. }
  174465. if (ch === 114) {
  174466. state.lastIntValue = 13;
  174467. state.advance();
  174468. return true;
  174469. }
  174470. return false;
  174471. };
  174472. pp$1.regexp_eatControlLetter = function(state) {
  174473. var ch = state.current();
  174474. if (isControlLetter(ch)) {
  174475. state.lastIntValue = ch % 32;
  174476. state.advance();
  174477. return true;
  174478. }
  174479. return false;
  174480. };
  174481. function isControlLetter(ch) {
  174482. return ch >= 65 && ch <= 90 || ch >= 97 && ch <= 122;
  174483. }
  174484. pp$1.regexp_eatRegExpUnicodeEscapeSequence = function(state, forceU) {
  174485. if (forceU === void 0)
  174486. forceU = false;
  174487. var start3 = state.pos;
  174488. var switchU = forceU || state.switchU;
  174489. if (state.eat(117)) {
  174490. if (this.regexp_eatFixedHexDigits(state, 4)) {
  174491. var lead = state.lastIntValue;
  174492. if (switchU && lead >= 55296 && lead <= 56319) {
  174493. var leadSurrogateEnd = state.pos;
  174494. if (state.eat(92) && state.eat(117) && this.regexp_eatFixedHexDigits(state, 4)) {
  174495. var trail = state.lastIntValue;
  174496. if (trail >= 56320 && trail <= 57343) {
  174497. state.lastIntValue = (lead - 55296) * 1024 + (trail - 56320) + 65536;
  174498. return true;
  174499. }
  174500. }
  174501. state.pos = leadSurrogateEnd;
  174502. state.lastIntValue = lead;
  174503. }
  174504. return true;
  174505. }
  174506. if (switchU && state.eat(123) && this.regexp_eatHexDigits(state) && state.eat(125) && isValidUnicode(state.lastIntValue)) {
  174507. return true;
  174508. }
  174509. if (switchU) {
  174510. state.raise("Invalid unicode escape");
  174511. }
  174512. state.pos = start3;
  174513. }
  174514. return false;
  174515. };
  174516. function isValidUnicode(ch) {
  174517. return ch >= 0 && ch <= 1114111;
  174518. }
  174519. pp$1.regexp_eatIdentityEscape = function(state) {
  174520. if (state.switchU) {
  174521. if (this.regexp_eatSyntaxCharacter(state)) {
  174522. return true;
  174523. }
  174524. if (state.eat(47)) {
  174525. state.lastIntValue = 47;
  174526. return true;
  174527. }
  174528. return false;
  174529. }
  174530. var ch = state.current();
  174531. if (ch !== 99 && (!state.switchN || ch !== 107)) {
  174532. state.lastIntValue = ch;
  174533. state.advance();
  174534. return true;
  174535. }
  174536. return false;
  174537. };
  174538. pp$1.regexp_eatDecimalEscape = function(state) {
  174539. state.lastIntValue = 0;
  174540. var ch = state.current();
  174541. if (ch >= 49 && ch <= 57) {
  174542. do {
  174543. state.lastIntValue = 10 * state.lastIntValue + (ch - 48);
  174544. state.advance();
  174545. } while ((ch = state.current()) >= 48 && ch <= 57);
  174546. return true;
  174547. }
  174548. return false;
  174549. };
  174550. pp$1.regexp_eatCharacterClassEscape = function(state) {
  174551. var ch = state.current();
  174552. if (isCharacterClassEscape(ch)) {
  174553. state.lastIntValue = -1;
  174554. state.advance();
  174555. return true;
  174556. }
  174557. if (state.switchU && this.options.ecmaVersion >= 9 && (ch === 80 || ch === 112)) {
  174558. state.lastIntValue = -1;
  174559. state.advance();
  174560. if (state.eat(123) && this.regexp_eatUnicodePropertyValueExpression(state) && state.eat(125)) {
  174561. return true;
  174562. }
  174563. state.raise("Invalid property name");
  174564. }
  174565. return false;
  174566. };
  174567. function isCharacterClassEscape(ch) {
  174568. return ch === 100 || ch === 68 || ch === 115 || ch === 83 || ch === 119 || ch === 87;
  174569. }
  174570. pp$1.regexp_eatUnicodePropertyValueExpression = function(state) {
  174571. var start3 = state.pos;
  174572. if (this.regexp_eatUnicodePropertyName(state) && state.eat(61)) {
  174573. var name2 = state.lastStringValue;
  174574. if (this.regexp_eatUnicodePropertyValue(state)) {
  174575. var value = state.lastStringValue;
  174576. this.regexp_validateUnicodePropertyNameAndValue(state, name2, value);
  174577. return true;
  174578. }
  174579. }
  174580. state.pos = start3;
  174581. if (this.regexp_eatLoneUnicodePropertyNameOrValue(state)) {
  174582. var nameOrValue = state.lastStringValue;
  174583. this.regexp_validateUnicodePropertyNameOrValue(state, nameOrValue);
  174584. return true;
  174585. }
  174586. return false;
  174587. };
  174588. pp$1.regexp_validateUnicodePropertyNameAndValue = function(state, name2, value) {
  174589. if (!hasOwn(state.unicodeProperties.nonBinary, name2)) {
  174590. state.raise("Invalid property name");
  174591. }
  174592. if (!state.unicodeProperties.nonBinary[name2].test(value)) {
  174593. state.raise("Invalid property value");
  174594. }
  174595. };
  174596. pp$1.regexp_validateUnicodePropertyNameOrValue = function(state, nameOrValue) {
  174597. if (!state.unicodeProperties.binary.test(nameOrValue)) {
  174598. state.raise("Invalid property name");
  174599. }
  174600. };
  174601. pp$1.regexp_eatUnicodePropertyName = function(state) {
  174602. var ch = 0;
  174603. state.lastStringValue = "";
  174604. while (isUnicodePropertyNameCharacter(ch = state.current())) {
  174605. state.lastStringValue += codePointToString$1(ch);
  174606. state.advance();
  174607. }
  174608. return state.lastStringValue !== "";
  174609. };
  174610. function isUnicodePropertyNameCharacter(ch) {
  174611. return isControlLetter(ch) || ch === 95;
  174612. }
  174613. pp$1.regexp_eatUnicodePropertyValue = function(state) {
  174614. var ch = 0;
  174615. state.lastStringValue = "";
  174616. while (isUnicodePropertyValueCharacter(ch = state.current())) {
  174617. state.lastStringValue += codePointToString$1(ch);
  174618. state.advance();
  174619. }
  174620. return state.lastStringValue !== "";
  174621. };
  174622. function isUnicodePropertyValueCharacter(ch) {
  174623. return isUnicodePropertyNameCharacter(ch) || isDecimalDigit(ch);
  174624. }
  174625. pp$1.regexp_eatLoneUnicodePropertyNameOrValue = function(state) {
  174626. return this.regexp_eatUnicodePropertyValue(state);
  174627. };
  174628. pp$1.regexp_eatCharacterClass = function(state) {
  174629. if (state.eat(91)) {
  174630. state.eat(94);
  174631. this.regexp_classRanges(state);
  174632. if (state.eat(93)) {
  174633. return true;
  174634. }
  174635. state.raise("Unterminated character class");
  174636. }
  174637. return false;
  174638. };
  174639. pp$1.regexp_classRanges = function(state) {
  174640. while (this.regexp_eatClassAtom(state)) {
  174641. var left = state.lastIntValue;
  174642. if (state.eat(45) && this.regexp_eatClassAtom(state)) {
  174643. var right = state.lastIntValue;
  174644. if (state.switchU && (left === -1 || right === -1)) {
  174645. state.raise("Invalid character class");
  174646. }
  174647. if (left !== -1 && right !== -1 && left > right) {
  174648. state.raise("Range out of order in character class");
  174649. }
  174650. }
  174651. }
  174652. };
  174653. pp$1.regexp_eatClassAtom = function(state) {
  174654. var start3 = state.pos;
  174655. if (state.eat(92)) {
  174656. if (this.regexp_eatClassEscape(state)) {
  174657. return true;
  174658. }
  174659. if (state.switchU) {
  174660. var ch$1 = state.current();
  174661. if (ch$1 === 99 || isOctalDigit(ch$1)) {
  174662. state.raise("Invalid class escape");
  174663. }
  174664. state.raise("Invalid escape");
  174665. }
  174666. state.pos = start3;
  174667. }
  174668. var ch = state.current();
  174669. if (ch !== 93) {
  174670. state.lastIntValue = ch;
  174671. state.advance();
  174672. return true;
  174673. }
  174674. return false;
  174675. };
  174676. pp$1.regexp_eatClassEscape = function(state) {
  174677. var start3 = state.pos;
  174678. if (state.eat(98)) {
  174679. state.lastIntValue = 8;
  174680. return true;
  174681. }
  174682. if (state.switchU && state.eat(45)) {
  174683. state.lastIntValue = 45;
  174684. return true;
  174685. }
  174686. if (!state.switchU && state.eat(99)) {
  174687. if (this.regexp_eatClassControlLetter(state)) {
  174688. return true;
  174689. }
  174690. state.pos = start3;
  174691. }
  174692. return this.regexp_eatCharacterClassEscape(state) || this.regexp_eatCharacterEscape(state);
  174693. };
  174694. pp$1.regexp_eatClassControlLetter = function(state) {
  174695. var ch = state.current();
  174696. if (isDecimalDigit(ch) || ch === 95) {
  174697. state.lastIntValue = ch % 32;
  174698. state.advance();
  174699. return true;
  174700. }
  174701. return false;
  174702. };
  174703. pp$1.regexp_eatHexEscapeSequence = function(state) {
  174704. var start3 = state.pos;
  174705. if (state.eat(120)) {
  174706. if (this.regexp_eatFixedHexDigits(state, 2)) {
  174707. return true;
  174708. }
  174709. if (state.switchU) {
  174710. state.raise("Invalid escape");
  174711. }
  174712. state.pos = start3;
  174713. }
  174714. return false;
  174715. };
  174716. pp$1.regexp_eatDecimalDigits = function(state) {
  174717. var start3 = state.pos;
  174718. var ch = 0;
  174719. state.lastIntValue = 0;
  174720. while (isDecimalDigit(ch = state.current())) {
  174721. state.lastIntValue = 10 * state.lastIntValue + (ch - 48);
  174722. state.advance();
  174723. }
  174724. return state.pos !== start3;
  174725. };
  174726. function isDecimalDigit(ch) {
  174727. return ch >= 48 && ch <= 57;
  174728. }
  174729. pp$1.regexp_eatHexDigits = function(state) {
  174730. var start3 = state.pos;
  174731. var ch = 0;
  174732. state.lastIntValue = 0;
  174733. while (isHexDigit(ch = state.current())) {
  174734. state.lastIntValue = 16 * state.lastIntValue + hexToInt(ch);
  174735. state.advance();
  174736. }
  174737. return state.pos !== start3;
  174738. };
  174739. function isHexDigit(ch) {
  174740. return ch >= 48 && ch <= 57 || ch >= 65 && ch <= 70 || ch >= 97 && ch <= 102;
  174741. }
  174742. function hexToInt(ch) {
  174743. if (ch >= 65 && ch <= 70) {
  174744. return 10 + (ch - 65);
  174745. }
  174746. if (ch >= 97 && ch <= 102) {
  174747. return 10 + (ch - 97);
  174748. }
  174749. return ch - 48;
  174750. }
  174751. pp$1.regexp_eatLegacyOctalEscapeSequence = function(state) {
  174752. if (this.regexp_eatOctalDigit(state)) {
  174753. var n1 = state.lastIntValue;
  174754. if (this.regexp_eatOctalDigit(state)) {
  174755. var n2 = state.lastIntValue;
  174756. if (n1 <= 3 && this.regexp_eatOctalDigit(state)) {
  174757. state.lastIntValue = n1 * 64 + n2 * 8 + state.lastIntValue;
  174758. } else {
  174759. state.lastIntValue = n1 * 8 + n2;
  174760. }
  174761. } else {
  174762. state.lastIntValue = n1;
  174763. }
  174764. return true;
  174765. }
  174766. return false;
  174767. };
  174768. pp$1.regexp_eatOctalDigit = function(state) {
  174769. var ch = state.current();
  174770. if (isOctalDigit(ch)) {
  174771. state.lastIntValue = ch - 48;
  174772. state.advance();
  174773. return true;
  174774. }
  174775. state.lastIntValue = 0;
  174776. return false;
  174777. };
  174778. function isOctalDigit(ch) {
  174779. return ch >= 48 && ch <= 55;
  174780. }
  174781. pp$1.regexp_eatFixedHexDigits = function(state, length) {
  174782. var start3 = state.pos;
  174783. state.lastIntValue = 0;
  174784. for (var i = 0; i < length; ++i) {
  174785. var ch = state.current();
  174786. if (!isHexDigit(ch)) {
  174787. state.pos = start3;
  174788. return false;
  174789. }
  174790. state.lastIntValue = 16 * state.lastIntValue + hexToInt(ch);
  174791. state.advance();
  174792. }
  174793. return true;
  174794. };
  174795. var Token = function Token2(p) {
  174796. this.type = p.type;
  174797. this.value = p.value;
  174798. this.start = p.start;
  174799. this.end = p.end;
  174800. if (p.options.locations) {
  174801. this.loc = new SourceLocation(p, p.startLoc, p.endLoc);
  174802. }
  174803. if (p.options.ranges) {
  174804. this.range = [p.start, p.end];
  174805. }
  174806. };
  174807. var pp = Parser.prototype;
  174808. pp.next = function(ignoreEscapeSequenceInKeyword) {
  174809. if (!ignoreEscapeSequenceInKeyword && this.type.keyword && this.containsEsc) {
  174810. this.raiseRecoverable(this.start, "Escape sequence in keyword " + this.type.keyword);
  174811. }
  174812. if (this.options.onToken) {
  174813. this.options.onToken(new Token(this));
  174814. }
  174815. this.lastTokEnd = this.end;
  174816. this.lastTokStart = this.start;
  174817. this.lastTokEndLoc = this.endLoc;
  174818. this.lastTokStartLoc = this.startLoc;
  174819. this.nextToken();
  174820. };
  174821. pp.getToken = function() {
  174822. this.next();
  174823. return new Token(this);
  174824. };
  174825. if (typeof Symbol !== "undefined") {
  174826. pp[Symbol.iterator] = function() {
  174827. var this$1$1 = this;
  174828. return {
  174829. next: function() {
  174830. var token = this$1$1.getToken();
  174831. return {
  174832. done: token.type === types$1.eof,
  174833. value: token
  174834. };
  174835. }
  174836. };
  174837. };
  174838. }
  174839. pp.nextToken = function() {
  174840. var curContext = this.curContext();
  174841. if (!curContext || !curContext.preserveSpace) {
  174842. this.skipSpace();
  174843. }
  174844. this.start = this.pos;
  174845. if (this.options.locations) {
  174846. this.startLoc = this.curPosition();
  174847. }
  174848. if (this.pos >= this.input.length) {
  174849. return this.finishToken(types$1.eof);
  174850. }
  174851. if (curContext.override) {
  174852. return curContext.override(this);
  174853. } else {
  174854. this.readToken(this.fullCharCodeAtPos());
  174855. }
  174856. };
  174857. pp.readToken = function(code2) {
  174858. if (isIdentifierStart(code2, this.options.ecmaVersion >= 6) || code2 === 92) {
  174859. return this.readWord();
  174860. }
  174861. return this.getTokenFromCode(code2);
  174862. };
  174863. pp.fullCharCodeAtPos = function() {
  174864. var code2 = this.input.charCodeAt(this.pos);
  174865. if (code2 <= 55295 || code2 >= 56320) {
  174866. return code2;
  174867. }
  174868. var next = this.input.charCodeAt(this.pos + 1);
  174869. return next <= 56319 || next >= 57344 ? code2 : (code2 << 10) + next - 56613888;
  174870. };
  174871. pp.skipBlockComment = function() {
  174872. var startLoc = this.options.onComment && this.curPosition();
  174873. var start3 = this.pos, end = this.input.indexOf("*/", this.pos += 2);
  174874. if (end === -1) {
  174875. this.raise(this.pos - 2, "Unterminated comment");
  174876. }
  174877. this.pos = end + 2;
  174878. if (this.options.locations) {
  174879. for (var nextBreak = void 0, pos = start3; (nextBreak = nextLineBreak(this.input, pos, this.pos)) > -1; ) {
  174880. ++this.curLine;
  174881. pos = this.lineStart = nextBreak;
  174882. }
  174883. }
  174884. if (this.options.onComment) {
  174885. this.options.onComment(
  174886. true,
  174887. this.input.slice(start3 + 2, end),
  174888. start3,
  174889. this.pos,
  174890. startLoc,
  174891. this.curPosition()
  174892. );
  174893. }
  174894. };
  174895. pp.skipLineComment = function(startSkip) {
  174896. var start3 = this.pos;
  174897. var startLoc = this.options.onComment && this.curPosition();
  174898. var ch = this.input.charCodeAt(this.pos += startSkip);
  174899. while (this.pos < this.input.length && !isNewLine(ch)) {
  174900. ch = this.input.charCodeAt(++this.pos);
  174901. }
  174902. if (this.options.onComment) {
  174903. this.options.onComment(
  174904. false,
  174905. this.input.slice(start3 + startSkip, this.pos),
  174906. start3,
  174907. this.pos,
  174908. startLoc,
  174909. this.curPosition()
  174910. );
  174911. }
  174912. };
  174913. pp.skipSpace = function() {
  174914. loop:
  174915. while (this.pos < this.input.length) {
  174916. var ch = this.input.charCodeAt(this.pos);
  174917. switch (ch) {
  174918. case 32:
  174919. case 160:
  174920. ++this.pos;
  174921. break;
  174922. case 13:
  174923. if (this.input.charCodeAt(this.pos + 1) === 10) {
  174924. ++this.pos;
  174925. }
  174926. case 10:
  174927. case 8232:
  174928. case 8233:
  174929. ++this.pos;
  174930. if (this.options.locations) {
  174931. ++this.curLine;
  174932. this.lineStart = this.pos;
  174933. }
  174934. break;
  174935. case 47:
  174936. switch (this.input.charCodeAt(this.pos + 1)) {
  174937. case 42:
  174938. this.skipBlockComment();
  174939. break;
  174940. case 47:
  174941. this.skipLineComment(2);
  174942. break;
  174943. default:
  174944. break loop;
  174945. }
  174946. break;
  174947. default:
  174948. if (ch > 8 && ch < 14 || ch >= 5760 && nonASCIIwhitespace.test(String.fromCharCode(ch))) {
  174949. ++this.pos;
  174950. } else {
  174951. break loop;
  174952. }
  174953. }
  174954. }
  174955. };
  174956. pp.finishToken = function(type, val) {
  174957. this.end = this.pos;
  174958. if (this.options.locations) {
  174959. this.endLoc = this.curPosition();
  174960. }
  174961. var prevType = this.type;
  174962. this.type = type;
  174963. this.value = val;
  174964. this.updateContext(prevType);
  174965. };
  174966. pp.readToken_dot = function() {
  174967. var next = this.input.charCodeAt(this.pos + 1);
  174968. if (next >= 48 && next <= 57) {
  174969. return this.readNumber(true);
  174970. }
  174971. var next2 = this.input.charCodeAt(this.pos + 2);
  174972. if (this.options.ecmaVersion >= 6 && next === 46 && next2 === 46) {
  174973. this.pos += 3;
  174974. return this.finishToken(types$1.ellipsis);
  174975. } else {
  174976. ++this.pos;
  174977. return this.finishToken(types$1.dot);
  174978. }
  174979. };
  174980. pp.readToken_slash = function() {
  174981. var next = this.input.charCodeAt(this.pos + 1);
  174982. if (this.exprAllowed) {
  174983. ++this.pos;
  174984. return this.readRegexp();
  174985. }
  174986. if (next === 61) {
  174987. return this.finishOp(types$1.assign, 2);
  174988. }
  174989. return this.finishOp(types$1.slash, 1);
  174990. };
  174991. pp.readToken_mult_modulo_exp = function(code2) {
  174992. var next = this.input.charCodeAt(this.pos + 1);
  174993. var size = 1;
  174994. var tokentype = code2 === 42 ? types$1.star : types$1.modulo;
  174995. if (this.options.ecmaVersion >= 7 && code2 === 42 && next === 42) {
  174996. ++size;
  174997. tokentype = types$1.starstar;
  174998. next = this.input.charCodeAt(this.pos + 2);
  174999. }
  175000. if (next === 61) {
  175001. return this.finishOp(types$1.assign, size + 1);
  175002. }
  175003. return this.finishOp(tokentype, size);
  175004. };
  175005. pp.readToken_pipe_amp = function(code2) {
  175006. var next = this.input.charCodeAt(this.pos + 1);
  175007. if (next === code2) {
  175008. if (this.options.ecmaVersion >= 12) {
  175009. var next2 = this.input.charCodeAt(this.pos + 2);
  175010. if (next2 === 61) {
  175011. return this.finishOp(types$1.assign, 3);
  175012. }
  175013. }
  175014. return this.finishOp(code2 === 124 ? types$1.logicalOR : types$1.logicalAND, 2);
  175015. }
  175016. if (next === 61) {
  175017. return this.finishOp(types$1.assign, 2);
  175018. }
  175019. return this.finishOp(code2 === 124 ? types$1.bitwiseOR : types$1.bitwiseAND, 1);
  175020. };
  175021. pp.readToken_caret = function() {
  175022. var next = this.input.charCodeAt(this.pos + 1);
  175023. if (next === 61) {
  175024. return this.finishOp(types$1.assign, 2);
  175025. }
  175026. return this.finishOp(types$1.bitwiseXOR, 1);
  175027. };
  175028. pp.readToken_plus_min = function(code2) {
  175029. var next = this.input.charCodeAt(this.pos + 1);
  175030. if (next === code2) {
  175031. if (next === 45 && !this.inModule && this.input.charCodeAt(this.pos + 2) === 62 && (this.lastTokEnd === 0 || lineBreak.test(this.input.slice(this.lastTokEnd, this.pos)))) {
  175032. this.skipLineComment(3);
  175033. this.skipSpace();
  175034. return this.nextToken();
  175035. }
  175036. return this.finishOp(types$1.incDec, 2);
  175037. }
  175038. if (next === 61) {
  175039. return this.finishOp(types$1.assign, 2);
  175040. }
  175041. return this.finishOp(types$1.plusMin, 1);
  175042. };
  175043. pp.readToken_lt_gt = function(code2) {
  175044. var next = this.input.charCodeAt(this.pos + 1);
  175045. var size = 1;
  175046. if (next === code2) {
  175047. size = code2 === 62 && this.input.charCodeAt(this.pos + 2) === 62 ? 3 : 2;
  175048. if (this.input.charCodeAt(this.pos + size) === 61) {
  175049. return this.finishOp(types$1.assign, size + 1);
  175050. }
  175051. return this.finishOp(types$1.bitShift, size);
  175052. }
  175053. if (next === 33 && code2 === 60 && !this.inModule && this.input.charCodeAt(this.pos + 2) === 45 && this.input.charCodeAt(this.pos + 3) === 45) {
  175054. this.skipLineComment(4);
  175055. this.skipSpace();
  175056. return this.nextToken();
  175057. }
  175058. if (next === 61) {
  175059. size = 2;
  175060. }
  175061. return this.finishOp(types$1.relational, size);
  175062. };
  175063. pp.readToken_eq_excl = function(code2) {
  175064. var next = this.input.charCodeAt(this.pos + 1);
  175065. if (next === 61) {
  175066. return this.finishOp(types$1.equality, this.input.charCodeAt(this.pos + 2) === 61 ? 3 : 2);
  175067. }
  175068. if (code2 === 61 && next === 62 && this.options.ecmaVersion >= 6) {
  175069. this.pos += 2;
  175070. return this.finishToken(types$1.arrow);
  175071. }
  175072. return this.finishOp(code2 === 61 ? types$1.eq : types$1.prefix, 1);
  175073. };
  175074. pp.readToken_question = function() {
  175075. var ecmaVersion = this.options.ecmaVersion;
  175076. if (ecmaVersion >= 11) {
  175077. var next = this.input.charCodeAt(this.pos + 1);
  175078. if (next === 46) {
  175079. var next2 = this.input.charCodeAt(this.pos + 2);
  175080. if (next2 < 48 || next2 > 57) {
  175081. return this.finishOp(types$1.questionDot, 2);
  175082. }
  175083. }
  175084. if (next === 63) {
  175085. if (ecmaVersion >= 12) {
  175086. var next2$1 = this.input.charCodeAt(this.pos + 2);
  175087. if (next2$1 === 61) {
  175088. return this.finishOp(types$1.assign, 3);
  175089. }
  175090. }
  175091. return this.finishOp(types$1.coalesce, 2);
  175092. }
  175093. }
  175094. return this.finishOp(types$1.question, 1);
  175095. };
  175096. pp.readToken_numberSign = function() {
  175097. var ecmaVersion = this.options.ecmaVersion;
  175098. var code2 = 35;
  175099. if (ecmaVersion >= 13) {
  175100. ++this.pos;
  175101. code2 = this.fullCharCodeAtPos();
  175102. if (isIdentifierStart(code2, true) || code2 === 92) {
  175103. return this.finishToken(types$1.privateId, this.readWord1());
  175104. }
  175105. }
  175106. this.raise(this.pos, "Unexpected character '" + codePointToString(code2) + "'");
  175107. };
  175108. pp.getTokenFromCode = function(code2) {
  175109. switch (code2) {
  175110. case 46:
  175111. return this.readToken_dot();
  175112. case 40:
  175113. ++this.pos;
  175114. return this.finishToken(types$1.parenL);
  175115. case 41:
  175116. ++this.pos;
  175117. return this.finishToken(types$1.parenR);
  175118. case 59:
  175119. ++this.pos;
  175120. return this.finishToken(types$1.semi);
  175121. case 44:
  175122. ++this.pos;
  175123. return this.finishToken(types$1.comma);
  175124. case 91:
  175125. ++this.pos;
  175126. return this.finishToken(types$1.bracketL);
  175127. case 93:
  175128. ++this.pos;
  175129. return this.finishToken(types$1.bracketR);
  175130. case 123:
  175131. ++this.pos;
  175132. return this.finishToken(types$1.braceL);
  175133. case 125:
  175134. ++this.pos;
  175135. return this.finishToken(types$1.braceR);
  175136. case 58:
  175137. ++this.pos;
  175138. return this.finishToken(types$1.colon);
  175139. case 96:
  175140. if (this.options.ecmaVersion < 6) {
  175141. break;
  175142. }
  175143. ++this.pos;
  175144. return this.finishToken(types$1.backQuote);
  175145. case 48:
  175146. var next = this.input.charCodeAt(this.pos + 1);
  175147. if (next === 120 || next === 88) {
  175148. return this.readRadixNumber(16);
  175149. }
  175150. if (this.options.ecmaVersion >= 6) {
  175151. if (next === 111 || next === 79) {
  175152. return this.readRadixNumber(8);
  175153. }
  175154. if (next === 98 || next === 66) {
  175155. return this.readRadixNumber(2);
  175156. }
  175157. }
  175158. case 49:
  175159. case 50:
  175160. case 51:
  175161. case 52:
  175162. case 53:
  175163. case 54:
  175164. case 55:
  175165. case 56:
  175166. case 57:
  175167. return this.readNumber(false);
  175168. case 34:
  175169. case 39:
  175170. return this.readString(code2);
  175171. case 47:
  175172. return this.readToken_slash();
  175173. case 37:
  175174. case 42:
  175175. return this.readToken_mult_modulo_exp(code2);
  175176. case 124:
  175177. case 38:
  175178. return this.readToken_pipe_amp(code2);
  175179. case 94:
  175180. return this.readToken_caret();
  175181. case 43:
  175182. case 45:
  175183. return this.readToken_plus_min(code2);
  175184. case 60:
  175185. case 62:
  175186. return this.readToken_lt_gt(code2);
  175187. case 61:
  175188. case 33:
  175189. return this.readToken_eq_excl(code2);
  175190. case 63:
  175191. return this.readToken_question();
  175192. case 126:
  175193. return this.finishOp(types$1.prefix, 1);
  175194. case 35:
  175195. return this.readToken_numberSign();
  175196. }
  175197. this.raise(this.pos, "Unexpected character '" + codePointToString(code2) + "'");
  175198. };
  175199. pp.finishOp = function(type, size) {
  175200. var str = this.input.slice(this.pos, this.pos + size);
  175201. this.pos += size;
  175202. return this.finishToken(type, str);
  175203. };
  175204. pp.readRegexp = function() {
  175205. var escaped, inClass, start3 = this.pos;
  175206. for (; ; ) {
  175207. if (this.pos >= this.input.length) {
  175208. this.raise(start3, "Unterminated regular expression");
  175209. }
  175210. var ch = this.input.charAt(this.pos);
  175211. if (lineBreak.test(ch)) {
  175212. this.raise(start3, "Unterminated regular expression");
  175213. }
  175214. if (!escaped) {
  175215. if (ch === "[") {
  175216. inClass = true;
  175217. } else if (ch === "]" && inClass) {
  175218. inClass = false;
  175219. } else if (ch === "/" && !inClass) {
  175220. break;
  175221. }
  175222. escaped = ch === "\\";
  175223. } else {
  175224. escaped = false;
  175225. }
  175226. ++this.pos;
  175227. }
  175228. var pattern = this.input.slice(start3, this.pos);
  175229. ++this.pos;
  175230. var flagsStart = this.pos;
  175231. var flags = this.readWord1();
  175232. if (this.containsEsc) {
  175233. this.unexpected(flagsStart);
  175234. }
  175235. var state = this.regexpState || (this.regexpState = new RegExpValidationState(this));
  175236. state.reset(start3, pattern, flags);
  175237. this.validateRegExpFlags(state);
  175238. this.validateRegExpPattern(state);
  175239. var value = null;
  175240. try {
  175241. value = new RegExp(pattern, flags);
  175242. } catch (e) {
  175243. }
  175244. return this.finishToken(types$1.regexp, { pattern, flags, value });
  175245. };
  175246. pp.readInt = function(radix, len, maybeLegacyOctalNumericLiteral) {
  175247. var allowSeparators = this.options.ecmaVersion >= 12 && len === void 0;
  175248. var isLegacyOctalNumericLiteral = maybeLegacyOctalNumericLiteral && this.input.charCodeAt(this.pos) === 48;
  175249. var start3 = this.pos, total = 0, lastCode = 0;
  175250. for (var i = 0, e = len == null ? Infinity : len; i < e; ++i, ++this.pos) {
  175251. var code2 = this.input.charCodeAt(this.pos), val = void 0;
  175252. if (allowSeparators && code2 === 95) {
  175253. if (isLegacyOctalNumericLiteral) {
  175254. this.raiseRecoverable(this.pos, "Numeric separator is not allowed in legacy octal numeric literals");
  175255. }
  175256. if (lastCode === 95) {
  175257. this.raiseRecoverable(this.pos, "Numeric separator must be exactly one underscore");
  175258. }
  175259. if (i === 0) {
  175260. this.raiseRecoverable(this.pos, "Numeric separator is not allowed at the first of digits");
  175261. }
  175262. lastCode = code2;
  175263. continue;
  175264. }
  175265. if (code2 >= 97) {
  175266. val = code2 - 97 + 10;
  175267. } else if (code2 >= 65) {
  175268. val = code2 - 65 + 10;
  175269. } else if (code2 >= 48 && code2 <= 57) {
  175270. val = code2 - 48;
  175271. } else {
  175272. val = Infinity;
  175273. }
  175274. if (val >= radix) {
  175275. break;
  175276. }
  175277. lastCode = code2;
  175278. total = total * radix + val;
  175279. }
  175280. if (allowSeparators && lastCode === 95) {
  175281. this.raiseRecoverable(this.pos - 1, "Numeric separator is not allowed at the last of digits");
  175282. }
  175283. if (this.pos === start3 || len != null && this.pos - start3 !== len) {
  175284. return null;
  175285. }
  175286. return total;
  175287. };
  175288. function stringToNumber(str, isLegacyOctalNumericLiteral) {
  175289. if (isLegacyOctalNumericLiteral) {
  175290. return parseInt(str, 8);
  175291. }
  175292. return parseFloat(str.replace(/_/g, ""));
  175293. }
  175294. function stringToBigInt(str) {
  175295. if (typeof BigInt !== "function") {
  175296. return null;
  175297. }
  175298. return BigInt(str.replace(/_/g, ""));
  175299. }
  175300. pp.readRadixNumber = function(radix) {
  175301. var start3 = this.pos;
  175302. this.pos += 2;
  175303. var val = this.readInt(radix);
  175304. if (val == null) {
  175305. this.raise(this.start + 2, "Expected number in radix " + radix);
  175306. }
  175307. if (this.options.ecmaVersion >= 11 && this.input.charCodeAt(this.pos) === 110) {
  175308. val = stringToBigInt(this.input.slice(start3, this.pos));
  175309. ++this.pos;
  175310. } else if (isIdentifierStart(this.fullCharCodeAtPos())) {
  175311. this.raise(this.pos, "Identifier directly after number");
  175312. }
  175313. return this.finishToken(types$1.num, val);
  175314. };
  175315. pp.readNumber = function(startsWithDot) {
  175316. var start3 = this.pos;
  175317. if (!startsWithDot && this.readInt(10, void 0, true) === null) {
  175318. this.raise(start3, "Invalid number");
  175319. }
  175320. var octal = this.pos - start3 >= 2 && this.input.charCodeAt(start3) === 48;
  175321. if (octal && this.strict) {
  175322. this.raise(start3, "Invalid number");
  175323. }
  175324. var next = this.input.charCodeAt(this.pos);
  175325. if (!octal && !startsWithDot && this.options.ecmaVersion >= 11 && next === 110) {
  175326. var val$1 = stringToBigInt(this.input.slice(start3, this.pos));
  175327. ++this.pos;
  175328. if (isIdentifierStart(this.fullCharCodeAtPos())) {
  175329. this.raise(this.pos, "Identifier directly after number");
  175330. }
  175331. return this.finishToken(types$1.num, val$1);
  175332. }
  175333. if (octal && /[89]/.test(this.input.slice(start3, this.pos))) {
  175334. octal = false;
  175335. }
  175336. if (next === 46 && !octal) {
  175337. ++this.pos;
  175338. this.readInt(10);
  175339. next = this.input.charCodeAt(this.pos);
  175340. }
  175341. if ((next === 69 || next === 101) && !octal) {
  175342. next = this.input.charCodeAt(++this.pos);
  175343. if (next === 43 || next === 45) {
  175344. ++this.pos;
  175345. }
  175346. if (this.readInt(10) === null) {
  175347. this.raise(start3, "Invalid number");
  175348. }
  175349. }
  175350. if (isIdentifierStart(this.fullCharCodeAtPos())) {
  175351. this.raise(this.pos, "Identifier directly after number");
  175352. }
  175353. var val = stringToNumber(this.input.slice(start3, this.pos), octal);
  175354. return this.finishToken(types$1.num, val);
  175355. };
  175356. pp.readCodePoint = function() {
  175357. var ch = this.input.charCodeAt(this.pos), code2;
  175358. if (ch === 123) {
  175359. if (this.options.ecmaVersion < 6) {
  175360. this.unexpected();
  175361. }
  175362. var codePos = ++this.pos;
  175363. code2 = this.readHexChar(this.input.indexOf("}", this.pos) - this.pos);
  175364. ++this.pos;
  175365. if (code2 > 1114111) {
  175366. this.invalidStringToken(codePos, "Code point out of bounds");
  175367. }
  175368. } else {
  175369. code2 = this.readHexChar(4);
  175370. }
  175371. return code2;
  175372. };
  175373. function codePointToString(code2) {
  175374. if (code2 <= 65535) {
  175375. return String.fromCharCode(code2);
  175376. }
  175377. code2 -= 65536;
  175378. return String.fromCharCode((code2 >> 10) + 55296, (code2 & 1023) + 56320);
  175379. }
  175380. pp.readString = function(quote) {
  175381. var out = "", chunkStart = ++this.pos;
  175382. for (; ; ) {
  175383. if (this.pos >= this.input.length) {
  175384. this.raise(this.start, "Unterminated string constant");
  175385. }
  175386. var ch = this.input.charCodeAt(this.pos);
  175387. if (ch === quote) {
  175388. break;
  175389. }
  175390. if (ch === 92) {
  175391. out += this.input.slice(chunkStart, this.pos);
  175392. out += this.readEscapedChar(false);
  175393. chunkStart = this.pos;
  175394. } else if (ch === 8232 || ch === 8233) {
  175395. if (this.options.ecmaVersion < 10) {
  175396. this.raise(this.start, "Unterminated string constant");
  175397. }
  175398. ++this.pos;
  175399. if (this.options.locations) {
  175400. this.curLine++;
  175401. this.lineStart = this.pos;
  175402. }
  175403. } else {
  175404. if (isNewLine(ch)) {
  175405. this.raise(this.start, "Unterminated string constant");
  175406. }
  175407. ++this.pos;
  175408. }
  175409. }
  175410. out += this.input.slice(chunkStart, this.pos++);
  175411. return this.finishToken(types$1.string, out);
  175412. };
  175413. var INVALID_TEMPLATE_ESCAPE_ERROR = {};
  175414. pp.tryReadTemplateToken = function() {
  175415. this.inTemplateElement = true;
  175416. try {
  175417. this.readTmplToken();
  175418. } catch (err) {
  175419. if (err === INVALID_TEMPLATE_ESCAPE_ERROR) {
  175420. this.readInvalidTemplateToken();
  175421. } else {
  175422. throw err;
  175423. }
  175424. }
  175425. this.inTemplateElement = false;
  175426. };
  175427. pp.invalidStringToken = function(position3, message) {
  175428. if (this.inTemplateElement && this.options.ecmaVersion >= 9) {
  175429. throw INVALID_TEMPLATE_ESCAPE_ERROR;
  175430. } else {
  175431. this.raise(position3, message);
  175432. }
  175433. };
  175434. pp.readTmplToken = function() {
  175435. var out = "", chunkStart = this.pos;
  175436. for (; ; ) {
  175437. if (this.pos >= this.input.length) {
  175438. this.raise(this.start, "Unterminated template");
  175439. }
  175440. var ch = this.input.charCodeAt(this.pos);
  175441. if (ch === 96 || ch === 36 && this.input.charCodeAt(this.pos + 1) === 123) {
  175442. if (this.pos === this.start && (this.type === types$1.template || this.type === types$1.invalidTemplate)) {
  175443. if (ch === 36) {
  175444. this.pos += 2;
  175445. return this.finishToken(types$1.dollarBraceL);
  175446. } else {
  175447. ++this.pos;
  175448. return this.finishToken(types$1.backQuote);
  175449. }
  175450. }
  175451. out += this.input.slice(chunkStart, this.pos);
  175452. return this.finishToken(types$1.template, out);
  175453. }
  175454. if (ch === 92) {
  175455. out += this.input.slice(chunkStart, this.pos);
  175456. out += this.readEscapedChar(true);
  175457. chunkStart = this.pos;
  175458. } else if (isNewLine(ch)) {
  175459. out += this.input.slice(chunkStart, this.pos);
  175460. ++this.pos;
  175461. switch (ch) {
  175462. case 13:
  175463. if (this.input.charCodeAt(this.pos) === 10) {
  175464. ++this.pos;
  175465. }
  175466. case 10:
  175467. out += "\n";
  175468. break;
  175469. default:
  175470. out += String.fromCharCode(ch);
  175471. break;
  175472. }
  175473. if (this.options.locations) {
  175474. ++this.curLine;
  175475. this.lineStart = this.pos;
  175476. }
  175477. chunkStart = this.pos;
  175478. } else {
  175479. ++this.pos;
  175480. }
  175481. }
  175482. };
  175483. pp.readInvalidTemplateToken = function() {
  175484. for (; this.pos < this.input.length; this.pos++) {
  175485. switch (this.input[this.pos]) {
  175486. case "\\":
  175487. ++this.pos;
  175488. break;
  175489. case "$":
  175490. if (this.input[this.pos + 1] !== "{") {
  175491. break;
  175492. }
  175493. case "`":
  175494. return this.finishToken(types$1.invalidTemplate, this.input.slice(this.start, this.pos));
  175495. }
  175496. }
  175497. this.raise(this.start, "Unterminated template");
  175498. };
  175499. pp.readEscapedChar = function(inTemplate) {
  175500. var ch = this.input.charCodeAt(++this.pos);
  175501. ++this.pos;
  175502. switch (ch) {
  175503. case 110:
  175504. return "\n";
  175505. case 114:
  175506. return "\r";
  175507. case 120:
  175508. return String.fromCharCode(this.readHexChar(2));
  175509. case 117:
  175510. return codePointToString(this.readCodePoint());
  175511. case 116:
  175512. return " ";
  175513. case 98:
  175514. return "\b";
  175515. case 118:
  175516. return "\v";
  175517. case 102:
  175518. return "\f";
  175519. case 13:
  175520. if (this.input.charCodeAt(this.pos) === 10) {
  175521. ++this.pos;
  175522. }
  175523. case 10:
  175524. if (this.options.locations) {
  175525. this.lineStart = this.pos;
  175526. ++this.curLine;
  175527. }
  175528. return "";
  175529. case 56:
  175530. case 57:
  175531. if (this.strict) {
  175532. this.invalidStringToken(
  175533. this.pos - 1,
  175534. "Invalid escape sequence"
  175535. );
  175536. }
  175537. if (inTemplate) {
  175538. var codePos = this.pos - 1;
  175539. this.invalidStringToken(
  175540. codePos,
  175541. "Invalid escape sequence in template string"
  175542. );
  175543. return null;
  175544. }
  175545. default:
  175546. if (ch >= 48 && ch <= 55) {
  175547. var octalStr = this.input.substr(this.pos - 1, 3).match(/^[0-7]+/)[0];
  175548. var octal = parseInt(octalStr, 8);
  175549. if (octal > 255) {
  175550. octalStr = octalStr.slice(0, -1);
  175551. octal = parseInt(octalStr, 8);
  175552. }
  175553. this.pos += octalStr.length - 1;
  175554. ch = this.input.charCodeAt(this.pos);
  175555. if ((octalStr !== "0" || ch === 56 || ch === 57) && (this.strict || inTemplate)) {
  175556. this.invalidStringToken(
  175557. this.pos - 1 - octalStr.length,
  175558. inTemplate ? "Octal literal in template string" : "Octal literal in strict mode"
  175559. );
  175560. }
  175561. return String.fromCharCode(octal);
  175562. }
  175563. if (isNewLine(ch)) {
  175564. return "";
  175565. }
  175566. return String.fromCharCode(ch);
  175567. }
  175568. };
  175569. pp.readHexChar = function(len) {
  175570. var codePos = this.pos;
  175571. var n = this.readInt(16, len);
  175572. if (n === null) {
  175573. this.invalidStringToken(codePos, "Bad character escape sequence");
  175574. }
  175575. return n;
  175576. };
  175577. pp.readWord1 = function() {
  175578. this.containsEsc = false;
  175579. var word = "", first = true, chunkStart = this.pos;
  175580. var astral = this.options.ecmaVersion >= 6;
  175581. while (this.pos < this.input.length) {
  175582. var ch = this.fullCharCodeAtPos();
  175583. if (isIdentifierChar(ch, astral)) {
  175584. this.pos += ch <= 65535 ? 1 : 2;
  175585. } else if (ch === 92) {
  175586. this.containsEsc = true;
  175587. word += this.input.slice(chunkStart, this.pos);
  175588. var escStart = this.pos;
  175589. if (this.input.charCodeAt(++this.pos) !== 117) {
  175590. this.invalidStringToken(this.pos, "Expecting Unicode escape sequence \\uXXXX");
  175591. }
  175592. ++this.pos;
  175593. var esc = this.readCodePoint();
  175594. if (!(first ? isIdentifierStart : isIdentifierChar)(esc, astral)) {
  175595. this.invalidStringToken(escStart, "Invalid Unicode escape");
  175596. }
  175597. word += codePointToString(esc);
  175598. chunkStart = this.pos;
  175599. } else {
  175600. break;
  175601. }
  175602. first = false;
  175603. }
  175604. return word + this.input.slice(chunkStart, this.pos);
  175605. };
  175606. pp.readWord = function() {
  175607. var word = this.readWord1();
  175608. var type = types$1.name;
  175609. if (this.keywords.test(word)) {
  175610. type = keywords[word];
  175611. }
  175612. return this.finishToken(type, word);
  175613. };
  175614. var version = "8.7.0";
  175615. Parser.acorn = {
  175616. Parser,
  175617. version,
  175618. defaultOptions,
  175619. Position,
  175620. SourceLocation,
  175621. getLineInfo,
  175622. Node,
  175623. TokenType,
  175624. tokTypes: types$1,
  175625. keywordTypes: keywords,
  175626. TokContext,
  175627. tokContexts: types,
  175628. isIdentifierChar,
  175629. isIdentifierStart,
  175630. Token,
  175631. isNewLine,
  175632. lineBreak,
  175633. lineBreakG,
  175634. nonASCIIwhitespace
  175635. };
  175636. // node_modules/micromark-extension-mdxjs/index.js
  175637. var import_acorn_jsx = __toESM(require_acorn_jsx(), 1);
  175638. // node_modules/micromark-util-chunked/index.js
  175639. function splice(list3, start3, remove, items) {
  175640. const end = list3.length;
  175641. let chunkStart = 0;
  175642. let parameters;
  175643. if (start3 < 0) {
  175644. start3 = -start3 > end ? 0 : end + start3;
  175645. } else {
  175646. start3 = start3 > end ? end : start3;
  175647. }
  175648. remove = remove > 0 ? remove : 0;
  175649. if (items.length < 1e4) {
  175650. parameters = Array.from(items);
  175651. parameters.unshift(start3, remove);
  175652. [].splice.apply(list3, parameters);
  175653. } else {
  175654. if (remove)
  175655. [].splice.apply(list3, [start3, remove]);
  175656. while (chunkStart < items.length) {
  175657. parameters = items.slice(chunkStart, chunkStart + 1e4);
  175658. parameters.unshift(start3, 0);
  175659. [].splice.apply(list3, parameters);
  175660. chunkStart += 1e4;
  175661. start3 += 1e4;
  175662. }
  175663. }
  175664. }
  175665. function push(list3, items) {
  175666. if (list3.length > 0) {
  175667. splice(list3, list3.length, 0, items);
  175668. return list3;
  175669. }
  175670. return items;
  175671. }
  175672. // node_modules/micromark-util-combine-extensions/index.js
  175673. var hasOwnProperty2 = {}.hasOwnProperty;
  175674. function combineExtensions(extensions) {
  175675. const all4 = {};
  175676. let index2 = -1;
  175677. while (++index2 < extensions.length) {
  175678. syntaxExtension(all4, extensions[index2]);
  175679. }
  175680. return all4;
  175681. }
  175682. function syntaxExtension(all4, extension2) {
  175683. let hook;
  175684. for (hook in extension2) {
  175685. const maybe = hasOwnProperty2.call(all4, hook) ? all4[hook] : void 0;
  175686. const left = maybe || (all4[hook] = {});
  175687. const right = extension2[hook];
  175688. let code2;
  175689. for (code2 in right) {
  175690. if (!hasOwnProperty2.call(left, code2))
  175691. left[code2] = [];
  175692. const value = right[code2];
  175693. constructs(
  175694. left[code2],
  175695. Array.isArray(value) ? value : value ? [value] : []
  175696. );
  175697. }
  175698. }
  175699. }
  175700. function constructs(existing, list3) {
  175701. let index2 = -1;
  175702. const before = [];
  175703. while (++index2 < list3.length) {
  175704. ;
  175705. (list3[index2].add === "after" ? existing : before).push(list3[index2]);
  175706. }
  175707. splice(existing, 0, 0, before);
  175708. }
  175709. // node_modules/micromark-util-character/lib/unicode-punctuation-regex.js
  175710. var unicodePunctuationRegex = /[!-/:-@[-`{-~\u00A1\u00A7\u00AB\u00B6\u00B7\u00BB\u00BF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u09FD\u0A76\u0AF0\u0C77\u0C84\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E4F\u2E52\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]/;
  175711. // node_modules/micromark-util-character/index.js
  175712. var asciiAlpha = regexCheck(/[A-Za-z]/);
  175713. var asciiDigit = regexCheck(/\d/);
  175714. var asciiHexDigit = regexCheck(/[\dA-Fa-f]/);
  175715. var asciiAlphanumeric = regexCheck(/[\dA-Za-z]/);
  175716. var asciiPunctuation = regexCheck(/[!-/:-@[-`{-~]/);
  175717. var asciiAtext = regexCheck(/[#-'*+\--9=?A-Z^-~]/);
  175718. function asciiControl(code2) {
  175719. return code2 !== null && (code2 < 32 || code2 === 127);
  175720. }
  175721. function markdownLineEndingOrSpace(code2) {
  175722. return code2 !== null && (code2 < 0 || code2 === 32);
  175723. }
  175724. function markdownLineEnding(code2) {
  175725. return code2 !== null && code2 < -2;
  175726. }
  175727. function markdownSpace(code2) {
  175728. return code2 === -2 || code2 === -1 || code2 === 32;
  175729. }
  175730. var unicodeWhitespace = regexCheck(/\s/);
  175731. var unicodePunctuation = regexCheck(unicodePunctuationRegex);
  175732. function regexCheck(regex2) {
  175733. return check;
  175734. function check(code2) {
  175735. return code2 !== null && regex2.test(String.fromCharCode(code2));
  175736. }
  175737. }
  175738. // node_modules/micromark-factory-space/index.js
  175739. function factorySpace(effects, ok2, type, max) {
  175740. const limit = max ? max - 1 : Number.POSITIVE_INFINITY;
  175741. let size = 0;
  175742. return start3;
  175743. function start3(code2) {
  175744. if (markdownSpace(code2)) {
  175745. effects.enter(type);
  175746. return prefix(code2);
  175747. }
  175748. return ok2(code2);
  175749. }
  175750. function prefix(code2) {
  175751. if (markdownSpace(code2) && size++ < limit) {
  175752. effects.consume(code2);
  175753. return prefix;
  175754. }
  175755. effects.exit(type);
  175756. return ok2(code2);
  175757. }
  175758. }
  175759. // node_modules/unist-util-position-from-estree/index.js
  175760. function positionFromEstree(value) {
  175761. const node = value || {};
  175762. const loc = node.loc || {};
  175763. const range = node.range || [0, 0];
  175764. const startOffset = range[0] || node.start;
  175765. const endOffset = range[1] || node.end;
  175766. return {
  175767. start: {
  175768. line: loc.start && typeof loc.start.line === "number" && loc.start.line > -1 ? loc.start.line : void 0,
  175769. column: loc.start && typeof loc.start.column === "number" && loc.start.column > -1 ? loc.start.column + 1 : void 0,
  175770. offset: typeof startOffset === "number" && startOffset > -1 ? startOffset : void 0
  175771. },
  175772. end: {
  175773. line: loc.end && typeof loc.end.line === "number" && loc.end.line > -1 ? loc.end.line : void 0,
  175774. column: loc.end && typeof loc.end.column === "number" && loc.end.column > -1 ? loc.end.column + 1 : void 0,
  175775. offset: typeof endOffset === "number" && endOffset > -1 ? endOffset : void 0
  175776. }
  175777. };
  175778. }
  175779. // node_modules/estree-util-visit/color.js
  175780. function color(d) {
  175781. return "\x1B[33m" + d + "\x1B[39m";
  175782. }
  175783. // node_modules/estree-util-visit/index.js
  175784. var own3 = {}.hasOwnProperty;
  175785. var CONTINUE = Symbol("continue");
  175786. var SKIP = Symbol("skip");
  175787. var EXIT = Symbol("exit");
  175788. function visit(tree, visitor) {
  175789. var enter;
  175790. var leave;
  175791. if (typeof visitor === "function") {
  175792. enter = visitor;
  175793. } else if (visitor && typeof visitor === "object") {
  175794. enter = visitor.enter;
  175795. leave = visitor.leave;
  175796. }
  175797. build(tree, null, null, [])();
  175798. function build(node, key, index2, parents) {
  175799. if (nodelike(node)) {
  175800. visit4.displayName = "node (" + color(node.type) + ")";
  175801. }
  175802. return visit4;
  175803. function visit4() {
  175804. var result = enter ? toResult(enter(node, key, index2, parents)) : [];
  175805. var cKey;
  175806. var cIndex;
  175807. var grandparents;
  175808. var subresult;
  175809. var value;
  175810. var subvalue;
  175811. if (result[0] === EXIT) {
  175812. return result;
  175813. }
  175814. if (result[0] !== SKIP) {
  175815. for (cKey in node) {
  175816. if (own3.call(node, cKey) && node[cKey] && typeof node[cKey] === "object" && cKey !== "data" && cKey !== "position") {
  175817. value = node[cKey];
  175818. grandparents = parents.concat(node);
  175819. if (Array.isArray(value)) {
  175820. cIndex = 0;
  175821. while (cIndex > -1 && cIndex < value.length) {
  175822. subvalue = value[cIndex];
  175823. if (nodelike(subvalue)) {
  175824. subresult = build(subvalue, cKey, cIndex, grandparents)();
  175825. if (subresult[0] === EXIT)
  175826. return subresult;
  175827. cIndex = typeof subresult[1] === "number" ? subresult[1] : cIndex + 1;
  175828. } else {
  175829. cIndex++;
  175830. }
  175831. }
  175832. } else if (nodelike(value)) {
  175833. subresult = build(value, cKey, null, grandparents)();
  175834. if (subresult[0] === EXIT)
  175835. return subresult;
  175836. }
  175837. }
  175838. }
  175839. }
  175840. return leave ? toResult(leave(node, key, index2, parents)) : result;
  175841. }
  175842. }
  175843. }
  175844. function toResult(value) {
  175845. if (Array.isArray(value)) {
  175846. return value;
  175847. }
  175848. if (typeof value === "number") {
  175849. return [CONTINUE, value];
  175850. }
  175851. return [value];
  175852. }
  175853. function nodelike(value) {
  175854. return Boolean(
  175855. value && typeof value === "object" && typeof value.type === "string" && value.type.length > 0
  175856. );
  175857. }
  175858. // node_modules/micromark-util-events-to-acorn/index.js
  175859. var own4 = {}.hasOwnProperty;
  175860. function eventsToAcorn(events, options) {
  175861. const {
  175862. prefix = "",
  175863. suffix = ""
  175864. } = options;
  175865. const comments = [];
  175866. const acornConfig = Object.assign({}, options.acornOptions, {
  175867. onComment: comments,
  175868. preserveParens: true
  175869. });
  175870. const chunks = [];
  175871. const lines = {};
  175872. let index2 = -1;
  175873. let swallow = false;
  175874. let estree;
  175875. let exception;
  175876. let mdStartOffset;
  175877. if (options.start) {
  175878. mdStartOffset = options.start.offset;
  175879. lines[options.start.line] = options.start;
  175880. }
  175881. while (++index2 < events.length) {
  175882. const token = events[index2][1];
  175883. if (events[index2][0] === "exit") {
  175884. chunks.push(events[index2][2].sliceSerialize(token));
  175885. if (mdStartOffset === void 0) {
  175886. mdStartOffset = events[index2][1].start.offset;
  175887. }
  175888. if (!(token.start.line in lines) || lines[token.start.line].offset > token.start.offset) {
  175889. lines[token.start.line] = token.start;
  175890. }
  175891. }
  175892. }
  175893. const source = chunks.join("");
  175894. const value = prefix + source + suffix;
  175895. const isEmptyExpression = options.expression && empty2(source);
  175896. if (isEmptyExpression && !options.allowEmpty) {
  175897. throw new VFileMessage("Unexpected empty expression", parseOffsetToUnistPoint(0), "micromark-extension-mdx-expression:unexpected-empty-expression");
  175898. }
  175899. try {
  175900. estree = options.expression && !isEmptyExpression ? options.acorn.parseExpressionAt(value, 0, acornConfig) : options.acorn.parse(value, acornConfig);
  175901. } catch (error_) {
  175902. const error = error_;
  175903. const point3 = parseOffsetToUnistPoint(error.pos);
  175904. error.message = String(error.message).replace(/ \(\d+:\d+\)$/, "");
  175905. error.pos = point3.offset;
  175906. error.loc = {
  175907. line: point3.line,
  175908. column: point3.column - 1
  175909. };
  175910. exception = error;
  175911. swallow = error.raisedAt >= prefix.length + source.length || error.message === "Unterminated comment";
  175912. }
  175913. if (estree && options.expression && !isEmptyExpression) {
  175914. if (empty2(value.slice(estree.end, value.length - suffix.length))) {
  175915. estree = {
  175916. type: "Program",
  175917. start: 0,
  175918. end: prefix.length + source.length,
  175919. body: [{
  175920. type: "ExpressionStatement",
  175921. expression: estree,
  175922. start: 0,
  175923. end: prefix.length + source.length
  175924. }],
  175925. sourceType: "module",
  175926. comments: []
  175927. };
  175928. } else {
  175929. const point3 = parseOffsetToUnistPoint(estree.end);
  175930. exception = new Error("Unexpected content after expression");
  175931. exception.pos = point3.offset;
  175932. exception.loc = {
  175933. line: point3.line,
  175934. column: point3.column - 1
  175935. };
  175936. estree = void 0;
  175937. }
  175938. }
  175939. if (estree) {
  175940. estree.comments = comments;
  175941. visit(estree, (esnode, field, index3, parents) => {
  175942. let context = parents[parents.length - 1];
  175943. let prop = field;
  175944. if (esnode.type === "ParenthesizedExpression" && context && prop) {
  175945. if (typeof index3 === "number") {
  175946. context = context[prop];
  175947. prop = index3;
  175948. }
  175949. context[prop] = esnode.expression;
  175950. }
  175951. const pointStart2 = parseOffsetToUnistPoint(esnode.start);
  175952. const pointEnd2 = parseOffsetToUnistPoint(esnode.end);
  175953. esnode.start = pointStart2.offset;
  175954. esnode.end = pointEnd2.offset;
  175955. esnode.loc = {
  175956. start: {
  175957. line: pointStart2.line,
  175958. column: pointStart2.column - 1
  175959. },
  175960. end: {
  175961. line: pointEnd2.line,
  175962. column: pointEnd2.column - 1
  175963. }
  175964. };
  175965. esnode.range = [esnode.start, esnode.end];
  175966. });
  175967. }
  175968. return {
  175969. estree,
  175970. error: exception,
  175971. swallow
  175972. };
  175973. function parseOffsetToUnistPoint(offset2) {
  175974. let srcOffset = offset2 - prefix.length;
  175975. let line;
  175976. let lineStart;
  175977. if (srcOffset < 0) {
  175978. srcOffset = 0;
  175979. } else if (srcOffset > source.length) {
  175980. srcOffset = source.length;
  175981. }
  175982. srcOffset += mdStartOffset;
  175983. for (line in lines) {
  175984. if (own4.call(lines, line)) {
  175985. if (!lineStart) {
  175986. lineStart = lines[line];
  175987. }
  175988. if (lines[line].offset > offset2) {
  175989. break;
  175990. }
  175991. lineStart = lines[line];
  175992. }
  175993. }
  175994. return {
  175995. line: lineStart.line,
  175996. column: lineStart.column + (srcOffset - lineStart.offset),
  175997. offset: srcOffset
  175998. };
  175999. }
  176000. }
  176001. function empty2(value) {
  176002. return /^\s*$/.test(value.replace(/\/\*[\s\S]*?\*\//g, "").replace(/\/\/[^\r\n]*(\r\n|\n|\r)/g, ""));
  176003. }
  176004. // node_modules/micromark-factory-mdx-expression/index.js
  176005. function factoryMdxExpression(effects, ok2, type, markerType, chunkType, acorn, acornOptions, addResult, spread, allowEmpty, allowLazy, startColumn) {
  176006. const self2 = this;
  176007. const eventStart = this.events.length + 3;
  176008. const tail = this.events[this.events.length - 1];
  176009. const initialPrefix = tail && tail[1].type === "linePrefix" ? tail[2].sliceSerialize(tail[1], true).length : 0;
  176010. const prefixExpressionIndent = initialPrefix ? initialPrefix + 1 : 0;
  176011. let balance = 1;
  176012. let startPosition;
  176013. let lastCrash;
  176014. return start3;
  176015. function start3(code2) {
  176016. effects.enter(type);
  176017. effects.enter(markerType);
  176018. effects.consume(code2);
  176019. effects.exit(markerType);
  176020. startPosition = self2.now();
  176021. return atBreak;
  176022. }
  176023. function atBreak(code2) {
  176024. if (code2 === null) {
  176025. throw lastCrash || new VFileMessage(
  176026. "Unexpected end of file in expression, expected a corresponding closing brace for `{`",
  176027. self2.now(),
  176028. "micromark-extension-mdx-expression:unexpected-eof"
  176029. );
  176030. }
  176031. if (code2 === 125) {
  176032. return atClosingBrace(code2);
  176033. }
  176034. if (markdownLineEnding(code2)) {
  176035. effects.enter("lineEnding");
  176036. effects.consume(code2);
  176037. effects.exit("lineEnding");
  176038. const prefixTagIndent = startColumn ? startColumn + 4 - self2.now().column : 0;
  176039. const indent = Math.max(prefixExpressionIndent, prefixTagIndent);
  176040. return indent ? factorySpace(effects, atBreak, "linePrefix", indent) : atBreak;
  176041. }
  176042. const now = self2.now();
  176043. if (now.line !== startPosition.line && !allowLazy && self2.parser.lazy[now.line]) {
  176044. throw new VFileMessage(
  176045. "Unexpected end of file in expression, expected a corresponding closing brace for `{`",
  176046. self2.now(),
  176047. "micromark-extension-mdx-expression:unexpected-eof"
  176048. );
  176049. }
  176050. effects.enter(chunkType);
  176051. return inside(code2);
  176052. }
  176053. function inside(code2) {
  176054. if (code2 === null || code2 === 125 || markdownLineEnding(code2)) {
  176055. effects.exit(chunkType);
  176056. return atBreak(code2);
  176057. }
  176058. if (code2 === 123 && !acorn) {
  176059. effects.consume(code2);
  176060. balance++;
  176061. return inside;
  176062. }
  176063. effects.consume(code2);
  176064. return inside;
  176065. }
  176066. function atClosingBrace(code2) {
  176067. balance--;
  176068. if (!acorn) {
  176069. if (balance) {
  176070. effects.enter(chunkType);
  176071. effects.consume(code2);
  176072. return inside;
  176073. }
  176074. effects.enter(markerType);
  176075. effects.consume(code2);
  176076. effects.exit(markerType);
  176077. effects.exit(type);
  176078. return ok2;
  176079. }
  176080. const result = eventsToAcorn(self2.events.slice(eventStart), {
  176081. acorn,
  176082. acornOptions,
  176083. start: startPosition,
  176084. expression: true,
  176085. allowEmpty,
  176086. prefix: spread ? "({" : "",
  176087. suffix: spread ? "})" : ""
  176088. });
  176089. const estree = result.estree;
  176090. if (spread && estree) {
  176091. const head = estree.body[0];
  176092. if (head.type !== "ExpressionStatement" || head.expression.type !== "ObjectExpression") {
  176093. throw new VFileMessage(
  176094. "Unexpected `" + head.type + "` in code: expected an object spread (`{...spread}`)",
  176095. positionFromEstree(head).start,
  176096. "micromark-extension-mdx-expression:non-spread"
  176097. );
  176098. } else if (head.expression.properties[1]) {
  176099. throw new VFileMessage(
  176100. "Unexpected extra content in spread: only a single spread is supported",
  176101. positionFromEstree(head.expression.properties[1]).start,
  176102. "micromark-extension-mdx-expression:spread-extra"
  176103. );
  176104. } else if (head.expression.properties[0] && head.expression.properties[0].type !== "SpreadElement") {
  176105. throw new VFileMessage(
  176106. "Unexpected `" + head.expression.properties[0].type + "` in code: only spread elements are supported",
  176107. positionFromEstree(head.expression.properties[0]).start,
  176108. "micromark-extension-mdx-expression:non-spread"
  176109. );
  176110. }
  176111. }
  176112. if (result.error) {
  176113. lastCrash = new VFileMessage(
  176114. "Could not parse expression with acorn: " + result.error.message,
  176115. {
  176116. line: result.error.loc.line,
  176117. column: result.error.loc.column + 1,
  176118. offset: result.error.pos
  176119. },
  176120. "micromark-extension-mdx-expression:acorn"
  176121. );
  176122. if (code2 !== null && result.swallow) {
  176123. effects.enter(chunkType);
  176124. effects.consume(code2);
  176125. return inside;
  176126. }
  176127. throw lastCrash;
  176128. }
  176129. effects.enter(markerType);
  176130. effects.consume(code2);
  176131. effects.exit(markerType);
  176132. Object.assign(
  176133. effects.exit(type),
  176134. addResult ? {
  176135. estree
  176136. } : void 0
  176137. );
  176138. return ok2;
  176139. }
  176140. }
  176141. // node_modules/micromark-extension-mdx-expression/lib/syntax.js
  176142. function mdxExpression(options = {}) {
  176143. const addResult = options.addResult;
  176144. const acorn = options.acorn;
  176145. const spread = options.spread;
  176146. let allowEmpty = options.allowEmpty;
  176147. let acornOptions;
  176148. if (allowEmpty === null || allowEmpty === void 0) {
  176149. allowEmpty = true;
  176150. }
  176151. if (acorn) {
  176152. if (!acorn.parseExpressionAt) {
  176153. throw new Error(
  176154. "Expected a proper `acorn` instance passed in as `options.acorn`"
  176155. );
  176156. }
  176157. acornOptions = Object.assign(
  176158. {
  176159. ecmaVersion: 2020,
  176160. sourceType: "module"
  176161. },
  176162. options.acornOptions
  176163. );
  176164. } else if (options.acornOptions || options.addResult) {
  176165. throw new Error("Expected an `acorn` instance passed in as `options.acorn`");
  176166. }
  176167. return {
  176168. flow: {
  176169. [123]: {
  176170. tokenize: tokenizeFlowExpression,
  176171. concrete: true
  176172. }
  176173. },
  176174. text: {
  176175. [123]: {
  176176. tokenize: tokenizeTextExpression
  176177. }
  176178. }
  176179. };
  176180. function tokenizeFlowExpression(effects, ok2, nok) {
  176181. const self2 = this;
  176182. return start3;
  176183. function start3(code2) {
  176184. return factoryMdxExpression.call(
  176185. self2,
  176186. effects,
  176187. factorySpace(effects, after, "whitespace"),
  176188. "mdxFlowExpression",
  176189. "mdxFlowExpressionMarker",
  176190. "mdxFlowExpressionChunk",
  176191. acorn,
  176192. acornOptions,
  176193. addResult,
  176194. spread,
  176195. allowEmpty
  176196. )(code2);
  176197. }
  176198. function after(code2) {
  176199. return code2 === null || markdownLineEnding(code2) ? ok2(code2) : nok(code2);
  176200. }
  176201. }
  176202. function tokenizeTextExpression(effects, ok2) {
  176203. const self2 = this;
  176204. return start3;
  176205. function start3(code2) {
  176206. return factoryMdxExpression.call(
  176207. self2,
  176208. effects,
  176209. ok2,
  176210. "mdxTextExpression",
  176211. "mdxTextExpressionMarker",
  176212. "mdxTextExpressionChunk",
  176213. acorn,
  176214. acornOptions,
  176215. addResult,
  176216. spread,
  176217. allowEmpty,
  176218. true
  176219. )(code2);
  176220. }
  176221. }
  176222. }
  176223. // node_modules/estree-util-is-identifier-name/regex.js
  176224. var start = /[$A-Z_a-z\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u08A0-\u08B4\u08B6-\u08C7\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1878\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309B-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u31BF\u31F0-\u31FF\u3400-\u4DBF\u4E00-\u9FFC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7BF\uA7C2-\uA7CA\uA7F5-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]/;
  176225. var cont = /[\d\u00B7\u0300-\u036F\u0387\u0483-\u0487\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u0669\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u06F0-\u06F9\u0711\u0730-\u074A\u07A6-\u07B0\u07C0-\u07C9\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u08D3-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0966-\u096F\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u09E6-\u09EF\u09FE\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A66-\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0AE6-\u0AEF\u0AFA-\u0AFF\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B55-\u0B57\u0B62\u0B63\u0B66-\u0B6F\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0BE6-\u0BEF\u0C00-\u0C04\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C66-\u0C6F\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0CE6-\u0CEF\u0D00-\u0D03\u0D3B\u0D3C\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D66-\u0D6F\u0D81-\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0E50-\u0E59\u0EB1\u0EB4-\u0EBC\u0EC8-\u0ECD\u0ED0-\u0ED9\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1040-\u1049\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F-\u109D\u135D-\u135F\u1369-\u1371\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u18A9\u1920-\u192B\u1930-\u193B\u1946-\u194F\u19D0-\u19DA\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AB0-\u1ABD\u1ABF\u1AC0\u1B00-\u1B04\u1B34-\u1B44\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BB0-\u1BB9\u1BE6-\u1BF3\u1C24-\u1C37\u1C40-\u1C49\u1C50-\u1C59\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF4\u1CF7-\u1CF9\u1DC0-\u1DF9\u1DFB-\u1DFF\u200C\u200D\u203F\u2040\u2054\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA620-\uA629\uA66F\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA82C\uA880\uA881\uA8B4-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F1\uA8FF-\uA909\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9D0-\uA9D9\uA9E5\uA9F0-\uA9F9\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA50-\uAA59\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uABF0-\uABF9\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFF10-\uFF19\uFF3F]/;
  176226. // node_modules/estree-util-is-identifier-name/index.js
  176227. function start2(code2) {
  176228. return start.test(String.fromCharCode(code2));
  176229. }
  176230. function cont2(code2) {
  176231. var character = String.fromCharCode(code2);
  176232. return start.test(character) || cont.test(character);
  176233. }
  176234. function name(name2) {
  176235. var index2 = -1;
  176236. while (++index2 < name2.length) {
  176237. if (!(index2 ? cont2 : start2)(name2.charCodeAt(index2)))
  176238. return false;
  176239. }
  176240. return index2 > 0;
  176241. }
  176242. // node_modules/micromark-extension-mdx-jsx/lib/factory-tag.js
  176243. var lazyLineEnd = {
  176244. tokenize: tokenizeLazyLineEnd,
  176245. partial: true
  176246. };
  176247. function factoryTag(effects, ok2, nok, acorn, acornOptions, addResult, allowLazy, tagType, tagMarkerType, tagClosingMarkerType, tagSelfClosingMarker, tagNameType, tagNamePrimaryType, tagNameMemberMarkerType, tagNameMemberType, tagNamePrefixMarkerType, tagNameLocalType, tagExpressionAttributeType, tagExpressionAttributeMarkerType, tagExpressionAttributeValueType, tagAttributeType, tagAttributeNameType, tagAttributeNamePrimaryType, tagAttributeNamePrefixMarkerType, tagAttributeNameLocalType, tagAttributeInitializerMarkerType, tagAttributeValueLiteralType, tagAttributeValueLiteralMarkerType, tagAttributeValueLiteralValueType, tagAttributeValueExpressionType, tagAttributeValueExpressionMarkerType, tagAttributeValueExpressionValueType) {
  176248. const self2 = this;
  176249. let returnState;
  176250. let marker;
  176251. let startPoint;
  176252. return start3;
  176253. function start3(code2) {
  176254. startPoint = self2.now();
  176255. effects.enter(tagType);
  176256. effects.enter(tagMarkerType);
  176257. effects.consume(code2);
  176258. effects.exit(tagMarkerType);
  176259. return afterStart;
  176260. }
  176261. function afterStart(code2) {
  176262. if (markdownLineEnding(code2) || markdownSpace(code2)) {
  176263. return nok(code2);
  176264. }
  176265. returnState = beforeName;
  176266. return optionalEsWhitespace(code2);
  176267. }
  176268. function beforeName(code2) {
  176269. if (code2 === 47) {
  176270. effects.enter(tagClosingMarkerType);
  176271. effects.consume(code2);
  176272. effects.exit(tagClosingMarkerType);
  176273. returnState = beforeClosingTagName;
  176274. return optionalEsWhitespace;
  176275. }
  176276. if (code2 === 62) {
  176277. return tagEnd(code2);
  176278. }
  176279. if (code2 !== null && start2(code2)) {
  176280. effects.enter(tagNameType);
  176281. effects.enter(tagNamePrimaryType);
  176282. effects.consume(code2);
  176283. return primaryName;
  176284. }
  176285. crash(
  176286. code2,
  176287. "before name",
  176288. "a character that can start a name, such as a letter, `$`, or `_`" + (code2 === 33 ? " (note: to create a comment in MDX, use `{/* text */}`)" : "")
  176289. );
  176290. }
  176291. function beforeClosingTagName(code2) {
  176292. if (code2 === 62) {
  176293. return tagEnd(code2);
  176294. }
  176295. if (code2 !== null && start2(code2)) {
  176296. effects.enter(tagNameType);
  176297. effects.enter(tagNamePrimaryType);
  176298. effects.consume(code2);
  176299. return primaryName;
  176300. }
  176301. crash(
  176302. code2,
  176303. "before name",
  176304. "a character that can start a name, such as a letter, `$`, or `_`" + (code2 === 42 || code2 === 47 ? " (note: JS comments in JSX tags are not supported in MDX)" : "")
  176305. );
  176306. }
  176307. function primaryName(code2) {
  176308. if (code2 === 45 || code2 !== null && cont2(code2)) {
  176309. effects.consume(code2);
  176310. return primaryName;
  176311. }
  176312. if (code2 === 46 || code2 === 47 || code2 === 58 || code2 === 62 || code2 === 123 || markdownLineEndingOrSpace(code2) || unicodeWhitespace(code2)) {
  176313. effects.exit(tagNamePrimaryType);
  176314. returnState = afterPrimaryName;
  176315. return optionalEsWhitespace(code2);
  176316. }
  176317. crash(
  176318. code2,
  176319. "in name",
  176320. "a name character such as letters, digits, `$`, or `_`; whitespace before attributes; or the end of the tag" + (code2 === 64 ? " (note: to create a link in MDX, use `[text](url)`)" : "")
  176321. );
  176322. }
  176323. function afterPrimaryName(code2) {
  176324. if (code2 === 46) {
  176325. effects.enter(tagNameMemberMarkerType);
  176326. effects.consume(code2);
  176327. effects.exit(tagNameMemberMarkerType);
  176328. returnState = beforeMemberName;
  176329. return optionalEsWhitespace;
  176330. }
  176331. if (code2 === 58) {
  176332. effects.enter(tagNamePrefixMarkerType);
  176333. effects.consume(code2);
  176334. effects.exit(tagNamePrefixMarkerType);
  176335. returnState = beforeLocalName;
  176336. return optionalEsWhitespace;
  176337. }
  176338. if (code2 === 47 || code2 === 62 || code2 === 123 || code2 !== null && start2(code2)) {
  176339. effects.exit(tagNameType);
  176340. return beforeAttribute(code2);
  176341. }
  176342. crash(
  176343. code2,
  176344. "after name",
  176345. "a character that can start an attribute name, such as a letter, `$`, or `_`; whitespace before attributes; or the end of the tag"
  176346. );
  176347. }
  176348. function beforeMemberName(code2) {
  176349. if (code2 !== null && start2(code2)) {
  176350. effects.enter(tagNameMemberType);
  176351. effects.consume(code2);
  176352. return memberName;
  176353. }
  176354. crash(
  176355. code2,
  176356. "before member name",
  176357. "a character that can start an attribute name, such as a letter, `$`, or `_`; whitespace before attributes; or the end of the tag"
  176358. );
  176359. }
  176360. function memberName(code2) {
  176361. if (code2 === 45 || code2 !== null && cont2(code2)) {
  176362. effects.consume(code2);
  176363. return memberName;
  176364. }
  176365. if (code2 === 46 || code2 === 47 || code2 === 62 || code2 === 123 || markdownLineEndingOrSpace(code2) || unicodeWhitespace(code2)) {
  176366. effects.exit(tagNameMemberType);
  176367. returnState = afterMemberName;
  176368. return optionalEsWhitespace(code2);
  176369. }
  176370. crash(
  176371. code2,
  176372. "in member name",
  176373. "a name character such as letters, digits, `$`, or `_`; whitespace before attributes; or the end of the tag" + (code2 === 64 ? " (note: to create a link in MDX, use `[text](url)`)" : "")
  176374. );
  176375. }
  176376. function afterMemberName(code2) {
  176377. if (code2 === 46) {
  176378. effects.enter(tagNameMemberMarkerType);
  176379. effects.consume(code2);
  176380. effects.exit(tagNameMemberMarkerType);
  176381. returnState = beforeMemberName;
  176382. return optionalEsWhitespace;
  176383. }
  176384. if (code2 === 47 || code2 === 62 || code2 === 123 || code2 !== null && start2(code2)) {
  176385. effects.exit(tagNameType);
  176386. return beforeAttribute(code2);
  176387. }
  176388. crash(
  176389. code2,
  176390. "after member name",
  176391. "a character that can start an attribute name, such as a letter, `$`, or `_`; whitespace before attributes; or the end of the tag"
  176392. );
  176393. }
  176394. function beforeLocalName(code2) {
  176395. if (code2 !== null && start2(code2)) {
  176396. effects.enter(tagNameLocalType);
  176397. effects.consume(code2);
  176398. return localName;
  176399. }
  176400. crash(
  176401. code2,
  176402. "before local name",
  176403. "a character that can start a name, such as a letter, `$`, or `_`" + (code2 === 43 || code2 !== null && code2 > 46 && code2 < 58 ? " (note: to create a link in MDX, use `[text](url)`)" : "")
  176404. );
  176405. }
  176406. function localName(code2) {
  176407. if (code2 === 45 || code2 !== null && cont2(code2)) {
  176408. effects.consume(code2);
  176409. return localName;
  176410. }
  176411. if (code2 === 47 || code2 === 62 || code2 === 123 || markdownLineEndingOrSpace(code2) || unicodeWhitespace(code2)) {
  176412. effects.exit(tagNameLocalType);
  176413. returnState = afterLocalName;
  176414. return optionalEsWhitespace(code2);
  176415. }
  176416. crash(
  176417. code2,
  176418. "in local name",
  176419. "a name character such as letters, digits, `$`, or `_`; whitespace before attributes; or the end of the tag"
  176420. );
  176421. }
  176422. function afterLocalName(code2) {
  176423. if (code2 === 47 || code2 === 62 || code2 === 123 || code2 !== null && start2(code2)) {
  176424. effects.exit(tagNameType);
  176425. return beforeAttribute(code2);
  176426. }
  176427. crash(
  176428. code2,
  176429. "after local name",
  176430. "a character that can start an attribute name, such as a letter, `$`, or `_`; whitespace before attributes; or the end of the tag"
  176431. );
  176432. }
  176433. function beforeAttribute(code2) {
  176434. if (code2 === 47) {
  176435. effects.enter(tagSelfClosingMarker);
  176436. effects.consume(code2);
  176437. effects.exit(tagSelfClosingMarker);
  176438. returnState = selfClosing;
  176439. return optionalEsWhitespace;
  176440. }
  176441. if (code2 === 62) {
  176442. return tagEnd(code2);
  176443. }
  176444. if (code2 === 123) {
  176445. return factoryMdxExpression.call(
  176446. self2,
  176447. effects,
  176448. afterAttributeExpression,
  176449. tagExpressionAttributeType,
  176450. tagExpressionAttributeMarkerType,
  176451. tagExpressionAttributeValueType,
  176452. acorn,
  176453. acornOptions,
  176454. addResult,
  176455. true,
  176456. false,
  176457. allowLazy,
  176458. startPoint.column
  176459. )(code2);
  176460. }
  176461. if (code2 !== null && start2(code2)) {
  176462. effects.enter(tagAttributeType);
  176463. effects.enter(tagAttributeNameType);
  176464. effects.enter(tagAttributeNamePrimaryType);
  176465. effects.consume(code2);
  176466. return attributePrimaryName;
  176467. }
  176468. crash(
  176469. code2,
  176470. "before attribute name",
  176471. "a character that can start an attribute name, such as a letter, `$`, or `_`; whitespace before attributes; or the end of the tag"
  176472. );
  176473. }
  176474. function afterAttributeExpression(code2) {
  176475. returnState = beforeAttribute;
  176476. return optionalEsWhitespace(code2);
  176477. }
  176478. function attributePrimaryName(code2) {
  176479. if (code2 === 45 || code2 !== null && cont2(code2)) {
  176480. effects.consume(code2);
  176481. return attributePrimaryName;
  176482. }
  176483. if (code2 === 47 || code2 === 58 || code2 === 61 || code2 === 62 || code2 === 123 || markdownLineEndingOrSpace(code2) || unicodeWhitespace(code2)) {
  176484. effects.exit(tagAttributeNamePrimaryType);
  176485. returnState = afterAttributePrimaryName;
  176486. return optionalEsWhitespace(code2);
  176487. }
  176488. crash(
  176489. code2,
  176490. "in attribute name",
  176491. "an attribute name character such as letters, digits, `$`, or `_`; `=` to initialize a value; whitespace before attributes; or the end of the tag"
  176492. );
  176493. }
  176494. function afterAttributePrimaryName(code2) {
  176495. if (code2 === 58) {
  176496. effects.enter(tagAttributeNamePrefixMarkerType);
  176497. effects.consume(code2);
  176498. effects.exit(tagAttributeNamePrefixMarkerType);
  176499. returnState = beforeAttributeLocalName;
  176500. return optionalEsWhitespace;
  176501. }
  176502. if (code2 === 61) {
  176503. effects.exit(tagAttributeNameType);
  176504. effects.enter(tagAttributeInitializerMarkerType);
  176505. effects.consume(code2);
  176506. effects.exit(tagAttributeInitializerMarkerType);
  176507. returnState = beforeAttributeValue;
  176508. return optionalEsWhitespace;
  176509. }
  176510. if (code2 === 47 || code2 === 62 || code2 === 123 || markdownLineEndingOrSpace(code2) || unicodeWhitespace(code2) || code2 !== null && start2(code2)) {
  176511. effects.exit(tagAttributeNameType);
  176512. effects.exit(tagAttributeType);
  176513. returnState = beforeAttribute;
  176514. return optionalEsWhitespace(code2);
  176515. }
  176516. crash(
  176517. code2,
  176518. "after attribute name",
  176519. "a character that can start an attribute name, such as a letter, `$`, or `_`; `=` to initialize a value; or the end of the tag"
  176520. );
  176521. }
  176522. function beforeAttributeLocalName(code2) {
  176523. if (code2 !== null && start2(code2)) {
  176524. effects.enter(tagAttributeNameLocalType);
  176525. effects.consume(code2);
  176526. return attributeLocalName;
  176527. }
  176528. crash(
  176529. code2,
  176530. "before local attribute name",
  176531. "a character that can start an attribute name, such as a letter, `$`, or `_`; `=` to initialize a value; or the end of the tag"
  176532. );
  176533. }
  176534. function attributeLocalName(code2) {
  176535. if (code2 === 45 || code2 !== null && cont2(code2)) {
  176536. effects.consume(code2);
  176537. return attributeLocalName;
  176538. }
  176539. if (code2 === 47 || code2 === 61 || code2 === 62 || code2 === 123 || markdownLineEndingOrSpace(code2) || unicodeWhitespace(code2)) {
  176540. effects.exit(tagAttributeNameLocalType);
  176541. effects.exit(tagAttributeNameType);
  176542. returnState = afterAttributeLocalName;
  176543. return optionalEsWhitespace(code2);
  176544. }
  176545. crash(
  176546. code2,
  176547. "in local attribute name",
  176548. "an attribute name character such as letters, digits, `$`, or `_`; `=` to initialize a value; whitespace before attributes; or the end of the tag"
  176549. );
  176550. }
  176551. function afterAttributeLocalName(code2) {
  176552. if (code2 === 61) {
  176553. effects.enter(tagAttributeInitializerMarkerType);
  176554. effects.consume(code2);
  176555. effects.exit(tagAttributeInitializerMarkerType);
  176556. returnState = beforeAttributeValue;
  176557. return optionalEsWhitespace;
  176558. }
  176559. if (code2 === 47 || code2 === 62 || code2 === 123 || code2 !== null && start2(code2)) {
  176560. effects.exit(tagAttributeType);
  176561. return beforeAttribute(code2);
  176562. }
  176563. crash(
  176564. code2,
  176565. "after local attribute name",
  176566. "a character that can start an attribute name, such as a letter, `$`, or `_`; `=` to initialize a value; or the end of the tag"
  176567. );
  176568. }
  176569. function beforeAttributeValue(code2) {
  176570. if (code2 === 34 || code2 === 39) {
  176571. effects.enter(tagAttributeValueLiteralType);
  176572. effects.enter(tagAttributeValueLiteralMarkerType);
  176573. effects.consume(code2);
  176574. effects.exit(tagAttributeValueLiteralMarkerType);
  176575. marker = code2;
  176576. return attributeValueQuotedStart;
  176577. }
  176578. if (code2 === 123) {
  176579. return factoryMdxExpression.call(
  176580. self2,
  176581. effects,
  176582. afterAttributeValueExpression,
  176583. tagAttributeValueExpressionType,
  176584. tagAttributeValueExpressionMarkerType,
  176585. tagAttributeValueExpressionValueType,
  176586. acorn,
  176587. acornOptions,
  176588. addResult,
  176589. false,
  176590. false,
  176591. allowLazy,
  176592. startPoint.column
  176593. )(code2);
  176594. }
  176595. crash(
  176596. code2,
  176597. "before attribute value",
  176598. "a character that can start an attribute value, such as `\"`, `'`, or `{`" + (code2 === 60 ? " (note: to use an element or fragment as a prop value in MDX, use `{<element />}`)" : "")
  176599. );
  176600. }
  176601. function afterAttributeValueExpression(code2) {
  176602. effects.exit(tagAttributeType);
  176603. returnState = beforeAttribute;
  176604. return optionalEsWhitespace(code2);
  176605. }
  176606. function attributeValueQuotedStart(code2) {
  176607. if (code2 === null) {
  176608. crash(
  176609. code2,
  176610. "in attribute value",
  176611. "a corresponding closing quote `" + String.fromCharCode(marker) + "`"
  176612. );
  176613. }
  176614. if (code2 === marker) {
  176615. effects.enter(tagAttributeValueLiteralMarkerType);
  176616. effects.consume(code2);
  176617. effects.exit(tagAttributeValueLiteralMarkerType);
  176618. effects.exit(tagAttributeValueLiteralType);
  176619. effects.exit(tagAttributeType);
  176620. marker = void 0;
  176621. returnState = beforeAttribute;
  176622. return optionalEsWhitespace;
  176623. }
  176624. if (markdownLineEnding(code2)) {
  176625. returnState = attributeValueQuotedStart;
  176626. return optionalEsWhitespace(code2);
  176627. }
  176628. effects.enter(tagAttributeValueLiteralValueType);
  176629. return attributeValueQuoted(code2);
  176630. }
  176631. function attributeValueQuoted(code2) {
  176632. if (code2 === null || code2 === marker || markdownLineEnding(code2)) {
  176633. effects.exit(tagAttributeValueLiteralValueType);
  176634. return attributeValueQuotedStart(code2);
  176635. }
  176636. effects.consume(code2);
  176637. return attributeValueQuoted;
  176638. }
  176639. function selfClosing(code2) {
  176640. if (code2 === 62) {
  176641. return tagEnd(code2);
  176642. }
  176643. crash(
  176644. code2,
  176645. "after self-closing slash",
  176646. "`>` to end the tag" + (code2 === 42 || code2 === 47 ? " (note: JS comments in JSX tags are not supported in MDX)" : "")
  176647. );
  176648. }
  176649. function tagEnd(code2) {
  176650. effects.enter(tagMarkerType);
  176651. effects.consume(code2);
  176652. effects.exit(tagMarkerType);
  176653. effects.exit(tagType);
  176654. return ok2;
  176655. }
  176656. function optionalEsWhitespace(code2) {
  176657. if (markdownLineEnding(code2)) {
  176658. if (allowLazy) {
  176659. effects.enter("lineEnding");
  176660. effects.consume(code2);
  176661. effects.exit("lineEnding");
  176662. return factorySpace(effects, optionalEsWhitespace, "linePrefix", 4);
  176663. }
  176664. return effects.attempt(
  176665. lazyLineEnd,
  176666. factorySpace(effects, optionalEsWhitespace, "linePrefix", 4),
  176667. crashEol
  176668. )(code2);
  176669. }
  176670. if (markdownSpace(code2) || unicodeWhitespace(code2)) {
  176671. effects.enter("esWhitespace");
  176672. return optionalEsWhitespaceContinue(code2);
  176673. }
  176674. return returnState(code2);
  176675. }
  176676. function optionalEsWhitespaceContinue(code2) {
  176677. if (markdownLineEnding(code2) || !(markdownSpace(code2) || unicodeWhitespace(code2))) {
  176678. effects.exit("esWhitespace");
  176679. return optionalEsWhitespace(code2);
  176680. }
  176681. effects.consume(code2);
  176682. return optionalEsWhitespaceContinue;
  176683. }
  176684. function crashEol() {
  176685. throw new VFileMessage(
  176686. "Unexpected lazy line in container, expected line to be prefixed with `>` when in a block quote, whitespace when in a list, etc",
  176687. self2.now(),
  176688. "micromark-extension-mdx-jsx:unexpected-eof"
  176689. );
  176690. }
  176691. function crash(code2, at2, expect) {
  176692. throw new VFileMessage(
  176693. "Unexpected " + (code2 === null ? "end of file" : "character `" + (code2 === 96 ? "` ` `" : String.fromCharCode(code2)) + "` (" + serializeCharCode(code2) + ")") + " " + at2 + ", expected " + expect,
  176694. self2.now(),
  176695. "micromark-extension-mdx-jsx:unexpected-" + (code2 === null ? "eof" : "character")
  176696. );
  176697. }
  176698. }
  176699. function tokenizeLazyLineEnd(effects, ok2, nok) {
  176700. const self2 = this;
  176701. return start3;
  176702. function start3(code2) {
  176703. effects.enter("lineEnding");
  176704. effects.consume(code2);
  176705. effects.exit("lineEnding");
  176706. return lineStart;
  176707. }
  176708. function lineStart(code2) {
  176709. return self2.parser.lazy[self2.now().line] ? nok(code2) : ok2(code2);
  176710. }
  176711. }
  176712. function serializeCharCode(code2) {
  176713. return "U+" + code2.toString(16).toUpperCase().padStart(4, "0");
  176714. }
  176715. // node_modules/micromark-extension-mdx-jsx/lib/jsx-text.js
  176716. function jsxText(acorn, acornOptions, addResult) {
  176717. return {
  176718. tokenize: tokenizeJsxText
  176719. };
  176720. function tokenizeJsxText(effects, ok2, nok) {
  176721. return factoryTag.call(
  176722. this,
  176723. effects,
  176724. ok2,
  176725. nok,
  176726. acorn,
  176727. acornOptions,
  176728. addResult,
  176729. true,
  176730. "mdxJsxTextTag",
  176731. "mdxJsxTextTagMarker",
  176732. "mdxJsxTextTagClosingMarker",
  176733. "mdxJsxTextTagSelfClosingMarker",
  176734. "mdxJsxTextTagName",
  176735. "mdxJsxTextTagNamePrimary",
  176736. "mdxJsxTextTagNameMemberMarker",
  176737. "mdxJsxTextTagNameMember",
  176738. "mdxJsxTextTagNamePrefixMarker",
  176739. "mdxJsxTextTagNameLocal",
  176740. "mdxJsxTextTagExpressionAttribute",
  176741. "mdxJsxTextTagExpressionAttributeMarker",
  176742. "mdxJsxTextTagExpressionAttributeValue",
  176743. "mdxJsxTextTagAttribute",
  176744. "mdxJsxTextTagAttributeName",
  176745. "mdxJsxTextTagAttributeNamePrimary",
  176746. "mdxJsxTextTagAttributeNamePrefixMarker",
  176747. "mdxJsxTextTagAttributeNameLocal",
  176748. "mdxJsxTextTagAttributeInitializerMarker",
  176749. "mdxJsxTextTagAttributeValueLiteral",
  176750. "mdxJsxTextTagAttributeValueLiteralMarker",
  176751. "mdxJsxTextTagAttributeValueLiteralValue",
  176752. "mdxJsxTextTagAttributeValueExpression",
  176753. "mdxJsxTextTagAttributeValueExpressionMarker",
  176754. "mdxJsxTextTagAttributeValueExpressionValue"
  176755. );
  176756. }
  176757. }
  176758. // node_modules/micromark-extension-mdx-jsx/lib/jsx-flow.js
  176759. function jsxFlow(acorn, acornOptions, addResult) {
  176760. return {
  176761. tokenize: tokenizeJsxFlow,
  176762. concrete: true
  176763. };
  176764. function tokenizeJsxFlow(effects, ok2, nok) {
  176765. const self2 = this;
  176766. return start3;
  176767. function start3(code2) {
  176768. return factoryTag.call(
  176769. self2,
  176770. effects,
  176771. factorySpace(effects, after, "whitespace"),
  176772. nok,
  176773. acorn,
  176774. acornOptions,
  176775. addResult,
  176776. false,
  176777. "mdxJsxFlowTag",
  176778. "mdxJsxFlowTagMarker",
  176779. "mdxJsxFlowTagClosingMarker",
  176780. "mdxJsxFlowTagSelfClosingMarker",
  176781. "mdxJsxFlowTagName",
  176782. "mdxJsxFlowTagNamePrimary",
  176783. "mdxJsxFlowTagNameMemberMarker",
  176784. "mdxJsxFlowTagNameMember",
  176785. "mdxJsxFlowTagNamePrefixMarker",
  176786. "mdxJsxFlowTagNameLocal",
  176787. "mdxJsxFlowTagExpressionAttribute",
  176788. "mdxJsxFlowTagExpressionAttributeMarker",
  176789. "mdxJsxFlowTagExpressionAttributeValue",
  176790. "mdxJsxFlowTagAttribute",
  176791. "mdxJsxFlowTagAttributeName",
  176792. "mdxJsxFlowTagAttributeNamePrimary",
  176793. "mdxJsxFlowTagAttributeNamePrefixMarker",
  176794. "mdxJsxFlowTagAttributeNameLocal",
  176795. "mdxJsxFlowTagAttributeInitializerMarker",
  176796. "mdxJsxFlowTagAttributeValueLiteral",
  176797. "mdxJsxFlowTagAttributeValueLiteralMarker",
  176798. "mdxJsxFlowTagAttributeValueLiteralValue",
  176799. "mdxJsxFlowTagAttributeValueExpression",
  176800. "mdxJsxFlowTagAttributeValueExpressionMarker",
  176801. "mdxJsxFlowTagAttributeValueExpressionValue"
  176802. )(code2);
  176803. }
  176804. function after(code2) {
  176805. return code2 === 60 ? start3(code2) : code2 === null || markdownLineEnding(code2) ? ok2(code2) : nok(code2);
  176806. }
  176807. }
  176808. }
  176809. // node_modules/micromark-extension-mdx-jsx/lib/syntax.js
  176810. function mdxJsx(options = {}) {
  176811. const acorn = options.acorn;
  176812. let acornOptions;
  176813. if (acorn) {
  176814. if (!acorn.parse || !acorn.parseExpressionAt) {
  176815. throw new Error(
  176816. "Expected a proper `acorn` instance passed in as `options.acorn`"
  176817. );
  176818. }
  176819. acornOptions = Object.assign(
  176820. {
  176821. ecmaVersion: 2020,
  176822. sourceType: "module"
  176823. },
  176824. options.acornOptions,
  176825. {
  176826. locations: true
  176827. }
  176828. );
  176829. } else if (options.acornOptions || options.addResult) {
  176830. throw new Error("Expected an `acorn` instance passed in as `options.acorn`");
  176831. }
  176832. return {
  176833. flow: {
  176834. [60]: jsxFlow(acorn, acornOptions, options.addResult)
  176835. },
  176836. text: {
  176837. [60]: jsxText(acorn, acornOptions, options.addResult)
  176838. }
  176839. };
  176840. }
  176841. // node_modules/micromark-extension-mdx-md/index.js
  176842. var mdxMd = {
  176843. disable: { null: ["autolink", "codeIndented", "htmlFlow", "htmlText"] }
  176844. };
  176845. // node_modules/micromark-util-classify-character/index.js
  176846. function classifyCharacter(code2) {
  176847. if (code2 === null || markdownLineEndingOrSpace(code2) || unicodeWhitespace(code2)) {
  176848. return 1;
  176849. }
  176850. if (unicodePunctuation(code2)) {
  176851. return 2;
  176852. }
  176853. }
  176854. // node_modules/micromark-util-resolve-all/index.js
  176855. function resolveAll(constructs2, events, context) {
  176856. const called = [];
  176857. let index2 = -1;
  176858. while (++index2 < constructs2.length) {
  176859. const resolve = constructs2[index2].resolveAll;
  176860. if (resolve && !called.includes(resolve)) {
  176861. events = resolve(events, context);
  176862. called.push(resolve);
  176863. }
  176864. }
  176865. return events;
  176866. }
  176867. // node_modules/micromark-core-commonmark/lib/attention.js
  176868. var attention = {
  176869. name: "attention",
  176870. tokenize: tokenizeAttention,
  176871. resolveAll: resolveAllAttention
  176872. };
  176873. function resolveAllAttention(events, context) {
  176874. let index2 = -1;
  176875. let open;
  176876. let group;
  176877. let text5;
  176878. let openingSequence;
  176879. let closingSequence;
  176880. let use;
  176881. let nextEvents;
  176882. let offset2;
  176883. while (++index2 < events.length) {
  176884. if (events[index2][0] === "enter" && events[index2][1].type === "attentionSequence" && events[index2][1]._close) {
  176885. open = index2;
  176886. while (open--) {
  176887. if (events[open][0] === "exit" && events[open][1].type === "attentionSequence" && events[open][1]._open && context.sliceSerialize(events[open][1]).charCodeAt(0) === context.sliceSerialize(events[index2][1]).charCodeAt(0)) {
  176888. if ((events[open][1]._close || events[index2][1]._open) && (events[index2][1].end.offset - events[index2][1].start.offset) % 3 && !((events[open][1].end.offset - events[open][1].start.offset + events[index2][1].end.offset - events[index2][1].start.offset) % 3)) {
  176889. continue;
  176890. }
  176891. use = events[open][1].end.offset - events[open][1].start.offset > 1 && events[index2][1].end.offset - events[index2][1].start.offset > 1 ? 2 : 1;
  176892. const start3 = Object.assign({}, events[open][1].end);
  176893. const end = Object.assign({}, events[index2][1].start);
  176894. movePoint(start3, -use);
  176895. movePoint(end, use);
  176896. openingSequence = {
  176897. type: use > 1 ? "strongSequence" : "emphasisSequence",
  176898. start: start3,
  176899. end: Object.assign({}, events[open][1].end)
  176900. };
  176901. closingSequence = {
  176902. type: use > 1 ? "strongSequence" : "emphasisSequence",
  176903. start: Object.assign({}, events[index2][1].start),
  176904. end
  176905. };
  176906. text5 = {
  176907. type: use > 1 ? "strongText" : "emphasisText",
  176908. start: Object.assign({}, events[open][1].end),
  176909. end: Object.assign({}, events[index2][1].start)
  176910. };
  176911. group = {
  176912. type: use > 1 ? "strong" : "emphasis",
  176913. start: Object.assign({}, openingSequence.start),
  176914. end: Object.assign({}, closingSequence.end)
  176915. };
  176916. events[open][1].end = Object.assign({}, openingSequence.start);
  176917. events[index2][1].start = Object.assign({}, closingSequence.end);
  176918. nextEvents = [];
  176919. if (events[open][1].end.offset - events[open][1].start.offset) {
  176920. nextEvents = push(nextEvents, [
  176921. ["enter", events[open][1], context],
  176922. ["exit", events[open][1], context]
  176923. ]);
  176924. }
  176925. nextEvents = push(nextEvents, [
  176926. ["enter", group, context],
  176927. ["enter", openingSequence, context],
  176928. ["exit", openingSequence, context],
  176929. ["enter", text5, context]
  176930. ]);
  176931. nextEvents = push(
  176932. nextEvents,
  176933. resolveAll(
  176934. context.parser.constructs.insideSpan.null,
  176935. events.slice(open + 1, index2),
  176936. context
  176937. )
  176938. );
  176939. nextEvents = push(nextEvents, [
  176940. ["exit", text5, context],
  176941. ["enter", closingSequence, context],
  176942. ["exit", closingSequence, context],
  176943. ["exit", group, context]
  176944. ]);
  176945. if (events[index2][1].end.offset - events[index2][1].start.offset) {
  176946. offset2 = 2;
  176947. nextEvents = push(nextEvents, [
  176948. ["enter", events[index2][1], context],
  176949. ["exit", events[index2][1], context]
  176950. ]);
  176951. } else {
  176952. offset2 = 0;
  176953. }
  176954. splice(events, open - 1, index2 - open + 3, nextEvents);
  176955. index2 = open + nextEvents.length - offset2 - 2;
  176956. break;
  176957. }
  176958. }
  176959. }
  176960. }
  176961. index2 = -1;
  176962. while (++index2 < events.length) {
  176963. if (events[index2][1].type === "attentionSequence") {
  176964. events[index2][1].type = "data";
  176965. }
  176966. }
  176967. return events;
  176968. }
  176969. function tokenizeAttention(effects, ok2) {
  176970. const attentionMarkers2 = this.parser.constructs.attentionMarkers.null;
  176971. const previous2 = this.previous;
  176972. const before = classifyCharacter(previous2);
  176973. let marker;
  176974. return start3;
  176975. function start3(code2) {
  176976. effects.enter("attentionSequence");
  176977. marker = code2;
  176978. return sequence(code2);
  176979. }
  176980. function sequence(code2) {
  176981. if (code2 === marker) {
  176982. effects.consume(code2);
  176983. return sequence;
  176984. }
  176985. const token = effects.exit("attentionSequence");
  176986. const after = classifyCharacter(code2);
  176987. const open = !after || after === 2 && before || attentionMarkers2.includes(code2);
  176988. const close = !before || before === 2 && after || attentionMarkers2.includes(previous2);
  176989. token._open = Boolean(marker === 42 ? open : open && (before || !close));
  176990. token._close = Boolean(marker === 42 ? close : close && (after || !open));
  176991. return ok2(code2);
  176992. }
  176993. }
  176994. function movePoint(point3, offset2) {
  176995. point3.column += offset2;
  176996. point3.offset += offset2;
  176997. point3._bufferIndex += offset2;
  176998. }
  176999. // node_modules/micromark-core-commonmark/lib/autolink.js
  177000. var autolink = {
  177001. name: "autolink",
  177002. tokenize: tokenizeAutolink
  177003. };
  177004. function tokenizeAutolink(effects, ok2, nok) {
  177005. let size = 1;
  177006. return start3;
  177007. function start3(code2) {
  177008. effects.enter("autolink");
  177009. effects.enter("autolinkMarker");
  177010. effects.consume(code2);
  177011. effects.exit("autolinkMarker");
  177012. effects.enter("autolinkProtocol");
  177013. return open;
  177014. }
  177015. function open(code2) {
  177016. if (asciiAlpha(code2)) {
  177017. effects.consume(code2);
  177018. return schemeOrEmailAtext;
  177019. }
  177020. return asciiAtext(code2) ? emailAtext(code2) : nok(code2);
  177021. }
  177022. function schemeOrEmailAtext(code2) {
  177023. return code2 === 43 || code2 === 45 || code2 === 46 || asciiAlphanumeric(code2) ? schemeInsideOrEmailAtext(code2) : emailAtext(code2);
  177024. }
  177025. function schemeInsideOrEmailAtext(code2) {
  177026. if (code2 === 58) {
  177027. effects.consume(code2);
  177028. return urlInside;
  177029. }
  177030. if ((code2 === 43 || code2 === 45 || code2 === 46 || asciiAlphanumeric(code2)) && size++ < 32) {
  177031. effects.consume(code2);
  177032. return schemeInsideOrEmailAtext;
  177033. }
  177034. return emailAtext(code2);
  177035. }
  177036. function urlInside(code2) {
  177037. if (code2 === 62) {
  177038. effects.exit("autolinkProtocol");
  177039. return end(code2);
  177040. }
  177041. if (code2 === null || code2 === 32 || code2 === 60 || asciiControl(code2)) {
  177042. return nok(code2);
  177043. }
  177044. effects.consume(code2);
  177045. return urlInside;
  177046. }
  177047. function emailAtext(code2) {
  177048. if (code2 === 64) {
  177049. effects.consume(code2);
  177050. size = 0;
  177051. return emailAtSignOrDot;
  177052. }
  177053. if (asciiAtext(code2)) {
  177054. effects.consume(code2);
  177055. return emailAtext;
  177056. }
  177057. return nok(code2);
  177058. }
  177059. function emailAtSignOrDot(code2) {
  177060. return asciiAlphanumeric(code2) ? emailLabel(code2) : nok(code2);
  177061. }
  177062. function emailLabel(code2) {
  177063. if (code2 === 46) {
  177064. effects.consume(code2);
  177065. size = 0;
  177066. return emailAtSignOrDot;
  177067. }
  177068. if (code2 === 62) {
  177069. effects.exit("autolinkProtocol").type = "autolinkEmail";
  177070. return end(code2);
  177071. }
  177072. return emailValue(code2);
  177073. }
  177074. function emailValue(code2) {
  177075. if ((code2 === 45 || asciiAlphanumeric(code2)) && size++ < 63) {
  177076. effects.consume(code2);
  177077. return code2 === 45 ? emailValue : emailLabel;
  177078. }
  177079. return nok(code2);
  177080. }
  177081. function end(code2) {
  177082. effects.enter("autolinkMarker");
  177083. effects.consume(code2);
  177084. effects.exit("autolinkMarker");
  177085. effects.exit("autolink");
  177086. return ok2;
  177087. }
  177088. }
  177089. // node_modules/micromark-core-commonmark/lib/blank-line.js
  177090. var blankLine = {
  177091. tokenize: tokenizeBlankLine,
  177092. partial: true
  177093. };
  177094. function tokenizeBlankLine(effects, ok2, nok) {
  177095. return factorySpace(effects, afterWhitespace, "linePrefix");
  177096. function afterWhitespace(code2) {
  177097. return code2 === null || markdownLineEnding(code2) ? ok2(code2) : nok(code2);
  177098. }
  177099. }
  177100. // node_modules/micromark-core-commonmark/lib/block-quote.js
  177101. var blockQuote = {
  177102. name: "blockQuote",
  177103. tokenize: tokenizeBlockQuoteStart,
  177104. continuation: {
  177105. tokenize: tokenizeBlockQuoteContinuation
  177106. },
  177107. exit
  177108. };
  177109. function tokenizeBlockQuoteStart(effects, ok2, nok) {
  177110. const self2 = this;
  177111. return start3;
  177112. function start3(code2) {
  177113. if (code2 === 62) {
  177114. const state = self2.containerState;
  177115. if (!state.open) {
  177116. effects.enter("blockQuote", {
  177117. _container: true
  177118. });
  177119. state.open = true;
  177120. }
  177121. effects.enter("blockQuotePrefix");
  177122. effects.enter("blockQuoteMarker");
  177123. effects.consume(code2);
  177124. effects.exit("blockQuoteMarker");
  177125. return after;
  177126. }
  177127. return nok(code2);
  177128. }
  177129. function after(code2) {
  177130. if (markdownSpace(code2)) {
  177131. effects.enter("blockQuotePrefixWhitespace");
  177132. effects.consume(code2);
  177133. effects.exit("blockQuotePrefixWhitespace");
  177134. effects.exit("blockQuotePrefix");
  177135. return ok2;
  177136. }
  177137. effects.exit("blockQuotePrefix");
  177138. return ok2(code2);
  177139. }
  177140. }
  177141. function tokenizeBlockQuoteContinuation(effects, ok2, nok) {
  177142. return factorySpace(
  177143. effects,
  177144. effects.attempt(blockQuote, ok2, nok),
  177145. "linePrefix",
  177146. this.parser.constructs.disable.null.includes("codeIndented") ? void 0 : 4
  177147. );
  177148. }
  177149. function exit(effects) {
  177150. effects.exit("blockQuote");
  177151. }
  177152. // node_modules/micromark-core-commonmark/lib/character-escape.js
  177153. var characterEscape = {
  177154. name: "characterEscape",
  177155. tokenize: tokenizeCharacterEscape
  177156. };
  177157. function tokenizeCharacterEscape(effects, ok2, nok) {
  177158. return start3;
  177159. function start3(code2) {
  177160. effects.enter("characterEscape");
  177161. effects.enter("escapeMarker");
  177162. effects.consume(code2);
  177163. effects.exit("escapeMarker");
  177164. return open;
  177165. }
  177166. function open(code2) {
  177167. if (asciiPunctuation(code2)) {
  177168. effects.enter("characterEscapeValue");
  177169. effects.consume(code2);
  177170. effects.exit("characterEscapeValue");
  177171. effects.exit("characterEscape");
  177172. return ok2;
  177173. }
  177174. return nok(code2);
  177175. }
  177176. }
  177177. // node_modules/character-entities/index.js
  177178. var characterEntities = {
  177179. AEli: "\xC6",
  177180. AElig: "\xC6",
  177181. AM: "&",
  177182. AMP: "&",
  177183. Aacut: "\xC1",
  177184. Aacute: "\xC1",
  177185. Abreve: "\u0102",
  177186. Acir: "\xC2",
  177187. Acirc: "\xC2",
  177188. Acy: "\u0410",
  177189. Afr: "\u{1D504}",
  177190. Agrav: "\xC0",
  177191. Agrave: "\xC0",
  177192. Alpha: "\u0391",
  177193. Amacr: "\u0100",
  177194. And: "\u2A53",
  177195. Aogon: "\u0104",
  177196. Aopf: "\u{1D538}",
  177197. ApplyFunction: "\u2061",
  177198. Arin: "\xC5",
  177199. Aring: "\xC5",
  177200. Ascr: "\u{1D49C}",
  177201. Assign: "\u2254",
  177202. Atild: "\xC3",
  177203. Atilde: "\xC3",
  177204. Aum: "\xC4",
  177205. Auml: "\xC4",
  177206. Backslash: "\u2216",
  177207. Barv: "\u2AE7",
  177208. Barwed: "\u2306",
  177209. Bcy: "\u0411",
  177210. Because: "\u2235",
  177211. Bernoullis: "\u212C",
  177212. Beta: "\u0392",
  177213. Bfr: "\u{1D505}",
  177214. Bopf: "\u{1D539}",
  177215. Breve: "\u02D8",
  177216. Bscr: "\u212C",
  177217. Bumpeq: "\u224E",
  177218. CHcy: "\u0427",
  177219. COP: "\xA9",
  177220. COPY: "\xA9",
  177221. Cacute: "\u0106",
  177222. Cap: "\u22D2",
  177223. CapitalDifferentialD: "\u2145",
  177224. Cayleys: "\u212D",
  177225. Ccaron: "\u010C",
  177226. Ccedi: "\xC7",
  177227. Ccedil: "\xC7",
  177228. Ccirc: "\u0108",
  177229. Cconint: "\u2230",
  177230. Cdot: "\u010A",
  177231. Cedilla: "\xB8",
  177232. CenterDot: "\xB7",
  177233. Cfr: "\u212D",
  177234. Chi: "\u03A7",
  177235. CircleDot: "\u2299",
  177236. CircleMinus: "\u2296",
  177237. CirclePlus: "\u2295",
  177238. CircleTimes: "\u2297",
  177239. ClockwiseContourIntegral: "\u2232",
  177240. CloseCurlyDoubleQuote: "\u201D",
  177241. CloseCurlyQuote: "\u2019",
  177242. Colon: "\u2237",
  177243. Colone: "\u2A74",
  177244. Congruent: "\u2261",
  177245. Conint: "\u222F",
  177246. ContourIntegral: "\u222E",
  177247. Copf: "\u2102",
  177248. Coproduct: "\u2210",
  177249. CounterClockwiseContourIntegral: "\u2233",
  177250. Cross: "\u2A2F",
  177251. Cscr: "\u{1D49E}",
  177252. Cup: "\u22D3",
  177253. CupCap: "\u224D",
  177254. DD: "\u2145",
  177255. DDotrahd: "\u2911",
  177256. DJcy: "\u0402",
  177257. DScy: "\u0405",
  177258. DZcy: "\u040F",
  177259. Dagger: "\u2021",
  177260. Darr: "\u21A1",
  177261. Dashv: "\u2AE4",
  177262. Dcaron: "\u010E",
  177263. Dcy: "\u0414",
  177264. Del: "\u2207",
  177265. Delta: "\u0394",
  177266. Dfr: "\u{1D507}",
  177267. DiacriticalAcute: "\xB4",
  177268. DiacriticalDot: "\u02D9",
  177269. DiacriticalDoubleAcute: "\u02DD",
  177270. DiacriticalGrave: "`",
  177271. DiacriticalTilde: "\u02DC",
  177272. Diamond: "\u22C4",
  177273. DifferentialD: "\u2146",
  177274. Dopf: "\u{1D53B}",
  177275. Dot: "\xA8",
  177276. DotDot: "\u20DC",
  177277. DotEqual: "\u2250",
  177278. DoubleContourIntegral: "\u222F",
  177279. DoubleDot: "\xA8",
  177280. DoubleDownArrow: "\u21D3",
  177281. DoubleLeftArrow: "\u21D0",
  177282. DoubleLeftRightArrow: "\u21D4",
  177283. DoubleLeftTee: "\u2AE4",
  177284. DoubleLongLeftArrow: "\u27F8",
  177285. DoubleLongLeftRightArrow: "\u27FA",
  177286. DoubleLongRightArrow: "\u27F9",
  177287. DoubleRightArrow: "\u21D2",
  177288. DoubleRightTee: "\u22A8",
  177289. DoubleUpArrow: "\u21D1",
  177290. DoubleUpDownArrow: "\u21D5",
  177291. DoubleVerticalBar: "\u2225",
  177292. DownArrow: "\u2193",
  177293. DownArrowBar: "\u2913",
  177294. DownArrowUpArrow: "\u21F5",
  177295. DownBreve: "\u0311",
  177296. DownLeftRightVector: "\u2950",
  177297. DownLeftTeeVector: "\u295E",
  177298. DownLeftVector: "\u21BD",
  177299. DownLeftVectorBar: "\u2956",
  177300. DownRightTeeVector: "\u295F",
  177301. DownRightVector: "\u21C1",
  177302. DownRightVectorBar: "\u2957",
  177303. DownTee: "\u22A4",
  177304. DownTeeArrow: "\u21A7",
  177305. Downarrow: "\u21D3",
  177306. Dscr: "\u{1D49F}",
  177307. Dstrok: "\u0110",
  177308. ENG: "\u014A",
  177309. ET: "\xD0",
  177310. ETH: "\xD0",
  177311. Eacut: "\xC9",
  177312. Eacute: "\xC9",
  177313. Ecaron: "\u011A",
  177314. Ecir: "\xCA",
  177315. Ecirc: "\xCA",
  177316. Ecy: "\u042D",
  177317. Edot: "\u0116",
  177318. Efr: "\u{1D508}",
  177319. Egrav: "\xC8",
  177320. Egrave: "\xC8",
  177321. Element: "\u2208",
  177322. Emacr: "\u0112",
  177323. EmptySmallSquare: "\u25FB",
  177324. EmptyVerySmallSquare: "\u25AB",
  177325. Eogon: "\u0118",
  177326. Eopf: "\u{1D53C}",
  177327. Epsilon: "\u0395",
  177328. Equal: "\u2A75",
  177329. EqualTilde: "\u2242",
  177330. Equilibrium: "\u21CC",
  177331. Escr: "\u2130",
  177332. Esim: "\u2A73",
  177333. Eta: "\u0397",
  177334. Eum: "\xCB",
  177335. Euml: "\xCB",
  177336. Exists: "\u2203",
  177337. ExponentialE: "\u2147",
  177338. Fcy: "\u0424",
  177339. Ffr: "\u{1D509}",
  177340. FilledSmallSquare: "\u25FC",
  177341. FilledVerySmallSquare: "\u25AA",
  177342. Fopf: "\u{1D53D}",
  177343. ForAll: "\u2200",
  177344. Fouriertrf: "\u2131",
  177345. Fscr: "\u2131",
  177346. GJcy: "\u0403",
  177347. G: ">",
  177348. GT: ">",
  177349. Gamma: "\u0393",
  177350. Gammad: "\u03DC",
  177351. Gbreve: "\u011E",
  177352. Gcedil: "\u0122",
  177353. Gcirc: "\u011C",
  177354. Gcy: "\u0413",
  177355. Gdot: "\u0120",
  177356. Gfr: "\u{1D50A}",
  177357. Gg: "\u22D9",
  177358. Gopf: "\u{1D53E}",
  177359. GreaterEqual: "\u2265",
  177360. GreaterEqualLess: "\u22DB",
  177361. GreaterFullEqual: "\u2267",
  177362. GreaterGreater: "\u2AA2",
  177363. GreaterLess: "\u2277",
  177364. GreaterSlantEqual: "\u2A7E",
  177365. GreaterTilde: "\u2273",
  177366. Gscr: "\u{1D4A2}",
  177367. Gt: "\u226B",
  177368. HARDcy: "\u042A",
  177369. Hacek: "\u02C7",
  177370. Hat: "^",
  177371. Hcirc: "\u0124",
  177372. Hfr: "\u210C",
  177373. HilbertSpace: "\u210B",
  177374. Hopf: "\u210D",
  177375. HorizontalLine: "\u2500",
  177376. Hscr: "\u210B",
  177377. Hstrok: "\u0126",
  177378. HumpDownHump: "\u224E",
  177379. HumpEqual: "\u224F",
  177380. IEcy: "\u0415",
  177381. IJlig: "\u0132",
  177382. IOcy: "\u0401",
  177383. Iacut: "\xCD",
  177384. Iacute: "\xCD",
  177385. Icir: "\xCE",
  177386. Icirc: "\xCE",
  177387. Icy: "\u0418",
  177388. Idot: "\u0130",
  177389. Ifr: "\u2111",
  177390. Igrav: "\xCC",
  177391. Igrave: "\xCC",
  177392. Im: "\u2111",
  177393. Imacr: "\u012A",
  177394. ImaginaryI: "\u2148",
  177395. Implies: "\u21D2",
  177396. Int: "\u222C",
  177397. Integral: "\u222B",
  177398. Intersection: "\u22C2",
  177399. InvisibleComma: "\u2063",
  177400. InvisibleTimes: "\u2062",
  177401. Iogon: "\u012E",
  177402. Iopf: "\u{1D540}",
  177403. Iota: "\u0399",
  177404. Iscr: "\u2110",
  177405. Itilde: "\u0128",
  177406. Iukcy: "\u0406",
  177407. Ium: "\xCF",
  177408. Iuml: "\xCF",
  177409. Jcirc: "\u0134",
  177410. Jcy: "\u0419",
  177411. Jfr: "\u{1D50D}",
  177412. Jopf: "\u{1D541}",
  177413. Jscr: "\u{1D4A5}",
  177414. Jsercy: "\u0408",
  177415. Jukcy: "\u0404",
  177416. KHcy: "\u0425",
  177417. KJcy: "\u040C",
  177418. Kappa: "\u039A",
  177419. Kcedil: "\u0136",
  177420. Kcy: "\u041A",
  177421. Kfr: "\u{1D50E}",
  177422. Kopf: "\u{1D542}",
  177423. Kscr: "\u{1D4A6}",
  177424. LJcy: "\u0409",
  177425. L: "<",
  177426. LT: "<",
  177427. Lacute: "\u0139",
  177428. Lambda: "\u039B",
  177429. Lang: "\u27EA",
  177430. Laplacetrf: "\u2112",
  177431. Larr: "\u219E",
  177432. Lcaron: "\u013D",
  177433. Lcedil: "\u013B",
  177434. Lcy: "\u041B",
  177435. LeftAngleBracket: "\u27E8",
  177436. LeftArrow: "\u2190",
  177437. LeftArrowBar: "\u21E4",
  177438. LeftArrowRightArrow: "\u21C6",
  177439. LeftCeiling: "\u2308",
  177440. LeftDoubleBracket: "\u27E6",
  177441. LeftDownTeeVector: "\u2961",
  177442. LeftDownVector: "\u21C3",
  177443. LeftDownVectorBar: "\u2959",
  177444. LeftFloor: "\u230A",
  177445. LeftRightArrow: "\u2194",
  177446. LeftRightVector: "\u294E",
  177447. LeftTee: "\u22A3",
  177448. LeftTeeArrow: "\u21A4",
  177449. LeftTeeVector: "\u295A",
  177450. LeftTriangle: "\u22B2",
  177451. LeftTriangleBar: "\u29CF",
  177452. LeftTriangleEqual: "\u22B4",
  177453. LeftUpDownVector: "\u2951",
  177454. LeftUpTeeVector: "\u2960",
  177455. LeftUpVector: "\u21BF",
  177456. LeftUpVectorBar: "\u2958",
  177457. LeftVector: "\u21BC",
  177458. LeftVectorBar: "\u2952",
  177459. Leftarrow: "\u21D0",
  177460. Leftrightarrow: "\u21D4",
  177461. LessEqualGreater: "\u22DA",
  177462. LessFullEqual: "\u2266",
  177463. LessGreater: "\u2276",
  177464. LessLess: "\u2AA1",
  177465. LessSlantEqual: "\u2A7D",
  177466. LessTilde: "\u2272",
  177467. Lfr: "\u{1D50F}",
  177468. Ll: "\u22D8",
  177469. Lleftarrow: "\u21DA",
  177470. Lmidot: "\u013F",
  177471. LongLeftArrow: "\u27F5",
  177472. LongLeftRightArrow: "\u27F7",
  177473. LongRightArrow: "\u27F6",
  177474. Longleftarrow: "\u27F8",
  177475. Longleftrightarrow: "\u27FA",
  177476. Longrightarrow: "\u27F9",
  177477. Lopf: "\u{1D543}",
  177478. LowerLeftArrow: "\u2199",
  177479. LowerRightArrow: "\u2198",
  177480. Lscr: "\u2112",
  177481. Lsh: "\u21B0",
  177482. Lstrok: "\u0141",
  177483. Lt: "\u226A",
  177484. Map: "\u2905",
  177485. Mcy: "\u041C",
  177486. MediumSpace: "\u205F",
  177487. Mellintrf: "\u2133",
  177488. Mfr: "\u{1D510}",
  177489. MinusPlus: "\u2213",
  177490. Mopf: "\u{1D544}",
  177491. Mscr: "\u2133",
  177492. Mu: "\u039C",
  177493. NJcy: "\u040A",
  177494. Nacute: "\u0143",
  177495. Ncaron: "\u0147",
  177496. Ncedil: "\u0145",
  177497. Ncy: "\u041D",
  177498. NegativeMediumSpace: "\u200B",
  177499. NegativeThickSpace: "\u200B",
  177500. NegativeThinSpace: "\u200B",
  177501. NegativeVeryThinSpace: "\u200B",
  177502. NestedGreaterGreater: "\u226B",
  177503. NestedLessLess: "\u226A",
  177504. NewLine: "\n",
  177505. Nfr: "\u{1D511}",
  177506. NoBreak: "\u2060",
  177507. NonBreakingSpace: "\xA0",
  177508. Nopf: "\u2115",
  177509. Not: "\u2AEC",
  177510. NotCongruent: "\u2262",
  177511. NotCupCap: "\u226D",
  177512. NotDoubleVerticalBar: "\u2226",
  177513. NotElement: "\u2209",
  177514. NotEqual: "\u2260",
  177515. NotEqualTilde: "\u2242\u0338",
  177516. NotExists: "\u2204",
  177517. NotGreater: "\u226F",
  177518. NotGreaterEqual: "\u2271",
  177519. NotGreaterFullEqual: "\u2267\u0338",
  177520. NotGreaterGreater: "\u226B\u0338",
  177521. NotGreaterLess: "\u2279",
  177522. NotGreaterSlantEqual: "\u2A7E\u0338",
  177523. NotGreaterTilde: "\u2275",
  177524. NotHumpDownHump: "\u224E\u0338",
  177525. NotHumpEqual: "\u224F\u0338",
  177526. NotLeftTriangle: "\u22EA",
  177527. NotLeftTriangleBar: "\u29CF\u0338",
  177528. NotLeftTriangleEqual: "\u22EC",
  177529. NotLess: "\u226E",
  177530. NotLessEqual: "\u2270",
  177531. NotLessGreater: "\u2278",
  177532. NotLessLess: "\u226A\u0338",
  177533. NotLessSlantEqual: "\u2A7D\u0338",
  177534. NotLessTilde: "\u2274",
  177535. NotNestedGreaterGreater: "\u2AA2\u0338",
  177536. NotNestedLessLess: "\u2AA1\u0338",
  177537. NotPrecedes: "\u2280",
  177538. NotPrecedesEqual: "\u2AAF\u0338",
  177539. NotPrecedesSlantEqual: "\u22E0",
  177540. NotReverseElement: "\u220C",
  177541. NotRightTriangle: "\u22EB",
  177542. NotRightTriangleBar: "\u29D0\u0338",
  177543. NotRightTriangleEqual: "\u22ED",
  177544. NotSquareSubset: "\u228F\u0338",
  177545. NotSquareSubsetEqual: "\u22E2",
  177546. NotSquareSuperset: "\u2290\u0338",
  177547. NotSquareSupersetEqual: "\u22E3",
  177548. NotSubset: "\u2282\u20D2",
  177549. NotSubsetEqual: "\u2288",
  177550. NotSucceeds: "\u2281",
  177551. NotSucceedsEqual: "\u2AB0\u0338",
  177552. NotSucceedsSlantEqual: "\u22E1",
  177553. NotSucceedsTilde: "\u227F\u0338",
  177554. NotSuperset: "\u2283\u20D2",
  177555. NotSupersetEqual: "\u2289",
  177556. NotTilde: "\u2241",
  177557. NotTildeEqual: "\u2244",
  177558. NotTildeFullEqual: "\u2247",
  177559. NotTildeTilde: "\u2249",
  177560. NotVerticalBar: "\u2224",
  177561. Nscr: "\u{1D4A9}",
  177562. Ntild: "\xD1",
  177563. Ntilde: "\xD1",
  177564. Nu: "\u039D",
  177565. OElig: "\u0152",
  177566. Oacut: "\xD3",
  177567. Oacute: "\xD3",
  177568. Ocir: "\xD4",
  177569. Ocirc: "\xD4",
  177570. Ocy: "\u041E",
  177571. Odblac: "\u0150",
  177572. Ofr: "\u{1D512}",
  177573. Ograv: "\xD2",
  177574. Ograve: "\xD2",
  177575. Omacr: "\u014C",
  177576. Omega: "\u03A9",
  177577. Omicron: "\u039F",
  177578. Oopf: "\u{1D546}",
  177579. OpenCurlyDoubleQuote: "\u201C",
  177580. OpenCurlyQuote: "\u2018",
  177581. Or: "\u2A54",
  177582. Oscr: "\u{1D4AA}",
  177583. Oslas: "\xD8",
  177584. Oslash: "\xD8",
  177585. Otild: "\xD5",
  177586. Otilde: "\xD5",
  177587. Otimes: "\u2A37",
  177588. Oum: "\xD6",
  177589. Ouml: "\xD6",
  177590. OverBar: "\u203E",
  177591. OverBrace: "\u23DE",
  177592. OverBracket: "\u23B4",
  177593. OverParenthesis: "\u23DC",
  177594. PartialD: "\u2202",
  177595. Pcy: "\u041F",
  177596. Pfr: "\u{1D513}",
  177597. Phi: "\u03A6",
  177598. Pi: "\u03A0",
  177599. PlusMinus: "\xB1",
  177600. Poincareplane: "\u210C",
  177601. Popf: "\u2119",
  177602. Pr: "\u2ABB",
  177603. Precedes: "\u227A",
  177604. PrecedesEqual: "\u2AAF",
  177605. PrecedesSlantEqual: "\u227C",
  177606. PrecedesTilde: "\u227E",
  177607. Prime: "\u2033",
  177608. Product: "\u220F",
  177609. Proportion: "\u2237",
  177610. Proportional: "\u221D",
  177611. Pscr: "\u{1D4AB}",
  177612. Psi: "\u03A8",
  177613. QUO: '"',
  177614. QUOT: '"',
  177615. Qfr: "\u{1D514}",
  177616. Qopf: "\u211A",
  177617. Qscr: "\u{1D4AC}",
  177618. RBarr: "\u2910",
  177619. RE: "\xAE",
  177620. REG: "\xAE",
  177621. Racute: "\u0154",
  177622. Rang: "\u27EB",
  177623. Rarr: "\u21A0",
  177624. Rarrtl: "\u2916",
  177625. Rcaron: "\u0158",
  177626. Rcedil: "\u0156",
  177627. Rcy: "\u0420",
  177628. Re: "\u211C",
  177629. ReverseElement: "\u220B",
  177630. ReverseEquilibrium: "\u21CB",
  177631. ReverseUpEquilibrium: "\u296F",
  177632. Rfr: "\u211C",
  177633. Rho: "\u03A1",
  177634. RightAngleBracket: "\u27E9",
  177635. RightArrow: "\u2192",
  177636. RightArrowBar: "\u21E5",
  177637. RightArrowLeftArrow: "\u21C4",
  177638. RightCeiling: "\u2309",
  177639. RightDoubleBracket: "\u27E7",
  177640. RightDownTeeVector: "\u295D",
  177641. RightDownVector: "\u21C2",
  177642. RightDownVectorBar: "\u2955",
  177643. RightFloor: "\u230B",
  177644. RightTee: "\u22A2",
  177645. RightTeeArrow: "\u21A6",
  177646. RightTeeVector: "\u295B",
  177647. RightTriangle: "\u22B3",
  177648. RightTriangleBar: "\u29D0",
  177649. RightTriangleEqual: "\u22B5",
  177650. RightUpDownVector: "\u294F",
  177651. RightUpTeeVector: "\u295C",
  177652. RightUpVector: "\u21BE",
  177653. RightUpVectorBar: "\u2954",
  177654. RightVector: "\u21C0",
  177655. RightVectorBar: "\u2953",
  177656. Rightarrow: "\u21D2",
  177657. Ropf: "\u211D",
  177658. RoundImplies: "\u2970",
  177659. Rrightarrow: "\u21DB",
  177660. Rscr: "\u211B",
  177661. Rsh: "\u21B1",
  177662. RuleDelayed: "\u29F4",
  177663. SHCHcy: "\u0429",
  177664. SHcy: "\u0428",
  177665. SOFTcy: "\u042C",
  177666. Sacute: "\u015A",
  177667. Sc: "\u2ABC",
  177668. Scaron: "\u0160",
  177669. Scedil: "\u015E",
  177670. Scirc: "\u015C",
  177671. Scy: "\u0421",
  177672. Sfr: "\u{1D516}",
  177673. ShortDownArrow: "\u2193",
  177674. ShortLeftArrow: "\u2190",
  177675. ShortRightArrow: "\u2192",
  177676. ShortUpArrow: "\u2191",
  177677. Sigma: "\u03A3",
  177678. SmallCircle: "\u2218",
  177679. Sopf: "\u{1D54A}",
  177680. Sqrt: "\u221A",
  177681. Square: "\u25A1",
  177682. SquareIntersection: "\u2293",
  177683. SquareSubset: "\u228F",
  177684. SquareSubsetEqual: "\u2291",
  177685. SquareSuperset: "\u2290",
  177686. SquareSupersetEqual: "\u2292",
  177687. SquareUnion: "\u2294",
  177688. Sscr: "\u{1D4AE}",
  177689. Star: "\u22C6",
  177690. Sub: "\u22D0",
  177691. Subset: "\u22D0",
  177692. SubsetEqual: "\u2286",
  177693. Succeeds: "\u227B",
  177694. SucceedsEqual: "\u2AB0",
  177695. SucceedsSlantEqual: "\u227D",
  177696. SucceedsTilde: "\u227F",
  177697. SuchThat: "\u220B",
  177698. Sum: "\u2211",
  177699. Sup: "\u22D1",
  177700. Superset: "\u2283",
  177701. SupersetEqual: "\u2287",
  177702. Supset: "\u22D1",
  177703. THOR: "\xDE",
  177704. THORN: "\xDE",
  177705. TRADE: "\u2122",
  177706. TSHcy: "\u040B",
  177707. TScy: "\u0426",
  177708. Tab: " ",
  177709. Tau: "\u03A4",
  177710. Tcaron: "\u0164",
  177711. Tcedil: "\u0162",
  177712. Tcy: "\u0422",
  177713. Tfr: "\u{1D517}",
  177714. Therefore: "\u2234",
  177715. Theta: "\u0398",
  177716. ThickSpace: "\u205F\u200A",
  177717. ThinSpace: "\u2009",
  177718. Tilde: "\u223C",
  177719. TildeEqual: "\u2243",
  177720. TildeFullEqual: "\u2245",
  177721. TildeTilde: "\u2248",
  177722. Topf: "\u{1D54B}",
  177723. TripleDot: "\u20DB",
  177724. Tscr: "\u{1D4AF}",
  177725. Tstrok: "\u0166",
  177726. Uacut: "\xDA",
  177727. Uacute: "\xDA",
  177728. Uarr: "\u219F",
  177729. Uarrocir: "\u2949",
  177730. Ubrcy: "\u040E",
  177731. Ubreve: "\u016C",
  177732. Ucir: "\xDB",
  177733. Ucirc: "\xDB",
  177734. Ucy: "\u0423",
  177735. Udblac: "\u0170",
  177736. Ufr: "\u{1D518}",
  177737. Ugrav: "\xD9",
  177738. Ugrave: "\xD9",
  177739. Umacr: "\u016A",
  177740. UnderBar: "_",
  177741. UnderBrace: "\u23DF",
  177742. UnderBracket: "\u23B5",
  177743. UnderParenthesis: "\u23DD",
  177744. Union: "\u22C3",
  177745. UnionPlus: "\u228E",
  177746. Uogon: "\u0172",
  177747. Uopf: "\u{1D54C}",
  177748. UpArrow: "\u2191",
  177749. UpArrowBar: "\u2912",
  177750. UpArrowDownArrow: "\u21C5",
  177751. UpDownArrow: "\u2195",
  177752. UpEquilibrium: "\u296E",
  177753. UpTee: "\u22A5",
  177754. UpTeeArrow: "\u21A5",
  177755. Uparrow: "\u21D1",
  177756. Updownarrow: "\u21D5",
  177757. UpperLeftArrow: "\u2196",
  177758. UpperRightArrow: "\u2197",
  177759. Upsi: "\u03D2",
  177760. Upsilon: "\u03A5",
  177761. Uring: "\u016E",
  177762. Uscr: "\u{1D4B0}",
  177763. Utilde: "\u0168",
  177764. Uum: "\xDC",
  177765. Uuml: "\xDC",
  177766. VDash: "\u22AB",
  177767. Vbar: "\u2AEB",
  177768. Vcy: "\u0412",
  177769. Vdash: "\u22A9",
  177770. Vdashl: "\u2AE6",
  177771. Vee: "\u22C1",
  177772. Verbar: "\u2016",
  177773. Vert: "\u2016",
  177774. VerticalBar: "\u2223",
  177775. VerticalLine: "|",
  177776. VerticalSeparator: "\u2758",
  177777. VerticalTilde: "\u2240",
  177778. VeryThinSpace: "\u200A",
  177779. Vfr: "\u{1D519}",
  177780. Vopf: "\u{1D54D}",
  177781. Vscr: "\u{1D4B1}",
  177782. Vvdash: "\u22AA",
  177783. Wcirc: "\u0174",
  177784. Wedge: "\u22C0",
  177785. Wfr: "\u{1D51A}",
  177786. Wopf: "\u{1D54E}",
  177787. Wscr: "\u{1D4B2}",
  177788. Xfr: "\u{1D51B}",
  177789. Xi: "\u039E",
  177790. Xopf: "\u{1D54F}",
  177791. Xscr: "\u{1D4B3}",
  177792. YAcy: "\u042F",
  177793. YIcy: "\u0407",
  177794. YUcy: "\u042E",
  177795. Yacut: "\xDD",
  177796. Yacute: "\xDD",
  177797. Ycirc: "\u0176",
  177798. Ycy: "\u042B",
  177799. Yfr: "\u{1D51C}",
  177800. Yopf: "\u{1D550}",
  177801. Yscr: "\u{1D4B4}",
  177802. Yuml: "\u0178",
  177803. ZHcy: "\u0416",
  177804. Zacute: "\u0179",
  177805. Zcaron: "\u017D",
  177806. Zcy: "\u0417",
  177807. Zdot: "\u017B",
  177808. ZeroWidthSpace: "\u200B",
  177809. Zeta: "\u0396",
  177810. Zfr: "\u2128",
  177811. Zopf: "\u2124",
  177812. Zscr: "\u{1D4B5}",
  177813. aacut: "\xE1",
  177814. aacute: "\xE1",
  177815. abreve: "\u0103",
  177816. ac: "\u223E",
  177817. acE: "\u223E\u0333",
  177818. acd: "\u223F",
  177819. acir: "\xE2",
  177820. acirc: "\xE2",
  177821. acut: "\xB4",
  177822. acute: "\xB4",
  177823. acy: "\u0430",
  177824. aeli: "\xE6",
  177825. aelig: "\xE6",
  177826. af: "\u2061",
  177827. afr: "\u{1D51E}",
  177828. agrav: "\xE0",
  177829. agrave: "\xE0",
  177830. alefsym: "\u2135",
  177831. aleph: "\u2135",
  177832. alpha: "\u03B1",
  177833. amacr: "\u0101",
  177834. amalg: "\u2A3F",
  177835. am: "&",
  177836. amp: "&",
  177837. and: "\u2227",
  177838. andand: "\u2A55",
  177839. andd: "\u2A5C",
  177840. andslope: "\u2A58",
  177841. andv: "\u2A5A",
  177842. ang: "\u2220",
  177843. ange: "\u29A4",
  177844. angle: "\u2220",
  177845. angmsd: "\u2221",
  177846. angmsdaa: "\u29A8",
  177847. angmsdab: "\u29A9",
  177848. angmsdac: "\u29AA",
  177849. angmsdad: "\u29AB",
  177850. angmsdae: "\u29AC",
  177851. angmsdaf: "\u29AD",
  177852. angmsdag: "\u29AE",
  177853. angmsdah: "\u29AF",
  177854. angrt: "\u221F",
  177855. angrtvb: "\u22BE",
  177856. angrtvbd: "\u299D",
  177857. angsph: "\u2222",
  177858. angst: "\xC5",
  177859. angzarr: "\u237C",
  177860. aogon: "\u0105",
  177861. aopf: "\u{1D552}",
  177862. ap: "\u2248",
  177863. apE: "\u2A70",
  177864. apacir: "\u2A6F",
  177865. ape: "\u224A",
  177866. apid: "\u224B",
  177867. apos: "'",
  177868. approx: "\u2248",
  177869. approxeq: "\u224A",
  177870. arin: "\xE5",
  177871. aring: "\xE5",
  177872. ascr: "\u{1D4B6}",
  177873. ast: "*",
  177874. asymp: "\u2248",
  177875. asympeq: "\u224D",
  177876. atild: "\xE3",
  177877. atilde: "\xE3",
  177878. aum: "\xE4",
  177879. auml: "\xE4",
  177880. awconint: "\u2233",
  177881. awint: "\u2A11",
  177882. bNot: "\u2AED",
  177883. backcong: "\u224C",
  177884. backepsilon: "\u03F6",
  177885. backprime: "\u2035",
  177886. backsim: "\u223D",
  177887. backsimeq: "\u22CD",
  177888. barvee: "\u22BD",
  177889. barwed: "\u2305",
  177890. barwedge: "\u2305",
  177891. bbrk: "\u23B5",
  177892. bbrktbrk: "\u23B6",
  177893. bcong: "\u224C",
  177894. bcy: "\u0431",
  177895. bdquo: "\u201E",
  177896. becaus: "\u2235",
  177897. because: "\u2235",
  177898. bemptyv: "\u29B0",
  177899. bepsi: "\u03F6",
  177900. bernou: "\u212C",
  177901. beta: "\u03B2",
  177902. beth: "\u2136",
  177903. between: "\u226C",
  177904. bfr: "\u{1D51F}",
  177905. bigcap: "\u22C2",
  177906. bigcirc: "\u25EF",
  177907. bigcup: "\u22C3",
  177908. bigodot: "\u2A00",
  177909. bigoplus: "\u2A01",
  177910. bigotimes: "\u2A02",
  177911. bigsqcup: "\u2A06",
  177912. bigstar: "\u2605",
  177913. bigtriangledown: "\u25BD",
  177914. bigtriangleup: "\u25B3",
  177915. biguplus: "\u2A04",
  177916. bigvee: "\u22C1",
  177917. bigwedge: "\u22C0",
  177918. bkarow: "\u290D",
  177919. blacklozenge: "\u29EB",
  177920. blacksquare: "\u25AA",
  177921. blacktriangle: "\u25B4",
  177922. blacktriangledown: "\u25BE",
  177923. blacktriangleleft: "\u25C2",
  177924. blacktriangleright: "\u25B8",
  177925. blank: "\u2423",
  177926. blk12: "\u2592",
  177927. blk14: "\u2591",
  177928. blk34: "\u2593",
  177929. block: "\u2588",
  177930. bne: "=\u20E5",
  177931. bnequiv: "\u2261\u20E5",
  177932. bnot: "\u2310",
  177933. bopf: "\u{1D553}",
  177934. bot: "\u22A5",
  177935. bottom: "\u22A5",
  177936. bowtie: "\u22C8",
  177937. boxDL: "\u2557",
  177938. boxDR: "\u2554",
  177939. boxDl: "\u2556",
  177940. boxDr: "\u2553",
  177941. boxH: "\u2550",
  177942. boxHD: "\u2566",
  177943. boxHU: "\u2569",
  177944. boxHd: "\u2564",
  177945. boxHu: "\u2567",
  177946. boxUL: "\u255D",
  177947. boxUR: "\u255A",
  177948. boxUl: "\u255C",
  177949. boxUr: "\u2559",
  177950. boxV: "\u2551",
  177951. boxVH: "\u256C",
  177952. boxVL: "\u2563",
  177953. boxVR: "\u2560",
  177954. boxVh: "\u256B",
  177955. boxVl: "\u2562",
  177956. boxVr: "\u255F",
  177957. boxbox: "\u29C9",
  177958. boxdL: "\u2555",
  177959. boxdR: "\u2552",
  177960. boxdl: "\u2510",
  177961. boxdr: "\u250C",
  177962. boxh: "\u2500",
  177963. boxhD: "\u2565",
  177964. boxhU: "\u2568",
  177965. boxhd: "\u252C",
  177966. boxhu: "\u2534",
  177967. boxminus: "\u229F",
  177968. boxplus: "\u229E",
  177969. boxtimes: "\u22A0",
  177970. boxuL: "\u255B",
  177971. boxuR: "\u2558",
  177972. boxul: "\u2518",
  177973. boxur: "\u2514",
  177974. boxv: "\u2502",
  177975. boxvH: "\u256A",
  177976. boxvL: "\u2561",
  177977. boxvR: "\u255E",
  177978. boxvh: "\u253C",
  177979. boxvl: "\u2524",
  177980. boxvr: "\u251C",
  177981. bprime: "\u2035",
  177982. breve: "\u02D8",
  177983. brvba: "\xA6",
  177984. brvbar: "\xA6",
  177985. bscr: "\u{1D4B7}",
  177986. bsemi: "\u204F",
  177987. bsim: "\u223D",
  177988. bsime: "\u22CD",
  177989. bsol: "\\",
  177990. bsolb: "\u29C5",
  177991. bsolhsub: "\u27C8",
  177992. bull: "\u2022",
  177993. bullet: "\u2022",
  177994. bump: "\u224E",
  177995. bumpE: "\u2AAE",
  177996. bumpe: "\u224F",
  177997. bumpeq: "\u224F",
  177998. cacute: "\u0107",
  177999. cap: "\u2229",
  178000. capand: "\u2A44",
  178001. capbrcup: "\u2A49",
  178002. capcap: "\u2A4B",
  178003. capcup: "\u2A47",
  178004. capdot: "\u2A40",
  178005. caps: "\u2229\uFE00",
  178006. caret: "\u2041",
  178007. caron: "\u02C7",
  178008. ccaps: "\u2A4D",
  178009. ccaron: "\u010D",
  178010. ccedi: "\xE7",
  178011. ccedil: "\xE7",
  178012. ccirc: "\u0109",
  178013. ccups: "\u2A4C",
  178014. ccupssm: "\u2A50",
  178015. cdot: "\u010B",
  178016. cedi: "\xB8",
  178017. cedil: "\xB8",
  178018. cemptyv: "\u29B2",
  178019. cen: "\xA2",
  178020. cent: "\xA2",
  178021. centerdot: "\xB7",
  178022. cfr: "\u{1D520}",
  178023. chcy: "\u0447",
  178024. check: "\u2713",
  178025. checkmark: "\u2713",
  178026. chi: "\u03C7",
  178027. cir: "\u25CB",
  178028. cirE: "\u29C3",
  178029. circ: "\u02C6",
  178030. circeq: "\u2257",
  178031. circlearrowleft: "\u21BA",
  178032. circlearrowright: "\u21BB",
  178033. circledR: "\xAE",
  178034. circledS: "\u24C8",
  178035. circledast: "\u229B",
  178036. circledcirc: "\u229A",
  178037. circleddash: "\u229D",
  178038. cire: "\u2257",
  178039. cirfnint: "\u2A10",
  178040. cirmid: "\u2AEF",
  178041. cirscir: "\u29C2",
  178042. clubs: "\u2663",
  178043. clubsuit: "\u2663",
  178044. colon: ":",
  178045. colone: "\u2254",
  178046. coloneq: "\u2254",
  178047. comma: ",",
  178048. commat: "@",
  178049. comp: "\u2201",
  178050. compfn: "\u2218",
  178051. complement: "\u2201",
  178052. complexes: "\u2102",
  178053. cong: "\u2245",
  178054. congdot: "\u2A6D",
  178055. conint: "\u222E",
  178056. copf: "\u{1D554}",
  178057. coprod: "\u2210",
  178058. cop: "\xA9",
  178059. copy: "\xA9",
  178060. copysr: "\u2117",
  178061. crarr: "\u21B5",
  178062. cross: "\u2717",
  178063. cscr: "\u{1D4B8}",
  178064. csub: "\u2ACF",
  178065. csube: "\u2AD1",
  178066. csup: "\u2AD0",
  178067. csupe: "\u2AD2",
  178068. ctdot: "\u22EF",
  178069. cudarrl: "\u2938",
  178070. cudarrr: "\u2935",
  178071. cuepr: "\u22DE",
  178072. cuesc: "\u22DF",
  178073. cularr: "\u21B6",
  178074. cularrp: "\u293D",
  178075. cup: "\u222A",
  178076. cupbrcap: "\u2A48",
  178077. cupcap: "\u2A46",
  178078. cupcup: "\u2A4A",
  178079. cupdot: "\u228D",
  178080. cupor: "\u2A45",
  178081. cups: "\u222A\uFE00",
  178082. curarr: "\u21B7",
  178083. curarrm: "\u293C",
  178084. curlyeqprec: "\u22DE",
  178085. curlyeqsucc: "\u22DF",
  178086. curlyvee: "\u22CE",
  178087. curlywedge: "\u22CF",
  178088. curre: "\xA4",
  178089. curren: "\xA4",
  178090. curvearrowleft: "\u21B6",
  178091. curvearrowright: "\u21B7",
  178092. cuvee: "\u22CE",
  178093. cuwed: "\u22CF",
  178094. cwconint: "\u2232",
  178095. cwint: "\u2231",
  178096. cylcty: "\u232D",
  178097. dArr: "\u21D3",
  178098. dHar: "\u2965",
  178099. dagger: "\u2020",
  178100. daleth: "\u2138",
  178101. darr: "\u2193",
  178102. dash: "\u2010",
  178103. dashv: "\u22A3",
  178104. dbkarow: "\u290F",
  178105. dblac: "\u02DD",
  178106. dcaron: "\u010F",
  178107. dcy: "\u0434",
  178108. dd: "\u2146",
  178109. ddagger: "\u2021",
  178110. ddarr: "\u21CA",
  178111. ddotseq: "\u2A77",
  178112. de: "\xB0",
  178113. deg: "\xB0",
  178114. delta: "\u03B4",
  178115. demptyv: "\u29B1",
  178116. dfisht: "\u297F",
  178117. dfr: "\u{1D521}",
  178118. dharl: "\u21C3",
  178119. dharr: "\u21C2",
  178120. diam: "\u22C4",
  178121. diamond: "\u22C4",
  178122. diamondsuit: "\u2666",
  178123. diams: "\u2666",
  178124. die: "\xA8",
  178125. digamma: "\u03DD",
  178126. disin: "\u22F2",
  178127. div: "\xF7",
  178128. divid: "\xF7",
  178129. divide: "\xF7",
  178130. divideontimes: "\u22C7",
  178131. divonx: "\u22C7",
  178132. djcy: "\u0452",
  178133. dlcorn: "\u231E",
  178134. dlcrop: "\u230D",
  178135. dollar: "$",
  178136. dopf: "\u{1D555}",
  178137. dot: "\u02D9",
  178138. doteq: "\u2250",
  178139. doteqdot: "\u2251",
  178140. dotminus: "\u2238",
  178141. dotplus: "\u2214",
  178142. dotsquare: "\u22A1",
  178143. doublebarwedge: "\u2306",
  178144. downarrow: "\u2193",
  178145. downdownarrows: "\u21CA",
  178146. downharpoonleft: "\u21C3",
  178147. downharpoonright: "\u21C2",
  178148. drbkarow: "\u2910",
  178149. drcorn: "\u231F",
  178150. drcrop: "\u230C",
  178151. dscr: "\u{1D4B9}",
  178152. dscy: "\u0455",
  178153. dsol: "\u29F6",
  178154. dstrok: "\u0111",
  178155. dtdot: "\u22F1",
  178156. dtri: "\u25BF",
  178157. dtrif: "\u25BE",
  178158. duarr: "\u21F5",
  178159. duhar: "\u296F",
  178160. dwangle: "\u29A6",
  178161. dzcy: "\u045F",
  178162. dzigrarr: "\u27FF",
  178163. eDDot: "\u2A77",
  178164. eDot: "\u2251",
  178165. eacut: "\xE9",
  178166. eacute: "\xE9",
  178167. easter: "\u2A6E",
  178168. ecaron: "\u011B",
  178169. ecir: "\xEA",
  178170. ecirc: "\xEA",
  178171. ecolon: "\u2255",
  178172. ecy: "\u044D",
  178173. edot: "\u0117",
  178174. ee: "\u2147",
  178175. efDot: "\u2252",
  178176. efr: "\u{1D522}",
  178177. eg: "\u2A9A",
  178178. egrav: "\xE8",
  178179. egrave: "\xE8",
  178180. egs: "\u2A96",
  178181. egsdot: "\u2A98",
  178182. el: "\u2A99",
  178183. elinters: "\u23E7",
  178184. ell: "\u2113",
  178185. els: "\u2A95",
  178186. elsdot: "\u2A97",
  178187. emacr: "\u0113",
  178188. empty: "\u2205",
  178189. emptyset: "\u2205",
  178190. emptyv: "\u2205",
  178191. emsp13: "\u2004",
  178192. emsp14: "\u2005",
  178193. emsp: "\u2003",
  178194. eng: "\u014B",
  178195. ensp: "\u2002",
  178196. eogon: "\u0119",
  178197. eopf: "\u{1D556}",
  178198. epar: "\u22D5",
  178199. eparsl: "\u29E3",
  178200. eplus: "\u2A71",
  178201. epsi: "\u03B5",
  178202. epsilon: "\u03B5",
  178203. epsiv: "\u03F5",
  178204. eqcirc: "\u2256",
  178205. eqcolon: "\u2255",
  178206. eqsim: "\u2242",
  178207. eqslantgtr: "\u2A96",
  178208. eqslantless: "\u2A95",
  178209. equals: "=",
  178210. equest: "\u225F",
  178211. equiv: "\u2261",
  178212. equivDD: "\u2A78",
  178213. eqvparsl: "\u29E5",
  178214. erDot: "\u2253",
  178215. erarr: "\u2971",
  178216. escr: "\u212F",
  178217. esdot: "\u2250",
  178218. esim: "\u2242",
  178219. eta: "\u03B7",
  178220. et: "\xF0",
  178221. eth: "\xF0",
  178222. eum: "\xEB",
  178223. euml: "\xEB",
  178224. euro: "\u20AC",
  178225. excl: "!",
  178226. exist: "\u2203",
  178227. expectation: "\u2130",
  178228. exponentiale: "\u2147",
  178229. fallingdotseq: "\u2252",
  178230. fcy: "\u0444",
  178231. female: "\u2640",
  178232. ffilig: "\uFB03",
  178233. fflig: "\uFB00",
  178234. ffllig: "\uFB04",
  178235. ffr: "\u{1D523}",
  178236. filig: "\uFB01",
  178237. fjlig: "fj",
  178238. flat: "\u266D",
  178239. fllig: "\uFB02",
  178240. fltns: "\u25B1",
  178241. fnof: "\u0192",
  178242. fopf: "\u{1D557}",
  178243. forall: "\u2200",
  178244. fork: "\u22D4",
  178245. forkv: "\u2AD9",
  178246. fpartint: "\u2A0D",
  178247. frac1: "\xBC",
  178248. frac12: "\xBD",
  178249. frac13: "\u2153",
  178250. frac14: "\xBC",
  178251. frac15: "\u2155",
  178252. frac16: "\u2159",
  178253. frac18: "\u215B",
  178254. frac23: "\u2154",
  178255. frac25: "\u2156",
  178256. frac3: "\xBE",
  178257. frac34: "\xBE",
  178258. frac35: "\u2157",
  178259. frac38: "\u215C",
  178260. frac45: "\u2158",
  178261. frac56: "\u215A",
  178262. frac58: "\u215D",
  178263. frac78: "\u215E",
  178264. frasl: "\u2044",
  178265. frown: "\u2322",
  178266. fscr: "\u{1D4BB}",
  178267. gE: "\u2267",
  178268. gEl: "\u2A8C",
  178269. gacute: "\u01F5",
  178270. gamma: "\u03B3",
  178271. gammad: "\u03DD",
  178272. gap: "\u2A86",
  178273. gbreve: "\u011F",
  178274. gcirc: "\u011D",
  178275. gcy: "\u0433",
  178276. gdot: "\u0121",
  178277. ge: "\u2265",
  178278. gel: "\u22DB",
  178279. geq: "\u2265",
  178280. geqq: "\u2267",
  178281. geqslant: "\u2A7E",
  178282. ges: "\u2A7E",
  178283. gescc: "\u2AA9",
  178284. gesdot: "\u2A80",
  178285. gesdoto: "\u2A82",
  178286. gesdotol: "\u2A84",
  178287. gesl: "\u22DB\uFE00",
  178288. gesles: "\u2A94",
  178289. gfr: "\u{1D524}",
  178290. gg: "\u226B",
  178291. ggg: "\u22D9",
  178292. gimel: "\u2137",
  178293. gjcy: "\u0453",
  178294. gl: "\u2277",
  178295. glE: "\u2A92",
  178296. gla: "\u2AA5",
  178297. glj: "\u2AA4",
  178298. gnE: "\u2269",
  178299. gnap: "\u2A8A",
  178300. gnapprox: "\u2A8A",
  178301. gne: "\u2A88",
  178302. gneq: "\u2A88",
  178303. gneqq: "\u2269",
  178304. gnsim: "\u22E7",
  178305. gopf: "\u{1D558}",
  178306. grave: "`",
  178307. gscr: "\u210A",
  178308. gsim: "\u2273",
  178309. gsime: "\u2A8E",
  178310. gsiml: "\u2A90",
  178311. g: ">",
  178312. gt: ">",
  178313. gtcc: "\u2AA7",
  178314. gtcir: "\u2A7A",
  178315. gtdot: "\u22D7",
  178316. gtlPar: "\u2995",
  178317. gtquest: "\u2A7C",
  178318. gtrapprox: "\u2A86",
  178319. gtrarr: "\u2978",
  178320. gtrdot: "\u22D7",
  178321. gtreqless: "\u22DB",
  178322. gtreqqless: "\u2A8C",
  178323. gtrless: "\u2277",
  178324. gtrsim: "\u2273",
  178325. gvertneqq: "\u2269\uFE00",
  178326. gvnE: "\u2269\uFE00",
  178327. hArr: "\u21D4",
  178328. hairsp: "\u200A",
  178329. half: "\xBD",
  178330. hamilt: "\u210B",
  178331. hardcy: "\u044A",
  178332. harr: "\u2194",
  178333. harrcir: "\u2948",
  178334. harrw: "\u21AD",
  178335. hbar: "\u210F",
  178336. hcirc: "\u0125",
  178337. hearts: "\u2665",
  178338. heartsuit: "\u2665",
  178339. hellip: "\u2026",
  178340. hercon: "\u22B9",
  178341. hfr: "\u{1D525}",
  178342. hksearow: "\u2925",
  178343. hkswarow: "\u2926",
  178344. hoarr: "\u21FF",
  178345. homtht: "\u223B",
  178346. hookleftarrow: "\u21A9",
  178347. hookrightarrow: "\u21AA",
  178348. hopf: "\u{1D559}",
  178349. horbar: "\u2015",
  178350. hscr: "\u{1D4BD}",
  178351. hslash: "\u210F",
  178352. hstrok: "\u0127",
  178353. hybull: "\u2043",
  178354. hyphen: "\u2010",
  178355. iacut: "\xED",
  178356. iacute: "\xED",
  178357. ic: "\u2063",
  178358. icir: "\xEE",
  178359. icirc: "\xEE",
  178360. icy: "\u0438",
  178361. iecy: "\u0435",
  178362. iexc: "\xA1",
  178363. iexcl: "\xA1",
  178364. iff: "\u21D4",
  178365. ifr: "\u{1D526}",
  178366. igrav: "\xEC",
  178367. igrave: "\xEC",
  178368. ii: "\u2148",
  178369. iiiint: "\u2A0C",
  178370. iiint: "\u222D",
  178371. iinfin: "\u29DC",
  178372. iiota: "\u2129",
  178373. ijlig: "\u0133",
  178374. imacr: "\u012B",
  178375. image: "\u2111",
  178376. imagline: "\u2110",
  178377. imagpart: "\u2111",
  178378. imath: "\u0131",
  178379. imof: "\u22B7",
  178380. imped: "\u01B5",
  178381. in: "\u2208",
  178382. incare: "\u2105",
  178383. infin: "\u221E",
  178384. infintie: "\u29DD",
  178385. inodot: "\u0131",
  178386. int: "\u222B",
  178387. intcal: "\u22BA",
  178388. integers: "\u2124",
  178389. intercal: "\u22BA",
  178390. intlarhk: "\u2A17",
  178391. intprod: "\u2A3C",
  178392. iocy: "\u0451",
  178393. iogon: "\u012F",
  178394. iopf: "\u{1D55A}",
  178395. iota: "\u03B9",
  178396. iprod: "\u2A3C",
  178397. iques: "\xBF",
  178398. iquest: "\xBF",
  178399. iscr: "\u{1D4BE}",
  178400. isin: "\u2208",
  178401. isinE: "\u22F9",
  178402. isindot: "\u22F5",
  178403. isins: "\u22F4",
  178404. isinsv: "\u22F3",
  178405. isinv: "\u2208",
  178406. it: "\u2062",
  178407. itilde: "\u0129",
  178408. iukcy: "\u0456",
  178409. ium: "\xEF",
  178410. iuml: "\xEF",
  178411. jcirc: "\u0135",
  178412. jcy: "\u0439",
  178413. jfr: "\u{1D527}",
  178414. jmath: "\u0237",
  178415. jopf: "\u{1D55B}",
  178416. jscr: "\u{1D4BF}",
  178417. jsercy: "\u0458",
  178418. jukcy: "\u0454",
  178419. kappa: "\u03BA",
  178420. kappav: "\u03F0",
  178421. kcedil: "\u0137",
  178422. kcy: "\u043A",
  178423. kfr: "\u{1D528}",
  178424. kgreen: "\u0138",
  178425. khcy: "\u0445",
  178426. kjcy: "\u045C",
  178427. kopf: "\u{1D55C}",
  178428. kscr: "\u{1D4C0}",
  178429. lAarr: "\u21DA",
  178430. lArr: "\u21D0",
  178431. lAtail: "\u291B",
  178432. lBarr: "\u290E",
  178433. lE: "\u2266",
  178434. lEg: "\u2A8B",
  178435. lHar: "\u2962",
  178436. lacute: "\u013A",
  178437. laemptyv: "\u29B4",
  178438. lagran: "\u2112",
  178439. lambda: "\u03BB",
  178440. lang: "\u27E8",
  178441. langd: "\u2991",
  178442. langle: "\u27E8",
  178443. lap: "\u2A85",
  178444. laqu: "\xAB",
  178445. laquo: "\xAB",
  178446. larr: "\u2190",
  178447. larrb: "\u21E4",
  178448. larrbfs: "\u291F",
  178449. larrfs: "\u291D",
  178450. larrhk: "\u21A9",
  178451. larrlp: "\u21AB",
  178452. larrpl: "\u2939",
  178453. larrsim: "\u2973",
  178454. larrtl: "\u21A2",
  178455. lat: "\u2AAB",
  178456. latail: "\u2919",
  178457. late: "\u2AAD",
  178458. lates: "\u2AAD\uFE00",
  178459. lbarr: "\u290C",
  178460. lbbrk: "\u2772",
  178461. lbrace: "{",
  178462. lbrack: "[",
  178463. lbrke: "\u298B",
  178464. lbrksld: "\u298F",
  178465. lbrkslu: "\u298D",
  178466. lcaron: "\u013E",
  178467. lcedil: "\u013C",
  178468. lceil: "\u2308",
  178469. lcub: "{",
  178470. lcy: "\u043B",
  178471. ldca: "\u2936",
  178472. ldquo: "\u201C",
  178473. ldquor: "\u201E",
  178474. ldrdhar: "\u2967",
  178475. ldrushar: "\u294B",
  178476. ldsh: "\u21B2",
  178477. le: "\u2264",
  178478. leftarrow: "\u2190",
  178479. leftarrowtail: "\u21A2",
  178480. leftharpoondown: "\u21BD",
  178481. leftharpoonup: "\u21BC",
  178482. leftleftarrows: "\u21C7",
  178483. leftrightarrow: "\u2194",
  178484. leftrightarrows: "\u21C6",
  178485. leftrightharpoons: "\u21CB",
  178486. leftrightsquigarrow: "\u21AD",
  178487. leftthreetimes: "\u22CB",
  178488. leg: "\u22DA",
  178489. leq: "\u2264",
  178490. leqq: "\u2266",
  178491. leqslant: "\u2A7D",
  178492. les: "\u2A7D",
  178493. lescc: "\u2AA8",
  178494. lesdot: "\u2A7F",
  178495. lesdoto: "\u2A81",
  178496. lesdotor: "\u2A83",
  178497. lesg: "\u22DA\uFE00",
  178498. lesges: "\u2A93",
  178499. lessapprox: "\u2A85",
  178500. lessdot: "\u22D6",
  178501. lesseqgtr: "\u22DA",
  178502. lesseqqgtr: "\u2A8B",
  178503. lessgtr: "\u2276",
  178504. lesssim: "\u2272",
  178505. lfisht: "\u297C",
  178506. lfloor: "\u230A",
  178507. lfr: "\u{1D529}",
  178508. lg: "\u2276",
  178509. lgE: "\u2A91",
  178510. lhard: "\u21BD",
  178511. lharu: "\u21BC",
  178512. lharul: "\u296A",
  178513. lhblk: "\u2584",
  178514. ljcy: "\u0459",
  178515. ll: "\u226A",
  178516. llarr: "\u21C7",
  178517. llcorner: "\u231E",
  178518. llhard: "\u296B",
  178519. lltri: "\u25FA",
  178520. lmidot: "\u0140",
  178521. lmoust: "\u23B0",
  178522. lmoustache: "\u23B0",
  178523. lnE: "\u2268",
  178524. lnap: "\u2A89",
  178525. lnapprox: "\u2A89",
  178526. lne: "\u2A87",
  178527. lneq: "\u2A87",
  178528. lneqq: "\u2268",
  178529. lnsim: "\u22E6",
  178530. loang: "\u27EC",
  178531. loarr: "\u21FD",
  178532. lobrk: "\u27E6",
  178533. longleftarrow: "\u27F5",
  178534. longleftrightarrow: "\u27F7",
  178535. longmapsto: "\u27FC",
  178536. longrightarrow: "\u27F6",
  178537. looparrowleft: "\u21AB",
  178538. looparrowright: "\u21AC",
  178539. lopar: "\u2985",
  178540. lopf: "\u{1D55D}",
  178541. loplus: "\u2A2D",
  178542. lotimes: "\u2A34",
  178543. lowast: "\u2217",
  178544. lowbar: "_",
  178545. loz: "\u25CA",
  178546. lozenge: "\u25CA",
  178547. lozf: "\u29EB",
  178548. lpar: "(",
  178549. lparlt: "\u2993",
  178550. lrarr: "\u21C6",
  178551. lrcorner: "\u231F",
  178552. lrhar: "\u21CB",
  178553. lrhard: "\u296D",
  178554. lrm: "\u200E",
  178555. lrtri: "\u22BF",
  178556. lsaquo: "\u2039",
  178557. lscr: "\u{1D4C1}",
  178558. lsh: "\u21B0",
  178559. lsim: "\u2272",
  178560. lsime: "\u2A8D",
  178561. lsimg: "\u2A8F",
  178562. lsqb: "[",
  178563. lsquo: "\u2018",
  178564. lsquor: "\u201A",
  178565. lstrok: "\u0142",
  178566. l: "<",
  178567. lt: "<",
  178568. ltcc: "\u2AA6",
  178569. ltcir: "\u2A79",
  178570. ltdot: "\u22D6",
  178571. lthree: "\u22CB",
  178572. ltimes: "\u22C9",
  178573. ltlarr: "\u2976",
  178574. ltquest: "\u2A7B",
  178575. ltrPar: "\u2996",
  178576. ltri: "\u25C3",
  178577. ltrie: "\u22B4",
  178578. ltrif: "\u25C2",
  178579. lurdshar: "\u294A",
  178580. luruhar: "\u2966",
  178581. lvertneqq: "\u2268\uFE00",
  178582. lvnE: "\u2268\uFE00",
  178583. mDDot: "\u223A",
  178584. mac: "\xAF",
  178585. macr: "\xAF",
  178586. male: "\u2642",
  178587. malt: "\u2720",
  178588. maltese: "\u2720",
  178589. map: "\u21A6",
  178590. mapsto: "\u21A6",
  178591. mapstodown: "\u21A7",
  178592. mapstoleft: "\u21A4",
  178593. mapstoup: "\u21A5",
  178594. marker: "\u25AE",
  178595. mcomma: "\u2A29",
  178596. mcy: "\u043C",
  178597. mdash: "\u2014",
  178598. measuredangle: "\u2221",
  178599. mfr: "\u{1D52A}",
  178600. mho: "\u2127",
  178601. micr: "\xB5",
  178602. micro: "\xB5",
  178603. mid: "\u2223",
  178604. midast: "*",
  178605. midcir: "\u2AF0",
  178606. middo: "\xB7",
  178607. middot: "\xB7",
  178608. minus: "\u2212",
  178609. minusb: "\u229F",
  178610. minusd: "\u2238",
  178611. minusdu: "\u2A2A",
  178612. mlcp: "\u2ADB",
  178613. mldr: "\u2026",
  178614. mnplus: "\u2213",
  178615. models: "\u22A7",
  178616. mopf: "\u{1D55E}",
  178617. mp: "\u2213",
  178618. mscr: "\u{1D4C2}",
  178619. mstpos: "\u223E",
  178620. mu: "\u03BC",
  178621. multimap: "\u22B8",
  178622. mumap: "\u22B8",
  178623. nGg: "\u22D9\u0338",
  178624. nGt: "\u226B\u20D2",
  178625. nGtv: "\u226B\u0338",
  178626. nLeftarrow: "\u21CD",
  178627. nLeftrightarrow: "\u21CE",
  178628. nLl: "\u22D8\u0338",
  178629. nLt: "\u226A\u20D2",
  178630. nLtv: "\u226A\u0338",
  178631. nRightarrow: "\u21CF",
  178632. nVDash: "\u22AF",
  178633. nVdash: "\u22AE",
  178634. nabla: "\u2207",
  178635. nacute: "\u0144",
  178636. nang: "\u2220\u20D2",
  178637. nap: "\u2249",
  178638. napE: "\u2A70\u0338",
  178639. napid: "\u224B\u0338",
  178640. napos: "\u0149",
  178641. napprox: "\u2249",
  178642. natur: "\u266E",
  178643. natural: "\u266E",
  178644. naturals: "\u2115",
  178645. nbs: "\xA0",
  178646. nbsp: "\xA0",
  178647. nbump: "\u224E\u0338",
  178648. nbumpe: "\u224F\u0338",
  178649. ncap: "\u2A43",
  178650. ncaron: "\u0148",
  178651. ncedil: "\u0146",
  178652. ncong: "\u2247",
  178653. ncongdot: "\u2A6D\u0338",
  178654. ncup: "\u2A42",
  178655. ncy: "\u043D",
  178656. ndash: "\u2013",
  178657. ne: "\u2260",
  178658. neArr: "\u21D7",
  178659. nearhk: "\u2924",
  178660. nearr: "\u2197",
  178661. nearrow: "\u2197",
  178662. nedot: "\u2250\u0338",
  178663. nequiv: "\u2262",
  178664. nesear: "\u2928",
  178665. nesim: "\u2242\u0338",
  178666. nexist: "\u2204",
  178667. nexists: "\u2204",
  178668. nfr: "\u{1D52B}",
  178669. ngE: "\u2267\u0338",
  178670. nge: "\u2271",
  178671. ngeq: "\u2271",
  178672. ngeqq: "\u2267\u0338",
  178673. ngeqslant: "\u2A7E\u0338",
  178674. nges: "\u2A7E\u0338",
  178675. ngsim: "\u2275",
  178676. ngt: "\u226F",
  178677. ngtr: "\u226F",
  178678. nhArr: "\u21CE",
  178679. nharr: "\u21AE",
  178680. nhpar: "\u2AF2",
  178681. ni: "\u220B",
  178682. nis: "\u22FC",
  178683. nisd: "\u22FA",
  178684. niv: "\u220B",
  178685. njcy: "\u045A",
  178686. nlArr: "\u21CD",
  178687. nlE: "\u2266\u0338",
  178688. nlarr: "\u219A",
  178689. nldr: "\u2025",
  178690. nle: "\u2270",
  178691. nleftarrow: "\u219A",
  178692. nleftrightarrow: "\u21AE",
  178693. nleq: "\u2270",
  178694. nleqq: "\u2266\u0338",
  178695. nleqslant: "\u2A7D\u0338",
  178696. nles: "\u2A7D\u0338",
  178697. nless: "\u226E",
  178698. nlsim: "\u2274",
  178699. nlt: "\u226E",
  178700. nltri: "\u22EA",
  178701. nltrie: "\u22EC",
  178702. nmid: "\u2224",
  178703. nopf: "\u{1D55F}",
  178704. no: "\xAC",
  178705. not: "\xAC",
  178706. notin: "\u2209",
  178707. notinE: "\u22F9\u0338",
  178708. notindot: "\u22F5\u0338",
  178709. notinva: "\u2209",
  178710. notinvb: "\u22F7",
  178711. notinvc: "\u22F6",
  178712. notni: "\u220C",
  178713. notniva: "\u220C",
  178714. notnivb: "\u22FE",
  178715. notnivc: "\u22FD",
  178716. npar: "\u2226",
  178717. nparallel: "\u2226",
  178718. nparsl: "\u2AFD\u20E5",
  178719. npart: "\u2202\u0338",
  178720. npolint: "\u2A14",
  178721. npr: "\u2280",
  178722. nprcue: "\u22E0",
  178723. npre: "\u2AAF\u0338",
  178724. nprec: "\u2280",
  178725. npreceq: "\u2AAF\u0338",
  178726. nrArr: "\u21CF",
  178727. nrarr: "\u219B",
  178728. nrarrc: "\u2933\u0338",
  178729. nrarrw: "\u219D\u0338",
  178730. nrightarrow: "\u219B",
  178731. nrtri: "\u22EB",
  178732. nrtrie: "\u22ED",
  178733. nsc: "\u2281",
  178734. nsccue: "\u22E1",
  178735. nsce: "\u2AB0\u0338",
  178736. nscr: "\u{1D4C3}",
  178737. nshortmid: "\u2224",
  178738. nshortparallel: "\u2226",
  178739. nsim: "\u2241",
  178740. nsime: "\u2244",
  178741. nsimeq: "\u2244",
  178742. nsmid: "\u2224",
  178743. nspar: "\u2226",
  178744. nsqsube: "\u22E2",
  178745. nsqsupe: "\u22E3",
  178746. nsub: "\u2284",
  178747. nsubE: "\u2AC5\u0338",
  178748. nsube: "\u2288",
  178749. nsubset: "\u2282\u20D2",
  178750. nsubseteq: "\u2288",
  178751. nsubseteqq: "\u2AC5\u0338",
  178752. nsucc: "\u2281",
  178753. nsucceq: "\u2AB0\u0338",
  178754. nsup: "\u2285",
  178755. nsupE: "\u2AC6\u0338",
  178756. nsupe: "\u2289",
  178757. nsupset: "\u2283\u20D2",
  178758. nsupseteq: "\u2289",
  178759. nsupseteqq: "\u2AC6\u0338",
  178760. ntgl: "\u2279",
  178761. ntild: "\xF1",
  178762. ntilde: "\xF1",
  178763. ntlg: "\u2278",
  178764. ntriangleleft: "\u22EA",
  178765. ntrianglelefteq: "\u22EC",
  178766. ntriangleright: "\u22EB",
  178767. ntrianglerighteq: "\u22ED",
  178768. nu: "\u03BD",
  178769. num: "#",
  178770. numero: "\u2116",
  178771. numsp: "\u2007",
  178772. nvDash: "\u22AD",
  178773. nvHarr: "\u2904",
  178774. nvap: "\u224D\u20D2",
  178775. nvdash: "\u22AC",
  178776. nvge: "\u2265\u20D2",
  178777. nvgt: ">\u20D2",
  178778. nvinfin: "\u29DE",
  178779. nvlArr: "\u2902",
  178780. nvle: "\u2264\u20D2",
  178781. nvlt: "<\u20D2",
  178782. nvltrie: "\u22B4\u20D2",
  178783. nvrArr: "\u2903",
  178784. nvrtrie: "\u22B5\u20D2",
  178785. nvsim: "\u223C\u20D2",
  178786. nwArr: "\u21D6",
  178787. nwarhk: "\u2923",
  178788. nwarr: "\u2196",
  178789. nwarrow: "\u2196",
  178790. nwnear: "\u2927",
  178791. oS: "\u24C8",
  178792. oacut: "\xF3",
  178793. oacute: "\xF3",
  178794. oast: "\u229B",
  178795. ocir: "\xF4",
  178796. ocirc: "\xF4",
  178797. ocy: "\u043E",
  178798. odash: "\u229D",
  178799. odblac: "\u0151",
  178800. odiv: "\u2A38",
  178801. odot: "\u2299",
  178802. odsold: "\u29BC",
  178803. oelig: "\u0153",
  178804. ofcir: "\u29BF",
  178805. ofr: "\u{1D52C}",
  178806. ogon: "\u02DB",
  178807. ograv: "\xF2",
  178808. ograve: "\xF2",
  178809. ogt: "\u29C1",
  178810. ohbar: "\u29B5",
  178811. ohm: "\u03A9",
  178812. oint: "\u222E",
  178813. olarr: "\u21BA",
  178814. olcir: "\u29BE",
  178815. olcross: "\u29BB",
  178816. oline: "\u203E",
  178817. olt: "\u29C0",
  178818. omacr: "\u014D",
  178819. omega: "\u03C9",
  178820. omicron: "\u03BF",
  178821. omid: "\u29B6",
  178822. ominus: "\u2296",
  178823. oopf: "\u{1D560}",
  178824. opar: "\u29B7",
  178825. operp: "\u29B9",
  178826. oplus: "\u2295",
  178827. or: "\u2228",
  178828. orarr: "\u21BB",
  178829. ord: "\xBA",
  178830. order: "\u2134",
  178831. orderof: "\u2134",
  178832. ordf: "\xAA",
  178833. ordm: "\xBA",
  178834. origof: "\u22B6",
  178835. oror: "\u2A56",
  178836. orslope: "\u2A57",
  178837. orv: "\u2A5B",
  178838. oscr: "\u2134",
  178839. oslas: "\xF8",
  178840. oslash: "\xF8",
  178841. osol: "\u2298",
  178842. otild: "\xF5",
  178843. otilde: "\xF5",
  178844. otimes: "\u2297",
  178845. otimesas: "\u2A36",
  178846. oum: "\xF6",
  178847. ouml: "\xF6",
  178848. ovbar: "\u233D",
  178849. par: "\xB6",
  178850. para: "\xB6",
  178851. parallel: "\u2225",
  178852. parsim: "\u2AF3",
  178853. parsl: "\u2AFD",
  178854. part: "\u2202",
  178855. pcy: "\u043F",
  178856. percnt: "%",
  178857. period: ".",
  178858. permil: "\u2030",
  178859. perp: "\u22A5",
  178860. pertenk: "\u2031",
  178861. pfr: "\u{1D52D}",
  178862. phi: "\u03C6",
  178863. phiv: "\u03D5",
  178864. phmmat: "\u2133",
  178865. phone: "\u260E",
  178866. pi: "\u03C0",
  178867. pitchfork: "\u22D4",
  178868. piv: "\u03D6",
  178869. planck: "\u210F",
  178870. planckh: "\u210E",
  178871. plankv: "\u210F",
  178872. plus: "+",
  178873. plusacir: "\u2A23",
  178874. plusb: "\u229E",
  178875. pluscir: "\u2A22",
  178876. plusdo: "\u2214",
  178877. plusdu: "\u2A25",
  178878. pluse: "\u2A72",
  178879. plusm: "\xB1",
  178880. plusmn: "\xB1",
  178881. plussim: "\u2A26",
  178882. plustwo: "\u2A27",
  178883. pm: "\xB1",
  178884. pointint: "\u2A15",
  178885. popf: "\u{1D561}",
  178886. poun: "\xA3",
  178887. pound: "\xA3",
  178888. pr: "\u227A",
  178889. prE: "\u2AB3",
  178890. prap: "\u2AB7",
  178891. prcue: "\u227C",
  178892. pre: "\u2AAF",
  178893. prec: "\u227A",
  178894. precapprox: "\u2AB7",
  178895. preccurlyeq: "\u227C",
  178896. preceq: "\u2AAF",
  178897. precnapprox: "\u2AB9",
  178898. precneqq: "\u2AB5",
  178899. precnsim: "\u22E8",
  178900. precsim: "\u227E",
  178901. prime: "\u2032",
  178902. primes: "\u2119",
  178903. prnE: "\u2AB5",
  178904. prnap: "\u2AB9",
  178905. prnsim: "\u22E8",
  178906. prod: "\u220F",
  178907. profalar: "\u232E",
  178908. profline: "\u2312",
  178909. profsurf: "\u2313",
  178910. prop: "\u221D",
  178911. propto: "\u221D",
  178912. prsim: "\u227E",
  178913. prurel: "\u22B0",
  178914. pscr: "\u{1D4C5}",
  178915. psi: "\u03C8",
  178916. puncsp: "\u2008",
  178917. qfr: "\u{1D52E}",
  178918. qint: "\u2A0C",
  178919. qopf: "\u{1D562}",
  178920. qprime: "\u2057",
  178921. qscr: "\u{1D4C6}",
  178922. quaternions: "\u210D",
  178923. quatint: "\u2A16",
  178924. quest: "?",
  178925. questeq: "\u225F",
  178926. quo: '"',
  178927. quot: '"',
  178928. rAarr: "\u21DB",
  178929. rArr: "\u21D2",
  178930. rAtail: "\u291C",
  178931. rBarr: "\u290F",
  178932. rHar: "\u2964",
  178933. race: "\u223D\u0331",
  178934. racute: "\u0155",
  178935. radic: "\u221A",
  178936. raemptyv: "\u29B3",
  178937. rang: "\u27E9",
  178938. rangd: "\u2992",
  178939. range: "\u29A5",
  178940. rangle: "\u27E9",
  178941. raqu: "\xBB",
  178942. raquo: "\xBB",
  178943. rarr: "\u2192",
  178944. rarrap: "\u2975",
  178945. rarrb: "\u21E5",
  178946. rarrbfs: "\u2920",
  178947. rarrc: "\u2933",
  178948. rarrfs: "\u291E",
  178949. rarrhk: "\u21AA",
  178950. rarrlp: "\u21AC",
  178951. rarrpl: "\u2945",
  178952. rarrsim: "\u2974",
  178953. rarrtl: "\u21A3",
  178954. rarrw: "\u219D",
  178955. ratail: "\u291A",
  178956. ratio: "\u2236",
  178957. rationals: "\u211A",
  178958. rbarr: "\u290D",
  178959. rbbrk: "\u2773",
  178960. rbrace: "}",
  178961. rbrack: "]",
  178962. rbrke: "\u298C",
  178963. rbrksld: "\u298E",
  178964. rbrkslu: "\u2990",
  178965. rcaron: "\u0159",
  178966. rcedil: "\u0157",
  178967. rceil: "\u2309",
  178968. rcub: "}",
  178969. rcy: "\u0440",
  178970. rdca: "\u2937",
  178971. rdldhar: "\u2969",
  178972. rdquo: "\u201D",
  178973. rdquor: "\u201D",
  178974. rdsh: "\u21B3",
  178975. real: "\u211C",
  178976. realine: "\u211B",
  178977. realpart: "\u211C",
  178978. reals: "\u211D",
  178979. rect: "\u25AD",
  178980. re: "\xAE",
  178981. reg: "\xAE",
  178982. rfisht: "\u297D",
  178983. rfloor: "\u230B",
  178984. rfr: "\u{1D52F}",
  178985. rhard: "\u21C1",
  178986. rharu: "\u21C0",
  178987. rharul: "\u296C",
  178988. rho: "\u03C1",
  178989. rhov: "\u03F1",
  178990. rightarrow: "\u2192",
  178991. rightarrowtail: "\u21A3",
  178992. rightharpoondown: "\u21C1",
  178993. rightharpoonup: "\u21C0",
  178994. rightleftarrows: "\u21C4",
  178995. rightleftharpoons: "\u21CC",
  178996. rightrightarrows: "\u21C9",
  178997. rightsquigarrow: "\u219D",
  178998. rightthreetimes: "\u22CC",
  178999. ring: "\u02DA",
  179000. risingdotseq: "\u2253",
  179001. rlarr: "\u21C4",
  179002. rlhar: "\u21CC",
  179003. rlm: "\u200F",
  179004. rmoust: "\u23B1",
  179005. rmoustache: "\u23B1",
  179006. rnmid: "\u2AEE",
  179007. roang: "\u27ED",
  179008. roarr: "\u21FE",
  179009. robrk: "\u27E7",
  179010. ropar: "\u2986",
  179011. ropf: "\u{1D563}",
  179012. roplus: "\u2A2E",
  179013. rotimes: "\u2A35",
  179014. rpar: ")",
  179015. rpargt: "\u2994",
  179016. rppolint: "\u2A12",
  179017. rrarr: "\u21C9",
  179018. rsaquo: "\u203A",
  179019. rscr: "\u{1D4C7}",
  179020. rsh: "\u21B1",
  179021. rsqb: "]",
  179022. rsquo: "\u2019",
  179023. rsquor: "\u2019",
  179024. rthree: "\u22CC",
  179025. rtimes: "\u22CA",
  179026. rtri: "\u25B9",
  179027. rtrie: "\u22B5",
  179028. rtrif: "\u25B8",
  179029. rtriltri: "\u29CE",
  179030. ruluhar: "\u2968",
  179031. rx: "\u211E",
  179032. sacute: "\u015B",
  179033. sbquo: "\u201A",
  179034. sc: "\u227B",
  179035. scE: "\u2AB4",
  179036. scap: "\u2AB8",
  179037. scaron: "\u0161",
  179038. sccue: "\u227D",
  179039. sce: "\u2AB0",
  179040. scedil: "\u015F",
  179041. scirc: "\u015D",
  179042. scnE: "\u2AB6",
  179043. scnap: "\u2ABA",
  179044. scnsim: "\u22E9",
  179045. scpolint: "\u2A13",
  179046. scsim: "\u227F",
  179047. scy: "\u0441",
  179048. sdot: "\u22C5",
  179049. sdotb: "\u22A1",
  179050. sdote: "\u2A66",
  179051. seArr: "\u21D8",
  179052. searhk: "\u2925",
  179053. searr: "\u2198",
  179054. searrow: "\u2198",
  179055. sec: "\xA7",
  179056. sect: "\xA7",
  179057. semi: ";",
  179058. seswar: "\u2929",
  179059. setminus: "\u2216",
  179060. setmn: "\u2216",
  179061. sext: "\u2736",
  179062. sfr: "\u{1D530}",
  179063. sfrown: "\u2322",
  179064. sharp: "\u266F",
  179065. shchcy: "\u0449",
  179066. shcy: "\u0448",
  179067. shortmid: "\u2223",
  179068. shortparallel: "\u2225",
  179069. sh: "\xAD",
  179070. shy: "\xAD",
  179071. sigma: "\u03C3",
  179072. sigmaf: "\u03C2",
  179073. sigmav: "\u03C2",
  179074. sim: "\u223C",
  179075. simdot: "\u2A6A",
  179076. sime: "\u2243",
  179077. simeq: "\u2243",
  179078. simg: "\u2A9E",
  179079. simgE: "\u2AA0",
  179080. siml: "\u2A9D",
  179081. simlE: "\u2A9F",
  179082. simne: "\u2246",
  179083. simplus: "\u2A24",
  179084. simrarr: "\u2972",
  179085. slarr: "\u2190",
  179086. smallsetminus: "\u2216",
  179087. smashp: "\u2A33",
  179088. smeparsl: "\u29E4",
  179089. smid: "\u2223",
  179090. smile: "\u2323",
  179091. smt: "\u2AAA",
  179092. smte: "\u2AAC",
  179093. smtes: "\u2AAC\uFE00",
  179094. softcy: "\u044C",
  179095. sol: "/",
  179096. solb: "\u29C4",
  179097. solbar: "\u233F",
  179098. sopf: "\u{1D564}",
  179099. spades: "\u2660",
  179100. spadesuit: "\u2660",
  179101. spar: "\u2225",
  179102. sqcap: "\u2293",
  179103. sqcaps: "\u2293\uFE00",
  179104. sqcup: "\u2294",
  179105. sqcups: "\u2294\uFE00",
  179106. sqsub: "\u228F",
  179107. sqsube: "\u2291",
  179108. sqsubset: "\u228F",
  179109. sqsubseteq: "\u2291",
  179110. sqsup: "\u2290",
  179111. sqsupe: "\u2292",
  179112. sqsupset: "\u2290",
  179113. sqsupseteq: "\u2292",
  179114. squ: "\u25A1",
  179115. square: "\u25A1",
  179116. squarf: "\u25AA",
  179117. squf: "\u25AA",
  179118. srarr: "\u2192",
  179119. sscr: "\u{1D4C8}",
  179120. ssetmn: "\u2216",
  179121. ssmile: "\u2323",
  179122. sstarf: "\u22C6",
  179123. star: "\u2606",
  179124. starf: "\u2605",
  179125. straightepsilon: "\u03F5",
  179126. straightphi: "\u03D5",
  179127. strns: "\xAF",
  179128. sub: "\u2282",
  179129. subE: "\u2AC5",
  179130. subdot: "\u2ABD",
  179131. sube: "\u2286",
  179132. subedot: "\u2AC3",
  179133. submult: "\u2AC1",
  179134. subnE: "\u2ACB",
  179135. subne: "\u228A",
  179136. subplus: "\u2ABF",
  179137. subrarr: "\u2979",
  179138. subset: "\u2282",
  179139. subseteq: "\u2286",
  179140. subseteqq: "\u2AC5",
  179141. subsetneq: "\u228A",
  179142. subsetneqq: "\u2ACB",
  179143. subsim: "\u2AC7",
  179144. subsub: "\u2AD5",
  179145. subsup: "\u2AD3",
  179146. succ: "\u227B",
  179147. succapprox: "\u2AB8",
  179148. succcurlyeq: "\u227D",
  179149. succeq: "\u2AB0",
  179150. succnapprox: "\u2ABA",
  179151. succneqq: "\u2AB6",
  179152. succnsim: "\u22E9",
  179153. succsim: "\u227F",
  179154. sum: "\u2211",
  179155. sung: "\u266A",
  179156. sup: "\u2283",
  179157. sup1: "\xB9",
  179158. sup2: "\xB2",
  179159. sup3: "\xB3",
  179160. supE: "\u2AC6",
  179161. supdot: "\u2ABE",
  179162. supdsub: "\u2AD8",
  179163. supe: "\u2287",
  179164. supedot: "\u2AC4",
  179165. suphsol: "\u27C9",
  179166. suphsub: "\u2AD7",
  179167. suplarr: "\u297B",
  179168. supmult: "\u2AC2",
  179169. supnE: "\u2ACC",
  179170. supne: "\u228B",
  179171. supplus: "\u2AC0",
  179172. supset: "\u2283",
  179173. supseteq: "\u2287",
  179174. supseteqq: "\u2AC6",
  179175. supsetneq: "\u228B",
  179176. supsetneqq: "\u2ACC",
  179177. supsim: "\u2AC8",
  179178. supsub: "\u2AD4",
  179179. supsup: "\u2AD6",
  179180. swArr: "\u21D9",
  179181. swarhk: "\u2926",
  179182. swarr: "\u2199",
  179183. swarrow: "\u2199",
  179184. swnwar: "\u292A",
  179185. szli: "\xDF",
  179186. szlig: "\xDF",
  179187. target: "\u2316",
  179188. tau: "\u03C4",
  179189. tbrk: "\u23B4",
  179190. tcaron: "\u0165",
  179191. tcedil: "\u0163",
  179192. tcy: "\u0442",
  179193. tdot: "\u20DB",
  179194. telrec: "\u2315",
  179195. tfr: "\u{1D531}",
  179196. there4: "\u2234",
  179197. therefore: "\u2234",
  179198. theta: "\u03B8",
  179199. thetasym: "\u03D1",
  179200. thetav: "\u03D1",
  179201. thickapprox: "\u2248",
  179202. thicksim: "\u223C",
  179203. thinsp: "\u2009",
  179204. thkap: "\u2248",
  179205. thksim: "\u223C",
  179206. thor: "\xFE",
  179207. thorn: "\xFE",
  179208. tilde: "\u02DC",
  179209. time: "\xD7",
  179210. times: "\xD7",
  179211. timesb: "\u22A0",
  179212. timesbar: "\u2A31",
  179213. timesd: "\u2A30",
  179214. tint: "\u222D",
  179215. toea: "\u2928",
  179216. top: "\u22A4",
  179217. topbot: "\u2336",
  179218. topcir: "\u2AF1",
  179219. topf: "\u{1D565}",
  179220. topfork: "\u2ADA",
  179221. tosa: "\u2929",
  179222. tprime: "\u2034",
  179223. trade: "\u2122",
  179224. triangle: "\u25B5",
  179225. triangledown: "\u25BF",
  179226. triangleleft: "\u25C3",
  179227. trianglelefteq: "\u22B4",
  179228. triangleq: "\u225C",
  179229. triangleright: "\u25B9",
  179230. trianglerighteq: "\u22B5",
  179231. tridot: "\u25EC",
  179232. trie: "\u225C",
  179233. triminus: "\u2A3A",
  179234. triplus: "\u2A39",
  179235. trisb: "\u29CD",
  179236. tritime: "\u2A3B",
  179237. trpezium: "\u23E2",
  179238. tscr: "\u{1D4C9}",
  179239. tscy: "\u0446",
  179240. tshcy: "\u045B",
  179241. tstrok: "\u0167",
  179242. twixt: "\u226C",
  179243. twoheadleftarrow: "\u219E",
  179244. twoheadrightarrow: "\u21A0",
  179245. uArr: "\u21D1",
  179246. uHar: "\u2963",
  179247. uacut: "\xFA",
  179248. uacute: "\xFA",
  179249. uarr: "\u2191",
  179250. ubrcy: "\u045E",
  179251. ubreve: "\u016D",
  179252. ucir: "\xFB",
  179253. ucirc: "\xFB",
  179254. ucy: "\u0443",
  179255. udarr: "\u21C5",
  179256. udblac: "\u0171",
  179257. udhar: "\u296E",
  179258. ufisht: "\u297E",
  179259. ufr: "\u{1D532}",
  179260. ugrav: "\xF9",
  179261. ugrave: "\xF9",
  179262. uharl: "\u21BF",
  179263. uharr: "\u21BE",
  179264. uhblk: "\u2580",
  179265. ulcorn: "\u231C",
  179266. ulcorner: "\u231C",
  179267. ulcrop: "\u230F",
  179268. ultri: "\u25F8",
  179269. umacr: "\u016B",
  179270. um: "\xA8",
  179271. uml: "\xA8",
  179272. uogon: "\u0173",
  179273. uopf: "\u{1D566}",
  179274. uparrow: "\u2191",
  179275. updownarrow: "\u2195",
  179276. upharpoonleft: "\u21BF",
  179277. upharpoonright: "\u21BE",
  179278. uplus: "\u228E",
  179279. upsi: "\u03C5",
  179280. upsih: "\u03D2",
  179281. upsilon: "\u03C5",
  179282. upuparrows: "\u21C8",
  179283. urcorn: "\u231D",
  179284. urcorner: "\u231D",
  179285. urcrop: "\u230E",
  179286. uring: "\u016F",
  179287. urtri: "\u25F9",
  179288. uscr: "\u{1D4CA}",
  179289. utdot: "\u22F0",
  179290. utilde: "\u0169",
  179291. utri: "\u25B5",
  179292. utrif: "\u25B4",
  179293. uuarr: "\u21C8",
  179294. uum: "\xFC",
  179295. uuml: "\xFC",
  179296. uwangle: "\u29A7",
  179297. vArr: "\u21D5",
  179298. vBar: "\u2AE8",
  179299. vBarv: "\u2AE9",
  179300. vDash: "\u22A8",
  179301. vangrt: "\u299C",
  179302. varepsilon: "\u03F5",
  179303. varkappa: "\u03F0",
  179304. varnothing: "\u2205",
  179305. varphi: "\u03D5",
  179306. varpi: "\u03D6",
  179307. varpropto: "\u221D",
  179308. varr: "\u2195",
  179309. varrho: "\u03F1",
  179310. varsigma: "\u03C2",
  179311. varsubsetneq: "\u228A\uFE00",
  179312. varsubsetneqq: "\u2ACB\uFE00",
  179313. varsupsetneq: "\u228B\uFE00",
  179314. varsupsetneqq: "\u2ACC\uFE00",
  179315. vartheta: "\u03D1",
  179316. vartriangleleft: "\u22B2",
  179317. vartriangleright: "\u22B3",
  179318. vcy: "\u0432",
  179319. vdash: "\u22A2",
  179320. vee: "\u2228",
  179321. veebar: "\u22BB",
  179322. veeeq: "\u225A",
  179323. vellip: "\u22EE",
  179324. verbar: "|",
  179325. vert: "|",
  179326. vfr: "\u{1D533}",
  179327. vltri: "\u22B2",
  179328. vnsub: "\u2282\u20D2",
  179329. vnsup: "\u2283\u20D2",
  179330. vopf: "\u{1D567}",
  179331. vprop: "\u221D",
  179332. vrtri: "\u22B3",
  179333. vscr: "\u{1D4CB}",
  179334. vsubnE: "\u2ACB\uFE00",
  179335. vsubne: "\u228A\uFE00",
  179336. vsupnE: "\u2ACC\uFE00",
  179337. vsupne: "\u228B\uFE00",
  179338. vzigzag: "\u299A",
  179339. wcirc: "\u0175",
  179340. wedbar: "\u2A5F",
  179341. wedge: "\u2227",
  179342. wedgeq: "\u2259",
  179343. weierp: "\u2118",
  179344. wfr: "\u{1D534}",
  179345. wopf: "\u{1D568}",
  179346. wp: "\u2118",
  179347. wr: "\u2240",
  179348. wreath: "\u2240",
  179349. wscr: "\u{1D4CC}",
  179350. xcap: "\u22C2",
  179351. xcirc: "\u25EF",
  179352. xcup: "\u22C3",
  179353. xdtri: "\u25BD",
  179354. xfr: "\u{1D535}",
  179355. xhArr: "\u27FA",
  179356. xharr: "\u27F7",
  179357. xi: "\u03BE",
  179358. xlArr: "\u27F8",
  179359. xlarr: "\u27F5",
  179360. xmap: "\u27FC",
  179361. xnis: "\u22FB",
  179362. xodot: "\u2A00",
  179363. xopf: "\u{1D569}",
  179364. xoplus: "\u2A01",
  179365. xotime: "\u2A02",
  179366. xrArr: "\u27F9",
  179367. xrarr: "\u27F6",
  179368. xscr: "\u{1D4CD}",
  179369. xsqcup: "\u2A06",
  179370. xuplus: "\u2A04",
  179371. xutri: "\u25B3",
  179372. xvee: "\u22C1",
  179373. xwedge: "\u22C0",
  179374. yacut: "\xFD",
  179375. yacute: "\xFD",
  179376. yacy: "\u044F",
  179377. ycirc: "\u0177",
  179378. ycy: "\u044B",
  179379. ye: "\xA5",
  179380. yen: "\xA5",
  179381. yfr: "\u{1D536}",
  179382. yicy: "\u0457",
  179383. yopf: "\u{1D56A}",
  179384. yscr: "\u{1D4CE}",
  179385. yucy: "\u044E",
  179386. yum: "\xFF",
  179387. yuml: "\xFF",
  179388. zacute: "\u017A",
  179389. zcaron: "\u017E",
  179390. zcy: "\u0437",
  179391. zdot: "\u017C",
  179392. zeetrf: "\u2128",
  179393. zeta: "\u03B6",
  179394. zfr: "\u{1D537}",
  179395. zhcy: "\u0436",
  179396. zigrarr: "\u21DD",
  179397. zopf: "\u{1D56B}",
  179398. zscr: "\u{1D4CF}",
  179399. zwj: "\u200D",
  179400. zwnj: "\u200C"
  179401. };
  179402. // node_modules/decode-named-character-reference/index.js
  179403. var own5 = {}.hasOwnProperty;
  179404. function decodeNamedCharacterReference(value) {
  179405. return own5.call(characterEntities, value) ? characterEntities[value] : false;
  179406. }
  179407. // node_modules/micromark-core-commonmark/lib/character-reference.js
  179408. var characterReference = {
  179409. name: "characterReference",
  179410. tokenize: tokenizeCharacterReference
  179411. };
  179412. function tokenizeCharacterReference(effects, ok2, nok) {
  179413. const self2 = this;
  179414. let size = 0;
  179415. let max;
  179416. let test;
  179417. return start3;
  179418. function start3(code2) {
  179419. effects.enter("characterReference");
  179420. effects.enter("characterReferenceMarker");
  179421. effects.consume(code2);
  179422. effects.exit("characterReferenceMarker");
  179423. return open;
  179424. }
  179425. function open(code2) {
  179426. if (code2 === 35) {
  179427. effects.enter("characterReferenceMarkerNumeric");
  179428. effects.consume(code2);
  179429. effects.exit("characterReferenceMarkerNumeric");
  179430. return numeric;
  179431. }
  179432. effects.enter("characterReferenceValue");
  179433. max = 31;
  179434. test = asciiAlphanumeric;
  179435. return value(code2);
  179436. }
  179437. function numeric(code2) {
  179438. if (code2 === 88 || code2 === 120) {
  179439. effects.enter("characterReferenceMarkerHexadecimal");
  179440. effects.consume(code2);
  179441. effects.exit("characterReferenceMarkerHexadecimal");
  179442. effects.enter("characterReferenceValue");
  179443. max = 6;
  179444. test = asciiHexDigit;
  179445. return value;
  179446. }
  179447. effects.enter("characterReferenceValue");
  179448. max = 7;
  179449. test = asciiDigit;
  179450. return value(code2);
  179451. }
  179452. function value(code2) {
  179453. let token;
  179454. if (code2 === 59 && size) {
  179455. token = effects.exit("characterReferenceValue");
  179456. if (test === asciiAlphanumeric && !decodeNamedCharacterReference(self2.sliceSerialize(token))) {
  179457. return nok(code2);
  179458. }
  179459. effects.enter("characterReferenceMarker");
  179460. effects.consume(code2);
  179461. effects.exit("characterReferenceMarker");
  179462. effects.exit("characterReference");
  179463. return ok2;
  179464. }
  179465. if (test(code2) && size++ < max) {
  179466. effects.consume(code2);
  179467. return value;
  179468. }
  179469. return nok(code2);
  179470. }
  179471. }
  179472. // node_modules/micromark-core-commonmark/lib/code-fenced.js
  179473. var codeFenced = {
  179474. name: "codeFenced",
  179475. tokenize: tokenizeCodeFenced,
  179476. concrete: true
  179477. };
  179478. function tokenizeCodeFenced(effects, ok2, nok) {
  179479. const self2 = this;
  179480. const closingFenceConstruct = {
  179481. tokenize: tokenizeClosingFence,
  179482. partial: true
  179483. };
  179484. const nonLazyLine = {
  179485. tokenize: tokenizeNonLazyLine,
  179486. partial: true
  179487. };
  179488. const tail = this.events[this.events.length - 1];
  179489. const initialPrefix = tail && tail[1].type === "linePrefix" ? tail[2].sliceSerialize(tail[1], true).length : 0;
  179490. let sizeOpen = 0;
  179491. let marker;
  179492. return start3;
  179493. function start3(code2) {
  179494. effects.enter("codeFenced");
  179495. effects.enter("codeFencedFence");
  179496. effects.enter("codeFencedFenceSequence");
  179497. marker = code2;
  179498. return sequenceOpen(code2);
  179499. }
  179500. function sequenceOpen(code2) {
  179501. if (code2 === marker) {
  179502. effects.consume(code2);
  179503. sizeOpen++;
  179504. return sequenceOpen;
  179505. }
  179506. effects.exit("codeFencedFenceSequence");
  179507. return sizeOpen < 3 ? nok(code2) : factorySpace(effects, infoOpen, "whitespace")(code2);
  179508. }
  179509. function infoOpen(code2) {
  179510. if (code2 === null || markdownLineEnding(code2)) {
  179511. return openAfter(code2);
  179512. }
  179513. effects.enter("codeFencedFenceInfo");
  179514. effects.enter("chunkString", {
  179515. contentType: "string"
  179516. });
  179517. return info(code2);
  179518. }
  179519. function info(code2) {
  179520. if (code2 === null || markdownLineEndingOrSpace(code2)) {
  179521. effects.exit("chunkString");
  179522. effects.exit("codeFencedFenceInfo");
  179523. return factorySpace(effects, infoAfter, "whitespace")(code2);
  179524. }
  179525. if (code2 === 96 && code2 === marker)
  179526. return nok(code2);
  179527. effects.consume(code2);
  179528. return info;
  179529. }
  179530. function infoAfter(code2) {
  179531. if (code2 === null || markdownLineEnding(code2)) {
  179532. return openAfter(code2);
  179533. }
  179534. effects.enter("codeFencedFenceMeta");
  179535. effects.enter("chunkString", {
  179536. contentType: "string"
  179537. });
  179538. return meta(code2);
  179539. }
  179540. function meta(code2) {
  179541. if (code2 === null || markdownLineEnding(code2)) {
  179542. effects.exit("chunkString");
  179543. effects.exit("codeFencedFenceMeta");
  179544. return openAfter(code2);
  179545. }
  179546. if (code2 === 96 && code2 === marker)
  179547. return nok(code2);
  179548. effects.consume(code2);
  179549. return meta;
  179550. }
  179551. function openAfter(code2) {
  179552. effects.exit("codeFencedFence");
  179553. return self2.interrupt ? ok2(code2) : contentStart(code2);
  179554. }
  179555. function contentStart(code2) {
  179556. if (code2 === null) {
  179557. return after(code2);
  179558. }
  179559. if (markdownLineEnding(code2)) {
  179560. return effects.attempt(
  179561. nonLazyLine,
  179562. effects.attempt(
  179563. closingFenceConstruct,
  179564. after,
  179565. initialPrefix ? factorySpace(
  179566. effects,
  179567. contentStart,
  179568. "linePrefix",
  179569. initialPrefix + 1
  179570. ) : contentStart
  179571. ),
  179572. after
  179573. )(code2);
  179574. }
  179575. effects.enter("codeFlowValue");
  179576. return contentContinue(code2);
  179577. }
  179578. function contentContinue(code2) {
  179579. if (code2 === null || markdownLineEnding(code2)) {
  179580. effects.exit("codeFlowValue");
  179581. return contentStart(code2);
  179582. }
  179583. effects.consume(code2);
  179584. return contentContinue;
  179585. }
  179586. function after(code2) {
  179587. effects.exit("codeFenced");
  179588. return ok2(code2);
  179589. }
  179590. function tokenizeNonLazyLine(effects2, ok3, nok2) {
  179591. const self3 = this;
  179592. return start4;
  179593. function start4(code2) {
  179594. effects2.enter("lineEnding");
  179595. effects2.consume(code2);
  179596. effects2.exit("lineEnding");
  179597. return lineStart;
  179598. }
  179599. function lineStart(code2) {
  179600. return self3.parser.lazy[self3.now().line] ? nok2(code2) : ok3(code2);
  179601. }
  179602. }
  179603. function tokenizeClosingFence(effects2, ok3, nok2) {
  179604. let size = 0;
  179605. return factorySpace(
  179606. effects2,
  179607. closingSequenceStart,
  179608. "linePrefix",
  179609. this.parser.constructs.disable.null.includes("codeIndented") ? void 0 : 4
  179610. );
  179611. function closingSequenceStart(code2) {
  179612. effects2.enter("codeFencedFence");
  179613. effects2.enter("codeFencedFenceSequence");
  179614. return closingSequence(code2);
  179615. }
  179616. function closingSequence(code2) {
  179617. if (code2 === marker) {
  179618. effects2.consume(code2);
  179619. size++;
  179620. return closingSequence;
  179621. }
  179622. if (size < sizeOpen)
  179623. return nok2(code2);
  179624. effects2.exit("codeFencedFenceSequence");
  179625. return factorySpace(effects2, closingSequenceEnd, "whitespace")(code2);
  179626. }
  179627. function closingSequenceEnd(code2) {
  179628. if (code2 === null || markdownLineEnding(code2)) {
  179629. effects2.exit("codeFencedFence");
  179630. return ok3(code2);
  179631. }
  179632. return nok2(code2);
  179633. }
  179634. }
  179635. }
  179636. // node_modules/micromark-core-commonmark/lib/code-indented.js
  179637. var codeIndented = {
  179638. name: "codeIndented",
  179639. tokenize: tokenizeCodeIndented
  179640. };
  179641. var indentedContent = {
  179642. tokenize: tokenizeIndentedContent,
  179643. partial: true
  179644. };
  179645. function tokenizeCodeIndented(effects, ok2, nok) {
  179646. const self2 = this;
  179647. return start3;
  179648. function start3(code2) {
  179649. effects.enter("codeIndented");
  179650. return factorySpace(effects, afterStartPrefix, "linePrefix", 4 + 1)(code2);
  179651. }
  179652. function afterStartPrefix(code2) {
  179653. const tail = self2.events[self2.events.length - 1];
  179654. return tail && tail[1].type === "linePrefix" && tail[2].sliceSerialize(tail[1], true).length >= 4 ? afterPrefix(code2) : nok(code2);
  179655. }
  179656. function afterPrefix(code2) {
  179657. if (code2 === null) {
  179658. return after(code2);
  179659. }
  179660. if (markdownLineEnding(code2)) {
  179661. return effects.attempt(indentedContent, afterPrefix, after)(code2);
  179662. }
  179663. effects.enter("codeFlowValue");
  179664. return content3(code2);
  179665. }
  179666. function content3(code2) {
  179667. if (code2 === null || markdownLineEnding(code2)) {
  179668. effects.exit("codeFlowValue");
  179669. return afterPrefix(code2);
  179670. }
  179671. effects.consume(code2);
  179672. return content3;
  179673. }
  179674. function after(code2) {
  179675. effects.exit("codeIndented");
  179676. return ok2(code2);
  179677. }
  179678. }
  179679. function tokenizeIndentedContent(effects, ok2, nok) {
  179680. const self2 = this;
  179681. return start3;
  179682. function start3(code2) {
  179683. if (self2.parser.lazy[self2.now().line]) {
  179684. return nok(code2);
  179685. }
  179686. if (markdownLineEnding(code2)) {
  179687. effects.enter("lineEnding");
  179688. effects.consume(code2);
  179689. effects.exit("lineEnding");
  179690. return start3;
  179691. }
  179692. return factorySpace(effects, afterPrefix, "linePrefix", 4 + 1)(code2);
  179693. }
  179694. function afterPrefix(code2) {
  179695. const tail = self2.events[self2.events.length - 1];
  179696. return tail && tail[1].type === "linePrefix" && tail[2].sliceSerialize(tail[1], true).length >= 4 ? ok2(code2) : markdownLineEnding(code2) ? start3(code2) : nok(code2);
  179697. }
  179698. }
  179699. // node_modules/micromark-core-commonmark/lib/code-text.js
  179700. var codeText = {
  179701. name: "codeText",
  179702. tokenize: tokenizeCodeText,
  179703. resolve: resolveCodeText,
  179704. previous
  179705. };
  179706. function resolveCodeText(events) {
  179707. let tailExitIndex = events.length - 4;
  179708. let headEnterIndex = 3;
  179709. let index2;
  179710. let enter;
  179711. if ((events[headEnterIndex][1].type === "lineEnding" || events[headEnterIndex][1].type === "space") && (events[tailExitIndex][1].type === "lineEnding" || events[tailExitIndex][1].type === "space")) {
  179712. index2 = headEnterIndex;
  179713. while (++index2 < tailExitIndex) {
  179714. if (events[index2][1].type === "codeTextData") {
  179715. events[headEnterIndex][1].type = "codeTextPadding";
  179716. events[tailExitIndex][1].type = "codeTextPadding";
  179717. headEnterIndex += 2;
  179718. tailExitIndex -= 2;
  179719. break;
  179720. }
  179721. }
  179722. }
  179723. index2 = headEnterIndex - 1;
  179724. tailExitIndex++;
  179725. while (++index2 <= tailExitIndex) {
  179726. if (enter === void 0) {
  179727. if (index2 !== tailExitIndex && events[index2][1].type !== "lineEnding") {
  179728. enter = index2;
  179729. }
  179730. } else if (index2 === tailExitIndex || events[index2][1].type === "lineEnding") {
  179731. events[enter][1].type = "codeTextData";
  179732. if (index2 !== enter + 2) {
  179733. events[enter][1].end = events[index2 - 1][1].end;
  179734. events.splice(enter + 2, index2 - enter - 2);
  179735. tailExitIndex -= index2 - enter - 2;
  179736. index2 = enter + 2;
  179737. }
  179738. enter = void 0;
  179739. }
  179740. }
  179741. return events;
  179742. }
  179743. function previous(code2) {
  179744. return code2 !== 96 || this.events[this.events.length - 1][1].type === "characterEscape";
  179745. }
  179746. function tokenizeCodeText(effects, ok2, nok) {
  179747. const self2 = this;
  179748. let sizeOpen = 0;
  179749. let size;
  179750. let token;
  179751. return start3;
  179752. function start3(code2) {
  179753. effects.enter("codeText");
  179754. effects.enter("codeTextSequence");
  179755. return openingSequence(code2);
  179756. }
  179757. function openingSequence(code2) {
  179758. if (code2 === 96) {
  179759. effects.consume(code2);
  179760. sizeOpen++;
  179761. return openingSequence;
  179762. }
  179763. effects.exit("codeTextSequence");
  179764. return gap(code2);
  179765. }
  179766. function gap(code2) {
  179767. if (code2 === null) {
  179768. return nok(code2);
  179769. }
  179770. if (code2 === 96) {
  179771. token = effects.enter("codeTextSequence");
  179772. size = 0;
  179773. return closingSequence(code2);
  179774. }
  179775. if (code2 === 32) {
  179776. effects.enter("space");
  179777. effects.consume(code2);
  179778. effects.exit("space");
  179779. return gap;
  179780. }
  179781. if (markdownLineEnding(code2)) {
  179782. effects.enter("lineEnding");
  179783. effects.consume(code2);
  179784. effects.exit("lineEnding");
  179785. return gap;
  179786. }
  179787. effects.enter("codeTextData");
  179788. return data2(code2);
  179789. }
  179790. function data2(code2) {
  179791. if (code2 === null || code2 === 32 || code2 === 96 || markdownLineEnding(code2)) {
  179792. effects.exit("codeTextData");
  179793. return gap(code2);
  179794. }
  179795. effects.consume(code2);
  179796. return data2;
  179797. }
  179798. function closingSequence(code2) {
  179799. if (code2 === 96) {
  179800. effects.consume(code2);
  179801. size++;
  179802. return closingSequence;
  179803. }
  179804. if (size === sizeOpen) {
  179805. effects.exit("codeTextSequence");
  179806. effects.exit("codeText");
  179807. return ok2(code2);
  179808. }
  179809. token.type = "codeTextData";
  179810. return data2(code2);
  179811. }
  179812. }
  179813. // node_modules/micromark-util-subtokenize/index.js
  179814. function subtokenize(events) {
  179815. const jumps = {};
  179816. let index2 = -1;
  179817. let event;
  179818. let lineIndex;
  179819. let otherIndex;
  179820. let otherEvent;
  179821. let parameters;
  179822. let subevents;
  179823. let more;
  179824. while (++index2 < events.length) {
  179825. while (index2 in jumps) {
  179826. index2 = jumps[index2];
  179827. }
  179828. event = events[index2];
  179829. if (index2 && event[1].type === "chunkFlow" && events[index2 - 1][1].type === "listItemPrefix") {
  179830. subevents = event[1]._tokenizer.events;
  179831. otherIndex = 0;
  179832. if (otherIndex < subevents.length && subevents[otherIndex][1].type === "lineEndingBlank") {
  179833. otherIndex += 2;
  179834. }
  179835. if (otherIndex < subevents.length && subevents[otherIndex][1].type === "content") {
  179836. while (++otherIndex < subevents.length) {
  179837. if (subevents[otherIndex][1].type === "content") {
  179838. break;
  179839. }
  179840. if (subevents[otherIndex][1].type === "chunkText") {
  179841. subevents[otherIndex][1]._isInFirstContentOfListItem = true;
  179842. otherIndex++;
  179843. }
  179844. }
  179845. }
  179846. }
  179847. if (event[0] === "enter") {
  179848. if (event[1].contentType) {
  179849. Object.assign(jumps, subcontent(events, index2));
  179850. index2 = jumps[index2];
  179851. more = true;
  179852. }
  179853. } else if (event[1]._container) {
  179854. otherIndex = index2;
  179855. lineIndex = void 0;
  179856. while (otherIndex--) {
  179857. otherEvent = events[otherIndex];
  179858. if (otherEvent[1].type === "lineEnding" || otherEvent[1].type === "lineEndingBlank") {
  179859. if (otherEvent[0] === "enter") {
  179860. if (lineIndex) {
  179861. events[lineIndex][1].type = "lineEndingBlank";
  179862. }
  179863. otherEvent[1].type = "lineEnding";
  179864. lineIndex = otherIndex;
  179865. }
  179866. } else {
  179867. break;
  179868. }
  179869. }
  179870. if (lineIndex) {
  179871. event[1].end = Object.assign({}, events[lineIndex][1].start);
  179872. parameters = events.slice(lineIndex, index2);
  179873. parameters.unshift(event);
  179874. splice(events, lineIndex, index2 - lineIndex + 1, parameters);
  179875. }
  179876. }
  179877. }
  179878. return !more;
  179879. }
  179880. function subcontent(events, eventIndex) {
  179881. const token = events[eventIndex][1];
  179882. const context = events[eventIndex][2];
  179883. let startPosition = eventIndex - 1;
  179884. const startPositions = [];
  179885. const tokenizer2 = token._tokenizer || context.parser[token.contentType](token.start);
  179886. const childEvents = tokenizer2.events;
  179887. const jumps = [];
  179888. const gaps = {};
  179889. let stream;
  179890. let previous2;
  179891. let index2 = -1;
  179892. let current2 = token;
  179893. let adjust = 0;
  179894. let start3 = 0;
  179895. const breaks = [start3];
  179896. while (current2) {
  179897. while (events[++startPosition][1] !== current2) {
  179898. }
  179899. startPositions.push(startPosition);
  179900. if (!current2._tokenizer) {
  179901. stream = context.sliceStream(current2);
  179902. if (!current2.next) {
  179903. stream.push(null);
  179904. }
  179905. if (previous2) {
  179906. tokenizer2.defineSkip(current2.start);
  179907. }
  179908. if (current2._isInFirstContentOfListItem) {
  179909. tokenizer2._gfmTasklistFirstContentOfListItem = true;
  179910. }
  179911. tokenizer2.write(stream);
  179912. if (current2._isInFirstContentOfListItem) {
  179913. tokenizer2._gfmTasklistFirstContentOfListItem = void 0;
  179914. }
  179915. }
  179916. previous2 = current2;
  179917. current2 = current2.next;
  179918. }
  179919. current2 = token;
  179920. while (++index2 < childEvents.length) {
  179921. if (childEvents[index2][0] === "exit" && childEvents[index2 - 1][0] === "enter" && childEvents[index2][1].type === childEvents[index2 - 1][1].type && childEvents[index2][1].start.line !== childEvents[index2][1].end.line) {
  179922. start3 = index2 + 1;
  179923. breaks.push(start3);
  179924. current2._tokenizer = void 0;
  179925. current2.previous = void 0;
  179926. current2 = current2.next;
  179927. }
  179928. }
  179929. tokenizer2.events = [];
  179930. if (current2) {
  179931. current2._tokenizer = void 0;
  179932. current2.previous = void 0;
  179933. } else {
  179934. breaks.pop();
  179935. }
  179936. index2 = breaks.length;
  179937. while (index2--) {
  179938. const slice2 = childEvents.slice(breaks[index2], breaks[index2 + 1]);
  179939. const start4 = startPositions.pop();
  179940. jumps.unshift([start4, start4 + slice2.length - 1]);
  179941. splice(events, start4, 2, slice2);
  179942. }
  179943. index2 = -1;
  179944. while (++index2 < jumps.length) {
  179945. gaps[adjust + jumps[index2][0]] = adjust + jumps[index2][1];
  179946. adjust += jumps[index2][1] - jumps[index2][0] - 1;
  179947. }
  179948. return gaps;
  179949. }
  179950. // node_modules/micromark-core-commonmark/lib/content.js
  179951. var content = {
  179952. tokenize: tokenizeContent,
  179953. resolve: resolveContent
  179954. };
  179955. var continuationConstruct = {
  179956. tokenize: tokenizeContinuation,
  179957. partial: true
  179958. };
  179959. function resolveContent(events) {
  179960. subtokenize(events);
  179961. return events;
  179962. }
  179963. function tokenizeContent(effects, ok2) {
  179964. let previous2;
  179965. return start3;
  179966. function start3(code2) {
  179967. effects.enter("content");
  179968. previous2 = effects.enter("chunkContent", {
  179969. contentType: "content"
  179970. });
  179971. return data2(code2);
  179972. }
  179973. function data2(code2) {
  179974. if (code2 === null) {
  179975. return contentEnd(code2);
  179976. }
  179977. if (markdownLineEnding(code2)) {
  179978. return effects.check(
  179979. continuationConstruct,
  179980. contentContinue,
  179981. contentEnd
  179982. )(code2);
  179983. }
  179984. effects.consume(code2);
  179985. return data2;
  179986. }
  179987. function contentEnd(code2) {
  179988. effects.exit("chunkContent");
  179989. effects.exit("content");
  179990. return ok2(code2);
  179991. }
  179992. function contentContinue(code2) {
  179993. effects.consume(code2);
  179994. effects.exit("chunkContent");
  179995. previous2.next = effects.enter("chunkContent", {
  179996. contentType: "content",
  179997. previous: previous2
  179998. });
  179999. previous2 = previous2.next;
  180000. return data2;
  180001. }
  180002. }
  180003. function tokenizeContinuation(effects, ok2, nok) {
  180004. const self2 = this;
  180005. return startLookahead;
  180006. function startLookahead(code2) {
  180007. effects.exit("chunkContent");
  180008. effects.enter("lineEnding");
  180009. effects.consume(code2);
  180010. effects.exit("lineEnding");
  180011. return factorySpace(effects, prefixed, "linePrefix");
  180012. }
  180013. function prefixed(code2) {
  180014. if (code2 === null || markdownLineEnding(code2)) {
  180015. return nok(code2);
  180016. }
  180017. const tail = self2.events[self2.events.length - 1];
  180018. if (!self2.parser.constructs.disable.null.includes("codeIndented") && tail && tail[1].type === "linePrefix" && tail[2].sliceSerialize(tail[1], true).length >= 4) {
  180019. return ok2(code2);
  180020. }
  180021. return effects.interrupt(self2.parser.constructs.flow, nok, ok2)(code2);
  180022. }
  180023. }
  180024. // node_modules/micromark-factory-destination/index.js
  180025. function factoryDestination(effects, ok2, nok, type, literalType, literalMarkerType, rawType, stringType, max) {
  180026. const limit = max || Number.POSITIVE_INFINITY;
  180027. let balance = 0;
  180028. return start3;
  180029. function start3(code2) {
  180030. if (code2 === 60) {
  180031. effects.enter(type);
  180032. effects.enter(literalType);
  180033. effects.enter(literalMarkerType);
  180034. effects.consume(code2);
  180035. effects.exit(literalMarkerType);
  180036. return destinationEnclosedBefore;
  180037. }
  180038. if (code2 === null || code2 === 41 || asciiControl(code2)) {
  180039. return nok(code2);
  180040. }
  180041. effects.enter(type);
  180042. effects.enter(rawType);
  180043. effects.enter(stringType);
  180044. effects.enter("chunkString", {
  180045. contentType: "string"
  180046. });
  180047. return destinationRaw(code2);
  180048. }
  180049. function destinationEnclosedBefore(code2) {
  180050. if (code2 === 62) {
  180051. effects.enter(literalMarkerType);
  180052. effects.consume(code2);
  180053. effects.exit(literalMarkerType);
  180054. effects.exit(literalType);
  180055. effects.exit(type);
  180056. return ok2;
  180057. }
  180058. effects.enter(stringType);
  180059. effects.enter("chunkString", {
  180060. contentType: "string"
  180061. });
  180062. return destinationEnclosed(code2);
  180063. }
  180064. function destinationEnclosed(code2) {
  180065. if (code2 === 62) {
  180066. effects.exit("chunkString");
  180067. effects.exit(stringType);
  180068. return destinationEnclosedBefore(code2);
  180069. }
  180070. if (code2 === null || code2 === 60 || markdownLineEnding(code2)) {
  180071. return nok(code2);
  180072. }
  180073. effects.consume(code2);
  180074. return code2 === 92 ? destinationEnclosedEscape : destinationEnclosed;
  180075. }
  180076. function destinationEnclosedEscape(code2) {
  180077. if (code2 === 60 || code2 === 62 || code2 === 92) {
  180078. effects.consume(code2);
  180079. return destinationEnclosed;
  180080. }
  180081. return destinationEnclosed(code2);
  180082. }
  180083. function destinationRaw(code2) {
  180084. if (code2 === 40) {
  180085. if (++balance > limit)
  180086. return nok(code2);
  180087. effects.consume(code2);
  180088. return destinationRaw;
  180089. }
  180090. if (code2 === 41) {
  180091. if (!balance--) {
  180092. effects.exit("chunkString");
  180093. effects.exit(stringType);
  180094. effects.exit(rawType);
  180095. effects.exit(type);
  180096. return ok2(code2);
  180097. }
  180098. effects.consume(code2);
  180099. return destinationRaw;
  180100. }
  180101. if (code2 === null || markdownLineEndingOrSpace(code2)) {
  180102. if (balance)
  180103. return nok(code2);
  180104. effects.exit("chunkString");
  180105. effects.exit(stringType);
  180106. effects.exit(rawType);
  180107. effects.exit(type);
  180108. return ok2(code2);
  180109. }
  180110. if (asciiControl(code2))
  180111. return nok(code2);
  180112. effects.consume(code2);
  180113. return code2 === 92 ? destinationRawEscape : destinationRaw;
  180114. }
  180115. function destinationRawEscape(code2) {
  180116. if (code2 === 40 || code2 === 41 || code2 === 92) {
  180117. effects.consume(code2);
  180118. return destinationRaw;
  180119. }
  180120. return destinationRaw(code2);
  180121. }
  180122. }
  180123. // node_modules/micromark-factory-label/index.js
  180124. function factoryLabel(effects, ok2, nok, type, markerType, stringType) {
  180125. const self2 = this;
  180126. let size = 0;
  180127. let data2;
  180128. return start3;
  180129. function start3(code2) {
  180130. effects.enter(type);
  180131. effects.enter(markerType);
  180132. effects.consume(code2);
  180133. effects.exit(markerType);
  180134. effects.enter(stringType);
  180135. return atBreak;
  180136. }
  180137. function atBreak(code2) {
  180138. if (code2 === null || code2 === 91 || code2 === 93 && !data2 || code2 === 94 && !size && "_hiddenFootnoteSupport" in self2.parser.constructs || size > 999) {
  180139. return nok(code2);
  180140. }
  180141. if (code2 === 93) {
  180142. effects.exit(stringType);
  180143. effects.enter(markerType);
  180144. effects.consume(code2);
  180145. effects.exit(markerType);
  180146. effects.exit(type);
  180147. return ok2;
  180148. }
  180149. if (markdownLineEnding(code2)) {
  180150. effects.enter("lineEnding");
  180151. effects.consume(code2);
  180152. effects.exit("lineEnding");
  180153. return atBreak;
  180154. }
  180155. effects.enter("chunkString", {
  180156. contentType: "string"
  180157. });
  180158. return label(code2);
  180159. }
  180160. function label(code2) {
  180161. if (code2 === null || code2 === 91 || code2 === 93 || markdownLineEnding(code2) || size++ > 999) {
  180162. effects.exit("chunkString");
  180163. return atBreak(code2);
  180164. }
  180165. effects.consume(code2);
  180166. data2 = data2 || !markdownSpace(code2);
  180167. return code2 === 92 ? labelEscape : label;
  180168. }
  180169. function labelEscape(code2) {
  180170. if (code2 === 91 || code2 === 92 || code2 === 93) {
  180171. effects.consume(code2);
  180172. size++;
  180173. return label;
  180174. }
  180175. return label(code2);
  180176. }
  180177. }
  180178. // node_modules/micromark-factory-title/index.js
  180179. function factoryTitle(effects, ok2, nok, type, markerType, stringType) {
  180180. let marker;
  180181. return start3;
  180182. function start3(code2) {
  180183. effects.enter(type);
  180184. effects.enter(markerType);
  180185. effects.consume(code2);
  180186. effects.exit(markerType);
  180187. marker = code2 === 40 ? 41 : code2;
  180188. return atFirstTitleBreak;
  180189. }
  180190. function atFirstTitleBreak(code2) {
  180191. if (code2 === marker) {
  180192. effects.enter(markerType);
  180193. effects.consume(code2);
  180194. effects.exit(markerType);
  180195. effects.exit(type);
  180196. return ok2;
  180197. }
  180198. effects.enter(stringType);
  180199. return atTitleBreak(code2);
  180200. }
  180201. function atTitleBreak(code2) {
  180202. if (code2 === marker) {
  180203. effects.exit(stringType);
  180204. return atFirstTitleBreak(marker);
  180205. }
  180206. if (code2 === null) {
  180207. return nok(code2);
  180208. }
  180209. if (markdownLineEnding(code2)) {
  180210. effects.enter("lineEnding");
  180211. effects.consume(code2);
  180212. effects.exit("lineEnding");
  180213. return factorySpace(effects, atTitleBreak, "linePrefix");
  180214. }
  180215. effects.enter("chunkString", {
  180216. contentType: "string"
  180217. });
  180218. return title(code2);
  180219. }
  180220. function title(code2) {
  180221. if (code2 === marker || code2 === null || markdownLineEnding(code2)) {
  180222. effects.exit("chunkString");
  180223. return atTitleBreak(code2);
  180224. }
  180225. effects.consume(code2);
  180226. return code2 === 92 ? titleEscape : title;
  180227. }
  180228. function titleEscape(code2) {
  180229. if (code2 === marker || code2 === 92) {
  180230. effects.consume(code2);
  180231. return title;
  180232. }
  180233. return title(code2);
  180234. }
  180235. }
  180236. // node_modules/micromark-factory-whitespace/index.js
  180237. function factoryWhitespace(effects, ok2) {
  180238. let seen;
  180239. return start3;
  180240. function start3(code2) {
  180241. if (markdownLineEnding(code2)) {
  180242. effects.enter("lineEnding");
  180243. effects.consume(code2);
  180244. effects.exit("lineEnding");
  180245. seen = true;
  180246. return start3;
  180247. }
  180248. if (markdownSpace(code2)) {
  180249. return factorySpace(
  180250. effects,
  180251. start3,
  180252. seen ? "linePrefix" : "lineSuffix"
  180253. )(code2);
  180254. }
  180255. return ok2(code2);
  180256. }
  180257. }
  180258. // node_modules/micromark-util-normalize-identifier/index.js
  180259. function normalizeIdentifier(value) {
  180260. return value.replace(/[\t\n\r ]+/g, " ").replace(/^ | $/g, "").toLowerCase().toUpperCase();
  180261. }
  180262. // node_modules/micromark-core-commonmark/lib/definition.js
  180263. var definition = {
  180264. name: "definition",
  180265. tokenize: tokenizeDefinition
  180266. };
  180267. var titleConstruct = {
  180268. tokenize: tokenizeTitle,
  180269. partial: true
  180270. };
  180271. function tokenizeDefinition(effects, ok2, nok) {
  180272. const self2 = this;
  180273. let identifier;
  180274. return start3;
  180275. function start3(code2) {
  180276. effects.enter("definition");
  180277. return factoryLabel.call(
  180278. self2,
  180279. effects,
  180280. labelAfter,
  180281. nok,
  180282. "definitionLabel",
  180283. "definitionLabelMarker",
  180284. "definitionLabelString"
  180285. )(code2);
  180286. }
  180287. function labelAfter(code2) {
  180288. identifier = normalizeIdentifier(
  180289. self2.sliceSerialize(self2.events[self2.events.length - 1][1]).slice(1, -1)
  180290. );
  180291. if (code2 === 58) {
  180292. effects.enter("definitionMarker");
  180293. effects.consume(code2);
  180294. effects.exit("definitionMarker");
  180295. return factoryWhitespace(
  180296. effects,
  180297. factoryDestination(
  180298. effects,
  180299. effects.attempt(
  180300. titleConstruct,
  180301. factorySpace(effects, after, "whitespace"),
  180302. factorySpace(effects, after, "whitespace")
  180303. ),
  180304. nok,
  180305. "definitionDestination",
  180306. "definitionDestinationLiteral",
  180307. "definitionDestinationLiteralMarker",
  180308. "definitionDestinationRaw",
  180309. "definitionDestinationString"
  180310. )
  180311. );
  180312. }
  180313. return nok(code2);
  180314. }
  180315. function after(code2) {
  180316. if (code2 === null || markdownLineEnding(code2)) {
  180317. effects.exit("definition");
  180318. if (!self2.parser.defined.includes(identifier)) {
  180319. self2.parser.defined.push(identifier);
  180320. }
  180321. return ok2(code2);
  180322. }
  180323. return nok(code2);
  180324. }
  180325. }
  180326. function tokenizeTitle(effects, ok2, nok) {
  180327. return start3;
  180328. function start3(code2) {
  180329. return markdownLineEndingOrSpace(code2) ? factoryWhitespace(effects, before)(code2) : nok(code2);
  180330. }
  180331. function before(code2) {
  180332. if (code2 === 34 || code2 === 39 || code2 === 40) {
  180333. return factoryTitle(
  180334. effects,
  180335. factorySpace(effects, after, "whitespace"),
  180336. nok,
  180337. "definitionTitle",
  180338. "definitionTitleMarker",
  180339. "definitionTitleString"
  180340. )(code2);
  180341. }
  180342. return nok(code2);
  180343. }
  180344. function after(code2) {
  180345. return code2 === null || markdownLineEnding(code2) ? ok2(code2) : nok(code2);
  180346. }
  180347. }
  180348. // node_modules/micromark-core-commonmark/lib/hard-break-escape.js
  180349. var hardBreakEscape = {
  180350. name: "hardBreakEscape",
  180351. tokenize: tokenizeHardBreakEscape
  180352. };
  180353. function tokenizeHardBreakEscape(effects, ok2, nok) {
  180354. return start3;
  180355. function start3(code2) {
  180356. effects.enter("hardBreakEscape");
  180357. effects.enter("escapeMarker");
  180358. effects.consume(code2);
  180359. return open;
  180360. }
  180361. function open(code2) {
  180362. if (markdownLineEnding(code2)) {
  180363. effects.exit("escapeMarker");
  180364. effects.exit("hardBreakEscape");
  180365. return ok2(code2);
  180366. }
  180367. return nok(code2);
  180368. }
  180369. }
  180370. // node_modules/micromark-core-commonmark/lib/heading-atx.js
  180371. var headingAtx = {
  180372. name: "headingAtx",
  180373. tokenize: tokenizeHeadingAtx,
  180374. resolve: resolveHeadingAtx
  180375. };
  180376. function resolveHeadingAtx(events, context) {
  180377. let contentEnd = events.length - 2;
  180378. let contentStart = 3;
  180379. let content3;
  180380. let text5;
  180381. if (events[contentStart][1].type === "whitespace") {
  180382. contentStart += 2;
  180383. }
  180384. if (contentEnd - 2 > contentStart && events[contentEnd][1].type === "whitespace") {
  180385. contentEnd -= 2;
  180386. }
  180387. if (events[contentEnd][1].type === "atxHeadingSequence" && (contentStart === contentEnd - 1 || contentEnd - 4 > contentStart && events[contentEnd - 2][1].type === "whitespace")) {
  180388. contentEnd -= contentStart + 1 === contentEnd ? 2 : 4;
  180389. }
  180390. if (contentEnd > contentStart) {
  180391. content3 = {
  180392. type: "atxHeadingText",
  180393. start: events[contentStart][1].start,
  180394. end: events[contentEnd][1].end
  180395. };
  180396. text5 = {
  180397. type: "chunkText",
  180398. start: events[contentStart][1].start,
  180399. end: events[contentEnd][1].end,
  180400. contentType: "text"
  180401. };
  180402. splice(events, contentStart, contentEnd - contentStart + 1, [
  180403. ["enter", content3, context],
  180404. ["enter", text5, context],
  180405. ["exit", text5, context],
  180406. ["exit", content3, context]
  180407. ]);
  180408. }
  180409. return events;
  180410. }
  180411. function tokenizeHeadingAtx(effects, ok2, nok) {
  180412. const self2 = this;
  180413. let size = 0;
  180414. return start3;
  180415. function start3(code2) {
  180416. effects.enter("atxHeading");
  180417. effects.enter("atxHeadingSequence");
  180418. return fenceOpenInside(code2);
  180419. }
  180420. function fenceOpenInside(code2) {
  180421. if (code2 === 35 && size++ < 6) {
  180422. effects.consume(code2);
  180423. return fenceOpenInside;
  180424. }
  180425. if (code2 === null || markdownLineEndingOrSpace(code2)) {
  180426. effects.exit("atxHeadingSequence");
  180427. return self2.interrupt ? ok2(code2) : headingBreak(code2);
  180428. }
  180429. return nok(code2);
  180430. }
  180431. function headingBreak(code2) {
  180432. if (code2 === 35) {
  180433. effects.enter("atxHeadingSequence");
  180434. return sequence(code2);
  180435. }
  180436. if (code2 === null || markdownLineEnding(code2)) {
  180437. effects.exit("atxHeading");
  180438. return ok2(code2);
  180439. }
  180440. if (markdownSpace(code2)) {
  180441. return factorySpace(effects, headingBreak, "whitespace")(code2);
  180442. }
  180443. effects.enter("atxHeadingText");
  180444. return data2(code2);
  180445. }
  180446. function sequence(code2) {
  180447. if (code2 === 35) {
  180448. effects.consume(code2);
  180449. return sequence;
  180450. }
  180451. effects.exit("atxHeadingSequence");
  180452. return headingBreak(code2);
  180453. }
  180454. function data2(code2) {
  180455. if (code2 === null || code2 === 35 || markdownLineEndingOrSpace(code2)) {
  180456. effects.exit("atxHeadingText");
  180457. return headingBreak(code2);
  180458. }
  180459. effects.consume(code2);
  180460. return data2;
  180461. }
  180462. }
  180463. // node_modules/micromark-util-html-tag-name/index.js
  180464. var htmlBlockNames = [
  180465. "address",
  180466. "article",
  180467. "aside",
  180468. "base",
  180469. "basefont",
  180470. "blockquote",
  180471. "body",
  180472. "caption",
  180473. "center",
  180474. "col",
  180475. "colgroup",
  180476. "dd",
  180477. "details",
  180478. "dialog",
  180479. "dir",
  180480. "div",
  180481. "dl",
  180482. "dt",
  180483. "fieldset",
  180484. "figcaption",
  180485. "figure",
  180486. "footer",
  180487. "form",
  180488. "frame",
  180489. "frameset",
  180490. "h1",
  180491. "h2",
  180492. "h3",
  180493. "h4",
  180494. "h5",
  180495. "h6",
  180496. "head",
  180497. "header",
  180498. "hr",
  180499. "html",
  180500. "iframe",
  180501. "legend",
  180502. "li",
  180503. "link",
  180504. "main",
  180505. "menu",
  180506. "menuitem",
  180507. "nav",
  180508. "noframes",
  180509. "ol",
  180510. "optgroup",
  180511. "option",
  180512. "p",
  180513. "param",
  180514. "section",
  180515. "source",
  180516. "summary",
  180517. "table",
  180518. "tbody",
  180519. "td",
  180520. "tfoot",
  180521. "th",
  180522. "thead",
  180523. "title",
  180524. "tr",
  180525. "track",
  180526. "ul"
  180527. ];
  180528. var htmlRawNames = ["pre", "script", "style", "textarea"];
  180529. // node_modules/micromark-core-commonmark/lib/html-flow.js
  180530. var htmlFlow = {
  180531. name: "htmlFlow",
  180532. tokenize: tokenizeHtmlFlow,
  180533. resolveTo: resolveToHtmlFlow,
  180534. concrete: true
  180535. };
  180536. var nextBlankConstruct = {
  180537. tokenize: tokenizeNextBlank,
  180538. partial: true
  180539. };
  180540. function resolveToHtmlFlow(events) {
  180541. let index2 = events.length;
  180542. while (index2--) {
  180543. if (events[index2][0] === "enter" && events[index2][1].type === "htmlFlow") {
  180544. break;
  180545. }
  180546. }
  180547. if (index2 > 1 && events[index2 - 2][1].type === "linePrefix") {
  180548. events[index2][1].start = events[index2 - 2][1].start;
  180549. events[index2 + 1][1].start = events[index2 - 2][1].start;
  180550. events.splice(index2 - 2, 2);
  180551. }
  180552. return events;
  180553. }
  180554. function tokenizeHtmlFlow(effects, ok2, nok) {
  180555. const self2 = this;
  180556. let kind;
  180557. let startTag;
  180558. let buffer2;
  180559. let index2;
  180560. let marker;
  180561. return start3;
  180562. function start3(code2) {
  180563. effects.enter("htmlFlow");
  180564. effects.enter("htmlFlowData");
  180565. effects.consume(code2);
  180566. return open;
  180567. }
  180568. function open(code2) {
  180569. if (code2 === 33) {
  180570. effects.consume(code2);
  180571. return declarationStart;
  180572. }
  180573. if (code2 === 47) {
  180574. effects.consume(code2);
  180575. return tagCloseStart;
  180576. }
  180577. if (code2 === 63) {
  180578. effects.consume(code2);
  180579. kind = 3;
  180580. return self2.interrupt ? ok2 : continuationDeclarationInside;
  180581. }
  180582. if (asciiAlpha(code2)) {
  180583. effects.consume(code2);
  180584. buffer2 = String.fromCharCode(code2);
  180585. startTag = true;
  180586. return tagName;
  180587. }
  180588. return nok(code2);
  180589. }
  180590. function declarationStart(code2) {
  180591. if (code2 === 45) {
  180592. effects.consume(code2);
  180593. kind = 2;
  180594. return commentOpenInside;
  180595. }
  180596. if (code2 === 91) {
  180597. effects.consume(code2);
  180598. kind = 5;
  180599. buffer2 = "CDATA[";
  180600. index2 = 0;
  180601. return cdataOpenInside;
  180602. }
  180603. if (asciiAlpha(code2)) {
  180604. effects.consume(code2);
  180605. kind = 4;
  180606. return self2.interrupt ? ok2 : continuationDeclarationInside;
  180607. }
  180608. return nok(code2);
  180609. }
  180610. function commentOpenInside(code2) {
  180611. if (code2 === 45) {
  180612. effects.consume(code2);
  180613. return self2.interrupt ? ok2 : continuationDeclarationInside;
  180614. }
  180615. return nok(code2);
  180616. }
  180617. function cdataOpenInside(code2) {
  180618. if (code2 === buffer2.charCodeAt(index2++)) {
  180619. effects.consume(code2);
  180620. return index2 === buffer2.length ? self2.interrupt ? ok2 : continuation : cdataOpenInside;
  180621. }
  180622. return nok(code2);
  180623. }
  180624. function tagCloseStart(code2) {
  180625. if (asciiAlpha(code2)) {
  180626. effects.consume(code2);
  180627. buffer2 = String.fromCharCode(code2);
  180628. return tagName;
  180629. }
  180630. return nok(code2);
  180631. }
  180632. function tagName(code2) {
  180633. if (code2 === null || code2 === 47 || code2 === 62 || markdownLineEndingOrSpace(code2)) {
  180634. if (code2 !== 47 && startTag && htmlRawNames.includes(buffer2.toLowerCase())) {
  180635. kind = 1;
  180636. return self2.interrupt ? ok2(code2) : continuation(code2);
  180637. }
  180638. if (htmlBlockNames.includes(buffer2.toLowerCase())) {
  180639. kind = 6;
  180640. if (code2 === 47) {
  180641. effects.consume(code2);
  180642. return basicSelfClosing;
  180643. }
  180644. return self2.interrupt ? ok2(code2) : continuation(code2);
  180645. }
  180646. kind = 7;
  180647. return self2.interrupt && !self2.parser.lazy[self2.now().line] ? nok(code2) : startTag ? completeAttributeNameBefore(code2) : completeClosingTagAfter(code2);
  180648. }
  180649. if (code2 === 45 || asciiAlphanumeric(code2)) {
  180650. effects.consume(code2);
  180651. buffer2 += String.fromCharCode(code2);
  180652. return tagName;
  180653. }
  180654. return nok(code2);
  180655. }
  180656. function basicSelfClosing(code2) {
  180657. if (code2 === 62) {
  180658. effects.consume(code2);
  180659. return self2.interrupt ? ok2 : continuation;
  180660. }
  180661. return nok(code2);
  180662. }
  180663. function completeClosingTagAfter(code2) {
  180664. if (markdownSpace(code2)) {
  180665. effects.consume(code2);
  180666. return completeClosingTagAfter;
  180667. }
  180668. return completeEnd(code2);
  180669. }
  180670. function completeAttributeNameBefore(code2) {
  180671. if (code2 === 47) {
  180672. effects.consume(code2);
  180673. return completeEnd;
  180674. }
  180675. if (code2 === 58 || code2 === 95 || asciiAlpha(code2)) {
  180676. effects.consume(code2);
  180677. return completeAttributeName;
  180678. }
  180679. if (markdownSpace(code2)) {
  180680. effects.consume(code2);
  180681. return completeAttributeNameBefore;
  180682. }
  180683. return completeEnd(code2);
  180684. }
  180685. function completeAttributeName(code2) {
  180686. if (code2 === 45 || code2 === 46 || code2 === 58 || code2 === 95 || asciiAlphanumeric(code2)) {
  180687. effects.consume(code2);
  180688. return completeAttributeName;
  180689. }
  180690. return completeAttributeNameAfter(code2);
  180691. }
  180692. function completeAttributeNameAfter(code2) {
  180693. if (code2 === 61) {
  180694. effects.consume(code2);
  180695. return completeAttributeValueBefore;
  180696. }
  180697. if (markdownSpace(code2)) {
  180698. effects.consume(code2);
  180699. return completeAttributeNameAfter;
  180700. }
  180701. return completeAttributeNameBefore(code2);
  180702. }
  180703. function completeAttributeValueBefore(code2) {
  180704. if (code2 === null || code2 === 60 || code2 === 61 || code2 === 62 || code2 === 96) {
  180705. return nok(code2);
  180706. }
  180707. if (code2 === 34 || code2 === 39) {
  180708. effects.consume(code2);
  180709. marker = code2;
  180710. return completeAttributeValueQuoted;
  180711. }
  180712. if (markdownSpace(code2)) {
  180713. effects.consume(code2);
  180714. return completeAttributeValueBefore;
  180715. }
  180716. marker = null;
  180717. return completeAttributeValueUnquoted(code2);
  180718. }
  180719. function completeAttributeValueQuoted(code2) {
  180720. if (code2 === null || markdownLineEnding(code2)) {
  180721. return nok(code2);
  180722. }
  180723. if (code2 === marker) {
  180724. effects.consume(code2);
  180725. return completeAttributeValueQuotedAfter;
  180726. }
  180727. effects.consume(code2);
  180728. return completeAttributeValueQuoted;
  180729. }
  180730. function completeAttributeValueUnquoted(code2) {
  180731. if (code2 === null || code2 === 34 || code2 === 39 || code2 === 60 || code2 === 61 || code2 === 62 || code2 === 96 || markdownLineEndingOrSpace(code2)) {
  180732. return completeAttributeNameAfter(code2);
  180733. }
  180734. effects.consume(code2);
  180735. return completeAttributeValueUnquoted;
  180736. }
  180737. function completeAttributeValueQuotedAfter(code2) {
  180738. if (code2 === 47 || code2 === 62 || markdownSpace(code2)) {
  180739. return completeAttributeNameBefore(code2);
  180740. }
  180741. return nok(code2);
  180742. }
  180743. function completeEnd(code2) {
  180744. if (code2 === 62) {
  180745. effects.consume(code2);
  180746. return completeAfter;
  180747. }
  180748. return nok(code2);
  180749. }
  180750. function completeAfter(code2) {
  180751. if (markdownSpace(code2)) {
  180752. effects.consume(code2);
  180753. return completeAfter;
  180754. }
  180755. return code2 === null || markdownLineEnding(code2) ? continuation(code2) : nok(code2);
  180756. }
  180757. function continuation(code2) {
  180758. if (code2 === 45 && kind === 2) {
  180759. effects.consume(code2);
  180760. return continuationCommentInside;
  180761. }
  180762. if (code2 === 60 && kind === 1) {
  180763. effects.consume(code2);
  180764. return continuationRawTagOpen;
  180765. }
  180766. if (code2 === 62 && kind === 4) {
  180767. effects.consume(code2);
  180768. return continuationClose;
  180769. }
  180770. if (code2 === 63 && kind === 3) {
  180771. effects.consume(code2);
  180772. return continuationDeclarationInside;
  180773. }
  180774. if (code2 === 93 && kind === 5) {
  180775. effects.consume(code2);
  180776. return continuationCharacterDataInside;
  180777. }
  180778. if (markdownLineEnding(code2) && (kind === 6 || kind === 7)) {
  180779. return effects.check(
  180780. nextBlankConstruct,
  180781. continuationClose,
  180782. continuationAtLineEnding
  180783. )(code2);
  180784. }
  180785. if (code2 === null || markdownLineEnding(code2)) {
  180786. return continuationAtLineEnding(code2);
  180787. }
  180788. effects.consume(code2);
  180789. return continuation;
  180790. }
  180791. function continuationAtLineEnding(code2) {
  180792. effects.exit("htmlFlowData");
  180793. return htmlContinueStart(code2);
  180794. }
  180795. function htmlContinueStart(code2) {
  180796. if (code2 === null) {
  180797. return done(code2);
  180798. }
  180799. if (markdownLineEnding(code2)) {
  180800. return effects.attempt(
  180801. {
  180802. tokenize: htmlLineEnd,
  180803. partial: true
  180804. },
  180805. htmlContinueStart,
  180806. done
  180807. )(code2);
  180808. }
  180809. effects.enter("htmlFlowData");
  180810. return continuation(code2);
  180811. }
  180812. function htmlLineEnd(effects2, ok3, nok2) {
  180813. return start4;
  180814. function start4(code2) {
  180815. effects2.enter("lineEnding");
  180816. effects2.consume(code2);
  180817. effects2.exit("lineEnding");
  180818. return lineStart;
  180819. }
  180820. function lineStart(code2) {
  180821. return self2.parser.lazy[self2.now().line] ? nok2(code2) : ok3(code2);
  180822. }
  180823. }
  180824. function continuationCommentInside(code2) {
  180825. if (code2 === 45) {
  180826. effects.consume(code2);
  180827. return continuationDeclarationInside;
  180828. }
  180829. return continuation(code2);
  180830. }
  180831. function continuationRawTagOpen(code2) {
  180832. if (code2 === 47) {
  180833. effects.consume(code2);
  180834. buffer2 = "";
  180835. return continuationRawEndTag;
  180836. }
  180837. return continuation(code2);
  180838. }
  180839. function continuationRawEndTag(code2) {
  180840. if (code2 === 62 && htmlRawNames.includes(buffer2.toLowerCase())) {
  180841. effects.consume(code2);
  180842. return continuationClose;
  180843. }
  180844. if (asciiAlpha(code2) && buffer2.length < 8) {
  180845. effects.consume(code2);
  180846. buffer2 += String.fromCharCode(code2);
  180847. return continuationRawEndTag;
  180848. }
  180849. return continuation(code2);
  180850. }
  180851. function continuationCharacterDataInside(code2) {
  180852. if (code2 === 93) {
  180853. effects.consume(code2);
  180854. return continuationDeclarationInside;
  180855. }
  180856. return continuation(code2);
  180857. }
  180858. function continuationDeclarationInside(code2) {
  180859. if (code2 === 62) {
  180860. effects.consume(code2);
  180861. return continuationClose;
  180862. }
  180863. if (code2 === 45 && kind === 2) {
  180864. effects.consume(code2);
  180865. return continuationDeclarationInside;
  180866. }
  180867. return continuation(code2);
  180868. }
  180869. function continuationClose(code2) {
  180870. if (code2 === null || markdownLineEnding(code2)) {
  180871. effects.exit("htmlFlowData");
  180872. return done(code2);
  180873. }
  180874. effects.consume(code2);
  180875. return continuationClose;
  180876. }
  180877. function done(code2) {
  180878. effects.exit("htmlFlow");
  180879. return ok2(code2);
  180880. }
  180881. }
  180882. function tokenizeNextBlank(effects, ok2, nok) {
  180883. return start3;
  180884. function start3(code2) {
  180885. effects.exit("htmlFlowData");
  180886. effects.enter("lineEndingBlank");
  180887. effects.consume(code2);
  180888. effects.exit("lineEndingBlank");
  180889. return effects.attempt(blankLine, ok2, nok);
  180890. }
  180891. }
  180892. // node_modules/micromark-core-commonmark/lib/html-text.js
  180893. var htmlText = {
  180894. name: "htmlText",
  180895. tokenize: tokenizeHtmlText
  180896. };
  180897. function tokenizeHtmlText(effects, ok2, nok) {
  180898. const self2 = this;
  180899. let marker;
  180900. let buffer2;
  180901. let index2;
  180902. let returnState;
  180903. return start3;
  180904. function start3(code2) {
  180905. effects.enter("htmlText");
  180906. effects.enter("htmlTextData");
  180907. effects.consume(code2);
  180908. return open;
  180909. }
  180910. function open(code2) {
  180911. if (code2 === 33) {
  180912. effects.consume(code2);
  180913. return declarationOpen;
  180914. }
  180915. if (code2 === 47) {
  180916. effects.consume(code2);
  180917. return tagCloseStart;
  180918. }
  180919. if (code2 === 63) {
  180920. effects.consume(code2);
  180921. return instruction;
  180922. }
  180923. if (asciiAlpha(code2)) {
  180924. effects.consume(code2);
  180925. return tagOpen;
  180926. }
  180927. return nok(code2);
  180928. }
  180929. function declarationOpen(code2) {
  180930. if (code2 === 45) {
  180931. effects.consume(code2);
  180932. return commentOpen;
  180933. }
  180934. if (code2 === 91) {
  180935. effects.consume(code2);
  180936. buffer2 = "CDATA[";
  180937. index2 = 0;
  180938. return cdataOpen;
  180939. }
  180940. if (asciiAlpha(code2)) {
  180941. effects.consume(code2);
  180942. return declaration;
  180943. }
  180944. return nok(code2);
  180945. }
  180946. function commentOpen(code2) {
  180947. if (code2 === 45) {
  180948. effects.consume(code2);
  180949. return commentStart;
  180950. }
  180951. return nok(code2);
  180952. }
  180953. function commentStart(code2) {
  180954. if (code2 === null || code2 === 62) {
  180955. return nok(code2);
  180956. }
  180957. if (code2 === 45) {
  180958. effects.consume(code2);
  180959. return commentStartDash;
  180960. }
  180961. return comment2(code2);
  180962. }
  180963. function commentStartDash(code2) {
  180964. if (code2 === null || code2 === 62) {
  180965. return nok(code2);
  180966. }
  180967. return comment2(code2);
  180968. }
  180969. function comment2(code2) {
  180970. if (code2 === null) {
  180971. return nok(code2);
  180972. }
  180973. if (code2 === 45) {
  180974. effects.consume(code2);
  180975. return commentClose;
  180976. }
  180977. if (markdownLineEnding(code2)) {
  180978. returnState = comment2;
  180979. return atLineEnding(code2);
  180980. }
  180981. effects.consume(code2);
  180982. return comment2;
  180983. }
  180984. function commentClose(code2) {
  180985. if (code2 === 45) {
  180986. effects.consume(code2);
  180987. return end;
  180988. }
  180989. return comment2(code2);
  180990. }
  180991. function cdataOpen(code2) {
  180992. if (code2 === buffer2.charCodeAt(index2++)) {
  180993. effects.consume(code2);
  180994. return index2 === buffer2.length ? cdata : cdataOpen;
  180995. }
  180996. return nok(code2);
  180997. }
  180998. function cdata(code2) {
  180999. if (code2 === null) {
  181000. return nok(code2);
  181001. }
  181002. if (code2 === 93) {
  181003. effects.consume(code2);
  181004. return cdataClose;
  181005. }
  181006. if (markdownLineEnding(code2)) {
  181007. returnState = cdata;
  181008. return atLineEnding(code2);
  181009. }
  181010. effects.consume(code2);
  181011. return cdata;
  181012. }
  181013. function cdataClose(code2) {
  181014. if (code2 === 93) {
  181015. effects.consume(code2);
  181016. return cdataEnd;
  181017. }
  181018. return cdata(code2);
  181019. }
  181020. function cdataEnd(code2) {
  181021. if (code2 === 62) {
  181022. return end(code2);
  181023. }
  181024. if (code2 === 93) {
  181025. effects.consume(code2);
  181026. return cdataEnd;
  181027. }
  181028. return cdata(code2);
  181029. }
  181030. function declaration(code2) {
  181031. if (code2 === null || code2 === 62) {
  181032. return end(code2);
  181033. }
  181034. if (markdownLineEnding(code2)) {
  181035. returnState = declaration;
  181036. return atLineEnding(code2);
  181037. }
  181038. effects.consume(code2);
  181039. return declaration;
  181040. }
  181041. function instruction(code2) {
  181042. if (code2 === null) {
  181043. return nok(code2);
  181044. }
  181045. if (code2 === 63) {
  181046. effects.consume(code2);
  181047. return instructionClose;
  181048. }
  181049. if (markdownLineEnding(code2)) {
  181050. returnState = instruction;
  181051. return atLineEnding(code2);
  181052. }
  181053. effects.consume(code2);
  181054. return instruction;
  181055. }
  181056. function instructionClose(code2) {
  181057. return code2 === 62 ? end(code2) : instruction(code2);
  181058. }
  181059. function tagCloseStart(code2) {
  181060. if (asciiAlpha(code2)) {
  181061. effects.consume(code2);
  181062. return tagClose;
  181063. }
  181064. return nok(code2);
  181065. }
  181066. function tagClose(code2) {
  181067. if (code2 === 45 || asciiAlphanumeric(code2)) {
  181068. effects.consume(code2);
  181069. return tagClose;
  181070. }
  181071. return tagCloseBetween(code2);
  181072. }
  181073. function tagCloseBetween(code2) {
  181074. if (markdownLineEnding(code2)) {
  181075. returnState = tagCloseBetween;
  181076. return atLineEnding(code2);
  181077. }
  181078. if (markdownSpace(code2)) {
  181079. effects.consume(code2);
  181080. return tagCloseBetween;
  181081. }
  181082. return end(code2);
  181083. }
  181084. function tagOpen(code2) {
  181085. if (code2 === 45 || asciiAlphanumeric(code2)) {
  181086. effects.consume(code2);
  181087. return tagOpen;
  181088. }
  181089. if (code2 === 47 || code2 === 62 || markdownLineEndingOrSpace(code2)) {
  181090. return tagOpenBetween(code2);
  181091. }
  181092. return nok(code2);
  181093. }
  181094. function tagOpenBetween(code2) {
  181095. if (code2 === 47) {
  181096. effects.consume(code2);
  181097. return end;
  181098. }
  181099. if (code2 === 58 || code2 === 95 || asciiAlpha(code2)) {
  181100. effects.consume(code2);
  181101. return tagOpenAttributeName;
  181102. }
  181103. if (markdownLineEnding(code2)) {
  181104. returnState = tagOpenBetween;
  181105. return atLineEnding(code2);
  181106. }
  181107. if (markdownSpace(code2)) {
  181108. effects.consume(code2);
  181109. return tagOpenBetween;
  181110. }
  181111. return end(code2);
  181112. }
  181113. function tagOpenAttributeName(code2) {
  181114. if (code2 === 45 || code2 === 46 || code2 === 58 || code2 === 95 || asciiAlphanumeric(code2)) {
  181115. effects.consume(code2);
  181116. return tagOpenAttributeName;
  181117. }
  181118. return tagOpenAttributeNameAfter(code2);
  181119. }
  181120. function tagOpenAttributeNameAfter(code2) {
  181121. if (code2 === 61) {
  181122. effects.consume(code2);
  181123. return tagOpenAttributeValueBefore;
  181124. }
  181125. if (markdownLineEnding(code2)) {
  181126. returnState = tagOpenAttributeNameAfter;
  181127. return atLineEnding(code2);
  181128. }
  181129. if (markdownSpace(code2)) {
  181130. effects.consume(code2);
  181131. return tagOpenAttributeNameAfter;
  181132. }
  181133. return tagOpenBetween(code2);
  181134. }
  181135. function tagOpenAttributeValueBefore(code2) {
  181136. if (code2 === null || code2 === 60 || code2 === 61 || code2 === 62 || code2 === 96) {
  181137. return nok(code2);
  181138. }
  181139. if (code2 === 34 || code2 === 39) {
  181140. effects.consume(code2);
  181141. marker = code2;
  181142. return tagOpenAttributeValueQuoted;
  181143. }
  181144. if (markdownLineEnding(code2)) {
  181145. returnState = tagOpenAttributeValueBefore;
  181146. return atLineEnding(code2);
  181147. }
  181148. if (markdownSpace(code2)) {
  181149. effects.consume(code2);
  181150. return tagOpenAttributeValueBefore;
  181151. }
  181152. effects.consume(code2);
  181153. marker = void 0;
  181154. return tagOpenAttributeValueUnquoted;
  181155. }
  181156. function tagOpenAttributeValueQuoted(code2) {
  181157. if (code2 === marker) {
  181158. effects.consume(code2);
  181159. return tagOpenAttributeValueQuotedAfter;
  181160. }
  181161. if (code2 === null) {
  181162. return nok(code2);
  181163. }
  181164. if (markdownLineEnding(code2)) {
  181165. returnState = tagOpenAttributeValueQuoted;
  181166. return atLineEnding(code2);
  181167. }
  181168. effects.consume(code2);
  181169. return tagOpenAttributeValueQuoted;
  181170. }
  181171. function tagOpenAttributeValueQuotedAfter(code2) {
  181172. if (code2 === 62 || code2 === 47 || markdownLineEndingOrSpace(code2)) {
  181173. return tagOpenBetween(code2);
  181174. }
  181175. return nok(code2);
  181176. }
  181177. function tagOpenAttributeValueUnquoted(code2) {
  181178. if (code2 === null || code2 === 34 || code2 === 39 || code2 === 60 || code2 === 61 || code2 === 96) {
  181179. return nok(code2);
  181180. }
  181181. if (code2 === 62 || markdownLineEndingOrSpace(code2)) {
  181182. return tagOpenBetween(code2);
  181183. }
  181184. effects.consume(code2);
  181185. return tagOpenAttributeValueUnquoted;
  181186. }
  181187. function atLineEnding(code2) {
  181188. effects.exit("htmlTextData");
  181189. effects.enter("lineEnding");
  181190. effects.consume(code2);
  181191. effects.exit("lineEnding");
  181192. return factorySpace(
  181193. effects,
  181194. afterPrefix,
  181195. "linePrefix",
  181196. self2.parser.constructs.disable.null.includes("codeIndented") ? void 0 : 4
  181197. );
  181198. }
  181199. function afterPrefix(code2) {
  181200. effects.enter("htmlTextData");
  181201. return returnState(code2);
  181202. }
  181203. function end(code2) {
  181204. if (code2 === 62) {
  181205. effects.consume(code2);
  181206. effects.exit("htmlTextData");
  181207. effects.exit("htmlText");
  181208. return ok2;
  181209. }
  181210. return nok(code2);
  181211. }
  181212. }
  181213. // node_modules/micromark-core-commonmark/lib/label-end.js
  181214. var labelEnd = {
  181215. name: "labelEnd",
  181216. tokenize: tokenizeLabelEnd,
  181217. resolveTo: resolveToLabelEnd,
  181218. resolveAll: resolveAllLabelEnd
  181219. };
  181220. var resourceConstruct = {
  181221. tokenize: tokenizeResource
  181222. };
  181223. var fullReferenceConstruct = {
  181224. tokenize: tokenizeFullReference
  181225. };
  181226. var collapsedReferenceConstruct = {
  181227. tokenize: tokenizeCollapsedReference
  181228. };
  181229. function resolveAllLabelEnd(events) {
  181230. let index2 = -1;
  181231. let token;
  181232. while (++index2 < events.length) {
  181233. token = events[index2][1];
  181234. if (token.type === "labelImage" || token.type === "labelLink" || token.type === "labelEnd") {
  181235. events.splice(index2 + 1, token.type === "labelImage" ? 4 : 2);
  181236. token.type = "data";
  181237. index2++;
  181238. }
  181239. }
  181240. return events;
  181241. }
  181242. function resolveToLabelEnd(events, context) {
  181243. let index2 = events.length;
  181244. let offset2 = 0;
  181245. let token;
  181246. let open;
  181247. let close;
  181248. let media;
  181249. while (index2--) {
  181250. token = events[index2][1];
  181251. if (open) {
  181252. if (token.type === "link" || token.type === "labelLink" && token._inactive) {
  181253. break;
  181254. }
  181255. if (events[index2][0] === "enter" && token.type === "labelLink") {
  181256. token._inactive = true;
  181257. }
  181258. } else if (close) {
  181259. if (events[index2][0] === "enter" && (token.type === "labelImage" || token.type === "labelLink") && !token._balanced) {
  181260. open = index2;
  181261. if (token.type !== "labelLink") {
  181262. offset2 = 2;
  181263. break;
  181264. }
  181265. }
  181266. } else if (token.type === "labelEnd") {
  181267. close = index2;
  181268. }
  181269. }
  181270. const group = {
  181271. type: events[open][1].type === "labelLink" ? "link" : "image",
  181272. start: Object.assign({}, events[open][1].start),
  181273. end: Object.assign({}, events[events.length - 1][1].end)
  181274. };
  181275. const label = {
  181276. type: "label",
  181277. start: Object.assign({}, events[open][1].start),
  181278. end: Object.assign({}, events[close][1].end)
  181279. };
  181280. const text5 = {
  181281. type: "labelText",
  181282. start: Object.assign({}, events[open + offset2 + 2][1].end),
  181283. end: Object.assign({}, events[close - 2][1].start)
  181284. };
  181285. media = [
  181286. ["enter", group, context],
  181287. ["enter", label, context]
  181288. ];
  181289. media = push(media, events.slice(open + 1, open + offset2 + 3));
  181290. media = push(media, [["enter", text5, context]]);
  181291. media = push(
  181292. media,
  181293. resolveAll(
  181294. context.parser.constructs.insideSpan.null,
  181295. events.slice(open + offset2 + 4, close - 3),
  181296. context
  181297. )
  181298. );
  181299. media = push(media, [
  181300. ["exit", text5, context],
  181301. events[close - 2],
  181302. events[close - 1],
  181303. ["exit", label, context]
  181304. ]);
  181305. media = push(media, events.slice(close + 1));
  181306. media = push(media, [["exit", group, context]]);
  181307. splice(events, open, events.length, media);
  181308. return events;
  181309. }
  181310. function tokenizeLabelEnd(effects, ok2, nok) {
  181311. const self2 = this;
  181312. let index2 = self2.events.length;
  181313. let labelStart;
  181314. let defined;
  181315. while (index2--) {
  181316. if ((self2.events[index2][1].type === "labelImage" || self2.events[index2][1].type === "labelLink") && !self2.events[index2][1]._balanced) {
  181317. labelStart = self2.events[index2][1];
  181318. break;
  181319. }
  181320. }
  181321. return start3;
  181322. function start3(code2) {
  181323. if (!labelStart) {
  181324. return nok(code2);
  181325. }
  181326. if (labelStart._inactive)
  181327. return balanced(code2);
  181328. defined = self2.parser.defined.includes(
  181329. normalizeIdentifier(
  181330. self2.sliceSerialize({
  181331. start: labelStart.end,
  181332. end: self2.now()
  181333. })
  181334. )
  181335. );
  181336. effects.enter("labelEnd");
  181337. effects.enter("labelMarker");
  181338. effects.consume(code2);
  181339. effects.exit("labelMarker");
  181340. effects.exit("labelEnd");
  181341. return afterLabelEnd;
  181342. }
  181343. function afterLabelEnd(code2) {
  181344. if (code2 === 40) {
  181345. return effects.attempt(
  181346. resourceConstruct,
  181347. ok2,
  181348. defined ? ok2 : balanced
  181349. )(code2);
  181350. }
  181351. if (code2 === 91) {
  181352. return effects.attempt(
  181353. fullReferenceConstruct,
  181354. ok2,
  181355. defined ? effects.attempt(collapsedReferenceConstruct, ok2, balanced) : balanced
  181356. )(code2);
  181357. }
  181358. return defined ? ok2(code2) : balanced(code2);
  181359. }
  181360. function balanced(code2) {
  181361. labelStart._balanced = true;
  181362. return nok(code2);
  181363. }
  181364. }
  181365. function tokenizeResource(effects, ok2, nok) {
  181366. return start3;
  181367. function start3(code2) {
  181368. effects.enter("resource");
  181369. effects.enter("resourceMarker");
  181370. effects.consume(code2);
  181371. effects.exit("resourceMarker");
  181372. return factoryWhitespace(effects, open);
  181373. }
  181374. function open(code2) {
  181375. if (code2 === 41) {
  181376. return end(code2);
  181377. }
  181378. return factoryDestination(
  181379. effects,
  181380. destinationAfter,
  181381. nok,
  181382. "resourceDestination",
  181383. "resourceDestinationLiteral",
  181384. "resourceDestinationLiteralMarker",
  181385. "resourceDestinationRaw",
  181386. "resourceDestinationString",
  181387. 32
  181388. )(code2);
  181389. }
  181390. function destinationAfter(code2) {
  181391. return markdownLineEndingOrSpace(code2) ? factoryWhitespace(effects, between)(code2) : end(code2);
  181392. }
  181393. function between(code2) {
  181394. if (code2 === 34 || code2 === 39 || code2 === 40) {
  181395. return factoryTitle(
  181396. effects,
  181397. factoryWhitespace(effects, end),
  181398. nok,
  181399. "resourceTitle",
  181400. "resourceTitleMarker",
  181401. "resourceTitleString"
  181402. )(code2);
  181403. }
  181404. return end(code2);
  181405. }
  181406. function end(code2) {
  181407. if (code2 === 41) {
  181408. effects.enter("resourceMarker");
  181409. effects.consume(code2);
  181410. effects.exit("resourceMarker");
  181411. effects.exit("resource");
  181412. return ok2;
  181413. }
  181414. return nok(code2);
  181415. }
  181416. }
  181417. function tokenizeFullReference(effects, ok2, nok) {
  181418. const self2 = this;
  181419. return start3;
  181420. function start3(code2) {
  181421. return factoryLabel.call(
  181422. self2,
  181423. effects,
  181424. afterLabel,
  181425. nok,
  181426. "reference",
  181427. "referenceMarker",
  181428. "referenceString"
  181429. )(code2);
  181430. }
  181431. function afterLabel(code2) {
  181432. return self2.parser.defined.includes(
  181433. normalizeIdentifier(
  181434. self2.sliceSerialize(self2.events[self2.events.length - 1][1]).slice(1, -1)
  181435. )
  181436. ) ? ok2(code2) : nok(code2);
  181437. }
  181438. }
  181439. function tokenizeCollapsedReference(effects, ok2, nok) {
  181440. return start3;
  181441. function start3(code2) {
  181442. effects.enter("reference");
  181443. effects.enter("referenceMarker");
  181444. effects.consume(code2);
  181445. effects.exit("referenceMarker");
  181446. return open;
  181447. }
  181448. function open(code2) {
  181449. if (code2 === 93) {
  181450. effects.enter("referenceMarker");
  181451. effects.consume(code2);
  181452. effects.exit("referenceMarker");
  181453. effects.exit("reference");
  181454. return ok2;
  181455. }
  181456. return nok(code2);
  181457. }
  181458. }
  181459. // node_modules/micromark-core-commonmark/lib/label-start-image.js
  181460. var labelStartImage = {
  181461. name: "labelStartImage",
  181462. tokenize: tokenizeLabelStartImage,
  181463. resolveAll: labelEnd.resolveAll
  181464. };
  181465. function tokenizeLabelStartImage(effects, ok2, nok) {
  181466. const self2 = this;
  181467. return start3;
  181468. function start3(code2) {
  181469. effects.enter("labelImage");
  181470. effects.enter("labelImageMarker");
  181471. effects.consume(code2);
  181472. effects.exit("labelImageMarker");
  181473. return open;
  181474. }
  181475. function open(code2) {
  181476. if (code2 === 91) {
  181477. effects.enter("labelMarker");
  181478. effects.consume(code2);
  181479. effects.exit("labelMarker");
  181480. effects.exit("labelImage");
  181481. return after;
  181482. }
  181483. return nok(code2);
  181484. }
  181485. function after(code2) {
  181486. return code2 === 94 && "_hiddenFootnoteSupport" in self2.parser.constructs ? nok(code2) : ok2(code2);
  181487. }
  181488. }
  181489. // node_modules/micromark-core-commonmark/lib/label-start-link.js
  181490. var labelStartLink = {
  181491. name: "labelStartLink",
  181492. tokenize: tokenizeLabelStartLink,
  181493. resolveAll: labelEnd.resolveAll
  181494. };
  181495. function tokenizeLabelStartLink(effects, ok2, nok) {
  181496. const self2 = this;
  181497. return start3;
  181498. function start3(code2) {
  181499. effects.enter("labelLink");
  181500. effects.enter("labelMarker");
  181501. effects.consume(code2);
  181502. effects.exit("labelMarker");
  181503. effects.exit("labelLink");
  181504. return after;
  181505. }
  181506. function after(code2) {
  181507. return code2 === 94 && "_hiddenFootnoteSupport" in self2.parser.constructs ? nok(code2) : ok2(code2);
  181508. }
  181509. }
  181510. // node_modules/micromark-core-commonmark/lib/line-ending.js
  181511. var lineEnding = {
  181512. name: "lineEnding",
  181513. tokenize: tokenizeLineEnding
  181514. };
  181515. function tokenizeLineEnding(effects, ok2) {
  181516. return start3;
  181517. function start3(code2) {
  181518. effects.enter("lineEnding");
  181519. effects.consume(code2);
  181520. effects.exit("lineEnding");
  181521. return factorySpace(effects, ok2, "linePrefix");
  181522. }
  181523. }
  181524. // node_modules/micromark-core-commonmark/lib/thematic-break.js
  181525. var thematicBreak = {
  181526. name: "thematicBreak",
  181527. tokenize: tokenizeThematicBreak
  181528. };
  181529. function tokenizeThematicBreak(effects, ok2, nok) {
  181530. let size = 0;
  181531. let marker;
  181532. return start3;
  181533. function start3(code2) {
  181534. effects.enter("thematicBreak");
  181535. marker = code2;
  181536. return atBreak(code2);
  181537. }
  181538. function atBreak(code2) {
  181539. if (code2 === marker) {
  181540. effects.enter("thematicBreakSequence");
  181541. return sequence(code2);
  181542. }
  181543. if (markdownSpace(code2)) {
  181544. return factorySpace(effects, atBreak, "whitespace")(code2);
  181545. }
  181546. if (size < 3 || code2 !== null && !markdownLineEnding(code2)) {
  181547. return nok(code2);
  181548. }
  181549. effects.exit("thematicBreak");
  181550. return ok2(code2);
  181551. }
  181552. function sequence(code2) {
  181553. if (code2 === marker) {
  181554. effects.consume(code2);
  181555. size++;
  181556. return sequence;
  181557. }
  181558. effects.exit("thematicBreakSequence");
  181559. return atBreak(code2);
  181560. }
  181561. }
  181562. // node_modules/micromark-core-commonmark/lib/list.js
  181563. var list = {
  181564. name: "list",
  181565. tokenize: tokenizeListStart,
  181566. continuation: {
  181567. tokenize: tokenizeListContinuation
  181568. },
  181569. exit: tokenizeListEnd
  181570. };
  181571. var listItemPrefixWhitespaceConstruct = {
  181572. tokenize: tokenizeListItemPrefixWhitespace,
  181573. partial: true
  181574. };
  181575. var indentConstruct = {
  181576. tokenize: tokenizeIndent,
  181577. partial: true
  181578. };
  181579. function tokenizeListStart(effects, ok2, nok) {
  181580. const self2 = this;
  181581. const tail = self2.events[self2.events.length - 1];
  181582. let initialSize = tail && tail[1].type === "linePrefix" ? tail[2].sliceSerialize(tail[1], true).length : 0;
  181583. let size = 0;
  181584. return start3;
  181585. function start3(code2) {
  181586. const kind = self2.containerState.type || (code2 === 42 || code2 === 43 || code2 === 45 ? "listUnordered" : "listOrdered");
  181587. if (kind === "listUnordered" ? !self2.containerState.marker || code2 === self2.containerState.marker : asciiDigit(code2)) {
  181588. if (!self2.containerState.type) {
  181589. self2.containerState.type = kind;
  181590. effects.enter(kind, {
  181591. _container: true
  181592. });
  181593. }
  181594. if (kind === "listUnordered") {
  181595. effects.enter("listItemPrefix");
  181596. return code2 === 42 || code2 === 45 ? effects.check(thematicBreak, nok, atMarker)(code2) : atMarker(code2);
  181597. }
  181598. if (!self2.interrupt || code2 === 49) {
  181599. effects.enter("listItemPrefix");
  181600. effects.enter("listItemValue");
  181601. return inside(code2);
  181602. }
  181603. }
  181604. return nok(code2);
  181605. }
  181606. function inside(code2) {
  181607. if (asciiDigit(code2) && ++size < 10) {
  181608. effects.consume(code2);
  181609. return inside;
  181610. }
  181611. if ((!self2.interrupt || size < 2) && (self2.containerState.marker ? code2 === self2.containerState.marker : code2 === 41 || code2 === 46)) {
  181612. effects.exit("listItemValue");
  181613. return atMarker(code2);
  181614. }
  181615. return nok(code2);
  181616. }
  181617. function atMarker(code2) {
  181618. effects.enter("listItemMarker");
  181619. effects.consume(code2);
  181620. effects.exit("listItemMarker");
  181621. self2.containerState.marker = self2.containerState.marker || code2;
  181622. return effects.check(
  181623. blankLine,
  181624. self2.interrupt ? nok : onBlank,
  181625. effects.attempt(
  181626. listItemPrefixWhitespaceConstruct,
  181627. endOfPrefix,
  181628. otherPrefix
  181629. )
  181630. );
  181631. }
  181632. function onBlank(code2) {
  181633. self2.containerState.initialBlankLine = true;
  181634. initialSize++;
  181635. return endOfPrefix(code2);
  181636. }
  181637. function otherPrefix(code2) {
  181638. if (markdownSpace(code2)) {
  181639. effects.enter("listItemPrefixWhitespace");
  181640. effects.consume(code2);
  181641. effects.exit("listItemPrefixWhitespace");
  181642. return endOfPrefix;
  181643. }
  181644. return nok(code2);
  181645. }
  181646. function endOfPrefix(code2) {
  181647. self2.containerState.size = initialSize + self2.sliceSerialize(effects.exit("listItemPrefix"), true).length;
  181648. return ok2(code2);
  181649. }
  181650. }
  181651. function tokenizeListContinuation(effects, ok2, nok) {
  181652. const self2 = this;
  181653. self2.containerState._closeFlow = void 0;
  181654. return effects.check(blankLine, onBlank, notBlank);
  181655. function onBlank(code2) {
  181656. self2.containerState.furtherBlankLines = self2.containerState.furtherBlankLines || self2.containerState.initialBlankLine;
  181657. return factorySpace(
  181658. effects,
  181659. ok2,
  181660. "listItemIndent",
  181661. self2.containerState.size + 1
  181662. )(code2);
  181663. }
  181664. function notBlank(code2) {
  181665. if (self2.containerState.furtherBlankLines || !markdownSpace(code2)) {
  181666. self2.containerState.furtherBlankLines = void 0;
  181667. self2.containerState.initialBlankLine = void 0;
  181668. return notInCurrentItem(code2);
  181669. }
  181670. self2.containerState.furtherBlankLines = void 0;
  181671. self2.containerState.initialBlankLine = void 0;
  181672. return effects.attempt(indentConstruct, ok2, notInCurrentItem)(code2);
  181673. }
  181674. function notInCurrentItem(code2) {
  181675. self2.containerState._closeFlow = true;
  181676. self2.interrupt = void 0;
  181677. return factorySpace(
  181678. effects,
  181679. effects.attempt(list, ok2, nok),
  181680. "linePrefix",
  181681. self2.parser.constructs.disable.null.includes("codeIndented") ? void 0 : 4
  181682. )(code2);
  181683. }
  181684. }
  181685. function tokenizeIndent(effects, ok2, nok) {
  181686. const self2 = this;
  181687. return factorySpace(
  181688. effects,
  181689. afterPrefix,
  181690. "listItemIndent",
  181691. self2.containerState.size + 1
  181692. );
  181693. function afterPrefix(code2) {
  181694. const tail = self2.events[self2.events.length - 1];
  181695. return tail && tail[1].type === "listItemIndent" && tail[2].sliceSerialize(tail[1], true).length === self2.containerState.size ? ok2(code2) : nok(code2);
  181696. }
  181697. }
  181698. function tokenizeListEnd(effects) {
  181699. effects.exit(this.containerState.type);
  181700. }
  181701. function tokenizeListItemPrefixWhitespace(effects, ok2, nok) {
  181702. const self2 = this;
  181703. return factorySpace(
  181704. effects,
  181705. afterPrefix,
  181706. "listItemPrefixWhitespace",
  181707. self2.parser.constructs.disable.null.includes("codeIndented") ? void 0 : 4 + 1
  181708. );
  181709. function afterPrefix(code2) {
  181710. const tail = self2.events[self2.events.length - 1];
  181711. return !markdownSpace(code2) && tail && tail[1].type === "listItemPrefixWhitespace" ? ok2(code2) : nok(code2);
  181712. }
  181713. }
  181714. // node_modules/micromark-core-commonmark/lib/setext-underline.js
  181715. var setextUnderline = {
  181716. name: "setextUnderline",
  181717. tokenize: tokenizeSetextUnderline,
  181718. resolveTo: resolveToSetextUnderline
  181719. };
  181720. function resolveToSetextUnderline(events, context) {
  181721. let index2 = events.length;
  181722. let content3;
  181723. let text5;
  181724. let definition2;
  181725. while (index2--) {
  181726. if (events[index2][0] === "enter") {
  181727. if (events[index2][1].type === "content") {
  181728. content3 = index2;
  181729. break;
  181730. }
  181731. if (events[index2][1].type === "paragraph") {
  181732. text5 = index2;
  181733. }
  181734. } else {
  181735. if (events[index2][1].type === "content") {
  181736. events.splice(index2, 1);
  181737. }
  181738. if (!definition2 && events[index2][1].type === "definition") {
  181739. definition2 = index2;
  181740. }
  181741. }
  181742. }
  181743. const heading2 = {
  181744. type: "setextHeading",
  181745. start: Object.assign({}, events[text5][1].start),
  181746. end: Object.assign({}, events[events.length - 1][1].end)
  181747. };
  181748. events[text5][1].type = "setextHeadingText";
  181749. if (definition2) {
  181750. events.splice(text5, 0, ["enter", heading2, context]);
  181751. events.splice(definition2 + 1, 0, ["exit", events[content3][1], context]);
  181752. events[content3][1].end = Object.assign({}, events[definition2][1].end);
  181753. } else {
  181754. events[content3][1] = heading2;
  181755. }
  181756. events.push(["exit", heading2, context]);
  181757. return events;
  181758. }
  181759. function tokenizeSetextUnderline(effects, ok2, nok) {
  181760. const self2 = this;
  181761. let index2 = self2.events.length;
  181762. let marker;
  181763. let paragraph2;
  181764. while (index2--) {
  181765. if (self2.events[index2][1].type !== "lineEnding" && self2.events[index2][1].type !== "linePrefix" && self2.events[index2][1].type !== "content") {
  181766. paragraph2 = self2.events[index2][1].type === "paragraph";
  181767. break;
  181768. }
  181769. }
  181770. return start3;
  181771. function start3(code2) {
  181772. if (!self2.parser.lazy[self2.now().line] && (self2.interrupt || paragraph2)) {
  181773. effects.enter("setextHeadingLine");
  181774. effects.enter("setextHeadingLineSequence");
  181775. marker = code2;
  181776. return closingSequence(code2);
  181777. }
  181778. return nok(code2);
  181779. }
  181780. function closingSequence(code2) {
  181781. if (code2 === marker) {
  181782. effects.consume(code2);
  181783. return closingSequence;
  181784. }
  181785. effects.exit("setextHeadingLineSequence");
  181786. return factorySpace(effects, closingSequenceEnd, "lineSuffix")(code2);
  181787. }
  181788. function closingSequenceEnd(code2) {
  181789. if (code2 === null || markdownLineEnding(code2)) {
  181790. effects.exit("setextHeadingLine");
  181791. return ok2(code2);
  181792. }
  181793. return nok(code2);
  181794. }
  181795. }
  181796. // node_modules/micromark-extension-mdxjs-esm/lib/syntax.js
  181797. var nextBlankConstruct2 = {
  181798. tokenize: tokenizeNextBlank2,
  181799. partial: true
  181800. };
  181801. var allowedAcornTypes = /* @__PURE__ */ new Set([
  181802. "ExportAllDeclaration",
  181803. "ExportDefaultDeclaration",
  181804. "ExportNamedDeclaration",
  181805. "ImportDeclaration"
  181806. ]);
  181807. function mdxjsEsm(options) {
  181808. const exportImportConstruct = {
  181809. tokenize: tokenizeExportImport,
  181810. concrete: true
  181811. };
  181812. if (!options || !options.acorn || !options.acorn.parse) {
  181813. throw new Error("Expected an `acorn` instance passed in as `options.acorn`");
  181814. }
  181815. const acorn = options.acorn;
  181816. const acornOptions = Object.assign(
  181817. {
  181818. ecmaVersion: 2020,
  181819. sourceType: "module"
  181820. },
  181821. options.acornOptions
  181822. );
  181823. return {
  181824. flow: {
  181825. [101]: exportImportConstruct,
  181826. [105]: exportImportConstruct
  181827. }
  181828. };
  181829. function tokenizeExportImport(effects, ok2, nok) {
  181830. const self2 = this;
  181831. const definedModuleSpecifiers = self2.parser.definedModuleSpecifiers || (self2.parser.definedModuleSpecifiers = []);
  181832. const eventStart = this.events.length + 1;
  181833. let index2 = 0;
  181834. let buffer2;
  181835. return self2.interrupt ? nok : start3;
  181836. function start3(code2) {
  181837. if (self2.now().column > 1)
  181838. return nok(code2);
  181839. buffer2 = code2 === 101 ? "export" : "import";
  181840. effects.enter("mdxjsEsm");
  181841. effects.enter("mdxjsEsmData");
  181842. return keyword(code2);
  181843. }
  181844. function keyword(code2) {
  181845. if (code2 === buffer2.charCodeAt(index2++)) {
  181846. effects.consume(code2);
  181847. return index2 === buffer2.length ? after : keyword;
  181848. }
  181849. return nok(code2);
  181850. }
  181851. function after(code2) {
  181852. if (unicodeWhitespace(code2)) {
  181853. effects.consume(code2);
  181854. return rest;
  181855. }
  181856. return nok(code2);
  181857. }
  181858. function rest(code2) {
  181859. if (code2 === null) {
  181860. return atEnd(code2);
  181861. }
  181862. if (markdownLineEnding(code2)) {
  181863. return effects.check(nextBlankConstruct2, atEnd, atEol)(code2);
  181864. }
  181865. effects.consume(code2);
  181866. return rest;
  181867. }
  181868. function atEol(code2) {
  181869. effects.exit("mdxjsEsmData");
  181870. return lineStart(code2);
  181871. }
  181872. function lineStart(code2) {
  181873. if (markdownLineEnding(code2)) {
  181874. effects.enter("lineEnding");
  181875. effects.consume(code2);
  181876. effects.exit("lineEnding");
  181877. return lineStart;
  181878. }
  181879. effects.enter("mdxjsEsmData");
  181880. return rest(code2);
  181881. }
  181882. function atEnd(code2) {
  181883. effects.exit("mdxjsEsmData");
  181884. let index3 = -1;
  181885. const result = eventsToAcorn(self2.events.slice(eventStart), {
  181886. acorn,
  181887. acornOptions,
  181888. prefix: definedModuleSpecifiers.length > 0 ? "var " + definedModuleSpecifiers.join(",") + "\n" : ""
  181889. });
  181890. if (code2 !== null && result.swallow) {
  181891. return lineStart(code2);
  181892. }
  181893. if (result.error) {
  181894. throw new VFileMessage(
  181895. "Could not parse import/exports with acorn: " + String(result.error),
  181896. {
  181897. line: result.error.loc.line,
  181898. column: result.error.loc.column + 1,
  181899. offset: result.error.pos
  181900. },
  181901. "micromark-extension-mdxjs-esm:acorn"
  181902. );
  181903. }
  181904. if (definedModuleSpecifiers.length > 0) {
  181905. result.estree.body.shift();
  181906. }
  181907. while (++index3 < result.estree.body.length) {
  181908. const node = result.estree.body[index3];
  181909. if (!allowedAcornTypes.has(node.type)) {
  181910. throw new VFileMessage(
  181911. "Unexpected `" + node.type + "` in code: only import/exports are supported",
  181912. positionFromEstree(node),
  181913. "micromark-extension-mdxjs-esm:non-esm"
  181914. );
  181915. }
  181916. if (node.type === "ImportDeclaration" && !self2.interrupt) {
  181917. let index4 = -1;
  181918. while (++index4 < node.specifiers.length) {
  181919. definedModuleSpecifiers.push(node.specifiers[index4].local.name);
  181920. }
  181921. }
  181922. }
  181923. Object.assign(
  181924. effects.exit("mdxjsEsm"),
  181925. options.addResult ? {
  181926. estree: result.estree
  181927. } : void 0
  181928. );
  181929. return ok2(code2);
  181930. }
  181931. }
  181932. }
  181933. function tokenizeNextBlank2(effects, ok2, nok) {
  181934. return start3;
  181935. function start3(code2) {
  181936. effects.exit("mdxjsEsmData");
  181937. effects.enter("lineEndingBlank");
  181938. effects.consume(code2);
  181939. effects.exit("lineEndingBlank");
  181940. return effects.attempt(blankLine, ok2, nok);
  181941. }
  181942. }
  181943. // node_modules/micromark-extension-mdxjs/index.js
  181944. function mdxjs(options) {
  181945. const settings = Object.assign(
  181946. {
  181947. acorn: Parser.extend((0, import_acorn_jsx.default)()),
  181948. acornOptions: { ecmaVersion: 2020, sourceType: "module" },
  181949. addResult: true
  181950. },
  181951. options
  181952. );
  181953. return combineExtensions([
  181954. mdxjsEsm(settings),
  181955. mdxExpression(settings),
  181956. mdxJsx(settings),
  181957. mdxMd
  181958. ]);
  181959. }
  181960. // node_modules/mdast-util-mdx-expression/index.js
  181961. var mdxExpressionFromMarkdown = {
  181962. enter: {
  181963. mdxFlowExpression: enterMdxFlowExpression,
  181964. mdxTextExpression: enterMdxTextExpression
  181965. },
  181966. exit: {
  181967. mdxFlowExpression: exitMdxExpression,
  181968. mdxFlowExpressionChunk: exitMdxExpressionData,
  181969. mdxTextExpression: exitMdxExpression,
  181970. mdxTextExpressionChunk: exitMdxExpressionData
  181971. }
  181972. };
  181973. var mdxExpressionToMarkdown = {
  181974. handlers: {
  181975. mdxFlowExpression: handleMdxExpression,
  181976. mdxTextExpression: handleMdxExpression
  181977. },
  181978. unsafe: [
  181979. { character: "{", inConstruct: ["phrasing"] },
  181980. { atBreak: true, character: "{" }
  181981. ]
  181982. };
  181983. function enterMdxFlowExpression(token) {
  181984. this.enter({ type: "mdxFlowExpression", value: "" }, token);
  181985. this.buffer();
  181986. }
  181987. function enterMdxTextExpression(token) {
  181988. this.enter({ type: "mdxTextExpression", value: "" }, token);
  181989. this.buffer();
  181990. }
  181991. function exitMdxExpression(token) {
  181992. const value = this.resume();
  181993. const estree = token.estree;
  181994. const node = this.exit(token);
  181995. node.value = value;
  181996. if (estree) {
  181997. node.data = { estree };
  181998. }
  181999. }
  182000. function exitMdxExpressionData(token) {
  182001. this.config.enter.data.call(this, token);
  182002. this.config.exit.data.call(this, token);
  182003. }
  182004. function handleMdxExpression(node) {
  182005. const value = node.value || "";
  182006. return "{" + value + "}";
  182007. }
  182008. // node_modules/ccount/index.js
  182009. function ccount(value, character) {
  182010. const source = String(value);
  182011. if (typeof character !== "string") {
  182012. throw new TypeError("Expected character");
  182013. }
  182014. let count = 0;
  182015. let index2 = source.indexOf(character);
  182016. while (index2 !== -1) {
  182017. count++;
  182018. index2 = source.indexOf(character, index2 + character.length);
  182019. }
  182020. return count;
  182021. }
  182022. // node_modules/character-entities-legacy/index.js
  182023. var characterEntitiesLegacy = [
  182024. "AElig",
  182025. "AMP",
  182026. "Aacute",
  182027. "Acirc",
  182028. "Agrave",
  182029. "Aring",
  182030. "Atilde",
  182031. "Auml",
  182032. "COPY",
  182033. "Ccedil",
  182034. "ETH",
  182035. "Eacute",
  182036. "Ecirc",
  182037. "Egrave",
  182038. "Euml",
  182039. "GT",
  182040. "Iacute",
  182041. "Icirc",
  182042. "Igrave",
  182043. "Iuml",
  182044. "LT",
  182045. "Ntilde",
  182046. "Oacute",
  182047. "Ocirc",
  182048. "Ograve",
  182049. "Oslash",
  182050. "Otilde",
  182051. "Ouml",
  182052. "QUOT",
  182053. "REG",
  182054. "THORN",
  182055. "Uacute",
  182056. "Ucirc",
  182057. "Ugrave",
  182058. "Uuml",
  182059. "Yacute",
  182060. "aacute",
  182061. "acirc",
  182062. "acute",
  182063. "aelig",
  182064. "agrave",
  182065. "amp",
  182066. "aring",
  182067. "atilde",
  182068. "auml",
  182069. "brvbar",
  182070. "ccedil",
  182071. "cedil",
  182072. "cent",
  182073. "copy",
  182074. "curren",
  182075. "deg",
  182076. "divide",
  182077. "eacute",
  182078. "ecirc",
  182079. "egrave",
  182080. "eth",
  182081. "euml",
  182082. "frac12",
  182083. "frac14",
  182084. "frac34",
  182085. "gt",
  182086. "iacute",
  182087. "icirc",
  182088. "iexcl",
  182089. "igrave",
  182090. "iquest",
  182091. "iuml",
  182092. "laquo",
  182093. "lt",
  182094. "macr",
  182095. "micro",
  182096. "middot",
  182097. "nbsp",
  182098. "not",
  182099. "ntilde",
  182100. "oacute",
  182101. "ocirc",
  182102. "ograve",
  182103. "ordf",
  182104. "ordm",
  182105. "oslash",
  182106. "otilde",
  182107. "ouml",
  182108. "para",
  182109. "plusmn",
  182110. "pound",
  182111. "quot",
  182112. "raquo",
  182113. "reg",
  182114. "sect",
  182115. "shy",
  182116. "sup1",
  182117. "sup2",
  182118. "sup3",
  182119. "szlig",
  182120. "thorn",
  182121. "times",
  182122. "uacute",
  182123. "ucirc",
  182124. "ugrave",
  182125. "uml",
  182126. "uuml",
  182127. "yacute",
  182128. "yen",
  182129. "yuml"
  182130. ];
  182131. // node_modules/character-reference-invalid/index.js
  182132. var characterReferenceInvalid = {
  182133. 0: "\uFFFD",
  182134. 128: "\u20AC",
  182135. 130: "\u201A",
  182136. 131: "\u0192",
  182137. 132: "\u201E",
  182138. 133: "\u2026",
  182139. 134: "\u2020",
  182140. 135: "\u2021",
  182141. 136: "\u02C6",
  182142. 137: "\u2030",
  182143. 138: "\u0160",
  182144. 139: "\u2039",
  182145. 140: "\u0152",
  182146. 142: "\u017D",
  182147. 145: "\u2018",
  182148. 146: "\u2019",
  182149. 147: "\u201C",
  182150. 148: "\u201D",
  182151. 149: "\u2022",
  182152. 150: "\u2013",
  182153. 151: "\u2014",
  182154. 152: "\u02DC",
  182155. 153: "\u2122",
  182156. 154: "\u0161",
  182157. 155: "\u203A",
  182158. 156: "\u0153",
  182159. 158: "\u017E",
  182160. 159: "\u0178"
  182161. };
  182162. // node_modules/is-decimal/index.js
  182163. function isDecimal(character) {
  182164. const code2 = typeof character === "string" ? character.charCodeAt(0) : character;
  182165. return code2 >= 48 && code2 <= 57;
  182166. }
  182167. // node_modules/is-hexadecimal/index.js
  182168. function isHexadecimal(character) {
  182169. const code2 = typeof character === "string" ? character.charCodeAt(0) : character;
  182170. return code2 >= 97 && code2 <= 102 || code2 >= 65 && code2 <= 70 || code2 >= 48 && code2 <= 57;
  182171. }
  182172. // node_modules/is-alphabetical/index.js
  182173. function isAlphabetical(character) {
  182174. const code2 = typeof character === "string" ? character.charCodeAt(0) : character;
  182175. return code2 >= 97 && code2 <= 122 || code2 >= 65 && code2 <= 90;
  182176. }
  182177. // node_modules/is-alphanumerical/index.js
  182178. function isAlphanumerical(character) {
  182179. return isAlphabetical(character) || isDecimal(character);
  182180. }
  182181. // node_modules/parse-entities/lib/index.js
  182182. var fromCharCode = String.fromCharCode;
  182183. var messages = [
  182184. "",
  182185. "Named character references must be terminated by a semicolon",
  182186. "Numeric character references must be terminated by a semicolon",
  182187. "Named character references cannot be empty",
  182188. "Numeric character references cannot be empty",
  182189. "Named character references must be known",
  182190. "Numeric character references cannot be disallowed",
  182191. "Numeric character references cannot be outside the permissible Unicode range"
  182192. ];
  182193. function parseEntities(value, options = {}) {
  182194. const additional = typeof options.additional === "string" ? options.additional.charCodeAt(0) : options.additional;
  182195. const result = [];
  182196. let index2 = 0;
  182197. let lines = -1;
  182198. let queue = "";
  182199. let point3;
  182200. let indent;
  182201. if (options.position) {
  182202. if ("start" in options.position || "indent" in options.position) {
  182203. indent = options.position.indent;
  182204. point3 = options.position.start;
  182205. } else {
  182206. point3 = options.position;
  182207. }
  182208. }
  182209. let line = (point3 ? point3.line : 0) || 1;
  182210. let column = (point3 ? point3.column : 0) || 1;
  182211. let previous2 = now();
  182212. let character;
  182213. index2--;
  182214. while (++index2 <= value.length) {
  182215. if (character === 10) {
  182216. column = (indent ? indent[lines] : 0) || 1;
  182217. }
  182218. character = value.charCodeAt(index2);
  182219. if (character === 38) {
  182220. const following = value.charCodeAt(index2 + 1);
  182221. if (following === 9 || following === 10 || following === 12 || following === 32 || following === 38 || following === 60 || Number.isNaN(following) || additional && following === additional) {
  182222. queue += fromCharCode(character);
  182223. column++;
  182224. continue;
  182225. }
  182226. const start3 = index2 + 1;
  182227. let begin = start3;
  182228. let end = start3;
  182229. let type;
  182230. if (following === 35) {
  182231. end = ++begin;
  182232. const following2 = value.charCodeAt(end);
  182233. if (following2 === 88 || following2 === 120) {
  182234. type = "hexadecimal";
  182235. end = ++begin;
  182236. } else {
  182237. type = "decimal";
  182238. }
  182239. } else {
  182240. type = "named";
  182241. }
  182242. let characterReferenceCharacters = "";
  182243. let characterReference2 = "";
  182244. let characters = "";
  182245. const test = type === "named" ? isAlphanumerical : type === "decimal" ? isDecimal : isHexadecimal;
  182246. end--;
  182247. while (++end <= value.length) {
  182248. const following2 = value.charCodeAt(end);
  182249. if (!test(following2)) {
  182250. break;
  182251. }
  182252. characters += fromCharCode(following2);
  182253. if (type === "named" && characterEntitiesLegacy.includes(characters)) {
  182254. characterReferenceCharacters = characters;
  182255. characterReference2 = decodeNamedCharacterReference(characters);
  182256. }
  182257. }
  182258. let terminated = value.charCodeAt(end) === 59;
  182259. if (terminated) {
  182260. end++;
  182261. const namedReference = type === "named" ? decodeNamedCharacterReference(characters) : false;
  182262. if (namedReference) {
  182263. characterReferenceCharacters = characters;
  182264. characterReference2 = namedReference;
  182265. }
  182266. }
  182267. let diff = 1 + end - start3;
  182268. let reference = "";
  182269. if (!terminated && options.nonTerminated === false) {
  182270. } else if (!characters) {
  182271. if (type !== "named") {
  182272. warning(4, diff);
  182273. }
  182274. } else if (type === "named") {
  182275. if (terminated && !characterReference2) {
  182276. warning(5, 1);
  182277. } else {
  182278. if (characterReferenceCharacters !== characters) {
  182279. end = begin + characterReferenceCharacters.length;
  182280. diff = 1 + end - begin;
  182281. terminated = false;
  182282. }
  182283. if (!terminated) {
  182284. const reason = characterReferenceCharacters ? 1 : 3;
  182285. if (options.attribute) {
  182286. const following2 = value.charCodeAt(end);
  182287. if (following2 === 61) {
  182288. warning(reason, diff);
  182289. characterReference2 = "";
  182290. } else if (isAlphanumerical(following2)) {
  182291. characterReference2 = "";
  182292. } else {
  182293. warning(reason, diff);
  182294. }
  182295. } else {
  182296. warning(reason, diff);
  182297. }
  182298. }
  182299. }
  182300. reference = characterReference2;
  182301. } else {
  182302. if (!terminated) {
  182303. warning(2, diff);
  182304. }
  182305. let referenceCode = Number.parseInt(
  182306. characters,
  182307. type === "hexadecimal" ? 16 : 10
  182308. );
  182309. if (prohibited(referenceCode)) {
  182310. warning(7, diff);
  182311. reference = fromCharCode(65533);
  182312. } else if (referenceCode in characterReferenceInvalid) {
  182313. warning(6, diff);
  182314. reference = characterReferenceInvalid[referenceCode];
  182315. } else {
  182316. let output = "";
  182317. if (disallowed(referenceCode)) {
  182318. warning(6, diff);
  182319. }
  182320. if (referenceCode > 65535) {
  182321. referenceCode -= 65536;
  182322. output += fromCharCode(referenceCode >>> (10 & 1023) | 55296);
  182323. referenceCode = 56320 | referenceCode & 1023;
  182324. }
  182325. reference = output + fromCharCode(referenceCode);
  182326. }
  182327. }
  182328. if (reference) {
  182329. flush();
  182330. previous2 = now();
  182331. index2 = end - 1;
  182332. column += end - start3 + 1;
  182333. result.push(reference);
  182334. const next = now();
  182335. next.offset++;
  182336. if (options.reference) {
  182337. options.reference.call(
  182338. options.referenceContext,
  182339. reference,
  182340. { start: previous2, end: next },
  182341. value.slice(start3 - 1, end)
  182342. );
  182343. }
  182344. previous2 = next;
  182345. } else {
  182346. characters = value.slice(start3 - 1, end);
  182347. queue += characters;
  182348. column += characters.length;
  182349. index2 = end - 1;
  182350. }
  182351. } else {
  182352. if (character === 10) {
  182353. line++;
  182354. lines++;
  182355. column = 0;
  182356. }
  182357. if (Number.isNaN(character)) {
  182358. flush();
  182359. } else {
  182360. queue += fromCharCode(character);
  182361. column++;
  182362. }
  182363. }
  182364. }
  182365. return result.join("");
  182366. function now() {
  182367. return {
  182368. line,
  182369. column,
  182370. offset: index2 + ((point3 ? point3.offset : 0) || 0)
  182371. };
  182372. }
  182373. function warning(code2, offset2) {
  182374. let position3;
  182375. if (options.warning) {
  182376. position3 = now();
  182377. position3.column += offset2;
  182378. position3.offset += offset2;
  182379. options.warning.call(
  182380. options.warningContext,
  182381. messages[code2],
  182382. position3,
  182383. code2
  182384. );
  182385. }
  182386. }
  182387. function flush() {
  182388. if (queue) {
  182389. result.push(queue);
  182390. if (options.text) {
  182391. options.text.call(options.textContext, queue, {
  182392. start: previous2,
  182393. end: now()
  182394. });
  182395. }
  182396. queue = "";
  182397. }
  182398. }
  182399. }
  182400. function prohibited(code2) {
  182401. return code2 >= 55296 && code2 <= 57343 || code2 > 1114111;
  182402. }
  182403. function disallowed(code2) {
  182404. return code2 >= 1 && code2 <= 8 || code2 === 11 || code2 >= 13 && code2 <= 31 || code2 >= 127 && code2 <= 159 || code2 >= 64976 && code2 <= 65007 || (code2 & 65535) === 65535 || (code2 & 65535) === 65534;
  182405. }
  182406. // node_modules/stringify-entities/lib/core.js
  182407. function core(value, options) {
  182408. value = value.replace(
  182409. options.subset ? charactersToExpression(options.subset) : /["&'<>`]/g,
  182410. basic
  182411. );
  182412. if (options.subset || options.escapeOnly) {
  182413. return value;
  182414. }
  182415. return value.replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g, surrogate).replace(
  182416. /[\x01-\t\v\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g,
  182417. basic
  182418. );
  182419. function surrogate(pair, index2, all4) {
  182420. return options.format(
  182421. (pair.charCodeAt(0) - 55296) * 1024 + pair.charCodeAt(1) - 56320 + 65536,
  182422. all4.charCodeAt(index2 + 2),
  182423. options
  182424. );
  182425. }
  182426. function basic(character, index2, all4) {
  182427. return options.format(
  182428. character.charCodeAt(0),
  182429. all4.charCodeAt(index2 + 1),
  182430. options
  182431. );
  182432. }
  182433. }
  182434. function charactersToExpression(subset) {
  182435. const groups = [];
  182436. let index2 = -1;
  182437. while (++index2 < subset.length) {
  182438. groups.push(subset[index2].replace(/[|\\{}()[\]^$+*?.]/g, "\\$&"));
  182439. }
  182440. return new RegExp("(?:" + groups.join("|") + ")", "g");
  182441. }
  182442. // node_modules/stringify-entities/lib/util/format-basic.js
  182443. function formatBasic(code2) {
  182444. return "&#x" + code2.toString(16).toUpperCase() + ";";
  182445. }
  182446. // node_modules/stringify-entities/lib/index.js
  182447. function stringifyEntitiesLight(value, options) {
  182448. return core(value, Object.assign({ format: formatBasic }, options));
  182449. }
  182450. // node_modules/mdast-util-to-markdown/lib/util/track.js
  182451. function track(options_) {
  182452. const options = options_ || {};
  182453. const now = options.now || {};
  182454. let lineShift = options.lineShift || 0;
  182455. let line = now.line || 1;
  182456. let column = now.column || 1;
  182457. return { move, current: current2, shift };
  182458. function current2() {
  182459. return { now: { line, column }, lineShift };
  182460. }
  182461. function shift(value) {
  182462. lineShift += value;
  182463. }
  182464. function move(value = "") {
  182465. const chunks = value.split(/\r?\n|\r/g);
  182466. const tail = chunks[chunks.length - 1];
  182467. line += chunks.length - 1;
  182468. column = chunks.length === 1 ? column + tail.length : 1 + tail.length + lineShift;
  182469. return value;
  182470. }
  182471. }
  182472. // node_modules/mdast-util-to-markdown/lib/util/container-flow.js
  182473. function containerFlow(parent, context, safeOptions) {
  182474. const indexStack = context.indexStack;
  182475. const children = parent.children || [];
  182476. const tracker = track(safeOptions);
  182477. const results = [];
  182478. let index2 = -1;
  182479. indexStack.push(-1);
  182480. while (++index2 < children.length) {
  182481. const child = children[index2];
  182482. indexStack[indexStack.length - 1] = index2;
  182483. results.push(
  182484. tracker.move(
  182485. context.handle(child, parent, context, {
  182486. before: "\n",
  182487. after: "\n",
  182488. ...tracker.current()
  182489. })
  182490. )
  182491. );
  182492. if (child.type !== "list") {
  182493. context.bulletLastUsed = void 0;
  182494. }
  182495. if (index2 < children.length - 1) {
  182496. results.push(tracker.move(between(child, children[index2 + 1])));
  182497. }
  182498. }
  182499. indexStack.pop();
  182500. return results.join("");
  182501. function between(left, right) {
  182502. let index3 = context.join.length;
  182503. while (index3--) {
  182504. const result = context.join[index3](left, right, parent, context);
  182505. if (result === true || result === 1) {
  182506. break;
  182507. }
  182508. if (typeof result === "number") {
  182509. return "\n".repeat(1 + result);
  182510. }
  182511. if (result === false) {
  182512. return "\n\n<!---->\n\n";
  182513. }
  182514. }
  182515. return "\n\n";
  182516. }
  182517. }
  182518. // node_modules/mdast-util-to-markdown/lib/util/container-phrasing.js
  182519. function containerPhrasing(parent, context, safeOptions) {
  182520. const indexStack = context.indexStack;
  182521. const children = parent.children || [];
  182522. const results = [];
  182523. let index2 = -1;
  182524. let before = safeOptions.before;
  182525. indexStack.push(-1);
  182526. let tracker = track(safeOptions);
  182527. while (++index2 < children.length) {
  182528. const child = children[index2];
  182529. let after;
  182530. indexStack[indexStack.length - 1] = index2;
  182531. if (index2 + 1 < children.length) {
  182532. let handle = context.handle.handlers[children[index2 + 1].type];
  182533. if (handle && handle.peek)
  182534. handle = handle.peek;
  182535. after = handle ? handle(children[index2 + 1], parent, context, {
  182536. before: "",
  182537. after: "",
  182538. ...tracker.current()
  182539. }).charAt(0) : "";
  182540. } else {
  182541. after = safeOptions.after;
  182542. }
  182543. if (results.length > 0 && (before === "\r" || before === "\n") && child.type === "html") {
  182544. results[results.length - 1] = results[results.length - 1].replace(
  182545. /(\r?\n|\r)$/,
  182546. " "
  182547. );
  182548. before = " ";
  182549. tracker = track(safeOptions);
  182550. tracker.move(results.join(""));
  182551. }
  182552. results.push(
  182553. tracker.move(
  182554. context.handle(child, parent, context, {
  182555. ...tracker.current(),
  182556. before,
  182557. after
  182558. })
  182559. )
  182560. );
  182561. before = results[results.length - 1].slice(-1);
  182562. }
  182563. indexStack.pop();
  182564. return results.join("");
  182565. }
  182566. // node_modules/mdast-util-to-markdown/lib/util/indent-lines.js
  182567. var eol = /\r?\n|\r/g;
  182568. function indentLines(value, map) {
  182569. const result = [];
  182570. let start3 = 0;
  182571. let line = 0;
  182572. let match;
  182573. while (match = eol.exec(value)) {
  182574. one3(value.slice(start3, match.index));
  182575. result.push(match[0]);
  182576. start3 = match.index + match[0].length;
  182577. line++;
  182578. }
  182579. one3(value.slice(start3));
  182580. return result.join("");
  182581. function one3(value2) {
  182582. result.push(map(value2, line, !value2));
  182583. }
  182584. }
  182585. // node_modules/mdast-util-mdx-jsx/lib/index.js
  182586. function mdxJsxFromMarkdown() {
  182587. return {
  182588. canContainEols: ["mdxJsxTextElement"],
  182589. enter: {
  182590. mdxJsxFlowTag: enterMdxJsxTag,
  182591. mdxJsxFlowTagClosingMarker: enterMdxJsxTagClosingMarker,
  182592. mdxJsxFlowTagAttribute: enterMdxJsxTagAttribute,
  182593. mdxJsxFlowTagExpressionAttribute: enterMdxJsxTagExpressionAttribute,
  182594. mdxJsxFlowTagAttributeValueLiteral: buffer2,
  182595. mdxJsxFlowTagAttributeValueExpression: buffer2,
  182596. mdxJsxFlowTagSelfClosingMarker: enterMdxJsxTagSelfClosingMarker,
  182597. mdxJsxTextTag: enterMdxJsxTag,
  182598. mdxJsxTextTagClosingMarker: enterMdxJsxTagClosingMarker,
  182599. mdxJsxTextTagAttribute: enterMdxJsxTagAttribute,
  182600. mdxJsxTextTagExpressionAttribute: enterMdxJsxTagExpressionAttribute,
  182601. mdxJsxTextTagAttributeValueLiteral: buffer2,
  182602. mdxJsxTextTagAttributeValueExpression: buffer2,
  182603. mdxJsxTextTagSelfClosingMarker: enterMdxJsxTagSelfClosingMarker
  182604. },
  182605. exit: {
  182606. mdxJsxFlowTagClosingMarker: exitMdxJsxTagClosingMarker,
  182607. mdxJsxFlowTagNamePrimary: exitMdxJsxTagNamePrimary,
  182608. mdxJsxFlowTagNameMember: exitMdxJsxTagNameMember,
  182609. mdxJsxFlowTagNameLocal: exitMdxJsxTagNameLocal,
  182610. mdxJsxFlowTagExpressionAttribute: exitMdxJsxTagExpressionAttribute,
  182611. mdxJsxFlowTagExpressionAttributeValue: data2,
  182612. mdxJsxFlowTagAttributeNamePrimary: exitMdxJsxTagAttributeNamePrimary,
  182613. mdxJsxFlowTagAttributeNameLocal: exitMdxJsxTagAttributeNameLocal,
  182614. mdxJsxFlowTagAttributeValueLiteral: exitMdxJsxTagAttributeValueLiteral,
  182615. mdxJsxFlowTagAttributeValueLiteralValue: data2,
  182616. mdxJsxFlowTagAttributeValueExpression: exitMdxJsxTagAttributeValueExpression,
  182617. mdxJsxFlowTagAttributeValueExpressionValue: data2,
  182618. mdxJsxFlowTagSelfClosingMarker: exitMdxJsxTagSelfClosingMarker,
  182619. mdxJsxFlowTag: exitMdxJsxTag,
  182620. mdxJsxTextTagClosingMarker: exitMdxJsxTagClosingMarker,
  182621. mdxJsxTextTagNamePrimary: exitMdxJsxTagNamePrimary,
  182622. mdxJsxTextTagNameMember: exitMdxJsxTagNameMember,
  182623. mdxJsxTextTagNameLocal: exitMdxJsxTagNameLocal,
  182624. mdxJsxTextTagExpressionAttribute: exitMdxJsxTagExpressionAttribute,
  182625. mdxJsxTextTagExpressionAttributeValue: data2,
  182626. mdxJsxTextTagAttributeNamePrimary: exitMdxJsxTagAttributeNamePrimary,
  182627. mdxJsxTextTagAttributeNameLocal: exitMdxJsxTagAttributeNameLocal,
  182628. mdxJsxTextTagAttributeValueLiteral: exitMdxJsxTagAttributeValueLiteral,
  182629. mdxJsxTextTagAttributeValueLiteralValue: data2,
  182630. mdxJsxTextTagAttributeValueExpression: exitMdxJsxTagAttributeValueExpression,
  182631. mdxJsxTextTagAttributeValueExpressionValue: data2,
  182632. mdxJsxTextTagSelfClosingMarker: exitMdxJsxTagSelfClosingMarker,
  182633. mdxJsxTextTag: exitMdxJsxTag
  182634. }
  182635. };
  182636. function buffer2() {
  182637. this.buffer();
  182638. }
  182639. function data2(token) {
  182640. this.config.enter.data.call(this, token);
  182641. this.config.exit.data.call(this, token);
  182642. }
  182643. function enterMdxJsxTag(token) {
  182644. const tag = { name: null, attributes: [], start: token.start, end: token.end };
  182645. if (!this.getData("mdxJsxTagStack"))
  182646. this.setData("mdxJsxTagStack", []);
  182647. this.setData("mdxJsxTag", tag);
  182648. this.buffer();
  182649. }
  182650. function enterMdxJsxTagClosingMarker(token) {
  182651. const stack = this.getData("mdxJsxTagStack");
  182652. if (stack.length === 0) {
  182653. throw new VFileMessage(
  182654. "Unexpected closing slash `/` in tag, expected an open tag first",
  182655. { start: token.start, end: token.end },
  182656. "mdast-util-mdx-jsx:unexpected-closing-slash"
  182657. );
  182658. }
  182659. }
  182660. function enterMdxJsxTagAnyAttribute(token) {
  182661. const tag = this.getData("mdxJsxTag");
  182662. if (tag.close) {
  182663. throw new VFileMessage(
  182664. "Unexpected attribute in closing tag, expected the end of the tag",
  182665. { start: token.start, end: token.end },
  182666. "mdast-util-mdx-jsx:unexpected-attribute"
  182667. );
  182668. }
  182669. }
  182670. function enterMdxJsxTagSelfClosingMarker(token) {
  182671. const tag = this.getData("mdxJsxTag");
  182672. if (tag.close) {
  182673. throw new VFileMessage(
  182674. "Unexpected self-closing slash `/` in closing tag, expected the end of the tag",
  182675. { start: token.start, end: token.end },
  182676. "mdast-util-mdx-jsx:unexpected-self-closing-slash"
  182677. );
  182678. }
  182679. }
  182680. function exitMdxJsxTagClosingMarker() {
  182681. const tag = this.getData("mdxJsxTag");
  182682. tag.close = true;
  182683. }
  182684. function exitMdxJsxTagNamePrimary(token) {
  182685. const tag = this.getData("mdxJsxTag");
  182686. tag.name = this.sliceSerialize(token);
  182687. }
  182688. function exitMdxJsxTagNameMember(token) {
  182689. const tag = this.getData("mdxJsxTag");
  182690. tag.name += "." + this.sliceSerialize(token);
  182691. }
  182692. function exitMdxJsxTagNameLocal(token) {
  182693. const tag = this.getData("mdxJsxTag");
  182694. tag.name += ":" + this.sliceSerialize(token);
  182695. }
  182696. function enterMdxJsxTagAttribute(token) {
  182697. const tag = this.getData("mdxJsxTag");
  182698. enterMdxJsxTagAnyAttribute.call(this, token);
  182699. tag.attributes.push({ type: "mdxJsxAttribute", name: "", value: null });
  182700. }
  182701. function enterMdxJsxTagExpressionAttribute(token) {
  182702. const tag = this.getData("mdxJsxTag");
  182703. enterMdxJsxTagAnyAttribute.call(this, token);
  182704. tag.attributes.push({ type: "mdxJsxExpressionAttribute", value: "" });
  182705. this.buffer();
  182706. }
  182707. function exitMdxJsxTagExpressionAttribute(token) {
  182708. const tag = this.getData("mdxJsxTag");
  182709. const tail = tag.attributes[tag.attributes.length - 1];
  182710. const estree = token.estree;
  182711. tail.value = this.resume();
  182712. if (estree) {
  182713. tail.data = { estree };
  182714. }
  182715. }
  182716. function exitMdxJsxTagAttributeNamePrimary(token) {
  182717. const tag = this.getData("mdxJsxTag");
  182718. const node = tag.attributes[tag.attributes.length - 1];
  182719. node.name = this.sliceSerialize(token);
  182720. }
  182721. function exitMdxJsxTagAttributeNameLocal(token) {
  182722. const tag = this.getData("mdxJsxTag");
  182723. const node = tag.attributes[tag.attributes.length - 1];
  182724. node.name += ":" + this.sliceSerialize(token);
  182725. }
  182726. function exitMdxJsxTagAttributeValueLiteral() {
  182727. const tag = this.getData("mdxJsxTag");
  182728. tag.attributes[tag.attributes.length - 1].value = parseEntities(
  182729. this.resume(),
  182730. { nonTerminated: false }
  182731. );
  182732. }
  182733. function exitMdxJsxTagAttributeValueExpression(token) {
  182734. const tag = this.getData("mdxJsxTag");
  182735. const tail = tag.attributes[tag.attributes.length - 1];
  182736. const node = { type: "mdxJsxAttributeValueExpression", value: this.resume() };
  182737. const estree = token.estree;
  182738. if (estree) {
  182739. node.data = { estree };
  182740. }
  182741. tail.value = node;
  182742. }
  182743. function exitMdxJsxTagSelfClosingMarker() {
  182744. const tag = this.getData("mdxJsxTag");
  182745. tag.selfClosing = true;
  182746. }
  182747. function exitMdxJsxTag(token) {
  182748. const tag = this.getData("mdxJsxTag");
  182749. const stack = this.getData("mdxJsxTagStack");
  182750. const tail = stack[stack.length - 1];
  182751. if (tag.close && tail.name !== tag.name) {
  182752. throw new VFileMessage(
  182753. "Unexpected closing tag `" + serializeAbbreviatedTag(tag) + "`, expected corresponding closing tag for `" + serializeAbbreviatedTag(tail) + "` (" + stringifyPosition(tail) + ")",
  182754. { start: token.start, end: token.end },
  182755. "mdast-util-mdx-jsx:end-tag-mismatch"
  182756. );
  182757. }
  182758. this.resume();
  182759. if (tag.close) {
  182760. stack.pop();
  182761. } else {
  182762. this.enter(
  182763. {
  182764. type: token.type === "mdxJsxTextTag" ? "mdxJsxTextElement" : "mdxJsxFlowElement",
  182765. name: tag.name,
  182766. attributes: tag.attributes,
  182767. children: []
  182768. },
  182769. token,
  182770. onErrorRightIsTag
  182771. );
  182772. }
  182773. if (tag.selfClosing || tag.close) {
  182774. this.exit(token, onErrorLeftIsTag);
  182775. } else {
  182776. stack.push(tag);
  182777. }
  182778. }
  182779. function onErrorRightIsTag(closing, open) {
  182780. const tag = this.getData("mdxJsxTag");
  182781. const place = closing ? " before the end of `" + closing.type + "`" : "";
  182782. const position3 = closing ? { start: closing.start, end: closing.end } : void 0;
  182783. throw new VFileMessage(
  182784. "Expected a closing tag for `" + serializeAbbreviatedTag(tag) + "` (" + stringifyPosition({ start: open.start, end: open.end }) + ")" + place,
  182785. position3,
  182786. "mdast-util-mdx-jsx:end-tag-mismatch"
  182787. );
  182788. }
  182789. function onErrorLeftIsTag(a, b) {
  182790. const tag = this.getData("mdxJsxTag");
  182791. throw new VFileMessage(
  182792. "Expected the closing tag `" + serializeAbbreviatedTag(tag) + "` either after the end of `" + b.type + "` (" + stringifyPosition(b.end) + ") or another opening tag after the start of `" + b.type + "` (" + stringifyPosition(b.start) + ")",
  182793. { start: a.start, end: a.end },
  182794. "mdast-util-mdx-jsx:end-tag-mismatch"
  182795. );
  182796. }
  182797. function serializeAbbreviatedTag(tag) {
  182798. return "<" + (tag.close ? "/" : "") + (tag.name || "") + ">";
  182799. }
  182800. }
  182801. function mdxJsxToMarkdown(options = {}) {
  182802. const {
  182803. quote = '"',
  182804. quoteSmart,
  182805. tightSelfClosing,
  182806. printWidth = Number.POSITIVE_INFINITY
  182807. } = options;
  182808. const alternative = quote === '"' ? "'" : '"';
  182809. if (quote !== '"' && quote !== "'") {
  182810. throw new Error(
  182811. "Cannot serialize attribute values with `" + quote + "` for `options.quote`, expected `\"`, or `'`"
  182812. );
  182813. }
  182814. mdxElement.peek = peekElement;
  182815. return {
  182816. handlers: {
  182817. mdxJsxFlowElement: mdxElement,
  182818. mdxJsxTextElement: mdxElement
  182819. },
  182820. unsafe: [
  182821. { character: "<", inConstruct: ["phrasing"] },
  182822. { atBreak: true, character: "<" }
  182823. ],
  182824. fences: true,
  182825. resourceLink: true
  182826. };
  182827. function mdxElement(node, _, context, safeOptions) {
  182828. const tracker = track(safeOptions);
  182829. const selfClosing = node.name && (!node.children || node.children.length === 0);
  182830. const exit2 = context.enter(node.type);
  182831. let index2 = -1;
  182832. const serializedAttributes = [];
  182833. let value = tracker.move("<" + (node.name || ""));
  182834. if (node.attributes && node.attributes.length > 0) {
  182835. if (!node.name) {
  182836. throw new Error("Cannot serialize fragment w/ attributes");
  182837. }
  182838. while (++index2 < node.attributes.length) {
  182839. const attribute = node.attributes[index2];
  182840. let result;
  182841. if (attribute.type === "mdxJsxExpressionAttribute") {
  182842. result = "{" + (attribute.value || "") + "}";
  182843. } else {
  182844. if (!attribute.name) {
  182845. throw new Error("Cannot serialize attribute w/o name");
  182846. }
  182847. const value2 = attribute.value;
  182848. const left = attribute.name;
  182849. let right = "";
  182850. if (value2 === void 0 || value2 === null) {
  182851. } else if (typeof value2 === "object") {
  182852. right = "{" + (value2.value || "") + "}";
  182853. } else {
  182854. const appliedQuote = quoteSmart && ccount(value2, quote) > ccount(value2, alternative) ? alternative : quote;
  182855. right = appliedQuote + stringifyEntitiesLight(value2, { subset: [appliedQuote] }) + appliedQuote;
  182856. }
  182857. result = left + (right ? "=" : "") + right;
  182858. }
  182859. serializedAttributes.push(result);
  182860. }
  182861. }
  182862. let attributesOnTheirOwnLine = false;
  182863. const attributesOnOneLine = serializedAttributes.join(" ");
  182864. if (node.type === "mdxJsxFlowElement" && (/\r?\n|\r/.test(attributesOnOneLine) || tracker.current().now.column + attributesOnOneLine.length + (selfClosing ? tightSelfClosing ? 2 : 3 : 1) > printWidth)) {
  182865. attributesOnTheirOwnLine = true;
  182866. }
  182867. if (attributesOnTheirOwnLine) {
  182868. value += tracker.move(
  182869. "\n" + indentLines(serializedAttributes.join("\n"), map)
  182870. );
  182871. } else if (attributesOnOneLine) {
  182872. value += tracker.move(" " + attributesOnOneLine);
  182873. }
  182874. if (attributesOnTheirOwnLine) {
  182875. value += tracker.move("\n");
  182876. }
  182877. if (selfClosing) {
  182878. value += tracker.move(
  182879. (tightSelfClosing || attributesOnTheirOwnLine ? "" : " ") + "/"
  182880. );
  182881. }
  182882. value += tracker.move(">");
  182883. if (node.children && node.children.length > 0) {
  182884. if (node.type === "mdxJsxFlowElement") {
  182885. tracker.shift(2);
  182886. value += tracker.move("\n");
  182887. value += tracker.move(
  182888. indentLines(containerFlow(node, context, tracker.current()), map)
  182889. );
  182890. value += tracker.move("\n");
  182891. } else {
  182892. value += tracker.move(
  182893. containerPhrasing(node, context, {
  182894. ...tracker.current(),
  182895. before: "<",
  182896. after: ">"
  182897. })
  182898. );
  182899. }
  182900. }
  182901. if (!selfClosing) {
  182902. value += tracker.move("</" + (node.name || "") + ">");
  182903. }
  182904. exit2();
  182905. return value;
  182906. }
  182907. function map(line, _, blank) {
  182908. return (blank ? "" : " ") + line;
  182909. }
  182910. function peekElement() {
  182911. return "<";
  182912. }
  182913. }
  182914. // node_modules/mdast-util-mdxjs-esm/index.js
  182915. var mdxjsEsmFromMarkdown = {
  182916. enter: { mdxjsEsm: enterMdxjsEsm },
  182917. exit: { mdxjsEsm: exitMdxjsEsm, mdxjsEsmData: exitMdxjsEsmData }
  182918. };
  182919. var mdxjsEsmToMarkdown = { handlers: { mdxjsEsm: handleMdxjsEsm } };
  182920. function enterMdxjsEsm(token) {
  182921. this.enter({ type: "mdxjsEsm", value: "" }, token);
  182922. this.buffer();
  182923. }
  182924. function exitMdxjsEsm(token) {
  182925. const value = this.resume();
  182926. const node = this.exit(token);
  182927. const estree = token.estree;
  182928. node.value = value;
  182929. if (estree) {
  182930. node.data = { estree };
  182931. }
  182932. }
  182933. function exitMdxjsEsmData(token) {
  182934. this.config.enter.data.call(this, token);
  182935. this.config.exit.data.call(this, token);
  182936. }
  182937. function handleMdxjsEsm(node) {
  182938. return node.value || "";
  182939. }
  182940. // node_modules/mdast-util-mdx/index.js
  182941. function mdxFromMarkdown() {
  182942. return [mdxExpressionFromMarkdown, mdxJsxFromMarkdown(), mdxjsEsmFromMarkdown];
  182943. }
  182944. function mdxToMarkdown(options) {
  182945. return {
  182946. extensions: [
  182947. mdxExpressionToMarkdown,
  182948. mdxJsxToMarkdown(options),
  182949. mdxjsEsmToMarkdown
  182950. ]
  182951. };
  182952. }
  182953. // node_modules/remark-mdx/index.js
  182954. function remarkMdx(options = {}) {
  182955. const data2 = this.data();
  182956. add("micromarkExtensions", mdxjs(options));
  182957. add("fromMarkdownExtensions", mdxFromMarkdown());
  182958. add("toMarkdownExtensions", mdxToMarkdown(options));
  182959. function add(field, value) {
  182960. const list3 = data2[field] ? data2[field] : data2[field] = [];
  182961. list3.push(value);
  182962. }
  182963. }
  182964. // node_modules/mdast-util-to-string/index.js
  182965. function toString2(node, options) {
  182966. var { includeImageAlt = true } = options || {};
  182967. return one(node, includeImageAlt);
  182968. }
  182969. function one(node, includeImageAlt) {
  182970. return node && typeof node === "object" && (node.value || (includeImageAlt ? node.alt : "") || "children" in node && all(node.children, includeImageAlt) || Array.isArray(node) && all(node, includeImageAlt)) || "";
  182971. }
  182972. function all(values, includeImageAlt) {
  182973. var result = [];
  182974. var index2 = -1;
  182975. while (++index2 < values.length) {
  182976. result[index2] = one(values[index2], includeImageAlt);
  182977. }
  182978. return result.join("");
  182979. }
  182980. // node_modules/micromark/lib/initialize/content.js
  182981. var content2 = {
  182982. tokenize: initializeContent
  182983. };
  182984. function initializeContent(effects) {
  182985. const contentStart = effects.attempt(
  182986. this.parser.constructs.contentInitial,
  182987. afterContentStartConstruct,
  182988. paragraphInitial
  182989. );
  182990. let previous2;
  182991. return contentStart;
  182992. function afterContentStartConstruct(code2) {
  182993. if (code2 === null) {
  182994. effects.consume(code2);
  182995. return;
  182996. }
  182997. effects.enter("lineEnding");
  182998. effects.consume(code2);
  182999. effects.exit("lineEnding");
  183000. return factorySpace(effects, contentStart, "linePrefix");
  183001. }
  183002. function paragraphInitial(code2) {
  183003. effects.enter("paragraph");
  183004. return lineStart(code2);
  183005. }
  183006. function lineStart(code2) {
  183007. const token = effects.enter("chunkText", {
  183008. contentType: "text",
  183009. previous: previous2
  183010. });
  183011. if (previous2) {
  183012. previous2.next = token;
  183013. }
  183014. previous2 = token;
  183015. return data2(code2);
  183016. }
  183017. function data2(code2) {
  183018. if (code2 === null) {
  183019. effects.exit("chunkText");
  183020. effects.exit("paragraph");
  183021. effects.consume(code2);
  183022. return;
  183023. }
  183024. if (markdownLineEnding(code2)) {
  183025. effects.consume(code2);
  183026. effects.exit("chunkText");
  183027. return lineStart;
  183028. }
  183029. effects.consume(code2);
  183030. return data2;
  183031. }
  183032. }
  183033. // node_modules/micromark/lib/initialize/document.js
  183034. var document2 = {
  183035. tokenize: initializeDocument
  183036. };
  183037. var containerConstruct = {
  183038. tokenize: tokenizeContainer
  183039. };
  183040. function initializeDocument(effects) {
  183041. const self2 = this;
  183042. const stack = [];
  183043. let continued = 0;
  183044. let childFlow;
  183045. let childToken;
  183046. let lineStartOffset;
  183047. return start3;
  183048. function start3(code2) {
  183049. if (continued < stack.length) {
  183050. const item = stack[continued];
  183051. self2.containerState = item[1];
  183052. return effects.attempt(
  183053. item[0].continuation,
  183054. documentContinue,
  183055. checkNewContainers
  183056. )(code2);
  183057. }
  183058. return checkNewContainers(code2);
  183059. }
  183060. function documentContinue(code2) {
  183061. continued++;
  183062. if (self2.containerState._closeFlow) {
  183063. self2.containerState._closeFlow = void 0;
  183064. if (childFlow) {
  183065. closeFlow();
  183066. }
  183067. const indexBeforeExits = self2.events.length;
  183068. let indexBeforeFlow = indexBeforeExits;
  183069. let point3;
  183070. while (indexBeforeFlow--) {
  183071. if (self2.events[indexBeforeFlow][0] === "exit" && self2.events[indexBeforeFlow][1].type === "chunkFlow") {
  183072. point3 = self2.events[indexBeforeFlow][1].end;
  183073. break;
  183074. }
  183075. }
  183076. exitContainers(continued);
  183077. let index2 = indexBeforeExits;
  183078. while (index2 < self2.events.length) {
  183079. self2.events[index2][1].end = Object.assign({}, point3);
  183080. index2++;
  183081. }
  183082. splice(
  183083. self2.events,
  183084. indexBeforeFlow + 1,
  183085. 0,
  183086. self2.events.slice(indexBeforeExits)
  183087. );
  183088. self2.events.length = index2;
  183089. return checkNewContainers(code2);
  183090. }
  183091. return start3(code2);
  183092. }
  183093. function checkNewContainers(code2) {
  183094. if (continued === stack.length) {
  183095. if (!childFlow) {
  183096. return documentContinued(code2);
  183097. }
  183098. if (childFlow.currentConstruct && childFlow.currentConstruct.concrete) {
  183099. return flowStart(code2);
  183100. }
  183101. self2.interrupt = Boolean(
  183102. childFlow.currentConstruct && !childFlow._gfmTableDynamicInterruptHack
  183103. );
  183104. }
  183105. self2.containerState = {};
  183106. return effects.check(
  183107. containerConstruct,
  183108. thereIsANewContainer,
  183109. thereIsNoNewContainer
  183110. )(code2);
  183111. }
  183112. function thereIsANewContainer(code2) {
  183113. if (childFlow)
  183114. closeFlow();
  183115. exitContainers(continued);
  183116. return documentContinued(code2);
  183117. }
  183118. function thereIsNoNewContainer(code2) {
  183119. self2.parser.lazy[self2.now().line] = continued !== stack.length;
  183120. lineStartOffset = self2.now().offset;
  183121. return flowStart(code2);
  183122. }
  183123. function documentContinued(code2) {
  183124. self2.containerState = {};
  183125. return effects.attempt(
  183126. containerConstruct,
  183127. containerContinue,
  183128. flowStart
  183129. )(code2);
  183130. }
  183131. function containerContinue(code2) {
  183132. continued++;
  183133. stack.push([self2.currentConstruct, self2.containerState]);
  183134. return documentContinued(code2);
  183135. }
  183136. function flowStart(code2) {
  183137. if (code2 === null) {
  183138. if (childFlow)
  183139. closeFlow();
  183140. exitContainers(0);
  183141. effects.consume(code2);
  183142. return;
  183143. }
  183144. childFlow = childFlow || self2.parser.flow(self2.now());
  183145. effects.enter("chunkFlow", {
  183146. contentType: "flow",
  183147. previous: childToken,
  183148. _tokenizer: childFlow
  183149. });
  183150. return flowContinue(code2);
  183151. }
  183152. function flowContinue(code2) {
  183153. if (code2 === null) {
  183154. writeToChild(effects.exit("chunkFlow"), true);
  183155. exitContainers(0);
  183156. effects.consume(code2);
  183157. return;
  183158. }
  183159. if (markdownLineEnding(code2)) {
  183160. effects.consume(code2);
  183161. writeToChild(effects.exit("chunkFlow"));
  183162. continued = 0;
  183163. self2.interrupt = void 0;
  183164. return start3;
  183165. }
  183166. effects.consume(code2);
  183167. return flowContinue;
  183168. }
  183169. function writeToChild(token, eof) {
  183170. const stream = self2.sliceStream(token);
  183171. if (eof)
  183172. stream.push(null);
  183173. token.previous = childToken;
  183174. if (childToken)
  183175. childToken.next = token;
  183176. childToken = token;
  183177. childFlow.defineSkip(token.start);
  183178. childFlow.write(stream);
  183179. if (self2.parser.lazy[token.start.line]) {
  183180. let index2 = childFlow.events.length;
  183181. while (index2--) {
  183182. if (childFlow.events[index2][1].start.offset < lineStartOffset && (!childFlow.events[index2][1].end || childFlow.events[index2][1].end.offset > lineStartOffset)) {
  183183. return;
  183184. }
  183185. }
  183186. const indexBeforeExits = self2.events.length;
  183187. let indexBeforeFlow = indexBeforeExits;
  183188. let seen;
  183189. let point3;
  183190. while (indexBeforeFlow--) {
  183191. if (self2.events[indexBeforeFlow][0] === "exit" && self2.events[indexBeforeFlow][1].type === "chunkFlow") {
  183192. if (seen) {
  183193. point3 = self2.events[indexBeforeFlow][1].end;
  183194. break;
  183195. }
  183196. seen = true;
  183197. }
  183198. }
  183199. exitContainers(continued);
  183200. index2 = indexBeforeExits;
  183201. while (index2 < self2.events.length) {
  183202. self2.events[index2][1].end = Object.assign({}, point3);
  183203. index2++;
  183204. }
  183205. splice(
  183206. self2.events,
  183207. indexBeforeFlow + 1,
  183208. 0,
  183209. self2.events.slice(indexBeforeExits)
  183210. );
  183211. self2.events.length = index2;
  183212. }
  183213. }
  183214. function exitContainers(size) {
  183215. let index2 = stack.length;
  183216. while (index2-- > size) {
  183217. const entry = stack[index2];
  183218. self2.containerState = entry[1];
  183219. entry[0].exit.call(self2, effects);
  183220. }
  183221. stack.length = size;
  183222. }
  183223. function closeFlow() {
  183224. childFlow.write([null]);
  183225. childToken = void 0;
  183226. childFlow = void 0;
  183227. self2.containerState._closeFlow = void 0;
  183228. }
  183229. }
  183230. function tokenizeContainer(effects, ok2, nok) {
  183231. return factorySpace(
  183232. effects,
  183233. effects.attempt(this.parser.constructs.document, ok2, nok),
  183234. "linePrefix",
  183235. this.parser.constructs.disable.null.includes("codeIndented") ? void 0 : 4
  183236. );
  183237. }
  183238. // node_modules/micromark/lib/initialize/flow.js
  183239. var flow = {
  183240. tokenize: initializeFlow
  183241. };
  183242. function initializeFlow(effects) {
  183243. const self2 = this;
  183244. const initial = effects.attempt(
  183245. blankLine,
  183246. atBlankEnding,
  183247. effects.attempt(
  183248. this.parser.constructs.flowInitial,
  183249. afterConstruct,
  183250. factorySpace(
  183251. effects,
  183252. effects.attempt(
  183253. this.parser.constructs.flow,
  183254. afterConstruct,
  183255. effects.attempt(content, afterConstruct)
  183256. ),
  183257. "linePrefix"
  183258. )
  183259. )
  183260. );
  183261. return initial;
  183262. function atBlankEnding(code2) {
  183263. if (code2 === null) {
  183264. effects.consume(code2);
  183265. return;
  183266. }
  183267. effects.enter("lineEndingBlank");
  183268. effects.consume(code2);
  183269. effects.exit("lineEndingBlank");
  183270. self2.currentConstruct = void 0;
  183271. return initial;
  183272. }
  183273. function afterConstruct(code2) {
  183274. if (code2 === null) {
  183275. effects.consume(code2);
  183276. return;
  183277. }
  183278. effects.enter("lineEnding");
  183279. effects.consume(code2);
  183280. effects.exit("lineEnding");
  183281. self2.currentConstruct = void 0;
  183282. return initial;
  183283. }
  183284. }
  183285. // node_modules/micromark/lib/initialize/text.js
  183286. var resolver = {
  183287. resolveAll: createResolver()
  183288. };
  183289. var string = initializeFactory("string");
  183290. var text = initializeFactory("text");
  183291. function initializeFactory(field) {
  183292. return {
  183293. tokenize: initializeText,
  183294. resolveAll: createResolver(
  183295. field === "text" ? resolveAllLineSuffixes : void 0
  183296. )
  183297. };
  183298. function initializeText(effects) {
  183299. const self2 = this;
  183300. const constructs2 = this.parser.constructs[field];
  183301. const text5 = effects.attempt(constructs2, start3, notText);
  183302. return start3;
  183303. function start3(code2) {
  183304. return atBreak(code2) ? text5(code2) : notText(code2);
  183305. }
  183306. function notText(code2) {
  183307. if (code2 === null) {
  183308. effects.consume(code2);
  183309. return;
  183310. }
  183311. effects.enter("data");
  183312. effects.consume(code2);
  183313. return data2;
  183314. }
  183315. function data2(code2) {
  183316. if (atBreak(code2)) {
  183317. effects.exit("data");
  183318. return text5(code2);
  183319. }
  183320. effects.consume(code2);
  183321. return data2;
  183322. }
  183323. function atBreak(code2) {
  183324. if (code2 === null) {
  183325. return true;
  183326. }
  183327. const list3 = constructs2[code2];
  183328. let index2 = -1;
  183329. if (list3) {
  183330. while (++index2 < list3.length) {
  183331. const item = list3[index2];
  183332. if (!item.previous || item.previous.call(self2, self2.previous)) {
  183333. return true;
  183334. }
  183335. }
  183336. }
  183337. return false;
  183338. }
  183339. }
  183340. }
  183341. function createResolver(extraResolver) {
  183342. return resolveAllText;
  183343. function resolveAllText(events, context) {
  183344. let index2 = -1;
  183345. let enter;
  183346. while (++index2 <= events.length) {
  183347. if (enter === void 0) {
  183348. if (events[index2] && events[index2][1].type === "data") {
  183349. enter = index2;
  183350. index2++;
  183351. }
  183352. } else if (!events[index2] || events[index2][1].type !== "data") {
  183353. if (index2 !== enter + 2) {
  183354. events[enter][1].end = events[index2 - 1][1].end;
  183355. events.splice(enter + 2, index2 - enter - 2);
  183356. index2 = enter + 2;
  183357. }
  183358. enter = void 0;
  183359. }
  183360. }
  183361. return extraResolver ? extraResolver(events, context) : events;
  183362. }
  183363. }
  183364. function resolveAllLineSuffixes(events, context) {
  183365. let eventIndex = 0;
  183366. while (++eventIndex <= events.length) {
  183367. if ((eventIndex === events.length || events[eventIndex][1].type === "lineEnding") && events[eventIndex - 1][1].type === "data") {
  183368. const data2 = events[eventIndex - 1][1];
  183369. const chunks = context.sliceStream(data2);
  183370. let index2 = chunks.length;
  183371. let bufferIndex = -1;
  183372. let size = 0;
  183373. let tabs;
  183374. while (index2--) {
  183375. const chunk = chunks[index2];
  183376. if (typeof chunk === "string") {
  183377. bufferIndex = chunk.length;
  183378. while (chunk.charCodeAt(bufferIndex - 1) === 32) {
  183379. size++;
  183380. bufferIndex--;
  183381. }
  183382. if (bufferIndex)
  183383. break;
  183384. bufferIndex = -1;
  183385. } else if (chunk === -2) {
  183386. tabs = true;
  183387. size++;
  183388. } else if (chunk === -1) {
  183389. } else {
  183390. index2++;
  183391. break;
  183392. }
  183393. }
  183394. if (size) {
  183395. const token = {
  183396. type: eventIndex === events.length || tabs || size < 2 ? "lineSuffix" : "hardBreakTrailing",
  183397. start: {
  183398. line: data2.end.line,
  183399. column: data2.end.column - size,
  183400. offset: data2.end.offset - size,
  183401. _index: data2.start._index + index2,
  183402. _bufferIndex: index2 ? bufferIndex : data2.start._bufferIndex + bufferIndex
  183403. },
  183404. end: Object.assign({}, data2.end)
  183405. };
  183406. data2.end = Object.assign({}, token.start);
  183407. if (data2.start.offset === data2.end.offset) {
  183408. Object.assign(data2, token);
  183409. } else {
  183410. events.splice(
  183411. eventIndex,
  183412. 0,
  183413. ["enter", token, context],
  183414. ["exit", token, context]
  183415. );
  183416. eventIndex += 2;
  183417. }
  183418. }
  183419. eventIndex++;
  183420. }
  183421. }
  183422. return events;
  183423. }
  183424. // node_modules/micromark/lib/create-tokenizer.js
  183425. function createTokenizer(parser, initialize, from) {
  183426. let point3 = Object.assign(
  183427. from ? Object.assign({}, from) : {
  183428. line: 1,
  183429. column: 1,
  183430. offset: 0
  183431. },
  183432. {
  183433. _index: 0,
  183434. _bufferIndex: -1
  183435. }
  183436. );
  183437. const columnStart = {};
  183438. const resolveAllConstructs = [];
  183439. let chunks = [];
  183440. let stack = [];
  183441. let consumed = true;
  183442. const effects = {
  183443. consume,
  183444. enter,
  183445. exit: exit2,
  183446. attempt: constructFactory(onsuccessfulconstruct),
  183447. check: constructFactory(onsuccessfulcheck),
  183448. interrupt: constructFactory(onsuccessfulcheck, {
  183449. interrupt: true
  183450. })
  183451. };
  183452. const context = {
  183453. previous: null,
  183454. code: null,
  183455. containerState: {},
  183456. events: [],
  183457. parser,
  183458. sliceStream,
  183459. sliceSerialize,
  183460. now,
  183461. defineSkip,
  183462. write
  183463. };
  183464. let state = initialize.tokenize.call(context, effects);
  183465. let expectedCode;
  183466. if (initialize.resolveAll) {
  183467. resolveAllConstructs.push(initialize);
  183468. }
  183469. return context;
  183470. function write(slice2) {
  183471. chunks = push(chunks, slice2);
  183472. main();
  183473. if (chunks[chunks.length - 1] !== null) {
  183474. return [];
  183475. }
  183476. addResult(initialize, 0);
  183477. context.events = resolveAll(resolveAllConstructs, context.events, context);
  183478. return context.events;
  183479. }
  183480. function sliceSerialize(token, expandTabs) {
  183481. return serializeChunks(sliceStream(token), expandTabs);
  183482. }
  183483. function sliceStream(token) {
  183484. return sliceChunks(chunks, token);
  183485. }
  183486. function now() {
  183487. return Object.assign({}, point3);
  183488. }
  183489. function defineSkip(value) {
  183490. columnStart[value.line] = value.column;
  183491. accountForPotentialSkip();
  183492. }
  183493. function main() {
  183494. let chunkIndex;
  183495. while (point3._index < chunks.length) {
  183496. const chunk = chunks[point3._index];
  183497. if (typeof chunk === "string") {
  183498. chunkIndex = point3._index;
  183499. if (point3._bufferIndex < 0) {
  183500. point3._bufferIndex = 0;
  183501. }
  183502. while (point3._index === chunkIndex && point3._bufferIndex < chunk.length) {
  183503. go(chunk.charCodeAt(point3._bufferIndex));
  183504. }
  183505. } else {
  183506. go(chunk);
  183507. }
  183508. }
  183509. }
  183510. function go(code2) {
  183511. consumed = void 0;
  183512. expectedCode = code2;
  183513. state = state(code2);
  183514. }
  183515. function consume(code2) {
  183516. if (markdownLineEnding(code2)) {
  183517. point3.line++;
  183518. point3.column = 1;
  183519. point3.offset += code2 === -3 ? 2 : 1;
  183520. accountForPotentialSkip();
  183521. } else if (code2 !== -1) {
  183522. point3.column++;
  183523. point3.offset++;
  183524. }
  183525. if (point3._bufferIndex < 0) {
  183526. point3._index++;
  183527. } else {
  183528. point3._bufferIndex++;
  183529. if (point3._bufferIndex === chunks[point3._index].length) {
  183530. point3._bufferIndex = -1;
  183531. point3._index++;
  183532. }
  183533. }
  183534. context.previous = code2;
  183535. consumed = true;
  183536. }
  183537. function enter(type, fields) {
  183538. const token = fields || {};
  183539. token.type = type;
  183540. token.start = now();
  183541. context.events.push(["enter", token, context]);
  183542. stack.push(token);
  183543. return token;
  183544. }
  183545. function exit2(type) {
  183546. const token = stack.pop();
  183547. token.end = now();
  183548. context.events.push(["exit", token, context]);
  183549. return token;
  183550. }
  183551. function onsuccessfulconstruct(construct, info) {
  183552. addResult(construct, info.from);
  183553. }
  183554. function onsuccessfulcheck(_, info) {
  183555. info.restore();
  183556. }
  183557. function constructFactory(onreturn, fields) {
  183558. return hook;
  183559. function hook(constructs2, returnState, bogusState) {
  183560. let listOfConstructs;
  183561. let constructIndex;
  183562. let currentConstruct;
  183563. let info;
  183564. return Array.isArray(constructs2) ? handleListOfConstructs(constructs2) : "tokenize" in constructs2 ? handleListOfConstructs([constructs2]) : handleMapOfConstructs(constructs2);
  183565. function handleMapOfConstructs(map) {
  183566. return start3;
  183567. function start3(code2) {
  183568. const def = code2 !== null && map[code2];
  183569. const all4 = code2 !== null && map.null;
  183570. const list3 = [
  183571. ...Array.isArray(def) ? def : def ? [def] : [],
  183572. ...Array.isArray(all4) ? all4 : all4 ? [all4] : []
  183573. ];
  183574. return handleListOfConstructs(list3)(code2);
  183575. }
  183576. }
  183577. function handleListOfConstructs(list3) {
  183578. listOfConstructs = list3;
  183579. constructIndex = 0;
  183580. if (list3.length === 0) {
  183581. return bogusState;
  183582. }
  183583. return handleConstruct(list3[constructIndex]);
  183584. }
  183585. function handleConstruct(construct) {
  183586. return start3;
  183587. function start3(code2) {
  183588. info = store();
  183589. currentConstruct = construct;
  183590. if (!construct.partial) {
  183591. context.currentConstruct = construct;
  183592. }
  183593. if (construct.name && context.parser.constructs.disable.null.includes(construct.name)) {
  183594. return nok(code2);
  183595. }
  183596. return construct.tokenize.call(
  183597. fields ? Object.assign(Object.create(context), fields) : context,
  183598. effects,
  183599. ok2,
  183600. nok
  183601. )(code2);
  183602. }
  183603. }
  183604. function ok2(code2) {
  183605. consumed = true;
  183606. onreturn(currentConstruct, info);
  183607. return returnState;
  183608. }
  183609. function nok(code2) {
  183610. consumed = true;
  183611. info.restore();
  183612. if (++constructIndex < listOfConstructs.length) {
  183613. return handleConstruct(listOfConstructs[constructIndex]);
  183614. }
  183615. return bogusState;
  183616. }
  183617. }
  183618. }
  183619. function addResult(construct, from2) {
  183620. if (construct.resolveAll && !resolveAllConstructs.includes(construct)) {
  183621. resolveAllConstructs.push(construct);
  183622. }
  183623. if (construct.resolve) {
  183624. splice(
  183625. context.events,
  183626. from2,
  183627. context.events.length - from2,
  183628. construct.resolve(context.events.slice(from2), context)
  183629. );
  183630. }
  183631. if (construct.resolveTo) {
  183632. context.events = construct.resolveTo(context.events, context);
  183633. }
  183634. }
  183635. function store() {
  183636. const startPoint = now();
  183637. const startPrevious = context.previous;
  183638. const startCurrentConstruct = context.currentConstruct;
  183639. const startEventsIndex = context.events.length;
  183640. const startStack = Array.from(stack);
  183641. return {
  183642. restore,
  183643. from: startEventsIndex
  183644. };
  183645. function restore() {
  183646. point3 = startPoint;
  183647. context.previous = startPrevious;
  183648. context.currentConstruct = startCurrentConstruct;
  183649. context.events.length = startEventsIndex;
  183650. stack = startStack;
  183651. accountForPotentialSkip();
  183652. }
  183653. }
  183654. function accountForPotentialSkip() {
  183655. if (point3.line in columnStart && point3.column < 2) {
  183656. point3.column = columnStart[point3.line];
  183657. point3.offset += columnStart[point3.line] - 1;
  183658. }
  183659. }
  183660. }
  183661. function sliceChunks(chunks, token) {
  183662. const startIndex = token.start._index;
  183663. const startBufferIndex = token.start._bufferIndex;
  183664. const endIndex = token.end._index;
  183665. const endBufferIndex = token.end._bufferIndex;
  183666. let view;
  183667. if (startIndex === endIndex) {
  183668. view = [chunks[startIndex].slice(startBufferIndex, endBufferIndex)];
  183669. } else {
  183670. view = chunks.slice(startIndex, endIndex);
  183671. if (startBufferIndex > -1) {
  183672. view[0] = view[0].slice(startBufferIndex);
  183673. }
  183674. if (endBufferIndex > 0) {
  183675. view.push(chunks[endIndex].slice(0, endBufferIndex));
  183676. }
  183677. }
  183678. return view;
  183679. }
  183680. function serializeChunks(chunks, expandTabs) {
  183681. let index2 = -1;
  183682. const result = [];
  183683. let atTab;
  183684. while (++index2 < chunks.length) {
  183685. const chunk = chunks[index2];
  183686. let value;
  183687. if (typeof chunk === "string") {
  183688. value = chunk;
  183689. } else
  183690. switch (chunk) {
  183691. case -5: {
  183692. value = "\r";
  183693. break;
  183694. }
  183695. case -4: {
  183696. value = "\n";
  183697. break;
  183698. }
  183699. case -3: {
  183700. value = "\r\n";
  183701. break;
  183702. }
  183703. case -2: {
  183704. value = expandTabs ? " " : " ";
  183705. break;
  183706. }
  183707. case -1: {
  183708. if (!expandTabs && atTab)
  183709. continue;
  183710. value = " ";
  183711. break;
  183712. }
  183713. default: {
  183714. value = String.fromCharCode(chunk);
  183715. }
  183716. }
  183717. atTab = chunk === -2;
  183718. result.push(value);
  183719. }
  183720. return result.join("");
  183721. }
  183722. // node_modules/micromark/lib/constructs.js
  183723. var constructs_exports = {};
  183724. __export(constructs_exports, {
  183725. attentionMarkers: () => attentionMarkers,
  183726. contentInitial: () => contentInitial,
  183727. disable: () => disable,
  183728. document: () => document3,
  183729. flow: () => flow2,
  183730. flowInitial: () => flowInitial,
  183731. insideSpan: () => insideSpan,
  183732. string: () => string2,
  183733. text: () => text2
  183734. });
  183735. var document3 = {
  183736. [42]: list,
  183737. [43]: list,
  183738. [45]: list,
  183739. [48]: list,
  183740. [49]: list,
  183741. [50]: list,
  183742. [51]: list,
  183743. [52]: list,
  183744. [53]: list,
  183745. [54]: list,
  183746. [55]: list,
  183747. [56]: list,
  183748. [57]: list,
  183749. [62]: blockQuote
  183750. };
  183751. var contentInitial = {
  183752. [91]: definition
  183753. };
  183754. var flowInitial = {
  183755. [-2]: codeIndented,
  183756. [-1]: codeIndented,
  183757. [32]: codeIndented
  183758. };
  183759. var flow2 = {
  183760. [35]: headingAtx,
  183761. [42]: thematicBreak,
  183762. [45]: [setextUnderline, thematicBreak],
  183763. [60]: htmlFlow,
  183764. [61]: setextUnderline,
  183765. [95]: thematicBreak,
  183766. [96]: codeFenced,
  183767. [126]: codeFenced
  183768. };
  183769. var string2 = {
  183770. [38]: characterReference,
  183771. [92]: characterEscape
  183772. };
  183773. var text2 = {
  183774. [-5]: lineEnding,
  183775. [-4]: lineEnding,
  183776. [-3]: lineEnding,
  183777. [33]: labelStartImage,
  183778. [38]: characterReference,
  183779. [42]: attention,
  183780. [60]: [autolink, htmlText],
  183781. [91]: labelStartLink,
  183782. [92]: [hardBreakEscape, characterEscape],
  183783. [93]: labelEnd,
  183784. [95]: attention,
  183785. [96]: codeText
  183786. };
  183787. var insideSpan = {
  183788. null: [attention, resolver]
  183789. };
  183790. var attentionMarkers = {
  183791. null: [42, 95]
  183792. };
  183793. var disable = {
  183794. null: []
  183795. };
  183796. // node_modules/micromark/lib/parse.js
  183797. function parse3(options = {}) {
  183798. const constructs2 = combineExtensions(
  183799. [constructs_exports].concat(options.extensions || [])
  183800. );
  183801. const parser = {
  183802. defined: [],
  183803. lazy: {},
  183804. constructs: constructs2,
  183805. content: create5(content2),
  183806. document: create5(document2),
  183807. flow: create5(flow),
  183808. string: create5(string),
  183809. text: create5(text)
  183810. };
  183811. return parser;
  183812. function create5(initial) {
  183813. return creator;
  183814. function creator(from) {
  183815. return createTokenizer(parser, initial, from);
  183816. }
  183817. }
  183818. }
  183819. // node_modules/micromark/lib/preprocess.js
  183820. var search = /[\0\t\n\r]/g;
  183821. function preprocess() {
  183822. let column = 1;
  183823. let buffer2 = "";
  183824. let start3 = true;
  183825. let atCarriageReturn;
  183826. return preprocessor;
  183827. function preprocessor(value, encoding, end) {
  183828. const chunks = [];
  183829. let match;
  183830. let next;
  183831. let startPosition;
  183832. let endPosition;
  183833. let code2;
  183834. value = buffer2 + value.toString(encoding);
  183835. startPosition = 0;
  183836. buffer2 = "";
  183837. if (start3) {
  183838. if (value.charCodeAt(0) === 65279) {
  183839. startPosition++;
  183840. }
  183841. start3 = void 0;
  183842. }
  183843. while (startPosition < value.length) {
  183844. search.lastIndex = startPosition;
  183845. match = search.exec(value);
  183846. endPosition = match && match.index !== void 0 ? match.index : value.length;
  183847. code2 = value.charCodeAt(endPosition);
  183848. if (!match) {
  183849. buffer2 = value.slice(startPosition);
  183850. break;
  183851. }
  183852. if (code2 === 10 && startPosition === endPosition && atCarriageReturn) {
  183853. chunks.push(-3);
  183854. atCarriageReturn = void 0;
  183855. } else {
  183856. if (atCarriageReturn) {
  183857. chunks.push(-5);
  183858. atCarriageReturn = void 0;
  183859. }
  183860. if (startPosition < endPosition) {
  183861. chunks.push(value.slice(startPosition, endPosition));
  183862. column += endPosition - startPosition;
  183863. }
  183864. switch (code2) {
  183865. case 0: {
  183866. chunks.push(65533);
  183867. column++;
  183868. break;
  183869. }
  183870. case 9: {
  183871. next = Math.ceil(column / 4) * 4;
  183872. chunks.push(-2);
  183873. while (column++ < next)
  183874. chunks.push(-1);
  183875. break;
  183876. }
  183877. case 10: {
  183878. chunks.push(-4);
  183879. column = 1;
  183880. break;
  183881. }
  183882. default: {
  183883. atCarriageReturn = true;
  183884. column = 1;
  183885. }
  183886. }
  183887. }
  183888. startPosition = endPosition + 1;
  183889. }
  183890. if (end) {
  183891. if (atCarriageReturn)
  183892. chunks.push(-5);
  183893. if (buffer2)
  183894. chunks.push(buffer2);
  183895. chunks.push(null);
  183896. }
  183897. return chunks;
  183898. }
  183899. }
  183900. // node_modules/micromark/lib/postprocess.js
  183901. function postprocess(events) {
  183902. while (!subtokenize(events)) {
  183903. }
  183904. return events;
  183905. }
  183906. // node_modules/micromark-util-decode-numeric-character-reference/index.js
  183907. function decodeNumericCharacterReference(value, base2) {
  183908. const code2 = Number.parseInt(value, base2);
  183909. if (code2 < 9 || code2 === 11 || code2 > 13 && code2 < 32 || code2 > 126 && code2 < 160 || code2 > 55295 && code2 < 57344 || code2 > 64975 && code2 < 65008 || (code2 & 65535) === 65535 || (code2 & 65535) === 65534 || code2 > 1114111) {
  183910. return "\uFFFD";
  183911. }
  183912. return String.fromCharCode(code2);
  183913. }
  183914. // node_modules/micromark-util-decode-string/index.js
  183915. var characterEscapeOrReference = /\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;
  183916. function decodeString(value) {
  183917. return value.replace(characterEscapeOrReference, decode);
  183918. }
  183919. function decode($0, $1, $2) {
  183920. if ($1) {
  183921. return $1;
  183922. }
  183923. const head = $2.charCodeAt(0);
  183924. if (head === 35) {
  183925. const head2 = $2.charCodeAt(1);
  183926. const hex = head2 === 120 || head2 === 88;
  183927. return decodeNumericCharacterReference($2.slice(hex ? 2 : 1), hex ? 16 : 10);
  183928. }
  183929. return decodeNamedCharacterReference($2) || $0;
  183930. }
  183931. // node_modules/mdast-util-from-markdown/lib/index.js
  183932. var own6 = {}.hasOwnProperty;
  183933. var fromMarkdown = function(value, encoding, options) {
  183934. if (typeof encoding !== "string") {
  183935. options = encoding;
  183936. encoding = void 0;
  183937. }
  183938. return compiler(options)(
  183939. postprocess(
  183940. parse3(options).document().write(preprocess()(value, encoding, true))
  183941. )
  183942. );
  183943. };
  183944. function compiler(options = {}) {
  183945. const config = configure(
  183946. {
  183947. transforms: [],
  183948. canContainEols: [
  183949. "emphasis",
  183950. "fragment",
  183951. "heading",
  183952. "paragraph",
  183953. "strong"
  183954. ],
  183955. enter: {
  183956. autolink: opener(link2),
  183957. autolinkProtocol: onenterdata,
  183958. autolinkEmail: onenterdata,
  183959. atxHeading: opener(heading2),
  183960. blockQuote: opener(blockQuote2),
  183961. characterEscape: onenterdata,
  183962. characterReference: onenterdata,
  183963. codeFenced: opener(codeFlow),
  183964. codeFencedFenceInfo: buffer2,
  183965. codeFencedFenceMeta: buffer2,
  183966. codeIndented: opener(codeFlow, buffer2),
  183967. codeText: opener(codeText2, buffer2),
  183968. codeTextData: onenterdata,
  183969. data: onenterdata,
  183970. codeFlowValue: onenterdata,
  183971. definition: opener(definition2),
  183972. definitionDestinationString: buffer2,
  183973. definitionLabelString: buffer2,
  183974. definitionTitleString: buffer2,
  183975. emphasis: opener(emphasis2),
  183976. hardBreakEscape: opener(hardBreak2),
  183977. hardBreakTrailing: opener(hardBreak2),
  183978. htmlFlow: opener(html4, buffer2),
  183979. htmlFlowData: onenterdata,
  183980. htmlText: opener(html4, buffer2),
  183981. htmlTextData: onenterdata,
  183982. image: opener(image2),
  183983. label: buffer2,
  183984. link: opener(link2),
  183985. listItem: opener(listItem2),
  183986. listItemValue: onenterlistitemvalue,
  183987. listOrdered: opener(list3, onenterlistordered),
  183988. listUnordered: opener(list3),
  183989. paragraph: opener(paragraph2),
  183990. reference: onenterreference,
  183991. referenceString: buffer2,
  183992. resourceDestinationString: buffer2,
  183993. resourceTitleString: buffer2,
  183994. setextHeading: opener(heading2),
  183995. strong: opener(strong2),
  183996. thematicBreak: opener(thematicBreak3)
  183997. },
  183998. exit: {
  183999. atxHeading: closer(),
  184000. atxHeadingSequence: onexitatxheadingsequence,
  184001. autolink: closer(),
  184002. autolinkEmail: onexitautolinkemail,
  184003. autolinkProtocol: onexitautolinkprotocol,
  184004. blockQuote: closer(),
  184005. characterEscapeValue: onexitdata,
  184006. characterReferenceMarkerHexadecimal: onexitcharacterreferencemarker,
  184007. characterReferenceMarkerNumeric: onexitcharacterreferencemarker,
  184008. characterReferenceValue: onexitcharacterreferencevalue,
  184009. codeFenced: closer(onexitcodefenced),
  184010. codeFencedFence: onexitcodefencedfence,
  184011. codeFencedFenceInfo: onexitcodefencedfenceinfo,
  184012. codeFencedFenceMeta: onexitcodefencedfencemeta,
  184013. codeFlowValue: onexitdata,
  184014. codeIndented: closer(onexitcodeindented),
  184015. codeText: closer(onexitcodetext),
  184016. codeTextData: onexitdata,
  184017. data: onexitdata,
  184018. definition: closer(),
  184019. definitionDestinationString: onexitdefinitiondestinationstring,
  184020. definitionLabelString: onexitdefinitionlabelstring,
  184021. definitionTitleString: onexitdefinitiontitlestring,
  184022. emphasis: closer(),
  184023. hardBreakEscape: closer(onexithardbreak),
  184024. hardBreakTrailing: closer(onexithardbreak),
  184025. htmlFlow: closer(onexithtmlflow),
  184026. htmlFlowData: onexitdata,
  184027. htmlText: closer(onexithtmltext),
  184028. htmlTextData: onexitdata,
  184029. image: closer(onexitimage),
  184030. label: onexitlabel,
  184031. labelText: onexitlabeltext,
  184032. lineEnding: onexitlineending,
  184033. link: closer(onexitlink),
  184034. listItem: closer(),
  184035. listOrdered: closer(),
  184036. listUnordered: closer(),
  184037. paragraph: closer(),
  184038. referenceString: onexitreferencestring,
  184039. resourceDestinationString: onexitresourcedestinationstring,
  184040. resourceTitleString: onexitresourcetitlestring,
  184041. resource: onexitresource,
  184042. setextHeading: closer(onexitsetextheading),
  184043. setextHeadingLineSequence: onexitsetextheadinglinesequence,
  184044. setextHeadingText: onexitsetextheadingtext,
  184045. strong: closer(),
  184046. thematicBreak: closer()
  184047. }
  184048. },
  184049. options.mdastExtensions || []
  184050. );
  184051. const data2 = {};
  184052. return compile2;
  184053. function compile2(events) {
  184054. let tree = {
  184055. type: "root",
  184056. children: []
  184057. };
  184058. const stack = [tree];
  184059. const tokenStack = [];
  184060. const listStack = [];
  184061. const context = {
  184062. stack,
  184063. tokenStack,
  184064. config,
  184065. enter,
  184066. exit: exit2,
  184067. buffer: buffer2,
  184068. resume,
  184069. setData,
  184070. getData
  184071. };
  184072. let index2 = -1;
  184073. while (++index2 < events.length) {
  184074. if (events[index2][1].type === "listOrdered" || events[index2][1].type === "listUnordered") {
  184075. if (events[index2][0] === "enter") {
  184076. listStack.push(index2);
  184077. } else {
  184078. const tail = listStack.pop();
  184079. index2 = prepareList(events, tail, index2);
  184080. }
  184081. }
  184082. }
  184083. index2 = -1;
  184084. while (++index2 < events.length) {
  184085. const handler = config[events[index2][0]];
  184086. if (own6.call(handler, events[index2][1].type)) {
  184087. handler[events[index2][1].type].call(
  184088. Object.assign(
  184089. {
  184090. sliceSerialize: events[index2][2].sliceSerialize
  184091. },
  184092. context
  184093. ),
  184094. events[index2][1]
  184095. );
  184096. }
  184097. }
  184098. if (tokenStack.length > 0) {
  184099. const tail = tokenStack[tokenStack.length - 1];
  184100. const handler = tail[1] || defaultOnError;
  184101. handler.call(context, void 0, tail[0]);
  184102. }
  184103. tree.position = {
  184104. start: point3(
  184105. events.length > 0 ? events[0][1].start : {
  184106. line: 1,
  184107. column: 1,
  184108. offset: 0
  184109. }
  184110. ),
  184111. end: point3(
  184112. events.length > 0 ? events[events.length - 2][1].end : {
  184113. line: 1,
  184114. column: 1,
  184115. offset: 0
  184116. }
  184117. )
  184118. };
  184119. index2 = -1;
  184120. while (++index2 < config.transforms.length) {
  184121. tree = config.transforms[index2](tree) || tree;
  184122. }
  184123. return tree;
  184124. }
  184125. function prepareList(events, start3, length) {
  184126. let index2 = start3 - 1;
  184127. let containerBalance = -1;
  184128. let listSpread = false;
  184129. let listItem3;
  184130. let lineIndex;
  184131. let firstBlankLineIndex;
  184132. let atMarker;
  184133. while (++index2 <= length) {
  184134. const event = events[index2];
  184135. if (event[1].type === "listUnordered" || event[1].type === "listOrdered" || event[1].type === "blockQuote") {
  184136. if (event[0] === "enter") {
  184137. containerBalance++;
  184138. } else {
  184139. containerBalance--;
  184140. }
  184141. atMarker = void 0;
  184142. } else if (event[1].type === "lineEndingBlank") {
  184143. if (event[0] === "enter") {
  184144. if (listItem3 && !atMarker && !containerBalance && !firstBlankLineIndex) {
  184145. firstBlankLineIndex = index2;
  184146. }
  184147. atMarker = void 0;
  184148. }
  184149. } else if (event[1].type === "linePrefix" || event[1].type === "listItemValue" || event[1].type === "listItemMarker" || event[1].type === "listItemPrefix" || event[1].type === "listItemPrefixWhitespace") {
  184150. } else {
  184151. atMarker = void 0;
  184152. }
  184153. if (!containerBalance && event[0] === "enter" && event[1].type === "listItemPrefix" || containerBalance === -1 && event[0] === "exit" && (event[1].type === "listUnordered" || event[1].type === "listOrdered")) {
  184154. if (listItem3) {
  184155. let tailIndex = index2;
  184156. lineIndex = void 0;
  184157. while (tailIndex--) {
  184158. const tailEvent = events[tailIndex];
  184159. if (tailEvent[1].type === "lineEnding" || tailEvent[1].type === "lineEndingBlank") {
  184160. if (tailEvent[0] === "exit")
  184161. continue;
  184162. if (lineIndex) {
  184163. events[lineIndex][1].type = "lineEndingBlank";
  184164. listSpread = true;
  184165. }
  184166. tailEvent[1].type = "lineEnding";
  184167. lineIndex = tailIndex;
  184168. } else if (tailEvent[1].type === "linePrefix" || tailEvent[1].type === "blockQuotePrefix" || tailEvent[1].type === "blockQuotePrefixWhitespace" || tailEvent[1].type === "blockQuoteMarker" || tailEvent[1].type === "listItemIndent") {
  184169. } else {
  184170. break;
  184171. }
  184172. }
  184173. if (firstBlankLineIndex && (!lineIndex || firstBlankLineIndex < lineIndex)) {
  184174. listItem3._spread = true;
  184175. }
  184176. listItem3.end = Object.assign(
  184177. {},
  184178. lineIndex ? events[lineIndex][1].start : event[1].end
  184179. );
  184180. events.splice(lineIndex || index2, 0, ["exit", listItem3, event[2]]);
  184181. index2++;
  184182. length++;
  184183. }
  184184. if (event[1].type === "listItemPrefix") {
  184185. listItem3 = {
  184186. type: "listItem",
  184187. _spread: false,
  184188. start: Object.assign({}, event[1].start)
  184189. };
  184190. events.splice(index2, 0, ["enter", listItem3, event[2]]);
  184191. index2++;
  184192. length++;
  184193. firstBlankLineIndex = void 0;
  184194. atMarker = true;
  184195. }
  184196. }
  184197. }
  184198. events[start3][1]._spread = listSpread;
  184199. return length;
  184200. }
  184201. function setData(key, value) {
  184202. data2[key] = value;
  184203. }
  184204. function getData(key) {
  184205. return data2[key];
  184206. }
  184207. function point3(d) {
  184208. return {
  184209. line: d.line,
  184210. column: d.column,
  184211. offset: d.offset
  184212. };
  184213. }
  184214. function opener(create5, and) {
  184215. return open;
  184216. function open(token) {
  184217. enter.call(this, create5(token), token);
  184218. if (and)
  184219. and.call(this, token);
  184220. }
  184221. }
  184222. function buffer2() {
  184223. this.stack.push({
  184224. type: "fragment",
  184225. children: []
  184226. });
  184227. }
  184228. function enter(node, token, errorHandler) {
  184229. const parent = this.stack[this.stack.length - 1];
  184230. parent.children.push(node);
  184231. this.stack.push(node);
  184232. this.tokenStack.push([token, errorHandler]);
  184233. node.position = {
  184234. start: point3(token.start)
  184235. };
  184236. return node;
  184237. }
  184238. function closer(and) {
  184239. return close;
  184240. function close(token) {
  184241. if (and)
  184242. and.call(this, token);
  184243. exit2.call(this, token);
  184244. }
  184245. }
  184246. function exit2(token, onExitError) {
  184247. const node = this.stack.pop();
  184248. const open = this.tokenStack.pop();
  184249. if (!open) {
  184250. throw new Error(
  184251. "Cannot close `" + token.type + "` (" + stringifyPosition({
  184252. start: token.start,
  184253. end: token.end
  184254. }) + "): it\u2019s not open"
  184255. );
  184256. } else if (open[0].type !== token.type) {
  184257. if (onExitError) {
  184258. onExitError.call(this, token, open[0]);
  184259. } else {
  184260. const handler = open[1] || defaultOnError;
  184261. handler.call(this, token, open[0]);
  184262. }
  184263. }
  184264. node.position.end = point3(token.end);
  184265. return node;
  184266. }
  184267. function resume() {
  184268. return toString2(this.stack.pop());
  184269. }
  184270. function onenterlistordered() {
  184271. setData("expectingFirstListItemValue", true);
  184272. }
  184273. function onenterlistitemvalue(token) {
  184274. if (getData("expectingFirstListItemValue")) {
  184275. const ancestor = this.stack[this.stack.length - 2];
  184276. ancestor.start = Number.parseInt(this.sliceSerialize(token), 10);
  184277. setData("expectingFirstListItemValue");
  184278. }
  184279. }
  184280. function onexitcodefencedfenceinfo() {
  184281. const data3 = this.resume();
  184282. const node = this.stack[this.stack.length - 1];
  184283. node.lang = data3;
  184284. }
  184285. function onexitcodefencedfencemeta() {
  184286. const data3 = this.resume();
  184287. const node = this.stack[this.stack.length - 1];
  184288. node.meta = data3;
  184289. }
  184290. function onexitcodefencedfence() {
  184291. if (getData("flowCodeInside"))
  184292. return;
  184293. this.buffer();
  184294. setData("flowCodeInside", true);
  184295. }
  184296. function onexitcodefenced() {
  184297. const data3 = this.resume();
  184298. const node = this.stack[this.stack.length - 1];
  184299. node.value = data3.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g, "");
  184300. setData("flowCodeInside");
  184301. }
  184302. function onexitcodeindented() {
  184303. const data3 = this.resume();
  184304. const node = this.stack[this.stack.length - 1];
  184305. node.value = data3.replace(/(\r?\n|\r)$/g, "");
  184306. }
  184307. function onexitdefinitionlabelstring(token) {
  184308. const label = this.resume();
  184309. const node = this.stack[this.stack.length - 1];
  184310. node.label = label;
  184311. node.identifier = normalizeIdentifier(
  184312. this.sliceSerialize(token)
  184313. ).toLowerCase();
  184314. }
  184315. function onexitdefinitiontitlestring() {
  184316. const data3 = this.resume();
  184317. const node = this.stack[this.stack.length - 1];
  184318. node.title = data3;
  184319. }
  184320. function onexitdefinitiondestinationstring() {
  184321. const data3 = this.resume();
  184322. const node = this.stack[this.stack.length - 1];
  184323. node.url = data3;
  184324. }
  184325. function onexitatxheadingsequence(token) {
  184326. const node = this.stack[this.stack.length - 1];
  184327. if (!node.depth) {
  184328. const depth = this.sliceSerialize(token).length;
  184329. node.depth = depth;
  184330. }
  184331. }
  184332. function onexitsetextheadingtext() {
  184333. setData("setextHeadingSlurpLineEnding", true);
  184334. }
  184335. function onexitsetextheadinglinesequence(token) {
  184336. const node = this.stack[this.stack.length - 1];
  184337. node.depth = this.sliceSerialize(token).charCodeAt(0) === 61 ? 1 : 2;
  184338. }
  184339. function onexitsetextheading() {
  184340. setData("setextHeadingSlurpLineEnding");
  184341. }
  184342. function onenterdata(token) {
  184343. const parent = this.stack[this.stack.length - 1];
  184344. let tail = parent.children[parent.children.length - 1];
  184345. if (!tail || tail.type !== "text") {
  184346. tail = text5();
  184347. tail.position = {
  184348. start: point3(token.start)
  184349. };
  184350. parent.children.push(tail);
  184351. }
  184352. this.stack.push(tail);
  184353. }
  184354. function onexitdata(token) {
  184355. const tail = this.stack.pop();
  184356. tail.value += this.sliceSerialize(token);
  184357. tail.position.end = point3(token.end);
  184358. }
  184359. function onexitlineending(token) {
  184360. const context = this.stack[this.stack.length - 1];
  184361. if (getData("atHardBreak")) {
  184362. const tail = context.children[context.children.length - 1];
  184363. tail.position.end = point3(token.end);
  184364. setData("atHardBreak");
  184365. return;
  184366. }
  184367. if (!getData("setextHeadingSlurpLineEnding") && config.canContainEols.includes(context.type)) {
  184368. onenterdata.call(this, token);
  184369. onexitdata.call(this, token);
  184370. }
  184371. }
  184372. function onexithardbreak() {
  184373. setData("atHardBreak", true);
  184374. }
  184375. function onexithtmlflow() {
  184376. const data3 = this.resume();
  184377. const node = this.stack[this.stack.length - 1];
  184378. node.value = data3;
  184379. }
  184380. function onexithtmltext() {
  184381. const data3 = this.resume();
  184382. const node = this.stack[this.stack.length - 1];
  184383. node.value = data3;
  184384. }
  184385. function onexitcodetext() {
  184386. const data3 = this.resume();
  184387. const node = this.stack[this.stack.length - 1];
  184388. node.value = data3;
  184389. }
  184390. function onexitlink() {
  184391. const context = this.stack[this.stack.length - 1];
  184392. if (getData("inReference")) {
  184393. context.type += "Reference";
  184394. context.referenceType = getData("referenceType") || "shortcut";
  184395. delete context.url;
  184396. delete context.title;
  184397. } else {
  184398. delete context.identifier;
  184399. delete context.label;
  184400. }
  184401. setData("referenceType");
  184402. }
  184403. function onexitimage() {
  184404. const context = this.stack[this.stack.length - 1];
  184405. if (getData("inReference")) {
  184406. context.type += "Reference";
  184407. context.referenceType = getData("referenceType") || "shortcut";
  184408. delete context.url;
  184409. delete context.title;
  184410. } else {
  184411. delete context.identifier;
  184412. delete context.label;
  184413. }
  184414. setData("referenceType");
  184415. }
  184416. function onexitlabeltext(token) {
  184417. const ancestor = this.stack[this.stack.length - 2];
  184418. const string3 = this.sliceSerialize(token);
  184419. ancestor.label = decodeString(string3);
  184420. ancestor.identifier = normalizeIdentifier(string3).toLowerCase();
  184421. }
  184422. function onexitlabel() {
  184423. const fragment = this.stack[this.stack.length - 1];
  184424. const value = this.resume();
  184425. const node = this.stack[this.stack.length - 1];
  184426. setData("inReference", true);
  184427. if (node.type === "link") {
  184428. node.children = fragment.children;
  184429. } else {
  184430. node.alt = value;
  184431. }
  184432. }
  184433. function onexitresourcedestinationstring() {
  184434. const data3 = this.resume();
  184435. const node = this.stack[this.stack.length - 1];
  184436. node.url = data3;
  184437. }
  184438. function onexitresourcetitlestring() {
  184439. const data3 = this.resume();
  184440. const node = this.stack[this.stack.length - 1];
  184441. node.title = data3;
  184442. }
  184443. function onexitresource() {
  184444. setData("inReference");
  184445. }
  184446. function onenterreference() {
  184447. setData("referenceType", "collapsed");
  184448. }
  184449. function onexitreferencestring(token) {
  184450. const label = this.resume();
  184451. const node = this.stack[this.stack.length - 1];
  184452. node.label = label;
  184453. node.identifier = normalizeIdentifier(
  184454. this.sliceSerialize(token)
  184455. ).toLowerCase();
  184456. setData("referenceType", "full");
  184457. }
  184458. function onexitcharacterreferencemarker(token) {
  184459. setData("characterReferenceType", token.type);
  184460. }
  184461. function onexitcharacterreferencevalue(token) {
  184462. const data3 = this.sliceSerialize(token);
  184463. const type = getData("characterReferenceType");
  184464. let value;
  184465. if (type) {
  184466. value = decodeNumericCharacterReference(
  184467. data3,
  184468. type === "characterReferenceMarkerNumeric" ? 10 : 16
  184469. );
  184470. setData("characterReferenceType");
  184471. } else {
  184472. value = decodeNamedCharacterReference(data3);
  184473. }
  184474. const tail = this.stack.pop();
  184475. tail.value += value;
  184476. tail.position.end = point3(token.end);
  184477. }
  184478. function onexitautolinkprotocol(token) {
  184479. onexitdata.call(this, token);
  184480. const node = this.stack[this.stack.length - 1];
  184481. node.url = this.sliceSerialize(token);
  184482. }
  184483. function onexitautolinkemail(token) {
  184484. onexitdata.call(this, token);
  184485. const node = this.stack[this.stack.length - 1];
  184486. node.url = "mailto:" + this.sliceSerialize(token);
  184487. }
  184488. function blockQuote2() {
  184489. return {
  184490. type: "blockquote",
  184491. children: []
  184492. };
  184493. }
  184494. function codeFlow() {
  184495. return {
  184496. type: "code",
  184497. lang: null,
  184498. meta: null,
  184499. value: ""
  184500. };
  184501. }
  184502. function codeText2() {
  184503. return {
  184504. type: "inlineCode",
  184505. value: ""
  184506. };
  184507. }
  184508. function definition2() {
  184509. return {
  184510. type: "definition",
  184511. identifier: "",
  184512. label: null,
  184513. title: null,
  184514. url: ""
  184515. };
  184516. }
  184517. function emphasis2() {
  184518. return {
  184519. type: "emphasis",
  184520. children: []
  184521. };
  184522. }
  184523. function heading2() {
  184524. return {
  184525. type: "heading",
  184526. depth: void 0,
  184527. children: []
  184528. };
  184529. }
  184530. function hardBreak2() {
  184531. return {
  184532. type: "break"
  184533. };
  184534. }
  184535. function html4() {
  184536. return {
  184537. type: "html",
  184538. value: ""
  184539. };
  184540. }
  184541. function image2() {
  184542. return {
  184543. type: "image",
  184544. title: null,
  184545. url: "",
  184546. alt: null
  184547. };
  184548. }
  184549. function link2() {
  184550. return {
  184551. type: "link",
  184552. title: null,
  184553. url: "",
  184554. children: []
  184555. };
  184556. }
  184557. function list3(token) {
  184558. return {
  184559. type: "list",
  184560. ordered: token.type === "listOrdered",
  184561. start: null,
  184562. spread: token._spread,
  184563. children: []
  184564. };
  184565. }
  184566. function listItem2(token) {
  184567. return {
  184568. type: "listItem",
  184569. spread: token._spread,
  184570. checked: null,
  184571. children: []
  184572. };
  184573. }
  184574. function paragraph2() {
  184575. return {
  184576. type: "paragraph",
  184577. children: []
  184578. };
  184579. }
  184580. function strong2() {
  184581. return {
  184582. type: "strong",
  184583. children: []
  184584. };
  184585. }
  184586. function text5() {
  184587. return {
  184588. type: "text",
  184589. value: ""
  184590. };
  184591. }
  184592. function thematicBreak3() {
  184593. return {
  184594. type: "thematicBreak"
  184595. };
  184596. }
  184597. }
  184598. function configure(combined, extensions) {
  184599. let index2 = -1;
  184600. while (++index2 < extensions.length) {
  184601. const value = extensions[index2];
  184602. if (Array.isArray(value)) {
  184603. configure(combined, value);
  184604. } else {
  184605. extension(combined, value);
  184606. }
  184607. }
  184608. return combined;
  184609. }
  184610. function extension(combined, extension2) {
  184611. let key;
  184612. for (key in extension2) {
  184613. if (own6.call(extension2, key)) {
  184614. const list3 = key === "canContainEols" || key === "transforms";
  184615. const maybe = own6.call(combined, key) ? combined[key] : void 0;
  184616. const left = maybe || (combined[key] = list3 ? [] : {});
  184617. const right = extension2[key];
  184618. if (right) {
  184619. if (list3) {
  184620. combined[key] = [...left, ...right];
  184621. } else {
  184622. Object.assign(left, right);
  184623. }
  184624. }
  184625. }
  184626. }
  184627. }
  184628. function defaultOnError(left, right) {
  184629. if (left) {
  184630. throw new Error(
  184631. "Cannot close `" + left.type + "` (" + stringifyPosition({
  184632. start: left.start,
  184633. end: left.end
  184634. }) + "): a different token (`" + right.type + "`, " + stringifyPosition({
  184635. start: right.start,
  184636. end: right.end
  184637. }) + ") is open"
  184638. );
  184639. } else {
  184640. throw new Error(
  184641. "Cannot close document, a token (`" + right.type + "`, " + stringifyPosition({
  184642. start: right.start,
  184643. end: right.end
  184644. }) + ") is still open"
  184645. );
  184646. }
  184647. }
  184648. // node_modules/remark-parse/lib/index.js
  184649. function remarkParse(options) {
  184650. const parser = (doc) => {
  184651. const settings = this.data("settings");
  184652. return fromMarkdown(
  184653. doc,
  184654. Object.assign({}, settings, options, {
  184655. extensions: this.data("micromarkExtensions") || [],
  184656. mdastExtensions: this.data("fromMarkdownExtensions") || []
  184657. })
  184658. );
  184659. };
  184660. Object.assign(this, { Parser: parser });
  184661. }
  184662. // node_modules/remark-parse/index.js
  184663. var remark_parse_default = remarkParse;
  184664. // node_modules/unist-builder/index.js
  184665. var u = function(type, props, value) {
  184666. var node = { type: String(type) };
  184667. if ((value === void 0 || value === null) && (typeof props === "string" || Array.isArray(props))) {
  184668. value = props;
  184669. } else {
  184670. Object.assign(node, props);
  184671. }
  184672. if (Array.isArray(value)) {
  184673. node.children = value;
  184674. } else if (value !== void 0 && value !== null) {
  184675. node.value = String(value);
  184676. }
  184677. return node;
  184678. };
  184679. // node_modules/mdast-util-to-hast/lib/traverse.js
  184680. var own7 = {}.hasOwnProperty;
  184681. function unknown(h, node) {
  184682. const data2 = node.data || {};
  184683. if ("value" in node && !(own7.call(data2, "hName") || own7.call(data2, "hProperties") || own7.call(data2, "hChildren"))) {
  184684. return h.augment(node, u("text", node.value));
  184685. }
  184686. return h(node, "div", all2(h, node));
  184687. }
  184688. function one2(h, node, parent) {
  184689. const type = node && node.type;
  184690. let fn;
  184691. if (!type) {
  184692. throw new Error("Expected node, got `" + node + "`");
  184693. }
  184694. if (own7.call(h.handlers, type)) {
  184695. fn = h.handlers[type];
  184696. } else if (h.passThrough && h.passThrough.includes(type)) {
  184697. fn = returnNode;
  184698. } else {
  184699. fn = h.unknownHandler;
  184700. }
  184701. return (typeof fn === "function" ? fn : unknown)(h, node, parent);
  184702. }
  184703. function returnNode(h, node) {
  184704. return "children" in node ? { ...node, children: all2(h, node) } : node;
  184705. }
  184706. function all2(h, parent) {
  184707. const values = [];
  184708. if ("children" in parent) {
  184709. const nodes = parent.children;
  184710. let index2 = -1;
  184711. while (++index2 < nodes.length) {
  184712. const result = one2(h, nodes[index2], parent);
  184713. if (result) {
  184714. if (index2 && nodes[index2 - 1].type === "break") {
  184715. if (!Array.isArray(result) && result.type === "text") {
  184716. result.value = result.value.replace(/^\s+/, "");
  184717. }
  184718. if (!Array.isArray(result) && result.type === "element") {
  184719. const head = result.children[0];
  184720. if (head && head.type === "text") {
  184721. head.value = head.value.replace(/^\s+/, "");
  184722. }
  184723. }
  184724. }
  184725. if (Array.isArray(result)) {
  184726. values.push(...result);
  184727. } else {
  184728. values.push(result);
  184729. }
  184730. }
  184731. }
  184732. }
  184733. return values;
  184734. }
  184735. // node_modules/unist-util-is/index.js
  184736. var convert = function(test) {
  184737. if (test === void 0 || test === null) {
  184738. return ok;
  184739. }
  184740. if (typeof test === "string") {
  184741. return typeFactory(test);
  184742. }
  184743. if (typeof test === "object") {
  184744. return Array.isArray(test) ? anyFactory(test) : propsFactory(test);
  184745. }
  184746. if (typeof test === "function") {
  184747. return castFactory(test);
  184748. }
  184749. throw new Error("Expected function, string, or object as test");
  184750. };
  184751. function anyFactory(tests) {
  184752. const checks2 = [];
  184753. let index2 = -1;
  184754. while (++index2 < tests.length) {
  184755. checks2[index2] = convert(tests[index2]);
  184756. }
  184757. return castFactory(any);
  184758. function any(...parameters) {
  184759. let index3 = -1;
  184760. while (++index3 < checks2.length) {
  184761. if (checks2[index3].call(this, ...parameters))
  184762. return true;
  184763. }
  184764. return false;
  184765. }
  184766. }
  184767. function propsFactory(check) {
  184768. return castFactory(all4);
  184769. function all4(node) {
  184770. let key;
  184771. for (key in check) {
  184772. if (node[key] !== check[key])
  184773. return false;
  184774. }
  184775. return true;
  184776. }
  184777. }
  184778. function typeFactory(check) {
  184779. return castFactory(type);
  184780. function type(node) {
  184781. return node && node.type === check;
  184782. }
  184783. }
  184784. function castFactory(check) {
  184785. return assertion;
  184786. function assertion(...parameters) {
  184787. return Boolean(check.call(this, ...parameters));
  184788. }
  184789. }
  184790. function ok() {
  184791. return true;
  184792. }
  184793. // node_modules/unist-util-visit-parents/color.js
  184794. function color2(d) {
  184795. return "\x1B[33m" + d + "\x1B[39m";
  184796. }
  184797. // node_modules/unist-util-visit-parents/index.js
  184798. var CONTINUE2 = true;
  184799. var SKIP2 = "skip";
  184800. var EXIT2 = false;
  184801. var visitParents = function(tree, test, visitor, reverse) {
  184802. if (typeof test === "function" && typeof visitor !== "function") {
  184803. reverse = visitor;
  184804. visitor = test;
  184805. test = null;
  184806. }
  184807. const is = convert(test);
  184808. const step = reverse ? -1 : 1;
  184809. factory2(tree, null, [])();
  184810. function factory2(node, index2, parents) {
  184811. const value = typeof node === "object" && node !== null ? node : {};
  184812. let name2;
  184813. if (typeof value.type === "string") {
  184814. name2 = typeof value.tagName === "string" ? value.tagName : typeof value.name === "string" ? value.name : void 0;
  184815. Object.defineProperty(visit4, "name", {
  184816. value: "node (" + color2(value.type + (name2 ? "<" + name2 + ">" : "")) + ")"
  184817. });
  184818. }
  184819. return visit4;
  184820. function visit4() {
  184821. let result = [];
  184822. let subresult;
  184823. let offset2;
  184824. let grandparents;
  184825. if (!test || is(node, index2, parents[parents.length - 1] || null)) {
  184826. result = toResult2(visitor(node, parents));
  184827. if (result[0] === EXIT2) {
  184828. return result;
  184829. }
  184830. }
  184831. if (node.children && result[0] !== SKIP2) {
  184832. offset2 = (reverse ? node.children.length : -1) + step;
  184833. grandparents = parents.concat(node);
  184834. while (offset2 > -1 && offset2 < node.children.length) {
  184835. subresult = factory2(node.children[offset2], offset2, grandparents)();
  184836. if (subresult[0] === EXIT2) {
  184837. return subresult;
  184838. }
  184839. offset2 = typeof subresult[1] === "number" ? subresult[1] : offset2 + step;
  184840. }
  184841. }
  184842. return result;
  184843. }
  184844. }
  184845. };
  184846. function toResult2(value) {
  184847. if (Array.isArray(value)) {
  184848. return value;
  184849. }
  184850. if (typeof value === "number") {
  184851. return [CONTINUE2, value];
  184852. }
  184853. return [value];
  184854. }
  184855. // node_modules/unist-util-visit/index.js
  184856. var visit2 = function(tree, test, visitor, reverse) {
  184857. if (typeof test === "function" && typeof visitor !== "function") {
  184858. reverse = visitor;
  184859. visitor = test;
  184860. test = null;
  184861. }
  184862. visitParents(tree, test, overload, reverse);
  184863. function overload(node, parents) {
  184864. const parent = parents[parents.length - 1];
  184865. return visitor(
  184866. node,
  184867. parent ? parent.children.indexOf(node) : null,
  184868. parent
  184869. );
  184870. }
  184871. };
  184872. // node_modules/unist-util-position/index.js
  184873. var pointStart = point2("start");
  184874. var pointEnd = point2("end");
  184875. function position2(node) {
  184876. return { start: pointStart(node), end: pointEnd(node) };
  184877. }
  184878. function point2(type) {
  184879. return point3;
  184880. function point3(node) {
  184881. var point4 = node && node.position && node.position[type] || {};
  184882. return {
  184883. line: point4.line || null,
  184884. column: point4.column || null,
  184885. offset: point4.offset > -1 ? point4.offset : null
  184886. };
  184887. }
  184888. }
  184889. // node_modules/unist-util-generated/index.js
  184890. function generated(node) {
  184891. return !node || !node.position || !node.position.start || !node.position.start.line || !node.position.start.column || !node.position.end || !node.position.end.line || !node.position.end.column;
  184892. }
  184893. // node_modules/mdast-util-definitions/node_modules/unist-util-visit-parents/color.js
  184894. function color3(d) {
  184895. return "\x1B[33m" + d + "\x1B[39m";
  184896. }
  184897. // node_modules/mdast-util-definitions/node_modules/unist-util-visit-parents/index.js
  184898. var CONTINUE3 = true;
  184899. var SKIP3 = "skip";
  184900. var EXIT3 = false;
  184901. var visitParents2 = function(tree, test, visitor, reverse) {
  184902. if (typeof test === "function" && typeof visitor !== "function") {
  184903. reverse = visitor;
  184904. visitor = test;
  184905. test = null;
  184906. }
  184907. var is = convert(test);
  184908. var step = reverse ? -1 : 1;
  184909. factory2(tree, null, [])();
  184910. function factory2(node, index2, parents) {
  184911. var value = typeof node === "object" && node !== null ? node : {};
  184912. var name2;
  184913. if (typeof value.type === "string") {
  184914. name2 = typeof value.tagName === "string" ? value.tagName : typeof value.name === "string" ? value.name : void 0;
  184915. Object.defineProperty(visit4, "name", {
  184916. value: "node (" + color3(value.type + (name2 ? "<" + name2 + ">" : "")) + ")"
  184917. });
  184918. }
  184919. return visit4;
  184920. function visit4() {
  184921. var result = [];
  184922. var subresult;
  184923. var offset2;
  184924. var grandparents;
  184925. if (!test || is(node, index2, parents[parents.length - 1] || null)) {
  184926. result = toResult3(visitor(node, parents));
  184927. if (result[0] === EXIT3) {
  184928. return result;
  184929. }
  184930. }
  184931. if (node.children && result[0] !== SKIP3) {
  184932. offset2 = (reverse ? node.children.length : -1) + step;
  184933. grandparents = parents.concat(node);
  184934. while (offset2 > -1 && offset2 < node.children.length) {
  184935. subresult = factory2(node.children[offset2], offset2, grandparents)();
  184936. if (subresult[0] === EXIT3) {
  184937. return subresult;
  184938. }
  184939. offset2 = typeof subresult[1] === "number" ? subresult[1] : offset2 + step;
  184940. }
  184941. }
  184942. return result;
  184943. }
  184944. }
  184945. };
  184946. function toResult3(value) {
  184947. if (Array.isArray(value)) {
  184948. return value;
  184949. }
  184950. if (typeof value === "number") {
  184951. return [CONTINUE3, value];
  184952. }
  184953. return [value];
  184954. }
  184955. // node_modules/mdast-util-definitions/node_modules/unist-util-visit/index.js
  184956. var visit3 = function(tree, test, visitor, reverse) {
  184957. if (typeof test === "function" && typeof visitor !== "function") {
  184958. reverse = visitor;
  184959. visitor = test;
  184960. test = null;
  184961. }
  184962. visitParents2(tree, test, overload, reverse);
  184963. function overload(node, parents) {
  184964. var parent = parents[parents.length - 1];
  184965. return visitor(
  184966. node,
  184967. parent ? parent.children.indexOf(node) : null,
  184968. parent
  184969. );
  184970. }
  184971. };
  184972. // node_modules/mdast-util-definitions/index.js
  184973. var own8 = {}.hasOwnProperty;
  184974. function definitions(node) {
  184975. const cache = /* @__PURE__ */ Object.create(null);
  184976. if (!node || !node.type) {
  184977. throw new Error("mdast-util-definitions expected node");
  184978. }
  184979. visit3(node, "definition", ondefinition);
  184980. return getDefinition;
  184981. function ondefinition(definition2) {
  184982. const id = clean(definition2.identifier);
  184983. if (id && !own8.call(cache, id)) {
  184984. cache[id] = definition2;
  184985. }
  184986. }
  184987. function getDefinition(identifier) {
  184988. const id = clean(identifier);
  184989. return id && own8.call(cache, id) ? cache[id] : null;
  184990. }
  184991. }
  184992. function clean(value) {
  184993. return String(value || "").toUpperCase();
  184994. }
  184995. // node_modules/micromark-util-encode/index.js
  184996. var characterReferences = { '"': "quot", "&": "amp", "<": "lt", ">": "gt" };
  184997. function encode(value) {
  184998. return value.replace(/["&<>]/g, replace);
  184999. function replace(value2) {
  185000. return "&" + characterReferences[value2] + ";";
  185001. }
  185002. }
  185003. // node_modules/micromark-util-sanitize-uri/index.js
  185004. function sanitizeUri(url, protocol) {
  185005. const value = encode(normalizeUri(url || ""));
  185006. if (!protocol) {
  185007. return value;
  185008. }
  185009. const colon = value.indexOf(":");
  185010. const questionMark = value.indexOf("?");
  185011. const numberSign = value.indexOf("#");
  185012. const slash = value.indexOf("/");
  185013. if (colon < 0 || slash > -1 && colon > slash || questionMark > -1 && colon > questionMark || numberSign > -1 && colon > numberSign || protocol.test(value.slice(0, colon))) {
  185014. return value;
  185015. }
  185016. return "";
  185017. }
  185018. function normalizeUri(value) {
  185019. const result = [];
  185020. let index2 = -1;
  185021. let start3 = 0;
  185022. let skip = 0;
  185023. while (++index2 < value.length) {
  185024. const code2 = value.charCodeAt(index2);
  185025. let replace = "";
  185026. if (code2 === 37 && asciiAlphanumeric(value.charCodeAt(index2 + 1)) && asciiAlphanumeric(value.charCodeAt(index2 + 2))) {
  185027. skip = 2;
  185028. } else if (code2 < 128) {
  185029. if (!/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(code2))) {
  185030. replace = String.fromCharCode(code2);
  185031. }
  185032. } else if (code2 > 55295 && code2 < 57344) {
  185033. const next = value.charCodeAt(index2 + 1);
  185034. if (code2 < 56320 && next > 56319 && next < 57344) {
  185035. replace = String.fromCharCode(code2, next);
  185036. skip = 1;
  185037. } else {
  185038. replace = "\uFFFD";
  185039. }
  185040. } else {
  185041. replace = String.fromCharCode(code2);
  185042. }
  185043. if (replace) {
  185044. result.push(value.slice(start3, index2), encodeURIComponent(replace));
  185045. start3 = index2 + skip + 1;
  185046. replace = "";
  185047. }
  185048. if (skip) {
  185049. index2 += skip;
  185050. skip = 0;
  185051. }
  185052. }
  185053. return result.join("") + value.slice(start3);
  185054. }
  185055. // node_modules/mdast-util-to-hast/lib/wrap.js
  185056. function wrap2(nodes, loose) {
  185057. const result = [];
  185058. let index2 = -1;
  185059. if (loose) {
  185060. result.push(u("text", "\n"));
  185061. }
  185062. while (++index2 < nodes.length) {
  185063. if (index2)
  185064. result.push(u("text", "\n"));
  185065. result.push(nodes[index2]);
  185066. }
  185067. if (loose && nodes.length > 0) {
  185068. result.push(u("text", "\n"));
  185069. }
  185070. return result;
  185071. }
  185072. // node_modules/mdast-util-to-hast/lib/footer.js
  185073. function footer(h) {
  185074. let index2 = -1;
  185075. const listItems = [];
  185076. while (++index2 < h.footnoteOrder.length) {
  185077. const def = h.footnoteById[h.footnoteOrder[index2].toUpperCase()];
  185078. if (!def) {
  185079. continue;
  185080. }
  185081. const content3 = all2(h, def);
  185082. const id = String(def.identifier);
  185083. const safeId = sanitizeUri(id.toLowerCase());
  185084. let referenceIndex = 0;
  185085. const backReferences = [];
  185086. while (++referenceIndex <= h.footnoteCounts[id]) {
  185087. const backReference = {
  185088. type: "element",
  185089. tagName: "a",
  185090. properties: {
  185091. href: "#" + h.clobberPrefix + "fnref-" + safeId + (referenceIndex > 1 ? "-" + referenceIndex : ""),
  185092. dataFootnoteBackref: true,
  185093. className: ["data-footnote-backref"],
  185094. ariaLabel: h.footnoteBackLabel
  185095. },
  185096. children: [{ type: "text", value: "\u21A9" }]
  185097. };
  185098. if (referenceIndex > 1) {
  185099. backReference.children.push({
  185100. type: "element",
  185101. tagName: "sup",
  185102. children: [{ type: "text", value: String(referenceIndex) }]
  185103. });
  185104. }
  185105. if (backReferences.length > 0) {
  185106. backReferences.push({ type: "text", value: " " });
  185107. }
  185108. backReferences.push(backReference);
  185109. }
  185110. const tail = content3[content3.length - 1];
  185111. if (tail && tail.type === "element" && tail.tagName === "p") {
  185112. const tailTail = tail.children[tail.children.length - 1];
  185113. if (tailTail && tailTail.type === "text") {
  185114. tailTail.value += " ";
  185115. } else {
  185116. tail.children.push({ type: "text", value: " " });
  185117. }
  185118. tail.children.push(...backReferences);
  185119. } else {
  185120. content3.push(...backReferences);
  185121. }
  185122. const listItem2 = {
  185123. type: "element",
  185124. tagName: "li",
  185125. properties: { id: h.clobberPrefix + "fn-" + safeId },
  185126. children: wrap2(content3, true)
  185127. };
  185128. if (def.position) {
  185129. listItem2.position = def.position;
  185130. }
  185131. listItems.push(listItem2);
  185132. }
  185133. if (listItems.length === 0) {
  185134. return null;
  185135. }
  185136. return {
  185137. type: "element",
  185138. tagName: "section",
  185139. properties: { dataFootnotes: true, className: ["footnotes"] },
  185140. children: [
  185141. {
  185142. type: "element",
  185143. tagName: "h2",
  185144. properties: { id: "footnote-label", className: ["sr-only"] },
  185145. children: [u("text", h.footnoteLabel)]
  185146. },
  185147. { type: "text", value: "\n" },
  185148. {
  185149. type: "element",
  185150. tagName: "ol",
  185151. properties: {},
  185152. children: wrap2(listItems, true)
  185153. },
  185154. { type: "text", value: "\n" }
  185155. ]
  185156. };
  185157. }
  185158. // node_modules/mdast-util-to-hast/lib/handlers/blockquote.js
  185159. function blockquote(h, node) {
  185160. return h(node, "blockquote", wrap2(all2(h, node), true));
  185161. }
  185162. // node_modules/mdast-util-to-hast/lib/handlers/break.js
  185163. function hardBreak(h, node) {
  185164. return [h(node, "br"), u("text", "\n")];
  185165. }
  185166. // node_modules/mdast-util-to-hast/lib/handlers/code.js
  185167. function code(h, node) {
  185168. const value = node.value ? node.value + "\n" : "";
  185169. const lang = node.lang && node.lang.match(/^[^ \t]+(?=[ \t]|$)/);
  185170. const props = {};
  185171. if (lang) {
  185172. props.className = ["language-" + lang];
  185173. }
  185174. const code2 = h(node, "code", props, [u("text", value)]);
  185175. if (node.meta) {
  185176. code2.data = { meta: node.meta };
  185177. }
  185178. return h(node.position, "pre", [code2]);
  185179. }
  185180. // node_modules/mdast-util-to-hast/lib/handlers/delete.js
  185181. function strikethrough(h, node) {
  185182. return h(node, "del", all2(h, node));
  185183. }
  185184. // node_modules/mdast-util-to-hast/lib/handlers/emphasis.js
  185185. function emphasis(h, node) {
  185186. return h(node, "em", all2(h, node));
  185187. }
  185188. // node_modules/mdast-util-to-hast/lib/handlers/footnote-reference.js
  185189. function footnoteReference(h, node) {
  185190. const id = String(node.identifier);
  185191. const safeId = sanitizeUri(id.toLowerCase());
  185192. const index2 = h.footnoteOrder.indexOf(id);
  185193. let counter;
  185194. if (index2 === -1) {
  185195. h.footnoteOrder.push(id);
  185196. h.footnoteCounts[id] = 1;
  185197. counter = h.footnoteOrder.length;
  185198. } else {
  185199. h.footnoteCounts[id]++;
  185200. counter = index2 + 1;
  185201. }
  185202. const reuseCounter = h.footnoteCounts[id];
  185203. return h(node, "sup", [
  185204. h(
  185205. node.position,
  185206. "a",
  185207. {
  185208. href: "#" + h.clobberPrefix + "fn-" + safeId,
  185209. id: h.clobberPrefix + "fnref-" + safeId + (reuseCounter > 1 ? "-" + reuseCounter : ""),
  185210. dataFootnoteRef: true,
  185211. ariaDescribedBy: "footnote-label"
  185212. },
  185213. [u("text", String(counter))]
  185214. )
  185215. ]);
  185216. }
  185217. // node_modules/mdast-util-to-hast/lib/handlers/footnote.js
  185218. function footnote(h, node) {
  185219. const footnoteById = h.footnoteById;
  185220. let no = 1;
  185221. while (no in footnoteById)
  185222. no++;
  185223. const identifier = String(no);
  185224. footnoteById[identifier] = {
  185225. type: "footnoteDefinition",
  185226. identifier,
  185227. children: [{ type: "paragraph", children: node.children }],
  185228. position: node.position
  185229. };
  185230. return footnoteReference(h, {
  185231. type: "footnoteReference",
  185232. identifier,
  185233. position: node.position
  185234. });
  185235. }
  185236. // node_modules/mdast-util-to-hast/lib/handlers/heading.js
  185237. function heading(h, node) {
  185238. return h(node, "h" + node.depth, all2(h, node));
  185239. }
  185240. // node_modules/mdast-util-to-hast/lib/handlers/html.js
  185241. function html(h, node) {
  185242. return h.dangerous ? h.augment(node, u("raw", node.value)) : null;
  185243. }
  185244. // node_modules/mdast-util-to-hast/lib/handlers/image-reference.js
  185245. var import_encode = __toESM(require_encode(), 1);
  185246. // node_modules/mdast-util-to-hast/lib/revert.js
  185247. function revert(h, node) {
  185248. const subtype = node.referenceType;
  185249. let suffix = "]";
  185250. if (subtype === "collapsed") {
  185251. suffix += "[]";
  185252. } else if (subtype === "full") {
  185253. suffix += "[" + (node.label || node.identifier) + "]";
  185254. }
  185255. if (node.type === "imageReference") {
  185256. return u("text", "![" + node.alt + suffix);
  185257. }
  185258. const contents = all2(h, node);
  185259. const head = contents[0];
  185260. if (head && head.type === "text") {
  185261. head.value = "[" + head.value;
  185262. } else {
  185263. contents.unshift(u("text", "["));
  185264. }
  185265. const tail = contents[contents.length - 1];
  185266. if (tail && tail.type === "text") {
  185267. tail.value += suffix;
  185268. } else {
  185269. contents.push(u("text", suffix));
  185270. }
  185271. return contents;
  185272. }
  185273. // node_modules/mdast-util-to-hast/lib/handlers/image-reference.js
  185274. function imageReference(h, node) {
  185275. const def = h.definition(node.identifier);
  185276. if (!def) {
  185277. return revert(h, node);
  185278. }
  185279. const props = { src: (0, import_encode.default)(def.url || ""), alt: node.alt };
  185280. if (def.title !== null && def.title !== void 0) {
  185281. props.title = def.title;
  185282. }
  185283. return h(node, "img", props);
  185284. }
  185285. // node_modules/mdast-util-to-hast/lib/handlers/image.js
  185286. var import_encode2 = __toESM(require_encode(), 1);
  185287. function image(h, node) {
  185288. const props = { src: (0, import_encode2.default)(node.url), alt: node.alt };
  185289. if (node.title !== null && node.title !== void 0) {
  185290. props.title = node.title;
  185291. }
  185292. return h(node, "img", props);
  185293. }
  185294. // node_modules/mdast-util-to-hast/lib/handlers/inline-code.js
  185295. function inlineCode(h, node) {
  185296. return h(node, "code", [u("text", node.value.replace(/\r?\n|\r/g, " "))]);
  185297. }
  185298. // node_modules/mdast-util-to-hast/lib/handlers/link-reference.js
  185299. var import_encode3 = __toESM(require_encode(), 1);
  185300. function linkReference(h, node) {
  185301. const def = h.definition(node.identifier);
  185302. if (!def) {
  185303. return revert(h, node);
  185304. }
  185305. const props = { href: (0, import_encode3.default)(def.url || "") };
  185306. if (def.title !== null && def.title !== void 0) {
  185307. props.title = def.title;
  185308. }
  185309. return h(node, "a", props, all2(h, node));
  185310. }
  185311. // node_modules/mdast-util-to-hast/lib/handlers/link.js
  185312. var import_encode4 = __toESM(require_encode(), 1);
  185313. function link(h, node) {
  185314. const props = { href: (0, import_encode4.default)(node.url) };
  185315. if (node.title !== null && node.title !== void 0) {
  185316. props.title = node.title;
  185317. }
  185318. return h(node, "a", props, all2(h, node));
  185319. }
  185320. // node_modules/mdast-util-to-hast/lib/handlers/list-item.js
  185321. function listItem(h, node, parent) {
  185322. const result = all2(h, node);
  185323. const loose = parent ? listLoose(parent) : listItemLoose(node);
  185324. const props = {};
  185325. const wrapped = [];
  185326. if (typeof node.checked === "boolean") {
  185327. let paragraph2;
  185328. if (result[0] && result[0].type === "element" && result[0].tagName === "p") {
  185329. paragraph2 = result[0];
  185330. } else {
  185331. paragraph2 = h(null, "p", []);
  185332. result.unshift(paragraph2);
  185333. }
  185334. if (paragraph2.children.length > 0) {
  185335. paragraph2.children.unshift(u("text", " "));
  185336. }
  185337. paragraph2.children.unshift(
  185338. h(null, "input", {
  185339. type: "checkbox",
  185340. checked: node.checked,
  185341. disabled: true
  185342. })
  185343. );
  185344. props.className = ["task-list-item"];
  185345. }
  185346. let index2 = -1;
  185347. while (++index2 < result.length) {
  185348. const child = result[index2];
  185349. if (loose || index2 !== 0 || child.type !== "element" || child.tagName !== "p") {
  185350. wrapped.push(u("text", "\n"));
  185351. }
  185352. if (child.type === "element" && child.tagName === "p" && !loose) {
  185353. wrapped.push(...child.children);
  185354. } else {
  185355. wrapped.push(child);
  185356. }
  185357. }
  185358. const tail = result[result.length - 1];
  185359. if (tail && (loose || !("tagName" in tail) || tail.tagName !== "p")) {
  185360. wrapped.push(u("text", "\n"));
  185361. }
  185362. return h(node, "li", props, wrapped);
  185363. }
  185364. function listLoose(node) {
  185365. let loose = node.spread;
  185366. const children = node.children;
  185367. let index2 = -1;
  185368. while (!loose && ++index2 < children.length) {
  185369. loose = listItemLoose(children[index2]);
  185370. }
  185371. return Boolean(loose);
  185372. }
  185373. function listItemLoose(node) {
  185374. const spread = node.spread;
  185375. return spread === void 0 || spread === null ? node.children.length > 1 : spread;
  185376. }
  185377. // node_modules/mdast-util-to-hast/lib/handlers/list.js
  185378. function list2(h, node) {
  185379. const props = {};
  185380. const name2 = node.ordered ? "ol" : "ul";
  185381. const items = all2(h, node);
  185382. let index2 = -1;
  185383. if (typeof node.start === "number" && node.start !== 1) {
  185384. props.start = node.start;
  185385. }
  185386. while (++index2 < items.length) {
  185387. const item = items[index2];
  185388. if (item.type === "element" && item.tagName === "li" && item.properties && Array.isArray(item.properties.className) && item.properties.className.includes("task-list-item")) {
  185389. props.className = ["contains-task-list"];
  185390. break;
  185391. }
  185392. }
  185393. return h(node, name2, props, wrap2(items, true));
  185394. }
  185395. // node_modules/mdast-util-to-hast/lib/handlers/paragraph.js
  185396. function paragraph(h, node) {
  185397. return h(node, "p", all2(h, node));
  185398. }
  185399. // node_modules/mdast-util-to-hast/lib/handlers/root.js
  185400. function root(h, node) {
  185401. return h.augment(node, u("root", wrap2(all2(h, node))));
  185402. }
  185403. // node_modules/mdast-util-to-hast/lib/handlers/strong.js
  185404. function strong(h, node) {
  185405. return h(node, "strong", all2(h, node));
  185406. }
  185407. // node_modules/mdast-util-to-hast/lib/handlers/table.js
  185408. function table(h, node) {
  185409. const rows = node.children;
  185410. let index2 = -1;
  185411. const align = node.align || [];
  185412. const result = [];
  185413. while (++index2 < rows.length) {
  185414. const row = rows[index2].children;
  185415. const name2 = index2 === 0 ? "th" : "td";
  185416. const out = [];
  185417. let cellIndex = -1;
  185418. const length = node.align ? align.length : row.length;
  185419. while (++cellIndex < length) {
  185420. const cell = row[cellIndex];
  185421. out.push(
  185422. h(cell, name2, { align: align[cellIndex] }, cell ? all2(h, cell) : [])
  185423. );
  185424. }
  185425. result[index2] = h(rows[index2], "tr", wrap2(out, true));
  185426. }
  185427. return h(
  185428. node,
  185429. "table",
  185430. wrap2(
  185431. [h(result[0].position, "thead", wrap2([result[0]], true))].concat(
  185432. result[1] ? h(
  185433. {
  185434. start: pointStart(result[1]),
  185435. end: pointEnd(result[result.length - 1])
  185436. },
  185437. "tbody",
  185438. wrap2(result.slice(1), true)
  185439. ) : []
  185440. ),
  185441. true
  185442. )
  185443. );
  185444. }
  185445. // node_modules/mdast-util-to-hast/lib/handlers/text.js
  185446. function text3(h, node) {
  185447. return h.augment(
  185448. node,
  185449. u("text", String(node.value).replace(/[ \t]*(\r?\n|\r)[ \t]*/g, "$1"))
  185450. );
  185451. }
  185452. // node_modules/mdast-util-to-hast/lib/handlers/thematic-break.js
  185453. function thematicBreak2(h, node) {
  185454. return h(node, "hr");
  185455. }
  185456. // node_modules/mdast-util-to-hast/lib/handlers/index.js
  185457. var handlers = {
  185458. blockquote,
  185459. break: hardBreak,
  185460. code,
  185461. delete: strikethrough,
  185462. emphasis,
  185463. footnoteReference,
  185464. footnote,
  185465. heading,
  185466. html,
  185467. imageReference,
  185468. image,
  185469. inlineCode,
  185470. linkReference,
  185471. link,
  185472. listItem,
  185473. list: list2,
  185474. paragraph,
  185475. root,
  185476. strong,
  185477. table,
  185478. text: text3,
  185479. thematicBreak: thematicBreak2,
  185480. toml: ignore,
  185481. yaml: ignore,
  185482. definition: ignore,
  185483. footnoteDefinition: ignore
  185484. };
  185485. function ignore() {
  185486. return null;
  185487. }
  185488. // node_modules/mdast-util-to-hast/lib/index.js
  185489. var own9 = {}.hasOwnProperty;
  185490. function factory(tree, options) {
  185491. const settings = options || {};
  185492. const dangerous = settings.allowDangerousHtml || false;
  185493. const footnoteById = {};
  185494. h.dangerous = dangerous;
  185495. h.clobberPrefix = settings.clobberPrefix === void 0 || settings.clobberPrefix === null ? "user-content-" : settings.clobberPrefix;
  185496. h.footnoteLabel = settings.footnoteLabel || "Footnotes";
  185497. h.footnoteBackLabel = settings.footnoteBackLabel || "Back to content";
  185498. h.definition = definitions(tree);
  185499. h.footnoteById = footnoteById;
  185500. h.footnoteOrder = [];
  185501. h.footnoteCounts = {};
  185502. h.augment = augment;
  185503. h.handlers = { ...handlers, ...settings.handlers };
  185504. h.unknownHandler = settings.unknownHandler;
  185505. h.passThrough = settings.passThrough;
  185506. visit2(tree, "footnoteDefinition", (definition2) => {
  185507. const id = String(definition2.identifier).toUpperCase();
  185508. if (!own9.call(footnoteById, id)) {
  185509. footnoteById[id] = definition2;
  185510. }
  185511. });
  185512. return h;
  185513. function augment(left, right) {
  185514. if (left && "data" in left && left.data) {
  185515. const data2 = left.data;
  185516. if (data2.hName) {
  185517. if (right.type !== "element") {
  185518. right = {
  185519. type: "element",
  185520. tagName: "",
  185521. properties: {},
  185522. children: []
  185523. };
  185524. }
  185525. right.tagName = data2.hName;
  185526. }
  185527. if (right.type === "element" && data2.hProperties) {
  185528. right.properties = { ...right.properties, ...data2.hProperties };
  185529. }
  185530. if ("children" in right && right.children && data2.hChildren) {
  185531. right.children = data2.hChildren;
  185532. }
  185533. }
  185534. if (left) {
  185535. const ctx = "type" in left ? left : { position: left };
  185536. if (!generated(ctx)) {
  185537. right.position = { start: pointStart(ctx), end: pointEnd(ctx) };
  185538. }
  185539. }
  185540. return right;
  185541. }
  185542. function h(node, tagName, props, children) {
  185543. if (Array.isArray(props)) {
  185544. children = props;
  185545. props = {};
  185546. }
  185547. return augment(node, {
  185548. type: "element",
  185549. tagName,
  185550. properties: props || {},
  185551. children: children || []
  185552. });
  185553. }
  185554. }
  185555. function toHast(tree, options) {
  185556. const h = factory(tree, options);
  185557. const node = one2(h, tree, null);
  185558. const foot = footer(h);
  185559. if (foot) {
  185560. node.children.push(u("text", "\n"), foot);
  185561. }
  185562. return Array.isArray(node) ? { type: "root", children: node } : node;
  185563. }
  185564. // node_modules/remark-rehype/lib/index.js
  185565. var remarkRehype = function(destination, options) {
  185566. return destination && "run" in destination ? bridge(destination, options) : mutate(destination || options);
  185567. };
  185568. var lib_default = remarkRehype;
  185569. function bridge(destination, options) {
  185570. return (node, file, next) => {
  185571. destination.run(toHast(node, options), file, (error) => {
  185572. next(error);
  185573. });
  185574. };
  185575. }
  185576. function mutate(options) {
  185577. return (node) => toHast(node, options);
  185578. }
  185579. // node_modules/estree-walker/src/walker.js
  185580. var WalkerBase = class {
  185581. constructor() {
  185582. this.should_skip = false;
  185583. this.should_remove = false;
  185584. this.replacement = null;
  185585. this.context = {
  185586. skip: () => this.should_skip = true,
  185587. remove: () => this.should_remove = true,
  185588. replace: (node) => this.replacement = node
  185589. };
  185590. }
  185591. replace(parent, prop, index2, node) {
  185592. if (parent) {
  185593. if (index2 !== null) {
  185594. parent[prop][index2] = node;
  185595. } else {
  185596. parent[prop] = node;
  185597. }
  185598. }
  185599. }
  185600. remove(parent, prop, index2) {
  185601. if (parent) {
  185602. if (index2 !== null) {
  185603. parent[prop].splice(index2, 1);
  185604. } else {
  185605. delete parent[prop];
  185606. }
  185607. }
  185608. }
  185609. };
  185610. // node_modules/estree-walker/src/sync.js
  185611. var SyncWalker = class extends WalkerBase {
  185612. constructor(enter, leave) {
  185613. super();
  185614. this.enter = enter;
  185615. this.leave = leave;
  185616. }
  185617. visit(node, parent, prop, index2) {
  185618. if (node) {
  185619. if (this.enter) {
  185620. const _should_skip = this.should_skip;
  185621. const _should_remove = this.should_remove;
  185622. const _replacement = this.replacement;
  185623. this.should_skip = false;
  185624. this.should_remove = false;
  185625. this.replacement = null;
  185626. this.enter.call(this.context, node, parent, prop, index2);
  185627. if (this.replacement) {
  185628. node = this.replacement;
  185629. this.replace(parent, prop, index2, node);
  185630. }
  185631. if (this.should_remove) {
  185632. this.remove(parent, prop, index2);
  185633. }
  185634. const skipped = this.should_skip;
  185635. const removed = this.should_remove;
  185636. this.should_skip = _should_skip;
  185637. this.should_remove = _should_remove;
  185638. this.replacement = _replacement;
  185639. if (skipped)
  185640. return node;
  185641. if (removed)
  185642. return null;
  185643. }
  185644. for (const key in node) {
  185645. const value = node[key];
  185646. if (typeof value !== "object") {
  185647. continue;
  185648. } else if (Array.isArray(value)) {
  185649. for (let i = 0; i < value.length; i += 1) {
  185650. if (value[i] !== null && typeof value[i].type === "string") {
  185651. if (!this.visit(value[i], node, key, i)) {
  185652. i--;
  185653. }
  185654. }
  185655. }
  185656. } else if (value !== null && typeof value.type === "string") {
  185657. this.visit(value, node, key, null);
  185658. }
  185659. }
  185660. if (this.leave) {
  185661. const _replacement = this.replacement;
  185662. const _should_remove = this.should_remove;
  185663. this.replacement = null;
  185664. this.should_remove = false;
  185665. this.leave.call(this.context, node, parent, prop, index2);
  185666. if (this.replacement) {
  185667. node = this.replacement;
  185668. this.replace(parent, prop, index2, node);
  185669. }
  185670. if (this.should_remove) {
  185671. this.remove(parent, prop, index2);
  185672. }
  185673. const removed = this.should_remove;
  185674. this.replacement = _replacement;
  185675. this.should_remove = _should_remove;
  185676. if (removed)
  185677. return null;
  185678. }
  185679. }
  185680. return node;
  185681. }
  185682. };
  185683. // node_modules/estree-walker/src/index.js
  185684. function walk(ast, { enter, leave }) {
  185685. const instance = new SyncWalker(enter, leave);
  185686. return instance.visit(ast, null);
  185687. }
  185688. // node_modules/estree-util-build-jsx/index.js
  185689. var regex = /@(jsx|jsxFrag|jsxImportSource|jsxRuntime)\s+(\S+)/g;
  185690. function buildJsx(tree, options = {}) {
  185691. var automatic = options.runtime === "automatic";
  185692. var annotations = {};
  185693. var imports = {};
  185694. walk(tree, { enter, leave });
  185695. return tree;
  185696. function enter(node) {
  185697. var comments;
  185698. var index2;
  185699. var match;
  185700. if (node.type === "Program") {
  185701. comments = node.comments || [];
  185702. index2 = -1;
  185703. while (++index2 < comments.length) {
  185704. regex.lastIndex = 0;
  185705. while (match = regex.exec(comments[index2].value)) {
  185706. annotations[match[1]] = match[2];
  185707. }
  185708. }
  185709. if (annotations.jsxRuntime) {
  185710. if (annotations.jsxRuntime === "automatic") {
  185711. automatic = true;
  185712. if (annotations.jsx) {
  185713. throw new Error("Unexpected `@jsx` pragma w/ automatic runtime");
  185714. }
  185715. if (annotations.jsxFrag) {
  185716. throw new Error("Unexpected `@jsxFrag` pragma w/ automatic runtime");
  185717. }
  185718. } else if (annotations.jsxRuntime === "classic") {
  185719. automatic = false;
  185720. if (annotations.jsxImportSource) {
  185721. throw new Error("Unexpected `@jsxImportSource` w/ classic runtime");
  185722. }
  185723. } else {
  185724. throw new Error(
  185725. "Unexpected `jsxRuntime` `" + annotations.jsxRuntime + "`, expected `automatic` or `classic`"
  185726. );
  185727. }
  185728. }
  185729. }
  185730. }
  185731. function leave(node) {
  185732. var parameters = [];
  185733. var children = [];
  185734. var objects = [];
  185735. var fields = [];
  185736. var index2 = -1;
  185737. var child;
  185738. var name2;
  185739. var props;
  185740. var attributes;
  185741. var attribute;
  185742. var spread;
  185743. var key;
  185744. var callee;
  185745. var specifiers;
  185746. var prop;
  185747. var value;
  185748. if (node.type === "Program") {
  185749. specifiers = [];
  185750. if (imports.fragment) {
  185751. specifiers.push({
  185752. type: "ImportSpecifier",
  185753. imported: { type: "Identifier", name: "Fragment" },
  185754. local: { type: "Identifier", name: "_Fragment" }
  185755. });
  185756. }
  185757. if (imports.jsx) {
  185758. specifiers.push({
  185759. type: "ImportSpecifier",
  185760. imported: { type: "Identifier", name: "jsx" },
  185761. local: { type: "Identifier", name: "_jsx" }
  185762. });
  185763. }
  185764. if (imports.jsxs) {
  185765. specifiers.push({
  185766. type: "ImportSpecifier",
  185767. imported: { type: "Identifier", name: "jsxs" },
  185768. local: { type: "Identifier", name: "_jsxs" }
  185769. });
  185770. }
  185771. if (specifiers.length > 0) {
  185772. node.body.unshift({
  185773. type: "ImportDeclaration",
  185774. specifiers,
  185775. source: {
  185776. type: "Literal",
  185777. value: (annotations.jsxImportSource || options.importSource || "react") + "/jsx-runtime"
  185778. }
  185779. });
  185780. }
  185781. }
  185782. if (node.type !== "JSXElement" && node.type !== "JSXFragment") {
  185783. return;
  185784. }
  185785. while (++index2 < node.children.length) {
  185786. child = node.children[index2];
  185787. if (child.type === "JSXExpressionContainer") {
  185788. if (child.expression.type !== "JSXEmptyExpression") {
  185789. children.push(child.expression);
  185790. }
  185791. } else if (child.type === "JSXText") {
  185792. value = child.value.replace(/\t/g, " ").replace(/ *(\r?\n|\r) */g, "\n").replace(/\n+/g, "\n").replace(/\n+$/, "").replace(/\n/g, " ");
  185793. if (value) {
  185794. children.push(create(child, { type: "Literal", value }));
  185795. }
  185796. } else {
  185797. children.push(child);
  185798. }
  185799. }
  185800. if (node.type === "JSXElement") {
  185801. name2 = toIdentifier(node.openingElement.name);
  185802. if (name2.type === "Identifier" && /^[a-z]/.test(name2.name)) {
  185803. name2 = create(name2, { type: "Literal", value: name2.name });
  185804. }
  185805. attributes = node.openingElement.attributes;
  185806. index2 = -1;
  185807. while (++index2 < attributes.length) {
  185808. attribute = attributes[index2];
  185809. if (attribute.type === "JSXSpreadAttribute") {
  185810. if (fields.length > 0) {
  185811. objects.push({ type: "ObjectExpression", properties: fields });
  185812. fields = [];
  185813. }
  185814. objects.push(attribute.argument);
  185815. spread = true;
  185816. } else {
  185817. prop = toProperty(attribute);
  185818. if (automatic && prop.key.type === "Identifier" && prop.key.name === "key") {
  185819. if (spread) {
  185820. throw new Error(
  185821. "Expected `key` to come before any spread expressions"
  185822. );
  185823. }
  185824. key = prop.value;
  185825. } else {
  185826. fields.push(prop);
  185827. }
  185828. }
  185829. }
  185830. } else if (automatic) {
  185831. imports.fragment = true;
  185832. name2 = { type: "Identifier", name: "_Fragment" };
  185833. } else {
  185834. name2 = toMemberExpression(
  185835. annotations.jsxFrag || options.pragmaFrag || "React.Fragment"
  185836. );
  185837. }
  185838. if (automatic && children.length > 0) {
  185839. fields.push({
  185840. type: "Property",
  185841. key: { type: "Identifier", name: "children" },
  185842. value: children.length > 1 ? { type: "ArrayExpression", elements: children } : children[0],
  185843. kind: "init",
  185844. method: false,
  185845. shorthand: false,
  185846. computed: false
  185847. });
  185848. } else {
  185849. parameters = children;
  185850. }
  185851. if (fields.length > 0) {
  185852. objects.push({ type: "ObjectExpression", properties: fields });
  185853. }
  185854. if (objects.length > 1) {
  185855. if (objects[0].type !== "ObjectExpression") {
  185856. objects.unshift({ type: "ObjectExpression", properties: [] });
  185857. }
  185858. props = {
  185859. type: "CallExpression",
  185860. callee: toMemberExpression("Object.assign"),
  185861. arguments: objects,
  185862. optional: false
  185863. };
  185864. } else if (objects.length > 0) {
  185865. props = objects[0];
  185866. }
  185867. if (automatic) {
  185868. if (children.length > 1) {
  185869. imports.jsxs = true;
  185870. callee = { type: "Identifier", name: "_jsxs" };
  185871. } else {
  185872. imports.jsx = true;
  185873. callee = { type: "Identifier", name: "_jsx" };
  185874. }
  185875. parameters.push(props || { type: "ObjectExpression", properties: [] });
  185876. if (key) {
  185877. parameters.push(key);
  185878. }
  185879. } else {
  185880. if (props || parameters.length > 0) {
  185881. parameters.unshift(props || { type: "Literal", value: null });
  185882. }
  185883. callee = toMemberExpression(
  185884. annotations.jsx || options.pragma || "React.createElement"
  185885. );
  185886. }
  185887. parameters.unshift(name2);
  185888. this.replace(
  185889. create(node, {
  185890. type: "CallExpression",
  185891. callee,
  185892. arguments: parameters,
  185893. optional: false
  185894. })
  185895. );
  185896. }
  185897. }
  185898. function toProperty(node) {
  185899. var value;
  185900. if (node.value) {
  185901. if (node.value.type === "JSXExpressionContainer") {
  185902. value = node.value.expression;
  185903. } else {
  185904. value = node.value;
  185905. delete value.raw;
  185906. }
  185907. } else {
  185908. value = { type: "Literal", value: true };
  185909. }
  185910. return create(node, {
  185911. type: "Property",
  185912. key: toIdentifier(node.name),
  185913. value,
  185914. kind: "init",
  185915. method: false,
  185916. shorthand: false,
  185917. computed: false
  185918. });
  185919. }
  185920. function toIdentifier(node) {
  185921. var replace;
  185922. var id;
  185923. if (node.type === "JSXMemberExpression") {
  185924. id = toIdentifier(node.property);
  185925. replace = {
  185926. type: "MemberExpression",
  185927. object: toIdentifier(node.object),
  185928. property: id,
  185929. computed: id.type === "Literal",
  185930. optional: false
  185931. };
  185932. } else if (node.type === "JSXNamespacedName") {
  185933. replace = {
  185934. type: "Literal",
  185935. value: node.namespace.name + ":" + node.name.name
  185936. };
  185937. } else {
  185938. replace = name(node.name) ? { type: "Identifier", name: node.name } : { type: "Literal", value: node.name };
  185939. }
  185940. return create(node, replace);
  185941. }
  185942. function toMemberExpression(id) {
  185943. var identifiers = id.split(".");
  185944. var index2 = -1;
  185945. var result;
  185946. var prop;
  185947. while (++index2 < identifiers.length) {
  185948. prop = name(identifiers[index2]) ? { type: "Identifier", name: identifiers[index2] } : { type: "Literal", value: identifiers[index2] };
  185949. result = index2 ? {
  185950. type: "MemberExpression",
  185951. object: result,
  185952. property: prop,
  185953. computed: index2 && prop.type === "Literal",
  185954. optional: false
  185955. } : prop;
  185956. }
  185957. return result;
  185958. }
  185959. function create(from, node) {
  185960. var fields = ["start", "end", "loc", "range", "comments"];
  185961. var index2 = -1;
  185962. var field;
  185963. while (++index2 < fields.length) {
  185964. field = fields[index2];
  185965. if (field in from) {
  185966. node[field] = from[field];
  185967. }
  185968. }
  185969. return node;
  185970. }
  185971. // node_modules/@mdx-js/mdx/lib/util/estree-util-create.js
  185972. function create2(template, node) {
  185973. const fields = ["start", "end", "loc", "range", "comments"];
  185974. let index2 = -1;
  185975. while (++index2 < fields.length) {
  185976. const field = fields[index2];
  185977. if (field in template) {
  185978. node[field] = template[field];
  185979. }
  185980. }
  185981. return node;
  185982. }
  185983. // node_modules/@mdx-js/mdx/lib/util/estree-util-specifiers-to-declarations.js
  185984. function specifiersToDeclarations(specifiers, init) {
  185985. let index2 = -1;
  185986. const declarations = [];
  185987. const otherSpecifiers = [];
  185988. let importNamespaceSpecifier;
  185989. while (++index2 < specifiers.length) {
  185990. const specifier = specifiers[index2];
  185991. if (specifier.type === "ImportNamespaceSpecifier") {
  185992. importNamespaceSpecifier = specifier;
  185993. } else {
  185994. otherSpecifiers.push(specifier);
  185995. }
  185996. }
  185997. if (importNamespaceSpecifier) {
  185998. declarations.push(
  185999. create2(importNamespaceSpecifier, {
  186000. type: "VariableDeclarator",
  186001. id: importNamespaceSpecifier.local,
  186002. init
  186003. })
  186004. );
  186005. }
  186006. declarations.push({
  186007. type: "VariableDeclarator",
  186008. id: {
  186009. type: "ObjectPattern",
  186010. properties: otherSpecifiers.map((specifier) => {
  186011. let key = specifier.type === "ImportSpecifier" ? specifier.imported : specifier.type === "ExportSpecifier" ? specifier.exported : { type: "Identifier", name: "default" };
  186012. let value = specifier.local;
  186013. if (specifier.type === "ExportSpecifier") {
  186014. value = key;
  186015. key = specifier.local;
  186016. }
  186017. return create2(specifier, {
  186018. type: "Property",
  186019. kind: "init",
  186020. shorthand: key.name === value.name,
  186021. method: false,
  186022. computed: false,
  186023. key,
  186024. value
  186025. });
  186026. })
  186027. },
  186028. init: importNamespaceSpecifier ? { type: "Identifier", name: importNamespaceSpecifier.local.name } : init
  186029. });
  186030. return declarations;
  186031. }
  186032. // node_modules/@mdx-js/mdx/lib/util/estree-util-to-id-or-member-expression.js
  186033. var toIdOrMemberExpression = toIdOrMemberExpressionFactory(
  186034. "Identifier",
  186035. "MemberExpression",
  186036. name
  186037. );
  186038. var toJsxIdOrMemberExpression = toIdOrMemberExpressionFactory(
  186039. "JSXIdentifier",
  186040. "JSXMemberExpression",
  186041. isJsxIdentifierName
  186042. );
  186043. function toIdOrMemberExpressionFactory(idType, memberType, isIdentifier2) {
  186044. return toIdOrMemberExpression2;
  186045. function toIdOrMemberExpression2(ids) {
  186046. let index2 = -1;
  186047. let object;
  186048. while (++index2 < ids.length) {
  186049. const name2 = ids[index2];
  186050. const valid2 = typeof name2 === "string" && isIdentifier2(name2);
  186051. if (idType === "JSXIdentifier" && !valid2) {
  186052. throw new Error("Cannot turn `" + name2 + "` into a JSX identifier");
  186053. }
  186054. const id = valid2 ? { type: idType, name: name2 } : { type: "Literal", value: name2 };
  186055. object = object ? {
  186056. type: memberType,
  186057. object,
  186058. property: id,
  186059. computed: id.type === "Literal",
  186060. optional: false
  186061. } : id;
  186062. }
  186063. if (!object)
  186064. throw new Error("Expected non-empty `ids` to be passed");
  186065. if (object.type === "Literal")
  186066. throw new Error("Expected identifier as left-most value");
  186067. return object;
  186068. }
  186069. }
  186070. function isJsxIdentifierName(name2) {
  186071. let index2 = -1;
  186072. while (++index2 < name2.length) {
  186073. if (!(index2 ? jsxCont : start2)(name2.charCodeAt(index2)))
  186074. return false;
  186075. }
  186076. return index2 > 0;
  186077. }
  186078. function jsxCont(code2) {
  186079. return code2 === 45 || cont2(code2);
  186080. }
  186081. // node_modules/@mdx-js/mdx/lib/plugin/recma-jsx-build.js
  186082. function recmaJsxBuild(options = {}) {
  186083. const { outputFormat } = options;
  186084. return (tree) => {
  186085. buildJsx(tree);
  186086. if (outputFormat === "function-body" && tree.body[0] && tree.body[0].type === "ImportDeclaration" && typeof tree.body[0].source.value === "string" && /\/jsx-runtime$/.test(tree.body[0].source.value)) {
  186087. tree.body[0] = {
  186088. type: "VariableDeclaration",
  186089. kind: "const",
  186090. declarations: specifiersToDeclarations(
  186091. tree.body[0].specifiers,
  186092. toIdOrMemberExpression(["arguments", 0])
  186093. )
  186094. };
  186095. }
  186096. };
  186097. }
  186098. // node_modules/@mdx-js/mdx/lib/plugin/recma-document.js
  186099. import { URL } from "url";
  186100. // node_modules/is-reference/src/index.js
  186101. function is_reference(node, parent) {
  186102. if (node.type === "MemberExpression") {
  186103. return !node.computed && is_reference(node.object, node);
  186104. }
  186105. if (node.type === "Identifier") {
  186106. if (!parent)
  186107. return true;
  186108. switch (parent.type) {
  186109. case "MemberExpression":
  186110. return parent.computed || node === parent.object;
  186111. case "MethodDefinition":
  186112. return parent.computed;
  186113. case "PropertyDefinition":
  186114. return parent.computed || node === parent.value;
  186115. case "Property":
  186116. return parent.computed || node === parent.value;
  186117. case "ExportSpecifier":
  186118. case "ImportSpecifier":
  186119. return node === parent.local;
  186120. case "LabeledStatement":
  186121. case "BreakStatement":
  186122. case "ContinueStatement":
  186123. return false;
  186124. default:
  186125. return true;
  186126. }
  186127. }
  186128. return false;
  186129. }
  186130. // node_modules/periscopic/src/index.js
  186131. function analyze(expression) {
  186132. const map = /* @__PURE__ */ new WeakMap();
  186133. const globals = /* @__PURE__ */ new Map();
  186134. const scope = new Scope3(null, false);
  186135. const references = [];
  186136. let current_scope = scope;
  186137. walk(expression, {
  186138. enter(node, parent) {
  186139. switch (node.type) {
  186140. case "Identifier":
  186141. if (is_reference(node, parent)) {
  186142. references.push([current_scope, node]);
  186143. }
  186144. break;
  186145. case "ImportDeclaration":
  186146. node.specifiers.forEach((specifier) => {
  186147. current_scope.declarations.set(specifier.local.name, specifier);
  186148. });
  186149. break;
  186150. case "FunctionExpression":
  186151. case "FunctionDeclaration":
  186152. case "ArrowFunctionExpression":
  186153. if (node.type === "FunctionDeclaration") {
  186154. if (node.id) {
  186155. current_scope.declarations.set(node.id.name, node);
  186156. }
  186157. map.set(node, current_scope = new Scope3(current_scope, false));
  186158. } else {
  186159. map.set(node, current_scope = new Scope3(current_scope, false));
  186160. if (node.type === "FunctionExpression" && node.id) {
  186161. current_scope.declarations.set(node.id.name, node);
  186162. }
  186163. }
  186164. node.params.forEach((param) => {
  186165. extract_names(param).forEach((name2) => {
  186166. current_scope.declarations.set(name2, node);
  186167. });
  186168. });
  186169. break;
  186170. case "ForStatement":
  186171. case "ForInStatement":
  186172. case "ForOfStatement":
  186173. map.set(node, current_scope = new Scope3(current_scope, true));
  186174. break;
  186175. case "BlockStatement":
  186176. map.set(node, current_scope = new Scope3(current_scope, true));
  186177. break;
  186178. case "ClassDeclaration":
  186179. case "VariableDeclaration":
  186180. current_scope.add_declaration(node);
  186181. break;
  186182. case "CatchClause":
  186183. map.set(node, current_scope = new Scope3(current_scope, true));
  186184. if (node.param) {
  186185. extract_names(node.param).forEach((name2) => {
  186186. current_scope.declarations.set(name2, node.param);
  186187. });
  186188. }
  186189. break;
  186190. }
  186191. },
  186192. leave(node) {
  186193. if (map.has(node)) {
  186194. current_scope = current_scope.parent;
  186195. }
  186196. }
  186197. });
  186198. for (let i = references.length - 1; i >= 0; --i) {
  186199. const [scope2, reference] = references[i];
  186200. if (!scope2.references.has(reference.name)) {
  186201. add_reference(scope2, reference.name);
  186202. }
  186203. if (!scope2.find_owner(reference.name)) {
  186204. globals.set(reference.name, reference);
  186205. }
  186206. }
  186207. return { map, scope, globals };
  186208. }
  186209. function add_reference(scope, name2) {
  186210. scope.references.add(name2);
  186211. if (scope.parent)
  186212. add_reference(scope.parent, name2);
  186213. }
  186214. var Scope3 = class {
  186215. constructor(parent, block) {
  186216. this.parent = parent;
  186217. this.block = block;
  186218. this.declarations = /* @__PURE__ */ new Map();
  186219. this.initialised_declarations = /* @__PURE__ */ new Set();
  186220. this.references = /* @__PURE__ */ new Set();
  186221. }
  186222. add_declaration(node) {
  186223. if (node.type === "VariableDeclaration") {
  186224. if (node.kind === "var" && this.block && this.parent) {
  186225. this.parent.add_declaration(node);
  186226. } else {
  186227. const handle_declarator = (declarator) => {
  186228. extract_names(declarator.id).forEach((name2) => {
  186229. this.declarations.set(name2, node);
  186230. if (declarator.init)
  186231. this.initialised_declarations.add(name2);
  186232. });
  186233. ;
  186234. };
  186235. node.declarations.forEach(handle_declarator);
  186236. }
  186237. } else if (node.id) {
  186238. this.declarations.set(node.id.name, node);
  186239. }
  186240. }
  186241. find_owner(name2) {
  186242. if (this.declarations.has(name2))
  186243. return this;
  186244. return this.parent && this.parent.find_owner(name2);
  186245. }
  186246. has(name2) {
  186247. return this.declarations.has(name2) || !!this.parent && this.parent.has(name2);
  186248. }
  186249. };
  186250. function extract_names(param) {
  186251. return extract_identifiers(param).map((node) => node.name);
  186252. }
  186253. function extract_identifiers(param, nodes = []) {
  186254. switch (param.type) {
  186255. case "Identifier":
  186256. nodes.push(param);
  186257. break;
  186258. case "MemberExpression":
  186259. let object = param;
  186260. while (object.type === "MemberExpression") {
  186261. object = object.object;
  186262. }
  186263. nodes.push(object);
  186264. break;
  186265. case "ObjectPattern":
  186266. const handle_prop = (prop) => {
  186267. if (prop.type === "RestElement") {
  186268. extract_identifiers(prop.argument, nodes);
  186269. } else {
  186270. extract_identifiers(prop.value, nodes);
  186271. }
  186272. };
  186273. param.properties.forEach(handle_prop);
  186274. break;
  186275. case "ArrayPattern":
  186276. const handle_element = (element2) => {
  186277. if (element2)
  186278. extract_identifiers(element2, nodes);
  186279. };
  186280. param.elements.forEach(handle_element);
  186281. break;
  186282. case "RestElement":
  186283. extract_identifiers(param.argument, nodes);
  186284. break;
  186285. case "AssignmentPattern":
  186286. extract_identifiers(param.left, nodes);
  186287. break;
  186288. }
  186289. return nodes;
  186290. }
  186291. // node_modules/@mdx-js/mdx/lib/util/estree-util-declaration-to-expression.js
  186292. function declarationToExpression(declaration) {
  186293. if (declaration.type === "FunctionDeclaration") {
  186294. return { ...declaration, type: "FunctionExpression" };
  186295. }
  186296. if (declaration.type === "ClassDeclaration") {
  186297. return { ...declaration, type: "ClassExpression" };
  186298. }
  186299. throw new Error("Cannot turn `" + declaration.type + "` into an expression");
  186300. }
  186301. // node_modules/@mdx-js/mdx/lib/util/estree-util-is-declaration.js
  186302. function isDeclaration(node) {
  186303. const type = node && typeof node === "object" && node.type;
  186304. return Boolean(
  186305. type === "FunctionDeclaration" || type === "ClassDeclaration" || type === "VariableDeclaration"
  186306. );
  186307. }
  186308. // node_modules/@mdx-js/mdx/lib/plugin/recma-document.js
  186309. function recmaDocument(options = {}) {
  186310. const {
  186311. baseUrl,
  186312. useDynamicImport,
  186313. outputFormat = "program",
  186314. pragma = "React.createElement",
  186315. pragmaFrag = "React.Fragment",
  186316. pragmaImportSource = "react",
  186317. jsxImportSource = "react",
  186318. jsxRuntime = "automatic"
  186319. } = options;
  186320. return (tree, file) => {
  186321. const exportedIdentifiers = [];
  186322. const replacement = [];
  186323. const pragmas = [];
  186324. let exportAllCount = 0;
  186325. let layout;
  186326. let content3;
  186327. let child;
  186328. if (!tree.comments)
  186329. tree.comments = [];
  186330. if (jsxRuntime) {
  186331. pragmas.push("@jsxRuntime " + jsxRuntime);
  186332. }
  186333. if (jsxRuntime === "automatic" && jsxImportSource) {
  186334. pragmas.push("@jsxImportSource " + jsxImportSource);
  186335. }
  186336. if (jsxRuntime === "classic" && pragma) {
  186337. pragmas.push("@jsx " + pragma);
  186338. }
  186339. if (jsxRuntime === "classic" && pragmaFrag) {
  186340. pragmas.push("@jsxFrag " + pragmaFrag);
  186341. }
  186342. if (pragmas.length > 0) {
  186343. tree.comments.unshift({ type: "Block", value: pragmas.join(" ") });
  186344. }
  186345. if (jsxRuntime === "classic" && pragmaImportSource) {
  186346. if (!pragma) {
  186347. throw new Error(
  186348. "Missing `pragma` in classic runtime with `pragmaImportSource`"
  186349. );
  186350. }
  186351. handleEsm({
  186352. type: "ImportDeclaration",
  186353. specifiers: [
  186354. {
  186355. type: "ImportDefaultSpecifier",
  186356. local: { type: "Identifier", name: pragma.split(".")[0] }
  186357. }
  186358. ],
  186359. source: { type: "Literal", value: pragmaImportSource }
  186360. });
  186361. }
  186362. for (child of tree.body) {
  186363. if (child.type === "ExportDefaultDeclaration") {
  186364. if (layout) {
  186365. file.fail(
  186366. "Cannot specify multiple layouts (previous: " + stringifyPosition(positionFromEstree(layout)) + ")",
  186367. positionFromEstree(child),
  186368. "recma-document:duplicate-layout"
  186369. );
  186370. }
  186371. layout = child;
  186372. replacement.push({
  186373. type: "VariableDeclaration",
  186374. kind: "const",
  186375. declarations: [
  186376. {
  186377. type: "VariableDeclarator",
  186378. id: { type: "Identifier", name: "MDXLayout" },
  186379. init: isDeclaration(child.declaration) ? declarationToExpression(child.declaration) : child.declaration
  186380. }
  186381. ]
  186382. });
  186383. } else if (child.type === "ExportNamedDeclaration" && child.source) {
  186384. const source = child.source;
  186385. child.specifiers = child.specifiers.filter((specifier) => {
  186386. if (specifier.exported.name === "default") {
  186387. if (layout) {
  186388. file.fail(
  186389. "Cannot specify multiple layouts (previous: " + stringifyPosition(positionFromEstree(layout)) + ")",
  186390. positionFromEstree(child),
  186391. "recma-document:duplicate-layout"
  186392. );
  186393. }
  186394. layout = specifier;
  186395. handleEsm(
  186396. create2(specifier, {
  186397. type: "ImportDeclaration",
  186398. specifiers: [
  186399. specifier.local.name === "default" ? {
  186400. type: "ImportDefaultSpecifier",
  186401. local: { type: "Identifier", name: "MDXLayout" }
  186402. } : create2(specifier.local, {
  186403. type: "ImportSpecifier",
  186404. imported: specifier.local,
  186405. local: { type: "Identifier", name: "MDXLayout" }
  186406. })
  186407. ],
  186408. source: create2(source, { type: "Literal", value: source.value })
  186409. })
  186410. );
  186411. return false;
  186412. }
  186413. return true;
  186414. });
  186415. if (child.specifiers.length > 0) {
  186416. handleExport(child);
  186417. }
  186418. } else if (child.type === "ExportNamedDeclaration" || child.type === "ExportAllDeclaration") {
  186419. handleExport(child);
  186420. } else if (child.type === "ImportDeclaration") {
  186421. handleEsm(child);
  186422. } else if (child.type === "ExpressionStatement" && (child.expression.type === "JSXFragment" || child.expression.type === "JSXElement")) {
  186423. content3 = true;
  186424. replacement.push(createMdxContent(child.expression));
  186425. } else {
  186426. replacement.push(child);
  186427. }
  186428. }
  186429. if (!content3) {
  186430. replacement.push(createMdxContent());
  186431. }
  186432. exportedIdentifiers.push(["MDXContent", "default"]);
  186433. if (outputFormat === "function-body") {
  186434. replacement.push({
  186435. type: "ReturnStatement",
  186436. argument: {
  186437. type: "ObjectExpression",
  186438. properties: [
  186439. ...Array.from({ length: exportAllCount }).map(
  186440. (_, index2) => ({
  186441. type: "SpreadElement",
  186442. argument: { type: "Identifier", name: "_exportAll" + (index2 + 1) }
  186443. })
  186444. ),
  186445. ...exportedIdentifiers.map((d) => {
  186446. const prop = {
  186447. type: "Property",
  186448. kind: "init",
  186449. method: false,
  186450. computed: false,
  186451. shorthand: typeof d === "string",
  186452. key: {
  186453. type: "Identifier",
  186454. name: typeof d === "string" ? d : d[1]
  186455. },
  186456. value: {
  186457. type: "Identifier",
  186458. name: typeof d === "string" ? d : d[0]
  186459. }
  186460. };
  186461. return prop;
  186462. })
  186463. ]
  186464. }
  186465. });
  186466. } else {
  186467. replacement.push({
  186468. type: "ExportDefaultDeclaration",
  186469. declaration: { type: "Identifier", name: "MDXContent" }
  186470. });
  186471. }
  186472. tree.body = replacement;
  186473. function handleExport(node) {
  186474. if (node.type === "ExportNamedDeclaration") {
  186475. if (node.declaration) {
  186476. exportedIdentifiers.push(
  186477. ...analyze(node.declaration).scope.declarations.keys()
  186478. );
  186479. }
  186480. for (child of node.specifiers) {
  186481. exportedIdentifiers.push(child.exported.name);
  186482. }
  186483. }
  186484. handleEsm(node);
  186485. }
  186486. function handleEsm(node) {
  186487. if (baseUrl && node.source) {
  186488. let value = String(node.source.value);
  186489. try {
  186490. value = String(new URL(value));
  186491. } catch {
  186492. if (/^\.{0,2}\//.test(value)) {
  186493. value = String(new URL(value, baseUrl));
  186494. }
  186495. }
  186496. node.source = create2(node.source, { type: "Literal", value });
  186497. }
  186498. let replace;
  186499. let init;
  186500. if (outputFormat === "function-body") {
  186501. if (node.type === "ImportDeclaration" || node.type === "ExportAllDeclaration" || node.type === "ExportNamedDeclaration" && node.source) {
  186502. if (!useDynamicImport) {
  186503. file.fail(
  186504. "Cannot use `import` or `export \u2026 from` in `evaluate` (outputting a function body) by default: please set `useDynamicImport: true` (and probably specify a `baseUrl`)",
  186505. positionFromEstree(node),
  186506. "recma-document:invalid-esm-statement"
  186507. );
  186508. }
  186509. if (!node.source) {
  186510. throw new Error("Expected `node.source` to be defined");
  186511. }
  186512. init = {
  186513. type: "AwaitExpression",
  186514. argument: create2(node, {
  186515. type: "ImportExpression",
  186516. source: node.source
  186517. })
  186518. };
  186519. if ((node.type === "ImportDeclaration" || node.type === "ExportNamedDeclaration") && node.specifiers.length === 0) {
  186520. replace = { type: "ExpressionStatement", expression: init };
  186521. } else {
  186522. replace = {
  186523. type: "VariableDeclaration",
  186524. kind: "const",
  186525. declarations: node.type === "ExportAllDeclaration" ? [
  186526. {
  186527. type: "VariableDeclarator",
  186528. id: {
  186529. type: "Identifier",
  186530. name: "_exportAll" + ++exportAllCount
  186531. },
  186532. init
  186533. }
  186534. ] : specifiersToDeclarations(node.specifiers, init)
  186535. };
  186536. }
  186537. } else if (node.declaration) {
  186538. replace = node.declaration;
  186539. } else {
  186540. const declarators = node.specifiers.filter(
  186541. (specifier) => specifier.local.name !== specifier.exported.name
  186542. ).map((specifier) => ({
  186543. type: "VariableDeclarator",
  186544. id: specifier.exported,
  186545. init: specifier.local
  186546. }));
  186547. if (declarators.length > 0) {
  186548. replace = {
  186549. type: "VariableDeclaration",
  186550. kind: "const",
  186551. declarations: declarators
  186552. };
  186553. }
  186554. }
  186555. } else {
  186556. replace = node;
  186557. }
  186558. if (replace) {
  186559. replacement.push(replace);
  186560. }
  186561. }
  186562. };
  186563. function createMdxContent(content3) {
  186564. const element2 = {
  186565. type: "JSXElement",
  186566. openingElement: {
  186567. type: "JSXOpeningElement",
  186568. name: { type: "JSXIdentifier", name: "MDXLayout" },
  186569. attributes: [
  186570. {
  186571. type: "JSXSpreadAttribute",
  186572. argument: { type: "Identifier", name: "props" }
  186573. }
  186574. ],
  186575. selfClosing: false
  186576. },
  186577. closingElement: {
  186578. type: "JSXClosingElement",
  186579. name: { type: "JSXIdentifier", name: "MDXLayout" }
  186580. },
  186581. children: [
  186582. {
  186583. type: "JSXElement",
  186584. openingElement: {
  186585. type: "JSXOpeningElement",
  186586. name: { type: "JSXIdentifier", name: "_createMdxContent" },
  186587. attributes: [],
  186588. selfClosing: true
  186589. },
  186590. closingElement: null,
  186591. children: []
  186592. }
  186593. ]
  186594. };
  186595. const consequent = element2;
  186596. let argument = content3 || { type: "Literal", value: null };
  186597. if (argument && argument.type === "JSXFragment" && argument.children.length === 1 && argument.children[0].type === "JSXElement") {
  186598. argument = argument.children[0];
  186599. }
  186600. return {
  186601. type: "FunctionDeclaration",
  186602. id: { type: "Identifier", name: "MDXContent" },
  186603. params: [
  186604. {
  186605. type: "AssignmentPattern",
  186606. left: { type: "Identifier", name: "props" },
  186607. right: { type: "ObjectExpression", properties: [] }
  186608. }
  186609. ],
  186610. body: {
  186611. type: "BlockStatement",
  186612. body: [
  186613. {
  186614. type: "ReturnStatement",
  186615. argument: {
  186616. type: "ConditionalExpression",
  186617. test: { type: "Identifier", name: "MDXLayout" },
  186618. consequent,
  186619. alternate: {
  186620. type: "CallExpression",
  186621. callee: { type: "Identifier", name: "_createMdxContent" },
  186622. arguments: [],
  186623. optional: false
  186624. }
  186625. }
  186626. },
  186627. {
  186628. type: "FunctionDeclaration",
  186629. id: { type: "Identifier", name: "_createMdxContent" },
  186630. params: [],
  186631. body: {
  186632. type: "BlockStatement",
  186633. body: [{ type: "ReturnStatement", argument }]
  186634. }
  186635. }
  186636. ]
  186637. }
  186638. };
  186639. }
  186640. }
  186641. // node_modules/@mdx-js/mdx/lib/util/estree-util-to-binary-addition.js
  186642. function toBinaryAddition(expressions) {
  186643. let index2 = -1;
  186644. let left;
  186645. while (++index2 < expressions.length) {
  186646. const right = expressions[index2];
  186647. left = left ? { type: "BinaryExpression", left, operator: "+", right } : right;
  186648. }
  186649. if (!left)
  186650. throw new Error("Expected non-empty `expressions` to be passed");
  186651. return left;
  186652. }
  186653. // node_modules/@mdx-js/mdx/lib/plugin/recma-jsx-rewrite.js
  186654. var own10 = {}.hasOwnProperty;
  186655. function recmaJsxRewrite(options = {}) {
  186656. const { development: development2, providerImportSource, outputFormat } = options;
  186657. return (tree, file) => {
  186658. const scopeInfo = analyze(tree);
  186659. const fnStack = [];
  186660. let importProvider;
  186661. let createErrorHelper;
  186662. let currentScope;
  186663. walk(tree, {
  186664. enter(_node) {
  186665. const node = _node;
  186666. if (node.type === "FunctionDeclaration" || node.type === "FunctionExpression" || node.type === "ArrowFunctionExpression") {
  186667. fnStack.push({
  186668. objects: [],
  186669. components: [],
  186670. tags: [],
  186671. references: {},
  186672. node
  186673. });
  186674. }
  186675. let fnScope = fnStack[0];
  186676. if (!fnScope || !isNamedFunction(fnScope.node, "MDXContent") && !providerImportSource) {
  186677. return;
  186678. }
  186679. if (fnStack[1] && isNamedFunction(fnStack[1].node, "_createMdxContent")) {
  186680. fnScope = fnStack[1];
  186681. }
  186682. const newScope = scopeInfo.map.get(node);
  186683. if (newScope) {
  186684. newScope.node = node;
  186685. currentScope = newScope;
  186686. }
  186687. if (currentScope && node.type === "JSXElement") {
  186688. let name2 = node.openingElement.name;
  186689. if (name2.type === "JSXMemberExpression") {
  186690. const ids = [];
  186691. while (name2.type === "JSXMemberExpression") {
  186692. ids.unshift(name2.property.name);
  186693. name2 = name2.object;
  186694. }
  186695. ids.unshift(name2.name);
  186696. const fullId = ids.join(".");
  186697. const id = name2.name;
  186698. if (!own10.call(fnScope.references, fullId)) {
  186699. fnScope.references[fullId] = { node, component: true };
  186700. }
  186701. if (!fnScope.objects.includes(id) && !inScope(currentScope, id)) {
  186702. fnScope.objects.push(id);
  186703. }
  186704. } else if (name2.type === "JSXNamespacedName") {
  186705. } else if (name(name2.name) && !/^[a-z]/.test(name2.name)) {
  186706. const id = name2.name;
  186707. if (!inScope(currentScope, id)) {
  186708. if (id !== "MDXLayout" && !own10.call(fnScope.references, id)) {
  186709. fnScope.references[id] = { node, component: true };
  186710. }
  186711. if (!fnScope.components.includes(id)) {
  186712. fnScope.components.push(id);
  186713. }
  186714. }
  186715. } else if (node.data && node.data._mdxExplicitJsx) {
  186716. } else {
  186717. const id = name2.name;
  186718. if (!fnScope.tags.includes(id)) {
  186719. fnScope.tags.push(id);
  186720. }
  186721. node.openingElement.name = toJsxIdOrMemberExpression([
  186722. "_components",
  186723. id
  186724. ]);
  186725. if (node.closingElement) {
  186726. node.closingElement.name = toJsxIdOrMemberExpression([
  186727. "_components",
  186728. id
  186729. ]);
  186730. }
  186731. }
  186732. }
  186733. },
  186734. leave(node) {
  186735. const defaults = [];
  186736. const actual = [];
  186737. const parameters = [];
  186738. const declarations = [];
  186739. if (currentScope && currentScope.node === node) {
  186740. currentScope = currentScope.parent;
  186741. }
  186742. if (node.type === "FunctionDeclaration" || node.type === "FunctionExpression" || node.type === "ArrowFunctionExpression") {
  186743. const fn = node;
  186744. const scope = fnStack[fnStack.length - 1];
  186745. let name2;
  186746. for (name2 of scope.tags) {
  186747. defaults.push({
  186748. type: "Property",
  186749. kind: "init",
  186750. key: name(name2) ? { type: "Identifier", name: name2 } : { type: "Literal", value: name2 },
  186751. value: { type: "Literal", value: name2 },
  186752. method: false,
  186753. shorthand: false,
  186754. computed: false
  186755. });
  186756. }
  186757. actual.push(...scope.components);
  186758. for (name2 of scope.objects) {
  186759. if (!actual.includes(name2)) {
  186760. actual.push(name2);
  186761. }
  186762. }
  186763. let key;
  186764. for (key in scope.references) {
  186765. if (own10.call(scope.references, key)) {
  186766. const parts = key.split(".");
  186767. let index2 = 0;
  186768. while (++index2 < parts.length) {
  186769. const partial = parts.slice(0, index2).join(".");
  186770. if (!own10.call(scope.references, partial)) {
  186771. scope.references[partial] = {
  186772. node: scope.references[key].node,
  186773. component: false
  186774. };
  186775. }
  186776. }
  186777. }
  186778. }
  186779. if (defaults.length > 0 || actual.length > 0) {
  186780. if (providerImportSource) {
  186781. importProvider = true;
  186782. parameters.push({
  186783. type: "CallExpression",
  186784. callee: { type: "Identifier", name: "_provideComponents" },
  186785. arguments: [],
  186786. optional: false
  186787. });
  186788. }
  186789. if (isNamedFunction(scope.node, "MDXContent") || isNamedFunction(scope.node, "_createMdxContent")) {
  186790. parameters.push(toIdOrMemberExpression(["props", "components"]));
  186791. }
  186792. if (defaults.length > 0 || parameters.length > 1) {
  186793. parameters.unshift({
  186794. type: "ObjectExpression",
  186795. properties: defaults
  186796. });
  186797. }
  186798. let componentsInit = parameters.length > 1 ? {
  186799. type: "CallExpression",
  186800. callee: toIdOrMemberExpression(["Object", "assign"]),
  186801. arguments: parameters,
  186802. optional: false
  186803. } : parameters[0].type === "MemberExpression" ? {
  186804. type: "LogicalExpression",
  186805. operator: "||",
  186806. left: parameters[0],
  186807. right: { type: "ObjectExpression", properties: [] }
  186808. } : parameters[0];
  186809. let componentsPattern;
  186810. if (actual.length > 0) {
  186811. componentsPattern = {
  186812. type: "ObjectPattern",
  186813. properties: actual.map((name3) => ({
  186814. type: "Property",
  186815. kind: "init",
  186816. key: {
  186817. type: "Identifier",
  186818. name: name3 === "MDXLayout" ? "wrapper" : name3
  186819. },
  186820. value: { type: "Identifier", name: name3 },
  186821. method: false,
  186822. shorthand: name3 !== "MDXLayout",
  186823. computed: false
  186824. }))
  186825. };
  186826. }
  186827. if (scope.tags.length > 0) {
  186828. declarations.push({
  186829. type: "VariableDeclarator",
  186830. id: { type: "Identifier", name: "_components" },
  186831. init: componentsInit
  186832. });
  186833. componentsInit = { type: "Identifier", name: "_components" };
  186834. }
  186835. if (componentsPattern) {
  186836. declarations.push({
  186837. type: "VariableDeclarator",
  186838. id: componentsPattern,
  186839. init: componentsInit
  186840. });
  186841. }
  186842. if (fn.body.type !== "BlockStatement") {
  186843. fn.body = {
  186844. type: "BlockStatement",
  186845. body: [{ type: "ReturnStatement", argument: fn.body }]
  186846. };
  186847. }
  186848. const statements = [
  186849. {
  186850. type: "VariableDeclaration",
  186851. kind: "const",
  186852. declarations
  186853. }
  186854. ];
  186855. const references = Object.keys(scope.references).sort();
  186856. let index2 = -1;
  186857. while (++index2 < references.length) {
  186858. const id = references[index2];
  186859. const info = scope.references[id];
  186860. const place = stringifyPosition(positionFromEstree(info.node));
  186861. const parameters2 = [
  186862. { type: "Literal", value: id },
  186863. { type: "Literal", value: info.component }
  186864. ];
  186865. createErrorHelper = true;
  186866. if (development2 && place !== "1:1-1:1") {
  186867. parameters2.push({ type: "Literal", value: place });
  186868. }
  186869. statements.push({
  186870. type: "IfStatement",
  186871. test: {
  186872. type: "UnaryExpression",
  186873. operator: "!",
  186874. prefix: true,
  186875. argument: toIdOrMemberExpression(id.split("."))
  186876. },
  186877. consequent: {
  186878. type: "ExpressionStatement",
  186879. expression: {
  186880. type: "CallExpression",
  186881. callee: { type: "Identifier", name: "_missingMdxReference" },
  186882. arguments: parameters2,
  186883. optional: false
  186884. }
  186885. },
  186886. alternate: null
  186887. });
  186888. }
  186889. fn.body.body.unshift(...statements);
  186890. }
  186891. fnStack.pop();
  186892. }
  186893. }
  186894. });
  186895. if (importProvider && providerImportSource) {
  186896. tree.body.unshift(
  186897. createImportProvider(providerImportSource, outputFormat)
  186898. );
  186899. }
  186900. if (createErrorHelper) {
  186901. const message = [
  186902. { type: "Literal", value: "Expected " },
  186903. {
  186904. type: "ConditionalExpression",
  186905. test: { type: "Identifier", name: "component" },
  186906. consequent: { type: "Literal", value: "component" },
  186907. alternate: { type: "Literal", value: "object" }
  186908. },
  186909. { type: "Literal", value: " `" },
  186910. { type: "Identifier", name: "id" },
  186911. {
  186912. type: "Literal",
  186913. value: "` to be defined: you likely forgot to import, pass, or provide it."
  186914. }
  186915. ];
  186916. const parameters = [
  186917. { type: "Identifier", name: "id" },
  186918. { type: "Identifier", name: "component" }
  186919. ];
  186920. if (development2) {
  186921. message.push({
  186922. type: "ConditionalExpression",
  186923. test: { type: "Identifier", name: "place" },
  186924. consequent: toBinaryAddition([
  186925. { type: "Literal", value: "\nIt\u2019s referenced in your code at `" },
  186926. { type: "Identifier", name: "place" },
  186927. {
  186928. type: "Literal",
  186929. value: (file.path ? "` in `" + file.path : "") + "`"
  186930. }
  186931. ]),
  186932. alternate: { type: "Literal", value: "" }
  186933. });
  186934. parameters.push({ type: "Identifier", name: "place" });
  186935. }
  186936. tree.body.push({
  186937. type: "FunctionDeclaration",
  186938. id: { type: "Identifier", name: "_missingMdxReference" },
  186939. generator: false,
  186940. async: false,
  186941. params: parameters,
  186942. body: {
  186943. type: "BlockStatement",
  186944. body: [
  186945. {
  186946. type: "ThrowStatement",
  186947. argument: {
  186948. type: "NewExpression",
  186949. callee: { type: "Identifier", name: "Error" },
  186950. arguments: [toBinaryAddition(message)]
  186951. }
  186952. }
  186953. ]
  186954. }
  186955. });
  186956. }
  186957. };
  186958. }
  186959. function createImportProvider(providerImportSource, outputFormat) {
  186960. const specifiers = [
  186961. {
  186962. type: "ImportSpecifier",
  186963. imported: { type: "Identifier", name: "useMDXComponents" },
  186964. local: { type: "Identifier", name: "_provideComponents" }
  186965. }
  186966. ];
  186967. return outputFormat === "function-body" ? {
  186968. type: "VariableDeclaration",
  186969. kind: "const",
  186970. declarations: specifiersToDeclarations(
  186971. specifiers,
  186972. toIdOrMemberExpression(["arguments", 0])
  186973. )
  186974. } : {
  186975. type: "ImportDeclaration",
  186976. specifiers,
  186977. source: { type: "Literal", value: providerImportSource }
  186978. };
  186979. }
  186980. function isNamedFunction(node, name2) {
  186981. return Boolean(node && "id" in node && node.id && node.id.name === name2);
  186982. }
  186983. function inScope(scope, id) {
  186984. let currentScope = scope;
  186985. while (currentScope) {
  186986. if (currentScope.declarations.has(id)) {
  186987. return true;
  186988. }
  186989. currentScope = currentScope.parent;
  186990. }
  186991. return false;
  186992. }
  186993. // node_modules/astring/dist/astring.mjs
  186994. var { stringify } = JSON;
  186995. if (!String.prototype.repeat) {
  186996. throw new Error(
  186997. "String.prototype.repeat is undefined, see https://github.com/davidbonnet/astring#installation"
  186998. );
  186999. }
  187000. if (!String.prototype.endsWith) {
  187001. throw new Error(
  187002. "String.prototype.endsWith is undefined, see https://github.com/davidbonnet/astring#installation"
  187003. );
  187004. }
  187005. var OPERATOR_PRECEDENCE = {
  187006. "||": 3,
  187007. "&&": 4,
  187008. "|": 5,
  187009. "??": 5,
  187010. "^": 6,
  187011. "&": 7,
  187012. "==": 8,
  187013. "!=": 8,
  187014. "===": 8,
  187015. "!==": 8,
  187016. "<": 9,
  187017. ">": 9,
  187018. "<=": 9,
  187019. ">=": 9,
  187020. in: 9,
  187021. instanceof: 9,
  187022. "<<": 10,
  187023. ">>": 10,
  187024. ">>>": 10,
  187025. "+": 11,
  187026. "-": 11,
  187027. "*": 12,
  187028. "%": 12,
  187029. "/": 12,
  187030. "**": 13
  187031. };
  187032. var NEEDS_PARENTHESES = 17;
  187033. var EXPRESSIONS_PRECEDENCE = {
  187034. ArrayExpression: 20,
  187035. TaggedTemplateExpression: 20,
  187036. ThisExpression: 20,
  187037. Identifier: 20,
  187038. PrivateIdentifier: 20,
  187039. Literal: 18,
  187040. TemplateLiteral: 20,
  187041. Super: 20,
  187042. SequenceExpression: 20,
  187043. MemberExpression: 19,
  187044. ChainExpression: 19,
  187045. CallExpression: 19,
  187046. NewExpression: 19,
  187047. ArrowFunctionExpression: NEEDS_PARENTHESES,
  187048. ClassExpression: NEEDS_PARENTHESES,
  187049. FunctionExpression: NEEDS_PARENTHESES,
  187050. ObjectExpression: NEEDS_PARENTHESES,
  187051. UpdateExpression: 16,
  187052. UnaryExpression: 15,
  187053. AwaitExpression: 15,
  187054. BinaryExpression: 14,
  187055. LogicalExpression: 13,
  187056. ConditionalExpression: 4,
  187057. AssignmentExpression: 3,
  187058. YieldExpression: 2,
  187059. RestElement: 1
  187060. };
  187061. function formatSequence(state, nodes) {
  187062. const { generator } = state;
  187063. state.write("(");
  187064. if (nodes != null && nodes.length > 0) {
  187065. generator[nodes[0].type](nodes[0], state);
  187066. const { length } = nodes;
  187067. for (let i = 1; i < length; i++) {
  187068. const param = nodes[i];
  187069. state.write(", ");
  187070. generator[param.type](param, state);
  187071. }
  187072. }
  187073. state.write(")");
  187074. }
  187075. function expressionNeedsParenthesis(state, node, parentNode, isRightHand) {
  187076. const nodePrecedence = state.expressionsPrecedence[node.type];
  187077. if (nodePrecedence === NEEDS_PARENTHESES) {
  187078. return true;
  187079. }
  187080. const parentNodePrecedence = state.expressionsPrecedence[parentNode.type];
  187081. if (nodePrecedence !== parentNodePrecedence) {
  187082. return !isRightHand && nodePrecedence === 15 && parentNodePrecedence === 14 && parentNode.operator === "**" || nodePrecedence < parentNodePrecedence;
  187083. }
  187084. if (nodePrecedence !== 13 && nodePrecedence !== 14) {
  187085. return false;
  187086. }
  187087. if (node.operator === "**" && parentNode.operator === "**") {
  187088. return !isRightHand;
  187089. }
  187090. if (isRightHand) {
  187091. return OPERATOR_PRECEDENCE[node.operator] <= OPERATOR_PRECEDENCE[parentNode.operator];
  187092. }
  187093. return OPERATOR_PRECEDENCE[node.operator] < OPERATOR_PRECEDENCE[parentNode.operator];
  187094. }
  187095. function formatExpression(state, node, parentNode, isRightHand) {
  187096. const { generator } = state;
  187097. if (expressionNeedsParenthesis(state, node, parentNode, isRightHand)) {
  187098. state.write("(");
  187099. generator[node.type](node, state);
  187100. state.write(")");
  187101. } else {
  187102. generator[node.type](node, state);
  187103. }
  187104. }
  187105. function reindent(state, text5, indent, lineEnd) {
  187106. const lines = text5.split("\n");
  187107. const end = lines.length - 1;
  187108. state.write(lines[0].trim());
  187109. if (end > 0) {
  187110. state.write(lineEnd);
  187111. for (let i = 1; i < end; i++) {
  187112. state.write(indent + lines[i].trim() + lineEnd);
  187113. }
  187114. state.write(indent + lines[end].trim());
  187115. }
  187116. }
  187117. function formatComments(state, comments, indent, lineEnd) {
  187118. const { length } = comments;
  187119. for (let i = 0; i < length; i++) {
  187120. const comment2 = comments[i];
  187121. state.write(indent);
  187122. if (comment2.type[0] === "L") {
  187123. state.write("// " + comment2.value.trim() + "\n", comment2);
  187124. } else {
  187125. state.write("/*");
  187126. reindent(state, comment2.value, indent, lineEnd);
  187127. state.write("*/" + lineEnd);
  187128. }
  187129. }
  187130. }
  187131. function hasCallExpression(node) {
  187132. let currentNode = node;
  187133. while (currentNode != null) {
  187134. const { type } = currentNode;
  187135. if (type[0] === "C" && type[1] === "a") {
  187136. return true;
  187137. } else if (type[0] === "M" && type[1] === "e" && type[2] === "m") {
  187138. currentNode = currentNode.object;
  187139. } else {
  187140. return false;
  187141. }
  187142. }
  187143. }
  187144. function formatVariableDeclaration(state, node) {
  187145. const { generator } = state;
  187146. const { declarations } = node;
  187147. state.write(node.kind + " ");
  187148. const { length } = declarations;
  187149. if (length > 0) {
  187150. generator.VariableDeclarator(declarations[0], state);
  187151. for (let i = 1; i < length; i++) {
  187152. state.write(", ");
  187153. generator.VariableDeclarator(declarations[i], state);
  187154. }
  187155. }
  187156. }
  187157. var ForInStatement;
  187158. var FunctionDeclaration;
  187159. var RestElement;
  187160. var BinaryExpression;
  187161. var ArrayExpression;
  187162. var BlockStatement;
  187163. var GENERATOR = {
  187164. Program(node, state) {
  187165. const indent = state.indent.repeat(state.indentLevel);
  187166. const { lineEnd, writeComments } = state;
  187167. if (writeComments && node.comments != null) {
  187168. formatComments(state, node.comments, indent, lineEnd);
  187169. }
  187170. const statements = node.body;
  187171. const { length } = statements;
  187172. for (let i = 0; i < length; i++) {
  187173. const statement = statements[i];
  187174. if (writeComments && statement.comments != null) {
  187175. formatComments(state, statement.comments, indent, lineEnd);
  187176. }
  187177. state.write(indent);
  187178. this[statement.type](statement, state);
  187179. state.write(lineEnd);
  187180. }
  187181. if (writeComments && node.trailingComments != null) {
  187182. formatComments(state, node.trailingComments, indent, lineEnd);
  187183. }
  187184. },
  187185. BlockStatement: BlockStatement = function(node, state) {
  187186. const indent = state.indent.repeat(state.indentLevel++);
  187187. const { lineEnd, writeComments } = state;
  187188. const statementIndent = indent + state.indent;
  187189. state.write("{");
  187190. const statements = node.body;
  187191. if (statements != null && statements.length > 0) {
  187192. state.write(lineEnd);
  187193. if (writeComments && node.comments != null) {
  187194. formatComments(state, node.comments, statementIndent, lineEnd);
  187195. }
  187196. const { length } = statements;
  187197. for (let i = 0; i < length; i++) {
  187198. const statement = statements[i];
  187199. if (writeComments && statement.comments != null) {
  187200. formatComments(state, statement.comments, statementIndent, lineEnd);
  187201. }
  187202. state.write(statementIndent);
  187203. this[statement.type](statement, state);
  187204. state.write(lineEnd);
  187205. }
  187206. state.write(indent);
  187207. } else {
  187208. if (writeComments && node.comments != null) {
  187209. state.write(lineEnd);
  187210. formatComments(state, node.comments, statementIndent, lineEnd);
  187211. state.write(indent);
  187212. }
  187213. }
  187214. if (writeComments && node.trailingComments != null) {
  187215. formatComments(state, node.trailingComments, statementIndent, lineEnd);
  187216. }
  187217. state.write("}");
  187218. state.indentLevel--;
  187219. },
  187220. ClassBody: BlockStatement,
  187221. StaticBlock(node, state) {
  187222. state.write("static ");
  187223. this.BlockStatement(node, state);
  187224. },
  187225. EmptyStatement(node, state) {
  187226. state.write(";");
  187227. },
  187228. ExpressionStatement(node, state) {
  187229. const precedence = state.expressionsPrecedence[node.expression.type];
  187230. if (precedence === NEEDS_PARENTHESES || precedence === 3 && node.expression.left.type[0] === "O") {
  187231. state.write("(");
  187232. this[node.expression.type](node.expression, state);
  187233. state.write(")");
  187234. } else {
  187235. this[node.expression.type](node.expression, state);
  187236. }
  187237. state.write(";");
  187238. },
  187239. IfStatement(node, state) {
  187240. state.write("if (");
  187241. this[node.test.type](node.test, state);
  187242. state.write(") ");
  187243. this[node.consequent.type](node.consequent, state);
  187244. if (node.alternate != null) {
  187245. state.write(" else ");
  187246. this[node.alternate.type](node.alternate, state);
  187247. }
  187248. },
  187249. LabeledStatement(node, state) {
  187250. this[node.label.type](node.label, state);
  187251. state.write(": ");
  187252. this[node.body.type](node.body, state);
  187253. },
  187254. BreakStatement(node, state) {
  187255. state.write("break");
  187256. if (node.label != null) {
  187257. state.write(" ");
  187258. this[node.label.type](node.label, state);
  187259. }
  187260. state.write(";");
  187261. },
  187262. ContinueStatement(node, state) {
  187263. state.write("continue");
  187264. if (node.label != null) {
  187265. state.write(" ");
  187266. this[node.label.type](node.label, state);
  187267. }
  187268. state.write(";");
  187269. },
  187270. WithStatement(node, state) {
  187271. state.write("with (");
  187272. this[node.object.type](node.object, state);
  187273. state.write(") ");
  187274. this[node.body.type](node.body, state);
  187275. },
  187276. SwitchStatement(node, state) {
  187277. const indent = state.indent.repeat(state.indentLevel++);
  187278. const { lineEnd, writeComments } = state;
  187279. state.indentLevel++;
  187280. const caseIndent = indent + state.indent;
  187281. const statementIndent = caseIndent + state.indent;
  187282. state.write("switch (");
  187283. this[node.discriminant.type](node.discriminant, state);
  187284. state.write(") {" + lineEnd);
  187285. const { cases: occurences } = node;
  187286. const { length: occurencesCount } = occurences;
  187287. for (let i = 0; i < occurencesCount; i++) {
  187288. const occurence = occurences[i];
  187289. if (writeComments && occurence.comments != null) {
  187290. formatComments(state, occurence.comments, caseIndent, lineEnd);
  187291. }
  187292. if (occurence.test) {
  187293. state.write(caseIndent + "case ");
  187294. this[occurence.test.type](occurence.test, state);
  187295. state.write(":" + lineEnd);
  187296. } else {
  187297. state.write(caseIndent + "default:" + lineEnd);
  187298. }
  187299. const { consequent } = occurence;
  187300. const { length: consequentCount } = consequent;
  187301. for (let i2 = 0; i2 < consequentCount; i2++) {
  187302. const statement = consequent[i2];
  187303. if (writeComments && statement.comments != null) {
  187304. formatComments(state, statement.comments, statementIndent, lineEnd);
  187305. }
  187306. state.write(statementIndent);
  187307. this[statement.type](statement, state);
  187308. state.write(lineEnd);
  187309. }
  187310. }
  187311. state.indentLevel -= 2;
  187312. state.write(indent + "}");
  187313. },
  187314. ReturnStatement(node, state) {
  187315. state.write("return");
  187316. if (node.argument) {
  187317. state.write(" ");
  187318. this[node.argument.type](node.argument, state);
  187319. }
  187320. state.write(";");
  187321. },
  187322. ThrowStatement(node, state) {
  187323. state.write("throw ");
  187324. this[node.argument.type](node.argument, state);
  187325. state.write(";");
  187326. },
  187327. TryStatement(node, state) {
  187328. state.write("try ");
  187329. this[node.block.type](node.block, state);
  187330. if (node.handler) {
  187331. const { handler } = node;
  187332. if (handler.param == null) {
  187333. state.write(" catch ");
  187334. } else {
  187335. state.write(" catch (");
  187336. this[handler.param.type](handler.param, state);
  187337. state.write(") ");
  187338. }
  187339. this[handler.body.type](handler.body, state);
  187340. }
  187341. if (node.finalizer) {
  187342. state.write(" finally ");
  187343. this[node.finalizer.type](node.finalizer, state);
  187344. }
  187345. },
  187346. WhileStatement(node, state) {
  187347. state.write("while (");
  187348. this[node.test.type](node.test, state);
  187349. state.write(") ");
  187350. this[node.body.type](node.body, state);
  187351. },
  187352. DoWhileStatement(node, state) {
  187353. state.write("do ");
  187354. this[node.body.type](node.body, state);
  187355. state.write(" while (");
  187356. this[node.test.type](node.test, state);
  187357. state.write(");");
  187358. },
  187359. ForStatement(node, state) {
  187360. state.write("for (");
  187361. if (node.init != null) {
  187362. const { init } = node;
  187363. if (init.type[0] === "V") {
  187364. formatVariableDeclaration(state, init);
  187365. } else {
  187366. this[init.type](init, state);
  187367. }
  187368. }
  187369. state.write("; ");
  187370. if (node.test) {
  187371. this[node.test.type](node.test, state);
  187372. }
  187373. state.write("; ");
  187374. if (node.update) {
  187375. this[node.update.type](node.update, state);
  187376. }
  187377. state.write(") ");
  187378. this[node.body.type](node.body, state);
  187379. },
  187380. ForInStatement: ForInStatement = function(node, state) {
  187381. state.write(`for ${node.await ? "await " : ""}(`);
  187382. const { left } = node;
  187383. if (left.type[0] === "V") {
  187384. formatVariableDeclaration(state, left);
  187385. } else {
  187386. this[left.type](left, state);
  187387. }
  187388. state.write(node.type[3] === "I" ? " in " : " of ");
  187389. this[node.right.type](node.right, state);
  187390. state.write(") ");
  187391. this[node.body.type](node.body, state);
  187392. },
  187393. ForOfStatement: ForInStatement,
  187394. DebuggerStatement(node, state) {
  187395. state.write("debugger;", node);
  187396. },
  187397. FunctionDeclaration: FunctionDeclaration = function(node, state) {
  187398. state.write(
  187399. (node.async ? "async " : "") + (node.generator ? "function* " : "function ") + (node.id ? node.id.name : ""),
  187400. node
  187401. );
  187402. formatSequence(state, node.params);
  187403. state.write(" ");
  187404. this[node.body.type](node.body, state);
  187405. },
  187406. FunctionExpression: FunctionDeclaration,
  187407. VariableDeclaration(node, state) {
  187408. formatVariableDeclaration(state, node);
  187409. state.write(";");
  187410. },
  187411. VariableDeclarator(node, state) {
  187412. this[node.id.type](node.id, state);
  187413. if (node.init != null) {
  187414. state.write(" = ");
  187415. this[node.init.type](node.init, state);
  187416. }
  187417. },
  187418. ClassDeclaration(node, state) {
  187419. state.write("class " + (node.id ? `${node.id.name} ` : ""), node);
  187420. if (node.superClass) {
  187421. state.write("extends ");
  187422. const { superClass } = node;
  187423. const { type } = superClass;
  187424. const precedence = state.expressionsPrecedence[type];
  187425. if ((type[0] !== "C" || type[1] !== "l" || type[5] !== "E") && (precedence === NEEDS_PARENTHESES || precedence < state.expressionsPrecedence.ClassExpression)) {
  187426. state.write("(");
  187427. this[node.superClass.type](superClass, state);
  187428. state.write(")");
  187429. } else {
  187430. this[superClass.type](superClass, state);
  187431. }
  187432. state.write(" ");
  187433. }
  187434. this.ClassBody(node.body, state);
  187435. },
  187436. ImportDeclaration(node, state) {
  187437. state.write("import ");
  187438. const { specifiers } = node;
  187439. const { length } = specifiers;
  187440. let i = 0;
  187441. if (length > 0) {
  187442. for (; i < length; ) {
  187443. if (i > 0) {
  187444. state.write(", ");
  187445. }
  187446. const specifier = specifiers[i];
  187447. const type = specifier.type[6];
  187448. if (type === "D") {
  187449. state.write(specifier.local.name, specifier);
  187450. i++;
  187451. } else if (type === "N") {
  187452. state.write("* as " + specifier.local.name, specifier);
  187453. i++;
  187454. } else {
  187455. break;
  187456. }
  187457. }
  187458. if (i < length) {
  187459. state.write("{");
  187460. for (; ; ) {
  187461. const specifier = specifiers[i];
  187462. const { name: name2 } = specifier.imported;
  187463. state.write(name2, specifier);
  187464. if (name2 !== specifier.local.name) {
  187465. state.write(" as " + specifier.local.name);
  187466. }
  187467. if (++i < length) {
  187468. state.write(", ");
  187469. } else {
  187470. break;
  187471. }
  187472. }
  187473. state.write("}");
  187474. }
  187475. state.write(" from ");
  187476. }
  187477. this.Literal(node.source, state);
  187478. state.write(";");
  187479. },
  187480. ImportExpression(node, state) {
  187481. state.write("import(");
  187482. this[node.source.type](node.source, state);
  187483. state.write(")");
  187484. },
  187485. ExportDefaultDeclaration(node, state) {
  187486. state.write("export default ");
  187487. this[node.declaration.type](node.declaration, state);
  187488. if (state.expressionsPrecedence[node.declaration.type] != null && node.declaration.type[0] !== "F") {
  187489. state.write(";");
  187490. }
  187491. },
  187492. ExportNamedDeclaration(node, state) {
  187493. state.write("export ");
  187494. if (node.declaration) {
  187495. this[node.declaration.type](node.declaration, state);
  187496. } else {
  187497. state.write("{");
  187498. const { specifiers } = node, { length } = specifiers;
  187499. if (length > 0) {
  187500. for (let i = 0; ; ) {
  187501. const specifier = specifiers[i];
  187502. const { name: name2 } = specifier.local;
  187503. state.write(name2, specifier);
  187504. if (name2 !== specifier.exported.name) {
  187505. state.write(" as " + specifier.exported.name);
  187506. }
  187507. if (++i < length) {
  187508. state.write(", ");
  187509. } else {
  187510. break;
  187511. }
  187512. }
  187513. }
  187514. state.write("}");
  187515. if (node.source) {
  187516. state.write(" from ");
  187517. this.Literal(node.source, state);
  187518. }
  187519. state.write(";");
  187520. }
  187521. },
  187522. ExportAllDeclaration(node, state) {
  187523. if (node.exported != null) {
  187524. state.write("export * as " + node.exported.name + " from ");
  187525. } else {
  187526. state.write("export * from ");
  187527. }
  187528. this.Literal(node.source, state);
  187529. state.write(";");
  187530. },
  187531. MethodDefinition(node, state) {
  187532. if (node.static) {
  187533. state.write("static ");
  187534. }
  187535. const kind = node.kind[0];
  187536. if (kind === "g" || kind === "s") {
  187537. state.write(node.kind + " ");
  187538. }
  187539. if (node.value.async) {
  187540. state.write("async ");
  187541. }
  187542. if (node.value.generator) {
  187543. state.write("*");
  187544. }
  187545. if (node.computed) {
  187546. state.write("[");
  187547. this[node.key.type](node.key, state);
  187548. state.write("]");
  187549. } else {
  187550. this[node.key.type](node.key, state);
  187551. }
  187552. formatSequence(state, node.value.params);
  187553. state.write(" ");
  187554. this[node.value.body.type](node.value.body, state);
  187555. },
  187556. ClassExpression(node, state) {
  187557. this.ClassDeclaration(node, state);
  187558. },
  187559. ArrowFunctionExpression(node, state) {
  187560. state.write(node.async ? "async " : "", node);
  187561. const { params } = node;
  187562. if (params != null) {
  187563. if (params.length === 1 && params[0].type[0] === "I") {
  187564. state.write(params[0].name, params[0]);
  187565. } else {
  187566. formatSequence(state, node.params);
  187567. }
  187568. }
  187569. state.write(" => ");
  187570. if (node.body.type[0] === "O") {
  187571. state.write("(");
  187572. this.ObjectExpression(node.body, state);
  187573. state.write(")");
  187574. } else {
  187575. this[node.body.type](node.body, state);
  187576. }
  187577. },
  187578. ThisExpression(node, state) {
  187579. state.write("this", node);
  187580. },
  187581. Super(node, state) {
  187582. state.write("super", node);
  187583. },
  187584. RestElement: RestElement = function(node, state) {
  187585. state.write("...");
  187586. this[node.argument.type](node.argument, state);
  187587. },
  187588. SpreadElement: RestElement,
  187589. YieldExpression(node, state) {
  187590. state.write(node.delegate ? "yield*" : "yield");
  187591. if (node.argument) {
  187592. state.write(" ");
  187593. this[node.argument.type](node.argument, state);
  187594. }
  187595. },
  187596. AwaitExpression(node, state) {
  187597. state.write("await ", node);
  187598. formatExpression(state, node.argument, node);
  187599. },
  187600. TemplateLiteral(node, state) {
  187601. const { quasis, expressions } = node;
  187602. state.write("`");
  187603. const { length } = expressions;
  187604. for (let i = 0; i < length; i++) {
  187605. const expression = expressions[i];
  187606. const quasi2 = quasis[i];
  187607. state.write(quasi2.value.raw, quasi2);
  187608. state.write("${");
  187609. this[expression.type](expression, state);
  187610. state.write("}");
  187611. }
  187612. const quasi = quasis[quasis.length - 1];
  187613. state.write(quasi.value.raw, quasi);
  187614. state.write("`");
  187615. },
  187616. TemplateElement(node, state) {
  187617. state.write(node.value.raw, node);
  187618. },
  187619. TaggedTemplateExpression(node, state) {
  187620. formatExpression(state, node.tag, node);
  187621. this[node.quasi.type](node.quasi, state);
  187622. },
  187623. ArrayExpression: ArrayExpression = function(node, state) {
  187624. state.write("[");
  187625. if (node.elements.length > 0) {
  187626. const { elements } = node, { length } = elements;
  187627. for (let i = 0; ; ) {
  187628. const element2 = elements[i];
  187629. if (element2 != null) {
  187630. this[element2.type](element2, state);
  187631. }
  187632. if (++i < length) {
  187633. state.write(", ");
  187634. } else {
  187635. if (element2 == null) {
  187636. state.write(", ");
  187637. }
  187638. break;
  187639. }
  187640. }
  187641. }
  187642. state.write("]");
  187643. },
  187644. ArrayPattern: ArrayExpression,
  187645. ObjectExpression(node, state) {
  187646. const indent = state.indent.repeat(state.indentLevel++);
  187647. const { lineEnd, writeComments } = state;
  187648. const propertyIndent = indent + state.indent;
  187649. state.write("{");
  187650. if (node.properties.length > 0) {
  187651. state.write(lineEnd);
  187652. if (writeComments && node.comments != null) {
  187653. formatComments(state, node.comments, propertyIndent, lineEnd);
  187654. }
  187655. const comma = "," + lineEnd;
  187656. const { properties } = node, { length } = properties;
  187657. for (let i = 0; ; ) {
  187658. const property = properties[i];
  187659. if (writeComments && property.comments != null) {
  187660. formatComments(state, property.comments, propertyIndent, lineEnd);
  187661. }
  187662. state.write(propertyIndent);
  187663. this[property.type](property, state);
  187664. if (++i < length) {
  187665. state.write(comma);
  187666. } else {
  187667. break;
  187668. }
  187669. }
  187670. state.write(lineEnd);
  187671. if (writeComments && node.trailingComments != null) {
  187672. formatComments(state, node.trailingComments, propertyIndent, lineEnd);
  187673. }
  187674. state.write(indent + "}");
  187675. } else if (writeComments) {
  187676. if (node.comments != null) {
  187677. state.write(lineEnd);
  187678. formatComments(state, node.comments, propertyIndent, lineEnd);
  187679. if (node.trailingComments != null) {
  187680. formatComments(state, node.trailingComments, propertyIndent, lineEnd);
  187681. }
  187682. state.write(indent + "}");
  187683. } else if (node.trailingComments != null) {
  187684. state.write(lineEnd);
  187685. formatComments(state, node.trailingComments, propertyIndent, lineEnd);
  187686. state.write(indent + "}");
  187687. } else {
  187688. state.write("}");
  187689. }
  187690. } else {
  187691. state.write("}");
  187692. }
  187693. state.indentLevel--;
  187694. },
  187695. Property(node, state) {
  187696. if (node.method || node.kind[0] !== "i") {
  187697. this.MethodDefinition(node, state);
  187698. } else {
  187699. if (!node.shorthand) {
  187700. if (node.computed) {
  187701. state.write("[");
  187702. this[node.key.type](node.key, state);
  187703. state.write("]");
  187704. } else {
  187705. this[node.key.type](node.key, state);
  187706. }
  187707. state.write(": ");
  187708. }
  187709. this[node.value.type](node.value, state);
  187710. }
  187711. },
  187712. PropertyDefinition(node, state) {
  187713. if (node.static) {
  187714. state.write("static ");
  187715. }
  187716. this[node.key.type](node.key, state);
  187717. state.write(" = ");
  187718. this[node.value.type](node.value, state);
  187719. },
  187720. ObjectPattern(node, state) {
  187721. state.write("{");
  187722. if (node.properties.length > 0) {
  187723. const { properties } = node, { length } = properties;
  187724. for (let i = 0; ; ) {
  187725. this[properties[i].type](properties[i], state);
  187726. if (++i < length) {
  187727. state.write(", ");
  187728. } else {
  187729. break;
  187730. }
  187731. }
  187732. }
  187733. state.write("}");
  187734. },
  187735. SequenceExpression(node, state) {
  187736. formatSequence(state, node.expressions);
  187737. },
  187738. UnaryExpression(node, state) {
  187739. if (node.prefix) {
  187740. const {
  187741. operator,
  187742. argument,
  187743. argument: { type }
  187744. } = node;
  187745. state.write(operator);
  187746. const needsParentheses = expressionNeedsParenthesis(state, argument, node);
  187747. if (!needsParentheses && (operator.length > 1 || type[0] === "U" && (type[1] === "n" || type[1] === "p") && argument.prefix && argument.operator[0] === operator && (operator === "+" || operator === "-"))) {
  187748. state.write(" ");
  187749. }
  187750. if (needsParentheses) {
  187751. state.write(operator.length > 1 ? " (" : "(");
  187752. this[type](argument, state);
  187753. state.write(")");
  187754. } else {
  187755. this[type](argument, state);
  187756. }
  187757. } else {
  187758. this[node.argument.type](node.argument, state);
  187759. state.write(node.operator);
  187760. }
  187761. },
  187762. UpdateExpression(node, state) {
  187763. if (node.prefix) {
  187764. state.write(node.operator);
  187765. this[node.argument.type](node.argument, state);
  187766. } else {
  187767. this[node.argument.type](node.argument, state);
  187768. state.write(node.operator);
  187769. }
  187770. },
  187771. AssignmentExpression(node, state) {
  187772. this[node.left.type](node.left, state);
  187773. state.write(" " + node.operator + " ");
  187774. this[node.right.type](node.right, state);
  187775. },
  187776. AssignmentPattern(node, state) {
  187777. this[node.left.type](node.left, state);
  187778. state.write(" = ");
  187779. this[node.right.type](node.right, state);
  187780. },
  187781. BinaryExpression: BinaryExpression = function(node, state) {
  187782. const isIn = node.operator === "in";
  187783. if (isIn) {
  187784. state.write("(");
  187785. }
  187786. formatExpression(state, node.left, node, false);
  187787. state.write(" " + node.operator + " ");
  187788. formatExpression(state, node.right, node, true);
  187789. if (isIn) {
  187790. state.write(")");
  187791. }
  187792. },
  187793. LogicalExpression: BinaryExpression,
  187794. ConditionalExpression(node, state) {
  187795. const { test } = node;
  187796. const precedence = state.expressionsPrecedence[test.type];
  187797. if (precedence === NEEDS_PARENTHESES || precedence <= state.expressionsPrecedence.ConditionalExpression) {
  187798. state.write("(");
  187799. this[test.type](test, state);
  187800. state.write(")");
  187801. } else {
  187802. this[test.type](test, state);
  187803. }
  187804. state.write(" ? ");
  187805. this[node.consequent.type](node.consequent, state);
  187806. state.write(" : ");
  187807. this[node.alternate.type](node.alternate, state);
  187808. },
  187809. NewExpression(node, state) {
  187810. state.write("new ");
  187811. const precedence = state.expressionsPrecedence[node.callee.type];
  187812. if (precedence === NEEDS_PARENTHESES || precedence < state.expressionsPrecedence.CallExpression || hasCallExpression(node.callee)) {
  187813. state.write("(");
  187814. this[node.callee.type](node.callee, state);
  187815. state.write(")");
  187816. } else {
  187817. this[node.callee.type](node.callee, state);
  187818. }
  187819. formatSequence(state, node["arguments"]);
  187820. },
  187821. CallExpression(node, state) {
  187822. const precedence = state.expressionsPrecedence[node.callee.type];
  187823. if (precedence === NEEDS_PARENTHESES || precedence < state.expressionsPrecedence.CallExpression) {
  187824. state.write("(");
  187825. this[node.callee.type](node.callee, state);
  187826. state.write(")");
  187827. } else {
  187828. this[node.callee.type](node.callee, state);
  187829. }
  187830. if (node.optional) {
  187831. state.write("?.");
  187832. }
  187833. formatSequence(state, node["arguments"]);
  187834. },
  187835. ChainExpression(node, state) {
  187836. this[node.expression.type](node.expression, state);
  187837. },
  187838. MemberExpression(node, state) {
  187839. const precedence = state.expressionsPrecedence[node.object.type];
  187840. if (precedence === NEEDS_PARENTHESES || precedence < state.expressionsPrecedence.MemberExpression) {
  187841. state.write("(");
  187842. this[node.object.type](node.object, state);
  187843. state.write(")");
  187844. } else {
  187845. this[node.object.type](node.object, state);
  187846. }
  187847. if (node.computed) {
  187848. if (node.optional) {
  187849. state.write("?.");
  187850. }
  187851. state.write("[");
  187852. this[node.property.type](node.property, state);
  187853. state.write("]");
  187854. } else {
  187855. if (node.optional) {
  187856. state.write("?.");
  187857. } else {
  187858. state.write(".");
  187859. }
  187860. this[node.property.type](node.property, state);
  187861. }
  187862. },
  187863. MetaProperty(node, state) {
  187864. state.write(node.meta.name + "." + node.property.name, node);
  187865. },
  187866. Identifier(node, state) {
  187867. state.write(node.name, node);
  187868. },
  187869. PrivateIdentifier(node, state) {
  187870. state.write(`#${node.name}`, node);
  187871. },
  187872. Literal(node, state) {
  187873. if (node.raw != null) {
  187874. state.write(node.raw, node);
  187875. } else if (node.regex != null) {
  187876. this.RegExpLiteral(node, state);
  187877. } else if (node.bigint != null) {
  187878. state.write(node.bigint + "n", node);
  187879. } else {
  187880. state.write(stringify(node.value), node);
  187881. }
  187882. },
  187883. RegExpLiteral(node, state) {
  187884. const { regex: regex2 } = node;
  187885. state.write(`/${regex2.pattern}/${regex2.flags}`, node);
  187886. }
  187887. };
  187888. var EMPTY_OBJECT = {};
  187889. var State = class {
  187890. constructor(options) {
  187891. const setup = options == null ? EMPTY_OBJECT : options;
  187892. this.output = "";
  187893. if (setup.output != null) {
  187894. this.output = setup.output;
  187895. this.write = this.writeToStream;
  187896. } else {
  187897. this.output = "";
  187898. }
  187899. this.generator = setup.generator != null ? setup.generator : GENERATOR;
  187900. this.expressionsPrecedence = setup.expressionsPrecedence != null ? setup.expressionsPrecedence : EXPRESSIONS_PRECEDENCE;
  187901. this.indent = setup.indent != null ? setup.indent : " ";
  187902. this.lineEnd = setup.lineEnd != null ? setup.lineEnd : "\n";
  187903. this.indentLevel = setup.startingIndentLevel != null ? setup.startingIndentLevel : 0;
  187904. this.writeComments = setup.comments ? setup.comments : false;
  187905. if (setup.sourceMap != null) {
  187906. this.write = setup.output == null ? this.writeAndMap : this.writeToStreamAndMap;
  187907. this.sourceMap = setup.sourceMap;
  187908. this.line = 1;
  187909. this.column = 0;
  187910. this.lineEndSize = this.lineEnd.split("\n").length - 1;
  187911. this.mapping = {
  187912. original: null,
  187913. generated: this,
  187914. name: void 0,
  187915. source: setup.sourceMap.file || setup.sourceMap._file
  187916. };
  187917. }
  187918. }
  187919. write(code2) {
  187920. this.output += code2;
  187921. }
  187922. writeToStream(code2) {
  187923. this.output.write(code2);
  187924. }
  187925. writeAndMap(code2, node) {
  187926. this.output += code2;
  187927. this.map(code2, node);
  187928. }
  187929. writeToStreamAndMap(code2, node) {
  187930. this.output.write(code2);
  187931. this.map(code2, node);
  187932. }
  187933. map(code2, node) {
  187934. if (node != null) {
  187935. const { type } = node;
  187936. if (type[0] === "L" && type[2] === "n") {
  187937. this.column = 0;
  187938. this.line++;
  187939. return;
  187940. }
  187941. if (node.loc != null) {
  187942. const { mapping } = this;
  187943. mapping.original = node.loc.start;
  187944. mapping.name = node.name;
  187945. this.sourceMap.addMapping(mapping);
  187946. }
  187947. if (type[0] === "T" && type[8] === "E" || type[0] === "L" && type[1] === "i" && typeof node.value === "string") {
  187948. const { length: length2 } = code2;
  187949. let { column, line } = this;
  187950. for (let i = 0; i < length2; i++) {
  187951. if (code2[i] === "\n") {
  187952. column = 0;
  187953. line++;
  187954. } else {
  187955. column++;
  187956. }
  187957. }
  187958. this.column = column;
  187959. this.line = line;
  187960. return;
  187961. }
  187962. }
  187963. const { length } = code2;
  187964. const { lineEnd } = this;
  187965. if (length > 0) {
  187966. if (this.lineEndSize > 0 && (lineEnd.length === 1 ? code2[length - 1] === lineEnd : code2.endsWith(lineEnd))) {
  187967. this.line += this.lineEndSize;
  187968. this.column = 0;
  187969. } else {
  187970. this.column += length;
  187971. }
  187972. }
  187973. }
  187974. toString() {
  187975. return this.output;
  187976. }
  187977. };
  187978. function generate(node, options) {
  187979. const state = new State(options);
  187980. state.generator[node.type](node, state);
  187981. return state.output;
  187982. }
  187983. // node_modules/@mdx-js/mdx/lib/plugin/recma-stringify.js
  187984. function recmaStringify(options = {}) {
  187985. const { SourceMapGenerator } = options;
  187986. Object.assign(this, { Compiler: compiler2 });
  187987. function compiler2(tree, file) {
  187988. let sourceMap;
  187989. if (SourceMapGenerator) {
  187990. sourceMap = new SourceMapGenerator({ file: file.path || "unknown.mdx" });
  187991. }
  187992. const generator = {
  187993. ...GENERATOR,
  187994. JSXAttribute,
  187995. JSXClosingElement,
  187996. JSXClosingFragment,
  187997. JSXElement,
  187998. JSXEmptyExpression,
  187999. JSXExpressionContainer,
  188000. JSXFragment,
  188001. JSXIdentifier,
  188002. JSXMemberExpression,
  188003. JSXNamespacedName,
  188004. JSXOpeningElement,
  188005. JSXOpeningFragment,
  188006. JSXSpreadAttribute,
  188007. JSXText
  188008. };
  188009. const result = generate(tree, {
  188010. generator,
  188011. comments: true,
  188012. sourceMap
  188013. });
  188014. if (sourceMap) {
  188015. file.map = sourceMap.toJSON();
  188016. }
  188017. return result;
  188018. }
  188019. }
  188020. function JSXAttribute(node, state) {
  188021. this[node.name.type](node.name, state);
  188022. if (node.value !== void 0 && node.value !== null) {
  188023. state.write("=");
  188024. if (node.value.type === "Literal") {
  188025. state.write(
  188026. '"' + encodeJsx(String(node.value.value)).replace(/"/g, "&quot;") + '"',
  188027. node
  188028. );
  188029. } else {
  188030. this[node.value.type](node.value, state);
  188031. }
  188032. }
  188033. }
  188034. function JSXClosingElement(node, state) {
  188035. state.write("</");
  188036. this[node.name.type](node.name, state);
  188037. state.write(">");
  188038. }
  188039. function JSXClosingFragment(node, state) {
  188040. state.write("</>", node);
  188041. }
  188042. function JSXElement(node, state) {
  188043. let index2 = -1;
  188044. this[node.openingElement.type](node.openingElement, state);
  188045. if (node.children) {
  188046. while (++index2 < node.children.length) {
  188047. const child = node.children[index2];
  188048. if (child.type === "JSXSpreadChild") {
  188049. throw new Error("JSX spread children are not supported");
  188050. }
  188051. this[child.type](child, state);
  188052. }
  188053. }
  188054. if (node.closingElement) {
  188055. this[node.closingElement.type](node.closingElement, state);
  188056. }
  188057. }
  188058. function JSXEmptyExpression() {
  188059. }
  188060. function JSXExpressionContainer(node, state) {
  188061. state.write("{");
  188062. this[node.expression.type](node.expression, state);
  188063. state.write("}");
  188064. }
  188065. function JSXFragment(node, state) {
  188066. let index2 = -1;
  188067. this[node.openingFragment.type](node.openingFragment, state);
  188068. if (node.children) {
  188069. while (++index2 < node.children.length) {
  188070. const child = node.children[index2];
  188071. if (child.type === "JSXSpreadChild") {
  188072. throw new Error("JSX spread children are not supported");
  188073. }
  188074. this[child.type](child, state);
  188075. }
  188076. }
  188077. this[node.closingFragment.type](node.closingFragment, state);
  188078. }
  188079. function JSXIdentifier(node, state) {
  188080. state.write(node.name, node);
  188081. }
  188082. function JSXMemberExpression(node, state) {
  188083. this[node.object.type](node.object, state);
  188084. state.write(".");
  188085. this[node.property.type](node.property, state);
  188086. }
  188087. function JSXNamespacedName(node, state) {
  188088. this[node.namespace.type](node.namespace, state);
  188089. state.write(":");
  188090. this[node.name.type](node.name, state);
  188091. }
  188092. function JSXOpeningElement(node, state) {
  188093. let index2 = -1;
  188094. state.write("<");
  188095. this[node.name.type](node.name, state);
  188096. if (node.attributes) {
  188097. while (++index2 < node.attributes.length) {
  188098. state.write(" ");
  188099. this[node.attributes[index2].type](node.attributes[index2], state);
  188100. }
  188101. }
  188102. state.write(node.selfClosing ? " />" : ">");
  188103. }
  188104. function JSXOpeningFragment(node, state) {
  188105. state.write("<>", node);
  188106. }
  188107. function JSXSpreadAttribute(node, state) {
  188108. state.write("{");
  188109. this.SpreadElement(node, state);
  188110. state.write("}");
  188111. }
  188112. function JSXText(node, state) {
  188113. state.write(
  188114. encodeJsx(node.value).replace(
  188115. /<|{/g,
  188116. ($0) => $0 === "<" ? "&lt;" : "&#123;"
  188117. ),
  188118. node
  188119. );
  188120. }
  188121. function encodeJsx(value) {
  188122. return value.replace(/&(?=[#a-z])/gi, "&amp;");
  188123. }
  188124. // node_modules/comma-separated-tokens/index.js
  188125. function stringify2(values, options) {
  188126. var settings = options || {};
  188127. if (values[values.length - 1] === "") {
  188128. values = values.concat("");
  188129. }
  188130. return values.join(
  188131. (settings.padRight ? " " : "") + "," + (settings.padLeft === false ? "" : " ")
  188132. ).trim();
  188133. }
  188134. // node_modules/estree-util-attach-comments/index.js
  188135. var push2 = [].push;
  188136. function attachComments(tree, comments) {
  188137. var list3 = (comments || []).concat().sort(compare);
  188138. if (list3.length)
  188139. walk2(tree, { comments: list3, index: 0 });
  188140. return tree;
  188141. }
  188142. function walk2(node, state) {
  188143. var children = [];
  188144. var comments = [];
  188145. var key;
  188146. var value;
  188147. var index2;
  188148. if (state.index === state.comments.length) {
  188149. return;
  188150. }
  188151. for (key in node) {
  188152. value = node[key];
  188153. if (value && typeof value === "object" && key !== "comments") {
  188154. if (Array.isArray(value)) {
  188155. index2 = -1;
  188156. while (++index2 < value.length) {
  188157. if (value[index2] && typeof value[index2].type === "string") {
  188158. children.push(value[index2]);
  188159. }
  188160. }
  188161. } else if (typeof value.type === "string") {
  188162. children.push(value);
  188163. }
  188164. }
  188165. }
  188166. children.sort(compare);
  188167. push2.apply(
  188168. comments,
  188169. slice(state, node, false, { leading: true, trailing: false })
  188170. );
  188171. index2 = -1;
  188172. while (++index2 < children.length) {
  188173. walk2(children[index2], state);
  188174. }
  188175. push2.apply(
  188176. comments,
  188177. slice(state, node, true, {
  188178. leading: false,
  188179. trailing: Boolean(children.length)
  188180. })
  188181. );
  188182. if (comments.length) {
  188183. node.comments = comments;
  188184. }
  188185. }
  188186. function slice(state, node, compareEnd, fields) {
  188187. var result = [];
  188188. while (state.comments[state.index] && compare(state.comments[state.index], node, compareEnd) < 1) {
  188189. result.push(Object.assign({}, state.comments[state.index++], fields));
  188190. }
  188191. return result;
  188192. }
  188193. function compare(left, right, compareEnd) {
  188194. var field = compareEnd ? "end" : "start";
  188195. if (left.range && right.range) {
  188196. return left.range[0] - right.range[compareEnd ? 1 : 0];
  188197. }
  188198. if (left.loc && left.loc.start && right.loc && right.loc[field]) {
  188199. return left.loc.start.line - right.loc[field].line || left.loc.start.column - right.loc[field].column;
  188200. }
  188201. if ("start" in left && field in right) {
  188202. return left.start - right[field];
  188203. }
  188204. return NaN;
  188205. }
  188206. // node_modules/hast-util-whitespace/index.js
  188207. function whitespace(thing) {
  188208. var value = thing && typeof thing === "object" && thing.type === "text" ? thing.value || "" : thing;
  188209. return typeof value === "string" && value.replace(/[ \t\n\f\r]/g, "") === "";
  188210. }
  188211. // node_modules/property-information/lib/util/schema.js
  188212. var Schema = class {
  188213. constructor(property, normal, space) {
  188214. this.property = property;
  188215. this.normal = normal;
  188216. if (space) {
  188217. this.space = space;
  188218. }
  188219. }
  188220. };
  188221. Schema.prototype.property = {};
  188222. Schema.prototype.normal = {};
  188223. Schema.prototype.space = null;
  188224. // node_modules/property-information/lib/util/merge.js
  188225. function merge(definitions2, space) {
  188226. const property = {};
  188227. const normal = {};
  188228. let index2 = -1;
  188229. while (++index2 < definitions2.length) {
  188230. Object.assign(property, definitions2[index2].property);
  188231. Object.assign(normal, definitions2[index2].normal);
  188232. }
  188233. return new Schema(property, normal, space);
  188234. }
  188235. // node_modules/property-information/lib/normalize.js
  188236. function normalize5(value) {
  188237. return value.toLowerCase();
  188238. }
  188239. // node_modules/property-information/lib/util/info.js
  188240. var Info = class {
  188241. constructor(property, attribute) {
  188242. this.property = property;
  188243. this.attribute = attribute;
  188244. }
  188245. };
  188246. Info.prototype.space = null;
  188247. Info.prototype.boolean = false;
  188248. Info.prototype.booleanish = false;
  188249. Info.prototype.overloadedBoolean = false;
  188250. Info.prototype.number = false;
  188251. Info.prototype.commaSeparated = false;
  188252. Info.prototype.spaceSeparated = false;
  188253. Info.prototype.commaOrSpaceSeparated = false;
  188254. Info.prototype.mustUseProperty = false;
  188255. Info.prototype.defined = false;
  188256. // node_modules/property-information/lib/util/types.js
  188257. var types_exports = {};
  188258. __export(types_exports, {
  188259. boolean: () => boolean,
  188260. booleanish: () => booleanish,
  188261. commaOrSpaceSeparated: () => commaOrSpaceSeparated,
  188262. commaSeparated: () => commaSeparated,
  188263. number: () => number,
  188264. overloadedBoolean: () => overloadedBoolean,
  188265. spaceSeparated: () => spaceSeparated
  188266. });
  188267. var powers = 0;
  188268. var boolean = increment();
  188269. var booleanish = increment();
  188270. var overloadedBoolean = increment();
  188271. var number = increment();
  188272. var spaceSeparated = increment();
  188273. var commaSeparated = increment();
  188274. var commaOrSpaceSeparated = increment();
  188275. function increment() {
  188276. return 2 ** ++powers;
  188277. }
  188278. // node_modules/property-information/lib/util/defined-info.js
  188279. var checks = Object.keys(types_exports);
  188280. var DefinedInfo = class extends Info {
  188281. constructor(property, attribute, mask, space) {
  188282. let index2 = -1;
  188283. super(property, attribute);
  188284. mark(this, "space", space);
  188285. if (typeof mask === "number") {
  188286. while (++index2 < checks.length) {
  188287. const check = checks[index2];
  188288. mark(this, checks[index2], (mask & types_exports[check]) === types_exports[check]);
  188289. }
  188290. }
  188291. }
  188292. };
  188293. DefinedInfo.prototype.defined = true;
  188294. function mark(values, key, value) {
  188295. if (value) {
  188296. values[key] = value;
  188297. }
  188298. }
  188299. // node_modules/property-information/lib/util/create.js
  188300. var own11 = {}.hasOwnProperty;
  188301. function create3(definition2) {
  188302. const property = {};
  188303. const normal = {};
  188304. let prop;
  188305. for (prop in definition2.properties) {
  188306. if (own11.call(definition2.properties, prop)) {
  188307. const value = definition2.properties[prop];
  188308. const info = new DefinedInfo(
  188309. prop,
  188310. definition2.transform(definition2.attributes || {}, prop),
  188311. value,
  188312. definition2.space
  188313. );
  188314. if (definition2.mustUseProperty && definition2.mustUseProperty.includes(prop)) {
  188315. info.mustUseProperty = true;
  188316. }
  188317. property[prop] = info;
  188318. normal[normalize5(prop)] = prop;
  188319. normal[normalize5(info.attribute)] = prop;
  188320. }
  188321. }
  188322. return new Schema(property, normal, definition2.space);
  188323. }
  188324. // node_modules/property-information/lib/xlink.js
  188325. var xlink = create3({
  188326. space: "xlink",
  188327. transform(_, prop) {
  188328. return "xlink:" + prop.slice(5).toLowerCase();
  188329. },
  188330. properties: {
  188331. xLinkActuate: null,
  188332. xLinkArcRole: null,
  188333. xLinkHref: null,
  188334. xLinkRole: null,
  188335. xLinkShow: null,
  188336. xLinkTitle: null,
  188337. xLinkType: null
  188338. }
  188339. });
  188340. // node_modules/property-information/lib/xml.js
  188341. var xml = create3({
  188342. space: "xml",
  188343. transform(_, prop) {
  188344. return "xml:" + prop.slice(3).toLowerCase();
  188345. },
  188346. properties: { xmlLang: null, xmlBase: null, xmlSpace: null }
  188347. });
  188348. // node_modules/property-information/lib/util/case-sensitive-transform.js
  188349. function caseSensitiveTransform(attributes, attribute) {
  188350. return attribute in attributes ? attributes[attribute] : attribute;
  188351. }
  188352. // node_modules/property-information/lib/util/case-insensitive-transform.js
  188353. function caseInsensitiveTransform(attributes, property) {
  188354. return caseSensitiveTransform(attributes, property.toLowerCase());
  188355. }
  188356. // node_modules/property-information/lib/xmlns.js
  188357. var xmlns = create3({
  188358. space: "xmlns",
  188359. attributes: { xmlnsxlink: "xmlns:xlink" },
  188360. transform: caseInsensitiveTransform,
  188361. properties: { xmlns: null, xmlnsXLink: null }
  188362. });
  188363. // node_modules/property-information/lib/aria.js
  188364. var aria = create3({
  188365. transform(_, prop) {
  188366. return prop === "role" ? prop : "aria-" + prop.slice(4).toLowerCase();
  188367. },
  188368. properties: {
  188369. ariaActiveDescendant: null,
  188370. ariaAtomic: booleanish,
  188371. ariaAutoComplete: null,
  188372. ariaBusy: booleanish,
  188373. ariaChecked: booleanish,
  188374. ariaColCount: number,
  188375. ariaColIndex: number,
  188376. ariaColSpan: number,
  188377. ariaControls: spaceSeparated,
  188378. ariaCurrent: null,
  188379. ariaDescribedBy: spaceSeparated,
  188380. ariaDetails: null,
  188381. ariaDisabled: booleanish,
  188382. ariaDropEffect: spaceSeparated,
  188383. ariaErrorMessage: null,
  188384. ariaExpanded: booleanish,
  188385. ariaFlowTo: spaceSeparated,
  188386. ariaGrabbed: booleanish,
  188387. ariaHasPopup: null,
  188388. ariaHidden: booleanish,
  188389. ariaInvalid: null,
  188390. ariaKeyShortcuts: null,
  188391. ariaLabel: null,
  188392. ariaLabelledBy: spaceSeparated,
  188393. ariaLevel: number,
  188394. ariaLive: null,
  188395. ariaModal: booleanish,
  188396. ariaMultiLine: booleanish,
  188397. ariaMultiSelectable: booleanish,
  188398. ariaOrientation: null,
  188399. ariaOwns: spaceSeparated,
  188400. ariaPlaceholder: null,
  188401. ariaPosInSet: number,
  188402. ariaPressed: booleanish,
  188403. ariaReadOnly: booleanish,
  188404. ariaRelevant: null,
  188405. ariaRequired: booleanish,
  188406. ariaRoleDescription: spaceSeparated,
  188407. ariaRowCount: number,
  188408. ariaRowIndex: number,
  188409. ariaRowSpan: number,
  188410. ariaSelected: booleanish,
  188411. ariaSetSize: number,
  188412. ariaSort: null,
  188413. ariaValueMax: number,
  188414. ariaValueMin: number,
  188415. ariaValueNow: number,
  188416. ariaValueText: null,
  188417. role: null
  188418. }
  188419. });
  188420. // node_modules/property-information/lib/html.js
  188421. var html2 = create3({
  188422. space: "html",
  188423. attributes: {
  188424. acceptcharset: "accept-charset",
  188425. classname: "class",
  188426. htmlfor: "for",
  188427. httpequiv: "http-equiv"
  188428. },
  188429. transform: caseInsensitiveTransform,
  188430. mustUseProperty: ["checked", "multiple", "muted", "selected"],
  188431. properties: {
  188432. abbr: null,
  188433. accept: commaSeparated,
  188434. acceptCharset: spaceSeparated,
  188435. accessKey: spaceSeparated,
  188436. action: null,
  188437. allow: null,
  188438. allowFullScreen: boolean,
  188439. allowPaymentRequest: boolean,
  188440. allowUserMedia: boolean,
  188441. alt: null,
  188442. as: null,
  188443. async: boolean,
  188444. autoCapitalize: null,
  188445. autoComplete: spaceSeparated,
  188446. autoFocus: boolean,
  188447. autoPlay: boolean,
  188448. capture: boolean,
  188449. charSet: null,
  188450. checked: boolean,
  188451. cite: null,
  188452. className: spaceSeparated,
  188453. cols: number,
  188454. colSpan: null,
  188455. content: null,
  188456. contentEditable: booleanish,
  188457. controls: boolean,
  188458. controlsList: spaceSeparated,
  188459. coords: number | commaSeparated,
  188460. crossOrigin: null,
  188461. data: null,
  188462. dateTime: null,
  188463. decoding: null,
  188464. default: boolean,
  188465. defer: boolean,
  188466. dir: null,
  188467. dirName: null,
  188468. disabled: boolean,
  188469. download: overloadedBoolean,
  188470. draggable: booleanish,
  188471. encType: null,
  188472. enterKeyHint: null,
  188473. form: null,
  188474. formAction: null,
  188475. formEncType: null,
  188476. formMethod: null,
  188477. formNoValidate: boolean,
  188478. formTarget: null,
  188479. headers: spaceSeparated,
  188480. height: number,
  188481. hidden: boolean,
  188482. high: number,
  188483. href: null,
  188484. hrefLang: null,
  188485. htmlFor: spaceSeparated,
  188486. httpEquiv: spaceSeparated,
  188487. id: null,
  188488. imageSizes: null,
  188489. imageSrcSet: null,
  188490. inputMode: null,
  188491. integrity: null,
  188492. is: null,
  188493. isMap: boolean,
  188494. itemId: null,
  188495. itemProp: spaceSeparated,
  188496. itemRef: spaceSeparated,
  188497. itemScope: boolean,
  188498. itemType: spaceSeparated,
  188499. kind: null,
  188500. label: null,
  188501. lang: null,
  188502. language: null,
  188503. list: null,
  188504. loading: null,
  188505. loop: boolean,
  188506. low: number,
  188507. manifest: null,
  188508. max: null,
  188509. maxLength: number,
  188510. media: null,
  188511. method: null,
  188512. min: null,
  188513. minLength: number,
  188514. multiple: boolean,
  188515. muted: boolean,
  188516. name: null,
  188517. nonce: null,
  188518. noModule: boolean,
  188519. noValidate: boolean,
  188520. onAbort: null,
  188521. onAfterPrint: null,
  188522. onAuxClick: null,
  188523. onBeforePrint: null,
  188524. onBeforeUnload: null,
  188525. onBlur: null,
  188526. onCancel: null,
  188527. onCanPlay: null,
  188528. onCanPlayThrough: null,
  188529. onChange: null,
  188530. onClick: null,
  188531. onClose: null,
  188532. onContextLost: null,
  188533. onContextMenu: null,
  188534. onContextRestored: null,
  188535. onCopy: null,
  188536. onCueChange: null,
  188537. onCut: null,
  188538. onDblClick: null,
  188539. onDrag: null,
  188540. onDragEnd: null,
  188541. onDragEnter: null,
  188542. onDragExit: null,
  188543. onDragLeave: null,
  188544. onDragOver: null,
  188545. onDragStart: null,
  188546. onDrop: null,
  188547. onDurationChange: null,
  188548. onEmptied: null,
  188549. onEnded: null,
  188550. onError: null,
  188551. onFocus: null,
  188552. onFormData: null,
  188553. onHashChange: null,
  188554. onInput: null,
  188555. onInvalid: null,
  188556. onKeyDown: null,
  188557. onKeyPress: null,
  188558. onKeyUp: null,
  188559. onLanguageChange: null,
  188560. onLoad: null,
  188561. onLoadedData: null,
  188562. onLoadedMetadata: null,
  188563. onLoadEnd: null,
  188564. onLoadStart: null,
  188565. onMessage: null,
  188566. onMessageError: null,
  188567. onMouseDown: null,
  188568. onMouseEnter: null,
  188569. onMouseLeave: null,
  188570. onMouseMove: null,
  188571. onMouseOut: null,
  188572. onMouseOver: null,
  188573. onMouseUp: null,
  188574. onOffline: null,
  188575. onOnline: null,
  188576. onPageHide: null,
  188577. onPageShow: null,
  188578. onPaste: null,
  188579. onPause: null,
  188580. onPlay: null,
  188581. onPlaying: null,
  188582. onPopState: null,
  188583. onProgress: null,
  188584. onRateChange: null,
  188585. onRejectionHandled: null,
  188586. onReset: null,
  188587. onResize: null,
  188588. onScroll: null,
  188589. onSecurityPolicyViolation: null,
  188590. onSeeked: null,
  188591. onSeeking: null,
  188592. onSelect: null,
  188593. onSlotChange: null,
  188594. onStalled: null,
  188595. onStorage: null,
  188596. onSubmit: null,
  188597. onSuspend: null,
  188598. onTimeUpdate: null,
  188599. onToggle: null,
  188600. onUnhandledRejection: null,
  188601. onUnload: null,
  188602. onVolumeChange: null,
  188603. onWaiting: null,
  188604. onWheel: null,
  188605. open: boolean,
  188606. optimum: number,
  188607. pattern: null,
  188608. ping: spaceSeparated,
  188609. placeholder: null,
  188610. playsInline: boolean,
  188611. poster: null,
  188612. preload: null,
  188613. readOnly: boolean,
  188614. referrerPolicy: null,
  188615. rel: spaceSeparated,
  188616. required: boolean,
  188617. reversed: boolean,
  188618. rows: number,
  188619. rowSpan: number,
  188620. sandbox: spaceSeparated,
  188621. scope: null,
  188622. scoped: boolean,
  188623. seamless: boolean,
  188624. selected: boolean,
  188625. shape: null,
  188626. size: number,
  188627. sizes: null,
  188628. slot: null,
  188629. span: number,
  188630. spellCheck: booleanish,
  188631. src: null,
  188632. srcDoc: null,
  188633. srcLang: null,
  188634. srcSet: null,
  188635. start: number,
  188636. step: null,
  188637. style: null,
  188638. tabIndex: number,
  188639. target: null,
  188640. title: null,
  188641. translate: null,
  188642. type: null,
  188643. typeMustMatch: boolean,
  188644. useMap: null,
  188645. value: booleanish,
  188646. width: number,
  188647. wrap: null,
  188648. align: null,
  188649. aLink: null,
  188650. archive: spaceSeparated,
  188651. axis: null,
  188652. background: null,
  188653. bgColor: null,
  188654. border: number,
  188655. borderColor: null,
  188656. bottomMargin: number,
  188657. cellPadding: null,
  188658. cellSpacing: null,
  188659. char: null,
  188660. charOff: null,
  188661. classId: null,
  188662. clear: null,
  188663. code: null,
  188664. codeBase: null,
  188665. codeType: null,
  188666. color: null,
  188667. compact: boolean,
  188668. declare: boolean,
  188669. event: null,
  188670. face: null,
  188671. frame: null,
  188672. frameBorder: null,
  188673. hSpace: number,
  188674. leftMargin: number,
  188675. link: null,
  188676. longDesc: null,
  188677. lowSrc: null,
  188678. marginHeight: number,
  188679. marginWidth: number,
  188680. noResize: boolean,
  188681. noHref: boolean,
  188682. noShade: boolean,
  188683. noWrap: boolean,
  188684. object: null,
  188685. profile: null,
  188686. prompt: null,
  188687. rev: null,
  188688. rightMargin: number,
  188689. rules: null,
  188690. scheme: null,
  188691. scrolling: booleanish,
  188692. standby: null,
  188693. summary: null,
  188694. text: null,
  188695. topMargin: number,
  188696. valueType: null,
  188697. version: null,
  188698. vAlign: null,
  188699. vLink: null,
  188700. vSpace: number,
  188701. allowTransparency: null,
  188702. autoCorrect: null,
  188703. autoSave: null,
  188704. disablePictureInPicture: boolean,
  188705. disableRemotePlayback: boolean,
  188706. prefix: null,
  188707. property: null,
  188708. results: number,
  188709. security: null,
  188710. unselectable: null
  188711. }
  188712. });
  188713. // node_modules/property-information/lib/svg.js
  188714. var svg = create3({
  188715. space: "svg",
  188716. attributes: {
  188717. accentHeight: "accent-height",
  188718. alignmentBaseline: "alignment-baseline",
  188719. arabicForm: "arabic-form",
  188720. baselineShift: "baseline-shift",
  188721. capHeight: "cap-height",
  188722. className: "class",
  188723. clipPath: "clip-path",
  188724. clipRule: "clip-rule",
  188725. colorInterpolation: "color-interpolation",
  188726. colorInterpolationFilters: "color-interpolation-filters",
  188727. colorProfile: "color-profile",
  188728. colorRendering: "color-rendering",
  188729. crossOrigin: "crossorigin",
  188730. dataType: "datatype",
  188731. dominantBaseline: "dominant-baseline",
  188732. enableBackground: "enable-background",
  188733. fillOpacity: "fill-opacity",
  188734. fillRule: "fill-rule",
  188735. floodColor: "flood-color",
  188736. floodOpacity: "flood-opacity",
  188737. fontFamily: "font-family",
  188738. fontSize: "font-size",
  188739. fontSizeAdjust: "font-size-adjust",
  188740. fontStretch: "font-stretch",
  188741. fontStyle: "font-style",
  188742. fontVariant: "font-variant",
  188743. fontWeight: "font-weight",
  188744. glyphName: "glyph-name",
  188745. glyphOrientationHorizontal: "glyph-orientation-horizontal",
  188746. glyphOrientationVertical: "glyph-orientation-vertical",
  188747. hrefLang: "hreflang",
  188748. horizAdvX: "horiz-adv-x",
  188749. horizOriginX: "horiz-origin-x",
  188750. horizOriginY: "horiz-origin-y",
  188751. imageRendering: "image-rendering",
  188752. letterSpacing: "letter-spacing",
  188753. lightingColor: "lighting-color",
  188754. markerEnd: "marker-end",
  188755. markerMid: "marker-mid",
  188756. markerStart: "marker-start",
  188757. navDown: "nav-down",
  188758. navDownLeft: "nav-down-left",
  188759. navDownRight: "nav-down-right",
  188760. navLeft: "nav-left",
  188761. navNext: "nav-next",
  188762. navPrev: "nav-prev",
  188763. navRight: "nav-right",
  188764. navUp: "nav-up",
  188765. navUpLeft: "nav-up-left",
  188766. navUpRight: "nav-up-right",
  188767. onAbort: "onabort",
  188768. onActivate: "onactivate",
  188769. onAfterPrint: "onafterprint",
  188770. onBeforePrint: "onbeforeprint",
  188771. onBegin: "onbegin",
  188772. onCancel: "oncancel",
  188773. onCanPlay: "oncanplay",
  188774. onCanPlayThrough: "oncanplaythrough",
  188775. onChange: "onchange",
  188776. onClick: "onclick",
  188777. onClose: "onclose",
  188778. onCopy: "oncopy",
  188779. onCueChange: "oncuechange",
  188780. onCut: "oncut",
  188781. onDblClick: "ondblclick",
  188782. onDrag: "ondrag",
  188783. onDragEnd: "ondragend",
  188784. onDragEnter: "ondragenter",
  188785. onDragExit: "ondragexit",
  188786. onDragLeave: "ondragleave",
  188787. onDragOver: "ondragover",
  188788. onDragStart: "ondragstart",
  188789. onDrop: "ondrop",
  188790. onDurationChange: "ondurationchange",
  188791. onEmptied: "onemptied",
  188792. onEnd: "onend",
  188793. onEnded: "onended",
  188794. onError: "onerror",
  188795. onFocus: "onfocus",
  188796. onFocusIn: "onfocusin",
  188797. onFocusOut: "onfocusout",
  188798. onHashChange: "onhashchange",
  188799. onInput: "oninput",
  188800. onInvalid: "oninvalid",
  188801. onKeyDown: "onkeydown",
  188802. onKeyPress: "onkeypress",
  188803. onKeyUp: "onkeyup",
  188804. onLoad: "onload",
  188805. onLoadedData: "onloadeddata",
  188806. onLoadedMetadata: "onloadedmetadata",
  188807. onLoadStart: "onloadstart",
  188808. onMessage: "onmessage",
  188809. onMouseDown: "onmousedown",
  188810. onMouseEnter: "onmouseenter",
  188811. onMouseLeave: "onmouseleave",
  188812. onMouseMove: "onmousemove",
  188813. onMouseOut: "onmouseout",
  188814. onMouseOver: "onmouseover",
  188815. onMouseUp: "onmouseup",
  188816. onMouseWheel: "onmousewheel",
  188817. onOffline: "onoffline",
  188818. onOnline: "ononline",
  188819. onPageHide: "onpagehide",
  188820. onPageShow: "onpageshow",
  188821. onPaste: "onpaste",
  188822. onPause: "onpause",
  188823. onPlay: "onplay",
  188824. onPlaying: "onplaying",
  188825. onPopState: "onpopstate",
  188826. onProgress: "onprogress",
  188827. onRateChange: "onratechange",
  188828. onRepeat: "onrepeat",
  188829. onReset: "onreset",
  188830. onResize: "onresize",
  188831. onScroll: "onscroll",
  188832. onSeeked: "onseeked",
  188833. onSeeking: "onseeking",
  188834. onSelect: "onselect",
  188835. onShow: "onshow",
  188836. onStalled: "onstalled",
  188837. onStorage: "onstorage",
  188838. onSubmit: "onsubmit",
  188839. onSuspend: "onsuspend",
  188840. onTimeUpdate: "ontimeupdate",
  188841. onToggle: "ontoggle",
  188842. onUnload: "onunload",
  188843. onVolumeChange: "onvolumechange",
  188844. onWaiting: "onwaiting",
  188845. onZoom: "onzoom",
  188846. overlinePosition: "overline-position",
  188847. overlineThickness: "overline-thickness",
  188848. paintOrder: "paint-order",
  188849. panose1: "panose-1",
  188850. pointerEvents: "pointer-events",
  188851. referrerPolicy: "referrerpolicy",
  188852. renderingIntent: "rendering-intent",
  188853. shapeRendering: "shape-rendering",
  188854. stopColor: "stop-color",
  188855. stopOpacity: "stop-opacity",
  188856. strikethroughPosition: "strikethrough-position",
  188857. strikethroughThickness: "strikethrough-thickness",
  188858. strokeDashArray: "stroke-dasharray",
  188859. strokeDashOffset: "stroke-dashoffset",
  188860. strokeLineCap: "stroke-linecap",
  188861. strokeLineJoin: "stroke-linejoin",
  188862. strokeMiterLimit: "stroke-miterlimit",
  188863. strokeOpacity: "stroke-opacity",
  188864. strokeWidth: "stroke-width",
  188865. tabIndex: "tabindex",
  188866. textAnchor: "text-anchor",
  188867. textDecoration: "text-decoration",
  188868. textRendering: "text-rendering",
  188869. typeOf: "typeof",
  188870. underlinePosition: "underline-position",
  188871. underlineThickness: "underline-thickness",
  188872. unicodeBidi: "unicode-bidi",
  188873. unicodeRange: "unicode-range",
  188874. unitsPerEm: "units-per-em",
  188875. vAlphabetic: "v-alphabetic",
  188876. vHanging: "v-hanging",
  188877. vIdeographic: "v-ideographic",
  188878. vMathematical: "v-mathematical",
  188879. vectorEffect: "vector-effect",
  188880. vertAdvY: "vert-adv-y",
  188881. vertOriginX: "vert-origin-x",
  188882. vertOriginY: "vert-origin-y",
  188883. wordSpacing: "word-spacing",
  188884. writingMode: "writing-mode",
  188885. xHeight: "x-height",
  188886. playbackOrder: "playbackorder",
  188887. timelineBegin: "timelinebegin"
  188888. },
  188889. transform: caseSensitiveTransform,
  188890. properties: {
  188891. about: commaOrSpaceSeparated,
  188892. accentHeight: number,
  188893. accumulate: null,
  188894. additive: null,
  188895. alignmentBaseline: null,
  188896. alphabetic: number,
  188897. amplitude: number,
  188898. arabicForm: null,
  188899. ascent: number,
  188900. attributeName: null,
  188901. attributeType: null,
  188902. azimuth: number,
  188903. bandwidth: null,
  188904. baselineShift: null,
  188905. baseFrequency: null,
  188906. baseProfile: null,
  188907. bbox: null,
  188908. begin: null,
  188909. bias: number,
  188910. by: null,
  188911. calcMode: null,
  188912. capHeight: number,
  188913. className: spaceSeparated,
  188914. clip: null,
  188915. clipPath: null,
  188916. clipPathUnits: null,
  188917. clipRule: null,
  188918. color: null,
  188919. colorInterpolation: null,
  188920. colorInterpolationFilters: null,
  188921. colorProfile: null,
  188922. colorRendering: null,
  188923. content: null,
  188924. contentScriptType: null,
  188925. contentStyleType: null,
  188926. crossOrigin: null,
  188927. cursor: null,
  188928. cx: null,
  188929. cy: null,
  188930. d: null,
  188931. dataType: null,
  188932. defaultAction: null,
  188933. descent: number,
  188934. diffuseConstant: number,
  188935. direction: null,
  188936. display: null,
  188937. dur: null,
  188938. divisor: number,
  188939. dominantBaseline: null,
  188940. download: boolean,
  188941. dx: null,
  188942. dy: null,
  188943. edgeMode: null,
  188944. editable: null,
  188945. elevation: number,
  188946. enableBackground: null,
  188947. end: null,
  188948. event: null,
  188949. exponent: number,
  188950. externalResourcesRequired: null,
  188951. fill: null,
  188952. fillOpacity: number,
  188953. fillRule: null,
  188954. filter: null,
  188955. filterRes: null,
  188956. filterUnits: null,
  188957. floodColor: null,
  188958. floodOpacity: null,
  188959. focusable: null,
  188960. focusHighlight: null,
  188961. fontFamily: null,
  188962. fontSize: null,
  188963. fontSizeAdjust: null,
  188964. fontStretch: null,
  188965. fontStyle: null,
  188966. fontVariant: null,
  188967. fontWeight: null,
  188968. format: null,
  188969. fr: null,
  188970. from: null,
  188971. fx: null,
  188972. fy: null,
  188973. g1: commaSeparated,
  188974. g2: commaSeparated,
  188975. glyphName: commaSeparated,
  188976. glyphOrientationHorizontal: null,
  188977. glyphOrientationVertical: null,
  188978. glyphRef: null,
  188979. gradientTransform: null,
  188980. gradientUnits: null,
  188981. handler: null,
  188982. hanging: number,
  188983. hatchContentUnits: null,
  188984. hatchUnits: null,
  188985. height: null,
  188986. href: null,
  188987. hrefLang: null,
  188988. horizAdvX: number,
  188989. horizOriginX: number,
  188990. horizOriginY: number,
  188991. id: null,
  188992. ideographic: number,
  188993. imageRendering: null,
  188994. initialVisibility: null,
  188995. in: null,
  188996. in2: null,
  188997. intercept: number,
  188998. k: number,
  188999. k1: number,
  189000. k2: number,
  189001. k3: number,
  189002. k4: number,
  189003. kernelMatrix: commaOrSpaceSeparated,
  189004. kernelUnitLength: null,
  189005. keyPoints: null,
  189006. keySplines: null,
  189007. keyTimes: null,
  189008. kerning: null,
  189009. lang: null,
  189010. lengthAdjust: null,
  189011. letterSpacing: null,
  189012. lightingColor: null,
  189013. limitingConeAngle: number,
  189014. local: null,
  189015. markerEnd: null,
  189016. markerMid: null,
  189017. markerStart: null,
  189018. markerHeight: null,
  189019. markerUnits: null,
  189020. markerWidth: null,
  189021. mask: null,
  189022. maskContentUnits: null,
  189023. maskUnits: null,
  189024. mathematical: null,
  189025. max: null,
  189026. media: null,
  189027. mediaCharacterEncoding: null,
  189028. mediaContentEncodings: null,
  189029. mediaSize: number,
  189030. mediaTime: null,
  189031. method: null,
  189032. min: null,
  189033. mode: null,
  189034. name: null,
  189035. navDown: null,
  189036. navDownLeft: null,
  189037. navDownRight: null,
  189038. navLeft: null,
  189039. navNext: null,
  189040. navPrev: null,
  189041. navRight: null,
  189042. navUp: null,
  189043. navUpLeft: null,
  189044. navUpRight: null,
  189045. numOctaves: null,
  189046. observer: null,
  189047. offset: null,
  189048. onAbort: null,
  189049. onActivate: null,
  189050. onAfterPrint: null,
  189051. onBeforePrint: null,
  189052. onBegin: null,
  189053. onCancel: null,
  189054. onCanPlay: null,
  189055. onCanPlayThrough: null,
  189056. onChange: null,
  189057. onClick: null,
  189058. onClose: null,
  189059. onCopy: null,
  189060. onCueChange: null,
  189061. onCut: null,
  189062. onDblClick: null,
  189063. onDrag: null,
  189064. onDragEnd: null,
  189065. onDragEnter: null,
  189066. onDragExit: null,
  189067. onDragLeave: null,
  189068. onDragOver: null,
  189069. onDragStart: null,
  189070. onDrop: null,
  189071. onDurationChange: null,
  189072. onEmptied: null,
  189073. onEnd: null,
  189074. onEnded: null,
  189075. onError: null,
  189076. onFocus: null,
  189077. onFocusIn: null,
  189078. onFocusOut: null,
  189079. onHashChange: null,
  189080. onInput: null,
  189081. onInvalid: null,
  189082. onKeyDown: null,
  189083. onKeyPress: null,
  189084. onKeyUp: null,
  189085. onLoad: null,
  189086. onLoadedData: null,
  189087. onLoadedMetadata: null,
  189088. onLoadStart: null,
  189089. onMessage: null,
  189090. onMouseDown: null,
  189091. onMouseEnter: null,
  189092. onMouseLeave: null,
  189093. onMouseMove: null,
  189094. onMouseOut: null,
  189095. onMouseOver: null,
  189096. onMouseUp: null,
  189097. onMouseWheel: null,
  189098. onOffline: null,
  189099. onOnline: null,
  189100. onPageHide: null,
  189101. onPageShow: null,
  189102. onPaste: null,
  189103. onPause: null,
  189104. onPlay: null,
  189105. onPlaying: null,
  189106. onPopState: null,
  189107. onProgress: null,
  189108. onRateChange: null,
  189109. onRepeat: null,
  189110. onReset: null,
  189111. onResize: null,
  189112. onScroll: null,
  189113. onSeeked: null,
  189114. onSeeking: null,
  189115. onSelect: null,
  189116. onShow: null,
  189117. onStalled: null,
  189118. onStorage: null,
  189119. onSubmit: null,
  189120. onSuspend: null,
  189121. onTimeUpdate: null,
  189122. onToggle: null,
  189123. onUnload: null,
  189124. onVolumeChange: null,
  189125. onWaiting: null,
  189126. onZoom: null,
  189127. opacity: null,
  189128. operator: null,
  189129. order: null,
  189130. orient: null,
  189131. orientation: null,
  189132. origin: null,
  189133. overflow: null,
  189134. overlay: null,
  189135. overlinePosition: number,
  189136. overlineThickness: number,
  189137. paintOrder: null,
  189138. panose1: null,
  189139. path: null,
  189140. pathLength: number,
  189141. patternContentUnits: null,
  189142. patternTransform: null,
  189143. patternUnits: null,
  189144. phase: null,
  189145. ping: spaceSeparated,
  189146. pitch: null,
  189147. playbackOrder: null,
  189148. pointerEvents: null,
  189149. points: null,
  189150. pointsAtX: number,
  189151. pointsAtY: number,
  189152. pointsAtZ: number,
  189153. preserveAlpha: null,
  189154. preserveAspectRatio: null,
  189155. primitiveUnits: null,
  189156. propagate: null,
  189157. property: commaOrSpaceSeparated,
  189158. r: null,
  189159. radius: null,
  189160. referrerPolicy: null,
  189161. refX: null,
  189162. refY: null,
  189163. rel: commaOrSpaceSeparated,
  189164. rev: commaOrSpaceSeparated,
  189165. renderingIntent: null,
  189166. repeatCount: null,
  189167. repeatDur: null,
  189168. requiredExtensions: commaOrSpaceSeparated,
  189169. requiredFeatures: commaOrSpaceSeparated,
  189170. requiredFonts: commaOrSpaceSeparated,
  189171. requiredFormats: commaOrSpaceSeparated,
  189172. resource: null,
  189173. restart: null,
  189174. result: null,
  189175. rotate: null,
  189176. rx: null,
  189177. ry: null,
  189178. scale: null,
  189179. seed: null,
  189180. shapeRendering: null,
  189181. side: null,
  189182. slope: null,
  189183. snapshotTime: null,
  189184. specularConstant: number,
  189185. specularExponent: number,
  189186. spreadMethod: null,
  189187. spacing: null,
  189188. startOffset: null,
  189189. stdDeviation: null,
  189190. stemh: null,
  189191. stemv: null,
  189192. stitchTiles: null,
  189193. stopColor: null,
  189194. stopOpacity: null,
  189195. strikethroughPosition: number,
  189196. strikethroughThickness: number,
  189197. string: null,
  189198. stroke: null,
  189199. strokeDashArray: commaOrSpaceSeparated,
  189200. strokeDashOffset: null,
  189201. strokeLineCap: null,
  189202. strokeLineJoin: null,
  189203. strokeMiterLimit: number,
  189204. strokeOpacity: number,
  189205. strokeWidth: null,
  189206. style: null,
  189207. surfaceScale: number,
  189208. syncBehavior: null,
  189209. syncBehaviorDefault: null,
  189210. syncMaster: null,
  189211. syncTolerance: null,
  189212. syncToleranceDefault: null,
  189213. systemLanguage: commaOrSpaceSeparated,
  189214. tabIndex: number,
  189215. tableValues: null,
  189216. target: null,
  189217. targetX: number,
  189218. targetY: number,
  189219. textAnchor: null,
  189220. textDecoration: null,
  189221. textRendering: null,
  189222. textLength: null,
  189223. timelineBegin: null,
  189224. title: null,
  189225. transformBehavior: null,
  189226. type: null,
  189227. typeOf: commaOrSpaceSeparated,
  189228. to: null,
  189229. transform: null,
  189230. u1: null,
  189231. u2: null,
  189232. underlinePosition: number,
  189233. underlineThickness: number,
  189234. unicode: null,
  189235. unicodeBidi: null,
  189236. unicodeRange: null,
  189237. unitsPerEm: number,
  189238. values: null,
  189239. vAlphabetic: number,
  189240. vMathematical: number,
  189241. vectorEffect: null,
  189242. vHanging: number,
  189243. vIdeographic: number,
  189244. version: null,
  189245. vertAdvY: number,
  189246. vertOriginX: number,
  189247. vertOriginY: number,
  189248. viewBox: null,
  189249. viewTarget: null,
  189250. visibility: null,
  189251. width: null,
  189252. widths: null,
  189253. wordSpacing: null,
  189254. writingMode: null,
  189255. x: null,
  189256. x1: null,
  189257. x2: null,
  189258. xChannelSelector: null,
  189259. xHeight: number,
  189260. y: null,
  189261. y1: null,
  189262. y2: null,
  189263. yChannelSelector: null,
  189264. z: null,
  189265. zoomAndPan: null
  189266. }
  189267. });
  189268. // node_modules/property-information/lib/find.js
  189269. var valid = /^data[-\w.:]+$/i;
  189270. var dash = /-[a-z]/g;
  189271. var cap = /[A-Z]/g;
  189272. function find(schema, value) {
  189273. const normal = normalize5(value);
  189274. let prop = value;
  189275. let Type = Info;
  189276. if (normal in schema.normal) {
  189277. return schema.property[schema.normal[normal]];
  189278. }
  189279. if (normal.length > 4 && normal.slice(0, 4) === "data" && valid.test(value)) {
  189280. if (value.charAt(4) === "-") {
  189281. const rest = value.slice(5).replace(dash, camelcase);
  189282. prop = "data" + rest.charAt(0).toUpperCase() + rest.slice(1);
  189283. } else {
  189284. const rest = value.slice(4);
  189285. if (!dash.test(rest)) {
  189286. let dashes = rest.replace(cap, kebab);
  189287. if (dashes.charAt(0) !== "-") {
  189288. dashes = "-" + dashes;
  189289. }
  189290. value = "data" + dashes;
  189291. }
  189292. }
  189293. Type = DefinedInfo;
  189294. }
  189295. return new Type(prop, value);
  189296. }
  189297. function kebab($0) {
  189298. return "-" + $0.toLowerCase();
  189299. }
  189300. function camelcase($0) {
  189301. return $0.charAt(1).toUpperCase();
  189302. }
  189303. // node_modules/property-information/lib/hast-to-react.js
  189304. var hastToReact = {
  189305. classId: "classID",
  189306. dataType: "datatype",
  189307. itemId: "itemID",
  189308. strokeDashArray: "strokeDasharray",
  189309. strokeDashOffset: "strokeDashoffset",
  189310. strokeLineCap: "strokeLinecap",
  189311. strokeLineJoin: "strokeLinejoin",
  189312. strokeMiterLimit: "strokeMiterlimit",
  189313. typeOf: "typeof",
  189314. xLinkActuate: "xlinkActuate",
  189315. xLinkArcRole: "xlinkArcrole",
  189316. xLinkHref: "xlinkHref",
  189317. xLinkRole: "xlinkRole",
  189318. xLinkShow: "xlinkShow",
  189319. xLinkTitle: "xlinkTitle",
  189320. xLinkType: "xlinkType",
  189321. xmlnsXLink: "xmlnsXlink"
  189322. };
  189323. // node_modules/property-information/index.js
  189324. var html3 = merge([xml, xlink, xmlns, aria, html2], "html");
  189325. var svg2 = merge([xml, xlink, xmlns, aria, svg], "svg");
  189326. // node_modules/space-separated-tokens/index.js
  189327. function stringify3(values) {
  189328. return values.join(" ").trim();
  189329. }
  189330. // node_modules/hast-util-to-estree/index.js
  189331. var import_style_to_object = __toESM(require_style_to_object(), 1);
  189332. // node_modules/zwitch/index.js
  189333. var own12 = {}.hasOwnProperty;
  189334. function zwitch(key, options) {
  189335. var settings = options || {};
  189336. function one3(value) {
  189337. var fn = one3.invalid;
  189338. var handlers2 = one3.handlers;
  189339. if (value && own12.call(value, key)) {
  189340. fn = own12.call(handlers2, value[key]) ? handlers2[value[key]] : one3.unknown;
  189341. }
  189342. if (fn) {
  189343. return fn.apply(this, arguments);
  189344. }
  189345. }
  189346. one3.handlers = settings.handlers || {};
  189347. one3.invalid = settings.invalid;
  189348. one3.unknown = settings.unknown;
  189349. return one3;
  189350. }
  189351. // node_modules/hast-util-to-estree/index.js
  189352. var toReact = hastToReact;
  189353. var own13 = {}.hasOwnProperty;
  189354. var tableElements = /* @__PURE__ */ new Set([
  189355. "table",
  189356. "thead",
  189357. "tbody",
  189358. "tfoot",
  189359. "tr",
  189360. "th",
  189361. "td"
  189362. ]);
  189363. function toEstree(tree, options = {}) {
  189364. const context = {
  189365. schema: options.space === "svg" ? svg2 : html3,
  189366. comments: [],
  189367. esm: [],
  189368. handle: zwitch("type", {
  189369. invalid,
  189370. unknown: unknown2,
  189371. handlers: Object.assign(
  189372. {},
  189373. {
  189374. comment,
  189375. doctype: ignore2,
  189376. element,
  189377. mdxjsEsm: mdxjsEsm2,
  189378. mdxFlowExpression: mdxExpression2,
  189379. mdxJsxFlowElement: mdxJsxElement,
  189380. mdxJsxTextElement: mdxJsxElement,
  189381. mdxTextExpression: mdxExpression2,
  189382. root: root2,
  189383. text: text4
  189384. },
  189385. options.handlers
  189386. )
  189387. })
  189388. };
  189389. let result = context.handle(tree, context);
  189390. const body = context.esm;
  189391. if (result) {
  189392. if (result.type !== "JSXFragment" && result.type !== "JSXElement") {
  189393. result = create4(tree, {
  189394. type: "JSXFragment",
  189395. openingFragment: { type: "JSXOpeningFragment" },
  189396. closingFragment: { type: "JSXClosingFragment" },
  189397. children: [result]
  189398. });
  189399. }
  189400. body.push(create4(tree, { type: "ExpressionStatement", expression: result }));
  189401. }
  189402. return create4(tree, {
  189403. type: "Program",
  189404. body,
  189405. sourceType: "module",
  189406. comments: context.comments
  189407. });
  189408. }
  189409. function invalid(value) {
  189410. throw new Error("Cannot handle value `" + value + "`, expected node");
  189411. }
  189412. function unknown2(node) {
  189413. throw new Error("Cannot handle unknown node `" + node.type + "`");
  189414. }
  189415. function ignore2() {
  189416. }
  189417. function comment(node, context) {
  189418. const esnode = inherit(node, { type: "Block", value: node.value });
  189419. context.comments.push(esnode);
  189420. return create4(node, {
  189421. type: "JSXExpressionContainer",
  189422. expression: create4(node, {
  189423. type: "JSXEmptyExpression",
  189424. comments: [Object.assign({}, esnode, { leading: false, trailing: true })]
  189425. })
  189426. });
  189427. }
  189428. function element(node, context) {
  189429. const parentSchema = context.schema;
  189430. let schema = parentSchema;
  189431. const props = node.properties || {};
  189432. if (parentSchema.space === "html" && node.tagName.toLowerCase() === "svg") {
  189433. schema = svg2;
  189434. context.schema = schema;
  189435. }
  189436. const children = all3(node, context);
  189437. const attributes = [];
  189438. let prop;
  189439. for (prop in props) {
  189440. if (own13.call(props, prop)) {
  189441. let value = props[prop];
  189442. const info = find(schema, prop);
  189443. let attributeValue;
  189444. if (value === void 0 || value === null || typeof value === "number" && Number.isNaN(value) || value === false || !value && info.boolean) {
  189445. continue;
  189446. }
  189447. prop = info.space ? toReact[info.property] || info.property : info.attribute;
  189448. if (Array.isArray(value)) {
  189449. value = info.commaSeparated ? stringify2(value) : stringify3(value);
  189450. }
  189451. if (prop === "style") {
  189452. const styleValue = typeof value === "string" ? parseStyle(value, node.tagName) : value;
  189453. const cssProperties = [];
  189454. let cssProp;
  189455. for (cssProp in styleValue) {
  189456. if (own13.call(styleValue, cssProp)) {
  189457. cssProperties.push({
  189458. type: "Property",
  189459. method: false,
  189460. shorthand: false,
  189461. computed: false,
  189462. key: { type: "Identifier", name: cssProp },
  189463. value: { type: "Literal", value: String(styleValue[cssProp]) },
  189464. kind: "init"
  189465. });
  189466. }
  189467. }
  189468. attributeValue = {
  189469. type: "JSXExpressionContainer",
  189470. expression: { type: "ObjectExpression", properties: cssProperties }
  189471. };
  189472. } else if (value === true) {
  189473. attributeValue = null;
  189474. } else {
  189475. attributeValue = { type: "Literal", value: String(value) };
  189476. }
  189477. if (jsxIdentifierName(prop)) {
  189478. attributes.push({
  189479. type: "JSXAttribute",
  189480. name: { type: "JSXIdentifier", name: prop },
  189481. value: attributeValue
  189482. });
  189483. } else {
  189484. attributes.push({
  189485. type: "JSXSpreadAttribute",
  189486. argument: {
  189487. type: "ObjectExpression",
  189488. properties: [
  189489. {
  189490. type: "Property",
  189491. method: false,
  189492. shorthand: false,
  189493. computed: false,
  189494. key: { type: "Literal", value: String(prop) },
  189495. value: attributeValue || { type: "Literal", value: true },
  189496. kind: "init"
  189497. }
  189498. ]
  189499. }
  189500. });
  189501. }
  189502. }
  189503. }
  189504. context.schema = parentSchema;
  189505. return inherit(node, {
  189506. type: "JSXElement",
  189507. openingElement: {
  189508. type: "JSXOpeningElement",
  189509. attributes,
  189510. name: createJsxName(node.tagName),
  189511. selfClosing: children.length === 0
  189512. },
  189513. closingElement: children.length > 0 ? { type: "JSXClosingElement", name: createJsxName(node.tagName) } : null,
  189514. children
  189515. });
  189516. }
  189517. function mdxjsEsm2(node, context) {
  189518. const estree = node.data && node.data.estree;
  189519. const comments = estree && estree.comments || [];
  189520. if (estree) {
  189521. context.comments.push(...comments);
  189522. attachComments(estree, comments);
  189523. context.esm.push(...estree.body);
  189524. }
  189525. }
  189526. function mdxExpression2(node, context) {
  189527. const estree = node.data && node.data.estree;
  189528. const comments = estree && estree.comments || [];
  189529. let expression;
  189530. if (estree) {
  189531. context.comments.push(...comments);
  189532. attachComments(estree, estree.comments);
  189533. expression = estree.body[0] && estree.body[0].type === "ExpressionStatement" && estree.body[0].expression || void 0;
  189534. }
  189535. return inherit(node, {
  189536. type: "JSXExpressionContainer",
  189537. expression: expression || create4(node, { type: "JSXEmptyExpression" })
  189538. });
  189539. }
  189540. function mdxJsxElement(node, context) {
  189541. const parentSchema = context.schema;
  189542. let schema = parentSchema;
  189543. const attrs = node.attributes || [];
  189544. let index2 = -1;
  189545. if (node.name && parentSchema.space === "html" && node.name.toLowerCase() === "svg") {
  189546. schema = svg2;
  189547. context.schema = schema;
  189548. }
  189549. const children = all3(node, context);
  189550. const attributes = [];
  189551. while (++index2 < attrs.length) {
  189552. const attr = attrs[index2];
  189553. const value = attr.value;
  189554. let attributeValue;
  189555. if (attr.type === "mdxJsxAttribute") {
  189556. if (value === void 0 || value === null) {
  189557. attributeValue = null;
  189558. } else if (typeof value === "object") {
  189559. const estree = value.data && value.data.estree;
  189560. const comments = estree && estree.comments || [];
  189561. let expression;
  189562. if (estree) {
  189563. context.comments.push(...comments);
  189564. attachComments(estree, estree.comments);
  189565. expression = estree.body[0] && estree.body[0].type === "ExpressionStatement" && estree.body[0].expression || void 0;
  189566. }
  189567. attributeValue = inherit(value, {
  189568. type: "JSXExpressionContainer",
  189569. expression: expression || { type: "JSXEmptyExpression" }
  189570. });
  189571. } else {
  189572. attributeValue = { type: "Literal", value: String(value) };
  189573. }
  189574. attributes.push(
  189575. inherit(attr, {
  189576. type: "JSXAttribute",
  189577. name: createJsxName(attr.name, true),
  189578. value: attributeValue
  189579. })
  189580. );
  189581. } else {
  189582. const estree = attr.data && attr.data.estree;
  189583. const comments = estree && estree.comments || [];
  189584. let argumentValue;
  189585. if (estree) {
  189586. context.comments.push(...comments);
  189587. attachComments(estree, estree.comments);
  189588. argumentValue = estree.body[0] && estree.body[0].type === "ExpressionStatement" && estree.body[0].expression && estree.body[0].expression.type === "ObjectExpression" && estree.body[0].expression.properties && estree.body[0].expression.properties[0] && estree.body[0].expression.properties[0].type === "SpreadElement" && estree.body[0].expression.properties[0].argument || void 0;
  189589. }
  189590. attributes.push(
  189591. inherit(attr, {
  189592. type: "JSXSpreadAttribute",
  189593. argument: argumentValue || { type: "ObjectExpression", properties: [] }
  189594. })
  189595. );
  189596. }
  189597. }
  189598. context.schema = parentSchema;
  189599. return inherit(
  189600. node,
  189601. node.name ? {
  189602. type: "JSXElement",
  189603. openingElement: {
  189604. type: "JSXOpeningElement",
  189605. attributes,
  189606. name: createJsxName(node.name),
  189607. selfClosing: children.length === 0
  189608. },
  189609. closingElement: children.length > 0 ? { type: "JSXClosingElement", name: createJsxName(node.name) } : null,
  189610. children
  189611. } : {
  189612. type: "JSXFragment",
  189613. openingFragment: { type: "JSXOpeningFragment" },
  189614. closingFragment: { type: "JSXClosingFragment" },
  189615. children
  189616. }
  189617. );
  189618. }
  189619. function root2(node, context) {
  189620. const children = all3(node, context);
  189621. const cleanChildren = [];
  189622. let index2 = -1;
  189623. let queue;
  189624. while (++index2 < children.length) {
  189625. const child = children[index2];
  189626. if (child.type === "JSXExpressionContainer" && child.expression.type === "Literal" && whitespace(child.expression.value)) {
  189627. if (queue)
  189628. queue.push(child);
  189629. } else {
  189630. if (queue)
  189631. cleanChildren.push(...queue);
  189632. cleanChildren.push(child);
  189633. queue = [];
  189634. }
  189635. }
  189636. return inherit(node, {
  189637. type: "JSXFragment",
  189638. openingFragment: { type: "JSXOpeningFragment" },
  189639. closingFragment: { type: "JSXClosingFragment" },
  189640. children: cleanChildren
  189641. });
  189642. }
  189643. function text4(node) {
  189644. const value = String(node.value || "");
  189645. if (!value)
  189646. return;
  189647. return create4(node, {
  189648. type: "JSXExpressionContainer",
  189649. expression: inherit(node, { type: "Literal", value })
  189650. });
  189651. }
  189652. function all3(parent, context) {
  189653. const children = parent.children || [];
  189654. let index2 = -1;
  189655. const results = [];
  189656. const ignoreLineBreak = context.schema.space === "html" && parent.type === "element" && tableElements.has(parent.tagName.toLowerCase());
  189657. while (++index2 < children.length) {
  189658. const child = children[index2];
  189659. if (ignoreLineBreak && child.type === "text" && child.value === "\n") {
  189660. continue;
  189661. }
  189662. const result = context.handle(child, context);
  189663. if (Array.isArray(result)) {
  189664. results.push(...result);
  189665. } else if (result) {
  189666. results.push(result);
  189667. }
  189668. }
  189669. return results;
  189670. }
  189671. function inherit(hast, esnode) {
  189672. const left = hast.data;
  189673. let right;
  189674. let key;
  189675. create4(hast, esnode);
  189676. if (left) {
  189677. for (key in left) {
  189678. if (own13.call(left, key) && key !== "estree") {
  189679. if (!right)
  189680. right = {};
  189681. right[key] = left[key];
  189682. }
  189683. }
  189684. if (right) {
  189685. esnode.data = right;
  189686. }
  189687. }
  189688. return esnode;
  189689. }
  189690. function create4(hast, esnode) {
  189691. const p = position2(hast);
  189692. if (p.start.line && p.start.offset !== void 0 && p.end.offset !== void 0) {
  189693. esnode.start = p.start.offset;
  189694. esnode.end = p.end.offset;
  189695. esnode.loc = {
  189696. start: { line: p.start.line, column: p.start.column - 1 },
  189697. end: { line: p.end.line, column: p.end.column - 1 }
  189698. };
  189699. esnode.range = [p.start.offset, p.end.offset];
  189700. }
  189701. return esnode;
  189702. }
  189703. var createJsxName = function(name2, attribute) {
  189704. if (!attribute && name2.includes(".")) {
  189705. const parts = name2.split(".");
  189706. let part = parts.shift();
  189707. let node = { type: "JSXIdentifier", name: part };
  189708. while (part = parts.shift()) {
  189709. node = {
  189710. type: "JSXMemberExpression",
  189711. object: node,
  189712. property: { type: "JSXIdentifier", name: part }
  189713. };
  189714. }
  189715. return node;
  189716. }
  189717. if (name2.includes(":")) {
  189718. const parts = name2.split(":");
  189719. return {
  189720. type: "JSXNamespacedName",
  189721. namespace: { type: "JSXIdentifier", name: parts[0] },
  189722. name: { type: "JSXIdentifier", name: parts[1] }
  189723. };
  189724. }
  189725. return { type: "JSXIdentifier", name: name2 };
  189726. };
  189727. function parseStyle(value, tagName) {
  189728. const result = {};
  189729. try {
  189730. (0, import_style_to_object.default)(value, iterator);
  189731. } catch (error) {
  189732. const exception = error;
  189733. exception.message = tagName + "[style]" + exception.message.slice("undefined".length);
  189734. throw error;
  189735. }
  189736. return result;
  189737. function iterator(name2, value2) {
  189738. if (name2.slice(0, 4) === "-ms-")
  189739. name2 = "ms-" + name2.slice(4);
  189740. result[name2.replace(/-([a-z])/g, styleReplacer)] = value2;
  189741. }
  189742. }
  189743. function styleReplacer(_, $1) {
  189744. return $1.toUpperCase();
  189745. }
  189746. function jsxIdentifierName(name2) {
  189747. let index2 = -1;
  189748. while (++index2 < name2.length) {
  189749. if (!(index2 ? cont3 : start2)(name2.charCodeAt(index2)))
  189750. return false;
  189751. }
  189752. return index2 > 0;
  189753. function cont3(code2) {
  189754. return cont2(code2) || code2 === 45;
  189755. }
  189756. }
  189757. // node_modules/@mdx-js/mdx/lib/plugin/rehype-recma.js
  189758. function rehypeRecma() {
  189759. return (tree) => toEstree(tree);
  189760. }
  189761. // node_modules/@mdx-js/mdx/lib/plugin/rehype-remove-raw.js
  189762. function rehypeRemoveRaw() {
  189763. return (tree) => {
  189764. visit2(tree, "raw", (_, index2, parent) => {
  189765. if (parent && typeof index2 === "number") {
  189766. parent.children.splice(index2, 1);
  189767. return index2;
  189768. }
  189769. });
  189770. };
  189771. }
  189772. // node_modules/@mdx-js/mdx/lib/plugin/remark-mark-and-unravel.js
  189773. function remarkMarkAndUnravel() {
  189774. return (tree) => {
  189775. visit2(tree, (node, index2, parent_) => {
  189776. const parent = parent_;
  189777. let offset2 = -1;
  189778. let all4 = true;
  189779. let oneOrMore;
  189780. if (parent && typeof index2 === "number" && node.type === "paragraph") {
  189781. const children = node.children;
  189782. while (++offset2 < children.length) {
  189783. const child = children[offset2];
  189784. if (child.type === "mdxJsxTextElement" || child.type === "mdxTextExpression") {
  189785. oneOrMore = true;
  189786. } else if (child.type === "text" && /^[\t\r\n ]+$/.test(String(child.value))) {
  189787. } else {
  189788. all4 = false;
  189789. break;
  189790. }
  189791. }
  189792. if (all4 && oneOrMore) {
  189793. offset2 = -1;
  189794. while (++offset2 < children.length) {
  189795. const child = children[offset2];
  189796. if (child.type === "mdxJsxTextElement") {
  189797. child.type = "mdxJsxFlowElement";
  189798. }
  189799. if (child.type === "mdxTextExpression") {
  189800. child.type = "mdxFlowExpression";
  189801. }
  189802. }
  189803. parent.children.splice(index2, 1, ...children);
  189804. return index2;
  189805. }
  189806. }
  189807. if (node.type === "mdxJsxFlowElement" || node.type === "mdxJsxTextElement") {
  189808. const data2 = node.data || (node.data = {});
  189809. data2._mdxExplicitJsx = true;
  189810. }
  189811. });
  189812. };
  189813. }
  189814. // node_modules/@mdx-js/mdx/lib/node-types.js
  189815. var nodeTypes = [
  189816. "mdxFlowExpression",
  189817. "mdxJsxFlowElement",
  189818. "mdxJsxTextElement",
  189819. "mdxTextExpression",
  189820. "mdxjsEsm"
  189821. ];
  189822. // node_modules/@mdx-js/mdx/lib/condition.js
  189823. import process2 from "process";
  189824. var development = process2.env.NODE_ENV === "development";
  189825. // node_modules/@mdx-js/mdx/lib/core.js
  189826. var removedOptions = [
  189827. "filepath",
  189828. "compilers",
  189829. "hastPlugins",
  189830. "mdPlugins",
  189831. "skipExport",
  189832. "wrapExport"
  189833. ];
  189834. function createProcessor(options = {}) {
  189835. const {
  189836. development: development2 = development,
  189837. jsx,
  189838. format,
  189839. outputFormat,
  189840. providerImportSource,
  189841. recmaPlugins,
  189842. rehypePlugins,
  189843. remarkPlugins,
  189844. SourceMapGenerator,
  189845. ...rest
  189846. } = options;
  189847. let index2 = -1;
  189848. while (++index2 < removedOptions.length) {
  189849. const key = removedOptions[index2];
  189850. if (key in options) {
  189851. throw new Error(
  189852. "`options." + key + "` is no longer supported. Please see <https://mdxjs.com/migrating/v2/> for more information"
  189853. );
  189854. }
  189855. }
  189856. if (format === "detect") {
  189857. throw new Error(
  189858. "Incorrect `format: 'detect'`: `createProcessor` can support either `md` or `mdx`; it does not support detecting the format"
  189859. );
  189860. }
  189861. const pipeline = unified().use(remark_parse_default);
  189862. if (format !== "md") {
  189863. pipeline.use(remarkMdx);
  189864. }
  189865. pipeline.use(remarkMarkAndUnravel).use(remarkPlugins || []).use(lib_default, { allowDangerousHtml: true, passThrough: nodeTypes }).use(rehypePlugins || []);
  189866. if (format === "md") {
  189867. pipeline.use(rehypeRemoveRaw);
  189868. }
  189869. pipeline.use(rehypeRecma).use(recmaDocument, { ...rest, outputFormat }).use(recmaJsxRewrite, { development: development2, providerImportSource, outputFormat });
  189870. if (!jsx) {
  189871. pipeline.use(recmaJsxBuild, { outputFormat });
  189872. }
  189873. pipeline.use(recmaStringify, { SourceMapGenerator }).use(recmaPlugins || []);
  189874. return pipeline;
  189875. }
  189876. // node_modules/@mdx-js/mdx/lib/util/extnames.js
  189877. var import_markdown_extensions = __toESM(require_markdown_extensions2(), 1);
  189878. var md = import_markdown_extensions.default.map((d) => "." + d);
  189879. // node_modules/@mdx-js/mdx/lib/util/resolve-file-and-options.js
  189880. function resolveFileAndOptions(vfileCompatible, options) {
  189881. const file = looksLikeAVFile2(vfileCompatible) ? vfileCompatible : new VFile(vfileCompatible);
  189882. const { format, ...rest } = options || {};
  189883. return {
  189884. file,
  189885. options: {
  189886. format: format === "md" || format === "mdx" ? format : file.extname && (rest.mdExtensions || md).includes(file.extname) ? "md" : "mdx",
  189887. ...rest
  189888. }
  189889. };
  189890. }
  189891. function looksLikeAVFile2(value) {
  189892. return Boolean(
  189893. value && typeof value === "object" && "message" in value && "messages" in value
  189894. );
  189895. }
  189896. // node_modules/@mdx-js/mdx/lib/compile.js
  189897. function compileSync(vfileCompatible, compileOptions) {
  189898. const { file, options } = resolveFileAndOptions(vfileCompatible, compileOptions);
  189899. return createProcessor(options).processSync(file);
  189900. }
  189901. // src/analyze.ts
  189902. var import_cloneDeep = __toESM(require_cloneDeep8());
  189903. var getAttr = (elt, what) => {
  189904. const attr = elt.attributes.find((n) => n.name.name === what);
  189905. return attr;
  189906. };
  189907. var getAttrValue = (elt, what) => {
  189908. return getAttr(elt, what)?.value;
  189909. };
  189910. var extractTitle = (root3, varToImport) => {
  189911. const result = { title: void 0, of: void 0, name: void 0, isTemplate: false };
  189912. let contents;
  189913. root3.program.body.forEach((child) => {
  189914. if (t.isExpressionStatement(child) && t.isJSXFragment(child.expression)) {
  189915. if (contents)
  189916. throw new Error("duplicate contents");
  189917. contents = child;
  189918. }
  189919. });
  189920. if (contents) {
  189921. const jsx = contents.expression;
  189922. jsx.children.forEach((child) => {
  189923. if (t.isJSXElement(child)) {
  189924. if (t.isJSXIdentifier(child.openingElement.name)) {
  189925. const name2 = child.openingElement.name.name;
  189926. if (name2 === "Meta") {
  189927. if (result.title || result.name || result.of) {
  189928. throw new Error("Meta can only be declared once");
  189929. }
  189930. const titleAttrValue = getAttrValue(child.openingElement, "title");
  189931. if (titleAttrValue) {
  189932. if (t.isStringLiteral(titleAttrValue)) {
  189933. result.title = titleAttrValue.value;
  189934. } else {
  189935. throw new Error(`Expected string literal title, received ${titleAttrValue.type}`);
  189936. }
  189937. }
  189938. const nameAttrValue = getAttrValue(child.openingElement, "name");
  189939. if (nameAttrValue) {
  189940. if (t.isStringLiteral(nameAttrValue)) {
  189941. result.name = nameAttrValue.value;
  189942. } else {
  189943. throw new Error(`Expected string literal name, received ${nameAttrValue.type}`);
  189944. }
  189945. }
  189946. const ofAttrValue = getAttrValue(child.openingElement, "of");
  189947. if (ofAttrValue) {
  189948. if (t.isJSXExpressionContainer(ofAttrValue)) {
  189949. const of = ofAttrValue.expression;
  189950. if (t.isIdentifier(of)) {
  189951. const importName = varToImport[of.name];
  189952. if (importName) {
  189953. result.of = importName;
  189954. } else {
  189955. throw new Error(`Unknown identifier ${of.name}`);
  189956. }
  189957. } else {
  189958. throw new Error(`Expected identifier, received ${of.type}`);
  189959. }
  189960. } else {
  189961. throw new Error(`Expected JSX expression, received ${ofAttrValue.type}`);
  189962. }
  189963. }
  189964. const isTemplateAttr = getAttr(child.openingElement, "isTemplate");
  189965. if (isTemplateAttr) {
  189966. if (!isTemplateAttr.value) {
  189967. result.isTemplate = true;
  189968. } else if (t.isJSXExpressionContainer(isTemplateAttr.value)) {
  189969. const isTemplate = isTemplateAttr.value.expression;
  189970. if (t.isBooleanLiteral(isTemplate)) {
  189971. result.isTemplate = isTemplate.value;
  189972. } else {
  189973. throw new Error(`Expected boolean isTemplate, received ${isTemplate.type}`);
  189974. }
  189975. } else {
  189976. throw new Error(
  189977. `Expected JSX expression isTemplate, received ${isTemplateAttr.value.type}`
  189978. );
  189979. }
  189980. }
  189981. }
  189982. }
  189983. } else if (t.isJSXExpressionContainer(child)) {
  189984. } else {
  189985. throw new Error(`Unexpected JSX child: ${child.type}`);
  189986. }
  189987. });
  189988. }
  189989. return result;
  189990. };
  189991. var getTraverse = (input) => {
  189992. switch (true) {
  189993. case typeof input === "function": {
  189994. return input;
  189995. }
  189996. case typeof input.traverse === "function": {
  189997. return input.traverse;
  189998. }
  189999. case typeof input.default === "function": {
  190000. return input.default;
  190001. }
  190002. case typeof input.default.default === "function": {
  190003. return input.default.default;
  190004. }
  190005. default: {
  190006. throw new Error(`Unable to get traverse function from ${input}`);
  190007. }
  190008. }
  190009. };
  190010. var extractImports = (root3) => {
  190011. const varToImport = {};
  190012. getTraverse(babelTraverse)(root3, {
  190013. ImportDeclaration: {
  190014. enter({ node }) {
  190015. const { source, specifiers } = node;
  190016. if (t.isStringLiteral(source)) {
  190017. specifiers.forEach((s) => {
  190018. varToImport[s.local.name] = source.value;
  190019. });
  190020. } else {
  190021. throw new Error("MDX: unexpected import source");
  190022. }
  190023. }
  190024. }
  190025. });
  190026. return varToImport;
  190027. };
  190028. var plugin = (store) => (root3) => {
  190029. const estree = store.toEstree(root3);
  190030. const clone = (0, import_cloneDeep.default)(estree);
  190031. const babel = (0, import_estree_to_babel.default)(clone);
  190032. const varToImport = extractImports(babel);
  190033. const { title, of, name: name2, isTemplate } = extractTitle(babel, varToImport);
  190034. store.title = title;
  190035. store.of = of;
  190036. store.name = name2;
  190037. store.isTemplate = isTemplate;
  190038. store.imports = Array.from(new Set(Object.values(varToImport)));
  190039. return root3;
  190040. };
  190041. var analyze2 = (code2) => {
  190042. const store = {
  190043. title: void 0,
  190044. of: void 0,
  190045. name: void 0,
  190046. isTemplate: false,
  190047. imports: void 0,
  190048. toEstree
  190049. };
  190050. compileSync(code2, {
  190051. rehypePlugins: [[plugin, store]]
  190052. });
  190053. const { title, of, name: name2, isTemplate, imports = [] } = store;
  190054. return { title, of, name: name2, isTemplate, imports };
  190055. };
  190056. export {
  190057. analyze2 as analyze,
  190058. extractImports,
  190059. plugin
  190060. };
  190061. /*!
  190062. * Determine if an object is a Buffer
  190063. *
  190064. * @author Feross Aboukhadijeh <https://feross.org>
  190065. * @license MIT
  190066. */